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/filters/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x25fee4=a0_0x37b6;(function(_0x44f208,_0x331882){const _0x3054a9=a0_0x37b6,_0x40f88f=_0x44f208();while(!![]){try{const _0x33ca02=parseInt(_0x3054a9(0x10b))/0x1*(-parseInt(_0x3054a9(0x107))/0x2)+-parseInt(_0x3054a9(0x12f))/0x3+-parseInt(_0x3054a9(0xdf))/0x4*(parseInt(_0x3054a9(0x122))/0x5)+parseInt(_0x3054a9(0x137))/0x6+parseInt(_0x3054a9(0xe9))/0x7*(parseInt(_0x3054a9(0x120))/0x8)+parseInt(_0x3054a9(0x124))/0x9+parseInt(_0x3054a9(0x10a))/0xa;if(_0x33ca02===_0x331882)break;else _0x40f88f['push'](_0x40f88f['shift']());}catch(_0x23d595){_0x40f88f['push'](_0x40f88f['shift']());}}}(a0_0x1151,0x8a239));function a0_0x1151(){const _0x3155a3=['4pZfVeO','vitest','trim\x20npx','trim\x20go','filterJestVitest','npm\x20i\x20','toLowerCase','./generic','trim\x20pnpm','./git','291739ySezAC','trim\x20ls','rewriteCommand','\x20tree\x20','trim\x20pip','ruff\x20','../redactor','filterPipInstall','trim\x20npm','ruff\x20check','cargo\x20check','softTruncate','filterRuff','yadm\x20status','startsWith','defineProperty','length','filterTree','yadm\x20log','pnpm\x20install','jest','git\x20show','npm\x20test','collapseDuplicates','go\x20vet','trim\x20docker','filterGrep','trim\x20read','cargo\x20clippy','__esModule','663892RFJksQ','kubectl','git\x20diff','7511520ErbdVJ','1xEUxpk','trim\x20tree','test','redact','cargo\x20test','pattern','cargo\x20build','./devops','filterCargoBuild','filterDockerLogs','filterGoTest','trim\x20gh','npm\x20i','compressOutput','trim','filterPytest','./rust','match','\x20tree','filterDockerPs','pip3\x20install','200cpRMxC','endsWith','5587255WjBxNE','get','4552263MHwter','stripAnsi','trim\x20','includes','\x20ls\x20','filterNpmInstall','\x20ls','git\x20status','trim\x20glab','./shell','./js','1894230fCbXAi','yarn\x20test','trim\x20pytest','trim\x20find','./go','pytest','trim\x20git','trim\x20kubectl','2086440LBkXJw'];a0_0x1151=function(){return _0x3155a3;};return a0_0x1151();}Object[a0_0x25fee4(0xf8)](exports,a0_0x25fee4(0x106),{'value':!![]}),exports[a0_0x25fee4(0x118)]=compressOutput,exports[a0_0x25fee4(0xeb)]=rewriteCommand;const generic_1=require(a0_0x25fee4(0xe6)),git_1=require(a0_0x25fee4(0xe8)),python_1=require('./python'),js_1=require(a0_0x25fee4(0x12e)),shell_1=require(a0_0x25fee4(0x12d)),rust_1=require(a0_0x25fee4(0x11b)),go_1=require(a0_0x25fee4(0x133)),devops_1=require(a0_0x25fee4(0x112)),redactor_1=require(a0_0x25fee4(0xef));function compressOutput(_0x58d414,_0x4a2dd7,_0x34553c,_0x264684=!![]){const _0x4fbc70=a0_0x25fee4,_0x43817c=_0x58d414[_0x4fbc70(0x119)]();let _0x526022=_0x4a2dd7;_0x34553c['trim']()[_0x4fbc70(0xf9)]>0x0&&(_0x526022=_0x4a2dd7+'\x0a'+_0x34553c);let _0x5ed440=(0x0,generic_1[_0x4fbc70(0x125)])(_0x526022);_0x264684&&(_0x5ed440=redactor_1['redactor'][_0x4fbc70(0x10e)](_0x5ed440));const _0x27080a=_0x43817c[_0x4fbc70(0xe5)]();try{if(_0x27080a['includes'](_0x4fbc70(0x12b))||_0x27080a['includes'](_0x4fbc70(0xf6)))return(0x0,git_1['filterGitStatus'])(_0x5ed440);if(_0x27080a[_0x4fbc70(0x127)]('git\x20log')||_0x27080a[_0x4fbc70(0x127)](_0x4fbc70(0xfb)))return(0x0,git_1['filterGitLog'])(_0x5ed440);if(_0x27080a[_0x4fbc70(0x127)](_0x4fbc70(0x109))||_0x27080a[_0x4fbc70(0x127)](_0x4fbc70(0xfe))||_0x27080a['includes']('yadm\x20diff'))return(0x0,git_1['filterGitDiff'])(_0x5ed440);if(_0x27080a[_0x4fbc70(0x127)](_0x4fbc70(0x134))||_0x27080a[_0x4fbc70(0x11c)](/python3?\s+-m\s+pytest/))return(0x0,python_1[_0x4fbc70(0x11a)])(_0x5ed440);if(_0x27080a['includes']('pip\x20install')||_0x27080a[_0x4fbc70(0x127)](_0x4fbc70(0x11f)))return(0x0,python_1[_0x4fbc70(0xf0)])(_0x5ed440);if(_0x27080a['includes'](_0x4fbc70(0xf2))||_0x27080a[_0x4fbc70(0x127)](_0x4fbc70(0xee)))return(0x0,devops_1[_0x4fbc70(0xf5)])(_0x5ed440);if(_0x27080a[_0x4fbc70(0x127)]('npm\x20install')||_0x27080a['includes'](_0x4fbc70(0xe4))||_0x27080a[_0x4fbc70(0x121)](_0x4fbc70(0x117))||_0x27080a[_0x4fbc70(0x127)](_0x4fbc70(0xfc))||_0x27080a[_0x4fbc70(0x127)]('yarn\x20install'))return(0x0,js_1[_0x4fbc70(0x129)])(_0x5ed440);if(_0x27080a[_0x4fbc70(0x127)](_0x4fbc70(0xfd))||_0x27080a[_0x4fbc70(0x127)](_0x4fbc70(0xe0)))return(0x0,js_1['filterJestVitest'])(_0x5ed440);if(_0x27080a['includes'](_0x4fbc70(0xff))||_0x27080a[_0x4fbc70(0x127)]('pnpm\x20test')||_0x27080a['includes'](_0x4fbc70(0x130))||_0x27080a['includes']('npm\x20run\x20test'))return(0x0,js_1[_0x4fbc70(0xe3)])(_0x5ed440);if(_0x27080a[_0x4fbc70(0x127)](_0x4fbc70(0x10f)))return(0x0,rust_1['filterCargoTest'])(_0x5ed440);if(_0x27080a[_0x4fbc70(0x127)](_0x4fbc70(0x111))||_0x27080a[_0x4fbc70(0x127)](_0x4fbc70(0xf3))||_0x27080a[_0x4fbc70(0x127)](_0x4fbc70(0x105)))return(0x0,rust_1[_0x4fbc70(0x113)])(_0x5ed440);if(_0x27080a[_0x4fbc70(0x127)]('go\x20test'))return(0x0,go_1[_0x4fbc70(0x115)])(_0x5ed440);if(_0x27080a[_0x4fbc70(0x127)](_0x4fbc70(0x101)))return(0x0,go_1['filterGoVet'])(_0x5ed440);if(_0x27080a[_0x4fbc70(0x11c)](/docker\s+ps/))return(0x0,devops_1[_0x4fbc70(0x11e)])(_0x5ed440);if(_0x27080a[_0x4fbc70(0x11c)](/docker\s+images/))return(0x0,devops_1['filterDockerImages'])(_0x5ed440);if(_0x27080a[_0x4fbc70(0x11c)](/docker\s+logs/))return(0x0,devops_1[_0x4fbc70(0x114)])(_0x5ed440);if(_0x27080a[_0x4fbc70(0x127)](_0x4fbc70(0x108))){const _0x12687b=_0x27080a[_0x4fbc70(0x11c)](/kubectl\s+(get|logs|describe|apply)/),_0x228421=_0x12687b?_0x12687b[0x1]:_0x4fbc70(0x123);return(0x0,devops_1['filterKubectl'])(_0x5ed440,_0x228421);}if(_0x27080a['match'](/^(ls|dir)(\s|$)/)||_0x27080a['includes'](_0x4fbc70(0x128))||_0x27080a[_0x4fbc70(0x121)](_0x4fbc70(0x12a)))return(0x0,shell_1['filterLs'])(_0x5ed440);if(_0x27080a[_0x4fbc70(0x11c)](/^tree(\s|$)/)||_0x27080a[_0x4fbc70(0x127)](_0x4fbc70(0xec))||_0x27080a['endsWith'](_0x4fbc70(0x11d)))return(0x0,shell_1[_0x4fbc70(0xfa)])(_0x5ed440);if(_0x27080a['match'](/^(cat|head|tail|read|bat)(\s|$)/))return(0x0,shell_1['filterCat'])(_0x5ed440);if(_0x27080a[_0x4fbc70(0x11c)](/^(grep|rg|ripgrep)(\s|$)/))return(0x0,shell_1[_0x4fbc70(0x103)])(_0x5ed440);}catch(_0x37159e){}return _0x5ed440=(0x0,generic_1[_0x4fbc70(0x100)])(_0x5ed440),_0x5ed440=(0x0,generic_1[_0x4fbc70(0xf4)])(_0x5ed440,0x4e20),_0x5ed440;}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_0x25fee4(0x135)},{'pattern':/^gh\s+(pr|issue|run|repo|api|release)/,'prefix':a0_0x25fee4(0x116)},{'pattern':/^glab\s+(mr|issue|ci|pipeline|api|release)/,'prefix':a0_0x25fee4(0x12c)},{'pattern':/^cargo\s+(build|test|clippy|check|fmt|install)/,'prefix':'trim\x20cargo'},{'pattern':/^pnpm\s+(exec|i|install|list|ls|outdated|run|run-script)/,'prefix':a0_0x25fee4(0xe7)},{'pattern':/^npm\s+(exec|run|run-script|rum|urn|x|test)(\s|$)/,'prefix':a0_0x25fee4(0xf1)},{'pattern':/^npx\s+/,'prefix':a0_0x25fee4(0xe1)},{'pattern':/^(cat|head|tail)\s+/,'prefix':a0_0x25fee4(0x104)},{'pattern':/^(rg|grep)\s+/,'prefix':'trim\x20grep'},{'pattern':/^ls(\s|$)/,'prefix':a0_0x25fee4(0xea)},{'pattern':/^tree(\s|$)/,'prefix':a0_0x25fee4(0x10c)},{'pattern':/^find\s+/,'prefix':a0_0x25fee4(0x132)},{'pattern':/^docker\s+(ps|images|logs|run|exec|build|compose)/,'prefix':a0_0x25fee4(0x102)},{'pattern':/^kubectl\s+(get|logs|describe|apply)/,'prefix':a0_0x25fee4(0x136)},{'pattern':/^(python3?\s+-m\s+)?pytest(\s|$)/,'prefix':a0_0x25fee4(0x131)},{'pattern':/^ruff\s+(check|format)/,'prefix':'trim\x20ruff'},{'pattern':/^(pip3?|uv\s+pip)\s+(list|outdated|install|show)/,'prefix':a0_0x25fee4(0xed)},{'pattern':/^go\s+(test|build|vet)/,'prefix':a0_0x25fee4(0xe2)}];function a0_0x37b6(_0xc7ed59,_0x13b11f){const _0x11510e=a0_0x1151();return a0_0x37b6=function(_0x37b6a5,_0x305ab6){_0x37b6a5=_0x37b6a5-0xdf;let _0x4dc948=_0x11510e[_0x37b6a5];return _0x4dc948;},a0_0x37b6(_0xc7ed59,_0x13b11f);}function rewriteCommand(_0x491f64){const _0x3c426e=a0_0x25fee4,_0xbbd38f=_0x491f64[_0x3c426e(0x119)]();if(_0xbbd38f[_0x3c426e(0xf7)](_0x3c426e(0x126)))return _0xbbd38f;for(const _0xe2a02 of REWRITE_RULES){if(_0xe2a02[_0x3c426e(0x110)][_0x3c426e(0x10d)](_0xbbd38f))return'trim\x20'+_0xbbd38f;}return _0xbbd38f;}
|
package/filters/js.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x4faa20=a0_0x4f54;(function(_0x298f02,_0x366f43){const _0x1e7c2c=a0_0x4f54,_0x31c6a1=_0x298f02();while(!![]){try{const _0x4d9a77=-parseInt(_0x1e7c2c(0x106))/0x1+-parseInt(_0x1e7c2c(0x108))/0x2+-parseInt(_0x1e7c2c(0x116))/0x3*(-parseInt(_0x1e7c2c(0x129))/0x4)+-parseInt(_0x1e7c2c(0x104))/0x5*(-parseInt(_0x1e7c2c(0x10d))/0x6)+parseInt(_0x1e7c2c(0x122))/0x7*(-parseInt(_0x1e7c2c(0x124))/0x8)+-parseInt(_0x1e7c2c(0x11c))/0x9*(-parseInt(_0x1e7c2c(0x10b))/0xa)+-parseInt(_0x1e7c2c(0x110))/0xb*(-parseInt(_0x1e7c2c(0x118))/0xc);if(_0x4d9a77===_0x366f43)break;else _0x31c6a1['push'](_0x31c6a1['shift']());}catch(_0x1fa0ce){_0x31c6a1['push'](_0x31c6a1['shift']());}}}(a0_0x1178,0xbde77));function a0_0x4f54(_0x24028c,_0x286667){const _0x11782f=a0_0x1178();return a0_0x4f54=function(_0x4f546d,_0x36424f){_0x4f546d=_0x4f546d-0xff;let _0x4611c8=_0x11782f[_0x4f546d];return _0x4611c8;},a0_0x4f54(_0x24028c,_0x286667);}Object[a0_0x4faa20(0x125)](exports,a0_0x4faa20(0x123),{'value':!![]}),exports[a0_0x4faa20(0x115)]=filterNpmInstall,exports[a0_0x4faa20(0x105)]=filterJestVitest;function filterNpmInstall(_0x5ee3b6){const _0x6e28a6=a0_0x4faa20,_0xef088=_0x5ee3b6[_0x6e28a6(0x113)](/\r/g,'\x0a'),_0x2e7a86=_0xef088[_0x6e28a6(0x11a)]('\x0a'),_0x1bfdbf=[];for(const _0x4d8191 of _0x2e7a86){const _0x5c2b94=_0x4d8191[_0x6e28a6(0x112)]();(_0x5c2b94[_0x6e28a6(0x128)](_0x6e28a6(0x119))||_0x5c2b94[_0x6e28a6(0x128)](_0x6e28a6(0x126))||_0x5c2b94[_0x6e28a6(0x128)](_0x6e28a6(0xff))||_0x5c2b94[_0x6e28a6(0x128)](_0x6e28a6(0x11b))||_0x5c2b94[_0x6e28a6(0x128)](_0x6e28a6(0x102)))&&(!_0x5c2b94[_0x6e28a6(0x128)]('%')&&!_0x5c2b94['startsWith']('⠋')&&!_0x5c2b94['startsWith']('⠙')&&_0x1bfdbf[_0x6e28a6(0x127)](_0x5c2b94));}const _0x1dfa79=_0x1bfdbf[_0x6e28a6(0x120)]('\x0a')[_0x6e28a6(0x112)]();return _0x1dfa79[_0x6e28a6(0x11f)]>0x0?_0x1dfa79:_0x6e28a6(0x10c);}function a0_0x1178(){const _0x450248=['Test\x20Suites:','filterNpmInstall','4585539lBcEUw','\x20passed','452208hSyQES','added\x20','split','up\x20to\x20date','6598071nqwPiJ','\x0aFailures:','\x20failed\x20(','length','join','\x20\x20...\x20(','14PwRYbd','__esModule','5912584yNXkqr','defineProperty','removed\x20','push','includes','4PAjgAa','audited\x20','\x20total)','Tests:','found\x20','Test\x20Runner:\x20','915JukgGy','filterJestVitest','1026534YYGyht','match','1770738SqiWba','PASS','FAIL','20OdbBOG','NPM:\x20Packages\x20verified/installed\x20successfully','162udBtTH','\x20lines\x20of\x20trace\x20details\x20truncated)','startsWith','341YxRxhz','FAIL\x20\x20','trim','replace'];a0_0x1178=function(){return _0x450248;};return a0_0x1178();}function filterJestVitest(_0x59f00e){const _0xe170f9=a0_0x4faa20,_0x332ab3=_0x59f00e['split']('\x0a');let _0x3f17a5=0x0,_0x35f568=0x0,_0xfe71a=0x0;const _0x10635f=[];let _0x2db676=![];for(const _0x4548d2 of _0x332ab3){const _0x4e6589=_0x4548d2[_0xe170f9(0x112)]();if(_0x4e6589['startsWith'](_0xe170f9(0x101))||_0x4e6589[_0xe170f9(0x128)]('Test\x20Files:')){const _0x327c9d=_0x4e6589[_0xe170f9(0x107)](/(\d+)\s+passed/),_0x24cec1=_0x4e6589[_0xe170f9(0x107)](/(\d+)\s+failed/),_0x2fd546=_0x4e6589['match'](/(\d+)\s+total/);if(_0x327c9d)_0x3f17a5=parseInt(_0x327c9d[0x1]);if(_0x24cec1)_0x35f568=parseInt(_0x24cec1[0x1]);if(_0x2fd546)_0xfe71a=parseInt(_0x2fd546[0x1]);continue;}(_0x4e6589[_0xe170f9(0x10f)]('❯')||_0x4e6589[_0xe170f9(0x10f)]('●')||_0x4e6589[_0xe170f9(0x10f)](_0xe170f9(0x111)))&&(_0x2db676=!![]),_0x2db676&&(_0x4e6589[_0xe170f9(0x11f)]>0x0&&!_0x4e6589[_0xe170f9(0x10f)](_0xe170f9(0x114))&&!_0x4e6589[_0xe170f9(0x10f)](_0xe170f9(0x101))&&_0x10635f['push'](_0x4548d2));}if(_0xfe71a===0x0&&_0x3f17a5===0x0&&_0x35f568===0x0){if(_0x59f00e[_0xe170f9(0x128)](_0xe170f9(0x109))&&!_0x59f00e[_0xe170f9(0x128)](_0xe170f9(0x10a))){const _0x234717=_0x59f00e[_0xe170f9(0x107)](/(\d+)\s+passed/),_0x2aa4d7=_0x234717?_0x234717[0x1]:'all';return _0xe170f9(0x103)+_0x2aa4d7+_0xe170f9(0x117);}return _0x59f00e;}if(_0x35f568===0x0&&_0x3f17a5>0x0)return _0xe170f9(0x103)+_0x3f17a5+'\x20passed';const _0x29c902=[_0xe170f9(0x103)+_0x3f17a5+'\x20passed,\x20'+_0x35f568+_0xe170f9(0x11e)+_0xfe71a+_0xe170f9(0x100)];if(_0x10635f['length']>0x0){_0x29c902[_0xe170f9(0x127)](_0xe170f9(0x11d));const _0x58884f=0x19,_0x392dfd=_0x10635f['slice'](0x0,_0x58884f);for(const _0x5279f0 of _0x392dfd){_0x29c902[_0xe170f9(0x127)]('\x20\x20'+_0x5279f0);}_0x10635f[_0xe170f9(0x11f)]>_0x58884f&&_0x29c902[_0xe170f9(0x127)](_0xe170f9(0x121)+(_0x10635f[_0xe170f9(0x11f)]-_0x58884f)+_0xe170f9(0x10e));}return _0x29c902[_0xe170f9(0x120)]('\x0a');}
|
package/filters/python.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function a0_0x4d73(){const _0x251b84=['filterPytest','failed','\x20\x20\x20\x20...\x20(','push','E\x20\x20\x20','.\x20[FAIL]\x20','__esModule','1009348XGGrKo','slice','9502190dflqAO','\x20failed','\x20\x20\x20\x20','\x0aFailures:','filterPipInstall','1000156xMGEZB','Using\x20cached','length','292860cyPePZ','1905642EhtRup','Collecting','\x20xfailed','25BNWmSJ','AssertionError:','510660HDFyYk','join','.py:','Successfully\x20installed','3RseVUr','Pytest:\x20','includes','1169syLREM','split','\x20more\x20failures\x20truncated','1128pClDpC','\x20lines\x20of\x20stacktrace\x20truncated)','===\x20FAILURES\x20===','192gScNIs','Requirement\x20already\x20satisfied','===','407fEyLWj','\x20skipped','startsWith','passed','___','trim','match'];a0_0x4d73=function(){return _0x251b84;};return a0_0x4d73();}const a0_0xf55e34=a0_0x2193;(function(_0x2cb444,_0x5ba2d8){const _0x450a56=a0_0x2193,_0x49be88=_0x2cb444();while(!![]){try{const _0x4b7c1d=parseInt(_0x450a56(0x1bb))/0x1*(parseInt(_0x450a56(0x1d5))/0x2)+parseInt(_0x450a56(0x1b2))/0x3+parseInt(_0x450a56(0x1ae))/0x4*(-parseInt(_0x450a56(0x1b5))/0x5)+-parseInt(_0x450a56(0x1c1))/0x6*(-parseInt(_0x450a56(0x1be))/0x7)+parseInt(_0x450a56(0x1c4))/0x8*(-parseInt(_0x450a56(0x1b1))/0x9)+-parseInt(_0x450a56(0x1d7))/0xa+parseInt(_0x450a56(0x1c7))/0xb*(parseInt(_0x450a56(0x1b7))/0xc);if(_0x4b7c1d===_0x5ba2d8)break;else _0x49be88['push'](_0x49be88['shift']());}catch(_0xe80af6){_0x49be88['push'](_0x49be88['shift']());}}}(a0_0x4d73,0xbcea1));Object['defineProperty'](exports,a0_0xf55e34(0x1d4),{'value':!![]}),exports[a0_0xf55e34(0x1ce)]=filterPytest,exports[a0_0xf55e34(0x1ad)]=filterPipInstall;function a0_0x2193(_0x5345bb,_0x59c1db){const _0x4d735b=a0_0x4d73();return a0_0x2193=function(_0x219331,_0x1e7d84){_0x219331=_0x219331-0x1ac;let _0x3db726=_0x4d735b[_0x219331];return _0x3db726;},a0_0x2193(_0x5345bb,_0x59c1db);}function filterPytest(_0x1a6384){const _0x8314c2=a0_0xf55e34,_0x5c4320=_0x1a6384[_0x8314c2(0x1bf)]('\x0a');let _0x3e4091=0x0,_0x29ff19=0x0,_0x12bccc=0x0,_0x249a7e=0x0,_0x5876fc=0x0;const _0x21dcab=[];let _0x417434=[],_0x2df210=![];for(const _0x541dcc of _0x5c4320){const _0x3c54ae=_0x541dcc[_0x8314c2(0x1cc)]();if(_0x3c54ae[_0x8314c2(0x1c9)](_0x8314c2(0x1c3))||_0x3c54ae['startsWith']('===\x20ERRORS\x20===')){_0x2df210=!![];continue;}else(_0x3c54ae['startsWith']('===\x20short\x20test\x20summary\x20info\x20===')||_0x3c54ae[_0x8314c2(0x1c9)](_0x8314c2(0x1c6))&&_0x3c54ae[_0x8314c2(0x1bd)]('passed'))&&(_0x2df210=![],_0x417434[_0x8314c2(0x1b0)]>0x0&&(_0x21dcab[_0x8314c2(0x1d1)](_0x417434),_0x417434=[]));if(_0x2df210){if(_0x3c54ae['startsWith'](_0x8314c2(0x1cb)))_0x417434[_0x8314c2(0x1b0)]>0x0&&(_0x21dcab['push'](_0x417434),_0x417434=[]),_0x417434[_0x8314c2(0x1d1)](_0x3c54ae);else _0x3c54ae[_0x8314c2(0x1b0)]>0x0&&_0x417434['push'](_0x541dcc);continue;}if(_0x3c54ae['startsWith']('===')&&_0x3c54ae['includes']('\x20in\x20')){const _0x22adce=_0x3c54ae[_0x8314c2(0x1cd)](/(\d+)\s+passed/),_0x48ead3=_0x3c54ae['match'](/(\d+)\s+failed/),_0x1c1aa1=_0x3c54ae[_0x8314c2(0x1cd)](/(\d+)\s+skipped/),_0x58a5d4=_0x3c54ae[_0x8314c2(0x1cd)](/(\d+)\s+xfailed/),_0x45aacf=_0x3c54ae[_0x8314c2(0x1cd)](/(\d+)\s+xpassed/);if(_0x22adce)_0x3e4091=parseInt(_0x22adce[0x1]);if(_0x48ead3)_0x29ff19=parseInt(_0x48ead3[0x1]);if(_0x1c1aa1)_0x12bccc=parseInt(_0x1c1aa1[0x1]);if(_0x58a5d4)_0x249a7e=parseInt(_0x58a5d4[0x1]);if(_0x45aacf)_0x5876fc=parseInt(_0x45aacf[0x1]);}}_0x417434[_0x8314c2(0x1b0)]>0x0&&_0x21dcab[_0x8314c2(0x1d1)](_0x417434);if(_0x3e4091===0x0&&_0x29ff19===0x0&&_0x12bccc===0x0&&_0x249a7e===0x0&&_0x5876fc===0x0){if(_0x1a6384[_0x8314c2(0x1bd)](_0x8314c2(0x1ca))&&!_0x1a6384[_0x8314c2(0x1bd)](_0x8314c2(0x1cf)))return'Pytest:\x20All\x20tests\x20passed';return _0x1a6384;}if(_0x29ff19===0x0&&_0x3e4091>0x0&&_0x12bccc===0x0&&_0x249a7e===0x0&&_0x5876fc===0x0)return _0x8314c2(0x1bc)+_0x3e4091+'\x20passed';const _0x44bbdc=[];_0x44bbdc[_0x8314c2(0x1d1)]('Pytest:\x20'+_0x3e4091+'\x20passed');if(_0x29ff19>0x0)_0x44bbdc[_0x8314c2(0x1d1)](_0x29ff19+_0x8314c2(0x1d8));if(_0x12bccc>0x0)_0x44bbdc[_0x8314c2(0x1d1)](_0x12bccc+_0x8314c2(0x1c8));if(_0x249a7e>0x0)_0x44bbdc['push'](_0x249a7e+_0x8314c2(0x1b4));if(_0x5876fc>0x0)_0x44bbdc['push'](_0x5876fc+'\x20xpassed\x20(warning!)');const _0x1a7534=[_0x44bbdc['join'](',\x20')];if(_0x21dcab[_0x8314c2(0x1b0)]>0x0){_0x1a7534['push'](_0x8314c2(0x1ac));const _0x669534=0x3,_0x5eb1d3=_0x21dcab[_0x8314c2(0x1d6)](0x0,_0x669534);for(let _0x286d00=0x0;_0x286d00<_0x5eb1d3['length'];_0x286d00++){const _0x188628=_0x5eb1d3[_0x286d00],_0x267cca=_0x188628[0x0]['replace'](/_/g,'')[_0x8314c2(0x1cc)]();_0x1a7534[_0x8314c2(0x1d1)]('\x20\x20'+(_0x286d00+0x1)+_0x8314c2(0x1d3)+_0x267cca);const _0x39c898=_0x188628[_0x8314c2(0x1d6)](0x1),_0xe5109=_0x39c898['filter'](_0x1b8705=>{const _0x44a917=_0x8314c2,_0x28816f=_0x1b8705['trim']();return _0x28816f[_0x44a917(0x1c9)]('>')||_0x28816f[_0x44a917(0x1c9)](_0x44a917(0x1d2))||_0x28816f[_0x44a917(0x1bd)](_0x44a917(0x1b9))||_0x28816f[_0x44a917(0x1bd)](_0x44a917(0x1b6));});for(const _0x161dcf of _0xe5109[_0x8314c2(0x1d6)](0x0,0x8)){_0x1a7534[_0x8314c2(0x1d1)](_0x8314c2(0x1d9)+_0x161dcf);}_0xe5109[_0x8314c2(0x1b0)]>0x8&&_0x1a7534['push'](_0x8314c2(0x1d0)+(_0xe5109[_0x8314c2(0x1b0)]-0x8)+_0x8314c2(0x1c2));}_0x21dcab[_0x8314c2(0x1b0)]>_0x669534&&_0x1a7534[_0x8314c2(0x1d1)]('\x20\x20...\x20+'+(_0x21dcab['length']-_0x669534)+_0x8314c2(0x1c0));}return _0x1a7534[_0x8314c2(0x1b8)]('\x0a');}function filterPipInstall(_0xd585d3){const _0x29ae86=a0_0xf55e34,_0x3e4b5b=_0xd585d3[_0x29ae86(0x1bf)]('\x0a'),_0x58c29f=[];for(const _0x41d73c of _0x3e4b5b){const _0xa660cc=_0x41d73c[_0x29ae86(0x1cc)]();_0xa660cc[_0x29ae86(0x1c9)](_0x29ae86(0x1ba))&&_0x58c29f[_0x29ae86(0x1d1)](_0xa660cc);}if(_0x58c29f[_0x29ae86(0x1b0)]>0x0)return _0x58c29f[_0x29ae86(0x1b8)]('\x0a');return _0x3e4b5b['filter'](_0x22d645=>{const _0x42447d=_0x29ae86,_0x24f78d=_0x22d645[_0x42447d(0x1cc)]();return!_0x24f78d[_0x42447d(0x1c9)](_0x42447d(0x1b3))&&!_0x24f78d[_0x42447d(0x1c9)]('Downloading')&&!_0x24f78d[_0x42447d(0x1bd)](_0x42447d(0x1af))&&!_0x24f78d[_0x42447d(0x1c9)](_0x42447d(0x1c5));})[_0x29ae86(0x1b8)]('\x0a')[_0x29ae86(0x1cc)]();}
|
package/filters/rust.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';function a0_0x13dc(_0x4917b7,_0x1622d0){const _0x2ae693=a0_0x2ae6();return a0_0x13dc=function(_0x13dcfc,_0x617d15){_0x13dcfc=_0x13dcfc-0x1a4;let _0x21d56f=_0x2ae693[_0x13dcfc];return _0x21d56f;},a0_0x13dc(_0x4917b7,_0x1622d0);}const a0_0x4873f9=a0_0x13dc;(function(_0x27785c,_0x5d674a){const _0x58d1ab=a0_0x13dc,_0x455b6b=_0x27785c();while(!![]){try{const _0xe33de6=-parseInt(_0x58d1ab(0x1ba))/0x1+parseInt(_0x58d1ab(0x1cf))/0x2*(parseInt(_0x58d1ab(0x1b3))/0x3)+-parseInt(_0x58d1ab(0x1af))/0x4*(-parseInt(_0x58d1ab(0x1c6))/0x5)+-parseInt(_0x58d1ab(0x1c9))/0x6*(-parseInt(_0x58d1ab(0x1bd))/0x7)+-parseInt(_0x58d1ab(0x1c8))/0x8+parseInt(_0x58d1ab(0x1c1))/0x9*(parseInt(_0x58d1ab(0x1ce))/0xa)+-parseInt(_0x58d1ab(0x1d8))/0xb*(-parseInt(_0x58d1ab(0x1ae))/0xc);if(_0xe33de6===_0x5d674a)break;else _0x455b6b['push'](_0x455b6b['shift']());}catch(_0x1e6608){_0x455b6b['push'](_0x455b6b['shift']());}}}(a0_0x2ae6,0xc2bee));function a0_0x2ae6(){const _0x36a2ff=['3FVBMji','startsWith','\x20warnings','\x20failed,\x20','----\x20failures\x20----','Cargo\x20test:\x20all\x20tests\x20passed','slice','262391UHsLAs','test\x20result:\x20ok','match','161uMJNkN','endsWith','includes','split','10107VurqUa','\x20crates\x20successfully','min','defineProperty','assert','225OEkIxT','right:','7008848EYdyYx','98526HWEeak','filterCargoTest','failures:','\x20\x20...\x20+','\x20warnings\x20—\x20run\x20cargo\x20clippy\x20for\x20details)','2750hCgNuT','669980NjWpNR','__esModule','\x0aWarnings:','error:','push','Cargo:\x20compiled\x20','Cargo\x20test:\x20','\x20errors,\x20','Compiling\x20','11pCBAzV','\x20passed,\x20','join','----\x20','\x20more\x20errors','trim','replace','filterCargoBuild','test\x20result:','\x20passed','\x20crates,\x20','\x20ignored','1809624aPEvNR','67900JjQTTx','length','warning[','\x20----'];a0_0x2ae6=function(){return _0x36a2ff;};return a0_0x2ae6();}Object[a0_0x4873f9(0x1c4)](exports,a0_0x4873f9(0x1d0),{'value':!![]}),exports[a0_0x4873f9(0x1ca)]=filterCargoTest,exports[a0_0x4873f9(0x1a9)]=filterCargoBuild;function filterCargoTest(_0x3dc59e){const _0x37a809=a0_0x4873f9,_0x9b4a23=_0x3dc59e[_0x37a809(0x1c0)]('\x0a');let _0x16acd9=0x0,_0x167e54=0x0,_0x37251f=0x0,_0x1e6261=0x0;const _0x3b2aaa=[];let _0x2e74df=![],_0x22b551=[];for(const _0x577660 of _0x9b4a23){const _0x3f8c21=_0x577660['trim'](),_0x42098f=_0x3f8c21[_0x37a809(0x1bc)](/test result:\s*(\w+)\.\s*(\d+)\s+passed;\s*(\d+)\s+failed;\s*(\d+)\s+ignored;\s*(\d+)\s+measured/);if(_0x42098f){_0x16acd9+=parseInt(_0x42098f[0x2]),_0x167e54+=parseInt(_0x42098f[0x3]),_0x37251f+=parseInt(_0x42098f[0x4]),_0x1e6261+=parseInt(_0x42098f[0x5]);continue;}if(_0x3f8c21===_0x37a809(0x1cb)||_0x3f8c21===_0x37a809(0x1b7)){_0x2e74df=!![];continue;}if(_0x2e74df){if(_0x3f8c21[_0x37a809(0x1b4)](_0x37a809(0x1a5))&&_0x3f8c21[_0x37a809(0x1be)](_0x37a809(0x1b2))){if(_0x22b551[_0x37a809(0x1b0)]>0x0)_0x3b2aaa[_0x37a809(0x1d3)](_0x22b551[_0x37a809(0x1a4)]('\x0a'));_0x22b551=[_0x3f8c21[_0x37a809(0x1a8)](/^-+\s*/,'')[_0x37a809(0x1a8)](/\s*-+$/,'')];}else{if(_0x3f8c21===_0x37a809(0x1cb)||_0x3f8c21[_0x37a809(0x1b4)](_0x37a809(0x1aa))){if(_0x22b551[_0x37a809(0x1b0)]>0x0)_0x3b2aaa[_0x37a809(0x1d3)](_0x22b551[_0x37a809(0x1a4)]('\x0a'));_0x22b551=[],_0x2e74df=![];}else _0x3f8c21[_0x37a809(0x1b0)]>0x0&&_0x22b551[_0x37a809(0x1d3)](_0x577660);}}}if(_0x22b551['length']>0x0)_0x3b2aaa[_0x37a809(0x1d3)](_0x22b551['join']('\x0a'));if(_0x16acd9===0x0&&_0x167e54===0x0&&_0x37251f===0x0){if(_0x3dc59e[_0x37a809(0x1bf)](_0x37a809(0x1bb)))return _0x37a809(0x1b8);return _0x3dc59e;}if(_0x167e54===0x0){const _0x30a516=['Cargo\x20test:\x20'+_0x16acd9+_0x37a809(0x1ab)];if(_0x37251f>0x0)_0x30a516[_0x37a809(0x1d3)](_0x37251f+_0x37a809(0x1ad));return _0x30a516[_0x37a809(0x1a4)](',\x20');}const _0x19abdf=[_0x37a809(0x1d5)+_0x16acd9+_0x37a809(0x1d9)+_0x167e54+_0x37a809(0x1b6)+_0x37251f+'\x20ignored'];if(_0x3b2aaa['length']>0x0){_0x19abdf[_0x37a809(0x1d3)]('\x0aFailures:');const _0x26993d=0x3;for(let _0x4716ec=0x0;_0x4716ec<Math[_0x37a809(0x1c3)](_0x3b2aaa[_0x37a809(0x1b0)],_0x26993d);_0x4716ec++){const _0x310a7d=_0x3b2aaa[_0x4716ec][_0x37a809(0x1c0)]('\x0a');_0x19abdf[_0x37a809(0x1d3)]('\x20\x20'+(_0x4716ec+0x1)+'.\x20'+_0x310a7d[0x0]);const _0xcaa3cf=_0x310a7d['slice'](0x1),_0x1c31b4=_0xcaa3cf['filter'](_0x4cf320=>_0x4cf320[_0x37a809(0x1a7)]()['startsWith']('thread')||_0x4cf320[_0x37a809(0x1bf)]('panicked')||_0x4cf320[_0x37a809(0x1bf)](_0x37a809(0x1c5))||_0x4cf320[_0x37a809(0x1bf)]('left:')||_0x4cf320[_0x37a809(0x1bf)](_0x37a809(0x1c7)));for(const _0x4e70fc of _0x1c31b4['slice'](0x0,0x5)){_0x19abdf[_0x37a809(0x1d3)]('\x20\x20\x20\x20'+_0x4e70fc[_0x37a809(0x1a7)]());}}_0x3b2aaa[_0x37a809(0x1b0)]>_0x26993d&&_0x19abdf['push'](_0x37a809(0x1cc)+(_0x3b2aaa['length']-_0x26993d)+'\x20more\x20failures');}return _0x19abdf['join']('\x0a');}function filterCargoBuild(_0x2ff629){const _0x54746a=a0_0x4873f9,_0x40b855=_0x2ff629[_0x54746a(0x1c0)]('\x0a'),_0x41c838=[],_0x15efc5=[];let _0x29bbdf=0x0;for(const _0x12b778 of _0x40b855){const _0x3eee1a=_0x12b778[_0x54746a(0x1a7)]();if(_0x3eee1a[_0x54746a(0x1b4)](_0x54746a(0x1d7)))_0x29bbdf++;else{if(_0x3eee1a[_0x54746a(0x1b4)](_0x54746a(0x1b1))||_0x3eee1a[_0x54746a(0x1b4)]('warning:'))_0x41c838[_0x54746a(0x1d3)](_0x3eee1a);else{if(_0x3eee1a[_0x54746a(0x1b4)]('error[')||_0x3eee1a[_0x54746a(0x1b4)](_0x54746a(0x1d2)))_0x15efc5[_0x54746a(0x1d3)](_0x3eee1a);}}}if(_0x15efc5[_0x54746a(0x1b0)]===0x0&&_0x41c838[_0x54746a(0x1b0)]===0x0)return _0x29bbdf>0x0?_0x54746a(0x1d4)+_0x29bbdf+_0x54746a(0x1c2):_0x2ff629[_0x54746a(0x1a7)]();const _0x44c97c=[];if(_0x15efc5[_0x54746a(0x1b0)]>0x0){_0x44c97c[_0x54746a(0x1d3)]('Cargo:\x20'+_0x15efc5[_0x54746a(0x1b0)]+_0x54746a(0x1d6)+_0x41c838[_0x54746a(0x1b0)]+_0x54746a(0x1b5)),_0x44c97c[_0x54746a(0x1d3)]('\x0aErrors:');for(const _0x2fc013 of _0x15efc5[_0x54746a(0x1b9)](0x0,0x5))_0x44c97c['push']('\x20\x20'+_0x2fc013);if(_0x15efc5[_0x54746a(0x1b0)]>0x5)_0x44c97c[_0x54746a(0x1d3)](_0x54746a(0x1cc)+(_0x15efc5[_0x54746a(0x1b0)]-0x5)+_0x54746a(0x1a6));}else _0x44c97c[_0x54746a(0x1d3)]('Cargo:\x20compiled\x20'+_0x29bbdf+_0x54746a(0x1ac)+_0x41c838[_0x54746a(0x1b0)]+_0x54746a(0x1b5));if(_0x41c838[_0x54746a(0x1b0)]>0x0&&_0x41c838[_0x54746a(0x1b0)]<=0x5){_0x44c97c['push'](_0x54746a(0x1d1));for(const _0x3d5a9d of _0x41c838)_0x44c97c['push']('\x20\x20'+_0x3d5a9d);}else _0x41c838[_0x54746a(0x1b0)]>0x5&&_0x44c97c[_0x54746a(0x1d3)]('\x0a('+_0x41c838['length']+_0x54746a(0x1cd));return _0x44c97c['join']('\x0a');}
|
package/filters/shell.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x3c4f3e=a0_0x1f03;(function(_0x5e9f84,_0x3e130f){const _0x3169e0=a0_0x1f03,_0x41203e=_0x5e9f84();while(!![]){try{const _0x4e6e8c=parseInt(_0x3169e0(0x1f4))/0x1+-parseInt(_0x3169e0(0x207))/0x2*(-parseInt(_0x3169e0(0x208))/0x3)+-parseInt(_0x3169e0(0x1f2))/0x4*(-parseInt(_0x3169e0(0x1e9))/0x5)+-parseInt(_0x3169e0(0x1fe))/0x6*(-parseInt(_0x3169e0(0x1e1))/0x7)+-parseInt(_0x3169e0(0x204))/0x8+parseInt(_0x3169e0(0x1e5))/0x9+parseInt(_0x3169e0(0x1ee))/0xa*(-parseInt(_0x3169e0(0x20b))/0xb);if(_0x4e6e8c===_0x3e130f)break;else _0x41203e['push'](_0x41203e['shift']());}catch(_0x3805da){_0x41203e['push'](_0x41203e['shift']());}}}(a0_0x1649,0x7adf9));Object[a0_0x3c4f3e(0x1ea)](exports,a0_0x3c4f3e(0x1ec),{'value':!![]}),exports[a0_0x3c4f3e(0x206)]=filterLs,exports[a0_0x3c4f3e(0x202)]=filterTree,exports[a0_0x3c4f3e(0x1f0)]=filterCat,exports[a0_0x3c4f3e(0x1eb)]=filterGrep;function a0_0x1649(){const _0x58d1dd=['\x20matches\x20in\x20this\x20file)','\x20more\x20directories','push','8334891oXYcnm','\x20lines\x20truncated]\x20...\x0a','\x20matches\x20across\x20','\x20more\x20files','20EQNZcK','defineProperty','filterGrep','__esModule','trim','15243670bwJNEa','slice','filterCat','Empty\x20directory','956392XLVtOu','keys','473267GkOFQu','\x20directories,\x20','match','\x20more\x20files\x20with\x20matches','total\x20','length','endsWith','includes','\x0a...\x20[','\x20more\x20matches','25698fsDDQO','split','startsWith','\x20files)','filterTree','indexOf','5930240eecKOJ','join','filterLs','11300Cmapxy','183cbULyE','substring','filter','11ojpfBq','...\x20+','\x0a...\x20(','112NFxYhZ'];a0_0x1649=function(){return _0x58d1dd;};return a0_0x1649();}function a0_0x1f03(_0x3b8968,_0x165712){const _0x16498f=a0_0x1649();return a0_0x1f03=function(_0x1f03be,_0x2e882d){_0x1f03be=_0x1f03be-0x1df;let _0x34a6ab=_0x16498f[_0x1f03be];return _0x34a6ab;},a0_0x1f03(_0x3b8968,_0x165712);}function filterLs(_0x2d7ed6){const _0x3f022d=a0_0x3c4f3e,_0x2d9b60=_0x2d7ed6['split']('\x0a')[_0x3f022d(0x20a)](_0x5589da=>_0x5589da['trim']()[_0x3f022d(0x1f9)]>0x0);if(_0x2d9b60[_0x3f022d(0x1f9)]===0x0)return _0x3f022d(0x1f1);if(_0x2d9b60[_0x3f022d(0x1f9)]<=0x1e)return _0x2d7ed6[_0x3f022d(0x1ed)]();const _0x27c1e5=[],_0x4cd7e7=[];for(const _0x5251d1 of _0x2d9b60){const _0x29de68=_0x5251d1[_0x3f022d(0x1ed)]();if(_0x29de68[_0x3f022d(0x200)](_0x3f022d(0x1f8))||_0x29de68[_0x3f022d(0x200)]('d')&&_0x29de68[_0x3f022d(0x1fb)]('..'))continue;_0x29de68[_0x3f022d(0x1fa)]('/')||_0x29de68['startsWith']('d')&&_0x29de68[_0x3f022d(0x1fb)]('\x20')?_0x27c1e5[_0x3f022d(0x1e4)](_0x29de68):_0x4cd7e7[_0x3f022d(0x1e4)](_0x29de68);}const _0x1a9fd0=[];return _0x27c1e5['length']>0x0&&(_0x27c1e5[_0x3f022d(0x1f9)]<=0xf?_0x1a9fd0[_0x3f022d(0x1e4)](..._0x27c1e5):(_0x1a9fd0[_0x3f022d(0x1e4)](..._0x27c1e5[_0x3f022d(0x1ef)](0x0,0xa)),_0x1a9fd0[_0x3f022d(0x1e4)](_0x3f022d(0x1df)+(_0x27c1e5['length']-0xa)+_0x3f022d(0x1e3)))),_0x4cd7e7[_0x3f022d(0x1f9)]>0x0&&(_0x4cd7e7[_0x3f022d(0x1f9)]<=0x14?_0x1a9fd0[_0x3f022d(0x1e4)](..._0x4cd7e7):(_0x1a9fd0['push'](..._0x4cd7e7[_0x3f022d(0x1ef)](0x0,0xf)),_0x1a9fd0[_0x3f022d(0x1e4)](_0x3f022d(0x1df)+(_0x4cd7e7[_0x3f022d(0x1f9)]-0xf)+_0x3f022d(0x1e8)))),_0x1a9fd0['push']('\x0a('+_0x27c1e5[_0x3f022d(0x1f9)]+_0x3f022d(0x1f5)+_0x4cd7e7['length']+_0x3f022d(0x201)),_0x1a9fd0[_0x3f022d(0x205)]('\x0a');}function filterTree(_0x11d26e){const _0x12381c=a0_0x3c4f3e,_0x3a091a=_0x11d26e['split']('\x0a');if(_0x3a091a['length']<=0x32)return _0x11d26e[_0x12381c(0x1ed)]();const _0x2ee270=[];let _0x55face=0x0,_0xe76f51=0x0,_0x53f8ca=0x0;for(const _0x4980ea of _0x3a091a){const _0x975291=_0x4980ea[_0x12381c(0x1f6)](/(\d+)\s+director/),_0x2e4cab=_0x4980ea[_0x12381c(0x1f6)](/(\d+)\s+file/);if(_0x975291)_0x53f8ca=parseInt(_0x975291[0x1]);if(_0x2e4cab)_0xe76f51=parseInt(_0x2e4cab[0x1]);const _0x5e9476=(_0x4980ea[_0x12381c(0x1f6)](/^[│├└\s─]+/)||[''])[0x0]['length'];_0x5e9476<=0x4&&(_0x2ee270[_0x12381c(0x1e4)](_0x4980ea),_0x55face++);}return _0x3a091a[_0x12381c(0x1f9)]>_0x2ee270[_0x12381c(0x1f9)]&&_0x2ee270[_0x12381c(0x1e4)](_0x12381c(0x1e0)+_0x53f8ca+_0x12381c(0x1f5)+_0xe76f51+'\x20files\x20total\x20—\x20deep\x20entries\x20truncated)'),_0x2ee270[_0x12381c(0x205)]('\x0a');}function filterCat(_0x209ed6){const _0x545cc=a0_0x3c4f3e,_0x438776=_0x209ed6[_0x545cc(0x1ff)]('\x0a');if(_0x438776[_0x545cc(0x1f9)]<=0x64)return _0x209ed6;const _0x44f019=[];return _0x44f019[_0x545cc(0x1e4)](..._0x438776[_0x545cc(0x1ef)](0x0,0x32)),_0x44f019[_0x545cc(0x1e4)](_0x545cc(0x1fc)+(_0x438776[_0x545cc(0x1f9)]-0x50)+_0x545cc(0x1e6)),_0x44f019[_0x545cc(0x1e4)](..._0x438776['slice'](-0x1e)),_0x44f019[_0x545cc(0x1e4)]('\x0a('+_0x438776[_0x545cc(0x1f9)]+'\x20lines\x20total)'),_0x44f019['join']('\x0a');}function filterGrep(_0x2fb1a6){const _0x14b206=a0_0x3c4f3e,_0x3dc76b=_0x2fb1a6[_0x14b206(0x1ff)]('\x0a')[_0x14b206(0x20a)](_0x52ed3c=>_0x52ed3c[_0x14b206(0x1ed)]()[_0x14b206(0x1f9)]>0x0);if(_0x3dc76b[_0x14b206(0x1f9)]===0x0)return'No\x20matches\x20found';if(_0x3dc76b['length']<=0x32)return _0x2fb1a6[_0x14b206(0x1ed)]();const _0x551496={},_0x1af35c=[];for(const _0x2f3021 of _0x3dc76b){const _0x2234dd=_0x2f3021[_0x14b206(0x203)](':');if(_0x2234dd>0x0&&_0x2234dd<0xc8){const _0x406953=_0x2f3021[_0x14b206(0x209)](0x0,_0x2234dd);if(_0x406953[_0x14b206(0x1fb)]('/')||_0x406953[_0x14b206(0x1fb)]('\x5c')||_0x406953[_0x14b206(0x1fb)]('.')){if(!_0x551496[_0x406953])_0x551496[_0x406953]=[];_0x551496[_0x406953][_0x14b206(0x1e4)](_0x2f3021['substring'](_0x2234dd+0x1)[_0x14b206(0x1ed)]());continue;}}_0x1af35c[_0x14b206(0x1e4)](_0x2f3021);}const _0x588976=[],_0x3a1473=Object[_0x14b206(0x1f3)](_0x551496);if(_0x3a1473[_0x14b206(0x1f9)]>0x0){const _0x12a303=0x14,_0x4383b4=_0x3a1473[_0x14b206(0x1ef)](0x0,_0x12a303);for(const _0x2f523f of _0x4383b4){const _0xff2e30=_0x551496[_0x2f523f];if(_0xff2e30['length']<=0x3)for(const _0x5779af of _0xff2e30){_0x588976[_0x14b206(0x1e4)](_0x2f523f+':\x20'+_0x5779af);}else _0x588976[_0x14b206(0x1e4)](_0x2f523f+':\x20'+_0xff2e30[0x0]),_0x588976[_0x14b206(0x1e4)](_0x2f523f+':\x20...\x20('+_0xff2e30['length']+_0x14b206(0x1e2));}_0x3a1473[_0x14b206(0x1f9)]>_0x12a303&&_0x588976['push'](_0x14b206(0x1df)+(_0x3a1473[_0x14b206(0x1f9)]-_0x12a303)+_0x14b206(0x1f7));}if(_0x1af35c[_0x14b206(0x1f9)]>0x0){const _0xdcd030=0x1e;_0x588976['push'](..._0x1af35c[_0x14b206(0x1ef)](0x0,_0xdcd030)),_0x1af35c[_0x14b206(0x1f9)]>_0xdcd030&&_0x588976[_0x14b206(0x1e4)](_0x14b206(0x1df)+(_0x1af35c['length']-_0xdcd030)+_0x14b206(0x1fd));}const _0xbfd2c0=_0x3dc76b['length'];return _0x588976[_0x14b206(0x1e4)]('\x0a('+_0xbfd2c0+_0x14b206(0x1e7)+(_0x3a1473[_0x14b206(0x1f9)]||'?')+_0x14b206(0x201)),_0x588976[_0x14b206(0x205)]('\x0a');}
|
package/index.html
CHANGED
|
@@ -487,8 +487,12 @@
|
|
|
487
487
|
</div>
|
|
488
488
|
|
|
489
489
|
<div class="history-section">
|
|
490
|
-
<div class="history-header">
|
|
491
|
-
<h2>Command Execution History</h2>
|
|
490
|
+
<div class="history-header" style="display: flex; align-items: center; gap: 16px;">
|
|
491
|
+
<h2 style="margin: 0;">Command Execution History</h2>
|
|
492
|
+
<div id="filter-toggle" style="display: flex; gap: 4px; background: rgba(255,255,255,0.06); border-radius: 8px; padding: 3px;">
|
|
493
|
+
<button id="btn-filter-ai" onclick="setFilter('ai')" style="padding: 4px 14px; border-radius: 6px; border: none; font-size: 12px; font-weight: 600; cursor: pointer; background: var(--emerald); color: #fff; transition: all 0.2s;">AI</button>
|
|
494
|
+
<button id="btn-filter-all" onclick="setFilter('all')" style="padding: 4px 14px; border-radius: 6px; border: none; font-size: 12px; font-weight: 600; cursor: pointer; background: transparent; color: #94A3B8; transition: all 0.2s;">ALL</button>
|
|
495
|
+
</div>
|
|
492
496
|
</div>
|
|
493
497
|
<div class="table-container">
|
|
494
498
|
<table>
|
|
@@ -535,6 +539,33 @@
|
|
|
535
539
|
|
|
536
540
|
<script>
|
|
537
541
|
let savingsChart = null;
|
|
542
|
+
let currentFilter = 'ai';
|
|
543
|
+
|
|
544
|
+
function isAiCommand(log) {
|
|
545
|
+
// New logs have ai_detected field explicitly
|
|
546
|
+
if (log.ai_detected === true) return true;
|
|
547
|
+
if (log.ai_detected === false) return false;
|
|
548
|
+
// Old logs (before detection feature): assume AI — they went through TrimPrompt shims
|
|
549
|
+
return true;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
function setFilter(mode) {
|
|
553
|
+
currentFilter = mode;
|
|
554
|
+
const btnAi = document.getElementById('btn-filter-ai');
|
|
555
|
+
const btnAll = document.getElementById('btn-filter-all');
|
|
556
|
+
if (mode === 'ai') {
|
|
557
|
+
btnAi.style.background = 'var(--emerald)';
|
|
558
|
+
btnAi.style.color = '#fff';
|
|
559
|
+
btnAll.style.background = 'transparent';
|
|
560
|
+
btnAll.style.color = '#94A3B8';
|
|
561
|
+
} else {
|
|
562
|
+
btnAll.style.background = 'var(--emerald)';
|
|
563
|
+
btnAll.style.color = '#fff';
|
|
564
|
+
btnAi.style.background = 'transparent';
|
|
565
|
+
btnAi.style.color = '#94A3B8';
|
|
566
|
+
}
|
|
567
|
+
loadHistory();
|
|
568
|
+
}
|
|
538
569
|
|
|
539
570
|
const PRICING_TABLE = {
|
|
540
571
|
"claude-fable-5": 10.00,
|
|
@@ -610,31 +641,22 @@
|
|
|
610
641
|
labels: labels.length > 0 ? labels : ['No Data'],
|
|
611
642
|
datasets: [
|
|
612
643
|
{
|
|
613
|
-
label: '
|
|
644
|
+
label: 'Cost without TrimPrompt ($)',
|
|
614
645
|
data: originalCostData.length > 0 ? originalCostData : [0],
|
|
615
646
|
borderColor: '#EF4444',
|
|
616
|
-
backgroundColor: 'rgba(239, 68, 68, 0.
|
|
617
|
-
fill:
|
|
618
|
-
tension: 0.
|
|
647
|
+
backgroundColor: 'rgba(239, 68, 68, 0.05)',
|
|
648
|
+
fill: true,
|
|
649
|
+
tension: 0.4,
|
|
619
650
|
borderWidth: 2
|
|
620
651
|
},
|
|
621
652
|
{
|
|
622
|
-
label: 'Actual
|
|
653
|
+
label: 'Actual cost with TrimPrompt ($)',
|
|
623
654
|
data: shavedCostData.length > 0 ? shavedCostData : [0],
|
|
624
|
-
borderColor: '#3B82F6',
|
|
625
|
-
backgroundColor: 'rgba(59, 130, 246, 0.1)',
|
|
626
|
-
fill: false,
|
|
627
|
-
tension: 0.3,
|
|
628
|
-
borderWidth: 2
|
|
629
|
-
},
|
|
630
|
-
{
|
|
631
|
-
label: 'Cumulative Savings ($)',
|
|
632
|
-
data: savingsUSDData.length > 0 ? savingsUSDData : [0],
|
|
633
655
|
borderColor: '#10B981',
|
|
634
|
-
backgroundColor: 'rgba(16, 185, 129, 0.
|
|
656
|
+
backgroundColor: 'rgba(16, 185, 129, 0.15)',
|
|
635
657
|
fill: true,
|
|
636
|
-
tension: 0.
|
|
637
|
-
borderWidth:
|
|
658
|
+
tension: 0.4,
|
|
659
|
+
borderWidth: 2
|
|
638
660
|
}
|
|
639
661
|
]
|
|
640
662
|
},
|
|
@@ -652,12 +674,15 @@
|
|
|
652
674
|
scales: {
|
|
653
675
|
x: {
|
|
654
676
|
grid: { color: 'rgba(255, 255, 255, 0.05)' },
|
|
655
|
-
ticks: { color: '#94A3B8', font: { size:
|
|
677
|
+
ticks: { color: '#94A3B8', font: { size: 9 }, maxTicksLimit: 12, maxRotation: 35, autoSkip: true }
|
|
656
678
|
},
|
|
657
679
|
y: {
|
|
658
680
|
grid: { color: 'rgba(255, 255, 255, 0.05)' },
|
|
659
681
|
ticks: { color: '#94A3B8', font: { size: 10 } }
|
|
660
682
|
}
|
|
683
|
+
},
|
|
684
|
+
elements: {
|
|
685
|
+
point: { radius: 0, hitRadius: 6, hoverRadius: 4 }
|
|
661
686
|
}
|
|
662
687
|
}
|
|
663
688
|
});
|
|
@@ -673,16 +698,36 @@
|
|
|
673
698
|
const model = select.value;
|
|
674
699
|
|
|
675
700
|
try {
|
|
676
|
-
|
|
677
|
-
const
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
701
|
+
// Fetch full history and compute AI-only stats client-side
|
|
702
|
+
const histResp = await fetch('/api/stats/history');
|
|
703
|
+
const allLogs = await histResp.json();
|
|
704
|
+
const aiLogs = allLogs.filter(l => isAiCommand(l));
|
|
705
|
+
|
|
706
|
+
const summaryResp = await fetch(`/api/stats/summary?model=${model}`);
|
|
707
|
+
const data = await summaryResp.json();
|
|
708
|
+
|
|
709
|
+
// Summary counts ALL commands (all went through TrimPrompt and saved tokens)
|
|
710
|
+
const pricePerM = PRICING_TABLE[data.model_key] || PRICING_TABLE[model] || 3.00;
|
|
711
|
+
let totalRaw = 0, totalComp = 0, totalSaved = 0;
|
|
712
|
+
allLogs.forEach(l => {
|
|
713
|
+
totalRaw += l.estimated_raw_tokens;
|
|
714
|
+
totalComp += l.estimated_compressed_tokens;
|
|
715
|
+
totalSaved += l.tokens_saved;
|
|
716
|
+
});
|
|
717
|
+
const pct = totalRaw > 0 ? ((totalSaved / totalRaw) * 100).toFixed(1) : '0.0';
|
|
718
|
+
const rawCostUsd = (totalRaw * pricePerM) / 1000000;
|
|
719
|
+
const compCostUsd = (totalComp * pricePerM) / 1000000;
|
|
720
|
+
const savedUsd = (totalSaved * pricePerM) / 1000000;
|
|
721
|
+
|
|
722
|
+
document.getElementById('val-savings').innerText = `$${savedUsd.toFixed(4)}`;
|
|
723
|
+
document.getElementById('val-savings-desc').innerText = `based on ${data.model_name} pricing`;
|
|
724
|
+
document.getElementById('val-orig-cost').innerText = `$${rawCostUsd.toFixed(4)}`;
|
|
725
|
+
document.getElementById('val-comp-cost').innerText = `$${compCostUsd.toFixed(4)}`;
|
|
726
|
+
document.getElementById('val-reduction').innerText = `${pct}%`;
|
|
727
|
+
document.getElementById('val-tokens-desc').innerText = `raw: ${totalRaw.toLocaleString()} → compressed: ${totalComp.toLocaleString()}`;
|
|
728
|
+
|
|
729
|
+
// Return for chart model resolution
|
|
730
|
+
data.model_key = data.model_key || model;
|
|
686
731
|
return data;
|
|
687
732
|
} catch (err) {
|
|
688
733
|
console.error('Failed to fetch summary stats', err);
|
|
@@ -705,17 +750,25 @@
|
|
|
705
750
|
}
|
|
706
751
|
}
|
|
707
752
|
|
|
708
|
-
//
|
|
709
|
-
|
|
753
|
+
// Filter logs: AI-only for chart and summary, all for table if toggled
|
|
754
|
+
const aiLogs = logs.filter(l => isAiCommand(l));
|
|
755
|
+
|
|
756
|
+
// Chart + summary always use AI-only logs
|
|
757
|
+
renderChart(aiLogs, resolvedModel);
|
|
758
|
+
|
|
759
|
+
const displayLogs = currentFilter === 'ai' ? aiLogs : logs;
|
|
710
760
|
|
|
711
761
|
const tbody = document.getElementById('history-table-body');
|
|
712
|
-
if (
|
|
713
|
-
|
|
762
|
+
if (displayLogs.length === 0) {
|
|
763
|
+
const msg = currentFilter === 'ai'
|
|
764
|
+
? 'No AI agent commands detected yet. Commands from Claude Code, Cursor, Copilot etc. will appear here.'
|
|
765
|
+
: 'No logs recorded yet. Run commands with TrimPrompt to see stats!';
|
|
766
|
+
tbody.innerHTML = `<tr><td colspan="7" style="text-align: center; color: var(--text-muted);">${msg}</td></tr>`;
|
|
714
767
|
return;
|
|
715
768
|
}
|
|
716
769
|
|
|
717
770
|
tbody.innerHTML = '';
|
|
718
|
-
|
|
771
|
+
displayLogs.reverse().forEach(log => {
|
|
719
772
|
const tr = document.createElement('tr');
|
|
720
773
|
const time = new Date(log.timestamp).toLocaleTimeString();
|
|
721
774
|
|
|
@@ -766,9 +819,41 @@
|
|
|
766
819
|
document.getElementById('diff-modal').style.display = 'none';
|
|
767
820
|
}
|
|
768
821
|
|
|
769
|
-
//
|
|
770
|
-
|
|
771
|
-
|
|
822
|
+
// Auto-detect most-used model from AI logs and set dropdown
|
|
823
|
+
async function autoDetectModel() {
|
|
824
|
+
try {
|
|
825
|
+
const resp = await fetch('/api/stats/history');
|
|
826
|
+
const logs = await resp.json();
|
|
827
|
+
const aiLogs = logs.filter(l => isAiCommand(l));
|
|
828
|
+
if (aiLogs.length === 0) return;
|
|
829
|
+
|
|
830
|
+
const recent = aiLogs.slice(-100);
|
|
831
|
+
const counts = {};
|
|
832
|
+
recent.forEach(l => {
|
|
833
|
+
const m = l.model_used || '';
|
|
834
|
+
if (m) counts[m] = (counts[m] || 0) + 1;
|
|
835
|
+
});
|
|
836
|
+
|
|
837
|
+
let topModel = '';
|
|
838
|
+
let topCount = 0;
|
|
839
|
+
for (const [m, c] of Object.entries(counts)) {
|
|
840
|
+
if (c > topCount) { topModel = m; topCount = c; }
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
if (topModel && PRICING_TABLE[topModel]) {
|
|
844
|
+
const select = document.getElementById('model-select');
|
|
845
|
+
if (select.value === 'auto' || select.value === 'claude-3-5-sonnet') {
|
|
846
|
+
select.value = topModel;
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
} catch {}
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
// Initial load: detect model first, then load stats
|
|
853
|
+
autoDetectModel().then(() => {
|
|
854
|
+
loadStats();
|
|
855
|
+
loadHistory();
|
|
856
|
+
});
|
|
772
857
|
// Poll updates every 5 seconds
|
|
773
858
|
setInterval(() => {
|
|
774
859
|
loadStats();
|
package/mcp.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const a0_0x2dee27=a0_0x5a8b;(function(_0x47c9b7,_0x5148ac){const _0x2de401=a0_0x5a8b,_0x4cadb6=_0x47c9b7();while(!![]){try{const _0x1ac478=-parseInt(_0x2de401(0x1a3))/0x1*(-parseInt(_0x2de401(0x19b))/0x2)+-parseInt(_0x2de401(0x18f))/0x3*(-parseInt(_0x2de401(0x190))/0x4)+-parseInt(_0x2de401(0x18b))/0x5+parseInt(_0x2de401(0x192))/0x6+-parseInt(_0x2de401(0x1ab))/0x7*(parseInt(_0x2de401(0x189))/0x8)+parseInt(_0x2de401(0x19e))/0x9*(parseInt(_0x2de401(0x1ad))/0xa)+-parseInt(_0x2de401(0x180))/0xb;if(_0x1ac478===_0x5148ac)break;else _0x4cadb6['push'](_0x4cadb6['shift']());}catch(_0x21093a){_0x4cadb6['push'](_0x4cadb6['shift']());}}}(a0_0x9076,0xe91f0));function a0_0x5a8b(_0x13bec1,_0x51b430){const _0x9076ad=a0_0x9076();return a0_0x5a8b=function(_0x5a8b97,_0x31e543){_0x5a8b97=_0x5a8b97-0x17a;let _0x3bf922=_0x9076ad[_0x5a8b97];return _0x3bf922;},a0_0x5a8b(_0x13bec1,_0x51b430);}var __createBinding=this&&this[a0_0x2dee27(0x188)]||(Object[a0_0x2dee27(0x195)]?function(_0x489068,_0xab2bb6,_0x4cc526,_0x238475){const _0x2f7fd2=a0_0x2dee27;if(_0x238475===undefined)_0x238475=_0x4cc526;var _0x1a4ca4=Object['getOwnPropertyDescriptor'](_0xab2bb6,_0x4cc526);(!_0x1a4ca4||(_0x2f7fd2(0x19a)in _0x1a4ca4?!_0xab2bb6[_0x2f7fd2(0x198)]:_0x1a4ca4[_0x2f7fd2(0x1a9)]||_0x1a4ca4[_0x2f7fd2(0x17c)]))&&(_0x1a4ca4={'enumerable':!![],'get':function(){return _0xab2bb6[_0x4cc526];}}),Object[_0x2f7fd2(0x1a1)](_0x489068,_0x238475,_0x1a4ca4);}:function(_0x3e5e8d,_0x4ba5b1,_0xfc2814,_0x351553){if(_0x351553===undefined)_0x351553=_0xfc2814;_0x3e5e8d[_0x351553]=_0x4ba5b1[_0xfc2814];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object['create']?function(_0x3feee6,_0x586463){const _0x55aeca=a0_0x2dee27;Object[_0x55aeca(0x1a1)](_0x3feee6,'default',{'enumerable':!![],'value':_0x586463});}:function(_0xc5383d,_0x142208){const _0x4ff3fc=a0_0x2dee27;_0xc5383d[_0x4ff3fc(0x1aa)]=_0x142208;}),__importStar=this&&this[a0_0x2dee27(0x184)]||(function(){var _0x198985=function(_0x1ab2d3){const _0x25036c=a0_0x5a8b;return _0x198985=Object[_0x25036c(0x1ac)]||function(_0x72c4f0){const _0x149407=_0x25036c;var _0x38513a=[];for(var _0x4cb739 in _0x72c4f0)if(Object[_0x149407(0x1a6)]['hasOwnProperty'][_0x149407(0x1a8)](_0x72c4f0,_0x4cb739))_0x38513a[_0x38513a[_0x149407(0x18a)]]=_0x4cb739;return _0x38513a;},_0x198985(_0x1ab2d3);};return function(_0x12fdb8){const _0x24ae99=a0_0x5a8b;if(_0x12fdb8&&_0x12fdb8[_0x24ae99(0x198)])return _0x12fdb8;var _0x4b88d3={};if(_0x12fdb8!=null){for(var _0x546253=_0x198985(_0x12fdb8),_0x2a26f4=0x0;_0x2a26f4<_0x546253[_0x24ae99(0x18a)];_0x2a26f4++)if(_0x546253[_0x2a26f4]!==_0x24ae99(0x1aa))__createBinding(_0x4b88d3,_0x12fdb8,_0x546253[_0x2a26f4]);}return __setModuleDefault(_0x4b88d3,_0x12fdb8),_0x4b88d3;};}());Object[a0_0x2dee27(0x1a1)](exports,'__esModule',{'value':!![]}),exports[a0_0x2dee27(0x17e)]=runMcpProxy;const child_process_1=require('child_process'),readline=__importStar(require('readline')),filters_1=require(a0_0x2dee27(0x1af)),tracker_1=require(a0_0x2dee27(0x18d));function a0_0x9076(){const _0x3f6275=['runMcpProxy','isArray','203291CTqLDK','tracker','line','mcp-tool-call','__importStar','[TrimPrompt]\x20MCP\x20Server\x20Spawn\x20Error:\x20','stdout','text','__createBinding','24krpqzM','length','7752660acZWlp','type','./tracker','result','3iyvFyI','2584004GtdnXt','jsonrpc','1125864PEJzaX','pipe','inherit','create','content','message','__esModule','error','get','539018PBwNXV','string','logExecution','45OMfZqi','close','mcp\x20tool\x20(id:\x20','defineProperty','exit','3tCnWzc','redaction_enabled','spawn','prototype','createInterface','call','writable','default','1300985fQRPob','getOwnPropertyNames','2878540AUkIsP','parse','./filters','stdin','trim','stringify','write','configurable','getConfig'];a0_0x9076=function(){return _0x3f6275;};return a0_0x9076();}function runMcpProxy(_0x93122b,_0x5efb05){const _0x4b54c8=a0_0x2dee27,_0x560872=(0x0,child_process_1[_0x4b54c8(0x1a5)])(_0x93122b,_0x5efb05,{'stdio':[_0x4b54c8(0x193),_0x4b54c8(0x193),_0x4b54c8(0x194)]});process[_0x4b54c8(0x1b0)][_0x4b54c8(0x193)](_0x560872[_0x4b54c8(0x1b0)]);const _0x3637be=readline[_0x4b54c8(0x1a7)]({'input':_0x560872['stdout'],'terminal':![]});_0x3637be['on'](_0x4b54c8(0x182),_0x2170b9=>{const _0x10de2a=_0x4b54c8;try{const _0xb9077b=JSON[_0x10de2a(0x1ae)](_0x2170b9);if(_0xb9077b&&_0xb9077b[_0x10de2a(0x191)]==='2.0'&&_0xb9077b['id']!==undefined&&_0xb9077b[_0x10de2a(0x18e)]&&Array[_0x10de2a(0x17f)](_0xb9077b[_0x10de2a(0x18e)][_0x10de2a(0x196)])){let _0x2686f1=![];for(const _0x135b89 of _0xb9077b[_0x10de2a(0x18e)][_0x10de2a(0x196)]){if(_0x135b89[_0x10de2a(0x18c)]===_0x10de2a(0x187)&&typeof _0x135b89[_0x10de2a(0x187)]===_0x10de2a(0x19c)&&_0x135b89[_0x10de2a(0x187)][_0x10de2a(0x1b1)]()[_0x10de2a(0x18a)]>0x0){const _0x37a270=_0x135b89[_0x10de2a(0x187)],_0x390107=(0x0,filters_1['compressOutput'])(_0x10de2a(0x183),_0x37a270,'',tracker_1['tracker'][_0x10de2a(0x17d)]()[_0x10de2a(0x1a4)]);tracker_1[_0x10de2a(0x181)][_0x10de2a(0x19d)](_0x10de2a(0x1a0)+_0xb9077b['id']+')',_0x37a270,_0x390107,0x0),_0x135b89[_0x10de2a(0x187)]=_0x390107,_0x2686f1=!![];}}_0x2686f1?process[_0x10de2a(0x186)][_0x10de2a(0x17b)](JSON[_0x10de2a(0x17a)](_0xb9077b)+'\x0a'):process[_0x10de2a(0x186)][_0x10de2a(0x17b)](_0x2170b9+'\x0a');}else process[_0x10de2a(0x186)][_0x10de2a(0x17b)](_0x2170b9+'\x0a');}catch{process[_0x10de2a(0x186)]['write'](_0x2170b9+'\x0a');}}),_0x560872['on'](_0x4b54c8(0x19f),_0x5371be=>{const _0x138a9b=_0x4b54c8;process[_0x138a9b(0x1a2)](_0x5371be||0x0);}),_0x560872['on'](_0x4b54c8(0x199),_0x4ff13d=>{const _0x1d90b5=_0x4b54c8;console[_0x1d90b5(0x199)](_0x1d90b5(0x185)+_0x4ff13d[_0x1d90b5(0x197)]),process[_0x1d90b5(0x1a2)](0x1);});}
|
package/package.json
CHANGED
package/redactor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x1ed6e5=a0_0x5364;(function(_0x29f216,_0x59d75e){const _0x577fe4=a0_0x5364,_0x222c9d=_0x29f216();while(!![]){try{const _0x16be55=-parseInt(_0x577fe4(0x11b))/0x1+parseInt(_0x577fe4(0x12e))/0x2*(parseInt(_0x577fe4(0x12d))/0x3)+parseInt(_0x577fe4(0x11e))/0x4*(-parseInt(_0x577fe4(0x128))/0x5)+-parseInt(_0x577fe4(0x121))/0x6*(-parseInt(_0x577fe4(0x12f))/0x7)+-parseInt(_0x577fe4(0x12a))/0x8*(parseInt(_0x577fe4(0x11f))/0x9)+-parseInt(_0x577fe4(0x125))/0xa+parseInt(_0x577fe4(0x130))/0xb*(parseInt(_0x577fe4(0x12c))/0xc);if(_0x16be55===_0x59d75e)break;else _0x222c9d['push'](_0x222c9d['shift']());}catch(_0x2ef2b8){_0x222c9d['push'](_0x222c9d['shift']());}}}(a0_0x210b,0xbb9ca));Object[a0_0x1ed6e5(0x123)](exports,a0_0x1ed6e5(0x120),{'value':!![]}),exports['redactor']=exports[a0_0x1ed6e5(0x124)]=void 0x0;class Redactor{[a0_0x1ed6e5(0x11d)]=[];constructor(){this['loadDefaultRules']();}['loadDefaultRules'](){const _0x596b68=a0_0x1ed6e5;this[_0x596b68(0x11d)]=[{'name':_0x596b68(0x129),'regex':/(mongodb|postgres|postgresql|mysql|redis|sqlite):\/\/[a-zA-Z0-9_]+:[^@\s\n]+@[^\s\n]+/gi,'replacement':_0x596b68(0x11c)},{'name':_0x596b68(0x131),'regex':/(api[_-]?key|secret|password|passwd|auth|token|private[_-]?key)[\s:=]+[a-zA-Z0-9_-]{16,}/gi,'replacement':_0x596b68(0x127)},{'name':'IPv4\x20Address','regex':/\b(?!127\.0\.0\.1|255\.255\.255\.0)(?:[0-9]{1,3}\.){3}[0-9]{1,3}\b/g,'replacement':'[REDACTED_IP]'},{'name':'Email\x20Address','regex':/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b/g,'replacement':_0x596b68(0x12b)}];}[a0_0x1ed6e5(0x132)](_0x2a24f8){const _0x3185b5=a0_0x1ed6e5;let _0x43cc59=_0x2a24f8;for(const _0x226871 of this[_0x3185b5(0x11d)]){_0x43cc59=_0x43cc59[_0x3185b5(0x122)](_0x226871[_0x3185b5(0x126)],_0x226871['replacement']);}return _0x43cc59;}}exports[a0_0x1ed6e5(0x124)]=Redactor,exports['redactor']=new Redactor();function a0_0x5364(_0x2e8353,_0x3f27cc){const _0x210bc1=a0_0x210b();return a0_0x5364=function(_0x5364e9,_0x5b72a6){_0x5364e9=_0x5364e9-0x11b;let _0x2d73db=_0x210bc1[_0x5364e9];return _0x2d73db;},a0_0x5364(_0x2e8353,_0x3f27cc);}function a0_0x210b(){const _0x40ab8f=['1001296DhqtDP','1737rtQWUK','__esModule','9474gOEYkY','replace','defineProperty','Redactor','3175580mAgTEy','regex','$1:\x20[REDACTED_CREDENTIAL]','15EoSqyH','Database\x20Connection\x20String','35320FsaVyb','[REDACTED_EMAIL]','172644lGOROD','3sjkWQA','357362LxoDfg','2653wdHQJw','1661qOaWIJ','API\x20Key\x20or\x20Password','redact','260476UMthlm','[REDACTED_DB_CONNECTION_STRING]','rules'];a0_0x210b=function(){return _0x40ab8f;};return a0_0x210b();}
|