trimprompt 1.0.15 → 1.0.16
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/favicon.png +0 -0
- 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 +1 -0
- package/mcp.js +1 -1
- package/package.json +2 -2
- 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_0x478251=a0_0x5ab4;(function(_0x252f45,_0x119adf){const _0x5c8a9d=a0_0x5ab4,_0x806e86=_0x252f45();while(!![]){try{const _0x515c34=-parseInt(_0x5c8a9d(0x1fe))/0x1+parseInt(_0x5c8a9d(0x203))/0x2*(parseInt(_0x5c8a9d(0x1f9))/0x3)+-parseInt(_0x5c8a9d(0x1f2))/0x4+-parseInt(_0x5c8a9d(0x227))/0x5*(-parseInt(_0x5c8a9d(0x21f))/0x6)+-parseInt(_0x5c8a9d(0x1e6))/0x7*(-parseInt(_0x5c8a9d(0x1f1))/0x8)+parseInt(_0x5c8a9d(0x1f8))/0x9*(-parseInt(_0x5c8a9d(0x21e))/0xa)+-parseInt(_0x5c8a9d(0x1f7))/0xb;if(_0x515c34===_0x119adf)break;else _0x806e86['push'](_0x806e86['shift']());}catch(_0x336d4d){_0x806e86['push'](_0x806e86['shift']());}}}(a0_0x5565,0x71e4b));var __createBinding=this&&this[a0_0x478251(0x1ee)]||(Object['create']?function(_0xb15d0,_0x384f92,_0x3cf875,_0x2173e1){const _0x1912ae=a0_0x478251;if(_0x2173e1===undefined)_0x2173e1=_0x3cf875;var _0x4f201c=Object[_0x1912ae(0x20e)](_0x384f92,_0x3cf875);(!_0x4f201c||(_0x1912ae(0x20d)in _0x4f201c?!_0x384f92[_0x1912ae(0x218)]:_0x4f201c[_0x1912ae(0x22a)]||_0x4f201c[_0x1912ae(0x1ec)]))&&(_0x4f201c={'enumerable':!![],'get':function(){return _0x384f92[_0x3cf875];}}),Object[_0x1912ae(0x21c)](_0xb15d0,_0x2173e1,_0x4f201c);}:function(_0x5ce86a,_0x56c533,_0x5a3451,_0x25d364){if(_0x25d364===undefined)_0x25d364=_0x5a3451;_0x5ce86a[_0x25d364]=_0x56c533[_0x5a3451];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a0_0x478251(0x211)]?function(_0x188ba9,_0x4b5cfe){const _0x5491f5=a0_0x478251;Object[_0x5491f5(0x21c)](_0x188ba9,_0x5491f5(0x1e5),{'enumerable':!![],'value':_0x4b5cfe});}:function(_0x4200ea,_0x8e77c3){const _0x10d8a1=a0_0x478251;_0x4200ea[_0x10d8a1(0x1e5)]=_0x8e77c3;}),__importStar=this&&this[a0_0x478251(0x229)]||(function(){var _0x493911=function(_0x11225b){const _0xf375b0=a0_0x5ab4;return _0x493911=Object[_0xf375b0(0x22c)]||function(_0x2f5a24){const _0xefedb2=_0xf375b0;var _0x37e214=[];for(var _0x436f7a in _0x2f5a24)if(Object[_0xefedb2(0x205)][_0xefedb2(0x1e8)][_0xefedb2(0x220)](_0x2f5a24,_0x436f7a))_0x37e214[_0x37e214[_0xefedb2(0x202)]]=_0x436f7a;return _0x37e214;},_0x493911(_0x11225b);};return function(_0x111e7c){const _0x3dccf9=a0_0x5ab4;if(_0x111e7c&&_0x111e7c[_0x3dccf9(0x218)])return _0x111e7c;var _0x22f7d4={};if(_0x111e7c!=null){for(var _0x3cbdb4=_0x493911(_0x111e7c),_0x1c80c4=0x0;_0x1c80c4<_0x3cbdb4['length'];_0x1c80c4++)if(_0x3cbdb4[_0x1c80c4]!==_0x3dccf9(0x1e5))__createBinding(_0x22f7d4,_0x111e7c,_0x3cbdb4[_0x1c80c4]);}return __setModuleDefault(_0x22f7d4,_0x111e7c),_0x22f7d4;};}());Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a0_0x478251(0x224)]=dedup;function a0_0x5565(){const _0x507504=['docker-ps','ruff\x20check','94083MCLLpV','27RlxHEP','3RMlAvK','startsWith','kubectl\x20get','\x20tree','ruff\x20','570914xSoQqo','utf8','\x20entries','kubectl\x20describe','length','1665458RNySgC','git\x20log','prototype','hex','tree','slice','\x20tree\x20','trim','yadm\x20log','git-show','get','getOwnPropertyDescriptor','keys','sort','create','endsWith','go-vet','timestamp','writeFileSync','createHash','file','__esModule','join','\x20lines','md5','defineProperty','existsSync','1127980uYcSiP','9012PGWPDP','call','ruff','git-status','includes','dedup','path','round','2935NbOUuh','stringify','__importStar','writable','readFileSync','getOwnPropertyNames','s\x20ago,\x20','yadm\x20status','kubectl','default','7lWkJtw','\x20lines,\x20','hasOwnProperty','[cached\x20—\x20unchanged\x20since\x20','match','split','configurable','hash','__createBinding','.trimprompt','homedir','3700976wPUavk','3170628cPGijF','docker-images','parse'];a0_0x5565=function(){return _0x507504;};return a0_0x5565();}const fs=__importStar(require('fs')),path=__importStar(require(a0_0x478251(0x225))),os=__importStar(require('os')),crypto=__importStar(require('crypto')),CACHE_DIR=path['join'](os[a0_0x478251(0x1f0)](),a0_0x478251(0x1ef)),CACHE_FILE=path[a0_0x478251(0x219)](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(_0x540498){const _0x3d2b65=a0_0x478251,_0x4bfb45=_0x540498['trim']()['toLowerCase']();if(_0x4bfb45['match'](/^(cat|head|tail|read|bat)\s/))return _0x3d2b65(0x217);if(_0x4bfb45['includes']('git\x20status')||_0x4bfb45[_0x3d2b65(0x223)](_0x3d2b65(0x22e)))return _0x3d2b65(0x222);if(_0x4bfb45[_0x3d2b65(0x223)](_0x3d2b65(0x204))||_0x4bfb45[_0x3d2b65(0x223)](_0x3d2b65(0x20b)))return'git-log';if(_0x4bfb45[_0x3d2b65(0x223)]('git\x20show')||_0x4bfb45[_0x3d2b65(0x223)]('yadm\x20show'))return _0x3d2b65(0x20c);if(_0x4bfb45[_0x3d2b65(0x1ea)](/^(ls|dir)(\s|$)/)||_0x4bfb45[_0x3d2b65(0x223)]('\x20ls\x20')||_0x4bfb45[_0x3d2b65(0x212)]('\x20ls'))return'ls';if(_0x4bfb45[_0x3d2b65(0x1ea)](/^tree(\s|$)/)||_0x4bfb45['includes'](_0x3d2b65(0x209))||_0x4bfb45['endsWith'](_0x3d2b65(0x1fc)))return _0x3d2b65(0x207);if(_0x4bfb45['match'](/docker\s+ps/))return _0x3d2b65(0x1f5);if(_0x4bfb45[_0x3d2b65(0x1ea)](/docker\s+images/))return _0x3d2b65(0x1f3);if(_0x4bfb45[_0x3d2b65(0x223)](_0x3d2b65(0x1fb))||_0x4bfb45[_0x3d2b65(0x223)](_0x3d2b65(0x201)))return _0x3d2b65(0x1e4);if(_0x4bfb45['includes'](_0x3d2b65(0x1f6))||_0x4bfb45['includes'](_0x3d2b65(0x1fd)))return _0x3d2b65(0x221);if(_0x4bfb45[_0x3d2b65(0x223)]('go\x20vet'))return _0x3d2b65(0x213);return'';}function md5(_0x313e9a){const _0x223c50=a0_0x478251;return crypto[_0x223c50(0x216)](_0x223c50(0x21b))['update'](_0x313e9a)['digest'](_0x223c50(0x206));}function loadStore(){const _0x14e452=a0_0x478251;try{if(fs[_0x14e452(0x21d)](CACHE_FILE))return JSON[_0x14e452(0x1f4)](fs[_0x14e452(0x22b)](CACHE_FILE,_0x14e452(0x1ff)));}catch{}return{};}function saveStore(_0x4677df){const _0x418a99=a0_0x478251;try{if(!fs[_0x418a99(0x21d)](CACHE_DIR))fs['mkdirSync'](CACHE_DIR,{'recursive':!![]});const _0x16acf3=Object[_0x418a99(0x20f)](_0x4677df);if(_0x16acf3[_0x418a99(0x202)]>MAX_ENTRIES){const _0x1dcb24=_0x16acf3[_0x418a99(0x210)]((_0x478d4e,_0x5e45fe)=>_0x4677df[_0x478d4e][_0x418a99(0x214)]-_0x4677df[_0x5e45fe][_0x418a99(0x214)]);for(const _0x5ab26e of _0x1dcb24[_0x418a99(0x208)](0x0,_0x16acf3[_0x418a99(0x202)]-MAX_ENTRIES)){delete _0x4677df[_0x5ab26e];}}fs[_0x418a99(0x215)](CACHE_FILE,JSON[_0x418a99(0x228)](_0x4677df),_0x418a99(0x1ff));}catch{}}function a0_0x5ab4(_0x5f32ab,_0x1468db){const _0x5565e3=a0_0x5565();return a0_0x5ab4=function(_0x5ab4b8,_0x213840){_0x5ab4b8=_0x5ab4b8-0x1e4;let _0x20af18=_0x5565e3[_0x5ab4b8];return _0x20af18;},a0_0x5ab4(_0x5f32ab,_0x1468db);}function buildSummary(_0x4aadb7,_0x261c53){const _0x13e6a1=a0_0x478251,_0x3472f3=_0x4aadb7[_0x13e6a1(0x1eb)]('\x0a')[_0x13e6a1(0x202)],_0x2ebb4c=_0x4aadb7[_0x13e6a1(0x202)];if(_0x261c53==='file')return _0x3472f3+'\x20lines,\x20'+_0x2ebb4c+'\x20chars';if(_0x261c53===_0x13e6a1(0x222))return _0x3472f3+'\x20lines';if(_0x261c53==='git-log')return _0x3472f3+_0x13e6a1(0x200);if(_0x261c53[_0x13e6a1(0x1fa)]('docker'))return _0x3472f3+_0x13e6a1(0x21a);return _0x3472f3+_0x13e6a1(0x1e7)+_0x2ebb4c+'\x20chars';}function dedup(_0x48d469,_0x277ecc){const _0x3284bc=a0_0x478251;try{const _0x6d5779=classifyCommand(_0x48d469);if(!_0x6d5779)return null;const _0x224225=TTL_SECONDS[_0x6d5779];if(!_0x224225)return null;const _0x141f46=process['cwd'](),_0x42d65d=md5(_0x141f46+'::'+_0x48d469[_0x3284bc(0x20a)]()),_0x181362=md5(_0x277ecc),_0x5421e7=Date['now'](),_0xfe19be=loadStore(),_0x2278fe=_0xfe19be[_0x42d65d];if(_0x2278fe&&_0x2278fe[_0x3284bc(0x1ed)]===_0x181362&&_0x5421e7-_0x2278fe[_0x3284bc(0x214)]<_0x224225*0x3e8){const _0x3700c2=Math[_0x3284bc(0x226)]((_0x5421e7-_0x2278fe['timestamp'])/0x3e8);return _0x3284bc(0x1e9)+_0x3700c2+_0x3284bc(0x22d)+_0x2278fe['summary']+']';}_0xfe19be[_0x42d65d]={'hash':_0x181362,'summary':buildSummary(_0x277ecc,_0x6d5779),'timestamp':_0x5421e7,'chars':_0x277ecc[_0x3284bc(0x202)]},saveStore(_0xfe19be);}catch{}return null;}
|
package/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
'use strict';const a0_0x37f631=a0_0x422a;(function(_0x4e23d1,_0x16d346){const _0x14c82b=a0_0x422a,_0x3814a4=_0x4e23d1();while(!![]){try{const _0x2a65e7=parseInt(_0x14c82b(0x249))/0x1*(parseInt(_0x14c82b(0x1f5))/0x2)+-parseInt(_0x14c82b(0x1f1))/0x3*(parseInt(_0x14c82b(0x1ef))/0x4)+parseInt(_0x14c82b(0x1da))/0x5+-parseInt(_0x14c82b(0x1eb))/0x6+parseInt(_0x14c82b(0x263))/0x7+-parseInt(_0x14c82b(0x22c))/0x8+parseInt(_0x14c82b(0x200))/0x9;if(_0x2a65e7===_0x16d346)break;else _0x3814a4['push'](_0x3814a4['shift']());}catch(_0x59cc43){_0x3814a4['push'](_0x3814a4['shift']());}}}(a0_0x5b9a,0xc76cd));function a0_0x5b9a(){const _0x1cf3f4=['name','option','npm','Arguments\x20for\x20the\x20target\x20MCP\x20server','every','set','-10','1WiVkig','redaction_enabled','get','Model\x20Context:\x20\x20\x20\x20\x20','dashboard','yarn','<server-command>','command','claude-3-5-sonnet','getOwnPropertyNames','tracker','[server-args...]','getOwnPropertyDescriptor','slice','server','argument','mcp-server','config\x20parameter\x20name','TrimPrompt.ai\x20-\x20Reduce\x20LLM\x20token\x20consumption\x20by\x2060-90%','=============================================\x0a','--format','commander','rewriteCommand','cmd','-bs','raw_cost_usd','6737780xxzwJy','-50','modelcontextprotocol','./tracker','Command\x20line\x20to\x20evaluate','version','compressed_cost_usd','--oneline','test','description','server-mcp','Port\x20to\x20run\x20the\x20dashboard\x20on','./mcp','[TrimPrompt]\x20Autodetected\x20MCP\x20server\x20execution.\x20Activating\x20real-time\x20JSON-RPC\x20proxy...','4566070wqZQQw','model_name','executeCommand','exitCode','total_raw_tokens','value\x20to\x20set','--pretty','message','--max-count','uninstallShims','stats','Start\x20the\x20local\x20developer\x20dashboard','mcp','toLocaleString','Error:\x20Value\x20required\x20for\x20set\x20action','setConfig','./executor','9506046lCyFBy','<action>','trim','call','801432ZciTPT','--min-parents','9QrztBQ','--porcelain','Config\x20set\x20','-m,\x20--model\x20<string>','1768558SjqnFP','Reduction\x20Rate:\x20\x20\x20\x20','toLowerCase','alias','Actual\x20Cost:\x20\x20\x20\x20\x20\x20\x20$','config','uninstall','model','Install\x20or\x20uninstall\x20system\x20command\x20shims','help','some','10863531SciHCH','getStatsSummary','proxy','<key>','@modelcontextprotocol/','Select\x20pricing\x20model\x20(e.g.\x20claude-3-5-sonnet,\x20gpt-4o)','length','getConfig','Command','log','\x20(after\x20Trim)','status','shims','npx','Check\x20a\x20command\x20line\x20and\x20return\x20the\x20optimized\x20command\x20line','total_compressed_tokens','action','4000','configurable','Estimated\x20Cost:\x20\x20\x20\x20$','exit','__importStar','mcp-proxy','stderr','write','\x20\x20\x20\x20\x20\x20\x20TRIMPROMPT.AI\x20SAVINGS\x20SUMMARY\x20\x20\x20\x20\x20\x20\x20\x20','join','__createBinding','./filters','rewrite','Error:\x20Action\x20must\x20be\x20install\x20or\x20uninstall','\x20USD','[TrimPrompt]\x20Fatal\x20Proxy\x20Error:\x20','money_saved_usd','win32','bun','\x20(before\x20Trim)','get\x20or\x20set','platform','then','<commandLine>','Command\x20to\x20launch\x20the\x20target\x20MCP\x20server','__esModule','push','7718656BShwlq','prototype','--pretty=format:%h\x20%s\x20(%ar)\x20(%an)%n%b%n---END---','---------------------------------------------','error','parse','Compressed:\x20\x20\x20\x20\x20\x20\x20\x20','defineProperty','toFixed','Raw\x20Tokens:\x20\x20\x20\x20\x20\x20\x20\x20','Error:\x20Action\x20must\x20be\x20get\x20or\x20set','Manage\x20local\x20configuration\x20parameters','\x0a=============================================','stdout','--short','includes','create','logExecution','default','startsWith','resolve','true'];a0_0x5b9a=function(){return _0x1cf3f4;};return a0_0x5b9a();}var __createBinding=this&&this[a0_0x37f631(0x21b)]||(Object['create']?function(_0x3cdef4,_0x5bb7f0,_0x4cb05b,_0x1bafb3){const _0x402f8c=a0_0x37f631;if(_0x1bafb3===undefined)_0x1bafb3=_0x4cb05b;var _0x23be54=Object[_0x402f8c(0x255)](_0x5bb7f0,_0x4cb05b);(!_0x23be54||(_0x402f8c(0x24b)in _0x23be54?!_0x5bb7f0[_0x402f8c(0x22a)]:_0x23be54['writable']||_0x23be54[_0x402f8c(0x212)]))&&(_0x23be54={'enumerable':!![],'get':function(){return _0x5bb7f0[_0x4cb05b];}}),Object[_0x402f8c(0x233)](_0x3cdef4,_0x1bafb3,_0x23be54);}:function(_0x2f8a38,_0x1468a7,_0x326903,_0x234b3d){if(_0x234b3d===undefined)_0x234b3d=_0x326903;_0x2f8a38[_0x234b3d]=_0x1468a7[_0x326903];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a0_0x37f631(0x23c)]?function(_0x102651,_0x22eb02){const _0x497338=a0_0x37f631;Object[_0x497338(0x233)](_0x102651,_0x497338(0x23e),{'enumerable':!![],'value':_0x22eb02});}:function(_0x6f84fd,_0x3e4858){_0x6f84fd['default']=_0x3e4858;}),__importStar=this&&this[a0_0x37f631(0x215)]||(function(){var _0x46c5c6=function(_0x272930){const _0x27e4fd=a0_0x422a;return _0x46c5c6=Object[_0x27e4fd(0x252)]||function(_0x46be58){const _0x576a03=_0x27e4fd;var _0x3013a3=[];for(var _0x3e4019 in _0x46be58)if(Object[_0x576a03(0x22d)]['hasOwnProperty'][_0x576a03(0x1ee)](_0x46be58,_0x3e4019))_0x3013a3[_0x3013a3[_0x576a03(0x206)]]=_0x3e4019;return _0x3013a3;},_0x46c5c6(_0x272930);};return function(_0x1b719c){const _0x3b4cfd=a0_0x422a;if(_0x1b719c&&_0x1b719c['__esModule'])return _0x1b719c;var _0x3215b2={};if(_0x1b719c!=null){for(var _0x15095a=_0x46c5c6(_0x1b719c),_0x5683d0=0x0;_0x5683d0<_0x15095a[_0x3b4cfd(0x206)];_0x5683d0++)if(_0x15095a[_0x5683d0]!=='default')__createBinding(_0x3215b2,_0x1b719c,_0x15095a[_0x5683d0]);}return __setModuleDefault(_0x3215b2,_0x1b719c),_0x3215b2;};}());Object['defineProperty'](exports,a0_0x37f631(0x22a),{'value':!![]});const commander_1=require(a0_0x37f631(0x25e)),executor_1=require(a0_0x37f631(0x1ea)),filters_1=require(a0_0x37f631(0x21c)),tracker_1=require(a0_0x37f631(0x266)),cache_1=require('./cache'),shims_1=require('./shims'),dashboard_1=require('./dashboard'),program=new commander_1[(a0_0x37f631(0x208))]();function isDisabled(){return process.env.TRIMPROMPT_DISABLED==='1';}function a0_0x422a(_0x58dbdd,_0x231638){_0x58dbdd=_0x58dbdd-0x1d3;const _0x5b9ab2=a0_0x5b9a();let _0x422ad9=_0x5b9ab2[_0x58dbdd];return _0x422ad9;}function adjustCommandArgs(_0x51190d,_0x379cfd){const _0xc2080d=a0_0x37f631,_0x102cfc=_0x51190d[_0xc2080d(0x1f7)]();if(_0x102cfc==='git'||_0x102cfc==='yadm'){const _0x4fd55f=_0x379cfd[0x0];if(_0x4fd55f==='status'){const _0x496d81=_0x379cfd[_0xc2080d(0x256)](0x1),_0x232e55=_0x496d81['length']===0x0||_0x496d81[_0xc2080d(0x246)](_0x3e15aa=>{const _0x257c99=_0xc2080d;return _0x3e15aa==='-b'||_0x3e15aa==='--branch'||_0x3e15aa==='-sb'||_0x3e15aa===_0x257c99(0x261)||_0x3e15aa==='-s'||_0x3e15aa===_0x257c99(0x23a);});if(_0x232e55)return{'cmd':_0x51190d,'args':[_0xc2080d(0x20b),_0xc2080d(0x1f2),'-b']};}else{if(_0x4fd55f===_0xc2080d(0x209)){const _0x549eeb=_0x379cfd[_0xc2080d(0x256)](0x1),_0x52009e=_0x549eeb['some'](_0x320bd4=>_0x320bd4[_0xc2080d(0x23f)](_0xc2080d(0x1d3))||_0x320bd4[_0xc2080d(0x23f)](_0xc2080d(0x1e0))||_0x320bd4[_0xc2080d(0x23f)](_0xc2080d(0x25d))),_0x2d9737=_0x549eeb[_0xc2080d(0x1ff)](_0x481297=>_0x481297[_0xc2080d(0x23f)]('-')&&/^\d+$/['test'](_0x481297['slice'](0x1))||_0x481297==='-n'||_0x481297[_0xc2080d(0x23f)](_0xc2080d(0x1e2))),_0x27602c=[..._0x379cfd];if(!_0x52009e){const _0x1aee1a=_0xc2080d(0x22e);_0x27602c['push'](process[_0xc2080d(0x226)]===_0xc2080d(0x222)?'\x22'+_0x1aee1a+'\x22':_0x1aee1a);}!_0x2d9737&&(_0x52009e?_0x27602c[_0xc2080d(0x22b)](_0xc2080d(0x264)):_0x27602c[_0xc2080d(0x22b)](_0xc2080d(0x248)));const _0x4fda06=_0x549eeb[_0xc2080d(0x1ff)](_0x3479ba=>_0x3479ba==='--merges'||_0x3479ba==='--no-merges'||_0x3479ba['startsWith'](_0xc2080d(0x1f0)));return!_0x4fda06&&!_0x2d9737&&_0x27602c[_0xc2080d(0x22b)]('--no-merges'),{'cmd':_0x51190d,'args':_0x27602c};}}}return{'cmd':_0x51190d,'args':_0x379cfd};}function isMcpServerExecution(_0x3f411f,_0x41e458){const _0x26ca26=a0_0x37f631,_0x45b05f=_0x3f411f[_0x26ca26(0x1f7)](),_0x1b444f=_0x41e458[_0x26ca26(0x21a)]('\x20')['toLowerCase']();if(_0x45b05f['includes'](_0x26ca26(0x1e6))&&(_0x45b05f[_0x26ca26(0x23b)](_0x26ca26(0x257))||_0x45b05f[_0x26ca26(0x23b)](_0x26ca26(0x202))))return!![];if(_0x45b05f===_0x26ca26(0x20d)||_0x45b05f==='node'||_0x45b05f===_0x26ca26(0x223)||_0x45b05f===_0x26ca26(0x244)||_0x45b05f==='pnpm'||_0x45b05f===_0x26ca26(0x24e)){if(_0x1b444f[_0x26ca26(0x23b)](_0x26ca26(0x204))||_0x1b444f[_0x26ca26(0x23b)](_0x26ca26(0x265))||_0x1b444f[_0x26ca26(0x23b)](_0x26ca26(0x259))||_0x1b444f['includes']('server-mcp'))return!![];}if(_0x41e458[_0x26ca26(0x1ff)](_0x547048=>{const _0x185a81=_0x26ca26,_0x11ab6e=_0x547048[_0x185a81(0x1f7)]();return _0x11ab6e[_0x185a81(0x23b)](_0x185a81(0x259))||_0x11ab6e['includes'](_0x185a81(0x1d6))||_0x11ab6e['includes'](_0x185a81(0x204))||_0x11ab6e===_0x185a81(0x216)||_0x11ab6e==='mcp';}))return!![];return![];}async function runProxy(_0x9d7b92){const _0x1513f7=a0_0x37f631;if(_0x9d7b92[_0x1513f7(0x206)]===0x0){program[_0x1513f7(0x1fe)]();return;}const _0x4c5927=_0x9d7b92[0x0],_0x354514=_0x9d7b92[_0x1513f7(0x256)](0x1),_0x1f53e4=_0x9d7b92[_0x1513f7(0x21a)]('\x20');if(isDisabled()){const _0x4e8631=await(0x0,executor_1[_0x1513f7(0x1dc)])(_0x4c5927,_0x354514);process[_0x1513f7(0x239)][_0x1513f7(0x218)](_0x4e8631['stdout']),process[_0x1513f7(0x217)]['write'](_0x4e8631[_0x1513f7(0x217)]),process['exit'](_0x4e8631[_0x1513f7(0x1dd)]);}if(isMcpServerExecution(_0x4c5927,_0x354514)){console[_0x1513f7(0x230)](_0x1513f7(0x1d9));const {runMcpProxy:_0x24f95d}=await Promise[_0x1513f7(0x240)]()[_0x1513f7(0x227)](()=>__importStar(require('./mcp')));_0x24f95d(_0x4c5927,_0x354514);return;}const _0x52fc13=adjustCommandArgs(_0x4c5927,_0x354514),_0xc61cee=await(0x0,executor_1[_0x1513f7(0x1dc)])(_0x52fc13[_0x1513f7(0x260)],_0x52fc13['args']),_0x1db320=(0x0,filters_1['compressOutput'])(_0x1f53e4,_0xc61cee[_0x1513f7(0x239)],_0xc61cee[_0x1513f7(0x217)],tracker_1[_0x1513f7(0x253)][_0x1513f7(0x207)]()[_0x1513f7(0x24a)]),_0x15c9c3=_0xc61cee[_0x1513f7(0x239)]+(_0xc61cee[_0x1513f7(0x217)][_0x1513f7(0x1ed)]()[_0x1513f7(0x206)]>0x0?'\x0a'+_0xc61cee['stderr']:''),_0xd284ed=_0x1db320[_0x1513f7(0x206)]<_0x15c9c3[_0x1513f7(0x206)]?_0x1db320:_0x15c9c3,_0x84c050=_0xc61cee[_0x1513f7(0x1dd)]===0x0?(0x0,cache_1['dedup'])(_0x1f53e4,_0xd284ed):null;tracker_1['tracker'][_0x1513f7(0x23d)](_0x1f53e4,_0x15c9c3,_0x84c050||_0xd284ed,_0xc61cee[_0x1513f7(0x1dd)]),_0xc61cee[_0x1513f7(0x1dd)]===0x0?process['stdout'][_0x1513f7(0x218)](_0xd284ed+'\x0a'):(process[_0x1513f7(0x239)]['write'](_0x1db320+'\x0a'),_0xc61cee[_0x1513f7(0x217)][_0x1513f7(0x1ed)]()[_0x1513f7(0x206)]>0x0&&!_0x1db320['includes'](_0xc61cee['stderr'][_0x1513f7(0x1ed)]())&&process[_0x1513f7(0x217)]['write'](_0xc61cee[_0x1513f7(0x217)]+'\x0a')),process[_0x1513f7(0x214)](_0xc61cee['exitCode']);}program[a0_0x37f631(0x242)](a0_0x37f631(0x1ed))[a0_0x37f631(0x1d5)](a0_0x37f631(0x25b))[a0_0x37f631(0x268)]('1.0.0'),program['command']('ui')[a0_0x37f631(0x1f8)](a0_0x37f631(0x24d))['description'](a0_0x37f631(0x1e5))[a0_0x37f631(0x243)]('-p,\x20--port\x20<number>',a0_0x37f631(0x1d7),a0_0x37f631(0x211))[a0_0x37f631(0x210)](_0x38a0c2=>{const _0x5a8404=parseInt(_0x38a0c2['port'],0xa);(0x0,dashboard_1['startDashboard'])(_0x5a8404);}),program[a0_0x37f631(0x250)](a0_0x37f631(0x1e4))['description']('Show\x20token\x20and\x20cost\x20savings\x20summary')[a0_0x37f631(0x243)](a0_0x37f631(0x1f4),a0_0x37f631(0x205),a0_0x37f631(0x251))[a0_0x37f631(0x210)](_0x436e03=>{const _0x5883e4=a0_0x37f631,_0x5a755d=tracker_1[_0x5883e4(0x253)][_0x5883e4(0x201)](_0x436e03[_0x5883e4(0x1fc)]);console['log'](_0x5883e4(0x238)),console[_0x5883e4(0x209)](_0x5883e4(0x219)),console[_0x5883e4(0x209)]('============================================='),console[_0x5883e4(0x209)](_0x5883e4(0x24c)+_0x5a755d[_0x5883e4(0x1db)]),console[_0x5883e4(0x209)](_0x5883e4(0x235)+_0x5a755d[_0x5883e4(0x1de)]['toLocaleString']()),console[_0x5883e4(0x209)](_0x5883e4(0x232)+_0x5a755d[_0x5883e4(0x20f)][_0x5883e4(0x1e7)]()),console['log']('Tokens\x20Saved:\x20\x20\x20\x20\x20\x20'+_0x5a755d['total_tokens_saved'][_0x5883e4(0x1e7)]()),console[_0x5883e4(0x209)](_0x5883e4(0x1f6)+_0x5a755d['savings_percentage']+'%'),console[_0x5883e4(0x209)](_0x5883e4(0x213)+_0x5a755d[_0x5883e4(0x262)][_0x5883e4(0x234)](0x4)+_0x5883e4(0x224)),console[_0x5883e4(0x209)](_0x5883e4(0x1f9)+_0x5a755d[_0x5883e4(0x269)][_0x5883e4(0x234)](0x4)+_0x5883e4(0x20a)),console[_0x5883e4(0x209)](_0x5883e4(0x22f)),console[_0x5883e4(0x209)]('Money\x20Saved:\x20\x20\x20\x20\x20\x20\x20$'+_0x5a755d[_0x5883e4(0x221)][_0x5883e4(0x234)](0x4)+_0x5883e4(0x21f)),console['log'](_0x5883e4(0x25c));}),program['command'](a0_0x37f631(0x1fa))[a0_0x37f631(0x1d5)](a0_0x37f631(0x237))[a0_0x37f631(0x258)](a0_0x37f631(0x1ec),a0_0x37f631(0x225))[a0_0x37f631(0x258)](a0_0x37f631(0x203),a0_0x37f631(0x25a))[a0_0x37f631(0x258)]('[value]',a0_0x37f631(0x1df))[a0_0x37f631(0x210)]((_0x19484d,_0x372bbc,_0x422af2)=>{const _0x31dd44=a0_0x37f631;if(_0x19484d===_0x31dd44(0x24b)){const _0xd0734c=tracker_1[_0x31dd44(0x253)][_0x31dd44(0x207)]();console[_0x31dd44(0x209)](_0x372bbc+':\x20'+_0xd0734c[_0x372bbc]);}else{if(_0x19484d===_0x31dd44(0x247)){_0x422af2===undefined&&(console[_0x31dd44(0x230)](_0x31dd44(0x1e8)),process['exit'](0x1));let _0x28b41a=_0x422af2;if(_0x422af2===_0x31dd44(0x241))_0x28b41a=!![];if(_0x422af2==='false')_0x28b41a=![];if(/^\d+$/[_0x31dd44(0x1d4)](_0x422af2))_0x28b41a=parseInt(_0x422af2,0xa);tracker_1[_0x31dd44(0x253)][_0x31dd44(0x1e9)](_0x372bbc,_0x28b41a),console['log'](_0x31dd44(0x1f3)+_0x372bbc+'\x20=\x20'+_0x422af2);}else console[_0x31dd44(0x230)](_0x31dd44(0x236)),process[_0x31dd44(0x214)](0x1);}}),program[a0_0x37f631(0x250)](a0_0x37f631(0x20c))[a0_0x37f631(0x1d5)](a0_0x37f631(0x1fd))[a0_0x37f631(0x258)](a0_0x37f631(0x1ec),'install\x20or\x20uninstall')['action'](_0x39ec25=>{const _0x2463b1=a0_0x37f631;if(_0x39ec25==='install'){const _0x5d5ca9=(0x0,shims_1['installShims'])();console[_0x2463b1(0x209)](_0x5d5ca9[_0x2463b1(0x1e1)]);}else{if(_0x39ec25===_0x2463b1(0x1fb)){const _0x34f979=(0x0,shims_1[_0x2463b1(0x1e3)])();console['log'](_0x34f979[_0x2463b1(0x1e1)]);}else console[_0x2463b1(0x230)](_0x2463b1(0x21e)),process[_0x2463b1(0x214)](0x1);}}),program[a0_0x37f631(0x250)](a0_0x37f631(0x21d))[a0_0x37f631(0x1d5)](a0_0x37f631(0x20e))['argument'](a0_0x37f631(0x228),a0_0x37f631(0x267))[a0_0x37f631(0x210)](_0x5f15f1=>{const _0x324327=a0_0x37f631;if(isDisabled()){console[_0x324327(0x209)](_0x5f15f1);return;}const _0x3e347b=(0x0,filters_1[_0x324327(0x25f)])(_0x5f15f1);console[_0x324327(0x209)](_0x3e347b);}),program['command'](a0_0x37f631(0x216))[a0_0x37f631(0x1f8)](a0_0x37f631(0x1e6))[a0_0x37f631(0x1d5)]('Proxy\x20wrapper\x20for\x20Model\x20Context\x20Protocol\x20(MCP)\x20servers\x20to\x20compact\x20tool\x20outputs')[a0_0x37f631(0x258)](a0_0x37f631(0x24f),a0_0x37f631(0x229))[a0_0x37f631(0x258)](a0_0x37f631(0x254),a0_0x37f631(0x245))[a0_0x37f631(0x210)](async(_0x3003e2,_0x116ae4)=>{const _0x5df05d=a0_0x37f631,{runMcpProxy:_0xbf9541}=await Promise[_0x5df05d(0x240)]()[_0x5df05d(0x227)](()=>__importStar(require(_0x5df05d(0x1d8))));_0xbf9541(_0x3003e2,_0x116ae4);});const args=process['argv'][a0_0x37f631(0x256)](0x2),firstArg=args[0x0],subcommands=['ui',a0_0x37f631(0x24d),a0_0x37f631(0x1e4),'config',a0_0x37f631(0x20c),a0_0x37f631(0x21d),'mcp-proxy','mcp',a0_0x37f631(0x1fe),'--help','-h',a0_0x37f631(0x268),'--version','-v'];firstArg&&!subcommands[a0_0x37f631(0x23b)](firstArg)?runProxy(args)['catch'](_0x26418d=>{const _0x1a5174=a0_0x37f631;console['error'](_0x1a5174(0x220)+_0x26418d[_0x1a5174(0x1e1)]),process[_0x1a5174(0x214)](0x1);}):program[a0_0x37f631(0x231)](process['argv']);
|
|
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)]);
|
package/dashboard.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x313c4f=a0_0x4ec5;(function(_0x4af20e,_0x443fd3){const _0xc5b13c=a0_0x4ec5,_0x16932e=_0x4af20e();while(!![]){try{const _0x55cef8=-parseInt(_0xc5b13c(0x116))/0x1+-parseInt(_0xc5b13c(0x122))/0x2*(-parseInt(_0xc5b13c(0x12f))/0x3)+-parseInt(_0xc5b13c(0x11c))/0x4*(-parseInt(_0xc5b13c(0x105))/0x5)+parseInt(_0xc5b13c(0x113))/0x6+parseInt(_0xc5b13c(0x119))/0x7+parseInt(_0xc5b13c(0x124))/0x8+-parseInt(_0xc5b13c(0xff))/0x9;if(_0x55cef8===_0x443fd3)break;else _0x16932e['push'](_0x16932e['shift']());}catch(_0x4a080e){_0x16932e['push'](_0x16932e['shift']());}}}(a0_0x5bc7,0xe19a5));var __createBinding=this&&this['__createBinding']||(Object[a0_0x313c4f(0x10e)]?function(_0x487bc5,_0x5f164d,_0x2859f5,_0x66320){const _0x31d075=a0_0x313c4f;if(_0x66320===undefined)_0x66320=_0x2859f5;var _0x2658df=Object['getOwnPropertyDescriptor'](_0x5f164d,_0x2859f5);(!_0x2658df||(_0x31d075(0x108)in _0x2658df?!_0x5f164d[_0x31d075(0x131)]:_0x2658df[_0x31d075(0x123)]||_0x2658df['configurable']))&&(_0x2658df={'enumerable':!![],'get':function(){return _0x5f164d[_0x2859f5];}}),Object[_0x31d075(0x106)](_0x487bc5,_0x66320,_0x2658df);}:function(_0x54db5a,_0x3ea425,_0x292509,_0x3ca890){if(_0x3ca890===undefined)_0x3ca890=_0x292509;_0x54db5a[_0x3ca890]=_0x3ea425[_0x292509];}),__setModuleDefault=this&&this[a0_0x313c4f(0x11b)]||(Object['create']?function(_0x46ad50,_0x2a7e54){const _0x4804b4=a0_0x313c4f;Object['defineProperty'](_0x46ad50,_0x4804b4(0x132),{'enumerable':!![],'value':_0x2a7e54});}:function(_0x5e5622,_0x3febba){_0x5e5622['default']=_0x3febba;}),__importStar=this&&this[a0_0x313c4f(0x126)]||(function(){var _0x2b9d5f=function(_0x37c320){return _0x2b9d5f=Object['getOwnPropertyNames']||function(_0x2e5375){const _0x2dfd6c=a0_0x4ec5;var _0x2f8dcd=[];for(var _0x56fb62 in _0x2e5375)if(Object[_0x2dfd6c(0x12d)][_0x2dfd6c(0x109)][_0x2dfd6c(0xfd)](_0x2e5375,_0x56fb62))_0x2f8dcd[_0x2f8dcd[_0x2dfd6c(0x10b)]]=_0x56fb62;return _0x2f8dcd;},_0x2b9d5f(_0x37c320);};return function(_0x4088cb){const _0x304c6c=a0_0x4ec5;if(_0x4088cb&&_0x4088cb[_0x304c6c(0x131)])return _0x4088cb;var _0x28ccfe={};if(_0x4088cb!=null){for(var _0x1f2f8c=_0x2b9d5f(_0x4088cb),_0x44f7be=0x0;_0x44f7be<_0x1f2f8c[_0x304c6c(0x10b)];_0x44f7be++)if(_0x1f2f8c[_0x44f7be]!==_0x304c6c(0x132))__createBinding(_0x28ccfe,_0x4088cb,_0x1f2f8c[_0x44f7be]);}return __setModuleDefault(_0x28ccfe,_0x4088cb),_0x28ccfe;};}()),__importDefault=this&&this[a0_0x313c4f(0x112)]||function(_0x337929){const _0x27da46=a0_0x313c4f;return _0x337929&&_0x337929[_0x27da46(0x131)]?_0x337929:{'default':_0x337929};};Object['defineProperty'](exports,a0_0x313c4f(0x131),{'value':!![]}),exports['startDashboard']=startDashboard;const express_1=__importDefault(require('express')),path=__importStar(require(a0_0x313c4f(0x104))),fs=__importStar(require('fs')),os=__importStar(require('os')),open_1=__importDefault(require('open')),tracker_1=require(a0_0x313c4f(0x10d)),app=(0x0,express_1[a0_0x313c4f(0x132)])(),baseDir=path[a0_0x313c4f(0x10f)](os[a0_0x313c4f(0x110)](),a0_0x313c4f(0xfc)),logsDir=path[a0_0x313c4f(0x10f)](baseDir,'logs');function a0_0x4ec5(_0x48bcea,_0x22849d){const _0x5bc7fa=a0_0x5bc7();return a0_0x4ec5=function(_0x4ec570,_0x18de80){_0x4ec570=_0x4ec570-0xfc;let _0x4c4b2c=_0x5bc7fa[_0x4ec570];return _0x4c4b2c;},a0_0x4ec5(_0x48bcea,_0x22849d);}app['get']('/',(_0x3db1e0,_0x5ae4f7)=>{const _0x381ce3=a0_0x313c4f,_0x1f8058=path['join'](__dirname,_0x381ce3(0x12b));fs[_0x381ce3(0x11a)](_0x1f8058)?_0x5ae4f7['sendFile'](_0x1f8058):_0x5ae4f7[_0x381ce3(0x102)](path['join'](__dirname,_0x381ce3(0x11d)));}),app['get'](a0_0x313c4f(0x128),(_0xf113f4,_0xe8a1d5)=>{const _0x4989f8=a0_0x313c4f,_0x555419=path[_0x4989f8(0x10f)](__dirname,_0x4989f8(0x111));fs[_0x4989f8(0x11a)](_0x555419)?_0xe8a1d5[_0x4989f8(0x102)](_0x555419):_0xe8a1d5['sendFile'](path[_0x4989f8(0x10f)](__dirname,_0x4989f8(0xfe)));}),app[a0_0x313c4f(0x108)](a0_0x313c4f(0x11f),(_0x174186,_0x53e253)=>{const _0x447707=a0_0x313c4f,_0x2269f2=_0x174186['query'][_0x447707(0x12e)]||'auto',_0xe699de=tracker_1[_0x447707(0x12c)][_0x447707(0x127)](_0x2269f2);_0x53e253['json'](_0xe699de);}),app[a0_0x313c4f(0x108)](a0_0x313c4f(0x121),(_0x1816c5,_0x9bedcc)=>{const _0x218a09=a0_0x313c4f,_0x119109=tracker_1['tracker'][_0x218a09(0x130)]();_0x9bedcc[_0x218a09(0x114)](_0x119109);}),app[a0_0x313c4f(0x108)](a0_0x313c4f(0x107),(_0x221650,_0x46e2c0)=>{const _0x3ac901=a0_0x313c4f,_0x29f946=_0x221650[_0x3ac901(0x117)]['id'],_0x28fa38=path[_0x3ac901(0x10f)](logsDir,_0x29f946+'.raw.txt'),_0x1505d9=path[_0x3ac901(0x10f)](logsDir,_0x29f946+_0x3ac901(0x129));let _0x3a176a='Raw\x20output\x20log\x20file\x20not\x20found.',_0x3c8e86=_0x3ac901(0x10a);try{fs[_0x3ac901(0x11a)](_0x28fa38)&&(_0x3a176a=fs[_0x3ac901(0x115)](_0x28fa38,'utf8')),fs[_0x3ac901(0x11a)](_0x1505d9)&&(_0x3c8e86=fs['readFileSync'](_0x1505d9,_0x3ac901(0x10c)));}catch(_0x2cc847){}_0x46e2c0[_0x3ac901(0x114)]({'id':_0x29f946,'raw':_0x3a176a,'compressed':_0x3c8e86});});function startDashboard(_0x499d83=0xfa0){const _0x4bf610=a0_0x313c4f;let _0x34e431=_0x499d83;const _0x48a2f4=app[_0x4bf610(0x11e)](_0x34e431,()=>{const _0x76dd28=_0x4bf610,_0x28ac72=_0x76dd28(0x100)+_0x34e431;console[_0x76dd28(0x118)](_0x76dd28(0x101)+_0x28ac72),console[_0x76dd28(0x118)](_0x76dd28(0x103)),(0x0,open_1['default'])(_0x28ac72)[_0x76dd28(0x120)](()=>{});});_0x48a2f4['on'](_0x4bf610(0x12a),_0x44c393=>{const _0x32c284=_0x4bf610;_0x44c393[_0x32c284(0x125)]==='EADDRINUSE'?startDashboard(_0x34e431+0x1):console[_0x32c284(0x12a)]('[TrimPrompt]\x20Dashboard\x20error:\x20'+_0x44c393['message']);});}function a0_0x5bc7(){const _0x463552=['.comp.txt','error','index.html','tracker','prototype','model','1590aOLVTX','getLogs','__esModule','default','.trimprompt','call','../src/favicon.png','40043610izoTYA','http://localhost:','\x0a[TrimPrompt]\x20Dashboard\x20server\x20started\x20at:\x20','sendFile','Press\x20Ctrl+C\x20in\x20this\x20terminal\x20to\x20shut\x20down.','path','347005dsOfSp','defineProperty','/api/stats/inspect/:id','get','hasOwnProperty','Compressed\x20output\x20log\x20file\x20not\x20found.','length','utf8','./tracker','create','join','homedir','favicon.png','__importDefault','7757064bkUhLd','json','readFileSync','563906zVyVzt','params','log','1763139Nrwixn','existsSync','__setModuleDefault','72jjfkbO','../src/index.html','listen','/api/stats/summary','catch','/api/stats/history','6238tMapZe','writable','11922048oVlqmy','code','__importStar','getStatsSummary','/favicon.png'];a0_0x5bc7=function(){return _0x463552;};return a0_0x5bc7();}
|
package/executor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a0_0x4bfa9f=a0_0xc7a9;(function(_0x7ab555,_0x572c2b){var _0x23d8ad=a0_0xc7a9,_0x1ef34c=_0x7ab555();while(!![]){try{var _0x410c55=parseInt(_0x23d8ad(0xdb))/0x1+-parseInt(_0x23d8ad(0xea))/0x2*(parseInt(_0x23d8ad(0xe6))/0x3)+parseInt(_0x23d8ad(0xec))/0x4*(parseInt(_0x23d8ad(0xd8))/0x5)+-parseInt(_0x23d8ad(0xfe))/0x6*(parseInt(_0x23d8ad(0xf8))/0x7)+-parseInt(_0x23d8ad(0xe3))/0x8+parseInt(_0x23d8ad(0xef))/0x9*(parseInt(_0x23d8ad(0xed))/0xa)+-parseInt(_0x23d8ad(0xe1))/0xb;if(_0x410c55===_0x572c2b)break;else _0x1ef34c['push'](_0x1ef34c['shift']());}catch(_0x18748d){_0x1ef34c['push'](_0x1ef34c['shift']());}}}(a0_0x372d,0x89025));function a0_0x372d(){var _0x5109ce=['stderr','path','Failed\x20to\x20spawn\x20command\x20\x22','75370jejosm','__setModuleDefault','1553720yrwvbY','2230XQDYOp','writable','21582hXfZGU','split','__esModule','homedir','stdout','PATH','delimiter','child_process','\x22:\x20','1239HaaLpL','default','defineProperty','error','.trimprompt','trim','16518yTAnuZ','hasOwnProperty','inherit','map','create','message','includes','close','toString','5duMHzP','configurable','join','751653tUdRIh','getOwnPropertyDescriptor','toLowerCase','data','shims','pipe','441650CZylDu','env','770496dDsxFQ','startsWith','platform','39cwpSYd'];a0_0x372d=function(){return _0x5109ce;};return a0_0x372d();}var __createBinding=this&&this['__createBinding']||(Object[a0_0x4bfa9f(0x102)]?function(_0x26a3c0,_0x5bfb88,_0x2dcdde,_0x9e8354){var _0x495187=a0_0x4bfa9f;if(_0x9e8354===undefined)_0x9e8354=_0x2dcdde;var _0x1c20ce=Object[_0x495187(0xdc)](_0x5bfb88,_0x2dcdde);(!_0x1c20ce||('get'in _0x1c20ce?!_0x5bfb88[_0x495187(0xf1)]:_0x1c20ce[_0x495187(0xee)]||_0x1c20ce[_0x495187(0xd9)]))&&(_0x1c20ce={'enumerable':!![],'get':function(){return _0x5bfb88[_0x2dcdde];}}),Object[_0x495187(0xfa)](_0x26a3c0,_0x9e8354,_0x1c20ce);}:function(_0xdf4bfd,_0x49b262,_0x158641,_0x2c4761){if(_0x2c4761===undefined)_0x2c4761=_0x158641;_0xdf4bfd[_0x2c4761]=_0x49b262[_0x158641];}),__setModuleDefault=this&&this[a0_0x4bfa9f(0xeb)]||(Object[a0_0x4bfa9f(0x102)]?function(_0x245870,_0x7450fe){var _0x539ea8=a0_0x4bfa9f;Object[_0x539ea8(0xfa)](_0x245870,'default',{'enumerable':!![],'value':_0x7450fe});}:function(_0x3b7816,_0x5799d8){var _0x58ed87=a0_0x4bfa9f;_0x3b7816[_0x58ed87(0xf9)]=_0x5799d8;}),__importStar=this&&this['__importStar']||(function(){var _0x5ce5f1=function(_0x48c593){return _0x5ce5f1=Object['getOwnPropertyNames']||function(_0x48fcec){var _0x208da8=a0_0xc7a9,_0x4c3cf5=[];for(var _0x71f7f1 in _0x48fcec)if(Object['prototype'][_0x208da8(0xff)]['call'](_0x48fcec,_0x71f7f1))_0x4c3cf5[_0x4c3cf5['length']]=_0x71f7f1;return _0x4c3cf5;},_0x5ce5f1(_0x48c593);};return function(_0x4632ee){var _0xaf2ad9=a0_0xc7a9;if(_0x4632ee&&_0x4632ee[_0xaf2ad9(0xf1)])return _0x4632ee;var _0x176f0f={};if(_0x4632ee!=null){for(var _0x7f8bf7=_0x5ce5f1(_0x4632ee),_0x564ebe=0x0;_0x564ebe<_0x7f8bf7['length'];_0x564ebe++)if(_0x7f8bf7[_0x564ebe]!==_0xaf2ad9(0xf9))__createBinding(_0x176f0f,_0x4632ee,_0x7f8bf7[_0x564ebe]);}return __setModuleDefault(_0x176f0f,_0x4632ee),_0x176f0f;};}());function a0_0xc7a9(_0x3cfb07,_0x54f2ef){var _0x372dcc=a0_0x372d();return a0_0xc7a9=function(_0xc7a935,_0x3dc10e){_0xc7a935=_0xc7a935-0xd5;var _0x336940=_0x372dcc[_0xc7a935];return _0x336940;},a0_0xc7a9(_0x3cfb07,_0x54f2ef);}Object['defineProperty'](exports,a0_0x4bfa9f(0xf1),{'value':!![]}),exports['executeCommand']=executeCommand;const child_process_1=require(a0_0x4bfa9f(0xf6)),path=__importStar(require(a0_0x4bfa9f(0xe8))),os=__importStar(require('os'));function executeCommand(_0x2ed059,_0x322385){return new Promise(_0x441f9f=>{var _0x35e30a=a0_0xc7a9;const _0x3c00f4=path['join'](os[_0x35e30a(0xf2)](),_0x35e30a(0xfc),_0x35e30a(0xdf)),_0x5d4ffa=(process[_0x35e30a(0xe2)][_0x35e30a(0xf4)]||'')[_0x35e30a(0xf0)](path[_0x35e30a(0xf5)])['filter'](_0x3227f7=>_0x3227f7[_0x35e30a(0xfd)]()[_0x35e30a(0xdd)]()!==_0x3c00f4[_0x35e30a(0xdd)]())[_0x35e30a(0xda)](path['delimiter']),_0x2b1255={...process[_0x35e30a(0xe2)],'PATH':_0x5d4ffa,'TRIMPROMPT_DISABLED':'1'},_0x1e2274=process[_0x35e30a(0xe5)]==='win32'?_0x322385[_0x35e30a(0x101)](_0x107a02=>_0x107a02[_0x35e30a(0xd5)]('\x20')&&!_0x107a02[_0x35e30a(0xe4)]('\x22')?'\x22'+_0x107a02+'\x22':_0x107a02):_0x322385,_0x17008b=(0x0,child_process_1['spawn'])(_0x2ed059,_0x1e2274,{'stdio':[_0x35e30a(0x100),_0x35e30a(0xe0),'pipe'],'shell':!![],'env':_0x2b1255});let _0x36f91e='',_0x263e77='';_0x17008b[_0x35e30a(0xf3)]?.['on'](_0x35e30a(0xde),_0x2392fb=>{var _0x58daaf=_0x35e30a;_0x36f91e+=_0x2392fb[_0x58daaf(0xd7)]();}),_0x17008b[_0x35e30a(0xe7)]?.['on']('data',_0x5cdf43=>{var _0x446082=_0x35e30a;_0x263e77+=_0x5cdf43[_0x446082(0xd7)]();}),_0x17008b['on'](_0x35e30a(0xfb),_0x349117=>{var _0x3f8563=_0x35e30a;_0x441f9f({'exitCode':0x1,'stdout':'','stderr':_0x3f8563(0xe9)+_0x2ed059+_0x3f8563(0xf7)+_0x349117[_0x3f8563(0x103)]});}),_0x17008b['on'](_0x35e30a(0xd6),_0x26fc9d=>{_0x441f9f({'exitCode':_0x26fc9d??0x0,'stdout':_0x36f91e,'stderr':_0x263e77});});});}
|
package/favicon.png
ADDED
|
Binary file
|
package/filters/devops.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const a0_0x49f8ba=a0_0x36da;(function(_0x30debf,_0x20d0c1){const _0x493cf5=a0_0x36da,_0x2a13d5=_0x30debf();while(!![]){try{const _0x597bc0=parseInt(_0x493cf5(0x1dd))/0x1*(parseInt(_0x493cf5(0x1da))/0x2)+parseInt(_0x493cf5(0x1e9))/0x3*(-parseInt(_0x493cf5(0x1d8))/0x4)+-parseInt(_0x493cf5(0x1eb))/0x5*(-parseInt(_0x493cf5(0x1e6))/0x6)+-parseInt(_0x493cf5(0x1ce))/0x7*(-parseInt(_0x493cf5(0x1f0))/0x8)+parseInt(_0x493cf5(0x1e3))/0x9*(-parseInt(_0x493cf5(0x1cf))/0xa)+-parseInt(_0x493cf5(0x1ed))/0xb+-parseInt(_0x493cf5(0x1d5))/0xc;if(_0x597bc0===_0x20d0c1)break;else _0x2a13d5['push'](_0x2a13d5['shift']());}catch(_0x1865a0){_0x2a13d5['push'](_0x2a13d5['shift']());}}}(a0_0x57c9,0xd0b2b));Object[a0_0x49f8ba(0x1c1)](exports,a0_0x49f8ba(0x1e2),{'value':!![]}),exports[a0_0x49f8ba(0x1de)]=filterDockerPs,exports['filterDockerImages']=filterDockerImages,exports['filterDockerLogs']=filterDockerLogs,exports['filterKubectl']=filterKubectl,exports[a0_0x49f8ba(0x1e4)]=filterRuff;function filterDockerPs(_0xa60924){const _0x15551e=a0_0x49f8ba,_0x49cd4b=_0xa60924['split']('\x0a')[_0x15551e(0x1c7)](_0x22bb60=>_0x22bb60[_0x15551e(0x1d4)]()['length']>0x0);if(_0x49cd4b['length']===0x0)return'No\x20containers\x20running';if(_0x49cd4b['length']<=0xa)return _0xa60924[_0x15551e(0x1d4)]();const _0x5af818=_0x49cd4b[0x0],_0x13e600=_0x49cd4b['slice'](0x1),_0x3c0089=[];_0x3c0089[_0x15551e(0x1c6)](_0x15551e(0x1c3)+_0x13e600['length']+_0x15551e(0x1c5)),_0x3c0089[_0x15551e(0x1c6)]('');for(const _0x57e00f of _0x13e600){const _0x11771a=_0x57e00f['split'](/\s{2,}/);if(_0x11771a[_0x15551e(0x1e8)]>=0x5){const _0x17d1ba=_0x11771a[0x0][_0x15551e(0x1db)](0x0,0xc),_0x54b7ec=_0x11771a[0x1],_0x13a7b2=_0x11771a[_0x11771a[_0x15551e(0x1e8)]-0x2]||'',_0x51172e=_0x11771a[_0x11771a[_0x15551e(0x1e8)]-0x1]||'';_0x3c0089[_0x15551e(0x1c6)]('\x20\x20'+_0x17d1ba+'\x20\x20'+_0x54b7ec+'\x20\x20'+_0x13a7b2+'\x20\x20'+_0x51172e);}else _0x3c0089[_0x15551e(0x1c6)]('\x20\x20'+_0x57e00f[_0x15551e(0x1d4)]());}return _0x3c0089[_0x15551e(0x1df)]('\x0a');}function filterDockerImages(_0x52a09a){const _0x178769=a0_0x49f8ba,_0x5a817a=_0x52a09a[_0x178769(0x1c8)]('\x0a')[_0x178769(0x1c7)](_0x327758=>_0x327758[_0x178769(0x1d4)]()[_0x178769(0x1e8)]>0x0);if(_0x5a817a[_0x178769(0x1e8)]<=0x1)return _0x178769(0x1e0);if(_0x5a817a[_0x178769(0x1e8)]<=0xf)return _0x52a09a[_0x178769(0x1d4)]();const _0x44558f=_0x5a817a[_0x178769(0x1ec)](0x1),_0x397ebb=[_0x178769(0x1c9)+_0x44558f[_0x178769(0x1e8)]+'\x20total'];_0x397ebb['push']('');const _0x512070=_0x44558f[_0x178769(0x1ec)](0x0,0x14);for(const _0xc6b76a of _0x512070){const _0xae18b3=_0xc6b76a['split'](/\s{2,}/);if(_0xae18b3[_0x178769(0x1e8)]>=0x3){const _0x499a32=_0xae18b3[0x0],_0x5caeeb=_0xae18b3[0x1],_0x104018=_0xae18b3[_0xae18b3[_0x178769(0x1e8)]-0x1]||'';_0x397ebb[_0x178769(0x1c6)]('\x20\x20'+_0x499a32+':'+_0x5caeeb+'\x20\x20'+_0x104018);}else _0x397ebb[_0x178769(0x1c6)]('\x20\x20'+_0xc6b76a[_0x178769(0x1d4)]());}return _0x44558f[_0x178769(0x1e8)]>0x14&&_0x397ebb[_0x178769(0x1c6)]('\x20\x20...\x20+'+(_0x44558f[_0x178769(0x1e8)]-0x14)+'\x20more\x20images'),_0x397ebb[_0x178769(0x1df)]('\x0a');}function a0_0x36da(_0x4bb93d,_0x4feebe){const _0x57c9b0=a0_0x57c9();return a0_0x36da=function(_0x36dabc,_0x16f477){_0x36dabc=_0x36dabc-0x1c0;let _0x30d9b2=_0x57c9b0[_0x36dabc];return _0x30d9b2;},a0_0x36da(_0x4bb93d,_0x4feebe);}function a0_0x57c9(){const _0x3584af=['logs','55516fxzaVw','filterDockerPs','join','No\x20images\x20found','\x20files','__esModule','9lrITRz','filterRuff','\x20more\x20events','78XZlesd','No\x20resources\x20found','length','345DEjKfn','\x20\x20...\x20(','413525aApQBm','slice','6900520YVlxBN','\x20more\x20files','\x20lines\x20truncated]\x20...\x0a','40ZxDTqH','\x20log\x20lines\x20total)','\x0a...\x20[','defineProperty','\x20more\x20resources','Containers:\x20','\x20\x20...\x20+','\x20total','push','filter','split','Docker\x20images:\x20','\x20issues\x20in\x20','describe','get','\x20more','2219329SJcubI','10109940wecyWP','Ruff:\x20all\x20checks\x20passed','\x0a...\x20+','...\x20+','includes','trim','5695452WwSeoq','\x20resources\x20found','match','22136gHccAF','Found\x200\x20error','34UEQrkA','substring'];a0_0x57c9=function(){return _0x3584af;};return a0_0x57c9();}function filterDockerLogs(_0x145086){const _0x257a2c=a0_0x49f8ba,_0x5589c1=_0x145086['split']('\x0a');if(_0x5589c1['length']<=0x32)return _0x145086;const _0x2ca129=[];return _0x2ca129[_0x257a2c(0x1c6)](..._0x5589c1[_0x257a2c(0x1ec)](0x0,0x14)),_0x2ca129[_0x257a2c(0x1c6)](_0x257a2c(0x1c0)+(_0x5589c1[_0x257a2c(0x1e8)]-0x28)+_0x257a2c(0x1ef)),_0x2ca129[_0x257a2c(0x1c6)](..._0x5589c1[_0x257a2c(0x1ec)](-0x14)),_0x2ca129['push']('\x0a('+_0x5589c1[_0x257a2c(0x1e8)]+_0x257a2c(0x1f1)),_0x2ca129['join']('\x0a');}function filterKubectl(_0x1602a8,_0x1d5455){const _0x5c304f=a0_0x49f8ba,_0x2de28d=_0x1602a8[_0x5c304f(0x1c8)]('\x0a')[_0x5c304f(0x1c7)](_0x1d8064=>_0x1d8064['trim']()['length']>0x0);if(_0x2de28d[_0x5c304f(0x1e8)]===0x0)return _0x5c304f(0x1e7);if(_0x2de28d[_0x5c304f(0x1e8)]<=0x14)return _0x1602a8[_0x5c304f(0x1d4)]();if(_0x1d5455===_0x5c304f(0x1cc)){const _0x3ec9c8=_0x2de28d[0x0],_0x3afc3d=_0x2de28d[_0x5c304f(0x1ec)](0x1),_0x5b81d0=[_0x3afc3d[_0x5c304f(0x1e8)]+_0x5c304f(0x1d6),'',_0x3ec9c8];return _0x3afc3d[_0x5c304f(0x1e8)]<=0x1e?_0x5b81d0[_0x5c304f(0x1c6)](..._0x3afc3d):(_0x5b81d0[_0x5c304f(0x1c6)](..._0x3afc3d[_0x5c304f(0x1ec)](0x0,0x19)),_0x5b81d0['push'](_0x5c304f(0x1d2)+(_0x3afc3d[_0x5c304f(0x1e8)]-0x19)+_0x5c304f(0x1c2))),_0x5b81d0[_0x5c304f(0x1df)]('\x0a');}if(_0x1d5455===_0x5c304f(0x1cb)){const _0x5c81a3=[];let _0x549c74=![],_0x543bb9=0x0;for(const _0x22035b of _0x2de28d){if(_0x22035b['startsWith']('Events:')){_0x549c74=!![],_0x5c81a3[_0x5c304f(0x1c6)](_0x22035b);continue;}if(_0x549c74){_0x543bb9++;if(_0x543bb9<=0x5)_0x5c81a3[_0x5c304f(0x1c6)](_0x22035b);}else _0x5c81a3[_0x5c304f(0x1c6)](_0x22035b);}return _0x543bb9>0x5&&_0x5c81a3['push'](_0x5c304f(0x1c4)+(_0x543bb9-0x5)+_0x5c304f(0x1e5)),_0x5c81a3['join']('\x0a');}if(_0x1d5455===_0x5c304f(0x1dc))return filterDockerLogs(_0x1602a8);const _0x3e1c04=_0x2de28d['slice'](0x0,0x1e);return _0x2de28d['length']>0x1e&&_0x3e1c04[_0x5c304f(0x1c6)](_0x5c304f(0x1d2)+(_0x2de28d['length']-0x1e)+'\x20more\x20lines'),_0x3e1c04[_0x5c304f(0x1df)]('\x0a');}function filterRuff(_0x2bce4a){const _0x1ff887=a0_0x49f8ba,_0x53d148=_0x2bce4a[_0x1ff887(0x1c8)]('\x0a')['filter'](_0x576bdc=>_0x576bdc[_0x1ff887(0x1d4)]()[_0x1ff887(0x1e8)]>0x0);if(_0x53d148[_0x1ff887(0x1e8)]===0x0)return'Ruff:\x20no\x20issues\x20found';if(_0x2bce4a[_0x1ff887(0x1d3)]('All\x20checks\x20passed')||_0x2bce4a['includes'](_0x1ff887(0x1d9)))return _0x1ff887(0x1d0);const _0x6a88bb=_0x2bce4a['match'](/Found (\d+) error/),_0x16e326=_0x6a88bb?parseInt(_0x6a88bb[0x1]):_0x53d148[_0x1ff887(0x1e8)],_0x523a5d={},_0x187754=[];for(const _0x224ddf of _0x53d148){const _0x3a17c4=_0x224ddf[_0x1ff887(0x1d7)](/^([^:]+:\d+:\d+):\s*(.*)/);if(_0x3a17c4){const _0xc73122=_0x3a17c4[0x1],_0x5796c2=_0xc73122['split'](':')[0x0];if(!_0x523a5d[_0x5796c2])_0x523a5d[_0x5796c2]=[];_0x523a5d[_0x5796c2][_0x1ff887(0x1c6)](_0x224ddf);}else _0x187754[_0x1ff887(0x1c6)](_0x224ddf);}const _0x2d7872=Object['keys'](_0x523a5d);if(_0x2d7872[_0x1ff887(0x1e8)]===0x0){if(_0x53d148[_0x1ff887(0x1e8)]<=0x14)return _0x2bce4a[_0x1ff887(0x1d4)]();return _0x53d148['slice'](0x0,0xf)[_0x1ff887(0x1df)]('\x0a')+(_0x1ff887(0x1d1)+(_0x53d148[_0x1ff887(0x1e8)]-0xf)+_0x1ff887(0x1cd));}const _0x56df9b=['Ruff:\x20'+_0x16e326+_0x1ff887(0x1ca)+_0x2d7872['length']+_0x1ff887(0x1e1)];_0x56df9b[_0x1ff887(0x1c6)]('');const _0x21d6ef=0xa;for(const _0x165bbd of _0x2d7872[_0x1ff887(0x1ec)](0x0,_0x21d6ef)){const _0x5c25c4=_0x523a5d[_0x165bbd];if(_0x5c25c4[_0x1ff887(0x1e8)]<=0x3){for(const _0x39c108 of _0x5c25c4)_0x56df9b['push']('\x20\x20'+_0x39c108);}else _0x56df9b[_0x1ff887(0x1c6)]('\x20\x20'+_0x5c25c4[0x0]),_0x56df9b[_0x1ff887(0x1c6)](_0x1ff887(0x1ea)+_0x5c25c4['length']+_0x1ff887(0x1ca)+_0x165bbd+')');}return _0x2d7872['length']>_0x21d6ef&&_0x56df9b['push'](_0x1ff887(0x1c4)+(_0x2d7872[_0x1ff887(0x1e8)]-_0x21d6ef)+_0x1ff887(0x1ee)),_0x56df9b[_0x1ff887(0x1df)]('\x0a');}
|
package/filters/generic.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x2c58ac=a0_0x35a0;(function(_0xeb0a28,_0x16c280){const _0x3bf06e=a0_0x35a0,_0x34be14=_0xeb0a28();while(!![]){try{const _0x160ec2=parseInt(_0x3bf06e(0x1fb))/0x1*(parseInt(_0x3bf06e(0x200))/0x2)+parseInt(_0x3bf06e(0x1f2))/0x3+parseInt(_0x3bf06e(0x1ee))/0x4+parseInt(_0x3bf06e(0x201))/0x5+parseInt(_0x3bf06e(0x1f9))/0x6*(-parseInt(_0x3bf06e(0x1fe))/0x7)+-parseInt(_0x3bf06e(0x1f7))/0x8*(-parseInt(_0x3bf06e(0x1ff))/0x9)+-parseInt(_0x3bf06e(0x1f1))/0xa*(parseInt(_0x3bf06e(0x204))/0xb);if(_0x160ec2===_0x16c280)break;else _0x34be14['push'](_0x34be14['shift']());}catch(_0x31ddfd){_0x34be14['push'](_0x34be14['shift']());}}}(a0_0xc698,0x61ef1));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a0_0x2c58ac(0x1ef)]=stripAnsi,exports[a0_0x2c58ac(0x1fc)]=collapseDuplicates,exports[a0_0x2c58ac(0x1f4)]=softTruncate;function a0_0xc698(){const _0x3cb87d=['11AzDtUk','slice','1645844oHeSZe','stripAnsi','split','11916050EwYmuA','2375367jmQFgZ','join','softTruncate','push','trim','1518808RWSFXi','length','18XJqtQc','\x0a...\x20[TrimPrompt:\x20Truncated\x20','14BPahKJ','collapseDuplicates','\x20characters\x20of\x20output]\x20...\x0a','769111LSStZS','18DVETMC','33476xfGLqP','525385myhrVd','\x20[x','replace'];a0_0xc698=function(){return _0x3cb87d;};return a0_0xc698();}function stripAnsi(_0xca0d46){const _0x578d86=a0_0x2c58ac,_0x1fbac=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g;return _0xca0d46[_0x578d86(0x203)](_0x1fbac,'');}function collapseDuplicates(_0x6e6d02){const _0x50456e=a0_0x2c58ac,_0x389b3b=_0x6e6d02[_0x50456e(0x1f0)]('\x0a');if(_0x389b3b[_0x50456e(0x1f8)]<=0x1)return _0x6e6d02;const _0x358c25=[];let _0xa8f2de=_0x389b3b[0x0],_0x498a23=0x1;for(let _0x491c11=0x1;_0x491c11<_0x389b3b['length'];_0x491c11++){const _0x596bea=_0x389b3b[_0x491c11];_0x596bea===_0xa8f2de&&_0x596bea[_0x50456e(0x1f6)]()['length']>0x0?_0x498a23++:(_0x498a23>0x1?_0x358c25[_0x50456e(0x1f5)](_0xa8f2de+_0x50456e(0x202)+_0x498a23+']'):_0x358c25['push'](_0xa8f2de),_0xa8f2de=_0x596bea,_0x498a23=0x1);}return _0x498a23>0x1?_0x358c25[_0x50456e(0x1f5)](_0xa8f2de+_0x50456e(0x202)+_0x498a23+']'):_0x358c25[_0x50456e(0x1f5)](_0xa8f2de),_0x358c25[_0x50456e(0x1f3)]('\x0a');}function a0_0x35a0(_0x5492ef,_0x210db6){const _0xc698e=a0_0xc698();return a0_0x35a0=function(_0x35a004,_0x26bdbd){_0x35a004=_0x35a004-0x1ee;let _0x2f370d=_0xc698e[_0x35a004];return _0x2f370d;},a0_0x35a0(_0x5492ef,_0x210db6);}function softTruncate(_0x1a2788,_0x331671=0x4e20){const _0x31223c=a0_0x2c58ac;if(_0x1a2788[_0x31223c(0x1f8)]<=_0x331671)return _0x1a2788;const _0x45d707=_0x1a2788[_0x31223c(0x1f0)]('\x0a');if(_0x45d707[_0x31223c(0x1f8)]<=0xc8)return _0x1a2788;const _0x3c3e3b=0x32,_0x255dd7=0x96,_0xddeec9=_0x45d707[_0x31223c(0x205)](0x0,_0x3c3e3b),_0xa1385=_0x45d707[_0x31223c(0x205)](_0x45d707[_0x31223c(0x1f8)]-_0x255dd7),_0x12b1fe=_0x1a2788['length']-(_0xddeec9[_0x31223c(0x1f3)]('\x0a')['length']+_0xa1385['join']('\x0a')[_0x31223c(0x1f8)]);return[..._0xddeec9,_0x31223c(0x1fa)+_0x12b1fe+_0x31223c(0x1fd),..._0xa1385][_0x31223c(0x1f3)]('\x0a');}
|
package/filters/git.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x29f858=a0_0x20b5;(function(_0x1675f5,_0x49ddde){const _0x3d3b8d=a0_0x20b5,_0x82f627=_0x1675f5();while(!![]){try{const _0x52869b=parseInt(_0x3d3b8d(0x13c))/0x1*(parseInt(_0x3d3b8d(0x163))/0x2)+parseInt(_0x3d3b8d(0x15e))/0x3+parseInt(_0x3d3b8d(0x164))/0x4*(-parseInt(_0x3d3b8d(0x143))/0x5)+parseInt(_0x3d3b8d(0x156))/0x6+-parseInt(_0x3d3b8d(0x16d))/0x7+parseInt(_0x3d3b8d(0x144))/0x8+-parseInt(_0x3d3b8d(0x161))/0x9*(parseInt(_0x3d3b8d(0x166))/0xa);if(_0x52869b===_0x49ddde)break;else _0x82f627['push'](_0x82f627['shift']());}catch(_0x3531cd){_0x82f627['push'](_0x82f627['shift']());}}}(a0_0x2b6d,0x6941e));function a0_0x2b6d(){const _0x3d025d=['2705388zMEKnZ','hasOwnProperty','filterGitDiff','+++','defineProperty','__createBinding','513218ZhzjPL','\x20\x20...\x20+','length','substring','\x20\x20...\x20(+','unknown_file','dirname','230iuHXLo','1270632CPDdSi','__setModuleDefault','filter','\x0aChanges:','trim','getOwnPropertyDescriptor','Clean\x20working\x20tree','split','map','__importStar','No\x20modifications','startsWith','get','filterGitStatus','__esModule','replace','entries','create','4246968MpYdmi','*\x20Branch:\x20','writable','\x20(+','slice','match','getOwnPropertyNames','diff\x20--git','688350PUydYJ','---','filterGitLog','3327741TAXpNK','call','2PWmsDU','36692lAXgDs','push','10kOGmcY','[file]\x20','join','\x0aUntracked\x20files:','\x20more\x20modifications','\x20\x20??\x20','default'];a0_0x2b6d=function(){return _0x3d025d;};return a0_0x2b6d();}var __createBinding=this&&this[a0_0x29f858(0x13b)]||(Object[a0_0x29f858(0x155)]?function(_0x35cb4a,_0x2e69d3,_0x1e5c97,_0x4bda25){const _0x5c054d=a0_0x29f858;if(_0x4bda25===undefined)_0x4bda25=_0x1e5c97;var _0x3d84c6=Object[_0x5c054d(0x149)](_0x2e69d3,_0x1e5c97);(!_0x3d84c6||(_0x5c054d(0x150)in _0x3d84c6?!_0x2e69d3[_0x5c054d(0x152)]:_0x3d84c6[_0x5c054d(0x158)]||_0x3d84c6['configurable']))&&(_0x3d84c6={'enumerable':!![],'get':function(){return _0x2e69d3[_0x1e5c97];}}),Object['defineProperty'](_0x35cb4a,_0x4bda25,_0x3d84c6);}:function(_0x5adafa,_0x88bca7,_0x393926,_0x5e3cbc){if(_0x5e3cbc===undefined)_0x5e3cbc=_0x393926;_0x5adafa[_0x5e3cbc]=_0x88bca7[_0x393926];}),__setModuleDefault=this&&this[a0_0x29f858(0x145)]||(Object[a0_0x29f858(0x155)]?function(_0x13aff9,_0x283a27){const _0xe84766=a0_0x29f858;Object[_0xe84766(0x13a)](_0x13aff9,_0xe84766(0x16c),{'enumerable':!![],'value':_0x283a27});}:function(_0x9bf667,_0x3ba7f7){const _0x4c3c71=a0_0x29f858;_0x9bf667[_0x4c3c71(0x16c)]=_0x3ba7f7;}),__importStar=this&&this[a0_0x29f858(0x14d)]||(function(){var _0x41aba7=function(_0x1ea726){const _0x59f0aa=a0_0x20b5;return _0x41aba7=Object[_0x59f0aa(0x15c)]||function(_0x3e8b0f){const _0x305f39=_0x59f0aa;var _0x598fc6=[];for(var _0x3c9690 in _0x3e8b0f)if(Object['prototype'][_0x305f39(0x16e)][_0x305f39(0x162)](_0x3e8b0f,_0x3c9690))_0x598fc6[_0x598fc6['length']]=_0x3c9690;return _0x598fc6;},_0x41aba7(_0x1ea726);};return function(_0x53e68c){const _0x28db34=a0_0x20b5;if(_0x53e68c&&_0x53e68c['__esModule'])return _0x53e68c;var _0x426469={};if(_0x53e68c!=null){for(var _0x31ee65=_0x41aba7(_0x53e68c),_0xe5b0ea=0x0;_0xe5b0ea<_0x31ee65['length'];_0xe5b0ea++)if(_0x31ee65[_0xe5b0ea]!==_0x28db34(0x16c))__createBinding(_0x426469,_0x53e68c,_0x31ee65[_0xe5b0ea]);}return __setModuleDefault(_0x426469,_0x53e68c),_0x426469;};}());Object[a0_0x29f858(0x13a)](exports,a0_0x29f858(0x152),{'value':!![]}),exports[a0_0x29f858(0x151)]=filterGitStatus,exports[a0_0x29f858(0x160)]=filterGitLog,exports[a0_0x29f858(0x16f)]=filterGitDiff;const path=__importStar(require('path'));function filterGitStatus(_0x3eab97){const _0x5e6736=a0_0x29f858,_0x47c74c=_0x3eab97[_0x5e6736(0x14b)]('\x0a')[_0x5e6736(0x14c)](_0x3ca5bb=>_0x3ca5bb[_0x5e6736(0x148)]())[_0x5e6736(0x146)](_0x5dcb6a=>_0x5dcb6a[_0x5e6736(0x13e)]>0x0);if(_0x47c74c['length']===0x0)return _0x5e6736(0x14a);const _0x14e9b8=[],_0x495b55=[],_0x50c189=[];for(const _0xf15c3f of _0x47c74c){if(_0xf15c3f['startsWith']('##')){const _0x36e2ec=_0xf15c3f[_0x5e6736(0x153)](/^##\s*/,'');_0x14e9b8[_0x5e6736(0x165)](_0x5e6736(0x157)+_0x36e2ec);}else _0xf15c3f[_0x5e6736(0x14f)]('??')?_0x495b55[_0x5e6736(0x165)](_0xf15c3f[_0x5e6736(0x13f)](0x3)[_0x5e6736(0x148)]()):_0x50c189['push'](_0xf15c3f);}_0x50c189[_0x5e6736(0x13e)]>0x0&&(_0x14e9b8[_0x5e6736(0x165)](_0x5e6736(0x147)),_0x14e9b8[_0x5e6736(0x165)](..._0x50c189['map'](_0x3792c1=>'\x20\x20'+_0x3792c1)));if(_0x495b55[_0x5e6736(0x13e)]>0x0){_0x14e9b8[_0x5e6736(0x165)](_0x5e6736(0x169));const _0x63ed35={},_0x31a02b=[];for(const _0x485d02 of _0x495b55){const _0x3c7d99=path[_0x5e6736(0x142)](_0x485d02);_0x3c7d99==='.'||_0x3c7d99===''?_0x31a02b['push'](_0x485d02):(!_0x63ed35[_0x3c7d99]&&(_0x63ed35[_0x3c7d99]=[]),_0x63ed35[_0x3c7d99][_0x5e6736(0x165)](path['basename'](_0x485d02)));}for(const [_0xcbf976,_0x472f2c]of Object[_0x5e6736(0x154)](_0x63ed35)){if(_0x472f2c['length']>0x5)_0x14e9b8[_0x5e6736(0x165)](_0x5e6736(0x16b)+_0xcbf976+'/\x20('+_0x472f2c['length']+'\x20untracked\x20files)');else for(const _0x5a6081 of _0x472f2c){_0x14e9b8['push'](_0x5e6736(0x16b)+path[_0x5e6736(0x168)](_0xcbf976,_0x5a6081));}}for(const _0x11c9b4 of _0x31a02b){_0x14e9b8[_0x5e6736(0x165)](_0x5e6736(0x16b)+_0x11c9b4);}}return _0x14e9b8[_0x5e6736(0x168)]('\x0a');}function filterGitLog(_0x180b6d){const _0x5d519b=a0_0x29f858,_0x528960=_0x180b6d['split']('---END---')[_0x5d519b(0x14c)](_0x58cc41=>_0x58cc41[_0x5d519b(0x148)]())['filter'](_0x1dab19=>_0x1dab19[_0x5d519b(0x13e)]>0x0);if(_0x528960['length']===0x0)return _0x180b6d;const _0x3b33c7=[];for(const _0x353ba9 of _0x528960){const _0x25fa05=_0x353ba9['split']('\x0a'),_0x4bd965=_0x25fa05[0x0]||'',_0x102f7d=_0x25fa05[_0x5d519b(0x15a)](0x1)[_0x5d519b(0x14c)](_0x3e0e7a=>_0x3e0e7a[_0x5d519b(0x148)]())[_0x5d519b(0x146)](_0x5a6678=>_0x5a6678['length']>0x0);_0x3b33c7[_0x5d519b(0x165)]('-\x20'+_0x4bd965),_0x102f7d[_0x5d519b(0x13e)]>0x0&&(_0x3b33c7[_0x5d519b(0x165)]('\x20\x20'+_0x102f7d[0x0]),_0x102f7d['length']>0x1&&_0x3b33c7[_0x5d519b(0x165)](_0x5d519b(0x140)+(_0x102f7d[_0x5d519b(0x13e)]-0x1)+'\x20lines\x20of\x20description)'));}return _0x3b33c7[_0x5d519b(0x168)]('\x0a');}function a0_0x20b5(_0x22272f,_0x31f340){const _0x2b6d2f=a0_0x2b6d();return a0_0x20b5=function(_0x20b5b9,_0x15ea53){_0x20b5b9=_0x20b5b9-0x139;let _0xc13b73=_0x2b6d2f[_0x20b5b9];return _0xc13b73;},a0_0x20b5(_0x22272f,_0x31f340);}function filterGitDiff(_0x156b9f){const _0x150918=a0_0x29f858,_0x48e2b0=_0x156b9f[_0x150918(0x14b)]('\x0a'),_0xda1f77=[];let _0x4d0652='',_0x11e3f4=0x0,_0x1e9fed=0x0,_0x41296d=[];const _0x3f2141=()=>{const _0x58d928=_0x150918;if(_0x4d0652&&(_0x11e3f4>0x0||_0x1e9fed>0x0)){_0xda1f77[_0x58d928(0x165)](_0x58d928(0x167)+_0x4d0652+_0x58d928(0x159)+_0x11e3f4+'\x20-'+_0x1e9fed+')');const _0x41cf76=0xa,_0x55a402=_0x41296d[_0x58d928(0x15a)](0x0,_0x41cf76);for(const _0x4b7f6d of _0x55a402){_0xda1f77[_0x58d928(0x165)]('\x20\x20'+_0x4b7f6d);}const _0xb1da48=_0x11e3f4+_0x1e9fed-_0x41cf76;_0xb1da48>0x0&&_0xda1f77['push'](_0x58d928(0x13d)+_0xb1da48+_0x58d928(0x16a));}_0x11e3f4=0x0,_0x1e9fed=0x0,_0x41296d=[];};for(const _0x30fd43 of _0x48e2b0){if(_0x30fd43[_0x150918(0x14f)](_0x150918(0x15d))){_0x3f2141();const _0x545bf7=_0x30fd43[_0x150918(0x15b)](/\sb\/(.+)$/);_0x4d0652=_0x545bf7?_0x545bf7[0x1]:_0x150918(0x141);}else{if(_0x30fd43['startsWith']('+')&&!_0x30fd43[_0x150918(0x14f)](_0x150918(0x139)))_0x11e3f4++,_0x41296d[_0x150918(0x165)](_0x30fd43);else _0x30fd43['startsWith']('-')&&!_0x30fd43[_0x150918(0x14f)](_0x150918(0x15f))&&(_0x1e9fed++,_0x41296d[_0x150918(0x165)](_0x30fd43));}}_0x3f2141();const _0x5141a2=_0xda1f77[_0x150918(0x168)]('\x0a');return _0x5141a2[_0x150918(0x13e)]>0x0?_0x5141a2:_0x150918(0x14e);}
|
package/filters/go.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x218c5b=a0_0x2366;(function(_0x276a66,_0x41acc6){const _0x169331=a0_0x2366,_0x117e9f=_0x276a66();while(!![]){try{const _0x231a47=-parseInt(_0x169331(0x9d))/0x1+-parseInt(_0x169331(0x9c))/0x2+parseInt(_0x169331(0x8f))/0x3+-parseInt(_0x169331(0x80))/0x4+parseInt(_0x169331(0x9e))/0x5+-parseInt(_0x169331(0x8e))/0x6*(parseInt(_0x169331(0x77))/0x7)+parseInt(_0x169331(0x87))/0x8;if(_0x231a47===_0x41acc6)break;else _0x117e9f['push'](_0x117e9f['shift']());}catch(_0x1b570c){_0x117e9f['push'](_0x117e9f['shift']());}}}(a0_0x4e1c,0x6b65f));Object[a0_0x218c5b(0x78)](exports,a0_0x218c5b(0x99),{'value':!![]}),exports[a0_0x218c5b(0x92)]=filterGoTest,exports[a0_0x218c5b(0x89)]=filterGoVet;function a0_0x4e1c(){const _0x2373f1=['7Xeoxab','defineProperty','\x20more\x20failures','\x20more\x20lines','\x20\x20...\x20+','slice','\x20failed,\x20','split','\x20\x20\x20\x20...\x20+','1496964OftqgA','startsWith','join','FAIL','\x20passed','Go\x20test:\x20','includes','19316840SBUJgk','\x20skipped','filterGoVet','PASS','lines','match','filter','3653466FAugNL','469341lRElBH','===\x20RUN','---\x20SKIP:','filterGoTest','Go\x20vet:\x20no\x20issues\x20found','Go\x20vet:\x20','Go\x20test:\x20all\x20tests\x20passed','no\x20test\x20files','\x20issues\x20found','push','__esModule','name','length','1529486VPcpYc','699795FSbhGq','1582705lQvwXQ','min','\x0aFailures:','trim'];a0_0x4e1c=function(){return _0x2373f1;};return a0_0x4e1c();}function a0_0x2366(_0x429d93,_0x2481c6){const _0x4e1c0b=a0_0x4e1c();return a0_0x2366=function(_0x2366dc,_0x4d8485){_0x2366dc=_0x2366dc-0x77;let _0x4f4d42=_0x4e1c0b[_0x2366dc];return _0x4f4d42;},a0_0x2366(_0x429d93,_0x2481c6);}function filterGoTest(_0x22c94d){const _0x12bfc1=a0_0x218c5b,_0x161008=_0x22c94d[_0x12bfc1(0x7e)]('\x0a');let _0x469825=0x0,_0x4f81cc=0x0,_0x5b9aba=0x0;const _0x3fa834=[],_0x3bd795=[];let _0x57c26b=null;for(const _0x211680 of _0x161008){const _0x194d5d=_0x211680[_0x12bfc1(0xa1)](),_0x3fe2c0=_0x194d5d[_0x12bfc1(0x8c)](/^ok\s+\S+\s+[\d.]+s/);if(_0x3fe2c0){_0x3bd795['push'](_0x194d5d);continue;}const _0xe90e95=_0x194d5d[_0x12bfc1(0x8c)](/^FAIL\s+\S+/);if(_0xe90e95){_0x3bd795['push'](_0x194d5d);continue;}const _0x2515e8=_0x194d5d['match'](/^--- PASS:/);if(_0x2515e8){_0x469825++;continue;}const _0x526b7c=_0x194d5d[_0x12bfc1(0x8c)](/^--- FAIL:\s+(\S+)/);if(_0x526b7c){if(_0x57c26b)_0x3fa834['push'](_0x57c26b);_0x57c26b={'name':_0x526b7c[0x1],'lines':[]},_0x4f81cc++;continue;}if(_0x194d5d[_0x12bfc1(0x81)](_0x12bfc1(0x91))){_0x5b9aba++;continue;}_0x57c26b&&_0x194d5d['length']>0x0&&!_0x194d5d['startsWith'](_0x12bfc1(0x90))&&_0x57c26b[_0x12bfc1(0x8b)][_0x12bfc1(0x98)](_0x211680),_0x194d5d['startsWith'](_0x12bfc1(0x90))&&(_0x57c26b&&(_0x3fa834[_0x12bfc1(0x98)](_0x57c26b),_0x57c26b=null));}if(_0x57c26b)_0x3fa834['push'](_0x57c26b);if(_0x469825===0x0&&_0x4f81cc===0x0&&_0x5b9aba===0x0){if(_0x22c94d[_0x12bfc1(0x86)](_0x12bfc1(0x8a))&&!_0x22c94d[_0x12bfc1(0x86)](_0x12bfc1(0x83)))return _0x12bfc1(0x95);if(_0x22c94d[_0x12bfc1(0x86)](_0x12bfc1(0x96)))return'Go\x20test:\x20no\x20test\x20files';return _0x22c94d;}if(_0x4f81cc===0x0){const _0x5ac21c=[_0x12bfc1(0x85)+_0x469825+_0x12bfc1(0x84)];if(_0x5b9aba>0x0)_0x5ac21c[_0x12bfc1(0x98)](_0x5b9aba+_0x12bfc1(0x88));return _0x5ac21c[_0x12bfc1(0x82)](',\x20');}const _0x27bc94=['Go\x20test:\x20'+_0x469825+'\x20passed,\x20'+_0x4f81cc+_0x12bfc1(0x7d)+_0x5b9aba+'\x20skipped'];if(_0x3fa834['length']>0x0){_0x27bc94[_0x12bfc1(0x98)](_0x12bfc1(0xa0));const _0x54deb9=0x3;for(let _0x4fb270=0x0;_0x4fb270<Math[_0x12bfc1(0x9f)](_0x3fa834[_0x12bfc1(0x9b)],_0x54deb9);_0x4fb270++){const _0x3ef5eb=_0x3fa834[_0x4fb270];_0x27bc94['push']('\x20\x20'+(_0x4fb270+0x1)+'.\x20'+_0x3ef5eb[_0x12bfc1(0x9a)]);for(const _0x418e9c of _0x3ef5eb[_0x12bfc1(0x8b)]['slice'](0x0,0x5)){_0x27bc94[_0x12bfc1(0x98)]('\x20\x20\x20\x20'+_0x418e9c[_0x12bfc1(0xa1)]());}_0x3ef5eb[_0x12bfc1(0x8b)][_0x12bfc1(0x9b)]>0x5&&_0x27bc94[_0x12bfc1(0x98)](_0x12bfc1(0x7f)+(_0x3ef5eb[_0x12bfc1(0x8b)][_0x12bfc1(0x9b)]-0x5)+_0x12bfc1(0x7a));}_0x3fa834[_0x12bfc1(0x9b)]>_0x54deb9&&_0x27bc94['push'](_0x12bfc1(0x7b)+(_0x3fa834['length']-_0x54deb9)+_0x12bfc1(0x79));}return _0x27bc94[_0x12bfc1(0x82)]('\x0a');}function filterGoVet(_0xcc4a27){const _0x266c38=a0_0x218c5b,_0x1b4a7b=_0xcc4a27[_0x266c38(0x7e)]('\x0a')[_0x266c38(0x8d)](_0xea50a4=>_0xea50a4[_0x266c38(0xa1)]()[_0x266c38(0x9b)]>0x0);if(_0x1b4a7b['length']===0x0)return _0x266c38(0x93);if(_0x1b4a7b['length']<=0x14)return _0xcc4a27['trim']();const _0x2b585e=[_0x266c38(0x94)+_0x1b4a7b['length']+_0x266c38(0x97)];return _0x2b585e[_0x266c38(0x98)](..._0x1b4a7b[_0x266c38(0x7c)](0x0,0xa)),_0x1b4a7b[_0x266c38(0x9b)]>0xa&&_0x2b585e['push']('...\x20+'+(_0x1b4a7b[_0x266c38(0x9b)]-0xa)+'\x20more\x20issues'),_0x2b585e[_0x266c38(0x82)]('\x0a');}
|
package/filters/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';function a0_0x52d7(_0x5118b3,_0xc713b1){const _0x364e98=a0_0x364e();return a0_0x52d7=function(_0x52d7d7,_0x51fbd1){_0x52d7d7=_0x52d7d7-0x116;let _0x4db9e7=_0x364e98[_0x52d7d7];return _0x4db9e7;},a0_0x52d7(_0x5118b3,_0xc713b1);}const a0_0x19735a=a0_0x52d7;function a0_0x364e(){const _0x28fce4=['./go','\x20tree','trim\x20ls','vitest','trim\x20grep','npm\x20test','yadm\x20diff','includes','trim\x20glab','1159659CTqBDH','5139phYedk','\x20ls\x20','compressOutput','__esModule','test','./rust','../redactor','trim\x20docker','4438896VBgZWU','pattern','startsWith','npm\x20run\x20test','collapseDuplicates','filterJestVitest','jest','redactor','trim\x20pip','toLowerCase','./devops','filterNpmInstall','trim','trim\x20git','yarn\x20install','filterGitLog','960920ktKXCg','get','3017968KhGgAj','trim\x20npm','filterRuff','trim\x20npx','pnpm\x20install','filterDockerImages','./generic','filterGoVet','filterLs','npm\x20i','trim\x20ruff','ruff\x20check','2714705tSdVZc','length','filterCargoBuild','filterKubectl','filterPipInstall','yarn\x20test','cargo\x20test','filterGitDiff','118ZilZPO','defineProperty','trim\x20gh','16lvFnlM','10534905RnveRj','endsWith','match','kubectl','trim\x20cargo','./shell','trim\x20find','./git','filterCat','stripAnsi','cargo\x20build','filterGrep','pnpm\x20test','cargo\x20clippy','rewriteCommand','git\x20show','trim\x20pnpm','filterGoTest','\x20tree\x20','git\x20diff','filterGitStatus','\x20ls'];a0_0x364e=function(){return _0x28fce4;};return a0_0x364e();}(function(_0x13929f,_0x3f74da){const _0x18ca43=a0_0x52d7,_0x17b384=_0x13929f();while(!![]){try{const _0x15a146=-parseInt(_0x18ca43(0x13b))/0x1*(parseInt(_0x18ca43(0x117))/0x2)+-parseInt(_0x18ca43(0x13a))/0x3+parseInt(_0x18ca43(0x11a))/0x4*(-parseInt(_0x18ca43(0x153))/0x5)+parseInt(_0x18ca43(0x143))/0x6+-parseInt(_0x18ca43(0x161))/0x7+parseInt(_0x18ca43(0x155))/0x8+parseInt(_0x18ca43(0x11b))/0x9;if(_0x15a146===_0x3f74da)break;else _0x17b384['push'](_0x17b384['shift']());}catch(_0x5144d9){_0x17b384['push'](_0x17b384['shift']());}}}(a0_0x364e,0x6bbd6));Object[a0_0x19735a(0x118)](exports,a0_0x19735a(0x13e),{'value':!![]}),exports[a0_0x19735a(0x13d)]=compressOutput,exports[a0_0x19735a(0x129)]=rewriteCommand;const generic_1=require(a0_0x19735a(0x15b)),git_1=require(a0_0x19735a(0x122)),python_1=require('./python'),js_1=require('./js'),shell_1=require(a0_0x19735a(0x120)),rust_1=require(a0_0x19735a(0x140)),go_1=require(a0_0x19735a(0x131)),devops_1=require(a0_0x19735a(0x14d)),redactor_1=require(a0_0x19735a(0x141));function compressOutput(_0x4ad823,_0x33a9dd,_0x1263fc,_0x327f93=!![]){const _0x14059d=a0_0x19735a,_0x19e255=_0x4ad823[_0x14059d(0x14f)]();let _0x5bdb30=_0x33a9dd;_0x1263fc[_0x14059d(0x14f)]()[_0x14059d(0x162)]>0x0&&(_0x5bdb30=_0x33a9dd+'\x0a'+_0x1263fc);let _0x35cbd3=(0x0,generic_1[_0x14059d(0x124)])(_0x5bdb30);_0x327f93&&(_0x35cbd3=redactor_1[_0x14059d(0x14a)]['redact'](_0x35cbd3));const _0x1630e1=_0x19e255[_0x14059d(0x14c)]();try{if(_0x1630e1[_0x14059d(0x138)]('git\x20status')||_0x1630e1[_0x14059d(0x138)]('yadm\x20status'))return(0x0,git_1[_0x14059d(0x12f)])(_0x35cbd3);if(_0x1630e1[_0x14059d(0x138)]('git\x20log')||_0x1630e1[_0x14059d(0x138)]('yadm\x20log'))return(0x0,git_1[_0x14059d(0x152)])(_0x35cbd3);if(_0x1630e1['includes'](_0x14059d(0x12e))||_0x1630e1['includes'](_0x14059d(0x12a))||_0x1630e1[_0x14059d(0x138)](_0x14059d(0x137)))return(0x0,git_1[_0x14059d(0x116)])(_0x35cbd3);if(_0x1630e1[_0x14059d(0x138)]('pytest')||_0x1630e1[_0x14059d(0x11d)](/python3?\s+-m\s+pytest/))return(0x0,python_1['filterPytest'])(_0x35cbd3);if(_0x1630e1[_0x14059d(0x138)]('pip\x20install')||_0x1630e1[_0x14059d(0x138)]('pip3\x20install'))return(0x0,python_1[_0x14059d(0x165)])(_0x35cbd3);if(_0x1630e1[_0x14059d(0x138)](_0x14059d(0x160))||_0x1630e1[_0x14059d(0x138)]('ruff\x20'))return(0x0,devops_1[_0x14059d(0x157)])(_0x35cbd3);if(_0x1630e1[_0x14059d(0x138)]('npm\x20install')||_0x1630e1['includes']('npm\x20i\x20')||_0x1630e1[_0x14059d(0x11c)](_0x14059d(0x15e))||_0x1630e1['includes'](_0x14059d(0x159))||_0x1630e1[_0x14059d(0x138)](_0x14059d(0x151)))return(0x0,js_1[_0x14059d(0x14e)])(_0x35cbd3);if(_0x1630e1[_0x14059d(0x138)](_0x14059d(0x149))||_0x1630e1[_0x14059d(0x138)](_0x14059d(0x134)))return(0x0,js_1[_0x14059d(0x148)])(_0x35cbd3);if(_0x1630e1['includes'](_0x14059d(0x136))||_0x1630e1[_0x14059d(0x138)](_0x14059d(0x127))||_0x1630e1[_0x14059d(0x138)](_0x14059d(0x166))||_0x1630e1[_0x14059d(0x138)](_0x14059d(0x146)))return(0x0,js_1[_0x14059d(0x148)])(_0x35cbd3);if(_0x1630e1[_0x14059d(0x138)](_0x14059d(0x167)))return(0x0,rust_1['filterCargoTest'])(_0x35cbd3);if(_0x1630e1[_0x14059d(0x138)](_0x14059d(0x125))||_0x1630e1[_0x14059d(0x138)]('cargo\x20check')||_0x1630e1[_0x14059d(0x138)](_0x14059d(0x128)))return(0x0,rust_1[_0x14059d(0x163)])(_0x35cbd3);if(_0x1630e1[_0x14059d(0x138)]('go\x20test'))return(0x0,go_1[_0x14059d(0x12c)])(_0x35cbd3);if(_0x1630e1[_0x14059d(0x138)]('go\x20vet'))return(0x0,go_1[_0x14059d(0x15c)])(_0x35cbd3);if(_0x1630e1[_0x14059d(0x11d)](/docker\s+ps/))return(0x0,devops_1['filterDockerPs'])(_0x35cbd3);if(_0x1630e1[_0x14059d(0x11d)](/docker\s+images/))return(0x0,devops_1[_0x14059d(0x15a)])(_0x35cbd3);if(_0x1630e1[_0x14059d(0x11d)](/docker\s+logs/))return(0x0,devops_1['filterDockerLogs'])(_0x35cbd3);if(_0x1630e1[_0x14059d(0x138)](_0x14059d(0x11e))){const _0x4c6aab=_0x1630e1[_0x14059d(0x11d)](/kubectl\s+(get|logs|describe|apply)/),_0x501c6b=_0x4c6aab?_0x4c6aab[0x1]:_0x14059d(0x154);return(0x0,devops_1[_0x14059d(0x164)])(_0x35cbd3,_0x501c6b);}if(_0x1630e1[_0x14059d(0x11d)](/^(ls|dir)(\s|$)/)||_0x1630e1['includes'](_0x14059d(0x13c))||_0x1630e1[_0x14059d(0x11c)](_0x14059d(0x130)))return(0x0,shell_1[_0x14059d(0x15d)])(_0x35cbd3);if(_0x1630e1['match'](/^tree(\s|$)/)||_0x1630e1['includes'](_0x14059d(0x12d))||_0x1630e1[_0x14059d(0x11c)](_0x14059d(0x132)))return(0x0,shell_1['filterTree'])(_0x35cbd3);if(_0x1630e1[_0x14059d(0x11d)](/^(cat|head|tail|read|bat)(\s|$)/))return(0x0,shell_1[_0x14059d(0x123)])(_0x35cbd3);if(_0x1630e1[_0x14059d(0x11d)](/^(grep|rg|ripgrep)(\s|$)/))return(0x0,shell_1[_0x14059d(0x126)])(_0x35cbd3);}catch(_0x3b970c){}return _0x35cbd3=(0x0,generic_1[_0x14059d(0x147)])(_0x35cbd3),_0x35cbd3=(0x0,generic_1['softTruncate'])(_0x35cbd3,0x4e20),_0x35cbd3;}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_0x19735a(0x150)},{'pattern':/^gh\s+(pr|issue|run|repo|api|release)/,'prefix':a0_0x19735a(0x119)},{'pattern':/^glab\s+(mr|issue|ci|pipeline|api|release)/,'prefix':a0_0x19735a(0x139)},{'pattern':/^cargo\s+(build|test|clippy|check|fmt|install)/,'prefix':a0_0x19735a(0x11f)},{'pattern':/^pnpm\s+(exec|i|install|list|ls|outdated|run|run-script)/,'prefix':a0_0x19735a(0x12b)},{'pattern':/^npm\s+(exec|run|run-script|rum|urn|x|test)(\s|$)/,'prefix':a0_0x19735a(0x156)},{'pattern':/^npx\s+/,'prefix':a0_0x19735a(0x158)},{'pattern':/^(cat|head|tail)\s+/,'prefix':'trim\x20read'},{'pattern':/^(rg|grep)\s+/,'prefix':a0_0x19735a(0x135)},{'pattern':/^ls(\s|$)/,'prefix':a0_0x19735a(0x133)},{'pattern':/^tree(\s|$)/,'prefix':'trim\x20tree'},{'pattern':/^find\s+/,'prefix':a0_0x19735a(0x121)},{'pattern':/^docker\s+(ps|images|logs|run|exec|build|compose)/,'prefix':a0_0x19735a(0x142)},{'pattern':/^kubectl\s+(get|logs|describe|apply)/,'prefix':'trim\x20kubectl'},{'pattern':/^(python3?\s+-m\s+)?pytest(\s|$)/,'prefix':'trim\x20pytest'},{'pattern':/^ruff\s+(check|format)/,'prefix':a0_0x19735a(0x15f)},{'pattern':/^(pip3?|uv\s+pip)\s+(list|outdated|install|show)/,'prefix':a0_0x19735a(0x14b)},{'pattern':/^go\s+(test|build|vet)/,'prefix':'trim\x20go'}];function rewriteCommand(_0x5a6a18){const _0x439e8f=a0_0x19735a,_0x3188aa=_0x5a6a18[_0x439e8f(0x14f)]();if(_0x3188aa[_0x439e8f(0x145)]('trim\x20'))return _0x3188aa;for(const _0x27c23f of REWRITE_RULES){if(_0x27c23f[_0x439e8f(0x144)][_0x439e8f(0x13f)](_0x3188aa))return'trim\x20'+_0x3188aa;}return _0x3188aa;}
|