Skip to content

Commit 9c32c6c

Browse files
wraithgarfritzy
authored andcommitted
feat(rewrite): rewrite npm access
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>]
1 parent 854521b commit 9c32c6c

File tree

11 files changed

+517
-604
lines changed

11 files changed

+517
-604
lines changed

docs/content/commands/npm-access.md

+24-11
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,13 @@ description: Set access level on published packages
1111
<!-- see lib/commands/access.js -->
1212

1313
```bash
14-
npm access public [<package>]
15-
npm access restricted [<package>]
14+
npm access list packages [<user>|<scope>|<scope:team> [<package>]
15+
npm access list collaborators [<package> [<user>]]
16+
npm access get status [<package>]
17+
npm access set status=public|private [<package>]
18+
npm access set mfa=none|publish|automation [<package>]
1619
npm access grant <read-only|read-write> <scope:team> [<package>]
1720
npm access revoke <scope:team> [<package>]
18-
npm access 2fa-required [<package>]
19-
npm access 2fa-not-required [<package>]
20-
npm access ls-packages [<user>|<scope>|<scope:team>]
21-
npm access ls-collaborators [<package> [<user>]]
22-
npm access edit [<package>]
2321
```
2422
2523
<!-- automatically generated, do not edit manually -->
@@ -91,12 +89,17 @@ Management of teams and team memberships is done with the `npm team` command.
9189
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
9290
<!-- automatically generated, do not edit manually -->
9391
<!-- see lib/utils/config/definitions.js -->
94-
#### `registry`
92+
#### `json`
9593
96-
* Default: "https://registry.npmjs.org/"
97-
* Type: URL
94+
* Default: false
95+
* Type: Boolean
9896
99-
The base URL of the npm registry.
97+
Whether or not to output JSON data, rather than the normal output.
98+
99+
* In `npm pkg set` it enables parsing set values with JSON.parse() before
100+
saving them to your `package.json`.
101+
102+
Not supported by all npm commands.
100103
101104
<!-- automatically generated, do not edit manually -->
102105
<!-- see lib/utils/config/definitions.js -->
@@ -115,6 +118,16 @@ password, npm will prompt on the command line for one.
115118
<!-- automatically generated, do not edit manually -->
116119
<!-- see lib/utils/config/definitions.js -->
117120
121+
#### `registry`
122+
123+
* Default: "https://registry.npmjs.org/"
124+
* Type: URL
125+
126+
The base URL of the npm registry.
127+
128+
<!-- automatically generated, do not edit manually -->
129+
<!-- see lib/utils/config/definitions.js -->
130+
118131
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
119132
120133
### See Also

0 commit comments

Comments
 (0)