feat: add dub publish command for registry registration - #3139
Open
AMDphreak wants to merge 3 commits into
Open
Conversation
Registers packages with code.dlang.org from the CLI (login + register_package), with status and update actions. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Thanks for your Pull Request and making D better! This comment will automatically be updated to summarize some statistics in a few minutes. |
Port dub-publish 0.3.2 features into dub publish: owner settings (logo, docs-url, categories, hooks, repo, perms, remove, leave), idempotent register with ingest polling, and DPAPI/0600 credentials with password.incoming / --password-file / --password-stdin. Co-authored-by: Cursor <cursoragent@cursor.com>
Match dub-publish 0.3.3: prefer password.incoming / --password-file / -p. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Expands
dub publishfrom early register/status/update/login support to feature parity with dub-publish 0.3.2 (adapted to official dub conventions).register/publish,status,update,login,logout,remove(--yes),logo,logo-delete,docs-url,categories,hooks,hooks-disable,repo,perms-add,leaveAlreadyRegisteredException→ success + metadata refresh; fails if still on the add-package form after POST/api/packages/:name/info(packageExists) thentriggerUpdate;statusreports(registered, no versions yet)when appropriatehooksregenerates secret and prints/saves clean generic/GitHub/GitLab URLs (avoids dub-registry no warning in misspelling of fields in dub.json #614)credentials.v1under DUB user settings (~/.dub/%APPDATA%\dub) — DPAPI on Windows, Base64 + mode 0600 elsewhere; legacy plaintext upgraded on loadpassword.incomingdrop file (consumed after verified--save-credentials),--password-file,--password-stdin, opt-in--prompt-password;logoutclears store + drop file--annotate/dub.dryRun; User-Agentdub/<version>; curl gated withversion (DubUseCurl)Test plan
dub buildbin/dub publish -hshows the full action/option setbin/dub publish --annotatedry-runs register without contacting the registrybin/dub publish status -n vibe-d(live registry)bin/dub publish logout --annotatebin/dub publish hooks --annotate -n mypkgpassword.incoming+--save-credentialsstorescredentials.v1and deletes the drop file (Windows DPAPI / Posix 0600)bin/dub publish remove -n mypkgwithout--yesrefuses; with--yesrequires intentional confirmation