@kungfu-tech/buildchain 2.11.13 → 2.11.14-alpha.1

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.
@@ -180,6 +180,9 @@ function usage() {
180
180
  buildchain kfd 2 schema [--schema <name>] [--json]
181
181
  buildchain kfd 2 taxonomy --entry-json <file-or-json>... [--kind residualRisk|downgradeReason] [--json]
182
182
  buildchain kfd 2 claims [--cwd <dir>] [--output-dir <dir>] [--json]
183
+ buildchain kfd 2 product-claims <check|write|render> [--cwd <dir>] [--registry <path>]
184
+ [--output-dir <dir>] [--version <version>]
185
+ [--channel <channel>] [--tag <tag>] [--source-sha <sha>] [--json]
183
186
  buildchain kfd 2 trust-claims [--claims-json <file-or-json>] [--json]
184
187
  buildchain kfd 2 trust-assessment [--assessment-json <file-or-json>] [--json]
185
188
  buildchain kfd 3 ...
@@ -779,6 +782,34 @@ function runKfd2Cli(args = []) {
779
782
  }
780
783
  return;
781
784
  }
785
+ if (action === "product-claims") {
786
+ const mode = !rest[0] || rest[0].startsWith("--") ? "check" : rest[0];
787
+ const productArgs = mode === rest[0] ? rest.slice(1) : rest;
788
+ const options = {
789
+ cwd,
790
+ ...(readFlag(productArgs, "registry", "") ? { registryPath: readFlag(productArgs, "registry", "") } : {}),
791
+ ...(readFlag(productArgs, "output-dir", "") ? { outputDir: readFlag(productArgs, "output-dir", "") } : {}),
792
+ version: readFlag(productArgs, "version", ""),
793
+ channel: readFlag(productArgs, "channel", ""),
794
+ tag: readFlag(productArgs, "tag", ""),
795
+ sourceSha: readFlag(productArgs, "source-sha", ""),
796
+ };
797
+ let result;
798
+ if (mode === "check") result = kfd2.checkProductClaimOutputs(options);
799
+ else if (mode === "write") result = kfd2.writeProductClaimOutputs(options);
800
+ else if (mode === "render") result = kfd2.renderProductClaimOutputs(options);
801
+ else throw new Error("usage: buildchain kfd 2 product-claims <check|write|render> ...");
802
+ if (json || mode === "render") {
803
+ printJson(result);
804
+ } else {
805
+ process.stdout.write(`kfd 2 product-claims ${mode}: ${result.ok ? "ok" : "failed"} (${result.summary.claimCount} claims, ${result.status || "rendered"})\n`);
806
+ for (const entry of result.issues || []) {
807
+ process.stdout.write(`- ${entry.level || "error"}: ${entry.code}: ${entry.message}\n`);
808
+ }
809
+ }
810
+ if (!result.ok) process.exitCode = 1;
811
+ return;
812
+ }
782
813
  if (action === "trust-claims") {
783
814
  const document = readFlag(rest, "claims-json", "")
784
815
  ? readJsonInput(readFlag(rest, "claims-json", ""), { cwd, label: "kfd-2 trust claims" })
@@ -823,7 +854,7 @@ function runKfd2Cli(args = []) {
823
854
  }
824
855
  return;
825
856
  }
826
- throw new Error("usage: buildchain kfd 2 <schema|taxonomy|claims|trust-claims|trust-assessment> ...");
857
+ throw new Error("usage: buildchain kfd 2 <schema|taxonomy|claims|product-claims|trust-claims|trust-assessment> ...");
827
858
  }
828
859
 
829
860
  async function runKfdCli(args = []) {
@@ -4,7 +4,7 @@
4
4
  "product": {
5
5
  "name": "Buildchain",
6
6
  "package": "@kungfu-tech/buildchain",
7
- "version": "2.11.13",
7
+ "version": "2.11.14-alpha.1",
8
8
  "repository": "https://github.com/kungfu-systems/buildchain"
9
9
  },
10
10
  "majorLine": "v2",
@@ -92,7 +92,7 @@
92
92
  "GitHub Release passport and evidence publication is delegated to promote-buildchain-ref after the semver release transaction completes"
93
93
  ],
94
94
  "breakingDigest": "sha256:403d2fcdb0c5eabe749e89102defad69745f70a1556707bec7831fcc2e9fa8f8",
95
- "auditDigest": "sha256:1d12801725d7fb1849be6eb92bf4b08842c0260f3a2a09c87548870a3c50ae3e"
95
+ "auditDigest": "sha256:9e5def8447c148bdbb14029fe1ea77b055b9a61483dceee1e080ac03e08d7ec0"
96
96
  },
97
97
  {
98
98
  "contractVersion": 1,
@@ -344,7 +344,7 @@
344
344
  "README badge block checks and writes are generated from machine-readable repository facts"
345
345
  ],
346
346
  "breakingDigest": "sha256:90a73892b2d6c214048448d5f45df75639bdf7b7e8fefd9c596e04b087407bcc",
347
- "auditDigest": "sha256:c41e3e069f70d038537fc7d399eabb01bc33873cc361e20798cac7a7c9ce3e31"
347
+ "auditDigest": "sha256:5431da4333bb46ed59a8f3ed3abc3c8595140e3159cb72529bff17042d2d8467"
348
348
  },
349
349
  {
350
350
  "contractVersion": 1,
@@ -434,7 +434,7 @@
434
434
  "manual entries carry source file digests so downstream sites and agents can detect stale hand-written documentation"
435
435
  ],
436
436
  "breakingDigest": "sha256:7d0d2819e3a3e72989d9c57b5efe9d0bc0a79bc0f2c82a0c7b9d6c5a211a91f2",
437
- "auditDigest": "sha256:8a609696e6fa8ff6be710ea9649054b9ce257f24014e0fcced0a7e7e41e7825b"
437
+ "auditDigest": "sha256:a79631837d756175e5f3c1071b72b6c1b11c2bdd6f32a082191a0d3a944c99b9"
438
438
  },
439
439
  {
440
440
  "contractVersion": 1,
@@ -456,9 +456,9 @@
456
456
  "agents can discover supported Node APIs without importing internal file paths"
457
457
  ],
458
458
  "breakingDigest": "sha256:48f925608d3e2131d90936b07dc2a30341204cae3e6e785c0f77d61ad755c945",
459
- "auditDigest": "sha256:e9f0e3de042dfa569990493c31e089173a8f49dbf30b3b6177f9a587305ab5dd"
459
+ "auditDigest": "sha256:4754455d100bb473a24d084920a84b165e3203f9bbb34ee1c6cc5eca230d22b5"
460
460
  }
461
461
  ],
462
462
  "compatibilityDigest": "sha256:967df7e854fdf582294ddfb6403eff25c00db9518a24051e7d47cbd75527c785",
463
- "contractDigest": "sha256:ccaf30dea1fc96675059498ccac0f8095b8ddf8669f7387380cfbfcb694d44c4"
463
+ "contractDigest": "sha256:7ccbfa755ce856b1610da1ca509eb995e1d5a243a61302b1f9025fa291be6356"
464
464
  }