@mcp-abap-adt/adt-clients 25.0.1 → 26.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 +13 -7
- package/dist/core/program/update.d.ts +1 -1
- package/dist/core/program/update.d.ts.map +1 -1
- package/dist/core/shared/deleteLegacy.d.ts +1 -1
- package/dist/core/shared/deleteLegacy.d.ts.map +1 -1
- package/dist/index.runtime.d.ts +4 -0
- package/dist/index.runtime.d.ts.map +1 -1
- package/dist/index.runtime.js +13 -1
- package/dist/runtime/debugger/AbapDebugger.d.ts +93 -0
- package/dist/runtime/debugger/AbapDebugger.d.ts.map +1 -0
- package/dist/runtime/debugger/AbapDebugger.js +101 -0
- package/dist/runtime/debugger/AmdpDebugger.d.ts +52 -0
- package/dist/runtime/debugger/AmdpDebugger.d.ts.map +1 -0
- package/dist/runtime/debugger/AmdpDebugger.js +63 -0
- package/dist/runtime/debugger/abap.d.ts +203 -0
- package/dist/runtime/debugger/abap.d.ts.map +1 -0
- package/dist/runtime/debugger/abap.js +455 -0
- package/dist/runtime/debugger/amdp.d.ts +75 -0
- package/dist/runtime/debugger/amdp.d.ts.map +1 -0
- package/dist/runtime/debugger/amdp.js +148 -0
- package/dist/runtime/debugger/amdpDataPreview.d.ts +24 -0
- package/dist/runtime/debugger/amdpDataPreview.d.ts.map +1 -0
- package/dist/runtime/debugger/amdpDataPreview.js +49 -0
- package/dist/runtime/debugger/batchPayload.d.ts +17 -0
- package/dist/runtime/debugger/batchPayload.d.ts.map +1 -0
- package/dist/runtime/debugger/batchPayload.js +30 -0
- package/dist/runtime/debugger/index.d.ts +10 -0
- package/dist/runtime/debugger/index.d.ts.map +1 -0
- package/dist/runtime/debugger/index.js +50 -0
- package/dist/runtime/memory/MemorySnapshots.d.ts +52 -0
- package/dist/runtime/memory/MemorySnapshots.d.ts.map +1 -0
- package/dist/runtime/memory/MemorySnapshots.js +71 -0
- package/dist/runtime/memory/index.d.ts +6 -0
- package/dist/runtime/memory/index.d.ts.map +1 -0
- package/dist/runtime/memory/index.js +22 -0
- package/dist/runtime/memory/snapshots.d.ts +52 -0
- package/dist/runtime/memory/snapshots.d.ts.map +1 -0
- package/dist/runtime/memory/snapshots.js +134 -0
- package/dist/utils/systemInfo.d.ts.map +1 -1
- package/dist/utils/systemInfo.js +7 -5
- package/docs/usage/CLIENT_API_REFERENCE.md +110 -1
- package/docs/usage/ERRATA.md +27 -0
- package/docs/usage/MIGRATION-26.md +43 -0
- package/docs/usage/RFC_CONNECTION.md +9 -3
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -21,7 +21,8 @@ TypeScript clients for SAP ABAP Development Tools (ADT).
|
|
|
21
21
|
- ✅ **Client API** – simplified interface for common operations:
|
|
22
22
|
- `AdtClient` – high-level CRUD API; one member, one ADT request
|
|
23
23
|
- `AdtExecutor` – execution API via `IExecutor` contracts (class/program, with profiling)
|
|
24
|
-
- `AdtRuntimeClient` – runtime operations (
|
|
24
|
+
- `AdtRuntimeClient` – runtime operations (traces, logs, dumps, ATC check runs)
|
|
25
|
+
- `AbapDebugger`, `AmdpDebugger`, `MemorySnapshots` – the ABAP and AMDP debuggers and memory snapshots, each on connections the caller opens
|
|
25
26
|
- `AdtClientsWS` – realtime WebSocket facade for event-driven workflows
|
|
26
27
|
- `AdtAbapGitClient` – standalone client for SAP-official ADT-integrated abapGit (`/sap/bc/adt/abapgit/*`); available on cloud and modern on-prem (ABAP Platform 2022+)
|
|
27
28
|
- ✅ **ABAP Unit test support** – run and manage ABAP Unit tests (class and CDS view tests)
|
|
@@ -134,7 +135,7 @@ npm install @mcp-abap-adt/adt-clients
|
|
|
134
135
|
- Example: `await client.getClass().create({...})` — the POST, and nothing else
|
|
135
136
|
|
|
136
137
|
2. **AdtRuntimeClient**
|
|
137
|
-
- Stable runtime operations for
|
|
138
|
+
- Stable runtime operations for traces, dumps, logs, feeds, ATC check runs, and more
|
|
138
139
|
- Factory accessors: `getProfiler()`, `getCrossTrace()`, `getSt05Trace()`, `getApplicationLog()`, `getAtc()`, `getAtcLog()`, `getDdicActivation()`, `getDumps()`, `getFeeds()`, `getSystemMessages()`, `getGatewayErrorLog()`
|
|
139
140
|
- Each takes an optional result set (`getProfiler({ ...profilerDocuments, list: profilerTraceEntries })`) and builds a fresh implementation per call — nothing is cached, so one caller's readings never become another's
|
|
140
141
|
- `getAtc()` runs ATC checks; `getAtcLog()` reads the execution and check-failure logs. Same subject, different resources — see [ATC check runs](docs/usage/CLIENT_API_REFERENCE.md#atc-check-runs)
|
|
@@ -157,8 +158,13 @@ npm install @mcp-abap-adt/adt-clients
|
|
|
157
158
|
|
|
158
159
|
5. **AdtClientsWS**
|
|
159
160
|
- Realtime request/event facade over `IWebSocketTransport`
|
|
160
|
-
-
|
|
161
|
-
|
|
161
|
+
- Example: `await wsClient.request('<operation>', { … })` against a backend that speaks its envelope
|
|
162
|
+
|
|
163
|
+
6. **AbapDebugger, AmdpDebugger, MemorySnapshots**
|
|
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`
|
|
166
|
+
- **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
|
|
167
|
+
- See [Debugging](docs/usage/CLIENT_API_REFERENCE.md#debugging)
|
|
162
168
|
|
|
163
169
|
## Supported Object Types
|
|
164
170
|
|
|
@@ -317,8 +323,7 @@ const wsClient = new AdtClientsWS(transport, console, {
|
|
|
317
323
|
|
|
318
324
|
await wsClient.connect('wss://your-realtime-endpoint');
|
|
319
325
|
|
|
320
|
-
await
|
|
321
|
-
await debuggerSession.step({ action: 'step_over' });
|
|
326
|
+
const answer = await wsClient.request('<operation>', { /* payload */ });
|
|
322
327
|
```
|
|
323
328
|
|
|
324
329
|
### Using AdtExecutor (Execution API)
|
|
@@ -925,7 +930,8 @@ configure the client at all, so they belong with everything else a consumer impo
|
|
|
925
930
|
the library. They now live in `@mcp-abap-adt/interfaces-adt`, alongside `IAdtContentTypes` /
|
|
926
931
|
`IAdtHeaders` (the header-provider contract — `AdtContentTypesBase` and
|
|
927
932
|
`AdtContentTypesModern`, the two shipped implementations, stay here), the three `IBatch*`
|
|
928
|
-
shapes, the twelve abapGit types, the ten executor types, and the
|
|
933
|
+
shapes, the twelve abapGit types, the ten executor types, and the debugger and memory-snapshot
|
|
934
|
+
contracts (`IAbapDebugger`, `IAmdpDebugger`, `IMemorySnapshots`, 13.1.0). This
|
|
929
935
|
package no longer declares or exports any contract type — every contract name it uses is
|
|
930
936
|
sourced from the contract packages.
|
|
931
937
|
|
|
@@ -7,5 +7,5 @@ import type { IAbapConnection } from '@mcp-abap-adt/interfaces-adt-connection';
|
|
|
7
7
|
* This function does NOT lock/unlock - it assumes the object is already locked
|
|
8
8
|
* Used internally by AdtProgram
|
|
9
9
|
*/
|
|
10
|
-
export declare function uploadProgramSource(connection: IAbapConnection, programName: string, sourceCode: string, lockHandle: string, _sessionId: string, corrNr?: string): Promise<import("@mcp-abap-adt/interfaces-adt-connection").IAdtWireResponse<
|
|
10
|
+
export declare function uploadProgramSource(connection: IAbapConnection, programName: string, sourceCode: string, lockHandle: string, _sessionId: string, corrNr?: string): Promise<import("@mcp-abap-adt/interfaces-adt-connection").IAdtWireResponse<unknown, unknown>>;
|
|
11
11
|
//# sourceMappingURL=update.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../src/core/program/update.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAK/E;;;;GAIG;AACH,wBAAsB,mBAAmB,CACvC,UAAU,EAAE,eAAe,EAC3B,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,MAAM,CAAC,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../src/core/program/update.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAK/E;;;;GAIG;AACH,wBAAsB,mBAAmB,CACvC,UAAU,EAAE,eAAe,EAC3B,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,MAAM,CAAC,EAAE,MAAM,iGAmBhB"}
|
|
@@ -16,5 +16,5 @@ import type { IAbapConnection } from '@mcp-abap-adt/interfaces-adt-connection';
|
|
|
16
16
|
* @param lockHandle - Passed through when the caller holds one; optional
|
|
17
17
|
* @param transportRequest - Optional transport request number
|
|
18
18
|
*/
|
|
19
|
-
export declare function deleteObjectDirect(connection: IAbapConnection, objectUrl: string, lockHandle: string | undefined, transportRequest?: string): Promise<import("@mcp-abap-adt/interfaces-adt-connection").IAdtWireResponse<
|
|
19
|
+
export declare function deleteObjectDirect(connection: IAbapConnection, objectUrl: string, lockHandle: string | undefined, transportRequest?: string): Promise<import("@mcp-abap-adt/interfaces-adt-connection").IAdtWireResponse<unknown, unknown>>;
|
|
20
20
|
//# sourceMappingURL=deleteLegacy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deleteLegacy.d.ts","sourceRoot":"","sources":["../../../src/core/shared/deleteLegacy.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAI/E;;;;;;;GAOG;AACH,wBAAsB,kBAAkB,CACtC,UAAU,EAAE,eAAe,EAC3B,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,gBAAgB,CAAC,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"deleteLegacy.d.ts","sourceRoot":"","sources":["../../../src/core/shared/deleteLegacy.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAI/E;;;;;;;GAOG;AACH,wBAAsB,kBAAkB,CACtC,UAAU,EAAE,eAAe,EAC3B,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,gBAAgB,CAAC,EAAE,MAAM,iGAU1B"}
|
package/dist/index.runtime.d.ts
CHANGED
|
@@ -7,10 +7,14 @@ export { ApplicationLog, applicationLogDocuments, type IApplicationLogResults, }
|
|
|
7
7
|
export { AdtAtc, atcDocuments, type IAtcResults, } from './runtime/atc/AdtAtc';
|
|
8
8
|
export { AtcLog, atcLogDocuments, type IAtcLogResults, } from './runtime/atc/AtcLog';
|
|
9
9
|
export { DdicActivation, ddicActivationDocuments, type IDdicActivationResults, } from './runtime/ddic/DdicActivation';
|
|
10
|
+
export { AbapDebugger, abapDebuggerDocuments, type IAbapDebuggerOptions, type IAbapDebuggerResults, } from './runtime/debugger/AbapDebugger';
|
|
11
|
+
export { AmdpDebugger, amdpDebuggerDocuments, type IAmdpDebuggerResults, } from './runtime/debugger/AmdpDebugger';
|
|
12
|
+
export type { IDebuggerListenerConflict } from './runtime/debugger/abap';
|
|
10
13
|
export { buildDumpIdPrefix, buildRuntimeDumpsUserQuery, } from './runtime/dumps';
|
|
11
14
|
export { type IRuntimeDumpsResults, RuntimeDumps, runtimeDumpsDocuments, } from './runtime/dumps/RuntimeDumps';
|
|
12
15
|
export { FeedRepository, feedDocuments, type IFeedResults, } from './runtime/feeds/FeedRepository';
|
|
13
16
|
export { GatewayErrorLog, gatewayErrorLogDocuments, type IGatewayErrorLogResults, } from './runtime/gatewayErrorLog/GatewayErrorLog';
|
|
17
|
+
export { type IMemorySnapshotsResults, MemorySnapshots, memorySnapshotsDocuments, } from './runtime/memory/MemorySnapshots';
|
|
14
18
|
export { type ISystemMessagesResults, SystemMessages, systemMessagesDocuments, } from './runtime/systemMessages/SystemMessages';
|
|
15
19
|
export { CrossTrace, crossTraceDocuments, type ICrossTraceResultSet, } from './runtime/traces/CrossTraceDomain';
|
|
16
20
|
export { type IProfilerResults, Profiler, profilerDocuments, } from './runtime/traces/ProfilerDomain';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.runtime.d.ts","sourceRoot":"","sources":["../src/index.runtime.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EACL,cAAc,EACd,uBAAuB,EACvB,KAAK,sBAAsB,GAC5B,MAAM,yCAAyC,CAAC;AACjD,OAAO,EACL,MAAM,EACN,YAAY,EACZ,KAAK,WAAW,GACjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,MAAM,EACN,eAAe,EACf,KAAK,cAAc,GACpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,cAAc,EACd,uBAAuB,EACvB,KAAK,sBAAsB,GAC5B,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.runtime.d.ts","sourceRoot":"","sources":["../src/index.runtime.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EACL,cAAc,EACd,uBAAuB,EACvB,KAAK,sBAAsB,GAC5B,MAAM,yCAAyC,CAAC;AACjD,OAAO,EACL,MAAM,EACN,YAAY,EACZ,KAAK,WAAW,GACjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,MAAM,EACN,eAAe,EACf,KAAK,cAAc,GACpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,cAAc,EACd,uBAAuB,EACvB,KAAK,sBAAsB,GAC5B,MAAM,+BAA+B,CAAC;AAIvC,OAAO,EACL,YAAY,EACZ,qBAAqB,EACrB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,GAC1B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,YAAY,EACZ,qBAAqB,EACrB,KAAK,oBAAoB,GAC1B,MAAM,iCAAiC,CAAC;AACzC,YAAY,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAEzE,OAAO,EACL,iBAAiB,EACjB,0BAA0B,GAC3B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,KAAK,oBAAoB,EACzB,YAAY,EACZ,qBAAqB,GACtB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,cAAc,EACd,aAAa,EACb,KAAK,YAAY,GAClB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,eAAe,EACf,wBAAwB,EACxB,KAAK,uBAAuB,GAC7B,MAAM,2CAA2C,CAAC;AACnD,OAAO,EACL,KAAK,uBAAuB,EAC5B,eAAe,EACf,wBAAwB,GACzB,MAAM,kCAAkC,CAAC;AAG1C,OAAO,EACL,KAAK,sBAAsB,EAC3B,cAAc,EACd,uBAAuB,GACxB,MAAM,yCAAyC,CAAC;AAEjD,OAAO,EACL,UAAU,EACV,mBAAmB,EACnB,KAAK,oBAAoB,GAC1B,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EACL,KAAK,gBAAgB,EACrB,QAAQ,EACR,iBAAiB,GAClB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,KAAK,iBAAiB,EACtB,SAAS,EACT,kBAAkB,GACnB,MAAM,4BAA4B,CAAC"}
|
package/dist/index.runtime.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Covers: AdtRuntimeClient and all runtime/** modules.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.st05TraceDocuments = exports.St05Trace = exports.profilerDocuments = exports.Profiler = exports.crossTraceDocuments = exports.CrossTrace = exports.systemMessagesDocuments = exports.SystemMessages = exports.gatewayErrorLogDocuments = exports.GatewayErrorLog = exports.feedDocuments = exports.FeedRepository = exports.runtimeDumpsDocuments = exports.RuntimeDumps = exports.buildRuntimeDumpsUserQuery = exports.buildDumpIdPrefix = exports.ddicActivationDocuments = exports.DdicActivation = exports.atcLogDocuments = exports.AtcLog = exports.atcDocuments = exports.AdtAtc = exports.applicationLogDocuments = exports.ApplicationLog = exports.AdtRuntimeClient = void 0;
|
|
7
|
+
exports.st05TraceDocuments = exports.St05Trace = exports.profilerDocuments = exports.Profiler = exports.crossTraceDocuments = exports.CrossTrace = exports.systemMessagesDocuments = exports.SystemMessages = exports.memorySnapshotsDocuments = exports.MemorySnapshots = exports.gatewayErrorLogDocuments = exports.GatewayErrorLog = exports.feedDocuments = exports.FeedRepository = exports.runtimeDumpsDocuments = exports.RuntimeDumps = exports.buildRuntimeDumpsUserQuery = exports.buildDumpIdPrefix = exports.amdpDebuggerDocuments = exports.AmdpDebugger = exports.abapDebuggerDocuments = exports.AbapDebugger = exports.ddicActivationDocuments = exports.DdicActivation = exports.atcLogDocuments = exports.AtcLog = exports.atcDocuments = exports.AdtAtc = exports.applicationLogDocuments = exports.ApplicationLog = exports.AdtRuntimeClient = void 0;
|
|
8
8
|
var AdtRuntimeClient_1 = require("./clients/AdtRuntimeClient");
|
|
9
9
|
Object.defineProperty(exports, "AdtRuntimeClient", { enumerable: true, get: function () { return AdtRuntimeClient_1.AdtRuntimeClient; } });
|
|
10
10
|
var ApplicationLog_1 = require("./runtime/applicationLog/ApplicationLog");
|
|
@@ -19,6 +19,15 @@ Object.defineProperty(exports, "atcLogDocuments", { enumerable: true, get: funct
|
|
|
19
19
|
var DdicActivation_1 = require("./runtime/ddic/DdicActivation");
|
|
20
20
|
Object.defineProperty(exports, "DdicActivation", { enumerable: true, get: function () { return DdicActivation_1.DdicActivation; } });
|
|
21
21
|
Object.defineProperty(exports, "ddicActivationDocuments", { enumerable: true, get: function () { return DdicActivation_1.ddicActivationDocuments; } });
|
|
22
|
+
// The debuggers and memory snapshots. Each needs sessions of its own — see
|
|
23
|
+
// their class docs — so they are constructed on connections the caller opens,
|
|
24
|
+
// not handed out by AdtRuntimeClient.
|
|
25
|
+
var AbapDebugger_1 = require("./runtime/debugger/AbapDebugger");
|
|
26
|
+
Object.defineProperty(exports, "AbapDebugger", { enumerable: true, get: function () { return AbapDebugger_1.AbapDebugger; } });
|
|
27
|
+
Object.defineProperty(exports, "abapDebuggerDocuments", { enumerable: true, get: function () { return AbapDebugger_1.abapDebuggerDocuments; } });
|
|
28
|
+
var AmdpDebugger_1 = require("./runtime/debugger/AmdpDebugger");
|
|
29
|
+
Object.defineProperty(exports, "AmdpDebugger", { enumerable: true, get: function () { return AmdpDebugger_1.AmdpDebugger; } });
|
|
30
|
+
Object.defineProperty(exports, "amdpDebuggerDocuments", { enumerable: true, get: function () { return AmdpDebugger_1.amdpDebuggerDocuments; } });
|
|
22
31
|
// Keep low-level dump types/functions (may be used by consumers)
|
|
23
32
|
var dumps_1 = require("./runtime/dumps");
|
|
24
33
|
Object.defineProperty(exports, "buildDumpIdPrefix", { enumerable: true, get: function () { return dumps_1.buildDumpIdPrefix; } });
|
|
@@ -32,6 +41,9 @@ Object.defineProperty(exports, "feedDocuments", { enumerable: true, get: functio
|
|
|
32
41
|
var GatewayErrorLog_1 = require("./runtime/gatewayErrorLog/GatewayErrorLog");
|
|
33
42
|
Object.defineProperty(exports, "GatewayErrorLog", { enumerable: true, get: function () { return GatewayErrorLog_1.GatewayErrorLog; } });
|
|
34
43
|
Object.defineProperty(exports, "gatewayErrorLogDocuments", { enumerable: true, get: function () { return GatewayErrorLog_1.gatewayErrorLogDocuments; } });
|
|
44
|
+
var MemorySnapshots_1 = require("./runtime/memory/MemorySnapshots");
|
|
45
|
+
Object.defineProperty(exports, "MemorySnapshots", { enumerable: true, get: function () { return MemorySnapshots_1.MemorySnapshots; } });
|
|
46
|
+
Object.defineProperty(exports, "memorySnapshotsDocuments", { enumerable: true, get: function () { return MemorySnapshots_1.memorySnapshotsDocuments; } });
|
|
35
47
|
// The class is still exported for backward compatibility
|
|
36
48
|
var SystemMessages_1 = require("./runtime/systemMessages/SystemMessages");
|
|
37
49
|
Object.defineProperty(exports, "SystemMessages", { enumerable: true, get: function () { return SystemMessages_1.SystemMessages; } });
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AbapDebugger - Domain object for the standard ABAP debugger
|
|
3
|
+
*
|
|
4
|
+
* One member per request of the measured sequence in `./abap.ts`; the order,
|
|
5
|
+
* the stateful session and the second session that runs the program are the
|
|
6
|
+
* caller's.
|
|
7
|
+
*/
|
|
8
|
+
import type { IAbapDebugger, IAdtAnalyseOptions, IAdtError, IAdtResponse, IDebuggerBreakpoint, IDebuggerIdentity, IDebuggerStepMethod, IDebuggerStepToLineMethod, IResultStrategy } from '@mcp-abap-adt/interfaces-adt';
|
|
9
|
+
import type { IAbapConnection } from '@mcp-abap-adt/interfaces-adt-connection';
|
|
10
|
+
import type { ILogger } from '@mcp-abap-adt/interfaces-utils';
|
|
11
|
+
import { type IDebuggerListenerConflict } from './abap';
|
|
12
|
+
/** One strategy per kind of answer the debugger gives. */
|
|
13
|
+
export interface IAbapDebuggerResults {
|
|
14
|
+
readonly breakpoints: IResultStrategy<unknown>;
|
|
15
|
+
readonly listener: IResultStrategy<unknown>;
|
|
16
|
+
readonly attach: IResultStrategy<unknown>;
|
|
17
|
+
readonly stack: IResultStrategy<unknown>;
|
|
18
|
+
readonly variables: IResultStrategy<unknown>;
|
|
19
|
+
readonly step: IResultStrategy<unknown>;
|
|
20
|
+
/** Answers with nothing to read: deletes, the cursor move, termination. */
|
|
21
|
+
readonly done: IResultStrategy<unknown>;
|
|
22
|
+
readonly watchpoints: IResultStrategy<unknown>;
|
|
23
|
+
/** The memory sizes and the snapshot's confirmation. */
|
|
24
|
+
readonly memory: IResultStrategy<unknown>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The shipped default: every document as it arrived, and nothing where the
|
|
28
|
+
* answer carries nothing.
|
|
29
|
+
*
|
|
30
|
+
* `satisfies`, never an annotation — see `classDocuments` for why.
|
|
31
|
+
*/
|
|
32
|
+
export declare const abapDebuggerDocuments: {
|
|
33
|
+
breakpoints: IResultStrategy<string>;
|
|
34
|
+
listener: IResultStrategy<string>;
|
|
35
|
+
attach: IResultStrategy<string>;
|
|
36
|
+
stack: IResultStrategy<string>;
|
|
37
|
+
variables: IResultStrategy<string>;
|
|
38
|
+
step: IResultStrategy<string>;
|
|
39
|
+
done: IResultStrategy<void>;
|
|
40
|
+
watchpoints: IResultStrategy<string>;
|
|
41
|
+
memory: IResultStrategy<string>;
|
|
42
|
+
};
|
|
43
|
+
/** How this implementation behaves, fixed when it is constructed. */
|
|
44
|
+
export interface IAbapDebuggerOptions {
|
|
45
|
+
/**
|
|
46
|
+
* When another listener already holds the user's debugging — an Eclipse,
|
|
47
|
+
* another agent: `refuse` (the default) is answered 409 and leaves it
|
|
48
|
+
* alone, `takeOver` displaces it. A consumer wanting both constructs two
|
|
49
|
+
* debuggers.
|
|
50
|
+
*/
|
|
51
|
+
readonly onConflict?: IDebuggerListenerConflict;
|
|
52
|
+
}
|
|
53
|
+
type Of<R extends IAbapDebuggerResults, K extends keyof IAbapDebuggerResults> = ReturnType<R[K]>;
|
|
54
|
+
export declare class AbapDebugger<R extends IAbapDebuggerResults = typeof abapDebuggerDocuments> implements IAbapDebugger<Of<R, 'breakpoints'>, Of<R, 'listener'>, Of<R, 'attach'>, Of<R, 'stack'>, Of<R, 'variables'>, Of<R, 'step'>, Of<R, 'done'>, Of<R, 'watchpoints'>, Of<R, 'memory'>> {
|
|
55
|
+
private readonly connection;
|
|
56
|
+
private readonly results;
|
|
57
|
+
private readonly options;
|
|
58
|
+
readonly kind: "abapDebugger";
|
|
59
|
+
constructor(connection: IAbapConnection, _logger?: ILogger, results?: R, options?: IAbapDebuggerOptions);
|
|
60
|
+
private reading;
|
|
61
|
+
setBreakpoints<E extends IAdtError = IAdtError>(identity: IDebuggerIdentity, breakpoints: readonly IDebuggerBreakpoint[], options?: {
|
|
62
|
+
validationOnly?: boolean;
|
|
63
|
+
} & IAdtAnalyseOptions<E>): Promise<IAdtResponse<Of<R, 'breakpoints'>, E>>;
|
|
64
|
+
deleteBreakpoint<E extends IAdtError = IAdtError>(identity: IDebuggerIdentity, breakpointId: string, options?: IAdtAnalyseOptions<E>): Promise<IAdtResponse<Of<R, 'done'>, E>>;
|
|
65
|
+
listen<E extends IAdtError = IAdtError>(identity: IDebuggerIdentity, options?: {
|
|
66
|
+
holdSeconds?: number;
|
|
67
|
+
} & IAdtAnalyseOptions<E>): Promise<IAdtResponse<Of<R, 'listener'>, E>>;
|
|
68
|
+
stopListener<E extends IAdtError = IAdtError>(identity: IDebuggerIdentity, options?: IAdtAnalyseOptions<E>): Promise<IAdtResponse<Of<R, 'done'>, E>>;
|
|
69
|
+
attach<E extends IAdtError = IAdtError>(requestUser: string, debuggeeId: string, options?: {
|
|
70
|
+
dynproDebugging?: boolean;
|
|
71
|
+
/** The debuggee's application server (`INSTANCE_NAME` in the listener's answer). */
|
|
72
|
+
server?: string;
|
|
73
|
+
} & IAdtAnalyseOptions<E>): Promise<IAdtResponse<Of<R, 'attach'>, E>>;
|
|
74
|
+
getStack<E extends IAdtError = IAdtError>(options?: IAdtAnalyseOptions<E>): Promise<IAdtResponse<Of<R, 'stack'>, E>>;
|
|
75
|
+
getChildVariables<E extends IAdtError = IAdtError>(parentIds: readonly string[], options?: IAdtAnalyseOptions<E>): Promise<IAdtResponse<Of<R, 'variables'>, E>>;
|
|
76
|
+
getVariables<E extends IAdtError = IAdtError>(variableIds: readonly string[], options?: IAdtAnalyseOptions<E>): Promise<IAdtResponse<Of<R, 'variables'>, E>>;
|
|
77
|
+
step<E extends IAdtError = IAdtError>(method: IDebuggerStepMethod, options?: IAdtAnalyseOptions<E>): Promise<IAdtResponse<Of<R, 'step'>, E>>;
|
|
78
|
+
stepToLine<E extends IAdtError = IAdtError>(method: IDebuggerStepToLineMethod, uri: string, options?: IAdtAnalyseOptions<E>): Promise<IAdtResponse<Of<R, 'step'>, E>>;
|
|
79
|
+
setStackPosition<E extends IAdtError = IAdtError>(position: number, options?: IAdtAnalyseOptions<E>): Promise<IAdtResponse<Of<R, 'done'>, E>>;
|
|
80
|
+
setVariableValue<E extends IAdtError = IAdtError>(variableName: string, value: string, options?: IAdtAnalyseOptions<E>): Promise<IAdtResponse<Of<R, 'variables'>, E>>;
|
|
81
|
+
terminateDebuggee<E extends IAdtError = IAdtError>(options?: IAdtAnalyseOptions<E>): Promise<IAdtResponse<Of<R, 'done'>, E>>;
|
|
82
|
+
createWatchpoint<E extends IAdtError = IAdtError>(variableName: string, options?: {
|
|
83
|
+
condition?: string;
|
|
84
|
+
} & IAdtAnalyseOptions<E>): Promise<IAdtResponse<Of<R, 'watchpoints'>, E>>;
|
|
85
|
+
listWatchpoints<E extends IAdtError = IAdtError>(options?: IAdtAnalyseOptions<E>): Promise<IAdtResponse<Of<R, 'watchpoints'>, E>>;
|
|
86
|
+
deleteWatchpoint<E extends IAdtError = IAdtError>(watchpointId: string, options?: IAdtAnalyseOptions<E>): Promise<IAdtResponse<Of<R, 'done'>, E>>;
|
|
87
|
+
getMemorySizes<E extends IAdtError = IAdtError>(options?: {
|
|
88
|
+
includeAbap?: boolean;
|
|
89
|
+
} & IAdtAnalyseOptions<E>): Promise<IAdtResponse<Of<R, 'memory'>, E>>;
|
|
90
|
+
createMemorySnapshot<E extends IAdtError = IAdtError>(options?: IAdtAnalyseOptions<E>): Promise<IAdtResponse<Of<R, 'memory'>, E>>;
|
|
91
|
+
}
|
|
92
|
+
export {};
|
|
93
|
+
//# sourceMappingURL=AbapDebugger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AbapDebugger.d.ts","sourceRoot":"","sources":["../../../src/runtime/debugger/AbapDebugger.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,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AAO,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAC9B,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;CAO7C"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* AbapDebugger - Domain object for the standard ABAP debugger
|
|
4
|
+
*
|
|
5
|
+
* One member per request of the measured sequence in `./abap.ts`; the order,
|
|
6
|
+
* the stateful session and the second session that runs the program are the
|
|
7
|
+
* caller's.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.AbapDebugger = exports.abapDebuggerDocuments = void 0;
|
|
11
|
+
const adtResponse_1 = require("../../utils/adtResponse");
|
|
12
|
+
const resultStrategy_1 = require("../../utils/resultStrategy");
|
|
13
|
+
const abap_1 = require("./abap");
|
|
14
|
+
/**
|
|
15
|
+
* The shipped default: every document as it arrived, and nothing where the
|
|
16
|
+
* answer carries nothing.
|
|
17
|
+
*
|
|
18
|
+
* `satisfies`, never an annotation — see `classDocuments` for why.
|
|
19
|
+
*/
|
|
20
|
+
exports.abapDebuggerDocuments = {
|
|
21
|
+
breakpoints: resultStrategy_1.rawDocument,
|
|
22
|
+
listener: resultStrategy_1.rawDocument,
|
|
23
|
+
attach: resultStrategy_1.rawDocument,
|
|
24
|
+
stack: resultStrategy_1.rawDocument,
|
|
25
|
+
variables: resultStrategy_1.rawDocument,
|
|
26
|
+
step: resultStrategy_1.rawDocument,
|
|
27
|
+
done: resultStrategy_1.nothing,
|
|
28
|
+
watchpoints: resultStrategy_1.rawDocument,
|
|
29
|
+
memory: resultStrategy_1.rawDocument,
|
|
30
|
+
};
|
|
31
|
+
class AbapDebugger {
|
|
32
|
+
connection;
|
|
33
|
+
results;
|
|
34
|
+
options;
|
|
35
|
+
kind = 'abapDebugger';
|
|
36
|
+
constructor(connection, _logger,
|
|
37
|
+
// The one cast in this file, and it is on the default. See AdtClass.
|
|
38
|
+
results = exports.abapDebuggerDocuments, options = {}) {
|
|
39
|
+
this.connection = connection;
|
|
40
|
+
this.results = results;
|
|
41
|
+
this.options = options;
|
|
42
|
+
}
|
|
43
|
+
reading(key) {
|
|
44
|
+
return this.results[key];
|
|
45
|
+
}
|
|
46
|
+
async setBreakpoints(identity, breakpoints, options) {
|
|
47
|
+
return (0, adtResponse_1.answering)(() => (0, abap_1.setBreakpoints)(this.connection, identity, breakpoints, options?.validationOnly), this.reading('breakpoints'), options?.analyse);
|
|
48
|
+
}
|
|
49
|
+
async deleteBreakpoint(identity, breakpointId, options) {
|
|
50
|
+
return (0, adtResponse_1.answering)(() => (0, abap_1.deleteBreakpoint)(this.connection, identity, breakpointId), this.reading('done'), options?.analyse);
|
|
51
|
+
}
|
|
52
|
+
async listen(identity, options) {
|
|
53
|
+
return (0, adtResponse_1.answering)(() => (0, abap_1.listen)(this.connection, identity, this.options.onConflict ?? 'refuse', options?.holdSeconds), this.reading('listener'), options?.analyse);
|
|
54
|
+
}
|
|
55
|
+
async stopListener(identity, options) {
|
|
56
|
+
return (0, adtResponse_1.answering)(() => (0, abap_1.stopListener)(this.connection, identity), this.reading('done'), options?.analyse);
|
|
57
|
+
}
|
|
58
|
+
async attach(requestUser, debuggeeId, options) {
|
|
59
|
+
return (0, adtResponse_1.answering)(() => (0, abap_1.attach)(this.connection, requestUser, debuggeeId, options?.dynproDebugging, options?.server), this.reading('attach'), options?.analyse);
|
|
60
|
+
}
|
|
61
|
+
async getStack(options) {
|
|
62
|
+
return (0, adtResponse_1.answering)(() => (0, abap_1.getStack)(this.connection), this.reading('stack'), options?.analyse);
|
|
63
|
+
}
|
|
64
|
+
async getChildVariables(parentIds, options) {
|
|
65
|
+
return (0, adtResponse_1.answering)(() => (0, abap_1.getChildVariables)(this.connection, parentIds), this.reading('variables'), options?.analyse);
|
|
66
|
+
}
|
|
67
|
+
async getVariables(variableIds, options) {
|
|
68
|
+
return (0, adtResponse_1.answering)(() => (0, abap_1.getVariables)(this.connection, variableIds), this.reading('variables'), options?.analyse);
|
|
69
|
+
}
|
|
70
|
+
async step(method, options) {
|
|
71
|
+
return (0, adtResponse_1.answering)(() => (0, abap_1.step)(this.connection, method), this.reading('step'), options?.analyse);
|
|
72
|
+
}
|
|
73
|
+
async stepToLine(method, uri, options) {
|
|
74
|
+
return (0, adtResponse_1.answering)(() => (0, abap_1.stepToLine)(this.connection, method, uri), this.reading('step'), options?.analyse);
|
|
75
|
+
}
|
|
76
|
+
async setStackPosition(position, options) {
|
|
77
|
+
return (0, adtResponse_1.answering)(() => (0, abap_1.setStackPosition)(this.connection, position), this.reading('done'), options?.analyse);
|
|
78
|
+
}
|
|
79
|
+
async setVariableValue(variableName, value, options) {
|
|
80
|
+
return (0, adtResponse_1.answering)(() => (0, abap_1.setVariableValue)(this.connection, variableName, value), this.reading('variables'), options?.analyse);
|
|
81
|
+
}
|
|
82
|
+
async terminateDebuggee(options) {
|
|
83
|
+
return (0, adtResponse_1.answering)(() => (0, abap_1.terminateDebuggee)(this.connection), this.reading('done'), options?.analyse);
|
|
84
|
+
}
|
|
85
|
+
async createWatchpoint(variableName, options) {
|
|
86
|
+
return (0, adtResponse_1.answering)(() => (0, abap_1.createWatchpoint)(this.connection, variableName, options?.condition), this.reading('watchpoints'), options?.analyse);
|
|
87
|
+
}
|
|
88
|
+
async listWatchpoints(options) {
|
|
89
|
+
return (0, adtResponse_1.answering)(() => (0, abap_1.listWatchpoints)(this.connection), this.reading('watchpoints'), options?.analyse);
|
|
90
|
+
}
|
|
91
|
+
async deleteWatchpoint(watchpointId, options) {
|
|
92
|
+
return (0, adtResponse_1.answering)(() => (0, abap_1.deleteWatchpoint)(this.connection, watchpointId), this.reading('done'), options?.analyse);
|
|
93
|
+
}
|
|
94
|
+
async getMemorySizes(options) {
|
|
95
|
+
return (0, adtResponse_1.answering)(() => (0, abap_1.getMemorySizes)(this.connection, options?.includeAbap), this.reading('memory'), options?.analyse);
|
|
96
|
+
}
|
|
97
|
+
async createMemorySnapshot(options) {
|
|
98
|
+
return (0, adtResponse_1.answering)(() => (0, abap_1.createMemorySnapshot)(this.connection), this.reading('memory'), options?.analyse);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
exports.AbapDebugger = AbapDebugger;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AmdpDebugger - Domain object for the AMDP debugger
|
|
3
|
+
*
|
|
4
|
+
* One member per request of the measured protocol in `./amdp.ts`. The two
|
|
5
|
+
* sessions — `start` and `getEvents` on one stateful connection, the commands
|
|
6
|
+
* on another — are the caller's: a consumer constructs one AmdpDebugger per
|
|
7
|
+
* connection.
|
|
8
|
+
*/
|
|
9
|
+
import type { IAdtAnalyseOptions, IAdtError, IAdtResponse, IAmdpBreakpoint, IAmdpDebugger, IAmdpStepMethod, IGetAmdpDataPreviewOptions, IResultStrategy, IStartAmdpDebuggerOptions } from '@mcp-abap-adt/interfaces-adt';
|
|
10
|
+
import type { IAbapConnection } from '@mcp-abap-adt/interfaces-adt-connection';
|
|
11
|
+
import type { ILogger } from '@mcp-abap-adt/interfaces-utils';
|
|
12
|
+
/** One strategy per kind of answer the AMDP debugger gives. */
|
|
13
|
+
export interface IAmdpDebuggerResults {
|
|
14
|
+
/** The start: `Location` names the session, the body the database session. */
|
|
15
|
+
readonly started: IResultStrategy<unknown>;
|
|
16
|
+
/** The events document. */
|
|
17
|
+
readonly events: IResultStrategy<unknown>;
|
|
18
|
+
/** A command's answer: `Location` carries its request id, the body is empty. */
|
|
19
|
+
readonly command: IResultStrategy<unknown>;
|
|
20
|
+
readonly preview: IResultStrategy<unknown>;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The shipped default: the start and the commands answered whole — what
|
|
24
|
+
* they say is in a header — and the documents as they arrived.
|
|
25
|
+
*
|
|
26
|
+
* `satisfies`, never an annotation — see `classDocuments` for why.
|
|
27
|
+
*/
|
|
28
|
+
export declare const amdpDebuggerDocuments: {
|
|
29
|
+
started: IResultStrategy<import("@mcp-abap-adt/interfaces-adt-connection").IAdtWireResponse<unknown, unknown>>;
|
|
30
|
+
events: IResultStrategy<string>;
|
|
31
|
+
command: IResultStrategy<import("@mcp-abap-adt/interfaces-adt-connection").IAdtWireResponse<unknown, unknown>>;
|
|
32
|
+
preview: IResultStrategy<string>;
|
|
33
|
+
};
|
|
34
|
+
type Of<R extends IAmdpDebuggerResults, K extends keyof IAmdpDebuggerResults> = ReturnType<R[K]>;
|
|
35
|
+
export declare class AmdpDebugger<R extends IAmdpDebuggerResults = typeof amdpDebuggerDocuments> implements IAmdpDebugger<Of<R, 'started'>, Of<R, 'events'>, Of<R, 'command'>, Of<R, 'preview'>> {
|
|
36
|
+
private readonly connection;
|
|
37
|
+
private readonly results;
|
|
38
|
+
readonly kind: "amdpDebugger";
|
|
39
|
+
constructor(connection: IAbapConnection, _logger?: ILogger, results?: R);
|
|
40
|
+
private reading;
|
|
41
|
+
start<E extends IAdtError = IAdtError>(requestUser: string, options?: IStartAmdpDebuggerOptions & IAdtAnalyseOptions<E>): Promise<IAdtResponse<Of<R, 'started'>, E>>;
|
|
42
|
+
syncBreakpoints<E extends IAdtError = IAdtError>(mainId: string, breakpoints: readonly IAmdpBreakpoint[], options?: IAdtAnalyseOptions<E>): Promise<IAdtResponse<Of<R, 'command'>, E>>;
|
|
43
|
+
getEvents<E extends IAdtError = IAdtError>(mainId: string, options?: IAdtAnalyseOptions<E>): Promise<IAdtResponse<Of<R, 'events'>, E>>;
|
|
44
|
+
step<E extends IAdtError = IAdtError>(mainId: string, debuggeeId: string, step: IAmdpStepMethod, options?: IAdtAnalyseOptions<E>): Promise<IAdtResponse<Of<R, 'command'>, E>>;
|
|
45
|
+
deleteDebuggee<E extends IAdtError = IAdtError>(mainId: string, debuggeeId: string, options?: IAdtAnalyseOptions<E>): Promise<IAdtResponse<Of<R, 'command'>, E>>;
|
|
46
|
+
stop<E extends IAdtError = IAdtError>(mainId: string, options?: {
|
|
47
|
+
hardStop?: boolean;
|
|
48
|
+
} & IAdtAnalyseOptions<E>): Promise<IAdtResponse<Of<R, 'command'>, E>>;
|
|
49
|
+
getDataPreview<E extends IAdtError = IAdtError>(options: IGetAmdpDataPreviewOptions & IAdtAnalyseOptions<E>): Promise<IAdtResponse<Of<R, 'preview'>, E>>;
|
|
50
|
+
}
|
|
51
|
+
export {};
|
|
52
|
+
//# sourceMappingURL=AmdpDebugger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AmdpDebugger.d.ts","sourceRoot":"","sources":["../../../src/runtime/debugger/AmdpDebugger.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACV,kBAAkB,EAClB,SAAS,EACT,YAAY,EACZ,eAAe,EACf,aAAa,EACb,eAAe,EACf,0BAA0B,EAC1B,eAAe,EACf,yBAAyB,EAC1B,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAC/E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAa9D,+DAA+D;AAC/D,MAAM,WAAW,oBAAoB;IACnC,8EAA8E;IAC9E,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;IAC3C,2BAA2B;IAC3B,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;IAC1C,gFAAgF;IAChF,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;IAC3C,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;CAC5C;AAED;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB;;;;;CAKF,CAAC;AAEjC,KAAK,EAAE,CACL,CAAC,SAAS,oBAAoB,EAC9B,CAAC,SAAS,MAAM,oBAAoB,IAClC,UAAU,CAAC,CAAC,CAAC,CAAC,C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AS,GAAG,SAAS,EACxC,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,eAAe,EACrB,OAAO,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAC9B,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,EAAE,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC;IAQvC,cAAc,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,EAClD,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAC9B,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,EAAE,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC;IAQvC,IAAI,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,EACxC,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,kBAAkB,CAAC,CAAC,CAAC,GACvD,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,EAAE,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC;IAQvC,cAAc,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,EAClD,OAAO,EAAE,0BAA0B,GAAG,kBAAkB,CAAC,CAAC,CAAC,GAC1D,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,EAAE,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC;CAO9C"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* AmdpDebugger - Domain object for the AMDP debugger
|
|
4
|
+
*
|
|
5
|
+
* One member per request of the measured protocol in `./amdp.ts`. The two
|
|
6
|
+
* sessions — `start` and `getEvents` on one stateful connection, the commands
|
|
7
|
+
* on another — are the caller's: a consumer constructs one AmdpDebugger per
|
|
8
|
+
* connection.
|
|
9
|
+
*/
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.AmdpDebugger = exports.amdpDebuggerDocuments = void 0;
|
|
12
|
+
const adtResponse_1 = require("../../utils/adtResponse");
|
|
13
|
+
const resultStrategy_1 = require("../../utils/resultStrategy");
|
|
14
|
+
const amdp_1 = require("./amdp");
|
|
15
|
+
const amdpDataPreview_1 = require("./amdpDataPreview");
|
|
16
|
+
/**
|
|
17
|
+
* The shipped default: the start and the commands answered whole — what
|
|
18
|
+
* they say is in a header — and the documents as they arrived.
|
|
19
|
+
*
|
|
20
|
+
* `satisfies`, never an annotation — see `classDocuments` for why.
|
|
21
|
+
*/
|
|
22
|
+
exports.amdpDebuggerDocuments = {
|
|
23
|
+
started: resultStrategy_1.wireItself,
|
|
24
|
+
events: resultStrategy_1.rawDocument,
|
|
25
|
+
command: resultStrategy_1.wireItself,
|
|
26
|
+
preview: resultStrategy_1.rawDocument,
|
|
27
|
+
};
|
|
28
|
+
class AmdpDebugger {
|
|
29
|
+
connection;
|
|
30
|
+
results;
|
|
31
|
+
kind = 'amdpDebugger';
|
|
32
|
+
constructor(connection, _logger,
|
|
33
|
+
// The one cast in this file, and it is on the default. See AdtClass.
|
|
34
|
+
results = exports.amdpDebuggerDocuments) {
|
|
35
|
+
this.connection = connection;
|
|
36
|
+
this.results = results;
|
|
37
|
+
}
|
|
38
|
+
reading(key) {
|
|
39
|
+
return this.results[key];
|
|
40
|
+
}
|
|
41
|
+
async start(requestUser, options) {
|
|
42
|
+
return (0, adtResponse_1.answering)(() => (0, amdp_1.startAmdpDebugger)(this.connection, requestUser, options), this.reading('started'), options?.analyse);
|
|
43
|
+
}
|
|
44
|
+
async syncBreakpoints(mainId, breakpoints, options) {
|
|
45
|
+
return (0, adtResponse_1.answering)(() => (0, amdp_1.syncAmdpBreakpoints)(this.connection, mainId, breakpoints), this.reading('command'), options?.analyse);
|
|
46
|
+
}
|
|
47
|
+
async getEvents(mainId, options) {
|
|
48
|
+
return (0, adtResponse_1.answering)(() => (0, amdp_1.getAmdpEvents)(this.connection, mainId), this.reading('events'), options?.analyse);
|
|
49
|
+
}
|
|
50
|
+
async step(mainId, debuggeeId, step, options) {
|
|
51
|
+
return (0, adtResponse_1.answering)(() => (0, amdp_1.stepAmdpDebuggee)(this.connection, mainId, debuggeeId, step), this.reading('command'), options?.analyse);
|
|
52
|
+
}
|
|
53
|
+
async deleteDebuggee(mainId, debuggeeId, options) {
|
|
54
|
+
return (0, adtResponse_1.answering)(() => (0, amdp_1.deleteAmdpDebuggee)(this.connection, mainId, debuggeeId), this.reading('command'), options?.analyse);
|
|
55
|
+
}
|
|
56
|
+
async stop(mainId, options) {
|
|
57
|
+
return (0, adtResponse_1.answering)(() => (0, amdp_1.stopAmdpDebugger)(this.connection, mainId, options?.hardStop), this.reading('command'), options?.analyse);
|
|
58
|
+
}
|
|
59
|
+
async getDataPreview(options) {
|
|
60
|
+
return (0, adtResponse_1.answering)(() => (0, amdpDataPreview_1.getAmdpDataPreview)(this.connection, options), this.reading('preview'), options.analyse);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
exports.AmdpDebugger = AmdpDebugger;
|