You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The CLI should support automation tokens (which are already available on the website). Currently, npm access has a binary understanding of 2fa support with the subcommands 2fa-required & 2fa-not-required, we should expand the set of subcommands to better consolidate functionality & not arbitrarily expand the subcommands required to manage this config.
Exit Criteria
add new list subcommand with positional args of <packages|collaborators> & alias (npm access ls)
note: consider moving this functionality/information into npm view
ex. npm access list packages [<user>|<scope>|<scope:team>]
ex. npm access list collaborators [<package> [<user>]]
ex. npm access ls packages @darcyclarke
add new get <key> & set <key=val> subcommands with the following keys/values:
status: public|private
mfa: false|publish|automation (alias: 2fa)
Tests are written to reflect new capabilities
Documentation is updated to reflect new capabilities
Examples
npm access get status lodash # "public"
npm access get status @secret/private-pkg-ex # "private"
npm access set status=private lodash # sets the public accessibility of the package to private
npm access set mfa=publish lodash # sets a 2fa requirement for publishing with publish tokens
npm access set mfa=automation lodash # sets a 2fa requirement for publishing with automation tokens
npm access set mfa=false # turns off 2fa requirements for publishing
darcyclarke
changed the title
BREAKING CHANGE(access): major refactor & 2fa publish for automation tokens support
feat(access): add new set & listApr 21, 2022
@wraithgar can you look into this as a new API surface area? It should essentially replace the legacy subcommands (ref. #500) but shouldn't expand the functionality if we don't have the APIs to support that.
Changing mfa=false to mfa=none so that the code doesn't have 'false' strings it's parsing. Having a string with a value false is a little confusing. We can bike shed this before v9 lands.
Summary
The CLI should support automation tokens (which are already available on the website). Currently,
npm access
has a binary understanding of 2fa support with the subcommands2fa-required
&2fa-not-required
, we should expand the set of subcommands to better consolidate functionality & not arbitrarily expand the subcommands required to manage this config.Exit Criteria
list
subcommand with positional args of<packages|collaborators>
& alias (npm access ls
)npm view
npm access list packages [<user>|<scope>|<scope:team>]
npm access list collaborators [<package> [<user>]]
npm access ls packages @darcyclarke
get <key>
&set <key=val>
subcommands with the following keys/values:status
:public|private
mfa
:false|publish|automation
(alias:2fa
)Examples
References
https://www.npmjs.com/settings/<tokens>/tokens
The text was updated successfully, but these errors were encountered: