pkg publish: ask the wiki where it lands before uploading (GitHub PR #10)
The code is in https://github.com/adom-inc/adom-wiki-cli/pull/10 (branch publish-target, already merged with main at 1.8.15, no version bump). This page's repo holds the published package, not the source, so the change can't be a PR here.
What it does. pkg publish asks the wiki where the publish would land (GET /api/packages/<slug>/publish-target, adom-inc/git-wiki#334) before the lint, the hardware precheck or any upload. When the publish would create <you>/<slug> while a page with that slug you can see exists under another owner, it stops at stage target with nothing uploaded. The hint gives the flag that reaches the right page (--org adom for adom/am32-esc-v1, adom/molecule-publish#21). The owner the wiki names drives every later lookup.
Also.
NAMESPACE_CONFLICTgets a hint whosecmdis that flag, given only when the publisher can use it. An older server's code-less 409 maps there instead of toAMBIGUOUS_BARE_SLUG.MANIFEST_OWNER_IGNOREDwarns about anownerkey in package.json, which the upload never reads.- A private hardware publish shows one hero message: the precheck's warning is dropped when the server sends
HARDWARE_HERO_PENDING.
Order. It works against today's wiki: a 404 with no code means the route is missing, and it publishes as before. The new refusals start once git-wiki#334 is deployed.
Tests. cargo test in WSL after the merge: 354 unit and 67 integration tests pass.