@codai/axiom-emitters-web
v2.2.1
Published
AXIOM v2 template emitter `web`: small, deterministic, golden-stack file templates (Next 16 route handler / server action, Hono 4 route, Drizzle pgTable, Biome config, Tailwind v4 globals, README section) for `template` plan sources
Maintainers
Readme
@codai/axiom-emitters-web
The [email protected] template emitter for AXIOM template plan sources: seven small, pure,
deterministic file templates on the golden stack — not an app scaffolder.
| Template | Emits |
|----------|-------|
| next.route-handler | Next 16 App Router route.ts (NextRequest → Response.json, optional Zod body check) |
| next.server-action | "use server" action with Zod v4 + useActionState state shape |
| hono.route | Hono 4 route module |
| drizzle.table | pgTable with identity id, withTimezone timestamps |
| biome.config | Biome 2.5 biome.json (this repo's style) |
| tailwind.globals | Tailwind v4 CSS-first globals.css |
| readme.section | one ## title markdown section |
import { compilePlan, createEmitterRegistry } from "@codai/axiom-plan";
import { webEmitter } from "@codai/axiom-emitters-web";
const { bundle } = await compilePlan(plan, { emitters: createEmitterRegistry([webEmitter]) });
// bundle.manifest.toolchain.emitters → { web: "2.0.0" }Golden outputs in src/__golden__/*.txt are the spec; pnpm run update-golden regenerates
them. Any output change must bump WEB_EMITTER_VERSION (it is hashed into every manifest
digest). Full contract, params and error codes: docs/guides/emitters.md.
