npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@abapify/adt-plugin-abapgit

v0.3.6

Published

abapGit serialization plugin for adt-cli — round-trips ADT objects to/from the abapGit on-disk format

Readme

@abapify/adt-plugin-abapgit

version

abapGit format plugin for ADT — serializes ABAP objects to Git-compatible XML/ABAP files.

Architecture Overview

┌─────────────────────────────────────────────────────────────────────┐
│                        adt-plugin-abapgit                           │
├─────────────────────────────────────────────────────────────────────┤
│  XSD Schemas (xsd/)          →  ts-xsd codegen  →  TypeScript types │
│  (XML structure definition)     (build time)       + parser/builder │
├─────────────────────────────────────────────────────────────────────┤
│  Object Handlers (handlers/)                                        │
│  ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐       │
│  │  CLAS   │ │  INTF   │ │  DEVC   │ │  DTEL   │ │  DOMA   │       │
│  │ handler │ │ handler │ │ handler │ │ handler │ │ handler │       │
│  └────┬────┘ └────┬────┘ └────┬────┘ └────┬────┘ └────┬────┘       │
│       └──────────┬┴──────────┬┴──────────┬┴──────────┘             │
│                  ▼           ▼           ▼                          │
│            createHandler (factory)                                  │
│            - Auto-registration                                      │
│            - Default serialize logic                                │
│            - File naming conventions                                │
├─────────────────────────────────────────────────────────────────────┤
│  ADK Facade (@abapify/adk)                                          │
│  - AdkClass, AdkInterface, AdkPackage...                            │
│  - Client-agnostic object model                                     │
│  - Source code retrieval via getSource()/getIncludeSource()         │
└─────────────────────────────────────────────────────────────────────┘

Key Design Decisions

1. XSD Schemas as Single Source of Truth

Why XSD?

  • XML Schema Definition (XSD) is the industry standard for XML structure validation
  • Can be used outside our tools (e.g., xmllint --schema intf.xsd file.xml)
  • Provides formal contract for abapGit XML format
  • Enables automated validation in CI/CD pipelines
# Validate any abapGit XML file against our schema
xmllint --schema xsd/intf.xsd myinterface.intf.xml --noout

2. ts-xsd for Type-Safe XML Handling

Why ts-xsd?

Unlike typical XML codegen tools that only generate types, ts-xsd provides:

  • TypeScript types with full type inference
  • XML parser that returns typed objects
  • XML builder that accepts typed objects
  • Schema object for runtime validation
// Generated from XSD - fully typed parse/build
import { intf } from './schemas/generated';

const data = intf.parse(xmlString); // → AbapGitIntf (typed)
const xml = intf.build(data); // → string (valid XML)

3. ADK as Client-Agnostic Facade

Why not implement ADT client features in the plugin?

The plugin only consumes the ADK facade:

  • ADK handles all SAP communication details
  • Plugin focuses purely on serialization format
  • Same plugin works with any ADT client implementation
  • Clear separation of concerns
// Plugin receives ADK objects, doesn't care how they were fetched
getSources: (cls) =>
  cls.includes.map((inc) => ({
    suffix: ABAPGIT_SUFFIX[inc.includeType],
    content: cls.getIncludeSource(inc.includeType), // ADK handles this
  }));

4. Handlers Don't Touch File System

Why delegate file operations to base class?

Object handlers only define mappings:

  • toAbapGit() - ADK data → abapGit XML structure
  • getSource() / getSources() - which source files to create

The createHandler factory handles:

  • File creation with correct naming
  • XML building with proper envelope
  • Promise resolution for async sources
  • Empty content filtering

Supported Object Types

| Type | Status | Handler | Notes | | ---- | ------ | --------- | --------------------------------------------------------------------- | | CLAS | ✅ | clas.ts | Multiple includes (main, locals_def, locals_imp, testclasses, macros) | | INTF | ✅ | intf.ts | Single source file | | DEVC | ✅ | devc.ts | Fixed filename package.devc.xml | | DTEL | ✅ | dtel.ts | Metadata only (no source) | | DOMA | ✅ | doma.ts | Custom serialize for fixed values |

File Structure

src/
├── zcl_example.clas.abap              # Main class source
├── zcl_example.clas.locals_def.abap   # Local type definitions
├── zcl_example.clas.locals_imp.abap   # Local implementations
├── zcl_example.clas.testclasses.abap  # Test classes
├── zcl_example.clas.xml               # Class metadata
├── zif_example.intf.abap              # Interface source
├── zif_example.intf.xml               # Interface metadata
├── ztest_dtel.dtel.xml                # Data element (no source)
├── ztest_doma.doma.xml                # Domain (no source)
└── package.devc.xml                   # Package definition

Development

Building

npx nx build adt-plugin-abapgit

Testing

npx nx test adt-plugin-abapgit

Regenerating Schemas

After modifying XSD files:

npx nx codegen adt-plugin-abapgit

Contributing

See CONTRIBUTING.md for detailed guidelines on:

  • Adding new object type support
  • XSD schema conventions
  • Handler implementation patterns
  • Testing requirements

See Also