Skip to content

Commit

Permalink
fix(cli): disable all transformers on redact cmd for simplicity
Browse files Browse the repository at this point in the history
  • Loading branch information
boneskull committed Feb 6, 2020
1 parent 23334c0 commit b8c9c6d
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions packages/cli/src/commands/redact.js
Expand Up @@ -6,8 +6,7 @@ import {
fromFilepathsToReports,
GROUPS,
mergeCommandConfig,
OPTIONS,
getTransformerOptions
OPTIONS
} from './common.js';
const {transform, fromTransformerChain} = api;
const {of, iif, concatMap} = observable;
Expand All @@ -16,7 +15,7 @@ const DEFAULT_TRANSFORMER = 'json';

export const command = 'redact <file..>';

export const desc = 'Redact secrets from report file(s)';
export const desc = 'Redact secrets from report file(s) and output JSON';

export const builder = yargs =>
yargs
Expand All @@ -30,16 +29,7 @@ export const builder = yargs =>
group: GROUPS.OUTPUT
},
..._.omit(['output', 'show-secrets-unsafe'], OPTIONS.OUTPUT),
...getTransformerOptions({
sourceType: 'report',
defaultTransformer: DEFAULT_TRANSFORMER,
omit: ['redact'],
extra: {
pretty: {
default: true
}
}
})
..._.defaultsDeep(OPTIONS.JSON_TRANSFORM, {pretty: {default: true}})
});

export const handler = argv => {
Expand Down

0 comments on commit b8c9c6d

Please sign in to comment.