@roastery/terroir 0.0.4 → 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/dist/index.cjs +40 -0
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +5 -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/dist/index.cjs
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/index.ts
|
|
31
|
+
var index_exports = {};
|
|
32
|
+
__export(index_exports, {
|
|
33
|
+
t: () => t
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(index_exports);
|
|
36
|
+
var t = __toESM(require("@sinclair/typebox"), 1);
|
|
37
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
38
|
+
0 && (module.exports = {
|
|
39
|
+
t
|
|
40
|
+
});
|
package/dist/index.d.cts
ADDED
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
package/package.json
CHANGED