@c4a/extract-go 0.7.1 → 0.7.4
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 +7 -10
- package/README.zh-CN.md +6 -7
- package/index.js +233 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,11 +7,9 @@ knowledge projects. It extracts declarations, signatures, documentation,
|
|
|
7
7
|
imports, calls, and common HTTP route registrations without assigning
|
|
8
8
|
product-specific meaning.
|
|
9
9
|
|
|
10
|
-
This is an optional structural package
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
candidates, and keeps review, evidence, freshness, close, and build under the
|
|
14
|
-
normal Context workflow.
|
|
10
|
+
This is an optional structural package used by a Code Indexer Provider. The
|
|
11
|
+
Provider maps its facts into the current Indexer result; Context owns Candidate
|
|
12
|
+
state, Review, freshness, close, and build.
|
|
15
13
|
|
|
16
14
|
## Place in the knowledge workflow
|
|
17
15
|
|
|
@@ -20,7 +18,7 @@ confirmed Go repository boundary
|
|
|
20
18
|
↓
|
|
21
19
|
Go structural index
|
|
22
20
|
↓
|
|
23
|
-
|
|
21
|
+
selected Code Indexer Provider
|
|
24
22
|
↓
|
|
25
23
|
Context candidates → review → approved knowledge
|
|
26
24
|
```
|
|
@@ -52,10 +50,9 @@ knowledge project and its Agent workflow.
|
|
|
52
50
|
|
|
53
51
|
## When to use it
|
|
54
52
|
|
|
55
|
-
Use this package when a
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
parser cannot know the audience, product boundaries, or useful knowledge shape.
|
|
53
|
+
Use this package when a Code Indexer Provider needs Go symbols or relationships.
|
|
54
|
+
A language parser cannot decide the audience, product boundaries, or useful
|
|
55
|
+
knowledge shape; those remain Provider responsibilities.
|
|
59
56
|
|
|
60
57
|
## Development
|
|
61
58
|
|
package/README.zh-CN.md
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
`@c4a/extract-go` 为 Context 知识项目提供确定性的 Go 结构事实。它提取声明、签名、
|
|
6
6
|
源码文档、导入、调用关系和常见 HTTP 路由注册,但不赋予产品专属含义。
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
这是 Code Indexer Provider 按需使用的可选结构包。Provider 把结构事实映射到
|
|
9
|
+
当前 Indexer Result;Candidate 状态、审核、新鲜度、close 和构建继续由 Context
|
|
10
|
+
负责。
|
|
11
11
|
|
|
12
12
|
## 在知识生产链中的位置
|
|
13
13
|
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
↓
|
|
17
17
|
Go 结构索引
|
|
18
18
|
↓
|
|
19
|
-
|
|
19
|
+
选中的 Code Indexer Provider
|
|
20
20
|
↓
|
|
21
21
|
Context 候选 → 审核 → 正式知识
|
|
22
22
|
```
|
|
@@ -45,9 +45,8 @@ import {
|
|
|
45
45
|
|
|
46
46
|
## 适用场景
|
|
47
47
|
|
|
48
|
-
当
|
|
49
|
-
|
|
50
|
-
读者、产品边界或有价值的知识形态。
|
|
48
|
+
当 Code Indexer Provider 需要 Go 符号或关系时使用本包。语言解析器无法决定目标
|
|
49
|
+
读者、产品边界或有价值的知识形态,这些仍由 Provider 负责。
|
|
51
50
|
|
|
52
51
|
## 开发
|
|
53
52
|
|
package/index.js
CHANGED
|
@@ -11404,6 +11404,8 @@ function keyTokens(key) {
|
|
|
11404
11404
|
return key.replace(/([a-z0-9])([A-Z])/gu, "$1-$2").replace(/[^A-Za-z0-9]+/gu, "-").toLowerCase().split("-").filter(Boolean);
|
|
11405
11405
|
}
|
|
11406
11406
|
function sensitiveKey(key, value) {
|
|
11407
|
+
if (value === INDEXER_OUTPUT_REDACTION_MARKER)
|
|
11408
|
+
return false;
|
|
11407
11409
|
const tokens = keyTokens(key);
|
|
11408
11410
|
if (tokens.length === 0)
|
|
11409
11411
|
return false;
|
|
@@ -11445,12 +11447,12 @@ function replaceWithCount(value, pattern, replacement, count) {
|
|
|
11445
11447
|
function redactKnownText(value, count) {
|
|
11446
11448
|
let output = value;
|
|
11447
11449
|
output = replaceWithCount(output, /-----BEGIN (?:RSA |EC |OPENSSH )?PRIVATE KEY-----[\s\S]*?-----END (?:RSA |EC |OPENSSH )?PRIVATE KEY-----/gu, INDEXER_OUTPUT_REDACTION_MARKER, count);
|
|
11448
|
-
output = replaceWithCount(output,
|
|
11450
|
+
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);
|
|
11449
11451
|
output = replaceWithCount(output, /([a-z][a-z0-9+.-]*:\/\/)[^\s/@:]+:[^\s/@]+@/giu, (_match, prefix) => `${prefix}${INDEXER_OUTPUT_REDACTION_MARKER}@`, count);
|
|
11450
|
-
output = replaceWithCount(output,
|
|
11452
|
+
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);
|
|
11451
11453
|
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)";
|
|
11452
11454
|
const assignment = `(?:=\\s*|:\\s+(?=\\S)|:\\s*(?=["']))`;
|
|
11453
|
-
output = replaceWithCount(output, new RegExp(`((?:["']?${key}["']?)\\s*${assignment})(?:"(?:\\\\.|[^"])*"|'(?:\\\\.|[^'])*'|[^\\s,;}\\]]+)`, "giu"), (_match, prefix) => `${prefix}"${INDEXER_OUTPUT_REDACTION_MARKER}"`, count);
|
|
11455
|
+
output = replaceWithCount(output, new RegExp(`((?:["']?${key}["']?)\\s*${assignment})` + `(?!["']?${escapeRegExp(INDEXER_OUTPUT_REDACTION_MARKER)})` + `(?:"(?:\\\\.|[^"])*"|'(?:\\\\.|[^'])*'|[^\\s,;}\\]]+)`, "giu"), (_match, prefix) => `${prefix}"${INDEXER_OUTPUT_REDACTION_MARKER}"`, count);
|
|
11454
11456
|
return output;
|
|
11455
11457
|
}
|
|
11456
11458
|
function redactBlockedText(value, blocked, count) {
|
|
@@ -11718,6 +11720,25 @@ function createIndexerEvidenceAdapterFact(input) {
|
|
|
11718
11720
|
FACT_PAYLOADS.set(fact2, payload);
|
|
11719
11721
|
return fact2;
|
|
11720
11722
|
}
|
|
11723
|
+
function indexerEvidenceAdapterFactPayloads(result) {
|
|
11724
|
+
const payloads = result.files.flatMap((file) => file.facts.map((fact2) => {
|
|
11725
|
+
const payload = FACT_PAYLOADS.get(fact2);
|
|
11726
|
+
if (payload === undefined) {
|
|
11727
|
+
throw new TypeError(`Evidence Adapter fact payload ${fact2.fact_ref} is no longer materialized in this process`);
|
|
11728
|
+
}
|
|
11729
|
+
if (indexerEvidenceAdapterProtocolDigest(payload) !== fact2.payload_digest) {
|
|
11730
|
+
throw new TypeError(`Evidence Adapter fact payload ${fact2.fact_ref} is stale`);
|
|
11731
|
+
}
|
|
11732
|
+
return { fact_ref: fact2.fact_ref, payload };
|
|
11733
|
+
})).sort((left, right) => compareCanonicalText(left.fact_ref, right.fact_ref));
|
|
11734
|
+
return assertIndexerOutputSafe({ channel: "ipc-envelope", value: payloads });
|
|
11735
|
+
}
|
|
11736
|
+
function materializeIndexerEvidenceAdapterResult(result) {
|
|
11737
|
+
return {
|
|
11738
|
+
result,
|
|
11739
|
+
fact_payloads: indexerEvidenceAdapterFactPayloads(result)
|
|
11740
|
+
};
|
|
11741
|
+
}
|
|
11721
11742
|
function indexerEvidenceAdapterOutputDigest(value) {
|
|
11722
11743
|
return indexerEvidenceAdapterProtocolDigest(value);
|
|
11723
11744
|
}
|
|
@@ -12215,6 +12236,8 @@ function extractCallsAndRoutes(root, filePath, imports) {
|
|
|
12215
12236
|
const args = call.childForFieldName("arguments")?.namedChildren ?? [];
|
|
12216
12237
|
if (!functionNode)
|
|
12217
12238
|
continue;
|
|
12239
|
+
if (functionNode.type === "func_literal")
|
|
12240
|
+
continue;
|
|
12218
12241
|
const functionText = compact(functionNode.text);
|
|
12219
12242
|
const selectorPath = [...functionText.matchAll(/[A-Za-z_]\w*/gu)].map((match) => match[0]);
|
|
12220
12243
|
const selector = /^[A-Za-z_]\w*(?:\.|\()/u.test(functionText) && selectorPath.length >= 2 ? selectorPath : undefined;
|
|
@@ -12834,6 +12857,10 @@ var codeExtractRunnerInputSchema = exports_external.object({
|
|
|
12834
12857
|
});
|
|
12835
12858
|
// ../extract/src/evidenceAdapter.ts
|
|
12836
12859
|
function fact2(input) {
|
|
12860
|
+
const payload = redactIndexerOutput({
|
|
12861
|
+
channel: "success-payload",
|
|
12862
|
+
value: input.payload
|
|
12863
|
+
}).value;
|
|
12837
12864
|
return createIndexerEvidenceAdapterFact({
|
|
12838
12865
|
source_ref: input.sourceRef,
|
|
12839
12866
|
module_ref: input.moduleRef,
|
|
@@ -12841,10 +12868,21 @@ function fact2(input) {
|
|
|
12841
12868
|
qualified_item_path: input.qualifiedItemPath,
|
|
12842
12869
|
kind: input.kind,
|
|
12843
12870
|
signature: input.signature,
|
|
12844
|
-
payload
|
|
12871
|
+
payload,
|
|
12845
12872
|
denominator: input.denominator
|
|
12846
12873
|
});
|
|
12847
12874
|
}
|
|
12875
|
+
function uniqueFacts(facts) {
|
|
12876
|
+
const byRef = new Map;
|
|
12877
|
+
for (const value of facts) {
|
|
12878
|
+
const previous = byRef.get(value.fact_ref);
|
|
12879
|
+
if (previous !== undefined && indexerEvidenceAdapterProtocolDigest(previous) !== indexerEvidenceAdapterProtocolDigest(value)) {
|
|
12880
|
+
throw new TypeError(`ExtractionResult emits conflicting facts for ${value.fact_ref}`);
|
|
12881
|
+
}
|
|
12882
|
+
byRef.set(value.fact_ref, previous ?? value);
|
|
12883
|
+
}
|
|
12884
|
+
return [...byRef.values()];
|
|
12885
|
+
}
|
|
12848
12886
|
function semanticExtractionPayload(extraction) {
|
|
12849
12887
|
return {
|
|
12850
12888
|
version: extraction.version,
|
|
@@ -12874,6 +12912,13 @@ function relationSourceFile(relation, symbols, filePaths) {
|
|
|
12874
12912
|
}
|
|
12875
12913
|
return null;
|
|
12876
12914
|
}
|
|
12915
|
+
function relationQualifiedItemPath(relation) {
|
|
12916
|
+
const identityDigest = indexerEvidenceAdapterProtocolDigest({
|
|
12917
|
+
from: relation.from,
|
|
12918
|
+
to: relation.to
|
|
12919
|
+
});
|
|
12920
|
+
return `relation:${relation.type}@${relation.line ?? 0}#${identityDigest}`;
|
|
12921
|
+
}
|
|
12877
12922
|
function diagnosticPayload(diagnostic) {
|
|
12878
12923
|
return {
|
|
12879
12924
|
code: diagnostic.code,
|
|
@@ -12980,7 +13025,7 @@ function extractionResultToEvidenceAdapterResult(extraction, invocation) {
|
|
|
12980
13025
|
sourceRef: invocation.authorized_scope.source_ref,
|
|
12981
13026
|
moduleRef: invocation.module_ref,
|
|
12982
13027
|
normalizedPath,
|
|
12983
|
-
qualifiedItemPath:
|
|
13028
|
+
qualifiedItemPath: relationQualifiedItemPath(relation),
|
|
12984
13029
|
kind: "code-relation",
|
|
12985
13030
|
signature: relation,
|
|
12986
13031
|
payload: relation,
|
|
@@ -12996,7 +13041,7 @@ function extractionResultToEvidenceAdapterResult(extraction, invocation) {
|
|
|
12996
13041
|
role,
|
|
12997
13042
|
coverage_tier: coverage.tier,
|
|
12998
13043
|
disposition: coverageFile.disposition,
|
|
12999
|
-
facts
|
|
13044
|
+
facts: uniqueFacts(facts)
|
|
13000
13045
|
};
|
|
13001
13046
|
});
|
|
13002
13047
|
const diagnostics = [
|
|
@@ -13037,6 +13082,184 @@ function extractionResultToEvidenceAdapterResult(extraction, invocation) {
|
|
|
13037
13082
|
}]
|
|
13038
13083
|
});
|
|
13039
13084
|
}
|
|
13085
|
+
// ../../node_modules/.bun/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/impl/scanner.js
|
|
13086
|
+
var CharacterCodes;
|
|
13087
|
+
(function(CharacterCodes2) {
|
|
13088
|
+
CharacterCodes2[CharacterCodes2["lineFeed"] = 10] = "lineFeed";
|
|
13089
|
+
CharacterCodes2[CharacterCodes2["carriageReturn"] = 13] = "carriageReturn";
|
|
13090
|
+
CharacterCodes2[CharacterCodes2["space"] = 32] = "space";
|
|
13091
|
+
CharacterCodes2[CharacterCodes2["_0"] = 48] = "_0";
|
|
13092
|
+
CharacterCodes2[CharacterCodes2["_1"] = 49] = "_1";
|
|
13093
|
+
CharacterCodes2[CharacterCodes2["_2"] = 50] = "_2";
|
|
13094
|
+
CharacterCodes2[CharacterCodes2["_3"] = 51] = "_3";
|
|
13095
|
+
CharacterCodes2[CharacterCodes2["_4"] = 52] = "_4";
|
|
13096
|
+
CharacterCodes2[CharacterCodes2["_5"] = 53] = "_5";
|
|
13097
|
+
CharacterCodes2[CharacterCodes2["_6"] = 54] = "_6";
|
|
13098
|
+
CharacterCodes2[CharacterCodes2["_7"] = 55] = "_7";
|
|
13099
|
+
CharacterCodes2[CharacterCodes2["_8"] = 56] = "_8";
|
|
13100
|
+
CharacterCodes2[CharacterCodes2["_9"] = 57] = "_9";
|
|
13101
|
+
CharacterCodes2[CharacterCodes2["a"] = 97] = "a";
|
|
13102
|
+
CharacterCodes2[CharacterCodes2["b"] = 98] = "b";
|
|
13103
|
+
CharacterCodes2[CharacterCodes2["c"] = 99] = "c";
|
|
13104
|
+
CharacterCodes2[CharacterCodes2["d"] = 100] = "d";
|
|
13105
|
+
CharacterCodes2[CharacterCodes2["e"] = 101] = "e";
|
|
13106
|
+
CharacterCodes2[CharacterCodes2["f"] = 102] = "f";
|
|
13107
|
+
CharacterCodes2[CharacterCodes2["g"] = 103] = "g";
|
|
13108
|
+
CharacterCodes2[CharacterCodes2["h"] = 104] = "h";
|
|
13109
|
+
CharacterCodes2[CharacterCodes2["i"] = 105] = "i";
|
|
13110
|
+
CharacterCodes2[CharacterCodes2["j"] = 106] = "j";
|
|
13111
|
+
CharacterCodes2[CharacterCodes2["k"] = 107] = "k";
|
|
13112
|
+
CharacterCodes2[CharacterCodes2["l"] = 108] = "l";
|
|
13113
|
+
CharacterCodes2[CharacterCodes2["m"] = 109] = "m";
|
|
13114
|
+
CharacterCodes2[CharacterCodes2["n"] = 110] = "n";
|
|
13115
|
+
CharacterCodes2[CharacterCodes2["o"] = 111] = "o";
|
|
13116
|
+
CharacterCodes2[CharacterCodes2["p"] = 112] = "p";
|
|
13117
|
+
CharacterCodes2[CharacterCodes2["q"] = 113] = "q";
|
|
13118
|
+
CharacterCodes2[CharacterCodes2["r"] = 114] = "r";
|
|
13119
|
+
CharacterCodes2[CharacterCodes2["s"] = 115] = "s";
|
|
13120
|
+
CharacterCodes2[CharacterCodes2["t"] = 116] = "t";
|
|
13121
|
+
CharacterCodes2[CharacterCodes2["u"] = 117] = "u";
|
|
13122
|
+
CharacterCodes2[CharacterCodes2["v"] = 118] = "v";
|
|
13123
|
+
CharacterCodes2[CharacterCodes2["w"] = 119] = "w";
|
|
13124
|
+
CharacterCodes2[CharacterCodes2["x"] = 120] = "x";
|
|
13125
|
+
CharacterCodes2[CharacterCodes2["y"] = 121] = "y";
|
|
13126
|
+
CharacterCodes2[CharacterCodes2["z"] = 122] = "z";
|
|
13127
|
+
CharacterCodes2[CharacterCodes2["A"] = 65] = "A";
|
|
13128
|
+
CharacterCodes2[CharacterCodes2["B"] = 66] = "B";
|
|
13129
|
+
CharacterCodes2[CharacterCodes2["C"] = 67] = "C";
|
|
13130
|
+
CharacterCodes2[CharacterCodes2["D"] = 68] = "D";
|
|
13131
|
+
CharacterCodes2[CharacterCodes2["E"] = 69] = "E";
|
|
13132
|
+
CharacterCodes2[CharacterCodes2["F"] = 70] = "F";
|
|
13133
|
+
CharacterCodes2[CharacterCodes2["G"] = 71] = "G";
|
|
13134
|
+
CharacterCodes2[CharacterCodes2["H"] = 72] = "H";
|
|
13135
|
+
CharacterCodes2[CharacterCodes2["I"] = 73] = "I";
|
|
13136
|
+
CharacterCodes2[CharacterCodes2["J"] = 74] = "J";
|
|
13137
|
+
CharacterCodes2[CharacterCodes2["K"] = 75] = "K";
|
|
13138
|
+
CharacterCodes2[CharacterCodes2["L"] = 76] = "L";
|
|
13139
|
+
CharacterCodes2[CharacterCodes2["M"] = 77] = "M";
|
|
13140
|
+
CharacterCodes2[CharacterCodes2["N"] = 78] = "N";
|
|
13141
|
+
CharacterCodes2[CharacterCodes2["O"] = 79] = "O";
|
|
13142
|
+
CharacterCodes2[CharacterCodes2["P"] = 80] = "P";
|
|
13143
|
+
CharacterCodes2[CharacterCodes2["Q"] = 81] = "Q";
|
|
13144
|
+
CharacterCodes2[CharacterCodes2["R"] = 82] = "R";
|
|
13145
|
+
CharacterCodes2[CharacterCodes2["S"] = 83] = "S";
|
|
13146
|
+
CharacterCodes2[CharacterCodes2["T"] = 84] = "T";
|
|
13147
|
+
CharacterCodes2[CharacterCodes2["U"] = 85] = "U";
|
|
13148
|
+
CharacterCodes2[CharacterCodes2["V"] = 86] = "V";
|
|
13149
|
+
CharacterCodes2[CharacterCodes2["W"] = 87] = "W";
|
|
13150
|
+
CharacterCodes2[CharacterCodes2["X"] = 88] = "X";
|
|
13151
|
+
CharacterCodes2[CharacterCodes2["Y"] = 89] = "Y";
|
|
13152
|
+
CharacterCodes2[CharacterCodes2["Z"] = 90] = "Z";
|
|
13153
|
+
CharacterCodes2[CharacterCodes2["asterisk"] = 42] = "asterisk";
|
|
13154
|
+
CharacterCodes2[CharacterCodes2["backslash"] = 92] = "backslash";
|
|
13155
|
+
CharacterCodes2[CharacterCodes2["closeBrace"] = 125] = "closeBrace";
|
|
13156
|
+
CharacterCodes2[CharacterCodes2["closeBracket"] = 93] = "closeBracket";
|
|
13157
|
+
CharacterCodes2[CharacterCodes2["colon"] = 58] = "colon";
|
|
13158
|
+
CharacterCodes2[CharacterCodes2["comma"] = 44] = "comma";
|
|
13159
|
+
CharacterCodes2[CharacterCodes2["dot"] = 46] = "dot";
|
|
13160
|
+
CharacterCodes2[CharacterCodes2["doubleQuote"] = 34] = "doubleQuote";
|
|
13161
|
+
CharacterCodes2[CharacterCodes2["minus"] = 45] = "minus";
|
|
13162
|
+
CharacterCodes2[CharacterCodes2["openBrace"] = 123] = "openBrace";
|
|
13163
|
+
CharacterCodes2[CharacterCodes2["openBracket"] = 91] = "openBracket";
|
|
13164
|
+
CharacterCodes2[CharacterCodes2["plus"] = 43] = "plus";
|
|
13165
|
+
CharacterCodes2[CharacterCodes2["slash"] = 47] = "slash";
|
|
13166
|
+
CharacterCodes2[CharacterCodes2["formFeed"] = 12] = "formFeed";
|
|
13167
|
+
CharacterCodes2[CharacterCodes2["tab"] = 9] = "tab";
|
|
13168
|
+
})(CharacterCodes || (CharacterCodes = {}));
|
|
13169
|
+
|
|
13170
|
+
// ../../node_modules/.bun/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/impl/string-intern.js
|
|
13171
|
+
var cachedSpaces = new Array(20).fill(0).map((_, index) => {
|
|
13172
|
+
return " ".repeat(index);
|
|
13173
|
+
});
|
|
13174
|
+
var maxCachedValues = 200;
|
|
13175
|
+
var cachedBreakLinesWithSpaces = {
|
|
13176
|
+
" ": {
|
|
13177
|
+
"\n": new Array(maxCachedValues).fill(0).map((_, index) => {
|
|
13178
|
+
return `
|
|
13179
|
+
` + " ".repeat(index);
|
|
13180
|
+
}),
|
|
13181
|
+
"\r": new Array(maxCachedValues).fill(0).map((_, index) => {
|
|
13182
|
+
return "\r" + " ".repeat(index);
|
|
13183
|
+
}),
|
|
13184
|
+
"\r\n": new Array(maxCachedValues).fill(0).map((_, index) => {
|
|
13185
|
+
return `\r
|
|
13186
|
+
` + " ".repeat(index);
|
|
13187
|
+
})
|
|
13188
|
+
},
|
|
13189
|
+
"\t": {
|
|
13190
|
+
"\n": new Array(maxCachedValues).fill(0).map((_, index) => {
|
|
13191
|
+
return `
|
|
13192
|
+
` + "\t".repeat(index);
|
|
13193
|
+
}),
|
|
13194
|
+
"\r": new Array(maxCachedValues).fill(0).map((_, index) => {
|
|
13195
|
+
return "\r" + "\t".repeat(index);
|
|
13196
|
+
}),
|
|
13197
|
+
"\r\n": new Array(maxCachedValues).fill(0).map((_, index) => {
|
|
13198
|
+
return `\r
|
|
13199
|
+
` + "\t".repeat(index);
|
|
13200
|
+
})
|
|
13201
|
+
}
|
|
13202
|
+
};
|
|
13203
|
+
|
|
13204
|
+
// ../../node_modules/.bun/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/impl/parser.js
|
|
13205
|
+
var ParseOptions;
|
|
13206
|
+
(function(ParseOptions2) {
|
|
13207
|
+
ParseOptions2.DEFAULT = {
|
|
13208
|
+
allowTrailingComma: false
|
|
13209
|
+
};
|
|
13210
|
+
})(ParseOptions || (ParseOptions = {}));
|
|
13211
|
+
|
|
13212
|
+
// ../../node_modules/.bun/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/main.js
|
|
13213
|
+
var ScanError;
|
|
13214
|
+
(function(ScanError2) {
|
|
13215
|
+
ScanError2[ScanError2["None"] = 0] = "None";
|
|
13216
|
+
ScanError2[ScanError2["UnexpectedEndOfComment"] = 1] = "UnexpectedEndOfComment";
|
|
13217
|
+
ScanError2[ScanError2["UnexpectedEndOfString"] = 2] = "UnexpectedEndOfString";
|
|
13218
|
+
ScanError2[ScanError2["UnexpectedEndOfNumber"] = 3] = "UnexpectedEndOfNumber";
|
|
13219
|
+
ScanError2[ScanError2["InvalidUnicode"] = 4] = "InvalidUnicode";
|
|
13220
|
+
ScanError2[ScanError2["InvalidEscapeCharacter"] = 5] = "InvalidEscapeCharacter";
|
|
13221
|
+
ScanError2[ScanError2["InvalidCharacter"] = 6] = "InvalidCharacter";
|
|
13222
|
+
})(ScanError || (ScanError = {}));
|
|
13223
|
+
var SyntaxKind;
|
|
13224
|
+
(function(SyntaxKind2) {
|
|
13225
|
+
SyntaxKind2[SyntaxKind2["OpenBraceToken"] = 1] = "OpenBraceToken";
|
|
13226
|
+
SyntaxKind2[SyntaxKind2["CloseBraceToken"] = 2] = "CloseBraceToken";
|
|
13227
|
+
SyntaxKind2[SyntaxKind2["OpenBracketToken"] = 3] = "OpenBracketToken";
|
|
13228
|
+
SyntaxKind2[SyntaxKind2["CloseBracketToken"] = 4] = "CloseBracketToken";
|
|
13229
|
+
SyntaxKind2[SyntaxKind2["CommaToken"] = 5] = "CommaToken";
|
|
13230
|
+
SyntaxKind2[SyntaxKind2["ColonToken"] = 6] = "ColonToken";
|
|
13231
|
+
SyntaxKind2[SyntaxKind2["NullKeyword"] = 7] = "NullKeyword";
|
|
13232
|
+
SyntaxKind2[SyntaxKind2["TrueKeyword"] = 8] = "TrueKeyword";
|
|
13233
|
+
SyntaxKind2[SyntaxKind2["FalseKeyword"] = 9] = "FalseKeyword";
|
|
13234
|
+
SyntaxKind2[SyntaxKind2["StringLiteral"] = 10] = "StringLiteral";
|
|
13235
|
+
SyntaxKind2[SyntaxKind2["NumericLiteral"] = 11] = "NumericLiteral";
|
|
13236
|
+
SyntaxKind2[SyntaxKind2["LineCommentTrivia"] = 12] = "LineCommentTrivia";
|
|
13237
|
+
SyntaxKind2[SyntaxKind2["BlockCommentTrivia"] = 13] = "BlockCommentTrivia";
|
|
13238
|
+
SyntaxKind2[SyntaxKind2["LineBreakTrivia"] = 14] = "LineBreakTrivia";
|
|
13239
|
+
SyntaxKind2[SyntaxKind2["Trivia"] = 15] = "Trivia";
|
|
13240
|
+
SyntaxKind2[SyntaxKind2["Unknown"] = 16] = "Unknown";
|
|
13241
|
+
SyntaxKind2[SyntaxKind2["EOF"] = 17] = "EOF";
|
|
13242
|
+
})(SyntaxKind || (SyntaxKind = {}));
|
|
13243
|
+
var ParseErrorCode;
|
|
13244
|
+
(function(ParseErrorCode2) {
|
|
13245
|
+
ParseErrorCode2[ParseErrorCode2["InvalidSymbol"] = 1] = "InvalidSymbol";
|
|
13246
|
+
ParseErrorCode2[ParseErrorCode2["InvalidNumberFormat"] = 2] = "InvalidNumberFormat";
|
|
13247
|
+
ParseErrorCode2[ParseErrorCode2["PropertyNameExpected"] = 3] = "PropertyNameExpected";
|
|
13248
|
+
ParseErrorCode2[ParseErrorCode2["ValueExpected"] = 4] = "ValueExpected";
|
|
13249
|
+
ParseErrorCode2[ParseErrorCode2["ColonExpected"] = 5] = "ColonExpected";
|
|
13250
|
+
ParseErrorCode2[ParseErrorCode2["CommaExpected"] = 6] = "CommaExpected";
|
|
13251
|
+
ParseErrorCode2[ParseErrorCode2["CloseBraceExpected"] = 7] = "CloseBraceExpected";
|
|
13252
|
+
ParseErrorCode2[ParseErrorCode2["CloseBracketExpected"] = 8] = "CloseBracketExpected";
|
|
13253
|
+
ParseErrorCode2[ParseErrorCode2["EndOfFileExpected"] = 9] = "EndOfFileExpected";
|
|
13254
|
+
ParseErrorCode2[ParseErrorCode2["InvalidCommentToken"] = 10] = "InvalidCommentToken";
|
|
13255
|
+
ParseErrorCode2[ParseErrorCode2["UnexpectedEndOfComment"] = 11] = "UnexpectedEndOfComment";
|
|
13256
|
+
ParseErrorCode2[ParseErrorCode2["UnexpectedEndOfString"] = 12] = "UnexpectedEndOfString";
|
|
13257
|
+
ParseErrorCode2[ParseErrorCode2["UnexpectedEndOfNumber"] = 13] = "UnexpectedEndOfNumber";
|
|
13258
|
+
ParseErrorCode2[ParseErrorCode2["InvalidUnicode"] = 14] = "InvalidUnicode";
|
|
13259
|
+
ParseErrorCode2[ParseErrorCode2["InvalidEscapeCharacter"] = 15] = "InvalidEscapeCharacter";
|
|
13260
|
+
ParseErrorCode2[ParseErrorCode2["InvalidCharacter"] = 16] = "InvalidCharacter";
|
|
13261
|
+
})(ParseErrorCode || (ParseErrorCode = {}));
|
|
13262
|
+
|
|
13040
13263
|
// ../../node_modules/.bun/eslint-visitor-keys@5.0.1/node_modules/eslint-visitor-keys/lib/visitor-keys.js
|
|
13041
13264
|
var KEYS = {
|
|
13042
13265
|
ArrayExpression: ["elements"],
|
|
@@ -13448,9 +13671,13 @@ function goExtractionToEvidenceAdapterResult(extraction, invocation) {
|
|
|
13448
13671
|
}
|
|
13449
13672
|
return extractionResultToEvidenceAdapterResult(extraction, invocation);
|
|
13450
13673
|
}
|
|
13674
|
+
function goExtractionToEvidenceAdapterMaterialization(extraction, invocation) {
|
|
13675
|
+
return materializeIndexerEvidenceAdapterResult(goExtractionToEvidenceAdapterResult(extraction, invocation));
|
|
13676
|
+
}
|
|
13451
13677
|
export {
|
|
13452
13678
|
indexGoSource,
|
|
13453
13679
|
indexGoRepository,
|
|
13454
13680
|
goExtractionToEvidenceAdapterResult,
|
|
13681
|
+
goExtractionToEvidenceAdapterMaterialization,
|
|
13455
13682
|
GoPlugin
|
|
13456
13683
|
};
|