trimprompt 1.0.6 → 1.0.8
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 +19 -22
- 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 +123 -38
- 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/README.md
CHANGED
|
@@ -33,7 +33,24 @@ npm install -g trimprompt
|
|
|
33
33
|
Since TrimPrompt intercepts commands at the OS `PATH` level, your AI assistants will automatically benefit from prompt optimization without changing their workflow.
|
|
34
34
|
When Claude Code runs `git status`, it triggers `trim git status` behind the scenes, outputting a compacted representation.
|
|
35
35
|
|
|
36
|
-
### 2.
|
|
36
|
+
### 2. Local Developer Dashboard
|
|
37
|
+
Start the local dashboard web UI:
|
|
38
|
+
```bash
|
|
39
|
+
trim ui
|
|
40
|
+
# or trim dashboard
|
|
41
|
+
```
|
|
42
|
+
Options:
|
|
43
|
+
* `-p, --port <number>`: Port to run the server on (default: `4000`).
|
|
44
|
+
|
|
45
|
+
The command will boot the dashboard web server and automatically open your default browser pointing to:
|
|
46
|
+
👉 **`http://localhost:4000`**
|
|
47
|
+
|
|
48
|
+
#### Inside the Dashboard:
|
|
49
|
+
* **Analytics Cards:** See your Shaved Cost, Reduction Rate, Estimated Savings, and Original Cost.
|
|
50
|
+
* **Savings Timeline:** A Chart.js graph tracking your daily raw vs. compressed token counts.
|
|
51
|
+
* **Execution Logs:** Click on any past command to open the visual side-by-side diff inspector showing the exact raw vs. compacted output.
|
|
52
|
+
|
|
53
|
+
### 3. Manual CLI Commands
|
|
37
54
|
You can also run commands manually:
|
|
38
55
|
* Show stats summary:
|
|
39
56
|
```bash
|
|
@@ -48,7 +65,7 @@ You can also run commands manually:
|
|
|
48
65
|
trim rewrite "git status"
|
|
49
66
|
```
|
|
50
67
|
|
|
51
|
-
###
|
|
68
|
+
### 4. Model Context Protocol (MCP) Proxying
|
|
52
69
|
If you run interactive, streaming MCP servers, wrap them with the `mcp-proxy` command:
|
|
53
70
|
```bash
|
|
54
71
|
trim mcp-proxy <server-command> [server-args...]
|
|
@@ -61,26 +78,6 @@ TrimPrompt will parse the stdin/stdout JSON-RPC stream, extract the tool respons
|
|
|
61
78
|
|
|
62
79
|
---
|
|
63
80
|
|
|
64
|
-
## Local Developer Dashboard
|
|
65
|
-
|
|
66
|
-
Start the local dashboard web UI:
|
|
67
|
-
```bash
|
|
68
|
-
trim ui
|
|
69
|
-
# or trim dashboard
|
|
70
|
-
```
|
|
71
|
-
Options:
|
|
72
|
-
* `-p, --port <number>`: Port to run the server on (default: `4000`).
|
|
73
|
-
|
|
74
|
-
The command will boot the dashboard web server and automatically open your default browser pointing to:
|
|
75
|
-
👉 **`http://localhost:4000`**
|
|
76
|
-
|
|
77
|
-
### Inside the Dashboard:
|
|
78
|
-
* **Analytics Cards:** See your Shaved Cost, Reduction Rate, Estimated Savings, and Original Cost.
|
|
79
|
-
* **Savings Timeline:** A Chart.js graph tracking your daily raw vs. compressed token counts.
|
|
80
|
-
* **Execution Logs:** Click on any past command to open the visual side-by-side diff inspector showing the exact raw vs. compacted output.
|
|
81
|
-
|
|
82
|
-
---
|
|
83
|
-
|
|
84
81
|
## 180-Day Log Rotation Policy
|
|
85
82
|
To keep your disk usage lightweight, TrimPrompt runs a background cleanup process. Every calendar day you use the CLI, a detached background process unlinks all log files (`.raw.txt` and `.comp.txt`) inside `~/.trimprompt/logs/` and removes metadata records from `stats.json` that are older than **180 days**.
|
|
86
83
|
|
package/cache.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x33ca43=a0_0x4f4f;(function(_0x465de0,_0x5cc751){const _0x36f622=a0_0x4f4f,_0x47e33b=_0x465de0();while(!![]){try{const _0x4cfa08=parseInt(_0x36f622(0xaa))/0x1*(parseInt(_0x36f622(0xc5))/0x2)+parseInt(_0x36f622(0x9b))/0x3+-parseInt(_0x36f622(0x97))/0x4+-parseInt(_0x36f622(0x8c))/0x5+parseInt(_0x36f622(0x92))/0x6*(parseInt(_0x36f622(0xbd))/0x7)+parseInt(_0x36f622(0xb4))/0x8*(-parseInt(_0x36f622(0x99))/0x9)+-parseInt(_0x36f622(0xc0))/0xa*(-parseInt(_0x36f622(0xb8))/0xb);if(_0x4cfa08===_0x5cc751)break;else _0x47e33b['push'](_0x47e33b['shift']());}catch(_0x472df8){_0x47e33b['push'](_0x47e33b['shift']());}}}(a0_0x542a,0x4f89b));var __createBinding=this&&this[a0_0x33ca43(0xb3)]||(Object[a0_0x33ca43(0x91)]?function(_0x964a1b,_0xb59926,_0x49f131,_0x413d31){const _0x519a55=a0_0x33ca43;if(_0x413d31===undefined)_0x413d31=_0x49f131;var _0x2027d1=Object[_0x519a55(0x8d)](_0xb59926,_0x49f131);(!_0x2027d1||('get'in _0x2027d1?!_0xb59926['__esModule']:_0x2027d1[_0x519a55(0xb9)]||_0x2027d1[_0x519a55(0x93)]))&&(_0x2027d1={'enumerable':!![],'get':function(){return _0xb59926[_0x49f131];}}),Object[_0x519a55(0x80)](_0x964a1b,_0x413d31,_0x2027d1);}:function(_0x384cb8,_0x39b91b,_0x5b7c29,_0x58595e){if(_0x58595e===undefined)_0x58595e=_0x5b7c29;_0x384cb8[_0x58595e]=_0x39b91b[_0x5b7c29];}),__setModuleDefault=this&&this[a0_0x33ca43(0x98)]||(Object[a0_0x33ca43(0x91)]?function(_0x2a09ce,_0x3b72a1){const _0x17741f=a0_0x33ca43;Object[_0x17741f(0x80)](_0x2a09ce,_0x17741f(0xad),{'enumerable':!![],'value':_0x3b72a1});}:function(_0x2f13f6,_0x46e819){const _0x18bed0=a0_0x33ca43;_0x2f13f6[_0x18bed0(0xad)]=_0x46e819;}),__importStar=this&&this['__importStar']||(function(){var _0x5b6a11=function(_0x3da987){return _0x5b6a11=Object['getOwnPropertyNames']||function(_0x2df84c){const _0x12f991=a0_0x4f4f;var _0x5c1dcd=[];for(var _0x3ee7b3 in _0x2df84c)if(Object[_0x12f991(0xae)][_0x12f991(0x83)]['call'](_0x2df84c,_0x3ee7b3))_0x5c1dcd[_0x5c1dcd['length']]=_0x3ee7b3;return _0x5c1dcd;},_0x5b6a11(_0x3da987);};return function(_0x11c1cc){const _0x57384b=a0_0x4f4f;if(_0x11c1cc&&_0x11c1cc[_0x57384b(0xaf)])return _0x11c1cc;var _0x2e9f88={};if(_0x11c1cc!=null){for(var _0x52b289=_0x5b6a11(_0x11c1cc),_0x4d1531=0x0;_0x4d1531<_0x52b289['length'];_0x4d1531++)if(_0x52b289[_0x4d1531]!==_0x57384b(0xad))__createBinding(_0x2e9f88,_0x11c1cc,_0x52b289[_0x4d1531]);}return __setModuleDefault(_0x2e9f88,_0x11c1cc),_0x2e9f88;};}());function a0_0x4f4f(_0x273a40,_0x5b9f48){const _0x542a0e=a0_0x542a();return a0_0x4f4f=function(_0x4f4fba,_0x59ef46){_0x4f4fba=_0x4f4fba-0x80;let _0x435efd=_0x542a0e[_0x4f4fba];return _0x435efd;},a0_0x4f4f(_0x273a40,_0x5b9f48);}Object[a0_0x33ca43(0x80)](exports,a0_0x33ca43(0xaf),{'value':!![]}),exports['dedup']=dedup;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x33ca43(0xc6))),os=__importStar(require('os')),crypto=__importStar(require(a0_0x33ca43(0xa0))),CACHE_DIR=path[a0_0x33ca43(0x85)](os[a0_0x33ca43(0x94)](),'.trimprompt'),CACHE_FILE=path[a0_0x33ca43(0x85)](CACHE_DIR,a0_0x33ca43(0x9a)),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(_0x55ca62){const _0x4a4535=a0_0x33ca43,_0x566735=_0x55ca62[_0x4a4535(0x95)]()[_0x4a4535(0x82)]();if(_0x566735[_0x4a4535(0xbe)](/^(cat|head|tail|read|bat)\s/))return _0x4a4535(0x89);if(_0x566735[_0x4a4535(0x9f)](_0x4a4535(0xa7))||_0x566735[_0x4a4535(0x9f)](_0x4a4535(0xbf)))return _0x4a4535(0xbb);if(_0x566735['includes'](_0x4a4535(0xa8))||_0x566735['includes'](_0x4a4535(0x8a)))return _0x4a4535(0xb5);if(_0x566735['includes'](_0x4a4535(0xac))||_0x566735[_0x4a4535(0x9f)](_0x4a4535(0xa4)))return _0x4a4535(0xb6);if(_0x566735[_0x4a4535(0xbe)](/^(ls|dir)(\s|$)/)||_0x566735[_0x4a4535(0x9f)](_0x4a4535(0x86))||_0x566735['endsWith']('\x20ls'))return'ls';if(_0x566735['match'](/^tree(\s|$)/)||_0x566735[_0x4a4535(0x9f)]('\x20tree\x20')||_0x566735['endsWith'](_0x4a4535(0xa1)))return _0x4a4535(0x88);if(_0x566735[_0x4a4535(0xbe)](/docker\s+ps/))return _0x4a4535(0xc7);if(_0x566735[_0x4a4535(0xbe)](/docker\s+images/))return'docker-images';if(_0x566735[_0x4a4535(0x9f)](_0x4a4535(0xb7))||_0x566735[_0x4a4535(0x9f)](_0x4a4535(0x9d)))return'kubectl';if(_0x566735[_0x4a4535(0x9f)]('ruff\x20check')||_0x566735['includes'](_0x4a4535(0xc1)))return'ruff';if(_0x566735[_0x4a4535(0x9f)](_0x4a4535(0x84)))return'go-vet';return'';}function md5(_0x2109ea){const _0x26e1aa=a0_0x33ca43;return crypto[_0x26e1aa(0xa9)](_0x26e1aa(0xa6))[_0x26e1aa(0x96)](_0x2109ea)['digest'](_0x26e1aa(0xc3));}function a0_0x542a(){const _0x342b37=['round','[cached\x20—\x20unchanged\x20since\x20','length','create','6VgKUcS','configurable','homedir','trim','update','2399760DstMaR','__setModuleDefault','459KypOyb','cache.json','322836bCcIyz','\x20chars','kubectl\x20describe','stringify','includes','crypto','\x20tree','\x20lines','docker','yadm\x20show','\x20entries','md5','git\x20status','git\x20log','createHash','67061PWfFGS','readFileSync','git\x20show','default','prototype','__esModule','cwd','writeFileSync','timestamp','__createBinding','100840ARreml','git-log','git-show','kubectl\x20get','949828ThIvBc','writable','parse','git-status','\x20lines,\x20','3283406HZPpsx','match','yadm\x20status','70zNLKBw','ruff\x20','sort','hex','mkdirSync','18XWxlKN','path','docker-ps','utf8','defineProperty','startsWith','toLowerCase','hasOwnProperty','go\x20vet','join','\x20ls\x20','existsSync','tree','file','yadm\x20log','split','1080365UKaQwy','getOwnPropertyDescriptor'];a0_0x542a=function(){return _0x342b37;};return a0_0x542a();}function loadStore(){const _0x5f5cf8=a0_0x33ca43;try{if(fs[_0x5f5cf8(0x87)](CACHE_FILE))return JSON[_0x5f5cf8(0xba)](fs[_0x5f5cf8(0xab)](CACHE_FILE,_0x5f5cf8(0xc8)));}catch{}return{};}function saveStore(_0x2e7a6){const _0x58b638=a0_0x33ca43;try{if(!fs[_0x58b638(0x87)](CACHE_DIR))fs[_0x58b638(0xc4)](CACHE_DIR,{'recursive':!![]});const _0x2b82f9=Object['keys'](_0x2e7a6);if(_0x2b82f9[_0x58b638(0x90)]>MAX_ENTRIES){const _0x45c7bf=_0x2b82f9[_0x58b638(0xc2)]((_0xbfd448,_0x3dcb37)=>_0x2e7a6[_0xbfd448][_0x58b638(0xb2)]-_0x2e7a6[_0x3dcb37]['timestamp']);for(const _0x464183 of _0x45c7bf['slice'](0x0,_0x2b82f9['length']-MAX_ENTRIES)){delete _0x2e7a6[_0x464183];}}fs[_0x58b638(0xb1)](CACHE_FILE,JSON[_0x58b638(0x9e)](_0x2e7a6),_0x58b638(0xc8));}catch{}}function buildSummary(_0x17f248,_0x7c18dd){const _0x54be7a=a0_0x33ca43,_0x4ad531=_0x17f248[_0x54be7a(0x8b)]('\x0a')['length'],_0x37ff04=_0x17f248[_0x54be7a(0x90)];if(_0x7c18dd===_0x54be7a(0x89))return _0x4ad531+_0x54be7a(0xbc)+_0x37ff04+_0x54be7a(0x9c);if(_0x7c18dd===_0x54be7a(0xbb))return _0x4ad531+_0x54be7a(0xa2);if(_0x7c18dd===_0x54be7a(0xb5))return _0x4ad531+_0x54be7a(0xa5);if(_0x7c18dd[_0x54be7a(0x81)](_0x54be7a(0xa3)))return _0x4ad531+'\x20lines';return _0x4ad531+_0x54be7a(0xbc)+_0x37ff04+_0x54be7a(0x9c);}function dedup(_0x5f0aa4,_0x49f066){const _0x24af73=a0_0x33ca43;try{const _0x1d6641=classifyCommand(_0x5f0aa4);if(!_0x1d6641)return null;const _0x5ac6b6=TTL_SECONDS[_0x1d6641];if(!_0x5ac6b6)return null;const _0x349563=process[_0x24af73(0xb0)](),_0x493503=md5(_0x349563+'::'+_0x5f0aa4[_0x24af73(0x95)]()),_0x4d9ff6=md5(_0x49f066),_0x664428=Date['now'](),_0x124f78=loadStore(),_0x350627=_0x124f78[_0x493503];if(_0x350627&&_0x350627['hash']===_0x4d9ff6&&_0x664428-_0x350627['timestamp']<_0x5ac6b6*0x3e8){const _0x25dc25=Math[_0x24af73(0x8e)]((_0x664428-_0x350627[_0x24af73(0xb2)])/0x3e8);return _0x24af73(0x8f)+_0x25dc25+'s\x20ago,\x20'+_0x350627['summary']+']';}_0x124f78[_0x493503]={'hash':_0x4d9ff6,'summary':buildSummary(_0x49f066,_0x1d6641),'timestamp':_0x664428,'chars':_0x49f066['length']},saveStore(_0x124f78);}catch{}return null;}
|
package/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
'use strict';const a0_0xcf802e=a0_0x156b;(function(_0x55a790,_0x4db953){const _0x1a8a53=a0_0x156b,_0x2bd8b9=_0x55a790();while(!![]){try{const _0x2d3981=-parseInt(_0x1a8a53(0xe7))/0x1+-parseInt(_0x1a8a53(0x173))/0x2*(parseInt(_0x1a8a53(0x103))/0x3)+parseInt(_0x1a8a53(0x148))/0x4+-parseInt(_0x1a8a53(0xe3))/0x5*(parseInt(_0x1a8a53(0x15b))/0x6)+parseInt(_0x1a8a53(0x13e))/0x7*(-parseInt(_0x1a8a53(0x154))/0x8)+-parseInt(_0x1a8a53(0x135))/0x9+parseInt(_0x1a8a53(0x15c))/0xa;if(_0x2d3981===_0x4db953)break;else _0x2bd8b9['push'](_0x2bd8b9['shift']());}catch(_0x1295e9){_0x2bd8b9['push'](_0x2bd8b9['shift']());}}}(a0_0x8fec,0x36004));var __createBinding=this&&this[a0_0xcf802e(0xea)]||(Object[a0_0xcf802e(0x119)]?function(_0x593e46,_0x27e4a3,_0x1d8a9e,_0x3ed3f7){const _0x546842=a0_0xcf802e;if(_0x3ed3f7===undefined)_0x3ed3f7=_0x1d8a9e;var _0x279ab4=Object[_0x546842(0xff)](_0x27e4a3,_0x1d8a9e);(!_0x279ab4||('get'in _0x279ab4?!_0x27e4a3[_0x546842(0xf1)]:_0x279ab4[_0x546842(0x170)]||_0x279ab4[_0x546842(0xe9)]))&&(_0x279ab4={'enumerable':!![],'get':function(){return _0x27e4a3[_0x1d8a9e];}}),Object[_0x546842(0x10b)](_0x593e46,_0x3ed3f7,_0x279ab4);}:function(_0x2eecbe,_0x34ea4b,_0x55e186,_0x1c1300){if(_0x1c1300===undefined)_0x1c1300=_0x55e186;_0x2eecbe[_0x1c1300]=_0x34ea4b[_0x55e186];}),__setModuleDefault=this&&this[a0_0xcf802e(0x10a)]||(Object[a0_0xcf802e(0x119)]?function(_0x430714,_0x1b20d3){const _0x5bf1a1=a0_0xcf802e;Object[_0x5bf1a1(0x10b)](_0x430714,_0x5bf1a1(0x11d),{'enumerable':!![],'value':_0x1b20d3});}:function(_0x18436c,_0x164063){const _0xa5102c=a0_0xcf802e;_0x18436c[_0xa5102c(0x11d)]=_0x164063;}),__importStar=this&&this['__importStar']||(function(){var _0x239505=function(_0x1f8af2){const _0x3272d3=a0_0x156b;return _0x239505=Object[_0x3272d3(0x163)]||function(_0x50e275){const _0x3a4bdb=_0x3272d3;var _0x325851=[];for(var _0x5dcde8 in _0x50e275)if(Object[_0x3a4bdb(0x16b)][_0x3a4bdb(0x127)][_0x3a4bdb(0x10e)](_0x50e275,_0x5dcde8))_0x325851[_0x325851[_0x3a4bdb(0x175)]]=_0x5dcde8;return _0x325851;},_0x239505(_0x1f8af2);};return function(_0x2c0783){const _0x27dbe9=a0_0x156b;if(_0x2c0783&&_0x2c0783[_0x27dbe9(0xf1)])return _0x2c0783;var _0x1fe319={};if(_0x2c0783!=null){for(var _0x485c0d=_0x239505(_0x2c0783),_0x1d4ea8=0x0;_0x1d4ea8<_0x485c0d[_0x27dbe9(0x175)];_0x1d4ea8++)if(_0x485c0d[_0x1d4ea8]!==_0x27dbe9(0x11d))__createBinding(_0x1fe319,_0x2c0783,_0x485c0d[_0x1d4ea8]);}return __setModuleDefault(_0x1fe319,_0x2c0783),_0x1fe319;};}());Object[a0_0xcf802e(0x10b)](exports,a0_0xcf802e(0xf1),{'value':!![]});const commander_1=require(a0_0xcf802e(0x109)),executor_1=require(a0_0xcf802e(0x131)),filters_1=require(a0_0xcf802e(0x149)),tracker_1=require('./tracker'),cache_1=require(a0_0xcf802e(0x176)),shims_1=require(a0_0xcf802e(0x167)),dashboard_1=require(a0_0xcf802e(0x12e)),program=new commander_1['Command']();function a0_0x8fec(){const _0xe1ebb0=['5yTcnDr','<server-command>','some','-p,\x20--port\x20<number>','284675PEAVfr','logExecution','configurable','__createBinding','<commandLine>','-m,\x20--model\x20<string>','-sb','--pretty=format:%h\x20%s\x20(%ar)\x20(%an)%n%b%n---END---','Model\x20Context:\x20\x20\x20\x20\x20','\x20(after\x20Shave)','__esModule','npx','-50','dashboard','toLocaleString','\x20\x20\x20\x20\x20\x20\x20TRIMPROMPT.AI\x20SAVINGS\x20SUMMARY\x20\x20\x20\x20\x20\x20\x20\x20','Raw\x20Tokens:\x20\x20\x20\x20\x20\x20\x20\x20','--format','get','includes','<action>','log','stats','write','getOwnPropertyDescriptor','port','total_raw_tokens','argv','3RpHVny','./mcp','test','node','Install\x20or\x20uninstall\x20system\x20command\x20shims','get\x20or\x20set','commander','__setModuleDefault','defineProperty','description','env','call','-10','set','stderr','compressed_cost_usd','toFixed','[TrimPrompt]\x20Autodetected\x20MCP\x20server\x20execution.\x20Activating\x20real-time\x20JSON-RPC\x20proxy...','trim','then','server-mcp','command','create','Start\x20the\x20local\x20developer\x20dashboard','Tokens\x20Saved:\x20\x20\x20\x20\x20\x20','[server-args...]','default','--pretty','Actual\x20Cost:\x20\x20\x20\x20\x20\x20\x20$','modelcontextprotocol','--no-merges','uninstallShims','=============================================','toLowerCase','shims','platform','hasOwnProperty','<key>','startsWith','win32','install\x20or\x20uninstall','name','bun','./dashboard','--oneline','every','./executor','--max-count','model','Money\x20Saved:\x20\x20\x20\x20\x20\x20\x20$','2213838GBdPnR','--short','uninstall','parse','proxy','\x20USD','4000','Compressed:\x20\x20\x20\x20\x20\x20\x20\x20','Manage\x20local\x20configuration\x20parameters','329BAAblO','executeCommand','rewriteCommand','Reduction\x20Rate:\x20\x20\x20\x20','mcp','alias','install','resolve','redaction_enabled','argument','1228504HcElNC','./filters','--min-parents','action','message','installShims','savings_percentage','--merges','true','error','\x20=\x20','push','27336Ucktgd','exitCode','Port\x20to\x20run\x20the\x20dashboard\x20on','@modelcontextprotocol/','status','rewrite','cmd','2228586JEJGXO','9999750wbvhJg','Arguments\x20for\x20the\x20target\x20MCP\x20server','getStatsSummary','args','version','raw_cost_usd','total_tokens_saved','getOwnPropertyNames','join','stdout','mcp-proxy','./shims','money_saved_usd','slice','option','prototype','Check\x20a\x20command\x20line\x20and\x20return\x20the\x20optimized\x20command\x20line','config','tracker','setConfig','writable','startDashboard','exit','46452sUStOm','TRIMPROMPT_DISABLED','length','./cache','model_name','false','[value]','dedup','yarn','help','--version','--branch','\x0a=============================================','mcp-server'];a0_0x8fec=function(){return _0xe1ebb0;};return a0_0x8fec();}function isDisabled(){const _0x131720=a0_0xcf802e;return process[_0x131720(0x10d)][_0x131720(0x174)]==='1';}function a0_0x156b(_0x4996fd,_0x4508d0){const _0x8fec86=a0_0x8fec();return a0_0x156b=function(_0x156b71,_0x231065){_0x156b71=_0x156b71-0xdb;let _0x39a1c=_0x8fec86[_0x156b71];return _0x39a1c;},a0_0x156b(_0x4996fd,_0x4508d0);}function adjustCommandArgs(_0x5aaa37,_0x2736aa){const _0x1e8f73=a0_0xcf802e,_0x1d6dd7=_0x5aaa37['toLowerCase']();if(_0x1d6dd7==='git'||_0x1d6dd7==='yadm'){const _0x585475=_0x2736aa[0x0];if(_0x585475===_0x1e8f73(0x158)){const _0x3f7702=_0x2736aa[_0x1e8f73(0x169)](0x1),_0x3b43dc=_0x3f7702[_0x1e8f73(0x175)]===0x0||_0x3f7702[_0x1e8f73(0x130)](_0x3e2dc4=>{const _0x180543=_0x1e8f73;return _0x3e2dc4==='-b'||_0x3e2dc4===_0x180543(0xe0)||_0x3e2dc4===_0x180543(0xed)||_0x3e2dc4==='-bs'||_0x3e2dc4==='-s'||_0x3e2dc4===_0x180543(0x136);});if(_0x3b43dc)return{'cmd':_0x5aaa37,'args':[_0x1e8f73(0x158),'--porcelain','-b']};}else{if(_0x585475==='log'){const _0x543e82=_0x2736aa['slice'](0x1),_0xdc1bd3=_0x543e82[_0x1e8f73(0xe5)](_0x292cd2=>_0x292cd2[_0x1e8f73(0x129)](_0x1e8f73(0x12f))||_0x292cd2['startsWith'](_0x1e8f73(0x11e))||_0x292cd2['startsWith'](_0x1e8f73(0xf8))),_0x44daa7=_0x543e82['some'](_0x35b879=>_0x35b879[_0x1e8f73(0x129)]('-')&&/^\d+$/[_0x1e8f73(0x105)](_0x35b879[_0x1e8f73(0x169)](0x1))||_0x35b879==='-n'||_0x35b879[_0x1e8f73(0x129)](_0x1e8f73(0x132))),_0x49aa37=[..._0x2736aa];if(!_0xdc1bd3){const _0x45f2e6=_0x1e8f73(0xee);_0x49aa37[_0x1e8f73(0x153)](process[_0x1e8f73(0x126)]===_0x1e8f73(0x12a)?'\x22'+_0x45f2e6+'\x22':_0x45f2e6);}!_0x44daa7&&(_0xdc1bd3?_0x49aa37[_0x1e8f73(0x153)](_0x1e8f73(0xf3)):_0x49aa37[_0x1e8f73(0x153)](_0x1e8f73(0x10f)));const _0x4a320c=_0x543e82[_0x1e8f73(0xe5)](_0x1f420c=>_0x1f420c===_0x1e8f73(0x14f)||_0x1f420c===_0x1e8f73(0x121)||_0x1f420c[_0x1e8f73(0x129)](_0x1e8f73(0x14a)));return!_0x4a320c&&!_0x44daa7&&_0x49aa37[_0x1e8f73(0x153)](_0x1e8f73(0x121)),{'cmd':_0x5aaa37,'args':_0x49aa37};}}}return{'cmd':_0x5aaa37,'args':_0x2736aa};}function isMcpServerExecution(_0x5883af,_0x3a1387){const _0x2c6887=a0_0xcf802e,_0x5e04d3=_0x5883af[_0x2c6887(0x124)](),_0x300506=_0x3a1387[_0x2c6887(0x164)]('\x20')['toLowerCase']();if(_0x5e04d3[_0x2c6887(0xfa)]('mcp')&&(_0x5e04d3[_0x2c6887(0xfa)]('server')||_0x5e04d3['includes'](_0x2c6887(0x139))))return!![];if(_0x5e04d3===_0x2c6887(0xf2)||_0x5e04d3===_0x2c6887(0x106)||_0x5e04d3===_0x2c6887(0x12d)||_0x5e04d3==='npm'||_0x5e04d3==='pnpm'||_0x5e04d3===_0x2c6887(0xdd)){if(_0x300506[_0x2c6887(0xfa)](_0x2c6887(0x157))||_0x300506[_0x2c6887(0xfa)](_0x2c6887(0x120))||_0x300506['includes'](_0x2c6887(0xe2))||_0x300506[_0x2c6887(0xfa)]('server-mcp'))return!![];}if(_0x3a1387['some'](_0x21b9fd=>{const _0x301bcd=_0x2c6887,_0x68faad=_0x21b9fd[_0x301bcd(0x124)]();return _0x68faad[_0x301bcd(0xfa)](_0x301bcd(0xe2))||_0x68faad[_0x301bcd(0xfa)](_0x301bcd(0x117))||_0x68faad['includes'](_0x301bcd(0x157))||_0x68faad===_0x301bcd(0x166)||_0x68faad===_0x301bcd(0x142);}))return!![];return![];}async function runProxy(_0x13b38b){const _0x59adcc=a0_0xcf802e;if(_0x13b38b['length']===0x0){program['help']();return;}const _0x3f587b=_0x13b38b[0x0],_0x53ee05=_0x13b38b[_0x59adcc(0x169)](0x1),_0x127d49=_0x13b38b[_0x59adcc(0x164)]('\x20');if(isDisabled()){const _0x397784=await(0x0,executor_1[_0x59adcc(0x13f)])(_0x3f587b,_0x53ee05);process[_0x59adcc(0x165)][_0x59adcc(0xfe)](_0x397784[_0x59adcc(0x165)]),process[_0x59adcc(0x111)][_0x59adcc(0xfe)](_0x397784[_0x59adcc(0x111)]),process[_0x59adcc(0x172)](_0x397784['exitCode']);}if(isMcpServerExecution(_0x3f587b,_0x53ee05)){console['error'](_0x59adcc(0x114));const {runMcpProxy:_0x4c56ce}=await Promise[_0x59adcc(0x145)]()['then'](()=>__importStar(require(_0x59adcc(0x104))));_0x4c56ce(_0x3f587b,_0x53ee05);return;}const _0x12c162=adjustCommandArgs(_0x3f587b,_0x53ee05),_0x211c84=await(0x0,executor_1[_0x59adcc(0x13f)])(_0x12c162[_0x59adcc(0x15a)],_0x12c162[_0x59adcc(0x15f)]),_0x382f38=(0x0,filters_1['compressOutput'])(_0x127d49,_0x211c84['stdout'],_0x211c84['stderr'],tracker_1[_0x59adcc(0x16e)]['getConfig']()[_0x59adcc(0x146)]),_0x4db20e=_0x211c84[_0x59adcc(0x155)]===0x0?(0x0,cache_1[_0x59adcc(0xdc)])(_0x127d49,_0x382f38):null,_0x40be68=_0x4db20e||_0x382f38,_0x3775bc=_0x211c84['stdout']+(_0x211c84[_0x59adcc(0x111)][_0x59adcc(0x115)]()[_0x59adcc(0x175)]>0x0?'\x0a'+_0x211c84[_0x59adcc(0x111)]:'');tracker_1[_0x59adcc(0x16e)][_0x59adcc(0xe8)](_0x127d49,_0x3775bc,_0x40be68,_0x211c84[_0x59adcc(0x155)]),_0x211c84[_0x59adcc(0x155)]===0x0?process[_0x59adcc(0x165)][_0x59adcc(0xfe)](_0x40be68+'\x0a'):(process[_0x59adcc(0x165)][_0x59adcc(0xfe)](_0x382f38+'\x0a'),_0x211c84[_0x59adcc(0x111)][_0x59adcc(0x115)]()['length']>0x0&&!_0x382f38['includes'](_0x211c84[_0x59adcc(0x111)]['trim']())&&process[_0x59adcc(0x111)][_0x59adcc(0xfe)](_0x211c84[_0x59adcc(0x111)]+'\x0a')),process['exit'](_0x211c84[_0x59adcc(0x155)]);}program[a0_0xcf802e(0x12c)](a0_0xcf802e(0x115))[a0_0xcf802e(0x10c)]('TrimPrompt.ai\x20-\x20Reduce\x20LLM\x20token\x20consumption\x20by\x2060-90%')[a0_0xcf802e(0x160)]('1.0.0'),program['command']('ui')[a0_0xcf802e(0x143)](a0_0xcf802e(0xf4))[a0_0xcf802e(0x10c)](a0_0xcf802e(0x11a))[a0_0xcf802e(0x16a)](a0_0xcf802e(0xe6),a0_0xcf802e(0x156),a0_0xcf802e(0x13b))['action'](_0x2ffd4d=>{const _0x493e41=a0_0xcf802e,_0x35ba31=parseInt(_0x2ffd4d[_0x493e41(0x100)],0xa);(0x0,dashboard_1[_0x493e41(0x171)])(_0x35ba31);}),program['command'](a0_0xcf802e(0xfd))[a0_0xcf802e(0x10c)]('Show\x20token\x20and\x20cost\x20savings\x20summary')[a0_0xcf802e(0x16a)](a0_0xcf802e(0xec),'Select\x20pricing\x20model\x20(e.g.\x20claude-3-5-sonnet,\x20gpt-4o)','claude-3-5-sonnet')[a0_0xcf802e(0x14b)](_0x2f85c4=>{const _0x335bed=a0_0xcf802e,_0x7aa3a1=tracker_1[_0x335bed(0x16e)][_0x335bed(0x15e)](_0x2f85c4[_0x335bed(0x133)]);console['log'](_0x335bed(0xe1)),console[_0x335bed(0xfc)](_0x335bed(0xf6)),console['log'](_0x335bed(0x123)),console[_0x335bed(0xfc)](_0x335bed(0xef)+_0x7aa3a1[_0x335bed(0x177)]),console[_0x335bed(0xfc)](_0x335bed(0xf7)+_0x7aa3a1[_0x335bed(0x101)][_0x335bed(0xf5)]()),console[_0x335bed(0xfc)](_0x335bed(0x13c)+_0x7aa3a1['total_compressed_tokens'][_0x335bed(0xf5)]()),console[_0x335bed(0xfc)](_0x335bed(0x11b)+_0x7aa3a1[_0x335bed(0x162)][_0x335bed(0xf5)]()),console[_0x335bed(0xfc)](_0x335bed(0x141)+_0x7aa3a1[_0x335bed(0x14e)]+'%'),console[_0x335bed(0xfc)]('Estimated\x20Cost:\x20\x20\x20\x20$'+_0x7aa3a1[_0x335bed(0x161)]['toFixed'](0x4)+'\x20(before\x20Shave)'),console['log'](_0x335bed(0x11f)+_0x7aa3a1[_0x335bed(0x112)][_0x335bed(0x113)](0x4)+_0x335bed(0xf0)),console[_0x335bed(0xfc)]('---------------------------------------------'),console[_0x335bed(0xfc)](_0x335bed(0x134)+_0x7aa3a1[_0x335bed(0x168)][_0x335bed(0x113)](0x4)+_0x335bed(0x13a)),console[_0x335bed(0xfc)]('=============================================\x0a');}),program[a0_0xcf802e(0x118)](a0_0xcf802e(0x16d))[a0_0xcf802e(0x10c)](a0_0xcf802e(0x13d))['argument'](a0_0xcf802e(0xfb),a0_0xcf802e(0x108))[a0_0xcf802e(0x147)](a0_0xcf802e(0x128),'config\x20parameter\x20name')[a0_0xcf802e(0x147)](a0_0xcf802e(0xdb),'value\x20to\x20set')[a0_0xcf802e(0x14b)]((_0x1c11af,_0x165c48,_0x41d709)=>{const _0x5bd818=a0_0xcf802e;if(_0x1c11af===_0x5bd818(0xf9)){const _0x237db3=tracker_1[_0x5bd818(0x16e)]['getConfig']();console[_0x5bd818(0xfc)](_0x165c48+':\x20'+_0x237db3[_0x165c48]);}else{if(_0x1c11af===_0x5bd818(0x110)){_0x41d709===undefined&&(console[_0x5bd818(0x151)]('Error:\x20Value\x20required\x20for\x20set\x20action'),process['exit'](0x1));let _0x288f0b=_0x41d709;if(_0x41d709===_0x5bd818(0x150))_0x288f0b=!![];if(_0x41d709===_0x5bd818(0x178))_0x288f0b=![];if(/^\d+$/[_0x5bd818(0x105)](_0x41d709))_0x288f0b=parseInt(_0x41d709,0xa);tracker_1['tracker'][_0x5bd818(0x16f)](_0x165c48,_0x288f0b),console[_0x5bd818(0xfc)]('Config\x20set\x20'+_0x165c48+_0x5bd818(0x152)+_0x41d709);}else console[_0x5bd818(0x151)]('Error:\x20Action\x20must\x20be\x20get\x20or\x20set'),process[_0x5bd818(0x172)](0x1);}}),program[a0_0xcf802e(0x118)](a0_0xcf802e(0x125))[a0_0xcf802e(0x10c)](a0_0xcf802e(0x107))[a0_0xcf802e(0x147)](a0_0xcf802e(0xfb),a0_0xcf802e(0x12b))[a0_0xcf802e(0x14b)](_0x24421c=>{const _0x2d4557=a0_0xcf802e;if(_0x24421c===_0x2d4557(0x144)){const _0x2f82eb=(0x0,shims_1[_0x2d4557(0x14d)])();console[_0x2d4557(0xfc)](_0x2f82eb[_0x2d4557(0x14c)]);}else{if(_0x24421c===_0x2d4557(0x137)){const _0x908253=(0x0,shims_1[_0x2d4557(0x122)])();console[_0x2d4557(0xfc)](_0x908253[_0x2d4557(0x14c)]);}else console[_0x2d4557(0x151)]('Error:\x20Action\x20must\x20be\x20install\x20or\x20uninstall'),process['exit'](0x1);}}),program['command'](a0_0xcf802e(0x159))[a0_0xcf802e(0x10c)](a0_0xcf802e(0x16c))[a0_0xcf802e(0x147)](a0_0xcf802e(0xeb),'Command\x20line\x20to\x20evaluate')[a0_0xcf802e(0x14b)](_0x2108d4=>{const _0x3fd6b2=a0_0xcf802e;if(isDisabled()){console[_0x3fd6b2(0xfc)](_0x2108d4);return;}const _0x3740aa=(0x0,filters_1[_0x3fd6b2(0x140)])(_0x2108d4);console[_0x3fd6b2(0xfc)](_0x3740aa);}),program[a0_0xcf802e(0x118)]('mcp-proxy')[a0_0xcf802e(0x143)](a0_0xcf802e(0x142))[a0_0xcf802e(0x10c)]('Proxy\x20wrapper\x20for\x20Model\x20Context\x20Protocol\x20(MCP)\x20servers\x20to\x20compact\x20tool\x20outputs')[a0_0xcf802e(0x147)](a0_0xcf802e(0xe4),'Command\x20to\x20launch\x20the\x20target\x20MCP\x20server')[a0_0xcf802e(0x147)](a0_0xcf802e(0x11c),a0_0xcf802e(0x15d))[a0_0xcf802e(0x14b)](async(_0x5242ae,_0x3e78d7)=>{const _0x4d5bc8=a0_0xcf802e,{runMcpProxy:_0x477f68}=await Promise[_0x4d5bc8(0x145)]()[_0x4d5bc8(0x116)](()=>__importStar(require(_0x4d5bc8(0x104))));_0x477f68(_0x5242ae,_0x3e78d7);});const args=process['argv'][a0_0xcf802e(0x169)](0x2),firstArg=args[0x0],subcommands=['ui','dashboard',a0_0xcf802e(0xfd),a0_0xcf802e(0x16d),a0_0xcf802e(0x125),a0_0xcf802e(0x159),a0_0xcf802e(0x166),a0_0xcf802e(0x142),a0_0xcf802e(0xde),'--help','-h',a0_0xcf802e(0x160),a0_0xcf802e(0xdf),'-v'];firstArg&&!subcommands['includes'](firstArg)?runProxy(args)['catch'](_0x3626f6=>{const _0x2f36d2=a0_0xcf802e;console[_0x2f36d2(0x151)]('[TrimPrompt]\x20Fatal\x20Proxy\x20Error:\x20'+_0x3626f6[_0x2f36d2(0x14c)]),process[_0x2f36d2(0x172)](0x1);}):program[a0_0xcf802e(0x138)](process[a0_0xcf802e(0x102)]);
|
|
2
|
+
'use strict';const a0_0x210b40=a0_0x8c99;(function(_0x423daf,_0x48eb70){const _0x573e43=a0_0x8c99,_0x84915a=_0x423daf();while(!![]){try{const _0x17bd8e=-parseInt(_0x573e43(0xdc))/0x1+parseInt(_0x573e43(0xfa))/0x2*(-parseInt(_0x573e43(0xa6))/0x3)+parseInt(_0x573e43(0xb9))/0x4*(-parseInt(_0x573e43(0x8f))/0x5)+-parseInt(_0x573e43(0x93))/0x6+parseInt(_0x573e43(0x68))/0x7+-parseInt(_0x573e43(0xf8))/0x8*(-parseInt(_0x573e43(0xc4))/0x9)+-parseInt(_0x573e43(0xec))/0xa*(-parseInt(_0x573e43(0xc2))/0xb);if(_0x17bd8e===_0x48eb70)break;else _0x84915a['push'](_0x84915a['shift']());}catch(_0x1e3fd7){_0x84915a['push'](_0x84915a['shift']());}}}(a0_0x33ba,0xe1532));function a0_0x8c99(_0x5863c6,_0x111905){const _0x33ba20=a0_0x33ba();return a0_0x8c99=function(_0x8c99ad,_0x228d41){_0x8c99ad=_0x8c99ad-0x67;let _0xcb0838=_0x33ba20[_0x8c99ad];return _0xcb0838;},a0_0x8c99(_0x5863c6,_0x111905);}var __createBinding=this&&this[a0_0x210b40(0xdf)]||(Object[a0_0x210b40(0xf0)]?function(_0x7405f5,_0x262cb3,_0x3129fc,_0x1c15e0){const _0x479e8a=a0_0x210b40;if(_0x1c15e0===undefined)_0x1c15e0=_0x3129fc;var _0x33882b=Object[_0x479e8a(0xc1)](_0x262cb3,_0x3129fc);(!_0x33882b||(_0x479e8a(0xe3)in _0x33882b?!_0x262cb3['__esModule']:_0x33882b[_0x479e8a(0xe7)]||_0x33882b[_0x479e8a(0xef)]))&&(_0x33882b={'enumerable':!![],'get':function(){return _0x262cb3[_0x3129fc];}}),Object[_0x479e8a(0x86)](_0x7405f5,_0x1c15e0,_0x33882b);}:function(_0x25bcae,_0xf025c4,_0x2b7ecc,_0x111ba8){if(_0x111ba8===undefined)_0x111ba8=_0x2b7ecc;_0x25bcae[_0x111ba8]=_0xf025c4[_0x2b7ecc];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a0_0x210b40(0xf0)]?function(_0x4b3871,_0x1166fc){const _0x4cfc60=a0_0x210b40;Object[_0x4cfc60(0x86)](_0x4b3871,_0x4cfc60(0x105),{'enumerable':!![],'value':_0x1166fc});}:function(_0x1670d1,_0xff892b){const _0x1f3ac9=a0_0x210b40;_0x1670d1[_0x1f3ac9(0x105)]=_0xff892b;}),__importStar=this&&this[a0_0x210b40(0xae)]||(function(){var _0x527123=function(_0x3f267a){const _0x222995=a0_0x8c99;return _0x527123=Object[_0x222995(0xbd)]||function(_0x371edb){const _0x11a78f=_0x222995;var _0x23b23f=[];for(var _0x3da2d2 in _0x371edb)if(Object['prototype'][_0x11a78f(0xa2)][_0x11a78f(0x7b)](_0x371edb,_0x3da2d2))_0x23b23f[_0x23b23f[_0x11a78f(0x74)]]=_0x3da2d2;return _0x23b23f;},_0x527123(_0x3f267a);};return function(_0xbe9b1a){const _0x14e8b0=a0_0x8c99;if(_0xbe9b1a&&_0xbe9b1a[_0x14e8b0(0xaa)])return _0xbe9b1a;var _0x1529e7={};if(_0xbe9b1a!=null){for(var _0x4d09c1=_0x527123(_0xbe9b1a),_0x226ad8=0x0;_0x226ad8<_0x4d09c1[_0x14e8b0(0x74)];_0x226ad8++)if(_0x4d09c1[_0x226ad8]!=='default')__createBinding(_0x1529e7,_0xbe9b1a,_0x4d09c1[_0x226ad8]);}return __setModuleDefault(_0x1529e7,_0xbe9b1a),_0x1529e7;};}());Object['defineProperty'](exports,a0_0x210b40(0xaa),{'value':!![]});const commander_1=require(a0_0x210b40(0x7a)),executor_1=require(a0_0x210b40(0x6b)),filters_1=require(a0_0x210b40(0x76)),tracker_1=require('./tracker'),cache_1=require(a0_0x210b40(0xf2)),shims_1=require(a0_0x210b40(0xca)),dashboard_1=require(a0_0x210b40(0xed)),program=new commander_1[(a0_0x210b40(0x81))]();function a0_0x33ba(){const _0x262bbb=['getConfig','\x20=\x20','Config\x20set\x20','install\x20or\x20uninstall','-10','stats','set','1.0.0','config\x20parameter\x20name','1609971RcYdVH','Reduction\x20Rate:\x20\x20\x20\x20','exitCode','__createBinding','model_name','Actual\x20Cost:\x20\x20\x20\x20\x20\x20\x20$','description','get','args','compressed_cost_usd','action','writable','catch','Proxy\x20wrapper\x20for\x20Model\x20Context\x20Protocol\x20(MCP)\x20servers\x20to\x20compact\x20tool\x20outputs','Install\x20or\x20uninstall\x20system\x20command\x20shims','total_tokens_saved','1656840zDOnqE','./dashboard','error','configurable','create','savings_percentage','./cache','uninstallShims','<key>','--help','--branch','shims','15968IcbQJl','mcp','95818OpVDiP','yarn','false','Arguments\x20for\x20the\x20target\x20MCP\x20server','Port\x20to\x20run\x20the\x20dashboard\x20on','tracker','executeCommand','true','<commandLine>','argv','=============================================\x0a','default','exit','write','-p,\x20--port\x20<number>','then','3237038ChCZCQ','Money\x20Saved:\x20\x20\x20\x20\x20\x20\x20$','Tokens\x20Saved:\x20\x20\x20\x20\x20\x20','./executor','claude-3-5-sonnet','--version','push','TRIMPROMPT_DISABLED','Select\x20pricing\x20model\x20(e.g.\x20claude-3-5-sonnet,\x20gpt-4o)','help','<action>','node','length','Show\x20token\x20and\x20cost\x20savings\x20summary','./filters','-sb','-m,\x20--model\x20<string>','modelcontextprotocol','commander','call','includes','trim','[TrimPrompt]\x20Autodetected\x20MCP\x20server\x20execution.\x20Activating\x20real-time\x20JSON-RPC\x20proxy...','env','\x20(before\x20Shave)','Command','@modelcontextprotocol/','alias','command','stderr','defineProperty','startsWith','mcp-proxy','\x20\x20\x20\x20\x20\x20\x20TRIMPROMPT.AI\x20SAVINGS\x20SUMMARY\x20\x20\x20\x20\x20\x20\x20\x20','toLocaleString','Error:\x20Action\x20must\x20be\x20get\x20or\x20set','port','uninstall','redaction_enabled','370BFFeKd','win32','startDashboard','model','9813378VofcCZ','npx','[server-args...]','name','message','=============================================','test','compressOutput','toFixed','--porcelain','--format','version','\x20USD','Error:\x20Value\x20required\x20for\x20set\x20action','log','hasOwnProperty','money_saved_usd','status','Raw\x20Tokens:\x20\x20\x20\x20\x20\x20\x20\x20','6lGsrlV','config','slice','value\x20to\x20set','__esModule','some','-50','mcp-server','__importStar','--max-count','yadm','cmd','toLowerCase','--pretty=format:%h\x20%s\x20(%ar)\x20(%an)%n%b%n---END---','server-mcp','argument','dashboard','stdout','--no-merges','368LigDIr','[TrimPrompt]\x20Fatal\x20Proxy\x20Error:\x20','Start\x20the\x20local\x20developer\x20dashboard','./mcp','getOwnPropertyNames','join','platform','raw_cost_usd','getOwnPropertyDescriptor','198StpoUh','--merges','3726UFQsHU','TrimPrompt.ai\x20-\x20Reduce\x20LLM\x20token\x20consumption\x20by\x2060-90%','pnpm','resolve','every','Command\x20line\x20to\x20evaluate','./shims','proxy','\x20(after\x20Shave)','Estimated\x20Cost:\x20\x20\x20\x20$','bun','total_compressed_tokens','npm','parse','total_raw_tokens'];a0_0x33ba=function(){return _0x262bbb;};return a0_0x33ba();}function isDisabled(){const _0x43aa3c=a0_0x210b40;return process[_0x43aa3c(0x7f)][_0x43aa3c(0x6f)]==='1';}function adjustCommandArgs(_0x168b73,_0x1a7da5){const _0x585998=a0_0x210b40,_0x1542ad=_0x168b73['toLowerCase']();if(_0x1542ad==='git'||_0x1542ad===_0x585998(0xb0)){const _0x3891ae=_0x1a7da5[0x0];if(_0x3891ae===_0x585998(0xa4)){const _0x397612=_0x1a7da5[_0x585998(0xa8)](0x1),_0x477a55=_0x397612[_0x585998(0x74)]===0x0||_0x397612[_0x585998(0xc8)](_0x4071ba=>{const _0x7d1764=_0x585998;return _0x4071ba==='-b'||_0x4071ba===_0x7d1764(0xf6)||_0x4071ba===_0x7d1764(0x77)||_0x4071ba==='-bs'||_0x4071ba==='-s'||_0x4071ba==='--short';});if(_0x477a55)return{'cmd':_0x168b73,'args':[_0x585998(0xa4),_0x585998(0x9c),'-b']};}else{if(_0x3891ae===_0x585998(0xa1)){const _0x46b0ac=_0x1a7da5['slice'](0x1),_0x142441=_0x46b0ac['some'](_0x5618aa=>_0x5618aa[_0x585998(0x87)]('--oneline')||_0x5618aa['startsWith']('--pretty')||_0x5618aa[_0x585998(0x87)](_0x585998(0x9d))),_0x3275d2=_0x46b0ac[_0x585998(0xab)](_0x47690e=>_0x47690e[_0x585998(0x87)]('-')&&/^\d+$/[_0x585998(0x99)](_0x47690e[_0x585998(0xa8)](0x1))||_0x47690e==='-n'||_0x47690e['startsWith'](_0x585998(0xaf))),_0x5c2fc1=[..._0x1a7da5];if(!_0x142441){const _0x55d3ea=_0x585998(0xb3);_0x5c2fc1[_0x585998(0x6e)](process[_0x585998(0xbf)]===_0x585998(0x90)?'\x22'+_0x55d3ea+'\x22':_0x55d3ea);}!_0x3275d2&&(_0x142441?_0x5c2fc1['push'](_0x585998(0xac)):_0x5c2fc1['push'](_0x585998(0xd7)));const _0x111de7=_0x46b0ac[_0x585998(0xab)](_0x439b43=>_0x439b43===_0x585998(0xc3)||_0x439b43===_0x585998(0xb8)||_0x439b43['startsWith']('--min-parents'));return!_0x111de7&&!_0x3275d2&&_0x5c2fc1[_0x585998(0x6e)](_0x585998(0xb8)),{'cmd':_0x168b73,'args':_0x5c2fc1};}}}return{'cmd':_0x168b73,'args':_0x1a7da5};}function isMcpServerExecution(_0x44cc22,_0x1bd11a){const _0x4b1880=a0_0x210b40,_0x546079=_0x44cc22[_0x4b1880(0xb2)](),_0x645600=_0x1bd11a['join']('\x20')['toLowerCase']();if(_0x546079[_0x4b1880(0x7c)]('mcp')&&(_0x546079[_0x4b1880(0x7c)]('server')||_0x546079[_0x4b1880(0x7c)](_0x4b1880(0xcb))))return!![];if(_0x546079===_0x4b1880(0x94)||_0x546079===_0x4b1880(0x73)||_0x546079===_0x4b1880(0xce)||_0x546079===_0x4b1880(0xd0)||_0x546079===_0x4b1880(0xc6)||_0x546079===_0x4b1880(0xfb)){if(_0x645600['includes'](_0x4b1880(0x82))||_0x645600[_0x4b1880(0x7c)](_0x4b1880(0x79))||_0x645600[_0x4b1880(0x7c)](_0x4b1880(0xad))||_0x645600[_0x4b1880(0x7c)]('server-mcp'))return!![];}if(_0x1bd11a[_0x4b1880(0xab)](_0x236de4=>{const _0x4ce0e7=_0x4b1880,_0x40957f=_0x236de4[_0x4ce0e7(0xb2)]();return _0x40957f[_0x4ce0e7(0x7c)](_0x4ce0e7(0xad))||_0x40957f[_0x4ce0e7(0x7c)](_0x4ce0e7(0xb4))||_0x40957f['includes']('@modelcontextprotocol/')||_0x40957f===_0x4ce0e7(0x88)||_0x40957f===_0x4ce0e7(0xf9);}))return!![];return![];}async function runProxy(_0x3f1d59){const _0x4d7795=a0_0x210b40;if(_0x3f1d59[_0x4d7795(0x74)]===0x0){program[_0x4d7795(0x71)]();return;}const _0x57a61f=_0x3f1d59[0x0],_0x967974=_0x3f1d59[_0x4d7795(0xa8)](0x1),_0x2be615=_0x3f1d59[_0x4d7795(0xbe)]('\x20');if(isDisabled()){const _0x3cb922=await(0x0,executor_1[_0x4d7795(0x100)])(_0x57a61f,_0x967974);process[_0x4d7795(0xb7)][_0x4d7795(0x107)](_0x3cb922[_0x4d7795(0xb7)]),process[_0x4d7795(0x85)][_0x4d7795(0x107)](_0x3cb922[_0x4d7795(0x85)]),process[_0x4d7795(0x106)](_0x3cb922[_0x4d7795(0xde)]);}if(isMcpServerExecution(_0x57a61f,_0x967974)){console[_0x4d7795(0xee)](_0x4d7795(0x7e));const {runMcpProxy:_0x102a5c}=await Promise[_0x4d7795(0xc7)]()[_0x4d7795(0x67)](()=>__importStar(require(_0x4d7795(0xbc))));_0x102a5c(_0x57a61f,_0x967974);return;}const _0x1c4900=adjustCommandArgs(_0x57a61f,_0x967974),_0x473665=await(0x0,executor_1[_0x4d7795(0x100)])(_0x1c4900[_0x4d7795(0xb1)],_0x1c4900[_0x4d7795(0xe4)]),_0x2c9dbe=(0x0,filters_1[_0x4d7795(0x9a)])(_0x2be615,_0x473665[_0x4d7795(0xb7)],_0x473665[_0x4d7795(0x85)],tracker_1['tracker'][_0x4d7795(0xd3)]()[_0x4d7795(0x8e)]),_0x572a3e=_0x473665['stdout']+(_0x473665[_0x4d7795(0x85)][_0x4d7795(0x7d)]()[_0x4d7795(0x74)]>0x0?'\x0a'+_0x473665['stderr']:''),_0x500568=_0x2c9dbe[_0x4d7795(0x74)]<_0x572a3e[_0x4d7795(0x74)]?_0x2c9dbe:_0x572a3e,_0x3ad8d9=_0x473665[_0x4d7795(0xde)]===0x0?(0x0,cache_1['dedup'])(_0x2be615,_0x500568):null,_0x4ee253=_0x3ad8d9||_0x500568;tracker_1[_0x4d7795(0xff)]['logExecution'](_0x2be615,_0x572a3e,_0x4ee253,_0x473665[_0x4d7795(0xde)]),_0x473665[_0x4d7795(0xde)]===0x0?process['stdout'][_0x4d7795(0x107)](_0x4ee253+'\x0a'):(process[_0x4d7795(0xb7)][_0x4d7795(0x107)](_0x2c9dbe+'\x0a'),_0x473665['stderr']['trim']()[_0x4d7795(0x74)]>0x0&&!_0x2c9dbe[_0x4d7795(0x7c)](_0x473665[_0x4d7795(0x85)][_0x4d7795(0x7d)]())&&process[_0x4d7795(0x85)]['write'](_0x473665[_0x4d7795(0x85)]+'\x0a')),process['exit'](_0x473665[_0x4d7795(0xde)]);}program[a0_0x210b40(0x96)](a0_0x210b40(0x7d))[a0_0x210b40(0xe2)](a0_0x210b40(0xc5))['version'](a0_0x210b40(0xda)),program[a0_0x210b40(0x84)]('ui')['alias'](a0_0x210b40(0xb6))[a0_0x210b40(0xe2)](a0_0x210b40(0xbb))['option'](a0_0x210b40(0x108),a0_0x210b40(0xfe),'4000')[a0_0x210b40(0xe6)](_0x49a0b0=>{const _0x3e1326=a0_0x210b40,_0x2f44b9=parseInt(_0x49a0b0[_0x3e1326(0x8c)],0xa);(0x0,dashboard_1[_0x3e1326(0x91)])(_0x2f44b9);}),program['command'](a0_0x210b40(0xd8))[a0_0x210b40(0xe2)](a0_0x210b40(0x75))['option'](a0_0x210b40(0x78),a0_0x210b40(0x70),a0_0x210b40(0x6c))[a0_0x210b40(0xe6)](_0x5cade0=>{const _0x2deea8=a0_0x210b40,_0x3b69c6=tracker_1[_0x2deea8(0xff)]['getStatsSummary'](_0x5cade0[_0x2deea8(0x92)]);console[_0x2deea8(0xa1)]('\x0a============================================='),console['log'](_0x2deea8(0x89)),console['log'](_0x2deea8(0x98)),console['log']('Model\x20Context:\x20\x20\x20\x20\x20'+_0x3b69c6[_0x2deea8(0xe0)]),console[_0x2deea8(0xa1)](_0x2deea8(0xa5)+_0x3b69c6[_0x2deea8(0xd2)][_0x2deea8(0x8a)]()),console[_0x2deea8(0xa1)]('Compressed:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3b69c6[_0x2deea8(0xcf)][_0x2deea8(0x8a)]()),console[_0x2deea8(0xa1)](_0x2deea8(0x6a)+_0x3b69c6[_0x2deea8(0xeb)]['toLocaleString']()),console[_0x2deea8(0xa1)](_0x2deea8(0xdd)+_0x3b69c6[_0x2deea8(0xf1)]+'%'),console[_0x2deea8(0xa1)](_0x2deea8(0xcd)+_0x3b69c6[_0x2deea8(0xc0)][_0x2deea8(0x9b)](0x4)+_0x2deea8(0x80)),console['log'](_0x2deea8(0xe1)+_0x3b69c6[_0x2deea8(0xe5)][_0x2deea8(0x9b)](0x4)+_0x2deea8(0xcc)),console[_0x2deea8(0xa1)]('---------------------------------------------'),console[_0x2deea8(0xa1)](_0x2deea8(0x69)+_0x3b69c6[_0x2deea8(0xa3)]['toFixed'](0x4)+_0x2deea8(0x9f)),console['log'](_0x2deea8(0x104));}),program[a0_0x210b40(0x84)](a0_0x210b40(0xa7))[a0_0x210b40(0xe2)]('Manage\x20local\x20configuration\x20parameters')[a0_0x210b40(0xb5)](a0_0x210b40(0x72),'get\x20or\x20set')[a0_0x210b40(0xb5)](a0_0x210b40(0xf4),a0_0x210b40(0xdb))[a0_0x210b40(0xb5)]('[value]',a0_0x210b40(0xa9))[a0_0x210b40(0xe6)]((_0x1162b7,_0x2657e9,_0x4b16bf)=>{const _0xcef1b=a0_0x210b40;if(_0x1162b7==='get'){const _0x182853=tracker_1[_0xcef1b(0xff)][_0xcef1b(0xd3)]();console[_0xcef1b(0xa1)](_0x2657e9+':\x20'+_0x182853[_0x2657e9]);}else{if(_0x1162b7===_0xcef1b(0xd9)){_0x4b16bf===undefined&&(console[_0xcef1b(0xee)](_0xcef1b(0xa0)),process[_0xcef1b(0x106)](0x1));let _0x11dcea=_0x4b16bf;if(_0x4b16bf===_0xcef1b(0x101))_0x11dcea=!![];if(_0x4b16bf===_0xcef1b(0xfc))_0x11dcea=![];if(/^\d+$/['test'](_0x4b16bf))_0x11dcea=parseInt(_0x4b16bf,0xa);tracker_1[_0xcef1b(0xff)]['setConfig'](_0x2657e9,_0x11dcea),console[_0xcef1b(0xa1)](_0xcef1b(0xd5)+_0x2657e9+_0xcef1b(0xd4)+_0x4b16bf);}else console[_0xcef1b(0xee)](_0xcef1b(0x8b)),process[_0xcef1b(0x106)](0x1);}}),program['command'](a0_0x210b40(0xf7))[a0_0x210b40(0xe2)](a0_0x210b40(0xea))['argument'](a0_0x210b40(0x72),a0_0x210b40(0xd6))[a0_0x210b40(0xe6)](_0x39899a=>{const _0x59ba59=a0_0x210b40;if(_0x39899a==='install'){const _0x4eb93f=(0x0,shims_1['installShims'])();console[_0x59ba59(0xa1)](_0x4eb93f[_0x59ba59(0x97)]);}else{if(_0x39899a===_0x59ba59(0x8d)){const _0x373ef4=(0x0,shims_1[_0x59ba59(0xf3)])();console[_0x59ba59(0xa1)](_0x373ef4['message']);}else console['error']('Error:\x20Action\x20must\x20be\x20install\x20or\x20uninstall'),process[_0x59ba59(0x106)](0x1);}}),program[a0_0x210b40(0x84)]('rewrite')[a0_0x210b40(0xe2)]('Check\x20a\x20command\x20line\x20and\x20return\x20the\x20optimized\x20command\x20line')[a0_0x210b40(0xb5)](a0_0x210b40(0x102),a0_0x210b40(0xc9))[a0_0x210b40(0xe6)](_0xa8e9a8=>{const _0x3cb003=a0_0x210b40;if(isDisabled()){console[_0x3cb003(0xa1)](_0xa8e9a8);return;}const _0x16530b=(0x0,filters_1['rewriteCommand'])(_0xa8e9a8);console[_0x3cb003(0xa1)](_0x16530b);}),program[a0_0x210b40(0x84)](a0_0x210b40(0x88))[a0_0x210b40(0x83)](a0_0x210b40(0xf9))[a0_0x210b40(0xe2)](a0_0x210b40(0xe9))[a0_0x210b40(0xb5)]('<server-command>','Command\x20to\x20launch\x20the\x20target\x20MCP\x20server')[a0_0x210b40(0xb5)](a0_0x210b40(0x95),a0_0x210b40(0xfd))[a0_0x210b40(0xe6)](async(_0x35b163,_0x3f1116)=>{const _0x35ab48=a0_0x210b40,{runMcpProxy:_0xc95b44}=await Promise[_0x35ab48(0xc7)]()[_0x35ab48(0x67)](()=>__importStar(require('./mcp')));_0xc95b44(_0x35b163,_0x3f1116);});const args=process[a0_0x210b40(0x103)][a0_0x210b40(0xa8)](0x2),firstArg=args[0x0],subcommands=['ui',a0_0x210b40(0xb6),a0_0x210b40(0xd8),'config',a0_0x210b40(0xf7),'rewrite','mcp-proxy',a0_0x210b40(0xf9),a0_0x210b40(0x71),a0_0x210b40(0xf5),'-h',a0_0x210b40(0x9e),a0_0x210b40(0x6d),'-v'];firstArg&&!subcommands[a0_0x210b40(0x7c)](firstArg)?runProxy(args)[a0_0x210b40(0xe8)](_0x505592=>{const _0x1ca938=a0_0x210b40;console['error'](_0x1ca938(0xba)+_0x505592[_0x1ca938(0x97)]),process[_0x1ca938(0x106)](0x1);}):program[a0_0x210b40(0xd1)](process['argv']);
|
package/dashboard.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x118e26=a0_0x3bec;(function(_0x17142d,_0x3a2ae5){const _0x79814f=a0_0x3bec,_0x13c3bb=_0x17142d();while(!![]){try{const _0x56996f=parseInt(_0x79814f(0x157))/0x1*(-parseInt(_0x79814f(0x13a))/0x2)+-parseInt(_0x79814f(0x147))/0x3*(-parseInt(_0x79814f(0x12f))/0x4)+parseInt(_0x79814f(0x12d))/0x5+parseInt(_0x79814f(0x132))/0x6+parseInt(_0x79814f(0x144))/0x7*(-parseInt(_0x79814f(0x15c))/0x8)+parseInt(_0x79814f(0x14e))/0x9*(-parseInt(_0x79814f(0x159))/0xa)+-parseInt(_0x79814f(0x150))/0xb*(-parseInt(_0x79814f(0x162))/0xc);if(_0x56996f===_0x3a2ae5)break;else _0x13c3bb['push'](_0x13c3bb['shift']());}catch(_0x496c84){_0x13c3bb['push'](_0x13c3bb['shift']());}}}(a0_0x4182,0xb8055));function a0_0x3bec(_0x3c624c,_0xa001fc){const _0x4182f4=a0_0x4182();return a0_0x3bec=function(_0x3bec30,_0x292286){_0x3bec30=_0x3bec30-0x127;let _0x2a0592=_0x4182f4[_0x3bec30];return _0x2a0592;},a0_0x3bec(_0x3c624c,_0xa001fc);}var __createBinding=this&&this[a0_0x118e26(0x135)]||(Object[a0_0x118e26(0x15e)]?function(_0x48cb4c,_0x5c70ea,_0x10355e,_0x16cf5b){const _0x4f010e=a0_0x118e26;if(_0x16cf5b===undefined)_0x16cf5b=_0x10355e;var _0x107563=Object[_0x4f010e(0x161)](_0x5c70ea,_0x10355e);(!_0x107563||(_0x4f010e(0x15a)in _0x107563?!_0x5c70ea[_0x4f010e(0x148)]:_0x107563[_0x4f010e(0x14a)]||_0x107563[_0x4f010e(0x149)]))&&(_0x107563={'enumerable':!![],'get':function(){return _0x5c70ea[_0x10355e];}}),Object['defineProperty'](_0x48cb4c,_0x16cf5b,_0x107563);}:function(_0x1a9adc,_0x124c45,_0x3c69ca,_0x4b2df0){if(_0x4b2df0===undefined)_0x4b2df0=_0x3c69ca;_0x1a9adc[_0x4b2df0]=_0x124c45[_0x3c69ca];}),__setModuleDefault=this&&this[a0_0x118e26(0x164)]||(Object[a0_0x118e26(0x15e)]?function(_0x9785f4,_0x4f2571){const _0x15339f=a0_0x118e26;Object[_0x15339f(0x152)](_0x9785f4,_0x15339f(0x138),{'enumerable':!![],'value':_0x4f2571});}:function(_0x10ca5b,_0x407cbf){_0x10ca5b['default']=_0x407cbf;}),__importStar=this&&this[a0_0x118e26(0x163)]||(function(){var _0x4476a4=function(_0x152c79){return _0x4476a4=Object['getOwnPropertyNames']||function(_0x373c00){const _0xc7fe82=a0_0x3bec;var _0xf58944=[];for(var _0x44548a in _0x373c00)if(Object[_0xc7fe82(0x127)][_0xc7fe82(0x153)][_0xc7fe82(0x14f)](_0x373c00,_0x44548a))_0xf58944[_0xf58944[_0xc7fe82(0x13f)]]=_0x44548a;return _0xf58944;},_0x4476a4(_0x152c79);};return function(_0x51601a){const _0x927833=a0_0x3bec;if(_0x51601a&&_0x51601a[_0x927833(0x148)])return _0x51601a;var _0x3a0f9d={};if(_0x51601a!=null){for(var _0x34e7ff=_0x4476a4(_0x51601a),_0x48f13c=0x0;_0x48f13c<_0x34e7ff[_0x927833(0x13f)];_0x48f13c++)if(_0x34e7ff[_0x48f13c]!==_0x927833(0x138))__createBinding(_0x3a0f9d,_0x51601a,_0x34e7ff[_0x48f13c]);}return __setModuleDefault(_0x3a0f9d,_0x51601a),_0x3a0f9d;};}()),__importDefault=this&&this[a0_0x118e26(0x137)]||function(_0x52dbaf){const _0x5362d4=a0_0x118e26;return _0x52dbaf&&_0x52dbaf[_0x5362d4(0x148)]?_0x52dbaf:{'default':_0x52dbaf};};Object[a0_0x118e26(0x152)](exports,a0_0x118e26(0x148),{'value':!![]}),exports[a0_0x118e26(0x151)]=startDashboard;const express_1=__importDefault(require('express')),path=__importStar(require(a0_0x118e26(0x14c))),fs=__importStar(require('fs')),os=__importStar(require('os')),open_1=__importDefault(require(a0_0x118e26(0x139))),tracker_1=require(a0_0x118e26(0x146)),app=(0x0,express_1[a0_0x118e26(0x138)])(),baseDir=path[a0_0x118e26(0x13d)](os[a0_0x118e26(0x12b)](),a0_0x118e26(0x154)),logsDir=path[a0_0x118e26(0x13d)](baseDir,'logs');app[a0_0x118e26(0x15a)]('/',(_0x3ee927,_0x422a6e)=>{const _0x493f10=a0_0x118e26,_0x500d39=path[_0x493f10(0x13d)](__dirname,_0x493f10(0x160));fs['existsSync'](_0x500d39)?_0x422a6e[_0x493f10(0x13e)](_0x500d39):_0x422a6e[_0x493f10(0x13e)](path[_0x493f10(0x13d)](__dirname,_0x493f10(0x141)));}),app[a0_0x118e26(0x15a)](a0_0x118e26(0x128),(_0x14b672,_0x593390)=>{const _0x1c6f4c=a0_0x118e26,_0x8bfd96=_0x14b672[_0x1c6f4c(0x136)]['model']||'auto',_0x269b7f=tracker_1[_0x1c6f4c(0x13c)][_0x1c6f4c(0x145)](_0x8bfd96);_0x593390[_0x1c6f4c(0x15f)](_0x269b7f);}),app[a0_0x118e26(0x15a)](a0_0x118e26(0x133),(_0x19839a,_0x566520)=>{const _0x2be329=a0_0x118e26,_0x564a4a=tracker_1[_0x2be329(0x13c)]['getLogs']();_0x566520['json'](_0x564a4a);}),app[a0_0x118e26(0x15a)](a0_0x118e26(0x12e),(_0x527a8a,_0x2fcf93)=>{const _0x4c9ddd=a0_0x118e26,_0x38514d=_0x527a8a[_0x4c9ddd(0x14b)]['id'],_0x292eec=path[_0x4c9ddd(0x13d)](logsDir,_0x38514d+_0x4c9ddd(0x14d)),_0x5e4b12=path[_0x4c9ddd(0x13d)](logsDir,_0x38514d+_0x4c9ddd(0x131));let _0x3a1822=_0x4c9ddd(0x13b),_0x45c5bb=_0x4c9ddd(0x12a);try{fs[_0x4c9ddd(0x155)](_0x292eec)&&(_0x3a1822=fs[_0x4c9ddd(0x134)](_0x292eec,'utf8')),fs[_0x4c9ddd(0x155)](_0x5e4b12)&&(_0x45c5bb=fs[_0x4c9ddd(0x134)](_0x5e4b12,_0x4c9ddd(0x156)));}catch(_0x1764f1){}_0x2fcf93[_0x4c9ddd(0x15f)]({'id':_0x38514d,'raw':_0x3a1822,'compressed':_0x45c5bb});});function a0_0x4182(){const _0x424025=['.trimprompt','existsSync','utf8','8437gMkccP','error','10SEhQJo','get','log','112NyhSbp','[TrimPrompt]\x20Dashboard\x20error:\x20','create','json','index.html','getOwnPropertyDescriptor','84OHPDgp','__importStar','__setModuleDefault','prototype','/api/stats/summary','message','Compressed\x20output\x20log\x20file\x20not\x20found.','homedir','\x0a[TrimPrompt]\x20Dashboard\x20server\x20started\x20at:\x20','2015430LbrqXI','/api/stats/inspect/:id','4gpVOJM','code','.comp.txt','2557632nIgxcy','/api/stats/history','readFileSync','__createBinding','query','__importDefault','default','open','264BWRYYy','Raw\x20output\x20log\x20file\x20not\x20found.','tracker','join','sendFile','length','catch','../src/index.html','listen','Press\x20Ctrl+C\x20in\x20this\x20terminal\x20to\x20shut\x20down.','134883QGQZEN','getStatsSummary','./tracker','21303tohpIA','__esModule','configurable','writable','params','path','.raw.txt','6775839NcfhKf','call','3227103ZNZHGg','startDashboard','defineProperty','hasOwnProperty'];a0_0x4182=function(){return _0x424025;};return a0_0x4182();}function startDashboard(_0x12de14=0xfa0){const _0x287592=a0_0x118e26;let _0x27b464=_0x12de14;const _0x43c16d=app[_0x287592(0x142)](_0x27b464,()=>{const _0x5809b2=_0x287592,_0x5efeb0='http://localhost:'+_0x27b464;console[_0x5809b2(0x15b)](_0x5809b2(0x12c)+_0x5efeb0),console[_0x5809b2(0x15b)](_0x5809b2(0x143)),(0x0,open_1['default'])(_0x5efeb0)[_0x5809b2(0x140)](()=>{});});_0x43c16d['on'](_0x287592(0x158),_0x520896=>{const _0x352d63=_0x287592;_0x520896[_0x352d63(0x130)]==='EADDRINUSE'?startDashboard(_0x27b464+0x1):console['error'](_0x352d63(0x15d)+_0x520896[_0x352d63(0x129)]);});}
|
package/executor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a0_0x170a64=a0_0x6f4a;(function(_0x399030,_0x488fc1){var _0x409481=a0_0x6f4a,_0x11b612=_0x399030();while(!![]){try{var _0x91d5cf=-parseInt(_0x409481(0xd2))/0x1*(parseInt(_0x409481(0xd3))/0x2)+parseInt(_0x409481(0xd4))/0x3+-parseInt(_0x409481(0xdd))/0x4+parseInt(_0x409481(0xda))/0x5+parseInt(_0x409481(0xb9))/0x6+-parseInt(_0x409481(0xc0))/0x7+parseInt(_0x409481(0xb7))/0x8;if(_0x91d5cf===_0x488fc1)break;else _0x11b612['push'](_0x11b612['shift']());}catch(_0x18da6c){_0x11b612['push'](_0x11b612['shift']());}}}(a0_0x24fb,0x8cbe6));function a0_0x6f4a(_0x2200c0,_0x530e4c){var _0x24fb97=a0_0x24fb();return a0_0x6f4a=function(_0x6f4a0f,_0xe89048){_0x6f4a0f=_0x6f4a0f-0xb3;var _0x146dee=_0x24fb97[_0x6f4a0f];return _0x146dee;},a0_0x6f4a(_0x2200c0,_0x530e4c);}var __createBinding=this&&this[a0_0x170a64(0xc6)]||(Object[a0_0x170a64(0xc9)]?function(_0x5b025e,_0x27ea31,_0x10f3dd,_0x32cb4b){var _0x501bb2=a0_0x170a64;if(_0x32cb4b===undefined)_0x32cb4b=_0x10f3dd;var _0x4232de=Object[_0x501bb2(0xde)](_0x27ea31,_0x10f3dd);(!_0x4232de||(_0x501bb2(0xbc)in _0x4232de?!_0x27ea31[_0x501bb2(0xc3)]:_0x4232de[_0x501bb2(0xd1)]||_0x4232de[_0x501bb2(0xb4)]))&&(_0x4232de={'enumerable':!![],'get':function(){return _0x27ea31[_0x10f3dd];}}),Object[_0x501bb2(0xbf)](_0x5b025e,_0x32cb4b,_0x4232de);}:function(_0x3abf20,_0x440357,_0x36c1b2,_0x37c9aa){if(_0x37c9aa===undefined)_0x37c9aa=_0x36c1b2;_0x3abf20[_0x37c9aa]=_0x440357[_0x36c1b2];}),__setModuleDefault=this&&this[a0_0x170a64(0xe0)]||(Object[a0_0x170a64(0xc9)]?function(_0x44c0b4,_0x309d0a){var _0x4c2db4=a0_0x170a64;Object[_0x4c2db4(0xbf)](_0x44c0b4,_0x4c2db4(0xd9),{'enumerable':!![],'value':_0x309d0a});}:function(_0x405a53,_0x5dcf8b){var _0x7799f1=a0_0x170a64;_0x405a53[_0x7799f1(0xd9)]=_0x5dcf8b;}),__importStar=this&&this[a0_0x170a64(0xc5)]||(function(){var _0x35edd7=function(_0x4c293f){var _0xbbc29a=a0_0x6f4a;return _0x35edd7=Object[_0xbbc29a(0xca)]||function(_0x5b0141){var _0x313926=_0xbbc29a,_0x2b53b2=[];for(var _0x32c951 in _0x5b0141)if(Object[_0x313926(0xbe)][_0x313926(0xcd)][_0x313926(0xcb)](_0x5b0141,_0x32c951))_0x2b53b2[_0x2b53b2['length']]=_0x32c951;return _0x2b53b2;},_0x35edd7(_0x4c293f);};return function(_0xb8862a){var _0x4df4a5=a0_0x6f4a;if(_0xb8862a&&_0xb8862a[_0x4df4a5(0xc3)])return _0xb8862a;var _0x172fd1={};if(_0xb8862a!=null){for(var _0x5733dc=_0x35edd7(_0xb8862a),_0x75885=0x0;_0x75885<_0x5733dc[_0x4df4a5(0xba)];_0x75885++)if(_0x5733dc[_0x75885]!==_0x4df4a5(0xd9))__createBinding(_0x172fd1,_0xb8862a,_0x5733dc[_0x75885]);}return __setModuleDefault(_0x172fd1,_0xb8862a),_0x172fd1;};}());Object[a0_0x170a64(0xbf)](exports,'__esModule',{'value':!![]}),exports[a0_0x170a64(0xc2)]=executeCommand;const child_process_1=require(a0_0x170a64(0xc8)),path=__importStar(require(a0_0x170a64(0xb8))),os=__importStar(require('os'));function executeCommand(_0x4076b2,_0xe2dc4){return new Promise(_0x40720c=>{var _0x2380b5=a0_0x6f4a;const _0x4429b0=path[_0x2380b5(0xd0)](os[_0x2380b5(0xb5)](),_0x2380b5(0xe1),_0x2380b5(0xd5)),_0x3ab0c2=(process[_0x2380b5(0xdc)][_0x2380b5(0xd6)]||'')[_0x2380b5(0xdb)](path['delimiter'])['filter'](_0x41aa30=>_0x41aa30[_0x2380b5(0xc1)]()[_0x2380b5(0xc4)]()!==_0x4429b0[_0x2380b5(0xc4)]())[_0x2380b5(0xd0)](path[_0x2380b5(0xb3)]),_0x16d7f4={...process['env'],'PATH':_0x3ab0c2,'TRIMPROMPT_DISABLED':'1'},_0x23d11a=(0x0,child_process_1['spawn'])(_0x4076b2,_0xe2dc4,{'stdio':[_0x2380b5(0xbb),_0x2380b5(0xcc),_0x2380b5(0xcc)],'shell':!![],'env':_0x16d7f4});let _0x531a1c='',_0x13701e='';_0x23d11a[_0x2380b5(0xd8)]?.['on']('data',_0x9883d6=>{_0x531a1c+=_0x9883d6['toString']();}),_0x23d11a[_0x2380b5(0xd7)]?.['on'](_0x2380b5(0xb6),_0x2af729=>{var _0x293cdf=_0x2380b5;_0x13701e+=_0x2af729[_0x293cdf(0xbd)]();}),_0x23d11a['on'](_0x2380b5(0xdf),_0xfb51fe=>{var _0xe31ea4=_0x2380b5;_0x40720c({'exitCode':0x1,'stdout':'','stderr':_0xe31ea4(0xc7)+_0x4076b2+_0xe31ea4(0xce)+_0xfb51fe['message']});}),_0x23d11a['on'](_0x2380b5(0xcf),_0x947990=>{_0x40720c({'exitCode':_0x947990??0x0,'stdout':_0x531a1c,'stderr':_0x13701e});});});}function a0_0x24fb(){var _0x1d2921=['PATH','stderr','stdout','default','4190130IYnzZa','split','env','2962284YJDYWG','getOwnPropertyDescriptor','error','__setModuleDefault','.trimprompt','delimiter','configurable','homedir','data','1277456wqCPUb','path','6203508NfeFds','length','inherit','get','toString','prototype','defineProperty','550928wCFcvA','trim','executeCommand','__esModule','toLowerCase','__importStar','__createBinding','Failed\x20to\x20spawn\x20command\x20\x22','child_process','create','getOwnPropertyNames','call','pipe','hasOwnProperty','\x22:\x20','close','join','writable','952613vAKUwc','2RiPwhQ','950244keNySl','shims'];a0_0x24fb=function(){return _0x1d2921;};return a0_0x24fb();}
|
package/filters/devops.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x1d4278=a0_0x4355;(function(_0x9997bc,_0x22c005){const _0x42140b=a0_0x4355,_0x105098=_0x9997bc();while(!![]){try{const _0x4322ad=parseInt(_0x42140b(0x1de))/0x1*(parseInt(_0x42140b(0x20d))/0x2)+-parseInt(_0x42140b(0x208))/0x3*(parseInt(_0x42140b(0x1f2))/0x4)+parseInt(_0x42140b(0x1dc))/0x5+-parseInt(_0x42140b(0x1fe))/0x6+-parseInt(_0x42140b(0x209))/0x7*(parseInt(_0x42140b(0x1e5))/0x8)+parseInt(_0x42140b(0x1f9))/0x9+-parseInt(_0x42140b(0x1dd))/0xa*(-parseInt(_0x42140b(0x1ff))/0xb);if(_0x4322ad===_0x22c005)break;else _0x105098['push'](_0x105098['shift']());}catch(_0xbc3d4f){_0x105098['push'](_0x105098['shift']());}}}(a0_0x1867,0x416ab));Object[a0_0x1d4278(0x1e7)](exports,a0_0x1d4278(0x1f6),{'value':!![]}),exports[a0_0x1d4278(0x1f1)]=filterDockerPs,exports[a0_0x1d4278(0x204)]=filterDockerImages,exports[a0_0x1d4278(0x1f8)]=filterDockerLogs,exports[a0_0x1d4278(0x20a)]=filterKubectl,exports[a0_0x1d4278(0x1e9)]=filterRuff;function filterDockerPs(_0x375f93){const _0x48803a=a0_0x1d4278,_0x21d58a=_0x375f93[_0x48803a(0x1ec)]('\x0a')[_0x48803a(0x207)](_0x4554f5=>_0x4554f5[_0x48803a(0x205)]()['length']>0x0);if(_0x21d58a[_0x48803a(0x1f5)]===0x0)return _0x48803a(0x1ea);if(_0x21d58a[_0x48803a(0x1f5)]<=0xa)return _0x375f93[_0x48803a(0x205)]();const _0xf61e8d=_0x21d58a[0x0],_0x18618a=_0x21d58a[_0x48803a(0x1e0)](0x1),_0x24726b=[];_0x24726b[_0x48803a(0x200)]('Containers:\x20'+_0x18618a[_0x48803a(0x1f5)]+_0x48803a(0x1db)),_0x24726b[_0x48803a(0x200)]('');for(const _0x1891c2 of _0x18618a){const _0x17681e=_0x1891c2[_0x48803a(0x1ec)](/\s{2,}/);if(_0x17681e[_0x48803a(0x1f5)]>=0x5){const _0x4b275a=_0x17681e[0x0][_0x48803a(0x1f3)](0x0,0xc),_0x548359=_0x17681e[0x1],_0x2127d3=_0x17681e[_0x17681e['length']-0x2]||'',_0x45c406=_0x17681e[_0x17681e['length']-0x1]||'';_0x24726b['push']('\x20\x20'+_0x4b275a+'\x20\x20'+_0x548359+'\x20\x20'+_0x2127d3+'\x20\x20'+_0x45c406);}else _0x24726b[_0x48803a(0x200)]('\x20\x20'+_0x1891c2['trim']());}return _0x24726b['join']('\x0a');}function filterDockerImages(_0x22ecce){const _0x187ebd=a0_0x1d4278,_0x153ff9=_0x22ecce['split']('\x0a')[_0x187ebd(0x207)](_0xa8411a=>_0xa8411a[_0x187ebd(0x205)]()[_0x187ebd(0x1f5)]>0x0);if(_0x153ff9[_0x187ebd(0x1f5)]<=0x1)return _0x187ebd(0x1f4);if(_0x153ff9[_0x187ebd(0x1f5)]<=0xf)return _0x22ecce[_0x187ebd(0x205)]();const _0x22c52d=_0x153ff9[_0x187ebd(0x1e0)](0x1),_0x466f3d=[_0x187ebd(0x1e2)+_0x22c52d['length']+_0x187ebd(0x1db)];_0x466f3d[_0x187ebd(0x200)]('');const _0x1cb5c8=_0x22c52d[_0x187ebd(0x1e0)](0x0,0x14);for(const _0x2d02f7 of _0x1cb5c8){const _0x4ce1e0=_0x2d02f7[_0x187ebd(0x1ec)](/\s{2,}/);if(_0x4ce1e0[_0x187ebd(0x1f5)]>=0x3){const _0x2c8e3a=_0x4ce1e0[0x0],_0x126da2=_0x4ce1e0[0x1],_0x52074b=_0x4ce1e0[_0x4ce1e0[_0x187ebd(0x1f5)]-0x1]||'';_0x466f3d[_0x187ebd(0x200)]('\x20\x20'+_0x2c8e3a+':'+_0x126da2+'\x20\x20'+_0x52074b);}else _0x466f3d['push']('\x20\x20'+_0x2d02f7[_0x187ebd(0x205)]());}return _0x22c52d[_0x187ebd(0x1f5)]>0x14&&_0x466f3d[_0x187ebd(0x200)](_0x187ebd(0x1df)+(_0x22c52d[_0x187ebd(0x1f5)]-0x14)+_0x187ebd(0x1eb)),_0x466f3d[_0x187ebd(0x1fb)]('\x0a');}function a0_0x4355(_0x2fe41e,_0x2b04a9){const _0x186712=a0_0x1867();return a0_0x4355=function(_0x435595,_0x51e19d){_0x435595=_0x435595-0x1d9;let _0x4aba97=_0x186712[_0x435595];return _0x4aba97;},a0_0x4355(_0x2fe41e,_0x2b04a9);}function filterDockerLogs(_0x227c72){const _0x4ff651=a0_0x1d4278,_0xa807c6=_0x227c72['split']('\x0a');if(_0xa807c6['length']<=0x32)return _0x227c72;const _0x10298e=[];return _0x10298e[_0x4ff651(0x200)](..._0xa807c6['slice'](0x0,0x14)),_0x10298e['push'](_0x4ff651(0x1e8)+(_0xa807c6['length']-0x28)+'\x20lines\x20truncated]\x20...\x0a'),_0x10298e['push'](..._0xa807c6[_0x4ff651(0x1e0)](-0x14)),_0x10298e[_0x4ff651(0x200)]('\x0a('+_0xa807c6[_0x4ff651(0x1f5)]+_0x4ff651(0x1e4)),_0x10298e[_0x4ff651(0x1fb)]('\x0a');}function filterKubectl(_0x19e45f,_0xdff667){const _0x8954a1=a0_0x1d4278,_0x4b4185=_0x19e45f['split']('\x0a')[_0x8954a1(0x207)](_0x2fbbf2=>_0x2fbbf2[_0x8954a1(0x205)]()['length']>0x0);if(_0x4b4185[_0x8954a1(0x1f5)]===0x0)return _0x8954a1(0x1fd);if(_0x4b4185[_0x8954a1(0x1f5)]<=0x14)return _0x19e45f[_0x8954a1(0x205)]();if(_0xdff667===_0x8954a1(0x1fa)){const _0x3f6563=_0x4b4185[0x0],_0x241c7=_0x4b4185[_0x8954a1(0x1e0)](0x1),_0x1fc06d=[_0x241c7['length']+_0x8954a1(0x1f7),'',_0x3f6563];return _0x241c7[_0x8954a1(0x1f5)]<=0x1e?_0x1fc06d[_0x8954a1(0x200)](..._0x241c7):(_0x1fc06d[_0x8954a1(0x200)](..._0x241c7['slice'](0x0,0x19)),_0x1fc06d[_0x8954a1(0x200)](_0x8954a1(0x20b)+(_0x241c7[_0x8954a1(0x1f5)]-0x19)+_0x8954a1(0x1e3))),_0x1fc06d[_0x8954a1(0x1fb)]('\x0a');}if(_0xdff667==='describe'){const _0x17de73=[];let _0x2cafab=![],_0xf46faa=0x0;for(const _0x75c3c5 of _0x4b4185){if(_0x75c3c5[_0x8954a1(0x202)]('Events:')){_0x2cafab=!![],_0x17de73[_0x8954a1(0x200)](_0x75c3c5);continue;}if(_0x2cafab){_0xf46faa++;if(_0xf46faa<=0x5)_0x17de73[_0x8954a1(0x200)](_0x75c3c5);}else _0x17de73[_0x8954a1(0x200)](_0x75c3c5);}return _0xf46faa>0x5&&_0x17de73[_0x8954a1(0x200)](_0x8954a1(0x1df)+(_0xf46faa-0x5)+_0x8954a1(0x20c)),_0x17de73[_0x8954a1(0x1fb)]('\x0a');}if(_0xdff667==='logs')return filterDockerLogs(_0x19e45f);const _0x2c70ee=_0x4b4185[_0x8954a1(0x1e0)](0x0,0x1e);return _0x4b4185[_0x8954a1(0x1f5)]>0x1e&&_0x2c70ee[_0x8954a1(0x200)]('...\x20+'+(_0x4b4185['length']-0x1e)+_0x8954a1(0x1f0)),_0x2c70ee['join']('\x0a');}function filterRuff(_0x522948){const _0xc6b8d8=a0_0x1d4278,_0x2ed919=_0x522948['split']('\x0a')[_0xc6b8d8(0x207)](_0xef828c=>_0xef828c[_0xc6b8d8(0x205)]()[_0xc6b8d8(0x1f5)]>0x0);if(_0x2ed919[_0xc6b8d8(0x1f5)]===0x0)return _0xc6b8d8(0x1e6);if(_0x522948['includes'](_0xc6b8d8(0x1ef))||_0x522948[_0xc6b8d8(0x201)](_0xc6b8d8(0x1d9)))return'Ruff:\x20all\x20checks\x20passed';const _0x3e29db=_0x522948[_0xc6b8d8(0x1e1)](/Found (\d+) error/),_0x316de5=_0x3e29db?parseInt(_0x3e29db[0x1]):_0x2ed919[_0xc6b8d8(0x1f5)],_0x312c26={},_0x2c4e14=[];for(const _0x496f20 of _0x2ed919){const _0x5951d7=_0x496f20['match'](/^([^:]+:\d+:\d+):\s*(.*)/);if(_0x5951d7){const _0x28b7b1=_0x5951d7[0x1],_0x3c07c3=_0x28b7b1[_0xc6b8d8(0x1ec)](':')[0x0];if(!_0x312c26[_0x3c07c3])_0x312c26[_0x3c07c3]=[];_0x312c26[_0x3c07c3][_0xc6b8d8(0x200)](_0x496f20);}else _0x2c4e14[_0xc6b8d8(0x200)](_0x496f20);}const _0x5ca009=Object[_0xc6b8d8(0x206)](_0x312c26);if(_0x5ca009['length']===0x0){if(_0x2ed919[_0xc6b8d8(0x1f5)]<=0x14)return _0x522948[_0xc6b8d8(0x205)]();return _0x2ed919[_0xc6b8d8(0x1e0)](0x0,0xf)[_0xc6b8d8(0x1fb)]('\x0a')+(_0xc6b8d8(0x1da)+(_0x2ed919['length']-0xf)+_0xc6b8d8(0x1ee));}const _0x359055=['Ruff:\x20'+_0x316de5+_0xc6b8d8(0x1ed)+_0x5ca009[_0xc6b8d8(0x1f5)]+'\x20files'];_0x359055[_0xc6b8d8(0x200)]('');const _0x78259d=0xa;for(const _0x167158 of _0x5ca009['slice'](0x0,_0x78259d)){const _0x6c3f5e=_0x312c26[_0x167158];if(_0x6c3f5e[_0xc6b8d8(0x1f5)]<=0x3){for(const _0x2cb27d of _0x6c3f5e)_0x359055['push']('\x20\x20'+_0x2cb27d);}else _0x359055[_0xc6b8d8(0x200)]('\x20\x20'+_0x6c3f5e[0x0]),_0x359055['push'](_0xc6b8d8(0x203)+_0x6c3f5e['length']+_0xc6b8d8(0x1ed)+_0x167158+')');}return _0x5ca009[_0xc6b8d8(0x1f5)]>_0x78259d&&_0x359055['push'](_0xc6b8d8(0x1df)+(_0x5ca009[_0xc6b8d8(0x1f5)]-_0x78259d)+_0xc6b8d8(0x1fc)),_0x359055['join']('\x0a');}function a0_0x1867(){const _0xbeaf42=['All\x20checks\x20passed','\x20more\x20lines','filterDockerPs','36MYbaFd','substring','No\x20images\x20found','length','__esModule','\x20resources\x20found','filterDockerLogs','508176pUQVym','get','join','\x20more\x20files','No\x20resources\x20found','379392btJplJ','2527767mPMYmL','push','includes','startsWith','\x20\x20...\x20(','filterDockerImages','trim','keys','filter','178197FKYHpZ','20167FvTdpH','filterKubectl','...\x20+','\x20more\x20events','282630GdvHaI','Found\x200\x20error','\x0a...\x20+','\x20total','1203855plwRFr','30LqxqkX','1jpGSQM','\x20\x20...\x20+','slice','match','Docker\x20images:\x20','\x20more\x20resources','\x20log\x20lines\x20total)','728UNmuXD','Ruff:\x20no\x20issues\x20found','defineProperty','\x0a...\x20[','filterRuff','No\x20containers\x20running','\x20more\x20images','split','\x20issues\x20in\x20','\x20more'];a0_0x1867=function(){return _0xbeaf42;};return a0_0x1867();}
|
package/filters/generic.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x1b2122=a0_0x1ef3;(function(_0x4030eb,_0x3c6bc1){const _0x2fbaa1=a0_0x1ef3,_0x31f617=_0x4030eb();while(!![]){try{const _0x4ccc77=parseInt(_0x2fbaa1(0x188))/0x1+-parseInt(_0x2fbaa1(0x18f))/0x2+parseInt(_0x2fbaa1(0x189))/0x3+-parseInt(_0x2fbaa1(0x19c))/0x4+parseInt(_0x2fbaa1(0x196))/0x5+-parseInt(_0x2fbaa1(0x18d))/0x6+parseInt(_0x2fbaa1(0x18e))/0x7;if(_0x4ccc77===_0x3c6bc1)break;else _0x31f617['push'](_0x31f617['shift']());}catch(_0x87393a){_0x31f617['push'](_0x31f617['shift']());}}}(a0_0x2232,0xa4a54));Object[a0_0x1b2122(0x199)](exports,a0_0x1b2122(0x19b),{'value':!![]}),exports[a0_0x1b2122(0x190)]=stripAnsi,exports[a0_0x1b2122(0x18c)]=collapseDuplicates,exports[a0_0x1b2122(0x198)]=softTruncate;function a0_0x1ef3(_0xd5f8a4,_0x1894f1){const _0x223201=a0_0x2232();return a0_0x1ef3=function(_0x1ef347,_0x1e7669){_0x1ef347=_0x1ef347-0x188;let _0x476545=_0x223201[_0x1ef347];return _0x476545;},a0_0x1ef3(_0xd5f8a4,_0x1894f1);}function stripAnsi(_0x373203){const _0x3f5ed3=a0_0x1b2122,_0x671085=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g;return _0x373203[_0x3f5ed3(0x192)](_0x671085,'');}function a0_0x2232(){const _0x35b22b=['1312918yZDsgG','stripAnsi','slice','replace','push','\x0a...\x20[TrimPrompt:\x20Truncated\x20','\x20characters\x20of\x20output]\x20...\x0a','1627310WKFaAc','\x20[x','softTruncate','defineProperty','length','__esModule','3802508ZHlLec','754535jScgWY','3481275FKUzhl','split','join','collapseDuplicates','1815552FvwjRo','2405508wamnWR'];a0_0x2232=function(){return _0x35b22b;};return a0_0x2232();}function collapseDuplicates(_0x312e21){const _0x2b0d0b=a0_0x1b2122,_0x3903ac=_0x312e21[_0x2b0d0b(0x18a)]('\x0a');if(_0x3903ac[_0x2b0d0b(0x19a)]<=0x1)return _0x312e21;const _0x4a41e1=[];let _0x4a98c2=_0x3903ac[0x0],_0x1c0635=0x1;for(let _0x346b0f=0x1;_0x346b0f<_0x3903ac[_0x2b0d0b(0x19a)];_0x346b0f++){const _0x2d551c=_0x3903ac[_0x346b0f];_0x2d551c===_0x4a98c2&&_0x2d551c['trim']()['length']>0x0?_0x1c0635++:(_0x1c0635>0x1?_0x4a41e1[_0x2b0d0b(0x193)](_0x4a98c2+_0x2b0d0b(0x197)+_0x1c0635+']'):_0x4a41e1['push'](_0x4a98c2),_0x4a98c2=_0x2d551c,_0x1c0635=0x1);}return _0x1c0635>0x1?_0x4a41e1[_0x2b0d0b(0x193)](_0x4a98c2+'\x20[x'+_0x1c0635+']'):_0x4a41e1[_0x2b0d0b(0x193)](_0x4a98c2),_0x4a41e1[_0x2b0d0b(0x18b)]('\x0a');}function softTruncate(_0x574ee0,_0x31a9c6=0x4e20){const _0x1d3447=a0_0x1b2122;if(_0x574ee0[_0x1d3447(0x19a)]<=_0x31a9c6)return _0x574ee0;const _0x7f47ef=_0x574ee0[_0x1d3447(0x18a)]('\x0a');if(_0x7f47ef['length']<=0xc8)return _0x574ee0;const _0x5b5856=0x32,_0x367b26=0x96,_0x3b027a=_0x7f47ef[_0x1d3447(0x191)](0x0,_0x5b5856),_0x497d2e=_0x7f47ef[_0x1d3447(0x191)](_0x7f47ef[_0x1d3447(0x19a)]-_0x367b26),_0x488be5=_0x574ee0[_0x1d3447(0x19a)]-(_0x3b027a['join']('\x0a')[_0x1d3447(0x19a)]+_0x497d2e[_0x1d3447(0x18b)]('\x0a')[_0x1d3447(0x19a)]);return[..._0x3b027a,_0x1d3447(0x194)+_0x488be5+_0x1d3447(0x195),..._0x497d2e][_0x1d3447(0x18b)]('\x0a');}
|
package/filters/git.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x5b637e=a0_0x39d7;(function(_0x262d3e,_0x317a33){const _0x4ce6df=a0_0x39d7,_0x5114a2=_0x262d3e();while(!![]){try{const _0x4f2eb8=parseInt(_0x4ce6df(0xb3))/0x1+parseInt(_0x4ce6df(0x9f))/0x2*(parseInt(_0x4ce6df(0xaa))/0x3)+-parseInt(_0x4ce6df(0x82))/0x4*(parseInt(_0x4ce6df(0x90))/0x5)+-parseInt(_0x4ce6df(0x9d))/0x6*(-parseInt(_0x4ce6df(0x8a))/0x7)+-parseInt(_0x4ce6df(0xa5))/0x8*(parseInt(_0x4ce6df(0xa2))/0x9)+parseInt(_0x4ce6df(0xab))/0xa*(-parseInt(_0x4ce6df(0x8b))/0xb)+parseInt(_0x4ce6df(0xb1))/0xc*(parseInt(_0x4ce6df(0xa4))/0xd);if(_0x4f2eb8===_0x317a33)break;else _0x5114a2['push'](_0x5114a2['shift']());}catch(_0x4da96a){_0x5114a2['push'](_0x5114a2['shift']());}}}(a0_0x5274,0xb2a07));function a0_0x39d7(_0x16e4ba,_0x5f4806){const _0x5274bf=a0_0x5274();return a0_0x39d7=function(_0x39d7e8,_0x4f2644){_0x39d7e8=_0x39d7e8-0x82;let _0x277c31=_0x5274bf[_0x39d7e8];return _0x277c31;},a0_0x39d7(_0x16e4ba,_0x5f4806);}var __createBinding=this&&this[a0_0x5b637e(0x85)]||(Object[a0_0x5b637e(0xa8)]?function(_0x10c7ab,_0x209c77,_0x3ce5dd,_0x484506){const _0x3d8fad=a0_0x5b637e;if(_0x484506===undefined)_0x484506=_0x3ce5dd;var _0x284784=Object[_0x3d8fad(0x9c)](_0x209c77,_0x3ce5dd);(!_0x284784||(_0x3d8fad(0x88)in _0x284784?!_0x209c77[_0x3d8fad(0xa9)]:_0x284784[_0x3d8fad(0x8e)]||_0x284784[_0x3d8fad(0xac)]))&&(_0x284784={'enumerable':!![],'get':function(){return _0x209c77[_0x3ce5dd];}}),Object[_0x3d8fad(0x9b)](_0x10c7ab,_0x484506,_0x284784);}:function(_0x1be252,_0x3aad0e,_0x651c23,_0x11687a){if(_0x11687a===undefined)_0x11687a=_0x651c23;_0x1be252[_0x11687a]=_0x3aad0e[_0x651c23];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a0_0x5b637e(0xa8)]?function(_0x199793,_0x4c0d3a){const _0x25cc7c=a0_0x5b637e;Object[_0x25cc7c(0x9b)](_0x199793,_0x25cc7c(0xa3),{'enumerable':!![],'value':_0x4c0d3a});}:function(_0x2292b4,_0x932dbe){const _0x147863=a0_0x5b637e;_0x2292b4[_0x147863(0xa3)]=_0x932dbe;}),__importStar=this&&this['__importStar']||(function(){var _0x302c66=function(_0x571f0b){return _0x302c66=Object['getOwnPropertyNames']||function(_0x5ea430){const _0x169170=a0_0x39d7;var _0x5da90f=[];for(var _0x584f9a in _0x5ea430)if(Object[_0x169170(0x97)]['hasOwnProperty'][_0x169170(0x93)](_0x5ea430,_0x584f9a))_0x5da90f[_0x5da90f[_0x169170(0x86)]]=_0x584f9a;return _0x5da90f;},_0x302c66(_0x571f0b);};return function(_0x2999c3){const _0x2c2b82=a0_0x39d7;if(_0x2999c3&&_0x2999c3[_0x2c2b82(0xa9)])return _0x2999c3;var _0x3e25fa={};if(_0x2999c3!=null){for(var _0x2e5ae0=_0x302c66(_0x2999c3),_0x15e337=0x0;_0x15e337<_0x2e5ae0[_0x2c2b82(0x86)];_0x15e337++)if(_0x2e5ae0[_0x15e337]!==_0x2c2b82(0xa3))__createBinding(_0x3e25fa,_0x2999c3,_0x2e5ae0[_0x15e337]);}return __setModuleDefault(_0x3e25fa,_0x2999c3),_0x3e25fa;};}());Object[a0_0x5b637e(0x9b)](exports,a0_0x5b637e(0xa9),{'value':!![]}),exports[a0_0x5b637e(0x9e)]=filterGitStatus,exports['filterGitLog']=filterGitLog,exports[a0_0x5b637e(0x91)]=filterGitDiff;function a0_0x5274(){const _0x1ab778=['73125kYmxFs','default','13kJiXnN','152cQioJt','basename','\x20untracked\x20files)','create','__esModule','12gsCjMh','1137320xORbeW','configurable','replace','[file]\x20','trim','\x20(+','16607928kGmJhb','unknown_file','502734tQfktZ','dirname','split','diff\x20--git','map','join','substring','slice','4aOYZlZ','\x20\x20...\x20+','---','__createBinding','length','entries','get','No\x20modifications','970781IIYCOq','44toBgBz','\x0aUntracked\x20files:','\x20\x20??\x20','writable','/\x20(','4808585KNwgLm','filterGitDiff','---END---','call','filter','\x20more\x20modifications','+++','prototype','\x20lines\x20of\x20description)','\x0aChanges:','push','defineProperty','getOwnPropertyDescriptor','6oUJwUp','filterGitStatus','138632VZPqSP','startsWith','path'];a0_0x5274=function(){return _0x1ab778;};return a0_0x5274();}const path=__importStar(require(a0_0x5b637e(0xa1)));function filterGitStatus(_0x4a9ccb){const _0x105ffa=a0_0x5b637e,_0x4d44b5=_0x4a9ccb[_0x105ffa(0xb5)]('\x0a')[_0x105ffa(0xb7)](_0x38d477=>_0x38d477[_0x105ffa(0xaf)]())[_0x105ffa(0x94)](_0xcaae3d=>_0xcaae3d['length']>0x0);if(_0x4d44b5[_0x105ffa(0x86)]===0x0)return'Clean\x20working\x20tree';const _0x4b2964=[],_0x4cf351=[],_0x561a2c=[];for(const _0x33b8b3 of _0x4d44b5){if(_0x33b8b3[_0x105ffa(0xa0)]('##')){const _0x5b1330=_0x33b8b3[_0x105ffa(0xad)](/^##\s*/,'');_0x4b2964['push']('*\x20Branch:\x20'+_0x5b1330);}else _0x33b8b3[_0x105ffa(0xa0)]('??')?_0x4cf351[_0x105ffa(0x9a)](_0x33b8b3[_0x105ffa(0xb9)](0x3)[_0x105ffa(0xaf)]()):_0x561a2c[_0x105ffa(0x9a)](_0x33b8b3);}_0x561a2c[_0x105ffa(0x86)]>0x0&&(_0x4b2964[_0x105ffa(0x9a)](_0x105ffa(0x99)),_0x4b2964[_0x105ffa(0x9a)](..._0x561a2c[_0x105ffa(0xb7)](_0x2280f1=>'\x20\x20'+_0x2280f1)));if(_0x4cf351['length']>0x0){_0x4b2964['push'](_0x105ffa(0x8c));const _0x4685bb={},_0x28e901=[];for(const _0x45c822 of _0x4cf351){const _0x127cde=path[_0x105ffa(0xb4)](_0x45c822);_0x127cde==='.'||_0x127cde===''?_0x28e901[_0x105ffa(0x9a)](_0x45c822):(!_0x4685bb[_0x127cde]&&(_0x4685bb[_0x127cde]=[]),_0x4685bb[_0x127cde][_0x105ffa(0x9a)](path[_0x105ffa(0xa6)](_0x45c822)));}for(const [_0x1dd43f,_0x1aeea2]of Object[_0x105ffa(0x87)](_0x4685bb)){if(_0x1aeea2[_0x105ffa(0x86)]>0x5)_0x4b2964[_0x105ffa(0x9a)]('\x20\x20??\x20'+_0x1dd43f+_0x105ffa(0x8f)+_0x1aeea2[_0x105ffa(0x86)]+_0x105ffa(0xa7));else for(const _0x55c18f of _0x1aeea2){_0x4b2964[_0x105ffa(0x9a)](_0x105ffa(0x8d)+path['join'](_0x1dd43f,_0x55c18f));}}for(const _0xcd6fe2 of _0x28e901){_0x4b2964['push'](_0x105ffa(0x8d)+_0xcd6fe2);}}return _0x4b2964[_0x105ffa(0xb8)]('\x0a');}function filterGitLog(_0x1c7524){const _0x33a0e2=a0_0x5b637e,_0x493d5b=_0x1c7524[_0x33a0e2(0xb5)](_0x33a0e2(0x92))[_0x33a0e2(0xb7)](_0x1a59ef=>_0x1a59ef['trim']())['filter'](_0x3c7bb6=>_0x3c7bb6[_0x33a0e2(0x86)]>0x0);if(_0x493d5b[_0x33a0e2(0x86)]===0x0)return _0x1c7524;const _0x2b4318=[];for(const _0x5106f5 of _0x493d5b){const _0xefecb0=_0x5106f5[_0x33a0e2(0xb5)]('\x0a'),_0x460987=_0xefecb0[0x0]||'',_0x5494a4=_0xefecb0[_0x33a0e2(0xba)](0x1)[_0x33a0e2(0xb7)](_0x2d008b=>_0x2d008b['trim']())[_0x33a0e2(0x94)](_0x1f30e1=>_0x1f30e1[_0x33a0e2(0x86)]>0x0);_0x2b4318['push']('-\x20'+_0x460987),_0x5494a4[_0x33a0e2(0x86)]>0x0&&(_0x2b4318[_0x33a0e2(0x9a)]('\x20\x20'+_0x5494a4[0x0]),_0x5494a4[_0x33a0e2(0x86)]>0x1&&_0x2b4318[_0x33a0e2(0x9a)]('\x20\x20...\x20(+'+(_0x5494a4[_0x33a0e2(0x86)]-0x1)+_0x33a0e2(0x98)));}return _0x2b4318[_0x33a0e2(0xb8)]('\x0a');}function filterGitDiff(_0xaf08b0){const _0x5e988b=a0_0x5b637e,_0xa3fe5f=_0xaf08b0[_0x5e988b(0xb5)]('\x0a'),_0x4d0573=[];let _0x495368='',_0x26c50a=0x0,_0x4d6b2d=0x0,_0x4738ba=[];const _0x48a6f0=()=>{const _0x1fdc91=_0x5e988b;if(_0x495368&&(_0x26c50a>0x0||_0x4d6b2d>0x0)){_0x4d0573[_0x1fdc91(0x9a)](_0x1fdc91(0xae)+_0x495368+_0x1fdc91(0xb0)+_0x26c50a+'\x20-'+_0x4d6b2d+')');const _0xc579e4=0xa,_0x2a594c=_0x4738ba['slice'](0x0,_0xc579e4);for(const _0x560b5f of _0x2a594c){_0x4d0573[_0x1fdc91(0x9a)]('\x20\x20'+_0x560b5f);}const _0x2b0326=_0x26c50a+_0x4d6b2d-_0xc579e4;_0x2b0326>0x0&&_0x4d0573[_0x1fdc91(0x9a)](_0x1fdc91(0x83)+_0x2b0326+_0x1fdc91(0x95));}_0x26c50a=0x0,_0x4d6b2d=0x0,_0x4738ba=[];};for(const _0x631dd9 of _0xa3fe5f){if(_0x631dd9['startsWith'](_0x5e988b(0xb6))){_0x48a6f0();const _0x3a5a3b=_0x631dd9['match'](/\sb\/(.+)$/);_0x495368=_0x3a5a3b?_0x3a5a3b[0x1]:_0x5e988b(0xb2);}else{if(_0x631dd9[_0x5e988b(0xa0)]('+')&&!_0x631dd9[_0x5e988b(0xa0)](_0x5e988b(0x96)))_0x26c50a++,_0x4738ba[_0x5e988b(0x9a)](_0x631dd9);else _0x631dd9[_0x5e988b(0xa0)]('-')&&!_0x631dd9['startsWith'](_0x5e988b(0x84))&&(_0x4d6b2d++,_0x4738ba[_0x5e988b(0x9a)](_0x631dd9));}}_0x48a6f0();const _0xbc130f=_0x4d0573[_0x5e988b(0xb8)]('\x0a');return _0xbc130f[_0x5e988b(0x86)]>0x0?_0xbc130f:_0x5e988b(0x89);}
|
package/filters/go.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';const a0_0x57483e=a0_0xb762;(function(_0x3e4550,_0x29087d){const _0x4f09da=a0_0xb762,_0x1bc523=_0x3e4550();while(!![]){try{const _0x26e8f4=parseInt(_0x4f09da(0x177))/0x1+parseInt(_0x4f09da(0x173))/0x2*(parseInt(_0x4f09da(0x170))/0x3)+parseInt(_0x4f09da(0x18b))/0x4*(parseInt(_0x4f09da(0x17e))/0x5)+-parseInt(_0x4f09da(0x189))/0x6*(parseInt(_0x4f09da(0x165))/0x7)+-parseInt(_0x4f09da(0x181))/0x8*(-parseInt(_0x4f09da(0x17d))/0x9)+-parseInt(_0x4f09da(0x17b))/0xa+-parseInt(_0x4f09da(0x168))/0xb;if(_0x26e8f4===_0x29087d)break;else _0x1bc523['push'](_0x1bc523['shift']());}catch(_0x30f53a){_0x1bc523['push'](_0x1bc523['shift']());}}}(a0_0x4a00,0x5d3b3));function a0_0xb762(_0x45e27f,_0x33117f){const _0x4a001b=a0_0x4a00();return a0_0xb762=function(_0xb76294,_0x2b9aaf){_0xb76294=_0xb76294-0x163;let _0x8549df=_0x4a001b[_0xb76294];return _0x8549df;},a0_0xb762(_0x45e27f,_0x33117f);}function a0_0x4a00(){const _0x1fa196=['466058SSZEfd','===\x20RUN','Go\x20test:\x20','length','576240BPKtQE','\x20issues\x20found','32985cNIXDN','165UgkpHu','...\x20+','\x20skipped','280IPSLXZ','filter','slice','push','trim','Go\x20vet:\x20no\x20issues\x20found','min','startsWith','604776PgxROR','\x20\x20...\x20+','31976anrNmm','\x20passed','__esModule','42wlvTMx','\x20\x20\x20\x20','Go\x20vet:\x20','4713335qQsPMF','PASS','Go\x20test:\x20no\x20test\x20files','Go\x20test:\x20all\x20tests\x20passed','match','lines','\x20more\x20lines','\x0aFailures:','447UATuXX','includes','FAIL','8250DuzNro','\x20passed,\x20','join','\x20more\x20failures'];a0_0x4a00=function(){return _0x1fa196;};return a0_0x4a00();}Object['defineProperty'](exports,a0_0x57483e(0x164),{'value':!![]}),exports['filterGoTest']=filterGoTest,exports['filterGoVet']=filterGoVet;function filterGoTest(_0x390047){const _0x32f2c4=a0_0x57483e,_0x44cd25=_0x390047['split']('\x0a');let _0x520c40=0x0,_0x252bc8=0x0,_0x4cd948=0x0;const _0xf7ae24=[],_0x2a1d40=[];let _0x2b56fd=null;for(const _0x485fc2 of _0x44cd25){const _0x53a6be=_0x485fc2['trim'](),_0x2d7402=_0x53a6be[_0x32f2c4(0x16c)](/^ok\s+\S+\s+[\d.]+s/);if(_0x2d7402){_0x2a1d40[_0x32f2c4(0x184)](_0x53a6be);continue;}const _0x1f6251=_0x53a6be[_0x32f2c4(0x16c)](/^FAIL\s+\S+/);if(_0x1f6251){_0x2a1d40['push'](_0x53a6be);continue;}const _0x364143=_0x53a6be[_0x32f2c4(0x16c)](/^--- PASS:/);if(_0x364143){_0x520c40++;continue;}const _0x4179f9=_0x53a6be[_0x32f2c4(0x16c)](/^--- FAIL:\s+(\S+)/);if(_0x4179f9){if(_0x2b56fd)_0xf7ae24['push'](_0x2b56fd);_0x2b56fd={'name':_0x4179f9[0x1],'lines':[]},_0x252bc8++;continue;}if(_0x53a6be[_0x32f2c4(0x188)]('---\x20SKIP:')){_0x4cd948++;continue;}_0x2b56fd&&_0x53a6be[_0x32f2c4(0x17a)]>0x0&&!_0x53a6be[_0x32f2c4(0x188)]('===\x20RUN')&&_0x2b56fd[_0x32f2c4(0x16d)][_0x32f2c4(0x184)](_0x485fc2),_0x53a6be[_0x32f2c4(0x188)](_0x32f2c4(0x178))&&(_0x2b56fd&&(_0xf7ae24[_0x32f2c4(0x184)](_0x2b56fd),_0x2b56fd=null));}if(_0x2b56fd)_0xf7ae24[_0x32f2c4(0x184)](_0x2b56fd);if(_0x520c40===0x0&&_0x252bc8===0x0&&_0x4cd948===0x0){if(_0x390047['includes'](_0x32f2c4(0x169))&&!_0x390047[_0x32f2c4(0x171)](_0x32f2c4(0x172)))return _0x32f2c4(0x16b);if(_0x390047['includes']('no\x20test\x20files'))return _0x32f2c4(0x16a);return _0x390047;}if(_0x252bc8===0x0){const _0x1a6360=[_0x32f2c4(0x179)+_0x520c40+_0x32f2c4(0x163)];if(_0x4cd948>0x0)_0x1a6360[_0x32f2c4(0x184)](_0x4cd948+_0x32f2c4(0x180));return _0x1a6360[_0x32f2c4(0x175)](',\x20');}const _0x4230e8=[_0x32f2c4(0x179)+_0x520c40+_0x32f2c4(0x174)+_0x252bc8+'\x20failed,\x20'+_0x4cd948+_0x32f2c4(0x180)];if(_0xf7ae24[_0x32f2c4(0x17a)]>0x0){_0x4230e8[_0x32f2c4(0x184)](_0x32f2c4(0x16f));const _0x1fc23d=0x3;for(let _0x21be57=0x0;_0x21be57<Math[_0x32f2c4(0x187)](_0xf7ae24[_0x32f2c4(0x17a)],_0x1fc23d);_0x21be57++){const _0x225dab=_0xf7ae24[_0x21be57];_0x4230e8[_0x32f2c4(0x184)]('\x20\x20'+(_0x21be57+0x1)+'.\x20'+_0x225dab['name']);for(const _0x2fc0fd of _0x225dab[_0x32f2c4(0x16d)][_0x32f2c4(0x183)](0x0,0x5)){_0x4230e8['push'](_0x32f2c4(0x166)+_0x2fc0fd[_0x32f2c4(0x185)]());}_0x225dab[_0x32f2c4(0x16d)]['length']>0x5&&_0x4230e8[_0x32f2c4(0x184)]('\x20\x20\x20\x20...\x20+'+(_0x225dab[_0x32f2c4(0x16d)][_0x32f2c4(0x17a)]-0x5)+_0x32f2c4(0x16e));}_0xf7ae24[_0x32f2c4(0x17a)]>_0x1fc23d&&_0x4230e8[_0x32f2c4(0x184)](_0x32f2c4(0x18a)+(_0xf7ae24[_0x32f2c4(0x17a)]-_0x1fc23d)+_0x32f2c4(0x176));}return _0x4230e8[_0x32f2c4(0x175)]('\x0a');}function filterGoVet(_0x33cd4b){const _0x282e1b=a0_0x57483e,_0x24ac33=_0x33cd4b['split']('\x0a')[_0x282e1b(0x182)](_0x18afe5=>_0x18afe5[_0x282e1b(0x185)]()[_0x282e1b(0x17a)]>0x0);if(_0x24ac33[_0x282e1b(0x17a)]===0x0)return _0x282e1b(0x186);if(_0x24ac33[_0x282e1b(0x17a)]<=0x14)return _0x33cd4b[_0x282e1b(0x185)]();const _0x3ad3c0=[_0x282e1b(0x167)+_0x24ac33['length']+_0x282e1b(0x17c)];return _0x3ad3c0[_0x282e1b(0x184)](..._0x24ac33['slice'](0x0,0xa)),_0x24ac33[_0x282e1b(0x17a)]>0xa&&_0x3ad3c0[_0x282e1b(0x184)](_0x282e1b(0x17f)+(_0x24ac33[_0x282e1b(0x17a)]-0xa)+'\x20more\x20issues'),_0x3ad3c0['join']('\x0a');}
|