You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Zagora is lightweight with zero bloat, built entirely on StandardSchema for universal validation. This means you can use Zod, Valibot, ArkType, or any compliant validator. No lock-in, just the tools you already know and love.
70
+
Zagora achieves 100% test coverage, ensuring every aspect of the library is rigorously tested for reliability and correctness. Complementing this, it includes **dedicated type tests** that utilize `expectType` to verify TypeScript types at compile time. Together, these provide robust guarantees that both the compile-time and runtime systems match, delivering confidence of another level.
71
+
72
+
### Minimal and Standards-Based
73
+
74
+
Zagora is lightweight with zero dependencies and bloat, built entirely on [StandardSchema](https://standardschema.dev) for universal validation. This means you can use Zod, Valibot, ArkType, or any compliant validator. No lock-in, just the tools you already know and love.
69
75
70
76
### Never-Throwing Execution
71
77
72
-
Every function returns a predictable `{ ok, data, error }` result—exceptions are eliminated completely. Your process never crashes from unhandled errors, similar to Effect.ts or neverthrow. This gives you total control and deterministic error handling across your entire codebase.
78
+
Every function returns a predictable `{ ok, data, error }` result -- exceptions are eliminated completely. Your process never crashes from unhandled errors, similar to Effect.ts or neverthrow. This gives you total control and deterministic error handling across your entire codebase.
73
79
74
-
### Typed Error System
80
+
### Typed Errors System
75
81
76
82
Define error schemas upfront and get strongly-typed error helpers inside your handlers. Each error kind is validated at runtime and fully typed at compile-time. You'll never see `try/catch` blocks or guess error shapes again.
77
83
78
84
### Full Type Inference
79
85
80
86
Complete TypeScript inference across inputs, outputs, errors, context, defaults, and optionals. Even JavaScript consumers get full autocomplete and IntelliSense support. The type system has been battle-tested with dedicated type-level tests.
81
87
82
-
### Tuple Arguments Support
88
+
### Multiple Arguments Support
83
89
84
90
Define multiple function arguments using schema tuples with per-argument validation and defaults. Call your functions naturally like `fn('Alice', 25)` instead of `fn({ name: 'Alice', age: 25 })`. This creates a familiar API that feels like native TypeScript functions.
85
91
86
-
### Sync & Async Awareness
92
+
### Granular Diagnostics
93
+
94
+
Zagora supports compile-time reporting for each argument through TypeScript in IDEs and CLIs, catching potential errors before runtime. This diagnostic capability operates at every level, from schema validation to handler invocationm, to context, to environment variables. Developers receive immediate, precise feedback on argument mismatches, improving code reliability and productivity.
95
+
96
+
### Sync & Async Awareness at every level
87
97
88
-
Zagora dynamically infers whether procedures are sync or async based on handler and schema behavior. Sync handlers return `Result`, async handlers return `Promise<Result>`—no forced async everywhere. This is impossible with oRPC/tRPC where everything is always async.
98
+
Zagora dynamically infers whether procedures are sync or async based on handler and schema behavior. Sync handlers return `Result`, async handlers return `Promise<Result>` -- no forced async everywhere. This is impossible with oRPC/tRPC where everything is always async.
89
99
90
100
### Built-in Caching
91
101
92
102
Add memoization to any procedure with a simple cache adapter. Cache keys include input, schemas, and handler body for intelligent invalidation. Works with both sync and async cache implementations seamlessly.
93
103
94
104
### Just Pure Functions
95
105
96
-
Zagora produces regular TypeScript functions—no special clients, routers, or network glue required. Export your procedures directly and call them like any other function. Perfect for building type-safe libraries, SDKs, and internal tooling.
106
+
Zagora produces regular TypeScript functions -- no special clients, routers, or network glue required. Export your procedures directly and call them like any other function. Perfect for building type-safe libraries, SDKs, and internal tooling.
0 commit comments