Change8

@cloudflare/workers-utils@0.27.0

📦 cloudflare-workersView on GitHub →
3 features🔧 4 symbols

Summary

The Cloudflare CLI auth layer has been extracted into a new product-agnostic core package, `@cloudflare/workers-auth`, improving code sharing and introducing new features for the `cf` CLI. Utilities for configuration and TTY detection have also been enhanced in `@cloudflare/workers-utils`.

Migration Steps

  1. If you are using TTY and CI detection helpers from `@cloudflare/workers-utils` in tests, mock the helpers directly from `@cloudflare/workers-utils` instead of `ci-info`.

✨ New Features

  • Extract the Cloudflare CLI auth layer into a product-agnostic `@cloudflare/workers-auth` core, sharing OAuth login/logout/refresh, credential storage, config cache, and account-selection machinery behind an `AuthProduct` descriptor.
  • Introduce `@cloudflare/workers-auth/cf` for the `cf` CLI, featuring its own OAuth app registration, dedicated scope catalog, JSON config files under `~/.config/cloudflare`, and an isolated config-cache namespace.
  • Export `createConfigCache` (with a `namespace` option), `openInBrowser`, and TTY/CI detection helpers (`isInteractive`, `isNonInteractiveOrCI`, `isCI`) from `@cloudflare/workers-utils`, which now accept a logger parameter.

Affected Symbols