trimprompt 1.0.9 → 1.0.10
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/README.md +1 -1
- package/cache.js +1 -1
- package/cli.js +1 -1
- package/dashboard.js +1 -1
- package/executor.js +1 -1
- package/filters/devops.js +1 -1
- package/filters/generic.js +1 -1
- package/filters/git.js +1 -1
- package/filters/go.js +1 -1
- package/filters/index.js +1 -1
- package/filters/js.js +1 -1
- package/filters/python.js +1 -1
- package/filters/rust.js +1 -1
- package/filters/shell.js +1 -1
- package/mcp.js +1 -1
- package/package.json +9 -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/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
It intercepts common shell tool executions, strips ANSI coloring, removes redundant boilerplate, collapses duplicate logs, and applies specialized filters for `git`, `npm`/`pnpm`/`yarn`, `pytest`, `jest`, `pip`, and more—all before the outputs reach your AI agent's context window.
|
|
6
6
|
|
|
7
|
-

|
|
7
|
+

|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
package/cache.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0xbf542=a0_0x39e1;(function(_0x508dd7,_0x187a19){const _0x149b0c=a0_0x39e1,_0x5b1e23=_0x508dd7();while(!![]){try{const _0x21d533=-parseInt(_0x149b0c(0x1c6))/0x1*(-parseInt(_0x149b0c(0x1cb))/0x2)+parseInt(_0x149b0c(0x1e9))/0x3*(-parseInt(_0x149b0c(0x1d5))/0x4)+parseInt(_0x149b0c(0x1f3))/0x5*(parseInt(_0x149b0c(0x1ce))/0x6)+-parseInt(_0x149b0c(0x1fd))/0x7+-parseInt(_0x149b0c(0x1e8))/0x8*(-parseInt(_0x149b0c(0x1f1))/0x9)+parseInt(_0x149b0c(0x1dd))/0xa*(-parseInt(_0x149b0c(0x1f2))/0xb)+parseInt(_0x149b0c(0x1eb))/0xc;if(_0x21d533===_0x187a19)break;else _0x5b1e23['push'](_0x5b1e23['shift']());}catch(_0x1d9baf){_0x5b1e23['push'](_0x5b1e23['shift']());}}}(a0_0xefd7,0x735a0));var __createBinding=this&&this[a0_0xbf542(0x1ea)]||(Object[a0_0xbf542(0x1f0)]?function(_0x1c99d6,_0x3c9367,_0x4825b4,_0x36041f){const _0x4df26d=a0_0xbf542;if(_0x36041f===undefined)_0x36041f=_0x4825b4;var _0x5ca898=Object[_0x4df26d(0x1da)](_0x3c9367,_0x4825b4);(!_0x5ca898||(_0x4df26d(0x1c1)in _0x5ca898?!_0x3c9367['__esModule']:_0x5ca898[_0x4df26d(0x1f9)]||_0x5ca898['configurable']))&&(_0x5ca898={'enumerable':!![],'get':function(){return _0x3c9367[_0x4825b4];}}),Object[_0x4df26d(0x1ff)](_0x1c99d6,_0x36041f,_0x5ca898);}:function(_0x4695cc,_0x30c425,_0x36033c,_0x3eb2ef){if(_0x3eb2ef===undefined)_0x3eb2ef=_0x36033c;_0x4695cc[_0x3eb2ef]=_0x30c425[_0x36033c];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a0_0xbf542(0x1f0)]?function(_0x2b72d0,_0x194435){const _0x520818=a0_0xbf542;Object[_0x520818(0x1ff)](_0x2b72d0,'default',{'enumerable':!![],'value':_0x194435});}:function(_0x447be5,_0x28cf69){const _0x48340e=a0_0xbf542;_0x447be5[_0x48340e(0x205)]=_0x28cf69;}),__importStar=this&&this[a0_0xbf542(0x207)]||(function(){var _0x26608a=function(_0x34e8bd){const _0x15ded5=a0_0x39e1;return _0x26608a=Object[_0x15ded5(0x1d3)]||function(_0x1b4143){const _0x3cdcbc=_0x15ded5;var _0x161a98=[];for(var _0x3b9a67 in _0x1b4143)if(Object[_0x3cdcbc(0x1bf)][_0x3cdcbc(0x204)][_0x3cdcbc(0x1fa)](_0x1b4143,_0x3b9a67))_0x161a98[_0x161a98[_0x3cdcbc(0x1c2)]]=_0x3b9a67;return _0x161a98;},_0x26608a(_0x34e8bd);};return function(_0x3f235c){const _0x29bf4b=a0_0x39e1;if(_0x3f235c&&_0x3f235c['__esModule'])return _0x3f235c;var _0x3291d3={};if(_0x3f235c!=null){for(var _0x4c2155=_0x26608a(_0x3f235c),_0x53c339=0x0;_0x53c339<_0x4c2155[_0x29bf4b(0x1c2)];_0x53c339++)if(_0x4c2155[_0x53c339]!==_0x29bf4b(0x205))__createBinding(_0x3291d3,_0x3f235c,_0x4c2155[_0x53c339]);}return __setModuleDefault(_0x3291d3,_0x3f235c),_0x3291d3;};}());Object[a0_0xbf542(0x1ff)](exports,'__esModule',{'value':!![]}),exports[a0_0xbf542(0x1f5)]=dedup;const fs=__importStar(require('fs')),path=__importStar(require('path')),os=__importStar(require('os')),crypto=__importStar(require('crypto')),CACHE_DIR=path[a0_0xbf542(0x1f7)](os['homedir'](),a0_0xbf542(0x1dc)),CACHE_FILE=path[a0_0xbf542(0x1f7)](CACHE_DIR,a0_0xbf542(0x1e0)),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(_0x2ea4e0){const _0x1cc88d=a0_0xbf542,_0x3f3e2a=_0x2ea4e0[_0x1cc88d(0x1e3)]()['toLowerCase']();if(_0x3f3e2a['match'](/^(cat|head|tail|read|bat)\s/))return _0x1cc88d(0x1d1);if(_0x3f3e2a['includes']('git\x20status')||_0x3f3e2a[_0x1cc88d(0x1d7)](_0x1cc88d(0x1c7)))return _0x1cc88d(0x1e5);if(_0x3f3e2a['includes'](_0x1cc88d(0x1c3))||_0x3f3e2a['includes'](_0x1cc88d(0x1ef)))return _0x1cc88d(0x1fe);if(_0x3f3e2a[_0x1cc88d(0x1d7)](_0x1cc88d(0x1fb))||_0x3f3e2a['includes'](_0x1cc88d(0x1f4)))return _0x1cc88d(0x1de);if(_0x3f3e2a['match'](/^(ls|dir)(\s|$)/)||_0x3f3e2a[_0x1cc88d(0x1d7)](_0x1cc88d(0x1c9))||_0x3f3e2a['endsWith']('\x20ls'))return'ls';if(_0x3f3e2a[_0x1cc88d(0x1f8)](/^tree(\s|$)/)||_0x3f3e2a[_0x1cc88d(0x1d7)](_0x1cc88d(0x1df))||_0x3f3e2a['endsWith'](_0x1cc88d(0x1c4)))return'tree';if(_0x3f3e2a[_0x1cc88d(0x1f8)](/docker\s+ps/))return _0x1cc88d(0x1d9);if(_0x3f3e2a['match'](/docker\s+images/))return _0x1cc88d(0x202);if(_0x3f3e2a['includes'](_0x1cc88d(0x1e4))||_0x3f3e2a['includes'](_0x1cc88d(0x203)))return _0x1cc88d(0x1d4);if(_0x3f3e2a[_0x1cc88d(0x1d7)](_0x1cc88d(0x1ee))||_0x3f3e2a[_0x1cc88d(0x1d7)](_0x1cc88d(0x1c0)))return'ruff';if(_0x3f3e2a['includes'](_0x1cc88d(0x1c5)))return _0x1cc88d(0x200);return'';}function a0_0x39e1(_0x5297d6,_0x3bb84b){_0x5297d6=_0x5297d6-0x1bd;const _0xefd78a=a0_0xefd7();let _0x39e127=_0xefd78a[_0x5297d6];return _0x39e127;}function a0_0xefd7(){const _0x2003dc=['go-vet','hex','docker-images','kubectl\x20describe','hasOwnProperty','default','hash','__importStar','update','\x20chars','prototype','ruff\x20','get','length','git\x20log','\x20tree','go\x20vet','535SpbaxS','yadm\x20status','parse','\x20ls\x20','round','436nbKhTH','startsWith','now','6KhYiAt','existsSync','split','file','\x20lines','getOwnPropertyNames','kubectl','1612TFcRaZ','[cached\x20—\x20unchanged\x20since\x20','includes','timestamp','docker-ps','getOwnPropertyDescriptor','keys','.trimprompt','10nDRMNc','git-show','\x20tree\x20','cache.json','docker','cwd','trim','kubectl\x20get','git-status','s\x20ago,\x20','md5','568qlnntD','4113APSOpo','__createBinding','15304920bKHkFC','\x20lines,\x20','summary','ruff\x20check','yadm\x20log','create','93096DNCxDs','6964628wtpAIt','1939325AqtxdU','yadm\x20show','dedup','utf8','join','match','writable','call','git\x20show','mkdirSync','5993316jGzrOk','git-log','defineProperty'];a0_0xefd7=function(){return _0x2003dc;};return a0_0xefd7();}function md5(_0x2a6ef5){const _0xfb73f7=a0_0xbf542;return crypto['createHash'](_0xfb73f7(0x1e7))[_0xfb73f7(0x1bd)](_0x2a6ef5)['digest'](_0xfb73f7(0x201));}function loadStore(){const _0x325527=a0_0xbf542;try{if(fs[_0x325527(0x1cf)](CACHE_FILE))return JSON[_0x325527(0x1c8)](fs['readFileSync'](CACHE_FILE,_0x325527(0x1f6)));}catch{}return{};}function saveStore(_0x3f5d95){const _0x187596=a0_0xbf542;try{if(!fs[_0x187596(0x1cf)](CACHE_DIR))fs[_0x187596(0x1fc)](CACHE_DIR,{'recursive':!![]});const _0x3743a8=Object[_0x187596(0x1db)](_0x3f5d95);if(_0x3743a8[_0x187596(0x1c2)]>MAX_ENTRIES){const _0x49394e=_0x3743a8['sort']((_0x45fd0c,_0x336a96)=>_0x3f5d95[_0x45fd0c][_0x187596(0x1d8)]-_0x3f5d95[_0x336a96]['timestamp']);for(const _0x4c872c of _0x49394e['slice'](0x0,_0x3743a8[_0x187596(0x1c2)]-MAX_ENTRIES)){delete _0x3f5d95[_0x4c872c];}}fs['writeFileSync'](CACHE_FILE,JSON['stringify'](_0x3f5d95),'utf8');}catch{}}function buildSummary(_0x2e3139,_0x171ed6){const _0x4b9d96=a0_0xbf542,_0x4f6c14=_0x2e3139[_0x4b9d96(0x1d0)]('\x0a')['length'],_0x132842=_0x2e3139['length'];if(_0x171ed6===_0x4b9d96(0x1d1))return _0x4f6c14+_0x4b9d96(0x1ec)+_0x132842+_0x4b9d96(0x1be);if(_0x171ed6===_0x4b9d96(0x1e5))return _0x4f6c14+_0x4b9d96(0x1d2);if(_0x171ed6===_0x4b9d96(0x1fe))return _0x4f6c14+'\x20entries';if(_0x171ed6[_0x4b9d96(0x1cc)](_0x4b9d96(0x1e1)))return _0x4f6c14+_0x4b9d96(0x1d2);return _0x4f6c14+_0x4b9d96(0x1ec)+_0x132842+_0x4b9d96(0x1be);}function dedup(_0x1fb8c8,_0x5bdbc6){const _0x5e2b90=a0_0xbf542;try{const _0x5aa89a=classifyCommand(_0x1fb8c8);if(!_0x5aa89a)return null;const _0x137c8d=TTL_SECONDS[_0x5aa89a];if(!_0x137c8d)return null;const _0x1f1dac=process[_0x5e2b90(0x1e2)](),_0x284892=md5(_0x1f1dac+'::'+_0x1fb8c8['trim']()),_0x2ff48c=md5(_0x5bdbc6),_0x45ae51=Date[_0x5e2b90(0x1cd)](),_0x3d521d=loadStore(),_0x1fef74=_0x3d521d[_0x284892];if(_0x1fef74&&_0x1fef74[_0x5e2b90(0x206)]===_0x2ff48c&&_0x45ae51-_0x1fef74[_0x5e2b90(0x1d8)]<_0x137c8d*0x3e8){const _0x1c0b60=Math[_0x5e2b90(0x1ca)]((_0x45ae51-_0x1fef74[_0x5e2b90(0x1d8)])/0x3e8);return _0x5e2b90(0x1d6)+_0x1c0b60+_0x5e2b90(0x1e6)+_0x1fef74[_0x5e2b90(0x1ed)]+']';}_0x3d521d[_0x284892]={'hash':_0x2ff48c,'summary':buildSummary(_0x5bdbc6,_0x5aa89a),'timestamp':_0x45ae51,'chars':_0x5bdbc6['length']},saveStore(_0x3d521d);}catch{}return null;}
|
package/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
'use strict';const a0_0x197887=a0_0x35aa;(function(_0x4dbb29,_0x5db5ab){const _0x5495a6=a0_0x35aa,_0x33acf3=_0x4dbb29();while(!![]){try{const _0x59a8b4=parseInt(_0x5495a6(0x10f))/0x1+-parseInt(_0x5495a6(0xa4))/0x2+-parseInt(_0x5495a6(0xe1))/0x3*(-parseInt(_0x5495a6(0xc6))/0x4)+-parseInt(_0x5495a6(0x92))/0x5+parseInt(_0x5495a6(0x116))/0x6*(parseInt(_0x5495a6(0xdc))/0x7)+parseInt(_0x5495a6(0xef))/0x8+parseInt(_0x5495a6(0xdd))/0x9*(parseInt(_0x5495a6(0xa8))/0xa);if(_0x59a8b4===_0x5db5ab)break;else _0x33acf3['push'](_0x33acf3['shift']());}catch(_0x161cc1){_0x33acf3['push'](_0x33acf3['shift']());}}}(a0_0xb595,0x5e91f));var __createBinding=this&&this[a0_0x197887(0xdf)]||(Object[a0_0x197887(0x104)]?function(_0x4744ec,_0x55e229,_0x50dfa6,_0x153e76){const _0x26df68=a0_0x197887;if(_0x153e76===undefined)_0x153e76=_0x50dfa6;var _0x1e716a=Object[_0x26df68(0x8e)](_0x55e229,_0x50dfa6);(!_0x1e716a||(_0x26df68(0x119)in _0x1e716a?!_0x55e229[_0x26df68(0x95)]:_0x1e716a['writable']||_0x1e716a[_0x26df68(0xe4)]))&&(_0x1e716a={'enumerable':!![],'get':function(){return _0x55e229[_0x50dfa6];}}),Object['defineProperty'](_0x4744ec,_0x153e76,_0x1e716a);}:function(_0x572d42,_0x2af6d0,_0x1ecbc5,_0x3f43ae){if(_0x3f43ae===undefined)_0x3f43ae=_0x1ecbc5;_0x572d42[_0x3f43ae]=_0x2af6d0[_0x1ecbc5];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a0_0x197887(0x104)]?function(_0x433f24,_0x59d478){const _0x305a6e=a0_0x197887;Object[_0x305a6e(0x108)](_0x433f24,_0x305a6e(0xe0),{'enumerable':!![],'value':_0x59d478});}:function(_0x56c8fd,_0x4f7180){const _0x391986=a0_0x197887;_0x56c8fd[_0x391986(0xe0)]=_0x4f7180;}),__importStar=this&&this[a0_0x197887(0x109)]||(function(){var _0x3a9e70=function(_0x441f6e){const _0x3d0be6=a0_0x35aa;return _0x3a9e70=Object[_0x3d0be6(0xa5)]||function(_0x2053c4){const _0x21a014=_0x3d0be6;var _0x3d360e=[];for(var _0x2cf294 in _0x2053c4)if(Object['prototype'][_0x21a014(0xb4)]['call'](_0x2053c4,_0x2cf294))_0x3d360e[_0x3d360e[_0x21a014(0x8d)]]=_0x2cf294;return _0x3d360e;},_0x3a9e70(_0x441f6e);};return function(_0x54d915){const _0x42f129=a0_0x35aa;if(_0x54d915&&_0x54d915[_0x42f129(0x95)])return _0x54d915;var _0x3a72da={};if(_0x54d915!=null){for(var _0x8cab7b=_0x3a9e70(_0x54d915),_0x4f0ee5=0x0;_0x4f0ee5<_0x8cab7b[_0x42f129(0x8d)];_0x4f0ee5++)if(_0x8cab7b[_0x4f0ee5]!==_0x42f129(0xe0))__createBinding(_0x3a72da,_0x54d915,_0x8cab7b[_0x4f0ee5]);}return __setModuleDefault(_0x3a72da,_0x54d915),_0x3a72da;};}());Object[a0_0x197887(0x108)](exports,'__esModule',{'value':!![]});const commander_1=require(a0_0x197887(0x110)),executor_1=require(a0_0x197887(0xc7)),filters_1=require(a0_0x197887(0xb5)),tracker_1=require(a0_0x197887(0x11e)),cache_1=require('./cache'),shims_1=require('./shims'),dashboard_1=require('./dashboard'),program=new commander_1['Command']();function isDisabled(){return process.env.TRIMPROMPT_DISABLED==='1';}function adjustCommandArgs(_0x21cff9,_0x5eab0c){const _0x2d9204=a0_0x197887,_0x50265d=_0x21cff9[_0x2d9204(0xfe)]();if(_0x50265d===_0x2d9204(0x100)||_0x50265d==='yadm'){const _0x4ccc44=_0x5eab0c[0x0];if(_0x4ccc44===_0x2d9204(0xcc)){const _0x5904a7=_0x5eab0c['slice'](0x1),_0x300a5c=_0x5904a7[_0x2d9204(0x8d)]===0x0||_0x5904a7[_0x2d9204(0x9f)](_0x3eefbf=>{const _0x4e6ae8=_0x2d9204;return _0x3eefbf==='-b'||_0x3eefbf===_0x4e6ae8(0x8f)||_0x3eefbf==='-sb'||_0x3eefbf==='-bs'||_0x3eefbf==='-s'||_0x3eefbf===_0x4e6ae8(0x11c);});if(_0x300a5c)return{'cmd':_0x21cff9,'args':[_0x2d9204(0xcc),'--porcelain','-b']};}else{if(_0x4ccc44===_0x2d9204(0x102)){const _0x46a465=_0x5eab0c[_0x2d9204(0xdb)](0x1),_0x4e0b16=_0x46a465[_0x2d9204(0x118)](_0x1f083e=>_0x1f083e[_0x2d9204(0xac)](_0x2d9204(0xd5))||_0x1f083e['startsWith'](_0x2d9204(0xad))||_0x1f083e[_0x2d9204(0xac)](_0x2d9204(0x113))),_0x6e7fa4=_0x46a465[_0x2d9204(0x118)](_0x7cec99=>_0x7cec99[_0x2d9204(0xac)]('-')&&/^\d+$/[_0x2d9204(0xb1)](_0x7cec99[_0x2d9204(0xdb)](0x1))||_0x7cec99==='-n'||_0x7cec99['startsWith']('--max-count')),_0xb7a8a2=[..._0x5eab0c];if(!_0x4e0b16){const _0x1c41f3=_0x2d9204(0xa0);_0xb7a8a2['push'](process[_0x2d9204(0xfa)]===_0x2d9204(0xc4)?'\x22'+_0x1c41f3+'\x22':_0x1c41f3);}!_0x6e7fa4&&(_0x4e0b16?_0xb7a8a2[_0x2d9204(0x11f)](_0x2d9204(0xf8)):_0xb7a8a2[_0x2d9204(0x11f)](_0x2d9204(0x93)));const _0x28f1dd=_0x46a465[_0x2d9204(0x118)](_0x42ac3e=>_0x42ac3e===_0x2d9204(0x9b)||_0x42ac3e==='--no-merges'||_0x42ac3e['startsWith'](_0x2d9204(0xe6)));return!_0x28f1dd&&!_0x6e7fa4&&_0xb7a8a2[_0x2d9204(0x11f)]('--no-merges'),{'cmd':_0x21cff9,'args':_0xb7a8a2};}}}return{'cmd':_0x21cff9,'args':_0x5eab0c};}function isMcpServerExecution(_0x5e1f39,_0x594b3c){const _0x4ab30d=a0_0x197887,_0xc70daa=_0x5e1f39[_0x4ab30d(0xfe)](),_0x2d601f=_0x594b3c[_0x4ab30d(0x10e)]('\x20')[_0x4ab30d(0xfe)]();if(_0xc70daa['includes']('mcp')&&(_0xc70daa[_0x4ab30d(0xa9)](_0x4ab30d(0x103))||_0xc70daa[_0x4ab30d(0xa9)](_0x4ab30d(0xd8))))return!![];if(_0xc70daa===_0x4ab30d(0xa3)||_0xc70daa===_0x4ab30d(0xee)||_0xc70daa===_0x4ab30d(0xe5)||_0xc70daa===_0x4ab30d(0xd6)||_0xc70daa===_0x4ab30d(0x114)||_0xc70daa==='yarn'){if(_0x2d601f[_0x4ab30d(0xa9)]('@modelcontextprotocol/')||_0x2d601f[_0x4ab30d(0xa9)]('modelcontextprotocol')||_0x2d601f[_0x4ab30d(0xa9)]('mcp-server')||_0x2d601f[_0x4ab30d(0xa9)]('server-mcp'))return!![];}if(_0x594b3c[_0x4ab30d(0x118)](_0x513e66=>{const _0x20280f=_0x4ab30d,_0x8f9aee=_0x513e66[_0x20280f(0xfe)]();return _0x8f9aee['includes']('mcp-server')||_0x8f9aee[_0x20280f(0xa9)](_0x20280f(0xe2))||_0x8f9aee[_0x20280f(0xa9)](_0x20280f(0xf4))||_0x8f9aee==='mcp-proxy'||_0x8f9aee===_0x20280f(0xb2);}))return!![];return![];}function a0_0x35aa(_0x569500,_0x3c7148){_0x569500=_0x569500-0x8d;const _0xb595c9=a0_0xb595();let _0x35aa38=_0xb595c9[_0x569500];return _0x35aa38;}async function runProxy(_0xd2920c){const _0xb99fc1=a0_0x197887;if(_0xd2920c[_0xb99fc1(0x8d)]===0x0){program[_0xb99fc1(0xea)]();return;}const _0x1ff3e8=_0xd2920c[0x0],_0x441a88=_0xd2920c[_0xb99fc1(0xdb)](0x1),_0x98ac57=_0xd2920c[_0xb99fc1(0x10e)]('\x20');if(isDisabled()){const _0x1b17d4=await(0x0,executor_1['executeCommand'])(_0x1ff3e8,_0x441a88);process['stdout'][_0xb99fc1(0x111)](_0x1b17d4[_0xb99fc1(0xe7)]),process[_0xb99fc1(0xf0)][_0xb99fc1(0x111)](_0x1b17d4[_0xb99fc1(0xf0)]),process[_0xb99fc1(0xbf)](_0x1b17d4[_0xb99fc1(0x94)]);}if(isMcpServerExecution(_0x1ff3e8,_0x441a88)){console[_0xb99fc1(0xd0)](_0xb99fc1(0xf1));const {runMcpProxy:_0x2728bb}=await Promise['resolve']()[_0xb99fc1(0x10b)](()=>__importStar(require(_0xb99fc1(0xf2))));_0x2728bb(_0x1ff3e8,_0x441a88);return;}const _0x5e4741=adjustCommandArgs(_0x1ff3e8,_0x441a88),_0x27545d=await(0x0,executor_1[_0xb99fc1(0xeb)])(_0x5e4741[_0xb99fc1(0xb9)],_0x5e4741[_0xb99fc1(0x112)]),_0xd237bd=(0x0,filters_1['compressOutput'])(_0x98ac57,_0x27545d[_0xb99fc1(0xe7)],_0x27545d[_0xb99fc1(0xf0)],tracker_1[_0xb99fc1(0xbb)][_0xb99fc1(0xa1)]()[_0xb99fc1(0xc8)]),_0x35fae0=_0x27545d[_0xb99fc1(0xe7)]+(_0x27545d[_0xb99fc1(0xf0)][_0xb99fc1(0xce)]()[_0xb99fc1(0x8d)]>0x0?'\x0a'+_0x27545d[_0xb99fc1(0xf0)]:''),_0x243670=_0xd237bd[_0xb99fc1(0x8d)]<_0x35fae0['length']?_0xd237bd:_0x35fae0,_0x3081a7=_0x27545d['exitCode']===0x0?(0x0,cache_1[_0xb99fc1(0x96)])(_0x98ac57,_0x243670):null,_0x4fdecd=_0x3081a7||_0x243670;tracker_1[_0xb99fc1(0xbb)][_0xb99fc1(0xd4)](_0x98ac57,_0x35fae0,_0x4fdecd,_0x27545d[_0xb99fc1(0x94)]),_0x27545d[_0xb99fc1(0x94)]===0x0?process[_0xb99fc1(0xe7)][_0xb99fc1(0x111)](_0x4fdecd+'\x0a'):(process[_0xb99fc1(0xe7)][_0xb99fc1(0x111)](_0xd237bd+'\x0a'),_0x27545d[_0xb99fc1(0xf0)][_0xb99fc1(0xce)]()[_0xb99fc1(0x8d)]>0x0&&!_0xd237bd['includes'](_0x27545d[_0xb99fc1(0xf0)][_0xb99fc1(0xce)]())&&process[_0xb99fc1(0xf0)][_0xb99fc1(0x111)](_0x27545d[_0xb99fc1(0xf0)]+'\x0a')),process[_0xb99fc1(0xbf)](_0x27545d[_0xb99fc1(0x94)]);}program[a0_0x197887(0x97)](a0_0x197887(0xce))[a0_0x197887(0x107)]('TrimPrompt.ai\x20-\x20Reduce\x20LLM\x20token\x20consumption\x20by\x2060-90%')[a0_0x197887(0x11b)](a0_0x197887(0xec)),program[a0_0x197887(0xc2)]('ui')['alias']('dashboard')[a0_0x197887(0x107)]('Start\x20the\x20local\x20developer\x20dashboard')[a0_0x197887(0xe3)](a0_0x197887(0xa6),a0_0x197887(0xbc),a0_0x197887(0xd2))['action'](_0x15cff1=>{const _0x3b4f04=a0_0x197887,_0x49bb7a=parseInt(_0x15cff1[_0x3b4f04(0xde)],0xa);(0x0,dashboard_1['startDashboard'])(_0x49bb7a);}),program[a0_0x197887(0xc2)](a0_0x197887(0xfb))[a0_0x197887(0x107)](a0_0x197887(0xf9))['option'](a0_0x197887(0x98),a0_0x197887(0xd7),a0_0x197887(0x11a))[a0_0x197887(0xf3)](_0x272a81=>{const _0x3f65c6=a0_0x197887,_0x26f026=tracker_1['tracker']['getStatsSummary'](_0x272a81[_0x3f65c6(0xb3)]);console['log'](_0x3f65c6(0x91)),console[_0x3f65c6(0x102)](_0x3f65c6(0xe9)),console[_0x3f65c6(0x102)](_0x3f65c6(0x10a)),console['log']('Model\x20Context:\x20\x20\x20\x20\x20'+_0x26f026[_0x3f65c6(0xbd)]),console['log'](_0x3f65c6(0xfc)+_0x26f026[_0x3f65c6(0x9a)][_0x3f65c6(0xc5)]()),console[_0x3f65c6(0x102)](_0x3f65c6(0x106)+_0x26f026[_0x3f65c6(0xf6)][_0x3f65c6(0xc5)]()),console[_0x3f65c6(0x102)](_0x3f65c6(0xda)+_0x26f026['total_tokens_saved']['toLocaleString']()),console[_0x3f65c6(0x102)](_0x3f65c6(0xd9)+_0x26f026['savings_percentage']+'%'),console[_0x3f65c6(0x102)](_0x3f65c6(0xfd)+_0x26f026['raw_cost_usd']['toFixed'](0x4)+'\x20(before\x20Shave)'),console['log']('Actual\x20Cost:\x20\x20\x20\x20\x20\x20\x20$'+_0x26f026['compressed_cost_usd']['toFixed'](0x4)+'\x20(after\x20Shave)'),console['log']('---------------------------------------------'),console[_0x3f65c6(0x102)]('Money\x20Saved:\x20\x20\x20\x20\x20\x20\x20$'+_0x26f026[_0x3f65c6(0x9e)][_0x3f65c6(0xb6)](0x4)+_0x3f65c6(0x11d)),console[_0x3f65c6(0x102)](_0x3f65c6(0xf5));}),program['command'](a0_0x197887(0x115))[a0_0x197887(0x107)]('Manage\x20local\x20configuration\x20parameters')[a0_0x197887(0xd1)](a0_0x197887(0xff),a0_0x197887(0xc9))[a0_0x197887(0xd1)](a0_0x197887(0xe8),'config\x20parameter\x20name')[a0_0x197887(0xd1)](a0_0x197887(0xcb),'value\x20to\x20set')[a0_0x197887(0xf3)]((_0x1fdec7,_0x4e4e7d,_0x445374)=>{const _0x2a9768=a0_0x197887;if(_0x1fdec7===_0x2a9768(0x119)){const _0x5aa921=tracker_1[_0x2a9768(0xbb)]['getConfig']();console['log'](_0x4e4e7d+':\x20'+_0x5aa921[_0x4e4e7d]);}else{if(_0x1fdec7===_0x2a9768(0xcf)){_0x445374===undefined&&(console[_0x2a9768(0xd0)]('Error:\x20Value\x20required\x20for\x20set\x20action'),process[_0x2a9768(0xbf)](0x1));let _0x2bb3c2=_0x445374;if(_0x445374===_0x2a9768(0x105))_0x2bb3c2=!![];if(_0x445374===_0x2a9768(0xae))_0x2bb3c2=![];if(/^\d+$/[_0x2a9768(0xb1)](_0x445374))_0x2bb3c2=parseInt(_0x445374,0xa);tracker_1[_0x2a9768(0xbb)][_0x2a9768(0xca)](_0x4e4e7d,_0x2bb3c2),console[_0x2a9768(0x102)](_0x2a9768(0xab)+_0x4e4e7d+_0x2a9768(0xed)+_0x445374);}else console[_0x2a9768(0xd0)](_0x2a9768(0xc3)),process[_0x2a9768(0xbf)](0x1);}}),program[a0_0x197887(0xc2)](a0_0x197887(0xc1))[a0_0x197887(0x107)](a0_0x197887(0xa7))[a0_0x197887(0xd1)](a0_0x197887(0xff),a0_0x197887(0xd3))[a0_0x197887(0xf3)](_0x216d01=>{const _0x2ffb63=a0_0x197887;if(_0x216d01===_0x2ffb63(0xaf)){const _0x51703d=(0x0,shims_1['installShims'])();console[_0x2ffb63(0x102)](_0x51703d[_0x2ffb63(0x90)]);}else{if(_0x216d01===_0x2ffb63(0x101)){const _0x595b3c=(0x0,shims_1['uninstallShims'])();console[_0x2ffb63(0x102)](_0x595b3c[_0x2ffb63(0x90)]);}else console[_0x2ffb63(0xd0)](_0x2ffb63(0xb8)),process[_0x2ffb63(0xbf)](0x1);}}),program[a0_0x197887(0xc2)](a0_0x197887(0xaa))[a0_0x197887(0x107)](a0_0x197887(0x99))[a0_0x197887(0xd1)](a0_0x197887(0x10d),'Command\x20line\x20to\x20evaluate')['action'](_0x437fe8=>{const _0x3fa131=a0_0x197887;if(isDisabled()){console[_0x3fa131(0x102)](_0x437fe8);return;}const _0x27eb5c=(0x0,filters_1[_0x3fa131(0xbe)])(_0x437fe8);console[_0x3fa131(0x102)](_0x27eb5c);}),program[a0_0x197887(0xc2)](a0_0x197887(0xa2))[a0_0x197887(0xb0)](a0_0x197887(0xb2))[a0_0x197887(0x107)](a0_0x197887(0xf7))[a0_0x197887(0xd1)]('<server-command>',a0_0x197887(0xba))[a0_0x197887(0xd1)]('[server-args...]',a0_0x197887(0xc0))[a0_0x197887(0xf3)](async(_0x4695db,_0x4fa425)=>{const _0x397f42=a0_0x197887,{runMcpProxy:_0x552743}=await Promise['resolve']()[_0x397f42(0x10b)](()=>__importStar(require(_0x397f42(0xf2))));_0x552743(_0x4695db,_0x4fa425);});function a0_0xb595(){const _0x9464b7=['mcp','model','hasOwnProperty','./filters','toFixed','[TrimPrompt]\x20Fatal\x20Proxy\x20Error:\x20','Error:\x20Action\x20must\x20be\x20install\x20or\x20uninstall','cmd','Command\x20to\x20launch\x20the\x20target\x20MCP\x20server','tracker','Port\x20to\x20run\x20the\x20dashboard\x20on','model_name','rewriteCommand','exit','Arguments\x20for\x20the\x20target\x20MCP\x20server','shims','command','Error:\x20Action\x20must\x20be\x20get\x20or\x20set','win32','toLocaleString','1997524XMlYkV','./executor','redaction_enabled','get\x20or\x20set','setConfig','[value]','status','dashboard','trim','set','error','argument','4000','install\x20or\x20uninstall','logExecution','--oneline','npm','Select\x20pricing\x20model\x20(e.g.\x20claude-3-5-sonnet,\x20gpt-4o)','proxy','Reduction\x20Rate:\x20\x20\x20\x20','Tokens\x20Saved:\x20\x20\x20\x20\x20\x20','slice','225253QSYocn','1832436XTTRQP','port','__createBinding','default','3hFVBKR','server-mcp','option','configurable','bun','--min-parents','stdout','<key>','\x20\x20\x20\x20\x20\x20\x20TRIMPROMPT.AI\x20SAVINGS\x20SUMMARY\x20\x20\x20\x20\x20\x20\x20\x20','help','executeCommand','1.0.0','\x20=\x20','node','2995696MjMyoe','stderr','[TrimPrompt]\x20Autodetected\x20MCP\x20server\x20execution.\x20Activating\x20real-time\x20JSON-RPC\x20proxy...','./mcp','action','@modelcontextprotocol/','=============================================\x0a','total_compressed_tokens','Proxy\x20wrapper\x20for\x20Model\x20Context\x20Protocol\x20(MCP)\x20servers\x20to\x20compact\x20tool\x20outputs','-50','Show\x20token\x20and\x20cost\x20savings\x20summary','platform','stats','Raw\x20Tokens:\x20\x20\x20\x20\x20\x20\x20\x20','Estimated\x20Cost:\x20\x20\x20\x20$','toLowerCase','<action>','git','uninstall','log','server','create','true','Compressed:\x20\x20\x20\x20\x20\x20\x20\x20','description','defineProperty','__importStar','=============================================','then','--version','<commandLine>','join','119997LyikZm','commander','write','args','--format','pnpm','config','66LCbNkR','argv','some','get','claude-3-5-sonnet','version','--short','\x20USD','./tracker','push','length','getOwnPropertyDescriptor','--branch','message','\x0a=============================================','3434635ToRXRC','-10','exitCode','__esModule','dedup','name','-m,\x20--model\x20<string>','Check\x20a\x20command\x20line\x20and\x20return\x20the\x20optimized\x20command\x20line','total_raw_tokens','--merges','catch','parse','money_saved_usd','every','--pretty=format:%h\x20%s\x20(%ar)\x20(%an)%n%b%n---END---','getConfig','mcp-proxy','npx','1361462veOLhw','getOwnPropertyNames','-p,\x20--port\x20<number>','Install\x20or\x20uninstall\x20system\x20command\x20shims','20yLqLom','includes','rewrite','Config\x20set\x20','startsWith','--pretty','false','install','alias','test'];a0_0xb595=function(){return _0x9464b7;};return a0_0xb595();}const args=process[a0_0x197887(0x117)][a0_0x197887(0xdb)](0x2),firstArg=args[0x0],subcommands=['ui',a0_0x197887(0xcd),'stats','config',a0_0x197887(0xc1),a0_0x197887(0xaa),a0_0x197887(0xa2),a0_0x197887(0xb2),a0_0x197887(0xea),'--help','-h',a0_0x197887(0x11b),a0_0x197887(0x10c),'-v'];firstArg&&!subcommands['includes'](firstArg)?runProxy(args)[a0_0x197887(0x9c)](_0xd0200c=>{const _0x98d98a=a0_0x197887;console[_0x98d98a(0xd0)](_0x98d98a(0xb7)+_0xd0200c['message']),process[_0x98d98a(0xbf)](0x1);}):program[a0_0x197887(0x9d)](process[a0_0x197887(0x117)]);
|
|
2
|
+
'use strict';const a0_0x3bf3ae=a0_0x1200;(function(_0x26b363,_0x188d2f){const _0x314499=a0_0x1200,_0x36e5e2=_0x26b363();while(!![]){try{const _0x4c4425=parseInt(_0x314499(0x10f))/0x1+-parseInt(_0x314499(0x137))/0x2+-parseInt(_0x314499(0x131))/0x3+-parseInt(_0x314499(0x179))/0x4*(parseInt(_0x314499(0x111))/0x5)+parseInt(_0x314499(0xfb))/0x6+parseInt(_0x314499(0x185))/0x7*(-parseInt(_0x314499(0x168))/0x8)+parseInt(_0x314499(0x148))/0x9*(parseInt(_0x314499(0x174))/0xa);if(_0x4c4425===_0x188d2f)break;else _0x36e5e2['push'](_0x36e5e2['shift']());}catch(_0x29343e){_0x36e5e2['push'](_0x36e5e2['shift']());}}}(a0_0x5512,0x4b61d));function a0_0x1200(_0x2d989e,_0x56c3d5){_0x2d989e=_0x2d989e-0xf6;const _0x5512ea=a0_0x5512();let _0x120091=_0x5512ea[_0x2d989e];return _0x120091;}var __createBinding=this&&this[a0_0x3bf3ae(0x109)]||(Object[a0_0x3bf3ae(0x124)]?function(_0x54bf61,_0x3b1aea,_0x279100,_0xc3a8e1){const _0x9f3dba=a0_0x3bf3ae;if(_0xc3a8e1===undefined)_0xc3a8e1=_0x279100;var _0xcc7175=Object[_0x9f3dba(0x104)](_0x3b1aea,_0x279100);(!_0xcc7175||(_0x9f3dba(0x13c)in _0xcc7175?!_0x3b1aea[_0x9f3dba(0x121)]:_0xcc7175['writable']||_0xcc7175[_0x9f3dba(0xfa)]))&&(_0xcc7175={'enumerable':!![],'get':function(){return _0x3b1aea[_0x279100];}}),Object[_0x9f3dba(0x112)](_0x54bf61,_0xc3a8e1,_0xcc7175);}:function(_0xa97831,_0x220983,_0x270f54,_0x39321f){if(_0x39321f===undefined)_0x39321f=_0x270f54;_0xa97831[_0x39321f]=_0x220983[_0x270f54];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a0_0x3bf3ae(0x124)]?function(_0x1cefc1,_0x116cf5){Object['defineProperty'](_0x1cefc1,'default',{'enumerable':!![],'value':_0x116cf5});}:function(_0x4cbf6b,_0x16770a){const _0x430790=a0_0x3bf3ae;_0x4cbf6b[_0x430790(0x13f)]=_0x16770a;}),__importStar=this&&this[a0_0x3bf3ae(0x16e)]||(function(){var _0xeec25c=function(_0x412a46){return _0xeec25c=Object['getOwnPropertyNames']||function(_0xa667d5){const _0x1ab78f=a0_0x1200;var _0x53e073=[];for(var _0x286404 in _0xa667d5)if(Object[_0x1ab78f(0x12c)][_0x1ab78f(0x151)][_0x1ab78f(0x189)](_0xa667d5,_0x286404))_0x53e073[_0x53e073[_0x1ab78f(0x160)]]=_0x286404;return _0x53e073;},_0xeec25c(_0x412a46);};return function(_0x59cf01){const _0x1b7d2b=a0_0x1200;if(_0x59cf01&&_0x59cf01['__esModule'])return _0x59cf01;var _0x1bbc68={};if(_0x59cf01!=null){for(var _0x516c23=_0xeec25c(_0x59cf01),_0x1bcf68=0x0;_0x1bcf68<_0x516c23[_0x1b7d2b(0x160)];_0x1bcf68++)if(_0x516c23[_0x1bcf68]!==_0x1b7d2b(0x13f))__createBinding(_0x1bbc68,_0x59cf01,_0x516c23[_0x1bcf68]);}return __setModuleDefault(_0x1bbc68,_0x59cf01),_0x1bbc68;};}());Object[a0_0x3bf3ae(0x112)](exports,a0_0x3bf3ae(0x121),{'value':!![]});const commander_1=require(a0_0x3bf3ae(0x14c)),executor_1=require('./executor'),filters_1=require(a0_0x3bf3ae(0x169)),tracker_1=require(a0_0x3bf3ae(0x136)),cache_1=require(a0_0x3bf3ae(0x142)),shims_1=require(a0_0x3bf3ae(0x180)),dashboard_1=require(a0_0x3bf3ae(0x15a)),program=new commander_1[(a0_0x3bf3ae(0x171))]();function isDisabled(){return process.env.TRIMPROMPT_DISABLED==='1';}function adjustCommandArgs(_0x2a2b8d,_0x37c348){const _0x130a13=a0_0x3bf3ae,_0x4904c9=_0x2a2b8d[_0x130a13(0x13a)]();if(_0x4904c9===_0x130a13(0xf8)||_0x4904c9==='yadm'){const _0x3c3d15=_0x37c348[0x0];if(_0x3c3d15===_0x130a13(0x18d)){const _0x34c0a2=_0x37c348[_0x130a13(0x192)](0x1),_0x2116d1=_0x34c0a2['length']===0x0||_0x34c0a2[_0x130a13(0x117)](_0x4a0337=>{const _0x8e4d0e=_0x130a13;return _0x4a0337==='-b'||_0x4a0337==='--branch'||_0x4a0337===_0x8e4d0e(0x159)||_0x4a0337===_0x8e4d0e(0x11c)||_0x4a0337==='-s'||_0x4a0337===_0x8e4d0e(0x188);});if(_0x2116d1)return{'cmd':_0x2a2b8d,'args':[_0x130a13(0x18d),'--porcelain','-b']};}else{if(_0x3c3d15===_0x130a13(0x13e)){const _0x23e7f9=_0x37c348[_0x130a13(0x192)](0x1),_0xb8c832=_0x23e7f9['some'](_0x427494=>_0x427494['startsWith'](_0x130a13(0x129))||_0x427494['startsWith'](_0x130a13(0x176))||_0x427494[_0x130a13(0x184)](_0x130a13(0x154))),_0x2b4da8=_0x23e7f9['some'](_0x202f0d=>_0x202f0d[_0x130a13(0x184)]('-')&&/^\d+$/['test'](_0x202f0d[_0x130a13(0x192)](0x1))||_0x202f0d==='-n'||_0x202f0d['startsWith'](_0x130a13(0x115))),_0x42116c=[..._0x37c348];if(!_0xb8c832){const _0x189015=_0x130a13(0xfd);_0x42116c[_0x130a13(0xfc)](process[_0x130a13(0x17c)]===_0x130a13(0x110)?'\x22'+_0x189015+'\x22':_0x189015);}!_0x2b4da8&&(_0xb8c832?_0x42116c[_0x130a13(0xfc)](_0x130a13(0x190)):_0x42116c[_0x130a13(0xfc)](_0x130a13(0x123)));const _0x29b9ad=_0x23e7f9['some'](_0x158efa=>_0x158efa===_0x130a13(0x166)||_0x158efa===_0x130a13(0x187)||_0x158efa[_0x130a13(0x184)]('--min-parents'));return!_0x29b9ad&&!_0x2b4da8&&_0x42116c[_0x130a13(0xfc)](_0x130a13(0x187)),{'cmd':_0x2a2b8d,'args':_0x42116c};}}}return{'cmd':_0x2a2b8d,'args':_0x37c348};}function isMcpServerExecution(_0x2609d7,_0xf17514){const _0x120b11=a0_0x3bf3ae,_0x714b5c=_0x2609d7['toLowerCase'](),_0x146b98=_0xf17514[_0x120b11(0x102)]('\x20')[_0x120b11(0x13a)]();if(_0x714b5c['includes']('mcp')&&(_0x714b5c['includes'](_0x120b11(0x173))||_0x714b5c[_0x120b11(0x16f)](_0x120b11(0x114))))return!![];if(_0x714b5c===_0x120b11(0x177)||_0x714b5c==='node'||_0x714b5c===_0x120b11(0x162)||_0x714b5c==='npm'||_0x714b5c===_0x120b11(0x186)||_0x714b5c===_0x120b11(0x16d)){if(_0x146b98[_0x120b11(0x16f)]('@modelcontextprotocol/')||_0x146b98[_0x120b11(0x16f)]('modelcontextprotocol')||_0x146b98[_0x120b11(0x16f)]('mcp-server')||_0x146b98[_0x120b11(0x16f)](_0x120b11(0x16c)))return!![];}if(_0xf17514[_0x120b11(0x144)](_0x768e50=>{const _0x32dd8=_0x120b11,_0x9d6f6f=_0x768e50[_0x32dd8(0x13a)]();return _0x9d6f6f[_0x32dd8(0x16f)](_0x32dd8(0x113))||_0x9d6f6f[_0x32dd8(0x16f)](_0x32dd8(0x16c))||_0x9d6f6f['includes'](_0x32dd8(0x12d))||_0x9d6f6f===_0x32dd8(0x147)||_0x9d6f6f==='mcp';}))return!![];return![];}async function runProxy(_0x4bb3a9){const _0x14d929=a0_0x3bf3ae;if(_0x4bb3a9[_0x14d929(0x160)]===0x0){program[_0x14d929(0x167)]();return;}const _0x372e3c=_0x4bb3a9[0x0],_0x20b4bd=_0x4bb3a9[_0x14d929(0x192)](0x1),_0x4d5b41=_0x4bb3a9['join']('\x20');if(isDisabled()){const _0x20a0a5=await(0x0,executor_1[_0x14d929(0x155)])(_0x372e3c,_0x20b4bd);process[_0x14d929(0x116)][_0x14d929(0x141)](_0x20a0a5[_0x14d929(0x116)]),process[_0x14d929(0x18c)]['write'](_0x20a0a5['stderr']),process['exit'](_0x20a0a5['exitCode']);}if(isMcpServerExecution(_0x372e3c,_0x20b4bd)){console['error'](_0x14d929(0x156));const {runMcpProxy:_0x326a87}=await Promise[_0x14d929(0x118)]()[_0x14d929(0x17e)](()=>__importStar(require(_0x14d929(0x130))));_0x326a87(_0x372e3c,_0x20b4bd);return;}const _0x424544=adjustCommandArgs(_0x372e3c,_0x20b4bd),_0x246537=await(0x0,executor_1[_0x14d929(0x155)])(_0x424544[_0x14d929(0x12b)],_0x424544['args']),_0x10d57c=(0x0,filters_1[_0x14d929(0x122)])(_0x4d5b41,_0x246537[_0x14d929(0x116)],_0x246537['stderr'],tracker_1[_0x14d929(0x101)][_0x14d929(0x164)]()[_0x14d929(0x182)]),_0x50cacd=_0x246537[_0x14d929(0x116)]+(_0x246537['stderr'][_0x14d929(0x133)]()['length']>0x0?'\x0a'+_0x246537['stderr']:''),_0x2d3108=_0x10d57c[_0x14d929(0x160)]<_0x50cacd[_0x14d929(0x160)]?_0x10d57c:_0x50cacd,_0xeed47c=_0x246537[_0x14d929(0x17d)]===0x0?(0x0,cache_1['dedup'])(_0x4d5b41,_0x2d3108):null,_0x1ed156=_0xeed47c||_0x2d3108;tracker_1['tracker'][_0x14d929(0x125)](_0x4d5b41,_0x50cacd,_0x1ed156,_0x246537['exitCode']),_0x246537[_0x14d929(0x17d)]===0x0?process[_0x14d929(0x116)][_0x14d929(0x141)](_0x1ed156+'\x0a'):(process[_0x14d929(0x116)][_0x14d929(0x141)](_0x10d57c+'\x0a'),_0x246537[_0x14d929(0x18c)][_0x14d929(0x133)]()[_0x14d929(0x160)]>0x0&&!_0x10d57c[_0x14d929(0x16f)](_0x246537[_0x14d929(0x18c)][_0x14d929(0x133)]())&&process['stderr'][_0x14d929(0x141)](_0x246537[_0x14d929(0x18c)]+'\x0a')),process[_0x14d929(0x175)](_0x246537['exitCode']);}program['name']('trim')[a0_0x3bf3ae(0x170)](a0_0x3bf3ae(0x146))[a0_0x3bf3ae(0x149)](a0_0x3bf3ae(0x126)),program['command']('ui')[a0_0x3bf3ae(0x11b)](a0_0x3bf3ae(0xfe))['description'](a0_0x3bf3ae(0x15c))[a0_0x3bf3ae(0x10d)](a0_0x3bf3ae(0x18b),a0_0x3bf3ae(0x178),a0_0x3bf3ae(0x18e))[a0_0x3bf3ae(0x105)](_0x1b63b3=>{const _0x5c8e18=parseInt(_0x1b63b3['port'],0xa);(0x0,dashboard_1['startDashboard'])(_0x5c8e18);}),program[a0_0x3bf3ae(0x17b)]('stats')[a0_0x3bf3ae(0x170)](a0_0x3bf3ae(0x12e))['option'](a0_0x3bf3ae(0x15d),a0_0x3bf3ae(0x17a),a0_0x3bf3ae(0x100))[a0_0x3bf3ae(0x105)](_0x3722d3=>{const _0x5085e3=a0_0x3bf3ae,_0x3ffd72=tracker_1[_0x5085e3(0x101)][_0x5085e3(0x191)](_0x3722d3[_0x5085e3(0x152)]);console['log'](_0x5085e3(0x140)),console['log'](_0x5085e3(0x18f)),console[_0x5085e3(0x13e)](_0x5085e3(0x16b)),console[_0x5085e3(0x13e)](_0x5085e3(0x128)+_0x3ffd72['model_name']),console[_0x5085e3(0x13e)](_0x5085e3(0x119)+_0x3ffd72[_0x5085e3(0x127)][_0x5085e3(0x11d)]()),console[_0x5085e3(0x13e)](_0x5085e3(0x13d)+_0x3ffd72['total_compressed_tokens'][_0x5085e3(0x11d)]()),console['log'](_0x5085e3(0x10a)+_0x3ffd72[_0x5085e3(0x16a)][_0x5085e3(0x11d)]()),console[_0x5085e3(0x13e)](_0x5085e3(0x161)+_0x3ffd72[_0x5085e3(0x14f)]+'%'),console[_0x5085e3(0x13e)](_0x5085e3(0xf9)+_0x3ffd72[_0x5085e3(0x11e)][_0x5085e3(0x10e)](0x4)+_0x5085e3(0x134)),console[_0x5085e3(0x13e)]('Actual\x20Cost:\x20\x20\x20\x20\x20\x20\x20$'+_0x3ffd72[_0x5085e3(0x165)][_0x5085e3(0x10e)](0x4)+'\x20(after\x20Shave)'),console['log'](_0x5085e3(0x181)),console[_0x5085e3(0x13e)]('Money\x20Saved:\x20\x20\x20\x20\x20\x20\x20$'+_0x3ffd72['money_saved_usd'][_0x5085e3(0x10e)](0x4)+_0x5085e3(0x12f)),console[_0x5085e3(0x13e)]('=============================================\x0a');}),program[a0_0x3bf3ae(0x17b)](a0_0x3bf3ae(0xf6))[a0_0x3bf3ae(0x170)](a0_0x3bf3ae(0xf7))[a0_0x3bf3ae(0x12a)](a0_0x3bf3ae(0x183),'get\x20or\x20set')[a0_0x3bf3ae(0x12a)](a0_0x3bf3ae(0x139),'config\x20parameter\x20name')['argument'](a0_0x3bf3ae(0x10b),a0_0x3bf3ae(0x11a))[a0_0x3bf3ae(0x105)]((_0x287117,_0x2d98d9,_0x3fb076)=>{const _0x4ceb61=a0_0x3bf3ae;if(_0x287117==='get'){const _0x20d4da=tracker_1[_0x4ceb61(0x101)][_0x4ceb61(0x164)]();console[_0x4ceb61(0x13e)](_0x2d98d9+':\x20'+_0x20d4da[_0x2d98d9]);}else{if(_0x287117===_0x4ceb61(0x17f)){_0x3fb076===undefined&&(console['error'](_0x4ceb61(0x15b)),process[_0x4ceb61(0x175)](0x1));let _0x56870e=_0x3fb076;if(_0x3fb076==='true')_0x56870e=!![];if(_0x3fb076===_0x4ceb61(0x157))_0x56870e=![];if(/^\d+$/[_0x4ceb61(0x14e)](_0x3fb076))_0x56870e=parseInt(_0x3fb076,0xa);tracker_1['tracker'][_0x4ceb61(0x14a)](_0x2d98d9,_0x56870e),console[_0x4ceb61(0x13e)](_0x4ceb61(0x143)+_0x2d98d9+_0x4ceb61(0x158)+_0x3fb076);}else console[_0x4ceb61(0x10c)](_0x4ceb61(0x15e)),process['exit'](0x1);}}),program[a0_0x3bf3ae(0x17b)](a0_0x3bf3ae(0x14d))['description'](a0_0x3bf3ae(0xff))[a0_0x3bf3ae(0x12a)](a0_0x3bf3ae(0x183),a0_0x3bf3ae(0x106))[a0_0x3bf3ae(0x105)](_0x4b4ad4=>{const _0x2befc7=a0_0x3bf3ae;if(_0x4b4ad4==='install'){const _0x2475dc=(0x0,shims_1['installShims'])();console[_0x2befc7(0x13e)](_0x2475dc[_0x2befc7(0x135)]);}else{if(_0x4b4ad4===_0x2befc7(0x120)){const _0x491bb4=(0x0,shims_1[_0x2befc7(0x107)])();console[_0x2befc7(0x13e)](_0x491bb4[_0x2befc7(0x135)]);}else console[_0x2befc7(0x10c)](_0x2befc7(0x108)),process[_0x2befc7(0x175)](0x1);}}),program[a0_0x3bf3ae(0x17b)]('rewrite')[a0_0x3bf3ae(0x170)](a0_0x3bf3ae(0x14b))[a0_0x3bf3ae(0x12a)]('<commandLine>',a0_0x3bf3ae(0x150))[a0_0x3bf3ae(0x105)](_0x2b6f4b=>{const _0x2a58d0=a0_0x3bf3ae;if(isDisabled()){console[_0x2a58d0(0x13e)](_0x2b6f4b);return;}const _0x9ad729=(0x0,filters_1[_0x2a58d0(0x15f)])(_0x2b6f4b);console[_0x2a58d0(0x13e)](_0x9ad729);}),program[a0_0x3bf3ae(0x17b)](a0_0x3bf3ae(0x147))[a0_0x3bf3ae(0x11b)]('mcp')[a0_0x3bf3ae(0x170)](a0_0x3bf3ae(0x18a))[a0_0x3bf3ae(0x12a)](a0_0x3bf3ae(0x132),a0_0x3bf3ae(0x11f))[a0_0x3bf3ae(0x12a)](a0_0x3bf3ae(0x138),a0_0x3bf3ae(0x172))[a0_0x3bf3ae(0x105)](async(_0x860f7a,_0x3ee642)=>{const _0x300891=a0_0x3bf3ae,{runMcpProxy:_0x4969f6}=await Promise[_0x300891(0x118)]()['then'](()=>__importStar(require('./mcp')));_0x4969f6(_0x860f7a,_0x3ee642);});const args=process[a0_0x3bf3ae(0x163)]['slice'](0x2),firstArg=args[0x0],subcommands=['ui','dashboard',a0_0x3bf3ae(0x13b),'config','shims','rewrite',a0_0x3bf3ae(0x147),a0_0x3bf3ae(0x103),a0_0x3bf3ae(0x167),'--help','-h','version',a0_0x3bf3ae(0x145),'-v'];function a0_0x5512(){const _0x1f34fc=['tracker','join','mcp','getOwnPropertyDescriptor','action','install\x20or\x20uninstall','uninstallShims','Error:\x20Action\x20must\x20be\x20install\x20or\x20uninstall','__createBinding','Tokens\x20Saved:\x20\x20\x20\x20\x20\x20','[value]','error','option','toFixed','52557fxQock','win32','5NEJbTg','defineProperty','mcp-server','proxy','--max-count','stdout','every','resolve','Raw\x20Tokens:\x20\x20\x20\x20\x20\x20\x20\x20','value\x20to\x20set','alias','-bs','toLocaleString','raw_cost_usd','Command\x20to\x20launch\x20the\x20target\x20MCP\x20server','uninstall','__esModule','compressOutput','-10','create','logExecution','1.0.0','total_raw_tokens','Model\x20Context:\x20\x20\x20\x20\x20','--oneline','argument','cmd','prototype','@modelcontextprotocol/','Show\x20token\x20and\x20cost\x20savings\x20summary','\x20USD','./mcp','1423749IFejlA','<server-command>','trim','\x20(before\x20Shave)','message','./tracker','233584DmavGi','[server-args...]','<key>','toLowerCase','stats','get','Compressed:\x20\x20\x20\x20\x20\x20\x20\x20','log','default','\x0a=============================================','write','./cache','Config\x20set\x20','some','--version','TrimPrompt.ai\x20-\x20Reduce\x20LLM\x20token\x20consumption\x20by\x2060-90%','mcp-proxy','129924bfMAgr','version','setConfig','Check\x20a\x20command\x20line\x20and\x20return\x20the\x20optimized\x20command\x20line','commander','shims','test','savings_percentage','Command\x20line\x20to\x20evaluate','hasOwnProperty','model','parse','--format','executeCommand','[TrimPrompt]\x20Autodetected\x20MCP\x20server\x20execution.\x20Activating\x20real-time\x20JSON-RPC\x20proxy...','false','\x20=\x20','-sb','./dashboard','Error:\x20Value\x20required\x20for\x20set\x20action','Start\x20the\x20local\x20developer\x20dashboard','-m,\x20--model\x20<string>','Error:\x20Action\x20must\x20be\x20get\x20or\x20set','rewriteCommand','length','Reduction\x20Rate:\x20\x20\x20\x20','bun','argv','getConfig','compressed_cost_usd','--merges','help','40LFGrvY','./filters','total_tokens_saved','=============================================','server-mcp','yarn','__importStar','includes','description','Command','Arguments\x20for\x20the\x20target\x20MCP\x20server','server','1120IWvsDD','exit','--pretty','npx','Port\x20to\x20run\x20the\x20dashboard\x20on','1601304qjlspM','Select\x20pricing\x20model\x20(e.g.\x20claude-3-5-sonnet,\x20gpt-4o)','command','platform','exitCode','then','set','./shims','---------------------------------------------','redaction_enabled','<action>','startsWith','817831SFfLQc','pnpm','--no-merges','--short','call','Proxy\x20wrapper\x20for\x20Model\x20Context\x20Protocol\x20(MCP)\x20servers\x20to\x20compact\x20tool\x20outputs','-p,\x20--port\x20<number>','stderr','status','4000','\x20\x20\x20\x20\x20\x20\x20TRIMPROMPT.AI\x20SAVINGS\x20SUMMARY\x20\x20\x20\x20\x20\x20\x20\x20','-50','getStatsSummary','slice','config','Manage\x20local\x20configuration\x20parameters','git','Estimated\x20Cost:\x20\x20\x20\x20$','configurable','1291452wWihqw','push','--pretty=format:%h\x20%s\x20(%ar)\x20(%an)%n%b%n---END---','dashboard','Install\x20or\x20uninstall\x20system\x20command\x20shims','claude-3-5-sonnet'];a0_0x5512=function(){return _0x1f34fc;};return a0_0x5512();}firstArg&&!subcommands[a0_0x3bf3ae(0x16f)](firstArg)?runProxy(args)['catch'](_0x3c0ab5=>{const _0x24ecae=a0_0x3bf3ae;console[_0x24ecae(0x10c)]('[TrimPrompt]\x20Fatal\x20Proxy\x20Error:\x20'+_0x3c0ab5['message']),process[_0x24ecae(0x175)](0x1);}):program[a0_0x3bf3ae(0x153)](process['argv']);
|
package/dashboard.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x35cb8d=a0_0xc907;function a0_0xc907(_0x4ece0b,_0x4a4def){_0x4ece0b=_0x4ece0b-0x172;const _0x26ae6b=a0_0x26ae();let _0xc9075f=_0x26ae6b[_0x4ece0b];return _0xc9075f;}(function(_0xb5ae52,_0x3eab3c){const _0x2ce3ed=a0_0xc907,_0x16a03a=_0xb5ae52();while(!![]){try{const _0x4f752b=parseInt(_0x2ce3ed(0x197))/0x1*(-parseInt(_0x2ce3ed(0x18f))/0x2)+parseInt(_0x2ce3ed(0x18d))/0x3*(parseInt(_0x2ce3ed(0x1a5))/0x4)+parseInt(_0x2ce3ed(0x195))/0x5*(parseInt(_0x2ce3ed(0x181))/0x6)+-parseInt(_0x2ce3ed(0x196))/0x7*(-parseInt(_0x2ce3ed(0x191))/0x8)+parseInt(_0x2ce3ed(0x1ac))/0x9*(parseInt(_0x2ce3ed(0x19c))/0xa)+-parseInt(_0x2ce3ed(0x18a))/0xb+parseInt(_0x2ce3ed(0x17f))/0xc*(-parseInt(_0x2ce3ed(0x193))/0xd);if(_0x4f752b===_0x3eab3c)break;else _0x16a03a['push'](_0x16a03a['shift']());}catch(_0x34e6d8){_0x16a03a['push'](_0x16a03a['shift']());}}}(a0_0x26ae,0x9dcb5));function a0_0x26ae(){const _0x27c98b=['code','getStatsSummary','model','error','default','hasOwnProperty','__esModule','logs','EADDRINUSE','./tracker','getLogs','600SQNKJb','utf8','6SpZJgC','/api/stats/history','create','call','getOwnPropertyNames','existsSync','params','readFileSync','defineProperty','8830107cQmLGU','length','Press\x20Ctrl+C\x20in\x20this\x20terminal\x20to\x20shut\x20down.','228gXgKSW','auto','73686MLNXDC','join','664srUoeZ','open','199147mfuSiY','Raw\x20output\x20log\x20file\x20not\x20found.','4677045RrtfIc','89866WKnEuc','7mDCpuG','Compressed\x20output\x20log\x20file\x20not\x20found.','json','startDashboard','\x0a[TrimPrompt]\x20Dashboard\x20server\x20started\x20at:\x20','140NmWNGx','__createBinding','__setModuleDefault','configurable','__importDefault','message','/api/stats/inspect/:id','express','sendFile','7464fVKmhW','path','get','tracker','http://localhost:','.trimprompt','.raw.txt','212229jEJreP','listen','[TrimPrompt]\x20Dashboard\x20error:\x20'];a0_0x26ae=function(){return _0x27c98b;};return a0_0x26ae();}var __createBinding=this&&this[a0_0x35cb8d(0x19d)]||(Object[a0_0x35cb8d(0x183)]?function(_0x577d9a,_0x3b058d,_0x11cded,_0xeb6ff1){const _0x4724ec=a0_0x35cb8d;if(_0xeb6ff1===undefined)_0xeb6ff1=_0x11cded;var _0x1f0295=Object['getOwnPropertyDescriptor'](_0x3b058d,_0x11cded);(!_0x1f0295||('get'in _0x1f0295?!_0x3b058d[_0x4724ec(0x17a)]:_0x1f0295['writable']||_0x1f0295[_0x4724ec(0x19f)]))&&(_0x1f0295={'enumerable':!![],'get':function(){return _0x3b058d[_0x11cded];}}),Object[_0x4724ec(0x189)](_0x577d9a,_0xeb6ff1,_0x1f0295);}:function(_0x42a815,_0x118436,_0x2b57ea,_0x59ab87){if(_0x59ab87===undefined)_0x59ab87=_0x2b57ea;_0x42a815[_0x59ab87]=_0x118436[_0x2b57ea];}),__setModuleDefault=this&&this[a0_0x35cb8d(0x19e)]||(Object[a0_0x35cb8d(0x183)]?function(_0x2637d0,_0x20fe92){const _0x5b1592=a0_0x35cb8d;Object[_0x5b1592(0x189)](_0x2637d0,'default',{'enumerable':!![],'value':_0x20fe92});}:function(_0x5d4149,_0x4a8c66){const _0x402022=a0_0x35cb8d;_0x5d4149[_0x402022(0x178)]=_0x4a8c66;}),__importStar=this&&this['__importStar']||(function(){var _0x1e3a84=function(_0x4ed006){const _0x1bf588=a0_0xc907;return _0x1e3a84=Object[_0x1bf588(0x185)]||function(_0x3a7299){const _0x361b2d=_0x1bf588;var _0x55ba30=[];for(var _0x52ec25 in _0x3a7299)if(Object['prototype'][_0x361b2d(0x179)][_0x361b2d(0x184)](_0x3a7299,_0x52ec25))_0x55ba30[_0x55ba30[_0x361b2d(0x18b)]]=_0x52ec25;return _0x55ba30;},_0x1e3a84(_0x4ed006);};return function(_0x245de2){const _0x7b4beb=a0_0xc907;if(_0x245de2&&_0x245de2['__esModule'])return _0x245de2;var _0x2ecf5f={};if(_0x245de2!=null){for(var _0x38efa2=_0x1e3a84(_0x245de2),_0x42e15a=0x0;_0x42e15a<_0x38efa2['length'];_0x42e15a++)if(_0x38efa2[_0x42e15a]!==_0x7b4beb(0x178))__createBinding(_0x2ecf5f,_0x245de2,_0x38efa2[_0x42e15a]);}return __setModuleDefault(_0x2ecf5f,_0x245de2),_0x2ecf5f;};}()),__importDefault=this&&this[a0_0x35cb8d(0x1a0)]||function(_0x10b479){const _0x31fb80=a0_0x35cb8d;return _0x10b479&&_0x10b479[_0x31fb80(0x17a)]?_0x10b479:{'default':_0x10b479};};Object[a0_0x35cb8d(0x189)](exports,a0_0x35cb8d(0x17a),{'value':!![]}),exports[a0_0x35cb8d(0x19a)]=startDashboard;const express_1=__importDefault(require(a0_0x35cb8d(0x1a3))),path=__importStar(require(a0_0x35cb8d(0x1a6))),fs=__importStar(require('fs')),os=__importStar(require('os')),open_1=__importDefault(require(a0_0x35cb8d(0x192))),tracker_1=require(a0_0x35cb8d(0x17d)),app=(0x0,express_1[a0_0x35cb8d(0x178)])(),baseDir=path[a0_0x35cb8d(0x190)](os['homedir'](),a0_0x35cb8d(0x1aa)),logsDir=path['join'](baseDir,a0_0x35cb8d(0x17b));app[a0_0x35cb8d(0x1a7)]('/',(_0x2fb9bc,_0x561031)=>{const _0x2efc49=a0_0x35cb8d,_0x283eec=path['join'](__dirname,'index.html');fs['existsSync'](_0x283eec)?_0x561031[_0x2efc49(0x1a4)](_0x283eec):_0x561031[_0x2efc49(0x1a4)](path['join'](__dirname,'../src/index.html'));}),app[a0_0x35cb8d(0x1a7)]('/api/stats/summary',(_0x12f8ca,_0x1aef30)=>{const _0x576be6=a0_0x35cb8d,_0x34d0c6=_0x12f8ca['query'][_0x576be6(0x176)]||_0x576be6(0x18e),_0x43acbd=tracker_1[_0x576be6(0x1a8)][_0x576be6(0x175)](_0x34d0c6);_0x1aef30[_0x576be6(0x199)](_0x43acbd);}),app[a0_0x35cb8d(0x1a7)](a0_0x35cb8d(0x182),(_0x5e0903,_0x3973e0)=>{const _0x14eb78=a0_0x35cb8d,_0x360ef7=tracker_1[_0x14eb78(0x1a8)][_0x14eb78(0x17e)]();_0x3973e0['json'](_0x360ef7);}),app[a0_0x35cb8d(0x1a7)](a0_0x35cb8d(0x1a2),(_0x2d758a,_0x277c2e)=>{const _0x5a76e8=a0_0x35cb8d,_0x68ae7b=_0x2d758a[_0x5a76e8(0x187)]['id'],_0x5258a8=path['join'](logsDir,_0x68ae7b+_0x5a76e8(0x1ab)),_0x370007=path[_0x5a76e8(0x190)](logsDir,_0x68ae7b+'.comp.txt');let _0x463023=_0x5a76e8(0x194),_0x154f74=_0x5a76e8(0x198);try{fs[_0x5a76e8(0x186)](_0x5258a8)&&(_0x463023=fs[_0x5a76e8(0x188)](_0x5258a8,_0x5a76e8(0x180))),fs['existsSync'](_0x370007)&&(_0x154f74=fs[_0x5a76e8(0x188)](_0x370007,'utf8'));}catch(_0x2240a3){}_0x277c2e[_0x5a76e8(0x199)]({'id':_0x68ae7b,'raw':_0x463023,'compressed':_0x154f74});});function startDashboard(_0x42fce2=0xfa0){const _0x5d5fbc=a0_0x35cb8d;let _0x3e5741=_0x42fce2;const _0x1839bc=app[_0x5d5fbc(0x172)](_0x3e5741,()=>{const _0x4593f6=_0x5d5fbc,_0x568b37=_0x4593f6(0x1a9)+_0x3e5741;console['log'](_0x4593f6(0x19b)+_0x568b37),console['log'](_0x4593f6(0x18c)),(0x0,open_1[_0x4593f6(0x178)])(_0x568b37)['catch'](()=>{});});_0x1839bc['on']('error',_0x5aa2ea=>{const _0x50ab24=_0x5d5fbc;_0x5aa2ea[_0x50ab24(0x174)]===_0x50ab24(0x17c)?startDashboard(_0x3e5741+0x1):console[_0x50ab24(0x177)](_0x50ab24(0x173)+_0x5aa2ea[_0x50ab24(0x1a1)]);});}
|
package/executor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a0_0x163706=a0_0x4bec;(function(_0x3ce529,_0x3db8a8){var _0x150d3d=a0_0x4bec,_0x1cb340=_0x3ce529();while(!![]){try{var _0x437b44=-parseInt(_0x150d3d(0x1f1))/0x1+-parseInt(_0x150d3d(0x201))/0x2*(parseInt(_0x150d3d(0x20c))/0x3)+-parseInt(_0x150d3d(0x202))/0x4*(parseInt(_0x150d3d(0x20f))/0x5)+-parseInt(_0x150d3d(0x218))/0x6*(-parseInt(_0x150d3d(0x21a))/0x7)+parseInt(_0x150d3d(0x216))/0x8*(-parseInt(_0x150d3d(0x20a))/0x9)+parseInt(_0x150d3d(0x1ff))/0xa*(parseInt(_0x150d3d(0x206))/0xb)+parseInt(_0x150d3d(0x200))/0xc;if(_0x437b44===_0x3db8a8)break;else _0x1cb340['push'](_0x1cb340['shift']());}catch(_0x586478){_0x1cb340['push'](_0x1cb340['shift']());}}}(a0_0x4c09,0x9a4c5));function a0_0x4bec(_0x12f8db,_0x5c6a7f){_0x12f8db=_0x12f8db-0x1eb;var _0x4c09e8=a0_0x4c09();var _0x4bec82=_0x4c09e8[_0x12f8db];return _0x4bec82;}var __createBinding=this&&this[a0_0x163706(0x20b)]||(Object[a0_0x163706(0x1f8)]?function(_0x10c031,_0x5bb05a,_0x30834c,_0x3ad105){var _0x67b8ac=a0_0x163706;if(_0x3ad105===undefined)_0x3ad105=_0x30834c;var _0x23a491=Object[_0x67b8ac(0x20d)](_0x5bb05a,_0x30834c);(!_0x23a491||(_0x67b8ac(0x209)in _0x23a491?!_0x5bb05a['__esModule']:_0x23a491[_0x67b8ac(0x1f5)]||_0x23a491['configurable']))&&(_0x23a491={'enumerable':!![],'get':function(){return _0x5bb05a[_0x30834c];}}),Object[_0x67b8ac(0x1f3)](_0x10c031,_0x3ad105,_0x23a491);}:function(_0xb48d32,_0xecc535,_0x12113e,_0x1ceea2){if(_0x1ceea2===undefined)_0x1ceea2=_0x12113e;_0xb48d32[_0x1ceea2]=_0xecc535[_0x12113e];}),__setModuleDefault=this&&this[a0_0x163706(0x21b)]||(Object[a0_0x163706(0x1f8)]?function(_0x736ac6,_0x2de05a){var _0x40153d=a0_0x163706;Object[_0x40153d(0x1f3)](_0x736ac6,_0x40153d(0x208),{'enumerable':!![],'value':_0x2de05a});}:function(_0x5dfbdc,_0x3ea32f){var _0x21f72c=a0_0x163706;_0x5dfbdc[_0x21f72c(0x208)]=_0x3ea32f;}),__importStar=this&&this[a0_0x163706(0x214)]||(function(){var _0x8b71be=function(_0x4064a1){var _0x144a61=a0_0x4bec;return _0x8b71be=Object[_0x144a61(0x1fd)]||function(_0x5b0014){var _0x298625=_0x144a61,_0x18b51a=[];for(var _0x3ef998 in _0x5b0014)if(Object[_0x298625(0x1ec)][_0x298625(0x1ee)][_0x298625(0x1ef)](_0x5b0014,_0x3ef998))_0x18b51a[_0x18b51a['length']]=_0x3ef998;return _0x18b51a;},_0x8b71be(_0x4064a1);};return function(_0x846080){var _0x55640e=a0_0x4bec;if(_0x846080&&_0x846080['__esModule'])return _0x846080;var _0x2dbb9c={};if(_0x846080!=null){for(var _0x3085cf=_0x8b71be(_0x846080),_0x190b07=0x0;_0x190b07<_0x3085cf[_0x55640e(0x1f6)];_0x190b07++)if(_0x3085cf[_0x190b07]!==_0x55640e(0x208))__createBinding(_0x2dbb9c,_0x846080,_0x3085cf[_0x190b07]);}return __setModuleDefault(_0x2dbb9c,_0x846080),_0x2dbb9c;};}());Object[a0_0x163706(0x1f3)](exports,a0_0x163706(0x210),{'value':!![]}),exports['executeCommand']=executeCommand;function a0_0x4c09(){var _0x790252=['error','default','get','483831VhofEz','__createBinding','77802TDChNS','getOwnPropertyDescriptor','Failed\x20to\x20spawn\x20command\x20\x22','20idivAG','__esModule','map','join','toString','__importStar','spawn','112JzvCDQ','stderr','167910ZotVcM','trim','175ZlPToC','__setModuleDefault','child_process','prototype','shims','hasOwnProperty','call','split','1007943WxpmRc','platform','defineProperty','includes','writable','length','pipe','create','data','toLowerCase','\x22:\x20','delimiter','getOwnPropertyNames','inherit','350PLktUu','30580224KUXEfd','22XEHsmP','867524FwHhDG','win32','stdout','homedir','93467JmSwZM'];a0_0x4c09=function(){return _0x790252;};return a0_0x4c09();}const child_process_1=require(a0_0x163706(0x1eb)),path=__importStar(require('path')),os=__importStar(require('os'));function executeCommand(_0x3358e6,_0x1f9168){return new Promise(_0x586cd0=>{var _0x3f1d84=a0_0x4bec;const _0x2584ae=path['join'](os[_0x3f1d84(0x205)](),'.trimprompt',_0x3f1d84(0x1ed)),_0x13004f=(process.env.PATH||'')[_0x3f1d84(0x1f0)](path[_0x3f1d84(0x1fc)])['filter'](_0x4662c4=>_0x4662c4[_0x3f1d84(0x219)]()['toLowerCase']()!==_0x2584ae[_0x3f1d84(0x1fa)]())[_0x3f1d84(0x212)](path[_0x3f1d84(0x1fc)]),_0x369356={...process.env,'PATH':_0x13004f,'TRIMPROMPT_DISABLED':'1'},_0x26f3b1=process[_0x3f1d84(0x1f2)]===_0x3f1d84(0x203)?_0x1f9168[_0x3f1d84(0x211)](_0x43c6a0=>_0x43c6a0[_0x3f1d84(0x1f4)]('\x20')&&!_0x43c6a0['startsWith']('\x22')?'\x22'+_0x43c6a0+'\x22':_0x43c6a0):_0x1f9168,_0x3f44b0=(0x0,child_process_1[_0x3f1d84(0x215)])(_0x3358e6,_0x26f3b1,{'stdio':[_0x3f1d84(0x1fe),'pipe',_0x3f1d84(0x1f7)],'shell':!![],'env':_0x369356});let _0x5b2c55='',_0x451cce='';_0x3f44b0[_0x3f1d84(0x204)]?.['on'](_0x3f1d84(0x1f9),_0x38a96f=>{var _0x50ffa4=_0x3f1d84;_0x5b2c55+=_0x38a96f[_0x50ffa4(0x213)]();}),_0x3f44b0[_0x3f1d84(0x217)]?.['on']('data',_0x5008e7=>{var _0x456934=_0x3f1d84;_0x451cce+=_0x5008e7[_0x456934(0x213)]();}),_0x3f44b0['on'](_0x3f1d84(0x207),_0x5eaa73=>{var _0x3aeb2a=_0x3f1d84;_0x586cd0({'exitCode':0x1,'stdout':'','stderr':_0x3aeb2a(0x20e)+_0x3358e6+_0x3aeb2a(0x1fb)+_0x5eaa73['message']});}),_0x3f44b0['on']('close',_0x2eba00=>{_0x586cd0({'exitCode':_0x2eba00??0x0,'stdout':_0x5b2c55,'stderr':_0x451cce});});});}
|
package/filters/devops.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x42f96d=a0_0x3479;(function(_0x16281d,_0x2aa731){const _0x16e6be=a0_0x3479,_0x5e66da=_0x16281d();while(!![]){try{const _0xc90291=parseInt(_0x16e6be(0x168))/0x1+-parseInt(_0x16e6be(0x15b))/0x2*(parseInt(_0x16e6be(0x16b))/0x3)+-parseInt(_0x16e6be(0x159))/0x4*(-parseInt(_0x16e6be(0x16c))/0x5)+-parseInt(_0x16e6be(0x15d))/0x6+-parseInt(_0x16e6be(0x17b))/0x7*(-parseInt(_0x16e6be(0x158))/0x8)+-parseInt(_0x16e6be(0x179))/0x9*(parseInt(_0x16e6be(0x15a))/0xa)+-parseInt(_0x16e6be(0x17e))/0xb*(-parseInt(_0x16e6be(0x188))/0xc);if(_0xc90291===_0x2aa731)break;else _0x5e66da['push'](_0x5e66da['shift']());}catch(_0x438121){_0x5e66da['push'](_0x5e66da['shift']());}}}(a0_0x5566,0x55bf1));function a0_0x3479(_0x2a4221,_0x138a5d){_0x2a4221=_0x2a4221-0x156;const _0x556631=a0_0x5566();let _0x347955=_0x556631[_0x2a4221];return _0x347955;}Object[a0_0x42f96d(0x17c)](exports,a0_0x42f96d(0x16f),{'value':!![]}),exports['filterDockerPs']=filterDockerPs,exports[a0_0x42f96d(0x189)]=filterDockerImages,exports['filterDockerLogs']=filterDockerLogs,exports[a0_0x42f96d(0x182)]=filterKubectl,exports[a0_0x42f96d(0x174)]=filterRuff;function filterDockerPs(_0x38349d){const _0x4223e6=a0_0x42f96d,_0x1c6751=_0x38349d[_0x4223e6(0x164)]('\x0a')['filter'](_0x251704=>_0x251704[_0x4223e6(0x162)]()[_0x4223e6(0x175)]>0x0);if(_0x1c6751['length']===0x0)return _0x4223e6(0x176);if(_0x1c6751[_0x4223e6(0x175)]<=0xa)return _0x38349d[_0x4223e6(0x162)]();const _0x2fddbd=_0x1c6751[0x0],_0x1dbcfc=_0x1c6751[_0x4223e6(0x177)](0x1),_0x37694e=[];_0x37694e[_0x4223e6(0x165)](_0x4223e6(0x185)+_0x1dbcfc[_0x4223e6(0x175)]+'\x20total'),_0x37694e[_0x4223e6(0x165)]('');for(const _0x2d1277 of _0x1dbcfc){const _0x2dc0bc=_0x2d1277[_0x4223e6(0x164)](/\s{2,}/);if(_0x2dc0bc[_0x4223e6(0x175)]>=0x5){const _0xa7fdad=_0x2dc0bc[0x0]['substring'](0x0,0xc),_0x5ec29e=_0x2dc0bc[0x1],_0x48ad16=_0x2dc0bc[_0x2dc0bc['length']-0x2]||'',_0x5748f0=_0x2dc0bc[_0x2dc0bc[_0x4223e6(0x175)]-0x1]||'';_0x37694e[_0x4223e6(0x165)]('\x20\x20'+_0xa7fdad+'\x20\x20'+_0x5ec29e+'\x20\x20'+_0x48ad16+'\x20\x20'+_0x5748f0);}else _0x37694e['push']('\x20\x20'+_0x2d1277['trim']());}return _0x37694e[_0x4223e6(0x186)]('\x0a');}function filterDockerImages(_0x8589db){const _0x4f6fdd=a0_0x42f96d,_0x486c43=_0x8589db[_0x4f6fdd(0x164)]('\x0a')[_0x4f6fdd(0x17a)](_0x5055b7=>_0x5055b7[_0x4f6fdd(0x162)]()[_0x4f6fdd(0x175)]>0x0);if(_0x486c43['length']<=0x1)return _0x4f6fdd(0x16d);if(_0x486c43[_0x4f6fdd(0x175)]<=0xf)return _0x8589db[_0x4f6fdd(0x162)]();const _0x5578b2=_0x486c43['slice'](0x1),_0x1ea8f6=[_0x4f6fdd(0x172)+_0x5578b2[_0x4f6fdd(0x175)]+'\x20total'];_0x1ea8f6[_0x4f6fdd(0x165)]('');const _0x5ebddc=_0x5578b2[_0x4f6fdd(0x177)](0x0,0x14);for(const _0xc881f6 of _0x5ebddc){const _0x36f519=_0xc881f6[_0x4f6fdd(0x164)](/\s{2,}/);if(_0x36f519[_0x4f6fdd(0x175)]>=0x3){const _0xf8ebbd=_0x36f519[0x0],_0x19c6f2=_0x36f519[0x1],_0x163520=_0x36f519[_0x36f519[_0x4f6fdd(0x175)]-0x1]||'';_0x1ea8f6[_0x4f6fdd(0x165)]('\x20\x20'+_0xf8ebbd+':'+_0x19c6f2+'\x20\x20'+_0x163520);}else _0x1ea8f6['push']('\x20\x20'+_0xc881f6[_0x4f6fdd(0x162)]());}return _0x5578b2['length']>0x14&&_0x1ea8f6[_0x4f6fdd(0x165)]('\x20\x20...\x20+'+(_0x5578b2[_0x4f6fdd(0x175)]-0x14)+_0x4f6fdd(0x161)),_0x1ea8f6['join']('\x0a');}function filterDockerLogs(_0x35e823){const _0x5904fe=a0_0x42f96d,_0x2909b3=_0x35e823[_0x5904fe(0x164)]('\x0a');if(_0x2909b3[_0x5904fe(0x175)]<=0x32)return _0x35e823;const _0x33e798=[];return _0x33e798[_0x5904fe(0x165)](..._0x2909b3[_0x5904fe(0x177)](0x0,0x14)),_0x33e798[_0x5904fe(0x165)](_0x5904fe(0x16e)+(_0x2909b3['length']-0x28)+_0x5904fe(0x171)),_0x33e798['push'](..._0x2909b3[_0x5904fe(0x177)](-0x14)),_0x33e798[_0x5904fe(0x165)]('\x0a('+_0x2909b3[_0x5904fe(0x175)]+_0x5904fe(0x160)),_0x33e798[_0x5904fe(0x186)]('\x0a');}function filterKubectl(_0x62aa66,_0x110f2d){const _0x21371d=a0_0x42f96d,_0x267ef6=_0x62aa66[_0x21371d(0x164)]('\x0a')[_0x21371d(0x17a)](_0x2cfaca=>_0x2cfaca[_0x21371d(0x162)]()[_0x21371d(0x175)]>0x0);if(_0x267ef6['length']===0x0)return _0x21371d(0x178);if(_0x267ef6[_0x21371d(0x175)]<=0x14)return _0x62aa66[_0x21371d(0x162)]();if(_0x110f2d===_0x21371d(0x16a)){const _0x7c8ab=_0x267ef6[0x0],_0x15287d=_0x267ef6['slice'](0x1),_0x218dee=[_0x15287d[_0x21371d(0x175)]+_0x21371d(0x183),'',_0x7c8ab];return _0x15287d[_0x21371d(0x175)]<=0x1e?_0x218dee[_0x21371d(0x165)](..._0x15287d):(_0x218dee[_0x21371d(0x165)](..._0x15287d['slice'](0x0,0x19)),_0x218dee[_0x21371d(0x165)]('...\x20+'+(_0x15287d['length']-0x19)+_0x21371d(0x169))),_0x218dee['join']('\x0a');}if(_0x110f2d===_0x21371d(0x170)){const _0x258599=[];let _0x20352e=![],_0x393282=0x0;for(const _0x2d045d of _0x267ef6){if(_0x2d045d[_0x21371d(0x17d)]('Events:')){_0x20352e=!![],_0x258599[_0x21371d(0x165)](_0x2d045d);continue;}if(_0x20352e){_0x393282++;if(_0x393282<=0x5)_0x258599[_0x21371d(0x165)](_0x2d045d);}else _0x258599['push'](_0x2d045d);}return _0x393282>0x5&&_0x258599[_0x21371d(0x165)](_0x21371d(0x17f)+(_0x393282-0x5)+_0x21371d(0x184)),_0x258599[_0x21371d(0x186)]('\x0a');}if(_0x110f2d==='logs')return filterDockerLogs(_0x62aa66);const _0x2b04f9=_0x267ef6[_0x21371d(0x177)](0x0,0x1e);return _0x267ef6[_0x21371d(0x175)]>0x1e&&_0x2b04f9[_0x21371d(0x165)](_0x21371d(0x18a)+(_0x267ef6[_0x21371d(0x175)]-0x1e)+_0x21371d(0x156)),_0x2b04f9['join']('\x0a');}function a0_0x5566(){const _0x41bfc8=['\x20more\x20resources','get','435306gJSfuM','6720IbJEDo','No\x20images\x20found','\x0a...\x20[','__esModule','describe','\x20lines\x20truncated]\x20...\x0a','Docker\x20images:\x20','\x20issues\x20in\x20','filterRuff','length','No\x20containers\x20running','slice','No\x20resources\x20found','9LnaSto','filter','7aiKHJU','defineProperty','startsWith','33HNFmIb','\x20\x20...\x20+','\x20more','Ruff:\x20all\x20checks\x20passed','filterKubectl','\x20resources\x20found','\x20more\x20events','Containers:\x20','join','\x0a...\x20+','867432SRAAjr','filterDockerImages','...\x20+','\x20more\x20lines','includes','855080bPzCrn','304qaVEaa','5372810NWzMzQ','2jCUxRC','Found\x200\x20error','292968ivXekN','All\x20checks\x20passed','\x20\x20...\x20(','\x20log\x20lines\x20total)','\x20more\x20images','trim','Ruff:\x20','split','push','\x20more\x20files','Ruff:\x20no\x20issues\x20found','656541hjkAGy'];a0_0x5566=function(){return _0x41bfc8;};return a0_0x5566();}function filterRuff(_0x59fe03){const _0x2fb7c5=a0_0x42f96d,_0x2ff54f=_0x59fe03['split']('\x0a')['filter'](_0x591c27=>_0x591c27[_0x2fb7c5(0x162)]()['length']>0x0);if(_0x2ff54f[_0x2fb7c5(0x175)]===0x0)return _0x2fb7c5(0x167);if(_0x59fe03[_0x2fb7c5(0x157)](_0x2fb7c5(0x15e))||_0x59fe03[_0x2fb7c5(0x157)](_0x2fb7c5(0x15c)))return _0x2fb7c5(0x181);const _0x10fa92=_0x59fe03['match'](/Found (\d+) error/),_0x2e7a4a=_0x10fa92?parseInt(_0x10fa92[0x1]):_0x2ff54f[_0x2fb7c5(0x175)],_0x46752d={},_0x551cb9=[];for(const _0x206192 of _0x2ff54f){const _0x51353b=_0x206192['match'](/^([^:]+:\d+:\d+):\s*(.*)/);if(_0x51353b){const _0x5bf36c=_0x51353b[0x1],_0x232335=_0x5bf36c[_0x2fb7c5(0x164)](':')[0x0];if(!_0x46752d[_0x232335])_0x46752d[_0x232335]=[];_0x46752d[_0x232335][_0x2fb7c5(0x165)](_0x206192);}else _0x551cb9[_0x2fb7c5(0x165)](_0x206192);}const _0x44e1a4=Object['keys'](_0x46752d);if(_0x44e1a4[_0x2fb7c5(0x175)]===0x0){if(_0x2ff54f[_0x2fb7c5(0x175)]<=0x14)return _0x59fe03[_0x2fb7c5(0x162)]();return _0x2ff54f[_0x2fb7c5(0x177)](0x0,0xf)['join']('\x0a')+(_0x2fb7c5(0x187)+(_0x2ff54f[_0x2fb7c5(0x175)]-0xf)+_0x2fb7c5(0x180));}const _0x4136d9=[_0x2fb7c5(0x163)+_0x2e7a4a+_0x2fb7c5(0x173)+_0x44e1a4[_0x2fb7c5(0x175)]+'\x20files'];_0x4136d9[_0x2fb7c5(0x165)]('');const _0x27d284=0xa;for(const _0x409263 of _0x44e1a4[_0x2fb7c5(0x177)](0x0,_0x27d284)){const _0x2ac0b1=_0x46752d[_0x409263];if(_0x2ac0b1[_0x2fb7c5(0x175)]<=0x3){for(const _0x175757 of _0x2ac0b1)_0x4136d9[_0x2fb7c5(0x165)]('\x20\x20'+_0x175757);}else _0x4136d9['push']('\x20\x20'+_0x2ac0b1[0x0]),_0x4136d9['push'](_0x2fb7c5(0x15f)+_0x2ac0b1[_0x2fb7c5(0x175)]+_0x2fb7c5(0x173)+_0x409263+')');}return _0x44e1a4[_0x2fb7c5(0x175)]>_0x27d284&&_0x4136d9[_0x2fb7c5(0x165)](_0x2fb7c5(0x17f)+(_0x44e1a4[_0x2fb7c5(0x175)]-_0x27d284)+_0x2fb7c5(0x166)),_0x4136d9[_0x2fb7c5(0x186)]('\x0a');}
|
package/filters/generic.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x503613=a0_0x34ac;(function(_0xe9e199,_0x2bb949){const _0x40ad63=a0_0x34ac,_0x2132de=_0xe9e199();while(!![]){try{const _0x1b4240=parseInt(_0x40ad63(0x1c9))/0x1+parseInt(_0x40ad63(0x1cd))/0x2+-parseInt(_0x40ad63(0x1ce))/0x3+-parseInt(_0x40ad63(0x1c0))/0x4+parseInt(_0x40ad63(0x1bf))/0x5*(parseInt(_0x40ad63(0x1cf))/0x6)+parseInt(_0x40ad63(0x1d2))/0x7+-parseInt(_0x40ad63(0x1d0))/0x8*(parseInt(_0x40ad63(0x1c5))/0x9);if(_0x1b4240===_0x2bb949)break;else _0x2132de['push'](_0x2132de['shift']());}catch(_0x169ba3){_0x2132de['push'](_0x2132de['shift']());}}}(a0_0x44d4,0x8488e));function a0_0x44d4(){const _0x4cb390=['length','71860VgJpQZ','2561368NGXHJY','push','join','\x20[x','split','456642QFOrXS','slice','collapseDuplicates','__esModule','520680DxUUIL','replace','trim','stripAnsi','2085450LCHplF','2258139CMHJGn','168LnkhjZ','8JdBtUs','\x20characters\x20of\x20output]\x20...\x0a','145838ShWbJq'];a0_0x44d4=function(){return _0x4cb390;};return a0_0x44d4();}function a0_0x34ac(_0x3eb240,_0x146e7a){_0x3eb240=_0x3eb240-0x1be;const _0x44d4e9=a0_0x44d4();let _0x34ac45=_0x44d4e9[_0x3eb240];return _0x34ac45;}Object['defineProperty'](exports,a0_0x503613(0x1c8),{'value':!![]}),exports[a0_0x503613(0x1cc)]=stripAnsi,exports[a0_0x503613(0x1c7)]=collapseDuplicates,exports['softTruncate']=softTruncate;function stripAnsi(_0x11a1ba){const _0x5a787a=a0_0x503613,_0x10667a=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g;return _0x11a1ba[_0x5a787a(0x1ca)](_0x10667a,'');}function collapseDuplicates(_0x58f898){const _0x44db03=a0_0x503613,_0x197112=_0x58f898['split']('\x0a');if(_0x197112['length']<=0x1)return _0x58f898;const _0x43e2=[];let _0x45bb77=_0x197112[0x0],_0x4748db=0x1;for(let _0x55ffc9=0x1;_0x55ffc9<_0x197112['length'];_0x55ffc9++){const _0x3b87e1=_0x197112[_0x55ffc9];_0x3b87e1===_0x45bb77&&_0x3b87e1[_0x44db03(0x1cb)]()[_0x44db03(0x1be)]>0x0?_0x4748db++:(_0x4748db>0x1?_0x43e2[_0x44db03(0x1c1)](_0x45bb77+_0x44db03(0x1c3)+_0x4748db+']'):_0x43e2[_0x44db03(0x1c1)](_0x45bb77),_0x45bb77=_0x3b87e1,_0x4748db=0x1);}return _0x4748db>0x1?_0x43e2[_0x44db03(0x1c1)](_0x45bb77+_0x44db03(0x1c3)+_0x4748db+']'):_0x43e2[_0x44db03(0x1c1)](_0x45bb77),_0x43e2[_0x44db03(0x1c2)]('\x0a');}function softTruncate(_0x3c7b03,_0x53a715=0x4e20){const _0x3b6ddf=a0_0x503613;if(_0x3c7b03['length']<=_0x53a715)return _0x3c7b03;const _0x1f54b8=_0x3c7b03[_0x3b6ddf(0x1c4)]('\x0a');if(_0x1f54b8[_0x3b6ddf(0x1be)]<=0xc8)return _0x3c7b03;const _0x5b7d72=0x32,_0x33ddf4=0x96,_0x2c19fd=_0x1f54b8['slice'](0x0,_0x5b7d72),_0x4bcea6=_0x1f54b8[_0x3b6ddf(0x1c6)](_0x1f54b8[_0x3b6ddf(0x1be)]-_0x33ddf4),_0xe65e56=_0x3c7b03[_0x3b6ddf(0x1be)]-(_0x2c19fd[_0x3b6ddf(0x1c2)]('\x0a')[_0x3b6ddf(0x1be)]+_0x4bcea6[_0x3b6ddf(0x1c2)]('\x0a')[_0x3b6ddf(0x1be)]);return[..._0x2c19fd,'\x0a...\x20[TrimPrompt:\x20Truncated\x20'+_0xe65e56+_0x3b6ddf(0x1d1),..._0x4bcea6][_0x3b6ddf(0x1c2)]('\x0a');}
|
package/filters/git.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x2f1e69=a0_0xb58d;function a0_0x6850(){const _0x37c03a=['hasOwnProperty','20kfiIAx','2160vTGDWO','14412dvkOdA','\x0aUntracked\x20files:','Clean\x20working\x20tree','26554WpwRfR','---','60FxLEeR','\x20\x20??\x20','map','2709lohgYi','create','get','push','prototype','\x20\x20...\x20+','\x20\x20...\x20(+','slice','filter','length','trim','[file]\x20','defineProperty','\x20(+','\x20untracked\x20files)','__esModule','configurable','getOwnPropertyNames','---END---','substring','replace','getOwnPropertyDescriptor','No\x20modifications','split','startsWith','entries','__setModuleDefault','5WygpMc','default','525069AJgLcQ','call','384756iiJZVy','\x20lines\x20of\x20description)','__importStar','path','45zWDlic','3820947wIksEQ','unknown_file','writable','__createBinding','dirname','join','7314rNObSO','filterGitStatus','+++','93048BHVyAB'];a0_0x6850=function(){return _0x37c03a;};return a0_0x6850();}(function(_0x4754cd,_0x4f0504){const _0x209051=a0_0xb58d,_0x43b44f=_0x4754cd();while(!![]){try{const _0x3ed1bf=-parseInt(_0x209051(0x126))/0x1*(parseInt(_0x209051(0x15d))/0x2)+-parseInt(_0x209051(0x14b))/0x3+parseInt(_0x209051(0x14d))/0x4*(parseInt(_0x209051(0x149))/0x5)+parseInt(_0x209051(0x158))/0x6*(-parseInt(_0x209051(0x12e))/0x7)+parseInt(_0x209051(0x15b))/0x8*(parseInt(_0x209051(0x151))/0x9)+-parseInt(_0x209051(0x125))/0xa*(parseInt(_0x209051(0x129))/0xb)+parseInt(_0x209051(0x12b))/0xc*(parseInt(_0x209051(0x152))/0xd);if(_0x3ed1bf===_0x4f0504)break;else _0x43b44f['push'](_0x43b44f['shift']());}catch(_0xaa5664){_0x43b44f['push'](_0x43b44f['shift']());}}}(a0_0x6850,0x4c143));var __createBinding=this&&this[a0_0x2f1e69(0x155)]||(Object[a0_0x2f1e69(0x12f)]?function(_0x532114,_0x38b4b1,_0x15e45c,_0xba583e){const _0x18bcc5=a0_0x2f1e69;if(_0xba583e===undefined)_0xba583e=_0x15e45c;var _0x5dab6f=Object[_0x18bcc5(0x143)](_0x38b4b1,_0x15e45c);(!_0x5dab6f||(_0x18bcc5(0x130)in _0x5dab6f?!_0x38b4b1[_0x18bcc5(0x13d)]:_0x5dab6f[_0x18bcc5(0x154)]||_0x5dab6f[_0x18bcc5(0x13e)]))&&(_0x5dab6f={'enumerable':!![],'get':function(){return _0x38b4b1[_0x15e45c];}}),Object[_0x18bcc5(0x13a)](_0x532114,_0xba583e,_0x5dab6f);}:function(_0x49e2a3,_0x3a3ab9,_0x217ea2,_0xbaf9fa){if(_0xbaf9fa===undefined)_0xbaf9fa=_0x217ea2;_0x49e2a3[_0xbaf9fa]=_0x3a3ab9[_0x217ea2];}),__setModuleDefault=this&&this[a0_0x2f1e69(0x148)]||(Object[a0_0x2f1e69(0x12f)]?function(_0x10a9f2,_0x538424){const _0x499a1b=a0_0x2f1e69;Object[_0x499a1b(0x13a)](_0x10a9f2,'default',{'enumerable':!![],'value':_0x538424});}:function(_0x2edab2,_0x373f25){const _0x36cbe1=a0_0x2f1e69;_0x2edab2[_0x36cbe1(0x14a)]=_0x373f25;}),__importStar=this&&this[a0_0x2f1e69(0x14f)]||(function(){var _0xe7d064=function(_0x7288c4){const _0x336e5d=a0_0xb58d;return _0xe7d064=Object[_0x336e5d(0x13f)]||function(_0x592a66){const _0x43ec86=_0x336e5d;var _0x3012b9=[];for(var _0x4c9104 in _0x592a66)if(Object[_0x43ec86(0x132)][_0x43ec86(0x15c)][_0x43ec86(0x14c)](_0x592a66,_0x4c9104))_0x3012b9[_0x3012b9['length']]=_0x4c9104;return _0x3012b9;},_0xe7d064(_0x7288c4);};return function(_0x280e96){const _0x1e41f0=a0_0xb58d;if(_0x280e96&&_0x280e96[_0x1e41f0(0x13d)])return _0x280e96;var _0x36340a={};if(_0x280e96!=null){for(var _0xd89d23=_0xe7d064(_0x280e96),_0x50add1=0x0;_0x50add1<_0xd89d23[_0x1e41f0(0x137)];_0x50add1++)if(_0xd89d23[_0x50add1]!=='default')__createBinding(_0x36340a,_0x280e96,_0xd89d23[_0x50add1]);}return __setModuleDefault(_0x36340a,_0x280e96),_0x36340a;};}());Object['defineProperty'](exports,a0_0x2f1e69(0x13d),{'value':!![]}),exports[a0_0x2f1e69(0x159)]=filterGitStatus,exports['filterGitLog']=filterGitLog,exports['filterGitDiff']=filterGitDiff;function a0_0xb58d(_0x509bb4,_0x52e0bd){_0x509bb4=_0x509bb4-0x125;const _0x68509e=a0_0x6850();let _0xb58dcd=_0x68509e[_0x509bb4];return _0xb58dcd;}const path=__importStar(require(a0_0x2f1e69(0x150)));function filterGitStatus(_0x34bab6){const _0x539b26=a0_0x2f1e69,_0x55a2a9=_0x34bab6[_0x539b26(0x145)]('\x0a')[_0x539b26(0x12d)](_0x26480b=>_0x26480b['trim']())[_0x539b26(0x136)](_0x158676=>_0x158676[_0x539b26(0x137)]>0x0);if(_0x55a2a9[_0x539b26(0x137)]===0x0)return _0x539b26(0x128);const _0x202fa6=[],_0xb456ba=[],_0x4dd018=[];for(const _0x20889a of _0x55a2a9){if(_0x20889a['startsWith']('##')){const _0x1d956b=_0x20889a[_0x539b26(0x142)](/^##\s*/,'');_0x202fa6['push']('*\x20Branch:\x20'+_0x1d956b);}else _0x20889a[_0x539b26(0x146)]('??')?_0xb456ba['push'](_0x20889a[_0x539b26(0x141)](0x3)[_0x539b26(0x138)]()):_0x4dd018[_0x539b26(0x131)](_0x20889a);}_0x4dd018['length']>0x0&&(_0x202fa6[_0x539b26(0x131)]('\x0aChanges:'),_0x202fa6['push'](..._0x4dd018[_0x539b26(0x12d)](_0xbf8b4d=>'\x20\x20'+_0xbf8b4d)));if(_0xb456ba[_0x539b26(0x137)]>0x0){_0x202fa6[_0x539b26(0x131)](_0x539b26(0x127));const _0x4211c4={},_0x35a305=[];for(const _0x536bc0 of _0xb456ba){const _0x3fc972=path[_0x539b26(0x156)](_0x536bc0);_0x3fc972==='.'||_0x3fc972===''?_0x35a305[_0x539b26(0x131)](_0x536bc0):(!_0x4211c4[_0x3fc972]&&(_0x4211c4[_0x3fc972]=[]),_0x4211c4[_0x3fc972][_0x539b26(0x131)](path['basename'](_0x536bc0)));}for(const [_0x1666ca,_0x5a7efc]of Object[_0x539b26(0x147)](_0x4211c4)){if(_0x5a7efc[_0x539b26(0x137)]>0x5)_0x202fa6[_0x539b26(0x131)](_0x539b26(0x12c)+_0x1666ca+'/\x20('+_0x5a7efc[_0x539b26(0x137)]+_0x539b26(0x13c));else for(const _0xe4fe27 of _0x5a7efc){_0x202fa6[_0x539b26(0x131)](_0x539b26(0x12c)+path[_0x539b26(0x157)](_0x1666ca,_0xe4fe27));}}for(const _0x362221 of _0x35a305){_0x202fa6['push']('\x20\x20??\x20'+_0x362221);}}return _0x202fa6[_0x539b26(0x157)]('\x0a');}function filterGitLog(_0x3d4b43){const _0x211dfb=a0_0x2f1e69,_0x37f9cc=_0x3d4b43[_0x211dfb(0x145)](_0x211dfb(0x140))['map'](_0x1ef7db=>_0x1ef7db['trim']())[_0x211dfb(0x136)](_0x44b693=>_0x44b693[_0x211dfb(0x137)]>0x0);if(_0x37f9cc['length']===0x0)return _0x3d4b43;const _0x4cb7ca=[];for(const _0x5eaef6 of _0x37f9cc){const _0x1e4e75=_0x5eaef6[_0x211dfb(0x145)]('\x0a'),_0x430731=_0x1e4e75[0x0]||'',_0x3dbc20=_0x1e4e75[_0x211dfb(0x135)](0x1)['map'](_0x47c1c5=>_0x47c1c5[_0x211dfb(0x138)]())[_0x211dfb(0x136)](_0x475f0b=>_0x475f0b[_0x211dfb(0x137)]>0x0);_0x4cb7ca[_0x211dfb(0x131)]('-\x20'+_0x430731),_0x3dbc20['length']>0x0&&(_0x4cb7ca[_0x211dfb(0x131)]('\x20\x20'+_0x3dbc20[0x0]),_0x3dbc20['length']>0x1&&_0x4cb7ca[_0x211dfb(0x131)](_0x211dfb(0x134)+(_0x3dbc20[_0x211dfb(0x137)]-0x1)+_0x211dfb(0x14e)));}return _0x4cb7ca[_0x211dfb(0x157)]('\x0a');}function filterGitDiff(_0xafe130){const _0x5ca8cb=a0_0x2f1e69,_0x1f046f=_0xafe130[_0x5ca8cb(0x145)]('\x0a'),_0x4fdbbb=[];let _0x580e22='',_0x15e9e9=0x0,_0x700d56=0x0,_0x1a0906=[];const _0x50556c=()=>{const _0x454cca=_0x5ca8cb;if(_0x580e22&&(_0x15e9e9>0x0||_0x700d56>0x0)){_0x4fdbbb[_0x454cca(0x131)](_0x454cca(0x139)+_0x580e22+_0x454cca(0x13b)+_0x15e9e9+'\x20-'+_0x700d56+')');const _0x11585d=0xa,_0x3d1746=_0x1a0906[_0x454cca(0x135)](0x0,_0x11585d);for(const _0xd6a612 of _0x3d1746){_0x4fdbbb[_0x454cca(0x131)]('\x20\x20'+_0xd6a612);}const _0x20af60=_0x15e9e9+_0x700d56-_0x11585d;_0x20af60>0x0&&_0x4fdbbb[_0x454cca(0x131)](_0x454cca(0x133)+_0x20af60+'\x20more\x20modifications');}_0x15e9e9=0x0,_0x700d56=0x0,_0x1a0906=[];};for(const _0x287bda of _0x1f046f){if(_0x287bda[_0x5ca8cb(0x146)]('diff\x20--git')){_0x50556c();const _0x3c2f4c=_0x287bda['match'](/\sb\/(.+)$/);_0x580e22=_0x3c2f4c?_0x3c2f4c[0x1]:_0x5ca8cb(0x153);}else{if(_0x287bda[_0x5ca8cb(0x146)]('+')&&!_0x287bda[_0x5ca8cb(0x146)](_0x5ca8cb(0x15a)))_0x15e9e9++,_0x1a0906[_0x5ca8cb(0x131)](_0x287bda);else _0x287bda['startsWith']('-')&&!_0x287bda[_0x5ca8cb(0x146)](_0x5ca8cb(0x12a))&&(_0x700d56++,_0x1a0906['push'](_0x287bda));}}_0x50556c();const _0x2c6cba=_0x4fdbbb[_0x5ca8cb(0x157)]('\x0a');return _0x2c6cba[_0x5ca8cb(0x137)]>0x0?_0x2c6cba:_0x5ca8cb(0x144);}
|
package/filters/go.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0xfd9556=a0_0x1084;function a0_0x1084(_0x1fccc0,_0x1ef51){_0x1fccc0=_0x1fccc0-0x96;const _0x3ba926=a0_0x3ba9();let _0x1084ee=_0x3ba926[_0x1fccc0];return _0x1084ee;}(function(_0x543eb7,_0x5018f6){const _0x5c3305=a0_0x1084,_0xf470a0=_0x543eb7();while(!![]){try{const _0x269385=parseInt(_0x5c3305(0xc0))/0x1*(parseInt(_0x5c3305(0xbf))/0x2)+parseInt(_0x5c3305(0xbb))/0x3+-parseInt(_0x5c3305(0xaa))/0x4*(-parseInt(_0x5c3305(0xaf))/0x5)+parseInt(_0x5c3305(0xbc))/0x6*(-parseInt(_0x5c3305(0xa8))/0x7)+-parseInt(_0x5c3305(0xa7))/0x8+-parseInt(_0x5c3305(0xba))/0x9+parseInt(_0x5c3305(0x9c))/0xa;if(_0x269385===_0x5018f6)break;else _0xf470a0['push'](_0xf470a0['shift']());}catch(_0x3c7e10){_0xf470a0['push'](_0xf470a0['shift']());}}}(a0_0x3ba9,0xedd2a));function a0_0x3ba9(){const _0x3176c4=['length','\x20issues\x20found','4975930maEubd','===\x20RUN','includes','no\x20test\x20files','FAIL','Go\x20test:\x20','trim','__esModule','\x20failed,\x20','match','slice','3740872eoExxu','7BdwQSn','lines','4yrCRuJ','join','\x20\x20...\x20+','\x20more\x20failures','Go\x20test:\x20no\x20test\x20files','882485PbsbCm','\x20\x20\x20\x20','---\x20SKIP:','startsWith','Go\x20test:\x20all\x20tests\x20passed','filter','Go\x20vet:\x20no\x20issues\x20found','split','\x20skipped','min','\x20passed,\x20','4113855hntdnW','4708506ujodiJ','3821856xEdkYb','filterGoVet','push','10nseuYo','58442AbLHFP','defineProperty','name','\x0aFailures:','Go\x20vet:\x20','\x20passed'];a0_0x3ba9=function(){return _0x3176c4;};return a0_0x3ba9();}Object[a0_0xfd9556(0xc1)](exports,a0_0xfd9556(0xa3),{'value':!![]}),exports['filterGoTest']=filterGoTest,exports[a0_0xfd9556(0xbd)]=filterGoVet;function filterGoTest(_0x4f3a94){const _0x2805e6=a0_0xfd9556,_0x1c34b5=_0x4f3a94[_0x2805e6(0xb6)]('\x0a');let _0x1fceea=0x0,_0x2e343c=0x0,_0x505f0d=0x0;const _0x5c3e56=[],_0x4e99f0=[];let _0x8bdb6e=null;for(const _0x5f9a0 of _0x1c34b5){const _0x3f80bf=_0x5f9a0[_0x2805e6(0xa2)](),_0x4fd313=_0x3f80bf[_0x2805e6(0xa5)](/^ok\s+\S+\s+[\d.]+s/);if(_0x4fd313){_0x4e99f0[_0x2805e6(0xbe)](_0x3f80bf);continue;}const _0x416cbc=_0x3f80bf['match'](/^FAIL\s+\S+/);if(_0x416cbc){_0x4e99f0[_0x2805e6(0xbe)](_0x3f80bf);continue;}const _0x1cd6cd=_0x3f80bf['match'](/^--- PASS:/);if(_0x1cd6cd){_0x1fceea++;continue;}const _0x5df786=_0x3f80bf[_0x2805e6(0xa5)](/^--- FAIL:\s+(\S+)/);if(_0x5df786){if(_0x8bdb6e)_0x5c3e56['push'](_0x8bdb6e);_0x8bdb6e={'name':_0x5df786[0x1],'lines':[]},_0x2e343c++;continue;}if(_0x3f80bf['startsWith'](_0x2805e6(0xb1))){_0x505f0d++;continue;}_0x8bdb6e&&_0x3f80bf['length']>0x0&&!_0x3f80bf[_0x2805e6(0xb2)](_0x2805e6(0x9d))&&_0x8bdb6e[_0x2805e6(0xa9)]['push'](_0x5f9a0),_0x3f80bf[_0x2805e6(0xb2)](_0x2805e6(0x9d))&&(_0x8bdb6e&&(_0x5c3e56['push'](_0x8bdb6e),_0x8bdb6e=null));}if(_0x8bdb6e)_0x5c3e56[_0x2805e6(0xbe)](_0x8bdb6e);if(_0x1fceea===0x0&&_0x2e343c===0x0&&_0x505f0d===0x0){if(_0x4f3a94[_0x2805e6(0x9e)]('PASS')&&!_0x4f3a94['includes'](_0x2805e6(0xa0)))return _0x2805e6(0xb3);if(_0x4f3a94[_0x2805e6(0x9e)](_0x2805e6(0x9f)))return _0x2805e6(0xae);return _0x4f3a94;}if(_0x2e343c===0x0){const _0x3d9597=['Go\x20test:\x20'+_0x1fceea+_0x2805e6(0x99)];if(_0x505f0d>0x0)_0x3d9597[_0x2805e6(0xbe)](_0x505f0d+_0x2805e6(0xb7));return _0x3d9597[_0x2805e6(0xab)](',\x20');}const _0x4a1e28=[_0x2805e6(0xa1)+_0x1fceea+_0x2805e6(0xb9)+_0x2e343c+_0x2805e6(0xa4)+_0x505f0d+_0x2805e6(0xb7)];if(_0x5c3e56[_0x2805e6(0x9a)]>0x0){_0x4a1e28[_0x2805e6(0xbe)](_0x2805e6(0x97));const _0x5bfb28=0x3;for(let _0x40201d=0x0;_0x40201d<Math[_0x2805e6(0xb8)](_0x5c3e56['length'],_0x5bfb28);_0x40201d++){const _0x2c3f8f=_0x5c3e56[_0x40201d];_0x4a1e28[_0x2805e6(0xbe)]('\x20\x20'+(_0x40201d+0x1)+'.\x20'+_0x2c3f8f[_0x2805e6(0x96)]);for(const _0x9d0f42 of _0x2c3f8f[_0x2805e6(0xa9)][_0x2805e6(0xa6)](0x0,0x5)){_0x4a1e28[_0x2805e6(0xbe)](_0x2805e6(0xb0)+_0x9d0f42['trim']());}_0x2c3f8f['lines'][_0x2805e6(0x9a)]>0x5&&_0x4a1e28['push']('\x20\x20\x20\x20...\x20+'+(_0x2c3f8f[_0x2805e6(0xa9)][_0x2805e6(0x9a)]-0x5)+'\x20more\x20lines');}_0x5c3e56[_0x2805e6(0x9a)]>_0x5bfb28&&_0x4a1e28[_0x2805e6(0xbe)](_0x2805e6(0xac)+(_0x5c3e56[_0x2805e6(0x9a)]-_0x5bfb28)+_0x2805e6(0xad));}return _0x4a1e28[_0x2805e6(0xab)]('\x0a');}function filterGoVet(_0x5b6a08){const _0x3c72ad=a0_0xfd9556,_0x21b1b7=_0x5b6a08['split']('\x0a')[_0x3c72ad(0xb4)](_0x432481=>_0x432481['trim']()[_0x3c72ad(0x9a)]>0x0);if(_0x21b1b7[_0x3c72ad(0x9a)]===0x0)return _0x3c72ad(0xb5);if(_0x21b1b7['length']<=0x14)return _0x5b6a08[_0x3c72ad(0xa2)]();const _0x2cea45=[_0x3c72ad(0x98)+_0x21b1b7['length']+_0x3c72ad(0x9b)];return _0x2cea45['push'](..._0x21b1b7[_0x3c72ad(0xa6)](0x0,0xa)),_0x21b1b7[_0x3c72ad(0x9a)]>0xa&&_0x2cea45['push']('...\x20+'+(_0x21b1b7['length']-0xa)+'\x20more\x20issues'),_0x2cea45[_0x3c72ad(0xab)]('\x0a');}
|
package/filters/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x259a25=a0_0x4595;function a0_0x154e(){const _0x1d3171=['trim\x20pnpm','6ndNcpg','filterPipInstall','filterGitStatus','endsWith','toLowerCase','kubectl','vitest','get','./generic','./devops','filterNpmInstall','6661560ZDBEwo','4nSAjMF','11021lARfSF','collapseDuplicates','redactor','filterGoTest','1932339wOnQGe','trim\x20git','git\x20log','filterCargoTest','748797cbNsGA','npm\x20install','npm\x20run\x20test','redact','git\x20show','trim\x20read','includes','filterTree','npm\x20i','git\x20status','\x20ls','trim\x20npx','./git','npm\x20test','pytest','trim\x20cargo','64PYLLfF','filterJestVitest','trim\x20ruff','match','yarn\x20test','trim\x20tree','8qunRoC','cargo\x20test','filterCargoBuild','go\x20vet','length','filterDockerPs','cargo\x20check','cargo\x20build','filterCat','pnpm\x20test','996750SIJpYl','4016005qmanPx','trim\x20glab','git\x20diff','cargo\x20clippy','yarn\x20install','trim\x20go','filterDockerImages','rewriteCommand','trim\x20','pip\x20install','trim\x20pytest','2344727VCTyfG','ruff\x20check','./shell','filterRuff','\x20ls\x20','__esModule','trim','trim\x20gh','trim\x20pip','ruff\x20','./go','filterGoVet','\x20tree','filterPytest','startsWith','yadm\x20status'];a0_0x154e=function(){return _0x1d3171;};return a0_0x154e();}(function(_0x1797e1,_0x59d856){const _0x20df04=a0_0x4595,_0xe320cc=_0x1797e1();while(!![]){try{const _0x35f6d1=-parseInt(_0x20df04(0xfb))/0x1*(parseInt(_0x20df04(0xc1))/0x2)+-parseInt(_0x20df04(0xff))/0x3*(parseInt(_0x20df04(0xfa))/0x4)+parseInt(_0x20df04(0xd2))/0x5*(parseInt(_0x20df04(0xee))/0x6)+parseInt(_0x20df04(0x103))/0x7*(parseInt(_0x20df04(0xc7))/0x8)+parseInt(_0x20df04(0xd1))/0x9+parseInt(_0x20df04(0xf9))/0xa+-parseInt(_0x20df04(0xdd))/0xb;if(_0x35f6d1===_0x59d856)break;else _0xe320cc['push'](_0xe320cc['shift']());}catch(_0x4ef67c){_0xe320cc['push'](_0xe320cc['shift']());}}}(a0_0x154e,0x747d0));Object['defineProperty'](exports,a0_0x259a25(0xe2),{'value':!![]}),exports['compressOutput']=compressOutput,exports[a0_0x259a25(0xd9)]=rewriteCommand;const generic_1=require(a0_0x259a25(0xf6)),git_1=require(a0_0x259a25(0xbd)),python_1=require('./python'),js_1=require('./js'),shell_1=require(a0_0x259a25(0xdf)),rust_1=require('./rust'),go_1=require(a0_0x259a25(0xe7)),devops_1=require(a0_0x259a25(0xf7)),redactor_1=require('../redactor');function a0_0x4595(_0xd9612,_0x30e939){_0xd9612=_0xd9612-0xb7;const _0x154e72=a0_0x154e();let _0x4595ff=_0x154e72[_0xd9612];return _0x4595ff;}function compressOutput(_0x32ad2e,_0x4235a6,_0x5d2cc9,_0x294e71=!![]){const _0x829b09=a0_0x259a25,_0x555aa4=_0x32ad2e[_0x829b09(0xe3)]();let _0x204e55=_0x4235a6;_0x5d2cc9['trim']()[_0x829b09(0xcb)]>0x0&&(_0x204e55=_0x4235a6+'\x0a'+_0x5d2cc9);let _0x4152c0=(0x0,generic_1['stripAnsi'])(_0x204e55);_0x294e71&&(_0x4152c0=redactor_1[_0x829b09(0xfd)][_0x829b09(0x106)](_0x4152c0));const _0x38934a=_0x555aa4[_0x829b09(0xf2)]();try{if(_0x38934a[_0x829b09(0xb7)](_0x829b09(0xba))||_0x38934a[_0x829b09(0xb7)](_0x829b09(0xec)))return(0x0,git_1[_0x829b09(0xf0)])(_0x4152c0);if(_0x38934a[_0x829b09(0xb7)](_0x829b09(0x101))||_0x38934a[_0x829b09(0xb7)]('yadm\x20log'))return(0x0,git_1['filterGitLog'])(_0x4152c0);if(_0x38934a['includes'](_0x829b09(0xd4))||_0x38934a['includes'](_0x829b09(0x107))||_0x38934a['includes']('yadm\x20diff'))return(0x0,git_1['filterGitDiff'])(_0x4152c0);if(_0x38934a[_0x829b09(0xb7)](_0x829b09(0xbf))||_0x38934a[_0x829b09(0xc4)](/python3?\s+-m\s+pytest/))return(0x0,python_1[_0x829b09(0xea)])(_0x4152c0);if(_0x38934a['includes'](_0x829b09(0xdb))||_0x38934a[_0x829b09(0xb7)]('pip3\x20install'))return(0x0,python_1[_0x829b09(0xef)])(_0x4152c0);if(_0x38934a[_0x829b09(0xb7)](_0x829b09(0xde))||_0x38934a[_0x829b09(0xb7)](_0x829b09(0xe6)))return(0x0,devops_1[_0x829b09(0xe0)])(_0x4152c0);if(_0x38934a['includes'](_0x829b09(0x104))||_0x38934a[_0x829b09(0xb7)]('npm\x20i\x20')||_0x38934a[_0x829b09(0xf1)](_0x829b09(0xb9))||_0x38934a[_0x829b09(0xb7)]('pnpm\x20install')||_0x38934a['includes'](_0x829b09(0xd6)))return(0x0,js_1[_0x829b09(0xf8)])(_0x4152c0);if(_0x38934a['includes']('jest')||_0x38934a['includes'](_0x829b09(0xf4)))return(0x0,js_1[_0x829b09(0xc2)])(_0x4152c0);if(_0x38934a['includes'](_0x829b09(0xbe))||_0x38934a[_0x829b09(0xb7)](_0x829b09(0xd0))||_0x38934a['includes'](_0x829b09(0xc5))||_0x38934a[_0x829b09(0xb7)](_0x829b09(0x105)))return(0x0,js_1[_0x829b09(0xc2)])(_0x4152c0);if(_0x38934a['includes'](_0x829b09(0xc8)))return(0x0,rust_1[_0x829b09(0x102)])(_0x4152c0);if(_0x38934a['includes'](_0x829b09(0xce))||_0x38934a[_0x829b09(0xb7)](_0x829b09(0xcd))||_0x38934a[_0x829b09(0xb7)](_0x829b09(0xd5)))return(0x0,rust_1[_0x829b09(0xc9)])(_0x4152c0);if(_0x38934a['includes']('go\x20test'))return(0x0,go_1[_0x829b09(0xfe)])(_0x4152c0);if(_0x38934a[_0x829b09(0xb7)](_0x829b09(0xca)))return(0x0,go_1[_0x829b09(0xe8)])(_0x4152c0);if(_0x38934a[_0x829b09(0xc4)](/docker\s+ps/))return(0x0,devops_1[_0x829b09(0xcc)])(_0x4152c0);if(_0x38934a[_0x829b09(0xc4)](/docker\s+images/))return(0x0,devops_1[_0x829b09(0xd8)])(_0x4152c0);if(_0x38934a[_0x829b09(0xc4)](/docker\s+logs/))return(0x0,devops_1['filterDockerLogs'])(_0x4152c0);if(_0x38934a['includes'](_0x829b09(0xf3))){const _0x5a697f=_0x38934a[_0x829b09(0xc4)](/kubectl\s+(get|logs|describe|apply)/),_0x45f891=_0x5a697f?_0x5a697f[0x1]:_0x829b09(0xf5);return(0x0,devops_1['filterKubectl'])(_0x4152c0,_0x45f891);}if(_0x38934a[_0x829b09(0xc4)](/^(ls|dir)(\s|$)/)||_0x38934a[_0x829b09(0xb7)](_0x829b09(0xe1))||_0x38934a[_0x829b09(0xf1)](_0x829b09(0xbb)))return(0x0,shell_1['filterLs'])(_0x4152c0);if(_0x38934a[_0x829b09(0xc4)](/^tree(\s|$)/)||_0x38934a[_0x829b09(0xb7)]('\x20tree\x20')||_0x38934a[_0x829b09(0xf1)](_0x829b09(0xe9)))return(0x0,shell_1[_0x829b09(0xb8)])(_0x4152c0);if(_0x38934a[_0x829b09(0xc4)](/^(cat|head|tail|read|bat)(\s|$)/))return(0x0,shell_1[_0x829b09(0xcf)])(_0x4152c0);if(_0x38934a[_0x829b09(0xc4)](/^(grep|rg|ripgrep)(\s|$)/))return(0x0,shell_1['filterGrep'])(_0x4152c0);}catch(_0x52fa7f){}return _0x4152c0=(0x0,generic_1[_0x829b09(0xfc)])(_0x4152c0),_0x4152c0=(0x0,generic_1['softTruncate'])(_0x4152c0,0x4e20),_0x4152c0;}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_0x259a25(0x100)},{'pattern':/^gh\s+(pr|issue|run|repo|api|release)/,'prefix':a0_0x259a25(0xe4)},{'pattern':/^glab\s+(mr|issue|ci|pipeline|api|release)/,'prefix':a0_0x259a25(0xd3)},{'pattern':/^cargo\s+(build|test|clippy|check|fmt|install)/,'prefix':a0_0x259a25(0xc0)},{'pattern':/^pnpm\s+(exec|i|install|list|ls|outdated|run|run-script)/,'prefix':a0_0x259a25(0xed)},{'pattern':/^npm\s+(exec|run|run-script|rum|urn|x|test)(\s|$)/,'prefix':'trim\x20npm'},{'pattern':/^npx\s+/,'prefix':a0_0x259a25(0xbc)},{'pattern':/^(cat|head|tail)\s+/,'prefix':a0_0x259a25(0x108)},{'pattern':/^(rg|grep)\s+/,'prefix':'trim\x20grep'},{'pattern':/^ls(\s|$)/,'prefix':'trim\x20ls'},{'pattern':/^tree(\s|$)/,'prefix':a0_0x259a25(0xc6)},{'pattern':/^find\s+/,'prefix':'trim\x20find'},{'pattern':/^docker\s+(ps|images|logs|run|exec|build|compose)/,'prefix':'trim\x20docker'},{'pattern':/^kubectl\s+(get|logs|describe|apply)/,'prefix':'trim\x20kubectl'},{'pattern':/^(python3?\s+-m\s+)?pytest(\s|$)/,'prefix':a0_0x259a25(0xdc)},{'pattern':/^ruff\s+(check|format)/,'prefix':a0_0x259a25(0xc3)},{'pattern':/^(pip3?|uv\s+pip)\s+(list|outdated|install|show)/,'prefix':a0_0x259a25(0xe5)},{'pattern':/^go\s+(test|build|vet)/,'prefix':a0_0x259a25(0xd7)}];function rewriteCommand(_0x395f56){const _0x337b49=a0_0x259a25,_0x26c969=_0x395f56[_0x337b49(0xe3)]();if(_0x26c969[_0x337b49(0xeb)](_0x337b49(0xda)))return _0x26c969;for(const _0x398046 of REWRITE_RULES){if(_0x398046['pattern']['test'](_0x26c969))return _0x337b49(0xda)+_0x26c969;}return _0x26c969;}
|