@intentius/chant 0.124.13 → 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/bin/chant +11 -0
- package/dist/agents/checks.js +326 -0
- package/dist/agents/discover.js +885 -0
- package/dist/agents/importer.js +17 -0
- package/dist/agents/index.js +12 -0
- package/dist/agents/types.js +19 -0
- package/dist/apply.js +151 -0
- package/dist/attrref.js +70 -0
- package/dist/audit/catalog.js +350 -0
- package/dist/audit/core.js +252 -0
- package/dist/audit/discover.js +633 -0
- package/dist/audit/fetch.js +666 -0
- package/dist/audit/lineage.js +91 -0
- package/dist/audit/nginx.js +366 -0
- package/dist/audit/prior-art.js +132 -0
- package/dist/audit/proof.js +321 -0
- package/dist/audit/report-html.js +194 -0
- package/dist/audit/report-model.js +198 -0
- package/dist/audit/report.js +102 -0
- package/dist/audit/rules-doc.js +144 -0
- package/dist/audit/secrets.js +405 -0
- package/dist/audit/terraform-state.js +140 -0
- package/dist/audit/wrangler.js +262 -0
- package/dist/behaviour-delta.js +401 -0
- package/dist/behaviour-engine.js +357 -0
- package/dist/behaviour-graph.js +83 -0
- package/dist/behaviour-http.js +188 -0
- package/dist/behaviour-kinds.js +172 -0
- package/dist/behaviour-overlay.js +50 -0
- package/dist/behaviour-predict.js +188 -0
- package/dist/behaviour-request.js +194 -0
- package/dist/behaviour.js +1325 -0
- package/dist/build-params.js +108 -0
- package/dist/build.d.ts +6 -0
- package/dist/build.d.ts.map +1 -1
- package/dist/build.js +669 -0
- package/dist/builder.js +44 -0
- package/dist/cdk/advise.js +30 -0
- package/dist/cdk/assembly.js +122 -0
- package/dist/cdk/graph.js +444 -0
- package/dist/cdk/tier-map.js +64 -0
- package/dist/cdk/types.js +24 -0
- package/dist/change-set.d.ts +24 -2
- package/dist/change-set.d.ts.map +1 -1
- package/dist/change-set.js +361 -0
- package/dist/child-project.js +21 -0
- 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/claimed-fields.js +135 -0
- package/dist/cli/build-options.js +70 -0
- package/dist/cli/build-params-cli.js +139 -0
- package/dist/cli/command-group.js +123 -0
- package/dist/cli/commands/audit-agents.js +326 -0
- package/dist/cli/commands/audit.js +571 -0
- package/dist/cli/commands/build.js +920 -0
- package/dist/cli/commands/carve-apply.js +153 -0
- package/dist/cli/commands/carve-bridge.js +201 -0
- package/dist/cli/commands/carve-emit.js +332 -0
- package/dist/cli/commands/carve-status.js +119 -0
- package/dist/cli/commands/carve.js +204 -0
- package/dist/cli/commands/check-lexicon-docs.js +79 -0
- package/dist/cli/commands/check-lexicon-examples.js +177 -0
- package/dist/cli/commands/check-lexicon-intrinsics.js +291 -0
- package/dist/cli/commands/check-lexicon-mcp.js +82 -0
- package/dist/cli/commands/check-lexicon-plugin.d.ts.map +1 -1
- package/dist/cli/commands/check-lexicon-plugin.js +104 -0
- package/dist/cli/commands/check-lexicon.js +766 -0
- package/dist/cli/commands/describe.js +85 -0
- package/dist/cli/commands/diff.js +175 -0
- package/dist/cli/commands/doctor.js +350 -0
- package/dist/cli/commands/import-agents.js +155 -0
- package/dist/cli/commands/import.js +670 -0
- package/dist/cli/commands/init-lexicon/templates/codegen.js +194 -0
- package/dist/cli/commands/init-lexicon/templates/docs.js +100 -0
- package/dist/cli/commands/init-lexicon/templates/examples.js +29 -0
- package/dist/cli/commands/init-lexicon/templates/lint.js +34 -0
- package/dist/cli/commands/init-lexicon/templates/lsp.js +37 -0
- package/dist/cli/commands/init-lexicon/templates/plugin.js +108 -0
- package/dist/cli/commands/init-lexicon/templates/project.js +240 -0
- package/dist/cli/commands/init-lexicon/templates/spec.js +56 -0
- package/dist/cli/commands/init-lexicon/templates/tests.js +66 -0
- package/dist/cli/commands/init-lexicon.js +172 -0
- package/dist/cli/commands/init.js +381 -0
- package/dist/cli/commands/lexicon-rolling-upgrade.js +145 -0
- package/dist/cli/commands/lexicon-surface-diff.js +145 -0
- package/dist/cli/commands/licenses.js +125 -0
- package/dist/cli/commands/lint.d.ts.map +1 -1
- package/dist/cli/commands/lint.js +948 -0
- package/dist/cli/commands/list.js +63 -0
- package/dist/cli/commands/migrate.d.ts.map +1 -1
- package/dist/cli/commands/migrate.js +423 -0
- package/dist/cli/commands/onboard.js +403 -0
- package/dist/cli/commands/pinned-upgrade.js +191 -0
- package/dist/cli/commands/update.js +194 -0
- package/dist/cli/commands/vendor.js +217 -0
- package/dist/cli/conflict-check.js +104 -0
- package/dist/cli/debug.js +8 -0
- package/dist/cli/format.js +104 -0
- package/dist/cli/handlers/build.js +267 -0
- package/dist/cli/handlers/carve-apply.js +30 -0
- package/dist/cli/handlers/carve-bridge.js +28 -0
- package/dist/cli/handlers/carve-emit.js +50 -0
- package/dist/cli/handlers/carve-status.js +26 -0
- package/dist/cli/handlers/carve.js +40 -0
- package/dist/cli/handlers/change-set.js +46 -0
- package/dist/cli/handlers/components.js +730 -0
- package/dist/cli/handlers/dev.js +113 -0
- package/dist/cli/handlers/emulator.js +233 -0
- package/dist/cli/handlers/explain.js +54 -0
- package/dist/cli/handlers/fan-out.js +422 -0
- package/dist/cli/handlers/gate-resume.js +275 -0
- package/dist/cli/handlers/generate.js +84 -0
- package/dist/cli/handlers/graph.js +969 -0
- package/dist/cli/handlers/init.js +102 -0
- package/dist/cli/handlers/lifecycle.js +1727 -0
- package/dist/cli/handlers/lint.js +62 -0
- package/dist/cli/handlers/migrate.js +48 -0
- package/dist/cli/handlers/misc.js +391 -0
- package/dist/cli/handlers/operator.js +1162 -0
- package/dist/cli/handlers/override-approve.js +102 -0
- package/dist/cli/handlers/pr.js +503 -0
- package/dist/cli/handlers/promote.js +342 -0
- package/dist/cli/handlers/run-generate.js +206 -0
- package/dist/cli/handlers/run-wave.js +66 -0
- package/dist/cli/handlers/run.js +1191 -0
- package/dist/cli/handlers/scenario.js +325 -0
- package/dist/cli/handlers/search.js +924 -0
- package/dist/cli/handlers/serve.js +32 -0
- package/dist/cli/handlers/vendor.js +154 -0
- package/dist/cli/index.js +3 -0
- package/dist/cli/is-entry-point.js +23 -0
- package/dist/cli/lsp/capabilities.js +28 -0
- package/dist/cli/lsp/diagnostics.js +34 -0
- package/dist/cli/lsp/server.js +329 -0
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +2540 -0
- package/dist/cli/mcp/lifecycle-tools.js +80 -0
- package/dist/cli/mcp/op-tools.js +306 -0
- package/dist/cli/mcp/resource-handlers.js +258 -0
- package/dist/cli/mcp/resources/context.js +85 -0
- package/dist/cli/mcp/server.js +353 -0
- package/dist/cli/mcp/tools/build.js +111 -0
- package/dist/cli/mcp/tools/composites.js +95 -0
- package/dist/cli/mcp/tools/explain.js +166 -0
- package/dist/cli/mcp/tools/import.js +49 -0
- package/dist/cli/mcp/tools/lint.js +41 -0
- package/dist/cli/mcp/tools/scaffold.js +111 -0
- package/dist/cli/mcp/tools/search.js +112 -0
- package/dist/cli/mcp/types.js +1 -0
- package/dist/cli/mcp/workspace-plugins.js +91 -0
- package/dist/cli/mcp/workspace-tools.d.ts +1 -1
- package/dist/cli/mcp/workspace-tools.js +564 -0
- package/dist/cli/mcp-config.js +70 -0
- package/dist/cli/plugins.js +313 -0
- package/dist/cli/registry.js +23 -0
- package/dist/cli/reporters/stylish.js +329 -0
- package/dist/cli/version.js +15 -0
- package/dist/cli/watch.js +79 -0
- package/dist/codegen/bound-property-types.js +82 -0
- package/dist/codegen/coverage.js +119 -0
- package/dist/codegen/docs-file-markers.js +60 -0
- package/dist/codegen/docs-pages.js +115 -0
- package/dist/codegen/docs-rule-scanning.js +164 -0
- package/dist/codegen/docs-rules.js +76 -0
- package/dist/codegen/docs-sections.js +117 -0
- package/dist/codegen/docs-sidebar.js +65 -0
- package/dist/codegen/docs-types.js +4 -0
- package/dist/codegen/docs.js +356 -0
- package/dist/codegen/fetch.js +340 -0
- package/dist/codegen/generate-post-synth-barrel.js +63 -0
- package/dist/codegen/generate-registry.js +71 -0
- package/dist/codegen/generate-runtime-index.js +56 -0
- package/dist/codegen/generate-typescript.js +119 -0
- package/dist/codegen/generate.js +115 -0
- package/dist/codegen/json-patch.js +141 -0
- package/dist/codegen/json-schema-to-ts.js +344 -0
- package/dist/codegen/json-schema.js +246 -0
- package/dist/codegen/lexicon-regen.js +412 -0
- package/dist/codegen/naming.js +217 -0
- package/dist/codegen/okf-lexicon.js +245 -0
- package/dist/codegen/package.js +150 -0
- package/dist/codegen/pinned-upgrade.d.ts.map +1 -1
- package/dist/codegen/pinned-upgrade.js +494 -0
- package/dist/codegen/registry.js +60 -0
- package/dist/codegen/rehype-base-url.mjs +68 -0
- package/dist/codegen/rolling-upgrade.js +217 -0
- package/dist/codegen/surface-snapshot.js +537 -0
- package/dist/codegen/testdata/postgres-tags.json +242 -0
- package/dist/codegen/topo-sort.js +36 -0
- package/dist/codegen/typecheck.js +115 -0
- package/dist/codegen/validate.js +200 -0
- package/dist/codegen/version-bump.js +35 -0
- package/dist/components/auto-release.js +143 -0
- package/dist/components/builders.js +47 -0
- package/dist/components/capability-plugin-loader.js +175 -0
- package/dist/components/capability-plugin-schema.js +46 -0
- package/dist/components/capability-plugin.js +99 -0
- package/dist/components/capability.js +60 -0
- package/dist/components/changed-files.js +72 -0
- package/dist/components/cli-support.js +427 -0
- package/dist/components/component.js +120 -0
- package/dist/components/component.schema.json +271 -0
- package/dist/components/config-defaults.js +130 -0
- package/dist/components/deploy-units.js +60 -0
- package/dist/components/discover.d.ts.map +1 -1
- package/dist/components/discover.js +189 -0
- package/dist/components/driver-output.js +86 -0
- package/dist/components/driver.js +728 -0
- package/dist/components/fan-out-output.js +165 -0
- package/dist/components/fan-out-record.js +94 -0
- package/dist/components/fan-out-run.js +373 -0
- package/dist/components/fan-out-support.js +60 -0
- package/dist/components/fan-out.js +273 -0
- package/dist/components/gate-plan.js +41 -0
- package/dist/components/gated-wave-pipeline.js +46 -0
- package/dist/components/index.js +24 -0
- package/dist/components/layers.js +28 -0
- package/dist/components/manifest-persistence.js +108 -0
- package/dist/components/pilots/alb-ecs.pilot.js +59 -0
- package/dist/components/pilots/dynamodb.pilot.js +51 -0
- package/dist/components/pilots/jar-emr.pilot.js +65 -0
- package/dist/components/pilots/lambda.pilot.js +52 -0
- package/dist/components/pilots/neo4j-fanout.pilot.js +68 -0
- package/dist/components/pilots/project.js +12 -0
- package/dist/components/pr-pipeline.d.ts.map +1 -1
- package/dist/components/pr-pipeline.js +135 -0
- package/dist/components/pr-run.js +363 -0
- package/dist/components/presets/ecs-fargate.js +72 -0
- package/dist/components/presets/index.js +28 -0
- package/dist/components/presets/lambda.js +34 -0
- package/dist/components/presets/single-host-compose.js +41 -0
- package/dist/components/promote.js +549 -0
- package/dist/components/registry.js +34 -0
- package/dist/components/run-progress.js +33 -0
- package/dist/components/sandbox/driver.d.ts.map +1 -1
- package/dist/components/sandbox/driver.js +93 -0
- package/dist/components/sandbox/run.js +115 -0
- package/dist/components/starter-plugin.js +104 -0
- package/dist/components/verbs/__tests__/mock-cloud-executor.js +68 -0
- package/dist/components/verbs/__tests__/mock-process-runner.js +45 -0
- package/dist/components/verbs/__tests__/mock-sbom-generator.js +56 -0
- package/dist/components/verbs/bom-writer.js +287 -0
- package/dist/components/verbs/build-archive.js +188 -0
- package/dist/components/verbs/build.js +142 -0
- package/dist/components/verbs/cloud-executor.js +110 -0
- package/dist/components/verbs/component-bom.js +125 -0
- package/dist/components/verbs/ensure-secret.js +50 -0
- package/dist/components/verbs/index.js +61 -0
- package/dist/components/verbs/license-policy.js +75 -0
- package/dist/components/verbs/lockfile-sbom-generator.js +191 -0
- package/dist/components/verbs/process-runner.js +78 -0
- package/dist/components/verbs/r2-sync.js +93 -0
- package/dist/components/verbs/reproducibility.js +62 -0
- package/dist/components/verbs/run-agent.js +577 -0
- package/dist/components/verbs/sbom-generator.js +119 -0
- package/dist/components/verbs/sbom.js +97 -0
- package/dist/components/verbs/shell.js +32 -0
- package/dist/components/verbs/sign.js +221 -0
- package/dist/components/verbs/stub.js +28 -0
- package/dist/components/verbs/tool-sbom-generator.js +154 -0
- package/dist/components/verbs/verify.js +112 -0
- package/dist/components/verbs/vex.js +131 -0
- package/dist/components/verbs/vuln-gate.js +152 -0
- package/dist/components/verbs/vuln-scan.js +288 -0
- package/dist/components/verbs/wait-verify.js +106 -0
- package/dist/components/verbs/wrangler.js +179 -0
- package/dist/components/wave-plan.js +102 -0
- package/dist/composite.d.ts +10 -2
- package/dist/composite.d.ts.map +1 -1
- package/dist/composite.js +313 -0
- package/dist/config-import.d.ts.map +1 -1
- package/dist/config-import.js +22 -0
- package/dist/config-sandbox.js +122 -0
- package/dist/config-static.js +206 -0
- package/dist/config.js +605 -0
- package/dist/content-digest.js +23 -0
- package/dist/declarable.js +114 -0
- package/dist/deep-observation.js +437 -0
- package/dist/detectLexicon.js +54 -0
- package/dist/discovery/cache.js +70 -0
- package/dist/discovery/collect.d.ts +2 -1
- package/dist/discovery/collect.d.ts.map +1 -1
- package/dist/discovery/collect.js +223 -0
- package/dist/discovery/cycles.js +95 -0
- package/dist/discovery/entity-wire-codec.js +391 -0
- package/dist/discovery/entity-wire.js +42 -0
- package/dist/discovery/files.js +121 -0
- package/dist/discovery/fold-import.d.ts.map +1 -1
- package/dist/discovery/fold-import.js +4073 -0
- package/dist/discovery/fold-rank.js +292 -0
- package/dist/discovery/graph.js +115 -0
- 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/import.d.ts.map +1 -1
- package/dist/discovery/import.js +65 -0
- package/dist/discovery/index.d.ts +9 -0
- package/dist/discovery/index.d.ts.map +1 -1
- package/dist/discovery/index.js +333 -0
- package/dist/discovery/param-deps.js +487 -0
- package/dist/discovery/resolve.js +39 -0
- package/dist/discovery/sandbox/bundle.js +214 -0
- package/dist/discovery/sandbox/child-errors.js +26 -0
- package/dist/discovery/sandbox/config-run.js +100 -0
- package/dist/discovery/sandbox/config-wire.js +183 -0
- package/dist/discovery/sandbox/driver.d.ts.map +1 -1
- package/dist/discovery/sandbox/driver.js +333 -0
- package/dist/discovery/sandbox/fork.js +229 -0
- package/dist/discovery/sandbox/policy-run.js +142 -0
- package/dist/discovery/sandbox/policy-wire.js +152 -0
- package/dist/discovery/sandbox/run.js +77 -0
- package/dist/discovery/specifier-resolve.js +320 -0
- package/dist/discovery/walk.js +284 -0
- package/dist/effect-receipt.js +340 -0
- package/dist/env.js +55 -0
- package/dist/errors.js +62 -0
- package/dist/fold/fold.js +1434 -0
- package/dist/fold/foldable-helpers.js +229 -0
- package/dist/fold/subset.js +696 -0
- package/dist/fold-provenance.js +414 -0
- package/dist/gate-decision.d.ts +20 -9
- package/dist/gate-decision.d.ts.map +1 -1
- package/dist/gate-decision.js +313 -0
- package/dist/gate-resume-run.js +154 -0
- package/dist/gated-waves.js +165 -0
- package/dist/governance.js +43 -0
- package/dist/graph-declared.js +45 -0
- package/dist/graph-detail.js +207 -0
- package/dist/graph-dot.js +54 -0
- package/dist/graph-effective.js +107 -0
- package/dist/graph-ir.js +623 -0
- package/dist/graph-layout.js +184 -0
- package/dist/graph-lens.js +105 -0
- package/dist/graph-mermaid.js +83 -0
- package/dist/graph-ops.js +39 -0
- package/dist/graph-refs.js +156 -0
- package/dist/held-elsewhere.js +87 -0
- package/dist/identity.js +251 -0
- package/dist/import/base-parser.js +34 -0
- package/dist/import/embedded.js +255 -0
- package/dist/import/generator.js +1 -0
- package/dist/import/ir-utils.js +85 -0
- package/dist/import/parser-options.js +45 -0
- package/dist/import/parser.js +1 -0
- package/dist/index.js +118 -0
- package/dist/intrinsic-interpolation.js +73 -0
- package/dist/intrinsic.js +31 -0
- package/dist/join-key.js +35 -0
- package/dist/kubectl-context.js +150 -0
- package/dist/lexicon-config.js +58 -0
- package/dist/lexicon-integrity.js +47 -0
- package/dist/lexicon-manifest.js +70 -0
- package/dist/lexicon-module.d.ts.map +1 -1
- package/dist/lexicon-module.js +241 -0
- package/dist/lexicon-output.js +218 -0
- package/dist/lexicon-plugin-helpers.js +104 -0
- package/dist/lexicon-schema.js +136 -0
- package/dist/lexicon.js +130 -0
- package/dist/lifecycle/affected.js +224 -0
- package/dist/lifecycle/assert-live.js +110 -0
- package/dist/lifecycle/build-ledger-store.js +160 -0
- package/dist/lifecycle/build-ledger.js +155 -0
- package/dist/lifecycle/change-set.js +356 -0
- package/dist/lifecycle/converge-ledger.js +161 -0
- package/dist/lifecycle/deep-diff.js +233 -0
- package/dist/lifecycle/deep-observe.js +147 -0
- package/dist/lifecycle/digest.js +143 -0
- package/dist/lifecycle/disruption.js +135 -0
- package/dist/lifecycle/gate-applied.js +113 -0
- 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 +415 -0
- package/dist/lifecycle/gate-ledger-select.js +89 -0
- 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 +201 -0
- package/dist/lifecycle/gate-origin.js +117 -0
- package/dist/lifecycle/gate-pending.js +58 -0
- package/dist/lifecycle/git.js +1182 -0
- package/dist/lifecycle/identity.js +58 -0
- package/dist/lifecycle/index.js +26 -0
- package/dist/lifecycle/lease.js +283 -0
- package/dist/lifecycle/ledger-port.js +1 -0
- package/dist/lifecycle/legacy-digest.js +91 -0
- package/dist/lifecycle/live-diff.js +274 -0
- package/dist/lifecycle/local-note.js +15 -0
- package/dist/lifecycle/member-ledger.js +122 -0
- package/dist/lifecycle/observation-baseline.js +155 -0
- package/dist/lifecycle/observe.js +375 -0
- package/dist/lifecycle/oras-referrer-lookup.js +82 -0
- package/dist/lifecycle/override-ledger.js +54 -0
- package/dist/lifecycle/plan-digest.js +110 -0
- package/dist/lifecycle/plan-ledger.js +129 -0
- package/dist/lifecycle/receipt-plan.js +192 -0
- package/dist/lifecycle/release-ledger.js +155 -0
- package/dist/lifecycle/release-read.js +64 -0
- package/dist/lifecycle/replay.js +193 -0
- package/dist/lifecycle/rollback.js +102 -0
- package/dist/lifecycle/run-ledger.js +183 -0
- package/dist/lifecycle/scenario-eval.js +204 -0
- package/dist/lifecycle/scenario.js +214 -0
- package/dist/lifecycle/snapshot.js +239 -0
- package/dist/lifecycle/status.js +447 -0
- package/dist/lifecycle/symptoms.js +117 -0
- package/dist/lifecycle/teardown.js +255 -0
- package/dist/lifecycle/types.js +1 -0
- package/dist/lifecycle/unobserved-gate.js +33 -0
- package/dist/lifecycle/wave-plans.js +68 -0
- package/dist/lifecycle/work-item-id.js +36 -0
- package/dist/lifecycle/work-lease.js +393 -0
- package/dist/lint/component-checks.js +87 -0
- package/dist/lint/config.js +483 -0
- package/dist/lint/declarative.js +122 -0
- package/dist/lint/discover.d.ts.map +1 -1
- package/dist/lint/discover.js +138 -0
- package/dist/lint/engine.js +246 -0
- package/dist/lint/knowledge-checks.js +64 -0
- package/dist/lint/named-checks.js +22 -0
- package/dist/lint/output-checks.js +87 -0
- package/dist/lint/output-docs.js +163 -0
- package/dist/lint/parser.js +33 -0
- package/dist/lint/pipeline-change-gate.js +70 -0
- package/dist/lint/policy-import.d.ts +1 -1
- package/dist/lint/policy-import.d.ts.map +1 -1
- package/dist/lint/policy-import.js +62 -0
- package/dist/lint/policy-sandbox.js +86 -0
- package/dist/lint/policy.js +122 -0
- package/dist/lint/post-synth.js +87 -0
- package/dist/lint/presets/relaxed.json +26 -0
- package/dist/lint/presets/strict.json +24 -24
- package/dist/lint/receipt-checks.js +83 -0
- package/dist/lint/rule-loader.d.ts.map +1 -1
- package/dist/lint/rule-loader.js +89 -0
- package/dist/lint/rule-registry.js +86 -0
- package/dist/lint/rule.js +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp000-discovery-error/broken-a.component.js +7 -0
- package/dist/lint/rules/__fixtures__/comp/comp000-discovery-error/broken-b.component.js +7 -0
- package/dist/lint/rules/__fixtures__/comp/comp001/fail/orphan-lib.component.js +9 -0
- package/dist/lint/rules/__fixtures__/comp/comp001/pass/emr-job.component.js +11 -0
- package/dist/lint/rules/__fixtures__/comp/comp001/pass/jar-lib.component.js +9 -0
- package/dist/lint/rules/__fixtures__/comp/comp002/fail/search-service.component.js +25 -0
- package/dist/lint/rules/__fixtures__/comp/comp002/pass/jar-lib.component.js +8 -0
- package/dist/lint/rules/__fixtures__/comp/comp002/pass/search-service.component.js +21 -0
- package/dist/lint/rules/__fixtures__/comp/comp003/fail/migrator.component.js +8 -0
- package/dist/lint/rules/__fixtures__/comp/comp003/pass/agent-turn.component.js +24 -0
- package/dist/lint/rules/__fixtures__/comp/comp003/pass/migrator.component.js +17 -0
- package/dist/lint/rules/__fixtures__/comp/comp003/pass/orders-table.component.js +8 -0
- package/dist/lint/rules/__fixtures__/comp/comp004/fail/neo4j-cluster.component.js +18 -0
- package/dist/lint/rules/__fixtures__/comp/comp004/pass/neo4j-cluster.component.js +20 -0
- package/dist/lint/rules/__fixtures__/comp/comp004/pass/orders-table.component.js +8 -0
- package/dist/lint/rules/__fixtures__/comp/comp005/fail/search-service.component.js +12 -0
- package/dist/lint/rules/__fixtures__/comp/comp005/pass/search-service.component.js +16 -0
- package/dist/lint/rules/__fixtures__/comp/comp006/fail/legacy-tool.component.js +8 -0
- package/dist/lint/rules/__fixtures__/comp/comp006/pass/legacy-tool.component.js +12 -0
- package/dist/lint/rules/__fixtures__/comp/comp007/fail/inventory-table.component.js +11 -0
- package/dist/lint/rules/__fixtures__/comp/comp007/fail/orders-table.component.js +11 -0
- package/dist/lint/rules/__fixtures__/comp/comp007/pass/orders-table.component.js +10 -0
- package/dist/lint/rules/__fixtures__/comp/comp007/pass/search-service.component.js +16 -0
- package/dist/lint/rules/comp/comp001-publishes-never-applies.js +69 -0
- package/dist/lint/rules/comp/comp002-dangling-wiring-ref.js +84 -0
- package/dist/lint/rules/comp/comp003-mutating-no-rollback.js +103 -0
- package/dist/lint/rules/comp/comp004-gate-needs-durable-runtime.js +70 -0
- package/dist/lint/rules/comp/comp005-capability-kind-is-noun.js +109 -0
- package/dist/lint/rules/comp/comp006-shell-needs-reason.js +49 -0
- package/dist/lint/rules/comp/comp007-composition-sprawl.js +64 -0
- package/dist/lint/rules/comp/index.js +33 -0
- package/dist/lint/rules/comp/support.js +129 -0
- package/dist/lint/rules/composite-scope.js +51 -0
- package/dist/lint/rules/cor017-composite-name-match.js +93 -0
- package/dist/lint/rules/cor018-composite-prefer-lexicon-type.js +136 -0
- package/dist/lint/rules/cor021-env-literal-name.js +100 -0
- package/dist/lint/rules/cor022-receipt-leaf.js +118 -0
- package/dist/lint/rules/cor024-receipt-secret-pointer.js +199 -0
- package/dist/lint/rules/declarable-naming-convention.js +62 -0
- package/dist/lint/rules/evl001-non-literal-expression.js +66 -0
- package/dist/lint/rules/evl002-control-flow-resource.js +69 -0
- package/dist/lint/rules/evl003-dynamic-property-access.js +44 -0
- package/dist/lint/rules/evl004-spread-non-const.js +94 -0
- package/dist/lint/rules/evl005-resource-block-body.js +41 -0
- package/dist/lint/rules/evl007-invalid-siblings.js +105 -0
- package/dist/lint/rules/evl009-composite-no-constant.js +158 -0
- package/dist/lint/rules/evl010-composite-no-transform.js +59 -0
- package/dist/lint/rules/evl011-symbolic-in-template.js +106 -0
- package/dist/lint/rules/export-required.js +115 -0
- package/dist/lint/rules/file-declarable-limit.js +88 -0
- package/dist/lint/rules/flat-declarations.js +62 -0
- package/dist/lint/rules/index.js +90 -0
- package/dist/lint/rules/no-cyclic-declarable-ref.js +138 -0
- package/dist/lint/rules/no-redundant-type-import.js +76 -0
- package/dist/lint/rules/no-redundant-value-cast.js +41 -0
- package/dist/lint/rules/no-string-ref.js +59 -0
- package/dist/lint/rules/no-unused-declarable-import.js +75 -0
- package/dist/lint/rules/no-unused-declarable.js +142 -0
- package/dist/lint/rules/op/index.js +28 -0
- package/dist/lint/rules/op/ops012-activity-contract.js +54 -0
- package/dist/lint/rules/op/ops013-step-output-ref.js +88 -0
- package/dist/lint/rules/op/ops014-converge-rule-refusals.js +114 -0
- package/dist/lint/rules/op/ops015-gate-approval.js +45 -0
- package/dist/lint/rules/op/support.js +11 -0
- package/dist/lint/rules/op/sys010-key-over-plain-http.js +100 -0
- package/dist/lint/rules/property-kind.js +56 -0
- package/dist/lint/rules/single-concern-file.js +71 -0
- package/dist/lint/rules/sys001-no-literal-key.js +60 -0
- package/dist/lint/selectors.js +168 -0
- package/dist/lint/suppressions.js +129 -0
- package/dist/lint/typescript.js +17 -0
- package/dist/live-endpoint.js +113 -0
- package/dist/live-read-session.js +76 -0
- package/dist/lsp/lexicon-providers.js +163 -0
- package/dist/lsp/types.js +5 -0
- package/dist/managed-fields.js +293 -0
- package/dist/mcp/types.js +4 -0
- package/dist/notify-verify.js +0 -1
- package/dist/notify.js +0 -1
- package/dist/notify.schema.json +72 -0
- package/dist/observation.js +266 -0
- package/dist/okf-read.js +134 -0
- package/dist/okf.js +275 -0
- package/dist/op/__fixtures__/decide-stub-backend.js +125 -0
- package/dist/op/activities/activity-contracts.d.ts +1 -1
- package/dist/op/activities/activity-contracts.js +313 -0
- package/dist/op/activities/apply.js +582 -0
- package/dist/op/activities/build.js +18 -0
- package/dist/op/activities/change-coverage.js +40 -0
- 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 +67 -0
- package/dist/op/activities/converge.js +492 -0
- package/dist/op/activities/decide.js +211 -0
- package/dist/op/activities/env-teardown.js +110 -0
- package/dist/op/activities/factory.js +591 -0
- package/dist/op/activities/forge-pull-request.js +82 -0
- package/dist/op/activities/gh-host.js +78 -0
- package/dist/op/activities/guard-validate.js +165 -0
- package/dist/op/activities/http-check.js +40 -0
- package/dist/op/activities/index.js +59 -0
- package/dist/op/activities/lexicon-upgrade.js +629 -0
- package/dist/op/activities/lifecycle.js +109 -0
- package/dist/op/activities/pipeline-audit.js +147 -0
- package/dist/op/activities/policy.js +26 -0
- package/dist/op/activities/predict-behaviour.js +341 -0
- package/dist/op/activities/propose-upgrade.js +165 -0
- 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 +1011 -0
- package/dist/op/activities/shell.js +118 -0
- package/dist/op/activities/source-release.js +97 -0
- package/dist/op/activities/source-rollback.js +165 -0
- package/dist/op/activities/teardown.js +17 -0
- package/dist/op/activities/util.js +6 -0
- package/dist/op/activities/wait.js +51 -0
- package/dist/op/activities/work-evidence.js +35 -0
- package/dist/op/activities/workflow-audit.js +133 -0
- package/dist/op/activity-contract-registry.js +106 -0
- package/dist/op/activity-contract.js +232 -0
- package/dist/op/activity-failure.js +31 -0
- package/dist/op/activity-profiles.js +129 -0
- package/dist/op/activity-registry.js +105 -0
- package/dist/op/activity-runtime.js +28 -0
- package/dist/op/builders.d.ts +1 -1
- package/dist/op/builders.d.ts.map +1 -1
- package/dist/op/builders.js +801 -0
- package/dist/op/change-signal.js +118 -0
- package/dist/op/composites/apply-op.js +151 -0
- package/dist/op/composites/behaviour-op.js +65 -0
- package/dist/op/composites/converge-op.js +141 -0
- package/dist/op/composites/index.js +19 -0
- package/dist/op/composites/lexicon-upgrade-op.js +107 -0
- package/dist/op/composites/pipeline-audit-op.js +50 -0
- package/dist/op/composites/reconcile-op.js +84 -0
- package/dist/op/composites/watch-op.js +69 -0
- package/dist/op/composites/workflow-audit-op.js +57 -0
- package/dist/op/converge-rule.js +205 -0
- package/dist/op/cron.js +146 -0
- package/dist/op/decide-backend.js +181 -0
- package/dist/op/decide-config.js +68 -0
- package/dist/op/decide-read-inputs.js +141 -0
- package/dist/op/discover.d.ts.map +1 -1
- package/dist/op/discover.js +213 -0
- package/dist/op/duration.js +21 -0
- package/dist/op/emulator-freshness.js +80 -0
- package/dist/op/emulator-lifecycle.js +269 -0
- package/dist/op/factory.js +83 -0
- package/dist/op/gate-approval.js +172 -0
- package/dist/op/gate-name.js +86 -0
- package/dist/op/gate-plan-context.js +167 -0
- package/dist/op/gate-point-run.js +67 -0
- package/dist/op/gate-point.js +111 -0
- package/dist/op/gate-resume-plan.js +155 -0
- package/dist/op/gate-resume.js +31 -0
- package/dist/op/gate-review.js +290 -0
- package/dist/op/gate-run-locator.js +85 -0
- package/dist/op/gate-summary.js +100 -0
- package/dist/op/gate-wait.js +56 -0
- package/dist/op/gate.js +449 -0
- package/dist/op/generate-pipeline.js +124 -0
- package/dist/op/index.js +51 -0
- package/dist/op/lifecycle-receipt-store.js +45 -0
- package/dist/op/local-executor.js +1164 -0
- package/dist/op/local-output.js +140 -0
- package/dist/op/op-ir.js +317 -0
- package/dist/op/op-verb-class.js +131 -0
- package/dist/op/op-waves-notify.js +136 -0
- 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 +1657 -0
- package/dist/op/op-waves.js +409 -0
- package/dist/op/operator.js +743 -0
- package/dist/op/receipt-store.js +94 -0
- package/dist/op/resource.js +23 -0
- package/dist/op/run-context.js +28 -0
- package/dist/op/run-live.js +256 -0
- package/dist/op/runtime.js +21 -0
- package/dist/op/runtimes/local.js +195 -0
- package/dist/op/source-archive.js +131 -0
- package/dist/op/step-output-ref.js +397 -0
- package/dist/op/steward-beside.js +169 -0
- package/dist/op/steward-points.js +138 -0
- package/dist/op/steward-turn.js +59 -0
- package/dist/op/steward.js +317 -0
- package/dist/op/types.js +25 -0
- package/dist/op/work-lease-decl.js +81 -0
- package/dist/op/work-lease-run.js +393 -0
- package/dist/override-gate.js +284 -0
- package/dist/owner-chain.js +74 -0
- package/dist/ownership.js +92 -0
- package/dist/params.js +61 -0
- package/dist/plan-summary.js +711 -0
- package/dist/point-decision.js +211 -0
- package/dist/pr-forge.js +810 -0
- package/dist/pr-loop.js +203 -0
- package/dist/project-codegen.js +191 -0
- package/dist/project-root.js +74 -0
- package/dist/project-validation.js +50 -0
- package/dist/provenance.js +157 -0
- package/dist/pseudo-parameter.js +40 -0
- package/dist/reconcile.js +450 -0
- package/dist/resource-attributes.js +33 -0
- package/dist/runtime-adapter.js +77 -0
- package/dist/runtime.js +66 -0
- package/dist/secret-materialization.js +153 -0
- package/dist/secret-provenance.js +250 -0
- package/dist/serializer-walker.js +112 -0
- package/dist/serializer.js +1 -0
- package/dist/sort.js +45 -0
- package/dist/stack-output.js +115 -0
- package/dist/telemetry-attribution.js +149 -0
- package/dist/terraform/__fixtures__/build-graph.js +63 -0
- package/dist/terraform/adopt-state.js +40 -0
- package/dist/terraform/aws-resources.js +384 -0
- package/dist/terraform/bridge.js +204 -0
- package/dist/terraform/carve-provider.js +155 -0
- package/dist/terraform/carve.js +138 -0
- package/dist/terraform/data-source-shape.js +57 -0
- package/dist/terraform/emit-source.js +36 -0
- package/dist/terraform/excise.js +123 -0
- package/dist/terraform/graduate.js +128 -0
- package/dist/terraform/graph.js +435 -0
- package/dist/terraform/hcl2json.js +60 -0
- package/dist/terraform/manifest.js +149 -0
- package/dist/terraform/parse.js +81 -0
- package/dist/terraform/providers/aws.js +146 -0
- package/dist/terraform/providers/gcp.js +294 -0
- package/dist/terraform/providers/index.js +17 -0
- package/dist/terraform/providers/kubernetes.js +253 -0
- package/dist/terraform/score.js +151 -0
- package/dist/terraform/state.js +67 -0
- package/dist/terraform/tier-map.js +74 -0
- package/dist/terraform/types.js +13 -0
- package/dist/terraform/unified-diff.js +132 -0
- package/dist/testing.js +295 -0
- package/dist/toml-emit.js +153 -0
- package/dist/toml-parse.js +355 -0
- package/dist/toml-utils.js +60 -0
- package/dist/toml.js +428 -0
- package/dist/ts-loader.d.ts +46 -0
- package/dist/ts-loader.d.ts.map +1 -0
- package/dist/ts-loader.js +103 -0
- package/dist/types.js +1 -0
- package/dist/utils.js +61 -0
- package/dist/validation.js +20 -0
- package/dist/vendor/js-yaml-load.js +1662 -0
- 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 +119 -0
- package/dist/workspace/__fixtures__/decide-workspace.js +112 -0
- 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 +91 -0
- package/dist/workspace/__fixtures__/two-member-workspace.js +34 -0
- package/dist/workspace/agent-cli.js +99 -0
- package/dist/workspace/agent.schema.json +390 -0
- package/dist/workspace/answers-ledger.js +89 -0
- package/dist/workspace/box-cli.js +142 -0
- package/dist/workspace/box-factory-write.js +196 -0
- package/dist/workspace/box-factory-write.schema.json +342 -0
- package/dist/workspace/box-factory.js +88 -0
- package/dist/workspace/box-intent.js +126 -0
- package/dist/workspace/box-isolation.js +169 -0
- package/dist/workspace/box-listing-write.schema.json +204 -0
- package/dist/workspace/box-listing.js +298 -0
- package/dist/workspace/box-publish.js +352 -0
- package/dist/workspace/box-publish.schema.json +498 -0
- package/dist/workspace/box-services.js +39 -0
- package/dist/workspace/broker-protocol.js +359 -0
- package/dist/workspace/broker-protocol.schema.json +228 -0
- package/dist/workspace/change-set.schema.json +462 -0
- package/dist/workspace/changes-cli.js +56 -0
- package/dist/workspace/changes.js +446 -0
- package/dist/workspace/changes.schema.json +642 -0
- package/dist/workspace/chant-migrations/chud-lexicon-exit-fly-site.js +198 -0
- package/dist/workspace/chant-migrations/chud-lexicon-exit-live-names.js +155 -0
- package/dist/workspace/chant-migrations/chud-lexicon-exit-rollback.js +214 -0
- package/dist/workspace/chant-migrations/chud-lexicon-exit-ship-inputs.js +180 -0
- package/dist/workspace/chant-migrations/chud-lexicon-exit-ship-policy.js +99 -0
- package/dist/workspace/chant-migrations/chud-lexicon-exit.js +847 -0
- package/dist/workspace/chant-migrations.js +113 -0
- package/dist/workspace/check.schema.json +433 -0
- package/dist/workspace/checks/box-isolation.js +62 -0
- package/dist/workspace/checks/boxes.js +491 -0
- package/dist/workspace/checks/diagrams.js +104 -0
- package/dist/workspace/checks/generated.js +419 -0
- package/dist/workspace/checks/ledgers.js +212 -0
- package/dist/workspace/checks/links.js +191 -0
- package/dist/workspace/checks/live.js +100 -0
- package/dist/workspace/checks/pipelines.js +188 -0
- package/dist/workspace/checks/records.js +169 -0
- package/dist/workspace/checks.js +426 -0
- package/dist/workspace/ci-green-cli.js +125 -0
- package/dist/workspace/ci-green-forge.js +83 -0
- 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 +202 -0
- package/dist/workspace/ci-green.js +325 -0
- package/dist/workspace/ci-last-green.schema.json +158 -0
- 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/compose-graph.js +235 -0
- package/dist/workspace/compose-reports.js +146 -0
- package/dist/workspace/composites.js +264 -0
- package/dist/workspace/composites.schema.json +617 -0
- package/dist/workspace/conformance/__fixture__/app/package.json +7 -0
- package/dist/workspace/conformance/__fixture__/app/src/server.mjs +29 -0
- package/dist/workspace/conformance/__fixture__/decisions/decision.kind.mjs +54 -0
- package/dist/workspace/conformance/__fixture__/decisions/decision.schema.json +512 -0
- package/dist/workspace/conformance/__fixture__/decisions/fix-001-how-the-app-is-deployed.md +40 -0
- package/dist/workspace/conformance/__fixture__/delivery/chant.config.ts +7 -0
- package/dist/workspace/conformance/__fixture__/delivery/lexicon/index.ts +26 -0
- package/dist/workspace/conformance/__fixture__/delivery/package.json +7 -0
- package/dist/workspace/conformance/__fixture__/delivery/src/app.component.ts +14 -0
- package/dist/workspace/conformance/__fixture__/delivery/src/app.ts +4 -0
- package/dist/workspace/conformance/__fixtures__/reference-broker.js +205 -0
- package/dist/workspace/conformance/__writer_fixture__/answers/answer.kind.mjs +32 -0
- package/dist/workspace/conformance/__writer_fixture__/answers/answer.schema.json +135 -0
- package/dist/workspace/conformance/__writer_fixture__/contracts/contract.kind.mjs +37 -0
- package/dist/workspace/conformance/__writer_fixture__/contracts/contract.schema.json +213 -0
- package/dist/workspace/conformance/__writer_fixture__/decisions/points.json +228 -0
- package/dist/workspace/conformance/__writer_fixture__/drivers/driver.kind.mjs +15 -0
- package/dist/workspace/conformance/__writer_fixture__/drivers/driver.schema.json +38 -0
- package/dist/workspace/conformance/__writer_fixture__/sessions/session.kind.mjs +54 -0
- package/dist/workspace/conformance/__writer_fixture__/sessions/session.schema.json +289 -0
- package/dist/workspace/conformance/__writer_fixture__/work/W-001-the-writer-suite-works-this-item.md +25 -0
- package/dist/workspace/conformance/__writer_fixture__/work/work.kind.mjs +60 -0
- package/dist/workspace/conformance/__writer_fixture__/work/work.schema.json +603 -0
- package/dist/workspace/conformance/broker.js +736 -0
- package/dist/workspace/conformance/index.js +673 -0
- package/dist/workspace/conformance/vitest.js +108 -0
- package/dist/workspace/conformance/writer.js +1080 -0
- package/dist/workspace/decide.js +879 -0
- package/dist/workspace/decision-points.schema.json +135 -135
- package/dist/workspace/declaration-write-cli.js +74 -0
- package/dist/workspace/declaration-write.js +238 -0
- package/dist/workspace/declaration.js +938 -0
- package/dist/workspace/declaration.schema.json +1413 -1413
- package/dist/workspace/declared-kinds.js +106 -0
- package/dist/workspace/environments.js +164 -0
- package/dist/workspace/evidence.schema.json +279 -0
- package/dist/workspace/export-cli.js +185 -0
- package/dist/workspace/export.js +499 -0
- package/dist/workspace/factory-rules.js +175 -0
- package/dist/workspace/generated-files.js +92 -0
- package/dist/workspace/glob.js +45 -0
- package/dist/workspace/graph-cache.js +352 -0
- package/dist/workspace/graph-cli.js +348 -0
- package/dist/workspace/graph.schema.json +1338 -0
- package/dist/workspace/identity-gate-rule.js +75 -0
- package/dist/workspace/identity.js +126 -0
- package/dist/workspace/import.js +283 -0
- package/dist/workspace/init.js +620 -0
- package/dist/workspace/intent-cli.js +263 -0
- package/dist/workspace/intent-joins.js +201 -0
- package/dist/workspace/intent-record.js +352 -0
- package/dist/workspace/intent-record.schema.json +864 -0
- package/dist/workspace/intent.js +1582 -0
- package/dist/workspace/intent.schema.json +2420 -0
- package/dist/workspace/json-edit.js +221 -0
- package/dist/workspace/jsonc.js +235 -0
- package/dist/workspace/kind-readers.js +103 -0
- package/dist/workspace/kinds.d.ts +3 -7
- package/dist/workspace/kinds.d.ts.map +1 -1
- package/dist/workspace/kinds.js +553 -0
- package/dist/workspace/lexicon-symbols.js +112 -0
- package/dist/workspace/lineage-adopt-cli.js +102 -0
- package/dist/workspace/lineage-adopt.js +360 -0
- package/dist/workspace/lineage-check.js +282 -0
- package/dist/workspace/lineage-cli.js +121 -0
- package/dist/workspace/lineage-hash-index.js +284 -0
- package/dist/workspace/lineage-init.js +507 -0
- package/dist/workspace/lineage-lock.js +387 -0
- package/dist/workspace/lineage-merge.js +45 -0
- package/dist/workspace/lineage-migrations.d.ts.map +1 -1
- package/dist/workspace/lineage-migrations.js +329 -0
- package/dist/workspace/lineage-provenance.js +36 -0
- package/dist/workspace/lineage-update.js +138 -0
- package/dist/workspace/lineage-upgrade-cli.js +131 -0
- package/dist/workspace/lineage-upgrade.js +889 -0
- package/dist/workspace/lineage-vendor.js +171 -0
- package/dist/workspace/lineage-version.js +128 -0
- package/dist/workspace/lineage-versions.js +275 -0
- package/dist/workspace/links.js +330 -0
- package/dist/workspace/ls-generated.js +95 -0
- package/dist/workspace/ls.js +277 -0
- package/dist/workspace/ls.schema.json +333 -0
- package/dist/workspace/member-commands.js +508 -0
- package/dist/workspace/member-handles.js +216 -0
- package/dist/workspace/member-pipeline.js +258 -0
- package/dist/workspace/member-run.js +117 -0
- package/dist/workspace/member-write.schema.json +193 -0
- package/dist/workspace/nested-graph.js +156 -0
- package/dist/workspace/nesting.js +38 -0
- package/dist/workspace/patch.js +301 -0
- package/dist/workspace/patch.schema.json +321 -0
- package/dist/workspace/pin-cli.js +55 -0
- package/dist/workspace/pin-integrity.js +100 -0
- package/dist/workspace/plan-summary.schema.json +155 -0
- package/dist/workspace/point-answer.schema.json +129 -129
- package/dist/workspace/points-cli.js +291 -0
- package/dist/workspace/points-write.schema.json +660 -0
- package/dist/workspace/points.js +521 -0
- package/dist/workspace/points.schema.json +916 -0
- package/dist/workspace/pr-report.schema.json +108 -0
- 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 +162 -0
- package/dist/workspace/reason-codes.js +326 -0
- package/dist/workspace/record-assets.js +151 -0
- package/dist/workspace/record-decided.js +105 -0
- package/dist/workspace/record-sessions.js +96 -0
- package/dist/workspace/record-source.js +114 -0
- package/dist/workspace/records-amend.schema.json +284 -0
- package/dist/workspace/records-checkout.js +76 -0
- package/dist/workspace/records-cli.js +707 -0
- package/dist/workspace/records-close.js +116 -0
- package/dist/workspace/records-close.schema.json +278 -0
- package/dist/workspace/records-new.schema.json +202 -0
- package/dist/workspace/records-review.schema.json +367 -0
- package/dist/workspace/records-since.js +317 -0
- package/dist/workspace/records-since.schema.json +218 -0
- package/dist/workspace/records-write.js +1229 -0
- package/dist/workspace/records.js +1345 -0
- package/dist/workspace/records.schema.json +604 -0
- package/dist/workspace/reference-kinds/app/package.json +10 -0
- package/dist/workspace/reference-kinds/app/workspace-kinds.json +45 -0
- package/dist/workspace/returns.js +303 -0
- package/dist/workspace/root-refusal.js +75 -0
- package/dist/workspace/run-statement.schema.json +622 -0
- package/dist/workspace/runs-cli.js +584 -0
- package/dist/workspace/runs-write.schema.json +994 -0
- package/dist/workspace/runs.js +708 -0
- package/dist/workspace/runs.schema.json +1257 -0
- package/dist/workspace/runtimes.js +76 -0
- package/dist/workspace/session-kinds.js +83 -0
- package/dist/workspace/signers.schema.json +206 -0
- package/dist/workspace/source-block.js +125 -0
- package/dist/workspace/squash.js +177 -0
- package/dist/workspace/status-gates.js +162 -0
- package/dist/workspace/status-stewards.js +330 -0
- package/dist/workspace/status.js +514 -0
- package/dist/workspace/status.schema.json +998 -0
- package/dist/workspace/steward-index.js +191 -0
- package/dist/workspace/symbols.js +188 -0
- package/dist/workspace/template-manifest.js +227 -0
- package/dist/workspace/template-pins.js +115 -0
- package/dist/workspace/trailer-joins.js +65 -0
- package/dist/workspace/trailers.js +111 -0
- package/dist/workspace/tree.js +136 -0
- package/dist/workspace/trust/attestor.js +63 -0
- package/dist/workspace/trust/dsse.js +108 -0
- package/dist/workspace/trust/evidence-cli.js +175 -0
- package/dist/workspace/trust/evidence.js +161 -0
- package/dist/workspace/trust/gate-seal.js +226 -0
- package/dist/workspace/trust/policy.js +190 -0
- package/dist/workspace/trust/provenance.js +180 -0
- package/dist/workspace/trust/rotation.js +298 -0
- package/dist/workspace/trust/run-commits.js +101 -0
- package/dist/workspace/trust/run-statement.js +182 -0
- package/dist/workspace/trust/seal.js +272 -0
- package/dist/workspace/trust/signers-cli.js +152 -0
- package/dist/workspace/trust/ssh-commit.js +178 -0
- package/dist/workspace/trust/test-repo.js +118 -0
- package/dist/workspace/trust/trust-files.js +193 -0
- package/dist/workspace/trust/verify-cli.js +63 -0
- package/dist/workspace/trust/verify.js +192 -0
- package/dist/workspace/which-chant.js +141 -0
- package/dist/workspace/wip-cli.js +95 -0
- package/dist/workspace/wip-write.schema.json +504 -0
- package/dist/workspace/wip.js +631 -0
- package/dist/workspace/wip.schema.json +334 -0
- package/dist/workspace/work-cli.js +448 -0
- package/dist/workspace/work-evidence.js +122 -0
- package/dist/workspace/work-evidence.schema.json +222 -0
- package/dist/workspace/work-history.schema.json +421 -0
- package/dist/workspace/work-lease.schema.json +246 -0
- package/dist/workspace/work-size.js +77 -0
- package/dist/workspace/work.js +283 -0
- package/dist/workspace/workspace-kinds.schema.json +259 -259
- package/dist/workspace/workspace-principals.schema.json +53 -53
- package/dist/workspace/write-lock-cli.js +105 -0
- package/dist/workspace/write-lock.js +424 -0
- package/dist/workspace/write-lock.schema.json +172 -0
- package/dist/workspace/write-scope.js +484 -0
- package/dist/yaml.js +459 -0
- package/package.json +2 -2
- 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/cli/commands/check-lexicon-plugin.ts +2 -0
- package/src/cli/commands/lint.ts +3 -0
- package/src/cli/commands/migrate.ts +2 -0
- package/src/cli/compiled-cli.e2e.test.ts +165 -0
- package/src/cli/main.ts +121 -27
- package/src/cli/mcp/workspace-tools.ts +1 -1
- package/src/codegen/pinned-upgrade.ts +2 -0
- package/src/components/discover.ts +2 -0
- package/src/components/pr-pipeline.ts +3 -2
- package/src/components/sandbox/driver.ts +3 -1
- package/src/composite.ts +15 -3
- package/src/config-import.ts +3 -0
- package/src/discovery/collect.ts +15 -1
- package/src/discovery/fold-build-parity.test.ts +71 -0
- package/src/discovery/fold-import.ts +25 -127
- package/src/discovery/fold-project-provenance.test.ts +21 -4
- package/src/discovery/host-composite.ts +101 -0
- package/src/discovery/import.ts +2 -0
- package/src/discovery/index.ts +11 -1
- package/src/discovery/sandbox/driver.ts +3 -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/lexicon-module.ts +3 -0
- 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/lint/config.ts +1 -1
- package/src/lint/discover.ts +28 -8
- package/src/lint/policy-import.ts +4 -1
- package/src/lint/rule-loader.ts +2 -0
- 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/discover.ts +3 -0
- 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/ts-loader.test.ts +23 -0
- package/src/ts-loader.ts +122 -0
- 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/chant-migrations/chud-lexicon-exit.ts +1 -1
- 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/declaration.ts +1 -1
- package/src/workspace/kinds.ts +7 -36
- package/src/workspace/lineage-migrations.ts +2 -0
- package/src/workspace/points.ts +1 -1
- package/src/workspace/principal-classes.ts +12 -95
- 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
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { describe, expect, test } from "vitest";
|
|
2
|
+
import {
|
|
3
|
+
assertGitlabBranch,
|
|
4
|
+
CI_IMAGE,
|
|
5
|
+
gitlabRules,
|
|
6
|
+
githubSecret,
|
|
7
|
+
githubSecretEnv,
|
|
8
|
+
githubSecretOrJobToken,
|
|
9
|
+
pushBranches,
|
|
10
|
+
triggerBranches,
|
|
11
|
+
} from "./ci-jobs";
|
|
12
|
+
import { PR_LOOP_IMAGE } from "./components/pr-pipeline";
|
|
13
|
+
|
|
14
|
+
describe("the job primitives the CI generators share (#3765)", () => {
|
|
15
|
+
test("one default image, which the pull-request pipeline uses too", () => {
|
|
16
|
+
expect(CI_IMAGE).toBe("node:22");
|
|
17
|
+
expect(PR_LOOP_IMAGE).toBe(CI_IMAGE);
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
test("a push trigger with no branches, or an empty list, filters on main; a pull_request trigger then takes every branch", () => {
|
|
21
|
+
expect(pushBranches(undefined)).toEqual(["main"]);
|
|
22
|
+
expect(pushBranches([])).toEqual(["main"]);
|
|
23
|
+
expect(pushBranches(["trunk"])).toEqual(["trunk"]);
|
|
24
|
+
expect(triggerBranches({ kind: "push", branches: [] })).toEqual(["main"]);
|
|
25
|
+
expect(triggerBranches({ kind: "pull_request", branches: [] })).toBeUndefined();
|
|
26
|
+
expect(triggerBranches({ kind: "pull_request", branches: ["main"] })).toEqual(["main"]);
|
|
27
|
+
expect(triggerBranches({ kind: "cron", schedule: "0 * * * *" })).toBeUndefined();
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
test("a secret, and a secret that falls back to the job token when unset (#3624)", () => {
|
|
31
|
+
expect(githubSecret("T")).toBe("${{ secrets.T }}");
|
|
32
|
+
expect(githubSecretOrJobToken("T")).toBe("${{ secrets.T || github.token }}");
|
|
33
|
+
expect(githubSecretEnv(["A", "B"])).toEqual({ A: "${{ secrets.A }}", B: "${{ secrets.B }}" });
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
test("GitLab rules: one entry per branch, and a branch that would break the expression is refused", () => {
|
|
37
|
+
const selector = { variable: "CHANT_SCHEDULED_OP", value: "watch" };
|
|
38
|
+
expect(gitlabRules("Scheduled Op \"apply\"", { kind: "push", branches: ["main", "prod"] }, selector)).toEqual([
|
|
39
|
+
{ if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "main"' },
|
|
40
|
+
{ if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "prod"' },
|
|
41
|
+
]);
|
|
42
|
+
expect(gitlabRules("x", { kind: "pull_request", branches: [] }, selector)).toEqual([{ if: '$CI_PIPELINE_SOURCE == "merge_request_event"' }]);
|
|
43
|
+
expect(gitlabRules("x", { kind: "cron", schedule: "0 * * * *" }, selector)).toEqual([
|
|
44
|
+
{ if: '$CI_PIPELINE_SOURCE == "schedule" && $CHANT_SCHEDULED_OP == "watch"' },
|
|
45
|
+
]);
|
|
46
|
+
expect(() => assertGitlabBranch("Op waves \"w\"", "a$b")).toThrow(/Op waves "w" filters on branch "a\$b"/);
|
|
47
|
+
expect(() => assertGitlabBranch("Op waves \"w\"", " ")).toThrow(/empty branch filter/);
|
|
48
|
+
});
|
|
49
|
+
});
|
package/src/ci-jobs.ts
ADDED
|
@@ -0,0 +1,515 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The job primitives chant's three CI generators share (#3765): the scheduled
|
|
3
|
+
* Op pipeline (`generateOpsPipeline`), the Op waves pipeline
|
|
4
|
+
* (`generateOpWavesPipeline`) and the component pipeline (`chant build
|
|
5
|
+
* --components --generate`, with `--pr-loop`, `--wave-gate` and
|
|
6
|
+
* `--promote-to`). Each forge lexicon builds its documents from these, so a
|
|
7
|
+
* trigger, a token, a permission rule or an image default is decided once:
|
|
8
|
+
*
|
|
9
|
+
* - the image a generated job runs in, {@link CI_IMAGE};
|
|
10
|
+
* - the branches a trigger filters on, {@link triggerBranches};
|
|
11
|
+
* - the job token and secret expressions of GitHub Actions and Forgejo
|
|
12
|
+
* Actions, {@link GITHUB_JOB_TOKEN} and {@link githubSecret};
|
|
13
|
+
* - the `permissions:` a finding-mode needs and the rules for adding to it,
|
|
14
|
+
* {@link permissionsFor} and {@link mergePermissions};
|
|
15
|
+
* - the `setup` steps and `environment` a job may carry, checked once per
|
|
16
|
+
* forge ({@link assertSetupSteps}, {@link assertEnvironment},
|
|
17
|
+
* {@link gitlabSetupScript}, {@link assertGitlabEnvironment});
|
|
18
|
+
* - GitLab's `rules:` expressions and `id_tokens:` declaration.
|
|
19
|
+
*
|
|
20
|
+
* The Forgejo dialect (action refs, dropped `permissions:` and
|
|
21
|
+
* `environment:`, the header note naming what was dropped) is the forgejo
|
|
22
|
+
* lexicon's, in its `components/ci-jobs.ts`, since the transform it applies
|
|
23
|
+
* lives there.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
import type { OpEnvironment, OpFindingMode, OpSetupStep, OpTrigger } from "./lexicon";
|
|
27
|
+
|
|
28
|
+
// ── Every forge ─────────────────────────────────────────────────────────────
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* The image every generated job runs in unless the caller names another. It
|
|
32
|
+
* carries node and npm, which `chant` needs, and git, which a job that reads
|
|
33
|
+
* the base commit or pushes to `chant/lifecycle` needs (#3789).
|
|
34
|
+
*/
|
|
35
|
+
export const CI_IMAGE = "node:22";
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* The branch a `push` trigger filters on when it names none. A generator
|
|
39
|
+
* works from a spec, not a checkout, so it cannot read a project's real
|
|
40
|
+
* default branch; a project on another one names it.
|
|
41
|
+
*/
|
|
42
|
+
export const DEFAULT_BRANCH = "main";
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* The branches a push trigger filters on: the ones given, or
|
|
46
|
+
* {@link DEFAULT_BRANCH} when none are. An empty list is none, on every
|
|
47
|
+
* forge.
|
|
48
|
+
*/
|
|
49
|
+
export function pushBranches(branches: readonly string[] | undefined): string[] {
|
|
50
|
+
return branches && branches.length > 0 ? [...branches] : [DEFAULT_BRANCH];
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* The branches a trigger filters on: a `pull_request` trigger's list, or
|
|
55
|
+
* undefined for every branch; a `push` trigger's, with {@link pushBranches}'
|
|
56
|
+
* default; none for `cron`.
|
|
57
|
+
*/
|
|
58
|
+
export function triggerBranches(trigger: OpTrigger): string[] | undefined {
|
|
59
|
+
switch (trigger.kind) {
|
|
60
|
+
case "cron":
|
|
61
|
+
return undefined;
|
|
62
|
+
case "pull_request":
|
|
63
|
+
return trigger.branches && trigger.branches.length > 0 ? [...trigger.branches] : undefined;
|
|
64
|
+
case "push":
|
|
65
|
+
return pushBranches(trigger.branches);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/** A job id every forge accepts, from a kebab- or camel-cased name. */
|
|
70
|
+
export function ciJobName(name: string): string {
|
|
71
|
+
return name.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/** A command template with each `{name}` part filled in. */
|
|
75
|
+
export function fillCommand(template: readonly string[], name: string): string[] {
|
|
76
|
+
return template.map((part) => part.replace("{name}", name));
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/** `{ [key]: map }` when the map has an entry, else `{}`: for spreading an optional mapping into a document. */
|
|
80
|
+
export function nonEmpty<K extends string, V>(key: K, map: Record<string, V> | undefined): { [P in K]?: Record<string, V> } {
|
|
81
|
+
return map && Object.keys(map).length > 0 ? ({ [key]: map } as { [P in K]: Record<string, V> }) : {};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* A job's `environment:` mapping. Always the mapping form, never the string
|
|
86
|
+
* shorthand, so adding a `url` later is a new key rather than a reshaped
|
|
87
|
+
* value. GitHub and GitLab read the same two keys.
|
|
88
|
+
*/
|
|
89
|
+
export function environmentDoc(environment: OpEnvironment): { name: string; url?: string } {
|
|
90
|
+
return { name: environment.name, ...(environment.url === undefined ? {} : { url: environment.url }) };
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/** The directory part of a relative path, `.` when there is none. */
|
|
94
|
+
export function dirnameOf(path: string): string {
|
|
95
|
+
const i = path.lastIndexOf("/");
|
|
96
|
+
return i <= 0 ? "." : path.slice(0, i);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// ── GitHub Actions and Forgejo Actions ──────────────────────────────────────
|
|
100
|
+
|
|
101
|
+
/** The runner label a generated job asks for; the Forgejo dialect rewrites it to the project's label. */
|
|
102
|
+
export const GITHUB_RUNNER = "ubuntu-latest";
|
|
103
|
+
|
|
104
|
+
/** The job token, which GitHub and Forgejo both mint for every run. */
|
|
105
|
+
export const GITHUB_JOB_TOKEN = "${{ github.token }}";
|
|
106
|
+
|
|
107
|
+
/** A repository secret, by name. */
|
|
108
|
+
export function githubSecret(name: string): string {
|
|
109
|
+
return `\${{ secrets.${name} }}`;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* A repository secret, or the job token when the secret is unset (#3624). An
|
|
114
|
+
* unset secret reads as the empty string, so a workflow generated for a
|
|
115
|
+
* production token still runs in a fork or a fresh repository, with what the
|
|
116
|
+
* job token may do.
|
|
117
|
+
*/
|
|
118
|
+
export function githubSecretOrJobToken(name: string): string {
|
|
119
|
+
return `\${{ secrets.${name} || github.token }}`;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/** Each name mapped from the repository secret of the same name. */
|
|
123
|
+
export function githubSecretEnv(names: readonly string[]): Record<string, string> {
|
|
124
|
+
return Object.fromEntries(names.map((n) => [n, githubSecret(n)]));
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Least-privilege `permissions:` for a finding-mode. `report` needs no write
|
|
129
|
+
* access; `issue` needs only `issues: write`; `pull-request` (and
|
|
130
|
+
* `merge-request`, generated the same way when a GitLab-authored spec is
|
|
131
|
+
* targeted at github) needs `contents: write` to push the reconcile branch
|
|
132
|
+
* plus `pull-requests: write` to open the PR. `comment` changes nothing in
|
|
133
|
+
* the repository, so its whole scope is `{ contents: read, pull-requests:
|
|
134
|
+
* write }`.
|
|
135
|
+
*/
|
|
136
|
+
export function permissionsForMode(mode: OpFindingMode): Record<string, "read" | "write"> {
|
|
137
|
+
switch (mode) {
|
|
138
|
+
case "issue":
|
|
139
|
+
return { contents: "read", issues: "write" };
|
|
140
|
+
case "comment":
|
|
141
|
+
return { contents: "read", "pull-requests": "write" };
|
|
142
|
+
case "pull-request":
|
|
143
|
+
case "merge-request":
|
|
144
|
+
return { contents: "write", "pull-requests": "write" };
|
|
145
|
+
case "report":
|
|
146
|
+
return { contents: "read" };
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* {@link permissionsForMode} on a trigger. A `pull_request` trigger reports
|
|
152
|
+
* its finding as a comment on the triggering PR itself (#2084): any mode but
|
|
153
|
+
* `report` posts something to act on a finding, so on that trigger every
|
|
154
|
+
* such mode also gets `pull-requests: write` for the comment.
|
|
155
|
+
*/
|
|
156
|
+
export function permissionsFor(mode: OpFindingMode, trigger: OpTrigger): Record<string, "read" | "write"> {
|
|
157
|
+
const base = permissionsForMode(mode);
|
|
158
|
+
if (trigger.kind === "pull_request" && mode !== "report") return { ...base, "pull-requests": "write" };
|
|
159
|
+
return base;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Every scope `GITHUB_TOKEN` accepts in a workflow's `permissions:` mapping,
|
|
164
|
+
* kebab-cased as GitHub spells them. An additive scope outside this set is
|
|
165
|
+
* refused by name rather than emitted: GitHub ignores an unknown key, so
|
|
166
|
+
* `id_token` or `idToken` would generate a workflow that looks like it grants
|
|
167
|
+
* OIDC and hands the run no token at all.
|
|
168
|
+
*/
|
|
169
|
+
export const GITHUB_TOKEN_SCOPES: ReadonlySet<string> = new Set([
|
|
170
|
+
"actions",
|
|
171
|
+
"attestations",
|
|
172
|
+
"checks",
|
|
173
|
+
"contents",
|
|
174
|
+
"deployments",
|
|
175
|
+
"discussions",
|
|
176
|
+
"id-token",
|
|
177
|
+
"issues",
|
|
178
|
+
"models",
|
|
179
|
+
"packages",
|
|
180
|
+
"pages",
|
|
181
|
+
"pull-requests",
|
|
182
|
+
"repository-projects",
|
|
183
|
+
"security-events",
|
|
184
|
+
"statuses",
|
|
185
|
+
]);
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Merge a spec's additive `permissions` over the finding-mode's own set
|
|
189
|
+
* (#2242), refusing by name anything that is not strictly additive:
|
|
190
|
+
*
|
|
191
|
+
* - a blanket `write-all`/`read-all`, in either the key or the value
|
|
192
|
+
* position, which is the exact thing {@link permissionsForMode} exists to
|
|
193
|
+
* avoid;
|
|
194
|
+
* - a scope GitHub does not define ({@link GITHUB_TOKEN_SCOPES}), because
|
|
195
|
+
* GitHub ignores the key and the run silently gets nothing;
|
|
196
|
+
* - a scope the mode already grants, at any value — additive means additive,
|
|
197
|
+
* so this can neither downgrade `contents: write` to read nor restate it.
|
|
198
|
+
* A mode whose set is wrong is fixed by changing the mode, where the
|
|
199
|
+
* scope and the behavior that spends it stay together;
|
|
200
|
+
* - `pull-requests: write` on a trigger with no pull request. Pull-request
|
|
201
|
+
* access is what the finding-modes own: `pull-request` grants it together
|
|
202
|
+
* with the `contents: write` needed to push the branch first, and
|
|
203
|
+
* `comment` grants it on the one trigger that carries a pull request to
|
|
204
|
+
* comment on. Adding it beside a mode that posts nothing, on a cron or
|
|
205
|
+
* push run, grants write access no step in the generated job can spend.
|
|
206
|
+
*/
|
|
207
|
+
export function mergePermissions(
|
|
208
|
+
name: string,
|
|
209
|
+
base: Record<string, "read" | "write">,
|
|
210
|
+
additive: Record<string, "read" | "write">,
|
|
211
|
+
trigger: OpTrigger,
|
|
212
|
+
): Record<string, "read" | "write"> {
|
|
213
|
+
const merged: Record<string, "read" | "write"> = { ...base };
|
|
214
|
+
for (const [rawScope, value] of Object.entries(additive)) {
|
|
215
|
+
const scope = rawScope.trim();
|
|
216
|
+
const where = `Scheduled Op "${name}" adds permission "${scope}: ${value}"`;
|
|
217
|
+
if (scope === "write-all" || scope === "read-all" || String(value).endsWith("-all")) {
|
|
218
|
+
throw new Error(
|
|
219
|
+
`${where}, a blanket grant. \`permissions\` on a scheduled Op is additive over the ` +
|
|
220
|
+
`least-privilege set its finding-mode needs, one named scope at a time. Name the scopes the ` +
|
|
221
|
+
`job actually spends (e.g. { "id-token": "write" }).`,
|
|
222
|
+
);
|
|
223
|
+
}
|
|
224
|
+
if (!GITHUB_TOKEN_SCOPES.has(scope)) {
|
|
225
|
+
throw new Error(
|
|
226
|
+
`${where}, which is not a GITHUB_TOKEN permission scope. GitHub ignores an unrecognized key, so ` +
|
|
227
|
+
`this would emit a workflow that reads as granted and hands the run nothing. Known scopes: ` +
|
|
228
|
+
`${[...GITHUB_TOKEN_SCOPES].sort().join(", ")}.`,
|
|
229
|
+
);
|
|
230
|
+
}
|
|
231
|
+
if (scope in base) {
|
|
232
|
+
throw new Error(
|
|
233
|
+
`${where}, but its finding-mode already grants "${scope}: ${base[scope]}". These permissions are ` +
|
|
234
|
+
`additive only — they never replace, widen or downgrade a scope the mode computed. Change the ` +
|
|
235
|
+
`Op's findingMode if that set is wrong, and add only scopes no mode grants (e.g. "id-token").`,
|
|
236
|
+
);
|
|
237
|
+
}
|
|
238
|
+
if (scope === "pull-requests" && trigger.kind !== "pull_request") {
|
|
239
|
+
throw new Error(
|
|
240
|
+
`${where}, but this Op's trigger is "${trigger.kind}", which carries no pull request. Pull-request ` +
|
|
241
|
+
`write access belongs to a finding-mode: "pull-request" grants it with the contents: write its ` +
|
|
242
|
+
`branch push needs, and "comment" grants it on the pull_request trigger. Set findingMode instead ` +
|
|
243
|
+
`of adding the scope here.`,
|
|
244
|
+
);
|
|
245
|
+
}
|
|
246
|
+
merged[scope] = value;
|
|
247
|
+
}
|
|
248
|
+
return merged;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* Refs that name an action repository's own default branch. A generated
|
|
253
|
+
* workflow is committed once and then re-run unattended, often over a cloud
|
|
254
|
+
* role, so "whatever was pushed to that repo last" is not a version — the
|
|
255
|
+
* code that assumes the role can change between the run somebody reviewed and
|
|
256
|
+
* the next one. A release channel the action's author cuts deliberately (`v6`,
|
|
257
|
+
* `v6.2.4`, `stable`) or a commit sha is a version, and both pass.
|
|
258
|
+
*/
|
|
259
|
+
const DEFAULT_BRANCH_REFS = new Set(["main", "master", "head", "default"]);
|
|
260
|
+
|
|
261
|
+
/** `owner/repo` or `owner/repo/subpath`, then `@ref`. */
|
|
262
|
+
const USES_PATTERN = /^([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+)((?:\/[A-Za-z0-9_.-]+)*)@([^\s@]+)$/;
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Validate a `setup` list for GitHub or Forgejo Actions (#2242). A `run`
|
|
266
|
+
* entry needs a non-empty line and nothing else. A `uses` entry has to be a
|
|
267
|
+
* pinned `owner/repo[/subpath]@ref`: no bare `owner/repo`, since an unpinned
|
|
268
|
+
* action resolves to its default branch, and no ref in
|
|
269
|
+
* {@link DEFAULT_BRANCH_REFS} for the same reason spelled out loud. Local
|
|
270
|
+
* (`./path`) and container (`docker://`) refs are refused too — they are
|
|
271
|
+
* legal GitHub Actions, but the generator emits a workflow into a repository
|
|
272
|
+
* it has never seen, so it cannot know a local path resolves there.
|
|
273
|
+
*/
|
|
274
|
+
export function assertSetupSteps(name: string, setup: OpSetupStep[]): void {
|
|
275
|
+
setup.forEach((step, index) => {
|
|
276
|
+
const where = `Scheduled Op "${name}" setup step ${index + 1}`;
|
|
277
|
+
if ("uses" in step) {
|
|
278
|
+
const ref = step.uses.trim();
|
|
279
|
+
const match = USES_PATTERN.exec(ref);
|
|
280
|
+
if (!match) {
|
|
281
|
+
throw new Error(
|
|
282
|
+
`${where} has \`uses: "${step.uses}"\`, which is not a pinned action reference. ` +
|
|
283
|
+
`Write it as owner/repo@ref (optionally owner/repo/subpath@ref), e.g. ` +
|
|
284
|
+
`"aws-actions/configure-aws-credentials@v6". A local "./path" or "docker://" ref is not ` +
|
|
285
|
+
`accepted here: this generator emits a workflow into a repository it cannot inspect, so it ` +
|
|
286
|
+
`has no way to tell whether such a ref resolves there.`,
|
|
287
|
+
);
|
|
288
|
+
}
|
|
289
|
+
const gitRef = match[4];
|
|
290
|
+
if (DEFAULT_BRANCH_REFS.has(gitRef.toLowerCase())) {
|
|
291
|
+
throw new Error(
|
|
292
|
+
`${where} pins \`uses: "${step.uses}"\` to "${gitRef}", the action repository's own default ` +
|
|
293
|
+
`branch, which names whatever was pushed there last rather than a version. A generated ` +
|
|
294
|
+
`workflow is committed once and re-run unattended, often over a cloud role, so pin a release ` +
|
|
295
|
+
`tag or a commit sha instead (e.g. "${match[1]}/${match[2]}@v1" or "@<40-char sha>").`,
|
|
296
|
+
);
|
|
297
|
+
}
|
|
298
|
+
return;
|
|
299
|
+
}
|
|
300
|
+
if (step.run.trim() === "") {
|
|
301
|
+
throw new Error(`${where} has an empty \`run\` line. Give it a command, or drop the entry.`);
|
|
302
|
+
}
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/** One setup entry as a GitHub Actions step: `with:` and `env:` only when they hold something. */
|
|
307
|
+
export function setupStepDoc(step: OpSetupStep): Record<string, unknown> {
|
|
308
|
+
if ("uses" in step) {
|
|
309
|
+
return {
|
|
310
|
+
uses: step.uses,
|
|
311
|
+
...nonEmpty("with", step.with),
|
|
312
|
+
...nonEmpty("env", step.env),
|
|
313
|
+
};
|
|
314
|
+
}
|
|
315
|
+
return { run: step.run, ...nonEmpty("env", step.env) };
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* Validate an `environment` for GitHub Actions (#2257). GitHub creates an
|
|
320
|
+
* environment it has never seen on first use rather than failing the run,
|
|
321
|
+
* and an environment created that way carries no protection rules at all —
|
|
322
|
+
* so a job can name one and read as gated while being gated by nothing.
|
|
323
|
+
* Neither the generator nor GitHub can tell those apart at build time, which
|
|
324
|
+
* is why what is refused here is only the shape that could never bind: a
|
|
325
|
+
* name that is blank, and a `url` that is neither absolute nor an expression
|
|
326
|
+
* the forge resolves.
|
|
327
|
+
*/
|
|
328
|
+
export function assertEnvironment(name: string, environment: OpEnvironment): void {
|
|
329
|
+
const where = `Scheduled Op "${name}" environment`;
|
|
330
|
+
if (environment.name.trim() === "") {
|
|
331
|
+
throw new Error(
|
|
332
|
+
`${where} has an empty \`name\`. An environment is named repository configuration — the ` +
|
|
333
|
+
`protection rules and reviewers live on the environment, not in this workflow — so there is ` +
|
|
334
|
+
`nothing for a blank name to resolve to. Give it the environment's name, or drop the option.`,
|
|
335
|
+
);
|
|
336
|
+
}
|
|
337
|
+
if (environment.url === undefined) return;
|
|
338
|
+
const url = environment.url.trim();
|
|
339
|
+
if (url === "") {
|
|
340
|
+
throw new Error(`${where} "${environment.name}" has an empty \`url\`. Omit the field rather than setting it to "".`);
|
|
341
|
+
}
|
|
342
|
+
if (!/^https?:\/\//.test(url) && !url.includes("${{")) {
|
|
343
|
+
throw new Error(
|
|
344
|
+
`${where} "${environment.name}" has \`url: "${environment.url}"\`, which is neither an absolute ` +
|
|
345
|
+
`http(s) URL nor a \${{ }} expression. GitHub renders this value as the deployment's own link, ` +
|
|
346
|
+
`so a relative path becomes a dead link on the environment page rather than an error anywhere. ` +
|
|
347
|
+
`Write the full URL, or an expression the run resolves to one.`,
|
|
348
|
+
);
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
// ── GitLab CI ───────────────────────────────────────────────────────────────
|
|
353
|
+
|
|
354
|
+
/** The pipeline source GitLab reports for a merge-request pipeline. */
|
|
355
|
+
export const GITLAB_MERGE_REQUEST_SOURCE = '$CI_PIPELINE_SOURCE == "merge_request_event"';
|
|
356
|
+
|
|
357
|
+
/** The pipeline source GitLab reports for a pipeline schedule. */
|
|
358
|
+
export const GITLAB_SCHEDULE_SOURCE = '$CI_PIPELINE_SOURCE == "schedule"';
|
|
359
|
+
|
|
360
|
+
/** A job variable that makes the runner clone the whole history, which a job reading the base commit needs. */
|
|
361
|
+
export const GITLAB_FULL_HISTORY = { GIT_DEPTH: "0" } as const;
|
|
362
|
+
|
|
363
|
+
/** The `rules:` if-expression for a push to `branch`, a quoted name or an expression such as `$CI_DEFAULT_BRANCH`. */
|
|
364
|
+
export function gitlabPushRule(branch: string): string {
|
|
365
|
+
return `$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == ${branch}`;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* Refuse a branch name that cannot be interpolated into a `rules:`
|
|
370
|
+
* if-expression. The expression is a string GitLab parses, so a `"` would end
|
|
371
|
+
* it early and a `$` would expand as a variable — either one silently changes
|
|
372
|
+
* which pipelines match the job, which is worse than not generating it.
|
|
373
|
+
* `subject` names what filters, such as `Scheduled Op "apply"`.
|
|
374
|
+
*/
|
|
375
|
+
export function assertGitlabBranch(subject: string, branch: string): void {
|
|
376
|
+
if (branch.trim() === "") {
|
|
377
|
+
throw new Error(`${subject} has an empty branch filter. Name a branch, or drop the filter.`);
|
|
378
|
+
}
|
|
379
|
+
if (/["$\\]/.test(branch)) {
|
|
380
|
+
throw new Error(
|
|
381
|
+
`${subject} filters on branch "${branch}", which carries a character this generator ` +
|
|
382
|
+
`cannot put in a GitLab \`rules:\` expression: a quote would end the expression early and a "$" ` +
|
|
383
|
+
`would expand as a CI/CD variable, either of which silently changes which pipelines run the job. ` +
|
|
384
|
+
`Name a branch without \`"\`, \`$\` or \`\\\`.`,
|
|
385
|
+
);
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* One `rules:` entry per branch a trigger filters on, each checked by
|
|
391
|
+
* {@link assertGitlabBranch}. Two or more branches are two or more entries:
|
|
392
|
+
* `rules:` is an OR over its list, which is how GitLab spells the alternation
|
|
393
|
+
* github expresses as a `branches:` array. A cron trigger is selected by
|
|
394
|
+
* `selector`, the CI/CD variable a pipeline schedule sets, and the Op's name.
|
|
395
|
+
*/
|
|
396
|
+
export function gitlabRules(subject: string, trigger: OpTrigger, selector: { variable: string; value: string }): Array<{ if: string }> {
|
|
397
|
+
switch (trigger.kind) {
|
|
398
|
+
case "cron":
|
|
399
|
+
return [{ if: `${GITLAB_SCHEDULE_SOURCE} && $${selector.variable} == "${selector.value}"` }];
|
|
400
|
+
case "pull_request": {
|
|
401
|
+
const branches = triggerBranches(trigger);
|
|
402
|
+
if (!branches) return [{ if: GITLAB_MERGE_REQUEST_SOURCE }];
|
|
403
|
+
return branches.map((branch) => {
|
|
404
|
+
assertGitlabBranch(subject, branch);
|
|
405
|
+
return { if: `${GITLAB_MERGE_REQUEST_SOURCE} && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "${branch}"` };
|
|
406
|
+
});
|
|
407
|
+
}
|
|
408
|
+
case "push":
|
|
409
|
+
return pushBranches(trigger.branches).map((branch) => {
|
|
410
|
+
assertGitlabBranch(subject, branch);
|
|
411
|
+
return { if: gitlabPushRule(JSON.stringify(branch)) };
|
|
412
|
+
});
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
/**
|
|
417
|
+
* The `id_tokens:` entry an `id-token: write` spec gets. The name is the
|
|
418
|
+
* environment variable the JWT lands in, which the job's own setup line reads
|
|
419
|
+
* (`aws sts assume-role-with-web-identity --web-identity-token
|
|
420
|
+
* "$CHANT_ID_TOKEN"`, or the provider's equivalent).
|
|
421
|
+
*
|
|
422
|
+
* `$CI_SERVER_URL` as the audience is GitLab's own documented default: an
|
|
423
|
+
* identity provider federated to a GitLab instance is registered with that
|
|
424
|
+
* instance's URL as its audience, and the variable expands to exactly that on
|
|
425
|
+
* gitlab.com and on a self-managed instance alike.
|
|
426
|
+
*/
|
|
427
|
+
export const GITLAB_ID_TOKEN_NAME = "CHANT_ID_TOKEN";
|
|
428
|
+
export const GITLAB_ID_TOKEN_AUDIENCE = "$CI_SERVER_URL";
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* Turn additive `permissions` (#2242) into the one GitLab declaration that
|
|
432
|
+
* carries the same meaning, refusing everything else by name.
|
|
433
|
+
*
|
|
434
|
+
* `id-token: write` is that one: GitLab's OIDC surface is `id_tokens:`, a
|
|
435
|
+
* per-job declaration of a JWT the job exchanges for cloud credentials
|
|
436
|
+
* itself. `id-token: read` is refused rather than mapped, because GitLab
|
|
437
|
+
* either mints the token into the job or does not. Every other scope is
|
|
438
|
+
* refused: GitLab has no per-job token-scope mapping at all, and a scope
|
|
439
|
+
* quietly dropped would emit a job that reads as granted and runs with
|
|
440
|
+
* nothing.
|
|
441
|
+
*/
|
|
442
|
+
export function gitlabIdTokens(name: string, permissions: Record<string, "read" | "write"> | undefined): Record<string, unknown> | undefined {
|
|
443
|
+
let wantsIdToken = false;
|
|
444
|
+
for (const [rawScope, value] of Object.entries(permissions ?? {})) {
|
|
445
|
+
const scope = rawScope.trim();
|
|
446
|
+
if (scope === "id-token") {
|
|
447
|
+
if (value !== "write") {
|
|
448
|
+
throw new Error(
|
|
449
|
+
`Scheduled Op "${name}" adds permission "id-token: ${value}", but GitLab either mints an ` +
|
|
450
|
+
`OIDC token into a job or does not — there is no read-only half of an \`id_tokens:\` ` +
|
|
451
|
+
`declaration. Ask for { "id-token": "write" }, or drop the option.`,
|
|
452
|
+
);
|
|
453
|
+
}
|
|
454
|
+
wantsIdToken = true;
|
|
455
|
+
continue;
|
|
456
|
+
}
|
|
457
|
+
throw new Error(
|
|
458
|
+
`Scheduled Op "${name}" adds permission "${scope}: ${value}", but GitLab CI has no per-job ` +
|
|
459
|
+
`token-scope mapping — there is no \`permissions:\` key to add it to (#2242). The one scope that ` +
|
|
460
|
+
`does cross over is "id-token": "write", which becomes an \`id_tokens:\` declaration. Drop the ` +
|
|
461
|
+
`option here, or generate this Op for github.`,
|
|
462
|
+
);
|
|
463
|
+
}
|
|
464
|
+
return wantsIdToken ? { [GITLAB_ID_TOKEN_NAME]: { aud: GITLAB_ID_TOKEN_AUDIENCE } } : undefined;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
/**
|
|
468
|
+
* A `setup` list as GitLab `script:` lines. A `uses` entry is a GitHub
|
|
469
|
+
* Actions marketplace action, which GitLab has no shape for, so it is refused
|
|
470
|
+
* by name rather than dropped. `subject` names whose setup it is, such as
|
|
471
|
+
* `Scheduled Op "apply"`.
|
|
472
|
+
*/
|
|
473
|
+
export function gitlabSetupScript(subject: string, setup: readonly OpSetupStep[] | undefined): string[] {
|
|
474
|
+
return (setup ?? []).map((step, index) => {
|
|
475
|
+
if ("uses" in step) {
|
|
476
|
+
throw new Error(
|
|
477
|
+
`${subject} setup step ${index + 1} is \`uses: "${step.uses}"\`, a GitHub Actions ` +
|
|
478
|
+
`marketplace action. GitLab CI jobs run \`script\` lines only, so there is nothing to translate it ` +
|
|
479
|
+
`into (#2242). Express the setup as a \`{ run }\` entry, or generate it for github/forgejo.`,
|
|
480
|
+
);
|
|
481
|
+
}
|
|
482
|
+
return step.run;
|
|
483
|
+
});
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
/**
|
|
487
|
+
* Validate an `environment` on GitLab's own terms (#2257). A GitLab job
|
|
488
|
+
* naming an environment that does not exist creates an unprotected one on
|
|
489
|
+
* first deploy rather than failing, so the only shapes worth refusing at
|
|
490
|
+
* build time are the ones that could never bind: a blank name, and a `url`
|
|
491
|
+
* that is neither absolute nor a variable expression GitLab expands, which
|
|
492
|
+
* would render as a dead "View deployment" link.
|
|
493
|
+
*/
|
|
494
|
+
export function assertGitlabEnvironment(name: string, environment: OpEnvironment): void {
|
|
495
|
+
const where = `Scheduled Op "${name}" environment`;
|
|
496
|
+
if (environment.name.trim() === "") {
|
|
497
|
+
throw new Error(
|
|
498
|
+
`${where} has an empty \`name\`. A GitLab environment is a project object, and its approval ` +
|
|
499
|
+
`rules live on that object rather than in this file, so a blank name resolves to nothing. ` +
|
|
500
|
+
`Give it the environment's name, or drop the option.`,
|
|
501
|
+
);
|
|
502
|
+
}
|
|
503
|
+
if (environment.url === undefined) return;
|
|
504
|
+
const url = environment.url.trim();
|
|
505
|
+
if (url === "") {
|
|
506
|
+
throw new Error(`${where} "${environment.name}" has an empty \`url\`. Omit the field rather than setting it to "".`);
|
|
507
|
+
}
|
|
508
|
+
if (!/^https?:\/\//.test(url) && !url.includes("$")) {
|
|
509
|
+
throw new Error(
|
|
510
|
+
`${where} "${environment.name}" has \`url: "${environment.url}"\`, which is neither an absolute ` +
|
|
511
|
+
`http(s) URL nor a variable expression GitLab expands. It becomes the environment's own link, ` +
|
|
512
|
+
`so a relative path is a dead link on the environment page rather than an error anywhere.`,
|
|
513
|
+
);
|
|
514
|
+
}
|
|
515
|
+
}
|
|
@@ -23,6 +23,7 @@ import { existsSync, readFileSync } from "fs";
|
|
|
23
23
|
import { isAbsolute, join, resolve } from "path";
|
|
24
24
|
import { pathToFileURL } from "url";
|
|
25
25
|
import { isLexiconPlugin, type LexiconPlugin } from "../../lexicon";
|
|
26
|
+
import { ensureTypeScriptLoader } from "../../ts-loader";
|
|
26
27
|
|
|
27
28
|
export interface LoadedLexicon {
|
|
28
29
|
/** The plugin, when the package exported one. */
|
|
@@ -76,6 +77,7 @@ export async function loadLexiconFromDir(dir: string): Promise<LoadedLexicon> {
|
|
|
76
77
|
|
|
77
78
|
let mod: Record<string, unknown>;
|
|
78
79
|
try {
|
|
80
|
+
ensureTypeScriptLoader();
|
|
79
81
|
mod = (await import(pathToFileURL(entry).href)) as Record<string, unknown>;
|
|
80
82
|
} catch (error) {
|
|
81
83
|
return { entry, error: `import failed: ${error instanceof Error ? error.message : String(error)}` };
|
package/src/cli/commands/lint.ts
CHANGED
|
@@ -33,6 +33,7 @@ import { applyInlineSuppressions } from "../../lint/suppressions";
|
|
|
33
33
|
import { getProvenance } from "../../provenance";
|
|
34
34
|
import { runLexiconPostSynthChecks } from "./build";
|
|
35
35
|
import { armSandboxPolicyExecution, runProjectPolicies } from "../../lint/policy-sandbox";
|
|
36
|
+
import { ensureTypeScriptLoader } from "../../ts-loader";
|
|
36
37
|
|
|
37
38
|
// Import config loader
|
|
38
39
|
import { loadConfig, resolveRulesForFile, resolveConfiguredSeverity, findProjectRoot } from "../../lint/config";
|
|
@@ -90,6 +91,7 @@ export async function loadPluginRules(
|
|
|
90
91
|
const resolved = resolve(configDir, pluginPath);
|
|
91
92
|
let mod: Record<string, unknown>;
|
|
92
93
|
try {
|
|
94
|
+
ensureTypeScriptLoader();
|
|
93
95
|
mod = await import(resolved);
|
|
94
96
|
} catch (err) {
|
|
95
97
|
throw new Error(
|
|
@@ -592,6 +594,7 @@ async function runOpCheckDiagnostics(
|
|
|
592
594
|
const fileByOpName = new Map<string, string>();
|
|
593
595
|
for (const filePath of opFiles) {
|
|
594
596
|
try {
|
|
597
|
+
ensureTypeScriptLoader();
|
|
595
598
|
const mod: unknown = await import(filePath);
|
|
596
599
|
const entity = (mod as { default?: unknown }).default;
|
|
597
600
|
if (!entity || typeof entity !== "object") continue;
|
|
@@ -12,6 +12,7 @@ import { formatError, formatInfo } from "../format";
|
|
|
12
12
|
import { formatSarif } from "../reporters/stylish";
|
|
13
13
|
import type { LexiconPlugin } from "../../lexicon";
|
|
14
14
|
import type { LintRule, LintDiagnostic } from "../../lint/rule";
|
|
15
|
+
import { ensureTypeScriptLoader } from "../../ts-loader";
|
|
15
16
|
|
|
16
17
|
export interface MigrateCliOpts {
|
|
17
18
|
sourceFile: string;
|
|
@@ -235,6 +236,7 @@ async function loadMigrationRules(targetLexicon: string): Promise<LintRule[]> {
|
|
|
235
236
|
// lexicons ship their own migrate paths.
|
|
236
237
|
if (targetLexicon === "gitlab") {
|
|
237
238
|
try {
|
|
239
|
+
ensureTypeScriptLoader();
|
|
238
240
|
const mod = await import("@intentius/chant-lexicon-gitlab/migrate/from-github/rules");
|
|
239
241
|
return (mod as { MIGRATION_RULES: LintRule[] }).MIGRATION_RULES;
|
|
240
242
|
} catch {
|