@abapify/adt-diff 0.3.5 → 0.3.6

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.
Files changed (2) hide show
  1. package/README.md +71 -0
  2. package/package.json +6 -6
package/README.md ADDED
@@ -0,0 +1,71 @@
1
+ # @abapify/adt-diff
2
+
3
+ Diff CLI plugin for [`adt-cli`](https://github.com/abapify/adt-cli). Compares
4
+ local abapGit-serialised files (`*.clas.xml`, `*.tabl.xml`, …) against the
5
+ current source in a connected SAP system and prints a coloured unified diff.
6
+ Any object type supported by `@abapify/adt-plugin-abapgit` can be compared.
7
+
8
+ [![npm](https://img.shields.io/npm/v/%40abapify%2Fadt-diff.svg)](https://www.npmjs.com/package/@abapify/adt-diff)
9
+
10
+ ## Install
11
+
12
+ ```bash
13
+ npm i @abapify/adt-diff
14
+ # or
15
+ bun add @abapify/adt-diff
16
+ ```
17
+
18
+ ## Usage
19
+
20
+ Register the command in `adt.config.ts`:
21
+
22
+ ```ts
23
+ // adt.config.ts
24
+ export default {
25
+ commands: ['@abapify/adt-diff/commands/diff'],
26
+ };
27
+ ```
28
+
29
+ Then diff one or more files, or scan the whole abapGit repo in the working
30
+ directory:
31
+
32
+ ```bash
33
+ # Diff specific files
34
+ adt diff zcl_myclass.clas.xml ztab.tabl.xml
35
+
36
+ # Glob patterns
37
+ adt diff "*.tabl.xml" --context 5
38
+
39
+ # Scan the whole repo, ignoring unchanged objects
40
+ adt diff --package ZMY_PACKAGE
41
+
42
+ # Compare ADK-rendered source instead of raw XML (TABL only)
43
+ adt diff zmy_table.tabl.xml --source
44
+ ```
45
+
46
+ The package also exposes a small TABL-to-CDS DDL utility that is independent
47
+ of the diff command:
48
+
49
+ ```ts
50
+ import { tablXmlToCdsDdl, buildCdsDdl } from '@abapify/adt-diff';
51
+
52
+ const ddl = tablXmlToCdsDdl(xmlString);
53
+ ```
54
+
55
+ ## Role in the monorepo
56
+
57
+ - CLI plugin loaded by `@abapify/adt-cli`; it owns the `diff` command only.
58
+ - Uses `@abapify/adk` to render local XML back to source and
59
+ `@abapify/adt-plugin-abapgit` to resolve filenames to ADT object URIs.
60
+ - Read-only: it never locks, writes, or imports objects. For round-tripping
61
+ objects into and out of the system, see `@abapify/adt-export` and the
62
+ relevant ADK save flow.
63
+
64
+ ## Related
65
+
66
+ - [abapify/adt-cli monorepo](https://github.com/abapify/adt-cli)
67
+ - [Full docs](https://adt-cli.netlify.app)
68
+
69
+ ## License
70
+
71
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abapify/adt-diff",
3
- "version": "0.3.5",
3
+ "version": "0.3.6",
4
4
  "description": "Diff CLI plugin for adt-cli - compare local serialized files against SAP remote source",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -27,17 +27,17 @@
27
27
  "abapgit"
28
28
  ],
29
29
  "dependencies": {
30
- "@abapify/adk": "0.3.5",
31
- "@abapify/adt-contracts": "0.3.5",
32
- "@abapify/adt-plugin": "0.3.5",
33
- "@abapify/adt-plugin-abapgit": "0.3.5",
30
+ "@abapify/adk": "0.3.6",
31
+ "@abapify/adt-contracts": "0.3.6",
32
+ "@abapify/adt-plugin": "0.3.6",
33
+ "@abapify/adt-plugin-abapgit": "0.3.6",
34
34
  "chalk": "^5.6.2",
35
35
  "diff": "^8.0.3",
36
36
  "fast-xml-parser": "^5.5.5"
37
37
  },
38
38
  "module": "./dist/index.mjs",
39
39
  "devDependencies": {
40
- "@abapify/adt-fixtures": "0.3.5"
40
+ "@abapify/adt-fixtures": "0.3.6"
41
41
  },
42
42
  "repository": {
43
43
  "type": "git",