@kosdev-code/kos-codegen-core 3.0.10 → 3.0.11

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/index.mjs CHANGED
@@ -531,7 +531,7 @@ function generatePolyglotWorkspace(codegenFs, templateDir, options) {
531
531
  keyset: options.keyset || "prod.kos",
532
532
  appUiName: `${normalized.nameDashCase}-ui`,
533
533
  nodeVersion: options.nodeVersion || process.version.replace(/^v/, ""),
534
- jdkMajor: options.jdkMajor || "17",
534
+ jdkMajor: options.jdkMajor || "21",
535
535
  mavenVersion: options.mavenVersion || "3.9.9"
536
536
  };
537
537
  generateFilesFromTemplates(
@@ -893,8 +893,25 @@ function buildKabTargets(options) {
893
893
  options: {},
894
894
  dependsOn: []
895
895
  };
896
+ targets.sbom = buildSbomTarget({ outputPath });
897
+ targets.kab.dependsOn = [...targets.kab.dependsOn ?? [], "sbom"];
896
898
  return targets;
897
899
  }
900
+ function buildSbomTarget({
901
+ outputPath
902
+ }) {
903
+ const dir = outputPath.replace(/\/+$/, "");
904
+ return {
905
+ executor: "@kosdev-code/kos-nx-plugin:sbom",
906
+ outputs: [
907
+ `{workspaceRoot}/${dir}/sbom.spdx.json`,
908
+ `{workspaceRoot}/${dir}/sbom.cyclonedx.json`
909
+ ],
910
+ cache: true,
911
+ inputs: ["production", "^production", "{workspaceRoot}/package-lock.json"],
912
+ options: { outputPath: dir, softFail: true }
913
+ };
914
+ }
898
915
  const UPDATE_RELEASE_VERSION_SCRIPT = `import devkit from "@nx/devkit";
899
916
  import { resolve } from "path";
900
917
  import { readFileSync, writeFileSync } from "fs";
@@ -3389,6 +3406,7 @@ export {
3389
3406
  addTopicHandlerToModel,
3390
3407
  appendBarrelExport,
3391
3408
  buildKabTargets,
3409
+ buildSbomTarget,
3392
3410
  camelCase,
3393
3411
  constantCase,
3394
3412
  dashCase,