Skip to content

Commit

Permalink
feat(api-v3): invert truncate option default value
Browse files Browse the repository at this point in the history
This changes the default value of the `truncate` option from `false` to `true` for both the `ba`
and `search` commands.

BREAKING CHANGE: The `truncate` option of the `ba` and `search` commands now defaults to `true`,
per Troy's recommendation. If you do not negate it explicitly, each `Breach` result will only
contain the breach name (no metadata).
  • Loading branch information
wKovacs64 committed Jul 19, 2019
1 parent af92a3d commit 6a9826e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ $ pwned pw Password1234
Search both breaches and pastes for an account (truncating breach data):

```
$ pwned search nobody -t
$ pwned search nobody
breaches:
-
Name: BattlefieldHeroes
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ $ pwned pw Password1234
Search both breaches and pastes for an account (truncating breach data):

```
$ pwned search nobody -t
$ pwned search nobody
breaches:
-
Name: BattlefieldHeroes
Expand Down
4 changes: 2 additions & 2 deletions src/commands/ba.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const builder: CommandBuilder<
alias: 'truncate',
describe: 'truncate data to just the name of each breach',
type: 'boolean',
default: false,
default: true,
})
.option('r', {
alias: 'raw',
Expand All @@ -83,7 +83,7 @@ export const builder: CommandBuilder<
* @param {boolean} [argv.includeUnverified] include "unverified" breaches in
* the results (by default, only verified breaches are included)
* @param {boolean} [argv.truncate] truncate the results to only include the
* name of each breach (default: false)
* name of each breach (default: true)
* @param {boolean} [argv.raw] output the raw JSON data (default: false)
* @returns {Promise<void>} the resulting Promise where output is rendered
*/
Expand Down
4 changes: 2 additions & 2 deletions src/commands/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const builder: CommandBuilder<
alias: 'truncate',
describe: 'truncate data to just the name of each breach',
type: 'boolean',
default: false,
default: true,
})
.option('r', {
alias: 'raw',
Expand All @@ -73,7 +73,7 @@ export const builder: CommandBuilder<
* @param {string} [argv.domainFilter] a domain by which to filter the results
* (default: all domains)
* @param {boolean} [argv.truncate] truncate the results to only include the
* name of each breach (default: false)
* name of each breach (default: true)
* @param {boolean} [argv.raw] output the raw JSON data (default: false)
* @returns {Promise<void>} the resulting Promise where output is rendered
*/
Expand Down

0 comments on commit 6a9826e

Please sign in to comment.