kirograph 0.13.0 → 0.14.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 +332 -93
- package/dist/bin/commands/caveman.js +19 -2
- package/dist/bin/commands/caveman.js.map +2 -2
- package/dist/bin/commands/compression.js +109 -0
- package/dist/bin/commands/compression.js.map +7 -0
- package/dist/bin/commands/context.js +31 -24
- package/dist/bin/commands/context.js.map +2 -2
- package/dist/bin/commands/exec.js +107 -0
- package/dist/bin/commands/exec.js.map +7 -0
- package/dist/bin/commands/gain.js +119 -0
- package/dist/bin/commands/gain.js.map +7 -0
- package/dist/bin/commands/help.js +16 -5
- package/dist/bin/commands/help.js.map +2 -2
- package/dist/bin/commands/install.js +8 -2
- package/dist/bin/commands/install.js.map +2 -2
- package/dist/bin/commands/query.js +5 -1
- package/dist/bin/commands/query.js.map +2 -2
- package/dist/bin/commands/serve.js +2 -2
- package/dist/bin/commands/serve.js.map +2 -2
- package/dist/bin/commands/uninit.js +65 -41
- package/dist/bin/commands/uninit.js.map +2 -2
- package/dist/bin/commands/utils.js +16 -0
- package/dist/bin/commands/utils.js.map +2 -2
- package/dist/bin/installer/cli-agent.js +5 -25
- package/dist/bin/installer/cli-agent.js.map +2 -2
- package/dist/bin/installer/common.js +154 -0
- package/dist/bin/installer/common.js.map +7 -0
- package/dist/bin/installer/config-prompt.js +9 -2
- package/dist/bin/installer/config-prompt.js.map +2 -2
- package/dist/bin/installer/hooks.js +19 -1
- package/dist/bin/installer/hooks.js.map +2 -2
- package/dist/bin/installer/index.js +104 -86
- package/dist/bin/installer/index.js.map +2 -2
- package/dist/bin/installer/instructions.js +60 -0
- package/dist/bin/installer/instructions.js.map +7 -0
- package/dist/bin/installer/mcp.js +6 -36
- package/dist/bin/installer/mcp.js.map +2 -2
- package/dist/bin/installer/steering.js +116 -40
- package/dist/bin/installer/steering.js.map +2 -2
- package/dist/bin/installer/targets/claude.js +79 -0
- package/dist/bin/installer/targets/claude.js.map +7 -0
- package/dist/bin/installer/targets/codex.js +77 -0
- package/dist/bin/installer/targets/codex.js.map +7 -0
- package/dist/bin/installer/targets/index.js +57 -0
- package/dist/bin/installer/targets/index.js.map +7 -0
- package/dist/bin/installer/targets/kiro.js +63 -0
- package/dist/bin/installer/targets/kiro.js.map +7 -0
- package/dist/bin/kirograph.js +7 -1
- package/dist/bin/kirograph.js.map +3 -3
- package/dist/compression/filters/aws.js +418 -0
- package/dist/compression/filters/aws.js.map +7 -0
- package/dist/compression/filters/docker.js +153 -0
- package/dist/compression/filters/docker.js.map +7 -0
- package/dist/compression/filters/files.js +150 -0
- package/dist/compression/filters/files.js.map +7 -0
- package/dist/compression/filters/generic.js +86 -0
- package/dist/compression/filters/generic.js.map +7 -0
- package/dist/compression/filters/git.js +272 -0
- package/dist/compression/filters/git.js.map +7 -0
- package/dist/compression/filters/github.js +137 -0
- package/dist/compression/filters/github.js.map +7 -0
- package/dist/compression/filters/lint.js +280 -0
- package/dist/compression/filters/lint.js.map +7 -0
- package/dist/compression/filters/misc.js +212 -0
- package/dist/compression/filters/misc.js.map +7 -0
- package/dist/compression/filters/package.js +151 -0
- package/dist/compression/filters/package.js.map +7 -0
- package/dist/compression/filters/test.js +266 -0
- package/dist/compression/filters/test.js.map +7 -0
- package/dist/compression/index.js +144 -0
- package/dist/compression/index.js.map +7 -0
- package/dist/compression/naive-cost.js +94 -0
- package/dist/compression/naive-cost.js.map +7 -0
- package/dist/compression/tracker.js +228 -0
- package/dist/compression/tracker.js.map +7 -0
- package/dist/compression/types.js +17 -0
- package/dist/compression/types.js.map +7 -0
- package/dist/config.js +18 -1
- package/dist/config.js.map +2 -2
- package/dist/mcp/tool-names.js +50 -0
- package/dist/mcp/tool-names.js.map +7 -0
- package/dist/mcp/tools.js +173 -4
- package/dist/mcp/tools.js.map +3 -3
- package/package.json +2 -2
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var github_exports = {};
|
|
20
|
+
__export(github_exports, {
|
|
21
|
+
githubFilter: () => githubFilter
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(github_exports);
|
|
24
|
+
const githubFilter = {
|
|
25
|
+
name: "gh",
|
|
26
|
+
matches(command) {
|
|
27
|
+
return /\bgh\s/.test(command);
|
|
28
|
+
},
|
|
29
|
+
filter(command, rawOutput, level) {
|
|
30
|
+
if (/gh\s+pr\s+list/.test(command)) return filterPrList(rawOutput, level);
|
|
31
|
+
if (/gh\s+pr\s+view/.test(command)) return filterPrView(rawOutput, level);
|
|
32
|
+
if (/gh\s+pr\s+checks/.test(command)) return filterPrChecks(rawOutput, level);
|
|
33
|
+
if (/gh\s+issue\s+list/.test(command)) return filterIssueList(rawOutput, level);
|
|
34
|
+
if (/gh\s+run\s+list/.test(command)) return filterRunList(rawOutput, level);
|
|
35
|
+
if (/gh\s+run\s+view/.test(command)) return filterRunView(rawOutput, level);
|
|
36
|
+
return { output: rawOutput, strategy: "gh:passthrough" };
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
function filterPrList(raw, level) {
|
|
40
|
+
const lines = raw.split("\n").filter((l) => l.trim());
|
|
41
|
+
if (lines.length === 0) return { output: "no open PRs", strategy: "gh:pr-list:empty" };
|
|
42
|
+
if (level === "ultra") {
|
|
43
|
+
return { output: `${lines.length} PRs`, strategy: "gh:pr-list:ultra" };
|
|
44
|
+
}
|
|
45
|
+
const compact = lines.map((l) => {
|
|
46
|
+
const parts = l.split(" ");
|
|
47
|
+
if (parts.length >= 3) {
|
|
48
|
+
const [num, title, branch] = parts;
|
|
49
|
+
return `#${num} ${title} (${branch})`;
|
|
50
|
+
}
|
|
51
|
+
return l;
|
|
52
|
+
});
|
|
53
|
+
const maxLines = level === "aggressive" ? 10 : 20;
|
|
54
|
+
const shown = compact.slice(0, maxLines).join("\n");
|
|
55
|
+
const extra = compact.length > maxLines ? `
|
|
56
|
+
\u2026+${compact.length - maxLines} more` : "";
|
|
57
|
+
return { output: `${compact.length} PRs:
|
|
58
|
+
${shown}${extra}`, strategy: "gh:pr-list" };
|
|
59
|
+
}
|
|
60
|
+
function filterPrView(raw, level) {
|
|
61
|
+
const lines = raw.split("\n");
|
|
62
|
+
if (level === "ultra") {
|
|
63
|
+
const titleLine = lines.find((l) => l.startsWith("title:") || /^#\d+/.test(l.trim()));
|
|
64
|
+
const stateLine = lines.find((l) => l.includes("OPEN") || l.includes("MERGED") || l.includes("CLOSED"));
|
|
65
|
+
return { output: (titleLine || lines[0] || "").trim() + (stateLine ? ` [${stateLine.trim()}]` : ""), strategy: "gh:pr-view:ultra" };
|
|
66
|
+
}
|
|
67
|
+
const important = lines.filter((l) => {
|
|
68
|
+
const trimmed = l.trim();
|
|
69
|
+
if (!trimmed) return false;
|
|
70
|
+
if (trimmed.startsWith("--")) return false;
|
|
71
|
+
return true;
|
|
72
|
+
});
|
|
73
|
+
const maxLines = level === "aggressive" ? 20 : 40;
|
|
74
|
+
if (important.length <= maxLines) return { output: important.join("\n"), strategy: "gh:pr-view" };
|
|
75
|
+
return { output: important.slice(0, maxLines).join("\n") + `
|
|
76
|
+
\u2026+${important.length - maxLines} more lines`, strategy: "gh:pr-view" };
|
|
77
|
+
}
|
|
78
|
+
function filterPrChecks(raw, level) {
|
|
79
|
+
const lines = raw.split("\n").filter((l) => l.trim());
|
|
80
|
+
if (lines.length === 0) return { output: "no checks", strategy: "gh:pr-checks:empty" };
|
|
81
|
+
const passed = lines.filter((l) => l.includes("pass") || l.includes("\u2713")).length;
|
|
82
|
+
const failed = lines.filter((l) => l.includes("fail") || l.includes("\u2717") || l.includes("X")).length;
|
|
83
|
+
if (level === "ultra") {
|
|
84
|
+
return { output: failed > 0 ? `\u2717 ${failed} failed, ${passed} passed` : `\u2713 ${passed} passed`, strategy: "gh:pr-checks:ultra" };
|
|
85
|
+
}
|
|
86
|
+
return { output: raw, strategy: "gh:pr-checks" };
|
|
87
|
+
}
|
|
88
|
+
function filterIssueList(raw, level) {
|
|
89
|
+
const lines = raw.split("\n").filter((l) => l.trim());
|
|
90
|
+
if (lines.length === 0) return { output: "no open issues", strategy: "gh:issue-list:empty" };
|
|
91
|
+
if (level === "ultra") {
|
|
92
|
+
return { output: `${lines.length} issues`, strategy: "gh:issue-list:ultra" };
|
|
93
|
+
}
|
|
94
|
+
const compact = lines.map((l) => {
|
|
95
|
+
const parts = l.split(" ");
|
|
96
|
+
if (parts.length >= 3) {
|
|
97
|
+
const [num, title] = parts;
|
|
98
|
+
return `#${num} ${title}`;
|
|
99
|
+
}
|
|
100
|
+
return l;
|
|
101
|
+
});
|
|
102
|
+
const maxLines = level === "aggressive" ? 10 : 20;
|
|
103
|
+
const shown = compact.slice(0, maxLines).join("\n");
|
|
104
|
+
const extra = compact.length > maxLines ? `
|
|
105
|
+
\u2026+${compact.length - maxLines} more` : "";
|
|
106
|
+
return { output: `${compact.length} issues:
|
|
107
|
+
${shown}${extra}`, strategy: "gh:issue-list" };
|
|
108
|
+
}
|
|
109
|
+
function filterRunList(raw, level) {
|
|
110
|
+
const lines = raw.split("\n").filter((l) => l.trim());
|
|
111
|
+
if (lines.length === 0) return { output: "no runs", strategy: "gh:run-list:empty" };
|
|
112
|
+
if (level === "ultra") {
|
|
113
|
+
const failed = lines.filter((l) => l.includes("failure") || l.includes("X")).length;
|
|
114
|
+
return { output: failed > 0 ? `${lines.length} runs (${failed} failed)` : `${lines.length} runs`, strategy: "gh:run-list:ultra" };
|
|
115
|
+
}
|
|
116
|
+
const maxLines = level === "aggressive" ? 10 : 20;
|
|
117
|
+
const shown = lines.slice(0, maxLines).join("\n");
|
|
118
|
+
const extra = lines.length > maxLines ? `
|
|
119
|
+
\u2026+${lines.length - maxLines} more` : "";
|
|
120
|
+
return { output: `${shown}${extra}`, strategy: "gh:run-list" };
|
|
121
|
+
}
|
|
122
|
+
function filterRunView(raw, level) {
|
|
123
|
+
const lines = raw.split("\n").filter((l) => l.trim());
|
|
124
|
+
if (level === "ultra") {
|
|
125
|
+
const statusLine = lines.find((l) => l.includes("completed") || l.includes("in_progress") || l.includes("failure"));
|
|
126
|
+
return { output: statusLine || lines[0] || "", strategy: "gh:run-view:ultra" };
|
|
127
|
+
}
|
|
128
|
+
const maxLines = level === "aggressive" ? 20 : 40;
|
|
129
|
+
if (lines.length <= maxLines) return { output: raw, strategy: "gh:run-view" };
|
|
130
|
+
return { output: lines.slice(0, maxLines).join("\n") + `
|
|
131
|
+
\u2026+${lines.length - maxLines} more`, strategy: "gh:run-view" };
|
|
132
|
+
}
|
|
133
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
134
|
+
0 && (module.exports = {
|
|
135
|
+
githubFilter
|
|
136
|
+
});
|
|
137
|
+
//# sourceMappingURL=github.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/compression/filters/github.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * GitHub CLI (gh) output filters\n */\n\nimport type { CommandFilter, FilterResult, CompressorOptions } from '../types';\n\nexport const githubFilter: CommandFilter = {\n name: 'gh',\n\n matches(command: string): boolean {\n return /\\bgh\\s/.test(command);\n },\n\n filter(command: string, rawOutput: string, level: CompressorOptions['level']): FilterResult {\n if (/gh\\s+pr\\s+list/.test(command)) return filterPrList(rawOutput, level);\n if (/gh\\s+pr\\s+view/.test(command)) return filterPrView(rawOutput, level);\n if (/gh\\s+pr\\s+checks/.test(command)) return filterPrChecks(rawOutput, level);\n if (/gh\\s+issue\\s+list/.test(command)) return filterIssueList(rawOutput, level);\n if (/gh\\s+run\\s+list/.test(command)) return filterRunList(rawOutput, level);\n if (/gh\\s+run\\s+view/.test(command)) return filterRunView(rawOutput, level);\n return { output: rawOutput, strategy: 'gh:passthrough' };\n },\n};\n\nfunction filterPrList(raw: string, level: CompressorOptions['level']): FilterResult {\n const lines = raw.split('\\n').filter(l => l.trim());\n if (lines.length === 0) return { output: 'no open PRs', strategy: 'gh:pr-list:empty' };\n\n if (level === 'ultra') {\n return { output: `${lines.length} PRs`, strategy: 'gh:pr-list:ultra' };\n }\n\n // gh pr list outputs tab-separated: number, title, branch, status\n const compact = lines.map(l => {\n const parts = l.split('\\t');\n if (parts.length >= 3) {\n const [num, title, branch] = parts;\n return `#${num} ${title} (${branch})`;\n }\n return l;\n });\n\n const maxLines = level === 'aggressive' ? 10 : 20;\n const shown = compact.slice(0, maxLines).join('\\n');\n const extra = compact.length > maxLines ? `\\n\u2026+${compact.length - maxLines} more` : '';\n\n return { output: `${compact.length} PRs:\\n${shown}${extra}`, strategy: 'gh:pr-list' };\n}\n\nfunction filterPrView(raw: string, level: CompressorOptions['level']): FilterResult {\n const lines = raw.split('\\n');\n\n if (level === 'ultra') {\n // Extract title and state\n const titleLine = lines.find(l => l.startsWith('title:') || /^#\\d+/.test(l.trim()));\n const stateLine = lines.find(l => l.includes('OPEN') || l.includes('MERGED') || l.includes('CLOSED'));\n return { output: (titleLine || lines[0] || '').trim() + (stateLine ? ` [${stateLine.trim()}]` : ''), strategy: 'gh:pr-view:ultra' };\n }\n\n // Strip verbose metadata, keep: title, state, author, body summary, checks\n const important = lines.filter(l => {\n const trimmed = l.trim();\n if (!trimmed) return false;\n if (trimmed.startsWith('--')) return false;\n return true;\n });\n\n const maxLines = level === 'aggressive' ? 20 : 40;\n if (important.length <= maxLines) return { output: important.join('\\n'), strategy: 'gh:pr-view' };\n\n return { output: important.slice(0, maxLines).join('\\n') + `\\n\u2026+${important.length - maxLines} more lines`, strategy: 'gh:pr-view' };\n}\n\nfunction filterPrChecks(raw: string, level: CompressorOptions['level']): FilterResult {\n const lines = raw.split('\\n').filter(l => l.trim());\n if (lines.length === 0) return { output: 'no checks', strategy: 'gh:pr-checks:empty' };\n\n const passed = lines.filter(l => l.includes('pass') || l.includes('\u2713')).length;\n const failed = lines.filter(l => l.includes('fail') || l.includes('\u2717') || l.includes('X')).length;\n\n if (level === 'ultra') {\n return { output: failed > 0 ? `\u2717 ${failed} failed, ${passed} passed` : `\u2713 ${passed} passed`, strategy: 'gh:pr-checks:ultra' };\n }\n\n return { output: raw, strategy: 'gh:pr-checks' };\n}\n\nfunction filterIssueList(raw: string, level: CompressorOptions['level']): FilterResult {\n const lines = raw.split('\\n').filter(l => l.trim());\n if (lines.length === 0) return { output: 'no open issues', strategy: 'gh:issue-list:empty' };\n\n if (level === 'ultra') {\n return { output: `${lines.length} issues`, strategy: 'gh:issue-list:ultra' };\n }\n\n const compact = lines.map(l => {\n const parts = l.split('\\t');\n if (parts.length >= 3) {\n const [num, title] = parts;\n return `#${num} ${title}`;\n }\n return l;\n });\n\n const maxLines = level === 'aggressive' ? 10 : 20;\n const shown = compact.slice(0, maxLines).join('\\n');\n const extra = compact.length > maxLines ? `\\n\u2026+${compact.length - maxLines} more` : '';\n\n return { output: `${compact.length} issues:\\n${shown}${extra}`, strategy: 'gh:issue-list' };\n}\n\nfunction filterRunList(raw: string, level: CompressorOptions['level']): FilterResult {\n const lines = raw.split('\\n').filter(l => l.trim());\n if (lines.length === 0) return { output: 'no runs', strategy: 'gh:run-list:empty' };\n\n if (level === 'ultra') {\n const failed = lines.filter(l => l.includes('failure') || l.includes('X')).length;\n return { output: failed > 0 ? `${lines.length} runs (${failed} failed)` : `${lines.length} runs`, strategy: 'gh:run-list:ultra' };\n }\n\n const maxLines = level === 'aggressive' ? 10 : 20;\n const shown = lines.slice(0, maxLines).join('\\n');\n const extra = lines.length > maxLines ? `\\n\u2026+${lines.length - maxLines} more` : '';\n\n return { output: `${shown}${extra}`, strategy: 'gh:run-list' };\n}\n\nfunction filterRunView(raw: string, level: CompressorOptions['level']): FilterResult {\n const lines = raw.split('\\n').filter(l => l.trim());\n\n if (level === 'ultra') {\n const statusLine = lines.find(l => l.includes('completed') || l.includes('in_progress') || l.includes('failure'));\n return { output: statusLine || lines[0] || '', strategy: 'gh:run-view:ultra' };\n }\n\n const maxLines = level === 'aggressive' ? 20 : 40;\n if (lines.length <= maxLines) return { output: raw, strategy: 'gh:run-view' };\n return { output: lines.slice(0, maxLines).join('\\n') + `\\n\u2026+${lines.length - maxLines} more`, strategy: 'gh:run-view' };\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAMO,MAAM,eAA8B;AAAA,EACzC,MAAM;AAAA,EAEN,QAAQ,SAA0B;AAChC,WAAO,SAAS,KAAK,OAAO;AAAA,EAC9B;AAAA,EAEA,OAAO,SAAiB,WAAmB,OAAiD;AAC1F,QAAI,iBAAiB,KAAK,OAAO,EAAG,QAAO,aAAa,WAAW,KAAK;AACxE,QAAI,iBAAiB,KAAK,OAAO,EAAG,QAAO,aAAa,WAAW,KAAK;AACxE,QAAI,mBAAmB,KAAK,OAAO,EAAG,QAAO,eAAe,WAAW,KAAK;AAC5E,QAAI,oBAAoB,KAAK,OAAO,EAAG,QAAO,gBAAgB,WAAW,KAAK;AAC9E,QAAI,kBAAkB,KAAK,OAAO,EAAG,QAAO,cAAc,WAAW,KAAK;AAC1E,QAAI,kBAAkB,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SAAO,EAAE,QAAQ,GAAG,KAAK,GAAG,KAAK,IAAI,UAAU,cAAc;AAC/D;AAEA,SAAS,cAAc,KAAa,OAAiD;AACnF,QAAM,QAAQ,IAAI,MAAM,IAAI,EAAE,OAAO,OAAK,EAAE,KAAK,CAAC;AAElD,MAAI,UAAU,SAAS;AACrB,UAAM,aAAa,MAAM,KAAK,OAAK,EAAE,SAAS,WAAW,KAAK,EAAE,SAAS,aAAa,KAAK,EAAE,SAAS,SAAS,CAAC;AAChH,WAAO,EAAE,QAAQ,cAAc,MAAM,CAAC,KAAK,IAAI,UAAU,oBAAoB;AAAA,EAC/E;AAEA,QAAM,WAAW,UAAU,eAAe,KAAK;AAC/C,MAAI,MAAM,UAAU,SAAU,QAAO,EAAE,QAAQ,KAAK,UAAU,cAAc;AAC5E,SAAO,EAAE,QAAQ,MAAM,MAAM,GAAG,QAAQ,EAAE,KAAK,IAAI,IAAI;AAAA,SAAO,MAAM,SAAS,QAAQ,SAAS,UAAU,cAAc;AACxH;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var lint_exports = {};
|
|
20
|
+
__export(lint_exports, {
|
|
21
|
+
lintFilter: () => lintFilter
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(lint_exports);
|
|
24
|
+
const lintFilter = {
|
|
25
|
+
name: "lint",
|
|
26
|
+
matches(command) {
|
|
27
|
+
return /\b(eslint|tsc|typescript|ruff|clippy|cargo\s+clippy|cargo\s+build|prettier|biome|golangci-lint|rubocop|next\s+build)\b/.test(command);
|
|
28
|
+
},
|
|
29
|
+
filter(command, rawOutput, level) {
|
|
30
|
+
if (/tsc\b|typescript/.test(command)) return filterTsc(rawOutput, level);
|
|
31
|
+
if (/eslint/.test(command)) return filterEslint(rawOutput, level);
|
|
32
|
+
if (/ruff/.test(command)) return filterRuff(rawOutput, level);
|
|
33
|
+
if (/cargo\s+clippy/.test(command)) return filterCargoClippy(rawOutput, level);
|
|
34
|
+
if (/cargo\s+build/.test(command)) return filterCargoBuild(rawOutput, level);
|
|
35
|
+
if (/prettier/.test(command)) return filterPrettier(rawOutput, level);
|
|
36
|
+
if (/biome/.test(command)) return filterBiome(rawOutput, level);
|
|
37
|
+
if (/golangci-lint/.test(command)) return filterGolangciLint(rawOutput, level);
|
|
38
|
+
if (/rubocop/.test(command)) return filterRubocop(rawOutput, level);
|
|
39
|
+
if (/next\s+build/.test(command)) return filterNextBuild(rawOutput, level);
|
|
40
|
+
return { output: rawOutput, strategy: "lint:passthrough" };
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
function filterTsc(raw, level) {
|
|
44
|
+
const lines = raw.split("\n").filter((l) => l.trim());
|
|
45
|
+
if (lines.length === 0 || raw.includes("0 errors")) {
|
|
46
|
+
return { output: "ok (no errors)", strategy: "tsc:clean" };
|
|
47
|
+
}
|
|
48
|
+
const errorsByFile = /* @__PURE__ */ new Map();
|
|
49
|
+
for (const line of lines) {
|
|
50
|
+
const match = line.match(/^(.+?)\((\d+),(\d+)\):\s+error\s+(TS\d+):\s+(.+)/);
|
|
51
|
+
if (match) {
|
|
52
|
+
const [, file, , , code, msg] = match;
|
|
53
|
+
if (!errorsByFile.has(file)) errorsByFile.set(file, []);
|
|
54
|
+
errorsByFile.get(file).push(`${code}: ${msg}`);
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
const altMatch = line.match(/^(.+?):(\d+):(\d+)\s+-\s+error\s+(TS\d+):\s+(.+)/);
|
|
58
|
+
if (altMatch) {
|
|
59
|
+
const [, file, , , code, msg] = altMatch;
|
|
60
|
+
if (!errorsByFile.has(file)) errorsByFile.set(file, []);
|
|
61
|
+
errorsByFile.get(file).push(`${code}: ${msg}`);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
if (errorsByFile.size === 0) {
|
|
65
|
+
return { output: raw, strategy: "tsc:passthrough" };
|
|
66
|
+
}
|
|
67
|
+
const totalErrors = [...errorsByFile.values()].reduce((s, e) => s + e.length, 0);
|
|
68
|
+
if (level === "ultra") {
|
|
69
|
+
const summary = [...errorsByFile.entries()].map(([f, errs]) => `${f}: ${errs.length} errors`).join("\n");
|
|
70
|
+
return { output: `${totalErrors} errors in ${errorsByFile.size} files
|
|
71
|
+
${summary}`, strategy: "tsc:ultra" };
|
|
72
|
+
}
|
|
73
|
+
const parts = [`${totalErrors} TypeScript errors in ${errorsByFile.size} files:
|
|
74
|
+
`];
|
|
75
|
+
const maxFiles = level === "aggressive" ? 5 : 10;
|
|
76
|
+
let shown = 0;
|
|
77
|
+
for (const [file, errors] of errorsByFile) {
|
|
78
|
+
if (shown >= maxFiles) break;
|
|
79
|
+
parts.push(`${file} (${errors.length}):`);
|
|
80
|
+
const maxErrs = level === "aggressive" ? 3 : 5;
|
|
81
|
+
for (const err of errors.slice(0, maxErrs)) {
|
|
82
|
+
parts.push(` ${err}`);
|
|
83
|
+
}
|
|
84
|
+
if (errors.length > maxErrs) parts.push(` \u2026+${errors.length - maxErrs} more`);
|
|
85
|
+
shown++;
|
|
86
|
+
}
|
|
87
|
+
if (errorsByFile.size > maxFiles) {
|
|
88
|
+
parts.push(`
|
|
89
|
+
\u2026+${errorsByFile.size - maxFiles} more files with errors`);
|
|
90
|
+
}
|
|
91
|
+
return { output: parts.join("\n"), strategy: "tsc:grouped" };
|
|
92
|
+
}
|
|
93
|
+
function filterEslint(raw, level) {
|
|
94
|
+
const lines = raw.split("\n");
|
|
95
|
+
if (lines.every((l) => !l.trim() || l.includes("0 problems"))) {
|
|
96
|
+
return { output: "ok (no problems)", strategy: "eslint:clean" };
|
|
97
|
+
}
|
|
98
|
+
const ruleCount = /* @__PURE__ */ new Map();
|
|
99
|
+
const errorsByFile = /* @__PURE__ */ new Map();
|
|
100
|
+
let currentFile = "";
|
|
101
|
+
for (const line of lines) {
|
|
102
|
+
if (line.match(/^[/.]/)) {
|
|
103
|
+
currentFile = line.trim();
|
|
104
|
+
continue;
|
|
105
|
+
}
|
|
106
|
+
const match = line.match(/^\s+(\d+):(\d+)\s+(error|warning)\s+(.+?)\s{2,}(\S+)\s*$/);
|
|
107
|
+
if (match) {
|
|
108
|
+
const [, , , , msg, rule] = match;
|
|
109
|
+
ruleCount.set(rule, (ruleCount.get(rule) || 0) + 1);
|
|
110
|
+
if (currentFile) {
|
|
111
|
+
if (!errorsByFile.has(currentFile)) errorsByFile.set(currentFile, []);
|
|
112
|
+
errorsByFile.get(currentFile).push(`${rule}: ${msg}`);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
const totalProblems = [...ruleCount.values()].reduce((s, c) => s + c, 0);
|
|
117
|
+
if (level === "ultra") {
|
|
118
|
+
const topRules = [...ruleCount.entries()].sort((a, b) => b[1] - a[1]).slice(0, 5).map(([rule, count]) => `${rule}: ${count}`).join(", ");
|
|
119
|
+
return { output: `${totalProblems} problems: ${topRules}`, strategy: "eslint:ultra" };
|
|
120
|
+
}
|
|
121
|
+
if (level === "aggressive") {
|
|
122
|
+
const byRule = [...ruleCount.entries()].sort((a, b) => b[1] - a[1]).map(([rule, count]) => ` ${rule}: ${count}`).join("\n");
|
|
123
|
+
return { output: `${totalProblems} problems in ${errorsByFile.size} files:
|
|
124
|
+
${byRule}`, strategy: "eslint:byrule" };
|
|
125
|
+
}
|
|
126
|
+
const parts = [`${totalProblems} problems in ${errorsByFile.size} files:
|
|
127
|
+
`];
|
|
128
|
+
let shown = 0;
|
|
129
|
+
for (const [file, errors] of errorsByFile) {
|
|
130
|
+
if (shown >= 10) break;
|
|
131
|
+
parts.push(`${file} (${errors.length}):`);
|
|
132
|
+
for (const err of errors.slice(0, 3)) parts.push(` ${err}`);
|
|
133
|
+
if (errors.length > 3) parts.push(` \u2026+${errors.length - 3} more`);
|
|
134
|
+
shown++;
|
|
135
|
+
}
|
|
136
|
+
if (errorsByFile.size > 10) parts.push(`
|
|
137
|
+
\u2026+${errorsByFile.size - 10} more files`);
|
|
138
|
+
return { output: parts.join("\n"), strategy: "eslint:grouped" };
|
|
139
|
+
}
|
|
140
|
+
function filterRuff(raw, level) {
|
|
141
|
+
const lines = raw.split("\n").filter((l) => l.trim());
|
|
142
|
+
if (lines.length === 0 || raw.includes("All checks passed")) {
|
|
143
|
+
return { output: "ok (no issues)", strategy: "ruff:clean" };
|
|
144
|
+
}
|
|
145
|
+
const ruleCount = /* @__PURE__ */ new Map();
|
|
146
|
+
for (const line of lines) {
|
|
147
|
+
const match = line.match(/\b([A-Z]\d{3,4})\b/);
|
|
148
|
+
if (match) ruleCount.set(match[1], (ruleCount.get(match[1]) || 0) + 1);
|
|
149
|
+
}
|
|
150
|
+
const total = [...ruleCount.values()].reduce((s, c) => s + c, 0);
|
|
151
|
+
if (level === "ultra") {
|
|
152
|
+
const top = [...ruleCount.entries()].sort((a, b) => b[1] - a[1]).slice(0, 5).map(([r, c]) => `${r}:${c}`).join(" ");
|
|
153
|
+
return { output: `${total} issues: ${top}`, strategy: "ruff:ultra" };
|
|
154
|
+
}
|
|
155
|
+
const byRule = [...ruleCount.entries()].sort((a, b) => b[1] - a[1]).map(([rule, count]) => ` ${rule}: ${count}`).join("\n");
|
|
156
|
+
return { output: `${total} issues:
|
|
157
|
+
${byRule}`, strategy: "ruff:grouped" };
|
|
158
|
+
}
|
|
159
|
+
function filterCargoClippy(raw, level) {
|
|
160
|
+
const lines = raw.split("\n");
|
|
161
|
+
if (raw.includes("0 warnings") && !raw.includes("error")) {
|
|
162
|
+
return { output: "ok (no warnings)", strategy: "clippy:clean" };
|
|
163
|
+
}
|
|
164
|
+
const issues = [];
|
|
165
|
+
for (const line of lines) {
|
|
166
|
+
if (line.startsWith("warning:") || line.startsWith("error")) {
|
|
167
|
+
issues.push(line);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
const errors = issues.filter((l) => l.startsWith("error"));
|
|
171
|
+
const warnings = issues.filter((l) => l.startsWith("warning:"));
|
|
172
|
+
if (level === "ultra") {
|
|
173
|
+
return { output: `${errors.length} errors, ${warnings.length} warnings`, strategy: "clippy:ultra" };
|
|
174
|
+
}
|
|
175
|
+
const maxIssues = level === "aggressive" ? 10 : 20;
|
|
176
|
+
const shown = issues.slice(0, maxIssues).join("\n");
|
|
177
|
+
const extra = issues.length > maxIssues ? `
|
|
178
|
+
\u2026+${issues.length - maxIssues} more` : "";
|
|
179
|
+
return { output: `${errors.length} errors, ${warnings.length} warnings:
|
|
180
|
+
|
|
181
|
+
${shown}${extra}`, strategy: "clippy:filtered" };
|
|
182
|
+
}
|
|
183
|
+
function filterCargoBuild(raw, level) {
|
|
184
|
+
const lines = raw.split("\n");
|
|
185
|
+
if (raw.includes("Finished") && !raw.includes("error")) {
|
|
186
|
+
const finishLine = lines.find((l) => l.includes("Finished"));
|
|
187
|
+
return { output: finishLine || "ok", strategy: "cargo-build:success" };
|
|
188
|
+
}
|
|
189
|
+
const errors = lines.filter((l) => l.startsWith("error"));
|
|
190
|
+
if (errors.length === 0) {
|
|
191
|
+
return { output: raw, strategy: "cargo-build:passthrough" };
|
|
192
|
+
}
|
|
193
|
+
const maxErrors = level === "ultra" ? 5 : level === "aggressive" ? 10 : 20;
|
|
194
|
+
const shown = errors.slice(0, maxErrors).join("\n");
|
|
195
|
+
const extra = errors.length > maxErrors ? `
|
|
196
|
+
\u2026+${errors.length - maxErrors} more errors` : "";
|
|
197
|
+
return { output: `${errors.length} errors:
|
|
198
|
+
|
|
199
|
+
${shown}${extra}`, strategy: "cargo-build:errors" };
|
|
200
|
+
}
|
|
201
|
+
function filterPrettier(raw, level) {
|
|
202
|
+
const lines = raw.split("\n").filter((l) => l.trim());
|
|
203
|
+
if (lines.length === 0 || raw.includes("All matched files use Prettier")) {
|
|
204
|
+
return { output: "ok (all formatted)", strategy: "prettier:clean" };
|
|
205
|
+
}
|
|
206
|
+
const files = lines.filter((l) => !l.startsWith("[") && l.includes("."));
|
|
207
|
+
if (level === "ultra") {
|
|
208
|
+
return { output: `${files.length} files need formatting`, strategy: "prettier:ultra" };
|
|
209
|
+
}
|
|
210
|
+
const maxFiles = level === "aggressive" ? 10 : 20;
|
|
211
|
+
const shown = files.slice(0, maxFiles).join("\n");
|
|
212
|
+
const extra = files.length > maxFiles ? `
|
|
213
|
+
\u2026+${files.length - maxFiles} more` : "";
|
|
214
|
+
return { output: `${files.length} files need formatting:
|
|
215
|
+
${shown}${extra}`, strategy: "prettier:files" };
|
|
216
|
+
}
|
|
217
|
+
function filterBiome(raw, level) {
|
|
218
|
+
const lines = raw.split("\n").filter((l) => l.trim());
|
|
219
|
+
if (lines.length === 0) return { output: "ok", strategy: "biome:clean" };
|
|
220
|
+
const errorLines = lines.filter((l) => /error|warning/i.test(l));
|
|
221
|
+
if (errorLines.length === 0) return { output: "ok", strategy: "biome:clean" };
|
|
222
|
+
const maxLines = level === "ultra" ? 5 : level === "aggressive" ? 10 : 20;
|
|
223
|
+
return { output: errorLines.slice(0, maxLines).join("\n"), strategy: "biome:filtered" };
|
|
224
|
+
}
|
|
225
|
+
function filterGolangciLint(raw, level) {
|
|
226
|
+
const lines = raw.split("\n").filter((l) => l.trim());
|
|
227
|
+
if (lines.length === 0) return { output: "ok (no issues)", strategy: "golangci:clean" };
|
|
228
|
+
const byLinter = /* @__PURE__ */ new Map();
|
|
229
|
+
for (const line of lines) {
|
|
230
|
+
const match = line.match(/\((\w+)\)\s*$/);
|
|
231
|
+
if (match) byLinter.set(match[1], (byLinter.get(match[1]) || 0) + 1);
|
|
232
|
+
}
|
|
233
|
+
const total = [...byLinter.values()].reduce((s, c) => s + c, 0) || lines.length;
|
|
234
|
+
if (level === "ultra") {
|
|
235
|
+
const top = [...byLinter.entries()].sort((a, b) => b[1] - a[1]).slice(0, 5).map(([l, c]) => `${l}:${c}`).join(" ");
|
|
236
|
+
return { output: `${total} issues: ${top}`, strategy: "golangci:ultra" };
|
|
237
|
+
}
|
|
238
|
+
const grouped = [...byLinter.entries()].sort((a, b) => b[1] - a[1]).map(([linter, count]) => ` ${linter}: ${count}`).join("\n");
|
|
239
|
+
return { output: `${total} issues:
|
|
240
|
+
${grouped}`, strategy: "golangci:grouped" };
|
|
241
|
+
}
|
|
242
|
+
function filterRubocop(raw, level) {
|
|
243
|
+
const lines = raw.split("\n").filter((l) => l.trim());
|
|
244
|
+
const summaryMatch = raw.match(/(\d+)\s+offenses?\s+detected/);
|
|
245
|
+
if (!summaryMatch || summaryMatch[1] === "0") {
|
|
246
|
+
return { output: "ok (no offenses)", strategy: "rubocop:clean" };
|
|
247
|
+
}
|
|
248
|
+
const total = parseInt(summaryMatch[1]);
|
|
249
|
+
if (level === "ultra") {
|
|
250
|
+
return { output: `${total} offenses`, strategy: "rubocop:ultra" };
|
|
251
|
+
}
|
|
252
|
+
const offenses = lines.filter((l) => l.includes(":") && /[CWE]:/.test(l));
|
|
253
|
+
const maxLines = level === "aggressive" ? 10 : 20;
|
|
254
|
+
const shown = offenses.slice(0, maxLines).join("\n");
|
|
255
|
+
const extra = offenses.length > maxLines ? `
|
|
256
|
+
\u2026+${offenses.length - maxLines} more` : "";
|
|
257
|
+
return { output: `${total} offenses:
|
|
258
|
+
${shown}${extra}`, strategy: "rubocop:filtered" };
|
|
259
|
+
}
|
|
260
|
+
function filterNextBuild(raw, level) {
|
|
261
|
+
const lines = raw.split("\n");
|
|
262
|
+
if (raw.includes("Compiled successfully") || raw.includes("\u2713 Compiled")) {
|
|
263
|
+
const routeLines = lines.filter((l) => l.includes("\u25CB") || l.includes("\u25CF") || l.includes("\u03BB"));
|
|
264
|
+
if (level === "ultra") {
|
|
265
|
+
return { output: `ok (${routeLines.length} routes)`, strategy: "next-build:ultra" };
|
|
266
|
+
}
|
|
267
|
+
const maxRoutes = level === "aggressive" ? 10 : 20;
|
|
268
|
+
const shown = routeLines.slice(0, maxRoutes).join("\n");
|
|
269
|
+
return { output: `Build successful (${routeLines.length} routes):
|
|
270
|
+
${shown}`, strategy: "next-build:success" };
|
|
271
|
+
}
|
|
272
|
+
const errorLines = lines.filter((l) => /error/i.test(l) || l.includes("Failed"));
|
|
273
|
+
const maxLines = level === "ultra" ? 5 : level === "aggressive" ? 10 : 20;
|
|
274
|
+
return { output: errorLines.slice(0, maxLines).join("\n") || raw, strategy: "next-build:errors" };
|
|
275
|
+
}
|
|
276
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
277
|
+
0 && (module.exports = {
|
|
278
|
+
lintFilter
|
|
279
|
+
});
|
|
280
|
+
//# sourceMappingURL=lint.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/compression/filters/lint.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Lint and build tool output filters (eslint, tsc, ruff, clippy, prettier, biome)\n */\n\nimport type { CommandFilter, FilterResult, CompressorOptions } from '../types';\n\nexport const lintFilter: CommandFilter = {\n name: 'lint',\n\n matches(command: string): boolean {\n return /\\b(eslint|tsc|typescript|ruff|clippy|cargo\\s+clippy|cargo\\s+build|prettier|biome|golangci-lint|rubocop|next\\s+build)\\b/.test(command);\n },\n\n filter(command: string, rawOutput: string, level: CompressorOptions['level']): FilterResult {\n if (/tsc\\b|typescript/.test(command)) return filterTsc(rawOutput, level);\n if (/eslint/.test(command)) return filterEslint(rawOutput, level);\n if (/ruff/.test(command)) return filterRuff(rawOutput, level);\n if (/cargo\\s+clippy/.test(command)) return filterCargoClippy(rawOutput, level);\n if (/cargo\\s+build/.test(command)) return filterCargoBuild(rawOutput, level);\n if (/prettier/.test(command)) return filterPrettier(rawOutput, level);\n if (/biome/.test(command)) return filterBiome(rawOutput, level);\n if (/golangci-lint/.test(command)) return filterGolangciLint(rawOutput, level);\n if (/rubocop/.test(command)) return filterRubocop(rawOutput, level);\n if (/next\\s+build/.test(command)) return filterNextBuild(rawOutput, level);\n\n return { output: rawOutput, strategy: 'lint:passthrough' };\n },\n};\n\nfunction filterTsc(raw: string, level: CompressorOptions['level']): FilterResult {\n const lines = raw.split('\\n').filter(l => l.trim());\n\n if (lines.length === 0 || raw.includes('0 errors')) {\n return { output: 'ok (no errors)', strategy: 'tsc:clean' };\n }\n\n // Group errors by file\n const errorsByFile = new Map<string, string[]>();\n for (const line of lines) {\n const match = line.match(/^(.+?)\\((\\d+),(\\d+)\\):\\s+error\\s+(TS\\d+):\\s+(.+)/);\n if (match) {\n const [, file, , , code, msg] = match;\n if (!errorsByFile.has(file)) errorsByFile.set(file, []);\n errorsByFile.get(file)!.push(`${code}: ${msg}`);\n continue;\n }\n // Alternative format: file:line:col - error TSxxxx: msg\n const altMatch = line.match(/^(.+?):(\\d+):(\\d+)\\s+-\\s+error\\s+(TS\\d+):\\s+(.+)/);\n if (altMatch) {\n const [, file, , , code, msg] = altMatch;\n if (!errorsByFile.has(file)) errorsByFile.set(file, []);\n errorsByFile.get(file)!.push(`${code}: ${msg}`);\n }\n }\n\n if (errorsByFile.size === 0) {\n return { output: raw, strategy: 'tsc:passthrough' };\n }\n\n const totalErrors = [...errorsByFile.values()].reduce((s, e) => s + e.length, 0);\n\n if (level === 'ultra') {\n const summary = [...errorsByFile.entries()]\n .map(([f, errs]) => `${f}: ${errs.length} errors`)\n .join('\\n');\n return { output: `${totalErrors} errors in ${errorsByFile.size} files\\n${summary}`, strategy: 'tsc:ultra' };\n }\n\n const parts: string[] = [`${totalErrors} TypeScript errors in ${errorsByFile.size} files:\\n`];\n const maxFiles = level === 'aggressive' ? 5 : 10;\n let shown = 0;\n\n for (const [file, errors] of errorsByFile) {\n if (shown >= maxFiles) break;\n parts.push(`${file} (${errors.length}):`);\n const maxErrs = level === 'aggressive' ? 3 : 5;\n for (const err of errors.slice(0, maxErrs)) {\n parts.push(` ${err}`);\n }\n if (errors.length > maxErrs) parts.push(` \u2026+${errors.length - maxErrs} more`);\n shown++;\n }\n\n if (errorsByFile.size > maxFiles) {\n parts.push(`\\n\u2026+${errorsByFile.size - maxFiles} more files with errors`);\n }\n\n return { output: parts.join('\\n'), strategy: 'tsc:grouped' };\n}\n\nfunction filterEslint(raw: string, level: CompressorOptions['level']): FilterResult {\n const lines = raw.split('\\n');\n\n // Check for clean output\n if (lines.every(l => !l.trim() || l.includes('0 problems'))) {\n return { output: 'ok (no problems)', strategy: 'eslint:clean' };\n }\n\n // Group by rule\n const ruleCount = new Map<string, number>();\n const errorsByFile = new Map<string, string[]>();\n let currentFile = '';\n\n for (const line of lines) {\n // File path line (starts with / or ./)\n if (line.match(/^[/.]/)) {\n currentFile = line.trim();\n continue;\n }\n\n // Error line: \" line:col error/warning message rule-name\"\n const match = line.match(/^\\s+(\\d+):(\\d+)\\s+(error|warning)\\s+(.+?)\\s{2,}(\\S+)\\s*$/);\n if (match) {\n const [, , , , msg, rule] = match;\n ruleCount.set(rule, (ruleCount.get(rule) || 0) + 1);\n if (currentFile) {\n if (!errorsByFile.has(currentFile)) errorsByFile.set(currentFile, []);\n errorsByFile.get(currentFile)!.push(`${rule}: ${msg}`);\n }\n }\n }\n\n const totalProblems = [...ruleCount.values()].reduce((s, c) => s + c, 0);\n\n if (level === 'ultra') {\n const topRules = [...ruleCount.entries()]\n .sort((a, b) => b[1] - a[1])\n .slice(0, 5)\n .map(([rule, count]) => `${rule}: ${count}`)\n .join(', ');\n return { output: `${totalProblems} problems: ${topRules}`, strategy: 'eslint:ultra' };\n }\n\n if (level === 'aggressive') {\n const byRule = [...ruleCount.entries()]\n .sort((a, b) => b[1] - a[1])\n .map(([rule, count]) => ` ${rule}: ${count}`)\n .join('\\n');\n return { output: `${totalProblems} problems in ${errorsByFile.size} files:\\n${byRule}`, strategy: 'eslint:byrule' };\n }\n\n // Normal: show by file, limited\n const parts: string[] = [`${totalProblems} problems in ${errorsByFile.size} files:\\n`];\n let shown = 0;\n for (const [file, errors] of errorsByFile) {\n if (shown >= 10) break;\n parts.push(`${file} (${errors.length}):`);\n for (const err of errors.slice(0, 3)) parts.push(` ${err}`);\n if (errors.length > 3) parts.push(` \u2026+${errors.length - 3} more`);\n shown++;\n }\n if (errorsByFile.size > 10) parts.push(`\\n\u2026+${errorsByFile.size - 10} more files`);\n\n return { output: parts.join('\\n'), strategy: 'eslint:grouped' };\n}\n\nfunction filterRuff(raw: string, level: CompressorOptions['level']): FilterResult {\n const lines = raw.split('\\n').filter(l => l.trim());\n\n if (lines.length === 0 || raw.includes('All checks passed')) {\n return { output: 'ok (no issues)', strategy: 'ruff:clean' };\n }\n\n // Group by rule code\n const ruleCount = new Map<string, number>();\n for (const line of lines) {\n const match = line.match(/\\b([A-Z]\\d{3,4})\\b/);\n if (match) ruleCount.set(match[1], (ruleCount.get(match[1]) || 0) + 1);\n }\n\n const total = [...ruleCount.values()].reduce((s, c) => s + c, 0);\n\n if (level === 'ultra') {\n const top = [...ruleCount.entries()].sort((a, b) => b[1] - a[1]).slice(0, 5)\n .map(([r, c]) => `${r}:${c}`).join(' ');\n return { output: `${total} issues: ${top}`, strategy: 'ruff:ultra' };\n }\n\n const byRule = [...ruleCount.entries()]\n .sort((a, b) => b[1] - a[1])\n .map(([rule, count]) => ` ${rule}: ${count}`)\n .join('\\n');\n\n return { output: `${total} issues:\\n${byRule}`, strategy: 'ruff:grouped' };\n}\n\nfunction filterCargoClippy(raw: string, level: CompressorOptions['level']): FilterResult {\n const lines = raw.split('\\n');\n\n if (raw.includes('0 warnings') && !raw.includes('error')) {\n return { output: 'ok (no warnings)', strategy: 'clippy:clean' };\n }\n\n // Extract warnings and errors\n const issues: string[] = [];\n for (const line of lines) {\n if (line.startsWith('warning:') || line.startsWith('error')) {\n issues.push(line);\n }\n }\n\n const errors = issues.filter(l => l.startsWith('error'));\n const warnings = issues.filter(l => l.startsWith('warning:'));\n\n if (level === 'ultra') {\n return { output: `${errors.length} errors, ${warnings.length} warnings`, strategy: 'clippy:ultra' };\n }\n\n const maxIssues = level === 'aggressive' ? 10 : 20;\n const shown = issues.slice(0, maxIssues).join('\\n');\n const extra = issues.length > maxIssues ? `\\n\u2026+${issues.length - maxIssues} more` : '';\n\n return { output: `${errors.length} errors, ${warnings.length} warnings:\\n\\n${shown}${extra}`, strategy: 'clippy:filtered' };\n}\n\nfunction filterCargoBuild(raw: string, level: CompressorOptions['level']): FilterResult {\n const lines = raw.split('\\n');\n\n // Success\n if (raw.includes('Finished') && !raw.includes('error')) {\n const finishLine = lines.find(l => l.includes('Finished'));\n return { output: finishLine || 'ok', strategy: 'cargo-build:success' };\n }\n\n // Errors only\n const errors = lines.filter(l => l.startsWith('error'));\n if (errors.length === 0) {\n return { output: raw, strategy: 'cargo-build:passthrough' };\n }\n\n const maxErrors = level === 'ultra' ? 5 : level === 'aggressive' ? 10 : 20;\n const shown = errors.slice(0, maxErrors).join('\\n');\n const extra = errors.length > maxErrors ? `\\n\u2026+${errors.length - maxErrors} more errors` : '';\n\n return { output: `${errors.length} errors:\\n\\n${shown}${extra}`, strategy: 'cargo-build:errors' };\n}\n\nfunction filterPrettier(raw: string, level: CompressorOptions['level']): FilterResult {\n const lines = raw.split('\\n').filter(l => l.trim());\n\n if (lines.length === 0 || raw.includes('All matched files use Prettier')) {\n return { output: 'ok (all formatted)', strategy: 'prettier:clean' };\n }\n\n // Files needing formatting\n const files = lines.filter(l => !l.startsWith('[') && l.includes('.'));\n if (level === 'ultra') {\n return { output: `${files.length} files need formatting`, strategy: 'prettier:ultra' };\n }\n\n const maxFiles = level === 'aggressive' ? 10 : 20;\n const shown = files.slice(0, maxFiles).join('\\n');\n const extra = files.length > maxFiles ? `\\n\u2026+${files.length - maxFiles} more` : '';\n\n return { output: `${files.length} files need formatting:\\n${shown}${extra}`, strategy: 'prettier:files' };\n}\n\nfunction filterBiome(raw: string, level: CompressorOptions['level']): FilterResult {\n // Similar to eslint\n const lines = raw.split('\\n').filter(l => l.trim());\n if (lines.length === 0) return { output: 'ok', strategy: 'biome:clean' };\n\n const errorLines = lines.filter(l => /error|warning/i.test(l));\n if (errorLines.length === 0) return { output: 'ok', strategy: 'biome:clean' };\n\n const maxLines = level === 'ultra' ? 5 : level === 'aggressive' ? 10 : 20;\n return { output: errorLines.slice(0, maxLines).join('\\n'), strategy: 'biome:filtered' };\n}\n\nfunction filterGolangciLint(raw: string, level: CompressorOptions['level']): FilterResult {\n const lines = raw.split('\\n').filter(l => l.trim());\n if (lines.length === 0) return { output: 'ok (no issues)', strategy: 'golangci:clean' };\n\n // Group by linter name\n const byLinter = new Map<string, number>();\n for (const line of lines) {\n const match = line.match(/\\((\\w+)\\)\\s*$/);\n if (match) byLinter.set(match[1], (byLinter.get(match[1]) || 0) + 1);\n }\n\n const total = [...byLinter.values()].reduce((s, c) => s + c, 0) || lines.length;\n\n if (level === 'ultra') {\n const top = [...byLinter.entries()].sort((a, b) => b[1] - a[1]).slice(0, 5)\n .map(([l, c]) => `${l}:${c}`).join(' ');\n return { output: `${total} issues: ${top}`, strategy: 'golangci:ultra' };\n }\n\n const grouped = [...byLinter.entries()]\n .sort((a, b) => b[1] - a[1])\n .map(([linter, count]) => ` ${linter}: ${count}`)\n .join('\\n');\n\n return { output: `${total} issues:\\n${grouped}`, strategy: 'golangci:grouped' };\n}\n\nfunction filterRubocop(raw: string, level: CompressorOptions['level']): FilterResult {\n const lines = raw.split('\\n').filter(l => l.trim());\n const summaryMatch = raw.match(/(\\d+)\\s+offenses?\\s+detected/);\n\n if (!summaryMatch || summaryMatch[1] === '0') {\n return { output: 'ok (no offenses)', strategy: 'rubocop:clean' };\n }\n\n const total = parseInt(summaryMatch[1]);\n if (level === 'ultra') {\n return { output: `${total} offenses`, strategy: 'rubocop:ultra' };\n }\n\n const offenses = lines.filter(l => l.includes(':') && /[CWE]:/.test(l));\n const maxLines = level === 'aggressive' ? 10 : 20;\n const shown = offenses.slice(0, maxLines).join('\\n');\n const extra = offenses.length > maxLines ? `\\n\u2026+${offenses.length - maxLines} more` : '';\n\n return { output: `${total} offenses:\\n${shown}${extra}`, strategy: 'rubocop:filtered' };\n}\n\nfunction filterNextBuild(raw: string, level: CompressorOptions['level']): FilterResult {\n const lines = raw.split('\\n');\n\n // Success\n if (raw.includes('Compiled successfully') || raw.includes('\u2713 Compiled')) {\n const routeLines = lines.filter(l => l.includes('\u25CB') || l.includes('\u25CF') || l.includes('\u03BB'));\n if (level === 'ultra') {\n return { output: `ok (${routeLines.length} routes)`, strategy: 'next-build:ultra' };\n }\n const maxRoutes = level === 'aggressive' ? 10 : 20;\n const shown = routeLines.slice(0, maxRoutes).join('\\n');\n return { output: `Build successful (${routeLines.length} routes):\\n${shown}`, strategy: 'next-build:success' };\n }\n\n // Errors\n const errorLines = lines.filter(l => /error/i.test(l) || l.includes('Failed'));\n const maxLines = level === 'ultra' ? 5 : level === 'aggressive' ? 10 : 20;\n return { output: errorLines.slice(0, maxLines).join('\\n') || raw, strategy: 'next-build:errors' };\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAMO,MAAM,aAA4B;AAAA,EACvC,MAAM;AAAA,EAEN,QAAQ,SAA0B;AAChC,WAAO,yHAAyH,KAAK,OAAO;AAAA,EAC9I;AAAA,EAEA,OAAO,SAAiB,WAAmB,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