@intentius/chant 0.124.64 → 0.124.65
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/cli/handlers/release.d.ts.map +1 -1
- package/dist/cli/handlers/release.js +20 -2
- package/dist/cli/handlers/run.d.ts +30 -1
- package/dist/cli/handlers/run.d.ts.map +1 -1
- package/dist/cli/handlers/run.js +108 -7
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +17 -2
- package/dist/cli/parse-args.d.ts.map +1 -1
- package/dist/cli/parse-args.js +7 -0
- package/dist/cli/registry.d.ts +5 -1
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/components/cli-support.d.ts +19 -1
- package/dist/components/cli-support.d.ts.map +1 -1
- package/dist/components/cli-support.js +11 -3
- package/dist/components/component.d.ts +19 -0
- package/dist/components/component.d.ts.map +1 -1
- package/dist/components/component.schema.json +17 -0
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/release-run.d.ts +48 -0
- package/dist/components/release-run.d.ts.map +1 -0
- package/dist/components/release-run.js +166 -0
- package/dist/components/starter-plugin.d.ts +1 -0
- package/dist/components/starter-plugin.d.ts.map +1 -1
- package/dist/components/starter-plugin.js +5 -1
- package/dist/components/unchanged-inputs.d.ts +81 -0
- package/dist/components/unchanged-inputs.d.ts.map +1 -0
- package/dist/components/unchanged-inputs.js +122 -0
- package/dist/components/verbs/index.d.ts +1 -0
- package/dist/components/verbs/index.d.ts.map +1 -1
- package/dist/components/verbs/index.js +1 -0
- package/dist/components/verbs/release-image.d.ts +36 -0
- package/dist/components/verbs/release-image.d.ts.map +1 -0
- package/dist/components/verbs/release-image.js +33 -0
- package/dist/lifecycle/delivery-metrics.d.ts.map +1 -1
- package/dist/lifecycle/delivery-metrics.js +4 -2
- package/dist/lifecycle/gate-statement.d.ts.map +1 -1
- package/dist/lifecycle/gate-statement.js +1 -2
- package/dist/lifecycle/git.d.ts.map +1 -1
- package/dist/lifecycle/git.js +6 -1
- package/dist/lifecycle/ledger-read.js +1 -1
- package/dist/lifecycle/publish-homebrew.d.ts.map +1 -1
- package/dist/lifecycle/publish-homebrew.js +1 -2
- package/dist/lifecycle/publish-marketplace.d.ts.map +1 -1
- package/dist/lifecycle/publish-marketplace.js +2 -3
- package/dist/lifecycle/query.d.ts +2 -2
- package/dist/lifecycle/query.d.ts.map +1 -1
- package/dist/lifecycle/query.js +3 -3
- package/dist/lifecycle/release-cut.d.ts +32 -2
- package/dist/lifecycle/release-cut.d.ts.map +1 -1
- package/dist/lifecycle/release-cut.js +47 -7
- package/dist/lifecycle/release-ledger.d.ts +11 -0
- package/dist/lifecycle/release-ledger.d.ts.map +1 -1
- package/dist/lifecycle/release-store.d.ts +17 -3
- package/dist/lifecycle/release-store.d.ts.map +1 -1
- package/dist/lifecycle/release-store.js +11 -3
- package/dist/op/activities/activity-contracts.d.ts +4 -4
- package/dist/op/op-waves-run.js +5 -3
- package/dist/release-floors.d.ts +1 -1
- package/dist/release-floors.js +1 -1
- package/dist/wave-runtime.mjs +237 -237
- package/dist/workspace/delivery-metrics.schema.json +1 -1
- package/dist/workspace/release-candidates.d.ts.map +1 -1
- package/dist/workspace/release-candidates.js +1 -2
- package/dist/workspace/releases.schema.json +7 -2
- package/package.json +1 -1
- package/src/cli/handlers/release.ts +18 -2
- package/src/cli/handlers/run-unchanged.e2e.test.ts +112 -0
- package/src/cli/handlers/run.ts +117 -7
- package/src/cli/main.ts +17 -2
- package/src/cli/parse-args.ts +6 -0
- package/src/cli/registry.ts +5 -1
- package/src/components/cli-support.test.ts +53 -0
- package/src/components/cli-support.ts +26 -4
- package/src/components/component.schema.json +17 -0
- package/src/components/component.ts +20 -0
- package/src/components/index.ts +1 -0
- package/src/components/registry.test.ts +1 -1
- package/src/components/release-run.test.ts +127 -0
- package/src/components/release-run.ts +188 -0
- package/src/components/starter-plugin.ts +5 -0
- package/src/components/unchanged-inputs.test.ts +98 -0
- package/src/components/unchanged-inputs.ts +151 -0
- package/src/components/verbs/index.ts +1 -0
- package/src/components/verbs/release-image.ts +52 -0
- package/src/lifecycle/delivery-metrics.ts +4 -2
- package/src/lifecycle/gate-statement.ts +1 -2
- package/src/lifecycle/git.test.ts +15 -0
- package/src/lifecycle/git.ts +5 -1
- package/src/lifecycle/ledger-read.ts +1 -1
- package/src/lifecycle/publish-homebrew.ts +1 -2
- package/src/lifecycle/publish-marketplace.ts +2 -3
- package/src/lifecycle/query.ts +3 -3
- package/src/lifecycle/release-cut-lane.test.ts +18 -0
- package/src/lifecycle/release-cut-override.test.ts +12 -0
- package/src/lifecycle/release-cut.test.ts +45 -0
- package/src/lifecycle/release-cut.ts +67 -7
- package/src/lifecycle/release-ledger.ts +11 -0
- package/src/lifecycle/release-store.ts +29 -5
- package/src/op/op-waves-run.ts +4 -2
- package/src/release-floors.ts +1 -1
- package/src/workspace/delivery-metrics.schema.json +1 -1
- package/src/workspace/delivery-metrics.test.ts +8 -0
- package/src/workspace/release-candidates.ts +1 -2
- package/src/workspace/releases.schema.json +7 -2
|
@@ -43,6 +43,7 @@ import { sortedJsonReplacer } from "../utils.js";
|
|
|
43
43
|
import { contentDigest, sha256Hex } from "../content-digest.js";
|
|
44
44
|
import { computePlanDigest } from "./plan-digest.js";
|
|
45
45
|
import { ledgerDir, listFilesInDir, readBlobBySha, readBlobFromPath, readPathSha, RefCASConflictError, writeLedgerFiles, } from "./git.js";
|
|
46
|
+
import { NEXT_RELEASE } from "../release-floors.js";
|
|
46
47
|
/** The directory on `chant/lifecycle` that holds releases, cuts and template bytes. */
|
|
47
48
|
export const RELEASES_DIR = "_releases";
|
|
48
49
|
/** The cut log inside {@link RELEASES_DIR}. */
|
|
@@ -51,6 +52,8 @@ export const CUTS_FILE = "cuts.jsonl";
|
|
|
51
52
|
export const TEMPLATES_SUBDIR = "templates";
|
|
52
53
|
/** The `kind` a release digest is computed under, so it can never equal a plan digest of another kind. */
|
|
53
54
|
export const RELEASE_DIGEST_KIND = "release";
|
|
55
|
+
/** The first chant that writes and reads an artifact's `ref` (#4694). */
|
|
56
|
+
export const RELEASE_IMAGE_REF_FLOOR = NEXT_RELEASE;
|
|
54
57
|
/** Whether `v` reads as a {@link ReleaseCutOverride}. */
|
|
55
58
|
function isCutOverride(v) {
|
|
56
59
|
if (!v || typeof v !== "object")
|
|
@@ -59,12 +62,12 @@ function isCutOverride(v) {
|
|
|
59
62
|
return o.green === false && typeof o.tag === "string" && typeof o.by === "string" && typeof o.at === "string" && typeof o.reason === "string" && typeof o.digest === "string" && typeof o.sealed === "boolean";
|
|
60
63
|
}
|
|
61
64
|
const byString = (a, b) => (a < b ? -1 : a > b ? 1 : 0);
|
|
62
|
-
/** The same release with every list in the order ws-104 sets: artifacts by component then path, targets by env, templates by component then path, params by name. */
|
|
65
|
+
/** The same release with every list in the order ws-104 sets: artifacts by component then path (a handed image's `ref` kept), targets by env, templates by component then path, params by name. */
|
|
63
66
|
export function normalizeRelease(release) {
|
|
64
67
|
return {
|
|
65
68
|
...release,
|
|
66
69
|
artifactDigests: [...release.artifactDigests]
|
|
67
|
-
.map(({ component, kind, path, digest }) => ({ component, kind, path, digest }))
|
|
70
|
+
.map(({ component, kind, path, digest, ref }) => ({ component, kind, path, digest, ...(ref !== undefined ? { ref } : {}) }))
|
|
68
71
|
.sort((a, b) => byString(a.component, b.component) || byString(a.path, b.path)),
|
|
69
72
|
targets: [...release.targets]
|
|
70
73
|
.map((t) => ({
|
|
@@ -190,7 +193,12 @@ export function parseRelease(text) {
|
|
|
190
193
|
(r.member === null || typeof r.member === "string") &&
|
|
191
194
|
typeof r.commit === "string" &&
|
|
192
195
|
Array.isArray(r.artifactDigests) &&
|
|
193
|
-
r.artifactDigests.every((a) => a &&
|
|
196
|
+
r.artifactDigests.every((a) => a &&
|
|
197
|
+
typeof a.component === "string" &&
|
|
198
|
+
(a.kind === "image" || a.kind === "asset") &&
|
|
199
|
+
typeof a.path === "string" &&
|
|
200
|
+
typeof a.digest === "string" &&
|
|
201
|
+
(a.ref === undefined || typeof a.ref === "string")) &&
|
|
194
202
|
Array.isArray(r.targets) &&
|
|
195
203
|
r.targets.every((t) => t &&
|
|
196
204
|
typeof t.env === "string" &&
|
|
@@ -357,11 +357,11 @@ export declare const decideContract: import("../index.js").ActivityContract<{
|
|
|
357
357
|
backends?: Record<string, {
|
|
358
358
|
url: string;
|
|
359
359
|
key?: {
|
|
360
|
+
env: string;
|
|
361
|
+
} | {
|
|
360
362
|
capability: string;
|
|
361
363
|
member?: string | undefined;
|
|
362
364
|
env?: string | undefined;
|
|
363
|
-
} | {
|
|
364
|
-
env: string;
|
|
365
365
|
} | undefined;
|
|
366
366
|
timeoutMs?: number | undefined;
|
|
367
367
|
}> | undefined;
|
|
@@ -450,11 +450,11 @@ export declare const factoryAskContract: import("../index.js").ActivityContract<
|
|
|
450
450
|
backends?: Record<string, {
|
|
451
451
|
url: string;
|
|
452
452
|
key?: {
|
|
453
|
+
env: string;
|
|
454
|
+
} | {
|
|
453
455
|
capability: string;
|
|
454
456
|
member?: string | undefined;
|
|
455
457
|
env?: string | undefined;
|
|
456
|
-
} | {
|
|
457
|
-
env: string;
|
|
458
458
|
} | undefined;
|
|
459
459
|
timeoutMs?: number | undefined;
|
|
460
460
|
}> | undefined;
|
package/dist/op/op-waves-run.js
CHANGED
|
@@ -3264,11 +3264,13 @@ async function storeHeadChangeSet(doc, cwd) {
|
|
|
3264
3264
|
await persistChangeSet(doc, { cwd });
|
|
3265
3265
|
}
|
|
3266
3266
|
async function writeHeadPlans(plans, cwd) {
|
|
3267
|
-
const {
|
|
3267
|
+
const { pushLifecycleRebasing, requireLifecycleLedger, writeBlobToPath } = await import("../lifecycle/git.js");
|
|
3268
3268
|
const { headPlansPath } = await import("./gate-review.js");
|
|
3269
3269
|
await requireLifecycleLedger({ cwd });
|
|
3270
3270
|
const { dir, file } = headPlansPath(plans.name, plans.head);
|
|
3271
3271
|
await writeBlobToPath(dir, file, JSON.stringify(plans, null, 2) + "\n", `Op waves plans of ${plans.name} at ${plans.head.slice(0, 12)}`, { cwd });
|
|
3272
|
-
|
|
3273
|
-
|
|
3272
|
+
// The preview, its note and the approval status write the ledger at the same head, so a lost race replays rather than fails the job a pull request's checks wait on.
|
|
3273
|
+
const pushed = await pushLifecycleRebasing({ cwd });
|
|
3274
|
+
if (!pushed.pushed)
|
|
3275
|
+
throw new Error(`the plans were recorded locally only: ${pushed.pushWarning ?? "chant/lifecycle has no remote to push to"}`);
|
|
3274
3276
|
}
|
package/dist/release-floors.d.ts
CHANGED
|
@@ -19,5 +19,5 @@
|
|
|
19
19
|
* this constant to the next patch (#4501). The check fails while a floor
|
|
20
20
|
* still names this constant after its version shipped.
|
|
21
21
|
*/
|
|
22
|
-
export declare const NEXT_RELEASE = "0.124.
|
|
22
|
+
export declare const NEXT_RELEASE = "0.124.65";
|
|
23
23
|
//# sourceMappingURL=release-floors.d.ts.map
|
package/dist/release-floors.js
CHANGED