diff --git a/dist/index.js b/dist/index.js index 736da46..a5bcf59 100644 --- a/dist/index.js +++ b/dist/index.js @@ -187,7 +187,7 @@ function run() { core.info(`Current working directory: ${process.cwd()}`); // get audit-level const auditLevel = core.getInput('audit_level', { required: true }); - if (!['critical', 'high', 'moderate', 'low'].includes(auditLevel)) { + if (!['critical', 'high', 'moderate', 'low', 'info', 'none'].includes(auditLevel)) { throw new Error('Invalid input: audit_level'); } const productionFlag = core.getInput('production_flag', { required: false }); diff --git a/package-lock.json b/package-lock.json index 4fd9476..df19574 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "npm-audit-action", - "version": "2.0.0", + "version": "2.1.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "npm-audit-action", - "version": "2.0.0", + "version": "2.1.0", "license": "MIT", "dependencies": { "@actions/core": "^1.6.0", diff --git a/package.json b/package.json index dc8cfb0..707eeee 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "npm-audit-action", - "version": "2.0.0", + "version": "2.1.0", "private": true, "description": "GitHub Action to run `npm audit`", "main": "lib/main.js", diff --git a/src/main.ts b/src/main.ts index 71eeab2..bac4272 100644 --- a/src/main.ts +++ b/src/main.ts @@ -21,7 +21,11 @@ export async function run(): Promise { // get audit-level const auditLevel = core.getInput('audit_level', {required: true}) - if (!['critical', 'high', 'moderate', 'low'].includes(auditLevel)) { + if ( + !['critical', 'high', 'moderate', 'low', 'info', 'none'].includes( + auditLevel + ) + ) { throw new Error('Invalid input: audit_level') }