@xliic/cicd-core-node
Advanced tools
Comparing version 2.2.3 to 2.2.4
@@ -79,3 +79,3 @@ "use strict"; | ||
if (audit.mapping) { | ||
mappedFiles = checkMappedFiles(audit.mapping); | ||
mappedFiles = checkMappedFiles(rootDir, audit.mapping); | ||
} | ||
@@ -102,7 +102,7 @@ // failure conditions | ||
} | ||
function checkMappedFiles(mappedFiles) { | ||
function checkMappedFiles(rootDir, mappedFiles) { | ||
const fileMap = {}; | ||
const uniqueIds = {}; | ||
for (const [filename, id] of Object.entries(mappedFiles)) { | ||
if (!fs.existsSync(filename)) { | ||
if (!fs.existsSync(path.join(rootDir, filename))) { | ||
throw new ConfigError(`The file "${filename}" listed in the 'mapping' section of the config file does not exist.`); | ||
@@ -109,0 +109,0 @@ } |
{ | ||
"name": "@xliic/cicd-core-node", | ||
"version": "2.2.3", | ||
"version": "2.2.4", | ||
"description": "Performs API contract security audit to get a detailed analysis of the possible vulnerabilities and other issues in the API contract.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -99,3 +99,3 @@ /* | ||
if (audit.mapping) { | ||
mappedFiles = checkMappedFiles(audit.mapping); | ||
mappedFiles = checkMappedFiles(rootDir, audit.mapping); | ||
} | ||
@@ -132,7 +132,7 @@ | ||
function checkMappedFiles(mappedFiles: Mapping): FileApiIdMap { | ||
function checkMappedFiles(rootDir: string, mappedFiles: Mapping): FileApiIdMap { | ||
const fileMap: FileApiIdMap = {}; | ||
const uniqueIds: { [id: string]: string } = {}; | ||
for (const [filename, id] of Object.entries(mappedFiles)) { | ||
if (!fs.existsSync(filename)) { | ||
if (!fs.existsSync(path.join(rootDir, filename))) { | ||
throw new ConfigError( | ||
@@ -139,0 +139,0 @@ `The file "${filename}" listed in the 'mapping' section of the config file does not exist.` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
138048