verifact 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 +20 -13
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -6,6 +6,10 @@ Markdown 文档里的性能基准、测试计数、版本号——这些数字
6
6
 
7
7
  Zero external dependencies. Pure Node.js.
8
8
 
9
+ ## 与 OWASP CycloneDX 规范的关系
10
+
11
+ 本工具对「字段缺失」与「显式零值」的区分,与 OWASP CycloneDX 密码学属性(cryptoProperties)语义澄清的方向一致。作者就该语义向上游规范仓库提交了澄清提案,已获规范维护者评审通过;**提案尚未合并,合并前不代表规范文本已变更**。
12
+
9
13
  ## 核心流程
10
14
 
11
15
  ```
@@ -25,36 +29,39 @@ Zero external dependencies. Pure Node.js.
25
29
  | `ref-matched` | 声明引用 `lg-XXX` 等实体,在扫描范围内找到 | 绿 |
26
30
  | `ref-missing` | 引用实体不在扫描范围内 | 交人工 |
27
31
 
28
- ## 用法
32
+ ## 安装
29
33
 
34
+ ```bash
35
+ npm i -g verifact # 全局安装,得到 verifact 命令
36
+ npx verifact --help # 免安装试用
30
37
  ```
31
- npm install # 零依赖,仅安装
32
- ```
38
+
39
+ 零外部依赖。从源码检出运行时,下文的 `verifact` 可替换为 `node bin/verifact.js`。
33
40
 
34
41
  ### 核验文档
35
42
 
36
43
  ```bash
37
- node bin/verifact.js verify # 默认配置,drift 即退出码 1
38
- node bin/verifact.js verify --fail-on none # 仅报告,不拦截
39
- node bin/verifact.js verify --format md --out report.md
44
+ verifact verify # 默认配置,drift 即退出码 1
45
+ verifact verify --fail-on none # 仅报告,不拦截
46
+ verifact verify --format md --out report.md
40
47
  ```
41
48
 
42
49
  ### 审查单条声明
43
50
 
44
51
  ```bash
45
- node bin/verifact.js explain <claimId>
52
+ verifact explain <claimId>
46
53
  ```
47
54
 
48
55
  ### 历史对比
49
56
 
50
57
  ```bash
51
- node bin/verifact.js diff --since 3 # 最近 3 次运行的状态迁移
58
+ verifact diff --since 3 # 最近 3 次运行的状态迁移
52
59
  ```
53
60
 
54
61
  ### 本地看板
55
62
 
56
63
  ```bash
57
- node bin/verifact.js serve --port 8080
64
+ verifact serve --port 8080
58
65
  ```
59
66
 
60
67
  ## 退出码
@@ -84,12 +91,12 @@ node bin/verifact.js serve --port 8080
84
91
 
85
92
  | 项 | 状态 |
86
93
  |---|-------|
87
- | 回归测试 | ✅ 15 项 (`node test/run.js`) |
88
- | CI 集成 | ✅ sentinel 门禁(`fail-on-drift`) |
94
+ | 回归测试 | ✅ 74 项 (`node test/run.js`) |
95
+ | CI 集成 | ✅ sentinel 门禁(`fail-on-drift`)+ 语料门禁(变异必红) |
89
96
  | 平台 | Node.js ≥18,零外部依赖 |
90
- | 发布 | 私有包(`@fibemate/verifact`),未发布 npm |
97
+ | 发布 | npm 公共包 `verifact`(无 scope,公开;`npm i -g verifact`) |
91
98
  | 许可证 | Apache-2.0 |
92
99
 
93
100
  ## LICENSE
94
101
 
95
- Apache-2.0 — see [LICENSE](../LICENSE).
102
+ Apache-2.0 — see [LICENSE](./LICENSE).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "verifact",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "事实哨兵 — 把文档里的硬数字声明绑定到真实产出物上逐条核验,漂移即红。",
5
5
  "license": "Apache-2.0",
6
6
  "author": "刘天赫 <research@fibemate.net>",