@mcp-abap-adt/adt-clients 43.0.1 → 44.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 +5 -4
- package/dist/batch/AdtBatchConnection.d.ts +1 -1
- package/dist/batch/AdtBatchConnection.d.ts.map +1 -1
- package/dist/core/shared/AdtUtils.d.ts +37 -0
- package/dist/core/shared/AdtUtils.d.ts.map +1 -1
- package/dist/core/shared/AdtUtils.js +40 -0
- package/dist/core/shared/elementInfo.d.ts +42 -0
- package/dist/core/shared/elementInfo.d.ts.map +1 -0
- package/dist/core/shared/elementInfo.js +56 -0
- package/dist/endpoints/objects.d.ts +12 -0
- package/dist/endpoints/objects.d.ts.map +1 -1
- package/dist/endpoints/objects.js +6 -0
- package/docs/usage/CLIENT_API_REFERENCE.md +42 -0
- package/docs/usage/MIGRATION-44.md +72 -0
- package/docs/usage/RFC_CONNECTION.md +28 -13
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -157,7 +157,7 @@ This package interacts with external packages **ONLY through interfaces**:
|
|
|
157
157
|
| package | what this package takes from it |
|
|
158
158
|
|---|---|
|
|
159
159
|
| [`@mcp-abap-adt/interfaces-adt`](https://www.npmjs.com/package/@mcp-abap-adt/interfaces-adt) `^26.0.0` | the ADT type tables (`ADT_TYPES_ONPREM`, `ADT_TYPES_CLOUD`, `ADT_TYPES_BASIS_740`) and their code types (`AdtTypeCode`, …), the ABAP Unit run registry (`ABAP_UNIT_RUN_TYPES`, `AbapUnitRunObjectType`, `AbapUnitRunTarget`), the capability atoms, every object's config, the result-set contracts, `IAdtAnsweredObject`, `IAdtResponse`, `IAnalyse`, `IAdtAnalyseOptions`, `IAdtHeaders`, `IResultStrategy`, `ADT_NO_FAILURE`, `ADT_TASK_TYPE` |
|
|
160
|
-
| [`@mcp-abap-adt/interfaces-adt-connection`](https://www.npmjs.com/package/@mcp-abap-adt/interfaces-adt-connection) `^
|
|
160
|
+
| [`@mcp-abap-adt/interfaces-adt-connection`](https://www.npmjs.com/package/@mcp-abap-adt/interfaces-adt-connection) `^4.0.0` | `IAbapConnection`, `IAdtWireResponse`, `IAbapRequestOptions`, the connection capability atoms, `ADT_SESSION_ERROR` |
|
|
161
161
|
| [`@mcp-abap-adt/interfaces-network`](https://www.npmjs.com/package/@mcp-abap-adt/interfaces-network) `^2.0.1` | `IWebSocketTransport` and its four companions, `HttpError` |
|
|
162
162
|
| [`@mcp-abap-adt/interfaces-utils`](https://www.npmjs.com/package/@mcp-abap-adt/interfaces-utils) `^1.1.1` | `ILogger`, `LogLevel`, `XmlNode` |
|
|
163
163
|
| [`@mcp-abap-adt/interfaces-auth`](https://www.npmjs.com/package/@mcp-abap-adt/interfaces-auth) `^7.5.0` — **dev only** | `IAuthProvider`, for the test helpers that open a session |
|
|
@@ -891,12 +891,12 @@ npm run discovery:markdown -- --env /path/to/.env
|
|
|
891
891
|
|
|
892
892
|
**Environment Variables:**
|
|
893
893
|
The script uses the same environment variables as the main package:
|
|
894
|
-
- `SAP_URL` - SAP system URL (required)
|
|
894
|
+
- `SAP_URL` - SAP system URL (required over HTTP). The wire is the test configuration's required `environment.connection_type` (`"http"` or `"rfc"`, never guessed). Over RFC there is no URL: the address is stated instead — `SAP_ASHOST` and `SAP_SYSNR`, or `SAP_MSHOST` with `SAP_MSSERV` and/or `SAP_SYSID` and `SAP_GROUP` — with `SAP_LANGUAGE`, and `SAP_SAPROUTER` when needed; a `SAP_URL` beside it is refused
|
|
895
895
|
- `SAP_AUTH_TYPE` - Authentication type: `'basic'`, `'jwt'` or `'xsuaa'` (required: a missing or other value is refused, naming the key)
|
|
896
896
|
- `SAP_USERNAME` - Username for basic auth
|
|
897
897
|
- `SAP_PASSWORD` - Password for basic auth
|
|
898
898
|
- `SAP_JWT_TOKEN` - JWT token for JWT auth
|
|
899
|
-
- `SAP_CLIENT` - Client number (optional)
|
|
899
|
+
- `SAP_CLIENT` - Client number (optional over HTTP, required over RFC)
|
|
900
900
|
|
|
901
901
|
**When to use:**
|
|
902
902
|
- To explore available ADT API endpoints on your SAP system
|
|
@@ -1420,7 +1420,7 @@ everything else is not.
|
|
|
1420
1420
|
|
|
1421
1421
|
### Single Definition Site: the contract packages
|
|
1422
1422
|
|
|
1423
|
-
Since **7.5.0**, every contract type is **defined once**, in the contract packages — today `@mcp-abap-adt/interfaces-adt` (`^26.0.0`) for the ADT contracts and `@mcp-abap-adt/interfaces-adt-connection` (`^
|
|
1423
|
+
Since **7.5.0**, every contract type is **defined once**, in the contract packages — today `@mcp-abap-adt/interfaces-adt` (`^26.0.0`) for the ADT contracts and `@mcp-abap-adt/interfaces-adt-connection` (`^4.0.0`) for the connection. This package declares no copies of its own — every `IXxxConfig`, the capability atoms, the result-set contracts a factory accepts (`IClassResults`, …, since 38.0.0), the option and response types and the cross-cutting shared types all live there.
|
|
1424
1424
|
|
|
1425
1425
|
**Import them from the package that owns them:**
|
|
1426
1426
|
|
|
@@ -1641,6 +1641,7 @@ See [Architecture Documentation](docs/architecture/ARCHITECTURE.md#type-system-a
|
|
|
1641
1641
|
One document per breaking release, each written for a consumer on the contract
|
|
1642
1642
|
before it:
|
|
1643
1643
|
|
|
1644
|
+
- **[43.x → 44.0.0](docs/usage/MIGRATION-44.md)** — `@mcp-abap-adt/interfaces-adt-connection` 4: `getBaseUrl()` answers `Promise<string | undefined>` (`undefined` over RFC), `AdtBatchConnection` hands it on and `isCloudEnvironment` asks `systeminformation` without a URL; adt-strategies 0.21.0 and adt-clients-legacy 0.8.0 declare the same range. The test configuration states `environment.connection_type` (required, `"http"` or `"rfc"`); over RFC it states `SAP_ASHOST` + `SAP_SYSNR` (or the message-server keys), `SAP_CLIENT` and `SAP_LANGUAGE`, and no `SAP_URL`.
|
|
1644
1645
|
- **[42.x → 43.0.0](docs/usage/MIGRATION-43.md)** — a create invents no language: given one, it writes `adtcore:language` / `adtcore:masterLanguage` and sends `sap-language`, one value, from the config else the system context; given none, neither (no `EN` default); `AdtFunctionModule.validate` requires `description`; class create takes no `abstract` and program create no program type (SAP ignores both on create); a run id of `.` or `..` is refused before anything is sent.
|
|
1645
1646
|
- **[41.x → 42.0.0](docs/usage/MIGRATION-42.md)** — `create` of every handler whose request needs a package, and `validate` of `AdtProgram` / `AdtInclude`, take `packageName: string`, required, in the config type (SAP creates nothing without a package; program validation refuses an empty one); any other `validate` without a package sends `packagename` empty, never `undefined`; a call that passes a package sends the same request.
|
|
1646
1647
|
- **[40.x → 41.0.0](docs/usage/MIGRATION-41.md)** — every handler class is generic over the values its result slots answer (`AdtClass<ResultValuesOf<typeof classDocuments>>`), not over the strategies (`AdtClass<typeof classDocuments>`); code that names a class's type parameter wraps it in `ResultValuesOf<…>`, and `getX()` / `getX(results)` calls and every request are unchanged.
|
|
@@ -16,7 +16,7 @@ export declare class AdtBatchConnection implements IAbapConnection {
|
|
|
16
16
|
});
|
|
17
17
|
private wrappedSession;
|
|
18
18
|
connect(): Promise<void>;
|
|
19
|
-
getBaseUrl(): Promise<string>;
|
|
19
|
+
getBaseUrl(): Promise<string | undefined>;
|
|
20
20
|
getSessionId(): string | null;
|
|
21
21
|
setSessionType(type: Session): void;
|
|
22
22
|
getSessionType(): Session;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdtBatchConnection.d.ts","sourceRoot":"","sources":["../../src/batch/AdtBatchConnection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EACjB,MAAM,yCAAyC,CAAC;AACjD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAM9D,KAAK,OAAO,GAAG,UAAU,GAAG,WAAW,CAAC;AAQxC,sFAAsF;AACtF,qBAAa,kBAAmB,YAAW,eAAe;IAOtD,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,OAAO;IAP1B,OAAO,CAAC,KAAK,CAAiB;IAC9B,OAAO,CAAC,OAAO,CAAU;IACzB,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G7B,cAAc,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI;IAGnC,cAAc,IAAI,OAAO;IAGzB,cAAc,CAAC,CAAC,GAAG,OAAO,EAAE,CAAC,GAAG,OAAO,EACrC,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAuBlC,OAAO,CAAC,WAAW;IAkBnB,6EAA6E;IACvE,OAAO,IAAI,OAAO,CAAC,gBAAgB,CAAC;CAiH3C"}
|
|
@@ -434,6 +434,43 @@ export declare class AdtUtils<T extends UtilValues = ResultValuesOf<typeof utilD
|
|
|
434
434
|
version?: AdtReadVersion;
|
|
435
435
|
accept?: string;
|
|
436
436
|
} & IAdtAnalyseOptions<E>): Promise<IAdtResponse<string, E>>;
|
|
437
|
+
/**
|
|
438
|
+
* A structure's element info — `GET /sap/bc/adt/ddic/elementinfo?path=`,
|
|
439
|
+
* one request: every component in order, each include and append as an
|
|
440
|
+
* `.include` / `.append` element naming the included structure
|
|
441
|
+
* (`ddicIncludeName`) and its URI, every field with its data element, type
|
|
442
|
+
* and length and, inside an include, the include it is part of and its
|
|
443
|
+
* level. Measured on premise and on ABAP cloud.
|
|
444
|
+
* `@mcp-abap-adt/adt-strategies`' `readStructureElementInfo` reads it.
|
|
445
|
+
*
|
|
446
|
+
* **The document as it came, always**, as for `getObjectOutline`:
|
|
447
|
+
* `IUtilResults` of interfaces-adt has no slot for this member. A name
|
|
448
|
+
* that does not exist answers `200` with an element info naming nothing.
|
|
449
|
+
*
|
|
450
|
+
* @param options.accept - The Accept to send; SAP answers only
|
|
451
|
+
* `application/vnd.sap.adt.elementinfo+xml`, the default
|
|
452
|
+
*/
|
|
453
|
+
getStructureElementInfo<E extends IAdtError = IAdtError>(structureName: string, options?: {
|
|
454
|
+
accept?: string;
|
|
455
|
+
} & IAdtAnalyseOptions<E>): Promise<IAdtResponse<string, E>>;
|
|
456
|
+
/**
|
|
457
|
+
* A service definition's element info —
|
|
458
|
+
* `GET /sap/bc/adt/ddic/srvd/elementinfo?path=`, one request: its exposed
|
|
459
|
+
* entities, each with its name, its DDL source URI and its alias (absent
|
|
460
|
+
* when the `expose` has no `as`), those of its extensions included, and a
|
|
461
|
+
* link to each extension. Measured on premise and on ABAP cloud.
|
|
462
|
+
* `@mcp-abap-adt/adt-strategies`' `readServiceDefinitionElementInfo` reads
|
|
463
|
+
* it.
|
|
464
|
+
*
|
|
465
|
+
* **The document as it came, always**, as for `getObjectOutline`. A name
|
|
466
|
+
* that does not exist answers `200` with an element info naming nothing.
|
|
467
|
+
*
|
|
468
|
+
* @param options.accept - The Accept to send; SAP answers only
|
|
469
|
+
* `application/vnd.sap.adt.elementinfo+xml`, the default
|
|
470
|
+
*/
|
|
471
|
+
getServiceDefinitionElementInfo<E extends IAdtError = IAdtError>(serviceDefinitionName: string, options?: {
|
|
472
|
+
accept?: string;
|
|
473
|
+
} & IAdtAnalyseOptions<E>): Promise<IAdtResponse<string, E>>;
|
|
437
474
|
/**
|
|
438
475
|
* The properties of one repository object —
|
|
439
476
|
* `/repository/informationsystem/objectproperties/values?uri={objectUri}`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdtUtils.d.ts","sourceRoot":"","sources":["../../../src/core/shared/AdtUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgFG;AAEH,OAAO,KAAK,EAEV,UAAU,EACV,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,aAAa,EACb,SAAS,EACT,kBAAkB,EAClB,WAAW,EACX,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,EACpB,uBAAuB,EACvB,YAAY,EACZ,yBAAyB,EACzB,iBAAiB,EACjB,kBAAkB,EAElB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C9B,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC;IAQzC;;;;;;;;;;;;;;;OAeG;IACG,WAAW,CAAC,CAAC,SAAS,SAAS,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,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC;IAQvC;;;;;;;;;;;;;;;;;OAiBG;IACG,gBAAgB,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,EACpD,OAAO,EAAE;QAAE,OAAO,EAAE,WAAW,CAAA;KAAE,GAAG,kBAAkB,CAAC,CAAC,CAAC,GACxD,OAAO,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;CAOpC"}
|
|
@@ -7,6 +7,7 @@ const requestTrace_1 = require("../../utils/requestTrace");
|
|
|
7
7
|
const resultStrategy_1 = require("../../utils/resultStrategy");
|
|
8
8
|
const allTypes_1 = require("./allTypes");
|
|
9
9
|
const discovery_1 = require("./discovery");
|
|
10
|
+
const elementInfo_1 = require("./elementInfo");
|
|
10
11
|
const getInactiveObjects_1 = require("./getInactiveObjects");
|
|
11
12
|
const groupActivation_1 = require("./groupActivation");
|
|
12
13
|
const groupDeletion_1 = require("./groupDeletion");
|
|
@@ -496,6 +497,45 @@ class AdtUtils {
|
|
|
496
497
|
accept: options?.accept,
|
|
497
498
|
}), resultStrategy_1.rawDocument, options?.analyse);
|
|
498
499
|
}
|
|
500
|
+
/**
|
|
501
|
+
* A structure's element info — `GET /sap/bc/adt/ddic/elementinfo?path=`,
|
|
502
|
+
* one request: every component in order, each include and append as an
|
|
503
|
+
* `.include` / `.append` element naming the included structure
|
|
504
|
+
* (`ddicIncludeName`) and its URI, every field with its data element, type
|
|
505
|
+
* and length and, inside an include, the include it is part of and its
|
|
506
|
+
* level. Measured on premise and on ABAP cloud.
|
|
507
|
+
* `@mcp-abap-adt/adt-strategies`' `readStructureElementInfo` reads it.
|
|
508
|
+
*
|
|
509
|
+
* **The document as it came, always**, as for `getObjectOutline`:
|
|
510
|
+
* `IUtilResults` of interfaces-adt has no slot for this member. A name
|
|
511
|
+
* that does not exist answers `200` with an element info naming nothing.
|
|
512
|
+
*
|
|
513
|
+
* @param options.accept - The Accept to send; SAP answers only
|
|
514
|
+
* `application/vnd.sap.adt.elementinfo+xml`, the default
|
|
515
|
+
*/
|
|
516
|
+
async getStructureElementInfo(structureName, options) {
|
|
517
|
+
return (0, adtResponse_1.answering)(() => (0, elementInfo_1.getStructureElementInfo)(this.connection, structureName, {
|
|
518
|
+
accept: options?.accept,
|
|
519
|
+
}), resultStrategy_1.rawDocument, options?.analyse);
|
|
520
|
+
}
|
|
521
|
+
/**
|
|
522
|
+
* A service definition's element info —
|
|
523
|
+
* `GET /sap/bc/adt/ddic/srvd/elementinfo?path=`, one request: its exposed
|
|
524
|
+
* entities, each with its name, its DDL source URI and its alias (absent
|
|
525
|
+
* when the `expose` has no `as`), those of its extensions included, and a
|
|
526
|
+
* link to each extension. Measured on premise and on ABAP cloud.
|
|
527
|
+
* `@mcp-abap-adt/adt-strategies`' `readServiceDefinitionElementInfo` reads
|
|
528
|
+
* it.
|
|
529
|
+
*
|
|
530
|
+
* **The document as it came, always**, as for `getObjectOutline`. A name
|
|
531
|
+
* that does not exist answers `200` with an element info naming nothing.
|
|
532
|
+
*
|
|
533
|
+
* @param options.accept - The Accept to send; SAP answers only
|
|
534
|
+
* `application/vnd.sap.adt.elementinfo+xml`, the default
|
|
535
|
+
*/
|
|
536
|
+
async getServiceDefinitionElementInfo(serviceDefinitionName, options) {
|
|
537
|
+
return (0, adtResponse_1.answering)(() => (0, elementInfo_1.getServiceDefinitionElementInfo)(this.connection, serviceDefinitionName, { accept: options?.accept }), resultStrategy_1.rawDocument, options?.analyse);
|
|
538
|
+
}
|
|
499
539
|
/**
|
|
500
540
|
* The properties of one repository object —
|
|
501
541
|
* `/repository/informationsystem/objectproperties/values?uri={objectUri}`.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Element info of a structure and of a service definition — what Eclipse
|
|
3
|
+
* shows on a hover over a name in DDIC source.
|
|
4
|
+
*
|
|
5
|
+
* Measured on premise and on ABAP cloud (2026-11-05), the same answers byte
|
|
6
|
+
* for byte where both systems hold the object: one `abapsource:elementInfo`
|
|
7
|
+
* for the object (`adtcore:uri`, `adtcore:type`, `adtcore:name`, its short
|
|
8
|
+
* text) with one nested `abapsource:elementInfo` per component and, last, its
|
|
9
|
+
* package (`DEVC/K`). Both endpoints answer `406` to any Accept but
|
|
10
|
+
* `application/vnd.sap.adt.elementinfo+xml`, and `200` with an element info
|
|
11
|
+
* that names no object for a name that does not exist.
|
|
12
|
+
*/
|
|
13
|
+
import type { IAbapConnection, IAdtWireResponse } from '@mcp-abap-adt/interfaces-adt-connection';
|
|
14
|
+
/** The one media type both element-info endpoints answer. */
|
|
15
|
+
export declare const ACCEPT_ELEMENT_INFO = "application/vnd.sap.adt.elementinfo+xml";
|
|
16
|
+
/**
|
|
17
|
+
* A structure's element info — `GET /sap/bc/adt/ddic/elementinfo?path=<name>`.
|
|
18
|
+
*
|
|
19
|
+
* Every component in order, flat: an include or an append is a `TABL/DS`
|
|
20
|
+
* element named `.include` or `.append` with `ddicIncludeName` and the
|
|
21
|
+
* included structure's source URI, and each field inside it carries
|
|
22
|
+
* `ddicIsPartOfInclude` and `ddicIncludeHierarchyLevel`; nested includes
|
|
23
|
+
* follow the same rule one level down. A named include (`_x : include s`)
|
|
24
|
+
* is an `.include` too: the group name is not stated.
|
|
25
|
+
*/
|
|
26
|
+
export declare function getStructureElementInfo(connection: IAbapConnection, structureName: string, options?: {
|
|
27
|
+
accept?: string;
|
|
28
|
+
}): Promise<IAdtWireResponse>;
|
|
29
|
+
/**
|
|
30
|
+
* A service definition's element info —
|
|
31
|
+
* `GET /sap/bc/adt/ddic/srvd/elementinfo?path=<name>`.
|
|
32
|
+
*
|
|
33
|
+
* One element per exposed entity, with the entity's name as its DDL source
|
|
34
|
+
* writes it, the DDL source URI and an `alias` entry when the `expose` has
|
|
35
|
+
* an `as` (none without); not in source order. Entities exposed by an
|
|
36
|
+
* extension are listed too, and the extension is linked
|
|
37
|
+
* (`rel=…/ddic/srvd/extention`, SAP's spelling).
|
|
38
|
+
*/
|
|
39
|
+
export declare function getServiceDefinitionElementInfo(connection: IAbapConnection, serviceDefinitionName: string, options?: {
|
|
40
|
+
accept?: string;
|
|
41
|
+
}): Promise<IAdtWireResponse>;
|
|
42
|
+
//# sourceMappingURL=elementInfo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"elementInfo.d.ts","sourceRoot":"","sources":["../../../src/core/shared/elementInfo.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EACjB,MAAM,yCAAyC,CAAC;AAGjD,6DAA6D;AAC7D,eAAO,MAAM,mBAAmB,4CAA4C,CAAC;AAE7E;;;;;;;;;GASG;AACH,wBAAsB,uBAAuB,CAC3C,UAAU,EAAE,eAAe,EAC3B,aAAa,EAAE,MAAM,EACrB,OAAO,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GAC5B,OAAO,CAAC,gBAAgB,CAAC,CAO3B;AAED;;;;;;;;;GASG;AACH,wBAAsB,+BAA+B,CACnD,UAAU,EAAE,eAAe,EAC3B,qBAAqB,EAAE,MAAM,EAC7B,OAAO,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GAC5B,OAAO,CAAC,gBAAgB,CAAC,CAO3B"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Element info of a structure and of a service definition — what Eclipse
|
|
4
|
+
* shows on a hover over a name in DDIC source.
|
|
5
|
+
*
|
|
6
|
+
* Measured on premise and on ABAP cloud (2026-11-05), the same answers byte
|
|
7
|
+
* for byte where both systems hold the object: one `abapsource:elementInfo`
|
|
8
|
+
* for the object (`adtcore:uri`, `adtcore:type`, `adtcore:name`, its short
|
|
9
|
+
* text) with one nested `abapsource:elementInfo` per component and, last, its
|
|
10
|
+
* package (`DEVC/K`). Both endpoints answer `406` to any Accept but
|
|
11
|
+
* `application/vnd.sap.adt.elementinfo+xml`, and `200` with an element info
|
|
12
|
+
* that names no object for a name that does not exist.
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.ACCEPT_ELEMENT_INFO = void 0;
|
|
16
|
+
exports.getStructureElementInfo = getStructureElementInfo;
|
|
17
|
+
exports.getServiceDefinitionElementInfo = getServiceDefinitionElementInfo;
|
|
18
|
+
const objects_1 = require("../../endpoints/objects");
|
|
19
|
+
/** The one media type both element-info endpoints answer. */
|
|
20
|
+
exports.ACCEPT_ELEMENT_INFO = 'application/vnd.sap.adt.elementinfo+xml';
|
|
21
|
+
/**
|
|
22
|
+
* A structure's element info — `GET /sap/bc/adt/ddic/elementinfo?path=<name>`.
|
|
23
|
+
*
|
|
24
|
+
* Every component in order, flat: an include or an append is a `TABL/DS`
|
|
25
|
+
* element named `.include` or `.append` with `ddicIncludeName` and the
|
|
26
|
+
* included structure's source URI, and each field inside it carries
|
|
27
|
+
* `ddicIsPartOfInclude` and `ddicIncludeHierarchyLevel`; nested includes
|
|
28
|
+
* follow the same rule one level down. A named include (`_x : include s`)
|
|
29
|
+
* is an `.include` too: the group name is not stated.
|
|
30
|
+
*/
|
|
31
|
+
async function getStructureElementInfo(connection, structureName, options) {
|
|
32
|
+
return connection.makeAdtRequest({
|
|
33
|
+
url: objects_1.STRUCTURE.elementInfo(structureName),
|
|
34
|
+
method: 'GET',
|
|
35
|
+
timeout: 0,
|
|
36
|
+
headers: { Accept: options?.accept ?? exports.ACCEPT_ELEMENT_INFO },
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* A service definition's element info —
|
|
41
|
+
* `GET /sap/bc/adt/ddic/srvd/elementinfo?path=<name>`.
|
|
42
|
+
*
|
|
43
|
+
* One element per exposed entity, with the entity's name as its DDL source
|
|
44
|
+
* writes it, the DDL source URI and an `alias` entry when the `expose` has
|
|
45
|
+
* an `as` (none without); not in source order. Entities exposed by an
|
|
46
|
+
* extension are listed too, and the extension is linked
|
|
47
|
+
* (`rel=…/ddic/srvd/extention`, SAP's spelling).
|
|
48
|
+
*/
|
|
49
|
+
async function getServiceDefinitionElementInfo(connection, serviceDefinitionName, options) {
|
|
50
|
+
return connection.makeAdtRequest({
|
|
51
|
+
url: objects_1.SERVICE_DEFINITION.elementInfo(serviceDefinitionName),
|
|
52
|
+
method: 'GET',
|
|
53
|
+
timeout: 0,
|
|
54
|
+
headers: { Accept: options?.accept ?? exports.ACCEPT_ELEMENT_INFO },
|
|
55
|
+
});
|
|
56
|
+
}
|
|
@@ -103,6 +103,9 @@ export declare const STRUCTURE: {
|
|
|
103
103
|
readonly collection: "/sap/bc/adt/ddic/structures";
|
|
104
104
|
readonly validation: "/sap/bc/adt/ddic/structures/validation";
|
|
105
105
|
readonly uri: (name: string) => string;
|
|
106
|
+
/** The DDIC element info: every component, includes and appends marked. */
|
|
107
|
+
readonly elementInfoCollection: "/sap/bc/adt/ddic/elementinfo";
|
|
108
|
+
readonly elementInfo: (name: string) => string;
|
|
106
109
|
};
|
|
107
110
|
export declare const DOMAIN: {
|
|
108
111
|
readonly collection: "/sap/bc/adt/ddic/domains";
|
|
@@ -128,6 +131,9 @@ export declare const SERVICE_DEFINITION: {
|
|
|
128
131
|
readonly collection: "/sap/bc/adt/ddic/srvd/sources";
|
|
129
132
|
readonly validation: "/sap/bc/adt/ddic/srvd/sources/validation";
|
|
130
133
|
readonly uri: (name: string) => string;
|
|
134
|
+
/** The service definition's element info: its exposed entities. */
|
|
135
|
+
readonly elementInfoCollection: "/sap/bc/adt/ddic/srvd/elementinfo";
|
|
136
|
+
readonly elementInfo: (name: string) => string;
|
|
131
137
|
};
|
|
132
138
|
export declare const SERVICE_BINDING: {
|
|
133
139
|
/**
|
|
@@ -289,6 +295,9 @@ export declare const RECORDS: {
|
|
|
289
295
|
readonly collection: "/sap/bc/adt/ddic/structures";
|
|
290
296
|
readonly validation: "/sap/bc/adt/ddic/structures/validation";
|
|
291
297
|
readonly uri: (name: string) => string;
|
|
298
|
+
/** The DDIC element info: every component, includes and appends marked. */
|
|
299
|
+
readonly elementInfoCollection: "/sap/bc/adt/ddic/elementinfo";
|
|
300
|
+
readonly elementInfo: (name: string) => string;
|
|
292
301
|
};
|
|
293
302
|
readonly DOMAIN: {
|
|
294
303
|
readonly collection: "/sap/bc/adt/ddic/domains";
|
|
@@ -314,6 +323,9 @@ export declare const RECORDS: {
|
|
|
314
323
|
readonly collection: "/sap/bc/adt/ddic/srvd/sources";
|
|
315
324
|
readonly validation: "/sap/bc/adt/ddic/srvd/sources/validation";
|
|
316
325
|
readonly uri: (name: string) => string;
|
|
326
|
+
/** The service definition's element info: its exposed entities. */
|
|
327
|
+
readonly elementInfoCollection: "/sap/bc/adt/ddic/srvd/elementinfo";
|
|
328
|
+
readonly elementInfo: (name: string) => string;
|
|
317
329
|
};
|
|
318
330
|
readonly SERVICE_BINDING: {
|
|
319
331
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"objects.d.ts","sourceRoot":"","sources":["../../src/endpoints/objects.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAEpE;;;;;GAKG;AACH,wBAAgB,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAExC;AAED,eAAO,MAAM,SAAS,GAAI,WAAW,MAAM,KAAG,MA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
|
|
@@ -109,6 +109,9 @@ exports.STRUCTURE = {
|
|
|
109
109
|
collection: '/sap/bc/adt/ddic/structures',
|
|
110
110
|
validation: '/sap/bc/adt/ddic/structures/validation',
|
|
111
111
|
uri: (name) => `/sap/bc/adt/ddic/structures/${seg(name)}`,
|
|
112
|
+
/** The DDIC element info: every component, includes and appends marked. */
|
|
113
|
+
elementInfoCollection: '/sap/bc/adt/ddic/elementinfo',
|
|
114
|
+
elementInfo: (name) => `${exports.STRUCTURE.elementInfoCollection}?path=${seg(name)}`,
|
|
112
115
|
};
|
|
113
116
|
exports.DOMAIN = {
|
|
114
117
|
collection: '/sap/bc/adt/ddic/domains',
|
|
@@ -134,6 +137,9 @@ exports.SERVICE_DEFINITION = {
|
|
|
134
137
|
collection: '/sap/bc/adt/ddic/srvd/sources',
|
|
135
138
|
validation: '/sap/bc/adt/ddic/srvd/sources/validation',
|
|
136
139
|
uri: (name) => `/sap/bc/adt/ddic/srvd/sources/${seg(name)}`,
|
|
140
|
+
/** The service definition's element info: its exposed entities. */
|
|
141
|
+
elementInfoCollection: '/sap/bc/adt/ddic/srvd/elementinfo',
|
|
142
|
+
elementInfo: (name) => `${exports.SERVICE_DEFINITION.elementInfoCollection}?path=${seg(name)}`,
|
|
137
143
|
};
|
|
138
144
|
exports.SERVICE_BINDING = {
|
|
139
145
|
/**
|
|
@@ -1886,6 +1886,48 @@ if (answer.ok) {
|
|
|
1886
1886
|
}
|
|
1887
1887
|
```
|
|
1888
1888
|
|
|
1889
|
+
### AdtUtils (Element info)
|
|
1890
|
+
|
|
1891
|
+
Two members, one GET each, both with `Accept:
|
|
1892
|
+
application/vnd.sap.adt.elementinfo+xml` — the only one SAP answers (`406` to
|
|
1893
|
+
`application/xml`, `application/json` and any other; measured on premise and on
|
|
1894
|
+
ABAP cloud, 2026-11-05). `options.accept` replaces it.
|
|
1895
|
+
|
|
1896
|
+
- `getStructureElementInfo(structureName, options?)` —
|
|
1897
|
+
`GET /sap/bc/adt/ddic/elementinfo?path=<structure>`: every component of the
|
|
1898
|
+
structure in order, flat. An include or an append is an element named
|
|
1899
|
+
`.include` / `.append` with `ddicIncludeName` (the included structure) and
|
|
1900
|
+
that structure's source URI; each field inside one carries
|
|
1901
|
+
`ddicIsPartOfInclude` and `ddicIncludeHierarchyLevel`, a nested include too.
|
|
1902
|
+
A named include (`_x : include s`) is an `.include` as well — its group name
|
|
1903
|
+
is not stated. An append made by `extend type` is listed as `.append`, with
|
|
1904
|
+
its fields.
|
|
1905
|
+
- `getServiceDefinitionElementInfo(serviceDefinitionName, options?)` —
|
|
1906
|
+
`GET /sap/bc/adt/ddic/srvd/elementinfo?path=<service definition>`: one
|
|
1907
|
+
element per exposed entity, with the entity's name as its DDL source writes
|
|
1908
|
+
it, its DDL source URI and an `alias` entry when the `expose` has an `as`
|
|
1909
|
+
(none without); not in source order. An extension's entities are listed too,
|
|
1910
|
+
and the extension is linked.
|
|
1911
|
+
|
|
1912
|
+
A name that does not exist answers `200` with an element info that names
|
|
1913
|
+
nothing. Both answer the document as it came (`IUtilResults` has no slot for
|
|
1914
|
+
them); `readStructureElementInfo` / `structureElementInfo` and
|
|
1915
|
+
`readServiceDefinitionElementInfo` / `serviceDefinitionElementInfo` of
|
|
1916
|
+
`@mcp-abap-adt/adt-strategies` read it.
|
|
1917
|
+
|
|
1918
|
+
```typescript
|
|
1919
|
+
import { readStructureElementInfo } from '@mcp-abap-adt/adt-strategies';
|
|
1920
|
+
|
|
1921
|
+
const answer = await client.getUtils().getStructureElementInfo('/DMO/S_TRAVELX');
|
|
1922
|
+
if (answer.ok) {
|
|
1923
|
+
const { includes } = readStructureElementInfo(answer.getResult().value);
|
|
1924
|
+
includes.map((c) => [c.name, c.includeName, c.partOfInclude]);
|
|
1925
|
+
}
|
|
1926
|
+
```
|
|
1927
|
+
|
|
1928
|
+
On a legacy system (`AdtClientLegacy`) both are refused without a request: the
|
|
1929
|
+
7.40 discovery lists neither endpoint.
|
|
1930
|
+
|
|
1889
1931
|
### AdtUtils (Where-used)
|
|
1890
1932
|
|
|
1891
1933
|
Where-used is two requests, and both are yours:
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Migrating to 44.0.0
|
|
2
|
+
|
|
3
|
+
44.0.0 moves to `@mcp-abap-adt/interfaces-adt-connection` `^4.0.0`, where
|
|
4
|
+
`IAbapConnection.getBaseUrl()` answers `Promise<string | undefined>`: an RFC
|
|
5
|
+
connection has no HTTP origin and answers `undefined`. It pairs with
|
|
6
|
+
`@mcp-abap-adt/adt-strategies` 0.21.0 and `@mcp-abap-adt/adt-clients-legacy`
|
|
7
|
+
0.8.0, which declare the same range. No request changes.
|
|
8
|
+
|
|
9
|
+
- [`getBaseUrl()` may answer `undefined`](#getbaseurl-may-answer-undefined)
|
|
10
|
+
- [The test configuration over RFC states its address](#the-test-configuration-over-rfc-states-its-address)
|
|
11
|
+
|
|
12
|
+
## `getBaseUrl()` may answer `undefined`
|
|
13
|
+
|
|
14
|
+
### What changed
|
|
15
|
+
|
|
16
|
+
`AdtBatchConnection.getBaseUrl()` answers `Promise<string | undefined>` and
|
|
17
|
+
hands on what the wrapped connection answers, `undefined` included.
|
|
18
|
+
`isCloudEnvironment(connection)` already skipped a missing URL: with
|
|
19
|
+
`undefined` it asks `systeminformation`, as it did for an empty one.
|
|
20
|
+
|
|
21
|
+
### What to do
|
|
22
|
+
|
|
23
|
+
A caller that reads `getBaseUrl()` from this package's types narrows before it
|
|
24
|
+
uses the answer:
|
|
25
|
+
|
|
26
|
+
```typescript
|
|
27
|
+
const origin = await batch.getBaseUrl();
|
|
28
|
+
if (origin !== undefined) {
|
|
29
|
+
// an HTTP connection: its origin
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Install `@mcp-abap-adt/interfaces-adt-connection@^4.0.0` beside this package
|
|
34
|
+
(and `@mcp-abap-adt/connection` 20 for a concrete connection), so one copy of
|
|
35
|
+
the contract is installed. A connection of your own that answers a string
|
|
36
|
+
still conforms.
|
|
37
|
+
|
|
38
|
+
## The test configuration over RFC states its address
|
|
39
|
+
|
|
40
|
+
This concerns a run of this repository's tests, not the library.
|
|
41
|
+
|
|
42
|
+
### What changed
|
|
43
|
+
|
|
44
|
+
The test helpers take `@mcp-abap-adt/connection` 20, where an RFC config has
|
|
45
|
+
no URL. With `environment.connection_type: "rfc"`, the session file names the
|
|
46
|
+
address and no `SAP_URL`:
|
|
47
|
+
|
|
48
|
+
```env
|
|
49
|
+
SAP_ASHOST=saphost # the host your SAP_URL named
|
|
50
|
+
SAP_SYSNR=00 # the two digits of its 80NN port
|
|
51
|
+
SAP_CLIENT=100
|
|
52
|
+
SAP_LANGUAGE=EN
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
— or a message server: `SAP_MSHOST` with `SAP_MSSERV` and/or `SAP_SYSID` and
|
|
56
|
+
`SAP_GROUP`. `SAP_SAPROUTER` is taken when stated. Nothing is derived from a URL
|
|
57
|
+
and nothing is defaulted.
|
|
58
|
+
|
|
59
|
+
`environment.connection_type` is required in the overlay: `"http"` or `"rfc"`,
|
|
60
|
+
stated. Absent or another value is refused, naming the key; until 44.0.0 an
|
|
61
|
+
absent one was read as HTTP.
|
|
62
|
+
|
|
63
|
+
### What to do
|
|
64
|
+
|
|
65
|
+
State `"environment.connection_type": "http"` (or `"rfc"`) in your
|
|
66
|
+
`test-config.overlay.yaml`; an old full `test-config.yaml` that states none is
|
|
67
|
+
not migrated (`npm run test-config:migrate` names the key). Remove `SAP_URL` from an RFC session file and add `SAP_ASHOST`, `SAP_SYSNR`,
|
|
68
|
+
`SAP_CLIENT` and `SAP_LANGUAGE` (`000` and `EN` were the old defaults). The
|
|
69
|
+
helper refuses, naming the keys, an RFC file that states `SAP_URL`, two
|
|
70
|
+
addresses, none, an incomplete one, or no client or language; an HTTP file
|
|
71
|
+
that states an RFC address key; and ABAP Cloud over RFC. See
|
|
72
|
+
[RFC_TESTING.md](../development/RFC_TESTING.md).
|
|
@@ -44,7 +44,7 @@ export LD_LIBRARY_PATH=$SAPNWRFC_HOME/lib:$LD_LIBRARY_PATH
|
|
|
44
44
|
RFC transport is provided by `@mcp-abap-adt/sap-rfc-lite`, which is pulled in automatically as a dependency of `@mcp-abap-adt/connection`. Nothing needs to be added to `package.json` — `adt-clients` consumes the `IAbapConnection` interface and does not depend on any RFC library directly.
|
|
45
45
|
|
|
46
46
|
It is an **optional** dependency with no install script (sap-rfc-lite 0.3.x,
|
|
47
|
-
`@mcp-abap-adt/connection` 19 and later): `npm install` compiles nothing and needs
|
|
47
|
+
`@mcp-abap-adt/connection` 19 and later; this package's tests use 20): `npm install` compiles nothing and needs
|
|
48
48
|
no SDK. It ships prebuilt bindings for linux-x64 (glibc), win32-x64 and
|
|
49
49
|
darwin-arm64. On any other platform the install succeeds without a binding and
|
|
50
50
|
the RFC connection fails when it loads sap-rfc-lite; build the binding from
|
|
@@ -61,10 +61,13 @@ The SAP user needs `S_RFC` authorization for function module `SADT_REST_RFC_ENDP
|
|
|
61
61
|
|
|
62
62
|
### Connection Layer (`@mcp-abap-adt/connection`)
|
|
63
63
|
|
|
64
|
-
RFC is a **transport**, not an auth type
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
64
|
+
RFC is a **transport**, not an auth type: the wire an on-prem system is
|
|
65
|
+
reached over is an argument (`RfcTransport`), as it has been since
|
|
66
|
+
`@mcp-abap-adt/connection` 6.0.0. `connectionType: 'rfc'` is the config's
|
|
67
|
+
discriminant since `@mcp-abap-adt/interfaces-auth-sap` 4 /
|
|
68
|
+
`@mcp-abap-adt/connection` 20: `ISapConfig` is a union, and an RFC config
|
|
69
|
+
(`SapRfcConfig`) states its own address, client and logon language and has no
|
|
70
|
+
`url`.
|
|
68
71
|
|
|
69
72
|
```typescript
|
|
70
73
|
import { BasicAuthProvider } from '@mcp-abap-adt/auth-providers';
|
|
@@ -72,29 +75,41 @@ import {
|
|
|
72
75
|
AdtOnPremConnector,
|
|
73
76
|
RfcTransport,
|
|
74
77
|
rfcConversationFrom,
|
|
78
|
+
type SapRfcConfig,
|
|
75
79
|
} from '@mcp-abap-adt/connection';
|
|
76
80
|
|
|
77
|
-
const config = {
|
|
78
|
-
|
|
79
|
-
|
|
81
|
+
const config: SapRfcConfig = {
|
|
82
|
+
connectionType: 'rfc',
|
|
83
|
+
ashost: 'saphost', // the application server
|
|
84
|
+
sysnr: '00', // its system number
|
|
80
85
|
client: '100',
|
|
86
|
+
language: 'EN',
|
|
87
|
+
authType: 'basic',
|
|
81
88
|
username: 'DEVELOPER',
|
|
82
89
|
password: 'secret',
|
|
83
90
|
};
|
|
84
91
|
|
|
85
92
|
const connection = new AdtOnPremConnector(
|
|
86
93
|
config,
|
|
87
|
-
new BasicAuthProvider(
|
|
94
|
+
new BasicAuthProvider('DEVELOPER', 'secret'),
|
|
88
95
|
new RfcTransport(rfcConversationFrom(config)),
|
|
89
96
|
);
|
|
90
97
|
|
|
91
98
|
await connection.connect();
|
|
92
99
|
```
|
|
93
100
|
|
|
94
|
-
`rfcConversationFrom(config)`
|
|
95
|
-
- `ashost`
|
|
96
|
-
-
|
|
97
|
-
|
|
101
|
+
`rfcConversationFrom(config)` takes the address as stated:
|
|
102
|
+
- an application server: `ashost` and `sysnr`;
|
|
103
|
+
- or a message server: `mshost`, its service as `msserv`, `sysid` or both, and
|
|
104
|
+
the logon `group`;
|
|
105
|
+
- `client` and `language` (sent as the SDK's `lang`), and `saprouter` when the
|
|
106
|
+
config states it;
|
|
107
|
+
- the provider's logon parameters (`user`, `passwd`, or SNC) are spread over
|
|
108
|
+
that address at each open.
|
|
109
|
+
|
|
110
|
+
Nothing is derived from a URL, nothing is defaulted (no `000`, `EN` or
|
|
111
|
+
`PUBLIC`), and `SAP_SYSNR` is not read from the environment. An RFC
|
|
112
|
+
connection's `getBaseUrl()` answers `undefined`: it has no HTTP origin.
|
|
98
113
|
|
|
99
114
|
### ADT Clients Layer (`@mcp-abap-adt/adt-clients`)
|
|
100
115
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcp-abap-adt/adt-clients",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "44.0.0",
|
|
4
4
|
"description": "ADT clients for SAP ABAP systems - AdtClient and AdtRuntimeClient",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
},
|
|
118
118
|
"dependencies": {
|
|
119
119
|
"@mcp-abap-adt/interfaces-adt": "^26.0.0",
|
|
120
|
-
"@mcp-abap-adt/interfaces-adt-connection": "^
|
|
120
|
+
"@mcp-abap-adt/interfaces-adt-connection": "^4.0.0",
|
|
121
121
|
"@mcp-abap-adt/interfaces-network": "^2.0.1",
|
|
122
122
|
"@mcp-abap-adt/interfaces-utils": "^1.1.1",
|
|
123
123
|
"@mcp-abap-adt/logger": "^0.4.1",
|
|
@@ -126,11 +126,11 @@
|
|
|
126
126
|
},
|
|
127
127
|
"devDependencies": {
|
|
128
128
|
"@biomejs/biome": "^2.4.4",
|
|
129
|
-
"@mcp-abap-adt/adt-strategies": "^0.
|
|
129
|
+
"@mcp-abap-adt/adt-strategies": "^0.21.0",
|
|
130
130
|
"@mcp-abap-adt/auth-providers": "^6.0.2",
|
|
131
|
-
"@mcp-abap-adt/connection": "^
|
|
131
|
+
"@mcp-abap-adt/connection": "^20.0.0",
|
|
132
132
|
"@mcp-abap-adt/interfaces-auth": "^7.5.0",
|
|
133
|
-
"@mcp-abap-adt/interfaces-auth-sap": "^
|
|
133
|
+
"@mcp-abap-adt/interfaces-auth-sap": "^4.0.0",
|
|
134
134
|
"@types/jest": "^30.0.0",
|
|
135
135
|
"@types/node": "^25.3.3",
|
|
136
136
|
"dotenv": "^17.3.1",
|