@abapify/adk 0.4.34 → 0.4.38
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 +19 -60
- package/dist/index.d.mts +1169 -1185
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +120 -85
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,21 +1,11 @@
|
|
|
1
1
|
# @abapify/adk
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/@abapify/adk)
|
|
4
|
+
[](https://github.com/abapify/adt-cli/blob/main/LICENSE)
|
|
4
5
|
|
|
5
|
-
ABAP Development Kit —
|
|
6
|
+
ABAP Development Kit — typed object model for ABAP Repository objects (classes, interfaces, programs, tables, …) with ADT XML serialization.
|
|
6
7
|
|
|
7
|
-
##
|
|
8
|
-
|
|
9
|
-
ADK provides typed representations of ABAP objects (classes, interfaces, packages, etc.) built from ADT XML responses. It handles parsing, construction, and lazy loading of source includes — no HTTP calls inside ADK itself.
|
|
10
|
-
|
|
11
|
-
Key properties:
|
|
12
|
-
|
|
13
|
-
- **Schema-first**: types derived from `@abapify/adt-schemas` (XSD-generated)
|
|
14
|
-
- **Pure construction**: no network calls, no side effects
|
|
15
|
-
- **Lazy source loading**: includes fetched on demand via an injected fetcher
|
|
16
|
-
- **Immutable snapshots**: objects represent a point-in-time state
|
|
17
|
-
|
|
18
|
-
## Installation
|
|
8
|
+
## Install
|
|
19
9
|
|
|
20
10
|
```bash
|
|
21
11
|
npm install @abapify/adk
|
|
@@ -23,58 +13,27 @@ npm install @abapify/adk
|
|
|
23
13
|
|
|
24
14
|
## Usage
|
|
25
15
|
|
|
26
|
-
```
|
|
27
|
-
import {
|
|
16
|
+
```ts
|
|
17
|
+
import { createAdtClient } from '@abapify/adt-client';
|
|
18
|
+
import { createAdk } from '@abapify/adk';
|
|
28
19
|
|
|
29
|
-
const
|
|
20
|
+
const client = createAdtClient({ baseUrl, username, password, client: '100' });
|
|
21
|
+
const adk = createAdk(client);
|
|
30
22
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
console.log(classObj.kind); // 'CLAS/OC'
|
|
35
|
-
console.log(classObj.name); // 'ZCL_MY_CLASS'
|
|
36
|
-
|
|
37
|
-
// Lazy-load source (requires a fetcher injected via the CLI or client)
|
|
38
|
-
const source = await classObj.getSource();
|
|
39
|
-
const includes = await classObj.getIncludes();
|
|
23
|
+
const klass = await adk.getClass('ZCL_DEMO');
|
|
24
|
+
await klass.save({ transport: 'DEVK900001' });
|
|
40
25
|
```
|
|
41
26
|
|
|
42
|
-
##
|
|
27
|
+
## Features
|
|
43
28
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
adk (parse ADT XML → domain objects) ← this package
|
|
48
|
-
↓
|
|
49
|
-
adt-cli (orchestrate: fetch → parse → serialize)
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
ADK sits between the HTTP layer (`adt-client`) and the serialization layer (`adt-plugin-*`). The CLI passes raw ADT XML to ADK, receives typed objects, and hands them to format plugins.
|
|
53
|
-
|
|
54
|
-
## Supported Object Types
|
|
29
|
+
- Typed object model for classes, interfaces, programs, DDIC, packages, …
|
|
30
|
+
- Lock-aware save / upsert orchestration
|
|
31
|
+
- ADT XML (de)serialization via `@abapify/adt-schemas`
|
|
55
32
|
|
|
56
|
-
|
|
57
|
-
| --------- | -------------- |
|
|
58
|
-
| `CLAS/OC` | ABAP class |
|
|
59
|
-
| `INTF/OI` | ABAP interface |
|
|
60
|
-
| `DEVC/K` | Package |
|
|
33
|
+
## Documentation
|
|
61
34
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
The CLI registers object handlers using ADK adapters:
|
|
65
|
-
|
|
66
|
-
```typescript
|
|
67
|
-
this.handlers.set(
|
|
68
|
-
'CLAS',
|
|
69
|
-
(client) =>
|
|
70
|
-
new AdkObjectHandler(
|
|
71
|
-
client,
|
|
72
|
-
(xml) => ClassAdtAdapter.fromAdtXML(xml),
|
|
73
|
-
(name) => `/sap/bc/adt/oo/classes/${name.toLowerCase()}`,
|
|
74
|
-
),
|
|
75
|
-
);
|
|
76
|
-
```
|
|
35
|
+
**[adt-cli.netlify.app/sdk/packages/adk](https://adt-cli.netlify.app/sdk/packages/adk)**
|
|
77
36
|
|
|
78
|
-
|
|
37
|
+
---
|
|
79
38
|
|
|
80
|
-
|
|
39
|
+
Part of [**abapify**](https://github.com/abapify/adt-cli) — open, typed tooling for SAP ABAP Development Tools (ADT): CLI, MCP server, and SDK.
|