Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

Add support for Alternate Registries #233

Closed

Conversation

BarbossHack
Copy link
Contributor

@BarbossHack BarbossHack commented May 18, 2024

Add support for alternate registries, as discussed in #217 (comment) :

  • Read alternate registries from ~/.cargo/config.toml (or ~/.cargo/config for legacy) if any.
  • Read registry tokens from ~/.cargo/credentials.toml if any.
  • Support registry authentification with cargo:token credentials.
  • Does not support registry authenfication with cargo:libsecret, cargo:macos-keychain, cargo:wincred. Support may be added later.
  • Decorator (mouseover popup) fields View Crate, Check review and Doc are hidden for crates that are on alternate registries.
  • Default behavior is to ignore crates that have an alternate registry :
    • If a crate have an alternate registry, but it could not be found in config.toml, just ignore it without error, and do NOT use indexServerURL as a fallback registry.
    • If the registry is found, then fetch versions on this registry.
  • I've added a script (./sample/alternate-registry.sh) to facilitate testing with alternate registries, for development purposes only.

Other modifications :

  • I removed src/api/crates-index-server.ts as it was not used anymore
  • I removed isSparseCompatible() as it was not used anymore

Fixes #213
Fixes #182

@BarbossHack BarbossHack deleted the alternate-registries branch June 29, 2024 20:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for multiple registries! Support for private registries
1 participant