diff --git a/lib/cli/index.js b/lib/cli/index.js index 9a7f10d60..a86ebc231 100644 --- a/lib/cli/index.js +++ b/lib/cli/index.js @@ -2876,16 +2876,18 @@ export async function createPythonBom(path, options) { ); } } - const parentDependsOn = []; - // Complete the dependency tree by making parent component depend on the first level - for (const p of retMap.rootList) { - parentDependsOn.push(`pkg:pypi/${p.name.toLowerCase()}@${p.version}`); + if (retMap.rootList) { + const parentDependsOn = []; + // Complete the dependency tree by making parent component depend on the first level + for (const p of retMap.rootList) { + parentDependsOn.push(`pkg:pypi/${p.name.toLowerCase()}@${p.version}`); + } + const pdependencies = { + ref: parentComponent["bom-ref"], + dependsOn: parentDependsOn, + }; + dependencies.splice(0, 0, pdependencies); } - const pdependencies = { - ref: parentComponent["bom-ref"], - dependsOn: parentDependsOn, - }; - dependencies.splice(0, 0, pdependencies); } options.parentComponent = parentComponent; } // poetryMode diff --git a/lib/helpers/utils.js b/lib/helpers/utils.js index 02b765139..58ce1b8f0 100644 --- a/lib/helpers/utils.js +++ b/lib/helpers/utils.js @@ -3944,17 +3944,57 @@ export function parsePyProjectToml(tomlFile) { * * @param {Object} lockData JSON data from poetry.lock * @param {string} lockFile Lock file name for evidence + * @param {string} pyProjectFile pyproject.toml file */ -export async function parsePoetrylockData(lockData, lockFile) { +export async function parsePoetrylockData(lockData, lockFile, pyProjectFile) { let pkgList = []; + const rootList = []; const dependenciesList = []; const depsMap = {}; const existingPkgMap = {}; + const directDepsKeys = {}; + const groupDepsKeys = {}; let pkg = null; let lastPkgRef = undefined; let depsMode = false; if (!lockData) { - return pkgList; + return { pkgList, dependenciesList }; + } + if (!pyProjectFile && lockFile) { + pyProjectFile = lockFile.replace("poetry.lock", "pyproject.toml"); + if (existsSync(pyProjectFile)) { + const pyprojTomlFile = readFileSync(pyProjectFile, { encoding: "utf-8" }); + const tomlData = toml.parse(pyprojTomlFile); + if (tomlData?.tool?.poetry) { + for (const adep of Object.keys(tomlData?.tool?.poetry?.dependencies)) { + if ( + ![ + "python", + "py", + "pytest", + "pylint", + "ruff", + "setuptools", + "bandit", + ].includes(adep) + ) { + directDepsKeys[adep] = true; + } + } // for + if (tomlData?.tool?.poetry?.group) { + for (const agroup of Object.keys(tomlData.tool.poetry.group)) { + for (const adep of Object.keys( + tomlData.tool.poetry.group[agroup]?.dependencies, + )) { + if (!groupDepsKeys[adep]) { + groupDepsKeys[adep] = []; + } + groupDepsKeys[adep].push(agroup); + } + } // for + } + } + } } lockData.split("\n").forEach((l) => { l = l.replace("\r", ""); @@ -3995,11 +4035,18 @@ export async function parsePoetrylockData(lockData, lockFile) { ], }, }; - // This would help look - if (!existingPkgMap[pkg.name.toLowerCase()]) { - existingPkgMap[pkg.name.toLowerCase()] = pkg["bom-ref"]; - pkgList.push(pkg); + if (groupDepsKeys[pkg.name]) { + pkg.scope = "optional"; + pkg.properties = groupDepsKeys[pkg.name].map((g) => { + return { name: "cdx:poetry:group", value: g }; + }); + } + if (directDepsKeys[pkg.name]) { + rootList.push(pkg); } + // This would help the lookup + existingPkgMap[pkg.name.toLowerCase()] = pkg["bom-ref"]; + pkgList.push(pkg); lastPkgRef = pkg["bom-ref"]; if (!depsMap[lastPkgRef]) { depsMap[lastPkgRef] = new Set(); @@ -4057,7 +4104,7 @@ export async function parsePoetrylockData(lockData, lockFile) { } return { pkgList, - rootList: pkgList, + rootList, dependenciesList, }; } @@ -12469,6 +12516,9 @@ export function isValidIriReference(iri) { * @returns {Boolean} True if the dependency tree lacks any non-root parents without children. False otherwise. */ export function isPartialTree(dependencies, componentsCount = 1) { + if (componentsCount <= 1) { + return false; + } if (dependencies?.length <= 1) { return true; } @@ -12478,7 +12528,10 @@ export function isPartialTree(dependencies, componentsCount = 1) { parentsWithChildsCount++; } } - return parentsWithChildsCount <= Math.max(Math.round(componentsCount / 3), 1); + return ( + parentsWithChildsCount < + Math.min(Math.round(componentsCount / 3), componentsCount) + ); } /** diff --git a/lib/helpers/utils.test.js b/lib/helpers/utils.test.js index adf32010e..1743976f6 100644 --- a/lib/helpers/utils.test.js +++ b/lib/helpers/utils.test.js @@ -3500,7 +3500,7 @@ test("parseYarnLock", async () => { expect(parsedList.dependenciesList.length).toEqual(1); expect( isPartialTree(parsedList.dependenciesList, parsedList.pkgList.length), - ).toBeTruthy(); + ).toBeFalsy(); parsedList = await parseYarnLock("./test/data/yarn_locks/yarn-at.lock"); expect(parsedList.pkgList.length).toEqual(4); expect(parsedList.dependenciesList.length).toEqual(4); @@ -3993,7 +3993,7 @@ test("parse poetry.lock", async () => { readFileSync("./test/data/pdm.lock", { encoding: "utf-8" }), "./test/data/pdm.lock", ); - expect(retMap.pkgList.length).toEqual(37); + expect(retMap.pkgList.length).toEqual(39); expect(retMap.dependenciesList.length).toEqual(37); }, 120000); diff --git a/lib/helpers/validator.js b/lib/helpers/validator.js index 7c8afd60c..cd3905caa 100644 --- a/lib/helpers/validator.js +++ b/lib/helpers/validator.js @@ -223,7 +223,7 @@ export const validateRefs = (bomJson) => { if (bomJson?.dependencies) { if (isPartialTree(bomJson.dependencies, bomJson?.components?.length)) { warningsList.push( - "Dependency tree is partial with multiple empty dependsOn attribute.", + "Dependency tree is partial with multiple empty dependsOn attributes.", ); } for (const dep of bomJson.dependencies) { diff --git a/tsconfig.json b/tsconfig.json index 3b7d7f2c1..a55521a5e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,6 @@ { - "include": ["*.js"], - "exclude": ["*.test.js", "./types/**/*"], + "include": ["*.js", "lib/**/*.js"], + "exclude": ["*.test.js", "lib/**/*.test.js", "./types/**/*"], "compilerOptions": { "allowJs": true, // Generate d.ts files diff --git a/types/analyzer.d.ts.map b/types/analyzer.d.ts.map deleted file mode 100644 index 4462116b4..000000000 --- a/types/analyzer.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"analyzer.d.ts","sourceRoot":"","sources":["../analyzer.js"],"names":[],"mappings":"AAkSO;;;GAkBN"} \ No newline at end of file diff --git a/types/binary.d.ts.map b/types/binary.d.ts.map deleted file mode 100644 index c8d2e8d08..000000000 --- a/types/binary.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"binary.d.ts","sourceRoot":"","sources":["../binary.js"],"names":[],"mappings":"AAsRA,iDA8BC;AAED,wDAmBC;AAED;;;;;;;EAqXC;AAkCD,gDAoDC;AAED;;;;;;GAMG;AACH,qCAJW,MAAM,cACN,MAAM,WA2BhB;AAED;;;;;;;;GAQG;AACH,kCANW,MAAM,iBACN,MAAM,YACN,OAAO,GAEN,OAAO,CA8BlB"} \ No newline at end of file diff --git a/types/cbomutils.d.ts.map b/types/cbomutils.d.ts.map deleted file mode 100644 index 5ac40745d..000000000 --- a/types/cbomutils.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"cbomutils.d.ts","sourceRoot":"","sources":["../cbomutils.js"],"names":[],"mappings":"AAWA;;;;;GAKG;AACH,yDAwBC;AAMD;;;;;GAKG;AACH,kDAaC"} \ No newline at end of file diff --git a/types/db.d.ts.map b/types/db.d.ts.map deleted file mode 100644 index a86048367..000000000 --- a/types/db.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"db.d.ts","sourceRoot":"","sources":["../db.js"],"names":[],"mappings":"AAQO;;;;;GAuEN;0BA9E2C,WAAW;AAGvD;;CAAiC;AACjC;;CAA6B;AAC7B;;CAAgC;sBALY,WAAW"} \ No newline at end of file diff --git a/types/display.d.ts.map b/types/display.d.ts.map deleted file mode 100644 index f765861f6..000000000 --- a/types/display.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"display.d.ts","sourceRoot":"","sources":["../display.js"],"names":[],"mappings":"AAoBA,mFAmEC;AAQD,iDAkBC;AACD,kDAsBC;AAED,qDAqBC;AAeD,qDA4BC;AACD,mDA8CC;AACD,wFAuCC;AA4DD,2DA+BC;AAED,iEA0BC;AAED,uDAoBC;AAED,iDAwCC"} \ No newline at end of file diff --git a/types/docker.d.ts.map b/types/docker.d.ts.map deleted file mode 100644 index 91a7e1a99..000000000 --- a/types/docker.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"docker.d.ts","sourceRoot":"","sources":["../docker.js"],"names":[],"mappings":"AAoDA;;GAEG;AACH,4CA6CC;AAxED,4BAA6C;AAC7C,8CAA+C;AAkFxC,iCAHI,MAAM,WACN,MAAM,iDAehB;AAqBM,6DAmBN;AAgLM,4EAwGN;AAEM,oFAwBN;AAUM;;;;;;;;EAwEN;AAsBM,2DA8KN;AAEM,2EAwFN;AAMM;;;;;;;;;;;;;GAqDN;AAEM;;;;;;;GAqGN;AAMM,8DAqIN;AAKM,4EAmGN;AAEM,+EAMN;AAEM,4EAyCN;AAEM,iFA0BN"} \ No newline at end of file diff --git a/types/envcontext.d.ts.map b/types/envcontext.d.ts.map deleted file mode 100644 index 355323450..000000000 --- a/types/envcontext.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"envcontext.d.ts","sourceRoot":"","sources":["../envcontext.js"],"names":[],"mappings":"AA+BA;;;;;;GAMG;AACH,wCALW,MAAM,OACN,MAAM,OAMhB;AAED;;;;;GAKG;AACH,kCAJW,MAAM,OAMhB;AAED;;;;;;GAMG;AACH,gDAJW,MAAM,OAMhB;AAED;;;;;GAKG;AACH,mCAJW,MAAM,MAsBhB;AAED;;;;;GAKG;AACH,+BAJW,MAAM,SAgChB;AAED;;;;;;;GAOG;AACH,oCALW,MAAM,oBAOhB;AAED;;;;;GAKG;AACH,qCAHW,MAAM;;;;;;;;;EAsBhB;AAED;;;;;GAKG;AACH,uCAHW,MAAM;;;;;EAgBhB;AAED;;;;;GAKG;AACH,uCAHW,MAAM;;;;;EAgBhB;AAED;;;;;GAKG;AACH,qCAHW,MAAM;;;;;EAkBhB;AAED;;;;;GAKG;AACH,oCAHW,MAAM;;;;;EAehB;AAED;;;;;GAKG;AACH,qCAHW,MAAM;;;;;EAehB;AAED;;;;;GAKG;AACH,mCAHW,MAAM;;;;EAahB;AAED;;;;;;;;;IA+BC;AA0BD;;GAEG;AACH,6CAeC;AAED;;GAEG;AACH,0CAUC;AAED;;;;;;;GAOG;AACH,mFAqBC;AAED;;;;;;;GAOG;AACH,+EAwFC;AAED;;;;;;GAMG;AACH,8DAsBC;AAED;;;;;;GAMG;AACH,iEAkCC;AAhjBD,8BAAwD"} \ No newline at end of file diff --git a/types/evinser.d.ts.map b/types/evinser.d.ts.map deleted file mode 100644 index fc7b000e0..000000000 --- a/types/evinser.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"evinser.d.ts","sourceRoot":"","sources":["../evinser.js"],"names":[],"mappings":"AA0BO;;;;;;;;;;;;;qBAs4CgxlD,CAAC;qBAAgB,CAAC;;;qBAA4F,CAAC;qBAAgB,CAAC;;;qBAAkE,CAAC;qBAAgB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wGAAr3wC,QAAa;;;;;;;;;;;;;;sHAAq3M,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wJAAmkY,CAAC;;;wJAA2rB,CAAC;qUAAg+C,CAAC;2JAAqH,CAAC,kJAAgH,CAAC;qUAA8wB,CAAC;2JAAqH,CAAC,kJAAgH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAA81kB,CAAC;qBAAgB,CAAC;;;qBAA4F,CAAC;qBAAgB,CAAC;;;qBAAkE,CAAC;qBAAgB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wGAAr3wC,QAAa;;;;;;;;;;;;;;sHAAq3M,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wJAAmkY,CAAC;;;wJAA2rB,CAAC;qUAAg+C,CAAC;2JAAqH,CAAC,kJAAgH,CAAC;qUAA8wB,CAAC;2JAAqH,CAAC,kJAAgH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAA81kB,CAAC;qBAAgB,CAAC;;;qBAA4F,CAAC;qBAAgB,CAAC;;;qBAAkE,CAAC;qBAAgB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wGAAr3wC,QAAa;;;;;;;;;;;;;;sHAAq3M,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wJAAmkY,CAAC;;;wJAA2rB,CAAC;qUAAg+C,CAAC;2JAAqH,CAAC,kJAAgH,CAAC;qUAA8wB,CAAC;2JAAqH,CAAC,kJAAgH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAr0Cx7gC;AAEM,6GAiDN;AAEM,gGAkCN;AAEM,wGAqBN;AAEM;;;;EAsEN;AAEM,iEAoBN;AAEM;;;EA8BN;AAQM;;;;;;;;;;;;GAkHN;AAEM,2JA4CN;AAcM,2CARI,MAAM,iHAkNhB;AAEM,sGAqEN;AASM,mDAJI,MAAM,wCA6DhB;AASM,gDAJI,MAAM,mDA8DhB;AAEM,yEAWN;AAEM,gEAmDN;AASM,yEA+IN;AAaM,gDAPI,MAAM,wHAyHhB;AAUM;;;;;;;;;;;;;EAwFN;AAQM,kDAaN;AAQM,2CAHI,MAAM,UAKhB;AAEM,oFAyCN"} \ No newline at end of file diff --git a/types/index.d.ts.map b/types/index.d.ts.map deleted file mode 100644 index 8e6062aa4..000000000 --- a/types/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.js"],"names":[],"mappings":"AA0wBA;;;;;;;;GAQG;AACH,gFAFW,MAAM,SAchB;AAyUD;;;;;;;GAOG;AACH,mCALW,MAAM,qBAiEhB;AAED;;;;;GAKG;AACH,uCAHW,MAAM;;;;EAKhB;AAED;;;;;GAKG;AACH,sCAHW,MAA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K,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,GAAG,SAAS,CAAC,CAwHxE"} \ No newline at end of file diff --git a/types/index.d.ts b/types/lib/cli/index.d.ts similarity index 100% rename from types/index.d.ts rename to types/lib/cli/index.d.ts diff --git a/types/lib/cli/index.d.ts.map b/types/lib/cli/index.d.ts.map new file mode 100644 index 000000000..116ccd44a --- /dev/null +++ b/types/lib/cli/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/cli/index.js"],"names":[],"mappings":"AA2wBA;;;;;;;;GAQG;AACH,gFAFW,MAAM,SAchB;AAyUD;;;;;;;GAOG;AACH,mCALW,MAAM,qBAiEhB;AAED;;;;;GAKG;AACH,uCAHW,MAAM;;;;EAKhB;AAED;;;;;GAKG;AACH,sCAHW,MAAM;;;;EAkBhB;AAED;;;;;GAKG;AACH,oCAHW,MAAM,8BA47BhB;AAED;;;;;GAKG;AACH,sCAHW,MAAM,8BA2chB;AAED;;;;;;;;;;GAUG;AACH,+DAyEC;AAED;;;;;GAKG;AACH,sCAHW,MAAM,8BA6bhB;AAED;;;;;GAKG;AACH,kCAHW,MAAM,8BA6YhB;AAED;;;;;GAKG;AACH,oCAHW,MAAM,8BAqIhB;AAED;;;;;GAKG;AACH,oCAHW,MAAM,8BAiDhB;AAED;;;;;GAKG;AACH,mCAHW,MAAM,qBA+KhB;AAED;;;;;GAKG;AACH,uCAHW,MAAM,qBAsHhB;AAED;;;;;GAKG;AACH,uCAHW,MAAM,qBA2BhB;AAED;;;;;GAKG;AACH,sCAHW,MAAM,qBA2BhB;AAED;;;;;GAKG;AACH,sCAHW,MAAM,qBA2BhB;AAED;;;;;GAKG;AACH,0CAHW,MAAM,qBAuBhB;AAED;;;;;GAKG;AACH,oEAkDC;AAED;;;;;GAKG;AACH,uCAHW,MAAM,8BA4ChB;AAED;;;;;GAKG;AACH,oCAHW,MAAM,qBA2BhB;AAED;;;;;GAKG;AACH,qCAHW,MAAM,8BAwFhB;AAED;;;;;GAKG;AACH,iDAHW,MAAM,qBAiUhB;AAED;;;;;GAKG;AACH,mCAHW,MAAM,qBAwJhB;AAED;;;;;GAKG;AACH,oCAHW,MAAM,8BAmFhB;AAED;;;;;GAKG;AACH,sCAHW,MAAM,8BA6XhB;AAED;;;;;GAKG;AACH,2CAHW,MAAM;;;;;;;;;;;;;;;;;;;;GAoChB;AAED;;;;;;;;KA+DC;AAED;;;;;;GAMG;AACH,yDA2CC;AAED;;;;;;;;;GASG;AACH,2GA6BC;AAED;;;;;GAKG;AACH,0CAHW,MAAM,EAAE,8BAmclB;AAED;;;;;GAKG;AACH,iCAHW,MAAM,8BAiUhB;AAED;;;;;GAKG;AACH,gCAHW,MAAM,qBAsOhB;AAED;;;;;;GAMG;AACH,wDAFY,OAAO,CAAC;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,GAAG,SAAS,CAAC,CAwHxE"} \ No newline at end of file diff --git a/types/evinser.d.ts b/types/lib/evinser/evinser.d.ts similarity index 100% rename from types/evinser.d.ts rename to types/lib/evinser/evinser.d.ts diff --git a/types/lib/evinser/evinser.d.ts.map b/types/lib/evinser/evinser.d.ts.map new file mode 100644 index 000000000..5a0e4d86d --- /dev/null +++ b/types/lib/evinser/evinser.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"evinser.d.ts","sourceRoot":"","sources":["../../../lib/evinser/evinser.js"],"names":[],"mappings":"AA0BO;;;;;;;;;;;;;qBAs4CqvlD,CAAC;qBAAgB,CAAC;;;qBAA4F,CAAC;qBAAgB,CAAC;;;qBAAkE,CAAC;qBAAgB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wGAAr3wC,QAAa;;;;;;;;;;;;;;sHAAq3M,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wJAAmkY,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AM,iHAkNhB;AAEM,sGAqEN;AASM,mDAJI,MAAM,wCA6DhB;AASM,gDAJI,MAAM,mDA8DhB;AAEM,yEAWN;AAEM,gEAmDN;AASM,yEA+IN;AAaM,gDAPI,MAAM,wHAyHhB;AAUM;;;;;;;;;;;;;EAwFN;AAQM,kDAaN;AAQM,2CAHI,MAAM,UAKhB;AAEM,oFAyCN"} \ No newline at end of file diff --git a/types/analyzer.d.ts b/types/lib/helpers/analyzer.d.ts similarity index 100% rename from types/analyzer.d.ts rename to types/lib/helpers/analyzer.d.ts diff --git a/types/lib/helpers/analyzer.d.ts.map b/types/lib/helpers/analyzer.d.ts.map new file mode 100644 index 000000000..d08deafc3 --- /dev/null +++ b/types/lib/helpers/analyzer.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"analyzer.d.ts","sourceRoot":"","sources":["../../../lib/helpers/analyzer.js"],"names":[],"mappings":"AAkSO;;;GAkBN"} \ No newline at end of file diff --git a/types/cbomutils.d.ts b/types/lib/helpers/cbomutils.d.ts similarity index 100% rename from types/cbomutils.d.ts rename to types/lib/helpers/cbomutils.d.ts diff --git a/types/lib/helpers/cbomutils.d.ts.map b/types/lib/helpers/cbomutils.d.ts.map new file mode 100644 index 000000000..b955d5486 --- /dev/null +++ b/types/lib/helpers/cbomutils.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"cbomutils.d.ts","sourceRoot":"","sources":["../../../lib/helpers/cbomutils.js"],"names":[],"mappings":"AAWA;;;;;GAKG;AACH,yDAwBC;AAMD;;;;;GAKG;AACH,kDAaC"} \ No newline at end of file diff --git a/types/db.d.ts b/types/lib/helpers/db.d.ts similarity index 100% rename from types/db.d.ts rename to types/lib/helpers/db.d.ts diff --git a/types/lib/helpers/db.d.ts.map b/types/lib/helpers/db.d.ts.map new file mode 100644 index 000000000..31bec7690 --- /dev/null +++ b/types/lib/helpers/db.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"db.d.ts","sourceRoot":"","sources":["../../../lib/helpers/db.js"],"names":[],"mappings":"AAQO;;;;;GAuEN;0BA9E2C,WAAW;AAGvD;;CAAiC;AACjC;;CAA6B;AAC7B;;CAAgC;sBALY,WAAW"} \ No newline at end of file diff --git a/types/display.d.ts b/types/lib/helpers/display.d.ts similarity index 100% rename from types/display.d.ts rename to types/lib/helpers/display.d.ts diff --git a/types/lib/helpers/display.d.ts.map b/types/lib/helpers/display.d.ts.map new file mode 100644 index 000000000..2fe9ce162 --- /dev/null +++ b/types/lib/helpers/display.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"display.d.ts","sourceRoot":"","sources":["../../../lib/helpers/display.js"],"names":[],"mappings":"AAoBA,mFAmEC;AAQD,iDAkBC;AACD,kDAsBC;AAED,qDAqBC;AAeD,qDA4BC;AACD,mDA8CC;AACD,wFAuCC;AA4DD,2DA+BC;AAED,iEA0BC;AAED,uDAoBC;AAED,iDAwCC"} \ No newline at end of file diff --git a/types/envcontext.d.ts b/types/lib/helpers/envcontext.d.ts similarity index 100% rename from types/envcontext.d.ts rename to types/lib/helpers/envcontext.d.ts diff --git a/types/lib/helpers/envcontext.d.ts.map b/types/lib/helpers/envcontext.d.ts.map new file mode 100644 index 000000000..2e9e061d9 --- /dev/null +++ b/types/lib/helpers/envcontext.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"envcontext.d.ts","sourceRoot":"","sources":["../../../lib/helpers/envcontext.js"],"names":[],"mappings":"AA+BA;;;;;;GAMG;AACH,wCALW,MAAM,OACN,MAAM,OAMhB;AAED;;;;;GAKG;AACH,kCAJW,MAAM,OAMhB;AAED;;;;;;GAMG;AACH,gDAJW,MAAM,OAMhB;AAED;;;;;GAKG;AACH,mCAJW,MAAM,MAsBhB;AAED;;;;;GAKG;AACH,+BAJW,MAAM,SAgChB;AAED;;;;;;;GAOG;AACH,oCALW,MAAM,oBAOhB;AAED;;;;;GAKG;AACH,qCAHW,MAAM;;;;;;;;;EAsBhB;AAED;;;;;GAKG;AACH,uCAHW,MAAM;;;;;EAgBhB;AAED;;;;;GAKG;AACH,uCAHW,MAAM;;;;;EAgBhB;AAED;;;;;GAKG;AACH,qCAHW,MAAM;;;;;EAkBhB;AAED;;;;;GAKG;AACH,oCAHW,MAAM;;;;;EAehB;AAED;;;;;GAKG;AACH,qCAHW,MAAM;;;;;EAehB;AAED;;;;;GAKG;AACH,mCAHW,MAAM;;;;EAahB;AAED;;;;;;;;;IA+BC;AA0BD;;GAEG;AACH,6CAeC;AAED;;GAEG;AACH,0CAUC;AAED;;;;;;;GAOG;AACH,mFAqBC;AAED;;;;;;;GAOG;AACH,+EAwFC;AAED;;;;;;GAMG;AACH,8DAsBC;AAED;;;;;;GAMG;AACH,iEAkCC;AAhjBD,8BAAwD"} \ No newline at end of file diff --git a/types/protobom.d.ts b/types/lib/helpers/protobom.d.ts similarity index 100% rename from types/protobom.d.ts rename to types/lib/helpers/protobom.d.ts diff --git a/types/lib/helpers/protobom.d.ts.map b/types/lib/helpers/protobom.d.ts.map new file mode 100644 index 000000000..4234708bd --- /dev/null +++ b/types/lib/helpers/protobom.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"protobom.d.ts","sourceRoot":"","sources":["../../../lib/helpers/protobom.js"],"names":[],"mappings":"AAsBO,qCAHI,MAAM,MAAS,WACf,MAAM,QAmBhB;AASM,oCAJI,MAAM,WACN,OAAO,gBACP,MAAM,OAmBhB"} \ No newline at end of file diff --git a/types/utils.d.ts b/types/lib/helpers/utils.d.ts similarity index 99% rename from types/utils.d.ts rename to types/lib/helpers/utils.d.ts index 5b3ae2910..79e22d4f2 100644 --- a/types/utils.d.ts +++ b/types/lib/helpers/utils.d.ts @@ -408,8 +408,13 @@ export function parsePyProjectToml(tomlFile: string): {}; * * @param {Object} lockData JSON data from poetry.lock * @param {string} lockFile Lock file name for evidence + * @param {string} pyProjectFile pyproject.toml file */ -export function parsePoetrylockData(lockData: any, lockFile: string): Promise