@roastery/terroir 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -189,6 +189,7 @@ Automatically registered when importing `@roastery/terroir/schema`:
|
|
|
189
189
|
## Exports reference
|
|
190
190
|
|
|
191
191
|
```typescript
|
|
192
|
+
import { t } from '@roastery/terroir'; // TypeBox namespace (re-export)
|
|
192
193
|
import { ... } from '@roastery/terroir/exceptions'; // internal exceptions (rare)
|
|
193
194
|
import { ... } from '@roastery/terroir/exceptions/application'; // application layer
|
|
194
195
|
import { ... } from '@roastery/terroir/exceptions/application/jwt'; // JWT exceptions
|
|
@@ -200,6 +201,19 @@ import type { ... } from '@roastery/terroir/exceptions/types'; // type utilitie
|
|
|
200
201
|
import { ... } from '@roastery/terroir/schema'; // Schema + SchemaManager
|
|
201
202
|
```
|
|
202
203
|
|
|
204
|
+
### TypeBox re-export
|
|
205
|
+
|
|
206
|
+
`t` is the full `@sinclair/typebox` namespace re-exported for convenience, so you don't need to import TypeBox separately:
|
|
207
|
+
|
|
208
|
+
```typescript
|
|
209
|
+
import { t } from '@roastery/terroir';
|
|
210
|
+
|
|
211
|
+
const UserSchema = t.Object({
|
|
212
|
+
id: t.String({ format: 'uuid' }),
|
|
213
|
+
name: t.String(),
|
|
214
|
+
});
|
|
215
|
+
```
|
|
216
|
+
|
|
203
217
|
---
|
|
204
218
|
|
|
205
219
|
## Development
|
package/package.json
CHANGED