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

Commit 182442b

Browse files
committed
fix: updates hints to use cli paradigm
1 parent 7896e51 commit 182442b

File tree

3 files changed

+12
-20
lines changed

3 files changed

+12
-20
lines changed

lib/commands/token.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ async function paginate (href, opts, items = []) {
1616
class Token extends BaseCommand {
1717
static description = 'Manage your authentication tokens'
1818
static name = 'token'
19-
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>]']
19+
static usage = ['list', 'revoke <id|token>', 'create [options]']
2020
static params = ['name',
2121
'token-description',
2222
'expires',

tap-snapshots/test/lib/docs.js.test.cjs

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1196,8 +1196,7 @@ time.
11961196
* Type: null or String (can be set multiple times)
11971197

11981198
When creating a Granular Access Token with \`npm token create\`, this limits
1199-
the token access to specific organizations. Provide a comma-separated list
1200-
of organization names.
1199+
the token access to specific organizations.
12011200

12021201

12031202

@@ -1285,8 +1284,7 @@ For \`list\` this means the output will be based on the tree described by the
12851284
* Type: null or String (can be set multiple times)
12861285

12871286
When creating a Granular Access Token with \`npm token create\`, this limits
1288-
the token access to specific packages. Provide a comma-separated list of
1289-
package names.
1287+
the token access to specific packages.
12901288

12911289

12921290

@@ -1622,8 +1620,8 @@ npm init --scope=@foo --yes
16221620
* Type: null or String (can be set multiple times)
16231621

16241622
When creating a Granular Access Token with \`npm token create\`, this limits
1625-
the token access to specific scopes. Provide a comma-separated list of scope
1626-
names (with or without @ prefix).
1623+
the token access to specific scopes. Provide a scope name (with or without @
1624+
prefix).
16271625

16281626

16291627

@@ -4457,13 +4455,12 @@ Manage your authentication tokens
44574455
Usage:
44584456
npm token list
44594457
npm token revoke <id|token>
4460-
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>]
4458+
npm token create [options]
44614459

44624460
Options:
44634461
[--name <name>] [--token-description <token-description>] [--expires <expires>]
4464-
[--packages <pkg1,pkg2> [--packages <pkg1,pkg2> ...]] [--packages-all]
4465-
[--scopes <@scope1,@scope2> [--scopes <@scope1,@scope2> ...]]
4466-
[--orgs <org1,org2> [--orgs <org1,org2> ...]]
4462+
[--packages <packages> [--packages <packages> ...]] [--packages-all]
4463+
[--scopes <scopes> [--scopes <scopes> ...]] [--orgs <orgs> [--orgs <orgs> ...]]
44674464
[--packages-and-scopes-permission <read-only|read-write|no-access>]
44684465
[--orgs-permission <read-only|read-write|no-access>]
44694466
[--cidr <cidr> [--cidr <cidr> ...]] [--bypass-2fa] [--password <password>]
@@ -4474,7 +4471,7 @@ Run "npm help token" for more info
44744471
\`\`\`bash
44754472
npm token list
44764473
npm token revoke <id|token>
4477-
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>]
4474+
npm token create [options]
44784475
\`\`\`
44794476

44804477
Note: This command is unaware of workspaces.

workspaces/config/lib/definitions/definitions.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1442,11 +1442,9 @@ const definitions = {
14421442
orgs: new Definition('orgs', {
14431443
default: null,
14441444
type: [null, String, Array],
1445-
hint: '<org1,org2>',
14461445
description: `
14471446
When creating a Granular Access Token with \`npm token create\`,
1448-
this limits the token access to specific organizations. Provide
1449-
a comma-separated list of organization names.
1447+
this limits the token access to specific organizations.
14501448
`,
14511449
flatten,
14521450
}),
@@ -1549,11 +1547,9 @@ const definitions = {
15491547
packages: new Definition('packages', {
15501548
default: [],
15511549
type: [null, String, Array],
1552-
hint: '<pkg1,pkg2>',
15531550
description: `
15541551
When creating a Granular Access Token with \`npm token create\`,
1555-
this limits the token access to specific packages. Provide
1556-
a comma-separated list of package names.
1552+
this limits the token access to specific packages.
15571553
`,
15581554
flatten,
15591555
}),
@@ -1955,11 +1951,10 @@ const definitions = {
19551951
scopes: new Definition('scopes', {
19561952
default: null,
19571953
type: [null, String, Array],
1958-
hint: '<@scope1,@scope2>',
19591954
description: `
19601955
When creating a Granular Access Token with \`npm token create\`,
19611956
this limits the token access to specific scopes. Provide
1962-
a comma-separated list of scope names (with or without @ prefix).
1957+
a scope name (with or without @ prefix).
19631958
`,
19641959
flatten,
19651960
}),

0 commit comments

Comments
 (0)