repo-audit-tool 1.3.0 → 1.3.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/docs/AGENT-INDEX.json +3 -2
- package/package.json +1 -1
- package/repo-audit.mjs +4 -3
package/docs/AGENT-INDEX.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"title": "repo-audit 文档索引",
|
|
4
4
|
"description": "AI Agent 可读的文档索引 — 包含所有文档的元数据、结构、和调用协议",
|
|
5
|
-
"version": "1.3.
|
|
5
|
+
"version": "1.3.1",
|
|
6
6
|
"updated": "2026-09-06",
|
|
7
7
|
"repo": "NinjaSln-labs/repo-audit",
|
|
8
8
|
"npm": "repo-audit-tool",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"name": "repo-audit",
|
|
21
21
|
"description": "仓库标准化审计工具 + 工程脚手架生成器(零依赖)",
|
|
22
22
|
"bin": "repo-audit",
|
|
23
|
-
"version": "1.3.
|
|
23
|
+
"version": "1.3.1",
|
|
24
24
|
"language": "JavaScript (ESM)",
|
|
25
25
|
"runtime": "Node.js >= 18",
|
|
26
26
|
"dependencies": [],
|
|
@@ -231,6 +231,7 @@
|
|
|
231
231
|
},
|
|
232
232
|
|
|
233
233
|
"changelog": {
|
|
234
|
+
"1.3.1": "入口守卫 realpath 归一化——修复 npm bin symlink 下主流程不执行;1.3.0 反馈修复:注释剥离/SEC-004/AGENTS 声明/QUA-004/--update 动线",
|
|
234
235
|
"1.3.0": "反馈修复:yaml_field 行内注释剥离 + fallback_field 通配(SEC-004 兼容 job 级权限);AGENTS-core 来源声明二选一;QUA-004 锁文件消费意图;手册补 --update 存量补齐动线",
|
|
235
236
|
"1.2.3": "package.json 补充 repository 字段,修复 npm provenance E422;完成 Trusted Publisher tag 自动发布",
|
|
236
237
|
"1.2.2": "publish CI 改用 node 22 + 条件升级 npm,修复 EBADENGINE(tag 发布因 1.2.1 已存在未出包)",
|
package/package.json
CHANGED
package/repo-audit.mjs
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* REPO_AUDIT_TYPES - 自定义分类列表(JSON 数组)
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
|
-
import { existsSync, readdirSync, readFileSync, writeFileSync, mkdirSync, statSync } from 'node:fs'
|
|
21
|
+
import { existsSync, readdirSync, readFileSync, writeFileSync, mkdirSync, statSync, realpathSync } from 'node:fs'
|
|
22
22
|
import { join, resolve, dirname, relative } from 'node:path'
|
|
23
23
|
import { spawnSync } from 'node:child_process'
|
|
24
24
|
import { createHash } from 'node:crypto'
|
|
@@ -1651,8 +1651,9 @@ ${message}
|
|
|
1651
1651
|
process.exit(hasCritical && strict ? 1 : 0)
|
|
1652
1652
|
}
|
|
1653
1653
|
|
|
1654
|
-
// Issue#1 fix: 入口守卫——仅直接作为 CLI 运行时执行主流程;被 import
|
|
1655
|
-
|
|
1654
|
+
// Issue#1 fix: 入口守卫——仅直接作为 CLI 运行时执行主流程;被 import(测试/编程复用)不跑。
|
|
1655
|
+
// argv[1] 经 realpath 归一化(npm bin 是 symlink,直接比对 import.meta.url 会误判)
|
|
1656
|
+
const isDirectRun = import.meta.url === `file://${realpathSync(process.argv[1] || '')}`
|
|
1656
1657
|
if (isDirectRun) {
|
|
1657
1658
|
main().catch(err => {
|
|
1658
1659
|
console.error(`✗ 运行时错误: ${err.message}`)
|