Skip to content

Commit 353520a

Browse files
committed
CLI documentation update from CI
1 parent 707b998 commit 353520a

File tree

3 files changed

+35
-8
lines changed

3 files changed

+35
-8
lines changed

cli/v8

Submodule v8 updated 109 files

content/cli/v8/commands/npm-access.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,29 +46,28 @@ For all of the subcommands, `npm access` will perform actions on the packages
4646
in the current working directory if no package name is passed to the
4747
subcommand.
4848
49-
* public / restricted:
49+
* public / restricted (deprecated):
5050
Set a package to be either publicly accessible or restricted.
5151
52-
* grant / revoke:
52+
* grant / revoke (deprecated):
5353
Add or remove the ability of users and teams to have read-only or read-write
5454
access to a package.
5555
56-
* 2fa-required / 2fa-not-required:
56+
* 2fa-required / 2fa-not-required (deprecated):
5757
Configure whether a package requires that anyone publishing it have two-factor
5858
authentication enabled on their account.
5959
60-
* ls-packages:
60+
* ls-packages (deprecated):
6161
Show all of the packages a user or a team is able to access, along with the
6262
access level, except for read-only public packages (it won't print the whole
6363
registry listing)
6464
65-
* ls-collaborators:
65+
* ls-collaborators (deprecated):
6666
Show all of the access privileges for a package. Will only show permissions
6767
for packages to which you have at least read access. If `<user>` is passed in,
6868
the list is filtered only to teams _that_ user happens to belong to.
6969
70-
* edit:
71-
Set the access privileges for a package at once using `$EDITOR`.
70+
* edit (not implemented)
7271
7372
### Details
7473

content/cli/v8/configuring-npm/npmrc.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,34 @@ consistent across updates. Set fields in here using the `./configure`
100100
script that comes with npm. This is primarily for distribution maintainers
101101
to override default configs in a standard and consistent manner.
102102

103+
### Auth related configuration
104+
105+
The settings `_auth`, `_authToken`, `username` and `_password` must all be
106+
scoped to a specific registry. This ensures that `npm` will never send
107+
credentials to the wrong host.
108+
109+
In order to scope these values, they must be prefixed by a URI fragment.
110+
If the credential is meant for any request to a registry on a single host,
111+
the scope may look like `//registry.npmjs.org/:`. If it must be scoped to a
112+
specific path on the host that path may also be provided, such as
113+
`//my-custom-registry.org/unique/path:`.
114+
115+
```
116+
; bad config
117+
_authToken=MYTOKEN
118+
119+
; good config
120+
@myorg:registry=https://somewhere-else.com/myorg
121+
@another:registry=https://somewhere-else.com/another
122+
//registry.npmjs.org/:_authToken=MYTOKEN
123+
; would apply to both @myorg and @another
124+
; //somewhere-else.com/:_authToken=MYTOKEN
125+
; would apply only to @myorg
126+
//somewhere-else.com/myorg/:_authToken=MYTOKEN1
127+
; would apply only to @another
128+
//somewhere-else.com/another/:_authToken=MYTOKEN2
129+
```
130+
103131
### See also
104132

105133
* [npm folders](/cli/v8/configuring-npm/folders)

0 commit comments

Comments
 (0)