trimprompt 1.0.31 → 1.0.32
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/api-proxy.js +1 -1
- package/cache-manager.js +1 -1
- package/cache.js +1 -1
- package/ccr.js +1 -1
- package/cli.js +1 -1
- package/dashboard.js +1 -1
- package/executor.js +1 -1
- package/file-watcher.js +1 -1
- package/filters/devops.js +1 -1
- package/filters/generic.js +1 -1
- package/filters/git.js +1 -1
- package/filters/go.js +1 -99
- package/filters/index.js +1 -185
- package/filters/js.js +1 -78
- package/filters/python.js +1 -130
- package/filters/rust.js +1 -115
- package/filters/shell.js +1 -395
- package/hooks/claude-hook.js +1 -79
- package/mcp.js +1 -132
- package/package.json +1 -1
- package/proxy-conv.js +1 -181
- package/proxy-daemon.js +1 -382
- package/proxy-resp.js +1 -1
- package/redactor.js +1 -1
- package/seed.js +1 -1
- package/shims.js +1 -1
- package/simulate.js +1 -1
- package/sync.js +1 -1
- package/tracker.js +1 -1
- package/traffic-interceptor.js +1 -1
package/filters/index.js
CHANGED
|
@@ -1,185 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.lastFeatures = exports.lastRedactAudit = void 0;
|
|
4
|
-
exports.compressOutput = compressOutput;
|
|
5
|
-
exports.rewriteCommand = rewriteCommand;
|
|
6
|
-
const generic_1 = require("./generic");
|
|
7
|
-
const git_1 = require("./git");
|
|
8
|
-
const python_1 = require("./python");
|
|
9
|
-
const js_1 = require("./js");
|
|
10
|
-
const shell_1 = require("./shell");
|
|
11
|
-
const rust_1 = require("./rust");
|
|
12
|
-
const go_1 = require("./go");
|
|
13
|
-
const devops_1 = require("./devops");
|
|
14
|
-
const redactor_1 = require("../redactor");
|
|
15
|
-
const tracker_1 = require("../tracker");
|
|
16
|
-
exports.lastRedactAudit = { secretsFound: 0, secretTypes: [] };
|
|
17
|
-
exports.lastFeatures = [];
|
|
18
|
-
function isFeatureEnabled(key) {
|
|
19
|
-
try {
|
|
20
|
-
const config = tracker_1.tracker.getConfig();
|
|
21
|
-
const fe = config.features_enabled;
|
|
22
|
-
if (!fe || fe[key] === undefined)
|
|
23
|
-
return true;
|
|
24
|
-
return fe[key] !== false;
|
|
25
|
-
}
|
|
26
|
-
catch {
|
|
27
|
-
return true;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
function compressOutput(commandLine, stdout, stderr, redactionEnabled = true) {
|
|
31
|
-
const cmd = commandLine.trim();
|
|
32
|
-
let combinedOutput = stdout;
|
|
33
|
-
if (stderr.trim().length > 0) {
|
|
34
|
-
combinedOutput = `${stdout}\n${stderr}`;
|
|
35
|
-
}
|
|
36
|
-
let processed = isFeatureEnabled('ansi_strip') ? (0, generic_1.stripAnsi)(combinedOutput) : combinedOutput;
|
|
37
|
-
const features = [];
|
|
38
|
-
if (processed.length < combinedOutput.length)
|
|
39
|
-
features.push('ansi_strip');
|
|
40
|
-
const tagged = (tag, result) => { features.push(tag); exports.lastFeatures = features; return result; };
|
|
41
|
-
if (redactionEnabled && isFeatureEnabled('redact')) {
|
|
42
|
-
const result = redactor_1.redactor.redactWithAudit(processed);
|
|
43
|
-
processed = result.text;
|
|
44
|
-
exports.lastRedactAudit = { secretsFound: result.secretsFound, secretTypes: result.secretTypes };
|
|
45
|
-
if (result.secretsFound > 0)
|
|
46
|
-
features.push('redact');
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
exports.lastRedactAudit = { secretsFound: 0, secretTypes: [] };
|
|
50
|
-
}
|
|
51
|
-
const cmdLower = cmd.toLowerCase();
|
|
52
|
-
const filtersOn = isFeatureEnabled('filter');
|
|
53
|
-
try {
|
|
54
|
-
if (filtersOn) {
|
|
55
|
-
if (cmdLower.includes('git status') || cmdLower.includes('yadm status')) {
|
|
56
|
-
return tagged('filter', (0, git_1.filterGitStatus)(processed));
|
|
57
|
-
}
|
|
58
|
-
if (cmdLower.includes('git log') || cmdLower.includes('yadm log')) {
|
|
59
|
-
return tagged('filter', (0, git_1.filterGitLog)(processed));
|
|
60
|
-
}
|
|
61
|
-
if (cmdLower.includes('git diff') || cmdLower.includes('git show') || cmdLower.includes('yadm diff')) {
|
|
62
|
-
return tagged('filter', (0, git_1.filterGitDiff)(processed));
|
|
63
|
-
}
|
|
64
|
-
if (cmdLower.includes('pytest') || cmdLower.match(/python3?\s+-m\s+pytest/)) {
|
|
65
|
-
return tagged('filter', (0, python_1.filterPytest)(processed));
|
|
66
|
-
}
|
|
67
|
-
if (cmdLower.includes('pip install') || cmdLower.includes('pip3 install')) {
|
|
68
|
-
return tagged('filter', (0, python_1.filterPipInstall)(processed));
|
|
69
|
-
}
|
|
70
|
-
if (cmdLower.includes('ruff check') || cmdLower.includes('ruff ')) {
|
|
71
|
-
return tagged('filter', (0, devops_1.filterRuff)(processed));
|
|
72
|
-
}
|
|
73
|
-
if (cmdLower.includes('npm install') ||
|
|
74
|
-
cmdLower.includes('npm i ') ||
|
|
75
|
-
cmdLower.endsWith('npm i') ||
|
|
76
|
-
cmdLower.includes('pnpm install') ||
|
|
77
|
-
cmdLower.includes('yarn install')) {
|
|
78
|
-
return tagged('filter', (0, js_1.filterNpmInstall)(processed));
|
|
79
|
-
}
|
|
80
|
-
if (cmdLower.includes('jest') || cmdLower.includes('vitest')) {
|
|
81
|
-
return tagged('filter', (0, js_1.filterJestVitest)(processed));
|
|
82
|
-
}
|
|
83
|
-
if (cmdLower.includes('npm test') || cmdLower.includes('pnpm test') || cmdLower.includes('yarn test') || cmdLower.includes('npm run test')) {
|
|
84
|
-
return tagged('filter', (0, js_1.filterJestVitest)(processed));
|
|
85
|
-
}
|
|
86
|
-
if (cmdLower.includes('cargo test')) {
|
|
87
|
-
return tagged('filter', (0, rust_1.filterCargoTest)(processed));
|
|
88
|
-
}
|
|
89
|
-
if (cmdLower.includes('cargo build') || cmdLower.includes('cargo check') || cmdLower.includes('cargo clippy')) {
|
|
90
|
-
return tagged('filter', (0, rust_1.filterCargoBuild)(processed));
|
|
91
|
-
}
|
|
92
|
-
if (cmdLower.includes('go test')) {
|
|
93
|
-
return tagged('filter', (0, go_1.filterGoTest)(processed));
|
|
94
|
-
}
|
|
95
|
-
if (cmdLower.includes('go vet')) {
|
|
96
|
-
return tagged('filter', (0, go_1.filterGoVet)(processed));
|
|
97
|
-
}
|
|
98
|
-
if (cmdLower.match(/docker\s+ps/)) {
|
|
99
|
-
return tagged('filter', (0, devops_1.filterDockerPs)(processed));
|
|
100
|
-
}
|
|
101
|
-
if (cmdLower.match(/docker\s+images/)) {
|
|
102
|
-
return tagged('filter', (0, devops_1.filterDockerImages)(processed));
|
|
103
|
-
}
|
|
104
|
-
if (cmdLower.match(/docker\s+logs/)) {
|
|
105
|
-
return tagged('filter', (0, devops_1.filterDockerLogs)(processed));
|
|
106
|
-
}
|
|
107
|
-
if (cmdLower.includes('kubectl')) {
|
|
108
|
-
const subMatch = cmdLower.match(/kubectl\s+(get|logs|describe|apply)/);
|
|
109
|
-
const sub = subMatch ? subMatch[1] : 'get';
|
|
110
|
-
return tagged('filter', (0, devops_1.filterKubectl)(processed, sub));
|
|
111
|
-
}
|
|
112
|
-
if (cmdLower.match(/^(ls|dir)(\s|$)/) || cmdLower.includes(' ls ') || cmdLower.endsWith(' ls')) {
|
|
113
|
-
return tagged('filter', (0, shell_1.filterLs)(processed));
|
|
114
|
-
}
|
|
115
|
-
if (cmdLower.match(/^tree(\s|$)/) || cmdLower.includes(' tree ') || cmdLower.endsWith(' tree')) {
|
|
116
|
-
return tagged('filter', (0, shell_1.filterTree)(processed));
|
|
117
|
-
}
|
|
118
|
-
if (cmdLower.match(/^(cat|head|tail|read|bat)(\s|$)/)) {
|
|
119
|
-
const catResult = (0, shell_1.filterCat)(processed, cmd);
|
|
120
|
-
if (catResult.includes('[lock file]'))
|
|
121
|
-
features.push('lock');
|
|
122
|
-
else if (catResult.includes('[binary') || catResult.includes('[minified file]'))
|
|
123
|
-
features.push('binary');
|
|
124
|
-
else if (catResult.includes('[code skeleton]'))
|
|
125
|
-
features.push('skeleton');
|
|
126
|
-
else if (catResult.includes('| ') && catResult.includes('---') && catResult.length < processed.length * 0.5)
|
|
127
|
-
features.push('json_crusher');
|
|
128
|
-
else if (catResult.includes('lines truncated'))
|
|
129
|
-
features.push('filter');
|
|
130
|
-
if (catResult.length < processed.length && !features.some(f => f !== 'ansi_strip' && f !== 'redact'))
|
|
131
|
-
features.push('filter');
|
|
132
|
-
exports.lastFeatures = features;
|
|
133
|
-
return catResult;
|
|
134
|
-
}
|
|
135
|
-
if (cmdLower.match(/^find(\s|$)/)) {
|
|
136
|
-
return tagged('filter', (0, shell_1.filterFind)(processed));
|
|
137
|
-
}
|
|
138
|
-
if (cmdLower.match(/^(grep|rg|ripgrep)(\s|$)/)) {
|
|
139
|
-
return tagged('filter', (0, shell_1.filterGrep)(processed));
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
catch (err) {
|
|
144
|
-
}
|
|
145
|
-
if (isFeatureEnabled('whitespace')) {
|
|
146
|
-
processed = (0, generic_1.collapseWhitespace)(processed);
|
|
147
|
-
features.push('whitespace');
|
|
148
|
-
}
|
|
149
|
-
processed = (0, generic_1.collapseDuplicates)(processed);
|
|
150
|
-
processed = (0, generic_1.softTruncate)(processed, 20000);
|
|
151
|
-
exports.lastFeatures = features;
|
|
152
|
-
return processed;
|
|
153
|
-
}
|
|
154
|
-
const REWRITE_RULES = [
|
|
155
|
-
{ pattern: /^(?:git|yadm)\s+(?:-[Cc]\s+\S+\s+)*(status|log|diff|show|add|commit|push|pull|branch|fetch|stash|worktree)/, prefix: 'trim git' },
|
|
156
|
-
{ pattern: /^gh\s+(pr|issue|run|repo|api|release)/, prefix: 'trim gh' },
|
|
157
|
-
{ pattern: /^glab\s+(mr|issue|ci|pipeline|api|release)/, prefix: 'trim glab' },
|
|
158
|
-
{ pattern: /^cargo\s+(build|test|clippy|check|fmt|install)/, prefix: 'trim cargo' },
|
|
159
|
-
{ pattern: /^pnpm\s+(exec|i|install|list|ls|outdated|run|run-script)/, prefix: 'trim pnpm' },
|
|
160
|
-
{ pattern: /^npm\s+(exec|run|run-script|rum|urn|x|test)(\s|$)/, prefix: 'trim npm' },
|
|
161
|
-
{ pattern: /^npx\s+/, prefix: 'trim npx' },
|
|
162
|
-
{ pattern: /^(cat|head|tail)\s+/, prefix: 'trim read' },
|
|
163
|
-
{ pattern: /^(rg|grep)\s+/, prefix: 'trim grep' },
|
|
164
|
-
{ pattern: /^ls(\s|$)/, prefix: 'trim ls' },
|
|
165
|
-
{ pattern: /^tree(\s|$)/, prefix: 'trim tree' },
|
|
166
|
-
{ pattern: /^find\s+/, prefix: 'trim find' },
|
|
167
|
-
{ pattern: /^docker\s+(ps|images|logs|run|exec|build|compose)/, prefix: 'trim docker' },
|
|
168
|
-
{ pattern: /^kubectl\s+(get|logs|describe|apply)/, prefix: 'trim kubectl' },
|
|
169
|
-
{ pattern: /^(python3?\s+-m\s+)?pytest(\s|$)/, prefix: 'trim pytest' },
|
|
170
|
-
{ pattern: /^ruff\s+(check|format)/, prefix: 'trim ruff' },
|
|
171
|
-
{ pattern: /^(pip3?|uv\s+pip)\s+(list|outdated|install|show)/, prefix: 'trim pip' },
|
|
172
|
-
{ pattern: /^go\s+(test|build|vet)/, prefix: 'trim go' }
|
|
173
|
-
];
|
|
174
|
-
function rewriteCommand(commandLine) {
|
|
175
|
-
const trimmed = commandLine.trim();
|
|
176
|
-
if (trimmed.startsWith('trim ')) {
|
|
177
|
-
return trimmed;
|
|
178
|
-
}
|
|
179
|
-
for (const rule of REWRITE_RULES) {
|
|
180
|
-
if (rule.pattern.test(trimmed)) {
|
|
181
|
-
return `trim ${trimmed}`;
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
return trimmed;
|
|
185
|
-
}
|
|
1
|
+
'use strict';const a0_0x3eadba=a0_0x4902;(function(_0x19a74a,_0x81aa25){const _0xf2d565=a0_0x4902,_0x57da0b=_0x19a74a();while(!![]){try{const _0x3d92cc=-parseInt(_0xf2d565(0x145))/0x1*(parseInt(_0xf2d565(0x130))/0x2)+parseInt(_0xf2d565(0x124))/0x3+parseInt(_0xf2d565(0x166))/0x4+parseInt(_0xf2d565(0x152))/0x5*(-parseInt(_0xf2d565(0x111))/0x6)+parseInt(_0xf2d565(0x12e))/0x7+parseInt(_0xf2d565(0x149))/0x8*(-parseInt(_0xf2d565(0x143))/0x9)+parseInt(_0xf2d565(0x148))/0xa;if(_0x3d92cc===_0x81aa25)break;else _0x57da0b['push'](_0x57da0b['shift']());}catch(_0x24a06e){_0x57da0b['push'](_0x57da0b['shift']());}}}(a0_0x25f0,0x7f517));function a0_0x4902(_0x5d1700,_0x448028){const _0x25f0ff=a0_0x25f0();return a0_0x4902=function(_0x490292,_0x4edd82){_0x490292=_0x490292-0xf7;let _0x1af4d1=_0x25f0ff[_0x490292];return _0x1af4d1;},a0_0x4902(_0x5d1700,_0x448028);}Object[a0_0x3eadba(0x14d)](exports,'__esModule',{'value':!![]}),exports[a0_0x3eadba(0x11f)]=exports[a0_0x3eadba(0x138)]=void 0x0,exports[a0_0x3eadba(0x121)]=compressOutput,exports[a0_0x3eadba(0x112)]=rewriteCommand;const generic_1=require(a0_0x3eadba(0x113)),git_1=require(a0_0x3eadba(0x132)),python_1=require(a0_0x3eadba(0x147)),js_1=require(a0_0x3eadba(0x155)),shell_1=require(a0_0x3eadba(0x11d)),rust_1=require(a0_0x3eadba(0x104)),go_1=require(a0_0x3eadba(0x101)),devops_1=require(a0_0x3eadba(0x14c)),redactor_1=require(a0_0x3eadba(0x129)),tracker_1=require(a0_0x3eadba(0xfb));exports[a0_0x3eadba(0x138)]={'secretsFound':0x0,'secretTypes':[]},exports[a0_0x3eadba(0x11f)]=[];function a0_0x25f0(){const _0x37ab5c=['pip3\x20install','./shell','npm\x20install','lastFeatures','pip\x20install','compressOutput','trim\x20ls','npm\x20i','202227ObpzUy','test','features_enabled','collapseWhitespace','\x20ls\x20','../redactor','git\x20log','filter','git\x20show','trim\x20kubectl','105007xzsjhX','yadm\x20log','36172QGiGsC','trim\x20tree','./git','match','\x20ls','pnpm\x20install','length','trim\x20pytest','lastRedactAudit','trim\x20read','some','trim\x20npx','secretsFound','trim\x20glab','filterDockerImages','startsWith','skeleton','jest','cargo\x20build','261hHrZpD','filterKubectl','3wnXQpW','---','./python','2833300zcbdCu','95216lGpmka','yadm\x20diff','lines\x20truncated','./devops','defineProperty','npm\x20test','go\x20vet','git\x20status','filterPipInstall','10EOwDoc','trim\x20','ruff\x20check','./js','redactor','yarn\x20test','get','filterDockerLogs','endsWith','collapseDuplicates','[binary','filterCat','filterGrep','npm\x20run\x20test','npm\x20i\x20','filterCargoBuild','filterDockerPs','softTruncate','vitest','redactWithAudit','2611244WOcKCZ','stripAnsi','go\x20test','trim\x20pip','trim\x20gh','trim\x20cargo','../tracker','ansi_strip','trim','trim\x20pnpm','secretTypes','trim\x20npm','./go','cargo\x20test','filterNpmInstall','./rust','filterPytest','push','pattern','cargo\x20clippy','trim\x20ruff','binary','text','filterCargoTest','includes','\x20tree\x20','yarn\x20install','tracker','292920aiLwcP','rewriteCommand','./generic','[lock\x20file]','filterGoTest','trim\x20git','cargo\x20check','redact','filterJestVitest','kubectl','whitespace'];a0_0x25f0=function(){return _0x37ab5c;};return a0_0x25f0();}function isFeatureEnabled(_0x3467bc){const _0xfbb37a=a0_0x3eadba;try{const _0x17d81f=tracker_1[_0xfbb37a(0x110)]['getConfig'](),_0x25137b=_0x17d81f[_0xfbb37a(0x126)];if(!_0x25137b||_0x25137b[_0x3467bc]===undefined)return!![];return _0x25137b[_0x3467bc]!==![];}catch{return!![];}}function compressOutput(_0x42d206,_0x57e310,_0xcf6bce,_0xa147fc=!![]){const _0x2dd564=a0_0x3eadba,_0x49c7bc=_0x42d206[_0x2dd564(0xfd)]();let _0x36a2b0=_0x57e310;_0xcf6bce['trim']()[_0x2dd564(0x136)]>0x0&&(_0x36a2b0=_0x57e310+'\x0a'+_0xcf6bce);let _0x37cd70=isFeatureEnabled(_0x2dd564(0xfc))?(0x0,generic_1[_0x2dd564(0x167)])(_0x36a2b0):_0x36a2b0;const _0x3dae7b=[];if(_0x37cd70['length']<_0x36a2b0[_0x2dd564(0x136)])_0x3dae7b[_0x2dd564(0x106)](_0x2dd564(0xfc));const _0x499319=(_0x5103cf,_0x19f202)=>{const _0x521564=_0x2dd564;return _0x3dae7b[_0x521564(0x106)](_0x5103cf),exports[_0x521564(0x11f)]=_0x3dae7b,_0x19f202;};if(_0xa147fc&&isFeatureEnabled(_0x2dd564(0x118))){const _0x369860=redactor_1[_0x2dd564(0x156)][_0x2dd564(0x165)](_0x37cd70);_0x37cd70=_0x369860[_0x2dd564(0x10b)],exports[_0x2dd564(0x138)]={'secretsFound':_0x369860[_0x2dd564(0x13c)],'secretTypes':_0x369860[_0x2dd564(0xff)]};if(_0x369860[_0x2dd564(0x13c)]>0x0)_0x3dae7b[_0x2dd564(0x106)](_0x2dd564(0x118));}else exports['lastRedactAudit']={'secretsFound':0x0,'secretTypes':[]};const _0x37f4e4=_0x49c7bc['toLowerCase'](),_0x3ecb92=isFeatureEnabled(_0x2dd564(0x12b));try{if(_0x3ecb92){if(_0x37f4e4['includes'](_0x2dd564(0x150))||_0x37f4e4[_0x2dd564(0x10d)]('yadm\x20status'))return _0x499319(_0x2dd564(0x12b),(0x0,git_1['filterGitStatus'])(_0x37cd70));if(_0x37f4e4[_0x2dd564(0x10d)](_0x2dd564(0x12a))||_0x37f4e4[_0x2dd564(0x10d)](_0x2dd564(0x12f)))return _0x499319(_0x2dd564(0x12b),(0x0,git_1['filterGitLog'])(_0x37cd70));if(_0x37f4e4['includes']('git\x20diff')||_0x37f4e4['includes'](_0x2dd564(0x12c))||_0x37f4e4[_0x2dd564(0x10d)](_0x2dd564(0x14a)))return _0x499319(_0x2dd564(0x12b),(0x0,git_1['filterGitDiff'])(_0x37cd70));if(_0x37f4e4['includes']('pytest')||_0x37f4e4[_0x2dd564(0x133)](/python3?\s+-m\s+pytest/))return _0x499319(_0x2dd564(0x12b),(0x0,python_1[_0x2dd564(0x105)])(_0x37cd70));if(_0x37f4e4[_0x2dd564(0x10d)](_0x2dd564(0x120))||_0x37f4e4[_0x2dd564(0x10d)](_0x2dd564(0x11c)))return _0x499319(_0x2dd564(0x12b),(0x0,python_1[_0x2dd564(0x151)])(_0x37cd70));if(_0x37f4e4[_0x2dd564(0x10d)](_0x2dd564(0x154))||_0x37f4e4['includes']('ruff\x20'))return _0x499319(_0x2dd564(0x12b),(0x0,devops_1['filterRuff'])(_0x37cd70));if(_0x37f4e4[_0x2dd564(0x10d)](_0x2dd564(0x11e))||_0x37f4e4[_0x2dd564(0x10d)](_0x2dd564(0x160))||_0x37f4e4[_0x2dd564(0x15a)](_0x2dd564(0x123))||_0x37f4e4[_0x2dd564(0x10d)](_0x2dd564(0x135))||_0x37f4e4[_0x2dd564(0x10d)](_0x2dd564(0x10f)))return _0x499319(_0x2dd564(0x12b),(0x0,js_1[_0x2dd564(0x103)])(_0x37cd70));if(_0x37f4e4[_0x2dd564(0x10d)](_0x2dd564(0x141))||_0x37f4e4['includes'](_0x2dd564(0x164)))return _0x499319(_0x2dd564(0x12b),(0x0,js_1[_0x2dd564(0x119)])(_0x37cd70));if(_0x37f4e4['includes'](_0x2dd564(0x14e))||_0x37f4e4[_0x2dd564(0x10d)]('pnpm\x20test')||_0x37f4e4['includes'](_0x2dd564(0x157))||_0x37f4e4[_0x2dd564(0x10d)](_0x2dd564(0x15f)))return _0x499319(_0x2dd564(0x12b),(0x0,js_1[_0x2dd564(0x119)])(_0x37cd70));if(_0x37f4e4[_0x2dd564(0x10d)](_0x2dd564(0x102)))return _0x499319('filter',(0x0,rust_1[_0x2dd564(0x10c)])(_0x37cd70));if(_0x37f4e4[_0x2dd564(0x10d)](_0x2dd564(0x142))||_0x37f4e4[_0x2dd564(0x10d)](_0x2dd564(0x117))||_0x37f4e4[_0x2dd564(0x10d)](_0x2dd564(0x108)))return _0x499319('filter',(0x0,rust_1[_0x2dd564(0x161)])(_0x37cd70));if(_0x37f4e4['includes'](_0x2dd564(0xf7)))return _0x499319(_0x2dd564(0x12b),(0x0,go_1[_0x2dd564(0x115)])(_0x37cd70));if(_0x37f4e4[_0x2dd564(0x10d)](_0x2dd564(0x14f)))return _0x499319(_0x2dd564(0x12b),(0x0,go_1['filterGoVet'])(_0x37cd70));if(_0x37f4e4['match'](/docker\s+ps/))return _0x499319(_0x2dd564(0x12b),(0x0,devops_1[_0x2dd564(0x162)])(_0x37cd70));if(_0x37f4e4[_0x2dd564(0x133)](/docker\s+images/))return _0x499319('filter',(0x0,devops_1[_0x2dd564(0x13e)])(_0x37cd70));if(_0x37f4e4[_0x2dd564(0x133)](/docker\s+logs/))return _0x499319(_0x2dd564(0x12b),(0x0,devops_1[_0x2dd564(0x159)])(_0x37cd70));if(_0x37f4e4[_0x2dd564(0x10d)](_0x2dd564(0x11a))){const _0x4f69cc=_0x37f4e4['match'](/kubectl\s+(get|logs|describe|apply)/),_0x150cab=_0x4f69cc?_0x4f69cc[0x1]:_0x2dd564(0x158);return _0x499319(_0x2dd564(0x12b),(0x0,devops_1[_0x2dd564(0x144)])(_0x37cd70,_0x150cab));}if(_0x37f4e4['match'](/^(ls|dir)(\s|$)/)||_0x37f4e4[_0x2dd564(0x10d)](_0x2dd564(0x128))||_0x37f4e4['endsWith'](_0x2dd564(0x134)))return _0x499319(_0x2dd564(0x12b),(0x0,shell_1['filterLs'])(_0x37cd70));if(_0x37f4e4[_0x2dd564(0x133)](/^tree(\s|$)/)||_0x37f4e4[_0x2dd564(0x10d)](_0x2dd564(0x10e))||_0x37f4e4[_0x2dd564(0x15a)]('\x20tree'))return _0x499319(_0x2dd564(0x12b),(0x0,shell_1['filterTree'])(_0x37cd70));if(_0x37f4e4[_0x2dd564(0x133)](/^(cat|head|tail|read|bat)(\s|$)/)){const _0x4fdf29=(0x0,shell_1[_0x2dd564(0x15d)])(_0x37cd70,_0x49c7bc);if(_0x4fdf29[_0x2dd564(0x10d)](_0x2dd564(0x114)))_0x3dae7b[_0x2dd564(0x106)]('lock');else{if(_0x4fdf29['includes'](_0x2dd564(0x15c))||_0x4fdf29['includes']('[minified\x20file]'))_0x3dae7b['push'](_0x2dd564(0x10a));else{if(_0x4fdf29['includes']('[code\x20skeleton]'))_0x3dae7b[_0x2dd564(0x106)](_0x2dd564(0x140));else{if(_0x4fdf29[_0x2dd564(0x10d)]('|\x20')&&_0x4fdf29[_0x2dd564(0x10d)](_0x2dd564(0x146))&&_0x4fdf29[_0x2dd564(0x136)]<_0x37cd70[_0x2dd564(0x136)]*0.5)_0x3dae7b[_0x2dd564(0x106)]('json_crusher');else{if(_0x4fdf29[_0x2dd564(0x10d)](_0x2dd564(0x14b)))_0x3dae7b[_0x2dd564(0x106)](_0x2dd564(0x12b));}}}}if(_0x4fdf29[_0x2dd564(0x136)]<_0x37cd70[_0x2dd564(0x136)]&&!_0x3dae7b[_0x2dd564(0x13a)](_0x45735b=>_0x45735b!==_0x2dd564(0xfc)&&_0x45735b!==_0x2dd564(0x118)))_0x3dae7b[_0x2dd564(0x106)](_0x2dd564(0x12b));return exports[_0x2dd564(0x11f)]=_0x3dae7b,_0x4fdf29;}if(_0x37f4e4[_0x2dd564(0x133)](/^find(\s|$)/))return _0x499319('filter',(0x0,shell_1['filterFind'])(_0x37cd70));if(_0x37f4e4['match'](/^(grep|rg|ripgrep)(\s|$)/))return _0x499319('filter',(0x0,shell_1[_0x2dd564(0x15e)])(_0x37cd70));}}catch(_0x3de84f){}return isFeatureEnabled(_0x2dd564(0x11b))&&(_0x37cd70=(0x0,generic_1[_0x2dd564(0x127)])(_0x37cd70),_0x3dae7b[_0x2dd564(0x106)](_0x2dd564(0x11b))),_0x37cd70=(0x0,generic_1[_0x2dd564(0x15b)])(_0x37cd70),_0x37cd70=(0x0,generic_1[_0x2dd564(0x163)])(_0x37cd70,0x4e20),exports['lastFeatures']=_0x3dae7b,_0x37cd70;}const REWRITE_RULES=[{'pattern':/^(?:git|yadm)\s+(?:-[Cc]\s+\S+\s+)*(status|log|diff|show|add|commit|push|pull|branch|fetch|stash|worktree)/,'prefix':a0_0x3eadba(0x116)},{'pattern':/^gh\s+(pr|issue|run|repo|api|release)/,'prefix':a0_0x3eadba(0xf9)},{'pattern':/^glab\s+(mr|issue|ci|pipeline|api|release)/,'prefix':a0_0x3eadba(0x13d)},{'pattern':/^cargo\s+(build|test|clippy|check|fmt|install)/,'prefix':a0_0x3eadba(0xfa)},{'pattern':/^pnpm\s+(exec|i|install|list|ls|outdated|run|run-script)/,'prefix':a0_0x3eadba(0xfe)},{'pattern':/^npm\s+(exec|run|run-script|rum|urn|x|test)(\s|$)/,'prefix':a0_0x3eadba(0x100)},{'pattern':/^npx\s+/,'prefix':a0_0x3eadba(0x13b)},{'pattern':/^(cat|head|tail)\s+/,'prefix':a0_0x3eadba(0x139)},{'pattern':/^(rg|grep)\s+/,'prefix':'trim\x20grep'},{'pattern':/^ls(\s|$)/,'prefix':a0_0x3eadba(0x122)},{'pattern':/^tree(\s|$)/,'prefix':a0_0x3eadba(0x131)},{'pattern':/^find\s+/,'prefix':'trim\x20find'},{'pattern':/^docker\s+(ps|images|logs|run|exec|build|compose)/,'prefix':'trim\x20docker'},{'pattern':/^kubectl\s+(get|logs|describe|apply)/,'prefix':a0_0x3eadba(0x12d)},{'pattern':/^(python3?\s+-m\s+)?pytest(\s|$)/,'prefix':a0_0x3eadba(0x137)},{'pattern':/^ruff\s+(check|format)/,'prefix':a0_0x3eadba(0x109)},{'pattern':/^(pip3?|uv\s+pip)\s+(list|outdated|install|show)/,'prefix':a0_0x3eadba(0xf8)},{'pattern':/^go\s+(test|build|vet)/,'prefix':'trim\x20go'}];function rewriteCommand(_0x41b41a){const _0x4a0377=a0_0x3eadba,_0x6f3f0b=_0x41b41a[_0x4a0377(0xfd)]();if(_0x6f3f0b[_0x4a0377(0x13f)](_0x4a0377(0x153)))return _0x6f3f0b;for(const _0xab9f5d of REWRITE_RULES){if(_0xab9f5d[_0x4a0377(0x107)][_0x4a0377(0x125)](_0x6f3f0b))return'trim\x20'+_0x6f3f0b;}return _0x6f3f0b;}
|
package/filters/js.js
CHANGED
|
@@ -1,78 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.filterNpmInstall = filterNpmInstall;
|
|
4
|
-
exports.filterJestVitest = filterJestVitest;
|
|
5
|
-
function filterNpmInstall(stdout) {
|
|
6
|
-
const cleanText = stdout.replace(/\r/g, '\n');
|
|
7
|
-
const lines = cleanText.split('\n');
|
|
8
|
-
const result = [];
|
|
9
|
-
for (const line of lines) {
|
|
10
|
-
const trimmed = line.trim();
|
|
11
|
-
if (trimmed.includes('added ') ||
|
|
12
|
-
trimmed.includes('removed ') ||
|
|
13
|
-
trimmed.includes('audited ') ||
|
|
14
|
-
trimmed.includes('up to date') ||
|
|
15
|
-
trimmed.includes('found ')) {
|
|
16
|
-
if (!trimmed.includes('%') && !trimmed.startsWith('⠋') && !trimmed.startsWith('⠙')) {
|
|
17
|
-
result.push(trimmed);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
const output = result.join('\n').trim();
|
|
22
|
-
return output.length > 0 ? output : "NPM: Packages verified/installed successfully";
|
|
23
|
-
}
|
|
24
|
-
function filterJestVitest(stdout) {
|
|
25
|
-
const lines = stdout.split('\n');
|
|
26
|
-
let passed = 0;
|
|
27
|
-
let failed = 0;
|
|
28
|
-
let total = 0;
|
|
29
|
-
const failureLines = [];
|
|
30
|
-
let inFailureSection = false;
|
|
31
|
-
for (const line of lines) {
|
|
32
|
-
const trimmed = line.trim();
|
|
33
|
-
if (trimmed.startsWith('Tests:') || trimmed.includes('Test Files:')) {
|
|
34
|
-
const matchPassed = trimmed.match(/(\d+)\s+passed/);
|
|
35
|
-
const matchFailed = trimmed.match(/(\d+)\s+failed/);
|
|
36
|
-
const matchTotal = trimmed.match(/(\d+)\s+total/);
|
|
37
|
-
if (matchPassed)
|
|
38
|
-
passed = parseInt(matchPassed[1]);
|
|
39
|
-
if (matchFailed)
|
|
40
|
-
failed = parseInt(matchFailed[1]);
|
|
41
|
-
if (matchTotal)
|
|
42
|
-
total = parseInt(matchTotal[1]);
|
|
43
|
-
continue;
|
|
44
|
-
}
|
|
45
|
-
if (trimmed.startsWith('❯') || trimmed.startsWith('●') || trimmed.startsWith('FAIL ')) {
|
|
46
|
-
inFailureSection = true;
|
|
47
|
-
}
|
|
48
|
-
if (inFailureSection) {
|
|
49
|
-
if (trimmed.length > 0 && !trimmed.startsWith('Test Suites:') && !trimmed.startsWith('Tests:')) {
|
|
50
|
-
failureLines.push(line);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
if (total === 0 && passed === 0 && failed === 0) {
|
|
55
|
-
if (stdout.includes('PASS') && !stdout.includes('FAIL')) {
|
|
56
|
-
const match = stdout.match(/(\d+)\s+passed/);
|
|
57
|
-
const count = match ? match[1] : "all";
|
|
58
|
-
return `Test Runner: ${count} passed`;
|
|
59
|
-
}
|
|
60
|
-
return stdout;
|
|
61
|
-
}
|
|
62
|
-
if (failed === 0 && passed > 0) {
|
|
63
|
-
return `Test Runner: ${passed} passed`;
|
|
64
|
-
}
|
|
65
|
-
const result = [`Test Runner: ${passed} passed, ${failed} failed (${total} total)`];
|
|
66
|
-
if (failureLines.length > 0) {
|
|
67
|
-
result.push("\nFailures:");
|
|
68
|
-
const limit = 25;
|
|
69
|
-
const printedLines = failureLines.slice(0, limit);
|
|
70
|
-
for (const line of printedLines) {
|
|
71
|
-
result.push(` ${line}`);
|
|
72
|
-
}
|
|
73
|
-
if (failureLines.length > limit) {
|
|
74
|
-
result.push(` ... (${failureLines.length - limit} lines of trace details truncated)`);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
return result.join('\n');
|
|
78
|
-
}
|
|
1
|
+
'use strict';const a0_0x4c3895=a0_0x163a;(function(_0x46d951,_0x1ac055){const _0x476047=a0_0x163a,_0x1e6498=_0x46d951();while(!![]){try{const _0x274e02=-parseInt(_0x476047(0x1b4))/0x1+-parseInt(_0x476047(0x1a7))/0x2+-parseInt(_0x476047(0x1a8))/0x3*(-parseInt(_0x476047(0x199))/0x4)+-parseInt(_0x476047(0x1b6))/0x5*(parseInt(_0x476047(0x1a1))/0x6)+-parseInt(_0x476047(0x1b2))/0x7+parseInt(_0x476047(0x1aa))/0x8+parseInt(_0x476047(0x1b9))/0x9*(parseInt(_0x476047(0x1ad))/0xa);if(_0x274e02===_0x1ac055)break;else _0x1e6498['push'](_0x1e6498['shift']());}catch(_0x2b5f1b){_0x1e6498['push'](_0x1e6498['shift']());}}}(a0_0x5588,0xa8da7));function a0_0x163a(_0xe6b036,_0x2fc277){const _0x558899=a0_0x5588();return a0_0x163a=function(_0x163a7d,_0x16e531){_0x163a7d=_0x163a7d-0x198;let _0x2ce1ea=_0x558899[_0x163a7d];return _0x2ce1ea;},a0_0x163a(_0xe6b036,_0x2fc277);}function a0_0x5588(){const _0x2ab182=['1455832WTkNiw','includes','626918QDQKHH','replace','1517965nblzbg','\x20failed\x20(','Test\x20Files:','1034469OOIvyg','length','split','added\x20','FAIL','3848gbCLhs','Tests:','filterNpmInstall','join','trim','\x20passed','match','PASS','18Jppegm','defineProperty','FAIL\x20\x20','push','up\x20to\x20date','\x20total)','703326NPuwxv','3939dzMemt','filterJestVitest','9448240knnQGG','Test\x20Runner:\x20','audited\x20','30oXofCx','all','startsWith','\x20\x20...\x20(','\x20lines\x20of\x20trace\x20details\x20truncated)'];a0_0x5588=function(){return _0x2ab182;};return a0_0x5588();}Object[a0_0x4c3895(0x1a2)](exports,'__esModule',{'value':!![]}),exports[a0_0x4c3895(0x19b)]=filterNpmInstall,exports[a0_0x4c3895(0x1a9)]=filterJestVitest;function filterNpmInstall(_0x307388){const _0xac0a5c=a0_0x4c3895,_0x4d4ec7=_0x307388[_0xac0a5c(0x1b5)](/\r/g,'\x0a'),_0x1829e3=_0x4d4ec7[_0xac0a5c(0x1bb)]('\x0a'),_0x309219=[];for(const _0x10f94a of _0x1829e3){const _0x5d4260=_0x10f94a[_0xac0a5c(0x19d)]();(_0x5d4260[_0xac0a5c(0x1b3)](_0xac0a5c(0x1bc))||_0x5d4260[_0xac0a5c(0x1b3)]('removed\x20')||_0x5d4260[_0xac0a5c(0x1b3)](_0xac0a5c(0x1ac))||_0x5d4260[_0xac0a5c(0x1b3)](_0xac0a5c(0x1a5))||_0x5d4260[_0xac0a5c(0x1b3)]('found\x20'))&&(!_0x5d4260[_0xac0a5c(0x1b3)]('%')&&!_0x5d4260[_0xac0a5c(0x1af)]('⠋')&&!_0x5d4260[_0xac0a5c(0x1af)]('⠙')&&_0x309219[_0xac0a5c(0x1a4)](_0x5d4260));}const _0x2db53d=_0x309219['join']('\x0a')['trim']();return _0x2db53d[_0xac0a5c(0x1ba)]>0x0?_0x2db53d:'NPM:\x20Packages\x20verified/installed\x20successfully';}function filterJestVitest(_0x2ac2d0){const _0x30fc40=a0_0x4c3895,_0x189fe6=_0x2ac2d0[_0x30fc40(0x1bb)]('\x0a');let _0x163868=0x0,_0xd4e73b=0x0,_0x3d9eb8=0x0;const _0x59cd06=[];let _0x1298fb=![];for(const _0x1d3846 of _0x189fe6){const _0x3d2ec0=_0x1d3846[_0x30fc40(0x19d)]();if(_0x3d2ec0['startsWith'](_0x30fc40(0x19a))||_0x3d2ec0[_0x30fc40(0x1b3)](_0x30fc40(0x1b8))){const _0x2b5142=_0x3d2ec0[_0x30fc40(0x19f)](/(\d+)\s+passed/),_0x331ffd=_0x3d2ec0[_0x30fc40(0x19f)](/(\d+)\s+failed/),_0x5547bd=_0x3d2ec0[_0x30fc40(0x19f)](/(\d+)\s+total/);if(_0x2b5142)_0x163868=parseInt(_0x2b5142[0x1]);if(_0x331ffd)_0xd4e73b=parseInt(_0x331ffd[0x1]);if(_0x5547bd)_0x3d9eb8=parseInt(_0x5547bd[0x1]);continue;}(_0x3d2ec0[_0x30fc40(0x1af)]('❯')||_0x3d2ec0[_0x30fc40(0x1af)]('●')||_0x3d2ec0['startsWith'](_0x30fc40(0x1a3)))&&(_0x1298fb=!![]),_0x1298fb&&(_0x3d2ec0[_0x30fc40(0x1ba)]>0x0&&!_0x3d2ec0[_0x30fc40(0x1af)]('Test\x20Suites:')&&!_0x3d2ec0[_0x30fc40(0x1af)]('Tests:')&&_0x59cd06['push'](_0x1d3846));}if(_0x3d9eb8===0x0&&_0x163868===0x0&&_0xd4e73b===0x0){if(_0x2ac2d0[_0x30fc40(0x1b3)](_0x30fc40(0x1a0))&&!_0x2ac2d0[_0x30fc40(0x1b3)](_0x30fc40(0x198))){const _0x235899=_0x2ac2d0['match'](/(\d+)\s+passed/),_0x48098d=_0x235899?_0x235899[0x1]:_0x30fc40(0x1ae);return _0x30fc40(0x1ab)+_0x48098d+_0x30fc40(0x19e);}return _0x2ac2d0;}if(_0xd4e73b===0x0&&_0x163868>0x0)return _0x30fc40(0x1ab)+_0x163868+_0x30fc40(0x19e);const _0x34c870=[_0x30fc40(0x1ab)+_0x163868+'\x20passed,\x20'+_0xd4e73b+_0x30fc40(0x1b7)+_0x3d9eb8+_0x30fc40(0x1a6)];if(_0x59cd06[_0x30fc40(0x1ba)]>0x0){_0x34c870[_0x30fc40(0x1a4)]('\x0aFailures:');const _0xd6c7ca=0x19,_0x5b6178=_0x59cd06['slice'](0x0,_0xd6c7ca);for(const _0xcaa3d2 of _0x5b6178){_0x34c870[_0x30fc40(0x1a4)]('\x20\x20'+_0xcaa3d2);}_0x59cd06[_0x30fc40(0x1ba)]>_0xd6c7ca&&_0x34c870['push'](_0x30fc40(0x1b0)+(_0x59cd06[_0x30fc40(0x1ba)]-_0xd6c7ca)+_0x30fc40(0x1b1));}return _0x34c870[_0x30fc40(0x19c)]('\x0a');}
|
package/filters/python.js
CHANGED
|
@@ -1,130 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.filterPytest = filterPytest;
|
|
4
|
-
exports.filterPipInstall = filterPipInstall;
|
|
5
|
-
function filterPytest(stdout) {
|
|
6
|
-
const lines = stdout.split('\n');
|
|
7
|
-
let passed = 0;
|
|
8
|
-
let failed = 0;
|
|
9
|
-
let skipped = 0;
|
|
10
|
-
let xfailed = 0;
|
|
11
|
-
let xpassed = 0;
|
|
12
|
-
const failureBlocks = [];
|
|
13
|
-
let currentFailure = [];
|
|
14
|
-
let inFailureSection = false;
|
|
15
|
-
for (const line of lines) {
|
|
16
|
-
const trimmed = line.trim();
|
|
17
|
-
if (trimmed.startsWith('=== FAILURES ===') || trimmed.startsWith('=== ERRORS ===')) {
|
|
18
|
-
inFailureSection = true;
|
|
19
|
-
continue;
|
|
20
|
-
}
|
|
21
|
-
else if (trimmed.startsWith('=== short test summary info ===') || (trimmed.startsWith('===') && trimmed.includes('passed'))) {
|
|
22
|
-
inFailureSection = false;
|
|
23
|
-
if (currentFailure.length > 0) {
|
|
24
|
-
failureBlocks.push(currentFailure);
|
|
25
|
-
currentFailure = [];
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
if (inFailureSection) {
|
|
29
|
-
if (trimmed.startsWith('___')) {
|
|
30
|
-
if (currentFailure.length > 0) {
|
|
31
|
-
failureBlocks.push(currentFailure);
|
|
32
|
-
currentFailure = [];
|
|
33
|
-
}
|
|
34
|
-
currentFailure.push(trimmed);
|
|
35
|
-
}
|
|
36
|
-
else if (trimmed.length > 0) {
|
|
37
|
-
currentFailure.push(line);
|
|
38
|
-
}
|
|
39
|
-
continue;
|
|
40
|
-
}
|
|
41
|
-
if (trimmed.startsWith('===') && trimmed.includes(' in ')) {
|
|
42
|
-
const matchPassed = trimmed.match(/(\d+)\s+passed/);
|
|
43
|
-
const matchFailed = trimmed.match(/(\d+)\s+failed/);
|
|
44
|
-
const matchSkipped = trimmed.match(/(\d+)\s+skipped/);
|
|
45
|
-
const matchXfailed = trimmed.match(/(\d+)\s+xfailed/);
|
|
46
|
-
const matchXpassed = trimmed.match(/(\d+)\s+xpassed/);
|
|
47
|
-
if (matchPassed)
|
|
48
|
-
passed = parseInt(matchPassed[1]);
|
|
49
|
-
if (matchFailed)
|
|
50
|
-
failed = parseInt(matchFailed[1]);
|
|
51
|
-
if (matchSkipped)
|
|
52
|
-
skipped = parseInt(matchSkipped[1]);
|
|
53
|
-
if (matchXfailed)
|
|
54
|
-
xfailed = parseInt(matchXfailed[1]);
|
|
55
|
-
if (matchXpassed)
|
|
56
|
-
xpassed = parseInt(matchXpassed[1]);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
if (currentFailure.length > 0) {
|
|
60
|
-
failureBlocks.push(currentFailure);
|
|
61
|
-
}
|
|
62
|
-
if (passed === 0 && failed === 0 && skipped === 0 && xfailed === 0 && xpassed === 0) {
|
|
63
|
-
if (stdout.includes('passed') && !stdout.includes('failed')) {
|
|
64
|
-
return "Pytest: All tests passed";
|
|
65
|
-
}
|
|
66
|
-
return stdout;
|
|
67
|
-
}
|
|
68
|
-
if (failed === 0 && passed > 0 && skipped === 0 && xfailed === 0 && xpassed === 0) {
|
|
69
|
-
return `Pytest: ${passed} passed`;
|
|
70
|
-
}
|
|
71
|
-
const summaryParts = [];
|
|
72
|
-
summaryParts.push(`Pytest: ${passed} passed`);
|
|
73
|
-
if (failed > 0)
|
|
74
|
-
summaryParts.push(`${failed} failed`);
|
|
75
|
-
if (skipped > 0)
|
|
76
|
-
summaryParts.push(`${skipped} skipped`);
|
|
77
|
-
if (xfailed > 0)
|
|
78
|
-
summaryParts.push(`${xfailed} xfailed`);
|
|
79
|
-
if (xpassed > 0)
|
|
80
|
-
summaryParts.push(`${xpassed} xpassed (warning!)`);
|
|
81
|
-
const result = [summaryParts.join(', ')];
|
|
82
|
-
if (failureBlocks.length > 0) {
|
|
83
|
-
result.push("\nFailures:");
|
|
84
|
-
const limit = 3;
|
|
85
|
-
const printedFailures = failureBlocks.slice(0, limit);
|
|
86
|
-
for (let i = 0; i < printedFailures.length; i++) {
|
|
87
|
-
const block = printedFailures[i];
|
|
88
|
-
const header = block[0].replace(/_/g, '').trim();
|
|
89
|
-
result.push(` ${i + 1}. [FAIL] ${header}`);
|
|
90
|
-
const body = block.slice(1);
|
|
91
|
-
const essentialLines = body.filter(line => {
|
|
92
|
-
const t = line.trim();
|
|
93
|
-
return t.startsWith('>') || t.startsWith('E ') || t.includes('.py:') || t.includes('AssertionError:');
|
|
94
|
-
});
|
|
95
|
-
for (const line of essentialLines.slice(0, 8)) {
|
|
96
|
-
result.push(` ${line}`);
|
|
97
|
-
}
|
|
98
|
-
if (essentialLines.length > 8) {
|
|
99
|
-
result.push(` ... (${essentialLines.length - 8} lines of stacktrace truncated)`);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
if (failureBlocks.length > limit) {
|
|
103
|
-
result.push(` ... +${failureBlocks.length - limit} more failures truncated`);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
return result.join('\n');
|
|
107
|
-
}
|
|
108
|
-
function filterPipInstall(stdout) {
|
|
109
|
-
const lines = stdout.split('\n');
|
|
110
|
-
const installed = [];
|
|
111
|
-
for (const line of lines) {
|
|
112
|
-
const trimmed = line.trim();
|
|
113
|
-
if (trimmed.startsWith('Successfully installed')) {
|
|
114
|
-
installed.push(trimmed);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
if (installed.length > 0) {
|
|
118
|
-
return installed.join('\n');
|
|
119
|
-
}
|
|
120
|
-
return lines
|
|
121
|
-
.filter(line => {
|
|
122
|
-
const t = line.trim();
|
|
123
|
-
return !t.startsWith('Collecting') &&
|
|
124
|
-
!t.startsWith('Downloading') &&
|
|
125
|
-
!t.includes('Using cached') &&
|
|
126
|
-
!t.startsWith('Requirement already satisfied');
|
|
127
|
-
})
|
|
128
|
-
.join('\n')
|
|
129
|
-
.trim();
|
|
130
|
-
}
|
|
1
|
+
'use strict';const a0_0x1af777=a0_0x5125;function a0_0x5125(_0x39a859,_0x483bca){const _0x453b67=a0_0x453b();return a0_0x5125=function(_0x5125cd,_0x4d015f){_0x5125cd=_0x5125cd-0x17d;let _0x1beb13=_0x453b67[_0x5125cd];return _0x1beb13;},a0_0x5125(_0x39a859,_0x483bca);}(function(_0xac70f7,_0x32a483){const _0x551cac=a0_0x5125,_0xb3ee82=_0xac70f7();while(!![]){try{const _0x5d4fab=-parseInt(_0x551cac(0x185))/0x1+-parseInt(_0x551cac(0x1a7))/0x2+parseInt(_0x551cac(0x17e))/0x3*(-parseInt(_0x551cac(0x191))/0x4)+-parseInt(_0x551cac(0x1a2))/0x5+-parseInt(_0x551cac(0x17d))/0x6*(-parseInt(_0x551cac(0x19c))/0x7)+-parseInt(_0x551cac(0x193))/0x8*(-parseInt(_0x551cac(0x190))/0x9)+parseInt(_0x551cac(0x1a5))/0xa;if(_0x5d4fab===_0x32a483)break;else _0xb3ee82['push'](_0xb3ee82['shift']());}catch(_0x4562a1){_0xb3ee82['push'](_0xb3ee82['shift']());}}}(a0_0x453b,0x8e7af));function a0_0x453b(){const _0x44c5bf=['includes','split','===\x20short\x20test\x20summary\x20info\x20===','478494fXsFxT','===\x20FAILURES\x20===','filterPipInstall','trim','\x20failed','filter','Requirement\x20already\x20satisfied','\x20xpassed\x20(warning!)','Pytest:\x20','___','startsWith','261lwKruh','144412oHHFvj','AssertionError:','300952AULEgC','filterPytest','slice','E\x20\x20\x20','\x20\x20\x20\x20...\x20(','\x0aFailures:','\x20\x20...\x20+','.\x20[FAIL]\x20','\x20\x20\x20\x20','331051cjdLVa','length','Downloading','push','Pytest:\x20All\x20tests\x20passed','===\x20ERRORS\x20===','3775015hWrzHn','\x20in\x20','\x20xfailed','8524220oLAcFc','===','603452vTwzqD','Using\x20cached','36lmzIWk','9SCJurp','replace','join','match'];a0_0x453b=function(){return _0x44c5bf;};return a0_0x453b();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a0_0x1af777(0x194)]=filterPytest,exports[a0_0x1af777(0x187)]=filterPipInstall;function filterPytest(_0x591322){const _0x4e3b40=a0_0x1af777,_0x3a4bf6=_0x591322['split']('\x0a');let _0x4c1705=0x0,_0x19310f=0x0,_0x36ce3a=0x0,_0x183a9b=0x0,_0x2e94ac=0x0;const _0x12d82e=[];let _0x109d68=[],_0x2d2a7d=![];for(const _0x263de2 of _0x3a4bf6){const _0x51fe56=_0x263de2[_0x4e3b40(0x188)]();if(_0x51fe56[_0x4e3b40(0x18f)](_0x4e3b40(0x186))||_0x51fe56[_0x4e3b40(0x18f)](_0x4e3b40(0x1a1))){_0x2d2a7d=!![];continue;}else(_0x51fe56[_0x4e3b40(0x18f)](_0x4e3b40(0x184))||_0x51fe56[_0x4e3b40(0x18f)](_0x4e3b40(0x1a6))&&_0x51fe56[_0x4e3b40(0x182)]('passed'))&&(_0x2d2a7d=![],_0x109d68[_0x4e3b40(0x19d)]>0x0&&(_0x12d82e[_0x4e3b40(0x19f)](_0x109d68),_0x109d68=[]));if(_0x2d2a7d){if(_0x51fe56[_0x4e3b40(0x18f)](_0x4e3b40(0x18e)))_0x109d68[_0x4e3b40(0x19d)]>0x0&&(_0x12d82e['push'](_0x109d68),_0x109d68=[]),_0x109d68[_0x4e3b40(0x19f)](_0x51fe56);else _0x51fe56['length']>0x0&&_0x109d68[_0x4e3b40(0x19f)](_0x263de2);continue;}if(_0x51fe56[_0x4e3b40(0x18f)]('===')&&_0x51fe56[_0x4e3b40(0x182)](_0x4e3b40(0x1a3))){const _0x521d23=_0x51fe56['match'](/(\d+)\s+passed/),_0x3c9910=_0x51fe56[_0x4e3b40(0x181)](/(\d+)\s+failed/),_0x32c346=_0x51fe56[_0x4e3b40(0x181)](/(\d+)\s+skipped/),_0x4b8565=_0x51fe56[_0x4e3b40(0x181)](/(\d+)\s+xfailed/),_0xcf9a7c=_0x51fe56[_0x4e3b40(0x181)](/(\d+)\s+xpassed/);if(_0x521d23)_0x4c1705=parseInt(_0x521d23[0x1]);if(_0x3c9910)_0x19310f=parseInt(_0x3c9910[0x1]);if(_0x32c346)_0x36ce3a=parseInt(_0x32c346[0x1]);if(_0x4b8565)_0x183a9b=parseInt(_0x4b8565[0x1]);if(_0xcf9a7c)_0x2e94ac=parseInt(_0xcf9a7c[0x1]);}}_0x109d68[_0x4e3b40(0x19d)]>0x0&&_0x12d82e[_0x4e3b40(0x19f)](_0x109d68);if(_0x4c1705===0x0&&_0x19310f===0x0&&_0x36ce3a===0x0&&_0x183a9b===0x0&&_0x2e94ac===0x0){if(_0x591322[_0x4e3b40(0x182)]('passed')&&!_0x591322[_0x4e3b40(0x182)]('failed'))return _0x4e3b40(0x1a0);return _0x591322;}if(_0x19310f===0x0&&_0x4c1705>0x0&&_0x36ce3a===0x0&&_0x183a9b===0x0&&_0x2e94ac===0x0)return _0x4e3b40(0x18d)+_0x4c1705+'\x20passed';const _0x5a5e79=[];_0x5a5e79[_0x4e3b40(0x19f)]('Pytest:\x20'+_0x4c1705+'\x20passed');if(_0x19310f>0x0)_0x5a5e79[_0x4e3b40(0x19f)](_0x19310f+_0x4e3b40(0x189));if(_0x36ce3a>0x0)_0x5a5e79['push'](_0x36ce3a+'\x20skipped');if(_0x183a9b>0x0)_0x5a5e79[_0x4e3b40(0x19f)](_0x183a9b+_0x4e3b40(0x1a4));if(_0x2e94ac>0x0)_0x5a5e79[_0x4e3b40(0x19f)](_0x2e94ac+_0x4e3b40(0x18c));const _0x605f4b=[_0x5a5e79[_0x4e3b40(0x180)](',\x20')];if(_0x12d82e[_0x4e3b40(0x19d)]>0x0){_0x605f4b[_0x4e3b40(0x19f)](_0x4e3b40(0x198));const _0xe22dff=0x3,_0x3a3490=_0x12d82e[_0x4e3b40(0x195)](0x0,_0xe22dff);for(let _0x28b104=0x0;_0x28b104<_0x3a3490['length'];_0x28b104++){const _0x586a25=_0x3a3490[_0x28b104],_0x1970c6=_0x586a25[0x0][_0x4e3b40(0x17f)](/_/g,'')[_0x4e3b40(0x188)]();_0x605f4b[_0x4e3b40(0x19f)]('\x20\x20'+(_0x28b104+0x1)+_0x4e3b40(0x19a)+_0x1970c6);const _0x36d16a=_0x586a25['slice'](0x1),_0x1fc585=_0x36d16a['filter'](_0x248e22=>{const _0x25f170=_0x4e3b40,_0x3b4626=_0x248e22['trim']();return _0x3b4626['startsWith']('>')||_0x3b4626[_0x25f170(0x18f)](_0x25f170(0x196))||_0x3b4626['includes']('.py:')||_0x3b4626[_0x25f170(0x182)](_0x25f170(0x192));});for(const _0x3ee91e of _0x1fc585[_0x4e3b40(0x195)](0x0,0x8)){_0x605f4b[_0x4e3b40(0x19f)](_0x4e3b40(0x19b)+_0x3ee91e);}_0x1fc585[_0x4e3b40(0x19d)]>0x8&&_0x605f4b[_0x4e3b40(0x19f)](_0x4e3b40(0x197)+(_0x1fc585[_0x4e3b40(0x19d)]-0x8)+'\x20lines\x20of\x20stacktrace\x20truncated)');}_0x12d82e[_0x4e3b40(0x19d)]>_0xe22dff&&_0x605f4b[_0x4e3b40(0x19f)](_0x4e3b40(0x199)+(_0x12d82e[_0x4e3b40(0x19d)]-_0xe22dff)+'\x20more\x20failures\x20truncated');}return _0x605f4b[_0x4e3b40(0x180)]('\x0a');}function filterPipInstall(_0x20f069){const _0xde05a1=a0_0x1af777,_0x9d17ce=_0x20f069[_0xde05a1(0x183)]('\x0a'),_0x263df7=[];for(const _0x4b2905 of _0x9d17ce){const _0x166edc=_0x4b2905[_0xde05a1(0x188)]();_0x166edc[_0xde05a1(0x18f)]('Successfully\x20installed')&&_0x263df7[_0xde05a1(0x19f)](_0x166edc);}if(_0x263df7[_0xde05a1(0x19d)]>0x0)return _0x263df7[_0xde05a1(0x180)]('\x0a');return _0x9d17ce[_0xde05a1(0x18a)](_0x4cc41a=>{const _0x2ba17e=_0xde05a1,_0x46e045=_0x4cc41a['trim']();return!_0x46e045[_0x2ba17e(0x18f)]('Collecting')&&!_0x46e045[_0x2ba17e(0x18f)](_0x2ba17e(0x19e))&&!_0x46e045[_0x2ba17e(0x182)](_0x2ba17e(0x1a8))&&!_0x46e045[_0x2ba17e(0x18f)](_0x2ba17e(0x18b));})[_0xde05a1(0x180)]('\x0a')[_0xde05a1(0x188)]();}
|
package/filters/rust.js
CHANGED
|
@@ -1,115 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.filterCargoTest = filterCargoTest;
|
|
4
|
-
exports.filterCargoBuild = filterCargoBuild;
|
|
5
|
-
function filterCargoTest(stdout) {
|
|
6
|
-
const lines = stdout.split('\n');
|
|
7
|
-
let passed = 0;
|
|
8
|
-
let failed = 0;
|
|
9
|
-
let ignored = 0;
|
|
10
|
-
let measured = 0;
|
|
11
|
-
const failedTests = [];
|
|
12
|
-
let inFailures = false;
|
|
13
|
-
let currentFailure = [];
|
|
14
|
-
for (const line of lines) {
|
|
15
|
-
const trimmed = line.trim();
|
|
16
|
-
const resultMatch = trimmed.match(/test result:\s*(\w+)\.\s*(\d+)\s+passed;\s*(\d+)\s+failed;\s*(\d+)\s+ignored;\s*(\d+)\s+measured/);
|
|
17
|
-
if (resultMatch) {
|
|
18
|
-
passed += parseInt(resultMatch[2]);
|
|
19
|
-
failed += parseInt(resultMatch[3]);
|
|
20
|
-
ignored += parseInt(resultMatch[4]);
|
|
21
|
-
measured += parseInt(resultMatch[5]);
|
|
22
|
-
continue;
|
|
23
|
-
}
|
|
24
|
-
if (trimmed === 'failures:' || trimmed === '---- failures ----') {
|
|
25
|
-
inFailures = true;
|
|
26
|
-
continue;
|
|
27
|
-
}
|
|
28
|
-
if (inFailures) {
|
|
29
|
-
if (trimmed.startsWith('---- ') && trimmed.endsWith(' ----')) {
|
|
30
|
-
if (currentFailure.length > 0)
|
|
31
|
-
failedTests.push(currentFailure.join('\n'));
|
|
32
|
-
currentFailure = [trimmed.replace(/^-+\s*/, '').replace(/\s*-+$/, '')];
|
|
33
|
-
}
|
|
34
|
-
else if (trimmed === 'failures:' || trimmed.startsWith('test result:')) {
|
|
35
|
-
if (currentFailure.length > 0)
|
|
36
|
-
failedTests.push(currentFailure.join('\n'));
|
|
37
|
-
currentFailure = [];
|
|
38
|
-
inFailures = false;
|
|
39
|
-
}
|
|
40
|
-
else if (trimmed.length > 0) {
|
|
41
|
-
currentFailure.push(line);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
if (currentFailure.length > 0)
|
|
46
|
-
failedTests.push(currentFailure.join('\n'));
|
|
47
|
-
if (passed === 0 && failed === 0 && ignored === 0) {
|
|
48
|
-
if (stdout.includes('test result: ok'))
|
|
49
|
-
return "Cargo test: all tests passed";
|
|
50
|
-
return stdout;
|
|
51
|
-
}
|
|
52
|
-
if (failed === 0) {
|
|
53
|
-
const parts = [`Cargo test: ${passed} passed`];
|
|
54
|
-
if (ignored > 0)
|
|
55
|
-
parts.push(`${ignored} ignored`);
|
|
56
|
-
return parts.join(', ');
|
|
57
|
-
}
|
|
58
|
-
const result = [`Cargo test: ${passed} passed, ${failed} failed, ${ignored} ignored`];
|
|
59
|
-
if (failedTests.length > 0) {
|
|
60
|
-
result.push("\nFailures:");
|
|
61
|
-
const limit = 3;
|
|
62
|
-
for (let i = 0; i < Math.min(failedTests.length, limit); i++) {
|
|
63
|
-
const failLines = failedTests[i].split('\n');
|
|
64
|
-
result.push(` ${i + 1}. ${failLines[0]}`);
|
|
65
|
-
const body = failLines.slice(1);
|
|
66
|
-
const essential = body.filter(l => l.trim().startsWith('thread') || l.includes('panicked') || l.includes('assert') || l.includes('left:') || l.includes('right:'));
|
|
67
|
-
for (const l of essential.slice(0, 5)) {
|
|
68
|
-
result.push(` ${l.trim()}`);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
if (failedTests.length > limit) {
|
|
72
|
-
result.push(` ... +${failedTests.length - limit} more failures`);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
return result.join('\n');
|
|
76
|
-
}
|
|
77
|
-
function filterCargoBuild(stdout) {
|
|
78
|
-
const lines = stdout.split('\n');
|
|
79
|
-
const warnings = [];
|
|
80
|
-
const errors = [];
|
|
81
|
-
let compiled = 0;
|
|
82
|
-
for (const line of lines) {
|
|
83
|
-
const trimmed = line.trim();
|
|
84
|
-
if (trimmed.startsWith('Compiling '))
|
|
85
|
-
compiled++;
|
|
86
|
-
else if (trimmed.startsWith('warning[') || trimmed.startsWith('warning:'))
|
|
87
|
-
warnings.push(trimmed);
|
|
88
|
-
else if (trimmed.startsWith('error[') || trimmed.startsWith('error:'))
|
|
89
|
-
errors.push(trimmed);
|
|
90
|
-
}
|
|
91
|
-
if (errors.length === 0 && warnings.length === 0) {
|
|
92
|
-
return compiled > 0 ? `Cargo: compiled ${compiled} crates successfully` : stdout.trim();
|
|
93
|
-
}
|
|
94
|
-
const result = [];
|
|
95
|
-
if (errors.length > 0) {
|
|
96
|
-
result.push(`Cargo: ${errors.length} errors, ${warnings.length} warnings`);
|
|
97
|
-
result.push("\nErrors:");
|
|
98
|
-
for (const e of errors.slice(0, 5))
|
|
99
|
-
result.push(` ${e}`);
|
|
100
|
-
if (errors.length > 5)
|
|
101
|
-
result.push(` ... +${errors.length - 5} more errors`);
|
|
102
|
-
}
|
|
103
|
-
else {
|
|
104
|
-
result.push(`Cargo: compiled ${compiled} crates, ${warnings.length} warnings`);
|
|
105
|
-
}
|
|
106
|
-
if (warnings.length > 0 && warnings.length <= 5) {
|
|
107
|
-
result.push("\nWarnings:");
|
|
108
|
-
for (const w of warnings)
|
|
109
|
-
result.push(` ${w}`);
|
|
110
|
-
}
|
|
111
|
-
else if (warnings.length > 5) {
|
|
112
|
-
result.push(`\n(${warnings.length} warnings — run cargo clippy for details)`);
|
|
113
|
-
}
|
|
114
|
-
return result.join('\n');
|
|
115
|
-
}
|
|
1
|
+
'use strict';const a0_0x47d0a4=a0_0x52da;(function(_0x4e3b2e,_0x5117){const _0x14ef89=a0_0x52da,_0x372fb6=_0x4e3b2e();while(!![]){try{const _0x51e727=-parseInt(_0x14ef89(0x156))/0x1*(parseInt(_0x14ef89(0x157))/0x2)+parseInt(_0x14ef89(0x180))/0x3*(-parseInt(_0x14ef89(0x182))/0x4)+parseInt(_0x14ef89(0x17b))/0x5+-parseInt(_0x14ef89(0x165))/0x6*(parseInt(_0x14ef89(0x184))/0x7)+parseInt(_0x14ef89(0x181))/0x8*(parseInt(_0x14ef89(0x168))/0x9)+parseInt(_0x14ef89(0x16d))/0xa+-parseInt(_0x14ef89(0x15a))/0xb;if(_0x51e727===_0x5117)break;else _0x372fb6['push'](_0x372fb6['shift']());}catch(_0x43710f){_0x372fb6['push'](_0x372fb6['shift']());}}}(a0_0x11d7,0xaf1f3));function a0_0x52da(_0x7f1193,_0x4a7f6c){const _0x11d705=a0_0x11d7();return a0_0x52da=function(_0x52da40,_0x3cac19){_0x52da40=_0x52da40-0x153;let _0x4cb7f4=_0x11d705[_0x52da40];return _0x4cb7f4;},a0_0x52da(_0x7f1193,_0x4a7f6c);}Object[a0_0x47d0a4(0x185)](exports,a0_0x47d0a4(0x164),{'value':!![]}),exports[a0_0x47d0a4(0x172)]=filterCargoTest,exports['filterCargoBuild']=filterCargoBuild;function filterCargoTest(_0x1b4c0e){const _0x2a9133=a0_0x47d0a4,_0x6f96c=_0x1b4c0e[_0x2a9133(0x16b)]('\x0a');let _0x3ad980=0x0,_0x50dd10=0x0,_0x38a709=0x0,_0x2fc653=0x0;const _0x3951c5=[];let _0x2674a8=![],_0x2c6ee8=[];for(const _0x1a8226 of _0x6f96c){const _0x26b096=_0x1a8226['trim'](),_0x1cb46d=_0x26b096[_0x2a9133(0x17d)](/test result:\s*(\w+)\.\s*(\d+)\s+passed;\s*(\d+)\s+failed;\s*(\d+)\s+ignored;\s*(\d+)\s+measured/);if(_0x1cb46d){_0x3ad980+=parseInt(_0x1cb46d[0x2]),_0x50dd10+=parseInt(_0x1cb46d[0x3]),_0x38a709+=parseInt(_0x1cb46d[0x4]),_0x2fc653+=parseInt(_0x1cb46d[0x5]);continue;}if(_0x26b096==='failures:'||_0x26b096===_0x2a9133(0x160)){_0x2674a8=!![];continue;}if(_0x2674a8){if(_0x26b096['startsWith']('----\x20')&&_0x26b096[_0x2a9133(0x17e)](_0x2a9133(0x177))){if(_0x2c6ee8['length']>0x0)_0x3951c5[_0x2a9133(0x179)](_0x2c6ee8[_0x2a9133(0x187)]('\x0a'));_0x2c6ee8=[_0x26b096[_0x2a9133(0x158)](/^-+\s*/,'')[_0x2a9133(0x158)](/\s*-+$/,'')];}else{if(_0x26b096===_0x2a9133(0x178)||_0x26b096[_0x2a9133(0x183)]('test\x20result:')){if(_0x2c6ee8[_0x2a9133(0x163)]>0x0)_0x3951c5[_0x2a9133(0x179)](_0x2c6ee8[_0x2a9133(0x187)]('\x0a'));_0x2c6ee8=[],_0x2674a8=![];}else _0x26b096[_0x2a9133(0x163)]>0x0&&_0x2c6ee8['push'](_0x1a8226);}}}if(_0x2c6ee8[_0x2a9133(0x163)]>0x0)_0x3951c5[_0x2a9133(0x179)](_0x2c6ee8[_0x2a9133(0x187)]('\x0a'));if(_0x3ad980===0x0&&_0x50dd10===0x0&&_0x38a709===0x0){if(_0x1b4c0e[_0x2a9133(0x161)](_0x2a9133(0x16e)))return _0x2a9133(0x188);return _0x1b4c0e;}if(_0x50dd10===0x0){const _0x1cb996=[_0x2a9133(0x16a)+_0x3ad980+'\x20passed'];if(_0x38a709>0x0)_0x1cb996[_0x2a9133(0x179)](_0x38a709+'\x20ignored');return _0x1cb996[_0x2a9133(0x187)](',\x20');}const _0x508b5c=[_0x2a9133(0x16a)+_0x3ad980+_0x2a9133(0x16f)+_0x50dd10+_0x2a9133(0x154)+_0x38a709+_0x2a9133(0x16c)];if(_0x3951c5[_0x2a9133(0x163)]>0x0){_0x508b5c[_0x2a9133(0x179)](_0x2a9133(0x155));const _0x1d2936=0x3;for(let _0x353e3a=0x0;_0x353e3a<Math[_0x2a9133(0x153)](_0x3951c5[_0x2a9133(0x163)],_0x1d2936);_0x353e3a++){const _0x23299f=_0x3951c5[_0x353e3a][_0x2a9133(0x16b)]('\x0a');_0x508b5c[_0x2a9133(0x179)]('\x20\x20'+(_0x353e3a+0x1)+'.\x20'+_0x23299f[0x0]);const _0x3e1260=_0x23299f[_0x2a9133(0x162)](0x1),_0x58596f=_0x3e1260[_0x2a9133(0x174)](_0x1943e2=>_0x1943e2[_0x2a9133(0x166)]()['startsWith'](_0x2a9133(0x17f))||_0x1943e2['includes']('panicked')||_0x1943e2[_0x2a9133(0x161)](_0x2a9133(0x175))||_0x1943e2[_0x2a9133(0x161)](_0x2a9133(0x15f))||_0x1943e2[_0x2a9133(0x161)](_0x2a9133(0x186)));for(const _0x5ef218 of _0x58596f[_0x2a9133(0x162)](0x0,0x5)){_0x508b5c[_0x2a9133(0x179)](_0x2a9133(0x171)+_0x5ef218[_0x2a9133(0x166)]());}}_0x3951c5[_0x2a9133(0x163)]>_0x1d2936&&_0x508b5c[_0x2a9133(0x179)](_0x2a9133(0x176)+(_0x3951c5[_0x2a9133(0x163)]-_0x1d2936)+_0x2a9133(0x15b));}return _0x508b5c[_0x2a9133(0x187)]('\x0a');}function a0_0x11d7(){const _0x241e5f=['\x20warnings','\x20errors,\x20','\x20crates\x20successfully','left:','----\x20failures\x20----','includes','slice','length','__esModule','6drsHSY','trim','warning[','28251fCGZUj','\x20more\x20errors','Cargo\x20test:\x20','split','\x20ignored','13893290bvxvUw','test\x20result:\x20ok','\x20passed,\x20','Compiling\x20','\x20\x20\x20\x20','filterCargoTest','error:','filter','assert','\x20\x20...\x20+','\x20----','failures:','push','error[','3733845OZthNM','\x20warnings\x20—\x20run\x20cargo\x20clippy\x20for\x20details)','match','endsWith','thread','598722SQixOo','64mxjauy','16MPwdyQ','startsWith','909958awNoVr','defineProperty','right:','join','Cargo\x20test:\x20all\x20tests\x20passed','min','\x20failed,\x20','\x0aFailures:','4FhEbcv','193706BxisdL','replace','Cargo:\x20compiled\x20','1410299LOnlKx','\x20more\x20failures'];a0_0x11d7=function(){return _0x241e5f;};return a0_0x11d7();}function filterCargoBuild(_0x424836){const _0x4d9541=a0_0x47d0a4,_0x53f690=_0x424836[_0x4d9541(0x16b)]('\x0a'),_0x835ca2=[],_0xd4a6ef=[];let _0x2f2539=0x0;for(const _0x1d5fc6 of _0x53f690){const _0x146bba=_0x1d5fc6[_0x4d9541(0x166)]();if(_0x146bba[_0x4d9541(0x183)](_0x4d9541(0x170)))_0x2f2539++;else{if(_0x146bba[_0x4d9541(0x183)](_0x4d9541(0x167))||_0x146bba[_0x4d9541(0x183)]('warning:'))_0x835ca2['push'](_0x146bba);else{if(_0x146bba[_0x4d9541(0x183)](_0x4d9541(0x17a))||_0x146bba[_0x4d9541(0x183)](_0x4d9541(0x173)))_0xd4a6ef[_0x4d9541(0x179)](_0x146bba);}}}if(_0xd4a6ef[_0x4d9541(0x163)]===0x0&&_0x835ca2[_0x4d9541(0x163)]===0x0)return _0x2f2539>0x0?_0x4d9541(0x159)+_0x2f2539+_0x4d9541(0x15e):_0x424836[_0x4d9541(0x166)]();const _0x5d1764=[];if(_0xd4a6ef[_0x4d9541(0x163)]>0x0){_0x5d1764[_0x4d9541(0x179)]('Cargo:\x20'+_0xd4a6ef[_0x4d9541(0x163)]+_0x4d9541(0x15d)+_0x835ca2[_0x4d9541(0x163)]+_0x4d9541(0x15c)),_0x5d1764[_0x4d9541(0x179)]('\x0aErrors:');for(const _0x469a9a of _0xd4a6ef[_0x4d9541(0x162)](0x0,0x5))_0x5d1764[_0x4d9541(0x179)]('\x20\x20'+_0x469a9a);if(_0xd4a6ef[_0x4d9541(0x163)]>0x5)_0x5d1764[_0x4d9541(0x179)]('\x20\x20...\x20+'+(_0xd4a6ef[_0x4d9541(0x163)]-0x5)+_0x4d9541(0x169));}else _0x5d1764[_0x4d9541(0x179)](_0x4d9541(0x159)+_0x2f2539+'\x20crates,\x20'+_0x835ca2[_0x4d9541(0x163)]+_0x4d9541(0x15c));if(_0x835ca2['length']>0x0&&_0x835ca2[_0x4d9541(0x163)]<=0x5){_0x5d1764[_0x4d9541(0x179)]('\x0aWarnings:');for(const _0x1e57be of _0x835ca2)_0x5d1764[_0x4d9541(0x179)]('\x20\x20'+_0x1e57be);}else _0x835ca2[_0x4d9541(0x163)]>0x5&&_0x5d1764[_0x4d9541(0x179)]('\x0a('+_0x835ca2[_0x4d9541(0x163)]+_0x4d9541(0x17c));return _0x5d1764[_0x4d9541(0x187)]('\x0a');}
|