@kitsra/kavio-schema 0.1.0 → 0.1.1
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 +30 -0
- package/package.json +5 -1
package/README.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# @kitsra/kavio-schema
|
|
2
|
+
|
|
3
|
+
Canonical JSON Schema, TypeScript types, validation, and migration scaffolding
|
|
4
|
+
for Kavio compositions.
|
|
5
|
+
|
|
6
|
+
## Install
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
corepack pnpm add @kitsra/kavio-schema
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
import { validateComposition } from "@kitsra/kavio-schema";
|
|
16
|
+
|
|
17
|
+
const result = validateComposition(document);
|
|
18
|
+
if (!result.ok) {
|
|
19
|
+
console.error(result.errors);
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
The package also exports the current `schemaVersion`, shared document/layer
|
|
24
|
+
types, and the bundled schema at `@kitsra/kavio-schema/schema`.
|
|
25
|
+
|
|
26
|
+
## Links
|
|
27
|
+
|
|
28
|
+
- Repository: https://github.com/kitsra/kavio
|
|
29
|
+
- Schema docs: https://github.com/kitsra/kavio/blob/main/docs/schema.md
|
|
30
|
+
- License: Elastic-2.0
|
package/package.json
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kitsra/kavio-schema",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Canonical Kavio JSON Schema, TypeScript types, and validation contract.",
|
|
5
5
|
"license": "Elastic-2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/kitsra/kavio.git"
|
|
9
|
+
},
|
|
6
10
|
"type": "module",
|
|
7
11
|
"sideEffects": false,
|
|
8
12
|
"publishConfig": {
|