@mcp-abap-adt/adt-clients 30.0.0 → 31.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 +17 -11
- package/dist/core/shared/sqlQuery.d.ts +6 -0
- package/dist/core/shared/sqlQuery.d.ts.map +1 -1
- package/dist/core/shared/sqlQuery.js +9 -2
- package/dist/core/shared/tableContents.d.ts +5 -0
- package/dist/core/shared/tableContents.d.ts.map +1 -1
- package/dist/core/shared/tableContents.js +8 -1
- package/docs/usage/MIGRATION-31.md +38 -0
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -91,12 +91,12 @@ This package interacts with external packages **ONLY through interfaces**:
|
|
|
91
91
|
|
|
92
92
|
| package | what this package takes from it |
|
|
93
93
|
|---|---|
|
|
94
|
-
| [`@mcp-abap-adt/interfaces-adt`](https://www.npmjs.com/package/@mcp-abap-adt/interfaces-adt) `^
|
|
95
|
-
| [`@mcp-abap-adt/interfaces-adt-connection`](https://www.npmjs.com/package/@mcp-abap-adt/interfaces-adt-connection) `^
|
|
96
|
-
| [`@mcp-abap-adt/interfaces-network`](https://www.npmjs.com/package/@mcp-abap-adt/interfaces-network) `^2.0.
|
|
97
|
-
| [`@mcp-abap-adt/interfaces-utils`](https://www.npmjs.com/package/@mcp-abap-adt/interfaces-utils) `^1.1.
|
|
98
|
-
| [`@mcp-abap-adt/interfaces-auth`](https://www.npmjs.com/package/@mcp-abap-adt/interfaces-auth) — **dev only** | `IAuthProvider`, for the test helpers that open a session |
|
|
99
|
-
| [`@mcp-abap-adt/interfaces-auth-sap`](https://www.npmjs.com/package/@mcp-abap-adt/interfaces-auth-sap) `^
|
|
94
|
+
| [`@mcp-abap-adt/interfaces-adt`](https://www.npmjs.com/package/@mcp-abap-adt/interfaces-adt) `^16.0.0` | the capability atoms, every object's config, `IAdtResponse`, `IAnalyse`, `IAdtAnalyseOptions`, `IResultStrategy`, `ADT_NO_FAILURE`, `ADT_TASK_TYPE` |
|
|
95
|
+
| [`@mcp-abap-adt/interfaces-adt-connection`](https://www.npmjs.com/package/@mcp-abap-adt/interfaces-adt-connection) `^3.0.0` | `IAbapConnection`, `IAdtWireResponse`, `IAbapRequestOptions`, `ITimeoutConfig`, the connection capability atoms, `ADT_SESSION_ERROR` |
|
|
96
|
+
| [`@mcp-abap-adt/interfaces-network`](https://www.npmjs.com/package/@mcp-abap-adt/interfaces-network) `^2.0.1` | `IWebSocketTransport` and its four companions, `HttpError` |
|
|
97
|
+
| [`@mcp-abap-adt/interfaces-utils`](https://www.npmjs.com/package/@mcp-abap-adt/interfaces-utils) `^1.1.1` | `ILogger`, `LogLevel`, `XmlNode` |
|
|
98
|
+
| [`@mcp-abap-adt/interfaces-auth`](https://www.npmjs.com/package/@mcp-abap-adt/interfaces-auth) `^7.5.0` — **dev only** | `IAuthProvider`, for the test helpers that open a session |
|
|
99
|
+
| [`@mcp-abap-adt/interfaces-auth-sap`](https://www.npmjs.com/package/@mcp-abap-adt/interfaces-auth-sap) `^3.3.0` — **dev only** | `ISapConfig`, to build a connector in one unit test |
|
|
100
100
|
|
|
101
101
|
Taking them by name is what keeps a consumer off one release rate for every contract: `interfaces-utils` has had two releases ever, and a package that needs only `ILogger` should move at that pace rather than at ADT's. The `@mcp-abap-adt/interfaces` facade is **deleted** — npm still serves 51.0.0 to anyone pinned to it and nothing further ships there.
|
|
102
102
|
|
|
@@ -162,7 +162,7 @@ npm install @mcp-abap-adt/adt-clients
|
|
|
162
162
|
|
|
163
163
|
6. **AbapDebugger, AmdpDebugger, MemorySnapshots**
|
|
164
164
|
- Standalone, from `@mcp-abap-adt/adt-clients/runtime` or the root: `new AbapDebugger(connection, logger, results?, { onConflict? })`
|
|
165
|
-
- One member per request, contracts `IAbapDebugger`, `IAmdpDebugger`, `IMemorySnapshots` from `@mcp-abap-adt/interfaces-adt` (contract
|
|
165
|
+
- One member per request, contracts `IAbapDebugger`, `IAmdpDebugger`, `IMemorySnapshots` from `@mcp-abap-adt/interfaces-adt` (contract 16 pairs with clients 31)
|
|
166
166
|
- **The identity states its mode.** `{ debuggingMode: 'user', requestUser, terminalId, ideId }`, or `{ debuggingMode: 'terminal', terminalId, ideId }`; `attach` takes the identity, not the user. A terminal-mode listener catches a run that carries its ids: `run(target, { debuggee: { terminalId, ideId } })` sends them in `SAP-PASSPORT` (since 29.1.0)
|
|
167
167
|
- **Breakpoints are replaced, not added to.** `setBreakpoints` and `syncBreakpoints` replace the identity's set, and `stopListener` deletes it: arm the whole set in one call
|
|
168
168
|
- **Two sessions.** The ABAP listener holds one stateful connection; each debuggee caught is attached on a new one, routed to its application server. The AMDP debugger answers events on one session and takes commands on another
|
|
@@ -217,8 +217,11 @@ const config = {
|
|
|
217
217
|
|
|
218
218
|
// Three things, all stated by you: which system (the connector), which
|
|
219
219
|
// credential (the provider), and which wire (the transport). Since
|
|
220
|
-
// @mcp-abap-adt/connection 6.0.0 nothing is inferred
|
|
221
|
-
//
|
|
220
|
+
// @mcp-abap-adt/connection 6.0.0 nothing is inferred — for ABAP Cloud take
|
|
221
|
+
// AdtCloudConnector + CloudHttpTransport instead; connection 16's
|
|
222
|
+
// createConnection({ system, transport, … }) states the same two facts. One
|
|
223
|
+
// instance is one SAP session: after disconnect() a new session is a new
|
|
224
|
+
// instance.
|
|
222
225
|
const connection = new AdtOnPremConnector(
|
|
223
226
|
config,
|
|
224
227
|
new BasicAuthProvider(config.username, config.password),
|
|
@@ -857,7 +860,7 @@ everything else is not.
|
|
|
857
860
|
|
|
858
861
|
### Single Definition Site: the contract packages
|
|
859
862
|
|
|
860
|
-
Since **7.5.0**, every contract type is **defined once**, in the contract packages — today `@mcp-abap-adt/interfaces-adt` (`^
|
|
863
|
+
Since **7.5.0**, every contract type is **defined once**, in the contract packages — today `@mcp-abap-adt/interfaces-adt` (`^16.0.0`) for the ADT contracts and `@mcp-abap-adt/interfaces-adt-connection` (`^3.0.0`) for the connection. This package declares no copies of its own — every `IXxxConfig`, the capability atoms, the option and response types and the cross-cutting shared types all live there.
|
|
861
864
|
|
|
862
865
|
**Import them from the package that owns them:**
|
|
863
866
|
|
|
@@ -937,7 +940,7 @@ contracts (`IAbapDebugger`, `IAmdpDebugger`, `IMemorySnapshots`, 13.1.0). This
|
|
|
937
940
|
package no longer declares or exports any contract type — every contract name it uses is
|
|
938
941
|
sourced from the contract packages.
|
|
939
942
|
|
|
940
|
-
> **Version pairing.** `adt-clients`
|
|
943
|
+
> **Version pairing.** `adt-clients` 31 pairs with `interfaces-adt` 16 and `interfaces-adt-connection` 3 (the per-request `signal` and `ADT_REQUEST_ERROR` are gone), and `adt-strategies` 0.11.0 declares the same ranges. Because the types are sourced rather than copied, `@mcp-abap-adt/interfaces-adt` and `@mcp-abap-adt/interfaces-adt-connection` are hard peers of this package's public API. A major bump there implies a bump here; keep the two in step rather than letting a resolver pick a mismatched pair.
|
|
941
944
|
|
|
942
945
|
### Naming Conventions
|
|
943
946
|
|
|
@@ -974,6 +977,9 @@ See [Architecture Documentation](docs/architecture/ARCHITECTURE.md#type-system-a
|
|
|
974
977
|
One document per breaking release, each written for a consumer on the contract
|
|
975
978
|
before it:
|
|
976
979
|
|
|
980
|
+
- **[30.x → 31.0.0](docs/usage/MIGRATION-31.md)** — `interfaces-adt` 16 and
|
|
981
|
+
`interfaces-adt-connection` 3: the per-request `signal`, `ADT_REQUEST_ERROR`
|
|
982
|
+
and `IAdtError.refusal` are gone; code written for 30.x compiles unchanged.
|
|
977
983
|
- **[29.x → 30.0.0](docs/usage/MIGRATION-30.md)** — `getRequest()` gains
|
|
978
984
|
`sortAndCompress` and `moveObjects`; `ITransportResults` has two more
|
|
979
985
|
required slots, `sortedAndCompressed` and `movedObjects`.
|
|
@@ -10,6 +10,12 @@ import type { IGetSqlQueryParams } from './types';
|
|
|
10
10
|
/**
|
|
11
11
|
* Execute freestyle SQL query via SAP ADT Data Preview API
|
|
12
12
|
*
|
|
13
|
+
* **No deadline of the library's.** The request carries `timeout: 0` — none:
|
|
14
|
+
* a query over large tables runs as long as it runs, and how long to wait is
|
|
15
|
+
* the caller's, set on the connection it hands in. Until 31.0.0 this set
|
|
16
|
+
* `getTimeout('long')` (`SAP_TIMEOUT_LONG`, 120 s by default), which a caller
|
|
17
|
+
* applying its own deadline only where the request had none never got to.
|
|
18
|
+
*
|
|
13
19
|
* @param connection - ABAP connection
|
|
14
20
|
* @param params - SQL query parameters
|
|
15
21
|
* @returns Query results
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sqlQuery.d.ts","sourceRoot":"","sources":["../../../src/core/shared/sqlQuery.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EACjB,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"sqlQuery.d.ts","sourceRoot":"","sources":["../../../src/core/shared/sqlQuery.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EACjB,MAAM,yCAAyC,CAAC;AAEjD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD;;;;;;;;;;;;GAYG;AACH,wBAAsB,WAAW,CAC/B,UAAU,EAAE,eAAe,EAC3B,MAAM,EAAE,kBAAkB,GACzB,OAAO,CAAC,gBAAgB,CAAC,CAgB3B"}
|
|
@@ -9,10 +9,15 @@
|
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.getSqlQuery = getSqlQuery;
|
|
11
11
|
const contentTypes_1 = require("../../constants/contentTypes");
|
|
12
|
-
const timeouts_1 = require("../../utils/timeouts");
|
|
13
12
|
/**
|
|
14
13
|
* Execute freestyle SQL query via SAP ADT Data Preview API
|
|
15
14
|
*
|
|
15
|
+
* **No deadline of the library's.** The request carries `timeout: 0` — none:
|
|
16
|
+
* a query over large tables runs as long as it runs, and how long to wait is
|
|
17
|
+
* the caller's, set on the connection it hands in. Until 31.0.0 this set
|
|
18
|
+
* `getTimeout('long')` (`SAP_TIMEOUT_LONG`, 120 s by default), which a caller
|
|
19
|
+
* applying its own deadline only where the request had none never got to.
|
|
20
|
+
*
|
|
16
21
|
* @param connection - ABAP connection
|
|
17
22
|
* @param params - SQL query parameters
|
|
18
23
|
* @returns Query results
|
|
@@ -23,7 +28,9 @@ async function getSqlQuery(connection, params) {
|
|
|
23
28
|
return connection.makeAdtRequest({
|
|
24
29
|
url,
|
|
25
30
|
method: 'POST',
|
|
26
|
-
|
|
31
|
+
// No deadline: the contract requires a number, and 0 is what the wires
|
|
32
|
+
// read as "do not abort". How long to wait is the caller's.
|
|
33
|
+
timeout: 0,
|
|
27
34
|
data: params.sql_query,
|
|
28
35
|
headers: {
|
|
29
36
|
'Content-Type': contentTypes_1.CT_SOURCE,
|
|
@@ -27,6 +27,11 @@ export declare function getTableColumns(connection: IAbapConnection, tableName:
|
|
|
27
27
|
* statement the caller could not reach: not the column list, not an ordering,
|
|
28
28
|
* not a `WHERE`. Read the columns with {@link getTableColumns} and write the
|
|
29
29
|
* statement you want.
|
|
30
|
+
*
|
|
31
|
+
* **No deadline of the library's**, as for the freestyle query: the request
|
|
32
|
+
* carries `timeout: 0` — none — and how long to wait is the caller's, set on the
|
|
33
|
+
* connection it hands in. Until 31.0.0 this set `getTimeout('long')`
|
|
34
|
+
* (`SAP_TIMEOUT_LONG`, 120 s by default).
|
|
30
35
|
*/
|
|
31
36
|
export declare function getTableContents(connection: IAbapConnection, params: IGetTableContentsParams): Promise<IAdtWireResponse>;
|
|
32
37
|
//# sourceMappingURL=tableContents.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tableContents.d.ts","sourceRoot":"","sources":["../../../src/core/shared/tableContents.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EACjB,MAAM,yCAAyC,CAAC;AAIjD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAIvD;;;;;;GAMG;AACH,wBAAsB,eAAe,CACnC,UAAU,EAAE,eAAe,EAC3B,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,gBAAgB,CAAC,CAS3B;AAED
|
|
1
|
+
{"version":3,"file":"tableContents.d.ts","sourceRoot":"","sources":["../../../src/core/shared/tableContents.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EACjB,MAAM,yCAAyC,CAAC;AAIjD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAIvD;;;;;;GAMG;AACH,wBAAsB,eAAe,CACnC,UAAU,EAAE,eAAe,EAC3B,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,gBAAgB,CAAC,CAS3B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,gBAAgB,CACpC,UAAU,EAAE,eAAe,EAC3B,MAAM,EAAE,uBAAuB,GAC9B,OAAO,CAAC,gBAAgB,CAAC,CAgB3B"}
|
|
@@ -41,6 +41,11 @@ async function getTableColumns(connection, tableName) {
|
|
|
41
41
|
* statement the caller could not reach: not the column list, not an ordering,
|
|
42
42
|
* not a `WHERE`. Read the columns with {@link getTableColumns} and write the
|
|
43
43
|
* statement you want.
|
|
44
|
+
*
|
|
45
|
+
* **No deadline of the library's**, as for the freestyle query: the request
|
|
46
|
+
* carries `timeout: 0` — none — and how long to wait is the caller's, set on the
|
|
47
|
+
* connection it hands in. Until 31.0.0 this set `getTimeout('long')`
|
|
48
|
+
* (`SAP_TIMEOUT_LONG`, 120 s by default).
|
|
44
49
|
*/
|
|
45
50
|
async function getTableContents(connection, params) {
|
|
46
51
|
const tableName = params.table_name.toUpperCase();
|
|
@@ -48,7 +53,9 @@ async function getTableContents(connection, params) {
|
|
|
48
53
|
return connection.makeAdtRequest({
|
|
49
54
|
url: `/sap/bc/adt/datapreview/ddic?rowNumber=${maxRows}&ddicEntityName=${encodeURIComponent(tableName)}`,
|
|
50
55
|
method: 'POST',
|
|
51
|
-
|
|
56
|
+
// No deadline: the contract requires a number, and 0 is what the wires
|
|
57
|
+
// read as "do not abort". How long to wait is the caller's.
|
|
58
|
+
timeout: 0,
|
|
52
59
|
data: params.sql_query,
|
|
53
60
|
headers: {
|
|
54
61
|
Accept: ACCEPT_HEADER,
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Migrating to 31.0.0
|
|
2
|
+
|
|
3
|
+
31.0.0 moves the contract packages a major: `@mcp-abap-adt/interfaces-adt`
|
|
4
|
+
`^16.0.0` and `@mcp-abap-adt/interfaces-adt-connection` `^3.0.0`. Their types
|
|
5
|
+
are this package's public API, which is why this is a major too. No member
|
|
6
|
+
answers differently.
|
|
7
|
+
|
|
8
|
+
## 1. Declare the new ranges
|
|
9
|
+
|
|
10
|
+
If your package imports the contracts, declare the same ranges, so npm installs
|
|
11
|
+
one copy of each — `npm ls @mcp-abap-adt/interfaces-adt` and
|
|
12
|
+
`npm ls @mcp-abap-adt/interfaces-adt-connection` must each show one version.
|
|
13
|
+
`@mcp-abap-adt/adt-strategies` 0.11.0 declares the same ranges.
|
|
14
|
+
|
|
15
|
+
```json
|
|
16
|
+
"@mcp-abap-adt/interfaces-adt": "^16.0.0",
|
|
17
|
+
"@mcp-abap-adt/interfaces-adt-connection": "^3.0.0"
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## 2. What the contracts removed
|
|
21
|
+
|
|
22
|
+
`interfaces-adt` 16.0.0 removes `IAdtClientOptions.signal` and
|
|
23
|
+
`IAdtError.refusal`; `interfaces-adt-connection` 3.0.0 removes
|
|
24
|
+
`IAbapRequestOptions.signal`, `ADT_REQUEST_ERROR` and `AdtRequestErrorCode`. All
|
|
25
|
+
of them arrived in 15.4.0 / 2.1.0, which 30.x did not declare — so code written
|
|
26
|
+
for 30.x compiles unchanged. Code that took them up drops them: no `signal` in
|
|
27
|
+
client or request options, no read of `refusal`, no match on
|
|
28
|
+
`ADT_REQUEST_ERROR`. An `IAbapConnection` implementation of your own drops the
|
|
29
|
+
same.
|
|
30
|
+
|
|
31
|
+
## 3. The connection you build (if it is `@mcp-abap-adt/connection` 16)
|
|
32
|
+
|
|
33
|
+
Not this package's contract, but what a consumer moving with it meets: one
|
|
34
|
+
connection instance is one SAP session. `connect()` after `disconnect()` — or
|
|
35
|
+
after a lost session — rejects, and a second `disconnect()` rejects
|
|
36
|
+
`NOT_CONNECTED`; a new session is a new instance, built with the constructors
|
|
37
|
+
or `createConnection({ system, transport, … })`. Anything built over the old
|
|
38
|
+
instance (an `AdtClient`, a handler) is built again over the new one.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcp-abap-adt/adt-clients",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "31.0.0",
|
|
4
4
|
"description": "ADT clients for SAP ABAP systems - AdtClient and AdtRuntimeClient",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -117,21 +117,21 @@
|
|
|
117
117
|
"node": ">=18.0.0"
|
|
118
118
|
},
|
|
119
119
|
"dependencies": {
|
|
120
|
-
"@mcp-abap-adt/interfaces-adt": "^
|
|
121
|
-
"@mcp-abap-adt/interfaces-adt-connection": "^
|
|
122
|
-
"@mcp-abap-adt/interfaces-network": "^2.0.
|
|
123
|
-
"@mcp-abap-adt/interfaces-utils": "^1.1.
|
|
124
|
-
"@mcp-abap-adt/logger": "^0.4.
|
|
120
|
+
"@mcp-abap-adt/interfaces-adt": "^16.0.0",
|
|
121
|
+
"@mcp-abap-adt/interfaces-adt-connection": "^3.0.0",
|
|
122
|
+
"@mcp-abap-adt/interfaces-network": "^2.0.1",
|
|
123
|
+
"@mcp-abap-adt/interfaces-utils": "^1.1.1",
|
|
124
|
+
"@mcp-abap-adt/logger": "^0.4.1",
|
|
125
125
|
"axios": "^1.18.1",
|
|
126
126
|
"fast-xml-parser": "^5.9.3"
|
|
127
127
|
},
|
|
128
128
|
"devDependencies": {
|
|
129
129
|
"@biomejs/biome": "^2.4.4",
|
|
130
130
|
"@mcp-abap-adt/adt-strategies": "^0.10.0",
|
|
131
|
-
"@mcp-abap-adt/auth-providers": "^
|
|
132
|
-
"@mcp-abap-adt/connection": "^
|
|
133
|
-
"@mcp-abap-adt/interfaces-auth": "^
|
|
134
|
-
"@mcp-abap-adt/interfaces-auth-sap": "^
|
|
131
|
+
"@mcp-abap-adt/auth-providers": "^6.0.2",
|
|
132
|
+
"@mcp-abap-adt/connection": "^16.0.0",
|
|
133
|
+
"@mcp-abap-adt/interfaces-auth": "^7.5.0",
|
|
134
|
+
"@mcp-abap-adt/interfaces-auth-sap": "^3.3.0",
|
|
135
135
|
"@types/jest": "^30.0.0",
|
|
136
136
|
"@types/node": "^25.3.3",
|
|
137
137
|
"dotenv": "^17.3.1",
|