@intentius/chant 0.124.14 → 0.124.15
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/build.d.ts +6 -0
- package/dist/build.d.ts.map +1 -1
- package/dist/build.js +1 -0
- package/dist/change-set.d.ts +24 -2
- package/dist/change-set.d.ts.map +1 -1
- package/dist/change-set.js +50 -1
- package/dist/ci-jobs.d.ts +227 -0
- package/dist/ci-jobs.d.ts.map +1 -0
- package/dist/ci-jobs.js +448 -0
- package/dist/components/pr-pipeline.d.ts.map +1 -1
- package/dist/components/pr-pipeline.js +3 -2
- package/dist/composite.d.ts +10 -2
- package/dist/composite.d.ts.map +1 -1
- package/dist/composite.js +8 -0
- package/dist/discovery/collect.d.ts +2 -1
- package/dist/discovery/collect.d.ts.map +1 -1
- package/dist/discovery/collect.js +16 -1
- package/dist/discovery/fold-import.d.ts.map +1 -1
- package/dist/discovery/fold-import.js +2 -107
- package/dist/discovery/host-composite.d.ts +35 -0
- package/dist/discovery/host-composite.d.ts.map +1 -0
- package/dist/discovery/host-composite.js +93 -0
- package/dist/discovery/index.d.ts +9 -0
- package/dist/discovery/index.d.ts.map +1 -1
- package/dist/discovery/index.js +1 -1
- package/dist/gate-decision.d.ts +20 -9
- package/dist/gate-decision.d.ts.map +1 -1
- package/dist/gate-decision.js +72 -19
- package/dist/lifecycle/gate-audit.d.ts +69 -2
- package/dist/lifecycle/gate-audit.d.ts.map +1 -1
- package/dist/lifecycle/gate-audit.js +76 -2
- package/dist/lifecycle/gate-ledger.d.ts +24 -0
- package/dist/lifecycle/gate-ledger.d.ts.map +1 -1
- package/dist/lifecycle/gate-ledger.js +9 -1
- package/dist/op/activities/activity-contracts.d.ts +1 -1
- package/dist/op/activities/activity-contracts.js +1 -1
- package/dist/op/activities/change-set.d.ts +8 -3
- package/dist/op/activities/change-set.d.ts.map +1 -1
- package/dist/op/activities/change-set.js +5 -2
- package/dist/op/activities/reconcile.d.ts +28 -16
- package/dist/op/activities/reconcile.d.ts.map +1 -1
- package/dist/op/activities/reconcile.js +34 -20
- package/dist/op/builders.d.ts +1 -1
- package/dist/op/builders.d.ts.map +1 -1
- package/dist/op/builders.js +1 -1
- package/dist/op/op-waves-run.d.ts +1 -1
- package/dist/op/op-waves-run.d.ts.map +1 -1
- package/dist/op/op-waves-run.js +3 -3
- package/dist/workspace/__fixtures__/contract-repo.d.ts +7 -0
- package/dist/workspace/__fixtures__/contract-repo.d.ts.map +1 -1
- package/dist/workspace/__fixtures__/contract-repo.js +17 -1
- package/dist/workspace/__fixtures__/sessions.d.ts +1 -1
- package/dist/workspace/__fixtures__/sessions.d.ts.map +1 -1
- package/dist/workspace/__fixtures__/sessions.js +3 -3
- package/dist/workspace/change-set.schema.json +5 -3
- package/dist/workspace/ci-green-workflow.d.ts +3 -1
- package/dist/workspace/ci-green-workflow.d.ts.map +1 -1
- package/dist/workspace/ci-green-workflow.js +5 -2
- package/dist/workspace/class-data.d.ts +84 -0
- package/dist/workspace/class-data.d.ts.map +1 -0
- package/dist/workspace/class-data.js +238 -0
- package/dist/workspace/kinds.d.ts +3 -7
- package/dist/workspace/kinds.d.ts.map +1 -1
- package/dist/workspace/kinds.js +6 -40
- package/dist/workspace/principal-classes.d.ts +4 -11
- package/dist/workspace/principal-classes.d.ts.map +1 -1
- package/dist/workspace/principal-classes.js +11 -94
- package/package.json +1 -1
- package/src/build.ts +8 -0
- package/src/change-set.test.ts +48 -0
- package/src/change-set.ts +52 -2
- package/src/ci-jobs.test.ts +49 -0
- package/src/ci-jobs.ts +515 -0
- package/src/components/pr-pipeline.ts +3 -2
- package/src/composite.ts +15 -3
- package/src/discovery/collect.ts +15 -1
- package/src/discovery/fold-build-parity.test.ts +71 -0
- package/src/discovery/fold-import.ts +2 -113
- package/src/discovery/fold-project-provenance.test.ts +21 -4
- package/src/discovery/host-composite.ts +101 -0
- package/src/discovery/index.ts +11 -1
- package/src/gate-decision-bundle.test.ts +5 -4
- package/src/gate-decision-identity.test.ts +59 -6
- package/src/gate-decision.ts +81 -21
- package/src/lifecycle/gate-audit.test.ts +55 -1
- package/src/lifecycle/gate-audit.ts +116 -3
- package/src/lifecycle/gate-ledger.test.ts +20 -1
- package/src/lifecycle/gate-ledger.ts +33 -1
- package/src/op/activities/activity-contracts.ts +1 -1
- package/src/op/activities/change-set.ts +11 -3
- package/src/op/activities/lexicon-upgrade.test.ts +2 -0
- package/src/op/activities/reconcile.test.ts +62 -2
- package/src/op/activities/reconcile.ts +46 -22
- package/src/op/builders.ts +1 -1
- package/src/op/op-waves-run.ts +4 -3
- package/src/op/op-waves.test.ts +2 -0
- package/src/op/work-lease-run.test.ts +12 -4
- package/src/workspace/__fixtures__/contract-repo.ts +17 -1
- package/src/workspace/__fixtures__/sessions.ts +3 -3
- package/src/workspace/change-set.schema.json +5 -3
- package/src/workspace/ci-green-workflow.test.ts +4 -4
- package/src/workspace/ci-green-workflow.ts +5 -2
- package/src/workspace/class-data.test.ts +64 -0
- package/src/workspace/class-data.ts +236 -0
- package/src/workspace/kinds.ts +6 -35
- package/src/workspace/principal-classes.ts +11 -94
- package/src/workspace/records-formats.test.ts +7 -2
- package/src/workspace/records-sessions-write.test.ts +3 -3
- package/src/workspace/status-contract.e2e.test.ts +37 -0
- package/src/workspace/status-contract.test.ts +23 -21
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"op-waves-run.d.ts","sourceRoot":"","sources":["../../src/op/op-waves-run.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAKH,OAAO,EAAiB,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEhE,OAAO,EAAmE,KAAK,kBAAkB,EAAE,KAAK,cAAc,EAAE,MAAM,QAAQ,CAAC;AACvI,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AACjF,OAAO,KAAK,EAAE,cAAc,EAAE,MAA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TS, GAT
|
|
|
57
57
|
/** Pending-fact keys chant writes itself, which a plans file's `pending` may not set (#3821). */
|
|
58
58
|
export const OP_WAVE_PENDING_RESERVED = [
|
|
59
59
|
"version", "kind", "op", "gate", "timestamp", "expiresAt", "planDigest", "runId", "url", "resume",
|
|
60
|
-
"environment", "origin", "neverOverMcp", "approval", "approvalMode", "answer",
|
|
60
|
+
"environment", "origin", "neverOverMcp", "approval", "approvalMode", "answer", "wave", "heldBy",
|
|
61
61
|
];
|
|
62
62
|
export const OP_WAVE_APPLY_OUTCOMES = ["stood-down", "held", "replan"];
|
|
63
63
|
const spawnExec = (argv, cwd, env) => {
|
|
@@ -414,7 +414,7 @@ function runHookList(at, moment, hooks, runs, runsPath, extraEnv = {}) {
|
|
|
414
414
|
out.outcomes.push({ ...base, outcome: "held" });
|
|
415
415
|
const request = readHoldRequest(join(cwd, holdPath), log, label);
|
|
416
416
|
if (request) {
|
|
417
|
-
out.otherGates.push({ label, name, ...(call.target ? { target: call.target } : {}), argv: call.argv, env: call.env, request });
|
|
417
|
+
out.otherGates.push({ label, name, moment, ...(call.target ? { target: call.target } : {}), argv: call.argv, env: call.env, request });
|
|
418
418
|
log(`${label} exited ${code} and holds wave ${k} (${waveName}) on gate ${request.op ?? specName} / ${request.gate}, digest ${request.digest}`);
|
|
419
419
|
continue;
|
|
420
420
|
}
|
|
@@ -559,7 +559,7 @@ async function settleOtherGate(ctx, hold) {
|
|
|
559
559
|
description: hold.request.description ?? `wave ${k} (${wave.name}) of ${spec.name} is held on it by ${hold.label}`,
|
|
560
560
|
now,
|
|
561
561
|
// #3839: the wave a hold belongs to, as a field, whatever the hook's own description says.
|
|
562
|
-
fields: { ...hold.request.pending, approvalMode: rules.approval, wave: { number: k, name: wave.name, op: spec.name } },
|
|
562
|
+
fields: { ...hold.request.pending, approvalMode: rules.approval, wave: { number: k, name: wave.name, op: spec.name }, heldBy: { hook: hold.name, moment: hold.moment, ...(hold.target ? { target: hold.target } : {}) } },
|
|
563
563
|
...(neverOverMcp ? { neverOverMcp: true } : {}),
|
|
564
564
|
});
|
|
565
565
|
const base = { op, gate: hold.request.gate, digest: hold.request.digest, hook: hold.label };
|
|
@@ -19,6 +19,13 @@ export declare function repo(files: Record<string, string | {
|
|
|
19
19
|
text: string;
|
|
20
20
|
mode: number;
|
|
21
21
|
}>, commit?: boolean): string;
|
|
22
|
+
/**
|
|
23
|
+
* Build a fixture repository once per test file and hand each caller a copy of
|
|
24
|
+
* it. A repo costs a dozen git processes (init, add, commit, config), and a
|
|
25
|
+
* file copy none, so a file whose tests each start from the same repo builds
|
|
26
|
+
* it once (#3880). The template is rebuilt if {@link cleanScratch} removed it.
|
|
27
|
+
*/
|
|
28
|
+
export declare function repoFixture(build: () => string, prefix?: string): () => string;
|
|
22
29
|
export declare function commitAll(root: string, message?: string): string;
|
|
23
30
|
declare const ajv: Ajv2020;
|
|
24
31
|
/** A validator for `schema`, and an assertion that a document passes it. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract-repo.d.ts","sourceRoot":"","sources":["../../../src/workspace/__fixtures__/contract-repo.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,OAAO,MAAM,eAAe,CAAC;AAGpC,6CAA6C;AAC7C,eAAO,MAAM,IAAI,QAAwE,CAAC;AAI1F,gGAAgG;AAChG,wBAAgB,YAAY,IAAI,IAAI,CAEnC;AAED,wBAAgB,UAAU,CAAC,MAAM,SAAoB,GAAG,MAAM,CAI7D;AAED,wBAAgB,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAM1D;AAED,iFAAiF;AACjF,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,GAAG,IAAI,CAO7G;AAED,uFAA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AAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,GAAG,IAAI,CAO7G;AAED,uFAAuF;AACvF,wBAAgB,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,EAAE,MAAM,UAAQ,GAAG,MAAM,CAS3G;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,MAAM,EAAE,MAAM,SAAyB,GAAG,MAAM,MAAM,CAQ9F;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,SAAS,GAAG,MAAM,CAIhE;AAED,QAAA,MAAM,GAAG,SAAiD,CAAC;AAE3D,4EAA4E;AAC5E,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG;IAAE,QAAQ,EAAE,UAAU,CAAC,OAAO,GAAG,CAAC,OAAO,CAAC,CAAC;IAAC,WAAW,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAAA;CAAE,CAStH;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEnD;AAED,eAAO,MAAM,WAAW,YAAa,OAAO,EAAE,UAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,WACL,CAAC;AAE1E;;;GAGG;AACH,eAAO,MAAM,gBAAgB,6XAU5B,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,sZASjC,CAAC"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* a draft 2020-12 validator, and a fake chant toolchain.
|
|
4
4
|
*/
|
|
5
5
|
import { execFileSync } from "node:child_process";
|
|
6
|
-
import { chmodSync, mkdirSync, mkdtempSync, realpathSync, rmSync, writeFileSync } from "node:fs";
|
|
6
|
+
import { chmodSync, cpSync, existsSync, mkdirSync, mkdtempSync, realpathSync, rmSync, writeFileSync } from "node:fs";
|
|
7
7
|
import { tmpdir } from "node:os";
|
|
8
8
|
import { dirname, join } from "node:path";
|
|
9
9
|
import Ajv2020 from "ajv/dist/2020";
|
|
@@ -49,6 +49,22 @@ export function repo(files, commit = false) {
|
|
|
49
49
|
}
|
|
50
50
|
return root;
|
|
51
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* Build a fixture repository once per test file and hand each caller a copy of
|
|
54
|
+
* it. A repo costs a dozen git processes (init, add, commit, config), and a
|
|
55
|
+
* file copy none, so a file whose tests each start from the same repo builds
|
|
56
|
+
* it once (#3880). The template is rebuilt if {@link cleanScratch} removed it.
|
|
57
|
+
*/
|
|
58
|
+
export function repoFixture(build, prefix = "chant-contract-copy-") {
|
|
59
|
+
let template;
|
|
60
|
+
return () => {
|
|
61
|
+
if (template === undefined || !existsSync(template))
|
|
62
|
+
template = build();
|
|
63
|
+
const root = scratchDir(prefix);
|
|
64
|
+
cpSync(template, root, { recursive: true });
|
|
65
|
+
return root;
|
|
66
|
+
};
|
|
67
|
+
}
|
|
52
68
|
export function commitAll(root, message = "next") {
|
|
53
69
|
git(root, "add", "-A");
|
|
54
70
|
git(root, "commit", "-q", "-m", message);
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
export declare const SESSIONS_KIND = "design/sessions/session.kind.mjs";
|
|
7
7
|
export declare const DECISIONS_KIND = "decisions/decision.kind.mjs";
|
|
8
8
|
/** A git repository holding a copy of the reference workspace's decisions and design member. */
|
|
9
|
-
export declare
|
|
9
|
+
export declare const sessionsRepo: () => string;
|
|
10
10
|
/** A session file's text, sealed when it is closed. */
|
|
11
11
|
export declare function sessionText(s: {
|
|
12
12
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sessions.d.ts","sourceRoot":"","sources":["../../../src/workspace/__fixtures__/sessions.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,eAAO,MAAM,aAAa,qCAAqC,CAAC;AAChE,eAAO,MAAM,cAAc,gCAAgC,CAAC;AAE5D,gGAAgG;AAChG,
|
|
1
|
+
{"version":3,"file":"sessions.d.ts","sourceRoot":"","sources":["../../../src/workspace/__fixtures__/sessions.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,eAAO,MAAM,aAAa,qCAAqC,CAAC;AAChE,eAAO,MAAM,cAAc,gCAAgC,CAAC;AAE5D,gGAAgG;AAChG,eAAO,MAAM,YAAY,cAMJ,CAAC;AAEtB,uDAAuD;AACvD,wBAAgB,WAAW,CAAC,CAAC,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,QAAQ,CAAC;IAAC,QAAQ,CAAC,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,GAAG,MAAM,CA6BvK;AAED,4EAA4E;AAC5E,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,SAAY,GAAG,IAAI,CASpG;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAelD;AAED,2EAA2E;AAC3E,wBAAgB,gBAAgB,CAAC,IAAI,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GAAG,MAAM,CAe3E"}
|
|
@@ -6,18 +6,18 @@
|
|
|
6
6
|
import { cpSync, readFileSync, writeFileSync } from "node:fs";
|
|
7
7
|
import { join } from "node:path";
|
|
8
8
|
import { sessionSeal } from "../record-sessions.js";
|
|
9
|
-
import { commitAll, git, REPO, scratchDir } from "./contract-repo.js";
|
|
9
|
+
import { commitAll, git, REPO, repoFixture, scratchDir } from "./contract-repo.js";
|
|
10
10
|
export const SESSIONS_KIND = "design/sessions/session.kind.mjs";
|
|
11
11
|
export const DECISIONS_KIND = "decisions/decision.kind.mjs";
|
|
12
12
|
/** A git repository holding a copy of the reference workspace's decisions and design member. */
|
|
13
|
-
export
|
|
13
|
+
export const sessionsRepo = repoFixture(() => {
|
|
14
14
|
const root = scratchDir("chant-sessions-");
|
|
15
15
|
for (const d of ["decisions", "design"])
|
|
16
16
|
cpSync(join(REPO, "reference-workspace", d), join(root, d), { recursive: true });
|
|
17
17
|
git(root, "init", "-q");
|
|
18
18
|
commitAll(root, "reference");
|
|
19
19
|
return root;
|
|
20
|
-
}
|
|
20
|
+
}, "chant-sessions-");
|
|
21
21
|
/** A session file's text, sealed when it is closed. */
|
|
22
22
|
export function sessionText(s) {
|
|
23
23
|
const lines = [
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://intentius.io/chant/schemas/workspace/change-set/v1/change-set.schema.json",
|
|
4
4
|
"title": "change-set document",
|
|
5
|
-
"description": "One change set across planners (#3181): what a combined run's chant, terraform, tofu, choudoufu and
|
|
5
|
+
"description": "One change set across planners (#3181): what a combined run's chant, terraform, tofu, choudoufu, warden and sql members will change, a summary, and the digest a gate binds. Written by the composeChangeSet Op activity and by composeChangeSet in @intentius/chant/change-set. Version 1 of the workspace read contract. Readers ignore fields they do not know; a field is only ever added within a version.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"required": [
|
|
8
8
|
"$schema",
|
|
@@ -87,7 +87,8 @@
|
|
|
87
87
|
"tofu",
|
|
88
88
|
"choudoufu",
|
|
89
89
|
"chant",
|
|
90
|
-
"warden"
|
|
90
|
+
"warden",
|
|
91
|
+
"sql"
|
|
91
92
|
]
|
|
92
93
|
},
|
|
93
94
|
"scope": {
|
|
@@ -171,7 +172,8 @@
|
|
|
171
172
|
"tofu",
|
|
172
173
|
"choudoufu",
|
|
173
174
|
"chant",
|
|
174
|
-
"warden"
|
|
175
|
+
"warden",
|
|
176
|
+
"sql"
|
|
175
177
|
]
|
|
176
178
|
},
|
|
177
179
|
"address": {
|
|
@@ -27,7 +27,9 @@
|
|
|
27
27
|
* commit whose workflow files differ from the default branch's as an update
|
|
28
28
|
* to those workflows, and the Actions token can never hold the `workflows`
|
|
29
29
|
* permission, so it is refused there. `--token-secret <NAME>` checks out
|
|
30
|
-
* with `secrets.<NAME>` instead,
|
|
30
|
+
* with `secrets.<NAME>` instead, falling back to the Actions token where the
|
|
31
|
+
* secret is unset (#3624), so a fork or a fresh clone still tags the commits
|
|
32
|
+
* that change no workflow file; and `--app-id-var <VAR> --app-key-secret
|
|
31
33
|
* <NAME>` mints a GitHub App token first and checks out with that. The
|
|
32
34
|
* tick's own `GITHUB_TOKEN`, which reads check runs, stays the Actions token:
|
|
33
35
|
* a fine-grained personal access token can't call the Checks API.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ci-green-workflow.d.ts","sourceRoot":"","sources":["../../src/workspace/ci-green-workflow.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"ci-green-workflow.d.ts","sourceRoot":"","sources":["../../src/workspace/ci-green-workflow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAMH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAI7C,gEAAgE;AAChE,eAAO,MAAM,sBAAsB,yCAAyC,CAAC;AAC7E,eAAO,MAAM,sBAAsB,mBAAmB,CAAC;AAEvD,8CAA8C;AAC9C,MAAM,WAAW,cAAc;IAC7B,2EAA2E;IAC3E,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAKD,yHAAyH;AACzH,wBAAgB,YAAY,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,EAAE,CAYnD;AAYD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KAAK,EAAE,QAAQ,GAAG,MAAM,GAAG,MAAM,CAE/E;AAED,kGAAkG;AAClG,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAItE"}
|
|
@@ -27,7 +27,9 @@
|
|
|
27
27
|
* commit whose workflow files differ from the default branch's as an update
|
|
28
28
|
* to those workflows, and the Actions token can never hold the `workflows`
|
|
29
29
|
* permission, so it is refused there. `--token-secret <NAME>` checks out
|
|
30
|
-
* with `secrets.<NAME>` instead,
|
|
30
|
+
* with `secrets.<NAME>` instead, falling back to the Actions token where the
|
|
31
|
+
* secret is unset (#3624), so a fork or a fresh clone still tags the commits
|
|
32
|
+
* that change no workflow file; and `--app-id-var <VAR> --app-key-secret
|
|
31
33
|
* <NAME>` mints a GitHub App token first and checks out with that. The
|
|
32
34
|
* tick's own `GITHUB_TOKEN`, which reads check runs, stays the Actions token:
|
|
33
35
|
* a fine-grained personal access token can't call the Checks API.
|
|
@@ -42,6 +44,7 @@ import { dirname, join, relative, resolve, sep } from "node:path";
|
|
|
42
44
|
import { GENERATED_MARKER } from "../discovery/files.js";
|
|
43
45
|
import { parseYAMLDocument } from "../yaml.js";
|
|
44
46
|
import { matchesCheckRun } from "./ci-green.js";
|
|
47
|
+
import { githubSecretOrJobToken } from "../ci-jobs.js";
|
|
45
48
|
/** Where the workflow goes, relative to the repository root. */
|
|
46
49
|
export const CI_GREEN_WORKFLOW_FILE = ".github/workflows/chant-ci-green.yml";
|
|
47
50
|
export const CI_GREEN_WORKFLOW_NAME = "chant-ci-green";
|
|
@@ -134,7 +137,7 @@ export function renderCiGreenWorkflow(input) {
|
|
|
134
137
|
` private-key: \${{ secrets.${push.appKeySecret} }}`,
|
|
135
138
|
]
|
|
136
139
|
: [];
|
|
137
|
-
const token = !push ? [] : ["secret" in push ? ` token:
|
|
140
|
+
const token = !push ? [] : ["secret" in push ? ` token: ${githubSecretOrJobToken(push.secret)}` : " token: ${{ steps.app-token.outputs.token }}"];
|
|
138
141
|
const lines = [
|
|
139
142
|
`name: ${CI_GREEN_WORKFLOW_NAME}`,
|
|
140
143
|
"",
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reading the principal classes a pinned package supplies, without ajv or
|
|
3
|
+
* any package code (#3888).
|
|
4
|
+
*
|
|
5
|
+
* `./principal-classes.ts` reads a package's `./workspace-principals` file
|
|
6
|
+
* for chant, validating it with ajv against
|
|
7
|
+
* `workspace-principals.schema.json`. `@intentius/chant/gate-decision` reads
|
|
8
|
+
* the same files from a bare clone and must bundle without ajv, so the rules
|
|
9
|
+
* both share live here: where a package's export points, where an installed
|
|
10
|
+
* package is, what a file must hold beyond its schema, and how classes from
|
|
11
|
+
* several pins merge. {@link classDataShapeProblems} is the schema written
|
|
12
|
+
* out by hand for the bundle; `class-data.test.ts` holds it to ajv's answer.
|
|
13
|
+
*
|
|
14
|
+
* The module imports node:fs and node:path and nothing else.
|
|
15
|
+
*/
|
|
16
|
+
import { type PrincipalClass } from "./identity-gate-rule.js";
|
|
17
|
+
/** The subpath a package publishes its principal classes at. */
|
|
18
|
+
export declare const PRINCIPALS_SUBPATH = "./workspace-principals";
|
|
19
|
+
export interface ClassData {
|
|
20
|
+
classes: PrincipalClass[];
|
|
21
|
+
/** Why some of the data can't be used, one line each. Empty when all of it can. */
|
|
22
|
+
problems: string[];
|
|
23
|
+
}
|
|
24
|
+
/** A package's files, by a `/`-separated path inside it, or undefined when one is not there. */
|
|
25
|
+
export type PackageFiles = (path: string) => string | undefined;
|
|
26
|
+
/** A package directory on disk. */
|
|
27
|
+
export declare function diskFiles(dir: string): PackageFiles;
|
|
28
|
+
/**
|
|
29
|
+
* The directory of an installed package `name`, found the way Node finds a
|
|
30
|
+
* bare import: `node_modules/<name>` in `fromDir` and each directory above it.
|
|
31
|
+
* It looks for the directory, not for an entry point, so it works for a
|
|
32
|
+
* package whose `exports` don't expose `package.json`.
|
|
33
|
+
*/
|
|
34
|
+
export declare function findInstalledPackage(name: string, fromDir: string): string | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* The file a package's `exports[subpath]` names: undefined when it names
|
|
37
|
+
* none, a problem when it is not one `.json` file inside the package.
|
|
38
|
+
*/
|
|
39
|
+
export declare function dataExportTarget(pkg: Record<string, unknown>, subpath: string): string | undefined | {
|
|
40
|
+
problem: string;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* What `workspace-principals.schema.json` refuses in `raw`, one line each,
|
|
44
|
+
* written out by hand so the gate-decision bundle needs no ajv. Empty when
|
|
45
|
+
* the schema accepts it.
|
|
46
|
+
*/
|
|
47
|
+
export declare function classDataShapeProblems(raw: unknown, source: string): string[];
|
|
48
|
+
/**
|
|
49
|
+
* The classes in a principals file the schema accepts, under the rules the
|
|
50
|
+
* schema can't say: no core name or core role, and no name or role twice.
|
|
51
|
+
* `source` names the pin in the classes and in the messages.
|
|
52
|
+
*/
|
|
53
|
+
export declare function checkClassData(valid: {
|
|
54
|
+
classes: {
|
|
55
|
+
name: string;
|
|
56
|
+
description: string;
|
|
57
|
+
role: string;
|
|
58
|
+
}[];
|
|
59
|
+
}, source: string): ClassData;
|
|
60
|
+
/** A principals file's text read with {@link classDataShapeProblems} for the schema: what chant's ajv-checked `parseClassData` reads, by the same rules. */
|
|
61
|
+
export declare function parseClassDataByHand(text: string, source: string): ClassData;
|
|
62
|
+
/** Read the classes a package publishes at `./workspace-principals` through `files`, checking the file with `parse`. Imports nothing. A package that publishes none supplies none. */
|
|
63
|
+
export declare function readClassFiles(files: PackageFiles, source: string, parse: (text: string, source: string) => ClassData): ClassData;
|
|
64
|
+
/** One pin's classes, as read. */
|
|
65
|
+
export interface PinClassRead {
|
|
66
|
+
/** The pin's index in the declaration's `pins`. */
|
|
67
|
+
pin: number;
|
|
68
|
+
source: string;
|
|
69
|
+
read: ClassData;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* The domain classes of every pin, in pin order and file order. A class
|
|
73
|
+
* name, or a role, two pins both supply is a problem, and every class
|
|
74
|
+
* involved is left out, so a rule naming it reads it as unknown and fails
|
|
75
|
+
* closed.
|
|
76
|
+
*/
|
|
77
|
+
export declare function mergePinClasses(reads: readonly PinClassRead[]): {
|
|
78
|
+
classes: PrincipalClass[];
|
|
79
|
+
problems: {
|
|
80
|
+
pin: number;
|
|
81
|
+
message: string;
|
|
82
|
+
}[];
|
|
83
|
+
};
|
|
84
|
+
//# sourceMappingURL=class-data.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"class-data.d.ts","sourceRoot":"","sources":["../../src/workspace/class-data.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAAwC,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEjG,gEAAgE;AAChE,eAAO,MAAM,kBAAkB,2BAA2B,CAAC;AAE3D,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,mFAAmF;IACnF,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,gGAAgG;AAChG,MAAM,MAAM,YAAY,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;AAEhE,mCAAmC;AACnC,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,CAQnD;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAUtF;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAiBxH;AASD;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CA0B7E;AAID;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE;IAAE,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CAAE,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,CA2BnI;AAED,4JAA4J;AAC5J,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,CAS5E;AAED,sLAAsL;AACtL,wBAAgB,cAAc,CAAC,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,SAAS,GAAG,SAAS,CAiBjI;AAED,kCAAkC;AAClC,MAAM,WAAW,YAAY;IAC3B,mDAAmD;IACnD,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,SAAS,CAAC;CACjB;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,SAAS,YAAY,EAAE,GAAG;IAAE,OAAO,EAAE,cAAc,EAAE,CAAC;IAAC,QAAQ,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CAAE,CA6B3I"}
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reading the principal classes a pinned package supplies, without ajv or
|
|
3
|
+
* any package code (#3888).
|
|
4
|
+
*
|
|
5
|
+
* `./principal-classes.ts` reads a package's `./workspace-principals` file
|
|
6
|
+
* for chant, validating it with ajv against
|
|
7
|
+
* `workspace-principals.schema.json`. `@intentius/chant/gate-decision` reads
|
|
8
|
+
* the same files from a bare clone and must bundle without ajv, so the rules
|
|
9
|
+
* both share live here: where a package's export points, where an installed
|
|
10
|
+
* package is, what a file must hold beyond its schema, and how classes from
|
|
11
|
+
* several pins merge. {@link classDataShapeProblems} is the schema written
|
|
12
|
+
* out by hand for the bundle; `class-data.test.ts` holds it to ajv's answer.
|
|
13
|
+
*
|
|
14
|
+
* The module imports node:fs and node:path and nothing else.
|
|
15
|
+
*/
|
|
16
|
+
import { existsSync, readFileSync, statSync } from "node:fs";
|
|
17
|
+
import { dirname, join, posix, resolve } from "node:path";
|
|
18
|
+
import { CORE_CLASSES, CORE_PRINCIPAL_CLASSES } from "./identity-gate-rule.js";
|
|
19
|
+
/** The subpath a package publishes its principal classes at. */
|
|
20
|
+
export const PRINCIPALS_SUBPATH = "./workspace-principals";
|
|
21
|
+
/** A package directory on disk. */
|
|
22
|
+
export function diskFiles(dir) {
|
|
23
|
+
return (path) => {
|
|
24
|
+
try {
|
|
25
|
+
return readFileSync(join(dir, ...path.split("/")), "utf-8");
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
return undefined;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The directory of an installed package `name`, found the way Node finds a
|
|
34
|
+
* bare import: `node_modules/<name>` in `fromDir` and each directory above it.
|
|
35
|
+
* It looks for the directory, not for an entry point, so it works for a
|
|
36
|
+
* package whose `exports` don't expose `package.json`.
|
|
37
|
+
*/
|
|
38
|
+
export function findInstalledPackage(name, fromDir) {
|
|
39
|
+
for (let dir = resolve(fromDir);; dir = dirname(dir)) {
|
|
40
|
+
const candidate = join(dir, "node_modules", ...name.split("/"));
|
|
41
|
+
try {
|
|
42
|
+
if (statSync(candidate).isDirectory() && existsSync(join(candidate, "package.json")))
|
|
43
|
+
return candidate;
|
|
44
|
+
}
|
|
45
|
+
catch {
|
|
46
|
+
// Not here; keep walking.
|
|
47
|
+
}
|
|
48
|
+
if (dirname(dir) === dir)
|
|
49
|
+
return undefined;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* The file a package's `exports[subpath]` names: undefined when it names
|
|
54
|
+
* none, a problem when it is not one `.json` file inside the package.
|
|
55
|
+
*/
|
|
56
|
+
export function dataExportTarget(pkg, subpath) {
|
|
57
|
+
const exports = pkg.exports;
|
|
58
|
+
if (!exports || typeof exports !== "object" || Array.isArray(exports))
|
|
59
|
+
return undefined;
|
|
60
|
+
const entry = exports[subpath];
|
|
61
|
+
if (entry === undefined)
|
|
62
|
+
return undefined;
|
|
63
|
+
let target = entry;
|
|
64
|
+
if (target && typeof target === "object" && !Array.isArray(target)) {
|
|
65
|
+
const conditions = target;
|
|
66
|
+
target = conditions.default ?? conditions.import ?? conditions.require;
|
|
67
|
+
}
|
|
68
|
+
if (typeof target !== "string") {
|
|
69
|
+
return { problem: `exports["${subpath}"] must name one file, as a string or a "default" condition` };
|
|
70
|
+
}
|
|
71
|
+
if (!target.startsWith("./") || !target.endsWith(".json")) {
|
|
72
|
+
return { problem: `exports["${subpath}"] is ${target}; it must name a .json file inside the package, since chant reads plugin data as data and never runs a package's code` };
|
|
73
|
+
}
|
|
74
|
+
return target;
|
|
75
|
+
}
|
|
76
|
+
// ── The file ─────────────────────────────────────────────────────────────────
|
|
77
|
+
const NAME = /^(?!x-)[a-z][a-z0-9-]{0,39}$/u;
|
|
78
|
+
const ROLE = /^[a-z][a-z0-9-]*$/u;
|
|
79
|
+
const isObject = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
|
|
80
|
+
const extra = (key, known) => !known.includes(key) && !key.startsWith("x-");
|
|
81
|
+
/**
|
|
82
|
+
* What `workspace-principals.schema.json` refuses in `raw`, one line each,
|
|
83
|
+
* written out by hand so the gate-decision bundle needs no ajv. Empty when
|
|
84
|
+
* the schema accepts it.
|
|
85
|
+
*/
|
|
86
|
+
export function classDataShapeProblems(raw, source) {
|
|
87
|
+
const p = [];
|
|
88
|
+
const say = (where, what) => p.push(`${source}: ${where || "the principals file"} ${what}`);
|
|
89
|
+
if (!isObject(raw)) {
|
|
90
|
+
say("", "must be object");
|
|
91
|
+
return p;
|
|
92
|
+
}
|
|
93
|
+
for (const key of Object.keys(raw))
|
|
94
|
+
if (extra(key, ["$schema", "$comment", "schema", "classes"]))
|
|
95
|
+
say("", `must NOT have additional property ${key}`);
|
|
96
|
+
for (const key of ["$schema", "$comment"])
|
|
97
|
+
if (key in raw && typeof raw[key] !== "string")
|
|
98
|
+
say(`/${key}`, "must be string");
|
|
99
|
+
if (!("schema" in raw))
|
|
100
|
+
say("", "must have required property 'schema'");
|
|
101
|
+
else if (raw.schema !== 1)
|
|
102
|
+
say("/schema", "must be equal to constant 1");
|
|
103
|
+
if (!("classes" in raw))
|
|
104
|
+
say("", "must have required property 'classes'");
|
|
105
|
+
else if (!Array.isArray(raw.classes))
|
|
106
|
+
say("/classes", "must be array");
|
|
107
|
+
else {
|
|
108
|
+
if (raw.classes.length < 1)
|
|
109
|
+
say("/classes", "must NOT have fewer than 1 items");
|
|
110
|
+
raw.classes.forEach((c, i) => {
|
|
111
|
+
const at = `/classes/${i}`;
|
|
112
|
+
if (!isObject(c))
|
|
113
|
+
return say(at, "must be object");
|
|
114
|
+
for (const key of Object.keys(c))
|
|
115
|
+
if (extra(key, ["name", "description", "role"]))
|
|
116
|
+
say(at, `must NOT have additional property ${key}`);
|
|
117
|
+
for (const key of ["name", "description", "role"])
|
|
118
|
+
if (!(key in c))
|
|
119
|
+
say(at, `must have required property '${key}'`);
|
|
120
|
+
if ("name" in c && (typeof c.name !== "string" || !NAME.test(c.name)))
|
|
121
|
+
say(`${at}/name`, "must be a class name");
|
|
122
|
+
if ("description" in c && (typeof c.description !== "string" || [...c.description].length < 1))
|
|
123
|
+
say(`${at}/description`, "must be a non-empty string");
|
|
124
|
+
if ("role" in c && (typeof c.role !== "string" || !ROLE.test(c.role)))
|
|
125
|
+
say(`${at}/role`, "must be a role name");
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
return [...new Set(p)];
|
|
129
|
+
}
|
|
130
|
+
const CORE_ROLES = new Set(CORE_CLASSES.map((c) => c.role).filter((r) => r !== null));
|
|
131
|
+
/**
|
|
132
|
+
* The classes in a principals file the schema accepts, under the rules the
|
|
133
|
+
* schema can't say: no core name or core role, and no name or role twice.
|
|
134
|
+
* `source` names the pin in the classes and in the messages.
|
|
135
|
+
*/
|
|
136
|
+
export function checkClassData(valid, source) {
|
|
137
|
+
const problems = [];
|
|
138
|
+
const classes = [];
|
|
139
|
+
const names = new Set();
|
|
140
|
+
const roles = new Set();
|
|
141
|
+
for (const c of valid.classes) {
|
|
142
|
+
if (CORE_PRINCIPAL_CLASSES.includes(c.name)) {
|
|
143
|
+
problems.push(`${source}: class ${c.name} is a core class and can't be supplied by a package`);
|
|
144
|
+
continue;
|
|
145
|
+
}
|
|
146
|
+
if (CORE_ROLES.has(c.role)) {
|
|
147
|
+
problems.push(`${source}: class ${c.name} names the role ${c.role}, which puts a principal in the core ${c.role} class`);
|
|
148
|
+
continue;
|
|
149
|
+
}
|
|
150
|
+
if (names.has(c.name)) {
|
|
151
|
+
problems.push(`${source}: class ${c.name} is listed twice`);
|
|
152
|
+
continue;
|
|
153
|
+
}
|
|
154
|
+
if (roles.has(c.role)) {
|
|
155
|
+
problems.push(`${source}: class ${c.name} names the role ${c.role}, which another class in the file names; a role puts a principal in one class`);
|
|
156
|
+
continue;
|
|
157
|
+
}
|
|
158
|
+
names.add(c.name);
|
|
159
|
+
roles.add(c.role);
|
|
160
|
+
classes.push({ name: c.name, description: c.description, role: c.role, source });
|
|
161
|
+
}
|
|
162
|
+
return { classes, problems };
|
|
163
|
+
}
|
|
164
|
+
/** A principals file's text read with {@link classDataShapeProblems} for the schema: what chant's ajv-checked `parseClassData` reads, by the same rules. */
|
|
165
|
+
export function parseClassDataByHand(text, source) {
|
|
166
|
+
let raw;
|
|
167
|
+
try {
|
|
168
|
+
raw = JSON.parse(text);
|
|
169
|
+
}
|
|
170
|
+
catch (err) {
|
|
171
|
+
return { classes: [], problems: [`${source}: the principals file is not JSON (${err.message})`] };
|
|
172
|
+
}
|
|
173
|
+
const problems = classDataShapeProblems(raw, source);
|
|
174
|
+
return problems.length > 0 ? { classes: [], problems } : checkClassData(raw, source);
|
|
175
|
+
}
|
|
176
|
+
/** Read the classes a package publishes at `./workspace-principals` through `files`, checking the file with `parse`. Imports nothing. A package that publishes none supplies none. */
|
|
177
|
+
export function readClassFiles(files, source, parse) {
|
|
178
|
+
const manifest = files("package.json");
|
|
179
|
+
if (manifest === undefined)
|
|
180
|
+
return { classes: [], problems: [`${source}: no readable package.json`] };
|
|
181
|
+
let pkg;
|
|
182
|
+
try {
|
|
183
|
+
pkg = JSON.parse(manifest);
|
|
184
|
+
}
|
|
185
|
+
catch {
|
|
186
|
+
return { classes: [], problems: [`${source}: package.json is not JSON`] };
|
|
187
|
+
}
|
|
188
|
+
const target = dataExportTarget(pkg, PRINCIPALS_SUBPATH);
|
|
189
|
+
if (target === undefined)
|
|
190
|
+
return { classes: [], problems: [] };
|
|
191
|
+
if (typeof target !== "string")
|
|
192
|
+
return { classes: [], problems: [`${source}: ${target.problem}`] };
|
|
193
|
+
const inside = posix.normalize(target.slice(2));
|
|
194
|
+
if (inside.startsWith("../") || inside === "..")
|
|
195
|
+
return { classes: [], problems: [`${source}: exports["${PRINCIPALS_SUBPATH}"] points outside the package`] };
|
|
196
|
+
const text = files(inside);
|
|
197
|
+
if (text === undefined)
|
|
198
|
+
return { classes: [], problems: [`${source}: exports["${PRINCIPALS_SUBPATH}"] names ${target}, which does not exist`] };
|
|
199
|
+
return parse(text, source);
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* The domain classes of every pin, in pin order and file order. A class
|
|
203
|
+
* name, or a role, two pins both supply is a problem, and every class
|
|
204
|
+
* involved is left out, so a rule naming it reads it as unknown and fails
|
|
205
|
+
* closed.
|
|
206
|
+
*/
|
|
207
|
+
export function mergePinClasses(reads) {
|
|
208
|
+
const problems = [];
|
|
209
|
+
const extra = [];
|
|
210
|
+
const byName = new Map();
|
|
211
|
+
const byRole = new Map();
|
|
212
|
+
const clashing = new Set();
|
|
213
|
+
for (const { pin: i, source, read } of reads) {
|
|
214
|
+
for (const p of read.problems)
|
|
215
|
+
problems.push({ pin: i, message: p });
|
|
216
|
+
for (const c of read.classes) {
|
|
217
|
+
const named = byName.get(c.name);
|
|
218
|
+
const roled = byRole.get(c.role);
|
|
219
|
+
if (named !== undefined || roled !== undefined) {
|
|
220
|
+
clashing.add(c.name);
|
|
221
|
+
if (named !== undefined) {
|
|
222
|
+
problems.push({ pin: i, message: `class ${c.name} is supplied by both ${named} and ${source}; a class name has one source` });
|
|
223
|
+
}
|
|
224
|
+
else {
|
|
225
|
+
const other = extra.find((e) => e.role === c.role);
|
|
226
|
+
clashing.add(other.name);
|
|
227
|
+
problems.push({ pin: i, message: `class ${c.name} (${source}) names the role ${c.role}, which class ${other.name} (${roled}) names; a role puts a principal in one class` });
|
|
228
|
+
}
|
|
229
|
+
continue;
|
|
230
|
+
}
|
|
231
|
+
byName.set(c.name, source);
|
|
232
|
+
byRole.set(c.role, source);
|
|
233
|
+
extra.push(c);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
// A name or role two pins both supply is left out altogether: neither reading is safe.
|
|
237
|
+
return { classes: extra.filter((c) => !clashing.has(c.name)), problems };
|
|
238
|
+
}
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
* fails ({@link resolveKind}).
|
|
18
18
|
*/
|
|
19
19
|
import type { WorkspaceTree } from "./tree.js";
|
|
20
|
+
import { findInstalledPackage } from "./class-data.js";
|
|
20
21
|
export declare const KINDS_SCHEMA_ID: string;
|
|
21
22
|
/** The subpath a package publishes its kinds at. */
|
|
22
23
|
export declare const KINDS_SUBPATH = "./workspace-kinds";
|
|
@@ -212,13 +213,8 @@ export interface GraphPlaceholders {
|
|
|
212
213
|
* in every string key and value. Other braces are left as they are.
|
|
213
214
|
*/
|
|
214
215
|
export declare function substituteGraphConfig(config: Record<string, unknown>, at: GraphPlaceholders): Record<string, unknown>;
|
|
215
|
-
/**
|
|
216
|
-
|
|
217
|
-
* bare import: `node_modules/<name>` in `fromDir` and each directory above it.
|
|
218
|
-
* It looks for the directory, not for an entry point, so it works for a
|
|
219
|
-
* package whose `exports` don't expose `package.json`.
|
|
220
|
-
*/
|
|
221
|
-
export declare function findInstalledPackage(name: string, fromDir: string): string | undefined;
|
|
216
|
+
/** Where an installed package is, as Node finds a bare import (`./class-data.ts`, so the gate-decision bundle shares it). */
|
|
217
|
+
export { findInstalledPackage };
|
|
222
218
|
export interface PinLike {
|
|
223
219
|
package: string | null;
|
|
224
220
|
version: string | null;
|