Skip to content

Instance dist download for runtime engine installs (D9) - #13

Draft
roncodes wants to merge 3 commits into
release/v2.0.0from
feat/instance-dist-download
Draft

roncodes wants to merge 3 commits into
release/v2.0.0from
feat/instance-dist-download

Conversation

@roncodes

Copy link
Copy Markdown
Member

Instances can download a release's prebuilt engine dist with their own token, so the console installs it as a runtime engine instead of running pnpm add and rebuilding the console. This fixes the service side of D9 from the end-to-end walk.

  • GET /v1/instances/me/releases/{release}/dist (rel_ id) streams the dist. Any active instance can fetch a free extension's dist. A paid extension's dist needs the instance's organization to own the extension or hold an active licence; otherwise the endpoint returns 403 with Cache-Control: private, no-store. The check runs on every request, so a revoked or expired licence stops downloads at once. Yanked releases stay downloadable. A suspended listing, an unreleased release, or a release without a dist returns 404 with a message.
  • Catalog and /v1/instances/me/updates releases now carry dist.url (pointing at the route above) alongside size, sha256, integrity and built_against.
  • LicenceGate::allows() holds the owner-or-licence rule. The package routes' check() now uses it too.
  • README: documents the route, and moves the dist paragraph out of the middle of the catalog table, where it was breaking the table.

GET /npm/{engine}/-/dist/{version} from #11 still serves the same archive. Whether to keep it is an open question in the PR thread.

Stacked on #12, which now includes #11 (merged forward in eb2dc08). Tests: tests/Feature/Instance/InstanceReleaseDistTest.php, plus the catalog dist assertion updated for url.

…behind the licence check, and dist.url on catalog and update releases

An instance fetches a release's prebuilt engine dist with its own token. Free
extensions are open to any active instance; a paid one needs its organization
to own the extension or hold an active licence, checked on every request.
Yanked releases stay downloadable; suspended listings and releases without a
dist are 404. Catalog and update releases name the download in dist.url next
to size, sha256, integrity and built_against.
@roncodes
roncodes changed the base branch from feat/publisher-analytics to release/v2.0.0 October 24, 2026 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant