Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f3146df

Browse files
committed
fix: update the token list text
1 parent 54929ce commit f3146df

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

lib/commands/token.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,8 @@ class Token extends BaseCommand {
9595
this.generateTokenIds(tokens, 6)
9696
const chalk = this.npm.chalk
9797
for (const token of tokens) {
98-
const level = token.readonly ? 'Read only token' : 'Publish token'
9998
const created = String(token.created).slice(0, 10)
100-
output.standard(`${chalk.blue(level)} ${token.token}… with id ${chalk.cyan(token.id)} created ${created}`)
99+
output.standard(`${chalk.blue('Token')} ${token.token}… with id ${chalk.cyan(token.id)} created ${created}`)
101100
if (token.cidr_whitelist) {
102101
output.standard(`with IP whitelist: ${chalk.green(token.cidr_whitelist.join(','))}`)
103102
}

test/lib/commands/token.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ t.test('token list', async t => {
6363
registry.getTokens(tokens)
6464
await npm.exec('token', [])
6565
t.strictSame(outputs, [
66-
`Publish token efgh5678efgh5678… with id abcd123 created ${now.slice(0, 10)}`,
66+
`Token efgh5678efgh5678… with id abcd123 created ${now.slice(0, 10)}`,
6767
'',
68-
`Read only token hgfe8765… with id abcd125 created ${now.slice(0, 10)}`,
68+
`Token hgfe8765… with id abcd125 created ${now.slice(0, 10)}`,
6969
'with IP whitelist: 192.168.1.1/32',
7070
'',
7171
])

0 commit comments

Comments
 (0)