@intentius/chant 0.79.0 → 0.80.0
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/audit/core.d.ts.map +1 -1
- package/dist/audit/discover.d.ts +38 -0
- package/dist/audit/discover.d.ts.map +1 -1
- package/dist/audit/terraform-state.d.ts +14 -0
- package/dist/audit/terraform-state.d.ts.map +1 -1
- package/dist/cli/command-group.d.ts +6 -0
- package/dist/cli/command-group.d.ts.map +1 -1
- package/dist/cli/commands/audit.d.ts +27 -2
- package/dist/cli/commands/audit.d.ts.map +1 -1
- package/dist/cli/commands/check-lexicon-examples.d.ts.map +1 -1
- package/dist/cli/commands/doctor.d.ts.map +1 -1
- package/dist/cli/commands/import-agents.d.ts.map +1 -1
- package/dist/cli/commands/init.d.ts +6 -0
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/lint.d.ts.map +1 -1
- package/dist/cli/commands/onboard.d.ts.map +1 -1
- package/dist/cli/commands/update.d.ts.map +1 -1
- package/dist/cli/conflict-check.d.ts +6 -0
- package/dist/cli/conflict-check.d.ts.map +1 -1
- package/dist/cli/handlers/dev.d.ts.map +1 -1
- package/dist/cli/handlers/lifecycle.d.ts.map +1 -1
- package/dist/cli/handlers/misc.d.ts.map +1 -1
- package/dist/cli/handlers/operator.d.ts.map +1 -1
- package/dist/cli/handlers/promote.d.ts +17 -0
- package/dist/cli/handlers/promote.d.ts.map +1 -0
- package/dist/cli/handlers/run-generate.d.ts +39 -0
- package/dist/cli/handlers/run-generate.d.ts.map +1 -0
- package/dist/cli/handlers/run.d.ts.map +1 -1
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/mcp/op-tools.d.ts.map +1 -1
- package/dist/cli/plugins.d.ts +9 -0
- package/dist/cli/plugins.d.ts.map +1 -1
- package/dist/cli/registry.d.ts +14 -1
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/components/capability-plugin-loader.d.ts.map +1 -1
- package/dist/components/cli-support.d.ts.map +1 -1
- package/dist/components/discover.d.ts.map +1 -1
- package/dist/components/driver.d.ts.map +1 -1
- package/dist/components/fan-out-support.d.ts.map +1 -1
- package/dist/components/pilots/alb-ecs.pilot.d.ts +7 -1
- package/dist/components/pilots/alb-ecs.pilot.d.ts.map +1 -1
- package/dist/components/presets/ecs-fargate.d.ts +10 -4
- package/dist/components/presets/ecs-fargate.d.ts.map +1 -1
- package/dist/components/promote.d.ts +211 -0
- package/dist/components/promote.d.ts.map +1 -0
- package/dist/components/unbound-gate-approval.d.ts +24 -0
- package/dist/components/unbound-gate-approval.d.ts.map +1 -0
- package/dist/config.d.ts +82 -5
- package/dist/config.d.ts.map +1 -1
- package/dist/discovery/convergence.d.ts +97 -0
- package/dist/discovery/convergence.d.ts.map +1 -0
- package/dist/discovery/files.d.ts +41 -2
- package/dist/discovery/files.d.ts.map +1 -1
- package/dist/discovery/fold-import.d.ts +15 -0
- package/dist/discovery/fold-import.d.ts.map +1 -1
- package/dist/graph-ir.d.ts +13 -0
- package/dist/graph-ir.d.ts.map +1 -1
- package/dist/lexicon-module.d.ts +65 -0
- package/dist/lexicon-module.d.ts.map +1 -0
- package/dist/lexicon.d.ts +24 -0
- package/dist/lexicon.d.ts.map +1 -1
- package/dist/lifecycle/build-ledger-store.d.ts.map +1 -1
- package/dist/lifecycle/legacy-digest.d.ts +26 -0
- package/dist/lifecycle/legacy-digest.d.ts.map +1 -0
- package/dist/lifecycle/release-ledger.d.ts +25 -0
- package/dist/lifecycle/release-ledger.d.ts.map +1 -1
- package/dist/lint/rules/comp/comp003-mutating-no-rollback.d.ts +2 -3
- package/dist/lint/rules/comp/comp003-mutating-no-rollback.d.ts.map +1 -1
- package/dist/op/activity-contract-registry.d.ts.map +1 -1
- package/dist/op/activity-registry.d.ts.map +1 -1
- package/dist/op/discover.d.ts.map +1 -1
- package/dist/op/gate-approval.d.ts.map +1 -1
- package/dist/op/generate-pipeline.d.ts.map +1 -1
- package/dist/op/runtimes/local.d.ts.map +1 -1
- package/dist/workspace/record-source.d.ts +22 -0
- package/dist/workspace/record-source.d.ts.map +1 -0
- package/dist/workspace/records-cli.d.ts +57 -0
- package/dist/workspace/records-cli.d.ts.map +1 -0
- package/dist/workspace/records.d.ts +118 -0
- package/dist/workspace/records.d.ts.map +1 -0
- package/package.json +3 -3
- package/src/audit/core.ts +13 -2
- package/src/audit/discover.ts +90 -12
- package/src/audit/terraform-state.test.ts +86 -1
- package/src/audit/terraform-state.ts +26 -0
- package/src/cli/command-group.ts +7 -0
- package/src/cli/commands/audit-walk-warnings.test.ts +156 -0
- package/src/cli/commands/audit.ts +93 -19
- package/src/cli/commands/check-lexicon-examples.ts +2 -1
- package/src/cli/commands/doctor.ts +3 -0
- package/src/cli/commands/import-agents.ts +11 -4
- package/src/cli/commands/init.ts +57 -25
- package/src/cli/commands/lint.test.ts +58 -1
- package/src/cli/commands/lint.ts +48 -18
- package/src/cli/commands/onboard.ts +15 -0
- package/src/cli/commands/update.ts +5 -1
- package/src/cli/conflict-check.test.ts +18 -1
- package/src/cli/conflict-check.ts +13 -0
- package/src/cli/discovery-skip.test.ts +168 -0
- package/src/cli/handlers/build.test.ts +11 -0
- package/src/cli/handlers/build.ts +1 -1
- package/src/cli/handlers/dev.ts +3 -0
- package/src/cli/handlers/graph.test.ts +20 -0
- package/src/cli/handlers/graph.ts +4 -2
- package/src/cli/handlers/lifecycle.ts +2 -1
- package/src/cli/handlers/misc.ts +16 -0
- package/src/cli/handlers/operator.ts +2 -1
- package/src/cli/handlers/promote.test.ts +261 -0
- package/src/cli/handlers/promote.ts +325 -0
- package/src/cli/handlers/run-generate.test.ts +160 -0
- package/src/cli/handlers/run-generate.ts +133 -0
- package/src/cli/handlers/run.ts +13 -1
- package/src/cli/main.test.ts +33 -1
- package/src/cli/main.ts +69 -16
- package/src/cli/mcp/op-tools.ts +2 -1
- package/src/cli/path-lexicon-messages.test.ts +152 -0
- package/src/cli/plugins.ts +44 -6
- package/src/cli/registry.ts +14 -1
- package/src/components/__fixtures__/alb-ecs-service.json +0 -8
- package/src/components/capability-plugin-loader.ts +3 -1
- package/src/components/cli-support.ts +3 -2
- package/src/components/discover.ts +26 -2
- package/src/components/driver.test.ts +12 -11
- package/src/components/driver.ts +2 -0
- package/src/components/fan-out-support.ts +2 -1
- package/src/components/pilots/README.md +1 -1
- package/src/components/pilots/alb-ecs.pilot.ts +7 -7
- package/src/components/presets/ecs-fargate.ts +10 -5
- package/src/components/promote.test.ts +371 -0
- package/src/components/promote.ts +537 -0
- package/src/components/unbound-gate-approval.test.ts +82 -0
- package/src/components/unbound-gate-approval.ts +51 -0
- package/src/config.test.ts +40 -0
- package/src/config.ts +128 -11
- package/src/discovery/convergence.test.ts +231 -0
- package/src/discovery/convergence.ts +399 -0
- package/src/discovery/files.test.ts +127 -1
- package/src/discovery/files.ts +97 -9
- package/src/discovery/fold-import.ts +83 -9
- package/src/discovery/sandbox/path-lexicon-parity.test.ts +162 -0
- package/src/graph-ir.ts +14 -0
- package/src/lexicon-module.test.ts +203 -0
- package/src/lexicon-module.ts +117 -0
- package/src/lexicon.ts +26 -0
- package/src/lifecycle/build-ledger-store.ts +11 -1
- package/src/lifecycle/legacy-digest.test.ts +114 -0
- package/src/lifecycle/legacy-digest.ts +62 -0
- package/src/lifecycle/release-ledger.ts +34 -0
- package/src/lint/rules/comp/comp003-mutating-no-rollback.ts +2 -3
- package/src/op/activity-contract-registry.ts +18 -4
- package/src/op/activity-registry.ts +26 -0
- package/src/op/discover-convergence.test.ts +70 -0
- package/src/op/discover.ts +4 -0
- package/src/op/gate-approval.ts +3 -1
- package/src/op/generate-pipeline.ts +2 -1
- package/src/op/runtimes/local.ts +2 -1
- package/src/workspace/record-source.ts +117 -0
- package/src/workspace/records-cli.ts +126 -0
- package/src/workspace/records-contract.test.ts +88 -0
- package/src/workspace/records.schema.json +120 -0
- package/src/workspace/records.test.ts +243 -0
- package/src/workspace/records.ts +383 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"driver.d.ts","sourceRoot":"","sources":["../../src/components/driver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAGH,OAAO,EAAmC,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"driver.d.ts","sourceRoot":"","sources":["../../src/components/driver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAGH,OAAO,EAAmC,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAGlF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACtE,OAAO,KAAK,EAAE,gBAAgB,EAAqB,MAAM,gBAAgB,CAAC;AAE1E,YAAY,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAIvD,oGAAoG;AACpG,MAAM,MAAM,WAAW,GACnB,MAAM,GACN;IAAE,WAAW,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,GAChD,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE5B,uFAAuF;AACvF,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAED;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,0FAA0F;IAC1F,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,iHAAiH;AACjH,MAAM,WAAW,WAAW;IAC1B,KA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OAAO,CAAC,GAAG,SAAS,CAKrC;AAED;;;;;;;;GAQG;AACH,wBAAgB,0BAA0B,CACxC,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EACzD,aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GACpD,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAMzC;AA4CD,MAAM,WAAW,mBAAmB;IAClC,iFAAiF;IACjF,GAAG,EAAE,MAAM,CAAC;IACZ,iIAAiI;IACjI,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,qKAAqK;IACrK,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAC3D;;;;;;;;OAQG;IACH,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC/C,8KAA8K;IAC9K,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,qEAAqE;IACrE,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,kBAAkB,CACtC,UAAU,EAAE,eAAe,EAAE,EAC7B,QAAQ,EAAE,kBAAkB,EAC5B,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,eAAe,CAAC,CAgE1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fan-out-support.d.ts","sourceRoot":"","sources":["../../src/components/fan-out-support.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;
|
|
1
|
+
{"version":3,"file":"fan-out-support.d.ts","sourceRoot":"","sources":["../../src/components/fan-out-support.ts"],"names":[],"mappings":"AAAA;;;;;;;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→
|
|
5
5
|
* `publish-image` (promote by digest, deploy-time) → `cfn-deploy` (importing
|
|
6
6
|
* the shared ALB's listener/cluster/subnets as cross-stack outputs, resolved
|
|
7
7
|
* by `chant graph --stacks` rather than a `describe-stacks | jq` pipeline
|
|
@@ -16,6 +16,12 @@
|
|
|
16
16
|
* capabilities. `service` archetype: build → publish → apply → verify, the
|
|
17
17
|
* fullest of the three archetypes.
|
|
18
18
|
*
|
|
19
|
+
* It declares no component-level `rollback` phase (#2576). It used to declare
|
|
20
|
+
* one holding a `rollback-previous` step with only `service` and `cluster`,
|
|
21
|
+
* which the aws capability turned into an `aws ecs update-service` with no
|
|
22
|
+
* changes. Taking an environment back to an earlier recorded release is
|
|
23
|
+
* `chant components rollback` (#2531).
|
|
24
|
+
*
|
|
19
25
|
* The JSON projection of this pilot is authoritative at
|
|
20
26
|
* ../__fixtures__/alb-ecs-service.json (already schema-validated by
|
|
21
27
|
* component-schema.test.ts) — this module is the real typed `Component`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alb-ecs.pilot.d.ts","sourceRoot":"","sources":["../../../src/components/pilots/alb-ecs.pilot.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"alb-ecs.pilot.d.ts","sourceRoot":"","sources":["../../../src/components/pilots/alb-ecs.pilot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAU9C,eAAO,MAAM,aAAa,EAAE,SAqB3B,CAAC"}
|
|
@@ -4,10 +4,16 @@
|
|
|
4
4
|
* The named-composition builder for the ALB/ECS shape
|
|
5
5
|
* (`../pilots/alb-ecs.pilot.ts`): `docker-build` -> `publish-image` ->
|
|
6
6
|
* `cfn-deploy` (importing a shared ALB's cross-stack outputs) ->
|
|
7
|
-
* `ecs-update-service` -> `wait-steady-state` + `health-gate
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
7
|
+
* `ecs-update-service` -> `wait-steady-state` + `health-gate`.
|
|
8
|
+
*
|
|
9
|
+
* There is no component-level `rollback` phase (#2576). The preset used to
|
|
10
|
+
* declare one holding a `rollback-previous` step with only `service` and
|
|
11
|
+
* `cluster`. The aws capability behind that kind rolls a service back to the
|
|
12
|
+
* `taskDefinition` it is given, and with none given it ran `aws ecs
|
|
13
|
+
* update-service` with no changes, so the phase restored nothing. The
|
|
14
|
+
* in-run unwind still calls each executed step's own rollback, and taking an
|
|
15
|
+
* environment back to an earlier recorded release is `chant components
|
|
16
|
+
* rollback <env> --component <name>` (#2531).
|
|
11
17
|
*
|
|
12
18
|
* This is Level 2 reuse over Level 1 raw capabilities: a component that looks
|
|
13
19
|
* like this composes `EcsFargateComponent({ ... })` directly; the odd case
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ecs-fargate.d.ts","sourceRoot":"","sources":["../../../src/components/presets/ecs-fargate.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"ecs-fargate.d.ts","sourceRoot":"","sources":["../../../src/components/presets/ecs-fargate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAGtD,MAAM,WAAW,yBAAyB;IACxC,wIAAwI;IACxI,IAAI,EAAE,MAAM,CAAC;IACb,yCAAyC;IACzC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0CAA0C;IAC1C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6GAA6G;IAC7G,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2DAA2D;IAC3D,UAAU,EAAE,MAAM,CAAC;IACnB,uFAAuF;IACvF,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,2HAA2H;IAC3H,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,uFAAuF;IACvF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oFAAoF;IACpF,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,yBAAyB,GAAG,SAAS,CAwChF"}
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Promote a release to another environment without rebuilding (#2530).
|
|
3
|
+
*
|
|
4
|
+
* `chant run --components <name> --env prod` runs the component's whole
|
|
5
|
+
* `deploy` composition, and a composition that builds (a `Build` phase with
|
|
6
|
+
* `docker-build`) builds again in prod. The release ledger already knows which
|
|
7
|
+
* digest staging is running, so a promote reads that record and deploys the
|
|
8
|
+
* same artifact to the target environment instead.
|
|
9
|
+
*
|
|
10
|
+
* The mechanism is a transform on the composition, not a change to the driver:
|
|
11
|
+
*
|
|
12
|
+
* - build-time steps (`BUILD_STEP_KINDS`) are removed, so nothing is built;
|
|
13
|
+
* - the publish step stays. It moves the archived bytes to the target
|
|
14
|
+
* environment, which is what "promote by digest" means in the build-archive
|
|
15
|
+
* model, and its output is checked against the recorded digest. A publish
|
|
16
|
+
* that produces any other digest fails the step, and so the component,
|
|
17
|
+
* before anything after it runs;
|
|
18
|
+
* - gates, apply, verify and every other step run exactly as a normal deploy
|
|
19
|
+
* to the target environment would run them, so the target's gates apply.
|
|
20
|
+
*
|
|
21
|
+
* A composition the transform cannot pin to one recorded digest is refused
|
|
22
|
+
* before anything runs: one with no publish step (nothing would carry the
|
|
23
|
+
* digest), one with more than one (the ledger records one digest per
|
|
24
|
+
* component), and one whose remaining steps read an output of a removed build
|
|
25
|
+
* step (it would resolve to nothing).
|
|
26
|
+
*
|
|
27
|
+
* A rollback (#2531) is the same run against one environment's own earlier
|
|
28
|
+
* release. There the publish step is replaced by the recorded digest rather
|
|
29
|
+
* than run, since the environment already received that artifact when the
|
|
30
|
+
* release was first deployed (see `withoutBuildSteps`'s `pinDigest`).
|
|
31
|
+
*
|
|
32
|
+
* The driver stays capability-agnostic. The two kind lists below are data, in
|
|
33
|
+
* the same spirit as `DEPLOY_UNIT_RULES` (./deploy-units.ts).
|
|
34
|
+
*/
|
|
35
|
+
import { type ReleaseRecord, type ReleaseRecordInput, type RunOrigin } from "../lifecycle/release-ledger.js";
|
|
36
|
+
import { CapabilityRegistry, type Capability } from "./capability.js";
|
|
37
|
+
import { type DriverComponent, type DriverComponentResult, type DriverRunResult } from "./driver.js";
|
|
38
|
+
import type { GateLedgerPort } from "../op/gate.js";
|
|
39
|
+
import type { RunProgressEvent } from "./run-progress.js";
|
|
40
|
+
/**
|
|
41
|
+
* Step kinds that produce an artifact at build time: the build family, and the
|
|
42
|
+
* SBOM steps that read the freshly built archive. A promote removes them.
|
|
43
|
+
*/
|
|
44
|
+
export declare const BUILD_STEP_KINDS: readonly string[];
|
|
45
|
+
/**
|
|
46
|
+
* The publish family (the same set COMP001 recognises, plus the
|
|
47
|
+
* `publish-asset` alias). Its output digest is the one a release record binds.
|
|
48
|
+
*/
|
|
49
|
+
export declare const PUBLISH_STEP_KINDS: readonly string[];
|
|
50
|
+
/** One component a promote will deploy, and the source release it deploys. */
|
|
51
|
+
export interface PromotionItem {
|
|
52
|
+
component: string;
|
|
53
|
+
/** The recorded digest being promoted. */
|
|
54
|
+
digest: string;
|
|
55
|
+
/** The source environment's release record the digest came from. */
|
|
56
|
+
source: ReleaseRecord;
|
|
57
|
+
}
|
|
58
|
+
/** What a promote will do, decided before anything runs. */
|
|
59
|
+
export interface PromotionPlan {
|
|
60
|
+
from: string;
|
|
61
|
+
to: string;
|
|
62
|
+
items: PromotionItem[];
|
|
63
|
+
/** Components left alone, and why. Reported, never an error. */
|
|
64
|
+
notPromoted: Array<{
|
|
65
|
+
component: string;
|
|
66
|
+
reason: string;
|
|
67
|
+
}>;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Pick one release of `component` out of an environment's records: the latest
|
|
71
|
+
* one, or, when `digest` is given, the latest one that recorded that digest.
|
|
72
|
+
* A digest the ledger never recorded for the component is an error.
|
|
73
|
+
*/
|
|
74
|
+
export declare function selectRelease(records: ReleaseRecord[], component: string, env: string, digest?: string): {
|
|
75
|
+
record: ReleaseRecord;
|
|
76
|
+
} | {
|
|
77
|
+
error: string;
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* Decide which releases a promote deploys. With `component`, exactly that
|
|
81
|
+
* component's latest source release (or the one recording `digest`). Without
|
|
82
|
+
* it, the latest source release of every component this checkout declares;
|
|
83
|
+
* a recorded component the checkout no longer declares is reported and left
|
|
84
|
+
* alone, since there is no composition to deploy it with.
|
|
85
|
+
*/
|
|
86
|
+
export declare function planPromotion(input: {
|
|
87
|
+
from: string;
|
|
88
|
+
to: string;
|
|
89
|
+
sourceRecords: ReleaseRecord[];
|
|
90
|
+
/** Names of the components this checkout declares. */
|
|
91
|
+
declared: string[];
|
|
92
|
+
component?: string;
|
|
93
|
+
digest?: string;
|
|
94
|
+
}): PromotionPlan | {
|
|
95
|
+
error: string;
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* Decide which release a rollback restores: the release of `component` in
|
|
99
|
+
* `env` given by `digest`, or by default the most recent release whose digest
|
|
100
|
+
* differs from the current one. Restoring the release already current is
|
|
101
|
+
* refused, since there is nothing to roll back.
|
|
102
|
+
*/
|
|
103
|
+
export declare function planRollback(input: {
|
|
104
|
+
env: string;
|
|
105
|
+
records: ReleaseRecord[];
|
|
106
|
+
declared: string[];
|
|
107
|
+
component: string;
|
|
108
|
+
digest?: string;
|
|
109
|
+
}): PromotionPlan | {
|
|
110
|
+
error: string;
|
|
111
|
+
};
|
|
112
|
+
/**
|
|
113
|
+
* The build steps that write the archive a promote's publish step reads, each
|
|
114
|
+
* to its `into` path. The SBOM steps are left out: a promote refuses a step
|
|
115
|
+
* that reads their output, so it never needs it.
|
|
116
|
+
*/
|
|
117
|
+
export declare const ARCHIVE_STEP_KINDS: readonly string[];
|
|
118
|
+
/**
|
|
119
|
+
* The paths `component`'s build steps write its archive to, in composition
|
|
120
|
+
* order without repeats (#2575). A generated pipeline carries these files from
|
|
121
|
+
* the job that deployed to the source environment to the job that promotes,
|
|
122
|
+
* since a promote publishes from the archive on disk. Throws when an `into` is
|
|
123
|
+
* not a literal path, such as a wiring reference or an `$env.` value, because
|
|
124
|
+
* a generator cannot name a file that is only known at run time.
|
|
125
|
+
*/
|
|
126
|
+
export declare function promoteArchivePaths(component: DriverComponent): string[];
|
|
127
|
+
/** A component's composition with its build-time steps taken out. */
|
|
128
|
+
export interface PromotableComponent {
|
|
129
|
+
component: DriverComponent;
|
|
130
|
+
/** The kinds removed, in composition order. */
|
|
131
|
+
removed: string[];
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* The step a rollback puts where the publish step was: it publishes nothing
|
|
135
|
+
* and returns the recorded digest, so `@Publish.digest` resolves to it.
|
|
136
|
+
*/
|
|
137
|
+
export declare const RECORDED_DIGEST_KIND = "recorded-digest";
|
|
138
|
+
/** The capability behind {@link RECORDED_DIGEST_KIND}. */
|
|
139
|
+
export declare const recordedDigestCapability: Capability<{
|
|
140
|
+
digest: string;
|
|
141
|
+
}, {
|
|
142
|
+
digest: string;
|
|
143
|
+
}>;
|
|
144
|
+
/**
|
|
145
|
+
* Remove every build-time step from `component`'s `deploy` composition and
|
|
146
|
+
* check that what is left can be pinned to one recorded digest. A phase left
|
|
147
|
+
* with nothing to run is dropped. `rollback` phases are untouched.
|
|
148
|
+
*
|
|
149
|
+
* With `pinDigest` (a rollback, #2531), the publish step is replaced too, by a
|
|
150
|
+
* {@link RECORDED_DIGEST_KIND} step carrying that digest: the environment
|
|
151
|
+
* already received the artifact when the release being restored was
|
|
152
|
+
* deployed, and the archive it came from is usually long gone. Only the
|
|
153
|
+
* digest is known then, so a step reading any other publish output (such as
|
|
154
|
+
* `@Publish.uri`) is refused.
|
|
155
|
+
*/
|
|
156
|
+
export declare function withoutBuildSteps(component: DriverComponent, opts?: {
|
|
157
|
+
pinDigest?: string;
|
|
158
|
+
}): PromotableComponent | {
|
|
159
|
+
error: string;
|
|
160
|
+
};
|
|
161
|
+
/**
|
|
162
|
+
* A registry whose publish-family capabilities check what they published
|
|
163
|
+
* against the digest being promoted for that component. A mismatch fails the
|
|
164
|
+
* step, which fails the component through the driver's ordinary path. Every
|
|
165
|
+
* other capability is passed through untouched, and the recorded-digest step a
|
|
166
|
+
* rollback's composition carries is added.
|
|
167
|
+
*/
|
|
168
|
+
export declare function checkPublishedDigest(registry: CapabilityRegistry, expected: ReadonlyMap<string, string>): CapabilityRegistry;
|
|
169
|
+
/** Options for {@link runPromotion}. */
|
|
170
|
+
export interface RunPromotionOptions {
|
|
171
|
+
plan: PromotionPlan;
|
|
172
|
+
/** The promotable compositions (see {@link withoutBuildSteps}), one per plan item. */
|
|
173
|
+
components: DriverComponent[];
|
|
174
|
+
registry: CapabilityRegistry;
|
|
175
|
+
componentOutputs?: Record<string, Record<string, unknown>>;
|
|
176
|
+
gates?: GateLedgerPort;
|
|
177
|
+
now?: string;
|
|
178
|
+
onProgress?: (event: RunProgressEvent) => void;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Deploy the plan's components to `plan.to`, in dependency order. A
|
|
182
|
+
* `dependsOn` edge to a component outside the promotion is dropped, the same
|
|
183
|
+
* way a single-component `chant run --components` runs without its
|
|
184
|
+
* dependencies; their outputs come from `componentOutputs`. Returns the
|
|
185
|
+
* driver's result for every outcome, including a failure.
|
|
186
|
+
*/
|
|
187
|
+
export declare function runPromotion(options: RunPromotionOptions): Promise<DriverRunResult>;
|
|
188
|
+
/** Who approved the last gate a component passed in this run, if any. */
|
|
189
|
+
export declare function gateApprover(result: DriverComponentResult | undefined): string | undefined;
|
|
190
|
+
/** What a promote or rollback knows about its own run, for the records it writes. */
|
|
191
|
+
export interface DeployRunInfo {
|
|
192
|
+
runId: string;
|
|
193
|
+
runOrigin?: RunOrigin;
|
|
194
|
+
actor: string;
|
|
195
|
+
timestamp: string;
|
|
196
|
+
approver?: string;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* The release record a successful promotion appends to the target ledger.
|
|
200
|
+
* The digest, git sha and archive identities are the source release's own,
|
|
201
|
+
* since the artifact is the one built there; `promotedFrom` names that
|
|
202
|
+
* release.
|
|
203
|
+
*/
|
|
204
|
+
export declare function promotionRecord(item: PromotionItem, to: string, run: DeployRunInfo): ReleaseRecordInput;
|
|
205
|
+
/**
|
|
206
|
+
* The release record a successful rollback appends. Like a promotion's, it
|
|
207
|
+
* carries the restored release's artifact identities; `restores` names that
|
|
208
|
+
* release.
|
|
209
|
+
*/
|
|
210
|
+
export declare function rollbackRecord(item: PromotionItem, env: string, run: DeployRunInfo): ReleaseRecordInput;
|
|
211
|
+
//# sourceMappingURL=promote.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promote.d.ts","sourceRoot":"","sources":["../../src/components/promote.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAGH,OAAO,EAAsB,KAAK,aAAa,EAAE,KAAK,kBAAkB,EAAE,KAAK,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAC9H,OAAO,EAAE,kBAAkB,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AACnE,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAG1B,KAAK,eAAe,EAErB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAAS,MAAM,EAM7C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,SAAS,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AC,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;CAChD;AAED;;;;;;GAMG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,eAAe,CAAC,CAmBzF;AAED,yEAAyE;AACzE,wBAAgB,YAAY,CAAC,MAAM,EAAE,qBAAqB,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAM1F;AAED,qFAAqF;AACrF,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAyBD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,aAAa,GAAG,kBAAkB,CAEvG;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,aAAa,GAAG,kBAAkB,CAEvG"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The warning a release ahead of environment- and plan-bound component gate
|
|
3
|
+
* approvals (chant #2574).
|
|
4
|
+
*
|
|
5
|
+
* A component gate approval is keyed by the component and the gate name only,
|
|
6
|
+
* so an approval given for one environment, or for one deploy, can pass the
|
|
7
|
+
* same gate later on another environment or on a promote or rollback. The
|
|
8
|
+
* next release binds each approval to the environment and the plan digest it
|
|
9
|
+
* was given for, the way Op gates bind a plan since #2300, and refuses an
|
|
10
|
+
* approval that records neither.
|
|
11
|
+
*
|
|
12
|
+
* This release only says so. When a component gate passes on an approval that
|
|
13
|
+
* records no plan, the driver prints one warning per component and gate, per
|
|
14
|
+
* process. The decision itself is unchanged.
|
|
15
|
+
*/
|
|
16
|
+
import type { GateResolutionRecord } from "../lifecycle/gate-ledger.js";
|
|
17
|
+
/** Forget which gates were warned about. For tests. */
|
|
18
|
+
export declare function resetUnboundGateApprovalWarnings(): void;
|
|
19
|
+
/**
|
|
20
|
+
* Warn once for `component`'s `gate` when the approval that just passed it in
|
|
21
|
+
* `env` records no plan. Returns whether a warning was printed.
|
|
22
|
+
*/
|
|
23
|
+
export declare function warnOnUnboundComponentApproval(component: string, gate: string, env: string, resolution: GateResolutionRecord): boolean;
|
|
24
|
+
//# sourceMappingURL=unbound-gate-approval.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unbound-gate-approval.d.ts","sourceRoot":"","sources":["../../src/components/unbound-gate-approval.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAMrE,uDAAuD;AACvD,wBAAgB,gCAAgC,IAAI,IAAI,CAEvD;AAED;;;GAGG;AACH,wBAAgB,8BAA8B,CAC5C,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,EACX,UAAU,EAAE,oBAAoB,GAC/B,OAAO,CAcT"}
|
package/dist/config.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import type { Severity } from "./components/verbs/vuln-scan.js";
|
|
|
6
6
|
import type { VulnPolicy } from "./components/verbs/vuln-gate.js";
|
|
7
7
|
import type { BuildParamsConfig } from "./build-params.js";
|
|
8
8
|
import type { BuildParamProvenance } from "./provenance.js";
|
|
9
|
+
import { type LexiconDeclaration } from "./lexicon-module.js";
|
|
9
10
|
/**
|
|
10
11
|
* One project-declared environment (chant #1166). Historically always a bare
|
|
11
12
|
* name (`"floci"`); an entry can now instead carry the endpoint that
|
|
@@ -74,7 +75,10 @@ export declare function matchesDeclaredEnvironment(environments: EnvironmentDecl
|
|
|
74
75
|
*/
|
|
75
76
|
export declare function environmentEndpoint(environments: EnvironmentDeclaration[] | undefined, name: string): string | undefined;
|
|
76
77
|
export declare const ChantConfigSchema: z.ZodObject<{
|
|
77
|
-
lexicons: z.ZodOptional<z.ZodArray<z.ZodString
|
|
78
|
+
lexicons: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
79
|
+
name: z.ZodString;
|
|
80
|
+
module: z.ZodString;
|
|
81
|
+
}, z.core.$strict>]>>>;
|
|
78
82
|
capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
79
83
|
environments: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
80
84
|
name: z.ZodString;
|
|
@@ -158,6 +162,8 @@ export declare const ChantConfigSchema: z.ZodObject<{
|
|
|
158
162
|
knowledge: z.ZodOptional<z.ZodObject<{
|
|
159
163
|
dir: z.ZodOptional<z.ZodString>;
|
|
160
164
|
}, z.core.$strip>>;
|
|
165
|
+
exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
166
|
+
include: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
161
167
|
}, z.core.$loose>;
|
|
162
168
|
/**
|
|
163
169
|
* Top-level chant project configuration.
|
|
@@ -165,8 +171,23 @@ export declare const ChantConfigSchema: z.ZodObject<{
|
|
|
165
171
|
* Loaded from `chant.config.ts` (preferred) or `chant.config.json`.
|
|
166
172
|
*/
|
|
167
173
|
export interface ChantConfig {
|
|
168
|
-
/**
|
|
169
|
-
|
|
174
|
+
/**
|
|
175
|
+
* Lexicons to load. A bare name (`"aws"`) loads the package
|
|
176
|
+
* `@intentius/chant-lexicon-aws`. `{ name, module }` (#2520) loads a
|
|
177
|
+
* project-local lexicon from a module path, resolved against the directory
|
|
178
|
+
* holding this config; see `./lexicon-module.ts`.
|
|
179
|
+
*
|
|
180
|
+
* Once loaded, this holds names only: the loader replaces each
|
|
181
|
+
* `{ name, module }` entry with its name and records the path in
|
|
182
|
+
* {@link ChantConfig.lexiconModules}.
|
|
183
|
+
*/
|
|
184
|
+
lexicons?: LexiconDeclaration[];
|
|
185
|
+
/**
|
|
186
|
+
* Set by the config loader, never written by hand: each path-declared
|
|
187
|
+
* lexicon's name mapped to its absolute module path. Absent when every
|
|
188
|
+
* `lexicons` entry is a bare name.
|
|
189
|
+
*/
|
|
190
|
+
lexiconModules?: Record<string, string>;
|
|
170
191
|
/**
|
|
171
192
|
* Capability plugin package names to load in addition to the built-in
|
|
172
193
|
* starter set (e.g. ["acme"] loads `@intentius/chant-capability-acme`),
|
|
@@ -380,20 +401,48 @@ export interface ChantConfig {
|
|
|
380
401
|
/** Bundle directory, relative to the project root. Defaults to `"knowledge"`. */
|
|
381
402
|
dir?: string;
|
|
382
403
|
};
|
|
404
|
+
/**
|
|
405
|
+
* Globs, relative to the directory holding this config, naming files that
|
|
406
|
+
* source discovery must skip (#2519): `build`, `lint`, `list`, `explain`
|
|
407
|
+
* and every other command that walks the project for declarations never
|
|
408
|
+
* import or lint a matching file. A pattern matches a file when it matches
|
|
409
|
+
* the file's path or the path of any directory above it, so `"ops"` and
|
|
410
|
+
* `"ops/**"` both skip everything under `ops/`. Matched with picomatch,
|
|
411
|
+
* dot files included. See `./discovery/files.ts`'s `compileDiscoveryFilter`.
|
|
412
|
+
*/
|
|
413
|
+
exclude?: string[];
|
|
414
|
+
/**
|
|
415
|
+
* Globs that re-admit files {@link exclude} would skip. `include` always
|
|
416
|
+
* wins over `exclude`, and it never narrows discovery on its own: a file
|
|
417
|
+
* no `exclude` pattern matches is discovered whether or not it matches an
|
|
418
|
+
* `include`. It does not re-admit what discovery skips unconditionally
|
|
419
|
+
* (`node_modules`, test files, child projects, the generated and skip
|
|
420
|
+
* markers).
|
|
421
|
+
*/
|
|
422
|
+
include?: string[];
|
|
383
423
|
}
|
|
384
424
|
/**
|
|
385
425
|
* Resolved project configuration with metadata about how it was loaded.
|
|
386
426
|
*/
|
|
427
|
+
/**
|
|
428
|
+
* A configuration as the loader returns it. `lexicons` holds names only: each
|
|
429
|
+
* `{ name, module }` entry has been replaced by its name and its path moved
|
|
430
|
+
* to `lexiconModules` (chant #2520), so a reader of a loaded config never
|
|
431
|
+
* sees the object form.
|
|
432
|
+
*/
|
|
433
|
+
export type LoadedChantConfig = Omit<ChantConfig, "lexicons"> & {
|
|
434
|
+
lexicons?: string[];
|
|
435
|
+
};
|
|
387
436
|
export interface ResolvedConfig {
|
|
388
437
|
/** The loaded configuration */
|
|
389
|
-
config:
|
|
438
|
+
config: LoadedChantConfig;
|
|
390
439
|
/** Path to the config file that was loaded, or undefined if defaults */
|
|
391
440
|
configPath?: string;
|
|
392
441
|
}
|
|
393
442
|
/**
|
|
394
443
|
* Default configuration when no config file exists.
|
|
395
444
|
*/
|
|
396
|
-
export declare const DEFAULT_CHANT_CONFIG:
|
|
445
|
+
export declare const DEFAULT_CHANT_CONFIG: LoadedChantConfig;
|
|
397
446
|
/**
|
|
398
447
|
* Load project configuration from a directory.
|
|
399
448
|
*
|
|
@@ -438,6 +487,26 @@ export declare function loadChantConfig(dir: string): Promise<ResolvedConfig>;
|
|
|
438
487
|
* config declaring any project-level key still wins where it stands.
|
|
439
488
|
*/
|
|
440
489
|
export declare function loadChantConfigUpward(startDir: string): Promise<ResolvedConfig>;
|
|
490
|
+
/** A project's discovery globs (#2519) and the directory they are relative to. */
|
|
491
|
+
export interface DiscoveryGlobs {
|
|
492
|
+
/** The directory holding the config that declared the globs. */
|
|
493
|
+
root: string;
|
|
494
|
+
exclude: string[];
|
|
495
|
+
include: string[];
|
|
496
|
+
}
|
|
497
|
+
/**
|
|
498
|
+
* The `exclude`/`include` globs of the project `startDir` belongs to, found by
|
|
499
|
+
* the same upward walk as {@link loadChantConfigUpward}. `undefined` when the
|
|
500
|
+
* project declares no `exclude`, which leaves discovery exactly as it was
|
|
501
|
+
* before the keys existed: `include` only ever re-admits what `exclude` skips.
|
|
502
|
+
*
|
|
503
|
+
* A config that fails to load is left to the command's own config load to
|
|
504
|
+
* report, so discovery keeps working where it did before, unless the failure
|
|
505
|
+
* is in `exclude` or `include` themselves: ignoring those would discover the
|
|
506
|
+
* very files the project asked to skip.
|
|
507
|
+
*/
|
|
508
|
+
export declare function resolveDiscoveryGlobs(startDir: string): Promise<DiscoveryGlobs | undefined>;
|
|
509
|
+
export declare function isLintOnlyFragment(configPath: string): boolean;
|
|
441
510
|
/** Whether an `ownership.env` entry is a build-parameter reference rather than a literal. */
|
|
442
511
|
export declare function isOwnershipParamRef(env: OwnershipEnv | undefined): env is {
|
|
443
512
|
param: string;
|
|
@@ -570,4 +639,12 @@ export declare function resolveVulnPolicy(config: ChantConfig): Partial<VulnPoli
|
|
|
570
639
|
* bundle rather than an error.
|
|
571
640
|
*/
|
|
572
641
|
export declare function resolveKnowledgeDir(config: ChantConfig, projectPath: string): string;
|
|
642
|
+
/**
|
|
643
|
+
* A config that failed schema validation. `key` is the top-level key of the
|
|
644
|
+
* first problem. `name` stays `"Error"`, so the printed error reads as before.
|
|
645
|
+
*/
|
|
646
|
+
export declare class InvalidChantConfigError extends Error {
|
|
647
|
+
readonly key?: string | undefined;
|
|
648
|
+
constructor(message: string, key?: string | undefined);
|
|
649
|
+
}
|
|
573
650
|
//# sourceMappingURL=config.d.ts.map
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAuB,KAAK,UAAU,EAAE,MAAM,mCAAmC,CAAC;AACzF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAA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which files chant reads: source discovery
|
|
5
|
+
* (`./files.ts`'s `findInfraFiles`, behind build, graph, list and explain),
|
|
6
|
+
* lint (`../cli/commands/lint.ts`), component discovery
|
|
7
|
+
* (`../components/discover.ts`), Op discovery (`../op/discover.ts`) and the
|
|
8
|
+
* audit walk (`../audit/discover.ts`). They disagree about dot-directories,
|
|
9
|
+
* git-ignored files, `dist` and child projects. The next release makes them
|
|
10
|
+
* agree:
|
|
11
|
+
*
|
|
12
|
+
* - dot-directories are skipped, except `.github` and `.forgejo` for audit;
|
|
13
|
+
* - git-ignored files are skipped, nested `.gitignore` files included, with
|
|
14
|
+
* ignore rules evaluated only for paths below the scan root;
|
|
15
|
+
* - `dist` is skipped;
|
|
16
|
+
* - when the scan root is inside a project, a child directory holding a
|
|
17
|
+
* project config is a boundary (a lint-only `chant.config.json` fragment is
|
|
18
|
+
* not one); when it is outside a project, every child project is read; Op
|
|
19
|
+
* discovery always stops at child projects below its root;
|
|
20
|
+
* - the source-root quirk goes: today source and component discovery read
|
|
21
|
+
* the first child project they meet as the project's own source and skip
|
|
22
|
+
* every later one.
|
|
23
|
+
*
|
|
24
|
+
* This release changes none of that. It runs after each walk, classifies the
|
|
25
|
+
* files the walk returned (and, where the next release reads more, the
|
|
26
|
+
* subtrees the walk skipped) under the converged rules, and prints one
|
|
27
|
+
* warning per affected group on stderr, naming the `include` or `exclude`
|
|
28
|
+
* glob (#2519) that keeps today's behaviour. The warning goes away only when
|
|
29
|
+
* that glob is in the project config.
|
|
30
|
+
*/
|
|
31
|
+
/** The walker a warning is about, which is also how the warning names it. */
|
|
32
|
+
export type DiscoveryWalker = "source" | "lint" | "components" | "ops" | "audit";
|
|
33
|
+
/** Why a file's status changes next release. */
|
|
34
|
+
type Cause = "dot-dir" | "dist" | "child-project" | "source-root" | "git-ignored" | "every-child" | "ignored-above-root";
|
|
35
|
+
interface Change {
|
|
36
|
+
file: string;
|
|
37
|
+
/** `skip`: read today, skipped next release. `read`: the reverse. */
|
|
38
|
+
kind: "skip" | "read";
|
|
39
|
+
cause: Cause;
|
|
40
|
+
/** The directory (or, for a lone ignored file, the file) the cause attaches to. */
|
|
41
|
+
anchor: string;
|
|
42
|
+
}
|
|
43
|
+
export interface DiscoveryWalkInput {
|
|
44
|
+
walker: DiscoveryWalker;
|
|
45
|
+
/** The directory the walk started from. */
|
|
46
|
+
root: string;
|
|
47
|
+
/** The files the walk returned, absolute. */
|
|
48
|
+
files: readonly string[];
|
|
49
|
+
/**
|
|
50
|
+
* Source and component discovery: the first child project the walk met,
|
|
51
|
+
* which it read as the project's own source.
|
|
52
|
+
*/
|
|
53
|
+
sourceRoot?: string | null;
|
|
54
|
+
/**
|
|
55
|
+
* Source and component discovery: the child projects the walk skipped
|
|
56
|
+
* because it had already met one. Read next release when the scan root is
|
|
57
|
+
* outside a project.
|
|
58
|
+
*/
|
|
59
|
+
skippedChildren?: readonly string[];
|
|
60
|
+
/** The walker's file filter, applied to what a skipped child holds. */
|
|
61
|
+
fileOk?: (name: string, fullPath: string) => boolean | Promise<boolean>;
|
|
62
|
+
/**
|
|
63
|
+
* Lint only: the files the walk found before its git-ignore filter dropped
|
|
64
|
+
* some, and the paths that filter reported ignored. The filter's call
|
|
65
|
+
* carries the scan root as an extra probe, so no second `git` call is made.
|
|
66
|
+
*/
|
|
67
|
+
lintIgnored?: {
|
|
68
|
+
raw: readonly string[];
|
|
69
|
+
ignored: ReadonlySet<string>;
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Paths `git check-ignore` reports ignored, in one batched call run from
|
|
74
|
+
* `cwd`. A path is reported exactly as given. A tree outside git, a missing
|
|
75
|
+
* `git`, or nothing ignored (exit 1) yields an empty set.
|
|
76
|
+
*/
|
|
77
|
+
export declare function gitIgnoredPaths(paths: readonly string[], cwd: string): Set<string>;
|
|
78
|
+
/** The probe for a directory in a `git check-ignore` batch: a trailing slash makes git match it as a directory. */
|
|
79
|
+
export declare function dirProbe(dir: string): string;
|
|
80
|
+
/**
|
|
81
|
+
* Classify a walk's files under the converged rules and return what changes.
|
|
82
|
+
* Exported for tests; {@link warnDiscoveryChanges} is the entry point.
|
|
83
|
+
*/
|
|
84
|
+
export declare function discoveryChanges(input: DiscoveryWalkInput): Promise<Change[]>;
|
|
85
|
+
/** Forget which warnings were printed. Tests only. */
|
|
86
|
+
export declare function resetDiscoveryWarnings(): void;
|
|
87
|
+
/**
|
|
88
|
+
* Print, on stderr, what the next release's converged walk will read
|
|
89
|
+
* differently from the walk just made (chant#2527). Each group names its
|
|
90
|
+
* files, what changes, and the `include` or `exclude` glob (#2519) that
|
|
91
|
+
* keeps today's behaviour; a group whose glob is already in the project
|
|
92
|
+
* config is not printed. Each warning prints once per process, however many
|
|
93
|
+
* times a command walks the same tree. Returns the lines printed.
|
|
94
|
+
*/
|
|
95
|
+
export declare function warnDiscoveryChanges(input: DiscoveryWalkInput): Promise<string[]>;
|
|
96
|
+
export {};
|
|
97
|
+
//# sourceMappingURL=convergence.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convergence.d.ts","sourceRoot":"","sources":["../../src/discovery/convergence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAUH,6EAA6E;AAC7E,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,MAAM,GAAG,YAAY,GAAG,KAAK,GAAG,OAAO,CAAC;AAUjF,gDAAgD;AAChD,KAAK,KAAK,GAAG,SAAS,GAAG,MAAM,GAAG,eAAe,GAAG,aAAa,GAAG,aAAa,GAAG,aAAa,GAAG,oBAAoB,CAAC;AAEzH,UAAU,MAAM;IACd,IAAI,EAAE,MAAM,CAAC;IACb,qEAAqE;IACrE,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB,KAAK,EAAE,KAAK,CAAC;IACb,mFAAmF;IACnF,MAAM,EAAE,MAAM,CAAC;CAChB;AAQD,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE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