@mcp-abap-adt/adt-clients 36.0.2 → 37.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +63 -10
- package/dist/clients/AdtClient.d.ts +4 -4
- package/dist/clients/AdtClient.d.ts.map +1 -1
- package/dist/core/class/index.d.ts +1 -1
- package/dist/core/class/index.d.ts.map +1 -1
- package/dist/core/class/index.js +2 -1
- package/dist/core/class/run.d.ts +35 -0
- package/dist/core/class/run.d.ts.map +1 -1
- package/dist/core/class/run.js +88 -0
- package/dist/core/shared/AdtUtils.d.ts +36 -3
- package/dist/core/shared/AdtUtils.d.ts.map +1 -1
- package/dist/core/shared/AdtUtils.js +38 -2
- package/dist/core/shared/AdtUtilsLegacy.d.ts +5 -0
- package/dist/core/shared/AdtUtilsLegacy.d.ts.map +1 -1
- package/dist/core/shared/AdtUtilsLegacy.js +7 -0
- package/dist/core/shared/objectProperties.d.ts +24 -0
- package/dist/core/shared/objectProperties.d.ts.map +1 -0
- package/dist/core/shared/objectProperties.js +36 -0
- package/dist/core/shared/utilResultSet.d.ts +7 -1
- package/dist/core/shared/utilResultSet.d.ts.map +1 -1
- package/dist/core/shared/utilResultSet.js +2 -1
- package/dist/executors/class/ClassTestRunner.d.ts +27 -1
- package/dist/executors/class/ClassTestRunner.d.ts.map +1 -1
- package/dist/executors/class/ClassTestRunner.js +31 -0
- package/dist/executors/class/ClassTestRunnerLegacy.d.ts +6 -0
- package/dist/executors/class/ClassTestRunnerLegacy.d.ts.map +1 -1
- package/dist/executors/class/ClassTestRunnerLegacy.js +12 -5
- package/dist/utils/systemInfo.d.ts +40 -7
- package/dist/utils/systemInfo.d.ts.map +1 -1
- package/dist/utils/systemInfo.js +132 -47
- package/docs/README.md +4 -0
- package/docs/usage/CLIENT_API_REFERENCE.md +29 -2
- package/docs/usage/MIGRATION-37.md +189 -0
- package/package.json +2 -2
- package/dist/core/class/runLegacy.d.ts +0 -42
- package/dist/core/class/runLegacy.d.ts.map +0 -1
- package/dist/core/class/runLegacy.js +0 -74
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdtUtils.d.ts","sourceRoot":"","sources":["../../../src/core/shared/AdtUtils.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"AdtUtils.d.ts","sourceRoot":"","sources":["../../../src/core/shared/AdtUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgFG;AAEH,OAAO,KAAK,EACV,kBAAkB,EAClB,eAAe,EACf,aAAa,EACb,SAAS,EACT,kBAAkB,EAClB,WAAW,EACX,qBAAqB,EACrB,gBAAgB,EAChB,oBAAoB,EACpB,oBAAoB,EACpB,uBAAuB,EACvB,YAAY,EAEb,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAC/E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AA2C9D,OAAO,KAAK,EACV,aAAa,EACb,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,EACvB,kBAAkB,EAClB,uBAAuB,EACvB,gCAAgC,EAChC,mBAAmB,EACnB,wBAAwB,EACxB,gBAAgB,EAChB,YAAY,EACZ,oBAAoB,EACrB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,KAAK,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAiDnE,qBAAa,QAAQ,CAAC,CAAC,SAAS,YAAY,GAAG,OAAO,aAAa,CACjE,YACE,qBAAqB,CACnB,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EACvB,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,EAC1B,UAAU,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,EAC/B,UAAU,CAAC,CAAC,CAAC,SAAS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GAAG,SAAS,EAC/C,YAAY,GAAE,MAAY,EAC1B,IAAI,GAAE,MAAY,EAClB,IAAI,GAAE,MAAyB,EAC/B,OAAO,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAC9B,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CAOpD"}
|
|
@@ -60,7 +60,16 @@
|
|
|
60
60
|
*
|
|
61
61
|
* `getTypeInfo` reached it with a domain's uri and `getTransaction` with
|
|
62
62
|
* `/sap/bc/adt/transactions/{name}` — the same request about different objects,
|
|
63
|
-
* which is what made two members of it.
|
|
63
|
+
* which is what made two members of it.
|
|
64
|
+
*
|
|
65
|
+
* It is exposed again as {@link AdtUtils.getObjectProperties}: one member for
|
|
66
|
+
* the one endpoint, taking any object uri. A transaction is asked about by its
|
|
67
|
+
* workbench uri, `/sap/bc/adt/vit/wb/object_type/trant/object_name/{name}`;
|
|
68
|
+
* the `/sap/bc/adt/transactions/{name}` uri `getTransaction` sent is refused
|
|
69
|
+
* with `422` (`SADT_RESOURCE` 042) on premise (SAP_BASIS 816, measured
|
|
70
|
+
* 2026-10-21).
|
|
71
|
+
*
|
|
72
|
+
* The enhancement endpoint formerly
|
|
64
73
|
* recorded here is now exposed by the typed host handlers:
|
|
65
74
|
*
|
|
66
75
|
* ```
|
|
@@ -83,6 +92,7 @@ const groupActivation_1 = require("./groupActivation");
|
|
|
83
92
|
const groupDeletion_1 = require("./groupDeletion");
|
|
84
93
|
const include_1 = require("./include");
|
|
85
94
|
const nodeStructure_1 = require("./nodeStructure");
|
|
95
|
+
const objectProperties_1 = require("./objectProperties");
|
|
86
96
|
const objectStructure_1 = require("./objectStructure");
|
|
87
97
|
const objectWire_1 = require("./objectWire");
|
|
88
98
|
// Import utility functions
|
|
@@ -128,7 +138,7 @@ const utilResultSet_1 = require("./utilResultSet");
|
|
|
128
138
|
* The parser overloads went in 30.0.0, when the reading became something
|
|
129
139
|
* injected once rather than passed per call — and since 19.0.0 there is nothing
|
|
130
140
|
* left that a reading cannot reach. Every member below that makes a request
|
|
131
|
-
* takes its shape from a slot of `IUtilResults`, all twenty of them. The three
|
|
141
|
+
* takes its shape from a slot of `IUtilResults`, all twenty-one of them. The three
|
|
132
142
|
* that take none — `modifyWhereUsedScope`, `supportsSourceCode` and
|
|
133
143
|
* `getObjectSourceUri` — make no request, so there is no answer for a strategy
|
|
134
144
|
* to read.
|
|
@@ -505,6 +515,32 @@ class AdtUtils {
|
|
|
505
515
|
async getObjectStructure(objectType, objectName, options) {
|
|
506
516
|
return (0, adtResponse_1.answering)(() => (0, objectStructure_1.getObjectStructure)(this.connection, objectType, objectName), this.results.objectStructure, options?.analyse);
|
|
507
517
|
}
|
|
518
|
+
/**
|
|
519
|
+
* The properties of one repository object —
|
|
520
|
+
* `/repository/informationsystem/objectproperties/values?uri={objectUri}`.
|
|
521
|
+
*
|
|
522
|
+
* One GET, any object the uri names. The answer is the
|
|
523
|
+
* `opr:objectProperties` document: an `opr:object` with the object's `name`,
|
|
524
|
+
* `type`, `text` and `package`, then one `opr:property` per facet
|
|
525
|
+
* (`APPL`, `PACKAGE`, …). It is answered as it came through the
|
|
526
|
+
* `objectProperties` slot.
|
|
527
|
+
*
|
|
528
|
+
* @param objectUri - The object's ADT uri, sent URL-encoded — for a
|
|
529
|
+
* transaction `/sap/bc/adt/vit/wb/object_type/trant/object_name/{name}`
|
|
530
|
+
* @param options.analyse - The error strategy for the answer
|
|
531
|
+
* @returns The properties document, read by the `objectProperties` slot
|
|
532
|
+
*
|
|
533
|
+
* @example
|
|
534
|
+
* ```typescript
|
|
535
|
+
* const answer = await utils.getObjectProperties(
|
|
536
|
+
* '/sap/bc/adt/vit/wb/object_type/trant/object_name/SE38',
|
|
537
|
+
* );
|
|
538
|
+
* if (answer.ok) answer.getResult().value; // the opr:objectProperties document
|
|
539
|
+
* ```
|
|
540
|
+
*/
|
|
541
|
+
async getObjectProperties(objectUri, options) {
|
|
542
|
+
return (0, adtResponse_1.answering)(() => (0, objectProperties_1.getObjectProperties)(this.connection, objectUri), this.results.objectProperties, options?.analyse);
|
|
543
|
+
}
|
|
508
544
|
/**
|
|
509
545
|
* Get include source code
|
|
510
546
|
*
|
|
@@ -11,6 +11,10 @@
|
|
|
11
11
|
* (/sap/bc/adt/repository/informationsystem/objectproperties, also absent). It
|
|
12
12
|
* went with the base method, which nobody called: the only code that ever
|
|
13
13
|
* mentioned `getTransaction` was its own doc comment and this refusal of it.
|
|
14
|
+
*
|
|
15
|
+
* The base class exposes that endpoint again as `getObjectProperties`
|
|
16
|
+
* (/sap/bc/adt/repository/informationsystem/objectproperties/values), so this
|
|
17
|
+
* class refuses it again: legacy discovery still does not list it.
|
|
14
18
|
*/
|
|
15
19
|
import type { IAdtHeaders } from '@mcp-abap-adt/interfaces-adt';
|
|
16
20
|
import { type IAdtAnalyseOptions, type IAdtError, type IAdtResponse } from '@mcp-abap-adt/interfaces-adt';
|
|
@@ -61,6 +65,7 @@ export declare class AdtUtilsLegacy<R extends IUtilResults = typeof utilDocument
|
|
|
61
65
|
getSqlQuery<E extends IAdtError = IAdtError>(_params: IGetSqlQueryParams, _options: {
|
|
62
66
|
headers: IAdtHeaders;
|
|
63
67
|
} & IAdtAnalyseOptions<E>): Promise<IAdtResponse<ReturnType<R['query']>, E>>;
|
|
68
|
+
getObjectProperties<E extends IAdtError = IAdtError>(_objectUri: string, _options?: IAdtAnalyseOptions<E>): Promise<IAdtResponse<ReturnType<R['objectProperties']>, E>>;
|
|
64
69
|
private refuse;
|
|
65
70
|
}
|
|
66
71
|
//# sourceMappingURL=AdtUtilsLegacy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdtUtilsLegacy.d.ts","sourceRoot":"","sources":["../../../src/core/shared/AdtUtilsLegacy.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"AdtUtilsLegacy.d.ts","sourceRoot":"","sources":["../../../src/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CAAA;KAAE,GAAG,kBAAkB,CAAC,CAAC,CAAC,GACzD,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAIvC,WAAW,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,EACxD,OAAO,EAAE,kBAAkB,EAC3B,QAAQ,EAAE;QAAE,OAAO,EAAE,WAAW,CAAA;KAAE,GAAG,kBAAkB,CAAC,CAAC,CAAC,GACzD,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAIpC,mBAAmB,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,EAChE,UAAU,EAAE,MAAM,EAClB,QAAQ,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAC/B,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAO9D,OAAO,CAAC,MAAM;CAYf"}
|
|
@@ -12,6 +12,10 @@
|
|
|
12
12
|
* (/sap/bc/adt/repository/informationsystem/objectproperties, also absent). It
|
|
13
13
|
* went with the base method, which nobody called: the only code that ever
|
|
14
14
|
* mentioned `getTransaction` was its own doc comment and this refusal of it.
|
|
15
|
+
*
|
|
16
|
+
* The base class exposes that endpoint again as `getObjectProperties`
|
|
17
|
+
* (/sap/bc/adt/repository/informationsystem/objectproperties/values), so this
|
|
18
|
+
* class refuses it again: legacy discovery still does not list it.
|
|
15
19
|
*/
|
|
16
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
21
|
exports.AdtUtilsLegacy = void 0;
|
|
@@ -88,6 +92,9 @@ ${objectReferences}
|
|
|
88
92
|
async getSqlQuery(_params, _options) {
|
|
89
93
|
return this.refuse('SQL query', '/sap/bc/adt/datapreview/freestyle');
|
|
90
94
|
}
|
|
95
|
+
async getObjectProperties(_objectUri, _options) {
|
|
96
|
+
return this.refuse('Object properties', '/sap/bc/adt/repository/informationsystem/objectproperties/values');
|
|
97
|
+
}
|
|
91
98
|
refuse(operation, endpoint) {
|
|
92
99
|
// The library's own verdict, so `E` is its default `IAdtError` here — the
|
|
93
100
|
// same cast `answering` makes when no strategy supplied one.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Object properties from the repository information system
|
|
3
|
+
*
|
|
4
|
+
* The properties of any repository object, named by its ADT uri.
|
|
5
|
+
*/
|
|
6
|
+
import type { IAbapConnection, IAdtWireResponse } from '@mcp-abap-adt/interfaces-adt-connection';
|
|
7
|
+
/**
|
|
8
|
+
* What the endpoint answers, measured on premise (SAP_BASIS 816, 2026-10-21).
|
|
9
|
+
*/
|
|
10
|
+
export declare const OBJECT_PROPERTIES_ACCEPT = "application/vnd.sap.adt.repository.objproperties.result.v1+xml";
|
|
11
|
+
/**
|
|
12
|
+
* Get the properties of one repository object
|
|
13
|
+
*
|
|
14
|
+
* Endpoint: GET /sap/bc/adt/repository/informationsystem/objectproperties/values?uri={objectUri}
|
|
15
|
+
*
|
|
16
|
+
* @param connection - ABAP connection instance
|
|
17
|
+
* @param objectUri - The object's ADT uri, e.g.
|
|
18
|
+
* `/sap/bc/adt/vit/wb/object_type/trant/object_name/SE38` for a transaction;
|
|
19
|
+
* sent URL-encoded
|
|
20
|
+
* @returns The `opr:objectProperties` document: the object (name, type, text,
|
|
21
|
+
* package) and its properties per facet
|
|
22
|
+
*/
|
|
23
|
+
export declare function getObjectProperties(connection: IAbapConnection, objectUri: string): Promise<IAdtWireResponse>;
|
|
24
|
+
//# sourceMappingURL=objectProperties.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"objectProperties.d.ts","sourceRoot":"","sources":["../../../src/core/shared/objectProperties.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EACjB,MAAM,yCAAyC,CAAC;AAEjD;;GAEG;AACH,eAAO,MAAM,wBAAwB,mEAC6B,CAAC;AAEnE;;;;;;;;;;;GAWG;AACH,wBAAsB,mBAAmB,CACvC,UAAU,EAAE,eAAe,EAC3B,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,gBAAgB,CAAC,CAW3B"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Object properties from the repository information system
|
|
4
|
+
*
|
|
5
|
+
* The properties of any repository object, named by its ADT uri.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.OBJECT_PROPERTIES_ACCEPT = void 0;
|
|
9
|
+
exports.getObjectProperties = getObjectProperties;
|
|
10
|
+
/**
|
|
11
|
+
* What the endpoint answers, measured on premise (SAP_BASIS 816, 2026-10-21).
|
|
12
|
+
*/
|
|
13
|
+
exports.OBJECT_PROPERTIES_ACCEPT = 'application/vnd.sap.adt.repository.objproperties.result.v1+xml';
|
|
14
|
+
/**
|
|
15
|
+
* Get the properties of one repository object
|
|
16
|
+
*
|
|
17
|
+
* Endpoint: GET /sap/bc/adt/repository/informationsystem/objectproperties/values?uri={objectUri}
|
|
18
|
+
*
|
|
19
|
+
* @param connection - ABAP connection instance
|
|
20
|
+
* @param objectUri - The object's ADT uri, e.g.
|
|
21
|
+
* `/sap/bc/adt/vit/wb/object_type/trant/object_name/SE38` for a transaction;
|
|
22
|
+
* sent URL-encoded
|
|
23
|
+
* @returns The `opr:objectProperties` document: the object (name, type, text,
|
|
24
|
+
* package) and its properties per facet
|
|
25
|
+
*/
|
|
26
|
+
async function getObjectProperties(connection, objectUri) {
|
|
27
|
+
const url = `/sap/bc/adt/repository/informationsystem/objectproperties/values?uri=${encodeURIComponent(objectUri)}`;
|
|
28
|
+
return connection.makeAdtRequest({
|
|
29
|
+
url,
|
|
30
|
+
method: 'GET',
|
|
31
|
+
timeout: 0,
|
|
32
|
+
headers: {
|
|
33
|
+
Accept: exports.OBJECT_PROPERTIES_ACCEPT,
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* **The line is measured, not felt.** A result strategy reads *an answer*, so a
|
|
10
10
|
* member belongs here exactly when it makes one request. Since 19.0.0 every
|
|
11
11
|
* member of `AdtUtils` that reaches ADT makes exactly one — the walks, the
|
|
12
|
-
* chains and the read-modify-writes left — so all twenty are here.
|
|
12
|
+
* chains and the read-modify-writes left — so all twenty-one are here.
|
|
13
13
|
*
|
|
14
14
|
* Three members are absent and always will be. `modifyWhereUsedScope` edits a
|
|
15
15
|
* document it was handed, `supportsSourceCode` answers from a table in this
|
|
@@ -84,6 +84,11 @@ export interface IUtilResults {
|
|
|
84
84
|
readonly metadata: IResultStrategy<unknown>;
|
|
85
85
|
/** One include of a program — `/programs/includes/{name}`. */
|
|
86
86
|
readonly include: IResultStrategy<unknown>;
|
|
87
|
+
/**
|
|
88
|
+
* What `/informationsystem/objectproperties/values` answers for one object
|
|
89
|
+
* uri — the `opr:objectProperties` document.
|
|
90
|
+
*/
|
|
91
|
+
readonly objectProperties: IResultStrategy<unknown>;
|
|
87
92
|
}
|
|
88
93
|
/**
|
|
89
94
|
* The shipped default.
|
|
@@ -111,5 +116,6 @@ export declare const utilDocuments: {
|
|
|
111
116
|
source: IResultStrategy<string>;
|
|
112
117
|
metadata: IResultStrategy<string>;
|
|
113
118
|
include: IResultStrategy<string>;
|
|
119
|
+
objectProperties: IResultStrategy<string>;
|
|
114
120
|
};
|
|
115
121
|
//# sourceMappingURL=utilResultSet.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utilResultSet.d.ts","sourceRoot":"","sources":["../../../src/core/shared/utilResultSet.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAG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EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;IAC9C,oEAAoE;IACpE,QAAQ,CAAC,GAAG,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;IACvC,uEAAuE;IACvE,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;IAC3C,+DAA+D;IAC/D,QAAQ,CAAC,aAAa,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;IACjD,iDAAiD;IACjD,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;IAC5C,qEAAqE;IACrE,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;IACzC,+DAA+D;IAC/D,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;IAC3C,4CAA4C;IAC5C,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;IAC5C,8CAA8C;IAC9C,QAAQ,CAAC,SAAS,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;IAC7C,sDAAsD;IACtD,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;IAC1C,yDAAyD;IACzD,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;IAC5C,8DAA8D;IAC9D,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;IAC3C;;;OAGG;IACH,QAAQ,CAAC,gBAAgB,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;CACrD;AAED;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;CAsBF,CAAC"}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* **The line is measured, not felt.** A result strategy reads *an answer*, so a
|
|
11
11
|
* member belongs here exactly when it makes one request. Since 19.0.0 every
|
|
12
12
|
* member of `AdtUtils` that reaches ADT makes exactly one — the walks, the
|
|
13
|
-
* chains and the read-modify-writes left — so all twenty are here.
|
|
13
|
+
* chains and the read-modify-writes left — so all twenty-one are here.
|
|
14
14
|
*
|
|
15
15
|
* Three members are absent and always will be. `modifyWhereUsedScope` edits a
|
|
16
16
|
* document it was handed, `supportsSourceCode` answers from a table in this
|
|
@@ -56,4 +56,5 @@ exports.utilDocuments = {
|
|
|
56
56
|
source: resultStrategy_1.rawDocument,
|
|
57
57
|
metadata: resultStrategy_1.rawDocument,
|
|
58
58
|
include: resultStrategy_1.rawDocument,
|
|
59
|
+
objectProperties: resultStrategy_1.rawDocument,
|
|
59
60
|
};
|
|
@@ -27,7 +27,12 @@ import { AbapUnitRunner, type IAbapUnitRunnerResults } from '../abapUnitRunner';
|
|
|
27
27
|
* whose every test class runs.
|
|
28
28
|
*/
|
|
29
29
|
export type IClassTestRunTarget = IClassUnitTestDefinition[] | string;
|
|
30
|
-
/**
|
|
30
|
+
/** The distinct containers a target names: what `/testruns` addresses. */
|
|
31
|
+
export declare function containersOf(target: IClassTestRunTarget): string[];
|
|
32
|
+
/**
|
|
33
|
+
* One strategy per distinct answer: starting a run, polling it, its result.
|
|
34
|
+
* `runSync` answers the result document itself, so it is read by `result`.
|
|
35
|
+
*/
|
|
31
36
|
export type IClassTestRunnerResults = IAbapUnitRunnerResults;
|
|
32
37
|
/** The shipped default: documents as they arrived. */
|
|
33
38
|
export declare const classTestRunnerDocuments: {
|
|
@@ -49,5 +54,26 @@ export declare class ClassTestRunner<R extends IClassTestRunnerResults = typeof
|
|
|
49
54
|
* read as a failure.
|
|
50
55
|
*/
|
|
51
56
|
run<E extends IAdtError = IAdtError>(target: IClassTestRunTarget, options?: IClassUnitTestRunOptions & IAdtAnalyseOptions<E>): Promise<IAdtResponse<ReturnType<R['run']>, E>>;
|
|
57
|
+
/**
|
|
58
|
+
* Run the tests and answer the finished result. One POST, to
|
|
59
|
+
* `/sap/bc/adt/abapunit/testruns` — the synchronous runner, beside the
|
|
60
|
+
* asynchronous `run` + `getStatus` + `getResult`, which stays the default.
|
|
61
|
+
*
|
|
62
|
+
* An explicit choice of the caller's: nothing here asks the system which
|
|
63
|
+
* runner it has. A system without `/abapunit/runs` (an on-prem S/4HANA 2023
|
|
64
|
+
* was measured with `/testruns` alone) needs this one; whether a system has
|
|
65
|
+
* it is in its discovery, which is the caller's to read.
|
|
66
|
+
*
|
|
67
|
+
* The answer is the `aunit:runResult` document, so it is read by this
|
|
68
|
+
* runner's `result` strategy — the one `getResult` uses — and a failing test
|
|
69
|
+
* is in it as an `alert`; whether that is a failure is `options.analyse`'s
|
|
70
|
+
* (`analyseUnitTest` from @mcp-abap-adt/adt-strategies reads it so).
|
|
71
|
+
*
|
|
72
|
+
* Differences from `run`: the endpoint addresses whole classes, so a target
|
|
73
|
+
* of test definitions runs each distinct container whole, and `title` and
|
|
74
|
+
* `context` are not sent; scope, risk levels and durations are, with the
|
|
75
|
+
* same defaults.
|
|
76
|
+
*/
|
|
77
|
+
runSync<E extends IAdtError = IAdtError>(target: IClassTestRunTarget, options?: IClassUnitTestRunOptions & IAdtAnalyseOptions<E>): Promise<IAdtResponse<ReturnType<R['result']>, E>>;
|
|
52
78
|
}
|
|
53
79
|
//# sourceMappingURL=ClassTestRunner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClassTestRunner.d.ts","sourceRoot":"","sources":["../../../src/executors/class/ClassTestRunner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EACV,kBAAkB,EAClB,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,wBAAwB,EACxB,wBAAwB,EACxB,eAAe,EAChB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAC/E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"ClassTestRunner.d.ts","sourceRoot":"","sources":["../../../src/executors/class/ClassT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;;OAmBG;IACG,OAAO,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,EAC3C,MAAM,EAAE,mBAAmB,EAC3B,OAAO,CAAC,EAAE,wBAAwB,GAAG,kBAAkB,CAAC,CAAC,CAAC,GACzD,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CAarD"}
|
|
@@ -21,9 +21,16 @@
|
|
|
21
21
|
*/
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
23
|
exports.ClassTestRunner = exports.classTestRunnerDocuments = void 0;
|
|
24
|
+
exports.containersOf = containersOf;
|
|
24
25
|
const run_1 = require("../../core/class/run");
|
|
25
26
|
const adtResponse_1 = require("../../utils/adtResponse");
|
|
26
27
|
const abapUnitRunner_1 = require("../abapUnitRunner");
|
|
28
|
+
/** The distinct containers a target names: what `/testruns` addresses. */
|
|
29
|
+
function containersOf(target) {
|
|
30
|
+
return typeof target === 'string'
|
|
31
|
+
? [target]
|
|
32
|
+
: [...new Set(target.map((test) => test.containerClass))];
|
|
33
|
+
}
|
|
27
34
|
/** The shipped default: documents as they arrived. */
|
|
28
35
|
exports.classTestRunnerDocuments = abapUnitRunner_1.abapUnitRunnerDocuments;
|
|
29
36
|
class ClassTestRunner extends abapUnitRunner_1.AbapUnitRunner {
|
|
@@ -49,5 +56,29 @@ class ClassTestRunner extends abapUnitRunner_1.AbapUnitRunner {
|
|
|
49
56
|
}
|
|
50
57
|
return (0, adtResponse_1.answering)(() => (0, run_1.startClassUnitTestRun)(this.connection, target, options), this.results.run, options?.analyse);
|
|
51
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* Run the tests and answer the finished result. One POST, to
|
|
61
|
+
* `/sap/bc/adt/abapunit/testruns` — the synchronous runner, beside the
|
|
62
|
+
* asynchronous `run` + `getStatus` + `getResult`, which stays the default.
|
|
63
|
+
*
|
|
64
|
+
* An explicit choice of the caller's: nothing here asks the system which
|
|
65
|
+
* runner it has. A system without `/abapunit/runs` (an on-prem S/4HANA 2023
|
|
66
|
+
* was measured with `/testruns` alone) needs this one; whether a system has
|
|
67
|
+
* it is in its discovery, which is the caller's to read.
|
|
68
|
+
*
|
|
69
|
+
* The answer is the `aunit:runResult` document, so it is read by this
|
|
70
|
+
* runner's `result` strategy — the one `getResult` uses — and a failing test
|
|
71
|
+
* is in it as an `alert`; whether that is a failure is `options.analyse`'s
|
|
72
|
+
* (`analyseUnitTest` from @mcp-abap-adt/adt-strategies reads it so).
|
|
73
|
+
*
|
|
74
|
+
* Differences from `run`: the endpoint addresses whole classes, so a target
|
|
75
|
+
* of test definitions runs each distinct container whole, and `title` and
|
|
76
|
+
* `context` are not sent; scope, risk levels and durations are, with the
|
|
77
|
+
* same defaults.
|
|
78
|
+
*/
|
|
79
|
+
async runSync(target, options) {
|
|
80
|
+
const { analyse, ...runOptions } = options ?? {};
|
|
81
|
+
return (0, adtResponse_1.answering)(() => (0, run_1.startClassUnitTestRunSync)(this.connection, containersOf(target), runOptions), this.results.result, analyse);
|
|
82
|
+
}
|
|
52
83
|
}
|
|
53
84
|
exports.ClassTestRunner = ClassTestRunner;
|
|
@@ -21,6 +21,12 @@ export declare class ClassTestRunnerLegacy<R extends IClassTestRunnerResults = t
|
|
|
21
21
|
* result document itself, not an id.
|
|
22
22
|
*/
|
|
23
23
|
run<E extends IAdtError = IAdtError>(target: IClassTestRunTarget, options?: IClassUnitTestRunOptions & IAdtAnalyseOptions<E>): Promise<IAdtResponse<ReturnType<R['run']>, E>>;
|
|
24
|
+
/**
|
|
25
|
+
* The same request as `run` — on a legacy system `run` is already the
|
|
26
|
+
* synchronous one — answered through the `result` strategy, as the regular
|
|
27
|
+
* runner's `runSync` is.
|
|
28
|
+
*/
|
|
29
|
+
runSync<E extends IAdtError = IAdtError>(target: IClassTestRunTarget, options?: IClassUnitTestRunOptions & IAdtAnalyseOptions<E>): Promise<IAdtResponse<ReturnType<R['result']>, E>>;
|
|
24
30
|
/**
|
|
25
31
|
* Refused without a request: a legacy system finishes a run before it
|
|
26
32
|
* answers and exposes no run to poll. `run`'s own answer is the result.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClassTestRunnerLegacy.d.ts","sourceRoot":"","sources":["../../../src/executors/class/ClassTestRunnerLegacy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EACV,kBAAkB,EAClB,SAAS,EACT,YAAY,EACZ,wBAAwB,EAEzB,MAAM,8BAA8B,CAAC;AAItC,OAAO,EACL,eAAe,EACf,KAAK,wBAAwB,
|
|
1
|
+
{"version":3,"file":"ClassTestRunnerLegacy.d.ts","sourceRoot":"","sources":["../../../src/executors/class/ClassTestRunnerLegacy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EACV,kBAAkB,EAClB,SAAS,EACT,YAAY,EACZ,wBAAwB,EAEzB,MAAM,8BAA8B,CAAC;AAItC,OAAO,EACL,eAAe,EACf,KAAK,wBAAwB,EAE7B,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACzB,MAAM,mBAAmB,CAAC;AAE3B,qBAAa,qBAAqB,CAChC,CAAC,SAAS,uBAAuB,GAAG,OAAO,wBAAwB,CACnE,SAAQ,eAAe,CAAC,CAAC,CAAC;IAC1B;;;;;OAKG;IACY,GAAG,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,EAChD,MAAM,EAAE,mBAAmB,EAC3B,OAAO,CAAC,EAAE,wBAAwB,GAAG,kBAAkB,CAAC,CAAC,CAAC,GACzD,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAUjD;;;;OAIG;IACY,OAAO,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,EACpD,MAAM,EAAE,mBAAmB,EAC3B,OAAO,CAAC,EAAE,wBAAwB,GAAG,kBAAkB,CAAC,CAAC,CAAC,GACzD,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAQpD;;;OAGG;IACY,SAAS,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,KAAK,OAAO,CAClE,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CACzC;IASD,0EAA0E;IAC3D,SAAS,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,KAAK,OAAO,CAClE,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CACzC;CAQF"}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.ClassTestRunnerLegacy = void 0;
|
|
17
17
|
const interfaces_adt_1 = require("@mcp-abap-adt/interfaces-adt");
|
|
18
|
-
const
|
|
18
|
+
const run_1 = require("../../core/class/run");
|
|
19
19
|
const adtResponse_1 = require("../../utils/adtResponse");
|
|
20
20
|
const ClassTestRunner_1 = require("./ClassTestRunner");
|
|
21
21
|
class ClassTestRunnerLegacy extends ClassTestRunner_1.ClassTestRunner {
|
|
@@ -26,10 +26,17 @@ class ClassTestRunnerLegacy extends ClassTestRunner_1.ClassTestRunner {
|
|
|
26
26
|
* result document itself, not an id.
|
|
27
27
|
*/
|
|
28
28
|
async run(target, options) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
// No options: the body a legacy system has always been sent — the
|
|
30
|
+
// `<options>` element `runSync` sends is unmeasured there.
|
|
31
|
+
return (0, adtResponse_1.answering)(() => (0, run_1.startClassUnitTestRunSync)(this.connection, (0, ClassTestRunner_1.containersOf)(target)), this.results.run, options?.analyse);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* The same request as `run` — on a legacy system `run` is already the
|
|
35
|
+
* synchronous one — answered through the `result` strategy, as the regular
|
|
36
|
+
* runner's `runSync` is.
|
|
37
|
+
*/
|
|
38
|
+
async runSync(target, options) {
|
|
39
|
+
return (0, adtResponse_1.answering)(() => (0, run_1.startClassUnitTestRunSync)(this.connection, (0, ClassTestRunner_1.containersOf)(target)), this.results.result, options?.analyse);
|
|
33
40
|
}
|
|
34
41
|
/**
|
|
35
42
|
* Refused without a request: a legacy system finishes a run before it
|
|
@@ -1,19 +1,51 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Shared system information utilities
|
|
3
3
|
*/
|
|
4
|
-
import type { IAdtContentTypes } from '@mcp-abap-adt/interfaces-adt';
|
|
4
|
+
import type { IAdtAnalyseOptions, IAdtContentTypes, IAdtError, IAdtResponse } from '@mcp-abap-adt/interfaces-adt';
|
|
5
5
|
import type { IAbapConnection } from '@mcp-abap-adt/interfaces-adt-connection';
|
|
6
|
-
/**
|
|
7
|
-
|
|
8
|
-
* Returns systemID and userName if available
|
|
9
|
-
*/
|
|
10
|
-
export declare function getSystemInformation(connection: IAbapConnection): Promise<{
|
|
6
|
+
/** The record `systeminformation` answers, each field read only as a string. */
|
|
7
|
+
type SystemInformationRecord = {
|
|
11
8
|
systemID?: string;
|
|
12
9
|
userName?: string;
|
|
13
10
|
client?: string;
|
|
14
11
|
language?: string;
|
|
15
12
|
userFullName?: string;
|
|
16
|
-
}
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* The system's own record, from `/sap/bc/adt/core/http/systeminformation`.
|
|
16
|
+
*
|
|
17
|
+
* Three answers, kept apart, because a caller acts differently on each:
|
|
18
|
+
*
|
|
19
|
+
* - **present** — a `2xx` whose body is a JSON object: `{ present: true, info }`,
|
|
20
|
+
* each field read only when it is a string;
|
|
21
|
+
* - **absent** — a `404`: the system has no such endpoint (an on-premise
|
|
22
|
+
* system without it), `{ present: false }`. Only a `404`: it is what
|
|
23
|
+
* the MCP server's own `systeminformation` reader takes as the endpoint
|
|
24
|
+
* absent on premise, and no other status has been seen for it. A `405` or `501` is a failure like
|
|
25
|
+
* any other status;
|
|
26
|
+
* - **a failure** — any other status, no answer at all, or a `2xx` whose body
|
|
27
|
+
* is no JSON object (a logon page a proxy answered with, an empty body):
|
|
28
|
+
* `ok: false`, with the response and the request. A malformed `2xx` is
|
|
29
|
+
* `origin: 'connection'` — no usable answer came back.
|
|
30
|
+
*
|
|
31
|
+
* The verdict goes through `options.analyse` like any member's: it receives
|
|
32
|
+
* the library's verdict (`ADT_NO_FAILURE` for a `404` and for a readable
|
|
33
|
+
* `2xx`) and the response. It may name a failure — a `404` on a system that
|
|
34
|
+
* must have the endpoint — or clear one: a cleared `2xx` is a record naming
|
|
35
|
+
* nothing, a cleared other status is the endpoint absent (a `405`/`501` read
|
|
36
|
+
* as absent, as 23.0.0–36.x did), and a failure with no response cannot be
|
|
37
|
+
* cleared. A connection that hands back a status other than a `2xx` instead
|
|
38
|
+
* of throwing it is read by that status the same way.
|
|
39
|
+
*
|
|
40
|
+
* A credential refusal SAP was never asked about is thrown as it came, as by
|
|
41
|
+
* every member.
|
|
42
|
+
*/
|
|
43
|
+
export declare function getSystemInformation<E extends IAdtError = IAdtError>(connection: IAbapConnection, options?: IAdtAnalyseOptions<E>): Promise<IAdtResponse<{
|
|
44
|
+
present: true;
|
|
45
|
+
info: SystemInformationRecord;
|
|
46
|
+
} | {
|
|
47
|
+
present: false;
|
|
48
|
+
}, E>>;
|
|
17
49
|
/**
|
|
18
50
|
* Check if the system is a BTP ABAP Cloud Environment
|
|
19
51
|
*
|
|
@@ -38,4 +70,5 @@ export declare function isModernAdtSystem(connection: IAbapConnection): Promise<
|
|
|
38
70
|
* - Not available → AdtContentTypesBase (v1 headers, universal)
|
|
39
71
|
*/
|
|
40
72
|
export declare function resolveContentTypes(connection: IAbapConnection): Promise<IAdtContentTypes>;
|
|
73
|
+
export {};
|
|
41
74
|
//# sourceMappingURL=systemInfo.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"systemInfo.d.ts","sourceRoot":"","sources":["../../src/utils/systemInfo.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"systemInfo.d.ts","sourceRoot":"","sources":["../../src/utils/systemInfo.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAEV,kBAAkB,EAClB,gBAAgB,EAChB,SAAS,EACT,YAAY,EACb,MAAM,8BAA8B,CAAC;AAEtC,OAAO,KAAK,EACV,eAAe,EAEhB,MAAM,yCAAyC,CAAC;AA6BjD,gFAAgF;AAChF,KAAK,uBAAuB,GAAG;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAoCF;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAsB,oBAAoB,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,EACxE,UAAU,EAAE,eAAe,EAC3B,OAAO,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAC9B,OAAO,CACR,YAAY,CACV;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,uBAAuB,CAAA;CAAE,GAAG;IAAE,OAAO,EAAE,KAAK,CAAA;CAAE,EACrE,CAAC,CACF,CACF,CAsEA;AAED;;;;;;;GAOG;AACH,wBAAsB,kBAAkB,CACtC,UAAU,EAAE,eAAe,GAC1B,OAAO,CAAC,OAAO,CAAC,CA+BlB;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CACrC,UAAU,EAAE,eAAe,GAC1B,OAAO,CAAC,OAAO,CAAC,CAmBlB;AAED;;;;;;GAMG;AACH,wBAAsB,mBAAmB,CACvC,UAAU,EAAE,eAAe,GAC1B,OAAO,CAAC,gBAAgB,CAAC,CAG3B"}
|