diff --git a/lib/commands/token.js b/lib/commands/token.js index 46267d5b2ef6c..b248d6a789a1f 100644 --- a/lib/commands/token.js +++ b/lib/commands/token.js @@ -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 ', 'create --name= [--token-description=] [--packages=] [--packages-all] [--scopes=] [--orgs=] [--packages-and-scopes-permission=] [--orgs-permission=] [--expires=] [--cidr=] [--bypass-2fa] [--password=]'] + static usage = ['list', 'revoke ', 'create'] static params = ['name', 'token-description', 'expires', diff --git a/tap-snapshots/test/lib/docs.js.test.cjs b/tap-snapshots/test/lib/docs.js.test.cjs index f173a1cf67720..ba3a537259c59 100644 --- a/tap-snapshots/test/lib/docs.js.test.cjs +++ b/tap-snapshots/test/lib/docs.js.test.cjs @@ -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. @@ -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. @@ -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). @@ -4457,13 +4455,12 @@ Manage your authentication tokens Usage: npm token list npm token revoke -npm token create --name= [--token-description=] [--packages=] [--packages-all] [--scopes=] [--orgs=] [--packages-and-scopes-permission=] [--orgs-permission=] [--expires=] [--cidr=] [--bypass-2fa] [--password=] +npm token create Options: [--name ] [--token-description ] [--expires ] -[--packages [--packages ...]] [--packages-all] -[--scopes <@scope1,@scope2> [--scopes <@scope1,@scope2> ...]] -[--orgs [--orgs ...]] +[--packages [--packages ...]] [--packages-all] +[--scopes [--scopes ...]] [--orgs [--orgs ...]] [--packages-and-scopes-permission ] [--orgs-permission ] [--cidr [--cidr ...]] [--bypass-2fa] [--password ] @@ -4474,7 +4471,7 @@ Run "npm help token" for more info \`\`\`bash npm token list npm token revoke -npm token create --name= [--token-description=] [--packages=] [--packages-all] [--scopes=] [--orgs=] [--packages-and-scopes-permission=] [--orgs-permission=] [--expires=] [--cidr=] [--bypass-2fa] [--password=] +npm token create \`\`\` Note: This command is unaware of workspaces. diff --git a/workspaces/config/lib/definitions/definitions.js b/workspaces/config/lib/definitions/definitions.js index 570abecdb4484..766182ad2bb1c 100644 --- a/workspaces/config/lib/definitions/definitions.js +++ b/workspaces/config/lib/definitions/definitions.js @@ -1442,11 +1442,9 @@ const definitions = { orgs: new Definition('orgs', { default: null, type: [null, String, Array], - hint: '', 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, }), @@ -1549,11 +1547,9 @@ const definitions = { packages: new Definition('packages', { default: [], type: [null, String, Array], - hint: '', 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, }), @@ -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, }),