File tree Expand file tree Collapse file tree
packages/cli/src/utils/preflight Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11/**
22 * Background preflight downloads for optional dependencies.
33 *
4- * Silently downloads @coana-tech/cli and @socketbin/cli-ai in the background
5- * on first CLI run to ensure they're cached for future use.
4+ * Silently downloads @coana-tech/cli, @cyclonedx/cdxgen, and @socketbin/cli-ai
5+ * in the background on first CLI run to ensure they're cached for future use.
66 *
77 * This runs asynchronously and never blocks the main CLI execution.
88 */
@@ -54,6 +54,15 @@ export function runPreflightDownloads(): void {
5454 }
5555 }
5656
57+ // @cyclonedx /cdxgen preflight.
58+ const cdxgenVersion = ENV . INLINED_SOCKET_CLI_CYCLONEDX_CDXGEN_VERSION
59+ if ( cdxgenVersion ) {
60+ const cdxgenSpec = `@cyclonedx/cdxgen@~${ cdxgenVersion } `
61+ if ( ! isPackageCached ( cdxgenSpec ) ) {
62+ downloads . push ( { packageSpec : cdxgenSpec , binaryName : 'cdxgen' } )
63+ }
64+ }
65+
5766 // @socketbin /cli-ai preflight.
5867 const cliAiVersion = ENV . INLINED_SOCKET_CLI_AI_VERSION
5968 if ( cliAiVersion ) {
You can’t perform that action at this time.
0 commit comments