trimprompt 1.0.20 → 1.0.21
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/cache.js +1 -1
- package/cli.js +1 -1
- package/dashboard.js +1 -1
- package/executor.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 -1
- package/filters/index.js +1 -1
- package/filters/js.js +1 -1
- package/filters/python.js +1 -1
- package/filters/rust.js +1 -1
- package/filters/shell.js +1 -1
- package/mcp.js +1 -1
- package/package.json +18 -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/cache.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x11459e=a0_0x5e59;(function(_0xbb6a1a,_0xec6028){const _0x32f460=a0_0x5e59,_0x417eb3=_0xbb6a1a();while(!![]){try{const _0x5d9bf5=-parseInt(_0x32f460(0x16f))/0x1+parseInt(_0x32f460(0x135))/0x2*(parseInt(_0x32f460(0x131))/0x3)+parseInt(_0x32f460(0x159))/0x4*(parseInt(_0x32f460(0x155))/0x5)+parseInt(_0x32f460(0x142))/0x6*(-parseInt(_0x32f460(0x139))/0x7)+-parseInt(_0x32f460(0x133))/0x8*(parseInt(_0x32f460(0x127))/0x9)+-parseInt(_0x32f460(0x14e))/0xa+parseInt(_0x32f460(0x163))/0xb;if(_0x5d9bf5===_0xec6028)break;else _0x417eb3['push'](_0x417eb3['shift']());}catch(_0x564f47){_0x417eb3['push'](_0x417eb3['shift']());}}}(a0_0x510e,0x80a4a));function a0_0x5e59(_0x2fd6f5,_0x8842d4){_0x2fd6f5=_0x2fd6f5-0x127;const _0x510e02=a0_0x510e();let _0x5e596e=_0x510e02[_0x2fd6f5];return _0x5e596e;}var __createBinding=this&&this[a0_0x11459e(0x16a)]||(Object[a0_0x11459e(0x14c)]?function(_0x24266c,_0x53c297,_0x3742ba,_0x3d7fc5){const _0x2cd129=a0_0x11459e;if(_0x3d7fc5===undefined)_0x3d7fc5=_0x3742ba;var _0x3d85c6=Object['getOwnPropertyDescriptor'](_0x53c297,_0x3742ba);(!_0x3d85c6||(_0x2cd129(0x15b)in _0x3d85c6?!_0x53c297[_0x2cd129(0x145)]:_0x3d85c6[_0x2cd129(0x153)]||_0x3d85c6['configurable']))&&(_0x3d85c6={'enumerable':!![],'get':function(){return _0x53c297[_0x3742ba];}}),Object[_0x2cd129(0x158)](_0x24266c,_0x3d7fc5,_0x3d85c6);}:function(_0x73a577,_0x41c6ae,_0x372beb,_0x3f48b8){if(_0x3f48b8===undefined)_0x3f48b8=_0x372beb;_0x73a577[_0x3f48b8]=_0x41c6ae[_0x372beb];}),__setModuleDefault=this&&this[a0_0x11459e(0x15f)]||(Object[a0_0x11459e(0x14c)]?function(_0xb8d49,_0x4cef27){const _0x2b00f9=a0_0x11459e;Object[_0x2b00f9(0x158)](_0xb8d49,'default',{'enumerable':!![],'value':_0x4cef27});}:function(_0x42a155,_0x27f1d0){const _0x124ded=a0_0x11459e;_0x42a155[_0x124ded(0x15a)]=_0x27f1d0;}),__importStar=this&&this[a0_0x11459e(0x143)]||(function(){var _0x1adcaa=function(_0x309961){const _0x393fbe=a0_0x5e59;return _0x1adcaa=Object[_0x393fbe(0x14f)]||function(_0x23745b){const _0x36f36a=_0x393fbe;var _0x338407=[];for(var _0xbaee89 in _0x23745b)if(Object[_0x36f36a(0x149)][_0x36f36a(0x165)]['call'](_0x23745b,_0xbaee89))_0x338407[_0x338407[_0x36f36a(0x13f)]]=_0xbaee89;return _0x338407;},_0x1adcaa(_0x309961);};return function(_0x122d90){const _0xad78e7=a0_0x5e59;if(_0x122d90&&_0x122d90[_0xad78e7(0x145)])return _0x122d90;var _0xaa5b56={};if(_0x122d90!=null){for(var _0x2e66de=_0x1adcaa(_0x122d90),_0x3e2ae8=0x0;_0x3e2ae8<_0x2e66de[_0xad78e7(0x13f)];_0x3e2ae8++)if(_0x2e66de[_0x3e2ae8]!==_0xad78e7(0x15a))__createBinding(_0xaa5b56,_0x122d90,_0x2e66de[_0x3e2ae8]);}return __setModuleDefault(_0xaa5b56,_0x122d90),_0xaa5b56;};}());Object[a0_0x11459e(0x158)](exports,a0_0x11459e(0x145),{'value':!![]}),exports['dedup']=dedup;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x11459e(0x160))),os=__importStar(require('os')),crypto=__importStar(require(a0_0x11459e(0x138))),CACHE_DIR=path['join'](os['homedir'](),a0_0x11459e(0x15e)),CACHE_FILE=path[a0_0x11459e(0x157)](CACHE_DIR,'cache.json'),MAX_ENTRIES=0x12c,TTL_SECONDS={'file':0x78,'git-status':0x1e,'git-log':0x3c,'git-show':0xe10,'ls':0x3c,'tree':0x3c,'docker-ps':0x1e,'docker-images':0x3c,'kubectl':0x1e,'ruff':0x3c,'go-vet':0x3c};function classifyCommand(_0x173fc9){const _0x2e7d18=a0_0x11459e,_0x1e504a=_0x173fc9[_0x2e7d18(0x154)]()[_0x2e7d18(0x148)]();if(_0x1e504a[_0x2e7d18(0x162)](/^(cat|head|tail|read|bat)\s/))return'file';if(_0x1e504a[_0x2e7d18(0x15d)](_0x2e7d18(0x12c))||_0x1e504a['includes'](_0x2e7d18(0x130)))return _0x2e7d18(0x137);if(_0x1e504a[_0x2e7d18(0x15d)]('git\x20log')||_0x1e504a['includes'](_0x2e7d18(0x164)))return _0x2e7d18(0x140);if(_0x1e504a[_0x2e7d18(0x15d)]('git\x20show')||_0x1e504a['includes'](_0x2e7d18(0x128)))return _0x2e7d18(0x156);if(_0x1e504a['match'](/^(ls|dir)(\s|$)/)||_0x1e504a['includes'](_0x2e7d18(0x12b))||_0x1e504a['endsWith'](_0x2e7d18(0x136)))return'ls';if(_0x1e504a[_0x2e7d18(0x162)](/^tree(\s|$)/)||_0x1e504a['includes']('\x20tree\x20')||_0x1e504a[_0x2e7d18(0x168)](_0x2e7d18(0x12a)))return _0x2e7d18(0x150);if(_0x1e504a['match'](/docker\s+ps/))return'docker-ps';if(_0x1e504a[_0x2e7d18(0x162)](/docker\s+images/))return _0x2e7d18(0x14b);if(_0x1e504a[_0x2e7d18(0x15d)](_0x2e7d18(0x13c))||_0x1e504a[_0x2e7d18(0x15d)]('kubectl\x20describe'))return _0x2e7d18(0x16b);if(_0x1e504a[_0x2e7d18(0x15d)](_0x2e7d18(0x169))||_0x1e504a[_0x2e7d18(0x15d)](_0x2e7d18(0x171)))return _0x2e7d18(0x13b);if(_0x1e504a[_0x2e7d18(0x15d)]('go\x20vet'))return _0x2e7d18(0x144);return'';}function md5(_0xeee0f7){const _0x52fa9a=a0_0x11459e;return crypto[_0x52fa9a(0x13e)](_0x52fa9a(0x161))[_0x52fa9a(0x14a)](_0xeee0f7)[_0x52fa9a(0x13d)](_0x52fa9a(0x151));}function loadStore(){const _0x56c4ab=a0_0x11459e;try{if(fs[_0x56c4ab(0x16e)](CACHE_FILE))return JSON[_0x56c4ab(0x12d)](fs['readFileSync'](CACHE_FILE,'utf8'));}catch{}return{};}function saveStore(_0x7dd12e){const _0x2997bf=a0_0x11459e;try{if(!fs['existsSync'](CACHE_DIR))fs[_0x2997bf(0x13a)](CACHE_DIR,{'recursive':!![]});const _0x3c6b36=Object[_0x2997bf(0x146)](_0x7dd12e);if(_0x3c6b36[_0x2997bf(0x13f)]>MAX_ENTRIES){const _0x203f81=_0x3c6b36[_0x2997bf(0x14d)]((_0x1325eb,_0x5cbbab)=>_0x7dd12e[_0x1325eb][_0x2997bf(0x170)]-_0x7dd12e[_0x5cbbab]['timestamp']);for(const _0x214eed of _0x203f81[_0x2997bf(0x132)](0x0,_0x3c6b36[_0x2997bf(0x13f)]-MAX_ENTRIES)){delete _0x7dd12e[_0x214eed];}}fs[_0x2997bf(0x129)](CACHE_FILE,JSON[_0x2997bf(0x16d)](_0x7dd12e),'utf8');}catch{}}function buildSummary(_0x50a13a,_0x540861){const _0x3c032f=a0_0x11459e,_0xea3f21=_0x50a13a[_0x3c032f(0x12f)]('\x0a')['length'],_0x27d9bc=_0x50a13a['length'];if(_0x540861==='file')return _0xea3f21+_0x3c032f(0x147)+_0x27d9bc+_0x3c032f(0x134);if(_0x540861===_0x3c032f(0x137))return _0xea3f21+_0x3c032f(0x141);if(_0x540861===_0x3c032f(0x140))return _0xea3f21+_0x3c032f(0x152);if(_0x540861[_0x3c032f(0x15c)](_0x3c032f(0x16c)))return _0xea3f21+_0x3c032f(0x141);return _0xea3f21+'\x20lines,\x20'+_0x27d9bc+_0x3c032f(0x134);}function dedup(_0x3dd29f,_0x89e83a){const _0x3e891b=a0_0x11459e;try{const _0x37a11e=classifyCommand(_0x3dd29f);if(!_0x37a11e)return null;const _0x340fb5=TTL_SECONDS[_0x37a11e];if(!_0x340fb5)return null;const _0x121679=process['cwd'](),_0x4af356=md5(_0x121679+'::'+_0x3dd29f[_0x3e891b(0x154)]()),_0x3823f3=md5(_0x89e83a),_0x96b33e=Date['now'](),_0x24a624=loadStore(),_0x4a7c42=_0x24a624[_0x4af356];if(_0x4a7c42&&_0x4a7c42[_0x3e891b(0x167)]===_0x3823f3&&_0x96b33e-_0x4a7c42[_0x3e891b(0x170)]<_0x340fb5*0x3e8){const _0x9e79d7=Math['round']((_0x96b33e-_0x4a7c42[_0x3e891b(0x170)])/0x3e8);return _0x3e891b(0x166)+_0x9e79d7+'s\x20ago,\x20'+_0x4a7c42[_0x3e891b(0x12e)]+']';}_0x24a624[_0x4af356]={'hash':_0x3823f3,'summary':buildSummary(_0x89e83a,_0x37a11e),'timestamp':_0x96b33e,'chars':_0x89e83a[_0x3e891b(0x13f)]},saveStore(_0x24a624);}catch{}return null;}function a0_0x510e(){const _0x332d05=['12XoBCDl','__importStar','go-vet','__esModule','keys','\x20lines,\x20','toLowerCase','prototype','update','docker-images','create','sort','397750epzZPz','getOwnPropertyNames','tree','hex','\x20entries','writable','trim','9305fdLaVm','git-show','join','defineProperty','948MAOwST','default','get','startsWith','includes','.trimprompt','__setModuleDefault','path','md5','match','1787181XpCysz','yadm\x20log','hasOwnProperty','[cached\x20—\x20unchanged\x20since\x20','hash','endsWith','ruff\x20check','__createBinding','kubectl','docker','stringify','existsSync','218938NSvFeq','timestamp','ruff\x20','234LevvxQ','yadm\x20show','writeFileSync','\x20tree','\x20ls\x20','git\x20status','parse','summary','split','yadm\x20status','2726349jCrVQG','slice','17912WRabyl','\x20chars','2DmEOSS','\x20ls','git-status','crypto','2339617NPdRjC','mkdirSync','ruff','kubectl\x20get','digest','createHash','length','git-log','\x20lines'];a0_0x510e=function(){return _0x332d05;};return a0_0x510e();}
|
package/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
'use strict';const a0_0x362986=a0_0x39bb;function a0_0x39bb(_0x215e77,_0x4b04ca){_0x215e77=_0x215e77-0x91;const _0x7f5009=a0_0x7f50();let _0x39bb97=_0x7f5009[_0x215e77];return _0x39bb97;}(function(_0x259d16,_0x492299){const _0x1ffcd1=a0_0x39bb,_0x1a6226=_0x259d16();while(!![]){try{const _0x518bdc=parseInt(_0x1ffcd1(0xa3))/0x1+parseInt(_0x1ffcd1(0xc7))/0x2+parseInt(_0x1ffcd1(0x123))/0x3+parseInt(_0x1ffcd1(0xd1))/0x4+parseInt(_0x1ffcd1(0xc8))/0x5*(parseInt(_0x1ffcd1(0xdc))/0x6)+parseInt(_0x1ffcd1(0xab))/0x7*(-parseInt(_0x1ffcd1(0xd4))/0x8)+-parseInt(_0x1ffcd1(0xaf))/0x9;if(_0x518bdc===_0x492299)break;else _0x1a6226['push'](_0x1a6226['shift']());}catch(_0x4589bd){_0x1a6226['push'](_0x1a6226['shift']());}}}(a0_0x7f50,0x8262e));var __createBinding=this&&this['__createBinding']||(Object[a0_0x362986(0xe7)]?function(_0x5b2bdb,_0x5980c3,_0x55fad2,_0x5d54a5){const _0x17bd01=a0_0x362986;if(_0x5d54a5===undefined)_0x5d54a5=_0x55fad2;var _0x224038=Object['getOwnPropertyDescriptor'](_0x5980c3,_0x55fad2);(!_0x224038||(_0x17bd01(0xad)in _0x224038?!_0x5980c3[_0x17bd01(0x10b)]:_0x224038[_0x17bd01(0xa4)]||_0x224038[_0x17bd01(0xe0)]))&&(_0x224038={'enumerable':!![],'get':function(){return _0x5980c3[_0x55fad2];}}),Object[_0x17bd01(0x104)](_0x5b2bdb,_0x5d54a5,_0x224038);}:function(_0x227086,_0x141d5c,_0x2c4b71,_0x3a0c40){if(_0x3a0c40===undefined)_0x3a0c40=_0x2c4b71;_0x227086[_0x3a0c40]=_0x141d5c[_0x2c4b71];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a0_0x362986(0xe7)]?function(_0x19c645,_0x561718){const _0x182329=a0_0x362986;Object[_0x182329(0x104)](_0x19c645,_0x182329(0x99),{'enumerable':!![],'value':_0x561718});}:function(_0x58cba3,_0x4ee6b4){const _0x228cba=a0_0x362986;_0x58cba3[_0x228cba(0x99)]=_0x4ee6b4;}),__importStar=this&&this[a0_0x362986(0x92)]||(function(){var _0x29cd87=function(_0x313295){return _0x29cd87=Object['getOwnPropertyNames']||function(_0x481b67){const _0x5041d6=a0_0x39bb;var _0x30b13f=[];for(var _0x14b6d2 in _0x481b67)if(Object[_0x5041d6(0x11f)][_0x5041d6(0x112)][_0x5041d6(0x116)](_0x481b67,_0x14b6d2))_0x30b13f[_0x30b13f['length']]=_0x14b6d2;return _0x30b13f;},_0x29cd87(_0x313295);};return function(_0x3abb58){const _0x1ea5e1=a0_0x39bb;if(_0x3abb58&&_0x3abb58[_0x1ea5e1(0x10b)])return _0x3abb58;var _0x89a6ad={};if(_0x3abb58!=null){for(var _0x35273f=_0x29cd87(_0x3abb58),_0x3cb1a0=0x0;_0x3cb1a0<_0x35273f[_0x1ea5e1(0xef)];_0x3cb1a0++)if(_0x35273f[_0x3cb1a0]!==_0x1ea5e1(0x99))__createBinding(_0x89a6ad,_0x3abb58,_0x35273f[_0x3cb1a0]);}return __setModuleDefault(_0x89a6ad,_0x3abb58),_0x89a6ad;};}());function a0_0x7f50(){const _0x501fde=['./executor','description','server-mcp','status','Tokens\x20Saved:\x20\x20\x20\x20\x20\x20','version','platform','875128UggFSS','548305PXaflw','argv','-50','proxy','value\x20to\x20set','--format','option','trim','yarn','3284228TVIweG','--porcelain','\x0a=============================================','16ZwyGxJ','uninstall','--pretty','--no-merges','Error:\x20Value\x20required\x20for\x20set\x20action','some','mcp-server','model','54htXxBf','install','dedup','--merges','configurable','claude-3-5-sonnet','Command','\x20(before\x20Trim)','\x20USD','startsWith','redaction_enabled','create','Error:\x20Action\x20must\x20be\x20get\x20or\x20set','help','--branch','Command\x20line\x20to\x20evaluate','slice','./mcp','[TrimPrompt]\x20Autodetected\x20MCP\x20server\x20execution.\x20Activating\x20real-time\x20JSON-RPC\x20proxy...','length','true','\x20\x20\x20\x20\x20\x20\x20TRIMPROMPT.AI\x20SAVINGS\x20SUMMARY\x20\x20\x20\x20\x20\x20\x20\x20','tracker','rewriteCommand','write','--version','=============================================\x0a','server','args','Actual\x20Cost:\x20\x20\x20\x20\x20\x20\x20$','./tracker','argument','win32','Model\x20Context:\x20\x20\x20\x20\x20','executeCommand','./shims','resolve','get\x20or\x20set','shims','exitCode','defineProperty','raw_cost_usd','Start\x20the\x20local\x20developer\x20dashboard','parse','stdout','false','every','__esModule','message','-m,\x20--model\x20<string>','installShims','npx','Check\x20a\x20command\x20line\x20and\x20return\x20the\x20optimized\x20command\x20line','Select\x20pricing\x20model\x20(e.g.\x20claude-3-5-sonnet,\x20gpt-4o)','hasOwnProperty','compressOutput','bun','savings_percentage','call','mcp-proxy','command','<action>','config','rewrite','yadm','-bs','-10','prototype','startDashboard','[server-args...]','then','1155948BvVIrZ','@modelcontextprotocol/','\x20=\x20','log','-p,\x20--port\x20<number>','./filters','npm','getConfig','__importStar','dashboard','Manage\x20local\x20configuration\x20parameters','lastRedactAudit','total_tokens_saved','model_name','push','default','stats','toLocaleString','[TrimPrompt]\x20Fatal\x20Proxy\x20Error:\x20','Arguments\x20for\x20the\x20target\x20MCP\x20server','Raw\x20Tokens:\x20\x20\x20\x20\x20\x20\x20\x20','node','Money\x20Saved:\x20\x20\x20\x20\x20\x20\x20$','mcp','action','1027730lQSlFS','writable','catch','Command\x20to\x20launch\x20the\x20target\x20MCP\x20server','Error:\x20Action\x20must\x20be\x20install\x20or\x20uninstall','config\x20parameter\x20name','Estimated\x20Cost:\x20\x20\x20\x20$','git','1451947wlodms','name','get','toLowerCase','24387408gLuTEv','TrimPrompt.ai\x20-\x20Reduce\x20LLM\x20token\x20consumption\x20by\x2060-90%','Proxy\x20wrapper\x20for\x20Model\x20Context\x20Protocol\x20(MCP)\x20servers\x20to\x20compact\x20tool\x20outputs','includes','toFixed','--pretty=format:%h\x20%s\x20(%ar)\x20(%an)%n%b%n---END---','1.0.0','pnpm','alias','modelcontextprotocol','stderr','Reduction\x20Rate:\x20\x20\x20\x20','compressed_cost_usd','Config\x20set\x20','error','exit','--help'];a0_0x7f50=function(){return _0x501fde;};return a0_0x7f50();}Object[a0_0x362986(0x104)](exports,a0_0x362986(0x10b),{'value':!![]});const commander_1=require('commander'),executor_1=require(a0_0x362986(0xc0)),filters_1=require(a0_0x362986(0x128)),tracker_1=require(a0_0x362986(0xfa)),cache_1=require('./cache'),shims_1=require(a0_0x362986(0xff)),dashboard_1=require('./dashboard'),program=new commander_1[(a0_0x362986(0xe2))]();function isDisabled(){return process.env.TRIMPROMPT_DISABLED==='1';}function adjustCommandArgs(_0x55c115,_0x2a5338){const _0x5c52f7=a0_0x362986,_0x1ab6fe=_0x55c115[_0x5c52f7(0xae)]();if(_0x1ab6fe===_0x5c52f7(0xaa)||_0x1ab6fe===_0x5c52f7(0x11c)){const _0x2cf044=_0x2a5338[0x0];if(_0x2cf044===_0x5c52f7(0xc3)){const _0x3a5162=_0x2a5338[_0x5c52f7(0xec)](0x1),_0xdd7850=_0x3a5162['length']===0x0||_0x3a5162[_0x5c52f7(0x10a)](_0x53bc3c=>{const _0x39896c=_0x5c52f7;return _0x53bc3c==='-b'||_0x53bc3c===_0x39896c(0xea)||_0x53bc3c==='-sb'||_0x53bc3c===_0x39896c(0x11d)||_0x53bc3c==='-s'||_0x53bc3c==='--short';});if(_0xdd7850)return{'cmd':_0x55c115,'args':[_0x5c52f7(0xc3),_0x5c52f7(0xd2),'-b']};}else{if(_0x2cf044===_0x5c52f7(0x126)){const _0x4765ce=_0x2a5338[_0x5c52f7(0xec)](0x1),_0x18ae96=_0x4765ce[_0x5c52f7(0xd9)](_0x3207a3=>_0x3207a3[_0x5c52f7(0xe5)]('--oneline')||_0x3207a3['startsWith'](_0x5c52f7(0xd6))||_0x3207a3[_0x5c52f7(0xe5)](_0x5c52f7(0xcd))),_0x555fcc=_0x4765ce[_0x5c52f7(0xd9)](_0x379b00=>_0x379b00[_0x5c52f7(0xe5)]('-')&&/^\d+$/['test'](_0x379b00[_0x5c52f7(0xec)](0x1))||_0x379b00==='-n'||_0x379b00[_0x5c52f7(0xe5)]('--max-count')),_0x1239d6=[..._0x2a5338];if(!_0x18ae96){const _0x2654b2=_0x5c52f7(0xb4);_0x1239d6[_0x5c52f7(0x98)](process[_0x5c52f7(0xc6)]===_0x5c52f7(0xfc)?'\x22'+_0x2654b2+'\x22':_0x2654b2);}!_0x555fcc&&(_0x18ae96?_0x1239d6[_0x5c52f7(0x98)](_0x5c52f7(0xca)):_0x1239d6[_0x5c52f7(0x98)](_0x5c52f7(0x11e)));const _0x56553a=_0x4765ce[_0x5c52f7(0xd9)](_0x3213b8=>_0x3213b8===_0x5c52f7(0xdf)||_0x3213b8===_0x5c52f7(0xd7)||_0x3213b8[_0x5c52f7(0xe5)]('--min-parents'));return!_0x56553a&&!_0x555fcc&&_0x1239d6[_0x5c52f7(0x98)](_0x5c52f7(0xd7)),{'cmd':_0x55c115,'args':_0x1239d6};}}}return{'cmd':_0x55c115,'args':_0x2a5338};}function isMcpServerExecution(_0x294ac9,_0x542dae){const _0x40d9f3=a0_0x362986,_0x335df9=_0x294ac9['toLowerCase'](),_0x581df3=_0x542dae['join']('\x20')['toLowerCase']();if(_0x335df9[_0x40d9f3(0xb2)]('mcp')&&(_0x335df9['includes'](_0x40d9f3(0xf7))||_0x335df9[_0x40d9f3(0xb2)](_0x40d9f3(0xcb))))return!![];if(_0x335df9===_0x40d9f3(0x10f)||_0x335df9===_0x40d9f3(0x9f)||_0x335df9===_0x40d9f3(0x114)||_0x335df9===_0x40d9f3(0x129)||_0x335df9===_0x40d9f3(0xb6)||_0x335df9===_0x40d9f3(0xd0)){if(_0x581df3[_0x40d9f3(0xb2)]('@modelcontextprotocol/')||_0x581df3[_0x40d9f3(0xb2)](_0x40d9f3(0xb8))||_0x581df3['includes'](_0x40d9f3(0xda))||_0x581df3['includes'](_0x40d9f3(0xc2)))return!![];}if(_0x542dae[_0x40d9f3(0xd9)](_0x44be32=>{const _0x384a09=_0x40d9f3,_0x29b07a=_0x44be32[_0x384a09(0xae)]();return _0x29b07a[_0x384a09(0xb2)](_0x384a09(0xda))||_0x29b07a[_0x384a09(0xb2)]('server-mcp')||_0x29b07a['includes'](_0x384a09(0x124))||_0x29b07a===_0x384a09(0x117)||_0x29b07a===_0x384a09(0xa1);}))return!![];return![];}async function runProxy(_0x2c8002){const _0x6c8588=a0_0x362986;if(_0x2c8002[_0x6c8588(0xef)]===0x0){program['help']();return;}const _0x142c07=_0x2c8002[0x0],_0x1038b8=_0x2c8002['slice'](0x1),_0xb38124=_0x2c8002['join']('\x20');if(isDisabled()){const _0x426f6d=await(0x0,executor_1[_0x6c8588(0xfe)])(_0x142c07,_0x1038b8);process[_0x6c8588(0x108)][_0x6c8588(0xf4)](_0x426f6d[_0x6c8588(0x108)]),process[_0x6c8588(0xb9)][_0x6c8588(0xf4)](_0x426f6d[_0x6c8588(0xb9)]),process[_0x6c8588(0xbe)](_0x426f6d['exitCode']);}if(isMcpServerExecution(_0x142c07,_0x1038b8)){console['error'](_0x6c8588(0xee));const {runMcpProxy:_0x772155}=await Promise[_0x6c8588(0x100)]()[_0x6c8588(0x122)](()=>__importStar(require(_0x6c8588(0xed))));_0x772155(_0x142c07,_0x1038b8);return;}const _0x1aa9a0=adjustCommandArgs(_0x142c07,_0x1038b8),_0x2f717d=await(0x0,executor_1['executeCommand'])(_0x1aa9a0['cmd'],_0x1aa9a0[_0x6c8588(0xf8)]),_0x70cbd5=(0x0,filters_1[_0x6c8588(0x113)])(_0xb38124,_0x2f717d[_0x6c8588(0x108)],_0x2f717d[_0x6c8588(0xb9)],tracker_1[_0x6c8588(0xf2)][_0x6c8588(0x91)]()[_0x6c8588(0xe6)]),_0x4fef6c={...filters_1[_0x6c8588(0x95)]},_0x329cb9=_0x2f717d[_0x6c8588(0x108)]+(_0x2f717d[_0x6c8588(0xb9)][_0x6c8588(0xcf)]()[_0x6c8588(0xef)]>0x0?'\x0a'+_0x2f717d[_0x6c8588(0xb9)]:''),_0x6e17e1=_0x70cbd5[_0x6c8588(0xef)]<_0x329cb9[_0x6c8588(0xef)]?_0x70cbd5:_0x329cb9,_0x50231c=_0x2f717d[_0x6c8588(0x103)]===0x0?(0x0,cache_1[_0x6c8588(0xde)])(_0xb38124,_0x6e17e1):null;tracker_1['tracker']['logExecution'](_0xb38124,_0x329cb9,_0x50231c||_0x6e17e1,_0x2f717d[_0x6c8588(0x103)],_0x4fef6c),_0x2f717d['exitCode']===0x0?process[_0x6c8588(0x108)][_0x6c8588(0xf4)](_0x6e17e1+'\x0a'):(process['stdout']['write'](_0x70cbd5+'\x0a'),_0x2f717d[_0x6c8588(0xb9)][_0x6c8588(0xcf)]()[_0x6c8588(0xef)]>0x0&&!_0x70cbd5[_0x6c8588(0xb2)](_0x2f717d[_0x6c8588(0xb9)][_0x6c8588(0xcf)]())&&process[_0x6c8588(0xb9)][_0x6c8588(0xf4)](_0x2f717d[_0x6c8588(0xb9)]+'\x0a')),process[_0x6c8588(0xbe)](_0x2f717d[_0x6c8588(0x103)]);}program[a0_0x362986(0xac)](a0_0x362986(0xcf))[a0_0x362986(0xc1)](a0_0x362986(0xb0))[a0_0x362986(0xc5)](a0_0x362986(0xb5)),program[a0_0x362986(0x118)]('ui')['alias'](a0_0x362986(0x93))[a0_0x362986(0xc1)](a0_0x362986(0x106))[a0_0x362986(0xce)](a0_0x362986(0x127),'Port\x20to\x20run\x20the\x20dashboard\x20on','4000')[a0_0x362986(0xa2)](_0x144fed=>{const _0x5f02be=a0_0x362986,_0x37d01b=parseInt(_0x144fed['port'],0xa);(0x0,dashboard_1[_0x5f02be(0x120)])(_0x37d01b);}),program['command']('stats')[a0_0x362986(0xc1)]('Show\x20token\x20and\x20cost\x20savings\x20summary')[a0_0x362986(0xce)](a0_0x362986(0x10d),a0_0x362986(0x111),a0_0x362986(0xe1))[a0_0x362986(0xa2)](_0x4b6e84=>{const _0x5bc7a1=a0_0x362986,_0xda5d3=tracker_1[_0x5bc7a1(0xf2)]['getStatsSummary'](_0x4b6e84[_0x5bc7a1(0xdb)]);console[_0x5bc7a1(0x126)](_0x5bc7a1(0xd3)),console[_0x5bc7a1(0x126)](_0x5bc7a1(0xf1)),console[_0x5bc7a1(0x126)]('============================================='),console[_0x5bc7a1(0x126)](_0x5bc7a1(0xfd)+_0xda5d3[_0x5bc7a1(0x97)]),console[_0x5bc7a1(0x126)](_0x5bc7a1(0x9e)+_0xda5d3['total_raw_tokens'][_0x5bc7a1(0x9b)]()),console[_0x5bc7a1(0x126)]('Compressed:\x20\x20\x20\x20\x20\x20\x20\x20'+_0xda5d3['total_compressed_tokens'][_0x5bc7a1(0x9b)]()),console[_0x5bc7a1(0x126)](_0x5bc7a1(0xc4)+_0xda5d3[_0x5bc7a1(0x96)][_0x5bc7a1(0x9b)]()),console[_0x5bc7a1(0x126)](_0x5bc7a1(0xba)+_0xda5d3[_0x5bc7a1(0x115)]+'%'),console[_0x5bc7a1(0x126)](_0x5bc7a1(0xa9)+_0xda5d3[_0x5bc7a1(0x105)]['toFixed'](0x4)+_0x5bc7a1(0xe3)),console[_0x5bc7a1(0x126)](_0x5bc7a1(0xf9)+_0xda5d3[_0x5bc7a1(0xbb)][_0x5bc7a1(0xb3)](0x4)+'\x20(after\x20Trim)'),console[_0x5bc7a1(0x126)]('---------------------------------------------'),console[_0x5bc7a1(0x126)](_0x5bc7a1(0xa0)+_0xda5d3['money_saved_usd']['toFixed'](0x4)+_0x5bc7a1(0xe4)),console[_0x5bc7a1(0x126)](_0x5bc7a1(0xf6));}),program[a0_0x362986(0x118)](a0_0x362986(0x11a))[a0_0x362986(0xc1)](a0_0x362986(0x94))['argument'](a0_0x362986(0x119),a0_0x362986(0x101))[a0_0x362986(0xfb)]('<key>',a0_0x362986(0xa8))[a0_0x362986(0xfb)]('[value]',a0_0x362986(0xcc))[a0_0x362986(0xa2)]((_0x489714,_0x587be6,_0x190274)=>{const _0x47c1ff=a0_0x362986;if(_0x489714==='get'){const _0x576413=tracker_1[_0x47c1ff(0xf2)][_0x47c1ff(0x91)]();console[_0x47c1ff(0x126)](_0x587be6+':\x20'+_0x576413[_0x587be6]);}else{if(_0x489714==='set'){_0x190274===undefined&&(console[_0x47c1ff(0xbd)](_0x47c1ff(0xd8)),process[_0x47c1ff(0xbe)](0x1));let _0x4e866d=_0x190274;if(_0x190274===_0x47c1ff(0xf0))_0x4e866d=!![];if(_0x190274===_0x47c1ff(0x109))_0x4e866d=![];if(/^\d+$/['test'](_0x190274))_0x4e866d=parseInt(_0x190274,0xa);tracker_1['tracker']['setConfig'](_0x587be6,_0x4e866d),console[_0x47c1ff(0x126)](_0x47c1ff(0xbc)+_0x587be6+_0x47c1ff(0x125)+_0x190274);}else console['error'](_0x47c1ff(0xe8)),process[_0x47c1ff(0xbe)](0x1);}}),program[a0_0x362986(0x118)](a0_0x362986(0x102))[a0_0x362986(0xc1)]('Install\x20or\x20uninstall\x20system\x20command\x20shims')[a0_0x362986(0xfb)](a0_0x362986(0x119),'install\x20or\x20uninstall')[a0_0x362986(0xa2)](_0x2a41e5=>{const _0xcc4555=a0_0x362986;if(_0x2a41e5===_0xcc4555(0xdd)){const _0x18d79f=(0x0,shims_1[_0xcc4555(0x10e)])();console['log'](_0x18d79f[_0xcc4555(0x10c)]);}else{if(_0x2a41e5===_0xcc4555(0xd5)){const _0x1a87eb=(0x0,shims_1['uninstallShims'])();console['log'](_0x1a87eb[_0xcc4555(0x10c)]);}else console['error'](_0xcc4555(0xa7)),process['exit'](0x1);}}),program[a0_0x362986(0x118)](a0_0x362986(0x11b))['description'](a0_0x362986(0x110))[a0_0x362986(0xfb)]('<commandLine>',a0_0x362986(0xeb))[a0_0x362986(0xa2)](_0x23d62a=>{const _0x2759d=a0_0x362986;if(isDisabled()){console[_0x2759d(0x126)](_0x23d62a);return;}const _0x1a2a70=(0x0,filters_1[_0x2759d(0xf3)])(_0x23d62a);console[_0x2759d(0x126)](_0x1a2a70);}),program[a0_0x362986(0x118)](a0_0x362986(0x117))[a0_0x362986(0xb7)]('mcp')['description'](a0_0x362986(0xb1))[a0_0x362986(0xfb)]('<server-command>',a0_0x362986(0xa6))[a0_0x362986(0xfb)](a0_0x362986(0x121),a0_0x362986(0x9d))[a0_0x362986(0xa2)](async(_0x1b7bc3,_0x2c7a80)=>{const _0x1fcfa9=a0_0x362986,{runMcpProxy:_0x5a2db7}=await Promise[_0x1fcfa9(0x100)]()[_0x1fcfa9(0x122)](()=>__importStar(require('./mcp')));_0x5a2db7(_0x1b7bc3,_0x2c7a80);});const args=process[a0_0x362986(0xc9)][a0_0x362986(0xec)](0x2),firstArg=args[0x0],subcommands=['ui','dashboard',a0_0x362986(0x9a),'config','shims',a0_0x362986(0x11b),'mcp-proxy',a0_0x362986(0xa1),a0_0x362986(0xe9),a0_0x362986(0xbf),'-h',a0_0x362986(0xc5),a0_0x362986(0xf5),'-v'];firstArg&&!subcommands['includes'](firstArg)?runProxy(args)[a0_0x362986(0xa5)](_0x30013d=>{const _0x1bf211=a0_0x362986;console[_0x1bf211(0xbd)](_0x1bf211(0x9c)+_0x30013d['message']),process['exit'](0x1);}):program[a0_0x362986(0x107)](process[a0_0x362986(0xc9)]);
|
|
2
|
+
'use strict';const a0_0x49df98=a0_0x5e96;(function(_0x20b1db,_0x2bc7c4){const _0x198d4d=a0_0x5e96,_0x5697a2=_0x20b1db();while(!![]){try{const _0x1aa72a=-parseInt(_0x198d4d(0xf8))/0x1+parseInt(_0x198d4d(0x116))/0x2*(-parseInt(_0x198d4d(0xef))/0x3)+parseInt(_0x198d4d(0x121))/0x4+parseInt(_0x198d4d(0xf0))/0x5+parseInt(_0x198d4d(0x165))/0x6+-parseInt(_0x198d4d(0x100))/0x7+parseInt(_0x198d4d(0x108))/0x8;if(_0x1aa72a===_0x2bc7c4)break;else _0x5697a2['push'](_0x5697a2['shift']());}catch(_0x263681){_0x5697a2['push'](_0x5697a2['shift']());}}}(a0_0x2010,0xd3c4e));function a0_0x2010(){const _0x4a1146=['prototype','Check\x20a\x20command\x20line\x20and\x20return\x20the\x20optimized\x20command\x20line','total_compressed_tokens','Port\x20to\x20run\x20the\x20dashboard\x20on','--no-merges','yadm','then','node','<action>','bun','6668970QgquwV','Tokens\x20Saved:\x20\x20\x20\x20\x20\x20','win32','./mcp','Error:\x20Action\x20must\x20be\x20install\x20or\x20uninstall','--min-parents','getOwnPropertyNames','Manage\x20local\x20configuration\x20parameters','toFixed','argument','Arguments\x20for\x20the\x20target\x20MCP\x20server','alias','-sb','startsWith','<key>','getOwnPropertyDescriptor','default','action','rewriteCommand','some','./filters','npm','join','platform','4000','uninstallShims','command','total_raw_tokens','push','__createBinding','commander','Reduction\x20Rate:\x20\x20\x20\x20','setConfig','option','exitCode','Compressed:\x20\x20\x20\x20\x20\x20\x20\x20','message','-bs','--max-count','3iXWNxP','4330815atflSt','lastRedactAudit','--porcelain','Actual\x20Cost:\x20\x20\x20\x20\x20\x20\x20$','config','Config\x20set\x20','[server-args...]','\x20(before\x20Trim)','998345BYxfoT','./dashboard','includes','false','Command','Estimated\x20Cost:\x20\x20\x20\x20$','mcp-proxy','trim','10300094wdNvuk','Raw\x20Tokens:\x20\x20\x20\x20\x20\x20\x20\x20','write','--pretty=format:%h\x20%s\x20(%ar)\x20(%an)%n%b%n---END---','stdout','TrimPrompt.ai\x20-\x20Reduce\x20LLM\x20token\x20consumption\x20by\x2060-90%','defineProperty','Show\x20token\x20and\x20cost\x20savings\x20summary','14330608PoaQrG','\x20=\x20','-50','claude-3-5-sonnet','exit','get\x20or\x20set','--help','get','compressed_cost_usd','\x20USD','config\x20parameter\x20name','rewrite','proxy','logExecution','3253216hRikes','version','hasOwnProperty','server','tracker','getConfig','model_name','toLocaleString','toLowerCase','uninstall','call','4779268tvUlMb','dedup','error','set','--pretty','[TrimPrompt]\x20Autodetected\x20MCP\x20server\x20execution.\x20Activating\x20real-time\x20JSON-RPC\x20proxy...','-p,\x20--port\x20<number>','Command\x20line\x20to\x20evaluate','Select\x20pricing\x20model\x20(e.g.\x20claude-3-5-sonnet,\x20gpt-4o)','./shims','help','writable','-m,\x20--model\x20<string>','stats','model','Model\x20Context:\x20\x20\x20\x20\x20','--oneline','./cache','stderr','slice','value\x20to\x20set','raw_cost_usd','compressOutput','yarn','--format','status','catch','<server-command>','money_saved_usd','Start\x20the\x20local\x20developer\x20dashboard','./executor','server-mcp','[value]','mcp','__setModuleDefault','length','@modelcontextprotocol/','shims','startDashboard','cmd','argv','port','log','dashboard','<commandLine>','true','parse','1.0.0','resolve','installShims','description','Command\x20to\x20launch\x20the\x20target\x20MCP\x20server','configurable','---------------------------------------------','__esModule','\x20(after\x20Trim)','getStatsSummary','create'];a0_0x2010=function(){return _0x4a1146;};return a0_0x2010();}var __createBinding=this&&this[a0_0x49df98(0xe5)]||(Object[a0_0x49df98(0x15a)]?function(_0x3565dc,_0x514299,_0x28968b,_0xdf0538){const _0xfdd5cc=a0_0x49df98;if(_0xdf0538===undefined)_0xdf0538=_0x28968b;var _0x4a5607=Object[_0xfdd5cc(0xd7)](_0x514299,_0x28968b);(!_0x4a5607||(_0xfdd5cc(0x10f)in _0x4a5607?!_0x514299[_0xfdd5cc(0x157)]:_0x4a5607[_0xfdd5cc(0x12c)]||_0x4a5607[_0xfdd5cc(0x155)]))&&(_0x4a5607={'enumerable':!![],'get':function(){return _0x514299[_0x28968b];}}),Object[_0xfdd5cc(0x106)](_0x3565dc,_0xdf0538,_0x4a5607);}:function(_0x475253,_0x34f24e,_0x4099bb,_0x1c1e6e){if(_0x1c1e6e===undefined)_0x1c1e6e=_0x4099bb;_0x475253[_0x1c1e6e]=_0x34f24e[_0x4099bb];}),__setModuleDefault=this&&this[a0_0x49df98(0x143)]||(Object[a0_0x49df98(0x15a)]?function(_0x371027,_0x507e8c){const _0x1aa105=a0_0x49df98;Object['defineProperty'](_0x371027,_0x1aa105(0xd8),{'enumerable':!![],'value':_0x507e8c});}:function(_0x54ab3b,_0x16986d){const _0xade27f=a0_0x49df98;_0x54ab3b[_0xade27f(0xd8)]=_0x16986d;}),__importStar=this&&this['__importStar']||(function(){var _0x538bdd=function(_0x14e6d4){const _0x42e8bd=a0_0x5e96;return _0x538bdd=Object[_0x42e8bd(0xce)]||function(_0x4217a3){const _0x585062=_0x42e8bd;var _0x34ab23=[];for(var _0x300c2b in _0x4217a3)if(Object[_0x585062(0x15b)][_0x585062(0x118)][_0x585062(0x120)](_0x4217a3,_0x300c2b))_0x34ab23[_0x34ab23[_0x585062(0x144)]]=_0x300c2b;return _0x34ab23;},_0x538bdd(_0x14e6d4);};return function(_0x246811){const _0x19b8f1=a0_0x5e96;if(_0x246811&&_0x246811[_0x19b8f1(0x157)])return _0x246811;var _0x2c3e9b={};if(_0x246811!=null){for(var _0x1bd1f4=_0x538bdd(_0x246811),_0x47282b=0x0;_0x47282b<_0x1bd1f4[_0x19b8f1(0x144)];_0x47282b++)if(_0x1bd1f4[_0x47282b]!==_0x19b8f1(0xd8))__createBinding(_0x2c3e9b,_0x246811,_0x1bd1f4[_0x47282b]);}return __setModuleDefault(_0x2c3e9b,_0x246811),_0x2c3e9b;};}());Object[a0_0x49df98(0x106)](exports,a0_0x49df98(0x157),{'value':!![]});const commander_1=require(a0_0x49df98(0xe6)),executor_1=require(a0_0x49df98(0x13f)),filters_1=require(a0_0x49df98(0xdc)),tracker_1=require('./tracker'),cache_1=require(a0_0x49df98(0x132)),shims_1=require(a0_0x49df98(0x12a)),dashboard_1=require(a0_0x49df98(0xf9)),program=new commander_1[(a0_0x49df98(0xfc))]();function isDisabled(){return process.env.TRIMPROMPT_DISABLED==='1';}function a0_0x5e96(_0x4dcce8,_0x2bb70f){_0x4dcce8=_0x4dcce8-0xce;const _0x201034=a0_0x2010();let _0x5e969d=_0x201034[_0x4dcce8];return _0x5e969d;}function adjustCommandArgs(_0x313526,_0x222771){const _0x1ea33c=a0_0x49df98,_0x250b31=_0x313526[_0x1ea33c(0x11e)]();if(_0x250b31==='git'||_0x250b31===_0x1ea33c(0x160)){const _0x4918fd=_0x222771[0x0];if(_0x4918fd===_0x1ea33c(0x13a)){const _0x266afa=_0x222771[_0x1ea33c(0x134)](0x1),_0x59fc68=_0x266afa[_0x1ea33c(0x144)]===0x0||_0x266afa['every'](_0x468787=>{const _0x114c59=_0x1ea33c;return _0x468787==='-b'||_0x468787==='--branch'||_0x468787===_0x114c59(0xd4)||_0x468787===_0x114c59(0xed)||_0x468787==='-s'||_0x468787==='--short';});if(_0x59fc68)return{'cmd':_0x313526,'args':['status',_0x1ea33c(0xf2),'-b']};}else{if(_0x4918fd==='log'){const _0x2d470d=_0x222771[_0x1ea33c(0x134)](0x1),_0x361557=_0x2d470d[_0x1ea33c(0xdb)](_0x3338a8=>_0x3338a8[_0x1ea33c(0xd5)](_0x1ea33c(0x131))||_0x3338a8[_0x1ea33c(0xd5)](_0x1ea33c(0x125))||_0x3338a8[_0x1ea33c(0xd5)](_0x1ea33c(0x139))),_0x5c211b=_0x2d470d[_0x1ea33c(0xdb)](_0x315174=>_0x315174[_0x1ea33c(0xd5)]('-')&&/^\d+$/['test'](_0x315174[_0x1ea33c(0x134)](0x1))||_0x315174==='-n'||_0x315174[_0x1ea33c(0xd5)](_0x1ea33c(0xee))),_0x245777=[..._0x222771];if(!_0x361557){const _0x1d1ee2=_0x1ea33c(0x103);_0x245777[_0x1ea33c(0xe4)](process[_0x1ea33c(0xdf)]===_0x1ea33c(0x167)?'\x22'+_0x1d1ee2+'\x22':_0x1d1ee2);}!_0x5c211b&&(_0x361557?_0x245777[_0x1ea33c(0xe4)](_0x1ea33c(0x10a)):_0x245777[_0x1ea33c(0xe4)]('-10'));const _0x2ec120=_0x2d470d[_0x1ea33c(0xdb)](_0x1ac37b=>_0x1ac37b==='--merges'||_0x1ac37b==='--no-merges'||_0x1ac37b[_0x1ea33c(0xd5)](_0x1ea33c(0x16a)));return!_0x2ec120&&!_0x5c211b&&_0x245777[_0x1ea33c(0xe4)](_0x1ea33c(0x15f)),{'cmd':_0x313526,'args':_0x245777};}}}return{'cmd':_0x313526,'args':_0x222771};}function isMcpServerExecution(_0x3b77e4,_0x39cfbf){const _0xbbadf5=a0_0x49df98,_0xa2e418=_0x3b77e4['toLowerCase'](),_0x4f6173=_0x39cfbf[_0xbbadf5(0xde)]('\x20')[_0xbbadf5(0x11e)]();if(_0xa2e418[_0xbbadf5(0xfa)](_0xbbadf5(0x142))&&(_0xa2e418[_0xbbadf5(0xfa)](_0xbbadf5(0x119))||_0xa2e418[_0xbbadf5(0xfa)](_0xbbadf5(0x114))))return!![];if(_0xa2e418==='npx'||_0xa2e418===_0xbbadf5(0x162)||_0xa2e418===_0xbbadf5(0x164)||_0xa2e418===_0xbbadf5(0xdd)||_0xa2e418==='pnpm'||_0xa2e418===_0xbbadf5(0x138)){if(_0x4f6173[_0xbbadf5(0xfa)](_0xbbadf5(0x145))||_0x4f6173[_0xbbadf5(0xfa)]('modelcontextprotocol')||_0x4f6173['includes']('mcp-server')||_0x4f6173['includes'](_0xbbadf5(0x140)))return!![];}if(_0x39cfbf['some'](_0x795ed3=>{const _0x4b9d6b=_0xbbadf5,_0x1f1b9d=_0x795ed3[_0x4b9d6b(0x11e)]();return _0x1f1b9d[_0x4b9d6b(0xfa)]('mcp-server')||_0x1f1b9d[_0x4b9d6b(0xfa)](_0x4b9d6b(0x140))||_0x1f1b9d[_0x4b9d6b(0xfa)](_0x4b9d6b(0x145))||_0x1f1b9d===_0x4b9d6b(0xfe)||_0x1f1b9d===_0x4b9d6b(0x142);}))return!![];return![];}async function runProxy(_0x5a3da2){const _0x19ca03=a0_0x49df98;if(_0x5a3da2[_0x19ca03(0x144)]===0x0){program[_0x19ca03(0x12b)]();return;}const _0x4b3b54=_0x5a3da2[0x0],_0x8c473d=_0x5a3da2['slice'](0x1),_0x53a39f=_0x5a3da2[_0x19ca03(0xde)]('\x20');if(isDisabled()){const _0x34fb28=await(0x0,executor_1['executeCommand'])(_0x4b3b54,_0x8c473d);process[_0x19ca03(0x104)]['write'](_0x34fb28['stdout']),process['stderr'][_0x19ca03(0x102)](_0x34fb28[_0x19ca03(0x133)]),process['exit'](_0x34fb28[_0x19ca03(0xea)]);}if(isMcpServerExecution(_0x4b3b54,_0x8c473d)){console[_0x19ca03(0x123)](_0x19ca03(0x126));const {runMcpProxy:_0x4617cb}=await Promise[_0x19ca03(0x151)]()[_0x19ca03(0x161)](()=>__importStar(require(_0x19ca03(0x168))));_0x4617cb(_0x4b3b54,_0x8c473d);return;}const _0x39108f=adjustCommandArgs(_0x4b3b54,_0x8c473d),_0x17c82f=await(0x0,executor_1['executeCommand'])(_0x39108f[_0x19ca03(0x148)],_0x39108f['args']),_0x558662=(0x0,filters_1[_0x19ca03(0x137)])(_0x53a39f,_0x17c82f[_0x19ca03(0x104)],_0x17c82f[_0x19ca03(0x133)],tracker_1[_0x19ca03(0x11a)][_0x19ca03(0x11b)]()['redaction_enabled']),_0x43305a={...filters_1[_0x19ca03(0xf1)]},_0x2ece6c=_0x17c82f[_0x19ca03(0x104)]+(_0x17c82f[_0x19ca03(0x133)][_0x19ca03(0xff)]()[_0x19ca03(0x144)]>0x0?'\x0a'+_0x17c82f[_0x19ca03(0x133)]:''),_0x1ef616=_0x558662[_0x19ca03(0x144)]<_0x2ece6c[_0x19ca03(0x144)]?_0x558662:_0x2ece6c,_0x74dfcd=_0x17c82f[_0x19ca03(0xea)]===0x0?(0x0,cache_1[_0x19ca03(0x122)])(_0x53a39f,_0x1ef616):null;tracker_1[_0x19ca03(0x11a)][_0x19ca03(0x115)](_0x53a39f,_0x2ece6c,_0x74dfcd||_0x1ef616,_0x17c82f[_0x19ca03(0xea)],_0x43305a),_0x17c82f['exitCode']===0x0?process[_0x19ca03(0x104)]['write'](_0x1ef616+'\x0a'):(process['stdout']['write'](_0x558662+'\x0a'),_0x17c82f[_0x19ca03(0x133)][_0x19ca03(0xff)]()['length']>0x0&&!_0x558662[_0x19ca03(0xfa)](_0x17c82f['stderr']['trim']())&&process[_0x19ca03(0x133)][_0x19ca03(0x102)](_0x17c82f[_0x19ca03(0x133)]+'\x0a')),process[_0x19ca03(0x10c)](_0x17c82f['exitCode']);}program['name'](a0_0x49df98(0xff))[a0_0x49df98(0x153)](a0_0x49df98(0x105))[a0_0x49df98(0x117)](a0_0x49df98(0x150)),program['command']('ui')[a0_0x49df98(0xd3)](a0_0x49df98(0x14c))[a0_0x49df98(0x153)](a0_0x49df98(0x13e))[a0_0x49df98(0xe9)](a0_0x49df98(0x127),a0_0x49df98(0x15e),a0_0x49df98(0xe0))[a0_0x49df98(0xd9)](_0x13b123=>{const _0x108a9a=a0_0x49df98,_0x3594db=parseInt(_0x13b123[_0x108a9a(0x14a)],0xa);(0x0,dashboard_1[_0x108a9a(0x147)])(_0x3594db);}),program['command'](a0_0x49df98(0x12e))['description'](a0_0x49df98(0x107))[a0_0x49df98(0xe9)](a0_0x49df98(0x12d),a0_0x49df98(0x129),a0_0x49df98(0x10b))[a0_0x49df98(0xd9)](_0x54e197=>{const _0x5aa912=a0_0x49df98,_0x5620b7=tracker_1[_0x5aa912(0x11a)][_0x5aa912(0x159)](_0x54e197[_0x5aa912(0x12f)]);console[_0x5aa912(0x14b)]('\x0a============================================='),console[_0x5aa912(0x14b)]('\x20\x20\x20\x20\x20\x20\x20TRIMPROMPT.AI\x20SAVINGS\x20SUMMARY\x20\x20\x20\x20\x20\x20\x20\x20'),console[_0x5aa912(0x14b)]('============================================='),console[_0x5aa912(0x14b)](_0x5aa912(0x130)+_0x5620b7[_0x5aa912(0x11c)]),console['log'](_0x5aa912(0x101)+_0x5620b7[_0x5aa912(0xe3)][_0x5aa912(0x11d)]()),console[_0x5aa912(0x14b)](_0x5aa912(0xeb)+_0x5620b7[_0x5aa912(0x15d)][_0x5aa912(0x11d)]()),console[_0x5aa912(0x14b)](_0x5aa912(0x166)+_0x5620b7['total_tokens_saved']['toLocaleString']()),console['log'](_0x5aa912(0xe7)+_0x5620b7['savings_percentage']+'%'),console[_0x5aa912(0x14b)](_0x5aa912(0xfd)+_0x5620b7[_0x5aa912(0x136)][_0x5aa912(0xd0)](0x4)+_0x5aa912(0xf7)),console[_0x5aa912(0x14b)](_0x5aa912(0xf3)+_0x5620b7[_0x5aa912(0x110)][_0x5aa912(0xd0)](0x4)+_0x5aa912(0x158)),console['log'](_0x5aa912(0x156)),console['log']('Money\x20Saved:\x20\x20\x20\x20\x20\x20\x20$'+_0x5620b7[_0x5aa912(0x13d)][_0x5aa912(0xd0)](0x4)+_0x5aa912(0x111)),console[_0x5aa912(0x14b)]('=============================================\x0a');}),program[a0_0x49df98(0xe2)](a0_0x49df98(0xf4))[a0_0x49df98(0x153)](a0_0x49df98(0xcf))[a0_0x49df98(0xd1)](a0_0x49df98(0x163),a0_0x49df98(0x10d))[a0_0x49df98(0xd1)](a0_0x49df98(0xd6),a0_0x49df98(0x112))[a0_0x49df98(0xd1)](a0_0x49df98(0x141),a0_0x49df98(0x135))[a0_0x49df98(0xd9)]((_0x28931e,_0x3f2d59,_0xa5f3f4)=>{const _0x1d0f53=a0_0x49df98;if(_0x28931e==='get'){const _0x3ab1a9=tracker_1[_0x1d0f53(0x11a)]['getConfig']();console[_0x1d0f53(0x14b)](_0x3f2d59+':\x20'+_0x3ab1a9[_0x3f2d59]);}else{if(_0x28931e===_0x1d0f53(0x124)){_0xa5f3f4===undefined&&(console[_0x1d0f53(0x123)]('Error:\x20Value\x20required\x20for\x20set\x20action'),process[_0x1d0f53(0x10c)](0x1));let _0x4cfc85=_0xa5f3f4;if(_0xa5f3f4===_0x1d0f53(0x14e))_0x4cfc85=!![];if(_0xa5f3f4===_0x1d0f53(0xfb))_0x4cfc85=![];if(/^\d+$/['test'](_0xa5f3f4))_0x4cfc85=parseInt(_0xa5f3f4,0xa);tracker_1[_0x1d0f53(0x11a)][_0x1d0f53(0xe8)](_0x3f2d59,_0x4cfc85),console[_0x1d0f53(0x14b)](_0x1d0f53(0xf5)+_0x3f2d59+_0x1d0f53(0x109)+_0xa5f3f4);}else console['error']('Error:\x20Action\x20must\x20be\x20get\x20or\x20set'),process[_0x1d0f53(0x10c)](0x1);}}),program[a0_0x49df98(0xe2)](a0_0x49df98(0x146))[a0_0x49df98(0x153)]('Install\x20or\x20uninstall\x20system\x20command\x20shims')[a0_0x49df98(0xd1)](a0_0x49df98(0x163),'install\x20or\x20uninstall')[a0_0x49df98(0xd9)](_0x40145c=>{const _0xa4176e=a0_0x49df98;if(_0x40145c==='install'){const _0x17489d=(0x0,shims_1[_0xa4176e(0x152)])();console[_0xa4176e(0x14b)](_0x17489d['message']);}else{if(_0x40145c===_0xa4176e(0x11f)){const _0x3fee9d=(0x0,shims_1[_0xa4176e(0xe1)])();console[_0xa4176e(0x14b)](_0x3fee9d['message']);}else console[_0xa4176e(0x123)](_0xa4176e(0x169)),process[_0xa4176e(0x10c)](0x1);}}),program['command'](a0_0x49df98(0x113))[a0_0x49df98(0x153)](a0_0x49df98(0x15c))[a0_0x49df98(0xd1)](a0_0x49df98(0x14d),a0_0x49df98(0x128))[a0_0x49df98(0xd9)](_0x4c2517=>{const _0x404d69=a0_0x49df98;if(isDisabled()){console[_0x404d69(0x14b)](_0x4c2517);return;}const _0xd0538f=(0x0,filters_1[_0x404d69(0xda)])(_0x4c2517);console[_0x404d69(0x14b)](_0xd0538f);}),program[a0_0x49df98(0xe2)](a0_0x49df98(0xfe))[a0_0x49df98(0xd3)](a0_0x49df98(0x142))[a0_0x49df98(0x153)]('Proxy\x20wrapper\x20for\x20Model\x20Context\x20Protocol\x20(MCP)\x20servers\x20to\x20compact\x20tool\x20outputs')['argument'](a0_0x49df98(0x13c),a0_0x49df98(0x154))[a0_0x49df98(0xd1)](a0_0x49df98(0xf6),a0_0x49df98(0xd2))['action'](async(_0x30e292,_0x2520ea)=>{const _0xf47da7=a0_0x49df98,{runMcpProxy:_0x4c3501}=await Promise[_0xf47da7(0x151)]()[_0xf47da7(0x161)](()=>__importStar(require(_0xf47da7(0x168))));_0x4c3501(_0x30e292,_0x2520ea);});const args=process[a0_0x49df98(0x149)][a0_0x49df98(0x134)](0x2),firstArg=args[0x0],subcommands=['ui','dashboard','stats',a0_0x49df98(0xf4),a0_0x49df98(0x146),'rewrite',a0_0x49df98(0xfe),a0_0x49df98(0x142),a0_0x49df98(0x12b),a0_0x49df98(0x10e),'-h','version','--version','-v'];firstArg&&!subcommands['includes'](firstArg)?runProxy(args)[a0_0x49df98(0x13b)](_0x5f08cb=>{const _0x5003d0=a0_0x49df98;console['error']('[TrimPrompt]\x20Fatal\x20Proxy\x20Error:\x20'+_0x5f08cb[_0x5003d0(0xec)]),process[_0x5003d0(0x10c)](0x1);}):program[a0_0x49df98(0x14f)](process[a0_0x49df98(0x149)]);
|
package/dashboard.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x204cc5=a0_0x57c3;(function(_0x412dd4,_0x2e8ed1){const _0x159760=a0_0x57c3,_0x589680=_0x412dd4();while(!![]){try{const _0x490eda=parseInt(_0x159760(0x1a4))/0x1*(parseInt(_0x159760(0x1a6))/0x2)+-parseInt(_0x159760(0x180))/0x3*(parseInt(_0x159760(0x1a7))/0x4)+parseInt(_0x159760(0x18d))/0x5*(-parseInt(_0x159760(0x1a5))/0x6)+parseInt(_0x159760(0x182))/0x7*(parseInt(_0x159760(0x1a1))/0x8)+-parseInt(_0x159760(0x1a2))/0x9+-parseInt(_0x159760(0x194))/0xa*(-parseInt(_0x159760(0x195))/0xb)+parseInt(_0x159760(0x19b))/0xc;if(_0x490eda===_0x2e8ed1)break;else _0x589680['push'](_0x589680['shift']());}catch(_0x1482b4){_0x589680['push'](_0x589680['shift']());}}}(a0_0x58f8,0x58af9));function a0_0x57c3(_0x7fbd2a,_0x17c2a5){_0x7fbd2a=_0x7fbd2a-0x16e;const _0x58f801=a0_0x58f8();let _0x57c310=_0x58f801[_0x7fbd2a];return _0x57c310;}function a0_0x58f8(){const _0x3c9ba3=['code','call','defineProperty','get','11510KEclZX','913JDFMiC','getOwnPropertyNames','__esModule','getLogs','utf8','__setModuleDefault','5823624FWPrhl','readFileSync','query','Press\x20Ctrl+C\x20in\x20this\x20terminal\x20to\x20shut\x20down.','params','open','2416IHimOB','3672702XcIlQr','sendFile','26dEfzRG','45702PcWrIw','27868Zjwlzw','36648ABeZhh','/favicon.png','logs','/api/stats/summary','prototype','log','error','.raw.txt','../src/index.html','Compressed\x20output\x20log\x20file\x20not\x20found.','Raw\x20output\x20log\x20file\x20not\x20found.','catch','__importDefault','getStatsSummary','getOwnPropertyDescriptor','json','/api/stats/inspect/:id','favicon.png','default','./tracker','EADDRINUSE','length','36ZlPMTc','existsSync','3157EjYlWH','tracker','__createBinding','configurable','create','.comp.txt','startDashboard','join','auto','[TrimPrompt]\x20Dashboard\x20error:\x20','hasOwnProperty','130bKejuT','writable','homedir'];a0_0x58f8=function(){return _0x3c9ba3;};return a0_0x58f8();}var __createBinding=this&&this[a0_0x204cc5(0x184)]||(Object[a0_0x204cc5(0x186)]?function(_0x3b3b6d,_0x24cb91,_0x438f67,_0x5086e2){const _0x4af3b2=a0_0x204cc5;if(_0x5086e2===undefined)_0x5086e2=_0x438f67;var _0xda9288=Object[_0x4af3b2(0x178)](_0x24cb91,_0x438f67);(!_0xda9288||(_0x4af3b2(0x193)in _0xda9288?!_0x24cb91[_0x4af3b2(0x197)]:_0xda9288[_0x4af3b2(0x18e)]||_0xda9288[_0x4af3b2(0x185)]))&&(_0xda9288={'enumerable':!![],'get':function(){return _0x24cb91[_0x438f67];}}),Object[_0x4af3b2(0x192)](_0x3b3b6d,_0x5086e2,_0xda9288);}:function(_0x5d6e17,_0x34e2f7,_0x473439,_0x16eab8){if(_0x16eab8===undefined)_0x16eab8=_0x473439;_0x5d6e17[_0x16eab8]=_0x34e2f7[_0x473439];}),__setModuleDefault=this&&this[a0_0x204cc5(0x19a)]||(Object[a0_0x204cc5(0x186)]?function(_0x590629,_0x507960){const _0x394ef9=a0_0x204cc5;Object['defineProperty'](_0x590629,_0x394ef9(0x17c),{'enumerable':!![],'value':_0x507960});}:function(_0x2d445a,_0x223554){const _0x2e6ede=a0_0x204cc5;_0x2d445a[_0x2e6ede(0x17c)]=_0x223554;}),__importStar=this&&this['__importStar']||(function(){var _0x1ea55a=function(_0xb89264){const _0x42bd00=a0_0x57c3;return _0x1ea55a=Object[_0x42bd00(0x196)]||function(_0x23ce51){const _0x36742f=_0x42bd00;var _0x3b58c0=[];for(var _0x2176de in _0x23ce51)if(Object[_0x36742f(0x16e)][_0x36742f(0x18c)][_0x36742f(0x191)](_0x23ce51,_0x2176de))_0x3b58c0[_0x3b58c0[_0x36742f(0x17f)]]=_0x2176de;return _0x3b58c0;},_0x1ea55a(_0xb89264);};return function(_0x538d08){const _0x3a26bd=a0_0x57c3;if(_0x538d08&&_0x538d08[_0x3a26bd(0x197)])return _0x538d08;var _0x259293={};if(_0x538d08!=null){for(var _0x5dc565=_0x1ea55a(_0x538d08),_0x3d0ba3=0x0;_0x3d0ba3<_0x5dc565[_0x3a26bd(0x17f)];_0x3d0ba3++)if(_0x5dc565[_0x3d0ba3]!==_0x3a26bd(0x17c))__createBinding(_0x259293,_0x538d08,_0x5dc565[_0x3d0ba3]);}return __setModuleDefault(_0x259293,_0x538d08),_0x259293;};}()),__importDefault=this&&this[a0_0x204cc5(0x176)]||function(_0x313805){const _0x499325=a0_0x204cc5;return _0x313805&&_0x313805[_0x499325(0x197)]?_0x313805:{'default':_0x313805};};Object[a0_0x204cc5(0x192)](exports,'__esModule',{'value':!![]}),exports[a0_0x204cc5(0x188)]=startDashboard;const express_1=__importDefault(require('express')),path=__importStar(require('path')),fs=__importStar(require('fs')),os=__importStar(require('os')),open_1=__importDefault(require(a0_0x204cc5(0x1a0))),tracker_1=require(a0_0x204cc5(0x17d)),app=(0x0,express_1['default'])(),baseDir=path[a0_0x204cc5(0x189)](os[a0_0x204cc5(0x18f)](),'.trimprompt'),logsDir=path[a0_0x204cc5(0x189)](baseDir,a0_0x204cc5(0x1a9));app[a0_0x204cc5(0x193)]('/',(_0x3efe81,_0x14ecab)=>{const _0x5cb556=a0_0x204cc5,_0xd6e3ae=path[_0x5cb556(0x189)](__dirname,'index.html');fs['existsSync'](_0xd6e3ae)?_0x14ecab['sendFile'](_0xd6e3ae):_0x14ecab[_0x5cb556(0x1a3)](path[_0x5cb556(0x189)](__dirname,_0x5cb556(0x172)));}),app[a0_0x204cc5(0x193)](a0_0x204cc5(0x1a8),(_0xc096ca,_0x367cb1)=>{const _0x3ef596=a0_0x204cc5,_0x3467d8=path[_0x3ef596(0x189)](__dirname,_0x3ef596(0x17b));fs[_0x3ef596(0x181)](_0x3467d8)?_0x367cb1[_0x3ef596(0x1a3)](_0x3467d8):_0x367cb1[_0x3ef596(0x1a3)](path[_0x3ef596(0x189)](__dirname,'../src/favicon.png'));}),app[a0_0x204cc5(0x193)](a0_0x204cc5(0x1aa),(_0x47c094,_0x52862b)=>{const _0x40c725=a0_0x204cc5,_0x50e21d=_0x47c094[_0x40c725(0x19d)]['model']||_0x40c725(0x18a),_0x495392=tracker_1[_0x40c725(0x183)][_0x40c725(0x177)](_0x50e21d);_0x52862b[_0x40c725(0x179)](_0x495392);}),app[a0_0x204cc5(0x193)]('/api/stats/history',(_0x2c0c5e,_0x192fb8)=>{const _0x160729=a0_0x204cc5,_0x55bc66=tracker_1[_0x160729(0x183)][_0x160729(0x198)]();_0x192fb8[_0x160729(0x179)](_0x55bc66);}),app[a0_0x204cc5(0x193)](a0_0x204cc5(0x17a),(_0x257712,_0x2620e6)=>{const _0x213b61=a0_0x204cc5,_0x546897=_0x257712[_0x213b61(0x19f)]['id'],_0x3e2fb3=path['join'](logsDir,_0x546897+_0x213b61(0x171)),_0x19f9b0=path['join'](logsDir,_0x546897+_0x213b61(0x187));let _0x3d7885=_0x213b61(0x174),_0x77af9a=_0x213b61(0x173);try{fs['existsSync'](_0x3e2fb3)&&(_0x3d7885=fs[_0x213b61(0x19c)](_0x3e2fb3,_0x213b61(0x199))),fs[_0x213b61(0x181)](_0x19f9b0)&&(_0x77af9a=fs[_0x213b61(0x19c)](_0x19f9b0,_0x213b61(0x199)));}catch(_0x1c0bd8){}_0x2620e6[_0x213b61(0x179)]({'id':_0x546897,'raw':_0x3d7885,'compressed':_0x77af9a});});function startDashboard(_0x5f1074=0xfa0){const _0x1001e8=a0_0x204cc5;let _0x45bf19=_0x5f1074;const _0x5c5cb0=app['listen'](_0x45bf19,()=>{const _0x185bf5=a0_0x57c3,_0x391b0e='http://localhost:'+_0x45bf19;console[_0x185bf5(0x16f)]('\x0a[TrimPrompt]\x20Dashboard\x20server\x20started\x20at:\x20'+_0x391b0e),console['log'](_0x185bf5(0x19e)),process.env.TRIMPROMPT_NO_OPEN!=='1'&&(0x0,open_1['default'])(_0x391b0e)[_0x185bf5(0x175)](()=>{});});_0x5c5cb0['on'](_0x1001e8(0x170),_0x3f9260=>{const _0x26c212=_0x1001e8;_0x3f9260[_0x26c212(0x190)]===_0x26c212(0x17e)?startDashboard(_0x45bf19+0x1):console['error'](_0x26c212(0x18b)+_0x3f9260['message']);});}
|
package/executor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a0_0x3c0ec2=a0_0x1b74;function a0_0x1b74(_0x58817c,_0x1e4e7c){_0x58817c=_0x58817c-0xf3;var _0x2e547f=a0_0x2e54();var _0x1b7497=_0x2e547f[_0x58817c];return _0x1b7497;}(function(_0x51268d,_0x4db907){var _0x4f77b4=a0_0x1b74,_0x4b66fd=_0x51268d();while(!![]){try{var _0x1a2843=parseInt(_0x4f77b4(0x105))/0x1*(-parseInt(_0x4f77b4(0x101))/0x2)+parseInt(_0x4f77b4(0xff))/0x3+parseInt(_0x4f77b4(0x10a))/0x4*(parseInt(_0x4f77b4(0x100))/0x5)+parseInt(_0x4f77b4(0x103))/0x6*(-parseInt(_0x4f77b4(0x11e))/0x7)+-parseInt(_0x4f77b4(0x106))/0x8+parseInt(_0x4f77b4(0x10d))/0x9*(-parseInt(_0x4f77b4(0xfe))/0xa)+-parseInt(_0x4f77b4(0xf5))/0xb*(-parseInt(_0x4f77b4(0x119))/0xc);if(_0x1a2843===_0x4db907)break;else _0x4b66fd['push'](_0x4b66fd['shift']());}catch(_0xe2be7c){_0x4b66fd['push'](_0x4b66fd['shift']());}}}(a0_0x2e54,0x598bf));function a0_0x2e54(){var _0x1a7fc5=['toLowerCase','\x22:\x20','4MEVrmg','hasOwnProperty','includes','3267GOmSmG','message','map','path','homedir','join','create','defineProperty','length','__setModuleDefault','default','get','7124268RxyioT','delimiter','__esModule','startsWith','data','6174bezSnQ','getOwnPropertyNames','spawn','pipe','11veqhIG','__createBinding','trim','getOwnPropertyDescriptor','child_process','stderr','error','writable','close','580qfvbXb','464964OdlCcE','839505VZjoLl','7804wGKQcx','shims','2382eGBZUr','inherit','28OSmrSF','554648sOEXQc','split'];a0_0x2e54=function(){return _0x1a7fc5;};return a0_0x2e54();}var __createBinding=this&&this[a0_0x3c0ec2(0xf6)]||(Object[a0_0x3c0ec2(0x113)]?function(_0x4bf326,_0x10fc75,_0x592dae,_0x112e8f){var _0x2f14c9=a0_0x3c0ec2;if(_0x112e8f===undefined)_0x112e8f=_0x592dae;var _0x488201=Object[_0x2f14c9(0xf8)](_0x10fc75,_0x592dae);(!_0x488201||(_0x2f14c9(0x118)in _0x488201?!_0x10fc75[_0x2f14c9(0x11b)]:_0x488201[_0x2f14c9(0xfc)]||_0x488201['configurable']))&&(_0x488201={'enumerable':!![],'get':function(){return _0x10fc75[_0x592dae];}}),Object[_0x2f14c9(0x114)](_0x4bf326,_0x112e8f,_0x488201);}:function(_0x34726e,_0x5da406,_0x12f832,_0x2fd300){if(_0x2fd300===undefined)_0x2fd300=_0x12f832;_0x34726e[_0x2fd300]=_0x5da406[_0x12f832];}),__setModuleDefault=this&&this[a0_0x3c0ec2(0x116)]||(Object[a0_0x3c0ec2(0x113)]?function(_0x20fd61,_0x4af5a1){Object['defineProperty'](_0x20fd61,'default',{'enumerable':!![],'value':_0x4af5a1});}:function(_0x5983af,_0x15a76e){var _0x1cc18f=a0_0x3c0ec2;_0x5983af[_0x1cc18f(0x117)]=_0x15a76e;}),__importStar=this&&this['__importStar']||(function(){var _0x5a2b8b=function(_0x263c8f){var _0x2aba86=a0_0x1b74;return _0x5a2b8b=Object[_0x2aba86(0x11f)]||function(_0x2a3863){var _0x24e167=_0x2aba86,_0x481894=[];for(var _0x3d252c in _0x2a3863)if(Object['prototype'][_0x24e167(0x10b)]['call'](_0x2a3863,_0x3d252c))_0x481894[_0x481894[_0x24e167(0x115)]]=_0x3d252c;return _0x481894;},_0x5a2b8b(_0x263c8f);};return function(_0x251279){var _0x3d3233=a0_0x1b74;if(_0x251279&&_0x251279[_0x3d3233(0x11b)])return _0x251279;var _0x33ec67={};if(_0x251279!=null){for(var _0x48d5b4=_0x5a2b8b(_0x251279),_0x10ab45=0x0;_0x10ab45<_0x48d5b4[_0x3d3233(0x115)];_0x10ab45++)if(_0x48d5b4[_0x10ab45]!==_0x3d3233(0x117))__createBinding(_0x33ec67,_0x251279,_0x48d5b4[_0x10ab45]);}return __setModuleDefault(_0x33ec67,_0x251279),_0x33ec67;};}());Object[a0_0x3c0ec2(0x114)](exports,a0_0x3c0ec2(0x11b),{'value':!![]}),exports['executeCommand']=executeCommand;const child_process_1=require(a0_0x3c0ec2(0xf9)),path=__importStar(require(a0_0x3c0ec2(0x110))),os=__importStar(require('os'));function executeCommand(_0x172d86,_0x26dd63){return new Promise(_0x529bb2=>{var _0x34d2ea=a0_0x1b74;const _0x185b22=path['join'](os[_0x34d2ea(0x111)](),'.trimprompt',_0x34d2ea(0x102)),_0x41dc9e=(process.env.PATH||'')[_0x34d2ea(0x107)](path[_0x34d2ea(0x11a)])['filter'](_0x3d362f=>_0x3d362f[_0x34d2ea(0xf7)]()['toLowerCase']()!==_0x185b22[_0x34d2ea(0x108)]())['join'](path[_0x34d2ea(0x11a)]),_0x38563d={...process.env,'PATH':_0x41dc9e,'TRIMPROMPT_DISABLED':'1'},_0x3fc3e8=_0x26dd63[_0x34d2ea(0x10f)](_0x3c47e4=>_0x3c47e4[_0x34d2ea(0x10c)]('\x20')&&!_0x3c47e4[_0x34d2ea(0x11c)]('\x22')?'\x22'+_0x3c47e4+'\x22':_0x3c47e4),_0x1598fe=[_0x172d86,..._0x3fc3e8][_0x34d2ea(0x112)]('\x20'),_0x159158=(0x0,child_process_1[_0x34d2ea(0xf3)])(_0x1598fe,[],{'stdio':[_0x34d2ea(0x104),_0x34d2ea(0xf4),'pipe'],'shell':!![],'env':_0x38563d});let _0x164d7a='',_0x3daf77='';_0x159158['stdout']?.['on'](_0x34d2ea(0x11d),_0x46f06f=>{_0x164d7a+=_0x46f06f['toString']();}),_0x159158[_0x34d2ea(0xfa)]?.['on'](_0x34d2ea(0x11d),_0x4588b5=>{_0x3daf77+=_0x4588b5['toString']();}),_0x159158['on'](_0x34d2ea(0xfb),_0x101a79=>{var _0x271181=_0x34d2ea;_0x529bb2({'exitCode':0x1,'stdout':'','stderr':'Failed\x20to\x20spawn\x20command\x20\x22'+_0x172d86+_0x271181(0x109)+_0x101a79[_0x271181(0x10e)]});}),_0x159158['on'](_0x34d2ea(0xfd),_0x30d0da=>{_0x529bb2({'exitCode':_0x30d0da??0x0,'stdout':_0x164d7a,'stderr':_0x3daf77});});});}
|
package/filters/devops.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const a0_0x239475=a0_0x357e;(function(_0x270334,_0x844729){const _0x25df74=a0_0x357e,_0x1aae27=_0x270334();while(!![]){try{const _0x50b6e9=parseInt(_0x25df74(0x137))/0x1*(-parseInt(_0x25df74(0x149))/0x2)+-parseInt(_0x25df74(0x140))/0x3+-parseInt(_0x25df74(0x14b))/0x4*(-parseInt(_0x25df74(0x11d))/0x5)+-parseInt(_0x25df74(0x127))/0x6*(-parseInt(_0x25df74(0x135))/0x7)+parseInt(_0x25df74(0x147))/0x8+parseInt(_0x25df74(0x130))/0x9*(-parseInt(_0x25df74(0x13e))/0xa)+parseInt(_0x25df74(0x12e))/0xb*(parseInt(_0x25df74(0x119))/0xc);if(_0x50b6e9===_0x844729)break;else _0x1aae27['push'](_0x1aae27['shift']());}catch(_0x1f5cd5){_0x1aae27['push'](_0x1aae27['shift']());}}}(a0_0x4def,0x503a7));function a0_0x4def(){const _0x5ea307=['40988MwNDTE','4702884aZcdWY','\x20\x20...\x20(','\x20issues\x20in\x20','split','190wSOkBx','\x20\x20...\x20+','defineProperty','\x20more\x20lines','get','All\x20checks\x20passed','filterRuff','Docker\x20images:\x20','\x20more','__esModule','55038HeRvNH','Ruff:\x20all\x20checks\x20passed','keys','\x0a...\x20[','describe','\x20total','trim','11zsRtFF','startsWith','53127OBtAjL','length','filterKubectl','Events:','...\x20+','413foaWnX','match','1HwuQVu','\x20files','filter','Containers:\x20','push','filterDockerLogs','No\x20containers\x20running','270URZGWn','Found\x200\x20error','1796742hIvpYm','join','\x20more\x20images','\x20resources\x20found','No\x20images\x20found','includes','slice','2571808RaaVIH','Ruff:\x20no\x20issues\x20found','1114132nMxoEr','Ruff:\x20'];a0_0x4def=function(){return _0x5ea307;};return a0_0x4def();}Object[a0_0x239475(0x11f)](exports,a0_0x239475(0x126),{'value':!![]}),exports['filterDockerPs']=filterDockerPs,exports['filterDockerImages']=filterDockerImages,exports[a0_0x239475(0x13c)]=filterDockerLogs,exports[a0_0x239475(0x132)]=filterKubectl,exports[a0_0x239475(0x123)]=filterRuff;function a0_0x357e(_0x5abfc1,_0x278054){_0x5abfc1=_0x5abfc1-0x119;const _0x4def3e=a0_0x4def();let _0x357e6e=_0x4def3e[_0x5abfc1];return _0x357e6e;}function filterDockerPs(_0x3ea1dd){const _0x30cae9=a0_0x239475,_0x156e03=_0x3ea1dd['split']('\x0a')[_0x30cae9(0x139)](_0x282071=>_0x282071['trim']()[_0x30cae9(0x131)]>0x0);if(_0x156e03[_0x30cae9(0x131)]===0x0)return _0x30cae9(0x13d);if(_0x156e03['length']<=0xa)return _0x3ea1dd[_0x30cae9(0x12d)]();const _0x939bc6=_0x156e03[0x0],_0x553b2e=_0x156e03[_0x30cae9(0x146)](0x1),_0x34c3f2=[];_0x34c3f2[_0x30cae9(0x13b)](_0x30cae9(0x13a)+_0x553b2e['length']+_0x30cae9(0x12c)),_0x34c3f2['push']('');for(const _0x29ee05 of _0x553b2e){const _0x3c4e0a=_0x29ee05[_0x30cae9(0x11c)](/\s{2,}/);if(_0x3c4e0a[_0x30cae9(0x131)]>=0x5){const _0x26fae7=_0x3c4e0a[0x0]['substring'](0x0,0xc),_0x30a921=_0x3c4e0a[0x1],_0x1447b5=_0x3c4e0a[_0x3c4e0a[_0x30cae9(0x131)]-0x2]||'',_0x320640=_0x3c4e0a[_0x3c4e0a[_0x30cae9(0x131)]-0x1]||'';_0x34c3f2[_0x30cae9(0x13b)]('\x20\x20'+_0x26fae7+'\x20\x20'+_0x30a921+'\x20\x20'+_0x1447b5+'\x20\x20'+_0x320640);}else _0x34c3f2[_0x30cae9(0x13b)]('\x20\x20'+_0x29ee05['trim']());}return _0x34c3f2[_0x30cae9(0x141)]('\x0a');}function filterDockerImages(_0x4fd114){const _0xa8d84d=a0_0x239475,_0x4d6204=_0x4fd114['split']('\x0a')['filter'](_0x41fc7f=>_0x41fc7f[_0xa8d84d(0x12d)]()['length']>0x0);if(_0x4d6204[_0xa8d84d(0x131)]<=0x1)return _0xa8d84d(0x144);if(_0x4d6204[_0xa8d84d(0x131)]<=0xf)return _0x4fd114[_0xa8d84d(0x12d)]();const _0x576a23=_0x4d6204['slice'](0x1),_0x5ea050=[_0xa8d84d(0x124)+_0x576a23['length']+_0xa8d84d(0x12c)];_0x5ea050[_0xa8d84d(0x13b)]('');const _0x568b1d=_0x576a23[_0xa8d84d(0x146)](0x0,0x14);for(const _0x341b8e of _0x568b1d){const _0x3760f1=_0x341b8e[_0xa8d84d(0x11c)](/\s{2,}/);if(_0x3760f1['length']>=0x3){const _0x2cd515=_0x3760f1[0x0],_0x2646e2=_0x3760f1[0x1],_0x48f3f6=_0x3760f1[_0x3760f1['length']-0x1]||'';_0x5ea050[_0xa8d84d(0x13b)]('\x20\x20'+_0x2cd515+':'+_0x2646e2+'\x20\x20'+_0x48f3f6);}else _0x5ea050[_0xa8d84d(0x13b)]('\x20\x20'+_0x341b8e[_0xa8d84d(0x12d)]());}return _0x576a23[_0xa8d84d(0x131)]>0x14&&_0x5ea050[_0xa8d84d(0x13b)]('\x20\x20...\x20+'+(_0x576a23[_0xa8d84d(0x131)]-0x14)+_0xa8d84d(0x142)),_0x5ea050[_0xa8d84d(0x141)]('\x0a');}function filterDockerLogs(_0x32720d){const _0x569d8d=a0_0x239475,_0x468958=_0x32720d['split']('\x0a');if(_0x468958['length']<=0x32)return _0x32720d;const _0x5bd64e=[];return _0x5bd64e[_0x569d8d(0x13b)](..._0x468958['slice'](0x0,0x14)),_0x5bd64e[_0x569d8d(0x13b)](_0x569d8d(0x12a)+(_0x468958[_0x569d8d(0x131)]-0x28)+'\x20lines\x20truncated]\x20...\x0a'),_0x5bd64e[_0x569d8d(0x13b)](..._0x468958['slice'](-0x14)),_0x5bd64e[_0x569d8d(0x13b)]('\x0a('+_0x468958['length']+'\x20log\x20lines\x20total)'),_0x5bd64e[_0x569d8d(0x141)]('\x0a');}function filterKubectl(_0x1fec7d,_0x236ab7){const _0x5261e6=a0_0x239475,_0x3b263a=_0x1fec7d[_0x5261e6(0x11c)]('\x0a')[_0x5261e6(0x139)](_0x595096=>_0x595096[_0x5261e6(0x12d)]()[_0x5261e6(0x131)]>0x0);if(_0x3b263a[_0x5261e6(0x131)]===0x0)return'No\x20resources\x20found';if(_0x3b263a['length']<=0x14)return _0x1fec7d[_0x5261e6(0x12d)]();if(_0x236ab7===_0x5261e6(0x121)){const _0x40e97a=_0x3b263a[0x0],_0x369039=_0x3b263a['slice'](0x1),_0x308ca2=[_0x369039[_0x5261e6(0x131)]+_0x5261e6(0x143),'',_0x40e97a];return _0x369039['length']<=0x1e?_0x308ca2[_0x5261e6(0x13b)](..._0x369039):(_0x308ca2[_0x5261e6(0x13b)](..._0x369039[_0x5261e6(0x146)](0x0,0x19)),_0x308ca2[_0x5261e6(0x13b)](_0x5261e6(0x134)+(_0x369039['length']-0x19)+'\x20more\x20resources')),_0x308ca2[_0x5261e6(0x141)]('\x0a');}if(_0x236ab7===_0x5261e6(0x12b)){const _0x980e3=[];let _0x1c59be=![],_0x539243=0x0;for(const _0x5308f9 of _0x3b263a){if(_0x5308f9[_0x5261e6(0x12f)](_0x5261e6(0x133))){_0x1c59be=!![],_0x980e3[_0x5261e6(0x13b)](_0x5308f9);continue;}if(_0x1c59be){_0x539243++;if(_0x539243<=0x5)_0x980e3[_0x5261e6(0x13b)](_0x5308f9);}else _0x980e3['push'](_0x5308f9);}return _0x539243>0x5&&_0x980e3['push'](_0x5261e6(0x11e)+(_0x539243-0x5)+'\x20more\x20events'),_0x980e3['join']('\x0a');}if(_0x236ab7==='logs')return filterDockerLogs(_0x1fec7d);const _0x3b6741=_0x3b263a[_0x5261e6(0x146)](0x0,0x1e);return _0x3b263a['length']>0x1e&&_0x3b6741[_0x5261e6(0x13b)]('...\x20+'+(_0x3b263a[_0x5261e6(0x131)]-0x1e)+_0x5261e6(0x120)),_0x3b6741['join']('\x0a');}function filterRuff(_0x418386){const _0x2ef04c=a0_0x239475,_0xc4b0b9=_0x418386[_0x2ef04c(0x11c)]('\x0a')['filter'](_0x77b2f6=>_0x77b2f6[_0x2ef04c(0x12d)]()[_0x2ef04c(0x131)]>0x0);if(_0xc4b0b9[_0x2ef04c(0x131)]===0x0)return _0x2ef04c(0x148);if(_0x418386[_0x2ef04c(0x145)](_0x2ef04c(0x122))||_0x418386[_0x2ef04c(0x145)](_0x2ef04c(0x13f)))return _0x2ef04c(0x128);const _0xd4ce19=_0x418386['match'](/Found (\d+) error/),_0x104aba=_0xd4ce19?parseInt(_0xd4ce19[0x1]):_0xc4b0b9[_0x2ef04c(0x131)],_0x5807f9={},_0x215d30=[];for(const _0x280760 of _0xc4b0b9){const _0x2139e6=_0x280760[_0x2ef04c(0x136)](/^([^:]+:\d+:\d+):\s*(.*)/);if(_0x2139e6){const _0x3a7fdb=_0x2139e6[0x1],_0x14a7d2=_0x3a7fdb['split'](':')[0x0];if(!_0x5807f9[_0x14a7d2])_0x5807f9[_0x14a7d2]=[];_0x5807f9[_0x14a7d2][_0x2ef04c(0x13b)](_0x280760);}else _0x215d30[_0x2ef04c(0x13b)](_0x280760);}const _0x4db176=Object[_0x2ef04c(0x129)](_0x5807f9);if(_0x4db176[_0x2ef04c(0x131)]===0x0){if(_0xc4b0b9[_0x2ef04c(0x131)]<=0x14)return _0x418386[_0x2ef04c(0x12d)]();return _0xc4b0b9['slice'](0x0,0xf)[_0x2ef04c(0x141)]('\x0a')+('\x0a...\x20+'+(_0xc4b0b9[_0x2ef04c(0x131)]-0xf)+_0x2ef04c(0x125));}const _0x592040=[_0x2ef04c(0x14a)+_0x104aba+'\x20issues\x20in\x20'+_0x4db176[_0x2ef04c(0x131)]+_0x2ef04c(0x138)];_0x592040[_0x2ef04c(0x13b)]('');const _0x17d48a=0xa;for(const _0x577e03 of _0x4db176[_0x2ef04c(0x146)](0x0,_0x17d48a)){const _0x2b43d0=_0x5807f9[_0x577e03];if(_0x2b43d0[_0x2ef04c(0x131)]<=0x3){for(const _0x2a7f49 of _0x2b43d0)_0x592040[_0x2ef04c(0x13b)]('\x20\x20'+_0x2a7f49);}else _0x592040[_0x2ef04c(0x13b)]('\x20\x20'+_0x2b43d0[0x0]),_0x592040['push'](_0x2ef04c(0x11a)+_0x2b43d0['length']+_0x2ef04c(0x11b)+_0x577e03+')');}return _0x4db176[_0x2ef04c(0x131)]>_0x17d48a&&_0x592040[_0x2ef04c(0x13b)](_0x2ef04c(0x11e)+(_0x4db176['length']-_0x17d48a)+'\x20more\x20files'),_0x592040['join']('\x0a');}
|
package/filters/generic.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x24b09d=a0_0x1972;(function(_0x587023,_0x1ed250){const _0x188e30=a0_0x1972,_0x5ce213=_0x587023();while(!![]){try{const _0x247d7a=-parseInt(_0x188e30(0x1eb))/0x1+-parseInt(_0x188e30(0x1f3))/0x2+parseInt(_0x188e30(0x1ec))/0x3*(-parseInt(_0x188e30(0x1f8))/0x4)+-parseInt(_0x188e30(0x1f4))/0x5*(parseInt(_0x188e30(0x1f6))/0x6)+-parseInt(_0x188e30(0x1f9))/0x7+parseInt(_0x188e30(0x1ea))/0x8+parseInt(_0x188e30(0x1fb))/0x9;if(_0x247d7a===_0x1ed250)break;else _0x5ce213['push'](_0x5ce213['shift']());}catch(_0x58b388){_0x5ce213['push'](_0x5ce213['shift']());}}}(a0_0x3ac0,0x80e1b));function a0_0x1972(_0x4e4eda,_0x5b522e){_0x4e4eda=_0x4e4eda-0x1e7;const _0x3ac0fe=a0_0x3ac0();let _0x19720e=_0x3ac0fe[_0x4e4eda];return _0x19720e;}Object[a0_0x24b09d(0x1f1)](exports,a0_0x24b09d(0x1f2),{'value':!![]}),exports[a0_0x24b09d(0x1e8)]=stripAnsi,exports['collapseDuplicates']=collapseDuplicates,exports[a0_0x24b09d(0x1ed)]=softTruncate;function stripAnsi(_0x21bb3e){const _0x5f0d29=a0_0x24b09d,_0x4272c8=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g;return _0x21bb3e[_0x5f0d29(0x1ee)](_0x4272c8,'');}function collapseDuplicates(_0x18084c){const _0x540fab=a0_0x24b09d,_0x4d32d8=_0x18084c['split']('\x0a');if(_0x4d32d8[_0x540fab(0x1e7)]<=0x1)return _0x18084c;const _0x30aecb=[];let _0x4e7b0a=_0x4d32d8[0x0],_0x47f630=0x1;for(let _0x47aba1=0x1;_0x47aba1<_0x4d32d8[_0x540fab(0x1e7)];_0x47aba1++){const _0x1ed471=_0x4d32d8[_0x47aba1];_0x1ed471===_0x4e7b0a&&_0x1ed471['trim']()[_0x540fab(0x1e7)]>0x0?_0x47f630++:(_0x47f630>0x1?_0x30aecb[_0x540fab(0x1f5)](_0x4e7b0a+_0x540fab(0x1f0)+_0x47f630+']'):_0x30aecb[_0x540fab(0x1f5)](_0x4e7b0a),_0x4e7b0a=_0x1ed471,_0x47f630=0x1);}return _0x47f630>0x1?_0x30aecb['push'](_0x4e7b0a+_0x540fab(0x1f0)+_0x47f630+']'):_0x30aecb[_0x540fab(0x1f5)](_0x4e7b0a),_0x30aecb[_0x540fab(0x1ef)]('\x0a');}function a0_0x3ac0(){const _0x2c62f0=['395YKRIys','push','1512dlAAMN','split','571568UchXlH','5108873AGxIQs','slice','17584137DlMOov','length','stripAnsi','\x0a...\x20[TrimPrompt:\x20Truncated\x20','6734144DIyVGg','416649VYDHkS','12xTeboz','softTruncate','replace','join','\x20[x','defineProperty','__esModule','1059396PenTlh'];a0_0x3ac0=function(){return _0x2c62f0;};return a0_0x3ac0();}function softTruncate(_0x4d0dfb,_0x5b26fc=0x4e20){const _0x48de19=a0_0x24b09d;if(_0x4d0dfb['length']<=_0x5b26fc)return _0x4d0dfb;const _0x59c0ba=_0x4d0dfb[_0x48de19(0x1f7)]('\x0a');if(_0x59c0ba[_0x48de19(0x1e7)]<=0xc8)return _0x4d0dfb;const _0x1e6b32=0x32,_0x22848d=0x96,_0x41c1b6=_0x59c0ba[_0x48de19(0x1fa)](0x0,_0x1e6b32),_0x192da5=_0x59c0ba[_0x48de19(0x1fa)](_0x59c0ba[_0x48de19(0x1e7)]-_0x22848d),_0x5e827d=_0x4d0dfb[_0x48de19(0x1e7)]-(_0x41c1b6[_0x48de19(0x1ef)]('\x0a')[_0x48de19(0x1e7)]+_0x192da5[_0x48de19(0x1ef)]('\x0a')[_0x48de19(0x1e7)]);return[..._0x41c1b6,_0x48de19(0x1e9)+_0x5e827d+'\x20characters\x20of\x20output]\x20...\x0a',..._0x192da5][_0x48de19(0x1ef)]('\x0a');}
|
package/filters/git.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';function a0_0x501f(_0x2172b5,_0x1280d5){_0x2172b5=_0x2172b5-0xc8;const _0x37f272=a0_0x37f2();let _0x501fb8=_0x37f272[_0x2172b5];return _0x501fb8;}const a0_0x29c3e3=a0_0x501f;(function(_0x4c7b16,_0x6fdecf){const _0x3d3777=a0_0x501f,_0xc6b459=_0x4c7b16();while(!![]){try{const _0x258ae8=-parseInt(_0x3d3777(0xea))/0x1+parseInt(_0x3d3777(0xfe))/0x2+parseInt(_0x3d3777(0xfc))/0x3*(-parseInt(_0x3d3777(0xf8))/0x4)+-parseInt(_0x3d3777(0xd5))/0x5*(parseInt(_0x3d3777(0xe4))/0x6)+-parseInt(_0x3d3777(0xfa))/0x7*(-parseInt(_0x3d3777(0xdc))/0x8)+-parseInt(_0x3d3777(0xdd))/0x9*(-parseInt(_0x3d3777(0xe1))/0xa)+-parseInt(_0x3d3777(0xe3))/0xb;if(_0x258ae8===_0x6fdecf)break;else _0xc6b459['push'](_0xc6b459['shift']());}catch(_0x513d1c){_0xc6b459['push'](_0xc6b459['shift']());}}}(a0_0x37f2,0x5675a));function a0_0x37f2(){const _0x5c4f5c=['+++','prototype','3205UPXAAO','__setModuleDefault','filterGitLog','length','filterGitDiff','\x20(+','getOwnPropertyDescriptor','136Eboupq','5133465EuQerr','get','\x20\x20??\x20','slice','10uVQzKu','path','356466gcpSQz','5982sVFmXb','startsWith','Clean\x20working\x20tree','call','---END---','create','292732ujJsIK','getOwnPropertyNames','---','filter','entries','match','\x20\x20...\x20(+','default','\x20more\x20modifications','map','basename','join','substring','\x0aChanges:','371924qvEfcY','\x20\x20...\x20+','229334hbXpgN','\x20untracked\x20files)','12GGAsBY','\x20lines\x20of\x20description)','1125876Ujbbxv','trim','dirname','defineProperty','diff\x20--git','[file]\x20','push','__createBinding','__esModule','/\x20(','unknown_file','configurable','split'];a0_0x37f2=function(){return _0x5c4f5c;};return a0_0x37f2();}var __createBinding=this&&this[a0_0x29c3e3(0xcd)]||(Object[a0_0x29c3e3(0xe9)]?function(_0x4d27ac,_0x110fa9,_0x4166e0,_0x206707){const _0x5c74e1=a0_0x29c3e3;if(_0x206707===undefined)_0x206707=_0x4166e0;var _0x29b737=Object[_0x5c74e1(0xdb)](_0x110fa9,_0x4166e0);(!_0x29b737||(_0x5c74e1(0xde)in _0x29b737?!_0x110fa9['__esModule']:_0x29b737['writable']||_0x29b737[_0x5c74e1(0xd1)]))&&(_0x29b737={'enumerable':!![],'get':function(){return _0x110fa9[_0x4166e0];}}),Object[_0x5c74e1(0xc9)](_0x4d27ac,_0x206707,_0x29b737);}:function(_0x1a8774,_0x1cf245,_0x465dad,_0x4560d3){if(_0x4560d3===undefined)_0x4560d3=_0x465dad;_0x1a8774[_0x4560d3]=_0x1cf245[_0x465dad];}),__setModuleDefault=this&&this[a0_0x29c3e3(0xd6)]||(Object['create']?function(_0x265937,_0x1a0ed8){const _0x503540=a0_0x29c3e3;Object[_0x503540(0xc9)](_0x265937,_0x503540(0xf1),{'enumerable':!![],'value':_0x1a0ed8});}:function(_0x4d892d,_0x5e365a){const _0x4e6d34=a0_0x29c3e3;_0x4d892d[_0x4e6d34(0xf1)]=_0x5e365a;}),__importStar=this&&this['__importStar']||(function(){var _0x353626=function(_0x48dd41){const _0x1cb2f2=a0_0x501f;return _0x353626=Object[_0x1cb2f2(0xeb)]||function(_0xd49b88){const _0x40fe17=_0x1cb2f2;var _0x564616=[];for(var _0x257921 in _0xd49b88)if(Object[_0x40fe17(0xd4)]['hasOwnProperty'][_0x40fe17(0xe7)](_0xd49b88,_0x257921))_0x564616[_0x564616['length']]=_0x257921;return _0x564616;},_0x353626(_0x48dd41);};return function(_0x41d8c4){const _0x537aae=a0_0x501f;if(_0x41d8c4&&_0x41d8c4[_0x537aae(0xce)])return _0x41d8c4;var _0x2e593d={};if(_0x41d8c4!=null){for(var _0x1c9f18=_0x353626(_0x41d8c4),_0x9286b3=0x0;_0x9286b3<_0x1c9f18['length'];_0x9286b3++)if(_0x1c9f18[_0x9286b3]!==_0x537aae(0xf1))__createBinding(_0x2e593d,_0x41d8c4,_0x1c9f18[_0x9286b3]);}return __setModuleDefault(_0x2e593d,_0x41d8c4),_0x2e593d;};}());Object[a0_0x29c3e3(0xc9)](exports,a0_0x29c3e3(0xce),{'value':!![]}),exports['filterGitStatus']=filterGitStatus,exports[a0_0x29c3e3(0xd7)]=filterGitLog,exports[a0_0x29c3e3(0xd9)]=filterGitDiff;const path=__importStar(require(a0_0x29c3e3(0xe2)));function filterGitStatus(_0x2e130c){const _0xe6ab93=a0_0x29c3e3,_0x1a75d2=_0x2e130c[_0xe6ab93(0xd2)]('\x0a')[_0xe6ab93(0xf3)](_0x2c4382=>_0x2c4382[_0xe6ab93(0xff)]())[_0xe6ab93(0xed)](_0x1221a9=>_0x1221a9[_0xe6ab93(0xd8)]>0x0);if(_0x1a75d2[_0xe6ab93(0xd8)]===0x0)return _0xe6ab93(0xe6);const _0x76c84=[],_0x411a8d=[],_0x3d5839=[];for(const _0xc4a53 of _0x1a75d2){if(_0xc4a53[_0xe6ab93(0xe5)]('##')){const _0x192901=_0xc4a53['replace'](/^##\s*/,'');_0x76c84['push']('*\x20Branch:\x20'+_0x192901);}else _0xc4a53[_0xe6ab93(0xe5)]('??')?_0x411a8d[_0xe6ab93(0xcc)](_0xc4a53[_0xe6ab93(0xf6)](0x3)[_0xe6ab93(0xff)]()):_0x3d5839[_0xe6ab93(0xcc)](_0xc4a53);}_0x3d5839[_0xe6ab93(0xd8)]>0x0&&(_0x76c84[_0xe6ab93(0xcc)](_0xe6ab93(0xf7)),_0x76c84[_0xe6ab93(0xcc)](..._0x3d5839[_0xe6ab93(0xf3)](_0x40ffed=>'\x20\x20'+_0x40ffed)));if(_0x411a8d[_0xe6ab93(0xd8)]>0x0){_0x76c84[_0xe6ab93(0xcc)]('\x0aUntracked\x20files:');const _0x3bda51={},_0x5d9dc9=[];for(const _0x2d6706 of _0x411a8d){const _0x56e9c2=path[_0xe6ab93(0xc8)](_0x2d6706);_0x56e9c2==='.'||_0x56e9c2===''?_0x5d9dc9[_0xe6ab93(0xcc)](_0x2d6706):(!_0x3bda51[_0x56e9c2]&&(_0x3bda51[_0x56e9c2]=[]),_0x3bda51[_0x56e9c2][_0xe6ab93(0xcc)](path[_0xe6ab93(0xf4)](_0x2d6706)));}for(const [_0x393277,_0x258f3d]of Object[_0xe6ab93(0xee)](_0x3bda51)){if(_0x258f3d[_0xe6ab93(0xd8)]>0x5)_0x76c84['push'](_0xe6ab93(0xdf)+_0x393277+_0xe6ab93(0xcf)+_0x258f3d['length']+_0xe6ab93(0xfb));else for(const _0x169b0c of _0x258f3d){_0x76c84[_0xe6ab93(0xcc)](_0xe6ab93(0xdf)+path[_0xe6ab93(0xf5)](_0x393277,_0x169b0c));}}for(const _0x249191 of _0x5d9dc9){_0x76c84['push'](_0xe6ab93(0xdf)+_0x249191);}}return _0x76c84[_0xe6ab93(0xf5)]('\x0a');}function filterGitLog(_0xeae7b2){const _0x4fbcec=a0_0x29c3e3,_0x268b70=_0xeae7b2[_0x4fbcec(0xd2)](_0x4fbcec(0xe8))['map'](_0x3b97e0=>_0x3b97e0['trim']())[_0x4fbcec(0xed)](_0x5664f2=>_0x5664f2['length']>0x0);if(_0x268b70[_0x4fbcec(0xd8)]===0x0)return _0xeae7b2;const _0x38dfc6=[];for(const _0x2aaff3 of _0x268b70){const _0x1deeea=_0x2aaff3[_0x4fbcec(0xd2)]('\x0a'),_0x3c377b=_0x1deeea[0x0]||'',_0x2519b5=_0x1deeea[_0x4fbcec(0xe0)](0x1)['map'](_0x2d9617=>_0x2d9617['trim']())[_0x4fbcec(0xed)](_0x145b8a=>_0x145b8a[_0x4fbcec(0xd8)]>0x0);_0x38dfc6[_0x4fbcec(0xcc)]('-\x20'+_0x3c377b),_0x2519b5[_0x4fbcec(0xd8)]>0x0&&(_0x38dfc6[_0x4fbcec(0xcc)]('\x20\x20'+_0x2519b5[0x0]),_0x2519b5['length']>0x1&&_0x38dfc6['push'](_0x4fbcec(0xf0)+(_0x2519b5[_0x4fbcec(0xd8)]-0x1)+_0x4fbcec(0xfd)));}return _0x38dfc6['join']('\x0a');}function filterGitDiff(_0x1af106){const _0x5dd98a=a0_0x29c3e3,_0x29f139=_0x1af106['split']('\x0a'),_0x3db37f=[];let _0xdca70='',_0x524d81=0x0,_0x8ebb29=0x0,_0x236329=[];const _0x45dc19=()=>{const _0x4408ea=a0_0x501f;if(_0xdca70&&(_0x524d81>0x0||_0x8ebb29>0x0)){_0x3db37f[_0x4408ea(0xcc)](_0x4408ea(0xcb)+_0xdca70+_0x4408ea(0xda)+_0x524d81+'\x20-'+_0x8ebb29+')');const _0xc6f9d=0xa,_0x30f708=_0x236329[_0x4408ea(0xe0)](0x0,_0xc6f9d);for(const _0xf50a4a of _0x30f708){_0x3db37f['push']('\x20\x20'+_0xf50a4a);}const _0x32d298=_0x524d81+_0x8ebb29-_0xc6f9d;_0x32d298>0x0&&_0x3db37f[_0x4408ea(0xcc)](_0x4408ea(0xf9)+_0x32d298+_0x4408ea(0xf2));}_0x524d81=0x0,_0x8ebb29=0x0,_0x236329=[];};for(const _0x1172c4 of _0x29f139){if(_0x1172c4[_0x5dd98a(0xe5)](_0x5dd98a(0xca))){_0x45dc19();const _0x4e2404=_0x1172c4[_0x5dd98a(0xef)](/\sb\/(.+)$/);_0xdca70=_0x4e2404?_0x4e2404[0x1]:_0x5dd98a(0xd0);}else{if(_0x1172c4[_0x5dd98a(0xe5)]('+')&&!_0x1172c4[_0x5dd98a(0xe5)](_0x5dd98a(0xd3)))_0x524d81++,_0x236329[_0x5dd98a(0xcc)](_0x1172c4);else _0x1172c4['startsWith']('-')&&!_0x1172c4[_0x5dd98a(0xe5)](_0x5dd98a(0xec))&&(_0x8ebb29++,_0x236329[_0x5dd98a(0xcc)](_0x1172c4));}}_0x45dc19();const _0x42eb3e=_0x3db37f[_0x5dd98a(0xf5)]('\x0a');return _0x42eb3e['length']>0x0?_0x42eb3e:'No\x20modifications';}
|
package/filters/go.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';function a0_0x40ed(_0x4826d8,_0x49e59e){_0x4826d8=_0x4826d8-0x98;const _0x1536ee=a0_0x1536();let _0x40ed09=_0x1536ee[_0x4826d8];return _0x40ed09;}function a0_0x1536(){const _0x57c94d=['PASS','join','split','push','match','2505295vrXXWT','FAIL','includes','132LKkAqp','Go\x20test:\x20all\x20tests\x20passed','2299ygdOfY','\x20issues\x20found','---\x20SKIP:','16830qGGUPi','57976mNxwvK','\x20passed,\x20','\x20\x20\x20\x20...\x20+','12LVFDet','\x20more\x20issues','3xytibN','defineProperty','filterGoTest','\x20skipped','\x20more\x20failures','trim','...\x20+','16941184WeWauN','1752teCBQE','no\x20test\x20files','Go\x20test:\x20no\x20test\x20files','===\x20RUN','Go\x20vet:\x20no\x20issues\x20found','slice','startsWith','Go\x20test:\x20','__esModule','length','36907UUpxLn','\x20\x20\x20\x20','\x20failed,\x20','filterGoVet','Go\x20vet:\x20','26250ZUiWlw','115409FVWRAT','4CVpdPH','lines'];a0_0x1536=function(){return _0x57c94d;};return a0_0x1536();}const a0_0x443bc6=a0_0x40ed;(function(_0x41cf19,_0x11f0e6){const _0xf74548=a0_0x40ed,_0x3e6ceb=_0x41cf19();while(!![]){try{const _0x16ee01=parseInt(_0xf74548(0xa3))/0x1+-parseInt(_0xf74548(0xba))/0x2*(parseInt(_0xf74548(0xbf))/0x3)+parseInt(_0xf74548(0xaa))/0x4*(-parseInt(_0xf74548(0xb1))/0x5)+-parseInt(_0xf74548(0xb4))/0x6*(parseInt(_0xf74548(0xa9))/0x7)+parseInt(_0xf74548(0x99))/0x8*(parseInt(_0xf74548(0xb9))/0x9)+parseInt(_0xf74548(0xa8))/0xa*(-parseInt(_0xf74548(0xb6))/0xb)+-parseInt(_0xf74548(0xbd))/0xc*(-parseInt(_0xf74548(0x98))/0xd);if(_0x16ee01===_0x11f0e6)break;else _0x3e6ceb['push'](_0x3e6ceb['shift']());}catch(_0x48338c){_0x3e6ceb['push'](_0x3e6ceb['shift']());}}}(a0_0x1536,0x4b3fb));Object[a0_0x443bc6(0xc0)](exports,a0_0x443bc6(0xa1),{'value':!![]}),exports[a0_0x443bc6(0xc1)]=filterGoTest,exports[a0_0x443bc6(0xa6)]=filterGoVet;function filterGoTest(_0x58ac9b){const _0x48fb3d=a0_0x443bc6,_0x1c5ece=_0x58ac9b[_0x48fb3d(0xae)]('\x0a');let _0x583e62=0x0,_0x35dd95=0x0,_0x30967c=0x0;const _0x2febb3=[],_0x28a862=[];let _0x7843e8=null;for(const _0x479b2b of _0x1c5ece){const _0xb0bd6c=_0x479b2b[_0x48fb3d(0xc4)](),_0x315f9a=_0xb0bd6c[_0x48fb3d(0xb0)](/^ok\s+\S+\s+[\d.]+s/);if(_0x315f9a){_0x28a862[_0x48fb3d(0xaf)](_0xb0bd6c);continue;}const _0x2687d7=_0xb0bd6c[_0x48fb3d(0xb0)](/^FAIL\s+\S+/);if(_0x2687d7){_0x28a862[_0x48fb3d(0xaf)](_0xb0bd6c);continue;}const _0x556054=_0xb0bd6c[_0x48fb3d(0xb0)](/^--- PASS:/);if(_0x556054){_0x583e62++;continue;}const _0x1abbd3=_0xb0bd6c[_0x48fb3d(0xb0)](/^--- FAIL:\s+(\S+)/);if(_0x1abbd3){if(_0x7843e8)_0x2febb3[_0x48fb3d(0xaf)](_0x7843e8);_0x7843e8={'name':_0x1abbd3[0x1],'lines':[]},_0x35dd95++;continue;}if(_0xb0bd6c[_0x48fb3d(0x9f)](_0x48fb3d(0xb8))){_0x30967c++;continue;}_0x7843e8&&_0xb0bd6c['length']>0x0&&!_0xb0bd6c['startsWith'](_0x48fb3d(0x9c))&&_0x7843e8[_0x48fb3d(0xab)]['push'](_0x479b2b),_0xb0bd6c['startsWith']('===\x20RUN')&&(_0x7843e8&&(_0x2febb3['push'](_0x7843e8),_0x7843e8=null));}if(_0x7843e8)_0x2febb3[_0x48fb3d(0xaf)](_0x7843e8);if(_0x583e62===0x0&&_0x35dd95===0x0&&_0x30967c===0x0){if(_0x58ac9b[_0x48fb3d(0xb3)](_0x48fb3d(0xac))&&!_0x58ac9b[_0x48fb3d(0xb3)](_0x48fb3d(0xb2)))return _0x48fb3d(0xb5);if(_0x58ac9b[_0x48fb3d(0xb3)](_0x48fb3d(0x9a)))return _0x48fb3d(0x9b);return _0x58ac9b;}if(_0x35dd95===0x0){const _0x594a3f=[_0x48fb3d(0xa0)+_0x583e62+'\x20passed'];if(_0x30967c>0x0)_0x594a3f[_0x48fb3d(0xaf)](_0x30967c+_0x48fb3d(0xc2));return _0x594a3f[_0x48fb3d(0xad)](',\x20');}const _0x211df6=['Go\x20test:\x20'+_0x583e62+_0x48fb3d(0xbb)+_0x35dd95+_0x48fb3d(0xa5)+_0x30967c+'\x20skipped'];if(_0x2febb3['length']>0x0){_0x211df6[_0x48fb3d(0xaf)]('\x0aFailures:');const _0x239973=0x3;for(let _0x5ab9bd=0x0;_0x5ab9bd<Math['min'](_0x2febb3[_0x48fb3d(0xa2)],_0x239973);_0x5ab9bd++){const _0x2e59a7=_0x2febb3[_0x5ab9bd];_0x211df6['push']('\x20\x20'+(_0x5ab9bd+0x1)+'.\x20'+_0x2e59a7['name']);for(const _0x3d04b6 of _0x2e59a7[_0x48fb3d(0xab)]['slice'](0x0,0x5)){_0x211df6['push'](_0x48fb3d(0xa4)+_0x3d04b6[_0x48fb3d(0xc4)]());}_0x2e59a7[_0x48fb3d(0xab)][_0x48fb3d(0xa2)]>0x5&&_0x211df6[_0x48fb3d(0xaf)](_0x48fb3d(0xbc)+(_0x2e59a7[_0x48fb3d(0xab)][_0x48fb3d(0xa2)]-0x5)+'\x20more\x20lines');}_0x2febb3[_0x48fb3d(0xa2)]>_0x239973&&_0x211df6[_0x48fb3d(0xaf)]('\x20\x20...\x20+'+(_0x2febb3[_0x48fb3d(0xa2)]-_0x239973)+_0x48fb3d(0xc3));}return _0x211df6[_0x48fb3d(0xad)]('\x0a');}function filterGoVet(_0x6516cf){const _0x3784c5=a0_0x443bc6,_0x47881a=_0x6516cf[_0x3784c5(0xae)]('\x0a')['filter'](_0x1a761c=>_0x1a761c[_0x3784c5(0xc4)]()['length']>0x0);if(_0x47881a['length']===0x0)return _0x3784c5(0x9d);if(_0x47881a[_0x3784c5(0xa2)]<=0x14)return _0x6516cf[_0x3784c5(0xc4)]();const _0x564b6c=[_0x3784c5(0xa7)+_0x47881a[_0x3784c5(0xa2)]+_0x3784c5(0xb7)];return _0x564b6c[_0x3784c5(0xaf)](..._0x47881a[_0x3784c5(0x9e)](0x0,0xa)),_0x47881a[_0x3784c5(0xa2)]>0xa&&_0x564b6c[_0x3784c5(0xaf)](_0x3784c5(0xc5)+(_0x47881a[_0x3784c5(0xa2)]-0xa)+_0x3784c5(0xbe)),_0x564b6c[_0x3784c5(0xad)]('\x0a');}
|
package/filters/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x17c65a=a0_0x5ef1;(function(_0x1f53a0,_0x563e23){const _0x1c5456=a0_0x5ef1,_0x3372b3=_0x1f53a0();while(!![]){try{const _0x4229cb=parseInt(_0x1c5456(0xc8))/0x1*(parseInt(_0x1c5456(0x107))/0x2)+parseInt(_0x1c5456(0x10d))/0x3*(parseInt(_0x1c5456(0xc3))/0x4)+parseInt(_0x1c5456(0xe4))/0x5*(parseInt(_0x1c5456(0xff))/0x6)+parseInt(_0x1c5456(0xbe))/0x7*(-parseInt(_0x1c5456(0xed))/0x8)+parseInt(_0x1c5456(0xef))/0x9+-parseInt(_0x1c5456(0x102))/0xa+-parseInt(_0x1c5456(0x110))/0xb;if(_0x4229cb===_0x563e23)break;else _0x3372b3['push'](_0x3372b3['shift']());}catch(_0x2a1e1c){_0x3372b3['push'](_0x3372b3['shift']());}}}(a0_0x117a,0x58690));Object[a0_0x17c65a(0xe2)](exports,a0_0x17c65a(0xe9),{'value':!![]}),exports[a0_0x17c65a(0xf4)]=void 0x0,exports['compressOutput']=compressOutput,exports['rewriteCommand']=rewriteCommand;function a0_0x5ef1(_0x4d61a7,_0x18925e){_0x4d61a7=_0x4d61a7-0xbb;const _0x117adb=a0_0x117a();let _0x5ef170=_0x117adb[_0x4d61a7];return _0x5ef170;}function a0_0x117a(){const _0x3d8525=['trim\x20pytest','filterJestVitest','1XwTVTq','trim\x20gh','filterPipInstall','filterGitLog','./rust','filterGoTest','match','npm\x20i\x20','./git','test','ruff\x20check','filterCat','filterCargoBuild','collapseDuplicates','pip3\x20install','vitest','get','trim\x20docker','filterTree','filterGrep','yarn\x20install','filterGitDiff','npm\x20i','trim','startsWith','./devops','defineProperty','filterDockerPs','5xhHCzM','trim\x20npx','trim\x20glab','pnpm\x20test','kubectl','__esModule','text','softTruncate','pnpm\x20install','13584zWMqxI','cargo\x20clippy','5268375IgwytL','./go','pattern','yadm\x20diff','cargo\x20test','lastRedactAudit','trim\x20cargo','./js','filterKubectl','filterDockerImages','filterFind','pytest','filterRuff','endsWith','\x20tree\x20','cargo\x20check','364632MjpAbG','trim\x20git','redactor','1441070BvUTgu','./generic','filterNpmInstall','./python','yarn\x20test','489766OtcRyz','includes','trim\x20','filterGoVet','trim\x20npm','length','102KfUlxf','git\x20log','trim\x20tree','2114101YlBxwA','yadm\x20status','\x20tree','filterLs','trim\x20find','2282RWYcru','redactWithAudit','go\x20test','filterDockerLogs','git\x20show','42464gVcOBf','filterGitStatus','pip\x20install'];a0_0x117a=function(){return _0x3d8525;};return a0_0x117a();}const generic_1=require(a0_0x17c65a(0x103)),git_1=require(a0_0x17c65a(0xd0)),python_1=require(a0_0x17c65a(0x105)),js_1=require(a0_0x17c65a(0xf6)),shell_1=require('./shell'),rust_1=require(a0_0x17c65a(0xcc)),go_1=require(a0_0x17c65a(0xf0)),devops_1=require(a0_0x17c65a(0xe1)),redactor_1=require('../redactor');exports['lastRedactAudit']={'secretsFound':0x0,'secretTypes':[]};function compressOutput(_0x3f0e48,_0x375e7a,_0x5d4d4d,_0x3a65ea=!![]){const _0xf11052=a0_0x17c65a,_0x4d8957=_0x3f0e48[_0xf11052(0xdf)]();let _0x2d2bb7=_0x375e7a;_0x5d4d4d[_0xf11052(0xdf)]()[_0xf11052(0x10c)]>0x0&&(_0x2d2bb7=_0x375e7a+'\x0a'+_0x5d4d4d);let _0x89c2cb=(0x0,generic_1['stripAnsi'])(_0x2d2bb7);if(_0x3a65ea){const _0x503cf1=redactor_1[_0xf11052(0x101)][_0xf11052(0xbf)](_0x89c2cb);_0x89c2cb=_0x503cf1[_0xf11052(0xea)],exports[_0xf11052(0xf4)]={'secretsFound':_0x503cf1['secretsFound'],'secretTypes':_0x503cf1['secretTypes']};}else exports[_0xf11052(0xf4)]={'secretsFound':0x0,'secretTypes':[]};const _0x48d116=_0x4d8957['toLowerCase']();try{if(_0x48d116[_0xf11052(0x108)]('git\x20status')||_0x48d116['includes'](_0xf11052(0x111)))return(0x0,git_1[_0xf11052(0xc4)])(_0x89c2cb);if(_0x48d116['includes'](_0xf11052(0x10e))||_0x48d116[_0xf11052(0x108)]('yadm\x20log'))return(0x0,git_1[_0xf11052(0xcb)])(_0x89c2cb);if(_0x48d116[_0xf11052(0x108)]('git\x20diff')||_0x48d116['includes'](_0xf11052(0xc2))||_0x48d116[_0xf11052(0x108)](_0xf11052(0xf2)))return(0x0,git_1[_0xf11052(0xdd)])(_0x89c2cb);if(_0x48d116['includes'](_0xf11052(0xfa))||_0x48d116[_0xf11052(0xce)](/python3?\s+-m\s+pytest/))return(0x0,python_1['filterPytest'])(_0x89c2cb);if(_0x48d116[_0xf11052(0x108)](_0xf11052(0xc5))||_0x48d116['includes'](_0xf11052(0xd6)))return(0x0,python_1[_0xf11052(0xca)])(_0x89c2cb);if(_0x48d116[_0xf11052(0x108)](_0xf11052(0xd2))||_0x48d116[_0xf11052(0x108)]('ruff\x20'))return(0x0,devops_1[_0xf11052(0xfb)])(_0x89c2cb);if(_0x48d116[_0xf11052(0x108)]('npm\x20install')||_0x48d116[_0xf11052(0x108)](_0xf11052(0xcf))||_0x48d116[_0xf11052(0xfc)](_0xf11052(0xde))||_0x48d116[_0xf11052(0x108)](_0xf11052(0xec))||_0x48d116[_0xf11052(0x108)](_0xf11052(0xdc)))return(0x0,js_1[_0xf11052(0x104)])(_0x89c2cb);if(_0x48d116['includes']('jest')||_0x48d116['includes'](_0xf11052(0xd7)))return(0x0,js_1[_0xf11052(0xc7)])(_0x89c2cb);if(_0x48d116[_0xf11052(0x108)]('npm\x20test')||_0x48d116[_0xf11052(0x108)](_0xf11052(0xe7))||_0x48d116['includes'](_0xf11052(0x106))||_0x48d116[_0xf11052(0x108)]('npm\x20run\x20test'))return(0x0,js_1[_0xf11052(0xc7)])(_0x89c2cb);if(_0x48d116[_0xf11052(0x108)](_0xf11052(0xf3)))return(0x0,rust_1['filterCargoTest'])(_0x89c2cb);if(_0x48d116[_0xf11052(0x108)]('cargo\x20build')||_0x48d116[_0xf11052(0x108)](_0xf11052(0xfe))||_0x48d116[_0xf11052(0x108)](_0xf11052(0xee)))return(0x0,rust_1[_0xf11052(0xd4)])(_0x89c2cb);if(_0x48d116[_0xf11052(0x108)](_0xf11052(0xc0)))return(0x0,go_1[_0xf11052(0xcd)])(_0x89c2cb);if(_0x48d116['includes']('go\x20vet'))return(0x0,go_1[_0xf11052(0x10a)])(_0x89c2cb);if(_0x48d116['match'](/docker\s+ps/))return(0x0,devops_1[_0xf11052(0xe3)])(_0x89c2cb);if(_0x48d116[_0xf11052(0xce)](/docker\s+images/))return(0x0,devops_1[_0xf11052(0xf8)])(_0x89c2cb);if(_0x48d116['match'](/docker\s+logs/))return(0x0,devops_1[_0xf11052(0xc1)])(_0x89c2cb);if(_0x48d116[_0xf11052(0x108)](_0xf11052(0xe8))){const _0x2711b2=_0x48d116[_0xf11052(0xce)](/kubectl\s+(get|logs|describe|apply)/),_0x42d2f7=_0x2711b2?_0x2711b2[0x1]:_0xf11052(0xd8);return(0x0,devops_1[_0xf11052(0xf7)])(_0x89c2cb,_0x42d2f7);}if(_0x48d116[_0xf11052(0xce)](/^(ls|dir)(\s|$)/)||_0x48d116['includes']('\x20ls\x20')||_0x48d116['endsWith']('\x20ls'))return(0x0,shell_1[_0xf11052(0xbc)])(_0x89c2cb);if(_0x48d116[_0xf11052(0xce)](/^tree(\s|$)/)||_0x48d116[_0xf11052(0x108)](_0xf11052(0xfd))||_0x48d116[_0xf11052(0xfc)](_0xf11052(0xbb)))return(0x0,shell_1[_0xf11052(0xda)])(_0x89c2cb);if(_0x48d116[_0xf11052(0xce)](/^(cat|head|tail|read|bat)(\s|$)/))return(0x0,shell_1[_0xf11052(0xd3)])(_0x89c2cb,_0x4d8957);if(_0x48d116[_0xf11052(0xce)](/^find(\s|$)/))return(0x0,shell_1[_0xf11052(0xf9)])(_0x89c2cb);if(_0x48d116[_0xf11052(0xce)](/^(grep|rg|ripgrep)(\s|$)/))return(0x0,shell_1[_0xf11052(0xdb)])(_0x89c2cb);}catch(_0x42b77c){}return _0x89c2cb=(0x0,generic_1[_0xf11052(0xd5)])(_0x89c2cb),_0x89c2cb=(0x0,generic_1[_0xf11052(0xeb)])(_0x89c2cb,0x4e20),_0x89c2cb;}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_0x17c65a(0x100)},{'pattern':/^gh\s+(pr|issue|run|repo|api|release)/,'prefix':a0_0x17c65a(0xc9)},{'pattern':/^glab\s+(mr|issue|ci|pipeline|api|release)/,'prefix':a0_0x17c65a(0xe6)},{'pattern':/^cargo\s+(build|test|clippy|check|fmt|install)/,'prefix':a0_0x17c65a(0xf5)},{'pattern':/^pnpm\s+(exec|i|install|list|ls|outdated|run|run-script)/,'prefix':'trim\x20pnpm'},{'pattern':/^npm\s+(exec|run|run-script|rum|urn|x|test)(\s|$)/,'prefix':a0_0x17c65a(0x10b)},{'pattern':/^npx\s+/,'prefix':a0_0x17c65a(0xe5)},{'pattern':/^(cat|head|tail)\s+/,'prefix':'trim\x20read'},{'pattern':/^(rg|grep)\s+/,'prefix':'trim\x20grep'},{'pattern':/^ls(\s|$)/,'prefix':'trim\x20ls'},{'pattern':/^tree(\s|$)/,'prefix':a0_0x17c65a(0x10f)},{'pattern':/^find\s+/,'prefix':a0_0x17c65a(0xbd)},{'pattern':/^docker\s+(ps|images|logs|run|exec|build|compose)/,'prefix':a0_0x17c65a(0xd9)},{'pattern':/^kubectl\s+(get|logs|describe|apply)/,'prefix':'trim\x20kubectl'},{'pattern':/^(python3?\s+-m\s+)?pytest(\s|$)/,'prefix':a0_0x17c65a(0xc6)},{'pattern':/^ruff\s+(check|format)/,'prefix':'trim\x20ruff'},{'pattern':/^(pip3?|uv\s+pip)\s+(list|outdated|install|show)/,'prefix':'trim\x20pip'},{'pattern':/^go\s+(test|build|vet)/,'prefix':'trim\x20go'}];function rewriteCommand(_0x3f04b0){const _0x1ac9cd=a0_0x17c65a,_0x4f4800=_0x3f04b0[_0x1ac9cd(0xdf)]();if(_0x4f4800[_0x1ac9cd(0xe0)](_0x1ac9cd(0x109)))return _0x4f4800;for(const _0x172cdd of REWRITE_RULES){if(_0x172cdd[_0x1ac9cd(0xf1)][_0x1ac9cd(0xd1)](_0x4f4800))return'trim\x20'+_0x4f4800;}return _0x4f4800;}
|
package/filters/js.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';(function(_0x8a61f,_0x2aee87){const _0x2f83a1=a0_0x108b,_0x24face=_0x8a61f();while(!![]){try{const _0x221745=-parseInt(_0x2f83a1(0xdb))/0x1+parseInt(_0x2f83a1(0xc9))/0x2+parseInt(_0x2f83a1(0xcb))/0x3*(-parseInt(_0x2f83a1(0xd5))/0x4)+-parseInt(_0x2f83a1(0xc6))/0x5+-parseInt(_0x2f83a1(0xd8))/0x6+-parseInt(_0x2f83a1(0xe3))/0x7+-parseInt(_0x2f83a1(0xdd))/0x8*(-parseInt(_0x2f83a1(0xdc))/0x9);if(_0x221745===_0x2aee87)break;else _0x24face['push'](_0x24face['shift']());}catch(_0x5f12ed){_0x24face['push'](_0x24face['shift']());}}}(a0_0xa754,0xdebc8));function a0_0x108b(_0x3cd34e,_0x94a380){_0x3cd34e=_0x3cd34e-0xc5;const _0xa75476=a0_0xa754();let _0x108b8d=_0xa75476[_0x3cd34e];return _0x108b8d;}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['filterNpmInstall']=filterNpmInstall,exports['filterJestVitest']=filterJestVitest;function filterNpmInstall(_0x935922){const _0x1b4da1=a0_0x108b,_0x39c367=_0x935922[_0x1b4da1(0xe2)](/\r/g,'\x0a'),_0xa6e391=_0x39c367[_0x1b4da1(0xe7)]('\x0a'),_0x73adf8=[];for(const _0x113ad1 of _0xa6e391){const _0x413363=_0x113ad1[_0x1b4da1(0xe8)]();(_0x413363['includes'](_0x1b4da1(0xd2))||_0x413363['includes'](_0x1b4da1(0xdf))||_0x413363[_0x1b4da1(0xd4)](_0x1b4da1(0xce))||_0x413363[_0x1b4da1(0xd4)](_0x1b4da1(0xda))||_0x413363[_0x1b4da1(0xd4)](_0x1b4da1(0xea)))&&(!_0x413363[_0x1b4da1(0xd4)]('%')&&!_0x413363[_0x1b4da1(0xc5)]('⠋')&&!_0x413363[_0x1b4da1(0xc5)]('⠙')&&_0x73adf8[_0x1b4da1(0xca)](_0x413363));}const _0x1bbf35=_0x73adf8[_0x1b4da1(0xd6)]('\x0a')[_0x1b4da1(0xe8)]();return _0x1bbf35[_0x1b4da1(0xd9)]>0x0?_0x1bbf35:_0x1b4da1(0xe1);}function filterJestVitest(_0x59479d){const _0x2415c6=a0_0x108b,_0x2de311=_0x59479d[_0x2415c6(0xe7)]('\x0a');let _0x48ba06=0x0,_0x516214=0x0,_0x53f252=0x0;const _0x6b81cd=[];let _0x2e8d87=![];for(const _0x51ddef of _0x2de311){const _0x412160=_0x51ddef['trim']();if(_0x412160['startsWith'](_0x2415c6(0xe5))||_0x412160['includes']('Test\x20Files:')){const _0x55eaba=_0x412160[_0x2415c6(0xc8)](/(\d+)\s+passed/),_0x5a96f2=_0x412160['match'](/(\d+)\s+failed/),_0x43c9fb=_0x412160[_0x2415c6(0xc8)](/(\d+)\s+total/);if(_0x55eaba)_0x48ba06=parseInt(_0x55eaba[0x1]);if(_0x5a96f2)_0x516214=parseInt(_0x5a96f2[0x1]);if(_0x43c9fb)_0x53f252=parseInt(_0x43c9fb[0x1]);continue;}(_0x412160[_0x2415c6(0xc5)]('❯')||_0x412160[_0x2415c6(0xc5)]('●')||_0x412160[_0x2415c6(0xc5)](_0x2415c6(0xe9)))&&(_0x2e8d87=!![]),_0x2e8d87&&(_0x412160[_0x2415c6(0xd9)]>0x0&&!_0x412160['startsWith'](_0x2415c6(0xcf))&&!_0x412160['startsWith'](_0x2415c6(0xe5))&&_0x6b81cd[_0x2415c6(0xca)](_0x51ddef));}if(_0x53f252===0x0&&_0x48ba06===0x0&&_0x516214===0x0){if(_0x59479d[_0x2415c6(0xd4)](_0x2415c6(0xe0))&&!_0x59479d['includes'](_0x2415c6(0xcd))){const _0x4f4f47=_0x59479d[_0x2415c6(0xc8)](/(\d+)\s+passed/),_0x2c228f=_0x4f4f47?_0x4f4f47[0x1]:'all';return _0x2415c6(0xd0)+_0x2c228f+_0x2415c6(0xe6);}return _0x59479d;}if(_0x516214===0x0&&_0x48ba06>0x0)return _0x2415c6(0xd0)+_0x48ba06+_0x2415c6(0xe6);const _0x57a5d8=[_0x2415c6(0xd0)+_0x48ba06+_0x2415c6(0xde)+_0x516214+_0x2415c6(0xd3)+_0x53f252+_0x2415c6(0xc7)];if(_0x6b81cd[_0x2415c6(0xd9)]>0x0){_0x57a5d8['push'](_0x2415c6(0xcc));const _0x5e18a5=0x19,_0x6ed822=_0x6b81cd[_0x2415c6(0xd1)](0x0,_0x5e18a5);for(const _0x52311f of _0x6ed822){_0x57a5d8[_0x2415c6(0xca)]('\x20\x20'+_0x52311f);}_0x6b81cd[_0x2415c6(0xd9)]>_0x5e18a5&&_0x57a5d8[_0x2415c6(0xca)](_0x2415c6(0xd7)+(_0x6b81cd[_0x2415c6(0xd9)]-_0x5e18a5)+_0x2415c6(0xe4));}return _0x57a5d8['join']('\x0a');}function a0_0xa754(){const _0x50f2d6=['PASS','NPM:\x20Packages\x20verified/installed\x20successfully','replace','3819557YIoDvz','\x20lines\x20of\x20trace\x20details\x20truncated)','Tests:','\x20passed','split','trim','FAIL\x20\x20','found\x20','startsWith','6318180pRPVNd','\x20total)','match','1895578AuQAGp','push','3tVFARD','\x0aFailures:','FAIL','audited\x20','Test\x20Suites:','Test\x20Runner:\x20','slice','added\x20','\x20failed\x20(','includes','1358768VYqETz','join','\x20\x20...\x20(','2048064DqRmVz','length','up\x20to\x20date','1014609bSAXBa','657rTUUEE','380216KYvnzj','\x20passed,\x20','removed\x20'];a0_0xa754=function(){return _0x50f2d6;};return a0_0xa754();}
|