{"_id":"@abapify/p2-cli","_rev":"3-20d37a796974176469578f2d2d7cc623","name":"@abapify/p2-cli","dist-tags":{"latest":"0.4.1"},"versions":{"0.0.0":{"name":"@abapify/p2-cli","version":"0.0.0","_id":"@abapify/p2-cli@0.0.0","maintainers":[{"name":"theplenkov-npm","email":"petr.plenkov@gmail.com"}],"dist":{"shasum":"870844f338bb40e660289c087e96c7a8ac2fdbc9","tarball":"https://registry.npmjs.org/@abapify/p2-cli/-/p2-cli-0.0.0.tgz","fileCount":2,"integrity":"sha512-jU9JJ/hdjJ8L6V4TRngnwQ6Nknip5mnTMVUu0xXVApGGIEVowe/iQ7wW3mGnXxnqne9xnPeLEYLP8BGjqRkHUg==","signatures":[{"sig":"MEYCIQC1q4SV3dY051Qqh1rWInnYCf9tVcjLoq53HgS87joznAIhAOrS42mP3qB3hME8EJQlPZjSsv67AguC2W8CZcEv0Yq3","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":221},"_npmUser":{"name":"theplenkov-npm","email":"petr.plenkov@gmail.com"},"_npmVersion":"11.12.1","description":"Placeholder — real package is published via CI/CD (trusted publishing).","directories":{},"_nodeVersion":"24.15.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/p2-cli_0.0.0_1780070769408_0.2994507349454292","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@abapify/p2-cli","version":"0.4.0","keywords":["sap","eclipse","p2","cli","decompiler"],"license":"MIT","_id":"@abapify/p2-cli@0.4.0","maintainers":[{"name":"theplenkov-npm","email":"petr.plenkov@gmail.com"}],"homepage":"https://github.com/abapify/adt-cli/tree/main/tools/p2-cli#readme","bugs":{"url":"https://github.com/abapify/adt-cli/issues"},"bin":{"p2":"dist/cli.mjs"},"dist":{"shasum":"7a0a0003964232de168ca64103b1821dd88f6369","tarball":"https://registry.npmjs.org/@abapify/p2-cli/-/p2-cli-0.4.0.tgz","fileCount":2,"integrity":"sha512-Cjjda6My8Syhw/wW9fhCocIr1q43GtOcyzm8tvOV/G45mDzvZkoANoNTtBALGu5HZSz0uY0oEoWQVzgHxf22SQ==","signatures":[{"sig":"MEYCIQCeqzIrlAhwZ3mfJFo8/go37BT52B3NUXh5Ac+KI2C3ogIhAJeau1gpvjM2cryBSxKIFinFcs6RLTU6rXm8zMlMgsl7","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@abapify%2fp2-cli@0.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":5042},"type":"module","engines":{"node":">=18"},"gitHead":"81dc9eea47fe419e41d246f0ec212fa78570a489","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:56ca0a1d-e56d-49d8-b426-e2c9b46f6935"}},"repository":{"url":"git+https://github.com/abapify/adt-cli.git","type":"git","directory":"tools/p2-cli"},"_npmVersion":"11.13.0","description":"CLI for Eclipse P2 repositories - download, extract, and decompile plugins","directories":{},"_nodeVersion":"24.16.0","dependencies":{"commander":"*"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/p2-cli_0.4.0_1780072641905_0.6731529393910256","host":"s3://npm-registry-packages-npm-production"}},"0.4.1":{"name":"@abapify/p2-cli","version":"0.4.1","repository":{"type":"git","url":"git+https://github.com/abapify/adt-cli.git","directory":"tools/p2-cli"},"homepage":"https://github.com/abapify/adt-cli/tree/main/tools/p2-cli#readme","bugs":{"url":"https://github.com/abapify/adt-cli/issues"},"publishConfig":{"access":"public"},"description":"CLI for Eclipse P2 repositories - download, extract, and decompile plugins","license":"MIT","type":"module","engines":{"node":">=18"},"bin":{"p2":"dist/cli.mjs"},"keywords":["sap","eclipse","p2","cli","decompiler"],"dependencies":{"commander":"*"},"gitHead":"9d3b996a5c760a8db67e28c4df3c30098bd29e4a","_id":"@abapify/p2-cli@0.4.1","_nodeVersion":"24.16.0","_npmVersion":"11.13.0","dist":{"integrity":"sha512-ZAonFxWDjvACVrH83eb21CLsR7n1VQGKZwM1NS5oGzBJufwhUQRcWq075iVpUibMW420SwhEo/VK5LFqw/HfjA==","shasum":"7c4d91c13eb81db71d98d9caed83ffe3abcb5420","tarball":"https://registry.npmjs.org/@abapify/p2-cli/-/p2-cli-0.4.1.tgz","fileCount":4,"unpackedSize":17259,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@abapify%2fp2-cli@0.4.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICesBajG7nksfsAXhpXaAc0cOnWX4wq6keTdAiwRP3iRAiEA+JFd3+RquhdyyDPOLsvHdnDWRds4u1aA0Z4J6vgCe0k="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:56ca0a1d-e56d-49d8-b426-e2c9b46f6935"}},"directories":{},"maintainers":[{"name":"theplenkov-npm","email":"petr.plenkov@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/p2-cli_0.4.1_1780074962857_0.0666975694851708"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-29T16:06:09.180Z","modified":"2026-05-29T17:16:03.302Z","0.0.0":"2026-05-29T16:06:09.539Z","0.4.0":"2026-05-29T16:37:22.143Z","0.4.1":"2026-05-29T17:16:03.002Z"},"bugs":{"url":"https://github.com/abapify/adt-cli/issues"},"license":"MIT","homepage":"https://github.com/abapify/adt-cli/tree/main/tools/p2-cli#readme","keywords":["sap","eclipse","p2","cli","decompiler"],"repository":{"type":"git","url":"git+https://github.com/abapify/adt-cli.git","directory":"tools/p2-cli"},"description":"CLI for Eclipse P2 repositories - download, extract, and decompile plugins","maintainers":[{"name":"theplenkov-npm","email":"petr.plenkov@gmail.com"}],"readme":"# @abapify/p2-cli\n\nCLI for Eclipse P2 repositories - download, extract, and decompile plugins.\n\n## Installation\n\n```bash\n# npm\nnpm install -g @abapify/p2-cli\n\n# or run without installing globally\nnpx @abapify/p2-cli --help\n```\n\n## Development\n\n```bash\n# From monorepo root\nbun install\nnpx nx build p2-cli\n\n# Or run directly with tsx\nnpx tsx tools/p2-cli/src/cli.ts\n```\n\n## Publishing Bootstrap (maintainers)\n\n`p2-cli` is wired into workspace release publishing via `nx release`.\n\n```bash\n# Validate npm publish/trusted-publisher readiness\nbunx nx run p2-cli:npm-trust-check\n\n# One-time bootstrap for new npm package/trusted publishing\nbunx nx run p2-cli:npm-trust-check --prepare\n```\n\nThen publish from CI using the repository release workflow (which triggers `.github/workflows/publish.yml`).\n\n## Commands\n\n### `p2 download <url>`\n\nDownload plugins from a P2 repository.\n\n```bash\n# Download ADT plugins from SAP tools\np2 download https://tools.hana.ondemand.com/latest -o ./sdk\n\n# Filter to specific plugins\np2 download https://tools.hana.ondemand.com/latest -o ./sdk -f \"com.sap.adt.*\"\n\n# Download and extract in one step\np2 download https://tools.hana.ondemand.com/latest -o ./sdk --extract\n```\n\n**Options:**\n\n- `-o, --output <dir>` - Output directory (default: `./p2-download`)\n- `-f, --filter <patterns>` - Filter plugins by ID pattern (comma-separated)\n- `-e, --extract` - Also extract files after download\n- `--extract-output <dir>` - Output directory for extraction\n- `--extract-patterns <patterns>` - File patterns to extract (default: `*.xsd,*.ecore,*.genmodel,*.xml`)\n\n### `p2 extract <input>`\n\nExtract files from JAR archives. Works as a general-purpose JAR extractor.\n\n```bash\n# Extract schemas from downloaded plugins\np2 extract ./sdk/plugins -o ./extracted\n\n# Extract specific file types\np2 extract ./sdk/plugins -o ./extracted -p \"*.xsd,*.xml\"\n\n# Extract everything (no organization)\np2 extract ./sdk/plugins -o ./extracted -p \"*\" --no-organize\n\n# Single JAR file\np2 extract ./my-plugin.jar -o ./extracted\n```\n\n**Options:**\n\n- `-o, --output <dir>` - Output directory (default: `./extracted`)\n- `-p, --patterns <patterns>` - File patterns to extract (default: `*.xsd,*.ecore,*.genmodel,*.xml`)\n- `--no-organize` - Do not organize files by type (flat output)\n- `-v, --verbose` - Verbose output\n\n**Organized output structure:**\n\n```\nextracted/\n├── schemas/\n│   ├── xsd/       # XML Schema definitions\n│   ├── ecore/     # Eclipse EMF models\n│   └── genmodel/  # Generator models\n├── templates/     # Code templates\n├── xml/           # Other XML files\n├── classes/       # Java class files (by JAR)\n└── sources/       # Java source files (by JAR)\n```\n\n### `p2 decompile <input>`\n\nDecompile Java class files to readable source code.\n\n```bash\n# Decompile extracted classes\np2 decompile ./extracted/classes -o ./decompiled\n\n# Use specific decompiler\np2 decompile ./extracted/classes -o ./decompiled -d cfr\n```\n\n**Options:**\n\n- `-o, --output <dir>` - Output directory (default: `./decompiled`)\n- `-d, --decompiler <name>` - Decompiler to use (`cfr`, `procyon`, `fernflower`)\n- `-v, --verbose` - Verbose output\n\n**Supported decompilers:**\n\n- **CFR** - `brew install cfr-decompiler` (macOS/Linux)\n- **Procyon** - Download from GitHub\n- **Fernflower** - Bundled with IntelliJ IDEA\n\n## Examples\n\n### Download SAP ADT SDK\n\n```bash\n# Full workflow: download, extract, and organize\np2 download https://tools.hana.ondemand.com/latest \\\n  -o ./adt-sdk \\\n  -f \"com.sap.adt.*,com.sap.conn.jco.*\" \\\n  --extract \\\n  --extract-output ./adt-sdk/extracted\n\n# Result:\n# ./adt-sdk/\n# ├── artifacts.jar\n# ├── content.jar\n# ├── plugins/\n# │   ├── com.sap.adt.tools.core_3.54.1.jar\n# │   └── ...\n# └── extracted/\n#     ├── schemas/xsd/\n#     ├── schemas/ecore/\n#     └── ...\n```\n\n### Extract from existing Eclipse installation\n\n```bash\n# macOS\np2 extract /Applications/Eclipse.app/Contents/Eclipse/plugins \\\n  -o ./eclipse-schemas \\\n  -p \"*.xsd\"\n\n# Linux\np2 extract ~/.eclipse/*/plugins -o ./eclipse-schemas\n```\n\n## Requirements\n\n- Node.js 18+\n- `wget` command (for downloads)\n- `unzip` command (for extraction)\n- Java decompiler (optional, for decompilation)\n","readmeFilename":"README.md"}