@c4a/extract-rush 0.7.1 → 0.7.5
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 +6 -6
- package/README.zh-CN.md +4 -4
- package/index.js +5 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,10 +7,10 @@ workspace. It reports project identity, tags, subspaces, publish intent, entry
|
|
|
7
7
|
signals, direct dependency/consumer edges, build phases and commands, release
|
|
8
8
|
units, decoupled dependencies, and nearest `OWNERS` boundaries.
|
|
9
9
|
|
|
10
|
-
The index is evidence for a
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
The index is evidence for a Code Indexer Provider; it is not a product taxonomy.
|
|
11
|
+
The Provider decides which facts matter to its audience and returns the current
|
|
12
|
+
Indexer result. Context owns source identity, Candidate freshness, Review,
|
|
13
|
+
approved knowledge, and package output.
|
|
14
14
|
|
|
15
15
|
## Place in the knowledge workflow
|
|
16
16
|
|
|
@@ -19,7 +19,7 @@ confirmed Rush repository boundary
|
|
|
19
19
|
↓
|
|
20
20
|
rush.json + package.json + Rush config + OWNERS facts
|
|
21
21
|
↓
|
|
22
|
-
|
|
22
|
+
selected Code Indexer Provider
|
|
23
23
|
↓
|
|
24
24
|
reviewed architecture / ownership / package knowledge
|
|
25
25
|
```
|
|
@@ -62,7 +62,7 @@ index and Evidence ABI never copy raw shell commands or package scripts into
|
|
|
62
62
|
facts.
|
|
63
63
|
|
|
64
64
|
This optional package does not add a public Agent entry or Context lifecycle
|
|
65
|
-
phase. It remains a reusable structural library for
|
|
65
|
+
phase. It remains a reusable structural library for Indexer Providers.
|
|
66
66
|
The Evidence ABI conversion assigns one primary owner to each `rush.json`,
|
|
67
67
|
selected `package.json`, and `OWNERS` input, binds project files to authorized
|
|
68
68
|
module refs, and publishes workspace/project/dependency/owner facts as catalog
|
package/README.zh-CN.md
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
subspace、发布意图、入口信号、直接依赖/消费者边、构建 phase/command、发布单元、解耦依赖和
|
|
7
7
|
最近的 `OWNERS` 边界。
|
|
8
8
|
|
|
9
|
-
这些索引是
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
这些索引是 Code Indexer Provider 的结构证据,不是产品分类。Provider 决定哪些
|
|
10
|
+
事实对目标读者有价值并返回当前 Indexer Result;来源身份、Candidate 新鲜度、
|
|
11
|
+
审核、正式知识和知识包产出继续由 Context 负责。
|
|
12
12
|
|
|
13
13
|
## 在知识生产链中的位置
|
|
14
14
|
|
|
@@ -17,7 +17,7 @@ subspace、发布意图、入口信号、直接依赖/消费者边、构建 phas
|
|
|
17
17
|
↓
|
|
18
18
|
rush.json + package.json + Rush 配置 + OWNERS 事实
|
|
19
19
|
↓
|
|
20
|
-
|
|
20
|
+
选中的 Code Indexer Provider
|
|
21
21
|
↓
|
|
22
22
|
经过审核的架构 / 归属 / package 知识
|
|
23
23
|
```
|
package/index.js
CHANGED
|
@@ -11653,6 +11653,8 @@ function keyTokens(key) {
|
|
|
11653
11653
|
return key.replace(/([a-z0-9])([A-Z])/gu, "$1-$2").replace(/[^A-Za-z0-9]+/gu, "-").toLowerCase().split("-").filter(Boolean);
|
|
11654
11654
|
}
|
|
11655
11655
|
function sensitiveKey(key, value) {
|
|
11656
|
+
if (value === INDEXER_OUTPUT_REDACTION_MARKER)
|
|
11657
|
+
return false;
|
|
11656
11658
|
const tokens = keyTokens(key);
|
|
11657
11659
|
if (tokens.length === 0)
|
|
11658
11660
|
return false;
|
|
@@ -11694,12 +11696,12 @@ function replaceWithCount(value, pattern, replacement, count) {
|
|
|
11694
11696
|
function redactKnownText(value, count) {
|
|
11695
11697
|
let output = value;
|
|
11696
11698
|
output = replaceWithCount(output, /-----BEGIN (?:RSA |EC |OPENSSH )?PRIVATE KEY-----[\s\S]*?-----END (?:RSA |EC |OPENSSH )?PRIVATE KEY-----/gu, INDEXER_OUTPUT_REDACTION_MARKER, count);
|
|
11697
|
-
output = replaceWithCount(output,
|
|
11699
|
+
output = replaceWithCount(output, new RegExp(`(\\bauthorization\\s*:\\s*(?:bearer|basic)\\s+)` + `(?!${escapeRegExp(INDEXER_OUTPUT_REDACTION_MARKER)})[^\\s,;]+`, "giu"), (_match, prefix) => `${prefix}${INDEXER_OUTPUT_REDACTION_MARKER}`, count);
|
|
11698
11700
|
output = replaceWithCount(output, /([a-z][a-z0-9+.-]*:\/\/)[^\s/@:]+:[^\s/@]+@/giu, (_match, prefix) => `${prefix}${INDEXER_OUTPUT_REDACTION_MARKER}@`, count);
|
|
11699
|
-
output = replaceWithCount(output,
|
|
11701
|
+
output = replaceWithCount(output, new RegExp(`([?&](?:access_token|refresh_token|api_key|password|secret)=)` + `(?!${escapeRegExp(INDEXER_OUTPUT_REDACTION_MARKER)})[^&#\\s]+`, "giu"), (_match, prefix) => `${prefix}${INDEXER_OUTPUT_REDACTION_MARKER}`, count);
|
|
11700
11702
|
const key = "(?:[A-Za-z0-9_.-]*(?:password|passwd|pwd|secret|token|credential|cookie)[A-Za-z0-9_.-]*|api[-_]?key|access[-_]?(?:key|token)|private[-_]?key|client[-_]?secret|authorization)";
|
|
11701
11703
|
const assignment = `(?:=\\s*|:\\s+(?=\\S)|:\\s*(?=["']))`;
|
|
11702
|
-
output = replaceWithCount(output, new RegExp(`((?:["']?${key}["']?)\\s*${assignment})(?:"(?:\\\\.|[^"])*"|'(?:\\\\.|[^'])*'|[^\\s,;}\\]]+)`, "giu"), (_match, prefix) => `${prefix}"${INDEXER_OUTPUT_REDACTION_MARKER}"`, count);
|
|
11704
|
+
output = replaceWithCount(output, new RegExp(`((?:["']?${key}["']?)\\s*${assignment})` + `(?!["']?${escapeRegExp(INDEXER_OUTPUT_REDACTION_MARKER)})` + `(?:"(?:\\\\.|[^"])*"|'(?:\\\\.|[^'])*'|[^\\s,;}\\]]+)`, "giu"), (_match, prefix) => `${prefix}"${INDEXER_OUTPUT_REDACTION_MARKER}"`, count);
|
|
11703
11705
|
return output;
|
|
11704
11706
|
}
|
|
11705
11707
|
function redactBlockedText(value, blocked, count) {
|