Skip to content

feat(bindings): registry configuration, credential store, and license support - #551

Draft
zeroshade wants to merge 2 commits into
build/release-capi-rustfrom
feat/bindings-auth-registries
Draft

zeroshade wants to merge 2 commits into
build/release-capi-rustfrom
feat/bindings-auth-registries

Conversation

@zeroshade

Copy link
Copy Markdown
Member

Stacked on #549.

Brings the language bindings up to the CLI's registry and auth handling. Goes through internal/api → C ABI → Rust → npm-wasm.

Registries

  • Explicit registry list: registries: [{url, name}] (C: registry.<n>.url / registry.<n>.name) → dbc.WithRegistries. It is used as given, with no merging.
  • Behaviour change: bindings now honor the user's global config.toml by default, like the CLI. registryConfig: "none" (C: registry_config=none) opts out. In the browser it is always none.
  • Project registries: projectFile (C: project_file) → the registries / replace_defaults keys from a dbc.toml.
  • baseURL or an explicit list overrides all configuration files, as DBC_BASE_URL does for the CLI.

Credentials

  • login(credential) / logout(registryURL) (C: dbc_login, dbc_logout) store or remove token credentials in dbc's credential store.
  • An injected credential now applies only to its own host; other hosts fall back to stored credentials, matching what the header already documented. credentialStore: "none" (C: credential_store=none) disables stored-credential lookup.
  • auth.AddCredential/RemoveCredential re-read the credentials file before writing. Without this, a stale snapshot held by another worker or process dropped other entries on write. Test included.

License

  • licensePath() / installLicense(path, {force}) (C: dbc_license_path, dbc_install_license + DBC_LICENSE_FORCE).

The C ABI goes from 13 to 17 exports; Rust bindings are regenerated. Node/Rust docs note that credential lookups in an already-running runtime don't see changes another runtime makes.

Testing

Go (including -race ./auth), npm-wasm smoke and worker tests, Rust tests and clippy, bindgen drift check, and a throwaway C ABI smoke run against a local registry with an isolated credential store.

@zeroshade
zeroshade force-pushed the feat/bindings-auth-registries branch from ad71956 to c729d4e Compare October 28, 2026 23:45
@zeroshade
zeroshade added this pull request to stack #550 October 29, 2026 15:36
@zeroshade
zeroshade force-pushed the feat/bindings-auth-registries branch from 73d9a2f to 6db8b63 Compare October 29, 2026 17:07
@zeroshade
zeroshade force-pushed the feat/bindings-auth-registries branch from 6db8b63 to 09e7021 Compare October 30, 2026 15:54

This branch was successfully deployed

1 active deployment
snapshot — 09e7021a Deployed Oct 30, 2026 by zeroshade via snapshot #1099
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