@0disoft/mensor-compiler 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.
Files changed (2) hide show
  1. package/README.md +48 -0
  2. package/package.json +2 -2
package/README.md ADDED
@@ -0,0 +1,48 @@
1
+ # @0disoft/mensor-compiler
2
+
3
+ Deterministic source contract checker for Mensor projects.
4
+
5
+ ## Install
6
+
7
+ ```text
8
+ pnpm add @0disoft/mensor-compiler
9
+ ```
10
+
11
+ Node.js 22 or newer is required.
12
+
13
+ ## Check A Project
14
+
15
+ ```js
16
+ import { checkProject } from "@0disoft/mensor-compiler";
17
+
18
+ const result = await checkProject({ root: process.cwd() });
19
+
20
+ if (!result.ok) {
21
+ process.exitCode = 1;
22
+ }
23
+
24
+ process.stdout.write(`${JSON.stringify(result.report, null, 2)}\n`);
25
+ ```
26
+
27
+ The default result contains DiagnosticReport v1. Select Check Output v2
28
+ explicitly when inspection coverage is required:
29
+
30
+ ```js
31
+ const result = await checkProject({
32
+ root: process.cwd(),
33
+ reportVersion: 2,
34
+ });
35
+ ```
36
+
37
+ Contract failures are returned as data. Unexpected I/O or compiler failures
38
+ remain exceptions. The compiler reads supported project files but does not
39
+ execute project source or configuration, spawn framework tools, install
40
+ dependencies, or access the network.
41
+
42
+ ## Documentation
43
+
44
+ - [Library API](https://github.com/0disoft/mensor/blob/main/docs/library/public-api.md)
45
+ - [System boundary](https://github.com/0disoft/mensor/blob/main/docs/architecture/00-system-boundary.md)
46
+ - [Check Output v2](https://github.com/0disoft/mensor/blob/main/docs/architecture/check-output-v2.md)
47
+
48
+ Mensor is licensed under Apache-2.0.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0disoft/mensor-compiler",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Deterministic source contract checker for Mensor projects.",
5
5
  "license": "Apache-2.0",
6
6
  "publishConfig": {
@@ -43,6 +43,6 @@
43
43
  "@typescript/typescript6": "6.0.2",
44
44
  "jsonc-parser": "3.3.1",
45
45
  "parse5": "8.0.1",
46
- "@0disoft/mensor-contract": "0.2.0"
46
+ "@0disoft/mensor-contract": "0.2.1"
47
47
  }
48
48
  }