/** * "Every shipped example builds" (chant #1067) and "every shipped example * passes its own lexicon's post-synth checks" (chant #1400). * * `check-lexicon.ts`'s existing example checks only count directories * ("At least 1 example", "At least 3 examples", "At least 5 examples with * tests") — nothing ever tries to build one. `lexicons/aws/examples/core-concepts` * shipped with a discovery-time error (two files independently exporting a * top-level `dataBucket`) and `chant dev check-lexicon lexicons/aws` still * reported "All tier-1 checks passed," because none of its 29 checks touch * build output. This module closes that gap directly: for every non-empty * `examples//src/` directory, run the same discover-and-serialize * pipeline `chant build` runs and report whether it produced output with no * structural error. * * #1067 scoped "builds" to discovery + serialization on purpose, and said * so here: three aws examples (lambda-api, lambda-s3, shared-alb) failed * WAW042/WAW054 at error severity at the time, for defects that issue never * set out to fix. #1400 fixed those three and added the second axis: after * serialization, the post-synth checks each loaded plugin ships run against * that plugin's own output, exactly as `chant build` runs them (scoped per * plugin, `lint.rules` from the example's chant.config applied), and any * diagnostic left at `error` severity fails the example. Warnings do not. * An example is what a user copies wholesale; it must not teach a pattern * the lexicon it demonstrates flags as an error. */ import { type BuildResult } from "../../build.js"; import { type PostSynthDiagnostic } from "../../lint/post-synth.js"; import { applyConfiguredSeverity } from "../../lint/config.js"; import type { LexiconPlugin } from "../../lexicon.js"; export interface ExampleBuildResult { example: string; ok: boolean; detail?: string; } /** * Run each plugin's own post-synth checks against that plugin's output — * the same per-plugin scoping and `lint.rules` severity resolution * `cli/commands/build.ts` applies — and return what is left at `error` * severity. Project `lint.policies` are not run here: those are the * example author's organizational policy, not the lexicon's contract. */ export declare function postSynthErrors(plugins: LexiconPlugin[], result: BuildResult, lintRules: Parameters[1]): PostSynthDiagnostic[]; /** * Build every non-empty example under `/examples/*\/src` and * report per-example pass/fail. Returns `[]` when the lexicon has no * `examples/` directory at all (a separate tier-1 check already covers * that). */ export declare function checkExamplesBuild(lexiconDir: string): Promise; //# sourceMappingURL=check-lexicon-examples.d.ts.map