@0disoft/mensor-contract 0.2.0 → 0.2.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 +44 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# @0disoft/mensor-contract
|
|
2
|
+
|
|
3
|
+
Serializable contracts, schemas, and deterministic diagnostics for Mensor.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
pnpm add @0disoft/mensor-contract
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Node.js 22 or newer is required.
|
|
12
|
+
|
|
13
|
+
## Parse Contracts And Reports
|
|
14
|
+
|
|
15
|
+
```js
|
|
16
|
+
import {
|
|
17
|
+
parseCheckOutputV2,
|
|
18
|
+
parseProjectContract,
|
|
19
|
+
parseRouteIndex,
|
|
20
|
+
serializeRouteIndex,
|
|
21
|
+
} from "@0disoft/mensor-contract";
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Parsers return explicit success or failure values. The package contains no
|
|
25
|
+
filesystem scanner or application runtime.
|
|
26
|
+
|
|
27
|
+
Published schemas are available through package export paths, including:
|
|
28
|
+
|
|
29
|
+
```js
|
|
30
|
+
const projectSchema = import.meta.resolve(
|
|
31
|
+
"@0disoft/mensor-contract/schemas/project-contract-v1.schema.json",
|
|
32
|
+
);
|
|
33
|
+
const checkOutputSchema = import.meta.resolve(
|
|
34
|
+
"@0disoft/mensor-contract/schemas/check-output-v2.schema.json",
|
|
35
|
+
);
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Documentation
|
|
39
|
+
|
|
40
|
+
- [Contract authoring](https://github.com/0disoft/mensor/blob/main/packages/contract/spec/README.md)
|
|
41
|
+
- [Public API and compatibility](https://github.com/0disoft/mensor/blob/main/docs/library/public-api.md)
|
|
42
|
+
- [RouteIndex v1](https://github.com/0disoft/mensor/blob/main/docs/architecture/route-index-v1.md)
|
|
43
|
+
|
|
44
|
+
Mensor is licensed under Apache-2.0.
|