kirograph 0.13.1 → 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 +191 -8
- package/dist/bin/commands/caveman.js +7 -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 +10 -1
- package/dist/bin/commands/help.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/uninit.js +1 -1
- 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/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 +6 -1
- package/dist/bin/installer/index.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/index.js.map +1 -1
- package/dist/bin/installer/targets/kiro.js +4 -2
- package/dist/bin/installer/targets/kiro.js.map +2 -2
- 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 +3 -1
- package/dist/mcp/tool-names.js.map +2 -2
- package/dist/mcp/tools.js +170 -4
- package/dist/mcp/tools.js.map +3 -3
- package/package.json +1 -1
|
@@ -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,OA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AE,SAAS,QAAQ,CAAC;AAC7E,QAAM,WAAW,UAAU,UAAU,IAAI,UAAU,eAAe,KAAK;AACvE,SAAO,EAAE,QAAQ,WAAW,MAAM,GAAG,QAAQ,EAAE,KAAK,IAAI,KAAK,KAAK,UAAU,oBAAoB;AAClG;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,212 @@
|
|
|
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 misc_exports = {};
|
|
20
|
+
__export(misc_exports, {
|
|
21
|
+
miscFilter: () => miscFilter
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(misc_exports);
|
|
24
|
+
const miscFilter = {
|
|
25
|
+
name: "misc",
|
|
26
|
+
matches(command) {
|
|
27
|
+
return /\b(grep|rg|ripgrep|diff|curl|wget|playwright|prisma)\b/.test(command);
|
|
28
|
+
},
|
|
29
|
+
filter(command, rawOutput, level) {
|
|
30
|
+
if (/\b(grep|rg|ripgrep)\b/.test(command)) return filterGrep(rawOutput, level);
|
|
31
|
+
if (/\bdiff\b/.test(command) && !/git\s+diff/.test(command)) return filterDiff(rawOutput, level);
|
|
32
|
+
if (/\bcurl\b/.test(command)) return filterCurl(rawOutput, level);
|
|
33
|
+
if (/\bwget\b/.test(command)) return filterWget(rawOutput, level);
|
|
34
|
+
if (/\bplaywright\b/.test(command)) return filterPlaywright(rawOutput, level);
|
|
35
|
+
if (/\bprisma\s+generate\b/.test(command)) return filterPrismaGenerate(rawOutput, level);
|
|
36
|
+
return { output: rawOutput, strategy: "misc:passthrough" };
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
function filterGrep(raw, level) {
|
|
40
|
+
const lines = raw.split("\n").filter((l) => l.trim());
|
|
41
|
+
if (lines.length === 0) return { output: "no matches", strategy: "grep:empty" };
|
|
42
|
+
if (lines.length <= 15) return { output: raw, strategy: "grep:short" };
|
|
43
|
+
const byFile = /* @__PURE__ */ new Map();
|
|
44
|
+
for (const line of lines) {
|
|
45
|
+
const colonIdx = line.indexOf(":");
|
|
46
|
+
if (colonIdx > 0) {
|
|
47
|
+
const file = line.slice(0, colonIdx);
|
|
48
|
+
const rest = line.slice(colonIdx + 1);
|
|
49
|
+
if (!byFile.has(file)) byFile.set(file, []);
|
|
50
|
+
byFile.get(file).push(rest.trim());
|
|
51
|
+
} else {
|
|
52
|
+
const key = "__ungrouped__";
|
|
53
|
+
if (!byFile.has(key)) byFile.set(key, []);
|
|
54
|
+
byFile.get(key).push(line);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
if (level === "ultra") {
|
|
58
|
+
const summary = [...byFile.entries()].filter(([k]) => k !== "__ungrouped__").sort((a, b) => b[1].length - a[1].length).slice(0, 10).map(([f, matches]) => `${f} (${matches.length})`).join(", ");
|
|
59
|
+
return { output: `${lines.length} matches: ${summary}`, strategy: "grep:ultra" };
|
|
60
|
+
}
|
|
61
|
+
if (level === "aggressive") {
|
|
62
|
+
const grouped = [...byFile.entries()].filter(([k]) => k !== "__ungrouped__").sort((a, b) => b[1].length - a[1].length).slice(0, 15).map(([file, matches]) => `${file} (${matches.length} matches)`).join("\n");
|
|
63
|
+
const extra = byFile.size > 15 ? `
|
|
64
|
+
\u2026+${byFile.size - 15} more files` : "";
|
|
65
|
+
return { output: `${lines.length} matches in ${byFile.size} files:
|
|
66
|
+
${grouped}${extra}`, strategy: "grep:grouped" };
|
|
67
|
+
}
|
|
68
|
+
const parts = [`${lines.length} matches in ${byFile.size} files:
|
|
69
|
+
`];
|
|
70
|
+
let shown = 0;
|
|
71
|
+
for (const [file, matches] of [...byFile.entries()].sort((a, b) => b[1].length - a[1].length)) {
|
|
72
|
+
if (shown >= 10 || file === "__ungrouped__") break;
|
|
73
|
+
parts.push(`${file} (${matches.length}):`);
|
|
74
|
+
for (const m of matches.slice(0, 3)) parts.push(` ${m.slice(0, 100)}`);
|
|
75
|
+
if (matches.length > 3) parts.push(` \u2026+${matches.length - 3} more`);
|
|
76
|
+
shown++;
|
|
77
|
+
}
|
|
78
|
+
if (byFile.size > 10) parts.push(`
|
|
79
|
+
\u2026+${byFile.size - 10} more files`);
|
|
80
|
+
return { output: parts.join("\n"), strategy: "grep:structured" };
|
|
81
|
+
}
|
|
82
|
+
function filterDiff(raw, level) {
|
|
83
|
+
const lines = raw.split("\n");
|
|
84
|
+
if (lines.length <= 20) return { output: raw, strategy: "diff:short" };
|
|
85
|
+
const result = [];
|
|
86
|
+
const contextLines = level === "ultra" ? 1 : level === "aggressive" ? 2 : 3;
|
|
87
|
+
let afterChange = 0;
|
|
88
|
+
let contextBuffer = [];
|
|
89
|
+
for (const line of lines) {
|
|
90
|
+
if (line.startsWith("---") || line.startsWith("+++") || line.startsWith("@@") || line.startsWith("diff ")) {
|
|
91
|
+
result.push(line);
|
|
92
|
+
contextBuffer = [];
|
|
93
|
+
afterChange = 0;
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
if (line.startsWith("+") || line.startsWith("-") || line.startsWith("!") || line.startsWith(">") || line.startsWith("<")) {
|
|
97
|
+
if (contextBuffer.length > 0) {
|
|
98
|
+
result.push(...contextBuffer.slice(-contextLines));
|
|
99
|
+
contextBuffer = [];
|
|
100
|
+
}
|
|
101
|
+
result.push(line);
|
|
102
|
+
afterChange = 0;
|
|
103
|
+
continue;
|
|
104
|
+
}
|
|
105
|
+
afterChange++;
|
|
106
|
+
if (afterChange <= contextLines) {
|
|
107
|
+
result.push(line);
|
|
108
|
+
} else {
|
|
109
|
+
contextBuffer.push(line);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return { output: result.join("\n"), strategy: "diff:condensed" };
|
|
113
|
+
}
|
|
114
|
+
function filterCurl(raw, level) {
|
|
115
|
+
const lines = raw.split("\n");
|
|
116
|
+
const meaningful = lines.filter((l) => {
|
|
117
|
+
const trimmed = l.trim();
|
|
118
|
+
if (!trimmed) return false;
|
|
119
|
+
if (/^\s*%\s+Total/.test(trimmed)) return false;
|
|
120
|
+
if (/^\s*\d+\s+\d+/.test(trimmed) && trimmed.includes("--:--:--")) return false;
|
|
121
|
+
if (trimmed.startsWith("*") && (trimmed.includes("Trying") || trimmed.includes("Connected") || trimmed.includes("TLS"))) return false;
|
|
122
|
+
if (trimmed.startsWith(">") || trimmed.startsWith("< ")) return false;
|
|
123
|
+
return true;
|
|
124
|
+
});
|
|
125
|
+
if (meaningful.length === 0) return { output: "ok", strategy: "curl:empty" };
|
|
126
|
+
const maxChars = level === "ultra" ? 2e3 : level === "aggressive" ? 5e3 : 1e4;
|
|
127
|
+
const output = meaningful.join("\n");
|
|
128
|
+
if (output.length <= maxChars) return { output, strategy: "curl:filtered" };
|
|
129
|
+
return { output: output.slice(0, maxChars) + "\n\u2026(truncated)", strategy: "curl:truncated" };
|
|
130
|
+
}
|
|
131
|
+
function filterWget(raw, level) {
|
|
132
|
+
const lines = raw.split("\n");
|
|
133
|
+
const meaningful = lines.filter((l) => {
|
|
134
|
+
const trimmed = l.trim();
|
|
135
|
+
if (!trimmed) return false;
|
|
136
|
+
if (/^\d+K\s/.test(trimmed)) return false;
|
|
137
|
+
if (/^--\d{4}/.test(trimmed)) return false;
|
|
138
|
+
if (trimmed.includes("Resolving") || trimmed.includes("Connecting")) return false;
|
|
139
|
+
if (/\d+%\[/.test(trimmed)) return false;
|
|
140
|
+
return true;
|
|
141
|
+
});
|
|
142
|
+
if (meaningful.length === 0) return { output: "ok", strategy: "wget:empty" };
|
|
143
|
+
const savedLine = lines.find((l) => l.includes("saved") || l.includes("written"));
|
|
144
|
+
if (savedLine && level === "ultra") {
|
|
145
|
+
return { output: savedLine.trim(), strategy: "wget:ultra" };
|
|
146
|
+
}
|
|
147
|
+
return { output: meaningful.join("\n"), strategy: "wget:filtered" };
|
|
148
|
+
}
|
|
149
|
+
function filterPlaywright(raw, level) {
|
|
150
|
+
const lines = raw.split("\n");
|
|
151
|
+
const passedMatch = raw.match(/(\d+)\s+passed/);
|
|
152
|
+
const failedMatch = raw.match(/(\d+)\s+failed/);
|
|
153
|
+
const passed = passedMatch ? parseInt(passedMatch[1]) : 0;
|
|
154
|
+
const failed = failedMatch ? parseInt(failedMatch[1]) : 0;
|
|
155
|
+
const total = passed + failed;
|
|
156
|
+
if (failed === 0 && passed > 0) {
|
|
157
|
+
if (level === "ultra") return { output: `\u2713 ${passed}/${total}`, strategy: "playwright:allpass:ultra" };
|
|
158
|
+
return { output: `PASSED: ${passed}/${total} tests`, strategy: "playwright:allpass" };
|
|
159
|
+
}
|
|
160
|
+
if (failed > 0) {
|
|
161
|
+
const failures = [];
|
|
162
|
+
let inFailure = false;
|
|
163
|
+
let block = [];
|
|
164
|
+
for (const line of lines) {
|
|
165
|
+
if (line.includes("\u2718") || line.includes("FAILED") || line.includes("Error:") || line.includes("expect(")) {
|
|
166
|
+
if (block.length > 0) failures.push(block.join("\n"));
|
|
167
|
+
block = [line];
|
|
168
|
+
inFailure = true;
|
|
169
|
+
} else if (inFailure) {
|
|
170
|
+
block.push(line);
|
|
171
|
+
if (block.length > 15) {
|
|
172
|
+
failures.push(block.join("\n"));
|
|
173
|
+
block = [];
|
|
174
|
+
inFailure = false;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
if (block.length > 0) failures.push(block.join("\n"));
|
|
179
|
+
const header = `FAILED: ${failed}/${total} tests`;
|
|
180
|
+
const maxFailures = level === "ultra" ? 2 : level === "aggressive" ? 3 : 5;
|
|
181
|
+
const shown = failures.slice(0, maxFailures).join("\n\n");
|
|
182
|
+
const extra = failures.length > maxFailures ? `
|
|
183
|
+
\u2026+${failures.length - maxFailures} more` : "";
|
|
184
|
+
return { output: `${header}
|
|
185
|
+
|
|
186
|
+
${shown}${extra}`, strategy: "playwright:failures" };
|
|
187
|
+
}
|
|
188
|
+
return { output: raw, strategy: "playwright:passthrough" };
|
|
189
|
+
}
|
|
190
|
+
function filterPrismaGenerate(raw, level) {
|
|
191
|
+
const lines = raw.split("\n");
|
|
192
|
+
const meaningful = lines.filter((l) => {
|
|
193
|
+
const trimmed = l.trim();
|
|
194
|
+
if (!trimmed) return false;
|
|
195
|
+
if (/^[╔╗╚╝║═│┌┐└┘├┤┬┴┼─]+$/.test(trimmed)) return false;
|
|
196
|
+
if (/^[█▓░▒■□]+/.test(trimmed)) return false;
|
|
197
|
+
if (trimmed.startsWith("\u2714") || trimmed.startsWith("\u2713") || trimmed.includes("Generated")) return true;
|
|
198
|
+
if (trimmed.includes("Prisma") && trimmed.includes("Client")) return true;
|
|
199
|
+
return !/^[│║]/.test(trimmed);
|
|
200
|
+
});
|
|
201
|
+
if (meaningful.length === 0) return { output: "ok", strategy: "prisma:empty" };
|
|
202
|
+
if (level === "ultra") {
|
|
203
|
+
const genLine = meaningful.find((l) => l.includes("Generated") || l.includes("\u2714"));
|
|
204
|
+
return { output: genLine?.trim() || "ok", strategy: "prisma:ultra" };
|
|
205
|
+
}
|
|
206
|
+
return { output: meaningful.join("\n"), strategy: "prisma:filtered" };
|
|
207
|
+
}
|
|
208
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
209
|
+
0 && (module.exports = {
|
|
210
|
+
miscFilter
|
|
211
|
+
});
|
|
212
|
+
//# sourceMappingURL=misc.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/compression/filters/misc.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Miscellaneous command filters: grep/rg, diff, curl/wget, playwright, prisma\n */\n\nimport type { CommandFilter, FilterResult, CompressorOptions } from '../types';\n\nexport const miscFilter: CommandFilter = {\n name: 'misc',\n\n matches(command: string): boolean {\n return /\\b(grep|rg|ripgrep|diff|curl|wget|playwright|prisma)\\b/.test(command);\n },\n\n filter(command: string, rawOutput: string, level: CompressorOptions['level']): FilterResult {\n if (/\\b(grep|rg|ripgrep)\\b/.test(command)) return filterGrep(rawOutput, level);\n if (/\\bdiff\\b/.test(command) && !/git\\s+diff/.test(command)) return filterDiff(rawOutput, level);\n if (/\\bcurl\\b/.test(command)) return filterCurl(rawOutput, level);\n if (/\\bwget\\b/.test(command)) return filterWget(rawOutput, level);\n if (/\\bplaywright\\b/.test(command)) return filterPlaywright(rawOutput, level);\n if (/\\bprisma\\s+generate\\b/.test(command)) return filterPrismaGenerate(rawOutput, level);\n return { output: rawOutput, strategy: 'misc:passthrough' };\n },\n};\n\n// \u2500\u2500 Grep / Ripgrep \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nfunction filterGrep(raw: string, level: CompressorOptions['level']): FilterResult {\n const lines = raw.split('\\n').filter(l => l.trim());\n\n if (lines.length === 0) return { output: 'no matches', strategy: 'grep:empty' };\n if (lines.length <= 15) return { output: raw, strategy: 'grep:short' };\n\n // Group by file\n const byFile = new Map<string, string[]>();\n for (const line of lines) {\n // Format: file:line:content or file:content\n const colonIdx = line.indexOf(':');\n if (colonIdx > 0) {\n const file = line.slice(0, colonIdx);\n const rest = line.slice(colonIdx + 1);\n if (!byFile.has(file)) byFile.set(file, []);\n byFile.get(file)!.push(rest.trim());\n } else {\n const key = '__ungrouped__';\n if (!byFile.has(key)) byFile.set(key, []);\n byFile.get(key)!.push(line);\n }\n }\n\n if (level === 'ultra') {\n const summary = [...byFile.entries()]\n .filter(([k]) => k !== '__ungrouped__')\n .sort((a, b) => b[1].length - a[1].length)\n .slice(0, 10)\n .map(([f, matches]) => `${f} (${matches.length})`)\n .join(', ');\n return { output: `${lines.length} matches: ${summary}`, strategy: 'grep:ultra' };\n }\n\n if (level === 'aggressive') {\n const grouped = [...byFile.entries()]\n .filter(([k]) => k !== '__ungrouped__')\n .sort((a, b) => b[1].length - a[1].length)\n .slice(0, 15)\n .map(([file, matches]) => `${file} (${matches.length} matches)`)\n .join('\\n');\n const extra = byFile.size > 15 ? `\\n\u2026+${byFile.size - 15} more files` : '';\n return { output: `${lines.length} matches in ${byFile.size} files:\\n${grouped}${extra}`, strategy: 'grep:grouped' };\n }\n\n // Normal: show grouped with sample lines\n const parts: string[] = [`${lines.length} matches in ${byFile.size} files:\\n`];\n let shown = 0;\n for (const [file, matches] of [...byFile.entries()].sort((a, b) => b[1].length - a[1].length)) {\n if (shown >= 10 || file === '__ungrouped__') break;\n parts.push(`${file} (${matches.length}):`);\n for (const m of matches.slice(0, 3)) parts.push(` ${m.slice(0, 100)}`);\n if (matches.length > 3) parts.push(` \u2026+${matches.length - 3} more`);\n shown++;\n }\n if (byFile.size > 10) parts.push(`\\n\u2026+${byFile.size - 10} more files`);\n\n return { output: parts.join('\\n'), strategy: 'grep:structured' };\n}\n\n// \u2500\u2500 Diff (non-git) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nfunction filterDiff(raw: string, level: CompressorOptions['level']): FilterResult {\n const lines = raw.split('\\n');\n\n if (lines.length <= 20) return { output: raw, strategy: 'diff:short' };\n\n // Keep headers and changed lines, reduce context\n const result: string[] = [];\n const contextLines = level === 'ultra' ? 1 : level === 'aggressive' ? 2 : 3;\n let afterChange = 0;\n let contextBuffer: string[] = [];\n\n for (const line of lines) {\n if (line.startsWith('---') || line.startsWith('+++') || line.startsWith('@@') || line.startsWith('diff ')) {\n result.push(line);\n contextBuffer = [];\n afterChange = 0;\n continue;\n }\n\n if (line.startsWith('+') || line.startsWith('-') || line.startsWith('!') || line.startsWith('>') || line.startsWith('<')) {\n if (contextBuffer.length > 0) {\n result.push(...contextBuffer.slice(-contextLines));\n contextBuffer = [];\n }\n result.push(line);\n afterChange = 0;\n continue;\n }\n\n afterChange++;\n if (afterChange <= contextLines) {\n result.push(line);\n } else {\n contextBuffer.push(line);\n }\n }\n\n return { output: result.join('\\n'), strategy: 'diff:condensed' };\n}\n\n// \u2500\u2500 Curl \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nfunction filterCurl(raw: string, level: CompressorOptions['level']): FilterResult {\n const lines = raw.split('\\n');\n\n // Strip progress bars and stats\n const meaningful = lines.filter(l => {\n const trimmed = l.trim();\n if (!trimmed) return false;\n if (/^\\s*%\\s+Total/.test(trimmed)) return false;\n if (/^\\s*\\d+\\s+\\d+/.test(trimmed) && trimmed.includes('--:--:--')) return false;\n if (trimmed.startsWith('*') && (trimmed.includes('Trying') || trimmed.includes('Connected') || trimmed.includes('TLS'))) return false;\n if (trimmed.startsWith('>') || trimmed.startsWith('< ')) return false; // verbose headers\n return true;\n });\n\n if (meaningful.length === 0) return { output: 'ok', strategy: 'curl:empty' };\n\n const maxChars = level === 'ultra' ? 2000 : level === 'aggressive' ? 5000 : 10000;\n const output = meaningful.join('\\n');\n\n if (output.length <= maxChars) return { output, strategy: 'curl:filtered' };\n\n return { output: output.slice(0, maxChars) + '\\n\u2026(truncated)', strategy: 'curl:truncated' };\n}\n\n// \u2500\u2500 Wget \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nfunction filterWget(raw: string, level: CompressorOptions['level']): FilterResult {\n const lines = raw.split('\\n');\n\n // Strip progress bars and connection info\n const meaningful = lines.filter(l => {\n const trimmed = l.trim();\n if (!trimmed) return false;\n if (/^\\d+K\\s/.test(trimmed)) return false; // progress lines\n if (/^--\\d{4}/.test(trimmed)) return false; // timestamp lines\n if (trimmed.includes('Resolving') || trimmed.includes('Connecting')) return false;\n if (/\\d+%\\[/.test(trimmed)) return false; // progress bar\n return true;\n });\n\n if (meaningful.length === 0) return { output: 'ok', strategy: 'wget:empty' };\n\n // Look for the saved file line\n const savedLine = lines.find(l => l.includes('saved') || l.includes('written'));\n if (savedLine && level === 'ultra') {\n return { output: savedLine.trim(), strategy: 'wget:ultra' };\n }\n\n return { output: meaningful.join('\\n'), strategy: 'wget:filtered' };\n}\n\n// \u2500\u2500 Playwright \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nfunction filterPlaywright(raw: string, level: CompressorOptions['level']): FilterResult {\n const lines = raw.split('\\n');\n\n // Check for all-pass\n const passedMatch = raw.match(/(\\d+)\\s+passed/);\n const failedMatch = raw.match(/(\\d+)\\s+failed/);\n\n const passed = passedMatch ? parseInt(passedMatch[1]) : 0;\n const failed = failedMatch ? parseInt(failedMatch[1]) : 0;\n const total = passed + failed;\n\n if (failed === 0 && passed > 0) {\n if (level === 'ultra') return { output: `\u2713 ${passed}/${total}`, strategy: 'playwright:allpass:ultra' };\n return { output: `PASSED: ${passed}/${total} tests`, strategy: 'playwright:allpass' };\n }\n\n if (failed > 0) {\n // Extract failure details\n const failures: string[] = [];\n let inFailure = false;\n let block: string[] = [];\n\n for (const line of lines) {\n if (line.includes('\u2718') || line.includes('FAILED') || line.includes('Error:') || line.includes('expect(')) {\n if (block.length > 0) failures.push(block.join('\\n'));\n block = [line];\n inFailure = true;\n } else if (inFailure) {\n block.push(line);\n if (block.length > 15) {\n failures.push(block.join('\\n'));\n block = [];\n inFailure = false;\n }\n }\n }\n if (block.length > 0) failures.push(block.join('\\n'));\n\n const header = `FAILED: ${failed}/${total} tests`;\n const maxFailures = level === 'ultra' ? 2 : level === 'aggressive' ? 3 : 5;\n const shown = failures.slice(0, maxFailures).join('\\n\\n');\n const extra = failures.length > maxFailures ? `\\n\u2026+${failures.length - maxFailures} more` : '';\n\n return { output: `${header}\\n\\n${shown}${extra}`, strategy: 'playwright:failures' };\n }\n\n return { output: raw, strategy: 'playwright:passthrough' };\n}\n\n// \u2500\u2500 Prisma \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nfunction filterPrismaGenerate(raw: string, level: CompressorOptions['level']): FilterResult {\n const lines = raw.split('\\n');\n\n // Strip ASCII art and decorative lines\n const meaningful = lines.filter(l => {\n const trimmed = l.trim();\n if (!trimmed) return false;\n if (/^[\u2554\u2557\u255A\u255D\u2551\u2550\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2500]+$/.test(trimmed)) return false;\n if (/^[\u2588\u2593\u2591\u2592\u25A0\u25A1]+/.test(trimmed)) return false;\n if (trimmed.startsWith('\u2714') || trimmed.startsWith('\u2713') || trimmed.includes('Generated')) return true;\n if (trimmed.includes('Prisma') && trimmed.includes('Client')) return true;\n return !(/^[\u2502\u2551]/.test(trimmed));\n });\n\n if (meaningful.length === 0) return { output: 'ok', strategy: 'prisma:empty' };\n\n if (level === 'ultra') {\n const genLine = meaningful.find(l => l.includes('Generated') || l.includes('\u2714'));\n return { output: genLine?.trim() || 'ok', strategy: 'prisma:ultra' };\n }\n\n return { output: meaningful.join('\\n'), str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