@intentius/chant 0.124.100 → 0.124.101
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/dist/action-pins.d.ts +2 -0
- package/dist/action-pins.js +3 -0
- package/dist/ci-detect.d.ts +13 -0
- package/dist/ci-detect.js +12 -0
- package/dist/ci-system.d.ts +66 -0
- package/dist/ci-system.js +61 -0
- package/dist/cli/handlers/build.js +27 -0
- package/dist/cli/handlers/release-doctor.d.ts +12 -0
- package/dist/cli/handlers/release-doctor.js +118 -0
- package/dist/cli/handlers/release-init.d.ts +10 -0
- package/dist/cli/handlers/release-init.js +342 -0
- package/dist/cli/handlers/release.d.ts +42 -1
- package/dist/cli/handlers/release.js +656 -31
- package/dist/cli/handlers/run-generate.js +11 -0
- package/dist/cli/main.d.ts +2 -0
- package/dist/cli/main.js +44 -101
- package/dist/cli/parse-args.js +48 -0
- package/dist/cli/registry.d.ts +16 -0
- package/dist/cli/release-commands/artifacts.d.ts +3 -0
- package/dist/cli/release-commands/artifacts.js +14 -0
- package/dist/cli/release-commands/candidates.d.ts +3 -0
- package/dist/cli/release-commands/candidates.js +16 -0
- package/dist/cli/release-commands/changed.d.ts +3 -0
- package/dist/cli/release-commands/changed.js +14 -0
- package/dist/cli/release-commands/compose.d.ts +3 -0
- package/dist/cli/release-commands/compose.js +16 -0
- package/dist/cli/release-commands/cut.d.ts +3 -0
- package/dist/cli/release-commands/cut.js +49 -0
- package/dist/cli/release-commands/doctor.d.ts +3 -0
- package/dist/cli/release-commands/doctor.js +14 -0
- package/dist/cli/release-commands/export.d.ts +3 -0
- package/dist/cli/release-commands/export.js +12 -0
- package/dist/cli/release-commands/images.d.ts +3 -0
- package/dist/cli/release-commands/images.js +13 -0
- package/dist/cli/release-commands/index.d.ts +8 -0
- package/dist/cli/release-commands/index.js +52 -0
- package/dist/cli/release-commands/init.d.ts +3 -0
- package/dist/cli/release-commands/init.js +16 -0
- package/dist/cli/release-commands/list.d.ts +3 -0
- package/dist/cli/release-commands/list.js +10 -0
- package/dist/cli/release-commands/next.d.ts +3 -0
- package/dist/cli/release-commands/next.js +13 -0
- package/dist/cli/release-commands/publish.d.ts +3 -0
- package/dist/cli/release-commands/publish.js +22 -0
- package/dist/cli/release-commands/stamp.d.ts +3 -0
- package/dist/cli/release-commands/stamp.js +15 -0
- package/dist/cli/release-commands/status.d.ts +3 -0
- package/dist/cli/release-commands/status.js +17 -0
- package/dist/cli/release-commands/tag.d.ts +3 -0
- package/dist/cli/release-commands/tag.js +12 -0
- package/dist/cli/release-commands/types.d.ts +20 -0
- package/dist/cli/release-commands/types.js +1 -0
- package/dist/cli/release-commands/verify.d.ts +3 -0
- package/dist/cli/release-commands/verify.js +15 -0
- package/dist/cli/release-commands/workflow.d.ts +3 -0
- package/dist/cli/release-commands/workflow.js +13 -0
- package/dist/components/cli-support.d.ts +1 -1
- package/dist/components/cli-support.js +1 -1
- package/dist/config-environments.d.ts +8 -1
- package/dist/config-environments.js +2 -0
- package/dist/config.d.ts +294 -9
- package/dist/config.js +100 -5
- package/dist/floor-table.data.js +15 -1
- package/dist/forge-remote.d.ts +13 -0
- package/dist/forge-remote.js +15 -0
- package/dist/lexicon.d.ts +41 -2
- package/dist/lifecycle/__fixtures__/publish-fakes.d.ts +62 -0
- package/dist/lifecycle/__fixtures__/publish-fakes.js +270 -3
- package/dist/lifecycle/publish-attachments.d.ts +2 -1
- package/dist/lifecycle/publish-attachments.js +19 -2
- package/dist/lifecycle/publish-cargo.d.ts +99 -0
- package/dist/lifecycle/publish-cargo.js +412 -0
- package/dist/lifecycle/publish-credentials.d.ts +1 -1
- package/dist/lifecycle/publish-credentials.js +8 -0
- package/dist/lifecycle/publish-declaration.d.ts +199 -4
- package/dist/lifecycle/publish-declaration.js +200 -9
- package/dist/lifecycle/publish-forge.d.ts +45 -2
- package/dist/lifecycle/publish-forge.js +434 -34
- package/dist/lifecycle/publish-git-ssh.d.ts +15 -0
- package/dist/lifecycle/publish-git-ssh.js +30 -4
- package/dist/lifecycle/publish-github.d.ts +40 -2
- package/dist/lifecycle/publish-github.js +100 -3
- package/dist/lifecycle/publish-homebrew.d.ts +7 -9
- package/dist/lifecycle/publish-homebrew.js +34 -197
- package/dist/lifecycle/publish-index.d.ts +141 -0
- package/dist/lifecycle/publish-index.js +719 -0
- package/dist/lifecycle/publish-marketplace.js +77 -0
- package/dist/lifecycle/publish-mcp-registry.d.ts +66 -0
- package/dist/lifecycle/publish-mcp-registry.js +306 -0
- package/dist/lifecycle/publish-npm.js +165 -2
- package/dist/lifecycle/publish-oci.d.ts +34 -1
- package/dist/lifecycle/publish-oci.js +246 -7
- package/dist/lifecycle/publish-pypi.d.ts +136 -0
- package/dist/lifecycle/publish-pypi.js +657 -0
- package/dist/lifecycle/publish-record.d.ts +6 -3
- package/dist/lifecycle/publish-record.js +6 -3
- package/dist/lifecycle/publish-signing.d.ts +147 -0
- package/dist/lifecycle/publish-signing.js +257 -0
- package/dist/lifecycle/publish-targets.d.ts +27 -1
- package/dist/lifecycle/publish-targets.js +80 -0
- package/dist/lifecycle/publish-tauri.js +43 -0
- package/dist/lifecycle/publish-train-names.d.ts +54 -0
- package/dist/lifecycle/publish-train-names.js +118 -0
- package/dist/lifecycle/publish-verify.d.ts +121 -0
- package/dist/lifecycle/publish-verify.js +130 -0
- package/dist/lifecycle/query.js +8 -0
- package/dist/lifecycle/release-artifacts.d.ts +212 -0
- package/dist/lifecycle/release-artifacts.js +571 -0
- package/dist/lifecycle/release-changelog.d.ts +13 -1
- package/dist/lifecycle/release-changelog.js +35 -2
- package/dist/lifecycle/release-cut.d.ts +58 -3
- package/dist/lifecycle/release-cut.js +132 -34
- package/dist/lifecycle/release-doctor.d.ts +113 -0
- package/dist/lifecycle/release-doctor.js +996 -0
- package/dist/lifecycle/release-green.d.ts +86 -0
- package/dist/lifecycle/release-green.js +286 -0
- package/dist/lifecycle/release-init.d.ts +255 -0
- package/dist/lifecycle/release-init.js +859 -0
- package/dist/lifecycle/release-intents.d.ts +73 -0
- package/dist/lifecycle/release-intents.js +128 -0
- package/dist/lifecycle/release-next.d.ts +111 -0
- package/dist/lifecycle/release-next.js +252 -0
- package/dist/lifecycle/release-prerelease.d.ts +19 -0
- package/dist/lifecycle/release-prerelease.js +30 -0
- package/dist/lifecycle/release-publish.d.ts +256 -10
- package/dist/lifecycle/release-publish.js +246 -34
- package/dist/lifecycle/release-status-change.d.ts +226 -0
- package/dist/lifecycle/release-status-change.js +478 -0
- package/dist/lifecycle/release-status.d.ts +11 -0
- package/dist/lifecycle/release-status.js +1 -1
- package/dist/lifecycle/release-store.d.ts +73 -2
- package/dist/lifecycle/release-store.js +32 -1
- package/dist/lifecycle/release-tag.d.ts +142 -0
- package/dist/lifecycle/release-tag.js +323 -0
- package/dist/lifecycle/release-verify.d.ts +73 -1
- package/dist/lifecycle/release-verify.js +117 -2
- package/dist/lifecycle/release-version-formats.d.ts +73 -0
- package/dist/lifecycle/release-version-formats.js +570 -0
- package/dist/lifecycle/release-version.d.ts +58 -10
- package/dist/lifecycle/release-version.js +164 -36
- package/dist/lifecycle/release-workstation.d.ts +3 -2
- package/dist/lifecycle/release-workstation.js +3 -2
- package/dist/op/generate-pipeline.js +1 -1
- package/dist/pr-forge-base.js +4 -2
- package/dist/pr-forge.d.ts +20 -2
- package/dist/pr-forge.js +46 -10
- package/dist/release-floors.d.ts +8 -1
- package/dist/release-floors.js +9 -2
- package/dist/tool-pins.d.ts +38 -0
- package/dist/tool-pins.js +54 -0
- package/dist/wave-runtime.mjs +337 -334
- package/dist/workspace/ci-forge.d.ts +17 -0
- package/dist/workspace/ci-forge.js +17 -0
- package/dist/workspace/ci-init.js +1 -1
- package/dist/workspace/composites.schema.json +1 -0
- package/dist/workspace/declaration.d.ts +8 -0
- package/dist/workspace/declaration.js +12 -0
- package/dist/workspace/declaration.schema.json +8 -0
- package/dist/workspace/environments.d.ts +2 -0
- package/dist/workspace/environments.js +1 -1
- package/dist/workspace/identity-gate-rule.d.ts +61 -5
- package/dist/workspace/identity-gate-rule.js +81 -12
- package/dist/workspace/member-pipeline.d.ts +2 -1
- package/dist/workspace/member-pipeline.js +5 -2
- package/dist/workspace/reason-codes.d.ts +2 -0
- package/dist/workspace/reason-codes.js +3 -1
- package/dist/workspace/release-changed.d.ts +75 -4
- package/dist/workspace/release-changed.js +205 -34
- package/dist/workspace/release-changed.schema.json +20 -2
- package/dist/workspace/release-steps/artifacts.d.ts +7 -0
- package/dist/workspace/release-steps/artifacts.js +45 -0
- package/dist/workspace/release-steps/builds.d.ts +12 -0
- package/dist/workspace/release-steps/builds.js +38 -0
- package/dist/workspace/release-steps/doctor.d.ts +8 -0
- package/dist/workspace/release-steps/doctor.js +14 -0
- package/dist/workspace/release-steps/goreleaser.d.ts +16 -0
- package/dist/workspace/release-steps/goreleaser.js +36 -0
- package/dist/workspace/release-steps/green.d.ts +3 -0
- package/dist/workspace/release-steps/green.js +6 -0
- package/dist/workspace/release-steps/images.d.ts +22 -0
- package/dist/workspace/release-steps/images.js +59 -0
- package/dist/workspace/release-steps/index.d.ts +9 -0
- package/dist/workspace/release-steps/index.js +46 -0
- package/dist/workspace/release-steps/pypi.d.ts +15 -0
- package/dist/workspace/release-steps/pypi.js +21 -0
- package/dist/workspace/release-steps/qemu.d.ts +21 -0
- package/dist/workspace/release-steps/qemu.js +35 -0
- package/dist/workspace/release-steps/signing.d.ts +18 -0
- package/dist/workspace/release-steps/signing.js +30 -0
- package/dist/workspace/release-steps/stamp.d.ts +3 -0
- package/dist/workspace/release-steps/stamp.js +4 -0
- package/dist/workspace/release-steps/targets.d.ts +31 -0
- package/dist/workspace/release-steps/targets.js +40 -0
- package/dist/workspace/release-steps/types.d.ts +104 -0
- package/dist/workspace/release-steps/types.js +2 -0
- package/dist/workspace/release-steps/verify.d.ts +3 -0
- package/dist/workspace/release-steps/verify.js +4 -0
- package/dist/workspace/release-toolchains.d.ts +59 -0
- package/dist/workspace/release-toolchains.js +133 -0
- package/dist/workspace/release-train-workflow.d.ts +29 -0
- package/dist/workspace/release-train-workflow.js +85 -0
- package/dist/workspace/release-train.d.ts +3 -1
- package/dist/workspace/release-train.js +20 -3
- package/dist/workspace/release-workflow.d.ts +160 -61
- package/dist/workspace/release-workflow.js +539 -193
- package/dist/workspace/releases.schema.json +70 -1
- package/dist/workspace/search-contract.d.ts +1 -1
- package/dist/workspace/security.js +9 -2
- package/dist/workspace/train-cut.d.ts +182 -0
- package/dist/workspace/train-cut.js +482 -0
- package/dist/workspace/train-prepare.d.ts +61 -0
- package/dist/workspace/train-prepare.js +267 -0
- package/dist/workspace/train-publish.d.ts +177 -0
- package/dist/workspace/train-publish.js +575 -0
- package/dist/workspace/train-range-labels.d.ts +33 -0
- package/dist/workspace/train-range-labels.js +109 -0
- package/dist/workspace/trust/seal.d.ts +13 -3
- package/dist/workspace/trust/seal.js +14 -4
- package/dist/workspace/work-cli.d.ts +3 -2
- package/dist/workspace/work-cli.js +3 -2
- package/dist/workspace/workspace-ledger.d.ts +14 -1
- package/dist/workspace/workspace-ledger.js +33 -7
- package/package.json +1 -1
|
@@ -137,8 +137,15 @@ export function seedFakeNpmRegistry(log, registry) {
|
|
|
137
137
|
* registry does, a package's first version is also `latest`. It exits 1
|
|
138
138
|
* when the package path contains `$FAKE_NPM_FAIL`.
|
|
139
139
|
* - `view <name>@<version> version` prints the version when it is there.
|
|
140
|
+
* - `view <name> versions --json` (#5154) prints every version it holds, as
|
|
141
|
+
* npm does: a string for one, an array for several; E404 for none.
|
|
142
|
+
* - `view <name> dist-tags.<tag>` (#5136) prints the version the tag names.
|
|
143
|
+
* `$FAKE_NPM_TAG_LAG`, `<name>=<n>[,...]`: the first `n` such views of that
|
|
144
|
+
* name print nothing, as a registry whose tag has not propagated yet.
|
|
140
145
|
* - `dist-tag add <name>@<version> <tag>` points the tag at a version that is
|
|
141
146
|
* there. It exits 1 when the name contains `$FAKE_NPM_FAIL_TAG`.
|
|
147
|
+
* - `deprecate <name>@<version> <message>` (#5163) keeps the message on the
|
|
148
|
+
* version, and an empty message clears it.
|
|
142
149
|
* - `install` (#4049) checks that every dependency in `./package.json` is in
|
|
143
150
|
* its registry at that version, and installs nothing.
|
|
144
151
|
* - `audit signatures` (#4049) prints what npm prints for verified
|
|
@@ -185,6 +192,21 @@ if (args[0] === "publish") {
|
|
|
185
192
|
if (!p.distTags.latest) p.distTags.latest = version;
|
|
186
193
|
save();
|
|
187
194
|
console.log("+ " + name + "@" + version);
|
|
195
|
+
} else if (args[0] === "view" && args[2] && args[2].startsWith("dist-tags.")) {
|
|
196
|
+
const name = args[1];
|
|
197
|
+
const p = reg.packages[name];
|
|
198
|
+
if (!p) { console.error("npm error code E404"); console.error("npm error 404 Not Found - " + name); process.exit(1); }
|
|
199
|
+
const lag = (process.env.FAKE_NPM_TAG_LAG || "").split(",").filter(Boolean).find((pair) => pair.slice(0, pair.lastIndexOf("=")) === name);
|
|
200
|
+
reg.tagViews = reg.tagViews || {};
|
|
201
|
+
reg.tagViews[name] = (reg.tagViews[name] || 0) + 1; save();
|
|
202
|
+
if (lag && reg.tagViews[name] <= Number(lag.slice(lag.lastIndexOf("=") + 1))) process.exit(0);
|
|
203
|
+
const tag = p.distTags[args[2].slice("dist-tags.".length)];
|
|
204
|
+
if (tag) console.log(tag);
|
|
205
|
+
} else if (args[0] === "view" && args[2] === "versions") {
|
|
206
|
+
// #5154: every version the registry holds, as npm prints it with --json.
|
|
207
|
+
const p = reg.packages[args[1]];
|
|
208
|
+
if (!p) { console.error("npm error code E404"); console.error("npm error 404 Not Found - " + args[1]); process.exit(1); }
|
|
209
|
+
console.log(JSON.stringify(p.versions.length === 1 ? p.versions[0] : p.versions));
|
|
188
210
|
} else if (args[0] === "view") {
|
|
189
211
|
const [name, version] = split(args[1]);
|
|
190
212
|
const p = reg.packages[name];
|
|
@@ -204,6 +226,13 @@ if (args[0] === "publish") {
|
|
|
204
226
|
p.distTags[args[3]] = version;
|
|
205
227
|
save();
|
|
206
228
|
console.log("+" + args[3] + ": " + args[2]);
|
|
229
|
+
} else if (args[0] === "deprecate") {
|
|
230
|
+
const [name, version] = split(args[1]);
|
|
231
|
+
const p = reg.packages[name];
|
|
232
|
+
if (!p || !p.versions.includes(version)) { console.error("npm error 404 " + args[1] + " is not in the npm registry"); process.exit(1); }
|
|
233
|
+
p.deprecated = p.deprecated || {};
|
|
234
|
+
if (args[2]) p.deprecated[version] = args[2]; else delete p.deprecated[version];
|
|
235
|
+
save();
|
|
207
236
|
} else if (args[0] === "install") {
|
|
208
237
|
if (Number(process.env.FAKE_NPM_INSTALL_ETARGET || 0) > (reg.installs || 0)) {
|
|
209
238
|
reg.installs = (reg.installs || 0) + 1; save();
|
|
@@ -240,7 +269,7 @@ export function startFakeForge(forge, api, repo, releases = []) {
|
|
|
240
269
|
const json = (status, body) => ({ ok: status < 300, status, headers: { get: () => null }, text: async () => (body === undefined ? "" : JSON.stringify(body)) });
|
|
241
270
|
const view = (r) => forge === "gitlab"
|
|
242
271
|
? { tag_name: r.tag_name, assets: { links: r.assets.map((a) => ({ name: a.name })) } }
|
|
243
|
-
: { id: r.id, tag_name: r.tag_name, name: r.name ?? r.tag_name, draft: r.draft, upload_url: `${uploads}/repos/${repo}/releases/${r.id}/assets{?name,label}`, assets: r.assets.map((a) => ({ name: a.name, ...(forge === "github" ? { digest: a.digest } : {}) })) };
|
|
272
|
+
: { id: r.id, tag_name: r.tag_name, name: r.name ?? r.tag_name, draft: r.draft, prerelease: r.prerelease === true, ...(r.body !== undefined ? { body: r.body } : {}), upload_url: `${uploads}/repos/${repo}/releases/${r.id}/assets{?name,label}`, assets: r.assets.map((a) => ({ name: a.name, ...(forge === "github" ? { digest: a.digest } : {}) })) };
|
|
244
273
|
const text = (b) => (b === undefined ? "" : typeof b === "string" ? b : Buffer.from(b).toString("utf-8"));
|
|
245
274
|
const fetch = async (url, init) => {
|
|
246
275
|
calls.push({ method: init.method, url, headers: init.headers, ...(init.body !== undefined ? { body: init.body } : {}) });
|
|
@@ -252,7 +281,10 @@ export function startFakeForge(forge, api, repo, releases = []) {
|
|
|
252
281
|
}
|
|
253
282
|
const u = new URL(url);
|
|
254
283
|
const path = url.split("?")[0];
|
|
284
|
+
const generated = (req) => (fake.generatedNotes ? fake.generatedNotes(req) : `generated: ${Object.entries(req).map(([k, v]) => `${k}=${v}`).join(" ")}`);
|
|
255
285
|
if (forge === "gitlab") {
|
|
286
|
+
if (init.method === "GET" && path === `${root}/repository/changelog`)
|
|
287
|
+
return json(200, { notes: generated(Object.fromEntries(u.searchParams)) });
|
|
256
288
|
if (init.method === "PUT" && path.startsWith(`${root}/packages/generic/`)) {
|
|
257
289
|
packages.set(path, text(init.body));
|
|
258
290
|
return json(201, { message: "201 Created" });
|
|
@@ -279,6 +311,8 @@ export function startFakeForge(forge, api, repo, releases = []) {
|
|
|
279
311
|
}
|
|
280
312
|
if (init.method === "GET" && path === `${root}/releases`)
|
|
281
313
|
return json(200, releases.map(view));
|
|
314
|
+
if (forge === "github" && init.method === "POST" && path === `${root}/releases/generate-notes`)
|
|
315
|
+
return json(200, { name: "notes", body: generated(JSON.parse(text(init.body))) });
|
|
282
316
|
if (init.method === "POST" && path === `${root}/releases`) {
|
|
283
317
|
const b = JSON.parse(text(init.body));
|
|
284
318
|
const r = { id: nextId++, tag_name: b.tag_name, draft: b.draft === true, target: b.target_commitish, assets: [], ...(b.name ? { name: b.name } : {}), ...(b.body !== undefined ? { body: b.body } : {}) };
|
|
@@ -318,6 +352,12 @@ export function startFakeForge(forge, api, repo, releases = []) {
|
|
|
318
352
|
if (b.make_latest !== undefined)
|
|
319
353
|
r.make_latest = b.make_latest;
|
|
320
354
|
}
|
|
355
|
+
else if (b.draft === true) {
|
|
356
|
+
r.draft = true;
|
|
357
|
+
}
|
|
358
|
+
else if (b.make_latest !== undefined) {
|
|
359
|
+
r.make_latest = b.make_latest;
|
|
360
|
+
}
|
|
321
361
|
return json(200, view(r));
|
|
322
362
|
}
|
|
323
363
|
if (init.method === "DELETE" && edit) {
|
|
@@ -336,7 +376,7 @@ export function startFakeForge(forge, api, repo, releases = []) {
|
|
|
336
376
|
}
|
|
337
377
|
return json(404, { message: "Not Found" });
|
|
338
378
|
};
|
|
339
|
-
|
|
379
|
+
const fake = {
|
|
340
380
|
fetch,
|
|
341
381
|
calls,
|
|
342
382
|
releases,
|
|
@@ -345,6 +385,7 @@ export function startFakeForge(forge, api, repo, releases = []) {
|
|
|
345
385
|
failOnce: (prefix) => void failures.push(prefix),
|
|
346
386
|
tags,
|
|
347
387
|
};
|
|
388
|
+
return fake;
|
|
348
389
|
}
|
|
349
390
|
/** A small SPDX document, as `npm sbom --sbom-format spdx` writes one. */
|
|
350
391
|
export function spdxDocument(name) {
|
|
@@ -419,8 +460,20 @@ export function startFakeGitHubRepo(api, repo, branch, files) {
|
|
|
419
460
|
return json(201, { ref: body.ref, object: { sha: body.sha } });
|
|
420
461
|
}
|
|
421
462
|
const contents = path.startsWith(`${root}/contents/`) ? path.slice(`${root}/contents/`.length).split("/").map(decodeURIComponent).join("/") : null;
|
|
463
|
+
if (init.method === "GET" && path === `${root}/commits`) {
|
|
464
|
+
// #5163: the commits of a branch that touch a path, newest first.
|
|
465
|
+
const file = u.searchParams.get("path") ?? "";
|
|
466
|
+
const out = [];
|
|
467
|
+
for (let c = branches.get(u.searchParams.get("sha") ?? branch) ?? null; c; c = commits.get(c).parent) {
|
|
468
|
+
const parent = commits.get(c).parent;
|
|
469
|
+
if (commits.get(c).files.get(file) !== (parent ? commits.get(parent).files.get(file) : undefined))
|
|
470
|
+
out.push({ sha: c });
|
|
471
|
+
}
|
|
472
|
+
return json(200, out);
|
|
473
|
+
}
|
|
422
474
|
if (contents !== null && init.method === "GET") {
|
|
423
|
-
const
|
|
475
|
+
const r = u.searchParams.get("ref") ?? branch;
|
|
476
|
+
const at = branches.get(r) ?? (commits.has(r) ? r : undefined);
|
|
424
477
|
const text = at ? commits.get(at).files.get(contents) : undefined;
|
|
425
478
|
return text === undefined ? json(404, { message: "Not Found" }) : json(200, { sha: blob(text), encoding: "base64", content: Buffer.from(text).toString("base64") });
|
|
426
479
|
}
|
|
@@ -455,3 +508,217 @@ export function startFakeGitHubRepo(api, repo, branch, files) {
|
|
|
455
508
|
},
|
|
456
509
|
};
|
|
457
510
|
}
|
|
511
|
+
/**
|
|
512
|
+
* A GitHub fake for the index target (#5158): `GET /user` names `user`; the
|
|
513
|
+
* repository, refs, contents (files and submodules), git data (blobs, trees,
|
|
514
|
+
* commits), fork and pull request APIs. A fork made by `POST .../forks`
|
|
515
|
+
* answers 404 to its first `forkDelay` reads, as GitHub makes forks in the
|
|
516
|
+
* background.
|
|
517
|
+
*/
|
|
518
|
+
export function startFakeGitHub(api, opts) {
|
|
519
|
+
const calls = [];
|
|
520
|
+
const commits = new Map();
|
|
521
|
+
const trees = new Map();
|
|
522
|
+
const blobs = new Map();
|
|
523
|
+
const repos = new Map();
|
|
524
|
+
const pulls = [];
|
|
525
|
+
let n = 0;
|
|
526
|
+
const id = (what) => createHash("sha1").update(`${what} ${n++}`).digest("hex");
|
|
527
|
+
const commitOf = (parent, message, tree) => {
|
|
528
|
+
const sha = id("commit");
|
|
529
|
+
commits.set(sha, { parent, message, tree });
|
|
530
|
+
trees.set(`t${sha}`, tree);
|
|
531
|
+
return sha;
|
|
532
|
+
};
|
|
533
|
+
const entries = (files) => new Map(Object.entries(files).map(([p, v]) => [p, typeof v === "string" ? { text: v } : v]));
|
|
534
|
+
const resolve = (repo, ref) => repos.get(repo)?.branches.get(ref) ?? (commits.has(ref) ? ref : undefined);
|
|
535
|
+
const blobSha = (text) => createHash("sha1").update(`blob ${text}`).digest("hex");
|
|
536
|
+
const headers = { get: (name) => (name.toLowerCase() === "x-oauth-scopes" && opts.scopes !== undefined && opts.scopes !== null ? opts.scopes : null) };
|
|
537
|
+
const json = (status, body) => ({ ok: status < 300, status, headers, text: async () => (body === undefined ? "" : JSON.stringify(body)) });
|
|
538
|
+
const fetch = async (url, init) => {
|
|
539
|
+
calls.push({ method: init.method, url, headers: init.headers, ...(init.body !== undefined ? { body: init.body } : {}) });
|
|
540
|
+
const u = new URL(url);
|
|
541
|
+
const path = url.split("?")[0];
|
|
542
|
+
const body = typeof init.body === "string" ? JSON.parse(init.body) : {};
|
|
543
|
+
if (path === `${api}/user` && init.method === "GET")
|
|
544
|
+
return json(200, { login: opts.user });
|
|
545
|
+
const m = path.slice(api.length).match(/^\/repos\/([^/]+\/[^/]+)(\/.*)?$/);
|
|
546
|
+
if (!m)
|
|
547
|
+
return json(404, { message: "Not Found" });
|
|
548
|
+
const name = m[1];
|
|
549
|
+
const rest = m[2] ?? "";
|
|
550
|
+
const r = repos.get(name);
|
|
551
|
+
if (r && r.hiddenReads > 0 && init.method === "GET" && rest === "") {
|
|
552
|
+
r.hiddenReads--;
|
|
553
|
+
return json(404, { message: "Not Found" });
|
|
554
|
+
}
|
|
555
|
+
if (rest === "/forks" && init.method === "POST") {
|
|
556
|
+
if (!r)
|
|
557
|
+
return json(404, { message: "Not Found" });
|
|
558
|
+
const forkName = `${opts.user}/${name.split("/")[1]}`;
|
|
559
|
+
if (forkName === name)
|
|
560
|
+
return json(403, { message: "cannot fork your own repository" });
|
|
561
|
+
if (!repos.has(forkName))
|
|
562
|
+
repos.set(forkName, { defaultBranch: r.defaultBranch, branches: new Map([[r.defaultBranch, r.branches.get(r.defaultBranch)]]), fork: true, hiddenReads: opts.forkDelay ?? 0 });
|
|
563
|
+
return json(202, { full_name: forkName });
|
|
564
|
+
}
|
|
565
|
+
if (!r)
|
|
566
|
+
return json(404, { message: "Not Found" });
|
|
567
|
+
if (rest === "" && init.method === "GET")
|
|
568
|
+
return json(200, { full_name: name, default_branch: r.defaultBranch, fork: r.fork, permissions: { push: name.startsWith(`${opts.user}/`) } });
|
|
569
|
+
const ref = rest.match(/^\/git\/refs?\/heads\/(.+)$/);
|
|
570
|
+
if (ref) {
|
|
571
|
+
const branch = decodeURIComponent(ref[1]);
|
|
572
|
+
const at = r.branches.get(branch);
|
|
573
|
+
if (init.method === "GET")
|
|
574
|
+
return at ? json(200, { ref: `refs/heads/${branch}`, object: { sha: at } }) : json(404, { message: "Not Found" });
|
|
575
|
+
if (!at)
|
|
576
|
+
return json(422, { message: "Reference does not exist" });
|
|
577
|
+
if (init.method === "DELETE")
|
|
578
|
+
return void r.branches.delete(branch), json(204);
|
|
579
|
+
if (init.method === "PATCH") {
|
|
580
|
+
const to = String(body.sha);
|
|
581
|
+
if (!commits.has(to))
|
|
582
|
+
return json(422, { message: "Object does not exist" });
|
|
583
|
+
let ancestor = false;
|
|
584
|
+
for (let c = to; c; c = commits.get(c)?.parent ?? null)
|
|
585
|
+
if (c === at)
|
|
586
|
+
ancestor = true;
|
|
587
|
+
if (body.force !== true && !ancestor)
|
|
588
|
+
return json(422, { message: "Update is not a fast forward" });
|
|
589
|
+
r.branches.set(branch, to);
|
|
590
|
+
return json(200, { object: { sha: to } });
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
if (rest === "/git/refs" && init.method === "POST") {
|
|
594
|
+
const branch = String(body.ref).replace(/^refs\/heads\//, "");
|
|
595
|
+
if (r.branches.has(branch))
|
|
596
|
+
return json(422, { message: "Reference already exists" });
|
|
597
|
+
if (!commits.has(String(body.sha)))
|
|
598
|
+
return json(422, { message: "Object does not exist" });
|
|
599
|
+
r.branches.set(branch, String(body.sha));
|
|
600
|
+
return json(201, { ref: body.ref, object: { sha: body.sha } });
|
|
601
|
+
}
|
|
602
|
+
const gc = rest.match(/^\/git\/commits\/([0-9a-f]+)$/);
|
|
603
|
+
if (gc && init.method === "GET")
|
|
604
|
+
return commits.has(gc[1]) ? json(200, { sha: gc[1], tree: { sha: `t${gc[1]}` } }) : json(404, { message: "Not Found" });
|
|
605
|
+
if (rest === "/git/blobs" && init.method === "POST") {
|
|
606
|
+
const text = Buffer.from(String(body.content), "base64").toString("utf-8");
|
|
607
|
+
const sha = blobSha(text);
|
|
608
|
+
blobs.set(sha, text);
|
|
609
|
+
return json(201, { sha });
|
|
610
|
+
}
|
|
611
|
+
if (rest === "/git/trees" && init.method === "POST") {
|
|
612
|
+
const base = trees.get(String(body.base_tree));
|
|
613
|
+
if (!base)
|
|
614
|
+
return json(422, { message: "base_tree not found" });
|
|
615
|
+
const tree = new Map(base);
|
|
616
|
+
for (const e of body.tree) {
|
|
617
|
+
if (e.sha === null)
|
|
618
|
+
tree.delete(e.path);
|
|
619
|
+
else if (e.mode === "160000")
|
|
620
|
+
tree.set(e.path, { gitlink: e.sha });
|
|
621
|
+
else if (blobs.has(e.sha))
|
|
622
|
+
tree.set(e.path, { text: blobs.get(e.sha) });
|
|
623
|
+
else
|
|
624
|
+
return json(422, { message: "blob not found" });
|
|
625
|
+
}
|
|
626
|
+
const sha = id("tree");
|
|
627
|
+
trees.set(sha, tree);
|
|
628
|
+
return json(201, { sha });
|
|
629
|
+
}
|
|
630
|
+
if (rest === "/git/commits" && init.method === "POST") {
|
|
631
|
+
const tree = trees.get(String(body.tree));
|
|
632
|
+
const parents = body.parents;
|
|
633
|
+
if (!tree || parents.length !== 1 || !commits.has(parents[0]))
|
|
634
|
+
return json(422, { message: "bad commit" });
|
|
635
|
+
const sha = id("commit");
|
|
636
|
+
commits.set(sha, { parent: parents[0], message: String(body.message), tree });
|
|
637
|
+
trees.set(`t${sha}`, tree);
|
|
638
|
+
return json(201, { sha });
|
|
639
|
+
}
|
|
640
|
+
if (rest === "/commits" && init.method === "GET") {
|
|
641
|
+
// #5163: the commits of a branch that touch a path, newest first.
|
|
642
|
+
const file = u.searchParams.get("path") ?? "";
|
|
643
|
+
const text = (c) => {
|
|
644
|
+
const e = commits.get(c).tree.get(file);
|
|
645
|
+
return e && "text" in e ? e.text : undefined;
|
|
646
|
+
};
|
|
647
|
+
const out = [];
|
|
648
|
+
for (let c = resolve(name, u.searchParams.get("sha") ?? r.defaultBranch) ?? null; c; c = commits.get(c).parent) {
|
|
649
|
+
const parent = commits.get(c).parent;
|
|
650
|
+
if (text(c) !== (parent ? text(parent) : undefined))
|
|
651
|
+
out.push({ sha: c });
|
|
652
|
+
}
|
|
653
|
+
return json(200, out);
|
|
654
|
+
}
|
|
655
|
+
const contents = rest.startsWith("/contents/") ? rest.slice("/contents/".length).split("/").map(decodeURIComponent).join("/") : null;
|
|
656
|
+
if (contents !== null && init.method === "GET") {
|
|
657
|
+
const at = resolve(name, u.searchParams.get("ref") ?? r.defaultBranch);
|
|
658
|
+
const e = at ? commits.get(at).tree.get(contents) : undefined;
|
|
659
|
+
if (!e)
|
|
660
|
+
return json(404, { message: "Not Found" });
|
|
661
|
+
if ("gitlink" in e)
|
|
662
|
+
return json(200, { type: "submodule", sha: e.gitlink });
|
|
663
|
+
return json(200, { type: "file", sha: blobSha(e.text), encoding: "base64", content: Buffer.from(e.text).toString("base64") });
|
|
664
|
+
}
|
|
665
|
+
if (contents !== null && init.method === "PUT") {
|
|
666
|
+
const on = String(body.branch);
|
|
667
|
+
const at = r.branches.get(on);
|
|
668
|
+
if (!at)
|
|
669
|
+
return json(404, { message: "Branch not found" });
|
|
670
|
+
const current = commits.get(at).tree.get(contents);
|
|
671
|
+
if ((current && "text" in current ? blobSha(current.text) : undefined) !== body.sha)
|
|
672
|
+
return json(409, { message: "sha does not match" });
|
|
673
|
+
const tree = new Map(commits.get(at).tree);
|
|
674
|
+
tree.set(contents, { text: Buffer.from(String(body.content), "base64").toString("utf-8") });
|
|
675
|
+
const sha = commitOf(at, String(body.message), tree);
|
|
676
|
+
r.branches.set(on, sha);
|
|
677
|
+
return json(current === undefined ? 201 : 200, { commit: { sha } });
|
|
678
|
+
}
|
|
679
|
+
if (rest === "/pulls" && init.method === "GET") {
|
|
680
|
+
const head = u.searchParams.get("head");
|
|
681
|
+
return json(200, pulls.filter((p) => p.repo === name && (!head || p.head === head)).map((p) => ({ number: p.number, html_url: `https://github.test/${name}/pull/${p.number}`, state: p.state, merged_at: p.merged ? "2026-11-16T00:00:00Z" : null, head: { label: p.head } })));
|
|
682
|
+
}
|
|
683
|
+
if (rest === "/pulls" && init.method === "POST") {
|
|
684
|
+
const head = String(body.head);
|
|
685
|
+
const [owner, branch] = head.split(":");
|
|
686
|
+
const from = [...repos.entries()].find(([k]) => k.split("/")[0] === owner && repos.get(k).branches.has(branch));
|
|
687
|
+
if (!from)
|
|
688
|
+
return json(422, { message: "head not found" });
|
|
689
|
+
if (pulls.some((p) => p.repo === name && p.head === head && p.state === "open"))
|
|
690
|
+
return json(422, { message: "A pull request already exists" });
|
|
691
|
+
const p = { number: pulls.length + 1, repo: name, head, base: String(body.base), title: String(body.title), body: String(body.body), state: "open", merged: false };
|
|
692
|
+
pulls.push(p);
|
|
693
|
+
return json(201, { number: p.number, html_url: `https://github.test/${name}/pull/${p.number}`, state: "open", merged_at: null, head: { label: head } });
|
|
694
|
+
}
|
|
695
|
+
return json(404, { message: "Not Found" });
|
|
696
|
+
};
|
|
697
|
+
return {
|
|
698
|
+
fetch,
|
|
699
|
+
calls,
|
|
700
|
+
pulls,
|
|
701
|
+
repo: (repo, branch, files) => void repos.set(repo, { defaultBranch: branch, branches: new Map([[branch, commitOf(null, "init", entries(files))]]), fork: false, hiddenReads: 0 }),
|
|
702
|
+
head: (repo, branch) => repos.get(repo)?.branches.get(branch),
|
|
703
|
+
read: (repo, ref, p) => {
|
|
704
|
+
const at = resolve(repo, ref);
|
|
705
|
+
const e = at ? commits.get(at).tree.get(p) : undefined;
|
|
706
|
+
return e && "text" in e ? e.text : undefined;
|
|
707
|
+
},
|
|
708
|
+
gitlink: (repo, ref, p) => {
|
|
709
|
+
const at = resolve(repo, ref);
|
|
710
|
+
const e = at ? commits.get(at).tree.get(p) : undefined;
|
|
711
|
+
return e && "gitlink" in e ? e.gitlink : undefined;
|
|
712
|
+
},
|
|
713
|
+
commit: (sha) => {
|
|
714
|
+
const c = commits.get(sha);
|
|
715
|
+
return c ? { message: c.message, parent: c.parent } : undefined;
|
|
716
|
+
},
|
|
717
|
+
push: (repo, branch, files) => {
|
|
718
|
+
const r = repos.get(repo);
|
|
719
|
+
const at = r.branches.get(branch);
|
|
720
|
+
r.branches.set(branch, commitOf(at, "someone else", new Map([...commits.get(at).tree, ...entries(files)])));
|
|
721
|
+
},
|
|
722
|
+
repos: () => [...repos.keys()],
|
|
723
|
+
};
|
|
724
|
+
}
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
* The provenance statement is an in-toto Statement v1 whose predicate
|
|
6
6
|
* (`https://intentius.io/chant/release/v1`) names the release, its commit,
|
|
7
7
|
* and the cut that signed it, with the cut's ssh signature in the
|
|
8
|
-
* `chant-release` namespace
|
|
8
|
+
* `chant-release` namespace, and the green gate the cut passed: a chant
|
|
9
|
+
* green tag, the forge checks by name, or none (#5149). Anyone holding the repository checks that
|
|
9
10
|
* signature offline with `chant release verify`, against
|
|
10
11
|
* `.chant/allowed_signers` at the release's commit. The predicate also says
|
|
11
12
|
* whether the run had an OIDC token: in CI, the provenance a registry records
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
* The provenance statement is an in-toto Statement v1 whose predicate
|
|
6
6
|
* (`https://intentius.io/chant/release/v1`) names the release, its commit,
|
|
7
7
|
* and the cut that signed it, with the cut's ssh signature in the
|
|
8
|
-
* `chant-release` namespace
|
|
8
|
+
* `chant-release` namespace, and the green gate the cut passed: a chant
|
|
9
|
+
* green tag, the forge checks by name, or none (#5149). Anyone holding the repository checks that
|
|
9
10
|
* signature offline with `chant release verify`, against
|
|
10
11
|
* `.chant/allowed_signers` at the release's commit. The predicate also says
|
|
11
12
|
* whether the run had an OIDC token: in CI, the provenance a registry records
|
|
@@ -64,7 +65,23 @@ export function releaseProvenance(ctx, subjects) {
|
|
|
64
65
|
label: ctx.label,
|
|
65
66
|
member: ctx.release.member,
|
|
66
67
|
commit: ctx.release.commit,
|
|
67
|
-
cut: cut
|
|
68
|
+
cut: cut
|
|
69
|
+
? {
|
|
70
|
+
actor: cut.actor,
|
|
71
|
+
label: cut.label,
|
|
72
|
+
timestamp: cut.timestamp,
|
|
73
|
+
runId: cut.runId,
|
|
74
|
+
signature: cut.signature,
|
|
75
|
+
namespace: RELEASE_SEAL_NAMESPACE,
|
|
76
|
+
// #5149: the gate that let the commit be cut, as the cut line records it; absent on a cut that recorded none.
|
|
77
|
+
...(cut.green ? { green: cut.green } : {}),
|
|
78
|
+
...(cut.override ? { override: { by: cut.override.by, at: cut.override.at, reason: cut.override.reason, tag: cut.override.tag } } : {}),
|
|
79
|
+
// #5177: whether the signature above covers that gate, and the payload version a verifier rebuilds.
|
|
80
|
+
...(cut.lane ? { lane: cut.lane } : {}),
|
|
81
|
+
...(cut.sealVersion ? { sealVersion: cut.sealVersion } : {}),
|
|
82
|
+
...(cut.gate ? { gate: cut.gate } : {}),
|
|
83
|
+
}
|
|
84
|
+
: null,
|
|
68
85
|
provenance: ctx.provenance.oidc ? { kind: "oidc", ci: ctx.provenance.ci } : { kind: "signature", ci: ctx.provenance.ci },
|
|
69
86
|
},
|
|
70
87
|
};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The cargo target (#5167): Rust crates published to crates.io or another
|
|
3
|
+
* Cargo registry with `cargo publish`, one crate at a time, each after the
|
|
4
|
+
* workspace crates it depends on.
|
|
5
|
+
*
|
|
6
|
+
* The crates and their versions come from `cargo metadata --no-deps` on the
|
|
7
|
+
* declared manifest: the ones `crates` names, else every workspace member
|
|
8
|
+
* whose `publish` allows the registry. The version published is the one in
|
|
9
|
+
* each `Cargo.toml`, which `release.version` can stamp with the release's
|
|
10
|
+
* label. A crate's dependency on another workspace crate needs a version
|
|
11
|
+
* beside its path, or cargo refuses to publish it, so the plan refuses it
|
|
12
|
+
* first (`publish-cargo-dependency-version`).
|
|
13
|
+
*
|
|
14
|
+
* A registry has no draft: a crate version is visible as soon as it is
|
|
15
|
+
* published, and a version can never be published twice. So the stage
|
|
16
|
+
* publishes nothing. It reads the registry's sparse index for each crate,
|
|
17
|
+
* and a version already there is `present`. The reveal reads the index
|
|
18
|
+
* again before each crate, so a reveal run again after a failure part way
|
|
19
|
+
* publishes only the crates that are not there yet, and then runs
|
|
20
|
+
*
|
|
21
|
+
* cargo publish -p <crate> --manifest-path <manifest> --no-verify --allow-dirty [--registry <name>]
|
|
22
|
+
*
|
|
23
|
+
* in dependency order. `--no-verify` because a publish never builds: the
|
|
24
|
+
* build belongs to the cut. `--allow-dirty` because the checkout carries the
|
|
25
|
+
* stamped versions, which the publish's own checkout check already allows.
|
|
26
|
+
* cargo waits until the registry's index serves each crate before it
|
|
27
|
+
* returns, so the next crate resolves it. Nothing is out between the stage
|
|
28
|
+
* and the reveal, so a check of what staged can't see this target.
|
|
29
|
+
*
|
|
30
|
+
* Credentials:
|
|
31
|
+
*
|
|
32
|
+
* - `auth: "token"`: a token from `tokenEnv` (default `CARGO_REGISTRY_TOKEN`,
|
|
33
|
+
* or `CARGO_REGISTRIES_<NAME>_TOKEN` with `registry`), handed to cargo in
|
|
34
|
+
* the variable it reads.
|
|
35
|
+
* - `auth: "trusted-publishing"`, crates.io only: the run's OIDC ID token
|
|
36
|
+
* (audience `crates.io`, from GitHub Actions or `CRATES_IO_ID_TOKEN`) is
|
|
37
|
+
* exchanged at `POST {api}/api/v1/trusted_publishing/tokens` for a token
|
|
38
|
+
* that lasts minutes, and revoked with a `DELETE` when the step ends. The
|
|
39
|
+
* stage exchanges and revokes one to check that crates.io takes this
|
|
40
|
+
* workflow as a trusted publisher.
|
|
41
|
+
*
|
|
42
|
+
* Unset, `auth` is a token when the token's variable is set, else trusted
|
|
43
|
+
* publishing when the run has an OIDC ID token.
|
|
44
|
+
*
|
|
45
|
+
* A status change (#5163): `chant release yank` runs `cargo yank --version
|
|
46
|
+
* <version> <crate>` for each crate the release published, and `restore`
|
|
47
|
+
* runs it with `--undo`. A yanked version stays downloadable for lockfiles
|
|
48
|
+
* that name it, and new resolutions skip it. A registry has no deprecation,
|
|
49
|
+
* so `deprecate` changes nothing. A yank needs a token, from the same
|
|
50
|
+
* variable as a publish, that may yank the crates.
|
|
51
|
+
*
|
|
52
|
+
* A registry keeps no file beside a crate, so nothing is attached. Under the
|
|
53
|
+
* `supply-chain` group the target is refused (`publish-sbom-missing`) unless
|
|
54
|
+
* `sbom` is `false`.
|
|
55
|
+
*/
|
|
56
|
+
import type { CargoPublishDeclaration } from "./publish-declaration.js";
|
|
57
|
+
import { type PublishDeps, type PublishTarget } from "./release-publish.js";
|
|
58
|
+
/** The first chant that publishes a `cargo` target (#5167). */
|
|
59
|
+
export declare const PUBLISH_CARGO_FLOOR = "0.124.101";
|
|
60
|
+
export declare const CRATES_IO_INDEX = "https://index.crates.io/";
|
|
61
|
+
export declare const CRATES_IO_API = "https://crates.io";
|
|
62
|
+
/** The variable an OIDC ID token for crates.io is read from outside GitHub Actions. */
|
|
63
|
+
export declare const CRATES_IO_ID_TOKEN_ENV = "CRATES_IO_ID_TOKEN";
|
|
64
|
+
/** The audience crates.io takes an OIDC ID token for. */
|
|
65
|
+
export declare const CRATES_IO_AUDIENCE = "crates.io";
|
|
66
|
+
/** The variable cargo reads a registry's token from. */
|
|
67
|
+
export declare function cargoRegistryTokenVar(registry: string | undefined): string;
|
|
68
|
+
/** The variable the declaration's token is read from. */
|
|
69
|
+
export declare function cargoTokenEnv(decl: Pick<CargoPublishDeclaration, "registry" | "tokenEnv">): string;
|
|
70
|
+
/** How the target authenticates in `env`. */
|
|
71
|
+
export declare function cargoAuth(decl: CargoPublishDeclaration, env: NodeJS.ProcessEnv): "token" | "trusted-publishing";
|
|
72
|
+
/** A crate's file in a sparse index, by Cargo's layout. */
|
|
73
|
+
export declare function sparseIndexPath(name: string): string;
|
|
74
|
+
/** One workspace crate, as `cargo metadata` gives it. */
|
|
75
|
+
export interface CargoCrate {
|
|
76
|
+
name: string;
|
|
77
|
+
version: string;
|
|
78
|
+
/** null: any registry; []: none. */
|
|
79
|
+
publish: string[] | null;
|
|
80
|
+
dependencies: Array<{
|
|
81
|
+
name: string;
|
|
82
|
+
req: string;
|
|
83
|
+
kind: string | null;
|
|
84
|
+
path?: string;
|
|
85
|
+
}>;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* The crates to publish, each after the selected crates it depends on (ties
|
|
89
|
+
* in name order). A dev-dependency with no version is left out of the order,
|
|
90
|
+
* since cargo drops it from what it publishes.
|
|
91
|
+
*/
|
|
92
|
+
export declare function cargoPublishOrder(all: readonly CargoCrate[], decl: Pick<CargoPublishDeclaration, "crates" | "registry">): CargoCrate[];
|
|
93
|
+
/** The workspace's crates, from `cargo metadata --no-deps`. */
|
|
94
|
+
export declare function cargoWorkspace(cargo: string, manifest: string, cwd: string, env: NodeJS.ProcessEnv, runner?: (bin: string, args: string[], cwd: string, env: NodeJS.ProcessEnv) => Promise<{
|
|
95
|
+
code: number;
|
|
96
|
+
stdout: string;
|
|
97
|
+
stderr: string;
|
|
98
|
+
}>): Promise<CargoCrate[]>;
|
|
99
|
+
export declare function cargoTarget(decl: CargoPublishDeclaration, deps: PublishDeps): PublishTarget;
|