putitoutthere 0.2.14 → 0.2.16
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/CHANGELOG.md +3 -0
- package/MIGRATIONS.md +104 -0
- package/README.md +19 -0
- package/dist/error-codes.d.ts +8 -0
- package/dist/error-codes.d.ts.map +1 -1
- package/dist/error-codes.js +9 -0
- package/dist/error-codes.js.map +1 -1
- package/dist/preflight.d.ts +36 -0
- package/dist/preflight.d.ts.map +1 -1
- package/dist/preflight.js +90 -0
- package/dist/preflight.js.map +1 -1
- package/dist/publish.d.ts.map +1 -1
- package/dist/publish.js +7 -1
- package/dist/publish.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -13,6 +13,7 @@ are prefixed `**BREAKING**` and link to the matching section in
|
|
|
13
13
|
### Added
|
|
14
14
|
|
|
15
15
|
- **Reusable workflow accepts a caller-provided `CARGO_REGISTRY_TOKEN` via `secrets:`.** OIDC trusted publishers remain the default and recommended path, but Trusted Publishing on crates.io binds to an *already-published* crate — so the first publish of a brand-new crate has no OIDC path available, and consumers were forced to either fork the workflow or run `cargo publish` outside it. The `workflow_call` surface now declares an optional `CARGO_REGISTRY_TOKEN` secret; when set, the `rust-lang/crates-io-auth-action` OIDC exchange is skipped and the caller-provided token is exported to `$GITHUB_ENV` for the engine's crates handler to read. Callers without a token keep the OIDC path unchanged. The "Auth: OIDC trusted publishers ... Long-lived registry tokens are explicitly NOT supported" framing in `release.yml`'s header has been softened to match. See [README → Trusted publishers → crates.io](./README.md#cratesio) and [MIGRATIONS.md](./MIGRATIONS.md#crates-token-fallback). #283.
|
|
16
|
+
- **Preflight check: every cascaded `kind = "crates"` package's `Cargo.toml` must declare `[package].description` and either `[package].license` or `[package].license-file`.** crates.io rejects publish with `400 Bad Request: missing or empty metadata fields: ...` after `cargo publish`'s verification build has compiled the crate and every transitive dep — wasting the entire publish job on a precondition checkable in milliseconds. The new `requireCratesMetadata` runs alongside `requireAuth` / `requireProvenanceMetadata` in `src/publish.ts`, before any side effects, and reports every failing package + every missing field in one error rather than failing on the first. Surfaces a new stable error code, `PIOT_CRATES_MISSING_METADATA`. Whitespace-only field values are treated as empty. Hit in the wild on `thekevinscott/darkfactory`'s first crate publish; same shape as #280 (npm `repository`). See [MIGRATIONS.md](./MIGRATIONS.md#crates-cargo-toml-must-declare-description-and-license). #290.
|
|
16
17
|
- **Preflight check: every cascaded `kind = "npm"` package must declare a non-empty `repository` field in `package.json`.** `putitoutthere` invokes `npm publish --provenance` on the OIDC trusted-publisher path, and the npm CLI hard-requires this field so the registry can verify the artifact was built from the repo the trusted publisher declares. A missing or empty field previously surfaced as a confusing tail-end npm error after the runner had spun up, OIDC had been negotiated, and the artifact had been built — wasting a full release run on a precondition checkable in milliseconds. The new `requireProvenanceMetadata` runs alongside `requireAuth` in `src/publish.ts`, before any side effects, and reports every failing package in one error rather than failing on the first. Surfaces a new stable error code, `PIOT_NPM_MISSING_REPOSITORY`. Both the canonical object form (`{ type, url, directory? }`) and the legacy single-string form are accepted; only an empty `url` (or no `url` at all) fails. The npm handler's inline backstop is also tightened to match the same predicate (previously `!pkg.repository` slipped `{}`, `{ type: 'git' }`, and whitespace strings through). Documented in [README → `kind = "npm"`](./README.md#kind--npm). See [MIGRATIONS.md](./MIGRATIONS.md#npm-package-json-must-declare-repository). #280.
|
|
17
18
|
- **Reusable workflow `.github/workflows/build.yml` (`workflow_call`).** PR-time build verification: runs the same plan + build matrix that `release.yml` runs, calling a shared internal `_matrix.yml` reusable workflow so action pins, per-target build steps, and runner selection cannot drift between the two paths. `build.yml` declares only `permissions: contents: read` and contains no publish job, no `id-token: write`, no OIDC trusted-publisher exchange, and no registry auth — the bytes required to publish do not exist on this code path. Two optional inputs forwarded to `_matrix.yml`: `node_version` (default `24`), `python_version` (default `3.12`). Concurrency is keyed on `github.ref` with `cancel-in-progress: true` so PR pushes supersede stale runs (release.yml's repository-keyed group with `cancel-in-progress: false` is unchanged). An `actionlint`-job grep assertion rejects any future patch that adds `id-token: write` to `build.yml` or `_matrix.yml`. See [README → Build check](./README.md#1b-optional-drop-in-githubworkflowsbuild-checkyml) and [MIGRATIONS.md](./MIGRATIONS.md#new-buildyml-reusable-workflow-for-pr-time-build-verification).
|
|
18
19
|
- **`PIOT_PUBLISH_EMPTY_PLAN` error code.** Surfaced when `publish` is invoked with an empty matrix. Joins `PIOT_AUTH_NO_TOKEN` in the stable error-code vocabulary; foreign agents debugging a failed publish can fingerprint on the code without parsing prose.
|
|
@@ -34,6 +35,8 @@ are prefixed `**BREAKING**` and link to the matching section in
|
|
|
34
35
|
|
|
35
36
|
- **Bundled-CLI / napi npm consumers' `npm run build` step now sees `TARGET` and `BUILD` env vars on every matrix row.** The reusable workflow's `_matrix.yml` and `release.yml` previously ran the npm build step with no env block, so consumers' build scripts that read `process.env.TARGET` to know which triple to cross-compile saw `undefined` and either crashed or silently no-oped. Every per-platform matrix row then uploaded an empty `build/<triple>/` directory and `actions/upload-artifact@v7` flagged `No files were found with the provided path: ...`. The internal `e2e-fixture-job.yml` already passed `TARGET` / `BUILD` correctly — meaning the fixture suite passed but a real consumer's first publish still failed; an integration-tier divergence rather than a behavior bug per se. Both the build matrix step and the publish-job rebuild step in `release.yml` now set the env block. `_matrix.yml` exposes `TARGET=${{ matrix.target }}` / `BUILD=${{ matrix.build }}` per row; `release.yml`'s rebuild loop sets `TARGET=main BUILD=` per iteration (the publish-time rebuild only fires for the main package's row, since per-platform sub-packages stage from `artifacts/` via the engine's npm-platform handler). The README's [Bundled-CLI npm family](./README.md#bundled-cli-npm-family) recipe gained the consumer-side build-script contract that was previously missing — TARGET/BUILD vocabulary and a minimal `scripts/build.cjs` covering the simple single-workspace case. Hit in the wild on `thekevinscott/darkfactory`'s first release; tracked at #287. See [MIGRATIONS.md](./MIGRATIONS.md#npm-build-step-target-build-env-vars).
|
|
36
37
|
|
|
38
|
+
- **First-publish bundled-cli / napi npm builds no longer fail on lockfile drift.** Consumers of the bundled-cli / napi shape declare `optionalDependencies` for `<name>-<triple>@<version>` platform packages that this pipeline publishes. On the very first publish those entries 404 on the registry; pnpm 10 silently drops 404'd optionals from the lockfile when it is regenerated locally; a subsequent CI run with `pnpm install --frozen-lockfile` (or `npm ci`) refuses because lockfile and `package.json` disagree. Both install steps in the reusable workflow — `_matrix.yml`'s build-matrix install and `release.yml`'s publish-job rebuild step (added in #256) — now self-heal: a failed strict install falls back to its non-strict form (`pnpm install --no-frozen-lockfile` / `npm install`) with a `::warning::` line in the run log naming the recovery. No consumer-side change required; lockfiles can stay committed and `optionalDependencies` can stay declared. Hit in the wild on `thekevinscott/darkfactory`'s first release (#integration-2026-05-bundled-cli). The README's [Bundled-CLI npm family](./README.md#bundled-cli-npm-family) recipe grew a `[!NOTE]` callout documenting the chicken-and-egg and the workflow's transparent recovery. See [MIGRATIONS.md](./MIGRATIONS.md#first-publish-bundled-cli-lockfile-self-heal).
|
|
39
|
+
|
|
37
40
|
- **pypi/maturin `[package.bundle_cli]` now actually ships the bundled binary inside published wheels.** The recipe was advertised as shipped in v0.2.0 (#217) — config parsing accepted `[package.bundle_cli]`, the planner attached it to per-target wheel rows, and `MIGRATIONS.md` named the two scaffolded build steps consumers should expect. None of those steps existed in `.github/workflows/_matrix.yml`. Consumers who declared the block (us, in `thekevinscott/dirsql`) shipped wheels missing the binary; `pip install <pkg> && <pkg> ...` failed at runtime with `FileNotFoundError`. The reusable workflow's build job now, for every per-target wheel row that carries `matrix.bundle_cli`: (1) `rustup target add ${{ matrix.target }}`, (2) `cargo build --release --target ${{ matrix.target }} --bin ${{ matrix.bundle_cli.bin }}` against `crate_path`, (3) copies the resulting binary into `${{ matrix.path }}/${{ matrix.bundle_cli.stage_to }}/` so maturin's `[tool.maturin].include` glob picks it up as wheel data, and (4) runs a permanent post-build wheel-content guard that opens the produced `.whl` and refuses to upload-artifact if `<stage_to>/<bin>` is missing. The guard is independent of staging — it catches any future regression where the cross-compile silently routes the binary to the wrong path. Consumers do not need to change their existing `[package.bundle_cli]` config or their `[tool.maturin].include` glob; the recipe just starts working. The cross-compile assumes the binary is buildable with a vanilla `cargo build --release --bin <bin>` (no `--features`, no env, no special flags); crates that gate the CLI behind a Cargo feature are not yet supported. The `.exe` suffix on Windows is handled. See [README → Recipes → Rust CLI inside a PyPI wheel](./README.md#rust-cli-inside-a-pypi-wheel) and [MIGRATIONS.md](./MIGRATIONS.md#bundle_cli-now-actually-stages-the-binary). #282.
|
|
38
41
|
|
|
39
42
|
- **`putitoutthere.toml` validation now names common typos in the failure message.** A consumer integration shipped a config with `version` at the file root, `[[packages]]` (plural), `registry =` instead of `kind =`, and `files =` instead of `globs =`. The raw zod errors (`Invalid input: expected object, received undefined; ...; Unrecognized keys: "version", "packages"`) were opaque enough that the engine source had to be re-read to recover. A pre-pass in `parseConfig` now detects each of those four mistakes by name and emits a hint that pairs the wrong shape with the right one, e.g. `top-level table is \`[[packages]]\` (plural) but should be \`[[package]]\` (singular)`. README's [Drop in `putitoutthere.toml`](./README.md#2-drop-in-putitoutthere-toml) section grew a four-row "wrong → right" table covering the same four traps so the docs and the engine name them the same way; a new `[!IMPORTANT]` callout in [Drop in `.github/workflows/release.yml`](./README.md#1-drop-in-githubworkflowsreleaseyml) warns consumers off `push: branches: [main]` triggers on lane CI workflows (which fire duplicate runs against the merge commit and contend for runners with `release.yml`); `1b.` was promoted from "Optional" to "Recommended" since `build.yml` is the cheapest place to catch a malformed config before merge. See [MIGRATIONS.md](./MIGRATIONS.md#friendly-config-error-hints).
|
package/MIGRATIONS.md
CHANGED
|
@@ -21,6 +21,61 @@ Each section covers five things, in order:
|
|
|
21
21
|
|
|
22
22
|
## Unreleased
|
|
23
23
|
|
|
24
|
+
### Crates Cargo.toml must declare `description` and `license`
|
|
25
|
+
|
|
26
|
+
**Summary.** Every cascaded `kind = "crates"` package's `Cargo.toml`
|
|
27
|
+
must now declare `[package].description` and either `[package].license`
|
|
28
|
+
or `[package].license-file`. The new preflight check
|
|
29
|
+
(`requireCratesMetadata` in `src/preflight.ts`) runs in
|
|
30
|
+
`src/publish.ts` immediately after `requireProvenanceMetadata` and
|
|
31
|
+
rejects the run with `PIOT_CRATES_MISSING_METADATA` before any
|
|
32
|
+
runner work. Why: crates.io rejects publish with `400 Bad Request:
|
|
33
|
+
missing or empty metadata fields: ...` after `cargo publish`'s
|
|
34
|
+
verification build has compiled the crate and every transitive dep
|
|
35
|
+
— wasting the entire publish job (often a minute+ of compile time
|
|
36
|
+
plus the upload) on a precondition checkable in milliseconds. Hit
|
|
37
|
+
in the wild on `thekevinscott/darkfactory`'s first crate publish;
|
|
38
|
+
tracked in #290. Same shape as #280 (npm `repository`).
|
|
39
|
+
|
|
40
|
+
**Required changes.** Add the two fields to every Cargo.toml
|
|
41
|
+
declared as `kind = "crates"` in `putitoutthere.toml`.
|
|
42
|
+
|
|
43
|
+
| Before | After |
|
|
44
|
+
| --------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
45
|
+
| `[package]`<br>`name = "lib"`<br>`version = "0.1.0"`<br>`edition = "2021"` | `[package]`<br>`name = "lib"`<br>`version = "0.1.0"`<br>`edition = "2021"`<br>`description = "One-line summary."`<br>`license = "MIT OR Apache-2.0"` |
|
|
46
|
+
|
|
47
|
+
`license-file = "LICENSE"` is accepted as a substitute for
|
|
48
|
+
`license` (the SPDX expression form). Whitespace-only values
|
|
49
|
+
(`description = " "`) are treated as empty.
|
|
50
|
+
|
|
51
|
+
No `release.yml` or `putitoutthere.toml` changes are required.
|
|
52
|
+
|
|
53
|
+
**Deprecations removed.** None.
|
|
54
|
+
|
|
55
|
+
**Behavior changes without code changes.** `putitoutthere publish`
|
|
56
|
+
now fails fast at preflight with
|
|
57
|
+
`[PIOT_CRATES_MISSING_METADATA] cargo publish requires the
|
|
58
|
+
following Cargo.toml [package] fields: description, and license
|
|
59
|
+
(or license-file).` for any cascaded crates package whose
|
|
60
|
+
Cargo.toml lacks the fields. Previously the same shape ran
|
|
61
|
+
through plan + auth-negotiation + ~30s of cargo verification
|
|
62
|
+
build and failed inside `cargo publish` with a 400 from
|
|
63
|
+
crates.io. Well-formed packages are unaffected.
|
|
64
|
+
|
|
65
|
+
The error message names every failing package, its `Cargo.toml`
|
|
66
|
+
path, and the specific missing fields, so consumers fix all of
|
|
67
|
+
them in one round-trip rather than discovering them one at a
|
|
68
|
+
time across multiple release attempts.
|
|
69
|
+
|
|
70
|
+
**Verification.** Drop `description` from one of your Cargo.toml
|
|
71
|
+
files locally and run `pnpm test:integration` (or the engine
|
|
72
|
+
against a local fixture); the failure should arrive at preflight
|
|
73
|
+
with `PIOT_CRATES_MISSING_METADATA` in the message, no crate
|
|
74
|
+
should be published, and no git tag should be created. Restore
|
|
75
|
+
the field; the next run completes normally.
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
24
79
|
### npm build step: TARGET / BUILD env vars
|
|
25
80
|
|
|
26
81
|
**Summary.** The reusable workflow's `_matrix.yml` and `release.yml`
|
|
@@ -72,6 +127,55 @@ artifacts: each `<pkg>-npm-<triple>` upload contains
|
|
|
72
127
|
`build/<triple>/<bin-name>`. The release run's `Upload artifact`
|
|
73
128
|
step no longer logs `No files were found with the provided path`
|
|
74
129
|
for any npm row.
|
|
130
|
+
### First-publish bundled-cli lockfile self-heal
|
|
131
|
+
|
|
132
|
+
**Summary.** The reusable workflow's npm install steps —
|
|
133
|
+
`_matrix.yml`'s build-matrix install and `release.yml`'s
|
|
134
|
+
publish-job rebuild (#256) — both ran strict installs (`npm ci`
|
|
135
|
+
or `pnpm install --frozen-lockfile`) and refused on any drift
|
|
136
|
+
between the committed lockfile and `package.json`. For consumers
|
|
137
|
+
of the bundled-cli / napi shape, drift is the *expected* state on
|
|
138
|
+
the first publish: `package.json` declares
|
|
139
|
+
`optionalDependencies` for `<name>-<triple>@<version>` platform
|
|
140
|
+
packages that this pipeline produces, those packages don't exist
|
|
141
|
+
on the registry yet, pnpm 10 silently drops 404'd optionals from
|
|
142
|
+
the lockfile when it is regenerated locally, and the next CI run
|
|
143
|
+
sees lockfile and `package.json` disagree. Hit in the wild on
|
|
144
|
+
`thekevinscott/darkfactory`'s first release.
|
|
145
|
+
|
|
146
|
+
Both install steps now fall back from the strict form to its
|
|
147
|
+
non-strict counterpart on failure (`pnpm install --no-frozen-lockfile`
|
|
148
|
+
/ `npm install`) and emit a `::warning::` line in the run log
|
|
149
|
+
naming the recovery. The README's
|
|
150
|
+
[Bundled-CLI npm family](./README.md#bundled-cli-npm-family)
|
|
151
|
+
recipe grew a `[!NOTE]` callout documenting the chicken-and-egg
|
|
152
|
+
and the workflow's transparent recovery.
|
|
153
|
+
|
|
154
|
+
**Required changes.** None. Consumers who were working around
|
|
155
|
+
the failure by gitignoring the lockfile, by suppressing
|
|
156
|
+
`optionalDependencies` from `package.json`, or by pinning to
|
|
157
|
+
older lockfile-tolerant pnpm versions can revert those
|
|
158
|
+
workarounds; the workflow now handles the bootstrap state on
|
|
159
|
+
its own.
|
|
160
|
+
|
|
161
|
+
**Deprecations removed.** None.
|
|
162
|
+
|
|
163
|
+
**Behavior changes without code changes.** Strict installs that
|
|
164
|
+
previously failed red on lockfile drift now succeed via the
|
|
165
|
+
non-strict fallback path. The build artifact is unchanged
|
|
166
|
+
(installs the deps `package.json` declares); only the strictness
|
|
167
|
+
of *how* it gets there relaxes. Healthy lockfiles still take
|
|
168
|
+
the strict path with no observable difference. The new
|
|
169
|
+
`::warning::` lines are visible in the run log on the GitHub
|
|
170
|
+
Actions UI but do not fail the run.
|
|
171
|
+
|
|
172
|
+
**Verification.** A bundled-cli / napi consumer's first-publish
|
|
173
|
+
release run completes the build matrix without manual lockfile
|
|
174
|
+
fiddling. The run log contains a single
|
|
175
|
+
`::warning::pnpm-lock.yaml drift ...` line per affected install
|
|
176
|
+
step (one in the build matrix, one in the publish-job rebuild)
|
|
177
|
+
when the strict install fails; healthy installs see no
|
|
178
|
+
warning.
|
|
75
179
|
|
|
76
180
|
### `[package.bundle_cli]` now actually stages the binary
|
|
77
181
|
|
package/README.md
CHANGED
|
@@ -546,6 +546,25 @@ Each per-platform sub-package needs its own npm trusted-publisher
|
|
|
546
546
|
registration (a policy on `my-cli` does not cover
|
|
547
547
|
`my-cli-x86_64-unknown-linux-gnu`).
|
|
548
548
|
|
|
549
|
+
> [!NOTE]
|
|
550
|
+
> **First-publish lockfile chicken-and-egg.** Some scaffolding will
|
|
551
|
+
> populate `optionalDependencies` in your top-level `package.json`
|
|
552
|
+
> with entries for `my-cli-<triple>@<version>` ahead of the first
|
|
553
|
+
> publish. Those packages don't exist on the registry yet — the
|
|
554
|
+
> engine publishes them as part of *this* run — so a locally-generated
|
|
555
|
+
> `package-lock.json` / `pnpm-lock.yaml` either fails to install or
|
|
556
|
+
> silently drops the entries (pnpm 10 does the silent drop). On the
|
|
557
|
+
> next CI run, the strict installs (`npm ci`,
|
|
558
|
+
> `pnpm install --frozen-lockfile`) refuse because lockfile and
|
|
559
|
+
> `package.json` disagree.
|
|
560
|
+
>
|
|
561
|
+
> The reusable workflow handles this transparently: every strict
|
|
562
|
+
> install in the build matrix and the publish-job rebuild step
|
|
563
|
+
> falls back to its non-strict form on failure (with a
|
|
564
|
+
> `::warning::` line in the run log so the recovery is visible).
|
|
565
|
+
> No consumer-side change is required; you can keep the lockfile
|
|
566
|
+
> committed and the `optionalDependencies` declared.
|
|
567
|
+
|
|
549
568
|
### Multi-mode npm family
|
|
550
569
|
|
|
551
570
|
For a package that is both a napi-rs Node addon (a `.node` library) **and**
|
package/dist/error-codes.d.ts
CHANGED
|
@@ -36,6 +36,14 @@ export declare const ErrorCodes: {
|
|
|
36
36
|
* declares. Failing at preflight prevents wasting a build run on
|
|
37
37
|
* a precondition checkable in milliseconds. #280. */
|
|
38
38
|
readonly NPM_MISSING_REPOSITORY: "PIOT_NPM_MISSING_REPOSITORY";
|
|
39
|
+
/** A crates package's `Cargo.toml` is missing one or more
|
|
40
|
+
* required `[package]` metadata fields (`description` and
|
|
41
|
+
* `license`/`license-file`). crates.io rejects the publish with
|
|
42
|
+
* `400 Bad Request: missing or empty metadata fields: ...` after
|
|
43
|
+
* cargo's verification build has compiled the crate and every
|
|
44
|
+
* transitive dep. Failing at preflight catches the precondition
|
|
45
|
+
* in milliseconds. #290. */
|
|
46
|
+
readonly CRATES_MISSING_METADATA: "PIOT_CRATES_MISSING_METADATA";
|
|
39
47
|
};
|
|
40
48
|
export type ErrorCode = (typeof ErrorCodes)[keyof typeof ErrorCodes];
|
|
41
49
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-codes.d.ts","sourceRoot":"","sources":["../src/error-codes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,eAAO,MAAM,UAAU;IACrB;;;8CAG0C;;IAE1C;;;;;;kDAM8C;;IAE9C;;;;;0DAKsD;;
|
|
1
|
+
{"version":3,"file":"error-codes.d.ts","sourceRoot":"","sources":["../src/error-codes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,eAAO,MAAM,UAAU;IACrB;;;8CAG0C;;IAE1C;;;;;;kDAM8C;;IAE9C;;;;;0DAKsD;;IAEtD;;;;;;iCAM6B;;CAErB,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC;AAErE;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,SAAS,SAAS,EAK/C,CAAC"}
|
package/dist/error-codes.js
CHANGED
|
@@ -36,6 +36,14 @@ export const ErrorCodes = {
|
|
|
36
36
|
* declares. Failing at preflight prevents wasting a build run on
|
|
37
37
|
* a precondition checkable in milliseconds. #280. */
|
|
38
38
|
NPM_MISSING_REPOSITORY: 'PIOT_NPM_MISSING_REPOSITORY',
|
|
39
|
+
/** A crates package's `Cargo.toml` is missing one or more
|
|
40
|
+
* required `[package]` metadata fields (`description` and
|
|
41
|
+
* `license`/`license-file`). crates.io rejects the publish with
|
|
42
|
+
* `400 Bad Request: missing or empty metadata fields: ...` after
|
|
43
|
+
* cargo's verification build has compiled the crate and every
|
|
44
|
+
* transitive dep. Failing at preflight catches the precondition
|
|
45
|
+
* in milliseconds. #290. */
|
|
46
|
+
CRATES_MISSING_METADATA: 'PIOT_CRATES_MISSING_METADATA',
|
|
39
47
|
};
|
|
40
48
|
/**
|
|
41
49
|
* Iterable form of the codes. Walked by tests for uniqueness/format
|
|
@@ -45,5 +53,6 @@ export const ALL_ERROR_CODES = [
|
|
|
45
53
|
ErrorCodes.AUTH_NO_TOKEN,
|
|
46
54
|
ErrorCodes.PUBLISH_EMPTY_PLAN,
|
|
47
55
|
ErrorCodes.NPM_MISSING_REPOSITORY,
|
|
56
|
+
ErrorCodes.CRATES_MISSING_METADATA,
|
|
48
57
|
];
|
|
49
58
|
//# sourceMappingURL=error-codes.js.map
|
package/dist/error-codes.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-codes.js","sourceRoot":"","sources":["../src/error-codes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB;;;8CAG0C;IAC1C,aAAa,EAAE,oBAAoB;IACnC;;;;;;kDAM8C;IAC9C,kBAAkB,EAAE,yBAAyB;IAC7C;;;;;0DAKsD;IACtD,sBAAsB,EAAE,6BAA6B;
|
|
1
|
+
{"version":3,"file":"error-codes.js","sourceRoot":"","sources":["../src/error-codes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB;;;8CAG0C;IAC1C,aAAa,EAAE,oBAAoB;IACnC;;;;;;kDAM8C;IAC9C,kBAAkB,EAAE,yBAAyB;IAC7C;;;;;0DAKsD;IACtD,sBAAsB,EAAE,6BAA6B;IACrD;;;;;;iCAM6B;IAC7B,uBAAuB,EAAE,8BAA8B;CAC/C,CAAC;AAIX;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAyB;IACnD,UAAU,CAAC,aAAa;IACxB,UAAU,CAAC,kBAAkB;IAC7B,UAAU,CAAC,sBAAsB;IACjC,UAAU,CAAC,uBAAuB;CACnC,CAAC"}
|
package/dist/preflight.d.ts
CHANGED
|
@@ -71,4 +71,40 @@ export declare function checkProvenanceMetadata(packages: readonly Package[]): P
|
|
|
71
71
|
* is a misconfiguration — fail fast.
|
|
72
72
|
*/
|
|
73
73
|
export declare function requireProvenanceMetadata(packages: readonly Package[]): void;
|
|
74
|
+
/** A required Cargo.toml `[package]` field that crates.io enforces. */
|
|
75
|
+
export type CratesRequiredField = 'description' | 'license';
|
|
76
|
+
export interface CratesMetadataFinding {
|
|
77
|
+
package: string;
|
|
78
|
+
/** Pkg-relative `Cargo.toml` path examined. */
|
|
79
|
+
cargoTomlPath: string;
|
|
80
|
+
/** Required fields that are missing or empty. */
|
|
81
|
+
missing: readonly CratesRequiredField[];
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Scan every crates package's `Cargo.toml` for the metadata fields
|
|
85
|
+
* crates.io hard-requires at publish time:
|
|
86
|
+
*
|
|
87
|
+
* - `[package].description` — non-empty string.
|
|
88
|
+
* - `[package].license` OR `[package].license-file` — non-empty string.
|
|
89
|
+
*
|
|
90
|
+
* Returns the list of findings; an empty list means every crates
|
|
91
|
+
* package is well-formed.
|
|
92
|
+
*
|
|
93
|
+
* Non-crates packages, missing `Cargo.toml`, and malformed TOML are
|
|
94
|
+
* skipped — other parts of the pipeline already cover those failure
|
|
95
|
+
* modes; this check is scoped to the metadata fields alone.
|
|
96
|
+
*/
|
|
97
|
+
export declare function checkCratesMetadata(packages: readonly Package[]): CratesMetadataFinding[];
|
|
98
|
+
/**
|
|
99
|
+
* Throw with an actionable error when any crates package's Cargo.toml
|
|
100
|
+
* lacks a required `[package]` metadata field. Reports every failing
|
|
101
|
+
* package + missing fields in one error rather than failing on the
|
|
102
|
+
* first, so consumers fix them all in one round-trip.
|
|
103
|
+
*
|
|
104
|
+
* Why: crates.io's 400 lands after `cargo publish`'s verification
|
|
105
|
+
* build has compiled the crate and every transitive dep — wasting
|
|
106
|
+
* the entire publish job on a precondition checkable in milliseconds.
|
|
107
|
+
* #290.
|
|
108
|
+
*/
|
|
109
|
+
export declare function requireCratesMetadata(packages: readonly Package[]): void;
|
|
74
110
|
//# sourceMappingURL=preflight.d.ts.map
|
package/dist/preflight.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preflight.d.ts","sourceRoot":"","sources":["../src/preflight.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;
|
|
1
|
+
{"version":3,"file":"preflight.d.ts","sourceRoot":"","sources":["../src/preflight.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAOH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAqBvC,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,IAAI,CAAC;IACX,GAAG,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;IAClC,iEAAiE;IACjE,MAAM,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;CACpC;AAED,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,OAAO,CAAC;IACZ,OAAO,EAAE,UAAU,EAAE,CAAC;CACvB;AAED,wBAAgB,SAAS,CAAC,QAAQ,EAAE,SAAS,OAAO,EAAE,GAAG,UAAU,CAgBlE;AAED,wBAAgB,WAAW,CAAC,QAAQ,EAAE,SAAS,OAAO,EAAE,GAAG,IAAI,CAiB9D;AAcD,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,iDAAiD;IACjD,eAAe,EAAE,MAAM,CAAC;IACxB,oEAAoE;IACpE,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC;CAC7B;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,SAAS,OAAO,EAAE,GAC3B,iBAAiB,EAAE,CA0BrB;AAWD;;;;;;;;;;GAUG;AACH,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,SAAS,OAAO,EAAE,GAAG,IAAI,CA8B5E;AAYD,uEAAuE;AACvE,MAAM,MAAM,mBAAmB,GAAG,aAAa,GAAG,SAAS,CAAC;AAE5D,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,+CAA+C;IAC/C,aAAa,EAAE,MAAM,CAAC;IACtB,iDAAiD;IACjD,OAAO,EAAE,SAAS,mBAAmB,EAAE,CAAC;CACzC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,SAAS,OAAO,EAAE,GAC3B,qBAAqB,EAAE,CAoCzB;AAMD;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,SAAS,OAAO,EAAE,GAAG,IAAI,CA6BxE"}
|
package/dist/preflight.js
CHANGED
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
*/
|
|
23
23
|
import { readFileSync } from 'node:fs';
|
|
24
24
|
import { join } from 'node:path';
|
|
25
|
+
import { parse as parseToml } from 'smol-toml';
|
|
25
26
|
import { ErrorCodes } from './error-codes.js';
|
|
26
27
|
// Per-kind accepted env var names, primary first. `checkAuth` scans left
|
|
27
28
|
// to right and reports the first that has a non-empty value. npm takes
|
|
@@ -161,4 +162,93 @@ export function requireProvenanceMetadata(packages) {
|
|
|
161
162
|
lines.push('', 'Why: `npm publish --provenance` (used by putitoutthere on the OIDC trusted-publisher', 'path) hard-requires this field so npm can verify the package was built from the repo', 'the trusted publisher declares.', '', 'Fix: add a `repository` block to each failing package.json. Canonical shape:', '', ' {', ' "repository": {', ' "type": "git",', ' "url": "git+https://github.com/<owner>/<repo>.git",', ' "directory": "<path/to/package>"', ' }', ' }', '', `See ${REPOSITORY_DOC_POINTER}.`);
|
|
162
163
|
throw new Error(lines.join('\n'));
|
|
163
164
|
}
|
|
165
|
+
/* ----------------------- crates.io required metadata ----------------------- */
|
|
166
|
+
// crates.io rejects publish with `400 Bad Request: missing or empty
|
|
167
|
+
// metadata fields: ...` when [package].description is empty/missing
|
|
168
|
+
// or when neither [package].license nor [package].license-file is set.
|
|
169
|
+
// The official cargo manifest reference for what's required vs.
|
|
170
|
+
// recommended.
|
|
171
|
+
const CARGO_DOC_POINTER = 'https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata';
|
|
172
|
+
/**
|
|
173
|
+
* Scan every crates package's `Cargo.toml` for the metadata fields
|
|
174
|
+
* crates.io hard-requires at publish time:
|
|
175
|
+
*
|
|
176
|
+
* - `[package].description` — non-empty string.
|
|
177
|
+
* - `[package].license` OR `[package].license-file` — non-empty string.
|
|
178
|
+
*
|
|
179
|
+
* Returns the list of findings; an empty list means every crates
|
|
180
|
+
* package is well-formed.
|
|
181
|
+
*
|
|
182
|
+
* Non-crates packages, missing `Cargo.toml`, and malformed TOML are
|
|
183
|
+
* skipped — other parts of the pipeline already cover those failure
|
|
184
|
+
* modes; this check is scoped to the metadata fields alone.
|
|
185
|
+
*/
|
|
186
|
+
export function checkCratesMetadata(packages) {
|
|
187
|
+
const findings = [];
|
|
188
|
+
for (const p of packages) {
|
|
189
|
+
if (p.kind !== 'crates')
|
|
190
|
+
continue;
|
|
191
|
+
const cargoTomlPath = join(p.path, 'Cargo.toml');
|
|
192
|
+
let raw;
|
|
193
|
+
try {
|
|
194
|
+
raw = readFileSync(cargoTomlPath, 'utf8');
|
|
195
|
+
}
|
|
196
|
+
catch {
|
|
197
|
+
// The crates handler surfaces "Cargo.toml not found" with a
|
|
198
|
+
// clear error; this check owns metadata fields, not file
|
|
199
|
+
// existence. Skip.
|
|
200
|
+
continue;
|
|
201
|
+
}
|
|
202
|
+
let parsed;
|
|
203
|
+
try {
|
|
204
|
+
parsed = parseToml(raw);
|
|
205
|
+
}
|
|
206
|
+
catch {
|
|
207
|
+
// Malformed TOML — cargo's own parser will surface it with a
|
|
208
|
+
// useful diagnostic. Skip.
|
|
209
|
+
continue;
|
|
210
|
+
}
|
|
211
|
+
const pkgTable = (parsed.package ?? {});
|
|
212
|
+
const missing = [];
|
|
213
|
+
if (!nonEmptyString(pkgTable.description))
|
|
214
|
+
missing.push('description');
|
|
215
|
+
if (!nonEmptyString(pkgTable.license) &&
|
|
216
|
+
!nonEmptyString(pkgTable['license-file'])) {
|
|
217
|
+
missing.push('license');
|
|
218
|
+
}
|
|
219
|
+
if (missing.length > 0) {
|
|
220
|
+
findings.push({ package: p.name, cargoTomlPath, missing });
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
return findings;
|
|
224
|
+
}
|
|
225
|
+
function nonEmptyString(v) {
|
|
226
|
+
return typeof v === 'string' && v.trim().length > 0;
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Throw with an actionable error when any crates package's Cargo.toml
|
|
230
|
+
* lacks a required `[package]` metadata field. Reports every failing
|
|
231
|
+
* package + missing fields in one error rather than failing on the
|
|
232
|
+
* first, so consumers fix them all in one round-trip.
|
|
233
|
+
*
|
|
234
|
+
* Why: crates.io's 400 lands after `cargo publish`'s verification
|
|
235
|
+
* build has compiled the crate and every transitive dep — wasting
|
|
236
|
+
* the entire publish job on a precondition checkable in milliseconds.
|
|
237
|
+
* #290.
|
|
238
|
+
*/
|
|
239
|
+
export function requireCratesMetadata(packages) {
|
|
240
|
+
const findings = checkCratesMetadata(packages);
|
|
241
|
+
if (findings.length === 0)
|
|
242
|
+
return;
|
|
243
|
+
const lines = [
|
|
244
|
+
`[${ErrorCodes.CRATES_MISSING_METADATA}] cargo publish requires the following Cargo.toml [package] fields: description, and license (or license-file).`,
|
|
245
|
+
'',
|
|
246
|
+
'Failing packages:',
|
|
247
|
+
];
|
|
248
|
+
for (const f of findings) {
|
|
249
|
+
lines.push(` - ${f.package}: ${f.cargoTomlPath} (missing: ${f.missing.join(', ')})`);
|
|
250
|
+
}
|
|
251
|
+
lines.push('', 'Why: crates.io rejects publish with `400 Bad Request: missing or empty', 'metadata fields: ...` after cargo publish has compiled the crate and every', 'transitive dep — wasting the full publish job on a precondition checkable', 'in milliseconds.', '', 'Fix: add the missing fields to each Cargo.toml. Example:', '', ' [package]', ' description = "One-line summary of what the crate does."', ' license = "MIT OR Apache-2.0"', '', `See ${CARGO_DOC_POINTER}.`);
|
|
252
|
+
throw new Error(lines.join('\n'));
|
|
253
|
+
}
|
|
164
254
|
//# sourceMappingURL=preflight.js.map
|
package/dist/preflight.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preflight.js","sourceRoot":"","sources":["../src/preflight.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"preflight.js","sourceRoot":"","sources":["../src/preflight.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,WAAW,CAAC;AAG/C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAG9C,yEAAyE;AACzE,uEAAuE;AACvE,6DAA6D;AAC7D,oEAAoE;AACpE,kEAAkE;AAClE,yDAAyD;AACzD,uEAAuE;AACvE,uCAAuC;AACvC,MAAM,SAAS,GAAoC;IACjD,MAAM,EAAE,CAAC,sBAAsB,CAAC;IAChC,IAAI,E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C;CACjD;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,OAAO,CAAC;IACZ,SAAS,EAAE,KAAK,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,aAAa,CAAA;KAAE,CAAC,CAAC;CAC/E;AAED,wBAAsB,OAAO,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC,
|
|
1
|
+
{"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../src/publish.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAcH,OAAO,EAA6B,KAAK,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAGzF,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0BAA0B;IAC1B,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,KAAK,OAAO,CAAC;CACjD;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,OAAO,CAAC;IACZ,SAAS,EAAE,KAAK,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,aAAa,CAAA;KAAE,CAAC,CAAC;CAC/E;AAED,wBAAsB,OAAO,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC,CAgJ1E"}
|
package/dist/publish.js
CHANGED
|
@@ -24,7 +24,7 @@ import { handlerFor as defaultHandlerFor } from './handlers/index.js';
|
|
|
24
24
|
import { createLogger } from './log.js';
|
|
25
25
|
import { plan } from './plan.js';
|
|
26
26
|
import { formatTag } from './tag-template.js';
|
|
27
|
-
import { requireAuth, requireProvenanceMetadata } from './preflight.js';
|
|
27
|
+
import { requireAuth, requireCratesMetadata, requireProvenanceMetadata } from './preflight.js';
|
|
28
28
|
import { withRetry } from './retry.js';
|
|
29
29
|
import { readHandlerMeta } from './types.js';
|
|
30
30
|
import { dumpFailure } from './verbose.js';
|
|
@@ -71,6 +71,12 @@ export async function publish(opts) {
|
|
|
71
71
|
// it, `npm publish --provenance` fails deep inside the npm CLI
|
|
72
72
|
// after the runner has spun up — checkable in milliseconds. #280.
|
|
73
73
|
requireProvenanceMetadata(selectedPackages);
|
|
74
|
+
// 2c. Pre-flight crates metadata: every selected crates package's
|
|
75
|
+
// Cargo.toml must declare `description` and either `license` or
|
|
76
|
+
// `license-file`. crates.io's 400 lands after `cargo publish`'s
|
|
77
|
+
// verification build has compiled the crate and every transitive
|
|
78
|
+
// dep — same wasted-work argument as 2b. #290.
|
|
79
|
+
requireCratesMetadata(selectedPackages);
|
|
74
80
|
// 3. Artifact completeness.
|
|
75
81
|
const completeness = checkCompleteness(matrix, artifactsRoot(cwd));
|
|
76
82
|
const incomplete = [...completeness.entries()].filter(([, r]) => !r.ok);
|
package/dist/publish.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish.js","sourceRoot":"","sources":["../src/publish.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEtD,OAAO,EAAE,UAAU,EAAgB,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1D,OAAO,EAAE,UAAU,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,IAAI,EAAkB,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,SAA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