Skip to content

Commit

Permalink
feat(rewrite): rewrite npm access
Browse files Browse the repository at this point in the history
BREAKING CHANGE: renames most of the `npm access` subcommands

 - `edit`, having never been implemented, is removed
 - `public` is now `set status=public`
 - `restricted` is now `set status=private`
 - `ls-packages` is now `list packages`
 - `ls-collaborators` is now `list collaborators`
 - `2fa-required` is now `set mfa=publish`
 - `2fa-not-required` is now `set mfa=none`
 - `set mfa=automation` is added
 - output is no longer in json by default

Usage:
npm access list packages [<user>|<scope>|<scope:team> [<package>]
npm access list collaborators [<package> [<user>]]
npm access get status [<package>]
npm access set status=public|private [<package>]
npm access set mfa=false|publish|automation [<package>]
npm access grant <read-only|read-write> <scope:team> [<package>]
npm access revoke <scope:team> [<package>]

Options:
[--json] [--otp <otp>] [--registry <registry>]
  • Loading branch information
wraithgar authored and fritzy committed Sep 14, 2022
1 parent 854521b commit 9c32c6c
Show file tree
Hide file tree
Showing 11 changed files with 517 additions and 604 deletions.
35 changes: 24 additions & 11 deletions docs/content/commands/npm-access.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,13 @@ description: Set access level on published packages
<!-- see lib/commands/access.js -->

```bash
npm access public [<package>]
npm access restricted [<package>]
npm access list packages [<user>|<scope>|<scope:team> [<package>]
npm access list collaborators [<package> [<user>]]
npm access get status [<package>]
npm access set status=public|private [<package>]
npm access set mfa=none|publish|automation [<package>]
npm access grant <read-only|read-write> <scope:team> [<package>]
npm access revoke <scope:team> [<package>]
npm access 2fa-required [<package>]
npm access 2fa-not-required [<package>]
npm access ls-packages [<user>|<scope>|<scope:team>]
npm access ls-collaborators [<package> [<user>]]
npm access edit [<package>]
```
<!-- automatically generated, do not edit manually -->
Expand Down Expand Up @@ -91,12 +89,17 @@ Management of teams and team memberships is done with the `npm team` command.
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
#### `registry`
#### `json`
* Default: "https://registry.npmjs.org/"
* Type: URL
* Default: false
* Type: Boolean
The base URL of the npm registry.
Whether or not to output JSON data, rather than the normal output.
* In `npm pkg set` it enables parsing set values with JSON.parse() before
saving them to your `package.json`.
Not supported by all npm commands.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
Expand All @@ -115,6 +118,16 @@ password, npm will prompt on the command line for one.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
#### `registry`
* Default: "https://registry.npmjs.org/"
* Type: URL
The base URL of the npm registry.
<!-- automatically generated, do not edit manually -->
<!-- see lib/utils/config/definitions.js -->
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
### See Also
Expand Down
Loading

0 comments on commit 9c32c6c

Please sign in to comment.