From 6a9826ebda948d0600edf0ef73e4948f070fa932 Mon Sep 17 00:00:00 2001 From: Justin Hall Date: Fri, 19 Jul 2019 17:11:07 -0600 Subject: [PATCH] feat(api-v3): invert truncate option default value 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). --- README.md | 2 +- docs/index.md | 2 +- src/commands/ba.ts | 4 ++-- src/commands/search.ts | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 35eff0f7..52f06a08 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/docs/index.md b/docs/index.md index 4c1e846a..1e7e62a9 100644 --- a/docs/index.md +++ b/docs/index.md @@ -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 diff --git a/src/commands/ba.ts b/src/commands/ba.ts index 12d73ae9..cb77b5d6 100644 --- a/src/commands/ba.ts +++ b/src/commands/ba.ts @@ -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', @@ -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} the resulting Promise where output is rendered */ diff --git a/src/commands/search.ts b/src/commands/search.ts index 8279a08e..0420edd1 100644 --- a/src/commands/search.ts +++ b/src/commands/search.ts @@ -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', @@ -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} the resulting Promise where output is rendered */