@mcp-abap-adt/interfaces-adt 10.0.0 → 11.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 +41 -0
- package/README.md +46 -7
- package/dist/adt/IAdtAbapGit.d.ts +32 -11
- package/dist/adt/IAdtAbapGit.d.ts.map +1 -1
- package/dist/adt/IAdtFeatureToggle.d.ts +28 -11
- package/dist/adt/IAdtFeatureToggle.d.ts.map +1 -1
- package/dist/adt/IAdtObject.d.ts +1 -1
- package/dist/adt/IAdtObject.d.ts.map +1 -1
- package/dist/adt/IAdtResponse.d.ts +1 -1
- package/dist/adt/IAdtResponse.d.ts.map +1 -1
- package/dist/adt/IAdtTransport.d.ts +31 -8
- package/dist/adt/IAdtTransport.d.ts.map +1 -1
- package/dist/index.d.ts +6 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -5
- package/package.json +3 -3
- package/dist/connection/IAbapConnection.d.ts +0 -65
- package/dist/connection/IAbapConnection.d.ts.map +0 -1
- package/dist/connection/IAbapConnection.js +0 -2
- package/dist/connection/IAbapRequestOptions.d.ts +0 -9
- package/dist/connection/IAbapRequestOptions.d.ts.map +0 -1
- package/dist/connection/IAbapRequestOptions.js +0 -2
- package/dist/connection/IConnectionCapabilities.d.ts +0 -217
- package/dist/connection/IConnectionCapabilities.d.ts.map +0 -1
- package/dist/connection/IConnectionCapabilities.js +0 -29
- package/dist/connection/ITimeoutConfig.d.ts +0 -15
- package/dist/connection/ITimeoutConfig.d.ts.map +0 -1
- package/dist/connection/ITimeoutConfig.js +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,47 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [11.0.0] - 2026-09-26
|
|
11
|
+
|
|
12
|
+
One request per member, each addressed by what the server gave the caller
|
|
13
|
+
(decision 37), and the ABAP connection in a package of its own (decision 38).
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- **`IAdtTransportSearchConfigurations<TConfigurations>`** — the saved
|
|
18
|
+
transport searches, one member. `IAdtRequest.list` now requires the
|
|
19
|
+
`configUri` this answers.
|
|
20
|
+
- **`IFeatureToggleObjectResults`** — one result slot per answer a feature
|
|
21
|
+
toggle gives: `switched`, `runtimeState`, `checkState`, `source`.
|
|
22
|
+
|
|
23
|
+
### Changed
|
|
24
|
+
|
|
25
|
+
- **BREAKING: `IListTransportsOptions.configUri` is required**, and so is
|
|
26
|
+
`IAdtRequest.list`'s options. An implementation left without one read the
|
|
27
|
+
configurations and chose; the choice is the caller's.
|
|
28
|
+
- **BREAKING: `IAbapGitUnlinkArgs` takes `repositoryId`** — the key
|
|
29
|
+
`listRepos` reports — instead of `package`.
|
|
30
|
+
- **BREAKING: `IAdtAbapGitClient.getErrorLog` takes `logLink`** — the href
|
|
31
|
+
`listRepos` reports — instead of a package name.
|
|
32
|
+
- **BREAKING: `IFeatureToggleObject<TState>` is
|
|
33
|
+
`IFeatureToggleObject<R extends IFeatureToggleObjectResults>`.** Each member
|
|
34
|
+
answers its own slot rather than one type shared by four documents.
|
|
35
|
+
|
|
36
|
+
### Removed
|
|
37
|
+
|
|
38
|
+
- **BREAKING: the ABAP connection moved to
|
|
39
|
+
`@mcp-abap-adt/interfaces-adt-connection` 1.0.0**, unchanged and not
|
|
40
|
+
re-exported: `IAbapConnection`, `IAdtWireResponse`, `IAbapRequestOptions`,
|
|
41
|
+
`ISessionLifecycleAware`, `ICriticalSection`, `IRequestProfiling`,
|
|
42
|
+
`IDeferredResponseConnection`, `ADT_SESSION_ERROR`, `AdtSessionErrorCode`,
|
|
43
|
+
`ITimeoutConfig`. This package now depends on that one instead of
|
|
44
|
+
`interfaces-network`. A connector depends on the connection alone and stops
|
|
45
|
+
following every major here. Decision 38.
|
|
46
|
+
- **BREAKING: `IAdtAbapGitClient.getRepo`**, and with it the second type
|
|
47
|
+
parameter: `IAdtAbapGitClient<TRepos, TErrorLog, TPull, TExternalRepo>`. It
|
|
48
|
+
filtered `listRepos`, which is a reading; a caller takes the entry from
|
|
49
|
+
`listRepos`.
|
|
50
|
+
|
|
10
51
|
## [10.0.0] - 2026-09-26
|
|
11
52
|
|
|
12
53
|
The error strategy is taken with the call by **every** member that answers an
|
package/README.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# @mcp-abap-adt/interfaces-adt
|
|
2
2
|
|
|
3
|
-
ADT contracts: object operations,
|
|
3
|
+
ADT contracts: object operations, runtime analysis, execution, feeds and service bindings. The ABAP connection they are sent through is [`interfaces-adt-connection`](../interfaces-adt-connection).
|
|
4
4
|
|
|
5
5
|
## TL;DR
|
|
6
6
|
|
|
7
|
-
- **Only ADT.** The test is who imports this package: `@mcp-abap-adt/adt-clients` and whatever replaces its objects, and nobody else. Measured against every repository in development — the only others reaching in
|
|
8
|
-
- What it holds: ADT object operations for 31 object types,
|
|
7
|
+
- **Only ADT.** The test is who imports this package: `@mcp-abap-adt/adt-clients` and whatever replaces its objects, and nobody else. Measured against every repository in development before 11.0.0 — the only others reaching in were `gcts-client` and `cloud-llm-hub`, for `IAbapConnection`, `IAbapRequestOptions` and `IAdtResponse`. Since 11.0.0 the first two come from `interfaces-adt-connection`; `IAdtResponse` is still here.
|
|
8
|
+
- What it holds: ADT object operations for 31 object types, runtime analysis, execution, feeds, service bindings, `IAdtResponse` and the error codes. **The ABAP connection** — `IAbapConnection`, `IAdtWireResponse`, its capability atoms, `ITimeoutConfig` — is [`interfaces-adt-connection`](../interfaces-adt-connection) since 11.0.0, and is not re-exported here.
|
|
9
9
|
- **What left, and where.** Every HTTP header name, the HTTP frame and `HttpError` → [`interfaces-network`](../interfaces-network). Cloud ALM → [`interfaces-calm`](../interfaces-calm). `XmlNode` → [`interfaces-utils`](../interfaces-utils). Authentication in general — credentials, OAuth grants, tokens, interactive login, SAML assertions, `AUTH_TYPE_JWT`/`BASIC` → [`interfaces-auth`](../interfaces-auth). Everything naming SAP or BTP — `ISapConfig`, `SapAuthType`, `SapConnectionType`, `IConfig`, `IConnectionConfig`, `IAuthorizationConfig`, `ICertificateMaterialLoader`, `IServiceKeyStore`, `ISessionStore`, `ITokenProviderResult`, the two validation results and `AUTH_TYPE_XSUAA` with its union → [`interfaces-auth-sap`](../interfaces-auth-sap). `ISessionState` and `ISessionStorage` are deleted, not moved.
|
|
10
|
-
- `IAdtWireResponse` extends `IHttpWireResponse` from `-network` and keeps the headers ADT sends (`sap-adt-location`, both spellings of `content-location`).
|
|
11
|
-
- Depends on `@mcp-abap-adt/interfaces-
|
|
10
|
+
- `IAdtWireResponse` extends `IHttpWireResponse` from `-network` and keeps the headers ADT sends (`sap-adt-location`, both spellings of `content-location`). It lives in `interfaces-adt-connection` since 11.0.0, name and shape unchanged.
|
|
11
|
+
- Depends on `@mcp-abap-adt/interfaces-adt-connection`, and on nothing else. Types and constants; no implementation.
|
|
12
12
|
|
|
13
13
|
## Install
|
|
14
14
|
|
|
@@ -21,14 +21,13 @@ npm install @mcp-abap-adt/interfaces-adt
|
|
|
21
21
|
| directory | files | what |
|
|
22
22
|
|---|---|---|
|
|
23
23
|
| `adt/` | 39 | the object contracts: capability atoms, the object types, `IAdtResponse`, `IAdtError`, the error codes, the transport request's object list |
|
|
24
|
-
| `connection/` | 4 | `IAbapConnection`, `IAbapRequestOptions`, the connection capability atoms, and `ITimeoutConfig` — here since 9.0.0, because `csrf` names an SAP operation rather than a transport primitive. `IAdtWireResponse` extends `IHttpWireResponse` from `-network` |
|
|
25
24
|
| `runtime/` | 11 | runtime analysis: `IProfiler`, the trace contracts (`ITraceListing`/`ITraceReading`, `ICrossTrace`, `ISt05Trace`), `IApplicationLog`, `IAtcLog` and the ATC run (`IAtcRunOptions`, `IAtcFindings`), `IDdicActivation`, `IGatewayErrorLog`, `IRuntimeDumps`, `ISystemMessages` |
|
|
26
25
|
| `execution/` | 3 | class and program execution, with profiling |
|
|
27
26
|
| `feeds/` | 2 | the ADT feed contracts |
|
|
28
27
|
| `service/` | 1 | service definitions and bindings |
|
|
29
28
|
| `shared/` | 1 | what more than one object type needs |
|
|
30
29
|
|
|
31
|
-
|
|
30
|
+
Six directories, all ADT. `connection/` left for `interfaces-adt-connection` in 11.0.0. `sap/`, `auth/`, `token/`, `session/`, `serviceKey/`, `store/`, `validation/` and `Headers.ts` were here until 9.0.0 and are listed above under what left; `__typechecks__/` holds 21 files that compile shapes this contract must and must not accept, and ships in no tarball.
|
|
32
31
|
|
|
33
32
|
The contract rules — what a member answers, how a strategy is supplied, how a contract is built — are in [`docs/architecture/ARCHITECTURE.md`](../../docs/architecture/ARCHITECTURE.md). Domain-by-domain documentation with examples used to sit in the facade's README; the facade is deleted, and each package documents its own contracts.
|
|
34
33
|
|
|
@@ -51,6 +50,46 @@ So `createTask` requires `targetUser` and `removeObject` requires `position`, an
|
|
|
51
50
|
|
|
52
51
|
`addObject` still takes an entry without a position — one that does not exist yet has none.
|
|
53
52
|
|
|
53
|
+
## Migrating to 11.0.0
|
|
54
|
+
|
|
55
|
+
Each member is one request, addressed by a value the server already gave you.
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
// Transport requests: name the saved search.
|
|
59
|
+
- await requests.list();
|
|
60
|
+
+ const configs = await searches.searchConfigurations(); // IAdtTransportSearchConfigurations
|
|
61
|
+
+ await requests.list({ configUri: /* the one you choose */ });
|
|
62
|
+
|
|
63
|
+
// abapGit: take the key and the log link from listRepos.
|
|
64
|
+
- await git.unlink({ package: 'ZPKG' });
|
|
65
|
+
- await git.getErrorLog('ZPKG');
|
|
66
|
+
- await git.getRepo('ZPKG');
|
|
67
|
+
+ await git.unlink({ repositoryId: repo.key });
|
|
68
|
+
+ await git.getErrorLog(repo.logLink);
|
|
69
|
+
+ // getRepo is gone: read listRepos and take the entry you want.
|
|
70
|
+
|
|
71
|
+
// Feature toggles: one result type per answer.
|
|
72
|
+
- IFeatureToggleObject<MyState>
|
|
73
|
+
+ IFeatureToggleObject<{ switched: void; runtimeState: MyState; checkState: MyCheck; source: string }>
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**The connection moved.** Import it from its own package; nothing here
|
|
77
|
+
re-exports it.
|
|
78
|
+
|
|
79
|
+
```ts
|
|
80
|
+
- import type { IAbapConnection, IAdtWireResponse } from '@mcp-abap-adt/interfaces-adt';
|
|
81
|
+
+ import type { IAbapConnection, IAdtWireResponse } from '@mcp-abap-adt/interfaces-adt-connection';
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
The same holds for `IAbapRequestOptions`, the capability atoms
|
|
85
|
+
(`ISessionLifecycleAware`, `ICriticalSection`, `IRequestProfiling`,
|
|
86
|
+
`IDeferredResponseConnection`), `ADT_SESSION_ERROR`/`AdtSessionErrorCode` and
|
|
87
|
+
`ITimeoutConfig`. A connector depends on that package alone.
|
|
88
|
+
|
|
89
|
+
`IAdtAbapGitClient` lost its second type parameter with `getRepo`. Decision 37
|
|
90
|
+
in `docs/architecture/DECISIONS.md` says why a member no longer looks up what a
|
|
91
|
+
caller can pass.
|
|
92
|
+
|
|
54
93
|
## Migrating to 10.0.0
|
|
55
94
|
|
|
56
95
|
Every member that answers an `IAdtResponse` takes the error strategy with the
|
|
@@ -16,7 +16,7 @@ export interface IAbapGitLinkArgs {
|
|
|
16
16
|
* left `R`. That is a wait on an asynchronous server job, and a wait is the
|
|
17
17
|
* caller's: how long to allow, how often to ask, whether to give up and what to
|
|
18
18
|
* do then are decisions about their application, not about ADT. They ask
|
|
19
|
-
* `
|
|
19
|
+
* `listRepos` in their own loop and read the repository they started.
|
|
20
20
|
*
|
|
21
21
|
* `pullLink` is the href the pull is posted to, which `listRepos` reports. The
|
|
22
22
|
* member used to list the repositories itself to find it — a second request,
|
|
@@ -30,8 +30,16 @@ export interface IAbapGitPullArgs {
|
|
|
30
30
|
remotePassword?: string;
|
|
31
31
|
transportRequest?: string;
|
|
32
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* What removing a repository link needs: the repository's own key.
|
|
35
|
+
*
|
|
36
|
+
* `DELETE /abapgit/repos/{key}` is addressed by the key `listRepos` reports
|
|
37
|
+
* (`abapgitrepo:key`). Until 11.0.0 this took the package and the member listed
|
|
38
|
+
* every repository to find the key — two requests, and a "not found" the
|
|
39
|
+
* library composed from its own lookup rather than anything SAP said.
|
|
40
|
+
*/
|
|
33
41
|
export interface IAbapGitUnlinkArgs {
|
|
34
|
-
|
|
42
|
+
repositoryId: string;
|
|
35
43
|
transportRequest?: string;
|
|
36
44
|
}
|
|
37
45
|
export interface IAbapGitExternalRepoCredentials {
|
|
@@ -42,7 +50,16 @@ export interface IAbapGitExternalRepoCredentials {
|
|
|
42
50
|
export interface IAdtAbapGitClientOptions {
|
|
43
51
|
contentTypeVersion?: 'v3' | 'v4';
|
|
44
52
|
}
|
|
45
|
-
|
|
53
|
+
/**
|
|
54
|
+
* One request per member, each addressed by what the server gave the caller.
|
|
55
|
+
*
|
|
56
|
+
* **`getRepo` left in 11.0.0.** It listed every repository and picked the one
|
|
57
|
+
* for a package — a filter over a document, which is the result strategy's to
|
|
58
|
+
* do, and a "not found" the library composed from its own search. A caller
|
|
59
|
+
* reads `listRepos` through the strategy of their choice and takes the entry
|
|
60
|
+
* they want.
|
|
61
|
+
*/
|
|
62
|
+
export interface IAdtAbapGitClient<TRepos, TErrorLog, TPull, TExternalRepo> {
|
|
46
63
|
link<E extends IAdtError>(args: IAbapGitLinkArgs, options: IAdtAnalyseOptions<E> & {
|
|
47
64
|
analyse: IAnalyse<E>;
|
|
48
65
|
}): Promise<IAdtResponse<void, E>>;
|
|
@@ -51,8 +68,8 @@ export interface IAdtAbapGitClient<TRepos, TRepo, TErrorLog, TPull, TExternalRep
|
|
|
51
68
|
* Start a pull — one POST to `args.pullLink`.
|
|
52
69
|
*
|
|
53
70
|
* It does not wait, and it does not look the link up. The caller lists the
|
|
54
|
-
* repositories once, keeps the link, posts, then polls `
|
|
55
|
-
* terms and reads `getErrorLog` if the status says to.
|
|
71
|
+
* repositories once, keeps the link, posts, then polls `listRepos` on their
|
|
72
|
+
* own terms and reads `getErrorLog` if the status says to.
|
|
56
73
|
*/
|
|
57
74
|
pull<E extends IAdtError>(args: IAbapGitPullArgs, options: IAdtAnalyseOptions<E> & {
|
|
58
75
|
analyse: IAnalyse<E>;
|
|
@@ -66,14 +83,18 @@ export interface IAdtAbapGitClient<TRepos, TRepo, TErrorLog, TPull, TExternalRep
|
|
|
66
83
|
analyse: IAnalyse<E>;
|
|
67
84
|
}): Promise<IAdtResponse<TRepos, E>>;
|
|
68
85
|
listRepos(options?: IAdtAnalyseOptions): Promise<IAdtResponse<TRepos>>;
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
86
|
+
/**
|
|
87
|
+
* The error log of a repository's last run — one GET to `logLink`.
|
|
88
|
+
*
|
|
89
|
+
* `logLink` is the href `listRepos` reports for the repository. Until 11.0.0
|
|
90
|
+
* this took a package, listed every repository to find the link, and
|
|
91
|
+
* answered an empty log when there was none — a second request, and a reading
|
|
92
|
+
* of the list that was not the caller's.
|
|
93
|
+
*/
|
|
94
|
+
getErrorLog<E extends IAdtError>(logLink: string, options: IAdtAnalyseOptions<E> & {
|
|
74
95
|
analyse: IAnalyse<E>;
|
|
75
96
|
}): Promise<IAdtResponse<TErrorLog, E>>;
|
|
76
|
-
getErrorLog(
|
|
97
|
+
getErrorLog(logLink: string, options?: IAdtAnalyseOptions): Promise<IAdtResponse<TErrorLog>>;
|
|
77
98
|
checkExternalRepo<E extends IAdtError>(args: IAbapGitExternalRepoCredentials, options: IAdtAnalyseOptions<E> & {
|
|
78
99
|
analyse: IAnalyse<E>;
|
|
79
100
|
}): Promise<IAdtResponse<TExternalRepo, E>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IAdtAbapGit.d.ts","sourceRoot":"","sources":["../../src/adt/IAdtAbapGit.ts"],"names":[],"mappings":"AAAA,O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,OAAO,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAAG;QAAE,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAA;KAAE,GACxD,OAAO,CAAC,YAAY,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,CAAC;IAC3C,iBAAiB,CACf,IAAI,EAAE,+BAA+B,EACrC,OAAO,CAAC,EAAE,kBAAkB,GAC3B,OAAO,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC,CAAC;CACzC"}
|
|
@@ -62,43 +62,60 @@ export interface IFeatureToggleConfig {
|
|
|
62
62
|
* toggle also has is the atoms, spelled beside this where an implementation
|
|
63
63
|
* offers them: inheritance decides for the composer what belongs together, and
|
|
64
64
|
* a consumer who wants only the switch had to take eight members to get it.
|
|
65
|
+
*
|
|
66
|
+
* **One result type per answer since 11.0.0.** All five members answered
|
|
67
|
+
* `TState`, and they answer four different things: a switch, the runtime
|
|
68
|
+
* state, a state check and the toggle's source. A result strategy given at
|
|
69
|
+
* construction (decision 22) could shape only one of them; the record below
|
|
70
|
+
* names each, and travels as one parameter because five positional ones would
|
|
71
|
+
* be a signature nobody can call — the same form as {@link ICrossTraceResults}.
|
|
65
72
|
*/
|
|
66
|
-
export interface
|
|
73
|
+
export interface IFeatureToggleObjectResults {
|
|
74
|
+
/** What `switchOn` and `switchOff` answer. */
|
|
75
|
+
switched: unknown;
|
|
76
|
+
/** What `getRuntimeState` answers. */
|
|
77
|
+
runtimeState: unknown;
|
|
78
|
+
/** What `checkState` answers. */
|
|
79
|
+
checkState: unknown;
|
|
80
|
+
/** What `readSource` answers. */
|
|
81
|
+
source: unknown;
|
|
82
|
+
}
|
|
83
|
+
export interface IFeatureToggleObject<R extends IFeatureToggleObjectResults> {
|
|
67
84
|
switchOn<E extends IAdtError>(config: Partial<IFeatureToggleConfig>, opts: {
|
|
68
85
|
transportRequest: string;
|
|
69
86
|
userSpecific?: boolean;
|
|
70
87
|
}, options: IAdtAnalyseOptions<E> & {
|
|
71
88
|
analyse: IAnalyse<E>;
|
|
72
|
-
}): Promise<IAdtResponse<
|
|
89
|
+
}): Promise<IAdtResponse<R['switched'], E>>;
|
|
73
90
|
switchOn(config: Partial<IFeatureToggleConfig>, opts: {
|
|
74
91
|
transportRequest: string;
|
|
75
92
|
userSpecific?: boolean;
|
|
76
|
-
}, options?: IAdtAnalyseOptions): Promise<IAdtResponse<
|
|
93
|
+
}, options?: IAdtAnalyseOptions): Promise<IAdtResponse<R['switched']>>;
|
|
77
94
|
switchOff<E extends IAdtError>(config: Partial<IFeatureToggleConfig>, opts: {
|
|
78
95
|
transportRequest: string;
|
|
79
96
|
userSpecific?: boolean;
|
|
80
97
|
}, options: IAdtAnalyseOptions<E> & {
|
|
81
98
|
analyse: IAnalyse<E>;
|
|
82
|
-
}): Promise<IAdtResponse<
|
|
99
|
+
}): Promise<IAdtResponse<R['switched'], E>>;
|
|
83
100
|
switchOff(config: Partial<IFeatureToggleConfig>, opts: {
|
|
84
101
|
transportRequest: string;
|
|
85
102
|
userSpecific?: boolean;
|
|
86
|
-
}, options?: IAdtAnalyseOptions): Promise<IAdtResponse<
|
|
103
|
+
}, options?: IAdtAnalyseOptions): Promise<IAdtResponse<R['switched']>>;
|
|
87
104
|
getRuntimeState<E extends IAdtError>(config: Partial<IFeatureToggleConfig>, options: IAdtAnalyseOptions<E> & {
|
|
88
105
|
analyse: IAnalyse<E>;
|
|
89
|
-
}): Promise<IAdtResponse<
|
|
90
|
-
getRuntimeState(config: Partial<IFeatureToggleConfig>, options?: IAdtAnalyseOptions): Promise<IAdtResponse<
|
|
106
|
+
}): Promise<IAdtResponse<R['runtimeState'], E>>;
|
|
107
|
+
getRuntimeState(config: Partial<IFeatureToggleConfig>, options?: IAdtAnalyseOptions): Promise<IAdtResponse<R['runtimeState']>>;
|
|
91
108
|
checkState<E extends IAdtError>(config: Partial<IFeatureToggleConfig>, opts: {
|
|
92
109
|
userSpecific?: boolean;
|
|
93
110
|
} | undefined, options: IAdtAnalyseOptions<E> & {
|
|
94
111
|
analyse: IAnalyse<E>;
|
|
95
|
-
}): Promise<IAdtResponse<
|
|
112
|
+
}): Promise<IAdtResponse<R['checkState'], E>>;
|
|
96
113
|
checkState(config: Partial<IFeatureToggleConfig>, opts?: {
|
|
97
114
|
userSpecific?: boolean;
|
|
98
|
-
}, options?: IAdtAnalyseOptions): Promise<IAdtResponse<
|
|
115
|
+
}, options?: IAdtAnalyseOptions): Promise<IAdtResponse<R['checkState']>>;
|
|
99
116
|
readSource<E extends IAdtError>(config: Partial<IFeatureToggleConfig>, version: 'active' | 'inactive' | undefined, options: IAdtAnalyseOptions<E> & {
|
|
100
117
|
analyse: IAnalyse<E>;
|
|
101
|
-
}): Promise<IAdtResponse<
|
|
102
|
-
readSource(config: Partial<IFeatureToggleConfig>, version?: 'active' | 'inactive', options?: IAdtAnalyseOptions): Promise<IAdtResponse<
|
|
118
|
+
}): Promise<IAdtResponse<R['source'], E>>;
|
|
119
|
+
readSource(config: Partial<IFeatureToggleConfig>, version?: 'active' | 'inactive', options?: IAdtAnalyseOptions): Promise<IAdtResponse<R['source']>>;
|
|
103
120
|
}
|
|
104
121
|
//# sourceMappingURL=IAdtFeatureToggle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IAdtFeatureToggle.d.ts","sourceRoot":"","sources":["../../src/adt/IAdtFeatureToggle.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACjE,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9D,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,sBAAsB;IACrC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,yBAAyB,CAAC;IAC9C,mBAAmB,CA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C,CAAC,CAAC,CAAC;IACzC,UAAU,CACR,MAAM,EAAE,OAAO,CAAC,oBAAoB,CAAC,EACrC,OAAO,CAAC,EAAE,QAAQ,GAAG,UAAU,EAC/B,OAAO,CAAC,EAAE,kBAAkB,GAC3B,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;CACvC"}
|
package/dist/adt/IAdtObject.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* {@link AdtObjectErrorCodes} names failures a strategy can put in
|
|
11
11
|
* {@link IAdtError.code}.
|
|
12
12
|
*/
|
|
13
|
-
import type { IAdtWireResponse } from '
|
|
13
|
+
import type { IAdtWireResponse } from '@mcp-abap-adt/interfaces-adt-connection';
|
|
14
14
|
import type { AdtNoFailure, IAdtError } from './IAdtResponse';
|
|
15
15
|
/**
|
|
16
16
|
* The codes a failure can name itself by.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IAdtObject.d.ts","sourceRoot":"","sources":["../../src/adt/IAdtObject.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"IAdtObject.d.ts","sourceRoot":"","sources":["../../src/adt/IAdtObject.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,eAAO,MAAM,mBAAmB;IAC9B,6BAA6B;;IAE7B,iFAAiF;;IAEjF,+BAA+B;;IAE/B,6BAA6B;;IAE7B,2BAA2B;;IAE3B,6BAA6B;;IAE7B,+BAA+B;;IAE/B,0BAA0B;;IAE1B,4BAA4B;;IAE5B,8BAA8B;;IAE9B,iGAAiG;;CAEzF,CAAC;AAEX;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,IAAI,CACtD,OAAO,EAAE,SAAS,GAAG,YAAY,EACjC,MAAM,CAAC,EAAE,gBAAgB,KACtB,CAAC,GAAG,YAAY,CAAC;AAEtB;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,kBAAkB,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS;IACjE;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;CACvB;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,CACnE,SAAQ,kBAAkB,CAAC,CAAC,CAAC;IAkB7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,MAAM,iBAAiB,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,IAAI,IAAI,CACnE,oBAAoB,CAAC,CAAC,CAAC,EACvB,QAAQ,CACT,GAAG;IAAE,MAAM,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC"}
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
* `@mcp-abap-adt/adt-clients`, where a consumer takes them from if they want
|
|
32
32
|
* `instanceof` as a convenience.
|
|
33
33
|
*/
|
|
34
|
-
import type { IAdtWireResponse } from '
|
|
34
|
+
import type { IAdtWireResponse } from '@mcp-abap-adt/interfaces-adt-connection';
|
|
35
35
|
/**
|
|
36
36
|
* What an error strategy answers when the answer is **not** a failure.
|
|
37
37
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IAdtResponse.d.ts","sourceRoot":"","sources":["../../src/adt/IAdtResponse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"IAdtResponse.d.ts","sourceRoot":"","sources":["../../src/adt/IAdtResponse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAEhF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,cAAc,EAAG,gBAAyB,CAAC;AAExD,sEAAsE;AACtE,MAAM,MAAM,YAAY,GAAG,OAAO,cAAc,CAAC;AAEjD;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,gBAAgB;AAC1B,iFAAiF;AAC/E,YAAY;AACd,oDAAoD;GAClD,SAAS,CAAC;AAEd;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,WAAW,SAAS;IACxB,gCAAgC;IAChC,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAElC;;;;;;OAMG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB;;;;;;;OAOG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAE1B,yDAAyD;IACzD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAE5B,iEAAiE;IACjE,QAAQ,CAAC,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAErC;;;;;;OAMG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE;QACjB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QACzB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;KACvB,CAAC;IAEF;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,WAAW,WAAW,CAAC,MAAM;IACjC,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAClB,SAAS,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC;CACjC;AAaD,wEAAwE;AACxE,MAAM,WAAW,WAAW,CAAC,MAAM,SAAS,SAAS,GAAG,SAAS;IAC/D,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IACnB,QAAQ,IAAI,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,MAAM,WAAW,UAAU,CAAC,CAAC;IAC3B,qEAAqE;IACrE,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,gBAAgB,KAAK,CAAC,CAAC;AAEjE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,MAAM,YAAY,CAAC,MAAM,EAAE,MAAM,SAAS,SAAS,GAAG,SAAS,IACjE,WAAW,CAAC,MAAM,CAAC,GACnB,WAAW,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -17,9 +17,17 @@ export interface IListTransportsParams {
|
|
|
17
17
|
/** href of a saved search configuration, verbatim from the configurations document. */
|
|
18
18
|
configUri: string;
|
|
19
19
|
}
|
|
20
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* What listing needs: the saved search to run.
|
|
22
|
+
*
|
|
23
|
+
* **Required since 11.0.0.** It was optional, and an implementation left
|
|
24
|
+
* without one read the configurations itself, picked one, and refused when
|
|
25
|
+
* there were none or several — two requests, and a choice among the server's
|
|
26
|
+
* searches that is the caller's. {@link IAdtTransportSearchConfigurations}
|
|
27
|
+
* answers what there is to choose from.
|
|
28
|
+
*/
|
|
21
29
|
export interface IListTransportsOptions {
|
|
22
|
-
configUri
|
|
30
|
+
configUri: string;
|
|
23
31
|
}
|
|
24
32
|
/**
|
|
25
33
|
* One saved transport search configuration.
|
|
@@ -91,9 +99,8 @@ export interface ITransportConfig {
|
|
|
91
99
|
* capability guard with nothing to compare the manifest against, because the
|
|
92
100
|
* declared type *was* the implementation.
|
|
93
101
|
*
|
|
94
|
-
* The CRUD half is the four atoms with the transport's own config; the
|
|
95
|
-
*
|
|
96
|
-
* nothing else lists a collection this way.
|
|
102
|
+
* The CRUD half is the four atoms with the transport's own config; the listing
|
|
103
|
+
* below is the transport's alone.
|
|
97
104
|
*/
|
|
98
105
|
export interface IAdtRequest<TList> {
|
|
99
106
|
/**
|
|
@@ -110,13 +117,29 @@ export interface IAdtRequest<TList> {
|
|
|
110
117
|
* the **language** a request holds — none of which a consumer could reach
|
|
111
118
|
* before without re-fetching and parsing the document themselves.
|
|
112
119
|
*
|
|
113
|
-
* `configUri` is required
|
|
114
|
-
*
|
|
120
|
+
* `configUri` is required — see `IListTransportsParams`, where the
|
|
121
|
+
* measurement is. One request: the listing, run by the search the caller
|
|
122
|
+
* names.
|
|
115
123
|
*/
|
|
116
124
|
list<E extends IAdtError>(options: IListTransportsOptions & IAdtAnalyseOptions<E> & {
|
|
117
125
|
analyse: IAnalyse<E>;
|
|
118
126
|
}): Promise<IAdtResponse<TList, E>>;
|
|
119
|
-
list(options
|
|
127
|
+
list(options: IListTransportsOptions & IAdtAnalyseOptions): Promise<IAdtResponse<TList>>;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* The saved transport searches the server holds — what `configUri` is chosen
|
|
131
|
+
* from.
|
|
132
|
+
*
|
|
133
|
+
* Its own atom because {@link IAdtRequest.list} now requires a `configUri`, and
|
|
134
|
+
* a contract that requires a value must offer the way to obtain it (decision
|
|
135
|
+
* 29). It answers the configurations document at
|
|
136
|
+
* {@link TRANSPORT_SEARCH_CONFIGURATIONS_URL}; which one to run is the caller's.
|
|
137
|
+
*/
|
|
138
|
+
export interface IAdtTransportSearchConfigurations<TConfigurations> {
|
|
139
|
+
searchConfigurations<E extends IAdtError>(options: IAdtAnalyseOptions<E> & {
|
|
140
|
+
analyse: IAnalyse<E>;
|
|
141
|
+
}): Promise<IAdtResponse<TConfigurations, E>>;
|
|
142
|
+
searchConfigurations(options?: IAdtAnalyseOptions): Promise<IAdtResponse<TConfigurations>>;
|
|
120
143
|
}
|
|
121
144
|
/**
|
|
122
145
|
* One entry in a transport request's object list, as the CTS object directory
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IAdtTransport.d.ts","sourceRoot":"","sources":["../../src/adt/IAdtTransport.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EACV,kBAAkB,EAClB,oBAAoB,EACpB,QAAQ,EACT,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9D;;;;;;;;;GASG;AACH,MAAM,WAAW,qBAAqB;IACpC,uFAAuF;IACvF,SAAS,EAAE,MAAM,CAAC;CACnB;AAED
|
|
1
|
+
{"version":3,"file":"IAdtTransport.d.ts","sourceRoot":"","sources":["../../src/adt/IAdtTransport.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EACV,kBAAkB,EAClB,oBAAoB,EACpB,QAAQ,EACT,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9D;;;;;;;;;GASG;AACH,MAAM,WAAW,qBAAqB;IACpC,uFAAuF;IACvF,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;GAOG;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,EAAE,CAAC,CAAC,CAAC,CAAC;IACpC;;;;;;;;;;;;;;;;;;OAkBG;IACH,UAAU,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,EACxC,eAAe,EAAE,MAAM,EACvB,OAAO,EAAE;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,GAAG,oBAAoB,CAAC,CAAC,CAAC,GACxD,OAAO,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC;IACnC;;;OAGG;IACH,aAAa,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,EAC3C,eAAe,EAAE,MAAM,EACvB,OAAO,CAAC,EAAE,oBAAoB,CAAC,CAAC,CAAC,GAChC,OAAO,CAAC,YAAY,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC;IACxC;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,WAAW,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,EACzC,eAAe,EAAE,MAAM,EACvB,OAAO,CAAC,EAAE,oBAAoB,CAAC,CAAC,CAAC,GAChC,OAAO,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC;IACtC;;;;;;;;;;;;;;;;;;OAkBG;IACH,cAAc,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,EAC5C,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,WAAW,EACjB,OAAO,CAAC,EAAE,oBAAoB,CAAC,CAAC,CAAC,GAChC,OAAO,CAAC,YAAY,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC;CACxC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @mcp-abap-adt/interfaces-adt
|
|
3
3
|
*
|
|
4
|
-
* ADT contracts: object operations,
|
|
5
|
-
*
|
|
4
|
+
* ADT contracts: object operations, runtime analysis, execution, feeds and
|
|
5
|
+
* service bindings. The ABAP connection they are sent through is
|
|
6
|
+
* `@mcp-abap-adt/interfaces-adt-connection` since 11.0.0, and is not re-exported
|
|
7
|
+
* here (decision 34).
|
|
6
8
|
*
|
|
7
9
|
* **Only ADT.** The test is who imports this package: `@mcp-abap-adt/adt-clients`
|
|
8
10
|
* and whatever replaces its objects, and nobody else. Everything that failed
|
|
@@ -25,7 +27,7 @@ export type { DataElementTypeKind, ICreateDataElementParams, IDataElementConfig,
|
|
|
25
27
|
export type { IDdlConfig } from './adt/IAdtDdl';
|
|
26
28
|
export type { IDomainConfig, IFixedValue, } from './adt/IAdtDomain';
|
|
27
29
|
export type { EnhancementType, IEnhancementConfig, } from './adt/IAdtEnhancement';
|
|
28
|
-
export type { IFeatureToggleAttribute, IFeatureToggleConfig, IFeatureToggleHeader, IFeatureToggleObject, IFeatureTogglePlanning, IFeatureToggleReleasePlan, IFeatureToggleRollout, IFeatureToggleSource, } from './adt/IAdtFeatureToggle';
|
|
30
|
+
export type { IFeatureToggleAttribute, IFeatureToggleConfig, IFeatureToggleHeader, IFeatureToggleObject, IFeatureToggleObjectResults, IFeatureTogglePlanning, IFeatureToggleReleasePlan, IFeatureToggleRollout, IFeatureToggleSource, } from './adt/IAdtFeatureToggle';
|
|
29
31
|
export type { IFunctionGroupConfig } from './adt/IAdtFunctionGroup';
|
|
30
32
|
export type { IFunctionIncludeConfig } from './adt/IAdtFunctionInclude';
|
|
31
33
|
export type { ICreateFunctionModuleParams, IFunctionModuleConfig, } from './adt/IAdtFunctionModule';
|
|
@@ -50,15 +52,10 @@ export type { IStructureConfig, IStructureField, IStructureInclude, } from './ad
|
|
|
50
52
|
export type { ITableConfig } from './adt/IAdtTable';
|
|
51
53
|
export type { ITableTypeConfig, TableTypeAccessType, TableTypePrimaryKeyDefinition, TableTypePrimaryKeyKind, TableTypeRowKind, } from './adt/IAdtTableType';
|
|
52
54
|
export type { ITransformationConfig, TransformationType, } from './adt/IAdtTransformation';
|
|
53
|
-
export type { AdtTaskType, IAbapObjectEntry, IAdtRequest, IAdtTransportObjectActions, IListTransportsOptions, IListTransportsParams, ITransportConfig, ITransportSearchConfiguration, } from './adt/IAdtTransport';
|
|
55
|
+
export type { AdtTaskType, IAbapObjectEntry, IAdtRequest, IAdtTransportObjectActions, IAdtTransportSearchConfigurations, IListTransportsOptions, IListTransportsParams, ITransportConfig, ITransportSearchConfiguration, } from './adt/IAdtTransport';
|
|
54
56
|
export { ADT_TASK_TYPE, TRANSPORT_SEARCH_CONFIGURATIONS_URL, } from './adt/IAdtTransport';
|
|
55
57
|
export type { ICdsTestDoubleCheckable, ICdsUnitTestConfig, IClassUnitTestDefinition, IClassUnitTestRunOptions, ITestRunInformation, IUnitTestConfig, IUnitTestDuration, IUnitTestResultOptions, IUnitTestRiskLevel, IUnitTestScope, } from './adt/IAdtUnitTest';
|
|
56
58
|
export type { IAdtDataPreview, IAdtDiscovery, IAdtGroupLifecycle, IAdtInformationSystem, IAdtObjectAccess, IAdtObjectSearch, IAdtRepositoryStructure, IAdtTypeCatalogue, IAdtVirtualFolders, IAdtWhereUsed, IGetNodeContentsOptions, } from './adt/IAdtUtilities';
|
|
57
|
-
export type { IAbapConnection, IAdtWireResponse, } from './connection/IAbapConnection';
|
|
58
|
-
export type { IAbapRequestOptions } from './connection/IAbapRequestOptions';
|
|
59
|
-
export type { AdtSessionErrorCode, ICriticalSection, IDeferredResponseConnection, IRequestProfiling, ISessionLifecycleAware, } from './connection/IConnectionCapabilities';
|
|
60
|
-
export { ADT_SESSION_ERROR } from './connection/IConnectionCapabilities';
|
|
61
|
-
export type { ITimeoutConfig } from './connection/ITimeoutConfig';
|
|
62
59
|
export type { IClassExecuteWithProfilerOptions, IClassExecuteWithProfilingOptions, IClassExecuteWithProfilingResult, IClassExecutionTarget, IClassExecutor, IProgramExecuteWithProfilerOptions, IProgramExecuteWithProfilingOptions, IProgramExecuteWithProfilingResult, IProgramExecutionTarget, IProgramExecutor, } from './execution/IAdtExecutors';
|
|
63
60
|
export type { IAdtRunnable, IRunnableWithProfiler, IRunnableWithProfiling, } from './execution/IAdtRunnable';
|
|
64
61
|
export type { ITraceScheduling } from './execution/ITraceScheduling';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,YAAY,EACV,+BAA+B,EAC/B,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,wBAAwB,GACzB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AACpE,YAAY,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACxE,YAAY,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AAC9E,YAAY,EACV,oCAAoC,EACpC,yBAAyB,GAC1B,MAAM,8BAA8B,CAAC;AACtC,YAAY,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AACtF,YAAY,EACV,eAAe,EACf,aAAa,EACb,aAAa,EACb,aAAa,EACb,YAAY,EACZ,oBAAoB,EACpB,qBAAqB,EACrB,YAAY,EACZ,kBAAkB,EAClB,aAAa,EACb,eAAe,EACf,eAAe,GAChB,MAAM,wBAAwB,CAAC;AAChC,YAAY,EACV,YAAY,EACZ,uBAAuB,EACvB,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC5E,YAAY,EACV,mBAAmB,EACnB,wBAAwB,EACxB,kBAAkB,GACnB,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EAAE,UAAU,EAAE,MAAM,eA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vB,oBAAoB,EACpB,aAAa,EACb,wBAAwB,GACzB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,YAAY,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACjE,YAAY,EACV,cAAc,EACd,WAAW,EACX,YAAY,EACZ,aAAa,EACb,aAAa,EACb,WAAW,EACX,UAAU,EACV,QAAQ,EACR,WAAW,EACX,UAAU,GACX,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,sCAAsC,EACtC,4CAA4C,GAC7C,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* @mcp-abap-adt/interfaces-adt
|
|
4
4
|
*
|
|
5
|
-
* ADT contracts: object operations,
|
|
6
|
-
*
|
|
5
|
+
* ADT contracts: object operations, runtime analysis, execution, feeds and
|
|
6
|
+
* service bindings. The ABAP connection they are sent through is
|
|
7
|
+
* `@mcp-abap-adt/interfaces-adt-connection` since 11.0.0, and is not re-exported
|
|
8
|
+
* here (decision 34).
|
|
7
9
|
*
|
|
8
10
|
* **Only ADT.** The test is who imports this package: `@mcp-abap-adt/adt-clients`
|
|
9
11
|
* and whatever replaces its objects, and nobody else. Everything that failed
|
|
@@ -13,7 +15,7 @@
|
|
|
13
15
|
* `HttpError` to `-network` and `XmlNode` to `-utils`.
|
|
14
16
|
*/
|
|
15
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.
|
|
18
|
+
exports.TRANSPORT_SEARCH_CONFIGURATIONS_URL = exports.ADT_TASK_TYPE = exports.SERVICE_BINDING_VARIANT_MAP = exports.ADT_NO_FAILURE = exports.AdtObjectErrorCodes = void 0;
|
|
17
19
|
var IAdtObject_1 = require("./adt/IAdtObject");
|
|
18
20
|
Object.defineProperty(exports, "AdtObjectErrorCodes", { enumerable: true, get: function () { return IAdtObject_1.AdtObjectErrorCodes; } });
|
|
19
21
|
var IAdtResponse_1 = require("./adt/IAdtResponse");
|
|
@@ -23,5 +25,3 @@ Object.defineProperty(exports, "SERVICE_BINDING_VARIANT_MAP", { enumerable: true
|
|
|
23
25
|
var IAdtTransport_1 = require("./adt/IAdtTransport");
|
|
24
26
|
Object.defineProperty(exports, "ADT_TASK_TYPE", { enumerable: true, get: function () { return IAdtTransport_1.ADT_TASK_TYPE; } });
|
|
25
27
|
Object.defineProperty(exports, "TRANSPORT_SEARCH_CONFIGURATIONS_URL", { enumerable: true, get: function () { return IAdtTransport_1.TRANSPORT_SEARCH_CONFIGURATIONS_URL; } });
|
|
26
|
-
var IConnectionCapabilities_1 = require("./connection/IConnectionCapabilities");
|
|
27
|
-
Object.defineProperty(exports, "ADT_SESSION_ERROR", { enumerable: true, get: function () { return IConnectionCapabilities_1.ADT_SESSION_ERROR; } });
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcp-abap-adt/interfaces-adt",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "ADT contracts: object operations,
|
|
3
|
+
"version": "11.0.0",
|
|
4
|
+
"description": "ADT contracts: object operations, runtime analysis, execution, feeds and service bindings",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -36,6 +36,6 @@
|
|
|
36
36
|
"node": ">=18.0.0"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@mcp-abap-adt/interfaces-
|
|
39
|
+
"@mcp-abap-adt/interfaces-adt-connection": "^1.0.0"
|
|
40
40
|
}
|
|
41
41
|
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Minimal response type for ADT requests.
|
|
3
|
-
*/
|
|
4
|
-
import type { IHttpHeaderValue, IHttpWireResponse } from '@mcp-abap-adt/interfaces-network';
|
|
5
|
-
import type { IAbapRequestOptions } from './IAbapRequestOptions';
|
|
6
|
-
export type IAdtHeaderValue = IHttpHeaderValue;
|
|
7
|
-
export interface IAdtWireResponse<T = any, D = any> extends Omit<IHttpWireResponse<T, D>, 'headers'> {
|
|
8
|
-
/**
|
|
9
|
-
* **The generic shape, narrowed by the headers ADT actually sends.** The
|
|
10
|
-
* frame itself — `data`, `status`, `statusText`, `config`, `request` — is
|
|
11
|
-
* `IHttpWireResponse` in `@mcp-abap-adt/interfaces-network`, because nothing
|
|
12
|
-
* about it is ABAP. What stays here is this list: `sap-adt-location` and the
|
|
13
|
-
* two spellings of `content-location` are where ADT puts the URI of what it
|
|
14
|
-
* just created, and a caller reads them by name.
|
|
15
|
-
*/
|
|
16
|
-
headers: Record<string, IAdtHeaderValue> & {
|
|
17
|
-
location?: string;
|
|
18
|
-
Location?: string;
|
|
19
|
-
'content-location'?: IAdtHeaderValue;
|
|
20
|
-
'Content-Location'?: IAdtHeaderValue;
|
|
21
|
-
'sap-adt-location'?: IAdtHeaderValue;
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* ABAP Connection interface
|
|
26
|
-
*
|
|
27
|
-
* Minimal interface for consumers to interact with SAP ADT.
|
|
28
|
-
* Implementation details (auth, token refresh, CSRF, cookies) are encapsulated.
|
|
29
|
-
*
|
|
30
|
-
* For JWT connections, token refresh is handled internally via ITokenRefresher.
|
|
31
|
-
* For Basic connections, no token refresh is needed.
|
|
32
|
-
*/
|
|
33
|
-
export interface IAbapConnection {
|
|
34
|
-
/**
|
|
35
|
-
* Initialize connection: fetch CSRF token and establish session cookies.
|
|
36
|
-
* Must be called before making any ADT requests.
|
|
37
|
-
*/
|
|
38
|
-
connect(): Promise<void>;
|
|
39
|
-
/**
|
|
40
|
-
* Get base URL of SAP system
|
|
41
|
-
*/
|
|
42
|
-
getBaseUrl(): Promise<string>;
|
|
43
|
-
/**
|
|
44
|
-
* Get current session ID (for stateful connections)
|
|
45
|
-
*/
|
|
46
|
-
getSessionId(): string | null;
|
|
47
|
-
/**
|
|
48
|
-
* Set session type for subsequent requests
|
|
49
|
-
* @param type - "stateful" for persistent session, "stateless" for independent requests
|
|
50
|
-
*/
|
|
51
|
-
setSessionType(type: 'stateful' | 'stateless'): void;
|
|
52
|
-
/**
|
|
53
|
-
* Make ADT request to SAP system
|
|
54
|
-
*
|
|
55
|
-
* Handles all auth concerns internally:
|
|
56
|
-
* - Adds authorization header (Basic or Bearer)
|
|
57
|
-
* - Manages CSRF token
|
|
58
|
-
* - Retries on 401/403 with token refresh (JWT only)
|
|
59
|
-
*
|
|
60
|
-
* @param options - Request options (url, method, data, etc.)
|
|
61
|
-
* @returns Promise with Axios response
|
|
62
|
-
*/
|
|
63
|
-
makeAdtRequest<T = any, D = any>(options: IAbapRequestOptions): Promise<IAdtWireResponse<T, D>>;
|
|
64
|
-
}
|
|
65
|
-
//# sourceMappingURL=IAbapConnection.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IAbapConnection.d.ts","sourceRoot":"","sources":["../../src/connection/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,GAAG,GAAG,EAAE,CAAC,GAAG,GAAG,CAChD,SAAQ,IAAI,CAAC,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,SAAS,CAAC;IAChD;;;;;;;OAOG;IACH,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,GAAG;QACzC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,kBAAkB,CAAC,EAAE,eAAe,CAAC;QACrC,kBAAkB,CAAC,EAAE,eAAe,CAAC;QACrC,kBAAkB,CAAC,EAAE,eAAe,CAAC;KACtC,CAAC;CACH;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEzB;;OAEG;IACH,UAAU,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAE9B;;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,GAAG,EAAE,CAAC,GAAG,GAAG,EAC7B,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;CACpC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IAbapRequestOptions.d.ts","sourceRoot":"","sources":["../../src/connection/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,217 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Capability atoms for the connection.
|
|
3
|
-
*
|
|
4
|
-
* The same shape as the ADT capability atoms, for the same reason:
|
|
5
|
-
* `IAbapConnection` is the minimum every transport can honour, and this is a
|
|
6
|
-
* thing only some can. An RFC connection, a batch recorder and a test stub are
|
|
7
|
-
* all legitimate `IAbapConnection`s that own no HTTP session; making these
|
|
8
|
-
* methods mandatory would force each of them to implement a lie.
|
|
9
|
-
*
|
|
10
|
-
* ADDITIVE to `IAbapConnection`, which is unchanged — an implementation adds the
|
|
11
|
-
* atom when it genuinely supports it, and a consumer narrows to it.
|
|
12
|
-
*/
|
|
13
|
-
/** Error codes a session-aware connection raises. Match on these, not on messages. */
|
|
14
|
-
export declare const ADT_SESSION_ERROR: {
|
|
15
|
-
/** No usable session: never connected, or torn down since. */
|
|
16
|
-
readonly NOT_CONNECTED: "ADT_NOT_CONNECTED";
|
|
17
|
-
/**
|
|
18
|
-
* The server put us on a DIFFERENT session than the one we were using.
|
|
19
|
-
*
|
|
20
|
-
* Anything locked over the old session is orphaned: the lock handle refers to
|
|
21
|
-
* a session that no longer exists, so it can be neither used nor released.
|
|
22
|
-
*/
|
|
23
|
-
readonly SESSION_REPLACED: "ADT_SESSION_REPLACED";
|
|
24
|
-
/** A transport release is still pending; the session cannot yet be reused. */
|
|
25
|
-
readonly RELEASE_PENDING: "ADT_RELEASE_PENDING";
|
|
26
|
-
};
|
|
27
|
-
export type AdtSessionErrorCode = (typeof ADT_SESSION_ERROR)[keyof typeof ADT_SESSION_ERROR];
|
|
28
|
-
/**
|
|
29
|
-
* A connection whose session is owned, observable and explicitly torn down.
|
|
30
|
-
*
|
|
31
|
-
* Without this, "is my session still the one I locked over?" is unanswerable
|
|
32
|
-
* from the consumer's side: a connection can be handed a new server session
|
|
33
|
-
* silently, and a caller holding a lock has no way to notice.
|
|
34
|
-
*/
|
|
35
|
-
export interface ISessionLifecycleAware {
|
|
36
|
-
/**
|
|
37
|
-
* Tells the server this session is finished.
|
|
38
|
-
*
|
|
39
|
-
* **It notifies; it does not confirm.** Whether and when the session is
|
|
40
|
-
* actually freed is the server's affair, and nothing here checks afterwards.
|
|
41
|
-
* That is why there is no deadline to pass: waiting for the answer to a
|
|
42
|
-
* message whose answer is not acted on buys the caller nothing, and a
|
|
43
|
-
* goodbye carries no request timeout by design — so waiting is the one thing
|
|
44
|
-
* that could make a teardown unbounded.
|
|
45
|
-
*
|
|
46
|
-
* Resolves rather than throws, and **always settles**: whatever it could not
|
|
47
|
-
* finish is the connection's own state, not the caller's problem. A repeat
|
|
48
|
-
* call performs whatever is still owed.
|
|
49
|
-
*
|
|
50
|
-
* **Calling it again does not wait for the goodbye either**, which is what
|
|
51
|
-
* {@link flushGoodbye} is for. A caller about to reconnect wants both, in
|
|
52
|
-
* this order:
|
|
53
|
-
*
|
|
54
|
-
* ```typescript
|
|
55
|
-
* await conn.disconnect();
|
|
56
|
-
* await conn.flushGoodbye();
|
|
57
|
-
* await conn.connect();
|
|
58
|
-
* ```
|
|
59
|
-
*
|
|
60
|
-
* Without the middle line the next session opens while the previous one's
|
|
61
|
-
* goodbye is still being assembled, and the server keeps both. With it, the
|
|
62
|
-
* goodbye is given up to the budget to finish first.
|
|
63
|
-
*
|
|
64
|
-
* In-flight requests are NOT waited for. They continue as their caller
|
|
65
|
-
* arranged and nothing is aborted; their results can no longer affect this
|
|
66
|
-
* connection.
|
|
67
|
-
*/
|
|
68
|
-
disconnect(): Promise<void>;
|
|
69
|
-
/**
|
|
70
|
-
* Wait for the goodbye {@link disconnect} sent, within a budget.
|
|
71
|
-
*
|
|
72
|
-
* `disconnect()` dispatches the logoff and does not await it, deliberately: a
|
|
73
|
-
* goodbye carries no request timeout, and a server that never answers must
|
|
74
|
-
* not hold a teardown open. That is right for teardown and wrong for the one
|
|
75
|
-
* caller who reconnects — `disconnect()` then `connect()` opens the next
|
|
76
|
-
* session while the previous one's goodbye is still being assembled, and the
|
|
77
|
-
* server keeps both.
|
|
78
|
-
*
|
|
79
|
-
* Measured on E19 through `@mcp-abap-adt/adt-clients`, whose harness recycled
|
|
80
|
-
* the session after each test: a new ABAP session every one to two seconds
|
|
81
|
-
* for the length of a run, none released, each living to its own thirty
|
|
82
|
-
* minute idle timeout. Turning the recycling off left one session for the
|
|
83
|
-
* whole run, which is what the harness intended all along.
|
|
84
|
-
*
|
|
85
|
-
* **Bounded, and it resolves rather than throws.** The reason not to await
|
|
86
|
-
* inside `disconnect()` applies here too, so the wait has a budget and gives
|
|
87
|
-
* up quietly: "the goodbye has not arrived yet" is not a failure of whatever
|
|
88
|
-
* the caller does next. A goodbye that failed is likewise not the caller's
|
|
89
|
-
* problem — it is absorbed, not rethrown.
|
|
90
|
-
*
|
|
91
|
-
* **So a return is not a confirmation, and not even of dispatch.** Waiting out
|
|
92
|
-
* the budget resolves the same way as the goodbye finishing, and at that
|
|
93
|
-
* point the request may not have reached the wire at all — the promise it
|
|
94
|
-
* waits on covers assembling and sending, not just answering.
|
|
95
|
-
*
|
|
96
|
-
* The guarantee is exactly this: **the caller gives the goodbye up to the
|
|
97
|
-
* budget to finish before carrying on.** If it finishes in time there is no
|
|
98
|
-
* overlap with the next `connect()`. If it does not, the caller proceeds and
|
|
99
|
-
* the goodbye stays outstanding for as long as it takes — the budget bounds
|
|
100
|
-
* the waiting, not the overlap. Whether the server then releases the session
|
|
101
|
-
* is the server's affair, exactly as it is for `disconnect()`.
|
|
102
|
-
*
|
|
103
|
-
* Returns immediately when nothing was dispatched.
|
|
104
|
-
*
|
|
105
|
-
* @param timeoutMs how long to wait; an implementation chooses its default.
|
|
106
|
-
*/
|
|
107
|
-
flushGoodbye(timeoutMs?: number): Promise<void>;
|
|
108
|
-
/** Whether a caller may start work. False throughout a pending teardown. */
|
|
109
|
-
isConnected(): boolean;
|
|
110
|
-
/**
|
|
111
|
-
* Which server session the connection is on — or `null`, which says nothing
|
|
112
|
-
* about whether the connection is usable. **Use {@link isConnected} for that.**
|
|
113
|
-
*
|
|
114
|
-
* `null` means only that no identity is known, and there are two ways to get
|
|
115
|
-
* there: no session exists, or the connection is live over a server that
|
|
116
|
-
* issued no session cookie — some do not. So a live, working connection can
|
|
117
|
-
* return `null` here, and a consumer that reads `null` as "session lost"
|
|
118
|
-
* would tear down a connection that was fine.
|
|
119
|
-
*
|
|
120
|
-
* What it does identify is the SESSION, not the conversation: a stable
|
|
121
|
-
* client-side conversation id says nothing about whether the server replaced
|
|
122
|
-
* the session underneath it, which is precisely the failure this exists to
|
|
123
|
-
* expose. Compare two readings across an operation to detect a replacement.
|
|
124
|
-
*
|
|
125
|
-
* Only a CHANGED value is a replacement. `null` → non-null is an identity
|
|
126
|
-
* being learned, not a new session: the LOCK response is often the first to
|
|
127
|
-
* carry a session cookie, and reading that as a replacement would condemn the
|
|
128
|
-
* operation it just covered.
|
|
129
|
-
*/
|
|
130
|
-
getSessionIdentity(): string | null;
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* A connection whose responses resolve only after a later flush.
|
|
134
|
-
*
|
|
135
|
-
* A batch recorder collects requests and settles their promises when the batch
|
|
136
|
-
* executes. Awaiting one of those promises mid-recording deadlocks: the caller
|
|
137
|
-
* is blocked inside the very code that would have reached `execute()`.
|
|
138
|
-
*
|
|
139
|
-
* Deferral belongs to the connection, not to how a client was configured —
|
|
140
|
-
* which is why it is declared here rather than passed as an option. A consumer
|
|
141
|
-
* that wraps a recorder itself, without going through the batch client, still
|
|
142
|
-
* gets the guard.
|
|
143
|
-
*/
|
|
144
|
-
export interface IDeferredResponseConnection {
|
|
145
|
-
/** Always `true`. "Sometimes deferred" is not a state a caller could act on. */
|
|
146
|
-
readonly responsesAreDeferred: true;
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* A connection whose ordinary per-request deadline can be suspended.
|
|
150
|
-
*
|
|
151
|
-
* A `lock` → write → `unlock` sequence wants to run to completion. Aborting one
|
|
152
|
-
* of its requests part way ends nothing on the server — the server ends an ABAP
|
|
153
|
-
* session on its own idle timeout, which this side cannot see — it ends what
|
|
154
|
-
* this side *knows*: whether the write was applied becomes unanswerable, and
|
|
155
|
-
* the handle `unlock` needs is lost while the lock lives on in that session.
|
|
156
|
-
*
|
|
157
|
-
* Measured on a BTP trial: a `POST /sap/bc/adt/deletion/delete` abandoned at
|
|
158
|
-
* 45 s was followed by `400 … Session Timed Out or Not Found` carrying a *new*
|
|
159
|
-
* session cookie. Over HTTP a session is two layers — the ICF one the cookie
|
|
160
|
-
* addresses and the ABAP one beneath it holding the enqueue locks — and the
|
|
161
|
-
* abort replaces the first while stranding the second.
|
|
162
|
-
*
|
|
163
|
-
* **What this promises, exactly.** Inside a section the connection's ordinary
|
|
164
|
-
* per-request deadline does not apply. It does **not** promise that no request
|
|
165
|
-
* can ever be cut short: an implementation is free to keep a far larger ceiling
|
|
166
|
-
* — `@mcp-abap-adt/connection` raises it to `SAP_TIMEOUT_CRITICAL`, ten minutes
|
|
167
|
-
* by default — and a socket, a proxy or the process itself ends a request
|
|
168
|
-
* whatever a contract says. The guarantee is that the short deadline is out of
|
|
169
|
-
* the way, not that time is.
|
|
170
|
-
*
|
|
171
|
-
* Sections nest: the ceiling lifts on the outermost `begin` and ordinary
|
|
172
|
-
* deadlines resume after the matching `end`.
|
|
173
|
-
*
|
|
174
|
-
* Separate from {@link ISessionLifecycleAware} because it answers a different
|
|
175
|
-
* question: that one is *whose session is this*, this one is *may this request
|
|
176
|
-
* be cut short*. A batch recorder honours the first and has nothing to protect.
|
|
177
|
-
*/
|
|
178
|
-
export interface ICriticalSection {
|
|
179
|
-
/**
|
|
180
|
-
* Enter a section in which the ordinary per-request deadline is suspended.
|
|
181
|
-
*
|
|
182
|
-
* Nests. Every call needs its own {@link endCriticalSection}, and the usual
|
|
183
|
-
* shape is a `try`/`finally` so a throw inside the window still ends it.
|
|
184
|
-
*/
|
|
185
|
-
beginCriticalSection(): void;
|
|
186
|
-
/** Leave it. Ordinary deadlines resume when the outermost section ends. */
|
|
187
|
-
endCriticalSection(): void;
|
|
188
|
-
}
|
|
189
|
-
/**
|
|
190
|
-
* A connection that can be told what to ask the server to report about itself.
|
|
191
|
-
*
|
|
192
|
-
* `X-sap-adt-profiling` asks the server for its own processing time, and
|
|
193
|
-
* Eclipse sends it on every request. It is a per-connection default: a single
|
|
194
|
-
* request overrides it through `headers` on the request options, which every
|
|
195
|
-
* connection already accepts, so this atom exists for the *default* and not for
|
|
196
|
-
* the one-off.
|
|
197
|
-
*
|
|
198
|
-
* `null` asks for nothing. The value is a string rather than an enum because
|
|
199
|
-
* what a server accepts there is the server's business and grows without this
|
|
200
|
-
* package: `'server-time'` is what Eclipse asks for and is the sensible
|
|
201
|
-
* default.
|
|
202
|
-
*
|
|
203
|
-
* Worth stating: an implementation is not expected to read the answer back.
|
|
204
|
-
* The measurement is for whoever is looking at the wire, and being able to turn
|
|
205
|
-
* it off matters more than being able to consume it.
|
|
206
|
-
*/
|
|
207
|
-
export interface IRequestProfiling {
|
|
208
|
-
/**
|
|
209
|
-
* What to ask for on every request from now on, or `null` to ask nothing.
|
|
210
|
-
*
|
|
211
|
-
* @param what the `X-sap-adt-profiling` value; `'server-time'` is Eclipse's.
|
|
212
|
-
*/
|
|
213
|
-
setProfilingRequest(what: string | null): void;
|
|
214
|
-
/** What this connection is currently asking for. */
|
|
215
|
-
getProfilingRequest(): string | null;
|
|
216
|
-
}
|
|
217
|
-
//# sourceMappingURL=IConnectionCapabilities.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IConnectionCapabilities.d.ts","sourceRoot":"","sources":["../../src/connection/IConnectionCapabilities.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,sFAAsF;AACtF,eAAO,MAAM,iBAAiB;IAC5B,8DAA8D;;IAE9D;;;;;OAKG;;IAEH,8EAA8E;;CAEtE,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAC7B,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC;AAE7D;;;;;;GAMG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAE5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAqCG;IACH,YAAY,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEhD,4EAA4E;IAC5E,WAAW,IAAI,OAAO,CAAC;IAEvB;;;;;;;;;;;;;;;;;;;OAmBG;IACH,kBAAkB,IAAI,MAAM,GAAG,IAAI,CAAC;CACrC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,2BAA2B;IAC1C,gFAAgF;IAChF,QAAQ,CAAC,oBAAoB,EAAE,IAAI,CAAC;CACrC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;;OAKG;IACH,oBAAoB,IAAI,IAAI,CAAC;IAE7B,2EAA2E;IAC3E,kBAAkB,IAAI,IAAI,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;;OAIG;IACH,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;IAE/C,oDAAoD;IACpD,mBAAmB,IAAI,MAAM,GAAG,IAAI,CAAC;CACtC"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Capability atoms for the connection.
|
|
4
|
-
*
|
|
5
|
-
* The same shape as the ADT capability atoms, for the same reason:
|
|
6
|
-
* `IAbapConnection` is the minimum every transport can honour, and this is a
|
|
7
|
-
* thing only some can. An RFC connection, a batch recorder and a test stub are
|
|
8
|
-
* all legitimate `IAbapConnection`s that own no HTTP session; making these
|
|
9
|
-
* methods mandatory would force each of them to implement a lie.
|
|
10
|
-
*
|
|
11
|
-
* ADDITIVE to `IAbapConnection`, which is unchanged — an implementation adds the
|
|
12
|
-
* atom when it genuinely supports it, and a consumer narrows to it.
|
|
13
|
-
*/
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.ADT_SESSION_ERROR = void 0;
|
|
16
|
-
/** Error codes a session-aware connection raises. Match on these, not on messages. */
|
|
17
|
-
exports.ADT_SESSION_ERROR = {
|
|
18
|
-
/** No usable session: never connected, or torn down since. */
|
|
19
|
-
NOT_CONNECTED: 'ADT_NOT_CONNECTED',
|
|
20
|
-
/**
|
|
21
|
-
* The server put us on a DIFFERENT session than the one we were using.
|
|
22
|
-
*
|
|
23
|
-
* Anything locked over the old session is orphaned: the lock handle refers to
|
|
24
|
-
* a session that no longer exists, so it can be neither used nor released.
|
|
25
|
-
*/
|
|
26
|
-
SESSION_REPLACED: 'ADT_SESSION_REPLACED',
|
|
27
|
-
/** A transport release is still pending; the session cannot yet be reused. */
|
|
28
|
-
RELEASE_PENDING: 'ADT_RELEASE_PENDING',
|
|
29
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The deadlines a caller gives an ADT connection.
|
|
3
|
-
*
|
|
4
|
-
* **`csrf` is why this is not in `@mcp-abap-adt/interfaces-network`.** Fetching
|
|
5
|
-
* a CSRF token is an SAP operation, not a transport primitive, and `long` is a
|
|
6
|
-
* client's policy for a long-polling read rather than anything the network
|
|
7
|
-
* layer knows. It was in that package until `interfaces-adt` 9.0.0, against its
|
|
8
|
-
* own README's claim that it holds nothing SAP-specific.
|
|
9
|
-
*/
|
|
10
|
-
export interface ITimeoutConfig {
|
|
11
|
-
default: number;
|
|
12
|
-
csrf: number;
|
|
13
|
-
long: number;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=ITimeoutConfig.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ITimeoutConfig.d.ts","sourceRoot":"","sources":["../../src/connection/ITimeoutConfig.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd"}
|