@intentius/chant 0.80.0 → 0.81.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/discover.d.ts +8 -16
- package/dist/audit/discover.d.ts.map +1 -1
- package/dist/audit/report-html.d.ts +5 -0
- package/dist/audit/report-html.d.ts.map +1 -1
- package/dist/audit/report-model.d.ts +13 -0
- package/dist/audit/report-model.d.ts.map +1 -1
- package/dist/audit/terraform-state.d.ts +4 -5
- package/dist/audit/terraform-state.d.ts.map +1 -1
- package/dist/cli/commands/audit.d.ts +25 -9
- package/dist/cli/commands/audit.d.ts.map +1 -1
- package/dist/cli/commands/check-lexicon.d.ts +8 -0
- package/dist/cli/commands/check-lexicon.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.map +1 -1
- package/dist/cli/commands/lint.d.ts.map +1 -1
- package/dist/cli/commands/update.d.ts +6 -0
- package/dist/cli/commands/update.d.ts.map +1 -1
- package/dist/cli/commands/vendor.d.ts +5 -0
- package/dist/cli/commands/vendor.d.ts.map +1 -1
- package/dist/cli/handlers/build.d.ts.map +1 -1
- package/dist/cli/handlers/components.d.ts.map +1 -1
- package/dist/cli/handlers/dev.d.ts.map +1 -1
- package/dist/cli/handlers/fan-out.d.ts.map +1 -1
- package/dist/cli/handlers/init.d.ts.map +1 -1
- package/dist/cli/handlers/operator.d.ts +7 -0
- package/dist/cli/handlers/operator.d.ts.map +1 -1
- package/dist/cli/handlers/promote.d.ts +7 -4
- package/dist/cli/handlers/promote.d.ts.map +1 -1
- package/dist/cli/handlers/run-generate.d.ts.map +1 -1
- package/dist/cli/handlers/run.d.ts +4 -1
- package/dist/cli/handlers/run.d.ts.map +1 -1
- package/dist/cli/handlers/vendor.d.ts +8 -3
- package/dist/cli/handlers/vendor.d.ts.map +1 -1
- package/dist/cli/main.d.ts +12 -0
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/plugins.d.ts +12 -7
- package/dist/cli/plugins.d.ts.map +1 -1
- package/dist/cli/registry.d.ts +32 -0
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/codegen/fetch.d.ts +10 -0
- package/dist/codegen/fetch.d.ts.map +1 -1
- package/dist/components/cli-support.d.ts +3 -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 +16 -2
- package/dist/components/driver.d.ts.map +1 -1
- package/dist/components/gate-plan.d.ts +40 -0
- package/dist/components/gate-plan.d.ts.map +1 -0
- package/dist/components/promote.d.ts +60 -7
- package/dist/components/promote.d.ts.map +1 -1
- package/dist/components/sandbox/driver.d.ts.map +1 -1
- package/dist/components/sandbox/run.d.ts.map +1 -1
- package/dist/components/verbs/build-archive.d.ts +22 -11
- package/dist/components/verbs/build-archive.d.ts.map +1 -1
- package/dist/components/verbs/run-agent.d.ts.map +1 -1
- package/dist/config-static.d.ts +59 -0
- package/dist/config-static.d.ts.map +1 -0
- package/dist/config.d.ts +32 -10
- package/dist/config.d.ts.map +1 -1
- package/dist/content-digest.d.ts +17 -0
- package/dist/content-digest.d.ts.map +1 -0
- package/dist/discovery/files.d.ts +10 -5
- package/dist/discovery/files.d.ts.map +1 -1
- package/dist/discovery/fold-import.d.ts +20 -4
- package/dist/discovery/fold-import.d.ts.map +1 -1
- package/dist/discovery/index.d.ts.map +1 -1
- package/dist/discovery/sandbox/driver.d.ts +20 -0
- package/dist/discovery/sandbox/driver.d.ts.map +1 -1
- package/dist/discovery/sandbox/fork.d.ts +20 -0
- package/dist/discovery/sandbox/fork.d.ts.map +1 -1
- package/dist/discovery/walk.d.ts +119 -0
- package/dist/discovery/walk.d.ts.map +1 -0
- package/dist/graph-ir.d.ts +4 -1
- package/dist/graph-ir.d.ts.map +1 -1
- package/dist/join-key.d.ts +31 -0
- package/dist/join-key.d.ts.map +1 -0
- package/dist/lexicon-module.d.ts +51 -6
- package/dist/lexicon-module.d.ts.map +1 -1
- package/dist/lexicon.d.ts +58 -1
- package/dist/lexicon.d.ts.map +1 -1
- package/dist/lifecycle/build-ledger-store.d.ts.map +1 -1
- package/dist/lifecycle/digest.d.ts +5 -1
- package/dist/lifecycle/digest.d.ts.map +1 -1
- package/dist/lifecycle/gate-ledger.d.ts +20 -5
- package/dist/lifecycle/gate-ledger.d.ts.map +1 -1
- package/dist/lifecycle/git.d.ts +64 -0
- package/dist/lifecycle/git.d.ts.map +1 -1
- package/dist/lifecycle/lease.d.ts +8 -1
- package/dist/lifecycle/lease.d.ts.map +1 -1
- package/dist/lifecycle/legacy-digest.d.ts +41 -8
- package/dist/lifecycle/legacy-digest.d.ts.map +1 -1
- package/dist/lifecycle/member-ledger.d.ts +67 -0
- package/dist/lifecycle/member-ledger.d.ts.map +1 -0
- package/dist/lifecycle/plan-digest.d.ts +4 -3
- package/dist/lifecycle/plan-digest.d.ts.map +1 -1
- package/dist/lifecycle/release-ledger.d.ts +18 -2
- package/dist/lifecycle/release-ledger.d.ts.map +1 -1
- package/dist/lifecycle/status.d.ts +90 -5
- package/dist/lifecycle/status.d.ts.map +1 -1
- package/dist/op/activities/activity-contracts.d.ts +32 -0
- package/dist/op/activities/activity-contracts.d.ts.map +1 -1
- package/dist/op/activities/index.d.ts +2 -0
- package/dist/op/activities/index.d.ts.map +1 -1
- package/dist/op/activities/propose-upgrade.d.ts +75 -0
- package/dist/op/activities/propose-upgrade.d.ts.map +1 -0
- package/dist/op/discover.d.ts.map +1 -1
- package/dist/op/gate-name.d.ts +7 -0
- package/dist/op/gate-name.d.ts.map +1 -1
- package/dist/op/gate-summary.d.ts +16 -0
- package/dist/op/gate-summary.d.ts.map +1 -1
- package/dist/op/gate.d.ts +16 -2
- package/dist/op/gate.d.ts.map +1 -1
- package/dist/project-root.d.ts +26 -0
- package/dist/project-root.d.ts.map +1 -1
- package/dist/workspace/__fixtures__/contract-repo.d.ts +37 -0
- package/dist/workspace/__fixtures__/contract-repo.d.ts.map +1 -0
- package/dist/workspace/__fixtures__/two-member-workspace.d.ts +11 -0
- package/dist/workspace/__fixtures__/two-member-workspace.d.ts.map +1 -0
- package/dist/workspace/checks/generated.d.ts +156 -0
- package/dist/workspace/checks/generated.d.ts.map +1 -0
- package/dist/workspace/checks/ledgers.d.ts +78 -0
- package/dist/workspace/checks/ledgers.d.ts.map +1 -0
- package/dist/workspace/checks/links.d.ts +25 -0
- package/dist/workspace/checks/links.d.ts.map +1 -0
- package/dist/workspace/checks/pipelines.d.ts +76 -0
- package/dist/workspace/checks/pipelines.d.ts.map +1 -0
- package/dist/workspace/checks.d.ts +161 -0
- package/dist/workspace/checks.d.ts.map +1 -0
- package/dist/workspace/compose-graph.d.ts +115 -0
- package/dist/workspace/compose-graph.d.ts.map +1 -0
- package/dist/workspace/compose-reports.d.ts +68 -0
- package/dist/workspace/compose-reports.d.ts.map +1 -0
- package/dist/workspace/declaration.d.ts +220 -0
- package/dist/workspace/declaration.d.ts.map +1 -0
- package/dist/workspace/declaration.schema.json +434 -0
- package/dist/workspace/generated-files.d.ts +65 -0
- package/dist/workspace/generated-files.d.ts.map +1 -0
- package/dist/workspace/glob.d.ts +13 -0
- package/dist/workspace/glob.d.ts.map +1 -0
- package/dist/workspace/graph-cli.d.ts +75 -0
- package/dist/workspace/graph-cli.d.ts.map +1 -0
- package/dist/workspace/init.d.ts +96 -0
- package/dist/workspace/init.d.ts.map +1 -0
- package/dist/workspace/jsonc.d.ts +38 -0
- package/dist/workspace/jsonc.d.ts.map +1 -0
- package/dist/workspace/kinds.d.ts +192 -0
- package/dist/workspace/kinds.d.ts.map +1 -0
- package/dist/workspace/lineage-check.d.ts +84 -0
- package/dist/workspace/lineage-check.d.ts.map +1 -0
- package/dist/workspace/lineage-cli.d.ts +31 -0
- package/dist/workspace/lineage-cli.d.ts.map +1 -0
- package/dist/workspace/lineage-init.d.ts +101 -0
- package/dist/workspace/lineage-init.d.ts.map +1 -0
- package/dist/workspace/lineage-lock.d.ts +258 -0
- package/dist/workspace/lineage-lock.d.ts.map +1 -0
- package/dist/workspace/lineage-merge.d.ts +14 -0
- package/dist/workspace/lineage-merge.d.ts.map +1 -0
- package/dist/workspace/lineage-migrations.d.ts +178 -0
- package/dist/workspace/lineage-migrations.d.ts.map +1 -0
- package/dist/workspace/lineage-update.d.ts +59 -0
- package/dist/workspace/lineage-update.d.ts.map +1 -0
- package/dist/workspace/lineage-upgrade-cli.d.ts +40 -0
- package/dist/workspace/lineage-upgrade-cli.d.ts.map +1 -0
- package/dist/workspace/lineage-upgrade.d.ts +146 -0
- package/dist/workspace/lineage-upgrade.d.ts.map +1 -0
- package/dist/workspace/lineage-vendor.d.ts +63 -0
- package/dist/workspace/lineage-vendor.d.ts.map +1 -0
- package/dist/workspace/lineage-version.d.ts +32 -0
- package/dist/workspace/lineage-version.d.ts.map +1 -0
- package/dist/workspace/links.d.ts +150 -0
- package/dist/workspace/links.d.ts.map +1 -0
- package/dist/workspace/ls.d.ts +99 -0
- package/dist/workspace/ls.d.ts.map +1 -0
- package/dist/workspace/member-commands.d.ts +139 -0
- package/dist/workspace/member-commands.d.ts.map +1 -0
- package/dist/workspace/member-handles.d.ts +54 -0
- package/dist/workspace/member-handles.d.ts.map +1 -0
- package/dist/workspace/member-pipeline.d.ts +143 -0
- package/dist/workspace/member-pipeline.d.ts.map +1 -0
- package/dist/workspace/member-run.d.ts +67 -0
- package/dist/workspace/member-run.d.ts.map +1 -0
- package/dist/workspace/reason-codes.d.ts +65 -0
- package/dist/workspace/reason-codes.d.ts.map +1 -0
- package/dist/workspace/records-cli.d.ts +28 -4
- package/dist/workspace/records-cli.d.ts.map +1 -1
- package/dist/workspace/records.d.ts.map +1 -1
- package/dist/workspace/root-refusal.d.ts +53 -0
- package/dist/workspace/root-refusal.d.ts.map +1 -0
- package/dist/workspace/status.d.ts +150 -0
- package/dist/workspace/status.d.ts.map +1 -0
- package/dist/workspace/template-manifest.d.ts +90 -0
- package/dist/workspace/template-manifest.d.ts.map +1 -0
- package/dist/workspace/tree.d.ts +36 -0
- package/dist/workspace/tree.d.ts.map +1 -0
- package/dist/workspace/trust/attestor.d.ts +67 -0
- package/dist/workspace/trust/attestor.d.ts.map +1 -0
- package/dist/workspace/trust/policy.d.ts +111 -0
- package/dist/workspace/trust/policy.d.ts.map +1 -0
- package/dist/workspace/trust/provenance.d.ts +67 -0
- package/dist/workspace/trust/provenance.d.ts.map +1 -0
- package/dist/workspace/trust/ssh-commit.d.ts +43 -0
- package/dist/workspace/trust/ssh-commit.d.ts.map +1 -0
- package/dist/workspace/trust/test-repo.d.ts +42 -0
- package/dist/workspace/trust/test-repo.d.ts.map +1 -0
- package/dist/workspace/trust/verify-cli.d.ts +9 -0
- package/dist/workspace/trust/verify-cli.d.ts.map +1 -0
- package/dist/workspace/trust/verify.d.ts +66 -0
- package/dist/workspace/trust/verify.d.ts.map +1 -0
- package/dist/workspace/which-chant.d.ts +58 -0
- package/dist/workspace/which-chant.d.ts.map +1 -0
- package/dist/workspace/workspace-kinds.schema.json +133 -0
- package/package.json +2 -1
- package/src/audit/discover.ts +66 -78
- package/src/audit/report-html.ts +3 -1
- package/src/audit/report-model.ts +14 -1
- package/src/audit/terraform-state.test.ts +4 -9
- package/src/audit/terraform-state.ts +4 -5
- package/src/cli/commands/audit-truncation.test.ts +167 -0
- package/src/cli/commands/audit.ts +89 -60
- package/src/cli/commands/check-lexicon.ts +24 -0
- package/src/cli/commands/doctor.test.ts +30 -0
- package/src/cli/commands/doctor.ts +18 -0
- package/src/cli/commands/import-agents.ts +6 -2
- package/src/cli/commands/init.ts +22 -3
- package/src/cli/commands/lint.test.ts +17 -23
- package/src/cli/commands/lint.ts +24 -84
- package/src/cli/commands/update.ts +13 -4
- package/src/cli/commands/vendor.ts +11 -6
- package/src/cli/handlers/__snapshots__/build-member.test.ts.snap +38 -0
- package/src/cli/handlers/build-member.test.ts +127 -0
- package/src/cli/handlers/build.ts +35 -1
- package/src/cli/handlers/components.test.ts +127 -0
- package/src/cli/handlers/components.ts +70 -8
- package/src/cli/handlers/dev.ts +5 -3
- package/src/cli/handlers/fan-out.ts +9 -2
- package/src/cli/handlers/init.ts +54 -1
- package/src/cli/handlers/operator.test.ts +68 -0
- package/src/cli/handlers/operator.ts +37 -9
- package/src/cli/handlers/promote.test.ts +118 -2
- package/src/cli/handlers/promote.ts +82 -16
- package/src/cli/handlers/run-generate-member.test.ts +83 -0
- package/src/cli/handlers/run-generate.test.ts +6 -8
- package/src/cli/handlers/run-generate.ts +36 -1
- package/src/cli/handlers/run.test.ts +47 -0
- package/src/cli/handlers/run.ts +28 -5
- package/src/cli/handlers/vendor.ts +147 -43
- package/src/cli/main.test.ts +105 -1
- package/src/cli/main.ts +230 -17
- package/src/cli/plugins.ts +17 -17
- package/src/cli/registry.ts +32 -0
- package/src/cli/static-config-read.test.ts +208 -0
- package/src/codegen/fetch.test.ts +63 -1
- package/src/codegen/fetch.ts +30 -1
- package/src/components/cli-support.ts +6 -1
- package/src/components/discover.test.ts +27 -57
- package/src/components/discover.ts +13 -68
- package/src/components/driver.test.ts +78 -1
- package/src/components/driver.ts +43 -7
- package/src/components/gate-plan.ts +53 -0
- package/src/components/promote.test.ts +276 -2
- package/src/components/promote.ts +119 -15
- package/src/components/sandbox/driver.ts +8 -8
- package/src/components/sandbox/run.ts +4 -1
- package/src/components/verbs/build-archive.ts +27 -21
- package/src/components/verbs/run-agent.ts +3 -5
- package/src/config-static.test.ts +136 -0
- package/src/config-static.ts +232 -0
- package/src/config.test.ts +2 -2
- package/src/config.ts +48 -15
- package/src/content-digest.test.ts +120 -0
- package/src/content-digest.ts +21 -0
- package/src/discovery/files.test.ts +10 -10
- package/src/discovery/files.ts +25 -81
- package/src/discovery/fold-import.ts +49 -5
- package/src/discovery/index.ts +1 -0
- package/src/discovery/sandbox/driver.ts +73 -35
- package/src/discovery/sandbox/fork-diagnostic.test.ts +136 -13
- package/src/discovery/sandbox/fork.ts +83 -43
- package/src/discovery/sandbox/path-lexicon-multifile.test.ts +285 -0
- package/src/discovery/walk.test.ts +263 -0
- package/src/discovery/walk.ts +334 -0
- package/src/effect-receipt.ts +2 -2
- package/src/graph-ir.ts +4 -1
- package/src/join-key.test.ts +25 -0
- package/src/join-key.ts +39 -0
- package/src/lexicon-module.ts +108 -10
- package/src/lexicon.ts +79 -1
- package/src/lifecycle/build-ledger-store.ts +11 -10
- package/src/lifecycle/digest.ts +9 -5
- package/src/lifecycle/gate-ledger.test.ts +20 -0
- package/src/lifecycle/gate-ledger.ts +28 -6
- package/src/lifecycle/git.test.ts +13 -1
- package/src/lifecycle/git.ts +221 -176
- package/src/lifecycle/lease.ts +25 -10
- package/src/lifecycle/legacy-digest.test.ts +115 -23
- package/src/lifecycle/legacy-digest.ts +60 -19
- package/src/lifecycle/member-ledger.test.ts +319 -0
- package/src/lifecycle/member-ledger.ts +145 -0
- package/src/lifecycle/plan-digest.ts +7 -7
- package/src/lifecycle/release-ledger.test.ts +20 -0
- package/src/lifecycle/release-ledger.ts +23 -7
- package/src/lifecycle/status.test.ts +151 -1
- package/src/lifecycle/status.ts +228 -7
- package/src/op/activities/activity-contracts.ts +37 -0
- package/src/op/activities/index.ts +10 -0
- package/src/op/activities/propose-upgrade.ts +206 -0
- package/src/op/discover.test.ts +14 -4
- package/src/op/discover.ts +19 -27
- package/src/op/gate-name.ts +8 -0
- package/src/op/gate-summary.test.ts +14 -0
- package/src/op/gate-summary.ts +25 -2
- package/src/op/gate.ts +36 -7
- package/src/op/generate-pipeline.test.ts +14 -5
- package/src/project-root.test.ts +66 -1
- package/src/project-root.ts +48 -0
- package/src/workspace/__fixtures__/contract-repo.ts +100 -0
- package/src/workspace/__fixtures__/two-member-workspace.ts +35 -0
- package/src/workspace/behold-kinds.test.ts +162 -0
- package/src/workspace/check-contract.test.ts +127 -0
- package/src/workspace/check.schema.json +347 -0
- package/src/workspace/checks/generated.test.ts +287 -0
- package/src/workspace/checks/generated.ts +475 -0
- package/src/workspace/checks/ledgers.test.ts +139 -0
- package/src/workspace/checks/ledgers.ts +246 -0
- package/src/workspace/checks/links.ts +183 -0
- package/src/workspace/checks/pipelines.test.ts +133 -0
- package/src/workspace/checks/pipelines.ts +225 -0
- package/src/workspace/checks-repo.test.ts +71 -0
- package/src/workspace/checks.test.ts +450 -0
- package/src/workspace/checks.ts +461 -0
- package/src/workspace/compose-graph.test.ts +146 -0
- package/src/workspace/compose-graph.ts +228 -0
- package/src/workspace/compose-reports.test.ts +109 -0
- package/src/workspace/compose-reports.ts +186 -0
- package/src/workspace/declaration.schema.json +434 -0
- package/src/workspace/declaration.test.ts +347 -0
- package/src/workspace/declaration.ts +623 -0
- package/src/workspace/generated-files.test.ts +114 -0
- package/src/workspace/generated-files.ts +94 -0
- package/src/workspace/glob.ts +49 -0
- package/src/workspace/graph-cli.ts +220 -0
- package/src/workspace/graph-contract.test.ts +204 -0
- package/src/workspace/graph.schema.json +662 -0
- package/src/workspace/init.test.ts +223 -0
- package/src/workspace/init.ts +585 -0
- package/src/workspace/jsonc.test.ts +65 -0
- package/src/workspace/jsonc.ts +231 -0
- package/src/workspace/kinds.test.ts +288 -0
- package/src/workspace/kinds.ts +506 -0
- package/src/workspace/lineage-check.ts +264 -0
- package/src/workspace/lineage-cli.ts +114 -0
- package/src/workspace/lineage-init.test.ts +231 -0
- package/src/workspace/lineage-init.ts +365 -0
- package/src/workspace/lineage-lock.test.ts +224 -0
- package/src/workspace/lineage-lock.ts +357 -0
- package/src/workspace/lineage-merge.ts +44 -0
- package/src/workspace/lineage-migrations.test.ts +178 -0
- package/src/workspace/lineage-migrations.ts +343 -0
- package/src/workspace/lineage-update.ts +160 -0
- package/src/workspace/lineage-upgrade-cli.ts +151 -0
- package/src/workspace/lineage-upgrade.test.ts +474 -0
- package/src/workspace/lineage-upgrade.ts +624 -0
- package/src/workspace/lineage-vendor.test.ts +126 -0
- package/src/workspace/lineage-vendor.ts +215 -0
- package/src/workspace/lineage-version.ts +127 -0
- package/src/workspace/links.test.ts +344 -0
- package/src/workspace/links.ts +331 -0
- package/src/workspace/ls-contract.test.ts +200 -0
- package/src/workspace/ls.schema.json +190 -0
- package/src/workspace/ls.ts +254 -0
- package/src/workspace/member-commands.e2e.test.ts +244 -0
- package/src/workspace/member-commands.test.ts +217 -0
- package/src/workspace/member-commands.ts +540 -0
- package/src/workspace/member-handles.test.ts +76 -0
- package/src/workspace/member-handles.ts +228 -0
- package/src/workspace/member-pipeline.test.ts +135 -0
- package/src/workspace/member-pipeline.ts +317 -0
- package/src/workspace/member-run.ts +146 -0
- package/src/workspace/read-contract.test.ts +129 -0
- package/src/workspace/reason-codes.test.ts +113 -0
- package/src/workspace/reason-codes.ts +81 -0
- package/src/workspace/records-cli.ts +86 -14
- package/src/workspace/records-contract.test.ts +5 -0
- package/src/workspace/records.schema.json +32 -2
- package/src/workspace/records.ts +3 -2
- package/src/workspace/root-refusal.ts +97 -0
- package/src/workspace/status-contract.test.ts +308 -0
- package/src/workspace/status.schema.json +210 -0
- package/src/workspace/status.ts +412 -0
- package/src/workspace/template-manifest.test.ts +79 -0
- package/src/workspace/template-manifest.ts +221 -0
- package/src/workspace/tree.ts +132 -0
- package/src/workspace/trust/attestor.ts +93 -0
- package/src/workspace/trust/policy.ts +306 -0
- package/src/workspace/trust/provenance.ts +181 -0
- package/src/workspace/trust/ssh-commit.ts +138 -0
- package/src/workspace/trust/test-repo.ts +138 -0
- package/src/workspace/trust/trust.test.ts +397 -0
- package/src/workspace/trust/verify-cli.ts +56 -0
- package/src/workspace/trust/verify.ts +194 -0
- package/src/workspace/which-chant.test.ts +117 -0
- package/src/workspace/which-chant.ts +151 -0
- package/src/workspace/workspace-kinds.schema.json +133 -0
- package/dist/components/unbound-gate-approval.d.ts +0 -24
- package/dist/components/unbound-gate-approval.d.ts.map +0 -1
- package/dist/discovery/convergence.d.ts +0 -97
- package/dist/discovery/convergence.d.ts.map +0 -1
- package/src/cli/commands/audit-walk-warnings.test.ts +0 -156
- package/src/components/unbound-gate-approval.test.ts +0 -82
- package/src/components/unbound-gate-approval.ts +0 -51
- package/src/discovery/convergence.test.ts +0 -231
- package/src/discovery/convergence.ts +0 -399
- package/src/op/discover-convergence.test.ts +0 -70
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The composed workspace IR that `chant workspace graph` prints (#2537, #2524
|
|
3
|
+
* D8, ws-009, ws-018, ws-022).
|
|
4
|
+
*
|
|
5
|
+
* Each member is read through its own `chant graph --format ir`, under its
|
|
6
|
+
* own toolchain. This module takes those documents and composes them:
|
|
7
|
+
*
|
|
8
|
+
* - Every node id becomes `<member>/<id>`. Member names can't hold `/`, and
|
|
9
|
+
* `::` keeps its meaning for stacks inside a member (`app/web::Bucket`).
|
|
10
|
+
* Edge ends, `$ref` values in attributes, `compositeInstance`,
|
|
11
|
+
* `runtimeOwner` and export and import nodes are rewritten the same way.
|
|
12
|
+
* - `groups.byMember` maps each member to its node ids. `byLexicon` and
|
|
13
|
+
* `byComposite` keep their keys (a lexicon or composite type is the same
|
|
14
|
+
* thing in every member) and merge the ids. `byStack`, `byContainer` and
|
|
15
|
+
* `byWave` name things inside one member, so their keys are prefixed too.
|
|
16
|
+
* - `links` holds the member links (#2524 D6, #2539): the declared links and
|
|
17
|
+
* the joins inferred from members' `imports` and `exports` with the core
|
|
18
|
+
* `joinKey()`, labelled `exact` or `folded` (`./links.ts`). A declared link
|
|
19
|
+
* suppresses the inferred edge it covers. `records` is the section record
|
|
20
|
+
* kinds fill (#2524 D4), empty so far.
|
|
21
|
+
*
|
|
22
|
+
* A member's IR with no `version` field comes from a chant older than #2529.
|
|
23
|
+
* It is version 1, and it is upgraded in place by stamping that version. An IR
|
|
24
|
+
* newer than {@link GRAPH_IR_VERSION} can't be read safely, so that member is
|
|
25
|
+
* listed with a reason code and left out, like any other member that can't be
|
|
26
|
+
* read (#2524 D15).
|
|
27
|
+
*
|
|
28
|
+
* `chant graph` itself is untouched: this is the only place members compose.
|
|
29
|
+
*/
|
|
30
|
+
import type { Declaration } from "./declaration.js";
|
|
31
|
+
import type { KindRegistry } from "./kinds.js";
|
|
32
|
+
import { type LinkTableRow } from "./links.js";
|
|
33
|
+
import { type GraphIR, type IRExport, type IRGroups, type IRImport, type IREdge, type IRNode } from "../graph-ir.js";
|
|
34
|
+
/** The version of the composed document `chant workspace graph` writes. */
|
|
35
|
+
export declare const WORKSPACE_GRAPH_VERSION = 1;
|
|
36
|
+
/**
|
|
37
|
+
* Why a member is missing from the composed graph, or from any per-member
|
|
38
|
+
* run. Closed, like the `ls` reason codes: a new code is a contract change.
|
|
39
|
+
*/
|
|
40
|
+
export declare const MEMBER_RUN_REASON_CODES: readonly ["kind-not-run", "dir-missing", "unknown-kind", "kind-probe-failed", "command-failed", "output-unreadable", "ir-version-unsupported"];
|
|
41
|
+
export type MemberRunReasonCode = (typeof MEMBER_RUN_REASON_CODES)[number];
|
|
42
|
+
export interface MemberReason {
|
|
43
|
+
code: MemberRunReasonCode;
|
|
44
|
+
message: string;
|
|
45
|
+
}
|
|
46
|
+
export interface ComposedMember {
|
|
47
|
+
name: string;
|
|
48
|
+
dir: string;
|
|
49
|
+
kind: string;
|
|
50
|
+
status: "composed" | "skipped" | "failed";
|
|
51
|
+
reason: MemberReason | null;
|
|
52
|
+
/** The chant version that read the member, when its toolchain said. */
|
|
53
|
+
chant: string | null;
|
|
54
|
+
/** The IR version the member printed; `null` when it printed none and was upgraded as version 1. */
|
|
55
|
+
irVersion: number | null;
|
|
56
|
+
/** Whole-read facts the member's IR carried (`meta`, `pipeline`), kept apart from the composed sections. */
|
|
57
|
+
meta?: Record<string, unknown>;
|
|
58
|
+
pipeline?: unknown;
|
|
59
|
+
}
|
|
60
|
+
export type ComposedNode = IRNode & {
|
|
61
|
+
member: string;
|
|
62
|
+
};
|
|
63
|
+
export type ComposedEdge = IREdge & {
|
|
64
|
+
member: string;
|
|
65
|
+
};
|
|
66
|
+
export interface WorkspaceGraph {
|
|
67
|
+
version: number;
|
|
68
|
+
workspace: {
|
|
69
|
+
name: string;
|
|
70
|
+
root: string;
|
|
71
|
+
};
|
|
72
|
+
members: ComposedMember[];
|
|
73
|
+
nodes: ComposedNode[];
|
|
74
|
+
edges: ComposedEdge[];
|
|
75
|
+
groups: IRGroups & {
|
|
76
|
+
byMember: Record<string, string[]>;
|
|
77
|
+
};
|
|
78
|
+
exports: (IRExport & {
|
|
79
|
+
member: string;
|
|
80
|
+
})[];
|
|
81
|
+
imports: (IRImport & {
|
|
82
|
+
member: string;
|
|
83
|
+
})[];
|
|
84
|
+
derivedAttrs?: Record<string, string[]>;
|
|
85
|
+
/** Member links (#2524 D6, #2539), declared and inferred. Empty when no declaration is given. */
|
|
86
|
+
links: LinkTableRow[];
|
|
87
|
+
/** Record sections (#2524 D4). Empty until record kinds join the graph. */
|
|
88
|
+
records: unknown[];
|
|
89
|
+
}
|
|
90
|
+
/** Read one member's `chant graph --format ir` output, upgrading an unversioned (v1) IR in place. */
|
|
91
|
+
export declare function readMemberIr(text: string): {
|
|
92
|
+
ir: GraphIR;
|
|
93
|
+
irVersion: number | null;
|
|
94
|
+
} | {
|
|
95
|
+
reason: MemberReason;
|
|
96
|
+
};
|
|
97
|
+
export interface ComposeInput {
|
|
98
|
+
member: ComposedMember;
|
|
99
|
+
/** Present for a member whose IR was read. */
|
|
100
|
+
ir?: GraphIR;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Compose the members' IRs into the workspace document. Members keep the
|
|
104
|
+
* order they are given in. With `links`, the `links` section is filled from
|
|
105
|
+
* the declaration; `kinds` lets a member that isn't composed but whose kind
|
|
106
|
+
* lists its outputs (`other`, kinds from a package) be a link target.
|
|
107
|
+
*/
|
|
108
|
+
export declare function composeWorkspaceGraph(workspace: {
|
|
109
|
+
name: string;
|
|
110
|
+
root: string;
|
|
111
|
+
}, inputs: ComposeInput[], links?: {
|
|
112
|
+
declaration: Declaration;
|
|
113
|
+
kinds?: KindRegistry;
|
|
114
|
+
}): WorkspaceGraph;
|
|
115
|
+
//# sourceMapping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gB,qBAAqB,CACnC,SAAS,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EACzC,MAAM,EAAE,YAAY,EAAE,EACtB,KAAK,CAAC,EAAE;IAAE,WAAW,EAAE,WAAW,CAAC;IAAC,KAAK,CAAC,EAAE,YAAY,CAAA;CAAE,GACzD,cAAc,CA8DhB"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Merging per-member lint and audit output (#2537, #2524 D16, ws-025, ws-026).
|
|
3
|
+
*
|
|
4
|
+
* `chant workspace lint --format sarif` prints one SARIF log with one run per
|
|
5
|
+
* member, each run being what that member's own `chant lint --format sarif`
|
|
6
|
+
* printed. `chant workspace audit --format json` prints one document whose
|
|
7
|
+
* findings each carry a `member` field. Both keep what the member's chant
|
|
8
|
+
* said and only add where it came from.
|
|
9
|
+
*/
|
|
10
|
+
/** One member's output, as the merge sees it. */
|
|
11
|
+
export interface MemberOutput {
|
|
12
|
+
/** The member's name, or `<group>:<dir>` for an example-group match. */
|
|
13
|
+
id: string;
|
|
14
|
+
/** The member or group name. */
|
|
15
|
+
member: string;
|
|
16
|
+
/** Relative to the workspace root, `"."` for the root member. */
|
|
17
|
+
dir: string;
|
|
18
|
+
exitCode: number;
|
|
19
|
+
stdout: string;
|
|
20
|
+
stderr: string;
|
|
21
|
+
/**
|
|
22
|
+
* Directories (relative to the member) that belong to other members. Set
|
|
23
|
+
* for member `.`: its audit walks the whole root, and findings in these
|
|
24
|
+
* directories are reported by the members they belong to.
|
|
25
|
+
*/
|
|
26
|
+
exclude?: string[];
|
|
27
|
+
}
|
|
28
|
+
type Json = Record<string, unknown>;
|
|
29
|
+
/**
|
|
30
|
+
* One SARIF log with one run per member. A member's own log normally holds
|
|
31
|
+
* one run; if it holds more, their results are folded into the first so the
|
|
32
|
+
* member still has exactly one. Artifact URIs become relative to the
|
|
33
|
+
* workspace root, and each run's `automationDetails.id` is `<member>/`, the
|
|
34
|
+
* SARIF way to tell runs of one tool apart.
|
|
35
|
+
*/
|
|
36
|
+
export declare function mergeSarif(units: MemberOutput[], root: string): Json;
|
|
37
|
+
export interface MemberAuditStatus {
|
|
38
|
+
member: string;
|
|
39
|
+
dir: string;
|
|
40
|
+
exitCode: number;
|
|
41
|
+
status: "ok" | "no-lexicons" | "failed";
|
|
42
|
+
summary: Json | null;
|
|
43
|
+
error: string | null;
|
|
44
|
+
/** What the member's audit printed instead of a report when it had nothing to audit. */
|
|
45
|
+
note?: string;
|
|
46
|
+
/** Findings dropped from member `.` because they sit in another member's directory. */
|
|
47
|
+
leftToMembers?: number;
|
|
48
|
+
}
|
|
49
|
+
export interface WorkspaceAuditDocument {
|
|
50
|
+
/** The audit report schema version the members wrote, when they all agree. */
|
|
51
|
+
schemaVersion: string | null;
|
|
52
|
+
workspace: {
|
|
53
|
+
name: string;
|
|
54
|
+
root: string;
|
|
55
|
+
};
|
|
56
|
+
members: MemberAuditStatus[];
|
|
57
|
+
findings: Json[];
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Merge each member's `chant audit --format json` report. Every finding keeps
|
|
61
|
+
* its fields, with `file` still relative to its member, and gains `member`.
|
|
62
|
+
*/
|
|
63
|
+
export declare function mergeAudit(units: MemberOutput[], workspace: {
|
|
64
|
+
name: string;
|
|
65
|
+
root: string;
|
|
66
|
+
}): WorkspaceAuditDocument;
|
|
67
|
+
export {};
|
|
68
|
+
//# sourceMappingURL=compose-reports.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compose-reports.d.ts","sourceRoot":"","sources":["../../src/workspace/compose-reports.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAOH,iDAAiD;AACjD,MAAM,WAAW,YAAY;IAC3B,wEAAwE;IACxE,EAAE,EAAE,MAAM,CAAC;IACX,gCAAgC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,iEAAiE;IACjE,GAAG,EAAE,MAAM,CAAC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|
+
* ws-051 for example groups).
|
|
4
|
+
*
|
|
5
|
+
* Every read goes through {@link parseDeclaration}: the text is parsed with
|
|
6
|
+
* positions, the declared `minReader` is checked, the result is validated
|
|
7
|
+
* against the JSON Schema shipped beside this file, and then the rules JSON
|
|
8
|
+
* Schema can't say are checked in code: unique names, and the placement rules.
|
|
9
|
+
* Any failure is a {@link WorkspaceReadError} naming the file, line and
|
|
10
|
+
* column. A declaration never reads as empty.
|
|
11
|
+
*
|
|
12
|
+
* Group matches depend on the tree, so their placement is checked when they
|
|
13
|
+
* are expanded ({@link resolveGroups}).
|
|
14
|
+
*
|
|
15
|
+
* Everything under `workspace/` loads only when a `chant workspace` command
|
|
16
|
+
* runs. The level-0 goldens (#2526) fail if a level-0 command loads it.
|
|
17
|
+
*/
|
|
18
|
+
import { EXAMPLES_KIND } from "./kinds.js";
|
|
19
|
+
import { type TextLocation } from "./jsonc.js";
|
|
20
|
+
import { type WorkspaceTree } from "./tree.js";
|
|
21
|
+
export declare const DECLARATION_SCHEMA_ID: string;
|
|
22
|
+
export declare const DECLARATION_FILES: readonly ["chant.workspace.json", "chant.workspace.jsonc"];
|
|
23
|
+
export declare const DECLARATION_SCHEMA_VERSION = 1;
|
|
24
|
+
/** Names no member or group may take: ledger paths use them (#2524 D7, D17). */
|
|
25
|
+
export declare const RESERVED_NAMES: readonly ["_workspace", "_members"];
|
|
26
|
+
export declare const NAME_PATTERN: RegExp;
|
|
27
|
+
/**
|
|
28
|
+
* Why a workspace could not be read. The list is closed: a reader may switch
|
|
29
|
+
* on it, and a new code is a contract change (#2524 D15).
|
|
30
|
+
*/
|
|
31
|
+
export declare const WORKSPACE_ERROR_CODES: readonly ["declaration-missing", "declaration-ambiguous", "declaration-unparseable", "declaration-invalid", "placement-invalid", "reader-too-old", "root-chant-required", "not-a-git-repository", "revision-unknown"];
|
|
32
|
+
export type WorkspaceErrorCode = (typeof WORKSPACE_ERROR_CODES)[number];
|
|
33
|
+
export interface ErrorLocation extends TextLocation {
|
|
34
|
+
/** The declaration file, relative to the workspace root's tree. */
|
|
35
|
+
file: string;
|
|
36
|
+
}
|
|
37
|
+
export declare class WorkspaceReadError extends Error {
|
|
38
|
+
readonly code: WorkspaceErrorCode;
|
|
39
|
+
readonly location?: ErrorLocation | undefined;
|
|
40
|
+
constructor(code: WorkspaceErrorCode, message: string, location?: ErrorLocation | undefined);
|
|
41
|
+
/** `file:line:column: message`, or the message alone. */
|
|
42
|
+
describe(): string;
|
|
43
|
+
}
|
|
44
|
+
/** A declaration check suppressed for one entry (#2535). */
|
|
45
|
+
export interface Suppression {
|
|
46
|
+
/** A `WSP` id. */
|
|
47
|
+
check: string;
|
|
48
|
+
because: string;
|
|
49
|
+
}
|
|
50
|
+
/** What `checks` may set a declaration check's severity to. */
|
|
51
|
+
export type CheckSeverity = "error" | "warning" | "info" | "off";
|
|
52
|
+
export interface MemberRole {
|
|
53
|
+
name: string;
|
|
54
|
+
/** Relative to the member's directory, or null for the whole member. */
|
|
55
|
+
path: string | null;
|
|
56
|
+
}
|
|
57
|
+
/** A file a member lists as written by a command (#2524 D14, #2541). */
|
|
58
|
+
export interface GeneratedFile {
|
|
59
|
+
/** Relative to the member's directory. */
|
|
60
|
+
path: string;
|
|
61
|
+
/** The command line that writes the file, run in the member's directory. */
|
|
62
|
+
generator: string;
|
|
63
|
+
/** What the generator reads, relative to the workspace root. */
|
|
64
|
+
sources: string[];
|
|
65
|
+
/** Set when the file is kept by hand instead of regenerated. */
|
|
66
|
+
handWritten: {
|
|
67
|
+
because: string;
|
|
68
|
+
} | null;
|
|
69
|
+
/** The entry's JSON Pointer in the file, for messages. */
|
|
70
|
+
pointer: string;
|
|
71
|
+
}
|
|
72
|
+
/** A member link as the consumer states it (#2524 D6, #2539). */
|
|
73
|
+
export interface LinkDeclaration {
|
|
74
|
+
/** The producer member. */
|
|
75
|
+
member: string;
|
|
76
|
+
/** The producer's output, compared exactly. */
|
|
77
|
+
output: string;
|
|
78
|
+
/** The link kind as written, or null for the default (`output`). */
|
|
79
|
+
kind: string | null;
|
|
80
|
+
/** The link's JSON Pointer in the file, for messages. */
|
|
81
|
+
pointer: string;
|
|
82
|
+
}
|
|
83
|
+
export interface Member {
|
|
84
|
+
type: "member";
|
|
85
|
+
name: string;
|
|
86
|
+
/** Relative to the workspace root; `"."` is the root member. */
|
|
87
|
+
dir: string;
|
|
88
|
+
kind: string;
|
|
89
|
+
roles: MemberRole[];
|
|
90
|
+
/** Declared generated files, in file order. The implicit ones are not listed here (see `generated-files.ts`). */
|
|
91
|
+
generated: GeneratedFile[];
|
|
92
|
+
/** Outputs the entry lists as link targets, or null when it lists none (#2539). */
|
|
93
|
+
outputs: string[] | null;
|
|
94
|
+
/** The links this member states as a consumer, in file order (#2539). */
|
|
95
|
+
links: LinkDeclaration[];
|
|
96
|
+
upstream: string | null;
|
|
97
|
+
because: string | null;
|
|
98
|
+
suppress: Suppression[];
|
|
99
|
+
/** The entry's JSON Pointer in the file, for messages. */
|
|
100
|
+
pointer: string;
|
|
101
|
+
}
|
|
102
|
+
export interface Group {
|
|
103
|
+
type: "group";
|
|
104
|
+
name: string;
|
|
105
|
+
kind: typeof EXAMPLES_KIND;
|
|
106
|
+
globs: string[];
|
|
107
|
+
suppress: Suppression[];
|
|
108
|
+
pointer: string;
|
|
109
|
+
/** Where the entry's `glob` sits in the file, for placement errors. */
|
|
110
|
+
globLocation: TextLocation;
|
|
111
|
+
}
|
|
112
|
+
export type Entry = Member | Group;
|
|
113
|
+
export interface Pin {
|
|
114
|
+
package: string | null;
|
|
115
|
+
version: string | null;
|
|
116
|
+
path: string | null;
|
|
117
|
+
integrity: string | null;
|
|
118
|
+
}
|
|
119
|
+
export interface Declaration {
|
|
120
|
+
name: string;
|
|
121
|
+
schema: number;
|
|
122
|
+
minReader: string | null;
|
|
123
|
+
/** Members and groups, in file order. */
|
|
124
|
+
entries: Entry[];
|
|
125
|
+
members: Member[];
|
|
126
|
+
groups: Group[];
|
|
127
|
+
pins: Pin[];
|
|
128
|
+
/** Severities set for declaration checks, keyed by `WSP` id (#2535). */
|
|
129
|
+
checks: Record<string, CheckSeverity>;
|
|
130
|
+
/** The file, relative to the workspace root's tree (`chant.workspace.json` or `.jsonc`). */
|
|
131
|
+
file: string;
|
|
132
|
+
}
|
|
133
|
+
/** The package whose pin names the root's chant (#2524 D15, ws-021). */
|
|
134
|
+
export declare const CHANT_PACKAGE = "@intentius/chant";
|
|
135
|
+
/**
|
|
136
|
+
* The version of the chant doing the reading. Read as a file, not through
|
|
137
|
+
* `require`: discovery reads the declaration on every walk under a workspace
|
|
138
|
+
* root (#2527), and a CJS require of `package.json` took about a minute per
|
|
139
|
+
* call in a vitest worker once a build had run in it, where a file read takes
|
|
140
|
+
* well under a millisecond.
|
|
141
|
+
*/
|
|
142
|
+
export declare function readerVersion(): string;
|
|
143
|
+
/** Negative when `a` is older than `b`. Build metadata is not allowed, and prereleases sort before their release. */
|
|
144
|
+
export declare function compareVersions(a: string, b: string): number;
|
|
145
|
+
export interface ReadOptions {
|
|
146
|
+
/**
|
|
147
|
+
* Apply "which chant reads it" (#2524 D15, ws-021): when the declaration
|
|
148
|
+
* pins `@intentius/chant` at a version other than `reader`, that pinned
|
|
149
|
+
* chant, the root's, reads it, and this one refuses with
|
|
150
|
+
* `root-chant-required`. The read-contract commands (`ls`, `graph`,
|
|
151
|
+
* `check`, `status`) set it, and hand the command to the root's chant
|
|
152
|
+
* first when it is installed (`which-chant.ts`). Other commands leave it
|
|
153
|
+
* off: a member's own toolchain writes its ledger whatever the root pins.
|
|
154
|
+
*/
|
|
155
|
+
rootChant?: boolean;
|
|
156
|
+
}
|
|
157
|
+
/** The version the declaration's `@intentius/chant` pin names, and where the pin is. Undefined without one. */
|
|
158
|
+
export declare function pinnedChant(obj: Record<string, unknown>): {
|
|
159
|
+
version: string;
|
|
160
|
+
index: number;
|
|
161
|
+
} | undefined;
|
|
162
|
+
/**
|
|
163
|
+
* Parse and check a declaration's text. `file` is the name used in messages
|
|
164
|
+
* and decides the dialect: a name ending in `.jsonc` allows comments and
|
|
165
|
+
* trailing commas.
|
|
166
|
+
*/
|
|
167
|
+
export declare function parseDeclaration(text: string, file: string, reader?: string, options?: ReadOptions): Declaration;
|
|
168
|
+
/** Whether `path` is `dir` or sits under it. Both are tree-relative; `"."` is the root. */
|
|
169
|
+
export declare function isInside(path: string, dir: string): boolean;
|
|
170
|
+
/**
|
|
171
|
+
* Read the declaration in directory `dir` of `tree`. Throws
|
|
172
|
+
* `declaration-missing` when neither name is there and
|
|
173
|
+
* `declaration-ambiguous` when both are.
|
|
174
|
+
*/
|
|
175
|
+
export declare function readDeclaration(tree: WorkspaceTree, dir?: string, options?: ReadOptions): Declaration;
|
|
176
|
+
/**
|
|
177
|
+
* Walk up from `start` (tree-relative) to the nearest directory holding a
|
|
178
|
+
* declaration, within `tree`. The tree's root is the git root, so this is
|
|
179
|
+
* `findWorkspaceRoot` for a revision. Returns the directory, or undefined.
|
|
180
|
+
*/
|
|
181
|
+
export declare function findDeclarationDir(tree: WorkspaceTree, start: string): string | undefined;
|
|
182
|
+
export interface ResolvedGroup {
|
|
183
|
+
group: Group;
|
|
184
|
+
/** Directories the globs match that hold a chant project, sorted. */
|
|
185
|
+
matches: string[];
|
|
186
|
+
/** Directories the globs match that hold none; they are left alone. */
|
|
187
|
+
skipped: string[];
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Expand every group's globs in `tree` (rooted at the workspace root) and
|
|
191
|
+
* check where the matches sit (ws-051): a match is never a member's directory
|
|
192
|
+
* and never contains one, it doesn't sit inside a nested workspace, and no
|
|
193
|
+
* two groups claim the same directory. A match may sit inside any other
|
|
194
|
+
* member's directory; that member leaves it to the group.
|
|
195
|
+
*/
|
|
196
|
+
export declare function resolveGroups(declaration: Declaration, tree: WorkspaceTree): ResolvedGroup[];
|
|
197
|
+
/**
|
|
198
|
+
* Which entry owns `path` (relative to the workspace root): the group whose
|
|
199
|
+
* match holds it, else the member with the deepest directory holding it, else
|
|
200
|
+
* none. A group match wins over the member whose directory it sits in
|
|
201
|
+
* (ws-051). Ledgers (#2538), telemetry attribution (#2558) and the root
|
|
202
|
+
* project's discovery (#2537) all ask this question.
|
|
203
|
+
*/
|
|
204
|
+
export declare function ownerOf(declaration: Declaration, groups: ResolvedGroup[], path: string): {
|
|
205
|
+
member: Member;
|
|
206
|
+
} | {
|
|
207
|
+
group: Group;
|
|
208
|
+
match: string;
|
|
209
|
+
} | undefined;
|
|
210
|
+
/**
|
|
211
|
+
* The directories that leave the root project once the declaration exists
|
|
212
|
+
* (#2524 D0, D2): every member's directory but the root's, and every group
|
|
213
|
+
* match. The root project's build, lint, Op and audit discovery skip them
|
|
214
|
+
* (#2537); `chant workspace init` prints them before it writes.
|
|
215
|
+
*/
|
|
216
|
+
export declare function rootExclusions(declaration: Declaration, groups: ResolvedGroup[]): {
|
|
217
|
+
dir: string;
|
|
218
|
+
owner: string;
|
|
219
|
+
}[];
|
|
220
|
+
//# sourceMappingURL=declaration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"declaration.d.ts","sourceRoot":"","sources":["../../src/workspace/declaration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAOH,OAAO,EAAE,aAAa,EAAqB,MAAM,SAAS,CAAC;AAC3D,OAAO,EAA+B,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAEzE,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,QAAQ,CAAC;AAEtD,eAAO,MAAM,qBAAqB,QAAa,CAAC;AAChD,eAAO,MAAM,iBAAiB,4DAA6D,CAAC;AAC5F,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAE5C,gFAAgF;AAChF,eAAO,MAAM,cAAc,qCAAsC,CAAC;AAClE,eAAO,MAAM,YAAY,QAA8B,CAAC;AAIxD;;;GAGG;AACH,eAAO,MAAM,qBAAqB,uNAmBQ,CAAC;AAC3C,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,qB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