@kungfu-tech/buildchain 2.11.2-alpha.1 → 2.11.2
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/bin/buildchain.mjs +6 -0
- package/dist/site/buildchain-contract.json +5 -5
- package/dist/site/buildchain-site.json +17 -12
- package/dist/site/capability-registry.json +3 -3
- package/dist/site/cli-registry.json +12 -0
- package/dist/site/kfd-claims.json +80 -9
- package/dist/site/kfd-upstream-aggregate.json +1 -1
- package/dist/site/manual-registry.json +2 -2
- package/dist/site/node-api-registry.json +16 -3
- package/dist/site/page-registry.json +11 -6
- package/dist/site/public-surface-audit.json +60 -6
- package/dist/site/publication-registry.json +4 -4
- package/dist/site/release-provenance.json +1 -0
- package/dist/site/site-manifest.json +6 -6
- package/dist/site/workflow-registry.json +42 -0
- package/docs/MAP.md +1 -1
- package/docs/cli.md +13 -0
- package/docs/publication-artifacts.md +95 -6
- package/package.json +2 -1
- package/packages/core/buildchain-config.js +15 -1
- package/packages/core/index.js +6 -0
- package/packages/core/publication-package.js +216 -0
- package/scripts/check-inventory.mjs +3 -0
- package/scripts/generate-site-bundle.mjs +4 -1
- package/scripts/publication-package.mjs +38 -0
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
"contract": "kungfu-buildchain-public-surface-reverse-audit",
|
|
4
4
|
"status": "passed",
|
|
5
5
|
"summary": {
|
|
6
|
-
"cliCommandCount":
|
|
7
|
-
"workflowCount":
|
|
6
|
+
"cliCommandCount": 74,
|
|
7
|
+
"workflowCount": 37,
|
|
8
8
|
"actionCount": 4,
|
|
9
9
|
"sitePageCount": 45,
|
|
10
|
-
"docCommandRefCount":
|
|
10
|
+
"docCommandRefCount": 231,
|
|
11
11
|
"failureCount": 0
|
|
12
12
|
},
|
|
13
13
|
"enumerated": {
|
|
@@ -292,6 +292,11 @@
|
|
|
292
292
|
"source": "bin/buildchain.mjs",
|
|
293
293
|
"usage": "buildchain publication-artifact manifest [--cwd <dir>] [--source-sha <sha>]"
|
|
294
294
|
},
|
|
295
|
+
{
|
|
296
|
+
"id": "publication-artifact-npm-package",
|
|
297
|
+
"source": "bin/buildchain.mjs",
|
|
298
|
+
"usage": "buildchain publication-artifact npm-package [--cwd <dir>] [--output-dir <dir>] [--package-name <name>] [--json]"
|
|
299
|
+
},
|
|
295
300
|
{
|
|
296
301
|
"id": "publish-source",
|
|
297
302
|
"source": "bin/buildchain.mjs",
|
|
@@ -783,6 +788,45 @@
|
|
|
783
788
|
],
|
|
784
789
|
"inputCount": 2
|
|
785
790
|
},
|
|
791
|
+
{
|
|
792
|
+
"id": "paper-release",
|
|
793
|
+
"path": ".github/workflows/paper-release.yml",
|
|
794
|
+
"inputs": [
|
|
795
|
+
"artifact-name",
|
|
796
|
+
"artifact-retention-days",
|
|
797
|
+
"branch-protection-bypass-apps",
|
|
798
|
+
"branch-protection-bypass-teams",
|
|
799
|
+
"branch-protection-bypass-users",
|
|
800
|
+
"build-command",
|
|
801
|
+
"buildchain-contract-compatibility-policy",
|
|
802
|
+
"buildchain-contract-drift-issue-mode",
|
|
803
|
+
"buildchain-contract-lock-path",
|
|
804
|
+
"buildchain-ref",
|
|
805
|
+
"buildchain-repository",
|
|
806
|
+
"dry-run",
|
|
807
|
+
"github-release",
|
|
808
|
+
"github-release-notes",
|
|
809
|
+
"github-release-title",
|
|
810
|
+
"node-version",
|
|
811
|
+
"package-name",
|
|
812
|
+
"publish-dist-tag",
|
|
813
|
+
"publish-package-set-order",
|
|
814
|
+
"release-passport-impact-json",
|
|
815
|
+
"release-passport-output-dir",
|
|
816
|
+
"release-passport-product-name",
|
|
817
|
+
"required-status-check",
|
|
818
|
+
"setup-node",
|
|
819
|
+
"target-ref",
|
|
820
|
+
"target-sha",
|
|
821
|
+
"toolchain-command",
|
|
822
|
+
"toolchain-digest",
|
|
823
|
+
"toolchain-image",
|
|
824
|
+
"toolchain-type",
|
|
825
|
+
"verify-command",
|
|
826
|
+
"working-directory"
|
|
827
|
+
],
|
|
828
|
+
"inputCount": 32
|
|
829
|
+
},
|
|
786
830
|
{
|
|
787
831
|
"id": "patrol-daily",
|
|
788
832
|
"path": ".github/workflows/patrol-daily.yml",
|
|
@@ -2142,6 +2186,16 @@
|
|
|
2142
2186
|
"path": "docs/publication-artifacts.md",
|
|
2143
2187
|
"command": "buildchain publication-artifact manifest --source-sha"
|
|
2144
2188
|
},
|
|
2189
|
+
{
|
|
2190
|
+
"id": "publication-artifact-npm-package",
|
|
2191
|
+
"path": "docs/cli.md",
|
|
2192
|
+
"command": "buildchain publication-artifact npm-package --json"
|
|
2193
|
+
},
|
|
2194
|
+
{
|
|
2195
|
+
"id": "publication-artifact-npm-package",
|
|
2196
|
+
"path": "docs/publication-artifacts.md",
|
|
2197
|
+
"command": "buildchain publication-artifact npm-package --json"
|
|
2198
|
+
},
|
|
2145
2199
|
{
|
|
2146
2200
|
"id": "publication-artifact",
|
|
2147
2201
|
"path": "docs/cli.md",
|
|
@@ -2448,9 +2502,9 @@
|
|
|
2448
2502
|
"cliRegistryPath": "dist/site/cli-registry.json",
|
|
2449
2503
|
"workflowRegistryPath": "dist/site/workflow-registry.json",
|
|
2450
2504
|
"pageRegistryPath": "dist/site/page-registry.json",
|
|
2451
|
-
"cliRegistryDigest": "
|
|
2452
|
-
"workflowRegistryDigest": "
|
|
2453
|
-
"pageRegistryDigest": "
|
|
2505
|
+
"cliRegistryDigest": "fb33fe38423f56ebf95919e2b58e13dc2f544aee10169bc87d7afe980bc1b142",
|
|
2506
|
+
"workflowRegistryDigest": "4041321df08640a802a87ff0fbe8584d95dc416945b43778727adb820cab9097",
|
|
2507
|
+
"pageRegistryDigest": "f9da4a3693844653a4b18db81be75676ecd70c5e15ebbc9371dcf007e5e4e858"
|
|
2454
2508
|
},
|
|
2455
2509
|
"comparison": {
|
|
2456
2510
|
"missingCliRegistry": [],
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"contract": "kungfu-buildchain-publication-release-registry",
|
|
4
|
-
"generatedAt": "2026-07-
|
|
5
|
-
"publishedAt": "2026-07-
|
|
4
|
+
"generatedAt": "2026-07-09T16:13:10.700Z",
|
|
5
|
+
"publishedAt": "2026-07-09T16:13:10.700Z",
|
|
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": "
|
|
22
|
+
"sourceRevision": "f03d2e06255056626b7c0509274ada03b91c5a30",
|
|
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.11.2
|
|
35
|
+
"version": "2.11.2",
|
|
36
36
|
"versionSource": "package.json#version"
|
|
37
37
|
},
|
|
38
38
|
"sourceKind": "package-site-bundle",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"./public-surface-audit": "./packages/core/public-surface-audit.js",
|
|
25
25
|
"./logging": "./packages/core/logging.js",
|
|
26
26
|
"./publication-artifact": "./packages/core/publication-artifact.js",
|
|
27
|
+
"./publication-package": "./packages/core/publication-package.js",
|
|
27
28
|
"./kfd-gate": "./packages/core/kfd-gate.js",
|
|
28
29
|
"./release-candidate": "./packages/core/release-candidate.js",
|
|
29
30
|
"./release-passport": "./packages/core/release-passport.js",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"contract": "kungfu-buildchain-site-manifest",
|
|
4
|
-
"generatedAt": "2026-07-
|
|
5
|
-
"publishedAt": "2026-07-
|
|
4
|
+
"generatedAt": "2026-07-09T16:13:10.700Z",
|
|
5
|
+
"publishedAt": "2026-07-09T16:13:10.700Z",
|
|
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": "
|
|
22
|
+
"sourceRevision": "f03d2e06255056626b7c0509274ada03b91c5a30",
|
|
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.11.2
|
|
40
|
+
"version": "2.11.2",
|
|
41
41
|
"versionSource": "package.json#version"
|
|
42
42
|
},
|
|
43
43
|
"entrypoint": "buildchain-site.json",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"path": "docs/MAP.md",
|
|
54
54
|
"plane": "use",
|
|
55
55
|
"exists": true,
|
|
56
|
-
"digest": "sha256:
|
|
56
|
+
"digest": "sha256:886d073bd37ac655e1ad9659baf161c72ef796b6032c5c3332218ac8198c2aeb"
|
|
57
57
|
},
|
|
58
58
|
{
|
|
59
59
|
"id": "install",
|
|
@@ -173,7 +173,7 @@
|
|
|
173
173
|
"path": "docs/cli.md",
|
|
174
174
|
"plane": "use",
|
|
175
175
|
"exists": true,
|
|
176
|
-
"digest": "sha256:
|
|
176
|
+
"digest": "sha256:81624885888c9e357db128f644f93dcab2286910df426b532730b0141d7cb00d"
|
|
177
177
|
},
|
|
178
178
|
{
|
|
179
179
|
"id": "build-facts",
|
|
@@ -479,6 +479,48 @@
|
|
|
479
479
|
"capabilityGroup": "api-cli-reference",
|
|
480
480
|
"status": "active"
|
|
481
481
|
},
|
|
482
|
+
{
|
|
483
|
+
"id": "paper-release",
|
|
484
|
+
"path": ".github/workflows/paper-release.yml",
|
|
485
|
+
"inputs": [
|
|
486
|
+
"artifact-name",
|
|
487
|
+
"artifact-retention-days",
|
|
488
|
+
"branch-protection-bypass-apps",
|
|
489
|
+
"branch-protection-bypass-teams",
|
|
490
|
+
"branch-protection-bypass-users",
|
|
491
|
+
"build-command",
|
|
492
|
+
"buildchain-contract-compatibility-policy",
|
|
493
|
+
"buildchain-contract-drift-issue-mode",
|
|
494
|
+
"buildchain-contract-lock-path",
|
|
495
|
+
"buildchain-ref",
|
|
496
|
+
"buildchain-repository",
|
|
497
|
+
"dry-run",
|
|
498
|
+
"github-release",
|
|
499
|
+
"github-release-notes",
|
|
500
|
+
"github-release-title",
|
|
501
|
+
"node-version",
|
|
502
|
+
"package-name",
|
|
503
|
+
"publish-dist-tag",
|
|
504
|
+
"publish-package-set-order",
|
|
505
|
+
"release-passport-impact-json",
|
|
506
|
+
"release-passport-output-dir",
|
|
507
|
+
"release-passport-product-name",
|
|
508
|
+
"required-status-check",
|
|
509
|
+
"setup-node",
|
|
510
|
+
"target-ref",
|
|
511
|
+
"target-sha",
|
|
512
|
+
"toolchain-command",
|
|
513
|
+
"toolchain-digest",
|
|
514
|
+
"toolchain-image",
|
|
515
|
+
"toolchain-type",
|
|
516
|
+
"verify-command",
|
|
517
|
+
"working-directory"
|
|
518
|
+
],
|
|
519
|
+
"inputCount": 32,
|
|
520
|
+
"surface": "reusable-build",
|
|
521
|
+
"capabilityGroup": "reusable-build",
|
|
522
|
+
"status": "active"
|
|
523
|
+
},
|
|
482
524
|
{
|
|
483
525
|
"id": "patrol-daily",
|
|
484
526
|
"path": ".github/workflows/patrol-daily.yml",
|
package/docs/MAP.md
CHANGED
|
@@ -87,7 +87,7 @@ replace them.
|
|
|
87
87
|
| How do I detect, register, audit, witness, or query KFD-3 product surfaces? | [`kfd-support.md`](kfd-support.md) + [`cli.md`](cli.md) | verify/use | stable |
|
|
88
88
|
| How do I keep `@v2` floating refs while detecting Buildchain contract drift? | [`reusable-build-surface.md`](reusable-build-surface.md#floating-ref-contract-lock) | verify/use | stable |
|
|
89
89
|
| How do I propagate finalized upstream releases to downstream package/site PRs? | [`release-propagation.md`](release-propagation.md) | use | preview |
|
|
90
|
-
| How do paper or report repositories publish PDFs, metadata, source bundles,
|
|
90
|
+
| How do paper or report repositories publish PDFs, metadata, source bundles, site-consumable manifests, npm packages, and GitHub Releases? | [`publication-artifacts.md`](publication-artifacts.md) | use | stable |
|
|
91
91
|
| How do I generate KFD / Release Passport badge bundles without hand-maintaining Markdown? | [`readme-badges.md`](readme-badges.md) + [`cli.md`](cli.md) | use | stable |
|
|
92
92
|
| How do I generate and verify a Homebrew tap from release passport evidence? | [`homebrew.md`](homebrew.md) + [`cli.md`](cli.md) | use/verify | stable |
|
|
93
93
|
| How do I prove a PR-stage reusable build is the artifact source promoted later? | [`release-candidate.md`](release-candidate.md) + [`reusable-build-surface.md`](reusable-build-surface.md) | verify | stable |
|
package/docs/cli.md
CHANGED
|
@@ -398,6 +398,19 @@ buildchain publication-artifact manifest \
|
|
|
398
398
|
--json
|
|
399
399
|
```
|
|
400
400
|
|
|
401
|
+
Generate the Buildchain-owned npm paper package contents from declared
|
|
402
|
+
publication facts:
|
|
403
|
+
|
|
404
|
+
```bash
|
|
405
|
+
buildchain publication-artifact npm-package --json
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
This command reads `project.type = "publication-artifact"`,
|
|
409
|
+
`publication.version`, and `[publish] kind = "npm-paper-package"` plus
|
|
410
|
+
`publish.package`; it writes `.buildchain/publication/npm-package` by default.
|
|
411
|
+
The `paper-release.yml@v2` reusable workflow uses the same command before
|
|
412
|
+
running the standard npm publish transaction.
|
|
413
|
+
|
|
401
414
|
The command writes `.buildchain/publication/publication-artifact.json`,
|
|
402
415
|
`.buildchain/publication/publication-artifact-passport.json`, a source bundle,
|
|
403
416
|
and, when `[publication.archive]` is configured,
|
|
@@ -50,6 +50,11 @@ image = "ghcr.io/kungfu-systems/build-images/latex-pdf-builder"
|
|
|
50
50
|
digest = "sha256:c20f3809e96836c1c78e97c76939d12f1de3fed0ea9b7c40c43332ec2ea480f8"
|
|
51
51
|
command = "latexmk -pdf -outdir=_build paper/main.tex"
|
|
52
52
|
|
|
53
|
+
[publish]
|
|
54
|
+
kind = "npm-paper-package"
|
|
55
|
+
package = "@kungfu-tech/paper-observer-declared-timelines"
|
|
56
|
+
auth = "trusted-publishing"
|
|
57
|
+
|
|
53
58
|
[lifecycle.build]
|
|
54
59
|
command = "make pdf"
|
|
55
60
|
|
|
@@ -91,9 +96,16 @@ for compatibility, but the passport records it as lower trust because
|
|
|
91
96
|
Buildchain can record the command boundary without proving the compiler or
|
|
92
97
|
LaTeX distribution digest.
|
|
93
98
|
|
|
99
|
+
`publish.kind = "npm-paper-package"` declares that Buildchain, not the consumer
|
|
100
|
+
repository, owns the standard paper npm package shape and release transaction
|
|
101
|
+
mechanics. `publish.package` is the public npm package that contains the PDF,
|
|
102
|
+
publication manifest, publication passport, optional archive registry, source
|
|
103
|
+
bundle, and declared metadata files.
|
|
104
|
+
|
|
94
105
|
## Reusable Workflow
|
|
95
106
|
|
|
96
|
-
Consumer repositories
|
|
107
|
+
Consumer repositories that only need to build and upload paper evidence can
|
|
108
|
+
call the build-only wrapper directly:
|
|
97
109
|
|
|
98
110
|
```yaml
|
|
99
111
|
jobs:
|
|
@@ -106,7 +118,7 @@ jobs:
|
|
|
106
118
|
buildchain-contract-lock-path: .buildchain/contract-lock.json
|
|
107
119
|
```
|
|
108
120
|
|
|
109
|
-
The workflow:
|
|
121
|
+
The build-only workflow:
|
|
110
122
|
|
|
111
123
|
- resolves the Buildchain runtime and checks the floating contract lock before
|
|
112
124
|
any paper build runs;
|
|
@@ -126,10 +138,76 @@ The workflow:
|
|
|
126
138
|
- uploads one GitHub artifact containing the PDF, manifest, passport, optional
|
|
127
139
|
registry, and source bundle.
|
|
128
140
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
141
|
+
It does not publish npm packages, deploy web pages, or create GitHub Releases.
|
|
142
|
+
|
|
143
|
+
## Paper Release Preset
|
|
144
|
+
|
|
145
|
+
Paper repositories that publish a versioned npm package should use the
|
|
146
|
+
Buildchain-managed release preset instead of copying npm transaction scripts or
|
|
147
|
+
promotion YAML:
|
|
148
|
+
|
|
149
|
+
```yaml
|
|
150
|
+
name: Paper Release
|
|
151
|
+
|
|
152
|
+
on:
|
|
153
|
+
push:
|
|
154
|
+
branches:
|
|
155
|
+
- alpha/v1/v1.0
|
|
156
|
+
- release/v1/v1.0
|
|
157
|
+
workflow_dispatch:
|
|
158
|
+
inputs:
|
|
159
|
+
buildchain-ref:
|
|
160
|
+
description: "Temporary Buildchain runtime ref"
|
|
161
|
+
required: false
|
|
162
|
+
default: ""
|
|
163
|
+
|
|
164
|
+
jobs:
|
|
165
|
+
paper-release:
|
|
166
|
+
uses: kungfu-systems/buildchain/.github/workflows/paper-release.yml@v2
|
|
167
|
+
permissions:
|
|
168
|
+
contents: write
|
|
169
|
+
id-token: write
|
|
170
|
+
issues: write
|
|
171
|
+
with:
|
|
172
|
+
buildchain-ref: ${{ inputs.buildchain-ref || '' }}
|
|
173
|
+
toolchain-type: config
|
|
174
|
+
verify-command: make check
|
|
175
|
+
buildchain-contract-lock-path: .buildchain/contract-lock.json
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
The preset:
|
|
179
|
+
|
|
180
|
+
- resolves the same floating Buildchain runtime and contract lock as the build
|
|
181
|
+
workflow;
|
|
182
|
+
- builds the PDF through the declared pinned LaTeX Docker toolchain or custom
|
|
183
|
+
command;
|
|
184
|
+
- verifies the paper repository;
|
|
185
|
+
- writes the publication manifest, publication passport, optional archive
|
|
186
|
+
registry, and source bundle;
|
|
187
|
+
- synthesizes an npm package from `[publication]` and `[publish]` declarations
|
|
188
|
+
under `.buildchain/publication/npm-package`;
|
|
189
|
+
- computes npm-style `sha512` integrity from `npm pack --dry-run` and passes
|
|
190
|
+
it as `publish-required-artifacts-json`;
|
|
191
|
+
- creates a `publish-gate/<alpha|release>/.../<version>` source lock for the
|
|
192
|
+
channel commit and requires `promote-buildchain-ref` to verify that lock
|
|
193
|
+
before any publish side effect;
|
|
194
|
+
- publishes the package through npm Trusted Publishing;
|
|
195
|
+
- writes Buildchain release/passport evidence; and
|
|
196
|
+
- creates or updates the exact-version GitHub Release by default.
|
|
197
|
+
|
|
198
|
+
Consumers can opt out of the GitHub Release with `github-release: false`, but
|
|
199
|
+
the default is on so downstream release propagation can observe
|
|
200
|
+
`release.published` without hand-written `gh release` steps.
|
|
201
|
+
|
|
202
|
+
For npm Trusted Publishing, register the consumer workflow file that calls this
|
|
203
|
+
preset, for example `.github/workflows/paper-release.yml`, against the declared
|
|
204
|
+
package in npm. The trusted publisher is the consumer repository and workflow
|
|
205
|
+
file; the implementation still runs inside Buildchain's reusable workflow.
|
|
206
|
+
|
|
207
|
+
Standard paper repositories should not carry local copies of
|
|
208
|
+
`scripts/npm-publish-transaction.mjs`, package-generation scripts, or
|
|
209
|
+
promotion/ref-lock YAML. If the default package shape is insufficient, extend
|
|
210
|
+
Buildchain rather than forking the mechanics into each paper repository.
|
|
133
211
|
|
|
134
212
|
## CLI And Node API
|
|
135
213
|
|
|
@@ -139,6 +217,12 @@ Generate the publication manifest locally or in CI:
|
|
|
139
217
|
buildchain publication-artifact manifest --source-sha "$(git rev-parse HEAD)" --json
|
|
140
218
|
```
|
|
141
219
|
|
|
220
|
+
Generate the npm package contents after the manifest exists:
|
|
221
|
+
|
|
222
|
+
```sh
|
|
223
|
+
buildchain publication-artifact npm-package --json
|
|
224
|
+
```
|
|
225
|
+
|
|
142
226
|
Node API:
|
|
143
227
|
|
|
144
228
|
```js
|
|
@@ -146,6 +230,11 @@ import {
|
|
|
146
230
|
collectPublicationArtifact,
|
|
147
231
|
writePublicationArtifact,
|
|
148
232
|
} from "@kungfu-tech/buildchain/publication-artifact";
|
|
233
|
+
|
|
234
|
+
import {
|
|
235
|
+
collectPublicationPackageFacts,
|
|
236
|
+
preparePublicationNpmPackage,
|
|
237
|
+
} from "@kungfu-tech/buildchain/publication-package";
|
|
149
238
|
```
|
|
150
239
|
|
|
151
240
|
`writePublicationArtifact()` is the single implementation used by the CLI and
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kungfu-tech/buildchain",
|
|
3
|
-
"version": "2.11.2
|
|
3
|
+
"version": "2.11.2",
|
|
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",
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
"./public-surface-audit": "./packages/core/public-surface-audit.js",
|
|
28
28
|
"./logging": "./packages/core/logging.js",
|
|
29
29
|
"./publication-artifact": "./packages/core/publication-artifact.js",
|
|
30
|
+
"./publication-package": "./packages/core/publication-package.js",
|
|
30
31
|
"./kfd-gate": "./packages/core/kfd-gate.js",
|
|
31
32
|
"./release-candidate": "./packages/core/release-candidate.js",
|
|
32
33
|
"./release-passport": "./packages/core/release-passport.js",
|
|
@@ -16,6 +16,7 @@ const SUPPORTED_VERSION_NEXT = new Set(["auto", "manual"]);
|
|
|
16
16
|
const SUPPORTED_PROJECT_TYPES = new Set(["package", "web-surface", "infra-contract", "distribution-index", "publication-artifact"]);
|
|
17
17
|
const SUPPORTED_PUBLISH_MODES = new Set(["publish-final-version", "promote-existing-version"]);
|
|
18
18
|
const SUPPORTED_PUBLISH_AUTH = new Set(["trusted-publishing", "npm-token"]);
|
|
19
|
+
const SUPPORTED_PUBLISH_KINDS = new Set(["npm-package", "npm-paper-package"]);
|
|
19
20
|
const SUPPORTED_PACKAGE_SET_ORDER = new Set(["as-provided", "platforms-first-main-last"]);
|
|
20
21
|
const SUPPORTED_NATIVE_COMPILER_CACHE = new Set(["auto", "ccache", "sccache", "none"]);
|
|
21
22
|
const WEB_SURFACE_CHANNELS = ["preview", "staging", "production"];
|
|
@@ -338,13 +339,19 @@ function normalizePublishSection(publish) {
|
|
|
338
339
|
if (mode === "promote-existing-version" && auth !== "npm-token") {
|
|
339
340
|
throw new Error('publish.mode = "promote-existing-version" requires publish.auth = "npm-token"');
|
|
340
341
|
}
|
|
342
|
+
const kind = publish.kind === undefined
|
|
343
|
+
? ""
|
|
344
|
+
: assertString(publish.kind, "publish.kind");
|
|
345
|
+
if (kind && !SUPPORTED_PUBLISH_KINDS.has(kind)) {
|
|
346
|
+
throw new Error("publish.kind must be one of npm-package or npm-paper-package");
|
|
347
|
+
}
|
|
341
348
|
const packageSetOrder = publish.package_set_order === undefined
|
|
342
349
|
? "as-provided"
|
|
343
350
|
: assertString(publish.package_set_order, "publish.package_set_order");
|
|
344
351
|
if (!SUPPORTED_PACKAGE_SET_ORDER.has(packageSetOrder)) {
|
|
345
352
|
throw new Error("publish.package_set_order must be one of as-provided or platforms-first-main-last");
|
|
346
353
|
}
|
|
347
|
-
|
|
354
|
+
const normalized = {
|
|
348
355
|
mode,
|
|
349
356
|
auth,
|
|
350
357
|
distTag: publish.dist_tag === undefined
|
|
@@ -355,6 +362,13 @@ function normalizePublishSection(publish) {
|
|
|
355
362
|
? ""
|
|
356
363
|
: assertString(publish.main_package, "publish.main_package"),
|
|
357
364
|
};
|
|
365
|
+
if (publish.kind !== undefined) {
|
|
366
|
+
normalized.kind = kind;
|
|
367
|
+
}
|
|
368
|
+
if (publish.package !== undefined) {
|
|
369
|
+
normalized.package = assertString(publish.package, "publish.package");
|
|
370
|
+
}
|
|
371
|
+
return normalized;
|
|
358
372
|
}
|
|
359
373
|
|
|
360
374
|
function normalizeProjectSection(project) {
|
package/packages/core/index.js
CHANGED
|
@@ -111,6 +111,12 @@ export {
|
|
|
111
111
|
validateReleaseCandidatePassport,
|
|
112
112
|
} from "./release-candidate.js";
|
|
113
113
|
|
|
114
|
+
export {
|
|
115
|
+
PUBLICATION_NPM_PACKAGE_CONTRACT,
|
|
116
|
+
collectPublicationPackageFacts,
|
|
117
|
+
preparePublicationNpmPackage,
|
|
118
|
+
} from "./publication-package.js";
|
|
119
|
+
|
|
114
120
|
export {
|
|
115
121
|
ARTIFACT_PASSPORT_LOCATOR_CONTRACT,
|
|
116
122
|
ARTIFACT_PASSPORT_POINTER_CONTRACT,
|