@cyclonedx/cdxgen 8.4.2 → 8.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +18 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -2920,7 +2920,8 @@ const createSwiftBom = async (path, options) => {
2920
2920
  pkgList = pkgList.concat(dlist);
2921
2921
  }
2922
2922
  }
2923
- } else if (swiftFiles.length) {
2923
+ }
2924
+ if (swiftFiles.length) {
2924
2925
  for (let f of swiftFiles) {
2925
2926
  const basePath = pathLib.dirname(f);
2926
2927
  if (completedPath.includes(basePath)) {
@@ -3914,6 +3915,22 @@ const createMultiXBom = async (pathList, options) => {
3914
3915
  )
3915
3916
  );
3916
3917
  }
3918
+ bomData = await createSwiftBom(path, options);
3919
+ if (bomData && bomData.bomJson && bomData.bomJson.components) {
3920
+ if (DEBUG_MODE) {
3921
+ console.log(
3922
+ `Found ${bomData.bomJson.components.length} Swift packages at ${path}`
3923
+ );
3924
+ }
3925
+ components = components.concat(bomData.bomJson.components);
3926
+ dependencies = dependencies.concat(bomData.bomJson.dependencies);
3927
+ if (!parentComponent || !Object.keys(parentComponent).length) {
3928
+ parentComponent = bomData.parentComponent;
3929
+ }
3930
+ componentsXmls = componentsXmls.concat(
3931
+ listComponents(options, {}, bomData.bomJson.components, "swift", "xml")
3932
+ );
3933
+ }
3917
3934
  // jar scanning is quite slow so this is limited to only deep scans
3918
3935
  if (options.deep) {
3919
3936
  bomData = createJarBom(path, options);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cyclonedx/cdxgen",
3
- "version": "8.4.2",
3
+ "version": "8.4.3",
4
4
  "description": "Creates CycloneDX Software Bill-of-Materials (SBOM) from source or container image",
5
5
  "homepage": "http://github.com/cyclonedx/cdxgen",
6
6
  "author": "Prabhu Subramanian <prabhu@appthreat.com>",