Composer v2, ZIPs & Mirroring
Packages speaks native Composer v2, serves versioned ZIP archives with cryptographic checksums, and automates release ingestion from CI pipelines and GitHub repositories.
Private Composer v2 Repository
Section titled “Private Composer v2 Repository”| Endpoint | Purpose |
|---|---|
GET /composer/packages.json |
Root Composer v2 repository index advertising metadata-url (/composer/p2/%package%.json). |
GET /composer/p2/{vendor}/{package}.json |
Per-package metadata filtered strictly to versions permitted by the caller’s license (updates_until, active status, non-yanked). Includes archive_sha1. |
GET /composer/dist/{vendor}/{package}/{version}/{ref}.zip |
Authenticated archive download streamed from private site/assets/packages/ storage and recorded in entries_tbl_packages_downloads. |
Authentication
Section titled “Authentication”Consumers authenticate with HTTP Basic using their customer email as username and either:
- A Composer Token (
pkg_tok_...) generated inside/portal/tokens(recommended for CI/CD and team machines so tokens can be rotated independently of license keys), or - Their License Key directly.
Versioned ZIP Downloads & Checksums
Section titled “Versioned ZIP Downloads & Checksums”For ProcessWire users who install modules via ZIP upload rather than Composer:
GET /packages/download/{slug}/latest.zipGET /packages/download/{slug}/{version}.zipGET /packages/download/{slug}/{version}.zip.sha256
Downloads accept an active Customer Portal session, HTTP Basic credentials, or a short-lived signed ?token=... query parameter generated by the portal.
Automated Publishing: CI Push & GitHub Mirroring
Section titled “Automated Publishing: CI Push & GitHub Mirroring”CI Push Endpoint (POST /packages/api/publish)
Section titled “CI Push Endpoint (POST /packages/api/publish)”Upload a built ZIP archive directly from GitHub Actions, GitLab CI, or any build script using your rotated CI token (Bearer pkg_ci_...) and multipart fields (slug, version, archive, optional changelog and prerelease):
curl -X POST https://packages.aegeanvoyages.example/packages/api/publish \ -H "Authorization: Bearer pkg_ci_your_token" \ -F "slug=booking-kit" \ -F "version=2.1.0" \ -F "changelog=Multi-currency EUR/USD seasonal matrix" \ -F "archive=@./build/aegean-booking-kit-2.1.0.zip"GitHub Webhook Mirroring (POST /packages/webhooks/github)
Section titled “GitHub Webhook Mirroring (POST /packages/webhooks/github)”Configure a repository webhook pointing to /packages/webhooks/github with a shared secret. Packages verifies the X-Hub-Signature-256 HMAC header on every delivery and mirrors new GitHub tags/releases into packages-releases automatically. You can also trigger manual syncs from Setup -> Packages -> Overview or via CLI:
php vendor/bin/wire packages:sync booking-kit --force --jsonphp vendor/bin/wire packages:sync --all --json