You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Extracts and constructs a manifest object from an SPDX document for a given file.
10
+
* This function processes an SPDX document, iterating over its packages to construct a manifest.
11
+
* It handles package information, including name, version, and package URLs (purls), and categorizes packages as direct or indirect dependencies based on their relationships.
12
+
* Special handling is applied to package URLs to work around encoding issues, using the `replaceVersionEscape` function.
13
+
*
14
+
* @param {Object} document - The SPDX document object containing package and relationship data.
15
+
* @param {string} fileName - The name of the file from which the SPDX document was extracted.
16
+
* @returns {Object} A manifest object containing the processed package data, including direct and indirect dependencies.
core.warning(`Error processing package "${packageName}@${packageVersion}" in ${fileName}`);
54
+
core.warning(error);
55
+
}
56
+
});
57
+
returnmanifest;
58
+
}
59
+
60
+
/**
61
+
* Extracts manifest data from SPDX files.
62
+
* Iterates over an array of SPDX file paths, reads each file, parses its JSON content, and then extracts the manifest data using `getManifestFromSpdxFile`.
63
+
* Each manifest is collected and returned in an array.
64
+
*
65
+
* @param {string[]} files - An array of file paths pointing to SPDX files.
66
+
* @returns {Object[]} An array of manifest objects extracted from the SPDX files.
0 commit comments