@intentius/chant 0.124.33 → 0.124.35
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/graph.js +2 -2
- package/dist/cli/handlers/pr.d.ts.map +1 -1
- package/dist/cli/handlers/pr.js +147 -51
- package/dist/cli/handlers/promote.d.ts.map +1 -1
- package/dist/cli/handlers/promote.js +284 -81
- package/dist/cli/handlers/release.d.ts +12 -0
- package/dist/cli/handlers/release.d.ts.map +1 -1
- package/dist/cli/handlers/release.js +125 -10
- package/dist/cli/handlers/run.d.ts +3 -1
- package/dist/cli/handlers/run.d.ts.map +1 -1
- package/dist/cli/handlers/run.js +12 -2
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +37 -2
- package/dist/cli/parse-args.d.ts.map +1 -1
- package/dist/cli/parse-args.js +24 -0
- package/dist/cli/registry.d.ts +17 -1
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/components/auto-release.d.ts +8 -1
- package/dist/components/auto-release.d.ts.map +1 -1
- package/dist/components/auto-release.js +3 -2
- package/dist/components/green-cover.d.ts +77 -0
- package/dist/components/green-cover.d.ts.map +1 -0
- package/dist/components/green-cover.js +153 -0
- package/dist/components/pr-pipeline.d.ts +34 -0
- package/dist/components/pr-pipeline.d.ts.map +1 -1
- package/dist/components/pr-pipeline.js +39 -5
- package/dist/components/promote-rounds.d.ts +102 -0
- package/dist/components/promote-rounds.d.ts.map +1 -0
- package/dist/components/promote-rounds.js +174 -0
- package/dist/components/promote.d.ts +4 -1
- package/dist/components/promote.d.ts.map +1 -1
- package/dist/components/promote.js +6 -3
- package/dist/components/release-gate.d.ts +30 -0
- package/dist/components/release-gate.d.ts.map +1 -1
- package/dist/components/release-gate.js +92 -42
- package/dist/components/release-promote.d.ts +9 -0
- package/dist/components/release-promote.d.ts.map +1 -1
- package/dist/components/release-promote.js +15 -0
- package/dist/config.d.ts +2 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/deep-observation.d.ts +11 -0
- package/dist/deep-observation.d.ts.map +1 -1
- package/dist/graph-declared.d.ts +9 -1
- package/dist/graph-declared.d.ts.map +1 -1
- package/dist/graph-declared.js +18 -3
- package/dist/graph-detail.d.ts.map +1 -1
- package/dist/graph-detail.js +30 -1
- package/dist/graph-ir.d.ts.map +1 -1
- package/dist/graph-ir.js +13 -2
- package/dist/lifecycle/__fixtures__/publish-fakes.d.ts.map +1 -1
- package/dist/lifecycle/__fixtures__/publish-fakes.js +5 -1
- package/dist/lifecycle/compose-refs.d.ts +52 -0
- package/dist/lifecycle/compose-refs.d.ts.map +1 -0
- package/dist/lifecycle/compose-refs.js +115 -0
- package/dist/lifecycle/deep-observe.d.ts.map +1 -1
- package/dist/lifecycle/deep-observe.js +3 -2
- package/dist/lifecycle/green-apply.d.ts +39 -0
- package/dist/lifecycle/green-apply.d.ts.map +1 -0
- package/dist/lifecycle/green-apply.js +51 -0
- package/dist/lifecycle/publish-declaration.d.ts +4 -0
- package/dist/lifecycle/publish-declaration.d.ts.map +1 -1
- package/dist/lifecycle/publish-declaration.js +15 -0
- package/dist/lifecycle/publish-npm.d.ts +7 -4
- package/dist/lifecycle/publish-npm.d.ts.map +1 -1
- package/dist/lifecycle/publish-npm.js +60 -13
- package/dist/lifecycle/release-compose.d.ts +91 -0
- package/dist/lifecycle/release-compose.d.ts.map +1 -0
- package/dist/lifecycle/release-compose.js +235 -0
- package/dist/lifecycle/release-cut.d.ts +8 -0
- package/dist/lifecycle/release-cut.d.ts.map +1 -1
- package/dist/lifecycle/release-cut.js +2 -0
- package/dist/lifecycle/release-publish.d.ts +2 -0
- package/dist/lifecycle/release-publish.d.ts.map +1 -1
- package/dist/lifecycle/release-publish.js +2 -1
- package/dist/lifecycle/release-store.d.ts +15 -0
- package/dist/lifecycle/release-store.d.ts.map +1 -1
- package/dist/lifecycle/release-store.js +5 -1
- package/dist/wave-runtime.mjs +226 -224
- package/dist/workspace/__fixtures__/contract-repo.d.ts.map +1 -1
- package/dist/workspace/__fixtures__/contract-repo.js +13 -2
- package/dist/workspace/check.schema.json +20 -2
- package/dist/workspace/checks/ci-workflow.d.ts +17 -0
- package/dist/workspace/checks/ci-workflow.d.ts.map +1 -0
- package/dist/workspace/checks/ci-workflow.js +130 -0
- package/dist/workspace/checks/security.d.ts +16 -1
- package/dist/workspace/checks/security.d.ts.map +1 -1
- package/dist/workspace/checks/security.js +4 -4
- package/dist/workspace/checks.d.ts +1 -1
- package/dist/workspace/checks.d.ts.map +1 -1
- package/dist/workspace/checks.js +4 -1
- package/dist/workspace/ci-green-cli.d.ts.map +1 -1
- package/dist/workspace/ci-green-cli.js +5 -3
- package/dist/workspace/ci-green-workflow.d.ts +18 -2
- package/dist/workspace/ci-green-workflow.d.ts.map +1 -1
- package/dist/workspace/ci-green-workflow.js +27 -5
- package/dist/workspace/ci-green.d.ts +31 -0
- package/dist/workspace/ci-green.d.ts.map +1 -1
- package/dist/workspace/ci-green.js +78 -4
- package/dist/workspace/ci-init.d.ts +100 -0
- package/dist/workspace/ci-init.d.ts.map +1 -0
- package/dist/workspace/ci-init.js +434 -0
- package/dist/workspace/ci-run.d.ts +6 -0
- package/dist/workspace/ci-run.d.ts.map +1 -1
- package/dist/workspace/ci-run.js +2 -1
- package/dist/workspace/ci-serve.d.ts +94 -13
- package/dist/workspace/ci-serve.d.ts.map +1 -1
- package/dist/workspace/ci-serve.js +248 -30
- package/dist/workspace/ci-workflow.d.ts +91 -0
- package/dist/workspace/ci-workflow.d.ts.map +1 -0
- package/dist/workspace/ci-workflow.js +33 -0
- package/dist/workspace/declaration.d.ts +18 -0
- package/dist/workspace/declaration.d.ts.map +1 -1
- package/dist/workspace/declaration.js +9 -2
- package/dist/workspace/declaration.schema.json +28 -0
- package/dist/workspace/delivery-metrics.d.ts +3 -1
- package/dist/workspace/delivery-metrics.d.ts.map +1 -1
- package/dist/workspace/delivery-metrics.js +12 -3
- package/dist/workspace/init.js +2 -2
- package/dist/workspace/member-commands.d.ts.map +1 -1
- package/dist/workspace/member-commands.js +4 -0
- package/dist/workspace/nested-graph.d.ts.map +1 -1
- package/dist/workspace/nested-graph.js +1 -0
- package/dist/workspace/reason-codes.d.ts +9 -0
- package/dist/workspace/reason-codes.d.ts.map +1 -1
- package/dist/workspace/reason-codes.js +10 -0
- package/dist/workspace/release-candidates.d.ts +28 -0
- package/dist/workspace/release-candidates.d.ts.map +1 -1
- package/dist/workspace/release-candidates.js +38 -2
- package/dist/workspace/release-candidates.schema.json +51 -0
- package/dist/workspace/release-workflow.d.ts +31 -0
- package/dist/workspace/release-workflow.d.ts.map +1 -0
- package/dist/workspace/release-workflow.js +150 -0
- package/dist/workspace/releases.schema.json +30 -0
- package/package.json +1 -1
- package/src/cli/handlers/graph.ts +2 -2
- package/src/cli/handlers/pr-green.test.ts +230 -0
- package/src/cli/handlers/pr.ts +148 -66
- package/src/cli/handlers/promote.test.ts +34 -0
- package/src/cli/handlers/promote.ts +302 -91
- package/src/cli/handlers/release-compose.e2e.test.ts +133 -0
- package/src/cli/handlers/release.ts +112 -10
- package/src/cli/handlers/run.ts +12 -1
- package/src/cli/main.ts +37 -2
- package/src/cli/parse-args.ts +18 -0
- package/src/cli/registry.ts +17 -1
- package/src/codegen/release-wiring.test.ts +56 -9
- package/src/components/auto-release.test.ts +22 -0
- package/src/components/auto-release.ts +9 -2
- package/src/components/green-cover.test.ts +170 -0
- package/src/components/green-cover.ts +186 -0
- package/src/components/pr-pipeline.test.ts +14 -4
- package/src/components/pr-pipeline.ts +56 -5
- package/src/components/promote-rounds.test.ts +220 -0
- package/src/components/promote-rounds.ts +232 -0
- package/src/components/promote.test.ts +7 -0
- package/src/components/promote.ts +9 -4
- package/src/components/release-gate.test.ts +47 -0
- package/src/components/release-gate.ts +111 -46
- package/src/components/release-promote.test.ts +24 -1
- package/src/components/release-promote.ts +15 -0
- package/src/deep-observation.ts +8 -0
- package/src/graph-declared-exports.test.ts +40 -0
- package/src/graph-declared.test.ts +18 -0
- package/src/graph-declared.ts +17 -2
- package/src/graph-detail.test.ts +68 -1
- package/src/graph-detail.ts +29 -1
- package/src/graph-ir.ts +12 -4
- package/src/lifecycle/__fixtures__/publish-fakes.ts +5 -1
- package/src/lifecycle/compose-refs.ts +125 -0
- package/src/lifecycle/deep-observe.test.ts +20 -0
- package/src/lifecycle/deep-observe.ts +4 -2
- package/src/lifecycle/green-apply.ts +71 -0
- package/src/lifecycle/publish-declaration.ts +15 -0
- package/src/lifecycle/publish-npm.ts +55 -13
- package/src/lifecycle/publish-targets.test.ts +45 -0
- package/src/lifecycle/release-compose.test.ts +125 -0
- package/src/lifecycle/release-compose.ts +312 -0
- package/src/lifecycle/release-cut.ts +6 -0
- package/src/lifecycle/release-publish.ts +4 -1
- package/src/lifecycle/release-store.ts +16 -1
- package/src/workspace/__fixtures__/contract-repo.ts +11 -2
- package/src/workspace/check-contract.test.ts +3 -2
- package/src/workspace/check.schema.json +20 -2
- package/src/workspace/checks/ci-workflow.test.ts +160 -0
- package/src/workspace/checks/ci-workflow.ts +135 -0
- package/src/workspace/checks/security.ts +4 -4
- package/src/workspace/checks.ts +4 -1
- package/src/workspace/ci-green-cli.ts +5 -3
- package/src/workspace/ci-green-workflow.test.ts +52 -0
- package/src/workspace/ci-green-workflow.ts +34 -5
- package/src/workspace/ci-green.test.ts +33 -0
- package/src/workspace/ci-green.ts +85 -4
- package/src/workspace/ci-init.test.ts +159 -0
- package/src/workspace/ci-init.ts +445 -0
- package/src/workspace/ci-report-url.test.ts +6 -1
- package/src/workspace/ci-run.test.ts +18 -13
- package/src/workspace/ci-run.ts +8 -1
- package/src/workspace/ci-serve-land.e2e.test.ts +138 -0
- package/src/workspace/ci-serve-land.test.ts +176 -0
- package/src/workspace/ci-serve.test.ts +77 -43
- package/src/workspace/ci-serve.ts +268 -34
- package/src/workspace/ci-workflow.ts +71 -0
- package/src/workspace/declaration.schema.json +28 -0
- package/src/workspace/declaration.ts +32 -3
- package/src/workspace/delivery-metrics.ts +12 -3
- package/src/workspace/graph-contract.test.ts +3 -2
- package/src/workspace/init.ts +2 -2
- package/src/workspace/member-commands.test.ts +11 -4
- package/src/workspace/member-commands.ts +3 -0
- package/src/workspace/nested-graph.test.ts +4 -0
- package/src/workspace/nested-graph.ts +1 -0
- package/src/workspace/reason-codes.test.ts +2 -0
- package/src/workspace/reason-codes.ts +10 -0
- package/src/workspace/release-candidates.schema.json +51 -0
- package/src/workspace/release-candidates.test.ts +30 -3
- package/src/workspace/release-candidates.ts +54 -2
- package/src/workspace/release-workflow.ts +167 -0
- package/src/workspace/releases.schema.json +30 -0
package/dist/graph-declared.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Declarable } from "./declarable.js";
|
|
1
2
|
import { type GraphIR } from "./graph-ir.js";
|
|
2
3
|
/**
|
|
3
4
|
* Build the DECLARED graph for a multi-stack project, scoped per stack (#1162).
|
|
@@ -10,11 +11,18 @@ import { type GraphIR } from "./graph-ir.js";
|
|
|
10
11
|
* that live side, build each stack's `src` in isolation and qualify its node ids
|
|
11
12
|
* and edge endpoints the same way. Stacks are merged into one graph.
|
|
12
13
|
*
|
|
14
|
+
* Each stack's exports and imports come along with their `node` qualified the
|
|
15
|
+
* same way (#4202), so a workspace viewer can still match an import in another
|
|
16
|
+
* member to an export here once an environment is picked.
|
|
17
|
+
*
|
|
13
18
|
* A stack without `src` contributes nothing here — it has no declared source to
|
|
14
19
|
* scope to (its live nodes still show as foreign in the overlay).
|
|
20
|
+
*
|
|
21
|
+
* `withEdges` adds what the lexicons' `graphEdges` hooks resolve to each
|
|
22
|
+
* stack's graph before its ids are qualified (#4232).
|
|
15
23
|
*/
|
|
16
24
|
export declare function buildDeclaredPerStack(stacks: Array<{
|
|
17
25
|
name: string;
|
|
18
26
|
src?: string;
|
|
19
|
-
}>, projectPath: string): Promise<GraphIR>;
|
|
27
|
+
}>, projectPath: string, withEdges?: (ir: GraphIR, entities: Map<string, Declarable>) => GraphIR): Promise<GraphIR>;
|
|
20
28
|
//# sourceMappingURL=graph-declared.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph-declared.d.ts","sourceRoot":"","sources":["../src/graph-declared.ts"],"names":[],"mappings":"AAEA,OAAO,EAAgB,KAAK,OAAO,EAAe,MAAM,YAAY,CAAC;AAErE
|
|
1
|
+
{"version":3,"file":"graph-declared.d.ts","sourceRoot":"","sources":["../src/graph-declared.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAgB,KAAK,OAAO,EAAe,MAAM,YAAY,CAAC;AAErE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,EAC7C,WAAW,EAAE,MAAM,EACnB,SAAS,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,KAAK,OAAO,GACtE,OAAO,CAAC,OAAO,CAAC,CA6BlB"}
|
package/dist/graph-declared.js
CHANGED
|
@@ -12,13 +12,22 @@ import { buildGraphIr } from "./graph-ir.js";
|
|
|
12
12
|
* that live side, build each stack's `src` in isolation and qualify its node ids
|
|
13
13
|
* and edge endpoints the same way. Stacks are merged into one graph.
|
|
14
14
|
*
|
|
15
|
+
* Each stack's exports and imports come along with their `node` qualified the
|
|
16
|
+
* same way (#4202), so a workspace viewer can still match an import in another
|
|
17
|
+
* member to an export here once an environment is picked.
|
|
18
|
+
*
|
|
15
19
|
* A stack without `src` contributes nothing here — it has no declared source to
|
|
16
20
|
* scope to (its live nodes still show as foreign in the overlay).
|
|
21
|
+
*
|
|
22
|
+
* `withEdges` adds what the lexicons' `graphEdges` hooks resolve to each
|
|
23
|
+
* stack's graph before its ids are qualified (#4232).
|
|
17
24
|
*/
|
|
18
|
-
export async function buildDeclaredPerStack(stacks, projectPath) {
|
|
25
|
+
export async function buildDeclaredPerStack(stacks, projectPath, withEdges) {
|
|
19
26
|
var _a;
|
|
20
27
|
const nodes = [];
|
|
21
28
|
const edges = [];
|
|
29
|
+
const exports = [];
|
|
30
|
+
const imports = [];
|
|
22
31
|
// Which nodes belong to which stack (#1433). This is not derived or guessed:
|
|
23
32
|
// the stack is declared in config and every node here is being renamed with
|
|
24
33
|
// its name on the line below. The membership was always known and thrown
|
|
@@ -28,7 +37,9 @@ export async function buildDeclaredPerStack(stacks, projectPath) {
|
|
|
28
37
|
for (const st of stacks) {
|
|
29
38
|
if (!st.src)
|
|
30
39
|
continue;
|
|
31
|
-
const
|
|
40
|
+
const { entities } = await discover(resolve(projectPath, st.src));
|
|
41
|
+
const built = buildGraphIr(entities, projectPath);
|
|
42
|
+
const g = withEdges ? withEdges(built, entities) : built;
|
|
32
43
|
const q = (id) => `${st.name}::${id}`;
|
|
33
44
|
for (const n of g.nodes) {
|
|
34
45
|
const id = q(n.id);
|
|
@@ -37,9 +48,13 @@ export async function buildDeclaredPerStack(stacks, projectPath) {
|
|
|
37
48
|
}
|
|
38
49
|
for (const e of g.edges)
|
|
39
50
|
edges.push({ ...e, from: q(e.from), to: q(e.to) });
|
|
51
|
+
for (const e of g.exports ?? [])
|
|
52
|
+
exports.push({ ...e, ...(e.node ? { node: q(e.node) } : {}) });
|
|
53
|
+
for (const i of g.imports ?? [])
|
|
54
|
+
imports.push({ ...i, node: q(i.node) });
|
|
40
55
|
}
|
|
41
56
|
for (const ids of Object.values(byStack))
|
|
42
57
|
ids.sort();
|
|
43
58
|
const groups = Object.keys(byStack).length ? { byStack } : {};
|
|
44
|
-
return { nodes, edges, groups };
|
|
59
|
+
return { nodes, edges, groups, ...(exports.length ? { exports } : {}), ...(imports.length ? { imports } : {}) };
|
|
45
60
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph-detail.d.ts","sourceRoot":"","sources":["../src/graph-detail.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAkB,MAAM,YAAY,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAExC,eAAO,MAAM,MAAM;aACjB,MAAM,EAAE,CAAC;aACT,UAAU,EAAE,CAAC;aACb,WAAW,EAAE,CAAC;aACd,UAAU,EAAE,CAAC;CACL,CAAC;AAEX,6DAA6D;AAC7D,wBAAgB,WAAW,CAAC,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,GAAG,OAAO,CAYpE;
|
|
1
|
+
{"version":3,"file":"graph-detail.d.ts","sourceRoot":"","sources":["../src/graph-detail.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAkB,MAAM,YAAY,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAExC,eAAO,MAAM,MAAM;aACjB,MAAM,EAAE,CAAC;aACT,UAAU,EAAE,CAAC;aACb,WAAW,EAAE,CAAC;aACd,UAAU,EAAE,CAAC;CACL,CAAC;AAEX,6DAA6D;AAC7D,wBAAgB,WAAW,CAAC,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,GAAG,OAAO,CAYpE;AAqPD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAYtF"}
|
package/dist/graph-detail.js
CHANGED
|
@@ -87,6 +87,35 @@ function toStacks(ir) {
|
|
|
87
87
|
function toDeclarables(ir) {
|
|
88
88
|
return { ...ir, nodes: ir.nodes.map((n) => ({ ...n, attrs: resourceAttrs(n.attrs) })) };
|
|
89
89
|
}
|
|
90
|
+
/** Overlay statuses from the least to the most in need of attention: a
|
|
91
|
+
* composite takes its worst member's (#4227). An unknown status ranks above
|
|
92
|
+
* `warn`, so a status this list does not know yet is never hidden. */
|
|
93
|
+
const STATUS_RANK = ["good", "runtime", "neutral", "accent", "warn"];
|
|
94
|
+
function statusRank(status) {
|
|
95
|
+
const i = STATUS_RANK.indexOf(status);
|
|
96
|
+
return i === -1 ? STATUS_RANK.length : i;
|
|
97
|
+
}
|
|
98
|
+
/** A collapsed composite's overlay paint, rolled up from its members (#4227):
|
|
99
|
+
* `_status` is the worst member status, and `_memberStatus` lists the members
|
|
100
|
+
* that are not `good` under their status. Nothing when no member carries a
|
|
101
|
+
* `_status`, as in a graph read without `--overlay`. */
|
|
102
|
+
function rollupStatus(members) {
|
|
103
|
+
const painted = members.filter((m) => typeof m.attrs._status === "string");
|
|
104
|
+
if (painted.length === 0)
|
|
105
|
+
return {};
|
|
106
|
+
let worst = "good";
|
|
107
|
+
const notGood = {};
|
|
108
|
+
for (const m of painted) {
|
|
109
|
+
const status = m.attrs._status;
|
|
110
|
+
if (statusRank(status) > statusRank(worst))
|
|
111
|
+
worst = status;
|
|
112
|
+
if (status !== "good")
|
|
113
|
+
(notGood[status] ?? (notGood[status] = [])).push(m.id);
|
|
114
|
+
}
|
|
115
|
+
for (const ids of Object.values(notGood))
|
|
116
|
+
ids.sort();
|
|
117
|
+
return { _status: worst, ...(Object.keys(notGood).length > 0 ? { _memberStatus: notGood } : {}) };
|
|
118
|
+
}
|
|
90
119
|
/** T1 — collapse each composite instance to one node; internal edges disappear.
|
|
91
120
|
* Topology view: surviving plain nodes keep only overlay paint, not properties. */
|
|
92
121
|
function toComposites(ir) {
|
|
@@ -131,7 +160,7 @@ function toComposites(ir) {
|
|
|
131
160
|
id: collapsedId.get(key),
|
|
132
161
|
kind: types.size === 1 ? [...types][0] : "Composite",
|
|
133
162
|
lexicon: lexicons.size === 1 ? [...lexicons][0] : "multi",
|
|
134
|
-
attrs: { members: members.length },
|
|
163
|
+
attrs: { members: members.length, ...rollupStatus(members) },
|
|
135
164
|
});
|
|
136
165
|
}
|
|
137
166
|
const seen = new Map();
|
package/dist/graph-ir.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph-ir.d.ts","sourceRoot":"","sources":["../src/graph-ir.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,UAAU,EAAgB,MAAM,cAAc,CAAC;AAI7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtD;;;;;;;;;GASG;AAEH,iFAAiF;AACjF,MAAM,WAAW,SAAS;IACxB,8EAA8E;IAC9E,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,wEAAwE;AACxE,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;CACd;AAED,iCAAiC;AACjC,MAAM,WAAW,MAAM;IACrB,kEAAkE;IAClE,EAAE,EAAE,MAAM,CAAC;IACX,wCAAwC;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,mDAAmD;IACnD,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,yEAAyE;IACzE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,mCAAmC;IACnC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAChC;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;;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;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,cAAc,GAAG,OAAO,CAqEpG"}
|
package/dist/graph-ir.js
CHANGED
|
@@ -609,10 +609,21 @@ function tagStatus(n, status, unobserved) {
|
|
|
609
609
|
* no live edges). Sorted; the live groups pass through unchanged.
|
|
610
610
|
*/
|
|
611
611
|
export function overlayGraphs(live, declared, opts) {
|
|
612
|
-
const
|
|
612
|
+
const declaredById = new Map(declared.nodes.map((n) => [n.id, n]));
|
|
613
613
|
const liveIds = new Set(live.nodes.map((n) => n.id));
|
|
614
614
|
const unobserved = opts?.unobserved ?? {};
|
|
615
|
-
const nodes = live.nodes.map((n) =>
|
|
615
|
+
const nodes = live.nodes.map((n) => {
|
|
616
|
+
const d = declaredById.get(n.id);
|
|
617
|
+
if (!d)
|
|
618
|
+
return tagStatus(n, n.runtimeOwner ? "runtime" : "warn");
|
|
619
|
+
// A managed node keeps the composite it was declared in, so `--detail 1`
|
|
620
|
+
// collapses it with its siblings and rolls their status up (#4227).
|
|
621
|
+
const membership = {
|
|
622
|
+
...(d.compositeInstance ? { compositeInstance: d.compositeInstance } : {}),
|
|
623
|
+
...(d.compositeParent ? { compositeParent: d.compositeParent } : {}),
|
|
624
|
+
};
|
|
625
|
+
return tagStatus({ ...n, ...membership }, "good");
|
|
626
|
+
});
|
|
616
627
|
for (const n of declared.nodes) {
|
|
617
628
|
if (liveIds.has(n.id))
|
|
618
629
|
continue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish-fakes.d.ts","sourceRoot":"","sources":["../../../src/lifecycle/__fixtures__/publish-fakes.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAUH,MAAM,WAAW,YAAY;IAC3B,sDAAsD;IACtD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CA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E,CAAC,CAAC;IAChO,KAAK,EAAE,KAAK,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAAC,IAAI,CAAC,EAAE,UAAU,GAAG,MAAM,CAAA;KAAE,CAAC,CAAC;IAC3G,QAAQ,EAAE,gBAAgB,EAAE,CAAC;IAC7B,oDAAoD;IACpD,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,wFAAwF;IACxF,OAAO,IAAI,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC,CAAC;IACpD,gFAAgF;IAChF,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAED,8EAA8E;AAC9E,wBAAgB,cAAc,CAAC,KAAK,EAAE,QAAQ,GAAG,SAAS,GAAG,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,GAAE,gBAAgB,EAAO,GAAG,SAAS,CAmF9I;AAED,0EAA0E;AAC1E,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED,2GAA2G;AAC3G,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,UAAO,GAAG,IAAI,CAI1F;AAED,2GAA2G;AAC3G,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAM/C"}
|
|
@@ -144,7 +144,8 @@ const { execFileSync } = require("child_process");
|
|
|
144
144
|
const args = process.argv.slice(2);
|
|
145
145
|
const token = process.env.NODE_AUTH_TOKEN || "";
|
|
146
146
|
const regFile = ${JSON.stringify(log)} + ".registry.json";
|
|
147
|
-
fs.
|
|
147
|
+
const userconfig = process.env.NPM_CONFIG_USERCONFIG ? fs.readFileSync(process.env.NPM_CONFIG_USERCONFIG, "utf-8") : "";
|
|
148
|
+
fs.appendFileSync(${JSON.stringify(log)}, JSON.stringify({ args, tokenSet: token !== "", ...(userconfig ? { userconfig } : {}) }) + "\\n");
|
|
148
149
|
console.log("npm notice using //registry.example/:_authToken=" + token);
|
|
149
150
|
console.error("npm notice token " + token);
|
|
150
151
|
const reg = fs.existsSync(regFile) ? JSON.parse(fs.readFileSync(regFile, "utf-8")) : { packages: {} };
|
|
@@ -153,6 +154,9 @@ const flag = (name) => { const i = args.indexOf(name); return i < 0 ? null : arg
|
|
|
153
154
|
const split = (spec) => { const at = spec.lastIndexOf("@"); return [spec.slice(0, at), spec.slice(at + 1)]; };
|
|
154
155
|
if (args[0] === "publish") {
|
|
155
156
|
if (process.env.FAKE_NPM_FAIL && args[1] && args[1].includes(process.env.FAKE_NPM_FAIL)) { console.error("npm error 403 Forbidden"); process.exit(1); }
|
|
157
|
+
// A package whose trusted-publisher record is broken: only a token in the user config publishes it.
|
|
158
|
+
if (process.env.FAKE_NPM_NEEDAUTH && args[1] && args[1].includes(process.env.FAKE_NPM_NEEDAUTH) && !userconfig.includes("_authToken=")) { console.error("npm error code ENEEDAUTH"); process.exit(1); }
|
|
159
|
+
if (process.env.FAKE_NPM_TOKEN_NO_PROVENANCE && userconfig && args.includes("--provenance")) { console.error("npm error 422 Unprocessable Entity - provenance statement does not match the publisher"); process.exit(1); }
|
|
156
160
|
const text = fs.statSync(args[1]).isDirectory() ? fs.readFileSync(path.join(args[1], "package.json"), "utf-8") : execFileSync("tar", ["-xzOf", args[1], "package/package.json"], { encoding: "utf-8" });
|
|
157
161
|
const { name, version } = JSON.parse(text);
|
|
158
162
|
const p = reg.packages[name] || (reg.packages[name] = { versions: [], distTags: {} });
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Composed commits (#4168 4.3), as git holds them. A composed release lives
|
|
3
|
+
* on a pushed `chant/compose/<name>` branch whose commits each cherry-pick
|
|
4
|
+
* one trunk commit and name it in a `Chant-Composed-From: <sha>` trailer.
|
|
5
|
+
* The base is the commit the first composed commit was picked onto.
|
|
6
|
+
*
|
|
7
|
+
* Kept free of other chant imports, so the ci tick, the cut, the metrics
|
|
8
|
+
* and the compose command read composed commits the same way.
|
|
9
|
+
*/
|
|
10
|
+
/** The branch prefix a composed release lives under. */
|
|
11
|
+
export declare const COMPOSE_BRANCH_PREFIX = "chant/compose/";
|
|
12
|
+
/** The trailer naming the trunk commit a composed commit picks. */
|
|
13
|
+
export declare const COMPOSED_FROM_TRAILER = "Chant-Composed-From";
|
|
14
|
+
/** What a composed commit carries: its branch when one is known, its base, and the trunk commits picked onto the base, oldest first. */
|
|
15
|
+
export interface Composition {
|
|
16
|
+
branch: string | null;
|
|
17
|
+
base: string;
|
|
18
|
+
sources: string[];
|
|
19
|
+
}
|
|
20
|
+
/** Whether `branch` names a compose branch. */
|
|
21
|
+
export declare function isComposeBranch(branch: unknown): branch is string;
|
|
22
|
+
/** The trunk commits one commit's `Chant-Composed-From` trailers name. */
|
|
23
|
+
export declare function composedFrom(top: string, sha: string): string[];
|
|
24
|
+
/**
|
|
25
|
+
* The composition `sha` ends: walk its first parents while each commit
|
|
26
|
+
* carries a `Chant-Composed-From` trailer. Null when `sha` carries none.
|
|
27
|
+
*/
|
|
28
|
+
export declare function compositionOf(top: string, sha: string, branch?: string | null): Composition | null;
|
|
29
|
+
/** The compose branches this clone knows on `remote`, as `{ branch, ref }`, by name. */
|
|
30
|
+
export declare function remoteComposeBranches(top: string, remote?: string): Array<{
|
|
31
|
+
branch: string;
|
|
32
|
+
ref: string;
|
|
33
|
+
}>;
|
|
34
|
+
/**
|
|
35
|
+
* What a commit of a compose branch carries beyond trunk: walk its first
|
|
36
|
+
* parents back to the first commit `trunkRef` reaches, which is the base,
|
|
37
|
+
* collecting the `Chant-Composed-From` trailers on the way. A commit a
|
|
38
|
+
* person made on the branch, such as a resolved conflict, carries none and
|
|
39
|
+
* is walked past. Null when `sha` is on trunk or no trunk commit is found.
|
|
40
|
+
*/
|
|
41
|
+
export declare function compositionOnTrunk(top: string, sha: string, trunkRef: string, branch?: string | null): Composition | null;
|
|
42
|
+
/** The pushed compose branch `sha` is a first-parent commit of, as this clone last fetched it, or null. */
|
|
43
|
+
export declare function composeBranchContaining(top: string, sha: string, remote?: string): {
|
|
44
|
+
branch: string;
|
|
45
|
+
ref: string;
|
|
46
|
+
} | null;
|
|
47
|
+
/** The composed commits on the pushed compose branches that pick `trunkSha`. */
|
|
48
|
+
export declare function composedIncluding(top: string, trunkSha: string, remote?: string): Array<{
|
|
49
|
+
branch: string;
|
|
50
|
+
commit: string;
|
|
51
|
+
}>;
|
|
52
|
+
//# sourceMappingURL=compose-refs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compose-refs.d.ts","sourceRoot":"","sources":["../../src/lifecycle/compose-refs.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,wDAAwD;AACxD,eAAO,MAAM,qBAAqB,mBAAmB,CAAC;AAEtD,mEAAmE;AACnE,eAAO,MAAM,qBAAqB,wBAAwB,CAAC;AAE3D,wIAAwI;AACxI,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAUD,+CAA+C;AAC/C,wBAAgB,eAAe,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,MAAM,CAEjE;AAED,0EAA0E;AAC1E,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAM/D;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,GAAE,MAAM,GAAG,IAAW,GAAG,WAAW,GAAG,IAAI,CAaxG;AAED,wFAAwF;AACxF,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,SAAW,GAAG,KAAK,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC,CAQ5G;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAE,MAAM,GAAG,IAAW,GAAG,WAAW,GAAG,IAAI,CAU/H;AAED,2GAA2G;AAC3G,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,SAAW,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAM3H;AAED,gFAAgF;AAChF,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,SAAW,GAAG,KAAK,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAkB7H"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Composed commits (#4168 4.3), as git holds them. A composed release lives
|
|
3
|
+
* on a pushed `chant/compose/<name>` branch whose commits each cherry-pick
|
|
4
|
+
* one trunk commit and name it in a `Chant-Composed-From: <sha>` trailer.
|
|
5
|
+
* The base is the commit the first composed commit was picked onto.
|
|
6
|
+
*
|
|
7
|
+
* Kept free of other chant imports, so the ci tick, the cut, the metrics
|
|
8
|
+
* and the compose command read composed commits the same way.
|
|
9
|
+
*/
|
|
10
|
+
import { execFileSync } from "node:child_process";
|
|
11
|
+
/** The branch prefix a composed release lives under. */
|
|
12
|
+
export const COMPOSE_BRANCH_PREFIX = "chant/compose/";
|
|
13
|
+
/** The trailer naming the trunk commit a composed commit picks. */
|
|
14
|
+
export const COMPOSED_FROM_TRAILER = "Chant-Composed-From";
|
|
15
|
+
function tryGit(top, args) {
|
|
16
|
+
try {
|
|
17
|
+
return execFileSync("git", args, { cwd: top, encoding: "utf-8", stdio: ["ignore", "pipe", "ignore"], maxBuffer: 64 * 1024 * 1024 }).trim();
|
|
18
|
+
}
|
|
19
|
+
catch {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/** Whether `branch` names a compose branch. */
|
|
24
|
+
export function isComposeBranch(branch) {
|
|
25
|
+
return typeof branch === "string" && branch.startsWith(COMPOSE_BRANCH_PREFIX) && branch.length > COMPOSE_BRANCH_PREFIX.length;
|
|
26
|
+
}
|
|
27
|
+
/** The trunk commits one commit's `Chant-Composed-From` trailers name. */
|
|
28
|
+
export function composedFrom(top, sha) {
|
|
29
|
+
const out = tryGit(top, ["show", "-s", `--format=%(trailers:key=${COMPOSED_FROM_TRAILER},valueonly,separator=%x00)`, sha]);
|
|
30
|
+
return (out ?? "")
|
|
31
|
+
.split("\0")
|
|
32
|
+
.map((s) => s.trim())
|
|
33
|
+
.filter((s) => /^[0-9a-f]{40}$/.test(s));
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* The composition `sha` ends: walk its first parents while each commit
|
|
37
|
+
* carries a `Chant-Composed-From` trailer. Null when `sha` carries none.
|
|
38
|
+
*/
|
|
39
|
+
export function compositionOf(top, sha, branch = null) {
|
|
40
|
+
const sources = [];
|
|
41
|
+
let at = sha;
|
|
42
|
+
for (;;) {
|
|
43
|
+
const from = composedFrom(top, at);
|
|
44
|
+
if (from.length === 0)
|
|
45
|
+
break;
|
|
46
|
+
sources.unshift(...from);
|
|
47
|
+
const parent = tryGit(top, ["rev-parse", "--verify", "--quiet", `${at}^1`]);
|
|
48
|
+
if (!parent)
|
|
49
|
+
break;
|
|
50
|
+
at = parent;
|
|
51
|
+
}
|
|
52
|
+
if (sources.length === 0)
|
|
53
|
+
return null;
|
|
54
|
+
return { branch, base: at, sources };
|
|
55
|
+
}
|
|
56
|
+
/** The compose branches this clone knows on `remote`, as `{ branch, ref }`, by name. */
|
|
57
|
+
export function remoteComposeBranches(top, remote = "origin") {
|
|
58
|
+
const prefix = `refs/remotes/${remote}/`;
|
|
59
|
+
const out = tryGit(top, ["for-each-ref", "--format=%(refname)", `${prefix}${COMPOSE_BRANCH_PREFIX}`]);
|
|
60
|
+
return (out ?? "")
|
|
61
|
+
.split("\n")
|
|
62
|
+
.filter(Boolean)
|
|
63
|
+
.map((ref) => ({ branch: ref.slice(prefix.length), ref }))
|
|
64
|
+
.sort((a, b) => (a.branch < b.branch ? -1 : 1));
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* What a commit of a compose branch carries beyond trunk: walk its first
|
|
68
|
+
* parents back to the first commit `trunkRef` reaches, which is the base,
|
|
69
|
+
* collecting the `Chant-Composed-From` trailers on the way. A commit a
|
|
70
|
+
* person made on the branch, such as a resolved conflict, carries none and
|
|
71
|
+
* is walked past. Null when `sha` is on trunk or no trunk commit is found.
|
|
72
|
+
*/
|
|
73
|
+
export function compositionOnTrunk(top, sha, trunkRef, branch = null) {
|
|
74
|
+
const onTrunk = (c) => tryGit(top, ["merge-base", "--is-ancestor", c, trunkRef]) !== null;
|
|
75
|
+
if (onTrunk(sha))
|
|
76
|
+
return null;
|
|
77
|
+
const sources = [];
|
|
78
|
+
let at = sha;
|
|
79
|
+
while (at && !onTrunk(at)) {
|
|
80
|
+
sources.unshift(...composedFrom(top, at));
|
|
81
|
+
at = tryGit(top, ["rev-parse", "--verify", "--quiet", `${at}^1`]);
|
|
82
|
+
}
|
|
83
|
+
return at ? { branch, base: at, sources } : null;
|
|
84
|
+
}
|
|
85
|
+
/** The pushed compose branch `sha` is a first-parent commit of, as this clone last fetched it, or null. */
|
|
86
|
+
export function composeBranchContaining(top, sha, remote = "origin") {
|
|
87
|
+
for (const b of remoteComposeBranches(top, remote)) {
|
|
88
|
+
const line = tryGit(top, ["rev-list", "--first-parent", b.ref]);
|
|
89
|
+
if (line?.split("\n").includes(sha))
|
|
90
|
+
return b;
|
|
91
|
+
}
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
94
|
+
/** The composed commits on the pushed compose branches that pick `trunkSha`. */
|
|
95
|
+
export function composedIncluding(top, trunkSha, remote = "origin") {
|
|
96
|
+
const out = [];
|
|
97
|
+
for (const b of remoteComposeBranches(top, remote)) {
|
|
98
|
+
const tip = tryGit(top, ["rev-parse", "--verify", "--quiet", `${b.ref}^{commit}`]);
|
|
99
|
+
if (!tip)
|
|
100
|
+
continue;
|
|
101
|
+
const composition = compositionOf(top, tip, b.branch);
|
|
102
|
+
if (!composition?.sources.includes(trunkSha))
|
|
103
|
+
continue;
|
|
104
|
+
// The composed commit that picked it: walk the composed commits for its trailer.
|
|
105
|
+
let at = tip;
|
|
106
|
+
while (at && at !== composition.base) {
|
|
107
|
+
if (composedFrom(top, at).includes(trunkSha)) {
|
|
108
|
+
out.push({ branch: b.branch, commit: at });
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
111
|
+
at = tryGit(top, ["rev-parse", "--verify", "--quiet", `${at}^1`]);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
return out;
|
|
115
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deep-observe.d.ts","sourceRoot":"","sources":["../../src/lifecycle/deep-observe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAIL,KAAK,sBAAsB,EAG3B,KAAK,yBAAyB,EAC/B,MAAM,qBAAqB,CAAC;AAG7B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAqC,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AACrF,OAAO,KAAK,EAAE,eA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AM,EAAE,kBAAkB,EAC1B,IAAI,EAAE,kBAAkB,GAAG;IAAE,QAAQ,CAAC,EAAE,eAAe,CAAA;CAAE,GACxD,OAAO,CAAC,cAAc,CAAC,CAGzB"}
|
|
@@ -86,8 +86,9 @@ export function diffDeepObservation(entities, live, hooks, baseline) {
|
|
|
86
86
|
const normalizedLive = {};
|
|
87
87
|
for (const [name, entity] of entities) {
|
|
88
88
|
const liveEntity = live.resources[name];
|
|
89
|
-
const
|
|
90
|
-
const
|
|
89
|
+
const prepare = (tree, side) => hooks?.prepare ? hooks.prepare(tree, { entityType: entity.entityType, side }) : tree;
|
|
90
|
+
const declaredRaw = prepare(entity.props ?? {}, "declared");
|
|
91
|
+
const liveRaw = prepare(liveEntity?.properties ?? {}, "live");
|
|
91
92
|
const declaredPaths = deepPathSet(declaredRaw);
|
|
92
93
|
const livePaths = deepPathSet(liveRaw);
|
|
93
94
|
const declaredProperties = normalizeDeepProperties(declaredRaw, {
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Applied-green records (#4168 step 9): the green commit apply on merge last
|
|
3
|
+
* applied to an environment, kept on `chant/lifecycle` so the next apply
|
|
4
|
+
* measures its change from there.
|
|
5
|
+
*
|
|
6
|
+
* _green-applies/<env>.json one record per environment, rewritten by each apply that finishes
|
|
7
|
+
*
|
|
8
|
+
* Apply on merge applies green commits, not each merge. `pr-apply --green`
|
|
9
|
+
* plans at the green commit, measured from the one recorded here, and writes
|
|
10
|
+
* this record once everything applied. A workspace member's record sits under
|
|
11
|
+
* `_members/<member>/_green-applies/` through the same `ledgerDir` prefix the
|
|
12
|
+
* merge records use.
|
|
13
|
+
*/
|
|
14
|
+
import { type LedgerLocation } from "./git.js";
|
|
15
|
+
/** The directory on `chant/lifecycle` that holds applied-green records. */
|
|
16
|
+
export declare const GREEN_APPLIES_DIR = "_green-applies";
|
|
17
|
+
export declare const GREEN_APPLY_CONTRACT = 1;
|
|
18
|
+
export interface GreenApplyRecord {
|
|
19
|
+
contract: number;
|
|
20
|
+
env: string;
|
|
21
|
+
member?: string;
|
|
22
|
+
/** The green commit applied. */
|
|
23
|
+
commit: string;
|
|
24
|
+
/** The commit the change was measured from: the green commit applied before, or the first apply's base. */
|
|
25
|
+
base: string;
|
|
26
|
+
/** The change set's digest. */
|
|
27
|
+
digest: string;
|
|
28
|
+
/** `merges` when the merged changes' approvals covered the plan, `gate` when the combined plan was approved at its own gate. */
|
|
29
|
+
approval: "merges" | "gate";
|
|
30
|
+
approvedBy: string[];
|
|
31
|
+
/** The first-parent commits from `base` (exclusive) to `commit`, oldest first. */
|
|
32
|
+
merges: string[];
|
|
33
|
+
appliedAt: string;
|
|
34
|
+
}
|
|
35
|
+
/** The last green commit applied to `env`, or null when none is recorded. Reads the local `chant/lifecycle` and never fetches. */
|
|
36
|
+
export declare function readGreenApply(env: string, opts?: LedgerLocation): Promise<GreenApplyRecord | null>;
|
|
37
|
+
/** Write `record` for its environment. Does not push: call `pushLifecycleReport` (./git.ts) after. */
|
|
38
|
+
export declare function writeGreenApply(record: GreenApplyRecord, opts?: LedgerLocation): Promise<string>;
|
|
39
|
+
//# sourceMappingURL=green-apply.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"green-apply.d.ts","sourceRoot":"","sources":["../../src/lifecycle/green-apply.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EAAmF,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAE7H,2EAA2E;AAC3E,eAAO,MAAM,iBAAiB,mBAAmB,CAAC;AAElD,eAAO,MAAM,oBAAoB,IAAI,CAAC;AAEtC,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gCAAgC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,2GAA2G;IAC3G,IAAI,EAAE,MAAM,CAAC;IACb,+BAA+B;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,gIAAgI;IAChI,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAAC;IAC5B,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,kFAAkF;IAClF,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB;AAMD,kIAAkI;AAClI,wBAAsB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,CASzG;AAED,sGAAsG;AACtG,wBAAsB,eAAe,CAAC,MAAM,EAAE,gBAAgB,EAAE,IAAI,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAatG"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Applied-green records (#4168 step 9): the green commit apply on merge last
|
|
3
|
+
* applied to an environment, kept on `chant/lifecycle` so the next apply
|
|
4
|
+
* measures its change from there.
|
|
5
|
+
*
|
|
6
|
+
* _green-applies/<env>.json one record per environment, rewritten by each apply that finishes
|
|
7
|
+
*
|
|
8
|
+
* Apply on merge applies green commits, not each merge. `pr-apply --green`
|
|
9
|
+
* plans at the green commit, measured from the one recorded here, and writes
|
|
10
|
+
* this record once everything applied. A workspace member's record sits under
|
|
11
|
+
* `_members/<member>/_green-applies/` through the same `ledgerDir` prefix the
|
|
12
|
+
* merge records use.
|
|
13
|
+
*/
|
|
14
|
+
import { sortedJsonReplacer } from "../utils.js";
|
|
15
|
+
import { ledgerDir, readBlobFromPath, readPathSha, RefCASConflictError, writeLedgerFiles } from "./git.js";
|
|
16
|
+
/** The directory on `chant/lifecycle` that holds applied-green records. */
|
|
17
|
+
export const GREEN_APPLIES_DIR = "_green-applies";
|
|
18
|
+
export const GREEN_APPLY_CONTRACT = 1;
|
|
19
|
+
function recordFile(env) {
|
|
20
|
+
return `${env}.json`;
|
|
21
|
+
}
|
|
22
|
+
/** The last green commit applied to `env`, or null when none is recorded. Reads the local `chant/lifecycle` and never fetches. */
|
|
23
|
+
export async function readGreenApply(env, opts) {
|
|
24
|
+
const text = await readBlobFromPath(GREEN_APPLIES_DIR, recordFile(env), opts);
|
|
25
|
+
if (text === null)
|
|
26
|
+
return null;
|
|
27
|
+
try {
|
|
28
|
+
const doc = JSON.parse(text);
|
|
29
|
+
return doc?.contract === GREEN_APPLY_CONTRACT && typeof doc.commit === "string" ? doc : null;
|
|
30
|
+
}
|
|
31
|
+
catch {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/** Write `record` for its environment. Does not push: call `pushLifecycleReport` (./git.ts) after. */
|
|
36
|
+
export async function writeGreenApply(record, opts) {
|
|
37
|
+
const file = recordFile(record.env);
|
|
38
|
+
const content = `${JSON.stringify(record, sortedJsonReplacer)}\n`;
|
|
39
|
+
for (let attempt = 0; attempt < 3; attempt++) {
|
|
40
|
+
const prior = await readPathSha(GREEN_APPLIES_DIR, file, opts);
|
|
41
|
+
const dir = await ledgerDir(GREEN_APPLIES_DIR, opts);
|
|
42
|
+
try {
|
|
43
|
+
return await writeLedgerFiles([{ path: `${dir}/${file}`, content, expectPriorSha: prior }], `Applied green ${record.commit} to ${record.env}`, opts);
|
|
44
|
+
}
|
|
45
|
+
catch (err) {
|
|
46
|
+
if (!(err instanceof RefCASConflictError))
|
|
47
|
+
throw err;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
throw new Error(`could not write the applied-green record for ${record.env}: chant/lifecycle kept moving`);
|
|
51
|
+
}
|
|
@@ -33,6 +33,8 @@ export declare const NpmPublishSchema: z.ZodObject<{
|
|
|
33
33
|
restricted: "restricted";
|
|
34
34
|
}>>;
|
|
35
35
|
sbom: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<false>]>>;
|
|
36
|
+
stage: z.ZodOptional<z.ZodBoolean>;
|
|
37
|
+
tokenEnv: z.ZodOptional<z.ZodString>;
|
|
36
38
|
}, z.core.$strict>;
|
|
37
39
|
/** An OCI registry such as GHCR or Docker Hub: the image is pushed by digest, then tagged. */
|
|
38
40
|
export declare const OciPublishSchema: z.ZodObject<{
|
|
@@ -68,6 +70,8 @@ export declare const PublishDeclarationSchema: z.ZodDiscriminatedUnion<[z.ZodObj
|
|
|
68
70
|
restricted: "restricted";
|
|
69
71
|
}>>;
|
|
70
72
|
sbom: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<false>]>>;
|
|
73
|
+
stage: z.ZodOptional<z.ZodBoolean>;
|
|
74
|
+
tokenEnv: z.ZodOptional<z.ZodString>;
|
|
71
75
|
}, z.core.$strict>, z.ZodObject<{
|
|
72
76
|
type: z.ZodLiteral<"oci">;
|
|
73
77
|
image: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish-declaration.d.ts","sourceRoot":"","sources":["../../src/lifecycle/publish-declaration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,+DAA+D;AAC/D,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"publish-declaration.d.ts","sourceRoot":"","sources":["../../src/lifecycle/publish-declaration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,+DAA+D;AAC/D,eAAO,MAAM,gBAAgB;;;;;;;;;;;kBA8BlB,CAAC;AAEZ,8FAA8F;AAC9F,eAAO,MAAM,gBAAgB;;;;;;;;kBAgBlB,CAAC;AAEZ,wFAAwF;AACxF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;kBAiBpB,CAAC;AAEZ,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAAyF,CAAC;AAE/H,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AACrE,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AACrE,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AACzE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
|
|
@@ -41,6 +41,21 @@ export const NpmPublishSchema = z
|
|
|
41
41
|
* `sbom.cyclonedx.json` it holds. `false` publishes without one.
|
|
42
42
|
*/
|
|
43
43
|
sbom: sbomField.optional(),
|
|
44
|
+
/**
|
|
45
|
+
* `false` publishes each package straight to the reveal tag (`latest`
|
|
46
|
+
* unless the publish names another), with no `next` stage and no
|
|
47
|
+
* `npm dist-tag` move (#4040). For credentials that may publish but not
|
|
48
|
+
* move a dist-tag, such as npm trusted publishing without "Allow npm
|
|
49
|
+
* dist-tag" on the package's record (#3904). Default `true`.
|
|
50
|
+
*/
|
|
51
|
+
stage: z.boolean().optional(),
|
|
52
|
+
/**
|
|
53
|
+
* A variable holding an npm token to retry with when a package's publish
|
|
54
|
+
* fails to authenticate (#4040), as chant's own publish-packages.sh does:
|
|
55
|
+
* a package whose trusted-publisher record is broken publishes with the
|
|
56
|
+
* token rather than failing the release. Unset or empty, there is no retry.
|
|
57
|
+
*/
|
|
58
|
+
tokenEnv: envName.optional(),
|
|
44
59
|
})
|
|
45
60
|
.strict();
|
|
46
61
|
/** An OCI registry such as GHCR or Docker Hub: the image is pushed by digest, then tagged. */
|
|
@@ -42,10 +42,13 @@
|
|
|
42
42
|
* npm makes the first version of a new package `latest` whatever tag it is
|
|
43
43
|
* published under, so a package's first release is visible when it stages.
|
|
44
44
|
*
|
|
45
|
-
* Credentials are npm's own
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
* `
|
|
45
|
+
* Credentials are npm's own: npm authenticates with the registry's
|
|
46
|
+
* `_authToken` in the user's or the CI's npm config (`actions/setup-node`
|
|
47
|
+
* writes one that reads `NODE_AUTH_TOKEN`), or by trusted publishing. The one
|
|
48
|
+
* exception is `tokenEnv` (#4040): when a publish fails to authenticate, the
|
|
49
|
+
* package is published again with that variable's token in a throwaway npm
|
|
50
|
+
* user config, never on the command line, and without `--provenance` if the
|
|
51
|
+
* registry refuses the attestation on the token path. npm runs with the run's
|
|
49
52
|
* environment, and everything it prints is redacted before chant prints it.
|
|
50
53
|
*/
|
|
51
54
|
import type { NpmPublishDeclaration } from "./publish-declaration.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish-npm.d.ts","sourceRoot":"","sources":["../../src/lifecycle/publish-npm.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"publish-npm.d.ts","sourceRoot":"","sources":["../../src/lifecycle/publish-npm.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AAOH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAEnE,OAAO,EAAqC,KAAK,cAAc,EAAE,KAAK,WAAW,EAAoB,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAoDnJ,oEAAoE;AACpE,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,qBAAqB,EAAE,UAAU,GAAG,QAAQ,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC,cAAc,EAAE,YAAY,CAAC,EAAE,GAAG,GAAE,MAAsB,GAAG,MAAM,EAAE,CAUpL;AAED,yFAAyF;AACzF,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,qBAAqB,EAAE,UAAU,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAElI;AAED,iIAAiI;AACjI,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,IAAI,CAAC,qBAAqB,EAAE,UAAU,CAAC,GAAG,MAAM,EAAE,CAE3F;AAED,+CAA+C;AAC/C,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,IAAI,CAAC,qBAAqB,EAAE,UAAU,CAAC,GAAG,MAAM,EAAE,CAE9F;AAuBD,wBAAgB,SAAS,CAAC,IAAI,EAAE,qBAAqB,EAAE,IAAI,EAAE,WAAW,GAAG,aAAa,CA2IvF"}
|