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,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'), strategy: 'prisma:filtered' };\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAMO,MAAM,aAA4B;AAAA,EACvC,MAAM;AAAA,EAEN,QAAQ,SAA0B;AAChC,WAAO,yDAAyD,KAAK,OAAO;AAAA,EAC9E;AAAA,EAEA,OAAO,SAAiB,WAAmB,OAAiD;AAC1F,QAAI,wBAAwB,KAAK,OAAO,EAAG,QAAO,WAA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AC/E,WAAO,EAAE,QAAQ,SAAS,KAAK,KAAK,MAAM,UAAU,eAAe;AAAA,EACrE;AAEA,SAAO,EAAE,QAAQ,WAAW,KAAK,IAAI,GAAG,UAAU,kBAAkB;AACtE;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,151 @@
|
|
|
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 package_exports = {};
|
|
20
|
+
__export(package_exports, {
|
|
21
|
+
packageFilter: () => packageFilter
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(package_exports);
|
|
24
|
+
const packageFilter = {
|
|
25
|
+
name: "package",
|
|
26
|
+
matches(command) {
|
|
27
|
+
return /\b(npm\s+(list|ls|outdated|install|i\b)|pnpm\s+(list|ls|outdated|install)|yarn\s+(list|outdated|add|install)|pip\s+(list|freeze|outdated|install)|bundle\s+(install|list|outdated)|cargo\s+(update|add)|go\s+(mod|get))\b/.test(command);
|
|
28
|
+
},
|
|
29
|
+
filter(command, rawOutput, level) {
|
|
30
|
+
if (/npm\s+(install|i)\b|pnpm\s+install|yarn\s+(install|add)/.test(command)) return filterNpmInstall(rawOutput, level);
|
|
31
|
+
if (/npm\s+(list|ls)|pnpm\s+(list|ls)/.test(command)) return filterNpmList(rawOutput, level);
|
|
32
|
+
if (/npm\s+outdated|pnpm\s+outdated|yarn\s+outdated/.test(command)) return filterOutdated(rawOutput, level);
|
|
33
|
+
if (/pip\s+(list|freeze)/.test(command)) return filterPipList(rawOutput, level);
|
|
34
|
+
if (/pip\s+outdated/.test(command)) return filterOutdated(rawOutput, level);
|
|
35
|
+
if (/pip\s+install/.test(command)) return filterPipInstall(rawOutput, level);
|
|
36
|
+
if (/bundle\s+install/.test(command)) return filterBundleInstall(rawOutput, level);
|
|
37
|
+
if (/bundle\s+list/.test(command)) return filterBundleList(rawOutput, level);
|
|
38
|
+
return { output: rawOutput, strategy: "package:passthrough" };
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
function filterNpmInstall(raw, level) {
|
|
42
|
+
const lines = raw.split("\n").filter((l) => l.trim());
|
|
43
|
+
const addedMatch = raw.match(/added\s+(\d+)\s+packages?/);
|
|
44
|
+
const removedMatch = raw.match(/removed\s+(\d+)\s+packages?/);
|
|
45
|
+
const changedMatch = raw.match(/changed\s+(\d+)\s+packages?/);
|
|
46
|
+
const auditMatch = raw.match(/(\d+)\s+vulnerabilit/);
|
|
47
|
+
const parts = [];
|
|
48
|
+
if (addedMatch) parts.push(`+${addedMatch[1]}`);
|
|
49
|
+
if (removedMatch) parts.push(`-${removedMatch[1]}`);
|
|
50
|
+
if (changedMatch) parts.push(`~${changedMatch[1]}`);
|
|
51
|
+
if (parts.length > 0) {
|
|
52
|
+
const audit = auditMatch ? ` (${auditMatch[1]} vulnerabilities)` : "";
|
|
53
|
+
return { output: `ok ${parts.join(" ")} packages${audit}`, strategy: "npm-install:summary" };
|
|
54
|
+
}
|
|
55
|
+
if (raw.includes("up to date")) {
|
|
56
|
+
return { output: "ok (up to date)", strategy: "npm-install:uptodate" };
|
|
57
|
+
}
|
|
58
|
+
const meaningful = lines.filter((l) => !l.startsWith("npm") || l.includes("added") || l.includes("removed"));
|
|
59
|
+
return { output: meaningful.pop() || "ok", strategy: "npm-install:fallback" };
|
|
60
|
+
}
|
|
61
|
+
function filterNpmList(raw, level) {
|
|
62
|
+
const lines = raw.split("\n").filter((l) => l.trim());
|
|
63
|
+
if (lines.length <= 10) return { output: raw, strategy: "npm-list:short" };
|
|
64
|
+
const topLevel = lines.filter((l) => l.startsWith("\u251C") || l.startsWith("\u2514"));
|
|
65
|
+
if (level === "ultra") {
|
|
66
|
+
return { output: `${topLevel.length} top-level packages`, strategy: "npm-list:ultra" };
|
|
67
|
+
}
|
|
68
|
+
if (level === "aggressive") {
|
|
69
|
+
const shown2 = topLevel.slice(0, 20).join("\n");
|
|
70
|
+
const extra = topLevel.length > 20 ? `
|
|
71
|
+
\u2026+${topLevel.length - 20} more` : "";
|
|
72
|
+
return { output: `${topLevel.length} packages:
|
|
73
|
+
${shown2}${extra}`, strategy: "npm-list:toplevel" };
|
|
74
|
+
}
|
|
75
|
+
const maxLines = 40;
|
|
76
|
+
if (lines.length <= maxLines) return { output: raw, strategy: "npm-list:full" };
|
|
77
|
+
const shown = lines.slice(0, maxLines).join("\n");
|
|
78
|
+
return { output: `${shown}
|
|
79
|
+
\u2026+${lines.length - maxLines} more lines`, strategy: "npm-list:truncated" };
|
|
80
|
+
}
|
|
81
|
+
function filterOutdated(raw, level) {
|
|
82
|
+
const lines = raw.split("\n").filter((l) => l.trim());
|
|
83
|
+
if (lines.length <= 1) return { output: "all up to date", strategy: "outdated:clean" };
|
|
84
|
+
const rows = lines.slice(1);
|
|
85
|
+
if (level === "ultra") {
|
|
86
|
+
return { output: `${rows.length} outdated packages`, strategy: "outdated:ultra" };
|
|
87
|
+
}
|
|
88
|
+
const maxRows = level === "aggressive" ? 10 : 20;
|
|
89
|
+
if (rows.length <= maxRows) return { output: raw, strategy: "outdated:short" };
|
|
90
|
+
const shown = [lines[0], ...rows.slice(0, maxRows)].join("\n");
|
|
91
|
+
return { output: `${shown}
|
|
92
|
+
\u2026+${rows.length - maxRows} more`, strategy: "outdated:truncated" };
|
|
93
|
+
}
|
|
94
|
+
function filterPipList(raw, level) {
|
|
95
|
+
const lines = raw.split("\n").filter((l) => l.trim());
|
|
96
|
+
if (lines.length <= 5) return { output: raw, strategy: "pip-list:short" };
|
|
97
|
+
const packages = lines.filter((l) => !l.startsWith("Package") && !l.startsWith("---") && !l.startsWith("WARNING"));
|
|
98
|
+
if (level === "ultra") {
|
|
99
|
+
return { output: `${packages.length} packages installed`, strategy: "pip-list:ultra" };
|
|
100
|
+
}
|
|
101
|
+
const maxPkgs = level === "aggressive" ? 20 : 40;
|
|
102
|
+
if (packages.length <= maxPkgs) return { output: packages.join("\n"), strategy: "pip-list:full" };
|
|
103
|
+
const shown = packages.slice(0, maxPkgs).join("\n");
|
|
104
|
+
return { output: `${shown}
|
|
105
|
+
\u2026+${packages.length - maxPkgs} more packages`, strategy: "pip-list:truncated" };
|
|
106
|
+
}
|
|
107
|
+
function filterPipInstall(raw, level) {
|
|
108
|
+
const lines = raw.split("\n").filter((l) => l.trim());
|
|
109
|
+
if (raw.includes("Successfully installed")) {
|
|
110
|
+
const installed = raw.match(/Successfully installed (.+)/);
|
|
111
|
+
if (installed) {
|
|
112
|
+
const pkgs = installed[1].split(/\s+/);
|
|
113
|
+
if (level === "ultra") return { output: `ok +${pkgs.length} packages`, strategy: "pip-install:ultra" };
|
|
114
|
+
return { output: `ok installed ${pkgs.length} packages: ${pkgs.slice(0, 5).join(", ")}${pkgs.length > 5 ? "\u2026" : ""}`, strategy: "pip-install:summary" };
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
if (raw.includes("already satisfied")) {
|
|
118
|
+
return { output: "ok (already satisfied)", strategy: "pip-install:satisfied" };
|
|
119
|
+
}
|
|
120
|
+
const meaningful = lines.filter((l) => !l.includes("Downloading") && !l.includes("\u2501") && !l.includes("Using cached"));
|
|
121
|
+
return { output: meaningful.join("\n") || "ok", strategy: "pip-install:filtered" };
|
|
122
|
+
}
|
|
123
|
+
function filterBundleInstall(raw, level) {
|
|
124
|
+
const lines = raw.split("\n").filter((l) => l.trim());
|
|
125
|
+
const meaningful = lines.filter((l) => !l.startsWith("Using ") && !l.startsWith("Fetching"));
|
|
126
|
+
const installed = lines.filter((l) => l.startsWith("Installing"));
|
|
127
|
+
if (level === "ultra") {
|
|
128
|
+
return { output: `ok ${installed.length} installed`, strategy: "bundle-install:ultra" };
|
|
129
|
+
}
|
|
130
|
+
if (meaningful.length <= 10) return { output: meaningful.join("\n"), strategy: "bundle-install:short" };
|
|
131
|
+
const summary = meaningful.filter((l) => l.startsWith("Bundle") || l.startsWith("Installing"));
|
|
132
|
+
return { output: summary.join("\n") || meaningful.slice(-5).join("\n"), strategy: "bundle-install:summary" };
|
|
133
|
+
}
|
|
134
|
+
function filterBundleList(raw, level) {
|
|
135
|
+
const lines = raw.split("\n").filter((l) => l.trim());
|
|
136
|
+
const gems = lines.filter((l) => l.startsWith(" *"));
|
|
137
|
+
if (level === "ultra") {
|
|
138
|
+
return { output: `${gems.length} gems`, strategy: "bundle-list:ultra" };
|
|
139
|
+
}
|
|
140
|
+
const maxGems = level === "aggressive" ? 20 : 40;
|
|
141
|
+
if (gems.length <= maxGems) return { output: raw, strategy: "bundle-list:full" };
|
|
142
|
+
const shown = gems.slice(0, maxGems).join("\n");
|
|
143
|
+
return { output: `${gems.length} gems:
|
|
144
|
+
${shown}
|
|
145
|
+
\u2026+${gems.length - maxGems} more`, strategy: "bundle-list:truncated" };
|
|
146
|
+
}
|
|
147
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
148
|
+
0 && (module.exports = {
|
|
149
|
+
packageFilter
|
|
150
|
+
});
|
|
151
|
+
//# sourceMappingURL=package.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/compression/filters/package.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Package manager output filters (npm, pip, bundle, pnpm, yarn)\n */\n\nimport type { CommandFilter, FilterResult, CompressorOptions } from '../types';\n\nexport const packageFilter: CommandFilter = {\n name: 'package',\n\n matches(command: string): boolean {\n return /\\b(npm\\s+(list|ls|outdated|install|i\\b)|pnpm\\s+(list|ls|outdated|install)|yarn\\s+(list|outdated|add|install)|pip\\s+(list|freeze|outdated|install)|bundle\\s+(install|list|outdated)|cargo\\s+(update|add)|go\\s+(mod|get))\\b/.test(command);\n },\n\n filter(command: string, rawOutput: string, level: CompressorOptions['level']): FilterResult {\n if (/npm\\s+(install|i)\\b|pnpm\\s+install|yarn\\s+(install|add)/.test(command)) return filterNpmInstall(rawOutput, level);\n if (/npm\\s+(list|ls)|pnpm\\s+(list|ls)/.test(command)) return filterNpmList(rawOutput, level);\n if (/npm\\s+outdated|pnpm\\s+outdated|yarn\\s+outdated/.test(command)) return filterOutdated(rawOutput, level);\n if (/pip\\s+(list|freeze)/.test(command)) return filterPipList(rawOutput, level);\n if (/pip\\s+outdated/.test(command)) return filterOutdated(rawOutput, level);\n if (/pip\\s+install/.test(command)) return filterPipInstall(rawOutput, level);\n if (/bundle\\s+install/.test(command)) return filterBundleInstall(rawOutput, level);\n if (/bundle\\s+list/.test(command)) return filterBundleList(rawOutput, level);\n\n return { output: rawOutput, strategy: 'package:passthrough' };\n },\n};\n\nfunction filterNpmInstall(raw: string, level: CompressorOptions['level']): FilterResult {\n const lines = raw.split('\\n').filter(l => l.trim());\n\n // Extract summary\n const addedMatch = raw.match(/added\\s+(\\d+)\\s+packages?/);\n const removedMatch = raw.match(/removed\\s+(\\d+)\\s+packages?/);\n const changedMatch = raw.match(/changed\\s+(\\d+)\\s+packages?/);\n const auditMatch = raw.match(/(\\d+)\\s+vulnerabilit/);\n\n const parts: string[] = [];\n if (addedMatch) parts.push(`+${addedMatch[1]}`);\n if (removedMatch) parts.push(`-${removedMatch[1]}`);\n if (changedMatch) parts.push(`~${changedMatch[1]}`);\n\n if (parts.length > 0) {\n const audit = auditMatch ? ` (${auditMatch[1]} vulnerabilities)` : '';\n return { output: `ok ${parts.join(' ')} packages${audit}`, strategy: 'npm-install:summary' };\n }\n\n // Already up to date\n if (raw.includes('up to date')) {\n return { output: 'ok (up to date)', strategy: 'npm-install:uptodate' };\n }\n\n // Fallback: last meaningful line\n const meaningful = lines.filter(l => !l.startsWith('npm') || l.includes('added') || l.includes('removed'));\n return { output: meaningful.pop() || 'ok', strategy: 'npm-install:fallback' };\n}\n\nfunction filterNpmList(raw: string, level: CompressorOptions['level']): FilterResult {\n const lines = raw.split('\\n').filter(l => l.trim());\n\n if (lines.length <= 10) return { output: raw, strategy: 'npm-list:short' };\n\n // Count top-level deps\n const topLevel = lines.filter(l => l.startsWith('\u251C') || l.startsWith('\u2514'));\n\n if (level === 'ultra') {\n return { output: `${topLevel.length} top-level packages`, strategy: 'npm-list:ultra' };\n }\n\n if (level === 'aggressive') {\n const shown = topLevel.slice(0, 20).join('\\n');\n const extra = topLevel.length > 20 ? `\\n\u2026+${topLevel.length - 20} more` : '';\n return { output: `${topLevel.length} packages:\\n${shown}${extra}`, strategy: 'npm-list:toplevel' };\n }\n\n // Normal: truncate tree\n const maxLines = 40;\n if (lines.length <= maxLines) return { output: raw, strategy: 'npm-list:full' };\n\n const shown = lines.slice(0, maxLines).join('\\n');\n return { output: `${shown}\\n\u2026+${lines.length - maxLines} more lines`, strategy: 'npm-list:truncated' };\n}\n\nfunction filterOutdated(raw: string, level: CompressorOptions['level']): FilterResult {\n const lines = raw.split('\\n').filter(l => l.trim());\n\n if (lines.length <= 1) return { output: 'all up to date', strategy: 'outdated:clean' };\n\n const rows = lines.slice(1); // Skip header\n\n if (level === 'ultra') {\n return { output: `${rows.length} outdated packages`, strategy: 'outdated:ultra' };\n }\n\n const maxRows = level === 'aggressive' ? 10 : 20;\n if (rows.length <= maxRows) return { output: raw, strategy: 'outdated:short' };\n\n const shown = [lines[0], ...rows.slice(0, maxRows)].join('\\n');\n return { output: `${shown}\\n\u2026+${rows.length - maxRows} more`, strategy: 'outdated:truncated' };\n}\n\nfunction filterPipList(raw: string, level: CompressorOptions['level']): FilterResult {\n const lines = raw.split('\\n').filter(l => l.trim());\n\n if (lines.length <= 5) return { output: raw, strategy: 'pip-list:short' };\n\n // Skip header lines (Package, Version, ---)\n const packages = lines.filter(l => !l.startsWith('Package') && !l.startsWith('---') && !l.startsWith('WARNING'));\n\n if (level === 'ultra') {\n return { output: `${packages.length} packages installed`, strategy: 'pip-list:ultra' };\n }\n\n const maxPkgs = level === 'aggressive' ? 20 : 40;\n if (packages.length <= maxPkgs) return { output: packages.join('\\n'), strategy: 'pip-list:full' };\n\n const shown = packages.slice(0, maxPkgs).join('\\n');\n return { output: `${shown}\\n\u2026+${packages.length - maxPkgs} more packages`, strategy: 'pip-list:truncated' };\n}\n\nfunction filterPipInstall(raw: string, level: CompressorOptions['level']): FilterResult {\n const lines = raw.split('\\n').filter(l => l.trim());\n\n // Success\n if (raw.includes('Successfully installed')) {\n const installed = raw.match(/Successfully installed (.+)/);\n if (installed) {\n const pkgs = installed[1].split(/\\s+/);\n if (level === 'ultra') return { output: `ok +${pkgs.length} packages`, strategy: 'pip-install:ultra' };\n return { output: `ok installed ${pkgs.length} packages: ${pkgs.slice(0, 5).join(', ')}${pkgs.length > 5 ? '\u2026' : ''}`, strategy: 'pip-install:summary' };\n }\n }\n\n if (raw.includes('already satisfied')) {\n return { output: 'ok (already satisfied)', strategy: 'pip-install:satisfied' };\n }\n\n // Strip download progress lines\n const meaningful = lines.filter(l => !l.includes('Downloading') && !l.includes('\u2501') && !l.includes('Using cached'));\n return { output: meaningful.join('\\n') || 'ok', strategy: 'pip-install:filtered' };\n}\n\nfunction filterBundleInstall(raw: string, level: CompressorOptions['level']): FilterResult {\n const lines = raw.split('\\n').filter(l => l.trim());\n\n // Strip \"Using ...\" lines\n const meaningful = lines.filter(l => !l.startsWith('Using ') && !l.startsWith('Fetching'));\n const installed = lines.filter(l => l.startsWith('Installing'));\n\n if (level === 'ultra') {\n return { output: `ok ${installed.length} installed`, strategy: 'bundle-install:ultra' };\n }\n\n if (meaningful.length <= 10) return { output: meaningful.join('\\n'), strategy: 'bundle-install:short' };\n\n // Show summary\n const summary = meaningful.filter(l => l.startsWith('Bundle') || l.startsWith('Installing'));\n return { output: summary.join('\\n') || meaningful.slice(-5).join('\\n'), strategy: 'bundle-install:summary' };\n}\n\nfunction filterBundleList(raw: string, level: CompressorOptions['level']): FilterResult {\n const lines = raw.split('\\n').filter(l => l.trim());\n const gems = lines.filter(l => l.startsWith(' *'));\n\n if (level === 'ultra') {\n return { output: `${gems.length} gems`, strategy: 'bundle-list:ultra' };\n }\n\n const maxGems = level === 'aggressive' ? 20 : 40;\n if (gems.length <= maxGems) return { output: raw, strategy: 'bundle-list:full' };\n\n const shown = gems.slice(0, maxGems).join('\\n');\n return { output: `${gems.length} gems:\\n${shown}\\n\u2026+${gems.length - maxGems} more`, strategy: 'bundle-list:truncated' };\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAMO,MAAM,gBAA+B;AAAA,EAC1C,MAAM;AAAA,EAEN,QAAQ,SAA0B;AAChC,WAAO,4NAA4N,KAAK,OAAO;AAAA,EACjP;AAAA,EAEA,OAAO,SAAiB,WAAmB,OAAiD;AAC1F,QAAI,0DAA0D,KAAK,OAAO,EAAG,QAAO,iBAAiB,WAAW,KAAK;AACrH,QAAI,mCAAmC,KAAK,OAAO,EAAG,QAAO,cAAc,WAAW,KAAK;AAC3F,QAAI,iDAAiD,KAAK,OAAO,EAAG,QAAO,eAAe,WAAW,KAAK;AAC1G,QAAI,sBAAsB,KAAK,OAAO,EAAG,QAAO,cAAc,WAAW,KAAK;AAC9E,QAAI,iBAAiB,KAAK,OAAO,EAAG,QAAO,eAAe,WAAW,KAAK;AAC1E,QAAI,gBAAgB,KAAK,OAA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