Skip to content

Commit

Permalink
docs: update output examples
Browse files Browse the repository at this point in the history
  • Loading branch information
wraithgar committed Apr 22, 2024
1 parent c209e98 commit dfa4cab
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 50 deletions.
33 changes: 11 additions & 22 deletions docs/lib/content/commands/npm-profile.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,17 @@ support this interface.
* `npm profile get [<property>]`: Display all of the properties of your
profile, or one or more specific properties. It looks like:

```bash
+-----------------+---------------------------+
| name | example |
+-----------------+---------------------------+
| email | [email protected] (verified) |
+-----------------+---------------------------+
| two factor auth | auth-and-writes |
+-----------------+---------------------------+
| fullname | Example User |
+-----------------+---------------------------+
| homepage | |
+-----------------+---------------------------+
| freenode | |
+-----------------+---------------------------+
| twitter | |
+-----------------+---------------------------+
| github | |
+-----------------+---------------------------+
| created | 2015-02-26T01:38:35.892Z |
+-----------------+---------------------------+
| updated | 2017-10-02T21:29:45.922Z |
+-----------------+---------------------------+
```
name: example
email: [email protected] (verified)
two-factor auth: auth-and-writes
fullname: Example User
homepage:
freenode:
twitter:
github:
created: 2015-02-26T01:38:35.892Z
updated: 2017-10-02T21:29:45.922Z
```

* `npm profile set <property> <value>`: Set the value of a profile
Expand Down
38 changes: 10 additions & 28 deletions docs/lib/content/commands/npm-token.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,14 @@ This lets you list, create and revoke authentication tokens.
Shows a table of all active authentication tokens. You can request
this as JSON with `--json` or tab-separated values with `--parseable`.

```bash
+--------+---------+------------+----------+----------------+
| id | token | created | read-only | CIDR whitelist |
+--------+---------+------------+----------+----------------+
| 7f3134 | 1fa9ba… | 2017-10-02 | yes | |
+--------+---------+------------+----------+----------------+
| c03241 | af7aef… | 2017-10-02 | no | 192.168.0.1/24 |
+--------+---------+------------+----------+----------------+
| e0cf92 | 3a436a… | 2017-10-02 | no | |
+--------+---------+------------+----------+----------------+
| 63eb9d | 74ef35… | 2017-09-28 | no | |
+--------+---------+------------+----------+----------------+
| 2daaa8 | cbad5f… | 2017-09-26 | no | |
+--------+---------+------------+----------+----------------+
| 68c2fe | 127e51… | 2017-09-23 | no | |
+--------+---------+------------+----------+----------------+
| 6334e1 | 1dadd1… | 2017-09-23 | no | |
+--------+---------+------------+----------+----------------+
```
Read only token npm_1f… with id 7f3134 created 2017-10-21
Publish token npm_af… with id c03241 created 2017-10-02
with IP Whitelist: 192.168.0.1/24
Publish token npm_… with id e0cf92 created 2017-10-02
```

* `npm token create [--read-only] [--cidr=<cidr-ranges>]`:
Expand All @@ -49,16 +39,8 @@ This lets you list, create and revoke authentication tokens.
website](https://docs.npmjs.com/creating-and-viewing-access-tokens)
for more information on generating automation tokens.

```bash
+----------------+--------------------------------------+
| token | a73c9572-f1b9-8983-983d-ba3ac3cc913d |
+----------------+--------------------------------------+
| cidr_whitelist | |
+----------------+--------------------------------------+
| readonly | false |
+----------------+--------------------------------------+
| created | 2017-10-02T07:52:24.838Z |
+----------------+--------------------------------------+
```
Created publish token a73c9572-f1b9-8983-983d-ba3ac3cc913d
```

* `npm token revoke <token|id>`:
Expand Down

0 comments on commit dfa4cab

Please sign in to comment.