boundra
v0.1.2
Published
Schema-backed runtime contracts for Boundra applications
Readme
Boundra
The npm package for Boundra's schema-backed TypeScript runtime. The native CLI is distributed separately through GitHub Releases during the public preview.
Install
pnpm add boundra zodInitialize and run the native CLI through the same npm package:
pnpm exec boundra init
pnpm exec boundra check-boundariesThe first CLI invocation downloads and verifies the matching native release.
Set BOUNDRA_CLI_PATH to an existing binary in offline or controlled environments.
Generated contracts use Zod for schema authoring while the runtime depends only
on a structural parse(unknown) contract.
Public API
defineRoute,defineQuery,defineMutationcreateBoundraClientcreateHttpTransportimplementRoute,implementQuery,implementMutationexecuteContractBoundraRuntimeError
Validation failures include provider-neutral field issues:
try {
await client.mutation(createTaskMutation, input);
} catch (error) {
if (error instanceof BoundraRuntimeError) {
console.log(error.code, error.issues[0]?.path, error.issues[0]?.message);
}
}error.toJSON() returns a safe diagnostic shape without the original input or
internal cause, suitable for development overlays and application error UIs.
See the repository documentation for CLI installation, contract generation, and host integration.
