abap-git-api-client
v0.1.0
Published
CLI and library to fetch abapGit object files via the abapGit API
Readme
abap-git-api-client
CLI and library to fetch abapGit object files from an SAP system via the abapGit API.
Setup
cd scripts
npm install
npm run buildConfiguration
Copy example.env to .env and fill in your SAP system details:
cp example.env .envABAP_GIT_API_DOMAIN=<domain>
ABAP_GIT_API_PORT=<port>
ABAP_GIT_API_CLIENT=<client>
ABAP_GIT_API_USER=<user>
ABAP_GIT_API_PASS=<pass>CLI Usage
node dist/cli.js <OBJECT_TYPE> <OBJECT_NAME> [OUTPUT_DIR]| Argument | Description | Required |
|---|---|---|
| OBJECT_TYPE | SAP object type (e.g. CLAS, PROG, FUGR) | yes |
| OBJECT_NAME | SAP object name | yes |
| OUTPUT_DIR | Directory to write the downloaded files into | no (default: current directory) |
Examples:
# Download a class to the current directory
node dist/cli.js CLAS ZCL_EXEMPLO
# Download a program to a specific folder
node dist/cli.js PROG ZMY_PROGRAM ./outputLibrary Usage
import { getObject } from "abap-git-api-client";
const files = await getObject({ type: "CLAS", name: "ZCL_EXEMPLO", outputDir: "./output" });
// returns array of file paths written to disk