pnpm profile and token commands, implemented natively
Problem
The CLI lacked native profile and token commands, leaving users without a pnpm-native way to manage registry profiles, access tokens, and two-factor authentication.
Changes
I implemented pnpm profile for reading and updating profile data, changing passwords, and enabling or disabling two-factor authentication. I added pnpm token to list, create, and revoke registry tokens. The commands validate arguments before resolving credentials, keep paginated requests on the registry origin, limit redirects, and avoid retrying token creation because a retry could mint another active token. Diagnostics mask token arguments. Password and one-time-code prompts use existing capability interfaces and are tested with scripted input against a mock registry.
Result
Both commands use pnpm's registry and authentication infrastructure directly. Sensitive flows avoid exposing full token values or creating duplicate tokens.