Clean up
This commit is contained in:
3
dist/index.js
generated
vendored
3
dist/index.js
generated
vendored
@@ -21880,6 +21880,7 @@ function getManifestFromSpdxFile(document, fileName) {
|
||||
document.packages?.forEach(pkg => {
|
||||
let packageName = pkg.name;
|
||||
let packageVersion = pkg.packageVersion;
|
||||
|
||||
// SPDX 2.3 defines a purl field
|
||||
let purl = pkg.purl;
|
||||
|
||||
@@ -21923,7 +21924,7 @@ function searchFiles() {
|
||||
// Fixes issues with an escaped version string
|
||||
function replaceVersionEscape(purl) {
|
||||
//If there's an "@" in the purl, then we don't need to do anything.
|
||||
if (!purl.includes("@")) {
|
||||
if (!purl?.includes("@")) {
|
||||
let index = purl.lastIndexOf("%40");
|
||||
if (index > 0) {
|
||||
purl = purl.substring(0, index) + "@" + purl.substring(index + 3);
|
||||
|
||||
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
3
index.js
3
index.js
@@ -43,6 +43,7 @@ function getManifestFromSpdxFile(document, fileName) {
|
||||
document.packages?.forEach(pkg => {
|
||||
let packageName = pkg.name;
|
||||
let packageVersion = pkg.packageVersion;
|
||||
|
||||
// SPDX 2.3 defines a purl field
|
||||
let purl = pkg.purl;
|
||||
|
||||
@@ -86,7 +87,7 @@ function searchFiles() {
|
||||
// Fixes issues with an escaped version string
|
||||
function replaceVersionEscape(purl) {
|
||||
//If there's an "@" in the purl, then we don't need to do anything.
|
||||
if (!purl.includes("@")) {
|
||||
if (!purl?.includes("@")) {
|
||||
let index = purl.lastIndexOf("%40");
|
||||
if (index > 0) {
|
||||
purl = purl.substring(0, index) + "@" + purl.substring(index + 3);
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
const process = require('process');
|
||||
const cp = require('child_process');
|
||||
const path = require('path');
|
||||
|
||||
test('test runs', () => {
|
||||
const ip = path.join(__dirname, "dist", 'index.js');
|
||||
const result = cp.execSync(`node ${ip}`, {filePath: "test"}).toString();
|
||||
console.log(result);
|
||||
})
|
||||
Reference in New Issue
Block a user