@cyclonedx/cdxgen 8.1.0 → 8.1.2

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 (3) hide show
  1. package/README.md +1 -1
  2. package/index.js +3 -2
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -257,7 +257,7 @@ cdxgen can retain the dependency tree under the `dependencies` attribute for a s
257
257
  | GRADLE_CMD | Set to override gradle command |
258
258
  | GRADLE_DEPENDENCY_TASK | By default cdxgen use the task "dependencies" to collect packages. Set to override the task name. |
259
259
  | SBT_CACHE_DIR | Specify sbt cache directory. Useful for class name resolving |
260
- | FETCH_LICENSE | Set to true to fetch license information from the registry. npm and golang only |
260
+ | FETCH_LICENSE | Set this variable to fetch license information from the registry. npm and golang only |
261
261
  | USE_GOSUM | Set to true to generate BOMs for golang projects using go.sum as the dependency source of truth, instead of go.mod |
262
262
  | CDXGEN_TIMEOUT_MS | Default timeout for known execution involving maven, gradle or sbt |
263
263
  | BAZEL_TARGET | Bazel target to build. Default :all (Eg: //java-maven) |
package/index.js CHANGED
@@ -58,7 +58,7 @@ const TIMEOUT_MS = parseInt(process.env.CDXGEN_TIMEOUT_MS) || 10 * 60 * 1000;
58
58
 
59
59
  const determineParentComponent = (options) => {
60
60
  let parentComponent = undefined;
61
- if (options.projectName) {
61
+ if (options.projectName && options.projectVersion) {
62
62
  parentComponent = {
63
63
  group: options.projectGroup || "",
64
64
  name: options.projectName,
@@ -1106,8 +1106,9 @@ const createJavaBom = async (path, options) => {
1106
1106
  );
1107
1107
  if (gradleFiles && gradleFiles.length && options.installDeps) {
1108
1108
  let gradleCmd = utils.getGradleCommand(path, null);
1109
+ const multiProjectMode = process.env.GRADLE_MULTI_PROJECT_MODE || "";
1109
1110
  // Support for multi-project applications
1110
- if (process.env.GRADLE_MULTI_PROJECT_MODE) {
1111
+ if (["true", "1"].includes(multiProjectMode)) {
1111
1112
  console.log("Executing", gradleCmd, "projects in", path);
1112
1113
  const result = spawnSync(
1113
1114
  gradleCmd,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cyclonedx/cdxgen",
3
- "version": "8.1.0",
3
+ "version": "8.1.2",
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>",