@kungfu-tech/buildchain 2.12.7-alpha.8 → 2.12.7-alpha.9

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.
@@ -4,7 +4,7 @@
4
4
  "product": {
5
5
  "name": "Buildchain",
6
6
  "package": "@kungfu-tech/buildchain",
7
- "version": "2.12.7-alpha.8",
7
+ "version": "2.12.7-alpha.9",
8
8
  "repository": "https://github.com/kungfu-systems/buildchain"
9
9
  },
10
10
  "majorLine": "v2",
@@ -549,7 +549,7 @@
549
549
  "agents can discover supported Node APIs without importing internal file paths"
550
550
  ],
551
551
  "breakingDigest": "sha256:48f925608d3e2131d90936b07dc2a30341204cae3e6e785c0f77d61ad755c945",
552
- "auditDigest": "sha256:4af45bd66f45b92607ed69840834c57ff157f57c66fe65d1645a5e83eaca8108"
552
+ "auditDigest": "sha256:6cb094e42fb35ae6a3b166fbe179a4663f019737cd82bad6279ffaf690110737"
553
553
  },
554
554
  {
555
555
  "contractVersion": 1,
@@ -2674,5 +2674,5 @@
2674
2674
  }
2675
2675
  ],
2676
2676
  "compatibilityDigest": "sha256:af162b86ab4506e9b5f1d3c59b41f3fd57fbad79ff4d749a7f12ff16460517f8",
2677
- "contractDigest": "sha256:95e8044b7a42060dd0476f6a4957e810431d57e7982abbc4000c1693396498c7"
2677
+ "contractDigest": "sha256:a773ef118ff98b52ff14a78b0bcc7efbda77d5e5e7a552a31fe6791a4c7d4d76"
2678
2678
  }
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "contract": "kungfu-buildchain-site-bundle",
4
- "generatedAt": "2026-07-15T01:31:56.311Z",
5
- "publishedAt": "2026-07-15T01:31:56.311Z",
4
+ "generatedAt": "2026-07-15T01:57:21.646Z",
5
+ "publishedAt": "2026-07-15T01:57:21.646Z",
6
6
  "reproducible": true,
7
7
  "timestampPolicy": "ci-injected",
8
8
  "deterministicInputs": [
@@ -19,7 +19,7 @@
19
19
  "declared Buildchain surface manifest contract"
20
20
  ],
21
21
  "sourceDateEpoch": "0",
22
- "sourceRevision": "a2f11bfd2bae6539f0196ef8fd9571130a809918",
22
+ "sourceRevision": "eb671ea63ee94e0dc91adfa6e8f722e5acc5af45",
23
23
  "timestampPolicyDetails": {
24
24
  "contract": "kungfu-buildchain-surface-timestamp-policy",
25
25
  "timestampFields": [
@@ -37,7 +37,7 @@
37
37
  },
38
38
  "package": {
39
39
  "name": "@kungfu-tech/buildchain",
40
- "version": "2.12.7-alpha.8",
40
+ "version": "2.12.7-alpha.9",
41
41
  "versionSource": "package.json#version"
42
42
  },
43
43
  "source": {
@@ -4,7 +4,7 @@
4
4
  "product": {
5
5
  "id": "kungfu-tech-buildchain",
6
6
  "name": "@kungfu-tech/buildchain",
7
- "version": "2.12.7-alpha.8",
7
+ "version": "2.12.7-alpha.9",
8
8
  "repository": "https://github.com/kungfu-systems/buildchain"
9
9
  },
10
10
  "source": {
@@ -8,7 +8,7 @@
8
8
  "specifier": "@kungfu-tech/buildchain",
9
9
  "export": ".",
10
10
  "target": "./packages/core/index.js",
11
- "digest": "sha256:1957a1a155a03d136bab9eedc7cf5f74ffcf23899684885217064a605d17bed3",
11
+ "digest": "sha256:07013ab68f7947772ec5bee502f97bae4b2c2f87235188f2f28f6fbb2dc5cb23",
12
12
  "summary": "Root toolkit export for Buildchain's public Node API.",
13
13
  "capabilityGroup": "api-cli-reference",
14
14
  "audience": [
@@ -47,7 +47,7 @@
47
47
  "specifier": "@kungfu-tech/buildchain/core",
48
48
  "export": "./core",
49
49
  "target": "./packages/core/index.js",
50
- "digest": "sha256:1957a1a155a03d136bab9eedc7cf5f74ffcf23899684885217064a605d17bed3",
50
+ "digest": "sha256:07013ab68f7947772ec5bee502f97bae4b2c2f87235188f2f28f6fbb2dc5cb23",
51
51
  "summary": "Alias for the root public toolkit export.",
52
52
  "capabilityGroup": "api-cli-reference",
53
53
  "audience": [
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "contract": "kungfu-buildchain-publication-release-registry",
4
- "generatedAt": "2026-07-15T01:31:56.311Z",
5
- "publishedAt": "2026-07-15T01:31:56.311Z",
4
+ "generatedAt": "2026-07-15T01:57:21.646Z",
5
+ "publishedAt": "2026-07-15T01:57:21.646Z",
6
6
  "reproducible": true,
7
7
  "timestampPolicy": "ci-injected",
8
8
  "deterministicInputs": [
@@ -19,7 +19,7 @@
19
19
  "declared Buildchain surface manifest contract"
20
20
  ],
21
21
  "sourceDateEpoch": "0",
22
- "sourceRevision": "a2f11bfd2bae6539f0196ef8fd9571130a809918",
22
+ "sourceRevision": "eb671ea63ee94e0dc91adfa6e8f722e5acc5af45",
23
23
  "timestampPolicyDetails": {
24
24
  "contract": "kungfu-buildchain-surface-timestamp-policy",
25
25
  "timestampFields": [
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "package": {
34
34
  "name": "@kungfu-tech/buildchain",
35
- "version": "2.12.7-alpha.8",
35
+ "version": "2.12.7-alpha.9",
36
36
  "versionSource": "package.json#version"
37
37
  },
38
38
  "sourceKind": "package-site-bundle",
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "contract": "kungfu-buildchain-site-manifest",
4
- "generatedAt": "2026-07-15T01:31:56.311Z",
5
- "publishedAt": "2026-07-15T01:31:56.311Z",
4
+ "generatedAt": "2026-07-15T01:57:21.646Z",
5
+ "publishedAt": "2026-07-15T01:57:21.646Z",
6
6
  "reproducible": true,
7
7
  "timestampPolicy": "ci-injected",
8
8
  "deterministicInputs": [
@@ -19,7 +19,7 @@
19
19
  "declared Buildchain surface manifest contract"
20
20
  ],
21
21
  "sourceDateEpoch": "0",
22
- "sourceRevision": "a2f11bfd2bae6539f0196ef8fd9571130a809918",
22
+ "sourceRevision": "eb671ea63ee94e0dc91adfa6e8f722e5acc5af45",
23
23
  "timestampPolicyDetails": {
24
24
  "contract": "kungfu-buildchain-surface-timestamp-policy",
25
25
  "timestampFields": [
@@ -37,7 +37,7 @@
37
37
  },
38
38
  "package": {
39
39
  "name": "@kungfu-tech/buildchain",
40
- "version": "2.12.7-alpha.8",
40
+ "version": "2.12.7-alpha.9",
41
41
  "versionSource": "package.json#version"
42
42
  },
43
43
  "entrypoint": "buildchain-site.json",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kungfu-tech/buildchain",
3
- "version": "2.12.7-alpha.8",
3
+ "version": "2.12.7-alpha.9",
4
4
  "private": false,
5
5
  "description": "Buildchain Release Passport, release governance, CLI toolkit, and site facts.",
6
6
  "repository": "https://github.com/kungfu-systems/buildchain",
@@ -157,6 +157,7 @@ export {
157
157
  PUBLICATION_ARTIFACT_CANDIDATE_CONTRACT,
158
158
  createPublicationArtifactCandidate,
159
159
  publicationArtifactCandidateDigest,
160
+ resolvePublicationCandidateFile,
160
161
  } from "./publication-artifact-candidate.js";
161
162
 
162
163
  export {
@@ -20,6 +20,18 @@ export function publicationArtifactCandidateDigest(value) {
20
20
  return crypto.createHash("sha256").update(stableJson(value)).digest("hex");
21
21
  }
22
22
 
23
+ export function resolvePublicationCandidateFile(files = [], candidatePath) {
24
+ const normalizedPath = requiredString(candidatePath, "candidatePath").replaceAll("\\", "/");
25
+ if (normalizedPath.startsWith("/") || normalizedPath.split("/").includes("..")) {
26
+ throw new Error(`publication artifact candidate contains an unsafe path: ${normalizedPath}`);
27
+ }
28
+ const matches = files.filter((entry) => entry.path === normalizedPath);
29
+ if (matches.length !== 1) {
30
+ throw new Error(`expected exactly one publication candidate file at ${normalizedPath}, found ${matches.length}`);
31
+ }
32
+ return matches[0].path;
33
+ }
34
+
23
35
  function requiredString(value, label) {
24
36
  const normalized = String(value || "").trim();
25
37
  if (!normalized) throw new Error(`${label} must be a non-empty string`);
@@ -4,7 +4,12 @@ import fs from "node:fs";
4
4
  import path from "node:path";
5
5
  import { pathToFileURL } from "node:url";
6
6
 
7
- import { createPublicationArtifactCandidate } from "../packages/core/publication-artifact-candidate.js";
7
+ import {
8
+ createPublicationArtifactCandidate,
9
+ resolvePublicationCandidateFile,
10
+ } from "../packages/core/publication-artifact-candidate.js";
11
+
12
+ export { resolvePublicationCandidateFile };
8
13
 
9
14
  function flag(name, fallback = "") {
10
15
  const index = process.argv.indexOf(`--${name}`);