@c4a/extract 0.6.19 → 0.7.0
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 +14 -0
- package/README.zh-CN.md +12 -0
- package/bin/c4a-extract-code.js +828 -94
- package/index.js +3803 -177
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -67,6 +67,14 @@ Important constraints:
|
|
|
67
67
|
- `extractSymbols()` must return `ExtractionResult` v2 with stable symbols and relations.
|
|
68
68
|
- `detectEntries()` is called before `extractSymbols()`; plugins may keep per-detection package context between those calls.
|
|
69
69
|
|
|
70
|
+
For Indexer execution, `extractionResultToEvidenceAdapterResult()` converts a
|
|
71
|
+
coverage-complete `ExtractionResult` into
|
|
72
|
+
`context.indexer.evidence-adapter-result/v1`. The caller supplies the resolved
|
|
73
|
+
package/export/version/digest, authorized source/module scope, input digest,
|
|
74
|
+
precedence, and owner role. Conversion fails when per-file coverage is absent;
|
|
75
|
+
lightweight or enricher output cannot contribute file, LOC, symbol, or protocol
|
|
76
|
+
denominators.
|
|
77
|
+
|
|
70
78
|
### 2. ExtractionResult v2
|
|
71
79
|
|
|
72
80
|
Every plugin returns:
|
|
@@ -79,6 +87,12 @@ Every plugin returns:
|
|
|
79
87
|
files: [{ path, language, lines }],
|
|
80
88
|
symbols: SymbolInfo[],
|
|
81
89
|
relations: RelationInfo[],
|
|
90
|
+
coverage: {
|
|
91
|
+
tier,
|
|
92
|
+
capabilities,
|
|
93
|
+
files: [{ path, disposition, diagnosticCodes }],
|
|
94
|
+
diagnostics
|
|
95
|
+
},
|
|
82
96
|
stats: { files, lines, exportedSymbols, internalSymbols, relations }
|
|
83
97
|
}
|
|
84
98
|
```
|
package/README.zh-CN.md
CHANGED
|
@@ -64,6 +64,12 @@ interface ExtractionPlugin {
|
|
|
64
64
|
- `detectEntries()` 先于 `extractSymbols()` 调用,插件可以在两步之间保留本次检测
|
|
65
65
|
的 package 上下文。
|
|
66
66
|
|
|
67
|
+
Indexer 执行通过 `extractionResultToEvidenceAdapterResult()` 将 coverage 完整的
|
|
68
|
+
`ExtractionResult` 转成 `context.indexer.evidence-adapter-result/v1`。调用方传入已解析的
|
|
69
|
+
package/export/version/digest、授权 source/module scope、input digest、precedence 和 owner role。
|
|
70
|
+
缺少逐文件 coverage 时转换直接失败;轻量或 enricher 输出不能贡献 file、LOC、symbol 或 protocol
|
|
71
|
+
denominator。
|
|
72
|
+
|
|
67
73
|
### 2. ExtractionResult v2
|
|
68
74
|
|
|
69
75
|
每个插件返回:
|
|
@@ -76,6 +82,12 @@ interface ExtractionPlugin {
|
|
|
76
82
|
files: [{ path, language, lines }],
|
|
77
83
|
symbols: SymbolInfo[],
|
|
78
84
|
relations: RelationInfo[],
|
|
85
|
+
coverage: {
|
|
86
|
+
tier,
|
|
87
|
+
capabilities,
|
|
88
|
+
files: [{ path, disposition, diagnosticCodes }],
|
|
89
|
+
diagnostics
|
|
90
|
+
},
|
|
79
91
|
stats: { files, lines, exportedSymbols, internalSymbols, relations }
|
|
80
92
|
}
|
|
81
93
|
```
|