trimprompt 1.0.16 → 1.0.17
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/index.html +43 -2
- package/mcp.js +1 -1
- package/package.json +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/cache.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x3b83a8=a0_0x177b;(function(_0xfd1314,_0x5c85d2){const _0x503d69=a0_0x177b,_0x389f84=_0xfd1314();while(!![]){try{const _0x5b151c=-parseInt(_0x503d69(0x1fd))/0x1+parseInt(_0x503d69(0x21a))/0x2+parseInt(_0x503d69(0x21e))/0x3+-parseInt(_0x503d69(0x1ed))/0x4*(parseInt(_0x503d69(0x22c))/0x5)+-parseInt(_0x503d69(0x1fa))/0x6+-parseInt(_0x503d69(0x222))/0x7*(-parseInt(_0x503d69(0x20b))/0x8)+parseInt(_0x503d69(0x219))/0x9;if(_0x5b151c===_0x5c85d2)break;else _0x389f84['push'](_0x389f84['shift']());}catch(_0x455cf3){_0x389f84['push'](_0x389f84['shift']());}}}(a0_0x5945,0xe6f35));var __createBinding=this&&this[a0_0x3b83a8(0x216)]||(Object[a0_0x3b83a8(0x1e6)]?function(_0x1b0503,_0x5c01a2,_0x161519,_0x46768e){const _0x543748=a0_0x3b83a8;if(_0x46768e===undefined)_0x46768e=_0x161519;var _0x5ceda4=Object[_0x543748(0x1f3)](_0x5c01a2,_0x161519);(!_0x5ceda4||(_0x543748(0x209)in _0x5ceda4?!_0x5c01a2[_0x543748(0x203)]:_0x5ceda4[_0x543748(0x22e)]||_0x5ceda4[_0x543748(0x1ea)]))&&(_0x5ceda4={'enumerable':!![],'get':function(){return _0x5c01a2[_0x161519];}}),Object['defineProperty'](_0x1b0503,_0x46768e,_0x5ceda4);}:function(_0x2f440f,_0x503465,_0x332cda,_0x1e38a9){if(_0x1e38a9===undefined)_0x1e38a9=_0x332cda;_0x2f440f[_0x1e38a9]=_0x503465[_0x332cda];}),__setModuleDefault=this&&this[a0_0x3b83a8(0x228)]||(Object[a0_0x3b83a8(0x1e6)]?function(_0x564cdd,_0x1d2e56){const _0x459976=a0_0x3b83a8;Object[_0x459976(0x215)](_0x564cdd,_0x459976(0x210),{'enumerable':!![],'value':_0x1d2e56});}:function(_0x4564f3,_0x3376d5){const _0x2788a5=a0_0x3b83a8;_0x4564f3[_0x2788a5(0x210)]=_0x3376d5;}),__importStar=this&&this['__importStar']||(function(){var _0x387322=function(_0x1527da){const _0x12feb7=a0_0x177b;return _0x387322=Object[_0x12feb7(0x226)]||function(_0x557906){const _0x1c40c7=_0x12feb7;var _0x2dab5f=[];for(var _0x533484 in _0x557906)if(Object[_0x1c40c7(0x22d)]['hasOwnProperty'][_0x1c40c7(0x201)](_0x557906,_0x533484))_0x2dab5f[_0x2dab5f['length']]=_0x533484;return _0x2dab5f;},_0x387322(_0x1527da);};return function(_0x523577){const _0x217345=a0_0x177b;if(_0x523577&&_0x523577[_0x217345(0x203)])return _0x523577;var _0x460ac0={};if(_0x523577!=null){for(var _0x3b9a72=_0x387322(_0x523577),_0x7d397f=0x0;_0x7d397f<_0x3b9a72[_0x217345(0x212)];_0x7d397f++)if(_0x3b9a72[_0x7d397f]!=='default')__createBinding(_0x460ac0,_0x523577,_0x3b9a72[_0x7d397f]);}return __setModuleDefault(_0x460ac0,_0x523577),_0x460ac0;};}());Object[a0_0x3b83a8(0x215)](exports,a0_0x3b83a8(0x203),{'value':!![]}),exports[a0_0x3b83a8(0x206)]=dedup;function a0_0x177b(_0x94b7a2,_0xf37e7d){const _0x5945b3=a0_0x5945();return a0_0x177b=function(_0x177b85,_0x44623c){_0x177b85=_0x177b85-0x1e4;let _0xca27e0=_0x5945b3[_0x177b85];return _0xca27e0;},a0_0x177b(_0x94b7a2,_0xf37e7d);}const fs=__importStar(require('fs')),path=__importStar(require(a0_0x3b83a8(0x21b))),os=__importStar(require('os')),crypto=__importStar(require(a0_0x3b83a8(0x22b))),CACHE_DIR=path['join'](os[a0_0x3b83a8(0x217)](),'.trimprompt'),CACHE_FILE=path[a0_0x3b83a8(0x227)](CACHE_DIR,a0_0x3b83a8(0x1f6)),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(_0x4e6736){const _0x48257d=a0_0x3b83a8,_0xb70281=_0x4e6736[_0x48257d(0x223)]()[_0x48257d(0x1f8)]();if(_0xb70281[_0x48257d(0x224)](/^(cat|head|tail|read|bat)\s/))return _0x48257d(0x1f2);if(_0xb70281[_0x48257d(0x21d)](_0x48257d(0x1f9))||_0xb70281[_0x48257d(0x21d)](_0x48257d(0x1fe)))return'git-status';if(_0xb70281[_0x48257d(0x21d)]('git\x20log')||_0xb70281[_0x48257d(0x21d)](_0x48257d(0x1ff)))return _0x48257d(0x225);if(_0xb70281[_0x48257d(0x21d)]('git\x20show')||_0xb70281[_0x48257d(0x21d)]('yadm\x20show'))return _0x48257d(0x213);if(_0xb70281[_0x48257d(0x224)](/^(ls|dir)(\s|$)/)||_0xb70281[_0x48257d(0x21d)](_0x48257d(0x1e9))||_0xb70281['endsWith']('\x20ls'))return'ls';if(_0xb70281['match'](/^tree(\s|$)/)||_0xb70281['includes'](_0x48257d(0x202))||_0xb70281['endsWith'](_0x48257d(0x1e8)))return _0x48257d(0x204);if(_0xb70281[_0x48257d(0x224)](/docker\s+ps/))return _0x48257d(0x200);if(_0xb70281[_0x48257d(0x224)](/docker\s+images/))return _0x48257d(0x1eb);if(_0xb70281[_0x48257d(0x21d)](_0x48257d(0x20c))||_0xb70281[_0x48257d(0x21d)]('kubectl\x20describe'))return'kubectl';if(_0xb70281[_0x48257d(0x21d)](_0x48257d(0x207))||_0xb70281['includes'](_0x48257d(0x218)))return _0x48257d(0x1f7);if(_0xb70281[_0x48257d(0x21d)](_0x48257d(0x221)))return _0x48257d(0x20a);return'';}function md5(_0x4ac6a8){const _0x1fb56f=a0_0x3b83a8;return crypto[_0x1fb56f(0x211)](_0x1fb56f(0x22a))['update'](_0x4ac6a8)[_0x1fb56f(0x214)](_0x1fb56f(0x1e4));}function loadStore(){const _0x282e99=a0_0x3b83a8;try{if(fs[_0x282e99(0x21f)](CACHE_FILE))return JSON[_0x282e99(0x1ec)](fs[_0x282e99(0x20d)](CACHE_FILE,_0x282e99(0x1fb)));}catch{}return{};}function saveStore(_0x3b7f57){const _0x1af6cd=a0_0x3b83a8;try{if(!fs['existsSync'](CACHE_DIR))fs[_0x1af6cd(0x21c)](CACHE_DIR,{'recursive':!![]});const _0x36ce33=Object[_0x1af6cd(0x1f4)](_0x3b7f57);if(_0x36ce33[_0x1af6cd(0x212)]>MAX_ENTRIES){const _0x53f961=_0x36ce33[_0x1af6cd(0x1f5)]((_0x58f118,_0x57450e)=>_0x3b7f57[_0x58f118][_0x1af6cd(0x1ef)]-_0x3b7f57[_0x57450e]['timestamp']);for(const _0x1ae462 of _0x53f961['slice'](0x0,_0x36ce33['length']-MAX_ENTRIES)){delete _0x3b7f57[_0x1ae462];}}fs[_0x1af6cd(0x208)](CACHE_FILE,JSON[_0x1af6cd(0x1ee)](_0x3b7f57),_0x1af6cd(0x1fb));}catch{}}function buildSummary(_0xbd90d1,_0x1e772d){const _0x1645e1=a0_0x3b83a8,_0x4e586d=_0xbd90d1[_0x1645e1(0x1f1)]('\x0a')['length'],_0x16dcc4=_0xbd90d1['length'];if(_0x1e772d===_0x1645e1(0x1f2))return _0x4e586d+'\x20lines,\x20'+_0x16dcc4+_0x1645e1(0x205);if(_0x1e772d==='git-status')return _0x4e586d+_0x1645e1(0x20f);if(_0x1e772d==='git-log')return _0x4e586d+_0x1645e1(0x1f0);if(_0x1e772d[_0x1645e1(0x1e7)]('docker'))return _0x4e586d+_0x1645e1(0x20f);return _0x4e586d+'\x20lines,\x20'+_0x16dcc4+_0x1645e1(0x205);}function dedup(_0xcbdec5,_0x4730f2){const _0x44f067=a0_0x3b83a8;try{const _0x25cffd=classifyCommand(_0xcbdec5);if(!_0x25cffd)return null;const _0x5e3505=TTL_SECONDS[_0x25cffd];if(!_0x5e3505)return null;const _0x1595f8=process[_0x44f067(0x229)](),_0x3c74ba=md5(_0x1595f8+'::'+_0xcbdec5['trim']()),_0x4c8a68=md5(_0x4730f2),_0x4dbdff=Date[_0x44f067(0x1e5)](),_0x1c7f0d=loadStore(),_0x5e16f3=_0x1c7f0d[_0x3c74ba];if(_0x5e16f3&&_0x5e16f3[_0x44f067(0x1fc)]===_0x4c8a68&&_0x4dbdff-_0x5e16f3[_0x44f067(0x1ef)]<_0x5e3505*0x3e8){const _0x519a81=Math['round']((_0x4dbdff-_0x5e16f3[_0x44f067(0x1ef)])/0x3e8);return'[cached\x20—\x20unchanged\x20since\x20'+_0x519a81+_0x44f067(0x20e)+_0x5e16f3[_0x44f067(0x220)]+']';}_0x1c7f0d[_0x3c74ba]={'hash':_0x4c8a68,'summary':buildSummary(_0x4730f2,_0x25cffd),'timestamp':_0x4dbdff,'chars':_0x4730f2[_0x44f067(0x212)]},saveStore(_0x1c7f0d);}catch{}return null;}function a0_0x5945(){const _0x5f4464=['match','git-log','getOwnPropertyNames','join','__setModuleDefault','cwd','md5','crypto','128165OMeKWZ','prototype','writable','hex','now','create','startsWith','\x20tree','\x20ls\x20','configurable','docker-images','parse','4NnyDKy','stringify','timestamp','\x20entries','split','file','getOwnPropertyDescriptor','keys','sort','cache.json','ruff','toLowerCase','git\x20status','3178824raYiFk','utf8','hash','775678EkYuBF','yadm\x20status','yadm\x20log','docker-ps','call','\x20tree\x20','__esModule','tree','\x20chars','dedup','ruff\x20check','writeFileSync','get','go-vet','5048ROGAHz','kubectl\x20get','readFileSync','s\x20ago,\x20','\x20lines','default','createHash','length','git-show','digest','defineProperty','__createBinding','homedir','ruff\x20','2372301jFCDUt','328722GfjftF','path','mkdirSync','includes','3690381pGLJVL','existsSync','summary','go\x20vet','6867wnAxYJ','trim'];a0_0x5945=function(){return _0x5f4464;};return a0_0x5945();}
|
package/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
'use strict';const a0_0x35b5c8=a0_0x1ba3;(function(_0x36e628,_0x570033){const _0x4dfafc=a0_0x1ba3,_0x2ce646=_0x36e628();while(!![]){try{const _0x4a54cd=parseInt(_0x4dfafc(0x149))/0x1+parseInt(_0x4dfafc(0x179))/0x2*(parseInt(_0x4dfafc(0xff))/0x3)+-parseInt(_0x4dfafc(0x11e))/0x4*(parseInt(_0x4dfafc(0x103))/0x5)+-parseInt(_0x4dfafc(0xfc))/0x6+-parseInt(_0x4dfafc(0x169))/0x7+-parseInt(_0x4dfafc(0x12f))/0x8+parseInt(_0x4dfafc(0xf1))/0x9;if(_0x4a54cd===_0x570033)break;else _0x2ce646['push'](_0x2ce646['shift']());}catch(_0x45060d){_0x2ce646['push'](_0x2ce646['shift']());}}}(a0_0x506a,0x5563f));function a0_0x506a(){const _0x428ac1=['platform','=============================================','npx','error','install\x20or\x20uninstall','set','Proxy\x20wrapper\x20for\x20Model\x20Context\x20Protocol\x20(MCP)\x20servers\x20to\x20compact\x20tool\x20outputs','env','toLowerCase','modelcontextprotocol','<server-command>','argument','some','hasOwnProperty','config','yarn','argv','--pretty','Reduction\x20Rate:\x20\x20\x20\x20','--merges','claude-3-5-sonnet','Error:\x20Action\x20must\x20be\x20install\x20or\x20uninstall','exitCode','Actual\x20Cost:\x20\x20\x20\x20\x20\x20\x20$','Error:\x20Action\x20must\x20be\x20get\x20or\x20set','4359698KEitQa','help','alias','exit','status','redaction_enabled','savings_percentage','Install\x20or\x20uninstall\x20system\x20command\x20shims','mcp-proxy','rewrite','__importStar','action','-10','description','stdout','__createBinding','2imCStQ','mcp','git','bun','installShims','Select\x20pricing\x20model\x20(e.g.\x20claude-3-5-sonnet,\x20gpt-4o)','Command\x20line\x20to\x20evaluate','raw_cost_usd','slice','node','log','Start\x20the\x20local\x20developer\x20dashboard','--no-merges','-p,\x20--port\x20<number>','---------------------------------------------','__setModuleDefault','Port\x20to\x20run\x20the\x20dashboard\x20on','--pretty=format:%h\x20%s\x20(%ar)\x20(%an)%n%b%n---END---','--oneline','Model\x20Context:\x20\x20\x20\x20\x20','default','write','13733226wRryAR','Check\x20a\x20command\x20line\x20and\x20return\x20the\x20optimized\x20command\x20line','shims','executeCommand','--branch','-m,\x20--model\x20<string>','Error:\x20Value\x20required\x20for\x20set\x20action','message','pnpm','<commandLine>','total_compressed_tokens','1817274HyBNSf','configurable','resolve','1829661UqGYrk','mcp-server','defineProperty','model','125CmLPPW','Config\x20set\x20','true','length','TrimPrompt.ai\x20-\x20Reduce\x20LLM\x20token\x20consumption\x20by\x2060-90%','[TrimPrompt]\x20Fatal\x20Proxy\x20Error:\x20','uninstallShims','tracker','option','catch','\x20=\x20','then','Money\x20Saved:\x20\x20\x20\x20\x20\x20\x20$','cmd','--help','1.0.0','./tracker','--max-count','test','version','logExecution','yadm','[TrimPrompt]\x20Autodetected\x20MCP\x20server\x20execution.\x20Activating\x20real-time\x20JSON-RPC\x20proxy...','dedup','join','@modelcontextprotocol/','-50','88156NhxkWj','getConfig','command','getStatsSummary','-sb','proxy','Command','Manage\x20local\x20configuration\x20parameters','__esModule','Show\x20token\x20and\x20cost\x20savings\x20summary','Command\x20to\x20launch\x20the\x20target\x20MCP\x20server','Compressed:\x20\x20\x20\x20\x20\x20\x20\x20','--min-parents','model_name','toLocaleString','./shims','push','3262280hLOUFs','\x20(after\x20Trim)','every','--version','Arguments\x20for\x20the\x20target\x20MCP\x20server','trim','name','args','dashboard','stderr','port','-bs','stats','=============================================\x0a','\x20(before\x20Trim)','toFixed','npm','./filters','call','[server-args...]','Raw\x20Tokens:\x20\x20\x20\x20\x20\x20\x20\x20','Estimated\x20Cost:\x20\x20\x20\x20$','\x0a=============================================','parse','./dashboard','<action>','98411oaGRgP','rewriteCommand','uninstall','get\x20or\x20set','server-mcp','startsWith','includes'];a0_0x506a=function(){return _0x428ac1;};return a0_0x506a();}var __createBinding=this&&this[a0_0x35b5c8(0x178)]||(Object['create']?function(_0x520610,_0x319a12,_0x7876e,_0x1b4642){const _0xca7e71=a0_0x35b5c8;if(_0x1b4642===undefined)_0x1b4642=_0x7876e;var _0xbf6706=Object['getOwnPropertyDescriptor'](_0x319a12,_0x7876e);(!_0xbf6706||('get'in _0xbf6706?!_0x319a12[_0xca7e71(0x126)]:_0xbf6706['writable']||_0xbf6706[_0xca7e71(0xfd)]))&&(_0xbf6706={'enumerable':!![],'get':function(){return _0x319a12[_0x7876e];}}),Object['defineProperty'](_0x520610,_0x1b4642,_0xbf6706);}:function(_0x14d40f,_0x2d10ec,_0x41e2a6,_0x3e5389){if(_0x3e5389===undefined)_0x3e5389=_0x41e2a6;_0x14d40f[_0x3e5389]=_0x2d10ec[_0x41e2a6];}),__setModuleDefault=this&&this[a0_0x35b5c8(0xea)]||(Object['create']?function(_0x1d465f,_0x4b3f15){const _0x77b7c8=a0_0x35b5c8;Object[_0x77b7c8(0x101)](_0x1d465f,_0x77b7c8(0xef),{'enumerable':!![],'value':_0x4b3f15});}:function(_0x5964fe,_0x178022){_0x5964fe['default']=_0x178022;}),__importStar=this&&this[a0_0x35b5c8(0x173)]||(function(){var _0x40a87b=function(_0x50b4a5){return _0x40a87b=Object['getOwnPropertyNames']||function(_0x1c4ea8){const _0x3c450f=a0_0x1ba3;var _0x333039=[];for(var _0x42b56c in _0x1c4ea8)if(Object['prototype'][_0x3c450f(0x15d)][_0x3c450f(0x141)](_0x1c4ea8,_0x42b56c))_0x333039[_0x333039[_0x3c450f(0x106)]]=_0x42b56c;return _0x333039;},_0x40a87b(_0x50b4a5);};return function(_0x46bb30){const _0x2d7bbf=a0_0x1ba3;if(_0x46bb30&&_0x46bb30['__esModule'])return _0x46bb30;var _0x408b9b={};if(_0x46bb30!=null){for(var _0x38578b=_0x40a87b(_0x46bb30),_0x3c59bf=0x0;_0x3c59bf<_0x38578b[_0x2d7bbf(0x106)];_0x3c59bf++)if(_0x38578b[_0x3c59bf]!==_0x2d7bbf(0xef))__createBinding(_0x408b9b,_0x46bb30,_0x38578b[_0x3c59bf]);}return __setModuleDefault(_0x408b9b,_0x46bb30),_0x408b9b;};}());Object[a0_0x35b5c8(0x101)](exports,'__esModule',{'value':!![]});const commander_1=require('commander'),executor_1=require('./executor'),filters_1=require(a0_0x35b5c8(0x140)),tracker_1=require(a0_0x35b5c8(0x113)),cache_1=require('./cache'),shims_1=require(a0_0x35b5c8(0x12d)),dashboard_1=require(a0_0x35b5c8(0x147)),program=new commander_1[(a0_0x35b5c8(0x124))]();function isDisabled(){const _0x5ac4ed=a0_0x35b5c8;return process[_0x5ac4ed(0x157)]['TRIMPROMPT_DISABLED']==='1';}function adjustCommandArgs(_0x276edd,_0x272512){const _0x5474fc=a0_0x35b5c8,_0x448ec8=_0x276edd[_0x5474fc(0x158)]();if(_0x448ec8===_0x5474fc(0xdd)||_0x448ec8===_0x5474fc(0x118)){const _0x515eca=_0x272512[0x0];if(_0x515eca===_0x5474fc(0x16d)){const _0x27c15f=_0x272512['slice'](0x1),_0x3e7bb2=_0x27c15f['length']===0x0||_0x27c15f[_0x5474fc(0x131)](_0x23f41f=>{const _0x486119=_0x5474fc;return _0x23f41f==='-b'||_0x23f41f===_0x486119(0xf5)||_0x23f41f===_0x486119(0x122)||_0x23f41f===_0x486119(0x13a)||_0x23f41f==='-s'||_0x23f41f==='--short';});if(_0x3e7bb2)return{'cmd':_0x276edd,'args':['status','--porcelain','-b']};}else{if(_0x515eca==='log'){const _0x3197e8=_0x272512[_0x5474fc(0xe3)](0x1),_0x1f065e=_0x3197e8[_0x5474fc(0x15c)](_0x4377bd=>_0x4377bd[_0x5474fc(0x14e)](_0x5474fc(0xed))||_0x4377bd[_0x5474fc(0x14e)](_0x5474fc(0x161))||_0x4377bd['startsWith']('--format')),_0x566007=_0x3197e8[_0x5474fc(0x15c)](_0x2aa0fe=>_0x2aa0fe[_0x5474fc(0x14e)]('-')&&/^\d+$/[_0x5474fc(0x115)](_0x2aa0fe[_0x5474fc(0xe3)](0x1))||_0x2aa0fe==='-n'||_0x2aa0fe['startsWith'](_0x5474fc(0x114))),_0x2eef64=[..._0x272512];if(!_0x1f065e){const _0x1c283a=_0x5474fc(0xec);_0x2eef64[_0x5474fc(0x12e)](process[_0x5474fc(0x150)]==='win32'?'\x22'+_0x1c283a+'\x22':_0x1c283a);}!_0x566007&&(_0x1f065e?_0x2eef64[_0x5474fc(0x12e)](_0x5474fc(0x11d)):_0x2eef64['push'](_0x5474fc(0x175)));const _0x4e675d=_0x3197e8[_0x5474fc(0x15c)](_0x5d0e7e=>_0x5d0e7e===_0x5474fc(0x163)||_0x5d0e7e===_0x5474fc(0xe7)||_0x5d0e7e[_0x5474fc(0x14e)](_0x5474fc(0x12a)));return!_0x4e675d&&!_0x566007&&_0x2eef64[_0x5474fc(0x12e)](_0x5474fc(0xe7)),{'cmd':_0x276edd,'args':_0x2eef64};}}}return{'cmd':_0x276edd,'args':_0x272512};}function isMcpServerExecution(_0x74be96,_0x21af53){const _0x455c72=a0_0x35b5c8,_0x1a3b43=_0x74be96[_0x455c72(0x158)](),_0x48305c=_0x21af53[_0x455c72(0x11b)]('\x20')['toLowerCase']();if(_0x1a3b43[_0x455c72(0x14f)]('mcp')&&(_0x1a3b43[_0x455c72(0x14f)]('server')||_0x1a3b43['includes'](_0x455c72(0x123))))return!![];if(_0x1a3b43===_0x455c72(0x152)||_0x1a3b43===_0x455c72(0xe4)||_0x1a3b43===_0x455c72(0xde)||_0x1a3b43===_0x455c72(0x13f)||_0x1a3b43===_0x455c72(0xf9)||_0x1a3b43===_0x455c72(0x15f)){if(_0x48305c[_0x455c72(0x14f)](_0x455c72(0x11c))||_0x48305c[_0x455c72(0x14f)](_0x455c72(0x159))||_0x48305c[_0x455c72(0x14f)](_0x455c72(0x100))||_0x48305c[_0x455c72(0x14f)](_0x455c72(0x14d)))return!![];}if(_0x21af53[_0x455c72(0x15c)](_0x2c6bba=>{const _0x10c789=_0x455c72,_0xf2bc25=_0x2c6bba[_0x10c789(0x158)]();return _0xf2bc25[_0x10c789(0x14f)](_0x10c789(0x100))||_0xf2bc25[_0x10c789(0x14f)](_0x10c789(0x14d))||_0xf2bc25[_0x10c789(0x14f)]('@modelcontextprotocol/')||_0xf2bc25==='mcp-proxy'||_0xf2bc25===_0x10c789(0x17a);}))return!![];return![];}function a0_0x1ba3(_0x14a5da,_0x1b693a){const _0x506a81=a0_0x506a();return a0_0x1ba3=function(_0x1ba338,_0x1a987d){_0x1ba338=_0x1ba338-0xdd;let _0x18be66=_0x506a81[_0x1ba338];return _0x18be66;},a0_0x1ba3(_0x14a5da,_0x1b693a);}async function runProxy(_0x26f195){const _0x134996=a0_0x35b5c8;if(_0x26f195[_0x134996(0x106)]===0x0){program[_0x134996(0x16a)]();return;}const _0x521632=_0x26f195[0x0],_0x412159=_0x26f195[_0x134996(0xe3)](0x1),_0x2689b3=_0x26f195['join']('\x20');if(isDisabled()){const _0x30cea9=await(0x0,executor_1[_0x134996(0xf4)])(_0x521632,_0x412159);process['stdout'][_0x134996(0xf0)](_0x30cea9[_0x134996(0x177)]),process[_0x134996(0x138)][_0x134996(0xf0)](_0x30cea9[_0x134996(0x138)]),process[_0x134996(0x16c)](_0x30cea9[_0x134996(0x166)]);}if(isMcpServerExecution(_0x521632,_0x412159)){console['error'](_0x134996(0x119));const {runMcpProxy:_0x45fa0a}=await Promise[_0x134996(0xfe)]()[_0x134996(0x10e)](()=>__importStar(require('./mcp')));_0x45fa0a(_0x521632,_0x412159);return;}const _0x37387a=adjustCommandArgs(_0x521632,_0x412159),_0x3fd4d4=await(0x0,executor_1[_0x134996(0xf4)])(_0x37387a[_0x134996(0x110)],_0x37387a[_0x134996(0x136)]),_0x1d68b9=(0x0,filters_1['compressOutput'])(_0x2689b3,_0x3fd4d4[_0x134996(0x177)],_0x3fd4d4[_0x134996(0x138)],tracker_1['tracker'][_0x134996(0x11f)]()[_0x134996(0x16e)]),_0x5c4878=_0x3fd4d4[_0x134996(0x177)]+(_0x3fd4d4[_0x134996(0x138)][_0x134996(0x134)]()[_0x134996(0x106)]>0x0?'\x0a'+_0x3fd4d4[_0x134996(0x138)]:''),_0x187406=_0x1d68b9['length']<_0x5c4878[_0x134996(0x106)]?_0x1d68b9:_0x5c4878,_0x3e9629=_0x3fd4d4[_0x134996(0x166)]===0x0?(0x0,cache_1[_0x134996(0x11a)])(_0x2689b3,_0x187406):null;tracker_1[_0x134996(0x10a)][_0x134996(0x117)](_0x2689b3,_0x5c4878,_0x3e9629||_0x187406,_0x3fd4d4[_0x134996(0x166)]),_0x3fd4d4[_0x134996(0x166)]===0x0?process[_0x134996(0x177)][_0x134996(0xf0)](_0x187406+'\x0a'):(process[_0x134996(0x177)][_0x134996(0xf0)](_0x1d68b9+'\x0a'),_0x3fd4d4[_0x134996(0x138)][_0x134996(0x134)]()[_0x134996(0x106)]>0x0&&!_0x1d68b9[_0x134996(0x14f)](_0x3fd4d4[_0x134996(0x138)][_0x134996(0x134)]())&&process[_0x134996(0x138)][_0x134996(0xf0)](_0x3fd4d4[_0x134996(0x138)]+'\x0a')),process[_0x134996(0x16c)](_0x3fd4d4[_0x134996(0x166)]);}program[a0_0x35b5c8(0x135)]('trim')[a0_0x35b5c8(0x176)](a0_0x35b5c8(0x107))[a0_0x35b5c8(0x116)](a0_0x35b5c8(0x112)),program[a0_0x35b5c8(0x120)]('ui')[a0_0x35b5c8(0x16b)](a0_0x35b5c8(0x137))[a0_0x35b5c8(0x176)](a0_0x35b5c8(0xe6))[a0_0x35b5c8(0x10b)](a0_0x35b5c8(0xe8),a0_0x35b5c8(0xeb),'4000')['action'](_0x3305dd=>{const _0x1be2e6=a0_0x35b5c8,_0x2b681f=parseInt(_0x3305dd[_0x1be2e6(0x139)],0xa);(0x0,dashboard_1['startDashboard'])(_0x2b681f);}),program[a0_0x35b5c8(0x120)](a0_0x35b5c8(0x13b))[a0_0x35b5c8(0x176)](a0_0x35b5c8(0x127))[a0_0x35b5c8(0x10b)](a0_0x35b5c8(0xf6),a0_0x35b5c8(0xe0),a0_0x35b5c8(0x164))['action'](_0x493c02=>{const _0xe00eed=a0_0x35b5c8,_0x5a9e80=tracker_1[_0xe00eed(0x10a)][_0xe00eed(0x121)](_0x493c02[_0xe00eed(0x102)]);console[_0xe00eed(0xe5)](_0xe00eed(0x145)),console['log']('\x20\x20\x20\x20\x20\x20\x20TRIMPROMPT.AI\x20SAVINGS\x20SUMMARY\x20\x20\x20\x20\x20\x20\x20\x20'),console[_0xe00eed(0xe5)](_0xe00eed(0x151)),console['log'](_0xe00eed(0xee)+_0x5a9e80[_0xe00eed(0x12b)]),console[_0xe00eed(0xe5)](_0xe00eed(0x143)+_0x5a9e80['total_raw_tokens'][_0xe00eed(0x12c)]()),console[_0xe00eed(0xe5)](_0xe00eed(0x129)+_0x5a9e80[_0xe00eed(0xfb)][_0xe00eed(0x12c)]()),console[_0xe00eed(0xe5)]('Tokens\x20Saved:\x20\x20\x20\x20\x20\x20'+_0x5a9e80['total_tokens_saved'][_0xe00eed(0x12c)]()),console['log'](_0xe00eed(0x162)+_0x5a9e80[_0xe00eed(0x16f)]+'%'),console[_0xe00eed(0xe5)](_0xe00eed(0x144)+_0x5a9e80[_0xe00eed(0xe2)][_0xe00eed(0x13e)](0x4)+_0xe00eed(0x13d)),console[_0xe00eed(0xe5)](_0xe00eed(0x167)+_0x5a9e80['compressed_cost_usd'][_0xe00eed(0x13e)](0x4)+_0xe00eed(0x130)),console[_0xe00eed(0xe5)](_0xe00eed(0xe9)),console['log'](_0xe00eed(0x10f)+_0x5a9e80['money_saved_usd'][_0xe00eed(0x13e)](0x4)+'\x20USD'),console[_0xe00eed(0xe5)](_0xe00eed(0x13c));}),program['command'](a0_0x35b5c8(0x15e))[a0_0x35b5c8(0x176)](a0_0x35b5c8(0x125))[a0_0x35b5c8(0x15b)](a0_0x35b5c8(0x148),a0_0x35b5c8(0x14c))[a0_0x35b5c8(0x15b)]('<key>','config\x20parameter\x20name')['argument']('[value]','value\x20to\x20set')['action']((_0x2dd95b,_0x318466,_0xb7d782)=>{const _0xeb4bd=a0_0x35b5c8;if(_0x2dd95b==='get'){const _0x56e30e=tracker_1['tracker']['getConfig']();console[_0xeb4bd(0xe5)](_0x318466+':\x20'+_0x56e30e[_0x318466]);}else{if(_0x2dd95b===_0xeb4bd(0x155)){_0xb7d782===undefined&&(console['error'](_0xeb4bd(0xf7)),process[_0xeb4bd(0x16c)](0x1));let _0x375924=_0xb7d782;if(_0xb7d782===_0xeb4bd(0x105))_0x375924=!![];if(_0xb7d782==='false')_0x375924=![];if(/^\d+$/[_0xeb4bd(0x115)](_0xb7d782))_0x375924=parseInt(_0xb7d782,0xa);tracker_1['tracker']['setConfig'](_0x318466,_0x375924),console['log'](_0xeb4bd(0x104)+_0x318466+_0xeb4bd(0x10d)+_0xb7d782);}else console[_0xeb4bd(0x153)](_0xeb4bd(0x168)),process[_0xeb4bd(0x16c)](0x1);}}),program['command'](a0_0x35b5c8(0xf3))[a0_0x35b5c8(0x176)](a0_0x35b5c8(0x170))[a0_0x35b5c8(0x15b)](a0_0x35b5c8(0x148),a0_0x35b5c8(0x154))[a0_0x35b5c8(0x174)](_0x4b5f2f=>{const _0x46916d=a0_0x35b5c8;if(_0x4b5f2f==='install'){const _0x5ca9b9=(0x0,shims_1[_0x46916d(0xdf)])();console[_0x46916d(0xe5)](_0x5ca9b9[_0x46916d(0xf8)]);}else{if(_0x4b5f2f===_0x46916d(0x14b)){const _0x441c99=(0x0,shims_1[_0x46916d(0x109)])();console[_0x46916d(0xe5)](_0x441c99[_0x46916d(0xf8)]);}else console[_0x46916d(0x153)](_0x46916d(0x165)),process[_0x46916d(0x16c)](0x1);}}),program[a0_0x35b5c8(0x120)](a0_0x35b5c8(0x172))[a0_0x35b5c8(0x176)](a0_0x35b5c8(0xf2))[a0_0x35b5c8(0x15b)](a0_0x35b5c8(0xfa),a0_0x35b5c8(0xe1))[a0_0x35b5c8(0x174)](_0x17aec0=>{const _0x1993b0=a0_0x35b5c8;if(isDisabled()){console[_0x1993b0(0xe5)](_0x17aec0);return;}const _0x4ed2ff=(0x0,filters_1[_0x1993b0(0x14a)])(_0x17aec0);console[_0x1993b0(0xe5)](_0x4ed2ff);}),program[a0_0x35b5c8(0x120)]('mcp-proxy')['alias'](a0_0x35b5c8(0x17a))[a0_0x35b5c8(0x176)](a0_0x35b5c8(0x156))[a0_0x35b5c8(0x15b)](a0_0x35b5c8(0x15a),a0_0x35b5c8(0x128))[a0_0x35b5c8(0x15b)](a0_0x35b5c8(0x142),a0_0x35b5c8(0x133))[a0_0x35b5c8(0x174)](async(_0x1f40bf,_0x25e397)=>{const {runMcpProxy:_0x2eb8a9}=await Promise['resolve']()['then'](()=>__importStar(require('./mcp')));_0x2eb8a9(_0x1f40bf,_0x25e397);});const args=process[a0_0x35b5c8(0x160)][a0_0x35b5c8(0xe3)](0x2),firstArg=args[0x0],subcommands=['ui',a0_0x35b5c8(0x137),a0_0x35b5c8(0x13b),'config',a0_0x35b5c8(0xf3),a0_0x35b5c8(0x172),a0_0x35b5c8(0x171),a0_0x35b5c8(0x17a),a0_0x35b5c8(0x16a),a0_0x35b5c8(0x111),'-h',a0_0x35b5c8(0x116),a0_0x35b5c8(0x132),'-v'];firstArg&&!subcommands[a0_0x35b5c8(0x14f)](firstArg)?runProxy(args)[a0_0x35b5c8(0x10c)](_0x434848=>{const _0x516c7f=a0_0x35b5c8;console[_0x516c7f(0x153)](_0x516c7f(0x108)+_0x434848[_0x516c7f(0xf8)]),process[_0x516c7f(0x16c)](0x1);}):program[a0_0x35b5c8(0x146)](process[a0_0x35b5c8(0x160)]);
|
|
2
|
+
'use strict';const a0_0x53049d=a0_0x5c5c;(function(_0x380909,_0x2042f8){const _0x4d3b71=a0_0x5c5c,_0x101b8c=_0x380909();while(!![]){try{const _0x28d152=parseInt(_0x4d3b71(0x10e))/0x1+parseInt(_0x4d3b71(0x123))/0x2*(parseInt(_0x4d3b71(0x104))/0x3)+-parseInt(_0x4d3b71(0x14d))/0x4*(-parseInt(_0x4d3b71(0xd9))/0x5)+-parseInt(_0x4d3b71(0xcb))/0x6+-parseInt(_0x4d3b71(0xda))/0x7+-parseInt(_0x4d3b71(0x110))/0x8+parseInt(_0x4d3b71(0xc5))/0x9;if(_0x28d152===_0x2042f8)break;else _0x101b8c['push'](_0x101b8c['shift']());}catch(_0x21f07c){_0x101b8c['push'](_0x101b8c['shift']());}}}(a0_0x46c0,0x4a26f));function a0_0x5c5c(_0x3c46db,_0x2bccae){const _0x46c07f=a0_0x46c0();return a0_0x5c5c=function(_0x5c5c77,_0x4bacb2){_0x5c5c77=_0x5c5c77-0xc4;let _0x8212c0=_0x46c07f[_0x5c5c77];return _0x8212c0;},a0_0x5c5c(_0x3c46db,_0x2bccae);}var __createBinding=this&&this[a0_0x53049d(0x137)]||(Object[a0_0x53049d(0x11f)]?function(_0x521b8d,_0x2e6110,_0x51cebe,_0x1def16){const _0x3247a1=a0_0x53049d;if(_0x1def16===undefined)_0x1def16=_0x51cebe;var _0xd0fd1b=Object['getOwnPropertyDescriptor'](_0x2e6110,_0x51cebe);(!_0xd0fd1b||(_0x3247a1(0x127)in _0xd0fd1b?!_0x2e6110[_0x3247a1(0xf2)]:_0xd0fd1b[_0x3247a1(0x119)]||_0xd0fd1b[_0x3247a1(0x10b)]))&&(_0xd0fd1b={'enumerable':!![],'get':function(){return _0x2e6110[_0x51cebe];}}),Object[_0x3247a1(0x112)](_0x521b8d,_0x1def16,_0xd0fd1b);}:function(_0x3025cf,_0x2d55ec,_0xc2220,_0x563296){if(_0x563296===undefined)_0x563296=_0xc2220;_0x3025cf[_0x563296]=_0x2d55ec[_0xc2220];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object['create']?function(_0x3fcf1d,_0x416d02){const _0x5b2f24=a0_0x53049d;Object[_0x5b2f24(0x112)](_0x3fcf1d,'default',{'enumerable':!![],'value':_0x416d02});}:function(_0x4696e0,_0x497a8e){const _0x4081a8=a0_0x53049d;_0x4696e0[_0x4081a8(0x140)]=_0x497a8e;}),__importStar=this&&this[a0_0x53049d(0x154)]||(function(){var _0x5d2645=function(_0x4a0b2a){const _0x4d621b=a0_0x5c5c;return _0x5d2645=Object[_0x4d621b(0x136)]||function(_0x5b4c40){const _0x5db310=_0x4d621b;var _0x265d6c=[];for(var _0x68f7a1 in _0x5b4c40)if(Object[_0x5db310(0x149)][_0x5db310(0xf0)][_0x5db310(0x12b)](_0x5b4c40,_0x68f7a1))_0x265d6c[_0x265d6c[_0x5db310(0x13b)]]=_0x68f7a1;return _0x265d6c;},_0x5d2645(_0x4a0b2a);};return function(_0x61c3ad){const _0x470565=a0_0x5c5c;if(_0x61c3ad&&_0x61c3ad[_0x470565(0xf2)])return _0x61c3ad;var _0x145cb6={};if(_0x61c3ad!=null){for(var _0x13effe=_0x5d2645(_0x61c3ad),_0xd3c393=0x0;_0xd3c393<_0x13effe[_0x470565(0x13b)];_0xd3c393++)if(_0x13effe[_0xd3c393]!==_0x470565(0x140))__createBinding(_0x145cb6,_0x61c3ad,_0x13effe[_0xd3c393]);}return __setModuleDefault(_0x145cb6,_0x61c3ad),_0x145cb6;};}());Object[a0_0x53049d(0x112)](exports,a0_0x53049d(0xf2),{'value':!![]});const commander_1=require(a0_0x53049d(0x11d)),executor_1=require(a0_0x53049d(0x124)),filters_1=require(a0_0x53049d(0x153)),tracker_1=require(a0_0x53049d(0x12d)),cache_1=require(a0_0x53049d(0x135)),shims_1=require(a0_0x53049d(0xef)),dashboard_1=require(a0_0x53049d(0xf8)),program=new commander_1[(a0_0x53049d(0x12a))]();function isDisabled(){const _0x326597=a0_0x53049d;return process['env'][_0x326597(0xd8)]==='1';}function adjustCommandArgs(_0x17ab07,_0x1b29ab){const _0x369a49=a0_0x53049d,_0x4298bc=_0x17ab07[_0x369a49(0xd1)]();if(_0x4298bc===_0x369a49(0x11c)||_0x4298bc===_0x369a49(0xe3)){const _0x191ce2=_0x1b29ab[0x0];if(_0x191ce2===_0x369a49(0xca)){const _0x185c19=_0x1b29ab[_0x369a49(0xee)](0x1),_0x2fe0e5=_0x185c19['length']===0x0||_0x185c19[_0x369a49(0x156)](_0x55a6e8=>{const _0x336ab1=_0x369a49;return _0x55a6e8==='-b'||_0x55a6e8===_0x336ab1(0x134)||_0x55a6e8===_0x336ab1(0x111)||_0x55a6e8===_0x336ab1(0x15d)||_0x55a6e8==='-s'||_0x55a6e8==='--short';});if(_0x2fe0e5)return{'cmd':_0x17ab07,'args':[_0x369a49(0xca),_0x369a49(0xe6),'-b']};}else{if(_0x191ce2===_0x369a49(0x108)){const _0x31b6b5=_0x1b29ab[_0x369a49(0xee)](0x1),_0x522102=_0x31b6b5[_0x369a49(0x113)](_0x1b9649=>_0x1b9649['startsWith'](_0x369a49(0x147))||_0x1b9649['startsWith']('--pretty')||_0x1b9649[_0x369a49(0x15f)](_0x369a49(0xdd))),_0x1b8366=_0x31b6b5[_0x369a49(0x113)](_0x2c66ba=>_0x2c66ba[_0x369a49(0x15f)]('-')&&/^\d+$/[_0x369a49(0x125)](_0x2c66ba[_0x369a49(0xee)](0x1))||_0x2c66ba==='-n'||_0x2c66ba[_0x369a49(0x15f)]('--max-count')),_0x366f08=[..._0x1b29ab];if(!_0x522102){const _0x2318a5=_0x369a49(0xe4);_0x366f08['push'](process[_0x369a49(0xde)]===_0x369a49(0x105)?'\x22'+_0x2318a5+'\x22':_0x2318a5);}!_0x1b8366&&(_0x522102?_0x366f08['push'](_0x369a49(0x128)):_0x366f08['push'](_0x369a49(0xf1)));const _0xfee9e3=_0x31b6b5[_0x369a49(0x113)](_0x5a2269=>_0x5a2269===_0x369a49(0x14c)||_0x5a2269==='--no-merges'||_0x5a2269['startsWith'](_0x369a49(0x132)));return!_0xfee9e3&&!_0x1b8366&&_0x366f08[_0x369a49(0x118)](_0x369a49(0xe8)),{'cmd':_0x17ab07,'args':_0x366f08};}}}return{'cmd':_0x17ab07,'args':_0x1b29ab};}function isMcpServerExecution(_0x43951e,_0x1497b3){const _0x34ffa9=a0_0x53049d,_0x5e0901=_0x43951e['toLowerCase'](),_0x1feaf4=_0x1497b3[_0x34ffa9(0x157)]('\x20')[_0x34ffa9(0xd1)]();if(_0x5e0901[_0x34ffa9(0x130)](_0x34ffa9(0x139))&&(_0x5e0901[_0x34ffa9(0x130)](_0x34ffa9(0xe1))||_0x5e0901[_0x34ffa9(0x130)](_0x34ffa9(0x144))))return!![];if(_0x5e0901===_0x34ffa9(0x106)||_0x5e0901===_0x34ffa9(0x100)||_0x5e0901===_0x34ffa9(0x13f)||_0x5e0901==='npm'||_0x5e0901===_0x34ffa9(0xf6)||_0x5e0901===_0x34ffa9(0x14f)){if(_0x1feaf4[_0x34ffa9(0x130)](_0x34ffa9(0x10d))||_0x1feaf4[_0x34ffa9(0x130)](_0x34ffa9(0x114))||_0x1feaf4[_0x34ffa9(0x130)](_0x34ffa9(0xea))||_0x1feaf4[_0x34ffa9(0x130)]('server-mcp'))return!![];}if(_0x1497b3['some'](_0xa6e89=>{const _0x55faf3=_0x34ffa9,_0x4b9217=_0xa6e89['toLowerCase']();return _0x4b9217[_0x55faf3(0x130)](_0x55faf3(0xea))||_0x4b9217[_0x55faf3(0x130)](_0x55faf3(0x103))||_0x4b9217[_0x55faf3(0x130)](_0x55faf3(0x10d))||_0x4b9217===_0x55faf3(0x12c)||_0x4b9217==='mcp';}))return!![];return![];}async function runProxy(_0x336042){const _0x340a09=a0_0x53049d;if(_0x336042[_0x340a09(0x13b)]===0x0){program[_0x340a09(0x107)]();return;}const _0x587f35=_0x336042[0x0],_0x1166c3=_0x336042[_0x340a09(0xee)](0x1),_0x843af6=_0x336042['join']('\x20');if(isDisabled()){const _0x568eae=await(0x0,executor_1['executeCommand'])(_0x587f35,_0x1166c3);process['stdout']['write'](_0x568eae['stdout']),process[_0x340a09(0x155)][_0x340a09(0xfc)](_0x568eae[_0x340a09(0x155)]),process[_0x340a09(0x13d)](_0x568eae['exitCode']);}if(isMcpServerExecution(_0x587f35,_0x1166c3)){console[_0x340a09(0x151)](_0x340a09(0xc9));const {runMcpProxy:_0x41d841}=await Promise[_0x340a09(0xdb)]()[_0x340a09(0x109)](()=>__importStar(require('./mcp')));_0x41d841(_0x587f35,_0x1166c3);return;}const _0x37d3f5=adjustCommandArgs(_0x587f35,_0x1166c3),_0x3d9333=await(0x0,executor_1['executeCommand'])(_0x37d3f5[_0x340a09(0x115)],_0x37d3f5['args']),_0x2f57f6=(0x0,filters_1[_0x340a09(0x13c)])(_0x843af6,_0x3d9333[_0x340a09(0x13a)],_0x3d9333['stderr'],tracker_1[_0x340a09(0x143)][_0x340a09(0xf5)]()[_0x340a09(0x160)]),_0x43cc08=_0x3d9333['stdout']+(_0x3d9333[_0x340a09(0x155)]['trim']()[_0x340a09(0x13b)]>0x0?'\x0a'+_0x3d9333[_0x340a09(0x155)]:''),_0x136e2c=_0x2f57f6['length']<_0x43cc08[_0x340a09(0x13b)]?_0x2f57f6:_0x43cc08,_0x40f752=_0x3d9333['exitCode']===0x0?(0x0,cache_1[_0x340a09(0xdc)])(_0x843af6,_0x136e2c):null;tracker_1[_0x340a09(0x143)][_0x340a09(0x161)](_0x843af6,_0x43cc08,_0x40f752||_0x136e2c,_0x3d9333[_0x340a09(0x14b)]),_0x3d9333[_0x340a09(0x14b)]===0x0?process['stdout']['write'](_0x136e2c+'\x0a'):(process[_0x340a09(0x13a)]['write'](_0x2f57f6+'\x0a'),_0x3d9333[_0x340a09(0x155)][_0x340a09(0x117)]()[_0x340a09(0x13b)]>0x0&&!_0x2f57f6['includes'](_0x3d9333['stderr'][_0x340a09(0x117)]())&&process[_0x340a09(0x155)][_0x340a09(0xfc)](_0x3d9333[_0x340a09(0x155)]+'\x0a')),process[_0x340a09(0x13d)](_0x3d9333[_0x340a09(0x14b)]);}program['name'](a0_0x53049d(0x117))[a0_0x53049d(0x101)]('TrimPrompt.ai\x20-\x20Reduce\x20LLM\x20token\x20consumption\x20by\x2060-90%')[a0_0x53049d(0x10a)](a0_0x53049d(0x158)),program[a0_0x53049d(0xfe)]('ui')['alias'](a0_0x53049d(0x126))[a0_0x53049d(0x101)](a0_0x53049d(0x133))[a0_0x53049d(0xc6)]('-p,\x20--port\x20<number>',a0_0x53049d(0x10c),a0_0x53049d(0xd4))[a0_0x53049d(0x11a)](_0x17cb20=>{const _0x25801b=parseInt(_0x17cb20['port'],0xa);(0x0,dashboard_1['startDashboard'])(_0x25801b);}),program[a0_0x53049d(0xfe)](a0_0x53049d(0x122))[a0_0x53049d(0x101)](a0_0x53049d(0xec))[a0_0x53049d(0xc6)](a0_0x53049d(0x15a),a0_0x53049d(0x12f),a0_0x53049d(0x145))[a0_0x53049d(0x11a)](_0x248fbf=>{const _0xc17cc2=a0_0x53049d,_0x1efb85=tracker_1[_0xc17cc2(0x143)][_0xc17cc2(0xce)](_0x248fbf['model']);console[_0xc17cc2(0x108)]('\x0a============================================='),console[_0xc17cc2(0x108)](_0xc17cc2(0xff)),console[_0xc17cc2(0x108)](_0xc17cc2(0xf3)),console[_0xc17cc2(0x108)](_0xc17cc2(0x150)+_0x1efb85[_0xc17cc2(0x131)]),console['log'](_0xc17cc2(0xc7)+_0x1efb85[_0xc17cc2(0xf4)][_0xc17cc2(0x146)]()),console[_0xc17cc2(0x108)]('Compressed:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1efb85[_0xc17cc2(0xeb)]['toLocaleString']()),console[_0xc17cc2(0x108)](_0xc17cc2(0x15b)+_0x1efb85[_0xc17cc2(0x102)][_0xc17cc2(0x146)]()),console[_0xc17cc2(0x108)](_0xc17cc2(0xcf)+_0x1efb85['savings_percentage']+'%'),console[_0xc17cc2(0x108)]('Estimated\x20Cost:\x20\x20\x20\x20$'+_0x1efb85['raw_cost_usd'][_0xc17cc2(0xd3)](0x4)+_0xc17cc2(0xf9)),console[_0xc17cc2(0x108)](_0xc17cc2(0xcc)+_0x1efb85['compressed_cost_usd'][_0xc17cc2(0xd3)](0x4)+'\x20(after\x20Trim)'),console[_0xc17cc2(0x108)]('---------------------------------------------'),console[_0xc17cc2(0x108)]('Money\x20Saved:\x20\x20\x20\x20\x20\x20\x20$'+_0x1efb85[_0xc17cc2(0xe0)][_0xc17cc2(0xd3)](0x4)+_0xc17cc2(0xe5)),console[_0xc17cc2(0x108)](_0xc17cc2(0x120));}),program[a0_0x53049d(0xfe)](a0_0x53049d(0x12e))[a0_0x53049d(0x101)](a0_0x53049d(0xcd))[a0_0x53049d(0x121)]('<action>',a0_0x53049d(0x116))[a0_0x53049d(0x121)]('<key>','config\x20parameter\x20name')[a0_0x53049d(0x121)](a0_0x53049d(0xd6),a0_0x53049d(0x152))[a0_0x53049d(0x11a)]((_0xc12f07,_0x81f02c,_0x487c73)=>{const _0x2364f1=a0_0x53049d;if(_0xc12f07===_0x2364f1(0x127)){const _0x1cc667=tracker_1[_0x2364f1(0x143)][_0x2364f1(0xf5)]();console[_0x2364f1(0x108)](_0x81f02c+':\x20'+_0x1cc667[_0x81f02c]);}else{if(_0xc12f07===_0x2364f1(0x10f)){_0x487c73===undefined&&(console[_0x2364f1(0x151)](_0x2364f1(0xe9)),process['exit'](0x1));let _0x475310=_0x487c73;if(_0x487c73===_0x2364f1(0x142))_0x475310=!![];if(_0x487c73===_0x2364f1(0xfb))_0x475310=![];if(/^\d+$/[_0x2364f1(0x125)](_0x487c73))_0x475310=parseInt(_0x487c73,0xa);tracker_1['tracker']['setConfig'](_0x81f02c,_0x475310),console['log']('Config\x20set\x20'+_0x81f02c+_0x2364f1(0xc4)+_0x487c73);}else console[_0x2364f1(0x151)](_0x2364f1(0x13e)),process[_0x2364f1(0x13d)](0x1);}}),program[a0_0x53049d(0xfe)](a0_0x53049d(0x14e))['description'](a0_0x53049d(0x148))[a0_0x53049d(0x121)](a0_0x53049d(0xd2),a0_0x53049d(0xe2))[a0_0x53049d(0x11a)](_0x27bafe=>{const _0x2ce1ab=a0_0x53049d;if(_0x27bafe===_0x2ce1ab(0x11e)){const _0x1db5e6=(0x0,shims_1['installShims'])();console[_0x2ce1ab(0x108)](_0x1db5e6[_0x2ce1ab(0x15c)]);}else{if(_0x27bafe===_0x2ce1ab(0xed)){const _0xbb1b1d=(0x0,shims_1[_0x2ce1ab(0x129)])();console[_0x2ce1ab(0x108)](_0xbb1b1d[_0x2ce1ab(0x15c)]);}else console[_0x2ce1ab(0x151)](_0x2ce1ab(0xfd)),process[_0x2ce1ab(0x13d)](0x1);}}),program[a0_0x53049d(0xfe)]('rewrite')[a0_0x53049d(0x101)]('Check\x20a\x20command\x20line\x20and\x20return\x20the\x20optimized\x20command\x20line')[a0_0x53049d(0x121)](a0_0x53049d(0xd5),a0_0x53049d(0x159))[a0_0x53049d(0x11a)](_0x383e81=>{const _0x2ca6a2=a0_0x53049d;if(isDisabled()){console[_0x2ca6a2(0x108)](_0x383e81);return;}const _0x15c46b=(0x0,filters_1['rewriteCommand'])(_0x383e81);console[_0x2ca6a2(0x108)](_0x15c46b);}),program[a0_0x53049d(0xfe)](a0_0x53049d(0x12c))[a0_0x53049d(0x141)](a0_0x53049d(0x139))['description'](a0_0x53049d(0xd0))[a0_0x53049d(0x121)](a0_0x53049d(0xd7),a0_0x53049d(0x11b))[a0_0x53049d(0x121)](a0_0x53049d(0x14a),a0_0x53049d(0xc8))['action'](async(_0x271792,_0x18ff69)=>{const _0x3ea5fd=a0_0x53049d,{runMcpProxy:_0x44f550}=await Promise[_0x3ea5fd(0xdb)]()[_0x3ea5fd(0x109)](()=>__importStar(require(_0x3ea5fd(0xdf))));_0x44f550(_0x271792,_0x18ff69);});function a0_0x46c0(){const _0x21a877=['<server-command>','TRIMPROMPT_DISABLED','238415lLsFzs','3555069bdqZWr','resolve','dedup','--format','platform','./mcp','money_saved_usd','server','install\x20or\x20uninstall','yadm','--pretty=format:%h\x20%s\x20(%ar)\x20(%an)%n%b%n---END---','\x20USD','--porcelain','--version','--no-merges','Error:\x20Value\x20required\x20for\x20set\x20action','mcp-server','total_compressed_tokens','Show\x20token\x20and\x20cost\x20savings\x20summary','uninstall','slice','./shims','hasOwnProperty','-10','__esModule','=============================================','total_raw_tokens','getConfig','pnpm','[TrimPrompt]\x20Fatal\x20Proxy\x20Error:\x20','./dashboard','\x20(before\x20Trim)','argv','false','write','Error:\x20Action\x20must\x20be\x20install\x20or\x20uninstall','command','\x20\x20\x20\x20\x20\x20\x20TRIMPROMPT.AI\x20SAVINGS\x20SUMMARY\x20\x20\x20\x20\x20\x20\x20\x20','node','description','total_tokens_saved','server-mcp','119682lTBsDe','win32','npx','help','log','then','version','configurable','Port\x20to\x20run\x20the\x20dashboard\x20on','@modelcontextprotocol/','257955HHbosl','set','2434232JVPibr','-sb','defineProperty','some','modelcontextprotocol','cmd','get\x20or\x20set','trim','push','writable','action','Command\x20to\x20launch\x20the\x20target\x20MCP\x20server','git','commander','install','create','=============================================\x0a','argument','stats','2mZXEWC','./executor','test','dashboard','get','-50','uninstallShims','Command','call','mcp-proxy','./tracker','config','Select\x20pricing\x20model\x20(e.g.\x20claude-3-5-sonnet,\x20gpt-4o)','includes','model_name','--min-parents','Start\x20the\x20local\x20developer\x20dashboard','--branch','./cache','getOwnPropertyNames','__createBinding','--help','mcp','stdout','length','compressOutput','exit','Error:\x20Action\x20must\x20be\x20get\x20or\x20set','bun','default','alias','true','tracker','proxy','claude-3-5-sonnet','toLocaleString','--oneline','Install\x20or\x20uninstall\x20system\x20command\x20shims','prototype','[server-args...]','exitCode','--merges','4nbWcJn','shims','yarn','Model\x20Context:\x20\x20\x20\x20\x20','error','value\x20to\x20set','./filters','__importStar','stderr','every','join','1.0.0','Command\x20line\x20to\x20evaluate','-m,\x20--model\x20<string>','Tokens\x20Saved:\x20\x20\x20\x20\x20\x20','message','-bs','parse','startsWith','redaction_enabled','logExecution','\x20=\x20','7353819NVfwrQ','option','Raw\x20Tokens:\x20\x20\x20\x20\x20\x20\x20\x20','Arguments\x20for\x20the\x20target\x20MCP\x20server','[TrimPrompt]\x20Autodetected\x20MCP\x20server\x20execution.\x20Activating\x20real-time\x20JSON-RPC\x20proxy...','status','280500hFSjmN','Actual\x20Cost:\x20\x20\x20\x20\x20\x20\x20$','Manage\x20local\x20configuration\x20parameters','getStatsSummary','Reduction\x20Rate:\x20\x20\x20\x20','Proxy\x20wrapper\x20for\x20Model\x20Context\x20Protocol\x20(MCP)\x20servers\x20to\x20compact\x20tool\x20outputs','toLowerCase','<action>','toFixed','4000','<commandLine>','[value]'];a0_0x46c0=function(){return _0x21a877;};return a0_0x46c0();}const args=process[a0_0x53049d(0xfa)]['slice'](0x2),firstArg=args[0x0],subcommands=['ui',a0_0x53049d(0x126),a0_0x53049d(0x122),'config',a0_0x53049d(0x14e),'rewrite','mcp-proxy','mcp','help',a0_0x53049d(0x138),'-h','version',a0_0x53049d(0xe7),'-v'];firstArg&&!subcommands['includes'](firstArg)?runProxy(args)['catch'](_0x486665=>{const _0xaec7fd=a0_0x53049d;console[_0xaec7fd(0x151)](_0xaec7fd(0xf7)+_0x486665[_0xaec7fd(0x15c)]),process['exit'](0x1);}):program[a0_0x53049d(0x15e)](process[a0_0x53049d(0xfa)]);
|
package/dashboard.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x141f54=a0_0x49f9;(function(_0x548fac,_0x4518be){const _0x2e3cec=a0_0x49f9,_0x2503b3=_0x548fac();while(!![]){try{const _0x113f6a=-parseInt(_0x2e3cec(0x121))/0x1*(-parseInt(_0x2e3cec(0x10a))/0x2)+-parseInt(_0x2e3cec(0xed))/0x3+-parseInt(_0x2e3cec(0xff))/0x4+parseInt(_0x2e3cec(0x115))/0x5*(-parseInt(_0x2e3cec(0x10e))/0x6)+-parseInt(_0x2e3cec(0xec))/0x7*(-parseInt(_0x2e3cec(0x123))/0x8)+parseInt(_0x2e3cec(0xf9))/0x9+parseInt(_0x2e3cec(0x113))/0xa;if(_0x113f6a===_0x4518be)break;else _0x2503b3['push'](_0x2503b3['shift']());}catch(_0x1c86ee){_0x2503b3['push'](_0x2503b3['shift']());}}}(a0_0x2ac5,0x3b799));var __createBinding=this&&this['__createBinding']||(Object['create']?function(_0x33f573,_0x288c39,_0x471e3d,_0xcfe1d2){const _0x3697c2=a0_0x49f9;if(_0xcfe1d2===undefined)_0xcfe1d2=_0x471e3d;var _0x156ccd=Object[_0x3697c2(0xf3)](_0x288c39,_0x471e3d);(!_0x156ccd||(_0x3697c2(0xf4)in _0x156ccd?!_0x288c39[_0x3697c2(0xfd)]:_0x156ccd['writable']||_0x156ccd[_0x3697c2(0xf1)]))&&(_0x156ccd={'enumerable':!![],'get':function(){return _0x288c39[_0x471e3d];}}),Object['defineProperty'](_0x33f573,_0xcfe1d2,_0x156ccd);}:function(_0xad5c9e,_0x4bdcb7,_0xd5ab8d,_0x20959f){if(_0x20959f===undefined)_0x20959f=_0xd5ab8d;_0xad5c9e[_0x20959f]=_0x4bdcb7[_0xd5ab8d];}),__setModuleDefault=this&&this[a0_0x141f54(0x11a)]||(Object[a0_0x141f54(0xee)]?function(_0x1151a3,_0x343255){const _0x399a25=a0_0x141f54;Object[_0x399a25(0x11c)](_0x1151a3,_0x399a25(0xfb),{'enumerable':!![],'value':_0x343255});}:function(_0x5892c9,_0x1b9e64){const _0x58f4a0=a0_0x141f54;_0x5892c9[_0x58f4a0(0xfb)]=_0x1b9e64;}),__importStar=this&&this[a0_0x141f54(0x122)]||(function(){var _0xd14c96=function(_0x548a99){return _0xd14c96=Object['getOwnPropertyNames']||function(_0x5a63a4){const _0x28373e=a0_0x49f9;var _0x398c3f=[];for(var _0x1fe8f0 in _0x5a63a4)if(Object[_0x28373e(0x11f)][_0x28373e(0xe6)][_0x28373e(0x104)](_0x5a63a4,_0x1fe8f0))_0x398c3f[_0x398c3f[_0x28373e(0xeb)]]=_0x1fe8f0;return _0x398c3f;},_0xd14c96(_0x548a99);};return function(_0x4f83e5){const _0x560424=a0_0x49f9;if(_0x4f83e5&&_0x4f83e5[_0x560424(0xfd)])return _0x4f83e5;var _0x1f7743={};if(_0x4f83e5!=null){for(var _0x411eb5=_0xd14c96(_0x4f83e5),_0x3c1e6e=0x0;_0x3c1e6e<_0x411eb5[_0x560424(0xeb)];_0x3c1e6e++)if(_0x411eb5[_0x3c1e6e]!==_0x560424(0xfb))__createBinding(_0x1f7743,_0x4f83e5,_0x411eb5[_0x3c1e6e]);}return __setModuleDefault(_0x1f7743,_0x4f83e5),_0x1f7743;};}()),__importDefault=this&&this[a0_0x141f54(0x10f)]||function(_0x2c565b){return _0x2c565b&&_0x2c565b['__esModule']?_0x2c565b:{'default':_0x2c565b};};Object[a0_0x141f54(0x11c)](exports,a0_0x141f54(0xfd),{'value':!![]}),exports[a0_0x141f54(0x118)]=startDashboard;function a0_0x49f9(_0x4d12eb,_0x3dcd7e){const _0x2ac5d5=a0_0x2ac5();return a0_0x49f9=function(_0x49f9ca,_0x51bd4d){_0x49f9ca=_0x49f9ca-0xe5;let _0x3de3e6=_0x2ac5d5[_0x49f9ca];return _0x3de3e6;},a0_0x49f9(_0x4d12eb,_0x3dcd7e);}const express_1=__importDefault(require(a0_0x141f54(0x120))),path=__importStar(require(a0_0x141f54(0x10d))),fs=__importStar(require('fs')),os=__importStar(require('os')),open_1=__importDefault(require(a0_0x141f54(0xfe))),tracker_1=require(a0_0x141f54(0x119)),app=(0x0,express_1[a0_0x141f54(0xfb)])(),baseDir=path[a0_0x141f54(0x105)](os[a0_0x141f54(0x110)](),a0_0x141f54(0x11e)),logsDir=path['join'](baseDir,a0_0x141f54(0x106));app[a0_0x141f54(0xf4)]('/',(_0x5d2c03,_0x1c27de)=>{const _0x37899c=a0_0x141f54,_0x5c9787=path['join'](__dirname,_0x37899c(0x103));fs[_0x37899c(0x107)](_0x5c9787)?_0x1c27de[_0x37899c(0xf0)](_0x5c9787):_0x1c27de[_0x37899c(0xf0)](path[_0x37899c(0x105)](__dirname,_0x37899c(0xf7)));}),app[a0_0x141f54(0xf4)](a0_0x141f54(0xfc),(_0x561b80,_0x3d655e)=>{const _0x4c19ed=a0_0x141f54,_0x4d59f1=path[_0x4c19ed(0x105)](__dirname,_0x4c19ed(0xe7));fs[_0x4c19ed(0x107)](_0x4d59f1)?_0x3d655e[_0x4c19ed(0xf0)](_0x4d59f1):_0x3d655e[_0x4c19ed(0xf0)](path[_0x4c19ed(0x105)](__dirname,'../src/favicon.png'));}),app[a0_0x141f54(0xf4)](a0_0x141f54(0x124),(_0x545661,_0x377027)=>{const _0x5be37b=a0_0x141f54,_0x34b229=_0x545661[_0x5be37b(0x102)][_0x5be37b(0xef)]||_0x5be37b(0xf5),_0x4d0058=tracker_1[_0x5be37b(0x108)][_0x5be37b(0xf2)](_0x34b229);_0x377027[_0x5be37b(0xf6)](_0x4d0058);}),app[a0_0x141f54(0xf4)](a0_0x141f54(0xe9),(_0x4360e9,_0x5ea69f)=>{const _0x3e8de8=a0_0x141f54,_0x4c5c25=tracker_1[_0x3e8de8(0x108)][_0x3e8de8(0x10c)]();_0x5ea69f[_0x3e8de8(0xf6)](_0x4c5c25);}),app[a0_0x141f54(0xf4)](a0_0x141f54(0xf8),(_0x5a1fba,_0x5edc68)=>{const _0x18ecff=a0_0x141f54,_0x3a348c=_0x5a1fba[_0x18ecff(0x112)]['id'],_0x3f97bc=path[_0x18ecff(0x105)](logsDir,_0x3a348c+_0x18ecff(0x116)),_0xd40bb5=path['join'](logsDir,_0x3a348c+'.comp.txt');let _0x1eb3af=_0x18ecff(0x11d),_0x15bad9='Compressed\x20output\x20log\x20file\x20not\x20found.';try{fs[_0x18ecff(0x107)](_0x3f97bc)&&(_0x1eb3af=fs['readFileSync'](_0x3f97bc,'utf8')),fs[_0x18ecff(0x107)](_0xd40bb5)&&(_0x15bad9=fs[_0x18ecff(0x111)](_0xd40bb5,_0x18ecff(0xe5)));}catch(_0x398b29){}_0x5edc68[_0x18ecff(0xf6)]({'id':_0x3a348c,'raw':_0x1eb3af,'compressed':_0x15bad9});});function a0_0x2ac5(){const _0x5e3398=['existsSync','tracker','listen','49810dgZnBl','error','getLogs','path','239322onTFdp','__importDefault','homedir','readFileSync','params','2321850nDtPMx','http://localhost:','15AZWFtO','.raw.txt','catch','startDashboard','./tracker','__setModuleDefault','Press\x20Ctrl+C\x20in\x20this\x20terminal\x20to\x20shut\x20down.','defineProperty','Raw\x20output\x20log\x20file\x20not\x20found.','.trimprompt','prototype','express','14tPyQYD','__importStar','1495280HEvqvJ','/api/stats/summary','utf8','hasOwnProperty','favicon.png','\x0a[TrimPrompt]\x20Dashboard\x20server\x20started\x20at:\x20','/api/stats/history','message','length','7svhZMr','897324jpMvNA','create','model','sendFile','configurable','getStatsSummary','getOwnPropertyDescriptor','get','auto','json','../src/index.html','/api/stats/inspect/:id','2232090adrCrg','log','default','/favicon.png','__esModule','open','1413588dJtYdf','[TrimPrompt]\x20Dashboard\x20error:\x20','EADDRINUSE','query','index.html','call','join','logs'];a0_0x2ac5=function(){return _0x5e3398;};return a0_0x2ac5();}function startDashboard(_0x138e0f=0xfa0){const _0x4cdad2=a0_0x141f54;let _0x37611d=_0x138e0f;const _0x40b069=app[_0x4cdad2(0x109)](_0x37611d,()=>{const _0x354d07=_0x4cdad2,_0x27c56c=_0x354d07(0x114)+_0x37611d;console[_0x354d07(0xfa)](_0x354d07(0xe8)+_0x27c56c),console[_0x354d07(0xfa)](_0x354d07(0x11b)),(0x0,open_1[_0x354d07(0xfb)])(_0x27c56c)[_0x354d07(0x117)](()=>{});});_0x40b069['on'](_0x4cdad2(0x10b),_0x256f46=>{const _0x593bf2=_0x4cdad2;_0x256f46['code']===_0x593bf2(0x101)?startDashboard(_0x37611d+0x1):console['error'](_0x593bf2(0x100)+_0x256f46[_0x593bf2(0xea)]);});}
|
package/executor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a0_0x22f0ea=a0_0x23e3;function a0_0x52f5(){var _0x470689=['filter','executeCommand','join','13198460GQOmRF','child_process','data','1897uzIXGI','defineProperty','split','stderr','length','4bhiugw','env','delimiter','win32','27942cxUmGk','path','get','platform','2224RJSgSR','homedir','toString','48Phpbwy','trim','pipe','44205502mvXDxF','5469963NgULYp','hasOwnProperty','stdout','__createBinding','Failed\x20to\x20spawn\x20command\x20\x22','writable','__importStar','6284cEZsmj','error','startsWith','PATH','8273785OjnuUv','17541oHvfYb','toLowerCase','call','create','prototype','default','__esModule'];a0_0x52f5=function(){return _0x470689;};return a0_0x52f5();}(function(_0x40550c,_0x21ae80){var _0x8d6fcf=a0_0x23e3,_0x2d14ca=_0x40550c();while(!![]){try{var _0x372ac7=parseInt(_0x8d6fcf(0x172))/0x1*(-parseInt(_0x8d6fcf(0x167))/0x2)+parseInt(_0x8d6fcf(0x16b))/0x3*(parseInt(_0x8d6fcf(0x15c))/0x4)+-parseInt(_0x8d6fcf(0x176))/0x5+-parseInt(_0x8d6fcf(0x160))/0x6*(parseInt(_0x8d6fcf(0x184))/0x7)+parseInt(_0x8d6fcf(0x164))/0x8*(-parseInt(_0x8d6fcf(0x177))/0x9)+-parseInt(_0x8d6fcf(0x181))/0xa+parseInt(_0x8d6fcf(0x16a))/0xb;if(_0x372ac7===_0x21ae80)break;else _0x2d14ca['push'](_0x2d14ca['shift']());}catch(_0xdcf14d){_0x2d14ca['push'](_0x2d14ca['shift']());}}}(a0_0x52f5,0xded4b));var __createBinding=this&&this[a0_0x22f0ea(0x16e)]||(Object[a0_0x22f0ea(0x17a)]?function(_0x5f205f,_0x1c86a6,_0x394039,_0x21c4c9){var _0xff89c8=a0_0x22f0ea;if(_0x21c4c9===undefined)_0x21c4c9=_0x394039;var _0x2fee9a=Object['getOwnPropertyDescriptor'](_0x1c86a6,_0x394039);(!_0x2fee9a||(_0xff89c8(0x162)in _0x2fee9a?!_0x1c86a6['__esModule']:_0x2fee9a[_0xff89c8(0x170)]||_0x2fee9a['configurable']))&&(_0x2fee9a={'enumerable':!![],'get':function(){return _0x1c86a6[_0x394039];}}),Object[_0xff89c8(0x185)](_0x5f205f,_0x21c4c9,_0x2fee9a);}:function(_0x53d34d,_0x1b9cab,_0x1fcd49,_0x208352){if(_0x208352===undefined)_0x208352=_0x1fcd49;_0x53d34d[_0x208352]=_0x1b9cab[_0x1fcd49];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a0_0x22f0ea(0x17a)]?function(_0x2b8ce4,_0x30f910){var _0x60b4bd=a0_0x22f0ea;Object[_0x60b4bd(0x185)](_0x2b8ce4,_0x60b4bd(0x17c),{'enumerable':!![],'value':_0x30f910});}:function(_0x5d34cf,_0x48fea0){var _0x1a1553=a0_0x22f0ea;_0x5d34cf[_0x1a1553(0x17c)]=_0x48fea0;}),__importStar=this&&this[a0_0x22f0ea(0x171)]||(function(){var _0x18cc83=function(_0x682fa5){return _0x18cc83=Object['getOwnPropertyNames']||function(_0xb1db0b){var _0x2ecb38=a0_0x23e3,_0x19df19=[];for(var _0x593918 in _0xb1db0b)if(Object[_0x2ecb38(0x17b)][_0x2ecb38(0x16c)][_0x2ecb38(0x179)](_0xb1db0b,_0x593918))_0x19df19[_0x19df19[_0x2ecb38(0x15b)]]=_0x593918;return _0x19df19;},_0x18cc83(_0x682fa5);};return function(_0x10d068){var _0x7326ef=a0_0x23e3;if(_0x10d068&&_0x10d068[_0x7326ef(0x17d)])return _0x10d068;var _0x63a3e5={};if(_0x10d068!=null){for(var _0x239e76=_0x18cc83(_0x10d068),_0x3963ac=0x0;_0x3963ac<_0x239e76['length'];_0x3963ac++)if(_0x239e76[_0x3963ac]!==_0x7326ef(0x17c))__createBinding(_0x63a3e5,_0x10d068,_0x239e76[_0x3963ac]);}return __setModuleDefault(_0x63a3e5,_0x10d068),_0x63a3e5;};}());function a0_0x23e3(_0x29a2e3,_0x57b7d7){var _0x52f56e=a0_0x52f5();return a0_0x23e3=function(_0x23e359,_0x1aaaa7){_0x23e359=_0x23e359-0x15b;var _0xb3756b=_0x52f56e[_0x23e359];return _0xb3756b;},a0_0x23e3(_0x29a2e3,_0x57b7d7);}Object[a0_0x22f0ea(0x185)](exports,a0_0x22f0ea(0x17d),{'value':!![]}),exports[a0_0x22f0ea(0x17f)]=executeCommand;const child_process_1=require(a0_0x22f0ea(0x182)),path=__importStar(require(a0_0x22f0ea(0x161))),os=__importStar(require('os'));function executeCommand(_0x26f744,_0x46a503){return new Promise(_0x544fb6=>{var _0x5a02a8=a0_0x23e3;const _0x6635e4=path[_0x5a02a8(0x180)](os[_0x5a02a8(0x165)](),'.trimprompt','shims'),_0x30cccf=(process[_0x5a02a8(0x15d)][_0x5a02a8(0x175)]||'')[_0x5a02a8(0x186)](path[_0x5a02a8(0x15e)])[_0x5a02a8(0x17e)](_0x10c85b=>_0x10c85b[_0x5a02a8(0x168)]()[_0x5a02a8(0x178)]()!==_0x6635e4[_0x5a02a8(0x178)]())[_0x5a02a8(0x180)](path[_0x5a02a8(0x15e)]),_0x178440={...process[_0x5a02a8(0x15d)],'PATH':_0x30cccf,'TRIMPROMPT_DISABLED':'1'},_0x57f5d7=process[_0x5a02a8(0x163)]===_0x5a02a8(0x15f)?_0x46a503['map'](_0x1eefcb=>_0x1eefcb['includes']('\x20')&&!_0x1eefcb[_0x5a02a8(0x174)]('\x22')?'\x22'+_0x1eefcb+'\x22':_0x1eefcb):_0x46a503,_0x4f4733=(0x0,child_process_1['spawn'])(_0x26f744,_0x57f5d7,{'stdio':['inherit',_0x5a02a8(0x169),_0x5a02a8(0x169)],'shell':!![],'env':_0x178440});let _0x1bc579='',_0x4b2c92='';_0x4f4733[_0x5a02a8(0x16d)]?.['on'](_0x5a02a8(0x183),_0x518463=>{var _0x3920c2=_0x5a02a8;_0x1bc579+=_0x518463[_0x3920c2(0x166)]();}),_0x4f4733[_0x5a02a8(0x187)]?.['on']('data',_0x203fba=>{_0x4b2c92+=_0x203fba['toString']();}),_0x4f4733['on'](_0x5a02a8(0x173),_0x2859e4=>{var _0x239585=_0x5a02a8;_0x544fb6({'exitCode':0x1,'stdout':'','stderr':_0x239585(0x16f)+_0x26f744+'\x22:\x20'+_0x2859e4['message']});}),_0x4f4733['on']('close',_0x565538=>{_0x544fb6({'exitCode':_0x565538??0x0,'stdout':_0x1bc579,'stderr':_0x4b2c92});});});}
|
package/filters/devops.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x1475a7=a0_0x19a8;(function(_0x4a8d1a,_0xf59d70){const _0x3e900e=a0_0x19a8,_0x1ac7c9=_0x4a8d1a();while(!![]){try{const _0x587edc=-parseInt(_0x3e900e(0x1fd))/0x1+parseInt(_0x3e900e(0x213))/0x2*(-parseInt(_0x3e900e(0x1e6))/0x3)+parseInt(_0x3e900e(0x1e7))/0x4+parseInt(_0x3e900e(0x20e))/0x5+parseInt(_0x3e900e(0x20b))/0x6*(parseInt(_0x3e900e(0x1fc))/0x7)+parseInt(_0x3e900e(0x1e9))/0x8*(parseInt(_0x3e900e(0x1f7))/0x9)+-parseInt(_0x3e900e(0x20a))/0xa*(parseInt(_0x3e900e(0x1f5))/0xb);if(_0x587edc===_0xf59d70)break;else _0x1ac7c9['push'](_0x1ac7c9['shift']());}catch(_0x266833){_0x1ac7c9['push'](_0x1ac7c9['shift']());}}}(a0_0x1a0e,0x60a8f));Object[a0_0x1475a7(0x1fb)](exports,'__esModule',{'value':!![]}),exports[a0_0x1475a7(0x208)]=filterDockerPs,exports[a0_0x1475a7(0x1fe)]=filterDockerImages,exports[a0_0x1475a7(0x211)]=filterDockerLogs,exports[a0_0x1475a7(0x1e4)]=filterKubectl,exports[a0_0x1475a7(0x207)]=filterRuff;function filterDockerPs(_0x41c0ac){const _0x245554=a0_0x1475a7,_0x19c232=_0x41c0ac[_0x245554(0x1f6)]('\x0a')[_0x245554(0x1ef)](_0x498f74=>_0x498f74['trim']()[_0x245554(0x1ff)]>0x0);if(_0x19c232[_0x245554(0x1ff)]===0x0)return _0x245554(0x216);if(_0x19c232['length']<=0xa)return _0x41c0ac[_0x245554(0x1ed)]();const _0x458537=_0x19c232[0x0],_0x285a64=_0x19c232['slice'](0x1),_0x2d192e=[];_0x2d192e[_0x245554(0x1f2)]('Containers:\x20'+_0x285a64[_0x245554(0x1ff)]+_0x245554(0x1ea)),_0x2d192e['push']('');for(const _0x5f4ae1 of _0x285a64){const _0x4fae51=_0x5f4ae1[_0x245554(0x1f6)](/\s{2,}/);if(_0x4fae51[_0x245554(0x1ff)]>=0x5){const _0x130d10=_0x4fae51[0x0]['substring'](0x0,0xc),_0x31c9bf=_0x4fae51[0x1],_0x2e2cdd=_0x4fae51[_0x4fae51[_0x245554(0x1ff)]-0x2]||'',_0x2dc77b=_0x4fae51[_0x4fae51[_0x245554(0x1ff)]-0x1]||'';_0x2d192e[_0x245554(0x1f2)]('\x20\x20'+_0x130d10+'\x20\x20'+_0x31c9bf+'\x20\x20'+_0x2e2cdd+'\x20\x20'+_0x2dc77b);}else _0x2d192e[_0x245554(0x1f2)]('\x20\x20'+_0x5f4ae1[_0x245554(0x1ed)]());}return _0x2d192e[_0x245554(0x1ec)]('\x0a');}function a0_0x19a8(_0x5080d4,_0x5e4243){const _0x1a0e09=a0_0x1a0e();return a0_0x19a8=function(_0x19a871,_0x3e6cba){_0x19a871=_0x19a871-0x1e4;let _0x357661=_0x1a0e09[_0x19a871];return _0x357661;},a0_0x19a8(_0x5080d4,_0x5e4243);}function filterDockerImages(_0x3e0835){const _0x44b043=a0_0x1475a7,_0x672afd=_0x3e0835[_0x44b043(0x1f6)]('\x0a')[_0x44b043(0x1ef)](_0x492216=>_0x492216[_0x44b043(0x1ed)]()[_0x44b043(0x1ff)]>0x0);if(_0x672afd[_0x44b043(0x1ff)]<=0x1)return'No\x20images\x20found';if(_0x672afd[_0x44b043(0x1ff)]<=0xf)return _0x3e0835[_0x44b043(0x1ed)]();const _0x4b62ba=_0x672afd[_0x44b043(0x1f4)](0x1),_0x4c5407=[_0x44b043(0x1e8)+_0x4b62ba[_0x44b043(0x1ff)]+'\x20total'];_0x4c5407[_0x44b043(0x1f2)]('');const _0xa8300e=_0x4b62ba[_0x44b043(0x1f4)](0x0,0x14);for(const _0x491e19 of _0xa8300e){const _0x5c0490=_0x491e19[_0x44b043(0x1f6)](/\s{2,}/);if(_0x5c0490['length']>=0x3){const _0x166ce6=_0x5c0490[0x0],_0x2b3346=_0x5c0490[0x1],_0x228954=_0x5c0490[_0x5c0490['length']-0x1]||'';_0x4c5407[_0x44b043(0x1f2)]('\x20\x20'+_0x166ce6+':'+_0x2b3346+'\x20\x20'+_0x228954);}else _0x4c5407[_0x44b043(0x1f2)]('\x20\x20'+_0x491e19[_0x44b043(0x1ed)]());}return _0x4b62ba[_0x44b043(0x1ff)]>0x14&&_0x4c5407[_0x44b043(0x1f2)](_0x44b043(0x1fa)+(_0x4b62ba[_0x44b043(0x1ff)]-0x14)+_0x44b043(0x1e5)),_0x4c5407['join']('\x0a');}function filterDockerLogs(_0x253bdf){const _0x42d7fb=a0_0x1475a7,_0x42e042=_0x253bdf['split']('\x0a');if(_0x42e042[_0x42d7fb(0x1ff)]<=0x32)return _0x253bdf;const _0xfe1bb3=[];return _0xfe1bb3[_0x42d7fb(0x1f2)](..._0x42e042[_0x42d7fb(0x1f4)](0x0,0x14)),_0xfe1bb3['push']('\x0a...\x20['+(_0x42e042['length']-0x28)+_0x42d7fb(0x1f9)),_0xfe1bb3[_0x42d7fb(0x1f2)](..._0x42e042[_0x42d7fb(0x1f4)](-0x14)),_0xfe1bb3['push']('\x0a('+_0x42e042['length']+_0x42d7fb(0x1eb)),_0xfe1bb3[_0x42d7fb(0x1ec)]('\x0a');}function filterKubectl(_0x102672,_0x4dc34b){const _0x197121=a0_0x1475a7,_0x2d47e2=_0x102672['split']('\x0a')['filter'](_0x672650=>_0x672650[_0x197121(0x1ed)]()[_0x197121(0x1ff)]>0x0);if(_0x2d47e2[_0x197121(0x1ff)]===0x0)return _0x197121(0x20d);if(_0x2d47e2['length']<=0x14)return _0x102672['trim']();if(_0x4dc34b===_0x197121(0x212)){const _0xb2881b=_0x2d47e2[0x0],_0x3c398e=_0x2d47e2[_0x197121(0x1f4)](0x1),_0x5dd65c=[_0x3c398e['length']+_0x197121(0x204),'',_0xb2881b];return _0x3c398e['length']<=0x1e?_0x5dd65c['push'](..._0x3c398e):(_0x5dd65c[_0x197121(0x1f2)](..._0x3c398e['slice'](0x0,0x19)),_0x5dd65c[_0x197121(0x1f2)](_0x197121(0x210)+(_0x3c398e[_0x197121(0x1ff)]-0x19)+'\x20more\x20resources')),_0x5dd65c[_0x197121(0x1ec)]('\x0a');}if(_0x4dc34b===_0x197121(0x203)){const _0x5f13fe=[];let _0x1203cc=![],_0x30eeb4=0x0;for(const _0x527a70 of _0x2d47e2){if(_0x527a70[_0x197121(0x20c)]('Events:')){_0x1203cc=!![],_0x5f13fe['push'](_0x527a70);continue;}if(_0x1203cc){_0x30eeb4++;if(_0x30eeb4<=0x5)_0x5f13fe['push'](_0x527a70);}else _0x5f13fe[_0x197121(0x1f2)](_0x527a70);}return _0x30eeb4>0x5&&_0x5f13fe[_0x197121(0x1f2)](_0x197121(0x1fa)+(_0x30eeb4-0x5)+_0x197121(0x1f8)),_0x5f13fe[_0x197121(0x1ec)]('\x0a');}if(_0x4dc34b===_0x197121(0x1f0))return filterDockerLogs(_0x102672);const _0x4f42e9=_0x2d47e2[_0x197121(0x1f4)](0x0,0x1e);return _0x2d47e2['length']>0x1e&&_0x4f42e9[_0x197121(0x1f2)](_0x197121(0x210)+(_0x2d47e2[_0x197121(0x1ff)]-0x1e)+_0x197121(0x200)),_0x4f42e9[_0x197121(0x1ec)]('\x0a');}function filterRuff(_0x1d1ef2){const _0x161a05=a0_0x1475a7,_0x46aafc=_0x1d1ef2[_0x161a05(0x1f6)]('\x0a')[_0x161a05(0x1ef)](_0x403abc=>_0x403abc[_0x161a05(0x1ed)]()[_0x161a05(0x1ff)]>0x0);if(_0x46aafc[_0x161a05(0x1ff)]===0x0)return'Ruff:\x20no\x20issues\x20found';if(_0x1d1ef2['includes'](_0x161a05(0x215))||_0x1d1ef2[_0x161a05(0x209)]('Found\x200\x20error'))return _0x161a05(0x202);const _0x1874bb=_0x1d1ef2['match'](/Found (\d+) error/),_0xb90f89=_0x1874bb?parseInt(_0x1874bb[0x1]):_0x46aafc[_0x161a05(0x1ff)],_0xd27e12={},_0x5ba652=[];for(const _0x28168d of _0x46aafc){const _0x260cdd=_0x28168d['match'](/^([^:]+:\d+:\d+):\s*(.*)/);if(_0x260cdd){const _0x1dd2a2=_0x260cdd[0x1],_0x4e8b81=_0x1dd2a2['split'](':')[0x0];if(!_0xd27e12[_0x4e8b81])_0xd27e12[_0x4e8b81]=[];_0xd27e12[_0x4e8b81][_0x161a05(0x1f2)](_0x28168d);}else _0x5ba652[_0x161a05(0x1f2)](_0x28168d);}const _0x2e8abf=Object[_0x161a05(0x206)](_0xd27e12);if(_0x2e8abf[_0x161a05(0x1ff)]===0x0){if(_0x46aafc[_0x161a05(0x1ff)]<=0x14)return _0x1d1ef2[_0x161a05(0x1ed)]();return _0x46aafc[_0x161a05(0x1f4)](0x0,0xf)[_0x161a05(0x1ec)]('\x0a')+(_0x161a05(0x1f3)+(_0x46aafc[_0x161a05(0x1ff)]-0xf)+_0x161a05(0x214));}const _0x42e40e=[_0x161a05(0x205)+_0xb90f89+_0x161a05(0x20f)+_0x2e8abf[_0x161a05(0x1ff)]+_0x161a05(0x1f1)];_0x42e40e['push']('');const _0x98c0fb=0xa;for(const _0x2a4e60 of _0x2e8abf['slice'](0x0,_0x98c0fb)){const _0x1ea3dc=_0xd27e12[_0x2a4e60];if(_0x1ea3dc['length']<=0x3){for(const _0x29a7e1 of _0x1ea3dc)_0x42e40e[_0x161a05(0x1f2)]('\x20\x20'+_0x29a7e1);}else _0x42e40e[_0x161a05(0x1f2)]('\x20\x20'+_0x1ea3dc[0x0]),_0x42e40e[_0x161a05(0x1f2)](_0x161a05(0x1ee)+_0x1ea3dc[_0x161a05(0x1ff)]+_0x161a05(0x20f)+_0x2a4e60+')');}return _0x2e8abf[_0x161a05(0x1ff)]>_0x98c0fb&&_0x42e40e[_0x161a05(0x1f2)](_0x161a05(0x1fa)+(_0x2e8abf[_0x161a05(0x1ff)]-_0x98c0fb)+_0x161a05(0x201)),_0x42e40e['join']('\x0a');}function a0_0x1a0e(){const _0x58fe42=['Ruff:\x20','keys','filterRuff','filterDockerPs','includes','170ppJhhK','2731626hiRjKW','startsWith','No\x20resources\x20found','3022735ueYLjm','\x20issues\x20in\x20','...\x20+','filterDockerLogs','get','376520zCCEJw','\x20more','All\x20checks\x20passed','No\x20containers\x20running','filterKubectl','\x20more\x20images','3VCwwRl','1140260sUqfSS','Docker\x20images:\x20','8ENGwrJ','\x20total','\x20log\x20lines\x20total)','join','trim','\x20\x20...\x20(','filter','logs','\x20files','push','\x0a...\x20+','slice','377014yLAdbb','split','4250223isFDoJ','\x20more\x20events','\x20lines\x20truncated]\x20...\x0a','\x20\x20...\x20+','defineProperty','7XGfnOx','650293PpTOJS','filterDockerImages','length','\x20more\x20lines','\x20more\x20files','Ruff:\x20all\x20checks\x20passed','describe','\x20resources\x20found'];a0_0x1a0e=function(){return _0x58fe42;};return a0_0x1a0e();}
|
package/filters/generic.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x29a2aa=a0_0x6d15;(function(_0x1037ad,_0x1fefd1){const _0x58fc5e=a0_0x6d15,_0x245ef8=_0x1037ad();while(!![]){try{const _0x1b622d=-parseInt(_0x58fc5e(0x1e0))/0x1*(parseInt(_0x58fc5e(0x1e5))/0x2)+parseInt(_0x58fc5e(0x1dd))/0x3*(parseInt(_0x58fc5e(0x1e1))/0x4)+parseInt(_0x58fc5e(0x1e2))/0x5+-parseInt(_0x58fc5e(0x1e9))/0x6+parseInt(_0x58fc5e(0x1f1))/0x7*(-parseInt(_0x58fc5e(0x1e3))/0x8)+-parseInt(_0x58fc5e(0x1ee))/0x9*(-parseInt(_0x58fc5e(0x1eb))/0xa)+-parseInt(_0x58fc5e(0x1dc))/0xb*(parseInt(_0x58fc5e(0x1f3))/0xc);if(_0x1b622d===_0x1fefd1)break;else _0x245ef8['push'](_0x245ef8['shift']());}catch(_0x71fc02){_0x245ef8['push'](_0x245ef8['shift']());}}}(a0_0x5a60,0x9dbbd));Object[a0_0x29a2aa(0x1e4)](exports,a0_0x29a2aa(0x1df),{'value':!![]}),exports[a0_0x29a2aa(0x1da)]=stripAnsi,exports[a0_0x29a2aa(0x1db)]=collapseDuplicates,exports[a0_0x29a2aa(0x1f4)]=softTruncate;function a0_0x6d15(_0x2628aa,_0x5a55a3){const _0x5a603b=a0_0x5a60();return a0_0x6d15=function(_0x6d1526,_0x151dcf){_0x6d1526=_0x6d1526-0x1da;let _0x550cb8=_0x5a603b[_0x6d1526];return _0x550cb8;},a0_0x6d15(_0x2628aa,_0x5a55a3);}function stripAnsi(_0x27c663){const _0x38ebfc=a0_0x29a2aa,_0x38019a=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g;return _0x27c663[_0x38ebfc(0x1ed)](_0x38019a,'');}function collapseDuplicates(_0x560147){const _0x133cb7=a0_0x29a2aa,_0x55e32a=_0x560147[_0x133cb7(0x1ec)]('\x0a');if(_0x55e32a[_0x133cb7(0x1de)]<=0x1)return _0x560147;const _0x20d950=[];let _0xb4797d=_0x55e32a[0x0],_0x1dfca9=0x1;for(let _0x5dfcd9=0x1;_0x5dfcd9<_0x55e32a[_0x133cb7(0x1de)];_0x5dfcd9++){const _0x539a3b=_0x55e32a[_0x5dfcd9];_0x539a3b===_0xb4797d&&_0x539a3b[_0x133cb7(0x1ef)]()['length']>0x0?_0x1dfca9++:(_0x1dfca9>0x1?_0x20d950['push'](_0xb4797d+_0x133cb7(0x1e6)+_0x1dfca9+']'):_0x20d950[_0x133cb7(0x1f0)](_0xb4797d),_0xb4797d=_0x539a3b,_0x1dfca9=0x1);}return _0x1dfca9>0x1?_0x20d950[_0x133cb7(0x1f0)](_0xb4797d+_0x133cb7(0x1e6)+_0x1dfca9+']'):_0x20d950[_0x133cb7(0x1f0)](_0xb4797d),_0x20d950[_0x133cb7(0x1f2)]('\x0a');}function softTruncate(_0x4e34c5,_0x488dea=0x4e20){const _0x2a720b=a0_0x29a2aa;if(_0x4e34c5['length']<=_0x488dea)return _0x4e34c5;const _0x344a6d=_0x4e34c5[_0x2a720b(0x1ec)]('\x0a');if(_0x344a6d[_0x2a720b(0x1de)]<=0xc8)return _0x4e34c5;const _0x34b61c=0x32,_0x1b1474=0x96,_0x4b9cb5=_0x344a6d[_0x2a720b(0x1e7)](0x0,_0x34b61c),_0x659079=_0x344a6d[_0x2a720b(0x1e7)](_0x344a6d['length']-_0x1b1474),_0x494ac7=_0x4e34c5[_0x2a720b(0x1de)]-(_0x4b9cb5[_0x2a720b(0x1f2)]('\x0a')[_0x2a720b(0x1de)]+_0x659079[_0x2a720b(0x1f2)]('\x0a')[_0x2a720b(0x1de)]);return[..._0x4b9cb5,_0x2a720b(0x1e8)+_0x494ac7+_0x2a720b(0x1ea),..._0x659079][_0x2a720b(0x1f2)]('\x0a');}function a0_0x5a60(){const _0x1428d4=['split','replace','18TYIiLi','trim','push','14WWnjsj','join','510420KwWUuz','softTruncate','stripAnsi','collapseDuplicates','55KuhgEP','7710DdlQDd','length','__esModule','69042oaefNB','1416zbddaT','5041085qTefgK','4783400XdhIhL','defineProperty','2JrOzgA','\x20[x','slice','\x0a...\x20[TrimPrompt:\x20Truncated\x20','5946006ybbebB','\x20characters\x20of\x20output]\x20...\x0a','5983240rAYWvX'];a0_0x5a60=function(){return _0x1428d4;};return a0_0x5a60();}
|
package/filters/git.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x8ccf95=a0_0x3acf;(function(_0x42cc04,_0x259947){const _0x43792d=a0_0x3acf,_0x45abed=_0x42cc04();while(!![]){try{const _0x111452=parseInt(_0x43792d(0xde))/0x1+-parseInt(_0x43792d(0xe8))/0x2*(parseInt(_0x43792d(0xdf))/0x3)+-parseInt(_0x43792d(0xea))/0x4*(-parseInt(_0x43792d(0xd6))/0x5)+-parseInt(_0x43792d(0xc8))/0x6+parseInt(_0x43792d(0xcd))/0x7+-parseInt(_0x43792d(0xd4))/0x8+parseInt(_0x43792d(0xc2))/0x9*(-parseInt(_0x43792d(0xeb))/0xa);if(_0x111452===_0x259947)break;else _0x45abed['push'](_0x45abed['shift']());}catch(_0x3e8640){_0x45abed['push'](_0x45abed['shift']());}}}(a0_0x4acc,0x472a6));function a0_0x4acc(){const _0x11e5c1=['911944PNnvgD','\x20\x20??\x20','15FnmVsP','__setModuleDefault','writable','default','filter','match','hasOwnProperty','create','399269ZFNgTS','4419thIKxA','getOwnPropertyNames','split','__esModule','basename','\x20(+','configurable','filterGitStatus','prototype','76pTqhAx','getOwnPropertyDescriptor','706116ICQybt','6230WyijZT','push','path','\x20\x20...\x20+','/\x20(','call','---END---','\x0aChanges:','substring','slice','1611OwWUNW','diff\x20--git','join','\x20untracked\x20files)','---','\x20more\x20modifications','3152634cAtVMn','length','\x20lines\x20of\x20description)','filterGitLog','+++','1186927gtjfFa','filterGitDiff','startsWith','unknown_file','map','trim','defineProperty'];a0_0x4acc=function(){return _0x11e5c1;};return a0_0x4acc();}var __createBinding=this&&this['__createBinding']||(Object[a0_0x8ccf95(0xdd)]?function(_0x1f401e,_0x409116,_0x164af6,_0x57e778){const _0x2a7d00=a0_0x8ccf95;if(_0x57e778===undefined)_0x57e778=_0x164af6;var _0x3f1965=Object[_0x2a7d00(0xe9)](_0x409116,_0x164af6);(!_0x3f1965||('get'in _0x3f1965?!_0x409116[_0x2a7d00(0xe2)]:_0x3f1965[_0x2a7d00(0xd8)]||_0x3f1965[_0x2a7d00(0xe5)]))&&(_0x3f1965={'enumerable':!![],'get':function(){return _0x409116[_0x164af6];}}),Object[_0x2a7d00(0xd3)](_0x1f401e,_0x57e778,_0x3f1965);}:function(_0x24d45b,_0x506e33,_0x2a5b32,_0x10e535){if(_0x10e535===undefined)_0x10e535=_0x2a5b32;_0x24d45b[_0x10e535]=_0x506e33[_0x2a5b32];}),__setModuleDefault=this&&this[a0_0x8ccf95(0xd7)]||(Object['create']?function(_0x56711c,_0x194092){const _0x438fd9=a0_0x8ccf95;Object[_0x438fd9(0xd3)](_0x56711c,'default',{'enumerable':!![],'value':_0x194092});}:function(_0x342835,_0x19932a){const _0x1c65b5=a0_0x8ccf95;_0x342835[_0x1c65b5(0xd9)]=_0x19932a;}),__importStar=this&&this['__importStar']||(function(){var _0x5d9cb7=function(_0x2117e8){const _0x52276e=a0_0x3acf;return _0x5d9cb7=Object[_0x52276e(0xe0)]||function(_0x2d40cc){const _0x54adf1=_0x52276e;var _0x46409a=[];for(var _0x575b91 in _0x2d40cc)if(Object[_0x54adf1(0xe7)][_0x54adf1(0xdc)][_0x54adf1(0xbd)](_0x2d40cc,_0x575b91))_0x46409a[_0x46409a[_0x54adf1(0xc9)]]=_0x575b91;return _0x46409a;},_0x5d9cb7(_0x2117e8);};return function(_0x5f2bc3){const _0x4e6e24=a0_0x3acf;if(_0x5f2bc3&&_0x5f2bc3['__esModule'])return _0x5f2bc3;var _0x3b6d5f={};if(_0x5f2bc3!=null){for(var _0x37e34b=_0x5d9cb7(_0x5f2bc3),_0x301c59=0x0;_0x301c59<_0x37e34b[_0x4e6e24(0xc9)];_0x301c59++)if(_0x37e34b[_0x301c59]!=='default')__createBinding(_0x3b6d5f,_0x5f2bc3,_0x37e34b[_0x301c59]);}return __setModuleDefault(_0x3b6d5f,_0x5f2bc3),_0x3b6d5f;};}());Object['defineProperty'](exports,a0_0x8ccf95(0xe2),{'value':!![]}),exports[a0_0x8ccf95(0xe6)]=filterGitStatus,exports[a0_0x8ccf95(0xcb)]=filterGitLog,exports[a0_0x8ccf95(0xce)]=filterGitDiff;function a0_0x3acf(_0x331e0d,_0x11bf83){const _0x4acc6f=a0_0x4acc();return a0_0x3acf=function(_0x3acf51,_0x280b98){_0x3acf51=_0x3acf51-0xba;let _0x38fbed=_0x4acc6f[_0x3acf51];return _0x38fbed;},a0_0x3acf(_0x331e0d,_0x11bf83);}const path=__importStar(require(a0_0x8ccf95(0xba)));function filterGitStatus(_0x1c2772){const _0x3cccd2=a0_0x8ccf95,_0x1d9d48=_0x1c2772[_0x3cccd2(0xe1)]('\x0a')[_0x3cccd2(0xd1)](_0x54ebd5=>_0x54ebd5[_0x3cccd2(0xd2)]())['filter'](_0x2f2acf=>_0x2f2acf[_0x3cccd2(0xc9)]>0x0);if(_0x1d9d48[_0x3cccd2(0xc9)]===0x0)return'Clean\x20working\x20tree';const _0x2fb600=[],_0x50cc35=[],_0x3c210c=[];for(const _0x3d5778 of _0x1d9d48){if(_0x3d5778['startsWith']('##')){const _0x491634=_0x3d5778['replace'](/^##\s*/,'');_0x2fb600[_0x3cccd2(0xec)]('*\x20Branch:\x20'+_0x491634);}else _0x3d5778['startsWith']('??')?_0x50cc35[_0x3cccd2(0xec)](_0x3d5778[_0x3cccd2(0xc0)](0x3)['trim']()):_0x3c210c[_0x3cccd2(0xec)](_0x3d5778);}_0x3c210c[_0x3cccd2(0xc9)]>0x0&&(_0x2fb600[_0x3cccd2(0xec)](_0x3cccd2(0xbf)),_0x2fb600[_0x3cccd2(0xec)](..._0x3c210c[_0x3cccd2(0xd1)](_0x49d216=>'\x20\x20'+_0x49d216)));if(_0x50cc35[_0x3cccd2(0xc9)]>0x0){_0x2fb600[_0x3cccd2(0xec)]('\x0aUntracked\x20files:');const _0x4064ee={},_0x1a2ce9=[];for(const _0x4fb9fd of _0x50cc35){const _0x2944f5=path['dirname'](_0x4fb9fd);_0x2944f5==='.'||_0x2944f5===''?_0x1a2ce9['push'](_0x4fb9fd):(!_0x4064ee[_0x2944f5]&&(_0x4064ee[_0x2944f5]=[]),_0x4064ee[_0x2944f5][_0x3cccd2(0xec)](path[_0x3cccd2(0xe3)](_0x4fb9fd)));}for(const [_0x47bb52,_0x3e01db]of Object['entries'](_0x4064ee)){if(_0x3e01db[_0x3cccd2(0xc9)]>0x5)_0x2fb600[_0x3cccd2(0xec)](_0x3cccd2(0xd5)+_0x47bb52+_0x3cccd2(0xbc)+_0x3e01db[_0x3cccd2(0xc9)]+_0x3cccd2(0xc5));else for(const _0x558e39 of _0x3e01db){_0x2fb600[_0x3cccd2(0xec)]('\x20\x20??\x20'+path[_0x3cccd2(0xc4)](_0x47bb52,_0x558e39));}}for(const _0x22723f of _0x1a2ce9){_0x2fb600['push'](_0x3cccd2(0xd5)+_0x22723f);}}return _0x2fb600[_0x3cccd2(0xc4)]('\x0a');}function filterGitLog(_0x41519c){const _0x1248fb=a0_0x8ccf95,_0x40d5dc=_0x41519c[_0x1248fb(0xe1)](_0x1248fb(0xbe))[_0x1248fb(0xd1)](_0x1eb430=>_0x1eb430[_0x1248fb(0xd2)]())['filter'](_0x4c5051=>_0x4c5051[_0x1248fb(0xc9)]>0x0);if(_0x40d5dc[_0x1248fb(0xc9)]===0x0)return _0x41519c;const _0x3de05d=[];for(const _0x43e5e1 of _0x40d5dc){const _0x469713=_0x43e5e1[_0x1248fb(0xe1)]('\x0a'),_0x440acd=_0x469713[0x0]||'',_0x1ba693=_0x469713[_0x1248fb(0xc1)](0x1)['map'](_0x20a5c7=>_0x20a5c7[_0x1248fb(0xd2)]())[_0x1248fb(0xda)](_0x155fa2=>_0x155fa2[_0x1248fb(0xc9)]>0x0);_0x3de05d[_0x1248fb(0xec)]('-\x20'+_0x440acd),_0x1ba693[_0x1248fb(0xc9)]>0x0&&(_0x3de05d[_0x1248fb(0xec)]('\x20\x20'+_0x1ba693[0x0]),_0x1ba693[_0x1248fb(0xc9)]>0x1&&_0x3de05d[_0x1248fb(0xec)]('\x20\x20...\x20(+'+(_0x1ba693['length']-0x1)+_0x1248fb(0xca)));}return _0x3de05d[_0x1248fb(0xc4)]('\x0a');}function filterGitDiff(_0x586983){const _0x3f02ea=a0_0x8ccf95,_0x4a9ea1=_0x586983[_0x3f02ea(0xe1)]('\x0a'),_0x84278e=[];let _0x28039a='',_0x293cf0=0x0,_0x24ec46=0x0,_0x34dc16=[];const _0x519feb=()=>{const _0x4ec98d=_0x3f02ea;if(_0x28039a&&(_0x293cf0>0x0||_0x24ec46>0x0)){_0x84278e[_0x4ec98d(0xec)]('[file]\x20'+_0x28039a+_0x4ec98d(0xe4)+_0x293cf0+'\x20-'+_0x24ec46+')');const _0x49aec6=0xa,_0x6c0860=_0x34dc16[_0x4ec98d(0xc1)](0x0,_0x49aec6);for(const _0x3b366e of _0x6c0860){_0x84278e[_0x4ec98d(0xec)]('\x20\x20'+_0x3b366e);}const _0x378a89=_0x293cf0+_0x24ec46-_0x49aec6;_0x378a89>0x0&&_0x84278e[_0x4ec98d(0xec)](_0x4ec98d(0xbb)+_0x378a89+_0x4ec98d(0xc7));}_0x293cf0=0x0,_0x24ec46=0x0,_0x34dc16=[];};for(const _0x1c9cb9 of _0x4a9ea1){if(_0x1c9cb9['startsWith'](_0x3f02ea(0xc3))){_0x519feb();const _0x5af6da=_0x1c9cb9[_0x3f02ea(0xdb)](/\sb\/(.+)$/);_0x28039a=_0x5af6da?_0x5af6da[0x1]:_0x3f02ea(0xd0);}else{if(_0x1c9cb9[_0x3f02ea(0xcf)]('+')&&!_0x1c9cb9[_0x3f02ea(0xcf)](_0x3f02ea(0xcc)))_0x293cf0++,_0x34dc16[_0x3f02ea(0xec)](_0x1c9cb9);else _0x1c9cb9[_0x3f02ea(0xcf)]('-')&&!_0x1c9cb9[_0x3f02ea(0xcf)](_0x3f02ea(0xc6))&&(_0x24ec46++,_0x34dc16['push'](_0x1c9cb9));}}_0x519feb();const _0x463619=_0x84278e['join']('\x0a');return _0x463619[_0x3f02ea(0xc9)]>0x0?_0x463619:'No\x20modifications';}
|
package/filters/go.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x4f2ab0=a0_0x5ea5;function a0_0x5ea5(_0x11e223,_0x7a45e4){const _0x51c850=a0_0x51c8();return a0_0x5ea5=function(_0x5ea564,_0x46e0f0){_0x5ea564=_0x5ea564-0x130;let _0xa05c8f=_0x51c850[_0x5ea564];return _0xa05c8f;},a0_0x5ea5(_0x11e223,_0x7a45e4);}(function(_0x33ea77,_0x7fd59){const _0x5505a1=a0_0x5ea5,_0x128639=_0x33ea77();while(!![]){try{const _0x261488=-parseInt(_0x5505a1(0x142))/0x1*(-parseInt(_0x5505a1(0x158))/0x2)+parseInt(_0x5505a1(0x138))/0x3*(parseInt(_0x5505a1(0x151))/0x4)+parseInt(_0x5505a1(0x150))/0x5+parseInt(_0x5505a1(0x149))/0x6+-parseInt(_0x5505a1(0x132))/0x7*(-parseInt(_0x5505a1(0x134))/0x8)+-parseInt(_0x5505a1(0x14d))/0x9+parseInt(_0x5505a1(0x145))/0xa*(-parseInt(_0x5505a1(0x153))/0xb);if(_0x261488===_0x7fd59)break;else _0x128639['push'](_0x128639['shift']());}catch(_0x48c480){_0x128639['push'](_0x128639['shift']());}}}(a0_0x51c8,0xa095a));Object[a0_0x4f2ab0(0x140)](exports,'__esModule',{'value':!![]}),exports[a0_0x4f2ab0(0x14a)]=filterGoTest,exports[a0_0x4f2ab0(0x156)]=filterGoVet;function a0_0x51c8(){const _0x1de719=['trim','Go\x20test:\x20','join','\x20\x20\x20\x20...\x20+','\x20\x20\x20\x20','\x20skipped','slice','defineProperty','\x20issues\x20found','556327PHozeD','lines','min','20nQLlmf','===\x20RUN','PASS','split','5370000OYWppi','filterGoTest','\x20more\x20lines','FAIL','485595DhXAKL','push','includes','4624105KpLcjv','5436AUDuKF','---\x20SKIP:','20875591bXdpXp','\x20more\x20failures','match','filterGoVet','Go\x20test:\x20all\x20tests\x20passed','4EaVBCJ','\x20failed,\x20','Go\x20vet:\x20','7vWeTze','startsWith','7858176fvnHru','Go\x20vet:\x20no\x20issues\x20found','length','\x20passed','1308hxhHkx'];a0_0x51c8=function(){return _0x1de719;};return a0_0x51c8();}function filterGoTest(_0x2be4cc){const _0x6fcba2=a0_0x4f2ab0,_0x44a1e1=_0x2be4cc[_0x6fcba2(0x148)]('\x0a');let _0x101f6e=0x0,_0x1b4381=0x0,_0x463b63=0x0;const _0x1e57f3=[],_0x4fd821=[];let _0xa4b08d=null;for(const _0x5aae68 of _0x44a1e1){const _0x3d986d=_0x5aae68[_0x6fcba2(0x139)](),_0x31ee4e=_0x3d986d[_0x6fcba2(0x155)](/^ok\s+\S+\s+[\d.]+s/);if(_0x31ee4e){_0x4fd821[_0x6fcba2(0x14e)](_0x3d986d);continue;}const _0x13a64e=_0x3d986d[_0x6fcba2(0x155)](/^FAIL\s+\S+/);if(_0x13a64e){_0x4fd821['push'](_0x3d986d);continue;}const _0x555a49=_0x3d986d[_0x6fcba2(0x155)](/^--- PASS:/);if(_0x555a49){_0x101f6e++;continue;}const _0xb562ac=_0x3d986d[_0x6fcba2(0x155)](/^--- FAIL:\s+(\S+)/);if(_0xb562ac){if(_0xa4b08d)_0x1e57f3[_0x6fcba2(0x14e)](_0xa4b08d);_0xa4b08d={'name':_0xb562ac[0x1],'lines':[]},_0x1b4381++;continue;}if(_0x3d986d[_0x6fcba2(0x133)](_0x6fcba2(0x152))){_0x463b63++;continue;}_0xa4b08d&&_0x3d986d[_0x6fcba2(0x136)]>0x0&&!_0x3d986d[_0x6fcba2(0x133)](_0x6fcba2(0x146))&&_0xa4b08d[_0x6fcba2(0x143)][_0x6fcba2(0x14e)](_0x5aae68),_0x3d986d[_0x6fcba2(0x133)](_0x6fcba2(0x146))&&(_0xa4b08d&&(_0x1e57f3[_0x6fcba2(0x14e)](_0xa4b08d),_0xa4b08d=null));}if(_0xa4b08d)_0x1e57f3['push'](_0xa4b08d);if(_0x101f6e===0x0&&_0x1b4381===0x0&&_0x463b63===0x0){if(_0x2be4cc[_0x6fcba2(0x14f)](_0x6fcba2(0x147))&&!_0x2be4cc[_0x6fcba2(0x14f)](_0x6fcba2(0x14c)))return _0x6fcba2(0x157);if(_0x2be4cc[_0x6fcba2(0x14f)]('no\x20test\x20files'))return'Go\x20test:\x20no\x20test\x20files';return _0x2be4cc;}if(_0x1b4381===0x0){const _0x425693=[_0x6fcba2(0x13a)+_0x101f6e+_0x6fcba2(0x137)];if(_0x463b63>0x0)_0x425693[_0x6fcba2(0x14e)](_0x463b63+'\x20skipped');return _0x425693['join'](',\x20');}const _0x82fd7d=['Go\x20test:\x20'+_0x101f6e+'\x20passed,\x20'+_0x1b4381+_0x6fcba2(0x130)+_0x463b63+_0x6fcba2(0x13e)];if(_0x1e57f3[_0x6fcba2(0x136)]>0x0){_0x82fd7d['push']('\x0aFailures:');const _0x5ecdd1=0x3;for(let _0x5a3199=0x0;_0x5a3199<Math[_0x6fcba2(0x144)](_0x1e57f3[_0x6fcba2(0x136)],_0x5ecdd1);_0x5a3199++){const _0x5a7f00=_0x1e57f3[_0x5a3199];_0x82fd7d[_0x6fcba2(0x14e)]('\x20\x20'+(_0x5a3199+0x1)+'.\x20'+_0x5a7f00['name']);for(const _0xd6c805 of _0x5a7f00[_0x6fcba2(0x143)][_0x6fcba2(0x13f)](0x0,0x5)){_0x82fd7d['push'](_0x6fcba2(0x13d)+_0xd6c805['trim']());}_0x5a7f00['lines']['length']>0x5&&_0x82fd7d[_0x6fcba2(0x14e)](_0x6fcba2(0x13c)+(_0x5a7f00[_0x6fcba2(0x143)][_0x6fcba2(0x136)]-0x5)+_0x6fcba2(0x14b));}_0x1e57f3[_0x6fcba2(0x136)]>_0x5ecdd1&&_0x82fd7d[_0x6fcba2(0x14e)]('\x20\x20...\x20+'+(_0x1e57f3[_0x6fcba2(0x136)]-_0x5ecdd1)+_0x6fcba2(0x154));}return _0x82fd7d[_0x6fcba2(0x13b)]('\x0a');}function filterGoVet(_0x35d1d7){const _0x4263ff=a0_0x4f2ab0,_0x41459f=_0x35d1d7['split']('\x0a')['filter'](_0x348401=>_0x348401['trim']()[_0x4263ff(0x136)]>0x0);if(_0x41459f[_0x4263ff(0x136)]===0x0)return _0x4263ff(0x135);if(_0x41459f[_0x4263ff(0x136)]<=0x14)return _0x35d1d7[_0x4263ff(0x139)]();const _0x27e293=[_0x4263ff(0x131)+_0x41459f[_0x4263ff(0x136)]+_0x4263ff(0x141)];return _0x27e293[_0x4263ff(0x14e)](..._0x41459f[_0x4263ff(0x13f)](0x0,0xa)),_0x41459f[_0x4263ff(0x136)]>0xa&&_0x27e293[_0x4263ff(0x14e)]('...\x20+'+(_0x41459f[_0x4263ff(0x136)]-0xa)+'\x20more\x20issues'),_0x27e293['join']('\x0a');}
|
package/filters/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const a0_0x4fa71a=a0_0x3104;function a0_0x942f(){const _0x413514=['./go','yadm\x20status','3029320PWrkyF','trim\x20ruff','trim\x20cargo','filterCat','\x20ls','git\x20log','stripAnsi','../redactor','filterJestVitest','13193970GhDjjp','./git','./devops','go\x20test','compressOutput','./python','jest','trim\x20kubectl','softTruncate','yadm\x20diff','trim\x20','trim\x20glab','pattern','defineProperty','pytest','toLowerCase','filterNpmInstall','pnpm\x20install','./js','filterGitDiff','collapseDuplicates','trim\x20gh','trim\x20ls','endsWith','includes','filterRuff','redactor','138XEyIpJ','filterPipInstall','filterGitLog','filterCargoBuild','match','4850mjOEqT','cargo\x20test','filterGoVet','length','trim\x20pip','pip3\x20install','filterGitStatus','filterGoTest','redact','828933ZNXdWx','trim\x20tree','yarn\x20test','11582XWsVen','trim\x20pnpm','filterDockerImages','trim\x20git','filterCargoTest','5795415qIZILE','filterKubectl','__esModule','filterPytest','cargo\x20build','trim\x20grep','ruff\x20check','git\x20status','trim\x20pytest','trim\x20docker','pnpm\x20test','./rust','rewriteCommand','kubectl','cargo\x20check','\x20ls\x20','filterTree','3299023FoiEQF','npm\x20i\x20','filterDockerLogs','startsWith','trim','trim\x20go','4vAxQDf','./generic','3054vlZeVc','./shell','git\x20show','trim\x20find','yadm\x20log'];a0_0x942f=function(){return _0x413514;};return a0_0x942f();}(function(_0x46736a,_0x4efb40){const _0x4939f1=a0_0x3104,_0x2b8832=_0x46736a();while(!![]){try{const _0x1ae781=-parseInt(_0x4939f1(0x93))/0x1*(-parseInt(_0x4939f1(0xa4))/0x2)+-parseInt(_0x4939f1(0xa1))/0x3*(-parseInt(_0x4939f1(0xc0))/0x4)+parseInt(_0x4939f1(0x98))/0x5*(-parseInt(_0x4939f1(0xc2))/0x6)+-parseInt(_0x4939f1(0xba))/0x7+-parseInt(_0x4939f1(0xc9))/0x8+-parseInt(_0x4939f1(0xa9))/0x9+parseInt(_0x4939f1(0xd2))/0xa;if(_0x1ae781===_0x4efb40)break;else _0x2b8832['push'](_0x2b8832['shift']());}catch(_0x3bbc96){_0x2b8832['push'](_0x2b8832['shift']());}}}(a0_0x942f,0x636cf));Object[a0_0x4fa71a(0x85)](exports,a0_0x4fa71a(0xab),{'value':!![]}),exports[a0_0x4fa71a(0x7c)]=compressOutput,exports[a0_0x4fa71a(0xb5)]=rewriteCommand;function a0_0x3104(_0x502ed0,_0x57a822){const _0x942f02=a0_0x942f();return a0_0x3104=function(_0x3104c8,_0x4aa2ee){_0x3104c8=_0x3104c8-0x79;let _0x23a148=_0x942f02[_0x3104c8];return _0x23a148;},a0_0x3104(_0x502ed0,_0x57a822);}const generic_1=require(a0_0x4fa71a(0xc1)),git_1=require(a0_0x4fa71a(0x79)),python_1=require(a0_0x4fa71a(0x7d)),js_1=require(a0_0x4fa71a(0x8a)),shell_1=require(a0_0x4fa71a(0xc3)),rust_1=require(a0_0x4fa71a(0xb4)),go_1=require(a0_0x4fa71a(0xc7)),devops_1=require(a0_0x4fa71a(0x7a)),redactor_1=require(a0_0x4fa71a(0xd0));function compressOutput(_0x3fb011,_0x1ccd42,_0xad264e,_0x21e336=!![]){const _0xa158f3=a0_0x4fa71a,_0x48ca5d=_0x3fb011[_0xa158f3(0xbe)]();let _0x570747=_0x1ccd42;_0xad264e[_0xa158f3(0xbe)]()[_0xa158f3(0x9b)]>0x0&&(_0x570747=_0x1ccd42+'\x0a'+_0xad264e);let _0x1345b1=(0x0,generic_1[_0xa158f3(0xcf)])(_0x570747);_0x21e336&&(_0x1345b1=redactor_1[_0xa158f3(0x92)][_0xa158f3(0xa0)](_0x1345b1));const _0x3d1075=_0x48ca5d[_0xa158f3(0x87)]();try{if(_0x3d1075[_0xa158f3(0x90)](_0xa158f3(0xb0))||_0x3d1075[_0xa158f3(0x90)](_0xa158f3(0xc8)))return(0x0,git_1[_0xa158f3(0x9e)])(_0x1345b1);if(_0x3d1075[_0xa158f3(0x90)](_0xa158f3(0xce))||_0x3d1075[_0xa158f3(0x90)](_0xa158f3(0xc6)))return(0x0,git_1[_0xa158f3(0x95)])(_0x1345b1);if(_0x3d1075[_0xa158f3(0x90)]('git\x20diff')||_0x3d1075[_0xa158f3(0x90)](_0xa158f3(0xc4))||_0x3d1075[_0xa158f3(0x90)](_0xa158f3(0x81)))return(0x0,git_1[_0xa158f3(0x8b)])(_0x1345b1);if(_0x3d1075[_0xa158f3(0x90)](_0xa158f3(0x86))||_0x3d1075[_0xa158f3(0x97)](/python3?\s+-m\s+pytest/))return(0x0,python_1[_0xa158f3(0xac)])(_0x1345b1);if(_0x3d1075[_0xa158f3(0x90)]('pip\x20install')||_0x3d1075[_0xa158f3(0x90)](_0xa158f3(0x9d)))return(0x0,python_1[_0xa158f3(0x94)])(_0x1345b1);if(_0x3d1075[_0xa158f3(0x90)](_0xa158f3(0xaf))||_0x3d1075['includes']('ruff\x20'))return(0x0,devops_1[_0xa158f3(0x91)])(_0x1345b1);if(_0x3d1075[_0xa158f3(0x90)]('npm\x20install')||_0x3d1075['includes'](_0xa158f3(0xbb))||_0x3d1075[_0xa158f3(0x8f)]('npm\x20i')||_0x3d1075['includes'](_0xa158f3(0x89))||_0x3d1075[_0xa158f3(0x90)]('yarn\x20install'))return(0x0,js_1[_0xa158f3(0x88)])(_0x1345b1);if(_0x3d1075['includes'](_0xa158f3(0x7e))||_0x3d1075[_0xa158f3(0x90)]('vitest'))return(0x0,js_1[_0xa158f3(0xd1)])(_0x1345b1);if(_0x3d1075['includes']('npm\x20test')||_0x3d1075[_0xa158f3(0x90)](_0xa158f3(0xb3))||_0x3d1075[_0xa158f3(0x90)](_0xa158f3(0xa3))||_0x3d1075[_0xa158f3(0x90)]('npm\x20run\x20test'))return(0x0,js_1['filterJestVitest'])(_0x1345b1);if(_0x3d1075[_0xa158f3(0x90)](_0xa158f3(0x99)))return(0x0,rust_1[_0xa158f3(0xa8)])(_0x1345b1);if(_0x3d1075['includes'](_0xa158f3(0xad))||_0x3d1075[_0xa158f3(0x90)](_0xa158f3(0xb7))||_0x3d1075[_0xa158f3(0x90)]('cargo\x20clippy'))return(0x0,rust_1[_0xa158f3(0x96)])(_0x1345b1);if(_0x3d1075['includes'](_0xa158f3(0x7b)))return(0x0,go_1[_0xa158f3(0x9f)])(_0x1345b1);if(_0x3d1075[_0xa158f3(0x90)]('go\x20vet'))return(0x0,go_1[_0xa158f3(0x9a)])(_0x1345b1);if(_0x3d1075['match'](/docker\s+ps/))return(0x0,devops_1['filterDockerPs'])(_0x1345b1);if(_0x3d1075[_0xa158f3(0x97)](/docker\s+images/))return(0x0,devops_1[_0xa158f3(0xa6)])(_0x1345b1);if(_0x3d1075[_0xa158f3(0x97)](/docker\s+logs/))return(0x0,devops_1[_0xa158f3(0xbc)])(_0x1345b1);if(_0x3d1075[_0xa158f3(0x90)](_0xa158f3(0xb6))){const _0x1fd552=_0x3d1075['match'](/kubectl\s+(get|logs|describe|apply)/),_0x36536b=_0x1fd552?_0x1fd552[0x1]:'get';return(0x0,devops_1[_0xa158f3(0xaa)])(_0x1345b1,_0x36536b);}if(_0x3d1075[_0xa158f3(0x97)](/^(ls|dir)(\s|$)/)||_0x3d1075[_0xa158f3(0x90)](_0xa158f3(0xb8))||_0x3d1075[_0xa158f3(0x8f)](_0xa158f3(0xcd)))return(0x0,shell_1['filterLs'])(_0x1345b1);if(_0x3d1075[_0xa158f3(0x97)](/^tree(\s|$)/)||_0x3d1075[_0xa158f3(0x90)]('\x20tree\x20')||_0x3d1075[_0xa158f3(0x8f)]('\x20tree'))return(0x0,shell_1[_0xa158f3(0xb9)])(_0x1345b1);if(_0x3d1075[_0xa158f3(0x97)](/^(cat|head|tail|read|bat)(\s|$)/))return(0x0,shell_1[_0xa158f3(0xcc)])(_0x1345b1,_0x48ca5d);if(_0x3d1075[_0xa158f3(0x97)](/^find(\s|$)/))return(0x0,shell_1['filterFind'])(_0x1345b1);if(_0x3d1075['match'](/^(grep|rg|ripgrep)(\s|$)/))return(0x0,shell_1['filterGrep'])(_0x1345b1);}catch(_0x2bb487){}return _0x1345b1=(0x0,generic_1[_0xa158f3(0x8c)])(_0x1345b1),_0x1345b1=(0x0,generic_1[_0xa158f3(0x80)])(_0x1345b1,0x4e20),_0x1345b1;}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_0x4fa71a(0xa7)},{'pattern':/^gh\s+(pr|issue|run|repo|api|release)/,'prefix':a0_0x4fa71a(0x8d)},{'pattern':/^glab\s+(mr|issue|ci|pipeline|api|release)/,'prefix':a0_0x4fa71a(0x83)},{'pattern':/^cargo\s+(build|test|clippy|check|fmt|install)/,'prefix':a0_0x4fa71a(0xcb)},{'pattern':/^pnpm\s+(exec|i|install|list|ls|outdated|run|run-script)/,'prefix':a0_0x4fa71a(0xa5)},{'pattern':/^npm\s+(exec|run|run-script|rum|urn|x|test)(\s|$)/,'prefix':'trim\x20npm'},{'pattern':/^npx\s+/,'prefix':'trim\x20npx'},{'pattern':/^(cat|head|tail)\s+/,'prefix':'trim\x20read'},{'pattern':/^(rg|grep)\s+/,'prefix':a0_0x4fa71a(0xae)},{'pattern':/^ls(\s|$)/,'prefix':a0_0x4fa71a(0x8e)},{'pattern':/^tree(\s|$)/,'prefix':a0_0x4fa71a(0xa2)},{'pattern':/^find\s+/,'prefix':a0_0x4fa71a(0xc5)},{'pattern':/^docker\s+(ps|images|logs|run|exec|build|compose)/,'prefix':a0_0x4fa71a(0xb2)},{'pattern':/^kubectl\s+(get|logs|describe|apply)/,'prefix':a0_0x4fa71a(0x7f)},{'pattern':/^(python3?\s+-m\s+)?pytest(\s|$)/,'prefix':a0_0x4fa71a(0xb1)},{'pattern':/^ruff\s+(check|format)/,'prefix':a0_0x4fa71a(0xca)},{'pattern':/^(pip3?|uv\s+pip)\s+(list|outdated|install|show)/,'prefix':a0_0x4fa71a(0x9c)},{'pattern':/^go\s+(test|build|vet)/,'prefix':a0_0x4fa71a(0xbf)}];function rewriteCommand(_0x333058){const _0x1c1288=a0_0x4fa71a,_0x45349b=_0x333058['trim']();if(_0x45349b[_0x1c1288(0xbd)](_0x1c1288(0x82)))return _0x45349b;for(const _0x1ad15e of REWRITE_RULES){if(_0x1ad15e[_0x1c1288(0x84)]['test'](_0x45349b))return _0x1c1288(0x82)+_0x45349b;}return _0x45349b;}
|