@abapify/adk 0.4.33 → 0.4.36

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 CHANGED
@@ -1,21 +1,11 @@
1
1
  # @abapify/adk
2
2
 
3
- [![version](https://img.shields.io/github/package-json/v/abapify/adt-cli?filename=packages/adk/package.json)](https://github.com/abapify/adt-cli/pkgs/npm/%40abapify%2Fadk)
3
+ [![npm](https://img.shields.io/npm/v/%40abapify%2Fadk)](https://www.npmjs.com/package/@abapify/adk)
4
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/abapify/adt-cli/blob/main/LICENSE)
4
5
 
5
- ABAP Development Kit — schema-driven construction and serialization of ABAP objects.
6
+ ABAP Development Kit — typed object model for ABAP Repository objects (classes, interfaces, programs, tables, …) with ADT XML serialization.
6
7
 
7
- ## Overview
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
- ```typescript
27
- import { AdkFactory } from '@abapify/adk';
16
+ ```ts
17
+ import { createAdtClient } from '@abapify/adt-client';
18
+ import { createAdk } from '@abapify/adk';
28
19
 
29
- const factory = new AdkFactory();
20
+ const client = createAdtClient({ baseUrl, username, password, client: '100' });
21
+ const adk = createAdk(client);
30
22
 
31
- // Parse ADT XML response into a typed object
32
- const classObj = factory.fromAdtXml('CLAS/OC', xmlString);
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
- ## Architecture
27
+ ## Features
43
28
 
44
- ```
45
- adt-schemas (XSD-derived TypeScript types)
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
- | ABAP Type | Description |
57
- | --------- | -------------- |
58
- | `CLAS/OC` | ABAP class |
59
- | `INTF/OI` | ABAP interface |
60
- | `DEVC/K` | Package |
33
+ ## Documentation
61
34
 
62
- ## Bridge Pattern (CLI Integration)
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
- ## License
37
+ ---
79
38
 
80
- MIT
39
+ Part of [**abapify**](https://github.com/abapify/adt-cli) — open, typed tooling for SAP ABAP Development Tools (ADT): CLI, MCP server, and SDK.