Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to --input as json file #25

Closed
faris-git opened this issue Sep 16, 2019 · 3 comments · Fixed by #26
Closed

Add support to --input as json file #25

faris-git opened this issue Sep 16, 2019 · 3 comments · Fixed by #26
Assignees
Labels
enhancement New feature or request released
Projects

Comments

@faris-git
Copy link

faris-git commented Sep 16, 2019

Currently npm-audit-html only support stdin as input. It would be great if it could accept json file as input.
Something like this npm-audit-html --input audit.json --output report.html.

Also would be nice if it's support threshold(low, moderate, high, critical).

@nprail nprail added the enhancement New feature or request label Sep 16, 2019
@nprail
Copy link
Member

nprail commented Sep 16, 2019

Adding an --input option makes a lot of sense. Should be easy enough to add too.

I'm curious as to what your use-case is?

Threshold filtering is planned (see #2).

@nprail nprail added this to To do in Development via automation Sep 16, 2019
@faris-git
Copy link
Author

faris-git commented Sep 17, 2019

Adding an --input option makes a lot of sense. Should be easy enough to add too.

Yes, I'm waiting for it in next version :)

I'm curious as to what your use-case is?

I've a jenkins pipeline job which publishes NPM report as html for each build. Unfortunately I didn't find any package having support for all those options (audit thresholds + html as output). Now I need to use 2 package to make a html report and each npm package runs npm audit, that means 2x times executed which is superfluous and time consuming. The first package supports thresholds and can output only as json(but won't support html). So I need to use npm-audit-html for HTML.

Threshold filtering is planned (see #2).

That would be great

Thanks for this nice npm package 👍

nprail added a commit that referenced this issue Sep 18, 2019
@nprail nprail self-assigned this Sep 18, 2019
@nprail nprail mentioned this issue Sep 23, 2019
Merged
@nprail nprail moved this from To do to In progress in Development Oct 2, 2019
Development automation moved this from In progress to Done Nov 10, 2019
@nprail
Copy link
Member

nprail commented Nov 10, 2019

🎉 This issue has been resolved in version 1.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
Development
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants