WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/commands/token.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ async function paginate (href, opts, items = []) {
class Token extends BaseCommand {
static description = 'Manage your authentication tokens'
static name = 'token'
static usage = ['list', 'revoke <id|token>', 'create --name=<name> [--token-description=<desc>] [--packages=<pkg1,pkg2>] [--packages-all] [--scopes=<scope1,scope2>] [--orgs=<org1,org2>] [--packages-and-scopes-permission=<read-only|read-write|no-access>] [--orgs-permission=<read-only|read-write|no-access>] [--expires=<days>] [--cidr=<ip-range>] [--bypass-2fa] [--password=<pass>]']
static usage = ['list', 'revoke <id|token>', 'create']
static params = ['name',
'token-description',
'expires',
Expand Down
19 changes: 8 additions & 11 deletions tap-snapshots/test/lib/docs.js.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -1196,8 +1196,7 @@ time.
* Type: null or String (can be set multiple times)
When creating a Granular Access Token with \`npm token create\`, this limits
the token access to specific organizations. Provide a comma-separated list
of organization names.
the token access to specific organizations.
Expand Down Expand Up @@ -1285,8 +1284,7 @@ For \`list\` this means the output will be based on the tree described by the
* Type: null or String (can be set multiple times)
When creating a Granular Access Token with \`npm token create\`, this limits
the token access to specific packages. Provide a comma-separated list of
package names.
the token access to specific packages.
Expand Down Expand Up @@ -1622,8 +1620,8 @@ npm init --scope=@foo --yes
* Type: null or String (can be set multiple times)
When creating a Granular Access Token with \`npm token create\`, this limits
the token access to specific scopes. Provide a comma-separated list of scope
names (with or without @ prefix).
the token access to specific scopes. Provide a scope name (with or without @
prefix).
Expand Down Expand Up @@ -4457,13 +4455,12 @@ Manage your authentication tokens
Usage:
npm token list
npm token revoke <id|token>
npm token create --name=<name> [--token-description=<desc>] [--packages=<pkg1,pkg2>] [--packages-all] [--scopes=<scope1,scope2>] [--orgs=<org1,org2>] [--packages-and-scopes-permission=<read-only|read-write|no-access>] [--orgs-permission=<read-only|read-write|no-access>] [--expires=<days>] [--cidr=<ip-range>] [--bypass-2fa] [--password=<pass>]
npm token create
Options:
[--name <name>] [--token-description <token-description>] [--expires <expires>]
[--packages <pkg1,pkg2> [--packages <pkg1,pkg2> ...]] [--packages-all]
[--scopes <@scope1,@scope2> [--scopes <@scope1,@scope2> ...]]
[--orgs <org1,org2> [--orgs <org1,org2> ...]]
[--packages <packages> [--packages <packages> ...]] [--packages-all]
[--scopes <scopes> [--scopes <scopes> ...]] [--orgs <orgs> [--orgs <orgs> ...]]
[--packages-and-scopes-permission <read-only|read-write|no-access>]
[--orgs-permission <read-only|read-write|no-access>]
[--cidr <cidr> [--cidr <cidr> ...]] [--bypass-2fa] [--password <password>]
Expand All @@ -4474,7 +4471,7 @@ Run "npm help token" for more info
\`\`\`bash
npm token list
npm token revoke <id|token>
npm token create --name=<name> [--token-description=<desc>] [--packages=<pkg1,pkg2>] [--packages-all] [--scopes=<scope1,scope2>] [--orgs=<org1,org2>] [--packages-and-scopes-permission=<read-only|read-write|no-access>] [--orgs-permission=<read-only|read-write|no-access>] [--expires=<days>] [--cidr=<ip-range>] [--bypass-2fa] [--password=<pass>]
npm token create
\`\`\`
Note: This command is unaware of workspaces.
Expand Down
11 changes: 3 additions & 8 deletions workspaces/config/lib/definitions/definitions.js
Original file line number Diff line number Diff line change
Expand Up @@ -1442,11 +1442,9 @@ const definitions = {
orgs: new Definition('orgs', {
default: null,
type: [null, String, Array],
hint: '<org1,org2>',
description: `
When creating a Granular Access Token with \`npm token create\`,
this limits the token access to specific organizations. Provide
a comma-separated list of organization names.
this limits the token access to specific organizations.
`,
flatten,
}),
Expand Down Expand Up @@ -1549,11 +1547,9 @@ const definitions = {
packages: new Definition('packages', {
default: [],
type: [null, String, Array],
hint: '<pkg1,pkg2>',
description: `
When creating a Granular Access Token with \`npm token create\`,
this limits the token access to specific packages. Provide
a comma-separated list of package names.
this limits the token access to specific packages.
`,
flatten,
}),
Expand Down Expand Up @@ -1955,11 +1951,10 @@ const definitions = {
scopes: new Definition('scopes', {
default: null,
type: [null, String, Array],
hint: '<@scope1,@scope2>',
description: `
When creating a Granular Access Token with \`npm token create\`,
this limits the token access to specific scopes. Provide
a comma-separated list of scope names (with or without @ prefix).
a scope name (with or without @ prefix).
`,
flatten,
}),
Expand Down
Loading