Skip to content

Commit 398f952

Browse files
committed
chore: typo tweaks
Signed-off-by: tunnckoCore <5038030+tunnckoCore@users.noreply.github.com>
1 parent 77c45a6 commit 398f952

File tree

3 files changed

+24
-24
lines changed

3 files changed

+24
-24
lines changed

.rules/zagora.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ const sum = mathAgent(5, 10); // { ok: true, data: 15 }
135135

136136
## Env Vars validation
137137

138-
Define schemas for type-safe environment variables with Zod, Valibot, or any Standard Schema V1 compliant library. Env vars are passed to the handler's `options` object as `options.env`, not in `options.context` or somewhere else. All default filling, optionals, coercing works as in any other place. Though, in theory you can provide whatever you want in `options.context` including env vars, if you want to match the bahavior of oRPC or something else.
138+
Define schemas for type-safe environment variables with Zod, Valibot, or any Standard Schema V1 compliant library. Env vars are passed to the handler's `options` object as `options.env`, not in `options.context` or somewhere else. All default filling, optionals, coercing works as in any other place. Though, in theory you can provide whatever you want in `options.context` including env vars, if you want to match the behavior of oRPC or something else.
139139

140140
**Important: Providing async schema for env variables is not supported, at least for now.**
141141

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ const sum = mathAgent(5, 10); // { ok: true, data: 15 }
135135

136136
## Env Vars validation
137137

138-
Define schemas for type-safe environment variables with Zod, Valibot, or any Standard Schema V1 compliant library. Env vars are passed to the handler's `options` object as `options.env`, not in `options.context` or somewhere else. All default filling, optionals, coercing works as in any other place. Though, in theory you can provide whatever you want in `options.context` including env vars, if you want to match the bahavior of oRPC or something else.
138+
Define schemas for type-safe environment variables with Zod, Valibot, or any Standard Schema V1 compliant library. Env vars are passed to the handler's `options` object as `options.env`, not in `options.context` or somewhere else. All default filling, optionals, coercing works as in any other place. Though, in theory you can provide whatever you want in `options.context` including env vars, if you want to match the behavior of oRPC or something else.
139139

140140
**Important: Providing async schema for env variables is not supported, at least for now.**
141141

README.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,11 @@ import {
150150
isZagoraError,
151151
} from 'zagora/errors';
152152

153-
import * ZagoraTypes from 'zagora/types';
154-
import * zagoraUtils from 'zagora/utils';
153+
import * as ZagoraTypes from 'zagora/types';
154+
import * as zagoraUtils from 'zagora/utils';
155155
```
156156

157-
[Back to top](#table-of-contents)
157+
[**Back to top**](#table-of-contents)
158158

159159
## Why zagora?
160160

@@ -165,7 +165,7 @@ Both `tRPC` and `oRPC` are promoted as "backend", or specifically for when you'r
165165

166166
They are built around the network, Zagora is built around functions with excellent egonomics, developer experience, and no assumptions. **It produces just functions, i cannot stress that enough.**
167167

168-
[Back to top](#table-of-contents)
168+
[**Back to top**](#table-of-contents)
169169

170170
### Why Zagora over oRPC/tRPC/neverthrow/effect.ts?
171171

@@ -196,15 +196,15 @@ They are built around the network, Zagora is built around functions with excelle
196196

197197
Funny enough, you can use Zagora to build fully type-safe CLIs with auto-generated detailed help, based on the provided schemas. I have another library for that, which i will overhaul soon - [zodest](https://npmjs.com/package/zodest).
198198

199-
[Back to top](#table-of-contents)
199+
[**Back to top**](#table-of-contents)
200200

201201
### Why Zagora over plain TypeScript functions?
202202

203203
- Plain TypeScript offers compile-time types but no runtime validation — a mismatch between runtime and
204204
compile-time can blow up.
205205
- Zagora combines runtime validation/transforms (StandardSchema) with full compile-time inference, and returns a safe, uniform result tuple inspired by true functional programming
206206

207-
[Back to top](#table-of-contents)
207+
[**Back to top**](#table-of-contents)
208208

209209
### Why Zagora over standalone Zod/Valibot usage?
210210

@@ -216,7 +216,7 @@ Funny enough, you can use Zagora to build fully type-safe CLIs with auto-generat
216216
- single place to validate inputs/outputs/errors
217217
- unified non-throwing result shape
218218

219-
[Back to top](#table-of-contents)
219+
[**Back to top**](#table-of-contents)
220220

221221
## Features
222222

@@ -257,7 +257,7 @@ if (!resul3.ok) {
257257
}
258258
```
259259

260-
[Back to top](#table-of-contents)
260+
[**Back to top**](#table-of-contents)
261261

262262
### Typed Errors
263263

@@ -300,7 +300,7 @@ Isn't it amazing? You will never see `Error` or `try/catch` blocks again, and ev
300300

301301
But wait, there's more: **Type Guards**!
302302

303-
[Back to top](#table-of-contents)
303+
[**Back to top**](#table-of-contents)
304304

305305
### Error Type Guards
306306

@@ -432,7 +432,7 @@ hello('invalid-keys');
432432

433433
**Important:** if you want the error validation to actually throw on unknown keys passed to the error helper, then you need to make the error object schema more strict - just like `z.object(...).strict()`.
434434

435-
[Back to top](#table-of-contents)
435+
[**Back to top**](#table-of-contents)
436436

437437
### Context Management
438438

@@ -458,7 +458,7 @@ procedure('charlie');
458458
// => 'foo-bar has foo -> qux, id = charlie'
459459
```
460460

461-
[Back to top](#table-of-contents)
461+
[**Back to top**](#table-of-contents)
462462

463463
### Object Inputs
464464

@@ -469,7 +469,7 @@ zagora()
469469
.callable()
470470
```
471471

472-
[Back to top](#table-of-contents)
472+
[**Back to top**](#table-of-contents)
473473

474474
### Tuple Inputs (Multiple Arguments)
475475

@@ -512,7 +512,7 @@ fnTwo('Barry', 25) // => Barry is 25, from unknown
512512
fnTwo('Barry', 33, 'USA') // => Barry is 33, from USA
513513
```
514514

515-
[Back to top](#table-of-contents)
515+
[**Back to top**](#table-of-contents)
516516

517517
### Default Values
518518

@@ -532,7 +532,7 @@ fn({ name: 'John' }) // age defaults to 18
532532
// => 'John is 18, from unknown'
533533
```
534534

535-
[Back to top](#table-of-contents)
535+
[**Back to top**](#table-of-contents)
536536

537537
### Async Support
538538

@@ -595,7 +595,7 @@ const procAsyncOutput = zagora()
595595
const result2 = await procAsyncOutput('hello'); // ZagoraResult
596596
```
597597

598-
[Back to top](#table-of-contents)
598+
[**Back to top**](#table-of-contents)
599599

600600
### Caching/Memoization
601601

@@ -646,7 +646,7 @@ const res = await proc(22);
646646

647647
You can also provide the cache through `.callable({ cache })`. That is useful, if you want to provide it at "execution place", not at "definition place". For example, you'd have a set of procedures written at one place, then throgh "router" or some object that combiens them you want to call them at a `Request/Response` server handler.
648648

649-
[Back to top](#table-of-contents)
649+
[**Back to top**](#table-of-contents)
650650

651651
### Environment Variables
652652

@@ -676,7 +676,7 @@ Also important to note that when `disableOptions` you will loose access to the `
676676
**Important: Providing async schema for env variables is not supported, at least for now.**
677677

678678

679-
[Back to top](#table-of-contents)
679+
[**Back to top**](#table-of-contents)
680680

681681
### Handler Options Object
682682

@@ -720,7 +720,7 @@ zagora({ disableOptions: true })
720720
.handler((userId) => userId); // No options
721721
```
722722

723-
[Back to top](#table-of-contents)
723+
[**Back to top**](#table-of-contents)
724724

725725
### Auto-Callable Mode
726726

@@ -742,7 +742,7 @@ hello('bob'); // ZagoraResult => 'Hello, BOB'
742742
hello('alice'); // ZagoraResult => 'Hello, ALICE'
743743
```
744744

745-
[Back to top](#table-of-contents)
745+
[**Back to top**](#table-of-contents)
746746

747747
### Never-Throwing Guarantees
748748

@@ -764,7 +764,7 @@ const result = procedure();
764764
// result.error.cause.message === 'Oops'
765765
```
766766

767-
[Back to top](#table-of-contents)
767+
[**Back to top**](#table-of-contents)
768768

769769
### Type Safety Guarantees
770770

@@ -778,7 +778,7 @@ And because the type system of Zagora is pretty complex, we also have tests not
778778

779779
If you are interested, you can inspect the [test/types-testing.test.ts](./test/types-testing.test.ts) file.
780780

781-
[Back to top](#table-of-contents)
781+
[**Back to top**](#table-of-contents)
782782

783783
## API Reference
784784

@@ -804,7 +804,7 @@ Creates a new Zagora instance.
804804
+ if `cache` passed, it will override the previously passed through `.cache` method (if so)
805805
+ if `env` passed, it will be deep-merged with the provided through the `.env` method (if so)
806806

807-
[Back to top](#table-of-contents)
807+
[**Back to top**](#table-of-contents)
808808

809809
## Error Types
810810

0 commit comments

Comments
 (0)