@abapify/adt-config 0.4.31 → 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 +15 -60
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
# @abapify/adt-config
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/@abapify/adt-config)
|
|
4
|
+
[](https://github.com/abapify/adt-cli/blob/main/LICENSE)
|
|
4
5
|
|
|
5
|
-
Configuration loader for ADT CLI.
|
|
6
|
+
Configuration loader for ADT CLI.
|
|
6
7
|
|
|
7
|
-
##
|
|
8
|
+
## Install
|
|
8
9
|
|
|
9
10
|
```bash
|
|
10
11
|
npm install @abapify/adt-config
|
|
@@ -12,73 +13,27 @@ npm install @abapify/adt-config
|
|
|
12
13
|
|
|
13
14
|
## Usage
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
Create `adt.config.ts` in your project root:
|
|
18
|
-
|
|
19
|
-
```typescript
|
|
16
|
+
```ts
|
|
17
|
+
// adt.config.ts
|
|
20
18
|
import { defineConfig } from '@abapify/adt-config';
|
|
21
19
|
|
|
22
20
|
export default defineConfig({
|
|
23
21
|
destinations: {
|
|
24
|
-
DEV:
|
|
25
|
-
type: 'puppeteer',
|
|
26
|
-
options: {
|
|
27
|
-
url: 'https://dev.sap.example.com',
|
|
28
|
-
client: '100',
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
QAS: {
|
|
32
|
-
type: 'basic',
|
|
33
|
-
options: {
|
|
34
|
-
url: 'https://qas.sap.example.com',
|
|
35
|
-
client: '100',
|
|
36
|
-
},
|
|
37
|
-
},
|
|
22
|
+
DEV: 'https://sap-dev.example.com',
|
|
38
23
|
},
|
|
39
24
|
});
|
|
40
25
|
```
|
|
41
26
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
```typescript
|
|
45
|
-
import { loadConfig } from '@abapify/adt-config';
|
|
46
|
-
|
|
47
|
-
const config = await loadConfig();
|
|
48
|
-
|
|
49
|
-
// Get specific destination
|
|
50
|
-
const dest = config.getDestination('DEV');
|
|
27
|
+
## Features
|
|
51
28
|
|
|
52
|
-
|
|
53
|
-
|
|
29
|
+
- Typed `defineConfig` for destinations, plugins, and commands
|
|
30
|
+
- Config discovery and precedence (project → user → env)
|
|
31
|
+
- Shared by the CLI, MCP server, and SDK
|
|
54
32
|
|
|
55
|
-
|
|
56
|
-
if (config.hasDestination('DEV')) {
|
|
57
|
-
// ...
|
|
58
|
-
}
|
|
33
|
+
## Documentation
|
|
59
34
|
|
|
60
|
-
|
|
61
|
-
console.log(config.raw);
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
## Architecture
|
|
65
|
-
|
|
66
|
-
```
|
|
67
|
-
CLI (adt-cli)
|
|
68
|
-
│
|
|
69
|
-
├── @abapify/adt-config (this package)
|
|
70
|
-
│ └── loads destinations from adt.config.ts/json
|
|
71
|
-
│
|
|
72
|
-
├── @abapify/adt-auth
|
|
73
|
-
│ ├── auth methods (basic, slc, oauth, puppeteer)
|
|
74
|
-
│ └── session management (~/.adt/sessions/)
|
|
75
|
-
│
|
|
76
|
-
└── @abapify/adt-client
|
|
77
|
-
└── HTTP client (receives session at runtime)
|
|
78
|
-
```
|
|
35
|
+
**[adt-cli.netlify.app/sdk/packages/adt-config](https://adt-cli.netlify.app/sdk/packages/adt-config)**
|
|
79
36
|
|
|
80
|
-
|
|
37
|
+
---
|
|
81
38
|
|
|
82
|
-
|
|
83
|
-
2. `adt.config.json` (project - JSON)
|
|
84
|
-
3. `~/.adt/config.json` (global defaults)
|
|
39
|
+
Part of [**abapify**](https://github.com/abapify/adt-cli) — open, typed tooling for SAP ABAP Development Tools (ADT): CLI, MCP server, and SDK.
|