@abapify/adt-diff
v0.3.6
Published
Diff CLI plugin for adt-cli - compare local serialized files against SAP remote source
Downloads
364
Maintainers
Readme
@abapify/adt-diff
Diff CLI plugin for adt-cli. Compares
local abapGit-serialised files (*.clas.xml, *.tabl.xml, …) against the
current source in a connected SAP system and prints a coloured unified diff.
Any object type supported by @abapify/adt-plugin-abapgit can be compared.
Install
npm i @abapify/adt-diff
# or
bun add @abapify/adt-diffUsage
Register the command in adt.config.ts:
// adt.config.ts
export default {
commands: ['@abapify/adt-diff/commands/diff'],
};Then diff one or more files, or scan the whole abapGit repo in the working directory:
# Diff specific files
adt diff zcl_myclass.clas.xml ztab.tabl.xml
# Glob patterns
adt diff "*.tabl.xml" --context 5
# Scan the whole repo, ignoring unchanged objects
adt diff --package ZMY_PACKAGE
# Compare ADK-rendered source instead of raw XML (TABL only)
adt diff zmy_table.tabl.xml --sourceThe package also exposes a small TABL-to-CDS DDL utility that is independent of the diff command:
import { tablXmlToCdsDdl, buildCdsDdl } from '@abapify/adt-diff';
const ddl = tablXmlToCdsDdl(xmlString);Role in the monorepo
- CLI plugin loaded by
@abapify/adt-cli; it owns thediffcommand only. - Uses
@abapify/adkto render local XML back to source and@abapify/adt-plugin-abapgitto resolve filenames to ADT object URIs. - Read-only: it never locks, writes, or imports objects. For round-tripping
objects into and out of the system, see
@abapify/adt-exportand the relevant ADK save flow.
Related
License
MIT
