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

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).

@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
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
None yet
Development

Successfully merging a pull request may close this issue.

2 participants