@cyclonedx/cdxgen 11.7.0 → 11.8.0
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.
- package/README.md +1 -1
- package/bin/cdxgen.js +3 -18
- package/bin/verify.js +17 -5
- package/data/bom-1.7.schema.json +1112 -348
- package/data/component-tags.json +0 -1
- package/data/cryptography-defs.json +3793 -0
- package/data/cryptography-defs.schema.json +576 -0
- package/data/spdx.schema.json +23 -2
- package/lib/cli/index.js +129 -88
- package/lib/helpers/dotnetutils.poku.js +1 -0
- package/lib/helpers/envcontext.js +0 -27
- package/lib/helpers/utils.js +610 -118
- package/lib/helpers/utils.poku.js +650 -18
- package/lib/helpers/validator.js +14 -3
- package/lib/managers/binary.js +13 -29
- package/lib/managers/docker.js +11 -25
- package/lib/managers/oci.js +20 -11
- package/lib/managers/piptree.js +1 -2
- package/lib/server/server.js +0 -1
- package/lib/stages/postgen/postgen.js +30 -12
- package/lib/third-party/README.md +9 -0
- package/lib/third-party/arborist/CHANGELOG.md +863 -0
- package/lib/third-party/arborist/LICENSE.md +20 -0
- package/lib/third-party/arborist/README.md +315 -0
- package/lib/third-party/arborist/lib/arborist/index.js +246 -0
- package/lib/third-party/arborist/lib/arborist/load-actual.js +462 -0
- package/lib/third-party/arborist/lib/arborist/load-virtual.js +329 -0
- package/lib/third-party/arborist/lib/calc-dep-flags.js +128 -0
- package/lib/third-party/arborist/lib/can-place-dep.js +452 -0
- package/lib/third-party/arborist/lib/case-insensitive-map.js +53 -0
- package/lib/third-party/arborist/lib/consistent-resolve.js +43 -0
- package/lib/third-party/arborist/lib/debug.js +50 -0
- package/lib/third-party/arborist/lib/deepest-nesting-target.js +18 -0
- package/lib/third-party/arborist/lib/dep-valid.js +163 -0
- package/lib/third-party/arborist/lib/diff.js +312 -0
- package/lib/third-party/arborist/lib/edge.js +374 -0
- package/lib/third-party/arborist/lib/from-path.js +35 -0
- package/lib/third-party/arborist/lib/gather-dep-set.js +43 -0
- package/lib/third-party/arborist/lib/index.js +13 -0
- package/lib/third-party/arborist/lib/inventory.js +137 -0
- package/lib/third-party/arborist/lib/link.js +140 -0
- package/lib/third-party/arborist/lib/node.js +1584 -0
- package/lib/third-party/arborist/lib/optional-set.js +39 -0
- package/lib/third-party/arborist/lib/override-resolves.js +11 -0
- package/lib/third-party/arborist/lib/override-set.js +221 -0
- package/lib/third-party/arborist/lib/peer-entry-sets.js +77 -0
- package/lib/third-party/arborist/lib/place-dep.js +586 -0
- package/lib/third-party/arborist/lib/printable.js +215 -0
- package/lib/third-party/arborist/lib/query-selector-all.js +184 -0
- package/lib/third-party/arborist/lib/realpath.js +100 -0
- package/lib/third-party/arborist/lib/relpath.js +5 -0
- package/lib/third-party/arborist/lib/reset-dep-flags.js +17 -0
- package/lib/third-party/arborist/lib/retire-path.js +20 -0
- package/lib/third-party/arborist/lib/shrinkwrap.js +1240 -0
- package/lib/third-party/arborist/lib/signal-handling.js +80 -0
- package/lib/third-party/arborist/lib/signals.js +48 -0
- package/lib/third-party/arborist/lib/spec-from-lock.js +35 -0
- package/lib/third-party/arborist/lib/tracker.js +89 -0
- package/lib/third-party/arborist/lib/tree-check.js +163 -0
- package/lib/third-party/arborist/lib/version-from-tgz.js +53 -0
- package/lib/third-party/arborist/lib/yarn-lock.js +397 -0
- package/package.json +146 -125
- package/types/cli/index.d.ts.map +1 -1
- package/types/helpers/envcontext.d.ts.map +1 -1
- package/types/helpers/utils.d.ts +30 -2
- package/types/helpers/utils.d.ts.map +1 -1
- package/types/helpers/validator.d.ts.map +1 -1
- package/types/lib/helpers/utils.d.ts +1 -1
- package/types/managers/binary.d.ts.map +1 -1
- package/types/managers/docker.d.ts.map +1 -1
- package/types/managers/oci.d.ts.map +1 -1
- package/types/managers/piptree.d.ts.map +1 -1
- package/types/server/server.d.ts.map +1 -1
- package/types/stages/postgen/postgen.d.ts.map +1 -1
- package/types/third-party/arborist/lib/arborist/index.d.ts +36 -0
- package/types/third-party/arborist/lib/arborist/index.d.ts.map +1 -0
- package/types/third-party/arborist/lib/arborist/load-actual.d.ts +38 -0
- package/types/third-party/arborist/lib/arborist/load-actual.d.ts.map +1 -0
- package/types/third-party/arborist/lib/arborist/load-virtual.d.ts +26 -0
- package/types/third-party/arborist/lib/arborist/load-virtual.d.ts.map +1 -0
- package/types/third-party/arborist/lib/calc-dep-flags.d.ts +3 -0
- package/types/third-party/arborist/lib/calc-dep-flags.d.ts.map +1 -0
- package/types/third-party/arborist/lib/can-place-dep.d.ts +38 -0
- package/types/third-party/arborist/lib/can-place-dep.d.ts.map +1 -0
- package/types/third-party/arborist/lib/case-insensitive-map.d.ts +10 -0
- package/types/third-party/arborist/lib/case-insensitive-map.d.ts.map +1 -0
- package/types/third-party/arborist/lib/consistent-resolve.d.ts +3 -0
- package/types/third-party/arborist/lib/consistent-resolve.d.ts.map +1 -0
- package/types/third-party/arborist/lib/debug.d.ts +6 -0
- package/types/third-party/arborist/lib/debug.d.ts.map +1 -0
- package/types/third-party/arborist/lib/deepest-nesting-target.d.ts +3 -0
- package/types/third-party/arborist/lib/deepest-nesting-target.d.ts.map +1 -0
- package/types/third-party/arborist/lib/dep-valid.d.ts +3 -0
- package/types/third-party/arborist/lib/dep-valid.d.ts.map +1 -0
- package/types/third-party/arborist/lib/diff.d.ts +28 -0
- package/types/third-party/arborist/lib/diff.d.ts.map +1 -0
- package/types/third-party/arborist/lib/edge.d.ts +45 -0
- package/types/third-party/arborist/lib/edge.d.ts.map +1 -0
- package/types/third-party/arborist/lib/from-path.d.ts +3 -0
- package/types/third-party/arborist/lib/from-path.d.ts.map +1 -0
- package/types/third-party/arborist/lib/gather-dep-set.d.ts +3 -0
- package/types/third-party/arborist/lib/gather-dep-set.d.ts.map +1 -0
- package/types/third-party/arborist/lib/index.d.ts +3 -0
- package/types/third-party/arborist/lib/index.d.ts.map +1 -0
- package/types/third-party/arborist/lib/inventory.d.ts +14 -0
- package/types/third-party/arborist/lib/inventory.d.ts.map +1 -0
- package/types/third-party/arborist/lib/link.d.ts +16 -0
- package/types/third-party/arborist/lib/link.d.ts.map +1 -0
- package/types/third-party/arborist/lib/node.d.ts +95 -0
- package/types/third-party/arborist/lib/node.d.ts.map +1 -0
- package/types/third-party/arborist/lib/optional-set.d.ts +3 -0
- package/types/third-party/arborist/lib/optional-set.d.ts.map +1 -0
- package/types/third-party/arborist/lib/override-resolves.d.ts +2 -0
- package/types/third-party/arborist/lib/override-resolves.d.ts.map +1 -0
- package/types/third-party/arborist/lib/override-set.d.ts +25 -0
- package/types/third-party/arborist/lib/override-set.d.ts.map +1 -0
- package/types/third-party/arborist/lib/peer-entry-sets.d.ts +3 -0
- package/types/third-party/arborist/lib/peer-entry-sets.d.ts.map +1 -0
- package/types/third-party/arborist/lib/place-dep.d.ts +45 -0
- package/types/third-party/arborist/lib/place-dep.d.ts.map +1 -0
- package/types/third-party/arborist/lib/printable.d.ts +3 -0
- package/types/third-party/arborist/lib/printable.d.ts.map +1 -0
- package/types/third-party/arborist/lib/query-selector-all.d.ts +3 -0
- package/types/third-party/arborist/lib/query-selector-all.d.ts.map +1 -0
- package/types/third-party/arborist/lib/realpath.d.ts +3 -0
- package/types/third-party/arborist/lib/realpath.d.ts.map +1 -0
- package/types/third-party/arborist/lib/relpath.d.ts +3 -0
- package/types/third-party/arborist/lib/relpath.d.ts.map +1 -0
- package/types/third-party/arborist/lib/reset-dep-flags.d.ts +3 -0
- package/types/third-party/arborist/lib/reset-dep-flags.d.ts.map +1 -0
- package/types/third-party/arborist/lib/retire-path.d.ts +3 -0
- package/types/third-party/arborist/lib/retire-path.d.ts.map +1 -0
- package/types/third-party/arborist/lib/shrinkwrap.d.ts +54 -0
- package/types/third-party/arborist/lib/shrinkwrap.d.ts.map +1 -0
- package/types/third-party/arborist/lib/signal-handling.d.ts +6 -0
- package/types/third-party/arborist/lib/signal-handling.d.ts.map +1 -0
- package/types/third-party/arborist/lib/signals.d.ts +3 -0
- package/types/third-party/arborist/lib/signals.d.ts.map +1 -0
- package/types/third-party/arborist/lib/spec-from-lock.d.ts +3 -0
- package/types/third-party/arborist/lib/spec-from-lock.d.ts.map +1 -0
- package/types/third-party/arborist/lib/tracker.d.ts +13 -0
- package/types/third-party/arborist/lib/tracker.d.ts.map +1 -0
- package/types/third-party/arborist/lib/tree-check.d.ts +3 -0
- package/types/third-party/arborist/lib/tree-check.d.ts.map +1 -0
- package/types/third-party/arborist/lib/version-from-tgz.d.ts +6 -0
- package/types/third-party/arborist/lib/version-from-tgz.d.ts.map +1 -0
- package/types/third-party/arborist/lib/yarn-lock.d.ts +35 -0
- package/types/third-party/arborist/lib/yarn-lock.d.ts.map +1 -0
package/README.md
CHANGED
|
@@ -521,7 +521,7 @@ Before raising a PR, please run the following commands.
|
|
|
521
521
|
|
|
522
522
|
```shell
|
|
523
523
|
corepack enable pnpm
|
|
524
|
-
pnpm install
|
|
524
|
+
pnpm install:frozen
|
|
525
525
|
# Generate types using jsdoc syntax
|
|
526
526
|
pnpm run gen-types
|
|
527
527
|
# Run biomejs formatter and linter with auto fix
|
package/bin/cdxgen.js
CHANGED
|
@@ -28,21 +28,18 @@ import {
|
|
|
28
28
|
ATOM_DB,
|
|
29
29
|
commandsExecuted,
|
|
30
30
|
DEBUG_MODE,
|
|
31
|
-
dirNameStr,
|
|
32
|
-
getRuntimeInformation,
|
|
33
31
|
getTmpDir,
|
|
34
32
|
isMac,
|
|
35
33
|
isSecureMode,
|
|
36
34
|
isWin,
|
|
37
35
|
remoteHostsAccessed,
|
|
36
|
+
retrieveCdxgenVersion,
|
|
38
37
|
safeExistsSync,
|
|
39
38
|
} from "../lib/helpers/utils.js";
|
|
40
39
|
import { validateBom } from "../lib/helpers/validator.js";
|
|
41
40
|
import { postProcess } from "../lib/stages/postgen/postgen.js";
|
|
42
41
|
import { prepareEnv } from "../lib/stages/pregen/pregen.js";
|
|
43
42
|
|
|
44
|
-
const dirName = dirNameStr;
|
|
45
|
-
|
|
46
43
|
// Support for config files
|
|
47
44
|
const configPaths = [
|
|
48
45
|
".cdxgenrc",
|
|
@@ -384,7 +381,7 @@ const args = _yargs
|
|
|
384
381
|
.epilogue("for documentation, visit https://cyclonedx.github.io/cdxgen")
|
|
385
382
|
.config(config)
|
|
386
383
|
.scriptName("cdxgen")
|
|
387
|
-
.version(
|
|
384
|
+
.version(retrieveCdxgenVersion())
|
|
388
385
|
.alias("v", "version")
|
|
389
386
|
.help(false)
|
|
390
387
|
.option("help", {
|
|
@@ -399,23 +396,11 @@ if (process.env?.CDXGEN_NODE_OPTIONS) {
|
|
|
399
396
|
}
|
|
400
397
|
|
|
401
398
|
if (args.help) {
|
|
402
|
-
console.log(`${
|
|
399
|
+
console.log(`${retrieveCdxgenVersion()}\n`);
|
|
403
400
|
_yargs.showHelp();
|
|
404
401
|
process.exit(0);
|
|
405
402
|
}
|
|
406
403
|
|
|
407
|
-
function version() {
|
|
408
|
-
const packageJsonAsString = fs.readFileSync(
|
|
409
|
-
join(dirName, "package.json"),
|
|
410
|
-
"utf-8",
|
|
411
|
-
);
|
|
412
|
-
const packageJson = JSON.parse(packageJsonAsString);
|
|
413
|
-
|
|
414
|
-
const runtimeInfo = getRuntimeInformation();
|
|
415
|
-
|
|
416
|
-
return `\x1b[1mCycloneDX Generator ${packageJson.version}\x1b[0m\nRuntime: ${runtimeInfo.runtime}, Version: ${runtimeInfo.version}`;
|
|
417
|
-
}
|
|
418
|
-
|
|
419
404
|
if (process.env.GLOBAL_AGENT_HTTP_PROXY || process.env.HTTP_PROXY) {
|
|
420
405
|
// Support standard HTTP_PROXY variable if the user doesn't override the namespace
|
|
421
406
|
if (!process.env.GLOBAL_AGENT_ENVIRONMENT_VARIABLE_NAMESPACE) {
|
package/bin/verify.js
CHANGED
|
@@ -8,12 +8,14 @@ import jws from "jws";
|
|
|
8
8
|
import yargs from "yargs";
|
|
9
9
|
import { hideBin } from "yargs/helpers";
|
|
10
10
|
|
|
11
|
-
import { dirNameStr } from "../lib/helpers/utils.js";
|
|
11
|
+
import { dirNameStr, retrieveCdxgenVersion } from "../lib/helpers/utils.js";
|
|
12
12
|
import { getBomWithOras } from "../lib/managers/oci.js";
|
|
13
13
|
|
|
14
14
|
const dirName = dirNameStr;
|
|
15
15
|
|
|
16
|
-
const
|
|
16
|
+
const _yargs = yargs(hideBin(process.argv));
|
|
17
|
+
|
|
18
|
+
const args = _yargs
|
|
17
19
|
.option("input", {
|
|
18
20
|
alias: "i",
|
|
19
21
|
default: "bom.json",
|
|
@@ -29,11 +31,21 @@ const args = yargs(hideBin(process.argv))
|
|
|
29
31
|
.completion("completion", "Generate bash/zsh completion")
|
|
30
32
|
.epilogue("for documentation, visit https://cyclonedx.github.io/cdxgen")
|
|
31
33
|
.scriptName("cdx-verify")
|
|
32
|
-
.version()
|
|
33
|
-
.help(
|
|
34
|
-
.
|
|
34
|
+
.version(retrieveCdxgenVersion())
|
|
35
|
+
.help(false)
|
|
36
|
+
.option("help", {
|
|
37
|
+
alias: "h",
|
|
38
|
+
type: "boolean",
|
|
39
|
+
description: "Show help",
|
|
40
|
+
})
|
|
35
41
|
.wrap(Math.min(120, yargs().terminalWidth())).argv;
|
|
36
42
|
|
|
43
|
+
if (args.help) {
|
|
44
|
+
console.log(`${retrieveCdxgenVersion()}\n`);
|
|
45
|
+
_yargs.showHelp();
|
|
46
|
+
process.exit(0);
|
|
47
|
+
}
|
|
48
|
+
|
|
37
49
|
if (args.version) {
|
|
38
50
|
const packageJsonAsString = fs.readFileSync(
|
|
39
51
|
join(dirName, "..", "package.json"),
|