trimprompt 1.0.13 → 1.0.15
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 +1 -1
- 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';function
|
|
1
|
+
'use strict';const a0_0x4889d4=a0_0x274f;(function(_0x39e473,_0x2b64eb){const _0x519eb3=a0_0x274f,_0x3d195a=_0x39e473();while(!![]){try{const _0x53259b=parseInt(_0x519eb3(0x1e4))/0x1+parseInt(_0x519eb3(0x213))/0x2+-parseInt(_0x519eb3(0x1d2))/0x3*(parseInt(_0x519eb3(0x1da))/0x4)+-parseInt(_0x519eb3(0x1fe))/0x5*(-parseInt(_0x519eb3(0x206))/0x6)+parseInt(_0x519eb3(0x1f8))/0x7*(parseInt(_0x519eb3(0x20d))/0x8)+parseInt(_0x519eb3(0x201))/0x9*(parseInt(_0x519eb3(0x1ef))/0xa)+-parseInt(_0x519eb3(0x1d7))/0xb*(parseInt(_0x519eb3(0x1d6))/0xc);if(_0x53259b===_0x2b64eb)break;else _0x3d195a['push'](_0x3d195a['shift']());}catch(_0x43e421){_0x3d195a['push'](_0x3d195a['shift']());}}}(a0_0x2d57,0x6be93));function a0_0x2d57(){const _0x51dd0b=['go-vet','endsWith','docker-ps','__importStar','git\x20show','keys','198Usqlys','join','__esModule','round','22463556uwUYnn','11wETNAS','hex','\x20ls','32228IoIsrs','__createBinding','hasOwnProperty','git\x20log','docker-images','get','timestamp','update','create','homedir','854976EDYgmh','\x20ls\x20','file','trim','sort','writable','call','\x20lines','hash','dedup','mkdirSync','1398880upnbpe','length','\x20entries','cwd','utf8','yadm\x20show','cache.json','git-show','slice','829108NpHRyJ','ruff\x20check','existsSync','tree','match','.trimprompt','44795yKuLsH','default','md5','18tWrAxF','toLowerCase','yadm\x20log','[cached\x20—\x20unchanged\x20since\x20','summary','546QXtVKr','__setModuleDefault','includes','kubectl\x20get','\x20tree\x20','go\x20vet','createHash','8lUoobh','writeFileSync','s\x20ago,\x20','getOwnPropertyDescriptor','\x20tree','\x20lines,\x20','1554526VCPKnQ','git-status','ruff','stringify','crypto','defineProperty','split'];a0_0x2d57=function(){return _0x51dd0b;};return a0_0x2d57();}var __createBinding=this&&this[a0_0x4889d4(0x1db)]||(Object['create']?function(_0x1d79de,_0x5d7d1c,_0x1e571b,_0x59baa4){const _0x329e85=a0_0x4889d4;if(_0x59baa4===undefined)_0x59baa4=_0x1e571b;var _0x37bb65=Object[_0x329e85(0x210)](_0x5d7d1c,_0x1e571b);(!_0x37bb65||(_0x329e85(0x1df)in _0x37bb65?!_0x5d7d1c[_0x329e85(0x1d4)]:_0x37bb65[_0x329e85(0x1e9)]||_0x37bb65['configurable']))&&(_0x37bb65={'enumerable':!![],'get':function(){return _0x5d7d1c[_0x1e571b];}}),Object['defineProperty'](_0x1d79de,_0x59baa4,_0x37bb65);}:function(_0x77ca4b,_0x207ef8,_0x1d23ac,_0x196b7a){if(_0x196b7a===undefined)_0x196b7a=_0x1d23ac;_0x77ca4b[_0x196b7a]=_0x207ef8[_0x1d23ac];}),__setModuleDefault=this&&this[a0_0x4889d4(0x207)]||(Object[a0_0x4889d4(0x1e2)]?function(_0xf5feaa,_0x25fa8a){const _0x5f5d22=a0_0x4889d4;Object[_0x5f5d22(0x1ca)](_0xf5feaa,'default',{'enumerable':!![],'value':_0x25fa8a});}:function(_0x257211,_0x2b6cad){const _0x4fb9f0=a0_0x4889d4;_0x257211[_0x4fb9f0(0x1ff)]=_0x2b6cad;}),__importStar=this&&this[a0_0x4889d4(0x1cf)]||(function(){var _0xafbc89=function(_0x1c6b60){return _0xafbc89=Object['getOwnPropertyNames']||function(_0x53e331){const _0x3549eb=a0_0x274f;var _0xb8f6f=[];for(var _0x16ebf6 in _0x53e331)if(Object['prototype'][_0x3549eb(0x1dc)][_0x3549eb(0x1ea)](_0x53e331,_0x16ebf6))_0xb8f6f[_0xb8f6f[_0x3549eb(0x1f0)]]=_0x16ebf6;return _0xb8f6f;},_0xafbc89(_0x1c6b60);};return function(_0x25aeef){const _0x22baff=a0_0x274f;if(_0x25aeef&&_0x25aeef[_0x22baff(0x1d4)])return _0x25aeef;var _0x7a20cb={};if(_0x25aeef!=null){for(var _0x149652=_0xafbc89(_0x25aeef),_0x1f658f=0x0;_0x1f658f<_0x149652[_0x22baff(0x1f0)];_0x1f658f++)if(_0x149652[_0x1f658f]!==_0x22baff(0x1ff))__createBinding(_0x7a20cb,_0x25aeef,_0x149652[_0x1f658f]);}return __setModuleDefault(_0x7a20cb,_0x25aeef),_0x7a20cb;};}());Object[a0_0x4889d4(0x1ca)](exports,a0_0x4889d4(0x1d4),{'value':!![]}),exports[a0_0x4889d4(0x1ed)]=dedup;const fs=__importStar(require('fs')),path=__importStar(require('path')),os=__importStar(require('os')),crypto=__importStar(require(a0_0x4889d4(0x1c9))),CACHE_DIR=path['join'](os[a0_0x4889d4(0x1e3)](),a0_0x4889d4(0x1fd)),CACHE_FILE=path[a0_0x4889d4(0x1d3)](CACHE_DIR,a0_0x4889d4(0x1f5)),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(_0x2ef828){const _0x56a06e=a0_0x4889d4,_0x13fbe0=_0x2ef828[_0x56a06e(0x1e7)]()[_0x56a06e(0x202)]();if(_0x13fbe0[_0x56a06e(0x1fc)](/^(cat|head|tail|read|bat)\s/))return _0x56a06e(0x1e6);if(_0x13fbe0['includes']('git\x20status')||_0x13fbe0[_0x56a06e(0x208)]('yadm\x20status'))return _0x56a06e(0x214);if(_0x13fbe0[_0x56a06e(0x208)](_0x56a06e(0x1dd))||_0x13fbe0[_0x56a06e(0x208)](_0x56a06e(0x203)))return'git-log';if(_0x13fbe0['includes'](_0x56a06e(0x1d0))||_0x13fbe0[_0x56a06e(0x208)](_0x56a06e(0x1f4)))return _0x56a06e(0x1f6);if(_0x13fbe0['match'](/^(ls|dir)(\s|$)/)||_0x13fbe0[_0x56a06e(0x208)](_0x56a06e(0x1e5))||_0x13fbe0[_0x56a06e(0x1cd)](_0x56a06e(0x1d9)))return'ls';if(_0x13fbe0[_0x56a06e(0x1fc)](/^tree(\s|$)/)||_0x13fbe0[_0x56a06e(0x208)](_0x56a06e(0x20a))||_0x13fbe0[_0x56a06e(0x1cd)](_0x56a06e(0x211)))return _0x56a06e(0x1fb);if(_0x13fbe0[_0x56a06e(0x1fc)](/docker\s+ps/))return _0x56a06e(0x1ce);if(_0x13fbe0['match'](/docker\s+images/))return _0x56a06e(0x1de);if(_0x13fbe0[_0x56a06e(0x208)](_0x56a06e(0x209))||_0x13fbe0[_0x56a06e(0x208)]('kubectl\x20describe'))return'kubectl';if(_0x13fbe0[_0x56a06e(0x208)](_0x56a06e(0x1f9))||_0x13fbe0[_0x56a06e(0x208)]('ruff\x20'))return _0x56a06e(0x1c7);if(_0x13fbe0[_0x56a06e(0x208)](_0x56a06e(0x20b)))return _0x56a06e(0x1cc);return'';}function md5(_0x494f9b){const _0x59681a=a0_0x4889d4;return crypto[_0x59681a(0x20c)](_0x59681a(0x200))[_0x59681a(0x1e1)](_0x494f9b)['digest'](_0x59681a(0x1d8));}function a0_0x274f(_0x850684,_0x4f9f07){_0x850684=_0x850684-0x1c7;const _0x2d5723=a0_0x2d57();let _0x274fd7=_0x2d5723[_0x850684];return _0x274fd7;}function loadStore(){const _0x4b6f7f=a0_0x4889d4;try{if(fs[_0x4b6f7f(0x1fa)](CACHE_FILE))return JSON['parse'](fs['readFileSync'](CACHE_FILE,_0x4b6f7f(0x1f3)));}catch{}return{};}function saveStore(_0x2d6bd4){const _0x2a9ffc=a0_0x4889d4;try{if(!fs[_0x2a9ffc(0x1fa)](CACHE_DIR))fs[_0x2a9ffc(0x1ee)](CACHE_DIR,{'recursive':!![]});const _0x87a43c=Object[_0x2a9ffc(0x1d1)](_0x2d6bd4);if(_0x87a43c[_0x2a9ffc(0x1f0)]>MAX_ENTRIES){const _0x3b6226=_0x87a43c[_0x2a9ffc(0x1e8)]((_0x5097ff,_0x21462f)=>_0x2d6bd4[_0x5097ff][_0x2a9ffc(0x1e0)]-_0x2d6bd4[_0x21462f][_0x2a9ffc(0x1e0)]);for(const _0x5f52dc of _0x3b6226[_0x2a9ffc(0x1f7)](0x0,_0x87a43c[_0x2a9ffc(0x1f0)]-MAX_ENTRIES)){delete _0x2d6bd4[_0x5f52dc];}}fs[_0x2a9ffc(0x20e)](CACHE_FILE,JSON[_0x2a9ffc(0x1c8)](_0x2d6bd4),_0x2a9ffc(0x1f3));}catch{}}function buildSummary(_0x1300a7,_0x5e9bc6){const _0x32ac2a=a0_0x4889d4,_0x1296f5=_0x1300a7[_0x32ac2a(0x1cb)]('\x0a')[_0x32ac2a(0x1f0)],_0x3e1a80=_0x1300a7[_0x32ac2a(0x1f0)];if(_0x5e9bc6==='file')return _0x1296f5+_0x32ac2a(0x212)+_0x3e1a80+'\x20chars';if(_0x5e9bc6==='git-status')return _0x1296f5+_0x32ac2a(0x1eb);if(_0x5e9bc6==='git-log')return _0x1296f5+_0x32ac2a(0x1f1);if(_0x5e9bc6['startsWith']('docker'))return _0x1296f5+_0x32ac2a(0x1eb);return _0x1296f5+'\x20lines,\x20'+_0x3e1a80+'\x20chars';}function dedup(_0x62722c,_0xd67bc3){const _0x23e562=a0_0x4889d4;try{const _0x306d4d=classifyCommand(_0x62722c);if(!_0x306d4d)return null;const _0x7848c3=TTL_SECONDS[_0x306d4d];if(!_0x7848c3)return null;const _0x1f0a5e=process[_0x23e562(0x1f2)](),_0x34b199=md5(_0x1f0a5e+'::'+_0x62722c[_0x23e562(0x1e7)]()),_0x12c53c=md5(_0xd67bc3),_0x214c28=Date['now'](),_0x659d02=loadStore(),_0x452c8c=_0x659d02[_0x34b199];if(_0x452c8c&&_0x452c8c[_0x23e562(0x1ec)]===_0x12c53c&&_0x214c28-_0x452c8c[_0x23e562(0x1e0)]<_0x7848c3*0x3e8){const _0x53a4ee=Math[_0x23e562(0x1d5)]((_0x214c28-_0x452c8c[_0x23e562(0x1e0)])/0x3e8);return _0x23e562(0x204)+_0x53a4ee+_0x23e562(0x20f)+_0x452c8c[_0x23e562(0x205)]+']';}_0x659d02[_0x34b199]={'hash':_0x12c53c,'summary':buildSummary(_0xd67bc3,_0x306d4d),'timestamp':_0x214c28,'chars':_0xd67bc3[_0x23e562(0x1f0)]},saveStore(_0x659d02);}catch{}return null;}
|
package/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
'use strict';const a0_0x480e93=a0_0x347b;(function(_0x5547a6,_0x5e2755){const _0x30b400=a0_0x347b,_0x527d6c=_0x5547a6();while(!![]){try{const _0x229a37=-parseInt(_0x30b400(0x21c))/0x1*(-parseInt(_0x30b400(0x1ff))/0x2)+-parseInt(_0x30b400(0x1d9))/0x3*(parseInt(_0x30b400(0x1d0))/0x4)+-parseInt(_0x30b400(0x1d4))/0x5*(parseInt(_0x30b400(0x1b2))/0x6)+-parseInt(_0x30b400(0x1c5))/0x7*(-parseInt(_0x30b400(0x1df))/0x8)+parseInt(_0x30b400(0x1b6))/0x9*(-parseInt(_0x30b400(0x1a7))/0xa)+parseInt(_0x30b400(0x1c4))/0xb*(parseInt(_0x30b400(0x22a))/0xc)+parseInt(_0x30b400(0x1b7))/0xd;if(_0x229a37===_0x5e2755)break;else _0x527d6c['push'](_0x527d6c['shift']());}catch(_0x1c5ee9){_0x527d6c['push'](_0x527d6c['shift']());}}}(a0_0x3db5,0x91275));var __createBinding=this&&this[a0_0x480e93(0x1c3)]||(Object['create']?function(_0x1b55f0,_0x314676,_0x5cce26,_0x23f729){const _0xe57f3d=a0_0x480e93;if(_0x23f729===undefined)_0x23f729=_0x5cce26;var _0x5ddf35=Object[_0xe57f3d(0x1f6)](_0x314676,_0x5cce26);(!_0x5ddf35||(_0xe57f3d(0x1e0)in _0x5ddf35?!_0x314676['__esModule']:_0x5ddf35['writable']||_0x5ddf35[_0xe57f3d(0x220)]))&&(_0x5ddf35={'enumerable':!![],'get':function(){return _0x314676[_0x5cce26];}}),Object['defineProperty'](_0x1b55f0,_0x23f729,_0x5ddf35);}:function(_0x4279e8,_0x19bb28,_0x52c9c4,_0x2f196a){if(_0x2f196a===undefined)_0x2f196a=_0x52c9c4;_0x4279e8[_0x2f196a]=_0x19bb28[_0x52c9c4];}),__setModuleDefault=this&&this[a0_0x480e93(0x236)]||(Object[a0_0x480e93(0x21a)]?function(_0x287b6f,_0x12d6ac){const _0x573ee8=a0_0x480e93;Object['defineProperty'](_0x287b6f,_0x573ee8(0x1c1),{'enumerable':!![],'value':_0x12d6ac});}:function(_0x587144,_0x3b2ba1){_0x587144['default']=_0x3b2ba1;}),__importStar=this&&this[a0_0x480e93(0x1e8)]||(function(){var _0x342f94=function(_0x2e5103){return _0x342f94=Object['getOwnPropertyNames']||function(_0xd81a82){const _0x4f8558=a0_0x347b;var _0x15a77f=[];for(var _0x4c32fd in _0xd81a82)if(Object[_0x4f8558(0x22e)][_0x4f8558(0x1cd)][_0x4f8558(0x1e9)](_0xd81a82,_0x4c32fd))_0x15a77f[_0x15a77f[_0x4f8558(0x1cb)]]=_0x4c32fd;return _0x15a77f;},_0x342f94(_0x2e5103);};return function(_0x12dc7e){const _0x2e9444=a0_0x347b;if(_0x12dc7e&&_0x12dc7e[_0x2e9444(0x1bf)])return _0x12dc7e;var _0xb4f0e2={};if(_0x12dc7e!=null){for(var _0x9f3234=_0x342f94(_0x12dc7e),_0x154d5f=0x0;_0x154d5f<_0x9f3234[_0x2e9444(0x1cb)];_0x154d5f++)if(_0x9f3234[_0x154d5f]!==_0x2e9444(0x1c1))__createBinding(_0xb4f0e2,_0x12dc7e,_0x9f3234[_0x154d5f]);}return __setModuleDefault(_0xb4f0e2,_0x12dc7e),_0xb4f0e2;};}());Object[a0_0x480e93(0x1f9)](exports,'__esModule',{'value':!![]});const commander_1=require(a0_0x480e93(0x1dc)),executor_1=require(a0_0x480e93(0x1ae)),filters_1=require(a0_0x480e93(0x234)),tracker_1=require(a0_0x480e93(0x1f4)),cache_1=require(a0_0x480e93(0x1e2)),shims_1=require('./shims'),dashboard_1=require(a0_0x480e93(0x1b4)),program=new commander_1[(a0_0x480e93(0x239))]();function isDisabled(){return process.env.TRIMPROMPT_DISABLED==='1';}function a0_0x3db5(){const _0x2f1074=['error','uninstallShims','\x20USD','model','./tracker','config\x20parameter\x20name','getOwnPropertyDescriptor','parse','some','defineProperty','<server-command>','yarn','Estimated\x20Cost:\x20\x20\x20\x20$','toLocaleString','toLowerCase','2043290GWozZX','startsWith','--max-count','pnpm','rewriteCommand','--version','push','4000','-p,\x20--port\x20<number>','@modelcontextprotocol/','help','command','--pretty','mcp-proxy','Compressed:\x20\x20\x20\x20\x20\x20\x20\x20','set','log','exit','getConfig','[TrimPrompt]\x20Autodetected\x20MCP\x20server\x20execution.\x20Activating\x20real-time\x20JSON-RPC\x20proxy...','--format','modelcontextprotocol','write','savings_percentage','./mcp','mcp-server','argv','create','get\x20or\x20set','1jbxaOX','dashboard','Proxy\x20wrapper\x20for\x20Model\x20Context\x20Protocol\x20(MCP)\x20servers\x20to\x20compact\x20tool\x20outputs','Actual\x20Cost:\x20\x20\x20\x20\x20\x20\x20$','configurable','Show\x20token\x20and\x20cost\x20savings\x20summary','join','startDashboard','trim','shims','args','option','--min-parents','includes','24DLAYIx','argument','getStatsSummary','yadm','prototype','\x20=\x20','value\x20to\x20set','install','mcp','logExecution','./filters','[TrimPrompt]\x20Fatal\x20Proxy\x20Error:\x20','__setModuleDefault','redaction_enabled','-50','Command','slice','description','server-mcp','node','Config\x20set\x20','resolve','--porcelain','platform','status','=============================================','Manage\x20local\x20configuration\x20parameters','tracker','Install\x20or\x20uninstall\x20system\x20command\x20shims','1750mfhIuv','Error:\x20Value\x20required\x20for\x20set\x20action','--oneline','Raw\x20Tokens:\x20\x20\x20\x20\x20\x20\x20\x20','total_tokens_saved','toFixed','action','./executor','-10','npx','Reduction\x20Rate:\x20\x20\x20\x20','258408AZTmLO','port','./dashboard','1.0.0','39645quXeyo','13897000zLnqTY','raw_cost_usd','alias','bun','-bs','Money\x20Saved:\x20\x20\x20\x20\x20\x20\x20$','executeCommand','Error:\x20Action\x20must\x20be\x20get\x20or\x20set','__esModule','version','default','Command\x20to\x20launch\x20the\x20target\x20MCP\x20server','__createBinding','2744324qwmxza','175ABFGak','message','stdout','dedup','Error:\x20Action\x20must\x20be\x20install\x20or\x20uninstall','\x20(after\x20Shave)','length','test','hasOwnProperty','--pretty=format:%h\x20%s\x20(%ar)\x20(%an)%n%b%n---END---','compressed_cost_usd','8kNXeUH','Select\x20pricing\x20model\x20(e.g.\x20claude-3-5-sonnet,\x20gpt-4o)','Port\x20to\x20run\x20the\x20dashboard\x20on','then','120Gllbdd','total_raw_tokens','server','stderr','<commandLine>','799923ipztjv','git','compressOutput','commander','--no-merges','Arguments\x20for\x20the\x20target\x20MCP\x20server','109672KoTzkw','get','install\x20or\x20uninstall','./cache','TrimPrompt.ai\x20-\x20Reduce\x20LLM\x20token\x20consumption\x20by\x2060-90%','npm','=============================================\x0a','stats','config','__importStar','call','Command\x20line\x20to\x20evaluate','rewrite','proxy','<action>','exitCode','--branch'];a0_0x3db5=function(){return _0x2f1074;};return a0_0x3db5();}function a0_0x347b(_0xd5c895,_0x1798b9){_0xd5c895=_0xd5c895-0x1a1;const _0x3db5be=a0_0x3db5();let _0x347b42=_0x3db5be[_0xd5c895];return _0x347b42;}function adjustCommandArgs(_0xe74138,_0x3794d1){const _0x3ef8ef=a0_0x480e93,_0x21adda=_0xe74138[_0x3ef8ef(0x1fe)]();if(_0x21adda===_0x3ef8ef(0x1da)||_0x21adda===_0x3ef8ef(0x22d)){const _0x442796=_0x3794d1[0x0];if(_0x442796===_0x3ef8ef(0x1a2)){const _0x565d50=_0x3794d1[_0x3ef8ef(0x23a)](0x1),_0x4fc257=_0x565d50[_0x3ef8ef(0x1cb)]===0x0||_0x565d50['every'](_0x1abdcc=>{const _0x69de4c=_0x3ef8ef;return _0x1abdcc==='-b'||_0x1abdcc===_0x69de4c(0x1ef)||_0x1abdcc==='-sb'||_0x1abdcc===_0x69de4c(0x1bb)||_0x1abdcc==='-s'||_0x1abdcc==='--short';});if(_0x4fc257)return{'cmd':_0xe74138,'args':[_0x3ef8ef(0x1a2),_0x3ef8ef(0x240),'-b']};}else{if(_0x442796===_0x3ef8ef(0x20f)){const _0x1a6593=_0x3794d1[_0x3ef8ef(0x23a)](0x1),_0x26f959=_0x1a6593['some'](_0x3aa944=>_0x3aa944[_0x3ef8ef(0x200)](_0x3ef8ef(0x1a9))||_0x3aa944['startsWith'](_0x3ef8ef(0x20b))||_0x3aa944[_0x3ef8ef(0x200)](_0x3ef8ef(0x213))),_0x3709f9=_0x1a6593[_0x3ef8ef(0x1f8)](_0x599f93=>_0x599f93['startsWith']('-')&&/^\d+$/[_0x3ef8ef(0x1cc)](_0x599f93[_0x3ef8ef(0x23a)](0x1))||_0x599f93==='-n'||_0x599f93[_0x3ef8ef(0x200)](_0x3ef8ef(0x201))),_0x5772c4=[..._0x3794d1];if(!_0x26f959){const _0x2ca47c=_0x3ef8ef(0x1ce);_0x5772c4[_0x3ef8ef(0x205)](process[_0x3ef8ef(0x1a1)]==='win32'?'\x22'+_0x2ca47c+'\x22':_0x2ca47c);}!_0x3709f9&&(_0x26f959?_0x5772c4[_0x3ef8ef(0x205)](_0x3ef8ef(0x238)):_0x5772c4['push'](_0x3ef8ef(0x1af)));const _0x477b06=_0x1a6593['some'](_0x5670f7=>_0x5670f7==='--merges'||_0x5670f7==='--no-merges'||_0x5670f7[_0x3ef8ef(0x200)](_0x3ef8ef(0x228)));return!_0x477b06&&!_0x3709f9&&_0x5772c4['push'](_0x3ef8ef(0x1dd)),{'cmd':_0xe74138,'args':_0x5772c4};}}}return{'cmd':_0xe74138,'args':_0x3794d1};}function isMcpServerExecution(_0x4a0ddc,_0x1436ce){const _0x263a0b=a0_0x480e93,_0x4b77b8=_0x4a0ddc[_0x263a0b(0x1fe)](),_0x44e00a=_0x1436ce['join']('\x20')['toLowerCase']();if(_0x4b77b8[_0x263a0b(0x229)](_0x263a0b(0x232))&&(_0x4b77b8['includes'](_0x263a0b(0x1d6))||_0x4b77b8['includes'](_0x263a0b(0x1ec))))return!![];if(_0x4b77b8===_0x263a0b(0x1b0)||_0x4b77b8===_0x263a0b(0x23d)||_0x4b77b8===_0x263a0b(0x1ba)||_0x4b77b8===_0x263a0b(0x1e4)||_0x4b77b8===_0x263a0b(0x202)||_0x4b77b8===_0x263a0b(0x1fb)){if(_0x44e00a[_0x263a0b(0x229)]('@modelcontextprotocol/')||_0x44e00a[_0x263a0b(0x229)](_0x263a0b(0x214))||_0x44e00a['includes'](_0x263a0b(0x218))||_0x44e00a[_0x263a0b(0x229)](_0x263a0b(0x23c)))return!![];}if(_0x1436ce[_0x263a0b(0x1f8)](_0x350951=>{const _0x5b9e96=_0x263a0b,_0x58ecca=_0x350951['toLowerCase']();return _0x58ecca['includes'](_0x5b9e96(0x218))||_0x58ecca[_0x5b9e96(0x229)](_0x5b9e96(0x23c))||_0x58ecca[_0x5b9e96(0x229)](_0x5b9e96(0x208))||_0x58ecca===_0x5b9e96(0x20c)||_0x58ecca==='mcp';}))return!![];return![];}async function runProxy(_0x1182f9){const _0x4b0c0c=a0_0x480e93;if(_0x1182f9[_0x4b0c0c(0x1cb)]===0x0){program['help']();return;}const _0x11f74c=_0x1182f9[0x0],_0x26e734=_0x1182f9[_0x4b0c0c(0x23a)](0x1),_0x58fe6d=_0x1182f9[_0x4b0c0c(0x222)]('\x20');if(isDisabled()){const _0x235b34=await(0x0,executor_1[_0x4b0c0c(0x1bd)])(_0x11f74c,_0x26e734);process[_0x4b0c0c(0x1c7)][_0x4b0c0c(0x215)](_0x235b34[_0x4b0c0c(0x1c7)]),process['stderr']['write'](_0x235b34[_0x4b0c0c(0x1d7)]),process[_0x4b0c0c(0x210)](_0x235b34[_0x4b0c0c(0x1ee)]);}if(isMcpServerExecution(_0x11f74c,_0x26e734)){console[_0x4b0c0c(0x1f0)](_0x4b0c0c(0x212));const {runMcpProxy:_0x433b6c}=await Promise[_0x4b0c0c(0x23f)]()[_0x4b0c0c(0x1d3)](()=>__importStar(require('./mcp')));_0x433b6c(_0x11f74c,_0x26e734);return;}const _0x5708ed=adjustCommandArgs(_0x11f74c,_0x26e734),_0x5f1d53=await(0x0,executor_1[_0x4b0c0c(0x1bd)])(_0x5708ed['cmd'],_0x5708ed[_0x4b0c0c(0x226)]),_0x2e4e4f=(0x0,filters_1[_0x4b0c0c(0x1db)])(_0x58fe6d,_0x5f1d53['stdout'],_0x5f1d53[_0x4b0c0c(0x1d7)],tracker_1[_0x4b0c0c(0x1a5)][_0x4b0c0c(0x211)]()[_0x4b0c0c(0x237)]),_0x503d43=_0x5f1d53[_0x4b0c0c(0x1c7)]+(_0x5f1d53['stderr']['trim']()['length']>0x0?'\x0a'+_0x5f1d53[_0x4b0c0c(0x1d7)]:''),_0x3d158f=_0x2e4e4f[_0x4b0c0c(0x1cb)]<_0x503d43[_0x4b0c0c(0x1cb)]?_0x2e4e4f:_0x503d43,_0x2378d8=_0x5f1d53[_0x4b0c0c(0x1ee)]===0x0?(0x0,cache_1[_0x4b0c0c(0x1c8)])(_0x58fe6d,_0x3d158f):null;tracker_1['tracker'][_0x4b0c0c(0x233)](_0x58fe6d,_0x503d43,_0x2378d8||_0x3d158f,_0x5f1d53[_0x4b0c0c(0x1ee)]),_0x5f1d53[_0x4b0c0c(0x1ee)]===0x0?process['stdout'][_0x4b0c0c(0x215)](_0x3d158f+'\x0a'):(process[_0x4b0c0c(0x1c7)][_0x4b0c0c(0x215)](_0x2e4e4f+'\x0a'),_0x5f1d53[_0x4b0c0c(0x1d7)][_0x4b0c0c(0x224)]()[_0x4b0c0c(0x1cb)]>0x0&&!_0x2e4e4f[_0x4b0c0c(0x229)](_0x5f1d53[_0x4b0c0c(0x1d7)][_0x4b0c0c(0x224)]())&&process[_0x4b0c0c(0x1d7)][_0x4b0c0c(0x215)](_0x5f1d53[_0x4b0c0c(0x1d7)]+'\x0a')),process[_0x4b0c0c(0x210)](_0x5f1d53[_0x4b0c0c(0x1ee)]);}program['name'](a0_0x480e93(0x224))[a0_0x480e93(0x23b)](a0_0x480e93(0x1e3))[a0_0x480e93(0x1c0)](a0_0x480e93(0x1b5)),program[a0_0x480e93(0x20a)]('ui')['alias'](a0_0x480e93(0x21d))[a0_0x480e93(0x23b)]('Start\x20the\x20local\x20developer\x20dashboard')[a0_0x480e93(0x227)](a0_0x480e93(0x207),a0_0x480e93(0x1d2),a0_0x480e93(0x206))[a0_0x480e93(0x1ad)](_0x1a5b18=>{const _0x474e29=a0_0x480e93,_0x212163=parseInt(_0x1a5b18[_0x474e29(0x1b3)],0xa);(0x0,dashboard_1[_0x474e29(0x223)])(_0x212163);}),program[a0_0x480e93(0x20a)](a0_0x480e93(0x1e6))[a0_0x480e93(0x23b)](a0_0x480e93(0x221))[a0_0x480e93(0x227)]('-m,\x20--model\x20<string>',a0_0x480e93(0x1d1),'claude-3-5-sonnet')['action'](_0x111e7b=>{const _0x2372ab=a0_0x480e93,_0xd4229f=tracker_1[_0x2372ab(0x1a5)][_0x2372ab(0x22c)](_0x111e7b[_0x2372ab(0x1f3)]);console[_0x2372ab(0x20f)]('\x0a============================================='),console[_0x2372ab(0x20f)]('\x20\x20\x20\x20\x20\x20\x20TRIMPROMPT.AI\x20SAVINGS\x20SUMMARY\x20\x20\x20\x20\x20\x20\x20\x20'),console['log'](_0x2372ab(0x1a3)),console[_0x2372ab(0x20f)]('Model\x20Context:\x20\x20\x20\x20\x20'+_0xd4229f['model_name']),console[_0x2372ab(0x20f)](_0x2372ab(0x1aa)+_0xd4229f[_0x2372ab(0x1d5)]['toLocaleString']()),console['log'](_0x2372ab(0x20d)+_0xd4229f['total_compressed_tokens'][_0x2372ab(0x1fd)]()),console[_0x2372ab(0x20f)]('Tokens\x20Saved:\x20\x20\x20\x20\x20\x20'+_0xd4229f[_0x2372ab(0x1ab)][_0x2372ab(0x1fd)]()),console[_0x2372ab(0x20f)](_0x2372ab(0x1b1)+_0xd4229f[_0x2372ab(0x216)]+'%'),console['log'](_0x2372ab(0x1fc)+_0xd4229f[_0x2372ab(0x1b8)][_0x2372ab(0x1ac)](0x4)+'\x20(before\x20Shave)'),console['log'](_0x2372ab(0x21f)+_0xd4229f[_0x2372ab(0x1cf)]['toFixed'](0x4)+_0x2372ab(0x1ca)),console[_0x2372ab(0x20f)]('---------------------------------------------'),console['log'](_0x2372ab(0x1bc)+_0xd4229f['money_saved_usd']['toFixed'](0x4)+_0x2372ab(0x1f2)),console[_0x2372ab(0x20f)](_0x2372ab(0x1e5));}),program['command'](a0_0x480e93(0x1e7))[a0_0x480e93(0x23b)](a0_0x480e93(0x1a4))['argument'](a0_0x480e93(0x1ed),a0_0x480e93(0x21b))[a0_0x480e93(0x22b)]('<key>',a0_0x480e93(0x1f5))[a0_0x480e93(0x22b)]('[value]',a0_0x480e93(0x230))[a0_0x480e93(0x1ad)]((_0x19c2ac,_0x494b9f,_0x5363d6)=>{const _0x215daa=a0_0x480e93;if(_0x19c2ac===_0x215daa(0x1e0)){const _0x4d7986=tracker_1[_0x215daa(0x1a5)][_0x215daa(0x211)]();console[_0x215daa(0x20f)](_0x494b9f+':\x20'+_0x4d7986[_0x494b9f]);}else{if(_0x19c2ac===_0x215daa(0x20e)){_0x5363d6===undefined&&(console[_0x215daa(0x1f0)](_0x215daa(0x1a8)),process[_0x215daa(0x210)](0x1));let _0x4ac35f=_0x5363d6;if(_0x5363d6==='true')_0x4ac35f=!![];if(_0x5363d6==='false')_0x4ac35f=![];if(/^\d+$/[_0x215daa(0x1cc)](_0x5363d6))_0x4ac35f=parseInt(_0x5363d6,0xa);tracker_1[_0x215daa(0x1a5)]['setConfig'](_0x494b9f,_0x4ac35f),console[_0x215daa(0x20f)](_0x215daa(0x23e)+_0x494b9f+_0x215daa(0x22f)+_0x5363d6);}else console[_0x215daa(0x1f0)](_0x215daa(0x1be)),process[_0x215daa(0x210)](0x1);}}),program['command'](a0_0x480e93(0x225))[a0_0x480e93(0x23b)](a0_0x480e93(0x1a6))['argument']('<action>',a0_0x480e93(0x1e1))[a0_0x480e93(0x1ad)](_0xa39aaa=>{const _0x2bcb33=a0_0x480e93;if(_0xa39aaa===_0x2bcb33(0x231)){const _0x595c3e=(0x0,shims_1['installShims'])();console[_0x2bcb33(0x20f)](_0x595c3e[_0x2bcb33(0x1c6)]);}else{if(_0xa39aaa==='uninstall'){const _0x15c049=(0x0,shims_1[_0x2bcb33(0x1f1)])();console[_0x2bcb33(0x20f)](_0x15c049[_0x2bcb33(0x1c6)]);}else console['error'](_0x2bcb33(0x1c9)),process[_0x2bcb33(0x210)](0x1);}}),program[a0_0x480e93(0x20a)](a0_0x480e93(0x1eb))[a0_0x480e93(0x23b)]('Check\x20a\x20command\x20line\x20and\x20return\x20the\x20optimized\x20command\x20line')[a0_0x480e93(0x22b)](a0_0x480e93(0x1d8),a0_0x480e93(0x1ea))[a0_0x480e93(0x1ad)](_0x27c960=>{const _0x2ccc80=a0_0x480e93;if(isDisabled()){console['log'](_0x27c960);return;}const _0x41b695=(0x0,filters_1[_0x2ccc80(0x203)])(_0x27c960);console[_0x2ccc80(0x20f)](_0x41b695);}),program[a0_0x480e93(0x20a)]('mcp-proxy')[a0_0x480e93(0x1b9)](a0_0x480e93(0x232))['description'](a0_0x480e93(0x21e))[a0_0x480e93(0x22b)](a0_0x480e93(0x1fa),a0_0x480e93(0x1c2))['argument']('[server-args...]',a0_0x480e93(0x1de))[a0_0x480e93(0x1ad)](async(_0x13e94a,_0x12aa62)=>{const _0x2043cf=a0_0x480e93,{runMcpProxy:_0x2c89d1}=await Promise['resolve']()[_0x2043cf(0x1d3)](()=>__importStar(require(_0x2043cf(0x217))));_0x2c89d1(_0x13e94a,_0x12aa62);});const args=process[a0_0x480e93(0x219)]['slice'](0x2),firstArg=args[0x0],subcommands=['ui',a0_0x480e93(0x21d),a0_0x480e93(0x1e6),a0_0x480e93(0x1e7),a0_0x480e93(0x225),a0_0x480e93(0x1eb),a0_0x480e93(0x20c),a0_0x480e93(0x232),a0_0x480e93(0x209),'--help','-h',a0_0x480e93(0x1c0),a0_0x480e93(0x204),'-v'];firstArg&&!subcommands[a0_0x480e93(0x229)](firstArg)?runProxy(args)['catch'](_0x445fd1=>{const _0x146770=a0_0x480e93;console[_0x146770(0x1f0)](_0x146770(0x235)+_0x445fd1[_0x146770(0x1c6)]),process['exit'](0x1);}):program[a0_0x480e93(0x1f7)](process[a0_0x480e93(0x219)]);
|
|
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']);
|
package/dashboard.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0xe65c16=a0_0x5b86;function a0_0x238b(){const _0x1fd9b7=['default','json','utf8','sendFile','/api/stats/history','listen','length','join','Press\x20Ctrl+C\x20in\x20this\x20terminal\x20to\x20shut\x20down.','81495sSkxBP','890OSTyEH','__esModule','getOwnPropertyDescriptor','startDashboard','existsSync','12VvdqcC','error','886129dhEhEv','auto','getOwnPropertyNames','getStatsSummary','tracker','/api/stats/inspect/:id','2mxTVyz','prototype','__createBinding','[TrimPrompt]\x20Dashboard\x20error:\x20','writable','2926609zOtfns','Raw\x20output\x20log\x20file\x20not\x20found.','readFileSync','catch','276EwEbhU','http://localhost:','EADDRINUSE','homedir','.raw.txt','create','207KTkSoG','express','configurable','get','logs','message','24016109xjpBas','/api/stats/summary','log','../src/index.html','.trimprompt','106293BxRodm','__importDefault','defineProperty','params','hasOwnProperty','2910201PVkhVf','12ruSRxh','26744VWsuCP','./tracker'];a0_0x238b=function(){return _0x1fd9b7;};return a0_0x238b();}(function(_0x440397,_0x448666){const _0x3763dc=a0_0x5b86,_0x51c015=_0x440397();while(!![]){try{const _0x2e7564=parseInt(_0x3763dc(0x187))/0x1+-parseInt(_0x3763dc(0x18d))/0x2*(parseInt(_0x3763dc(0x172))/0x3)+parseInt(_0x3763dc(0x15c))/0x4*(-parseInt(_0x3763dc(0x17f))/0x5)+-parseInt(_0x3763dc(0x185))/0x6*(-parseInt(_0x3763dc(0x158))/0x7)+parseInt(_0x3763dc(0x174))/0x8*(parseInt(_0x3763dc(0x162))/0x9)+parseInt(_0x3763dc(0x180))/0xa*(-parseInt(_0x3763dc(0x16d))/0xb)+parseInt(_0x3763dc(0x173))/0xc*(parseInt(_0x3763dc(0x168))/0xd);if(_0x2e7564===_0x448666)break;else _0x51c015['push'](_0x51c015['shift']());}catch(_0x2456e9){_0x51c015['push'](_0x51c015['shift']());}}}(a0_0x238b,0xa8ea8));var __createBinding=this&&this[a0_0xe65c16(0x18f)]||(Object[a0_0xe65c16(0x161)]?function(_0x522e99,_0x424034,_0x5af846,_0x43a563){const _0x4daf96=a0_0xe65c16;if(_0x43a563===undefined)_0x43a563=_0x5af846;var _0x4f0790=Object[_0x4daf96(0x182)](_0x424034,_0x5af846);(!_0x4f0790||(_0x4daf96(0x165)in _0x4f0790?!_0x424034[_0x4daf96(0x181)]:_0x4f0790[_0x4daf96(0x191)]||_0x4f0790[_0x4daf96(0x164)]))&&(_0x4f0790={'enumerable':!![],'get':function(){return _0x424034[_0x5af846];}}),Object[_0x4daf96(0x16f)](_0x522e99,_0x43a563,_0x4f0790);}:function(_0x33e59b,_0x32f42b,_0x28add1,_0x3124a8){if(_0x3124a8===undefined)_0x3124a8=_0x28add1;_0x33e59b[_0x3124a8]=_0x32f42b[_0x28add1];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a0_0xe65c16(0x161)]?function(_0x402686,_0x2084fe){const _0x4506e8=a0_0xe65c16;Object[_0x4506e8(0x16f)](_0x402686,_0x4506e8(0x176),{'enumerable':!![],'value':_0x2084fe});}:function(_0x3acd60,_0x54a663){const _0x4c4977=a0_0xe65c16;_0x3acd60[_0x4c4977(0x176)]=_0x54a663;}),__importStar=this&&this['__importStar']||(function(){var _0x367515=function(_0x2306cc){const _0x29a745=a0_0x5b86;return _0x367515=Object[_0x29a745(0x189)]||function(_0x49a213){const _0x371659=_0x29a745;var _0x5c9e8b=[];for(var _0x2fc18f in _0x49a213)if(Object[_0x371659(0x18e)][_0x371659(0x171)]['call'](_0x49a213,_0x2fc18f))_0x5c9e8b[_0x5c9e8b['length']]=_0x2fc18f;return _0x5c9e8b;},_0x367515(_0x2306cc);};return function(_0x4187b2){const _0x389c2e=a0_0x5b86;if(_0x4187b2&&_0x4187b2[_0x389c2e(0x181)])return _0x4187b2;var _0x5759cc={};if(_0x4187b2!=null){for(var _0x3aa798=_0x367515(_0x4187b2),_0x386f72=0x0;_0x386f72<_0x3aa798[_0x389c2e(0x17c)];_0x386f72++)if(_0x3aa798[_0x386f72]!==_0x389c2e(0x176))__createBinding(_0x5759cc,_0x4187b2,_0x3aa798[_0x386f72]);}return __setModuleDefault(_0x5759cc,_0x4187b2),_0x5759cc;};}()),__importDefault=this&&this[a0_0xe65c16(0x16e)]||function(_0x4fd620){const _0x1d6c1a=a0_0xe65c16;return _0x4fd620&&_0x4fd620[_0x1d6c1a(0x181)]?_0x4fd620:{'default':_0x4fd620};};Object[a0_0xe65c16(0x16f)](exports,a0_0xe65c16(0x181),{'value':!![]}),exports[a0_0xe65c16(0x183)]=startDashboard;function a0_0x5b86(_0x5cebfe,_0x280ae2){_0x5cebfe=_0x5cebfe-0x158;const _0x238b39=a0_0x238b();let _0x5b86c0=_0x238b39[_0x5cebfe];return _0x5b86c0;}const express_1=__importDefault(require(a0_0xe65c16(0x163))),path=__importStar(require('path')),fs=__importStar(require('fs')),os=__importStar(require('os')),open_1=__importDefault(require('open')),tracker_1=require(a0_0xe65c16(0x175)),app=(0x0,express_1['default'])(),baseDir=path['join'](os[a0_0xe65c16(0x15f)](),a0_0xe65c16(0x16c)),logsDir=path[a0_0xe65c16(0x17d)](baseDir,a0_0xe65c16(0x166));app['get']('/',(_0x263709,_0x31cc4f)=>{const _0x106511=a0_0xe65c16,_0x2d7b1b=path['join'](__dirname,'index.html');fs[_0x106511(0x184)](_0x2d7b1b)?_0x31cc4f[_0x106511(0x179)](_0x2d7b1b):_0x31cc4f[_0x106511(0x179)](path['join'](__dirname,_0x106511(0x16b)));}),app[a0_0xe65c16(0x165)](a0_0xe65c16(0x169),(_0x50397b,_0x47bf66)=>{const _0x1c490b=a0_0xe65c16,_0x5ac6ab=_0x50397b['query']['model']||_0x1c490b(0x188),_0xd46c13=tracker_1[_0x1c490b(0x18b)][_0x1c490b(0x18a)](_0x5ac6ab);_0x47bf66[_0x1c490b(0x177)](_0xd46c13);}),app[a0_0xe65c16(0x165)](a0_0xe65c16(0x17a),(_0x1ca9ec,_0x423e09)=>{const _0x413d64=a0_0xe65c16,_0x5a85fc=tracker_1[_0x413d64(0x18b)]['getLogs']();_0x423e09[_0x413d64(0x177)](_0x5a85fc);}),app[a0_0xe65c16(0x165)](a0_0xe65c16(0x18c),(_0x3f0149,_0x4f81df)=>{const _0x5f31a6=a0_0xe65c16,_0x1ef190=_0x3f0149[_0x5f31a6(0x170)]['id'],_0x39436a=path[_0x5f31a6(0x17d)](logsDir,_0x1ef190+_0x5f31a6(0x160)),_0x16ae35=path[_0x5f31a6(0x17d)](logsDir,_0x1ef190+'.comp.txt');let _0x250454=_0x5f31a6(0x159),_0xfc3337='Compressed\x20output\x20log\x20file\x20not\x20found.';try{fs[_0x5f31a6(0x184)](_0x39436a)&&(_0x250454=fs[_0x5f31a6(0x15a)](_0x39436a,_0x5f31a6(0x178))),fs[_0x5f31a6(0x184)](_0x16ae35)&&(_0xfc3337=fs['readFileSync'](_0x16ae35,_0x5f31a6(0x178)));}catch(_0x5c08a9){}_0x4f81df[_0x5f31a6(0x177)]({'id':_0x1ef190,'raw':_0x250454,'compressed':_0xfc3337});});function startDashboard(_0xed3a79=0xfa0){const _0x3ff5cc=a0_0xe65c16;let _0x10bedb=_0xed3a79;const _0xcb572d=app[_0x3ff5cc(0x17b)](_0x10bedb,()=>{const _0x5aa1db=_0x3ff5cc,_0x49de39=_0x5aa1db(0x15d)+_0x10bedb;console[_0x5aa1db(0x16a)]('\x0a[TrimPrompt]\x20Dashboard\x20server\x20started\x20at:\x20'+_0x49de39),console[_0x5aa1db(0x16a)](_0x5aa1db(0x17e)),(0x0,open_1['default'])(_0x49de39)[_0x5aa1db(0x15b)](()=>{});});_0xcb572d['on']('error',_0x1c8072=>{const _0x524666=_0x3ff5cc;_0x1c8072['code']===_0x524666(0x15e)?startDashboard(_0x10bedb+0x1):console[_0x524666(0x186)](_0x524666(0x190)+_0x1c8072[_0x524666(0x167)]);});}
|
package/executor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a0_0x25a0de=a0_0x4bd3;(function(_0x4a3e91,_0x21c137){var _0x173253=a0_0x4bd3,_0x4f275d=_0x4a3e91();while(!![]){try{var _0x5802e2=-parseInt(_0x173253(0x144))/0x1+-parseInt(_0x173253(0x154))/0x2+-parseInt(_0x173253(0x155))/0x3*(parseInt(_0x173253(0x134))/0x4)+parseInt(_0x173253(0x139))/0x5*(-parseInt(_0x173253(0x149))/0x6)+-parseInt(_0x173253(0x138))/0x7*(parseInt(_0x173253(0x161))/0x8)+parseInt(_0x173253(0x14a))/0x9*(parseInt(_0x173253(0x140))/0xa)+-parseInt(_0x173253(0x165))/0xb*(-parseInt(_0x173253(0x141))/0xc);if(_0x5802e2===_0x21c137)break;else _0x4f275d['push'](_0x4f275d['shift']());}catch(_0x39def8){_0x4f275d['push'](_0x4f275d['shift']());}}}(a0_0x4cbc,0x284f6));var __createBinding=this&&this[a0_0x25a0de(0x15d)]||(Object[a0_0x25a0de(0x13f)]?function(_0x528eff,_0x13f72b,_0x5cb8ca,_0x2f199c){var _0x2b6ef3=a0_0x25a0de;if(_0x2f199c===undefined)_0x2f199c=_0x5cb8ca;var _0x364be2=Object[_0x2b6ef3(0x150)](_0x13f72b,_0x5cb8ca);(!_0x364be2||(_0x2b6ef3(0x14f)in _0x364be2?!_0x13f72b['__esModule']:_0x364be2[_0x2b6ef3(0x15f)]||_0x364be2[_0x2b6ef3(0x14d)]))&&(_0x364be2={'enumerable':!![],'get':function(){return _0x13f72b[_0x5cb8ca];}}),Object[_0x2b6ef3(0x151)](_0x528eff,_0x2f199c,_0x364be2);}:function(_0x35ac58,_0x18bf05,_0x417554,_0x1f274d){if(_0x1f274d===undefined)_0x1f274d=_0x417554;_0x35ac58[_0x1f274d]=_0x18bf05[_0x417554];}),__setModuleDefault=this&&this[a0_0x25a0de(0x156)]||(Object[a0_0x25a0de(0x13f)]?function(_0x4cd16e,_0x40fa02){var _0x14e9ee=a0_0x25a0de;Object['defineProperty'](_0x4cd16e,_0x14e9ee(0x142),{'enumerable':!![],'value':_0x40fa02});}:function(_0x25f64f,_0x3f0122){var _0x2f121c=a0_0x25a0de;_0x25f64f[_0x2f121c(0x142)]=_0x3f0122;}),__importStar=this&&this['__importStar']||(function(){var _0x16a791=function(_0x304ecc){return _0x16a791=Object['getOwnPropertyNames']||function(_0x4e7f8e){var _0x152761=a0_0x4bd3,_0x2b0958=[];for(var _0x5abc72 in _0x4e7f8e)if(Object[_0x152761(0x163)][_0x152761(0x160)]['call'](_0x4e7f8e,_0x5abc72))_0x2b0958[_0x2b0958[_0x152761(0x143)]]=_0x5abc72;return _0x2b0958;},_0x16a791(_0x304ecc);};return function(_0x248f88){var _0x1284de=a0_0x4bd3;if(_0x248f88&&_0x248f88[_0x1284de(0x166)])return _0x248f88;var _0x2154ae={};if(_0x248f88!=null){for(var _0x1ac9cd=_0x16a791(_0x248f88),_0x252b23=0x0;_0x252b23<_0x1ac9cd['length'];_0x252b23++)if(_0x1ac9cd[_0x252b23]!==_0x1284de(0x142))__createBinding(_0x2154ae,_0x248f88,_0x1ac9cd[_0x252b23]);}return __setModuleDefault(_0x2154ae,_0x248f88),_0x2154ae;};}());function a0_0x4cbc(){var _0x35da25=['toString','message','520836Dxkrbx','1888407azzYqo','child_process','stdout','configurable','close','get','getOwnPropertyDescriptor','defineProperty','includes','Failed\x20to\x20spawn\x20command\x20\x22','378054vJzRKa','98931YtIHvx','__setModuleDefault','pipe','join','shims','filter','executeCommand','error','__createBinding','toLowerCase','writable','hasOwnProperty','8384LPqzGr','map','prototype','.trimprompt','2310rUzrOt','__esModule','path','20sOqprb','platform','split','trim','1050emgPuJ','15itRnYA','\x22:\x20','delimiter','homedir','data','spawn','create','10rFTfOZ','55308KfEOHf','default','length','241073ElNdmK','startsWith','inherit'];a0_0x4cbc=function(){return _0x35da25;};return a0_0x4cbc();}Object[a0_0x25a0de(0x151)](exports,'__esModule',{'value':!![]}),exports[a0_0x25a0de(0x15b)]=executeCommand;function a0_0x4bd3(_0x5e69d7,_0x1a9ee9){_0x5e69d7=_0x5e69d7-0x134;var _0x4cbcee=a0_0x4cbc();var _0x4bd3d7=_0x4cbcee[_0x5e69d7];return _0x4bd3d7;}const child_process_1=require(a0_0x25a0de(0x14b)),path=__importStar(require(a0_0x25a0de(0x167))),os=__importStar(require('os'));function executeCommand(_0x499651,_0x42e3a5){return new Promise(_0x3cc282=>{var _0x44b54e=a0_0x4bd3;const _0x579556=path[_0x44b54e(0x158)](os[_0x44b54e(0x13c)](),_0x44b54e(0x164),_0x44b54e(0x159)),_0x5648b8=(process.env.PATH||'')[_0x44b54e(0x136)](path['delimiter'])[_0x44b54e(0x15a)](_0x240f41=>_0x240f41[_0x44b54e(0x137)]()[_0x44b54e(0x15e)]()!==_0x579556[_0x44b54e(0x15e)]())[_0x44b54e(0x158)](path[_0x44b54e(0x13b)]),_0x10265d={...process.env,'PATH':_0x5648b8,'TRIMPROMPT_DISABLED':'1'},_0x1efdc1=process[_0x44b54e(0x135)]==='win32'?_0x42e3a5[_0x44b54e(0x162)](_0x2c884d=>_0x2c884d[_0x44b54e(0x152)]('\x20')&&!_0x2c884d[_0x44b54e(0x145)]('\x22')?'\x22'+_0x2c884d+'\x22':_0x2c884d):_0x42e3a5,_0x2a2e5f=(0x0,child_process_1[_0x44b54e(0x13e)])(_0x499651,_0x1efdc1,{'stdio':[_0x44b54e(0x146),'pipe',_0x44b54e(0x157)],'shell':!![],'env':_0x10265d});let _0x8455d9='',_0xfae72e='';_0x2a2e5f[_0x44b54e(0x14c)]?.['on'](_0x44b54e(0x13d),_0x19dc7c=>{var _0x3ce92d=_0x44b54e;_0x8455d9+=_0x19dc7c[_0x3ce92d(0x147)]();}),_0x2a2e5f['stderr']?.['on'](_0x44b54e(0x13d),_0x15b45d=>{var _0x52272e=_0x44b54e;_0xfae72e+=_0x15b45d[_0x52272e(0x147)]();}),_0x2a2e5f['on'](_0x44b54e(0x15c),_0x528f94=>{var _0x326497=_0x44b54e;_0x3cc282({'exitCode':0x1,'stdout':'','stderr':_0x326497(0x153)+_0x499651+_0x326497(0x13a)+_0x528f94[_0x326497(0x148)]});}),_0x2a2e5f['on'](_0x44b54e(0x14e),_0x345090=>{_0x3cc282({'exitCode':_0x345090??0x0,'stdout':_0x8455d9,'stderr':_0xfae72e});});});}
|
package/filters/devops.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function a0_0x228c(_0x5e9480,_0x39eed3){_0x5e9480=_0x5e9480-0xac;const _0x2aca29=a0_0x2aca();let _0x228cb1=_0x2aca29[_0x5e9480];return _0x228cb1;}const a0_0x457d10=a0_0x228c;function a0_0x2aca(){const _0x23859d=['__esModule','Docker\x20images:\x20','match','9433305rTmLCi','filterDockerLogs','\x20log\x20lines\x20total)','...\x20+','\x20more\x20lines','\x0a...\x20[','Ruff:\x20all\x20checks\x20passed','9512892BSMRrc','\x20\x20...\x20+','describe','startsWith','join','Ruff:\x20','55DIVulj','filterDockerImages','\x20more\x20resources','\x20total','3863720VgaerL','\x20more\x20files','\x20resources\x20found','slice','40851TbXJrL','\x0a...\x20+','filterDockerPs','All\x20checks\x20passed','filterRuff','length','defineProperty','26zeyWFi','split','\x20issues\x20in\x20','15184QhqMBD','push','232obZRVa','No\x20resources\x20found','trim','7DAtUOj','\x20lines\x20truncated]\x20...\x0a','\x20more\x20images','No\x20images\x20found','9081GmpapM','\x20files','15418xgUEYY','Events:','includes','keys','logs','get','filter','23112444ZzNmsb'];a0_0x2aca=function(){return _0x23859d;};return a0_0x2aca();}(function(_0x14049e,_0x10ee7f){const _0x54ec5b=a0_0x228c,_0x52dd14=_0x14049e();while(!![]){try{const _0x32553a=-parseInt(_0x54ec5b(0xce))/0x1*(-parseInt(_0x54ec5b(0xdc))/0x2)+-parseInt(_0x54ec5b(0xc7))/0x3*(parseInt(_0x54ec5b(0xd3))/0x4)+parseInt(_0x54ec5b(0xb2))/0x5+parseInt(_0x54ec5b(0xb9))/0x6*(parseInt(_0x54ec5b(0xd6))/0x7)+-parseInt(_0x54ec5b(0xd1))/0x8*(parseInt(_0x54ec5b(0xda))/0x9)+-parseInt(_0x54ec5b(0xc3))/0xa*(-parseInt(_0x54ec5b(0xbf))/0xb)+-parseInt(_0x54ec5b(0xae))/0xc;if(_0x32553a===_0x10ee7f)break;else _0x52dd14['push'](_0x52dd14['shift']());}catch(_0x4d94db){_0x52dd14['push'](_0x52dd14['shift']());}}}(a0_0x2aca,0xedadc));Object[a0_0x457d10(0xcd)](exports,a0_0x457d10(0xaf),{'value':!![]}),exports[a0_0x457d10(0xc9)]=filterDockerPs,exports[a0_0x457d10(0xc0)]=filterDockerImages,exports[a0_0x457d10(0xb3)]=filterDockerLogs,exports['filterKubectl']=filterKubectl,exports[a0_0x457d10(0xcb)]=filterRuff;function filterDockerPs(_0x3001cf){const _0x50f4a4=a0_0x457d10,_0x36af4f=_0x3001cf[_0x50f4a4(0xcf)]('\x0a')[_0x50f4a4(0xad)](_0x5ae923=>_0x5ae923['trim']()['length']>0x0);if(_0x36af4f[_0x50f4a4(0xcc)]===0x0)return'No\x20containers\x20running';if(_0x36af4f['length']<=0xa)return _0x3001cf[_0x50f4a4(0xd5)]();const _0x16b900=_0x36af4f[0x0],_0x350c09=_0x36af4f[_0x50f4a4(0xc6)](0x1),_0x1f4021=[];_0x1f4021[_0x50f4a4(0xd2)]('Containers:\x20'+_0x350c09[_0x50f4a4(0xcc)]+_0x50f4a4(0xc2)),_0x1f4021[_0x50f4a4(0xd2)]('');for(const _0x58ad2f of _0x350c09){const _0x2ebd74=_0x58ad2f[_0x50f4a4(0xcf)](/\s{2,}/);if(_0x2ebd74[_0x50f4a4(0xcc)]>=0x5){const _0x326bc1=_0x2ebd74[0x0]['substring'](0x0,0xc),_0x322a97=_0x2ebd74[0x1],_0x3ceeb3=_0x2ebd74[_0x2ebd74[_0x50f4a4(0xcc)]-0x2]||'',_0x101209=_0x2ebd74[_0x2ebd74[_0x50f4a4(0xcc)]-0x1]||'';_0x1f4021[_0x50f4a4(0xd2)]('\x20\x20'+_0x326bc1+'\x20\x20'+_0x322a97+'\x20\x20'+_0x3ceeb3+'\x20\x20'+_0x101209);}else _0x1f4021[_0x50f4a4(0xd2)]('\x20\x20'+_0x58ad2f[_0x50f4a4(0xd5)]());}return _0x1f4021['join']('\x0a');}function filterDockerImages(_0x2c0d29){const _0x1ae718=a0_0x457d10,_0x5d5136=_0x2c0d29[_0x1ae718(0xcf)]('\x0a')[_0x1ae718(0xad)](_0x3e8257=>_0x3e8257['trim']()[_0x1ae718(0xcc)]>0x0);if(_0x5d5136[_0x1ae718(0xcc)]<=0x1)return _0x1ae718(0xd9);if(_0x5d5136[_0x1ae718(0xcc)]<=0xf)return _0x2c0d29[_0x1ae718(0xd5)]();const _0x24eaa3=_0x5d5136['slice'](0x1),_0x423a06=[_0x1ae718(0xb0)+_0x24eaa3[_0x1ae718(0xcc)]+'\x20total'];_0x423a06['push']('');const _0x789ec6=_0x24eaa3[_0x1ae718(0xc6)](0x0,0x14);for(const _0x53b9c0 of _0x789ec6){const _0x258939=_0x53b9c0[_0x1ae718(0xcf)](/\s{2,}/);if(_0x258939[_0x1ae718(0xcc)]>=0x3){const _0x52600b=_0x258939[0x0],_0x4d204c=_0x258939[0x1],_0x22bc05=_0x258939[_0x258939[_0x1ae718(0xcc)]-0x1]||'';_0x423a06['push']('\x20\x20'+_0x52600b+':'+_0x4d204c+'\x20\x20'+_0x22bc05);}else _0x423a06[_0x1ae718(0xd2)]('\x20\x20'+_0x53b9c0[_0x1ae718(0xd5)]());}return _0x24eaa3[_0x1ae718(0xcc)]>0x14&&_0x423a06[_0x1ae718(0xd2)](_0x1ae718(0xba)+(_0x24eaa3['length']-0x14)+_0x1ae718(0xd8)),_0x423a06['join']('\x0a');}function filterDockerLogs(_0x59d021){const _0x451bf6=a0_0x457d10,_0x311a6b=_0x59d021[_0x451bf6(0xcf)]('\x0a');if(_0x311a6b[_0x451bf6(0xcc)]<=0x32)return _0x59d021;const _0x5606ae=[];return _0x5606ae[_0x451bf6(0xd2)](..._0x311a6b['slice'](0x0,0x14)),_0x5606ae['push'](_0x451bf6(0xb7)+(_0x311a6b['length']-0x28)+_0x451bf6(0xd7)),_0x5606ae[_0x451bf6(0xd2)](..._0x311a6b[_0x451bf6(0xc6)](-0x14)),_0x5606ae['push']('\x0a('+_0x311a6b[_0x451bf6(0xcc)]+_0x451bf6(0xb4)),_0x5606ae[_0x451bf6(0xbd)]('\x0a');}function filterKubectl(_0x7a9d75,_0x4bea3f){const _0x8709f1=a0_0x457d10,_0x4fd58c=_0x7a9d75[_0x8709f1(0xcf)]('\x0a')[_0x8709f1(0xad)](_0x3088e7=>_0x3088e7[_0x8709f1(0xd5)]()[_0x8709f1(0xcc)]>0x0);if(_0x4fd58c[_0x8709f1(0xcc)]===0x0)return _0x8709f1(0xd4);if(_0x4fd58c['length']<=0x14)return _0x7a9d75[_0x8709f1(0xd5)]();if(_0x4bea3f===_0x8709f1(0xac)){const _0x314f14=_0x4fd58c[0x0],_0x54135e=_0x4fd58c['slice'](0x1),_0x2aef42=[_0x54135e[_0x8709f1(0xcc)]+_0x8709f1(0xc5),'',_0x314f14];return _0x54135e[_0x8709f1(0xcc)]<=0x1e?_0x2aef42[_0x8709f1(0xd2)](..._0x54135e):(_0x2aef42[_0x8709f1(0xd2)](..._0x54135e[_0x8709f1(0xc6)](0x0,0x19)),_0x2aef42[_0x8709f1(0xd2)]('...\x20+'+(_0x54135e[_0x8709f1(0xcc)]-0x19)+_0x8709f1(0xc1))),_0x2aef42[_0x8709f1(0xbd)]('\x0a');}if(_0x4bea3f===_0x8709f1(0xbb)){const _0x41ea98=[];let _0x45f397=![],_0x112e5f=0x0;for(const _0x247b0d of _0x4fd58c){if(_0x247b0d[_0x8709f1(0xbc)](_0x8709f1(0xdd))){_0x45f397=!![],_0x41ea98[_0x8709f1(0xd2)](_0x247b0d);continue;}if(_0x45f397){_0x112e5f++;if(_0x112e5f<=0x5)_0x41ea98[_0x8709f1(0xd2)](_0x247b0d);}else _0x41ea98['push'](_0x247b0d);}return _0x112e5f>0x5&&_0x41ea98[_0x8709f1(0xd2)](_0x8709f1(0xba)+(_0x112e5f-0x5)+'\x20more\x20events'),_0x41ea98[_0x8709f1(0xbd)]('\x0a');}if(_0x4bea3f===_0x8709f1(0xe0))return filterDockerLogs(_0x7a9d75);const _0x59438a=_0x4fd58c[_0x8709f1(0xc6)](0x0,0x1e);return _0x4fd58c[_0x8709f1(0xcc)]>0x1e&&_0x59438a[_0x8709f1(0xd2)](_0x8709f1(0xb5)+(_0x4fd58c[_0x8709f1(0xcc)]-0x1e)+_0x8709f1(0xb6)),_0x59438a['join']('\x0a');}function filterRuff(_0x469a49){const _0x22e7f5=a0_0x457d10,_0x307358=_0x469a49['split']('\x0a')[_0x22e7f5(0xad)](_0x2caca1=>_0x2caca1[_0x22e7f5(0xd5)]()[_0x22e7f5(0xcc)]>0x0);if(_0x307358[_0x22e7f5(0xcc)]===0x0)return'Ruff:\x20no\x20issues\x20found';if(_0x469a49[_0x22e7f5(0xde)](_0x22e7f5(0xca))||_0x469a49['includes']('Found\x200\x20error'))return _0x22e7f5(0xb8);const _0x40f86b=_0x469a49[_0x22e7f5(0xb1)](/Found (\d+) error/),_0x3a7da0=_0x40f86b?parseInt(_0x40f86b[0x1]):_0x307358[_0x22e7f5(0xcc)],_0x100284={},_0x32b2a1=[];for(const _0x5b91b4 of _0x307358){const _0x41405f=_0x5b91b4[_0x22e7f5(0xb1)](/^([^:]+:\d+:\d+):\s*(.*)/);if(_0x41405f){const _0x8ab8c7=_0x41405f[0x1],_0x72c3fa=_0x8ab8c7[_0x22e7f5(0xcf)](':')[0x0];if(!_0x100284[_0x72c3fa])_0x100284[_0x72c3fa]=[];_0x100284[_0x72c3fa]['push'](_0x5b91b4);}else _0x32b2a1[_0x22e7f5(0xd2)](_0x5b91b4);}const _0x1eeb2d=Object[_0x22e7f5(0xdf)](_0x100284);if(_0x1eeb2d[_0x22e7f5(0xcc)]===0x0){if(_0x307358[_0x22e7f5(0xcc)]<=0x14)return _0x469a49[_0x22e7f5(0xd5)]();return _0x307358[_0x22e7f5(0xc6)](0x0,0xf)[_0x22e7f5(0xbd)]('\x0a')+(_0x22e7f5(0xc8)+(_0x307358[_0x22e7f5(0xcc)]-0xf)+'\x20more');}const _0x1d164d=[_0x22e7f5(0xbe)+_0x3a7da0+_0x22e7f5(0xd0)+_0x1eeb2d[_0x22e7f5(0xcc)]+_0x22e7f5(0xdb)];_0x1d164d[_0x22e7f5(0xd2)]('');const _0x61a258=0xa;for(const _0x1664a8 of _0x1eeb2d['slice'](0x0,_0x61a258)){const _0x1c83bc=_0x100284[_0x1664a8];if(_0x1c83bc[_0x22e7f5(0xcc)]<=0x3){for(const _0x401a74 of _0x1c83bc)_0x1d164d['push']('\x20\x20'+_0x401a74);}else _0x1d164d['push']('\x20\x20'+_0x1c83bc[0x0]),_0x1d164d[_0x22e7f5(0xd2)]('\x20\x20...\x20('+_0x1c83bc['length']+'\x20issues\x20in\x20'+_0x1664a8+')');}return _0x1eeb2d['length']>_0x61a258&&_0x1d164d[_0x22e7f5(0xd2)]('\x20\x20...\x20+'+(_0x1eeb2d['length']-_0x61a258)+_0x22e7f5(0xc4)),_0x1d164d[_0x22e7f5(0xbd)]('\x0a');}
|
package/filters/generic.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const a0_0x5201dd=a0_0x4190;(function(_0x51cfee,_0x437058){const _0x33bbb0=a0_0x4190,_0x2a1006=_0x51cfee();while(!![]){try{const _0x578dee=parseInt(_0x33bbb0(0x1dd))/0x1*(-parseInt(_0x33bbb0(0x1e5))/0x2)+-parseInt(_0x33bbb0(0x1de))/0x3+-parseInt(_0x33bbb0(0x1e4))/0x4*(parseInt(_0x33bbb0(0x1db))/0x5)+parseInt(_0x33bbb0(0x1e8))/0x6+parseInt(_0x33bbb0(0x1df))/0x7*(-parseInt(_0x33bbb0(0x1e9))/0x8)+parseInt(_0x33bbb0(0x1f0))/0x9*(-parseInt(_0x33bbb0(0x1e6))/0xa)+parseInt(_0x33bbb0(0x1e0))/0xb;if(_0x578dee===_0x437058)break;else _0x2a1006['push'](_0x2a1006['shift']());}catch(_0x5318e9){_0x2a1006['push'](_0x2a1006['shift']());}}}(a0_0x5f14,0x9438b));Object[a0_0x5201dd(0x1ea)](exports,a0_0x5201dd(0x1dc),{'value':!![]}),exports[a0_0x5201dd(0x1ed)]=stripAnsi,exports[a0_0x5201dd(0x1e7)]=collapseDuplicates,exports[a0_0x5201dd(0x1ec)]=softTruncate;function a0_0x4190(_0x17411a,_0x5556de){_0x17411a=_0x17411a-0x1da;const _0x5f14a2=a0_0x5f14();let _0x41901f=_0x5f14a2[_0x17411a];return _0x41901f;}function stripAnsi(_0x5d23c6){const _0x39cbf1=a0_0x5201dd,_0x1bc22e=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g;return _0x5d23c6[_0x39cbf1(0x1eb)](_0x1bc22e,'');}function collapseDuplicates(_0x1326ae){const _0x30415b=a0_0x5201dd,_0x52a18f=_0x1326ae[_0x30415b(0x1da)]('\x0a');if(_0x52a18f[_0x30415b(0x1e1)]<=0x1)return _0x1326ae;const _0x100acd=[];let _0x20b7dc=_0x52a18f[0x0],_0xc656f=0x1;for(let _0x135b12=0x1;_0x135b12<_0x52a18f[_0x30415b(0x1e1)];_0x135b12++){const _0x5e5bea=_0x52a18f[_0x135b12];_0x5e5bea===_0x20b7dc&&_0x5e5bea[_0x30415b(0x1e2)]()[_0x30415b(0x1e1)]>0x0?_0xc656f++:(_0xc656f>0x1?_0x100acd[_0x30415b(0x1ef)](_0x20b7dc+_0x30415b(0x1ee)+_0xc656f+']'):_0x100acd[_0x30415b(0x1ef)](_0x20b7dc),_0x20b7dc=_0x5e5bea,_0xc656f=0x1);}return _0xc656f>0x1?_0x100acd[_0x30415b(0x1ef)](_0x20b7dc+'\x20[x'+_0xc656f+']'):_0x100acd[_0x30415b(0x1ef)](_0x20b7dc),_0x100acd['join']('\x0a');}function a0_0x5f14(){const _0xee5dd=['29601ScOmJa','\x20characters\x20of\x20output]\x20...\x0a','slice','split','280PXBeRE','__esModule','361Azsprl','2031897cSaVVJ','3745jezwgD','33525195oXxgSZ','length','trim','join','8152wyLdZD','3478JqKJqO','2810ImvJkE','collapseDuplicates','4003800TLZHBz','11432hoZSlw','defineProperty','replace','softTruncate','stripAnsi','\x20[x','push'];a0_0x5f14=function(){return _0xee5dd;};return a0_0x5f14();}function softTruncate(_0x541506,_0x3c83c3=0x4e20){const _0x559e7a=a0_0x5201dd;if(_0x541506[_0x559e7a(0x1e1)]<=_0x3c83c3)return _0x541506;const _0x455e6a=_0x541506[_0x559e7a(0x1da)]('\x0a');if(_0x455e6a[_0x559e7a(0x1e1)]<=0xc8)return _0x541506;const _0xc0772d=0x32,_0x1ac763=0x96,_0x47d016=_0x455e6a[_0x559e7a(0x1f2)](0x0,_0xc0772d),_0x5ab567=_0x455e6a[_0x559e7a(0x1f2)](_0x455e6a['length']-_0x1ac763),_0x5bb807=_0x541506[_0x559e7a(0x1e1)]-(_0x47d016[_0x559e7a(0x1e3)]('\x0a')['length']+_0x5ab567[_0x559e7a(0x1e3)]('\x0a')[_0x559e7a(0x1e1)]);return[..._0x47d016,'\x0a...\x20[TrimPrompt:\x20Truncated\x20'+_0x5bb807+_0x559e7a(0x1f1),..._0x5ab567]['join']('\x0a');}
|
package/filters/git.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x1d2616=a0_0x491f;function a0_0x3687(){const _0xe4aa0d=['create','489525pNdXUF','defineProperty','\x20(+','30CnWDSI','622161HQpRPs','push','join','\x0aUntracked\x20files:','map','\x0aChanges:','\x20untracked\x20files)','default','writable','---','get','\x20\x20??\x20','4286rlRzFO','8mBWIkQ','No\x20modifications','call','359136zkSTwD','unknown_file','10NUetdl','diff\x20--git','trim','filterGitLog','split','entries','filterGitStatus','5343239fFvkvy','getOwnPropertyNames','\x20\x20...\x20(+','\x20\x20...\x20+','substring','prototype','*\x20Branch:\x20','filter','1077734Grxygp','Clean\x20working\x20tree','configurable','match','replace','+++','slice','---END---','length','145mGCUWn','__importStar','startsWith','\x20more\x20modifications','__esModule','\x20lines\x20of\x20description)','path','3642FUMWCN'];a0_0x3687=function(){return _0xe4aa0d;};return a0_0x3687();}(function(_0x3fea7b,_0x8f0b65){const _0x2ef8b3=a0_0x491f,_0x3eee76=_0x3fea7b();while(!![]){try{const _0x15aeea=parseInt(_0x2ef8b3(0xdb))/0x1*(-parseInt(_0x2ef8b3(0xe8))/0x2)+-parseInt(_0x2ef8b3(0xd8))/0x3+parseInt(_0x2ef8b3(0xec))/0x4+-parseInt(_0x2ef8b3(0xcf))/0x5*(parseInt(_0x2ef8b3(0xd6))/0x6)+-parseInt(_0x2ef8b3(0xfd))/0x7*(parseInt(_0x2ef8b3(0xe9))/0x8)+parseInt(_0x2ef8b3(0xdc))/0x9*(-parseInt(_0x2ef8b3(0xee))/0xa)+parseInt(_0x2ef8b3(0xf5))/0xb;if(_0x15aeea===_0x8f0b65)break;else _0x3eee76['push'](_0x3eee76['shift']());}catch(_0x51ebb6){_0x3eee76['push'](_0x3eee76['shift']());}}}(a0_0x3687,0x1a36e));function a0_0x491f(_0x544239,_0x3f3c0d){_0x544239=_0x544239-0xcd;const _0x368782=a0_0x3687();let _0x491f08=_0x368782[_0x544239];return _0x491f08;}var __createBinding=this&&this['__createBinding']||(Object[a0_0x1d2616(0xd7)]?function(_0x4ee603,_0x31e1be,_0x52eb9e,_0x269999){const _0x10c26c=a0_0x1d2616;if(_0x269999===undefined)_0x269999=_0x52eb9e;var _0x1963c3=Object['getOwnPropertyDescriptor'](_0x31e1be,_0x52eb9e);(!_0x1963c3||(_0x10c26c(0xe6)in _0x1963c3?!_0x31e1be[_0x10c26c(0xd3)]:_0x1963c3[_0x10c26c(0xe4)]||_0x1963c3[_0x10c26c(0xff)]))&&(_0x1963c3={'enumerable':!![],'get':function(){return _0x31e1be[_0x52eb9e];}}),Object[_0x10c26c(0xd9)](_0x4ee603,_0x269999,_0x1963c3);}:function(_0x4f070c,_0x43f47b,_0x59d63b,_0x1cced6){if(_0x1cced6===undefined)_0x1cced6=_0x59d63b;_0x4f070c[_0x1cced6]=_0x43f47b[_0x59d63b];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a0_0x1d2616(0xd7)]?function(_0x2e5c4c,_0x4239e5){const _0x1e3f19=a0_0x1d2616;Object[_0x1e3f19(0xd9)](_0x2e5c4c,_0x1e3f19(0xe3),{'enumerable':!![],'value':_0x4239e5});}:function(_0x65f198,_0x2d50a6){_0x65f198['default']=_0x2d50a6;}),__importStar=this&&this[a0_0x1d2616(0xd0)]||(function(){var _0x13d100=function(_0x47ac3a){const _0x457884=a0_0x491f;return _0x13d100=Object[_0x457884(0xf6)]||function(_0x4e7f78){const _0x45b878=_0x457884;var _0x5ec8f6=[];for(var _0x3ae562 in _0x4e7f78)if(Object[_0x45b878(0xfa)]['hasOwnProperty'][_0x45b878(0xeb)](_0x4e7f78,_0x3ae562))_0x5ec8f6[_0x5ec8f6[_0x45b878(0xce)]]=_0x3ae562;return _0x5ec8f6;},_0x13d100(_0x47ac3a);};return function(_0x3343df){const _0x2a514a=a0_0x491f;if(_0x3343df&&_0x3343df['__esModule'])return _0x3343df;var _0x4eb42f={};if(_0x3343df!=null){for(var _0x1a435d=_0x13d100(_0x3343df),_0x145e96=0x0;_0x145e96<_0x1a435d[_0x2a514a(0xce)];_0x145e96++)if(_0x1a435d[_0x145e96]!=='default')__createBinding(_0x4eb42f,_0x3343df,_0x1a435d[_0x145e96]);}return __setModuleDefault(_0x4eb42f,_0x3343df),_0x4eb42f;};}());Object[a0_0x1d2616(0xd9)](exports,'__esModule',{'value':!![]}),exports[a0_0x1d2616(0xf4)]=filterGitStatus,exports[a0_0x1d2616(0xf1)]=filterGitLog,exports['filterGitDiff']=filterGitDiff;const path=__importStar(require(a0_0x1d2616(0xd5)));function filterGitStatus(_0x54a316){const _0x3e1fba=a0_0x1d2616,_0x5746ea=_0x54a316[_0x3e1fba(0xf2)]('\x0a')[_0x3e1fba(0xe0)](_0x570bb3=>_0x570bb3[_0x3e1fba(0xf0)]())[_0x3e1fba(0xfc)](_0x11083a=>_0x11083a['length']>0x0);if(_0x5746ea['length']===0x0)return _0x3e1fba(0xfe);const _0x592791=[],_0x2d01c2=[],_0x2863ba=[];for(const _0x2c065a of _0x5746ea){if(_0x2c065a[_0x3e1fba(0xd1)]('##')){const _0x32062b=_0x2c065a[_0x3e1fba(0x101)](/^##\s*/,'');_0x592791[_0x3e1fba(0xdd)](_0x3e1fba(0xfb)+_0x32062b);}else _0x2c065a[_0x3e1fba(0xd1)]('??')?_0x2d01c2[_0x3e1fba(0xdd)](_0x2c065a[_0x3e1fba(0xf9)](0x3)[_0x3e1fba(0xf0)]()):_0x2863ba[_0x3e1fba(0xdd)](_0x2c065a);}_0x2863ba[_0x3e1fba(0xce)]>0x0&&(_0x592791[_0x3e1fba(0xdd)](_0x3e1fba(0xe1)),_0x592791[_0x3e1fba(0xdd)](..._0x2863ba[_0x3e1fba(0xe0)](_0x52a521=>'\x20\x20'+_0x52a521)));if(_0x2d01c2[_0x3e1fba(0xce)]>0x0){_0x592791['push'](_0x3e1fba(0xdf));const _0x20bab1={},_0x44b330=[];for(const _0x1f466b of _0x2d01c2){const _0x3087df=path['dirname'](_0x1f466b);_0x3087df==='.'||_0x3087df===''?_0x44b330[_0x3e1fba(0xdd)](_0x1f466b):(!_0x20bab1[_0x3087df]&&(_0x20bab1[_0x3087df]=[]),_0x20bab1[_0x3087df][_0x3e1fba(0xdd)](path['basename'](_0x1f466b)));}for(const [_0x3c3ff7,_0x894dbb]of Object[_0x3e1fba(0xf3)](_0x20bab1)){if(_0x894dbb[_0x3e1fba(0xce)]>0x5)_0x592791[_0x3e1fba(0xdd)](_0x3e1fba(0xe7)+_0x3c3ff7+'/\x20('+_0x894dbb[_0x3e1fba(0xce)]+_0x3e1fba(0xe2));else for(const _0x7ae188 of _0x894dbb){_0x592791[_0x3e1fba(0xdd)](_0x3e1fba(0xe7)+path[_0x3e1fba(0xde)](_0x3c3ff7,_0x7ae188));}}for(const _0x532a16 of _0x44b330){_0x592791['push']('\x20\x20??\x20'+_0x532a16);}}return _0x592791[_0x3e1fba(0xde)]('\x0a');}function filterGitLog(_0x1027bd){const _0x4114e6=a0_0x1d2616,_0x34d457=_0x1027bd['split'](_0x4114e6(0xcd))[_0x4114e6(0xe0)](_0x591d7f=>_0x591d7f[_0x4114e6(0xf0)]())['filter'](_0x3db16e=>_0x3db16e['length']>0x0);if(_0x34d457[_0x4114e6(0xce)]===0x0)return _0x1027bd;const _0x4ceab=[];for(const _0x300de1 of _0x34d457){const _0x39ef1c=_0x300de1[_0x4114e6(0xf2)]('\x0a'),_0x292510=_0x39ef1c[0x0]||'',_0x742718=_0x39ef1c[_0x4114e6(0x103)](0x1)[_0x4114e6(0xe0)](_0x421785=>_0x421785[_0x4114e6(0xf0)]())[_0x4114e6(0xfc)](_0x3ef8a9=>_0x3ef8a9[_0x4114e6(0xce)]>0x0);_0x4ceab[_0x4114e6(0xdd)]('-\x20'+_0x292510),_0x742718['length']>0x0&&(_0x4ceab[_0x4114e6(0xdd)]('\x20\x20'+_0x742718[0x0]),_0x742718[_0x4114e6(0xce)]>0x1&&_0x4ceab[_0x4114e6(0xdd)](_0x4114e6(0xf7)+(_0x742718['length']-0x1)+_0x4114e6(0xd4)));}return _0x4ceab[_0x4114e6(0xde)]('\x0a');}function filterGitDiff(_0x3dd82e){const _0x577914=a0_0x1d2616,_0xb08b4e=_0x3dd82e[_0x577914(0xf2)]('\x0a'),_0xf3c72b=[];let _0x1f22f1='',_0x32338e=0x0,_0x1f61a9=0x0,_0x21c619=[];const _0x10c197=()=>{const _0x26f8a4=_0x577914;if(_0x1f22f1&&(_0x32338e>0x0||_0x1f61a9>0x0)){_0xf3c72b[_0x26f8a4(0xdd)]('[file]\x20'+_0x1f22f1+_0x26f8a4(0xda)+_0x32338e+'\x20-'+_0x1f61a9+')');const _0x470c9d=0xa,_0x2ac030=_0x21c619[_0x26f8a4(0x103)](0x0,_0x470c9d);for(const _0x4c4e8e of _0x2ac030){_0xf3c72b[_0x26f8a4(0xdd)]('\x20\x20'+_0x4c4e8e);}const _0x397bfc=_0x32338e+_0x1f61a9-_0x470c9d;_0x397bfc>0x0&&_0xf3c72b['push'](_0x26f8a4(0xf8)+_0x397bfc+_0x26f8a4(0xd2));}_0x32338e=0x0,_0x1f61a9=0x0,_0x21c619=[];};for(const _0x714733 of _0xb08b4e){if(_0x714733[_0x577914(0xd1)](_0x577914(0xef))){_0x10c197();const _0x3c79b0=_0x714733[_0x577914(0x100)](/\sb\/(.+)$/);_0x1f22f1=_0x3c79b0?_0x3c79b0[0x1]:_0x577914(0xed);}else{if(_0x714733[_0x577914(0xd1)]('+')&&!_0x714733[_0x577914(0xd1)](_0x577914(0x102)))_0x32338e++,_0x21c619['push'](_0x714733);else _0x714733['startsWith']('-')&&!_0x714733[_0x577914(0xd1)](_0x577914(0xe5))&&(_0x1f61a9++,_0x21c619['push'](_0x714733));}}_0x10c197();const _0x45febe=_0xf3c72b[_0x577914(0xde)]('\x0a');return _0x45febe[_0x577914(0xce)]>0x0?_0x45febe:_0x577914(0xea);}
|
package/filters/go.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';const a0_0x55161c=a0_0x1369;(function(_0x31e4a0,_0x57f7c2){const _0x4a867b=a0_0x1369,_0x60fc23=_0x31e4a0();while(!![]){try{const _0x5361e5=parseInt(_0x4a867b(0xb1))/0x1*(parseInt(_0x4a867b(0xae))/0x2)+-parseInt(_0x4a867b(0xa9))/0x3*(parseInt(_0x4a867b(0xaa))/0x4)+parseInt(_0x4a867b(0xa7))/0x5+-parseInt(_0x4a867b(0xac))/0x6+parseInt(_0x4a867b(0x93))/0x7*(-parseInt(_0x4a867b(0xa8))/0x8)+parseInt(_0x4a867b(0x90))/0x9+parseInt(_0x4a867b(0xb2))/0xa*(parseInt(_0x4a867b(0xa5))/0xb);if(_0x5361e5===_0x57f7c2)break;else _0x60fc23['push'](_0x60fc23['shift']());}catch(_0x413d9d){_0x60fc23['push'](_0x60fc23['shift']());}}}(a0_0x547b,0xe97ec));Object[a0_0x55161c(0x91)](exports,a0_0x55161c(0xa4),{'value':!![]}),exports['filterGoTest']=filterGoTest,exports[a0_0x55161c(0x9d)]=filterGoVet;function a0_0x1369(_0x331d50,_0x39f2ec){_0x331d50=_0x331d50-0x8c;const _0x547b1c=a0_0x547b();let _0x1369ac=_0x547b1c[_0x331d50];return _0x1369ac;}function a0_0x547b(){const _0x5c330d=['join','2834485eyoJGP','8mMxPtU','3lpLQkD','6896868fbjMte','Go\x20vet:\x20no\x20issues\x20found','10929474hCLeIg','trim','2CSwfDK','split','lines','962682wZURwe','52540spacar','match','Go\x20vet:\x20','length','push','4462218EpQkfE','defineProperty','slice','4582011QMELLV','===\x20RUN','FAIL','\x20more\x20failures','startsWith','PASS','\x20failed,\x20','Go\x20test:\x20','name','\x20passed,\x20','filterGoVet','\x20\x20...\x20+','includes','no\x20test\x20files','\x20more\x20lines','\x20skipped','...\x20+','__esModule','6556loBQLA'];a0_0x547b=function(){return _0x5c330d;};return a0_0x547b();}function filterGoTest(_0x24b7ed){const _0x718dfc=a0_0x55161c,_0x35c735=_0x24b7ed[_0x718dfc(0xaf)]('\x0a');let _0xff3e9b=0x0,_0x3fd96b=0x0,_0x2d581d=0x0;const _0x52d5b0=[],_0x49cb75=[];let _0x49674d=null;for(const _0x3a40fd of _0x35c735){const _0x5d4918=_0x3a40fd[_0x718dfc(0xad)](),_0x45cb6c=_0x5d4918[_0x718dfc(0x8c)](/^ok\s+\S+\s+[\d.]+s/);if(_0x45cb6c){_0x49cb75['push'](_0x5d4918);continue;}const _0x594d20=_0x5d4918[_0x718dfc(0x8c)](/^FAIL\s+\S+/);if(_0x594d20){_0x49cb75[_0x718dfc(0x8f)](_0x5d4918);continue;}const _0x1f4db2=_0x5d4918[_0x718dfc(0x8c)](/^--- PASS:/);if(_0x1f4db2){_0xff3e9b++;continue;}const _0x4d6f67=_0x5d4918[_0x718dfc(0x8c)](/^--- FAIL:\s+(\S+)/);if(_0x4d6f67){if(_0x49674d)_0x52d5b0[_0x718dfc(0x8f)](_0x49674d);_0x49674d={'name':_0x4d6f67[0x1],'lines':[]},_0x3fd96b++;continue;}if(_0x5d4918[_0x718dfc(0x97)]('---\x20SKIP:')){_0x2d581d++;continue;}_0x49674d&&_0x5d4918[_0x718dfc(0x8e)]>0x0&&!_0x5d4918[_0x718dfc(0x97)](_0x718dfc(0x94))&&_0x49674d['lines'][_0x718dfc(0x8f)](_0x3a40fd),_0x5d4918[_0x718dfc(0x97)](_0x718dfc(0x94))&&(_0x49674d&&(_0x52d5b0[_0x718dfc(0x8f)](_0x49674d),_0x49674d=null));}if(_0x49674d)_0x52d5b0[_0x718dfc(0x8f)](_0x49674d);if(_0xff3e9b===0x0&&_0x3fd96b===0x0&&_0x2d581d===0x0){if(_0x24b7ed[_0x718dfc(0x9f)](_0x718dfc(0x98))&&!_0x24b7ed[_0x718dfc(0x9f)](_0x718dfc(0x95)))return'Go\x20test:\x20all\x20tests\x20passed';if(_0x24b7ed[_0x718dfc(0x9f)](_0x718dfc(0xa0)))return'Go\x20test:\x20no\x20test\x20files';return _0x24b7ed;}if(_0x3fd96b===0x0){const _0xda9880=['Go\x20test:\x20'+_0xff3e9b+'\x20passed'];if(_0x2d581d>0x0)_0xda9880[_0x718dfc(0x8f)](_0x2d581d+_0x718dfc(0xa2));return _0xda9880[_0x718dfc(0xa6)](',\x20');}const _0xf13ead=[_0x718dfc(0x9a)+_0xff3e9b+_0x718dfc(0x9c)+_0x3fd96b+_0x718dfc(0x99)+_0x2d581d+'\x20skipped'];if(_0x52d5b0[_0x718dfc(0x8e)]>0x0){_0xf13ead['push']('\x0aFailures:');const _0x57a582=0x3;for(let _0x42b56b=0x0;_0x42b56b<Math['min'](_0x52d5b0[_0x718dfc(0x8e)],_0x57a582);_0x42b56b++){const _0x4c141d=_0x52d5b0[_0x42b56b];_0xf13ead['push']('\x20\x20'+(_0x42b56b+0x1)+'.\x20'+_0x4c141d[_0x718dfc(0x9b)]);for(const _0x58b0d4 of _0x4c141d['lines'][_0x718dfc(0x92)](0x0,0x5)){_0xf13ead[_0x718dfc(0x8f)]('\x20\x20\x20\x20'+_0x58b0d4[_0x718dfc(0xad)]());}_0x4c141d[_0x718dfc(0xb0)][_0x718dfc(0x8e)]>0x5&&_0xf13ead[_0x718dfc(0x8f)]('\x20\x20\x20\x20...\x20+'+(_0x4c141d[_0x718dfc(0xb0)][_0x718dfc(0x8e)]-0x5)+_0x718dfc(0xa1));}_0x52d5b0['length']>_0x57a582&&_0xf13ead[_0x718dfc(0x8f)](_0x718dfc(0x9e)+(_0x52d5b0['length']-_0x57a582)+_0x718dfc(0x96));}return _0xf13ead[_0x718dfc(0xa6)]('\x0a');}function filterGoVet(_0x4a45fd){const _0x13831b=a0_0x55161c,_0x50b515=_0x4a45fd[_0x13831b(0xaf)]('\x0a')['filter'](_0x12a0b9=>_0x12a0b9['trim']()[_0x13831b(0x8e)]>0x0);if(_0x50b515[_0x13831b(0x8e)]===0x0)return _0x13831b(0xab);if(_0x50b515[_0x13831b(0x8e)]<=0x14)return _0x4a45fd[_0x13831b(0xad)]();const _0x806d1=[_0x13831b(0x8d)+_0x50b515[_0x13831b(0x8e)]+'\x20issues\x20found'];return _0x806d1[_0x13831b(0x8f)](..._0x50b515[_0x13831b(0x92)](0x0,0xa)),_0x50b515['length']>0xa&&_0x806d1[_0x13831b(0x8f)](_0x13831b(0xa3)+(_0x50b515[_0x13831b(0x8e)]-0xa)+'\x20more\x20issues'),_0x806d1[_0x13831b(0xa6)]('\x0a');}
|
package/filters/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function a0_0x1f4a(){const _0x523ee5=['length','get','git\x20show','softTruncate','filterKubectl','pnpm\x20install','npm\x20run\x20test','trim\x20pip','trim\x20ls','5407065Ebnarg','trim\x20glab','redactor','942141SPfPrZ','collapseDuplicates','4jDzZtQ','filterJestVitest','587852WUbSkW','go\x20vet','./go','963762mqpPAG','toLowerCase','git\x20diff','git\x20status','filterRuff','3945gTwbPW','pip\x20install','4218361zXeYvj','includes','redact','./generic','trim\x20kubectl','pnpm\x20test','cargo\x20check','pip3\x20install','filterGoTest','npm\x20test','jest','trim\x20npm','compressOutput','trim','npm\x20i','yarn\x20install','filterGoVet','../redactor','filterNpmInstall','filterCargoTest','./js','filterPytest','filterLs','__esModule','946576PJyrYp','trim\x20pytest','\x20ls','match','yarn\x20test','18IytRVE','trim\x20gh','filterGitDiff','\x20tree\x20','cargo\x20test','yadm\x20status','trim\x20docker','go\x20test','endsWith','vitest','\x20tree','\x20ls\x20','filterDockerImages','./devops','cargo\x20build','trim\x20','filterPipInstall','stripAnsi','npm\x20i\x20','filterCargoBuild','filterGitLog','trim\x20grep','filterTree','trim\x20read','ruff\x20check','trim\x20git','defineProperty'];a0_0x1f4a=function(){return _0x523ee5;};return a0_0x1f4a();}const a0_0x317c9d=a0_0x31df;(function(_0x4d14de,_0x50c719){const _0x457097=a0_0x31df,_0x923c5=_0x4d14de();while(!![]){try{const _0x3817f3=parseInt(_0x457097(0x1ac))/0x1+-parseInt(_0x457097(0x15d))/0x2+-parseInt(_0x457097(0x1a8))/0x3*(-parseInt(_0x457097(0x1aa))/0x4)+parseInt(_0x457097(0x162))/0x5*(parseInt(_0x457097(0x181))/0x6)+parseInt(_0x457097(0x164))/0x7+-parseInt(_0x457097(0x17c))/0x8+-parseInt(_0x457097(0x1a5))/0x9;if(_0x3817f3===_0x50c719)break;else _0x923c5['push'](_0x923c5['shift']());}catch(_0x341e5a){_0x923c5['push'](_0x923c5['shift']());}}}(a0_0x1f4a,0x4aaed));function a0_0x31df(_0x51ba58,_0x2168a6){_0x51ba58=_0x51ba58-0x15c;const _0x1f4abf=a0_0x1f4a();let _0x31df96=_0x1f4abf[_0x51ba58];return _0x31df96;}Object[a0_0x317c9d(0x19b)](exports,a0_0x317c9d(0x17b),{'value':!![]}),exports[a0_0x317c9d(0x170)]=compressOutput,exports['rewriteCommand']=rewriteCommand;const generic_1=require(a0_0x317c9d(0x167)),git_1=require('./git'),python_1=require('./python'),js_1=require(a0_0x317c9d(0x178)),shell_1=require('./shell'),rust_1=require('./rust'),go_1=require(a0_0x317c9d(0x15c)),devops_1=require(a0_0x317c9d(0x18e)),redactor_1=require(a0_0x317c9d(0x175));function compressOutput(_0x47f1b2,_0x3c7e5e,_0x1b633f,_0x4ac306=!![]){const _0x4c166e=a0_0x317c9d,_0x271a30=_0x47f1b2[_0x4c166e(0x171)]();let _0x2055c6=_0x3c7e5e;_0x1b633f['trim']()[_0x4c166e(0x19c)]>0x0&&(_0x2055c6=_0x3c7e5e+'\x0a'+_0x1b633f);let _0x2d551c=(0x0,generic_1[_0x4c166e(0x192)])(_0x2055c6);_0x4ac306&&(_0x2d551c=redactor_1[_0x4c166e(0x1a7)][_0x4c166e(0x166)](_0x2d551c));const _0x5ca076=_0x271a30[_0x4c166e(0x15e)]();try{if(_0x5ca076[_0x4c166e(0x165)](_0x4c166e(0x160))||_0x5ca076[_0x4c166e(0x165)](_0x4c166e(0x186)))return(0x0,git_1['filterGitStatus'])(_0x2d551c);if(_0x5ca076[_0x4c166e(0x165)]('git\x20log')||_0x5ca076[_0x4c166e(0x165)]('yadm\x20log'))return(0x0,git_1[_0x4c166e(0x195)])(_0x2d551c);if(_0x5ca076[_0x4c166e(0x165)](_0x4c166e(0x15f))||_0x5ca076[_0x4c166e(0x165)](_0x4c166e(0x19e))||_0x5ca076[_0x4c166e(0x165)]('yadm\x20diff'))return(0x0,git_1[_0x4c166e(0x183)])(_0x2d551c);if(_0x5ca076['includes']('pytest')||_0x5ca076[_0x4c166e(0x17f)](/python3?\s+-m\s+pytest/))return(0x0,python_1[_0x4c166e(0x179)])(_0x2d551c);if(_0x5ca076[_0x4c166e(0x165)](_0x4c166e(0x163))||_0x5ca076[_0x4c166e(0x165)](_0x4c166e(0x16b)))return(0x0,python_1[_0x4c166e(0x191)])(_0x2d551c);if(_0x5ca076[_0x4c166e(0x165)](_0x4c166e(0x199))||_0x5ca076['includes']('ruff\x20'))return(0x0,devops_1[_0x4c166e(0x161)])(_0x2d551c);if(_0x5ca076[_0x4c166e(0x165)]('npm\x20install')||_0x5ca076['includes'](_0x4c166e(0x193))||_0x5ca076['endsWith'](_0x4c166e(0x172))||_0x5ca076[_0x4c166e(0x165)](_0x4c166e(0x1a1))||_0x5ca076[_0x4c166e(0x165)](_0x4c166e(0x173)))return(0x0,js_1[_0x4c166e(0x176)])(_0x2d551c);if(_0x5ca076[_0x4c166e(0x165)](_0x4c166e(0x16e))||_0x5ca076[_0x4c166e(0x165)](_0x4c166e(0x18a)))return(0x0,js_1[_0x4c166e(0x1ab)])(_0x2d551c);if(_0x5ca076[_0x4c166e(0x165)](_0x4c166e(0x16d))||_0x5ca076[_0x4c166e(0x165)](_0x4c166e(0x169))||_0x5ca076[_0x4c166e(0x165)](_0x4c166e(0x180))||_0x5ca076[_0x4c166e(0x165)](_0x4c166e(0x1a2)))return(0x0,js_1['filterJestVitest'])(_0x2d551c);if(_0x5ca076[_0x4c166e(0x165)](_0x4c166e(0x185)))return(0x0,rust_1[_0x4c166e(0x177)])(_0x2d551c);if(_0x5ca076[_0x4c166e(0x165)](_0x4c166e(0x18f))||_0x5ca076['includes'](_0x4c166e(0x16a))||_0x5ca076['includes']('cargo\x20clippy'))return(0x0,rust_1[_0x4c166e(0x194)])(_0x2d551c);if(_0x5ca076['includes'](_0x4c166e(0x188)))return(0x0,go_1[_0x4c166e(0x16c)])(_0x2d551c);if(_0x5ca076[_0x4c166e(0x165)](_0x4c166e(0x1ad)))return(0x0,go_1[_0x4c166e(0x174)])(_0x2d551c);if(_0x5ca076[_0x4c166e(0x17f)](/docker\s+ps/))return(0x0,devops_1['filterDockerPs'])(_0x2d551c);if(_0x5ca076[_0x4c166e(0x17f)](/docker\s+images/))return(0x0,devops_1[_0x4c166e(0x18d)])(_0x2d551c);if(_0x5ca076[_0x4c166e(0x17f)](/docker\s+logs/))return(0x0,devops_1['filterDockerLogs'])(_0x2d551c);if(_0x5ca076[_0x4c166e(0x165)]('kubectl')){const _0x105211=_0x5ca076[_0x4c166e(0x17f)](/kubectl\s+(get|logs|describe|apply)/),_0x299da3=_0x105211?_0x105211[0x1]:_0x4c166e(0x19d);return(0x0,devops_1[_0x4c166e(0x1a0)])(_0x2d551c,_0x299da3);}if(_0x5ca076['match'](/^(ls|dir)(\s|$)/)||_0x5ca076[_0x4c166e(0x165)](_0x4c166e(0x18c))||_0x5ca076[_0x4c166e(0x189)](_0x4c166e(0x17e)))return(0x0,shell_1[_0x4c166e(0x17a)])(_0x2d551c);if(_0x5ca076['match'](/^tree(\s|$)/)||_0x5ca076[_0x4c166e(0x165)](_0x4c166e(0x184))||_0x5ca076[_0x4c166e(0x189)](_0x4c166e(0x18b)))return(0x0,shell_1[_0x4c166e(0x197)])(_0x2d551c);if(_0x5ca076[_0x4c166e(0x17f)](/^(cat|head|tail|read|bat)(\s|$)/))return(0x0,shell_1['filterCat'])(_0x2d551c);if(_0x5ca076[_0x4c166e(0x17f)](/^(grep|rg|ripgrep)(\s|$)/))return(0x0,shell_1['filterGrep'])(_0x2d551c);}catch(_0x404563){}return _0x2d551c=(0x0,generic_1[_0x4c166e(0x1a9)])(_0x2d551c),_0x2d551c=(0x0,generic_1[_0x4c166e(0x19f)])(_0x2d551c,0x4e20),_0x2d551c;}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_0x317c9d(0x19a)},{'pattern':/^gh\s+(pr|issue|run|repo|api|release)/,'prefix':a0_0x317c9d(0x182)},{'pattern':/^glab\s+(mr|issue|ci|pipeline|api|release)/,'prefix':a0_0x317c9d(0x1a6)},{'pattern':/^cargo\s+(build|test|clippy|check|fmt|install)/,'prefix':'trim\x20cargo'},{'pattern':/^pnpm\s+(exec|i|install|list|ls|outdated|run|run-script)/,'prefix':'trim\x20pnpm'},{'pattern':/^npm\s+(exec|run|run-script|rum|urn|x|test)(\s|$)/,'prefix':a0_0x317c9d(0x16f)},{'pattern':/^npx\s+/,'prefix':'trim\x20npx'},{'pattern':/^(cat|head|tail)\s+/,'prefix':a0_0x317c9d(0x198)},{'pattern':/^(rg|grep)\s+/,'prefix':a0_0x317c9d(0x196)},{'pattern':/^ls(\s|$)/,'prefix':a0_0x317c9d(0x1a4)},{'pattern':/^tree(\s|$)/,'prefix':'trim\x20tree'},{'pattern':/^find\s+/,'prefix':'trim\x20find'},{'pattern':/^docker\s+(ps|images|logs|run|exec|build|compose)/,'prefix':a0_0x317c9d(0x187)},{'pattern':/^kubectl\s+(get|logs|describe|apply)/,'prefix':a0_0x317c9d(0x168)},{'pattern':/^(python3?\s+-m\s+)?pytest(\s|$)/,'prefix':a0_0x317c9d(0x17d)},{'pattern':/^ruff\s+(check|format)/,'prefix':'trim\x20ruff'},{'pattern':/^(pip3?|uv\s+pip)\s+(list|outdated|install|show)/,'prefix':a0_0x317c9d(0x1a3)},{'pattern':/^go\s+(test|build|vet)/,'prefix':'trim\x20go'}];function rewriteCommand(_0x5ec371){const _0x5cc2dc=a0_0x317c9d,_0x2186de=_0x5ec371[_0x5cc2dc(0x171)]();if(_0x2186de['startsWith'](_0x5cc2dc(0x190)))return _0x2186de;for(const _0x49f1f7 of REWRITE_RULES){if(_0x49f1f7['pattern']['test'](_0x2186de))return _0x5cc2dc(0x190)+_0x2186de;}return _0x2186de;}
|
package/filters/js.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function a0_0x190d(){const _0x32e923=['\x20\x20...\x20(','850232PvyHfX','startsWith','462144tLUTpw','push','length','2560740YGlHJV','4082930ZlcdSe','all','__esModule','4385316OXPyZT','\x20total)','audited\x20','removed\x20','slice','replace','found\x20','98swaAHk','includes','6452NpdEIg','Test\x20Suites:','FAIL','up\x20to\x20date','defineProperty','split','join','match','added\x20','\x0aFailures:','\x20passed','trim','Test\x20Runner:\x20','814692UQBhSB','filterJestVitest','FAIL\x20\x20','filterNpmInstall','PASS','\x20failed\x20(','Tests:'];a0_0x190d=function(){return _0x32e923;};return a0_0x190d();}const a0_0x245549=a0_0x19f4;(function(_0x52f728,_0x118d68){const _0x2f5746=a0_0x19f4,_0x20f731=_0x52f728();while(!![]){try{const _0x4ebc57=parseInt(_0x2f5746(0x19c))/0x1*(-parseInt(_0x2f5746(0x19e))/0x2)+-parseInt(_0x2f5746(0x1ab))/0x3+-parseInt(_0x2f5746(0x1b3))/0x4+parseInt(_0x2f5746(0x1b9))/0x5+parseInt(_0x2f5746(0x1bc))/0x6+-parseInt(_0x2f5746(0x1b8))/0x7+parseInt(_0x2f5746(0x1b5))/0x8;if(_0x4ebc57===_0x118d68)break;else _0x20f731['push'](_0x20f731['shift']());}catch(_0x4e11be){_0x20f731['push'](_0x20f731['shift']());}}}(a0_0x190d,0x6b36e));Object[a0_0x245549(0x1a2)](exports,a0_0x245549(0x1bb),{'value':!![]}),exports[a0_0x245549(0x1ae)]=filterNpmInstall,exports[a0_0x245549(0x1ac)]=filterJestVitest;function a0_0x19f4(_0x1e36a8,_0x4607f3){_0x1e36a8=_0x1e36a8-0x19c;const _0x190dab=a0_0x190d();let _0x19f49b=_0x190dab[_0x1e36a8];return _0x19f49b;}function filterNpmInstall(_0x41d8c0){const _0x13dcbe=a0_0x245549,_0x3b7d9d=_0x41d8c0[_0x13dcbe(0x1c1)](/\r/g,'\x0a'),_0x59b9df=_0x3b7d9d[_0x13dcbe(0x1a3)]('\x0a'),_0x2d85d1=[];for(const _0x3a8712 of _0x59b9df){const _0x44b7c0=_0x3a8712['trim']();(_0x44b7c0[_0x13dcbe(0x19d)](_0x13dcbe(0x1a6))||_0x44b7c0['includes'](_0x13dcbe(0x1bf))||_0x44b7c0['includes'](_0x13dcbe(0x1be))||_0x44b7c0[_0x13dcbe(0x19d)](_0x13dcbe(0x1a1))||_0x44b7c0[_0x13dcbe(0x19d)](_0x13dcbe(0x1c2)))&&(!_0x44b7c0['includes']('%')&&!_0x44b7c0['startsWith']('⠋')&&!_0x44b7c0[_0x13dcbe(0x1b4)]('⠙')&&_0x2d85d1[_0x13dcbe(0x1b6)](_0x44b7c0));}const _0x4c5a46=_0x2d85d1['join']('\x0a')[_0x13dcbe(0x1a9)]();return _0x4c5a46[_0x13dcbe(0x1b7)]>0x0?_0x4c5a46:'NPM:\x20Packages\x20verified/installed\x20successfully';}function filterJestVitest(_0x1e9b20){const _0x583895=a0_0x245549,_0x258b96=_0x1e9b20[_0x583895(0x1a3)]('\x0a');let _0x467a24=0x0,_0x220da6=0x0,_0x42c3bb=0x0;const _0x33b117=[];let _0x5dec76=![];for(const _0xdc9d3d of _0x258b96){const _0x19461e=_0xdc9d3d['trim']();if(_0x19461e[_0x583895(0x1b4)](_0x583895(0x1b1))||_0x19461e[_0x583895(0x19d)]('Test\x20Files:')){const _0x3a1c3a=_0x19461e['match'](/(\d+)\s+passed/),_0x470914=_0x19461e[_0x583895(0x1a5)](/(\d+)\s+failed/),_0xbd7b49=_0x19461e[_0x583895(0x1a5)](/(\d+)\s+total/);if(_0x3a1c3a)_0x467a24=parseInt(_0x3a1c3a[0x1]);if(_0x470914)_0x220da6=parseInt(_0x470914[0x1]);if(_0xbd7b49)_0x42c3bb=parseInt(_0xbd7b49[0x1]);continue;}(_0x19461e[_0x583895(0x1b4)]('❯')||_0x19461e[_0x583895(0x1b4)]('●')||_0x19461e[_0x583895(0x1b4)](_0x583895(0x1ad)))&&(_0x5dec76=!![]),_0x5dec76&&(_0x19461e['length']>0x0&&!_0x19461e[_0x583895(0x1b4)](_0x583895(0x19f))&&!_0x19461e[_0x583895(0x1b4)](_0x583895(0x1b1))&&_0x33b117[_0x583895(0x1b6)](_0xdc9d3d));}if(_0x42c3bb===0x0&&_0x467a24===0x0&&_0x220da6===0x0){if(_0x1e9b20['includes'](_0x583895(0x1af))&&!_0x1e9b20[_0x583895(0x19d)](_0x583895(0x1a0))){const _0x26fb00=_0x1e9b20['match'](/(\d+)\s+passed/),_0x1eb5ea=_0x26fb00?_0x26fb00[0x1]:_0x583895(0x1ba);return _0x583895(0x1aa)+_0x1eb5ea+_0x583895(0x1a8);}return _0x1e9b20;}if(_0x220da6===0x0&&_0x467a24>0x0)return _0x583895(0x1aa)+_0x467a24+'\x20passed';const _0x428752=[_0x583895(0x1aa)+_0x467a24+'\x20passed,\x20'+_0x220da6+_0x583895(0x1b0)+_0x42c3bb+_0x583895(0x1bd)];if(_0x33b117[_0x583895(0x1b7)]>0x0){_0x428752[_0x583895(0x1b6)](_0x583895(0x1a7));const _0x493d03=0x19,_0x470697=_0x33b117[_0x583895(0x1c0)](0x0,_0x493d03);for(const _0xada0c9 of _0x470697){_0x428752[_0x583895(0x1b6)]('\x20\x20'+_0xada0c9);}_0x33b117[_0x583895(0x1b7)]>_0x493d03&&_0x428752['push'](_0x583895(0x1b2)+(_0x33b117[_0x583895(0x1b7)]-_0x493d03)+'\x20lines\x20of\x20trace\x20details\x20truncated)');}return _0x428752[_0x583895(0x1a4)]('\x0a');}
|