Minor Changes
-
#14630
42df9bbThanks @penalosa! - Extract the Cloudflare CLI auth layer into a product-agnostic@cloudflare/workers-authcoreThe OAuth login/logout/refresh, credential storage, config cache, and account-selection machinery is now shared behind an
AuthProductdescriptor, with a thin per-CLI entrypoint on top.@cloudflare/workers-auth/wrangler(createWranglerAuth) preserves wrangler's existing behaviour, and a new@cloudflare/workers-auth/cf(createCfAuth) adds thecfCLI: its own OAuth app registration (client id, callback port, branded consent pages, scoped-token-only auth), a dedicated scope catalog, JSON config files under~/.config/cloudflare, and an isolated config-cache namespace socflogin/logout never purges wrangler's cache.As part of the extraction,
@cloudflare/workers-utilsnow exports the sharedcreateConfigCache(with anamespaceoption),openInBrowser, and theisInteractive/isNonInteractiveOrCI/isCITTY-and-CI detection helpers (each taking the caller's logger as a parameter rather than relying on a singleton). These read a bundledci-info, so consumers that need to fake CI in their tests should mock this package's helpers rather thanci-infodirectly.