trimprompt 1.0.46 → 1.0.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cache-manager.js +1 -1
- package/cache.js +1 -1
- package/ccr.js +1 -1
- package/cli.js +9 -1
- package/dashboard.js +1 -1
- package/executor.js +1 -1
- package/file-watcher.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/hooks/claude-hook.js +1 -1
- package/mcp.js +1 -1
- package/package.json +3 -2
- package/proxy-conv.js +1 -1
- package/proxy-resp.js +1 -1
- package/redactor.js +1 -1
- package/seed.js +1 -1
- package/simulate.js +1 -1
- package/sync.js +1 -1
- package/tracker.js +1 -1
package/filters/generic.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function a0_0x5549(_0x455370,_0x52ecf6){_0x455370=_0x455370-0x16a;const _0x5c179b=a0_0x5c17();let _0x55491b=_0x5c179b[_0x455370];return _0x55491b;}const a0_0x387e05=a0_0x5549;(function(_0x519f14,_0x2bcba8){const _0x12c2d1=a0_0x5549,_0x221280=_0x519f14();while(!![]){try{const _0x1fd0bd=-parseInt(_0x12c2d1(0x172))/0x1*(-parseInt(_0x12c2d1(0x17a))/0x2)+parseInt(_0x12c2d1(0x179))/0x3*(-parseInt(_0x12c2d1(0x182))/0x4)+-parseInt(_0x12c2d1(0x17c))/0x5+-parseInt(_0x12c2d1(0x170))/0x6+parseInt(_0x12c2d1(0x194))/0x7*(parseInt(_0x12c2d1(0x18c))/0x8)+parseInt(_0x12c2d1(0x174))/0x9+parseInt(_0x12c2d1(0x189))/0xa;if(_0x1fd0bd===_0x2bcba8)break;else _0x221280['push'](_0x221280['shift']());}catch(_0x12653f){_0x221280['push'](_0x221280['shift']());}}}(a0_0x5c17,0x53d8d));Object[a0_0x387e05(0x186)](exports,'__esModule',{'value':!![]}),exports['stripAnsi']=stripAnsi,exports[a0_0x387e05(0x185)]=collapseDuplicates,exports[a0_0x387e05(0x184)]=collapseWhitespace,exports[a0_0x387e05(0x16c)]=stripComments,exports['smartCrushJson']=smartCrushJson,exports['softTruncate']=softTruncate;function stripAnsi(_0x310c86){const _0x448d1e=a0_0x387e05,_0xc2c221=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g;return _0x310c86[_0x448d1e(0x192)](_0xc2c221,'');}function collapseDuplicates(_0x3693bf){const _0x30b5a3=a0_0x387e05,_0x5356d3=_0x3693bf[_0x30b5a3(0x188)]('\x0a');if(_0x5356d3[_0x30b5a3(0x18b)]<=0x1)return _0x3693bf;const _0x372c35=[];let _0x587f97=_0x5356d3[0x0],_0x27e1d0=0x1;for(let _0x4881e7=0x1;_0x4881e7<_0x5356d3[_0x30b5a3(0x18b)];_0x4881e7++){const _0x499709=_0x5356d3[_0x4881e7];_0x499709===_0x587f97&&_0x499709[_0x30b5a3(0x16b)]()[_0x30b5a3(0x18b)]>0x0?_0x27e1d0++:(_0x27e1d0>0x1?_0x372c35['push'](_0x587f97+_0x30b5a3(0x18e)+_0x27e1d0+']'):_0x372c35[_0x30b5a3(0x178)](_0x587f97),_0x587f97=_0x499709,_0x27e1d0=0x1);}return _0x27e1d0>0x1?_0x372c35[_0x30b5a3(0x178)](_0x587f97+_0x30b5a3(0x18e)+_0x27e1d0+']'):_0x372c35['push'](_0x587f97),_0x372c35[_0x30b5a3(0x177)]('\x0a');}function collapseWhitespace(_0x3fa46d){const _0x3b9d25=a0_0x387e05;let _0x5668f0=_0x3fa46d[_0x3b9d25(0x192)](/[ \t]+$/gm,'');return _0x5668f0=_0x5668f0[_0x3b9d25(0x192)](/\n{4,}/g,_0x3b9d25(0x190)),_0x5668f0;}function stripComments(_0x2d72b2,_0x3660c1){const _0x33d293=a0_0x387e05;if(!_0x3660c1)return _0x2d72b2;const _0x1504d3=_0x2d72b2[_0x33d293(0x188)]('\x0a');if(_0x1504d3['length']<=0x96)return _0x2d72b2;const _0xdce58c={'.ts':/^\s*\/\//,'.js':/^\s*\/\//,'.tsx':/^\s*\/\//,'.jsx':/^\s*\/\//,'.py':/^\s*#(?!!)/,'.rb':/^\s*#(?!!)/,'.sh':/^\s*#(?!!)/,'.go':/^\s*\/\//,'.rs':/^\s*\/\//,'.java':/^\s*\/\//,'.c':/^\s*\/\//,'.cpp':/^\s*\/\//,'.cs':/^\s*\/\//,'.swift':/^\s*\/\//,'.kt':/^\s*\/\//,'.yaml':/^\s*#(?!!)/,'.yml':/^\s*#(?!!)/},_0x368086=_0xdce58c[_0x3660c1[_0x33d293(0x193)]()];if(!_0x368086)return _0x2d72b2;const _0x3e4a55=_0x1504d3[_0x33d293(0x173)](_0x33327e=>!_0x368086[_0x33d293(0x16a)](_0x33327e));return _0x3e4a55[_0x33d293(0x177)]('\x0a');}function smartCrushJson(_0x2f4207){const _0x18b624=a0_0x387e05;try{const _0x22152f=_0x2f4207[_0x18b624(0x16b)]();if(!_0x22152f[_0x18b624(0x17e)]('['))return null;const _0x507dcd=JSON['parse'](_0x22152f);if(!Array[_0x18b624(0x17d)](_0x507dcd)||_0x507dcd[_0x18b624(0x18b)]<0x3)return null;if(typeof _0x507dcd[0x0]!==_0x18b624(0x17f)||_0x507dcd[0x0]===null)return null;const _0x10193f=Object[_0x18b624(0x18f)](_0x507dcd[0x0]);if(_0x10193f['length']===0x0)return null;const _0x1368ec=_0x10193f[_0x18b624(0x173)](_0x345fbf=>{const _0xaf47bc=_0x18b624,_0x3067e4=_0x345fbf[_0xaf47bc(0x193)]();return!_0x3067e4['includes']('resolved')&&!_0x3067e4['includes']('integrity')&&!_0x3067e4[_0xaf47bc(0x175)](_0xaf47bc(0x17b))&&!_0x3067e4[_0xaf47bc(0x175)](_0xaf47bc(0x16d))&&!_0x3067e4[_0xaf47bc(0x175)](_0xaf47bc(0x187))&&!_0x3067e4['includes']('signature')&&!_0x3067e4[_0xaf47bc(0x175)](_0xaf47bc(0x183))&&_0x3067e4!=='funding'&&_0x3067e4!==_0xaf47bc(0x195)&&_0x3067e4!=='bugs'&&_0x3067e4!==_0xaf47bc(0x18a);})[_0x18b624(0x191)](0x0,0x6);if(_0x1368ec[_0x18b624(0x18b)]===0x0)return null;const _0x2c5cfd=[];_0x2c5cfd['push'](_0x1368ec['join']('|'));const _0x4cd5a1=0x1e;for(let _0x130d36=0x0;_0x130d36<Math[_0x18b624(0x180)](_0x507dcd[_0x18b624(0x18b)],_0x4cd5a1);_0x130d36++){const _0x259e1b=_0x1368ec[_0x18b624(0x16e)](_0x5f4532=>{const _0x2e74bf=_0x18b624,_0x44785f=_0x507dcd[_0x130d36][_0x5f4532];if(_0x44785f===null||_0x44785f===undefined)return'';if(typeof _0x44785f==='object')return JSON[_0x2e74bf(0x176)](_0x44785f)[_0x2e74bf(0x181)](0x0,0x28);return String(_0x44785f)[_0x2e74bf(0x181)](0x0,0x3c);});_0x2c5cfd[_0x18b624(0x178)](_0x259e1b[_0x18b624(0x177)]('|'));}_0x507dcd[_0x18b624(0x18b)]>_0x4cd5a1&&_0x2c5cfd[_0x18b624(0x178)](_0x18b624(0x196)+(_0x507dcd[_0x18b624(0x18b)]-_0x4cd5a1)+_0x18b624(0x16f));_0x2c5cfd['push']('\x0a('+_0x507dcd['length']+_0x18b624(0x171)+_0x10193f['length']+'\x20fields,\x20showing\x20'+_0x1368ec[_0x18b624(0x18b)]+_0x18b624(0x18d));const _0x32c90a=_0x2c5cfd[_0x18b624(0x177)]('\x0a');if(_0x32c90a['length']<_0x22152f[_0x18b624(0x18b)])return _0x32c90a;return null;}catch{return null;}}function a0_0x5c17(){const _0x2dcc59=['collapseWhitespace','collapseDuplicates','defineProperty','checksum','split','2163240meSOTT','repository','length','8kEkMLN','\x20key\x20fields)','\x20[x','keys','\x0a\x0a\x0a','slice','replace','toLowerCase','2194339eYNXll','engines','...\x20+','test','trim','stripComments','hash','map','\x20more\x20rows','2868864OpzkwL','\x20items,\x20','275630zrpFsb','filter','3369915FpgVIG','includes','stringify','join','push','12849iGEmbb','2RMikFI','sha','635015OsLiYy','isArray','startsWith','object','min','substring','216pANDcR','dev'];a0_0x5c17=function(){return _0x2dcc59;};return a0_0x5c17();}function softTruncate(_0x6c247a,_0x4b2442=0x4e20){const _0x49776f=a0_0x387e05;if(_0x6c247a[_0x49776f(0x18b)]<=_0x4b2442)return _0x6c247a;const _0x4c5715=_0x6c247a[_0x49776f(0x188)]('\x0a');if(_0x4c5715[_0x49776f(0x18b)]<=0xc8)return _0x6c247a;const _0x5a3605=0x32,_0x3410a8=0x96,_0x49d885=_0x4c5715[_0x49776f(0x191)](0x0,_0x5a3605),_0x7974a1=_0x4c5715[_0x49776f(0x191)](_0x4c5715['length']-_0x3410a8),_0x3dd044=_0x6c247a[_0x49776f(0x18b)]-(_0x49d885[_0x49776f(0x177)]('\x0a')[_0x49776f(0x18b)]+_0x7974a1[_0x49776f(0x177)]('\x0a')[_0x49776f(0x18b)]);return[..._0x49d885,'\x0a...\x20[TrimPrompt:\x20Truncated\x20'+_0x3dd044+'\x20characters\x20of\x20output]\x20...\x0a',..._0x7974a1][_0x49776f(0x177)]('\x0a');}
|
package/filters/git.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x46144c=a0_0xb658;(function(_0x379e5f,_0x4d3367){const _0xcf034f=a0_0xb658,_0x1bed10=_0x379e5f();while(!![]){try{const _0x4e272c=-parseInt(_0xcf034f(0x6f))/0x1*(parseInt(_0xcf034f(0x92))/0x2)+parseInt(_0xcf034f(0x89))/0x3+parseInt(_0xcf034f(0x81))/0x4+parseInt(_0xcf034f(0x74))/0x5+-parseInt(_0xcf034f(0x6e))/0x6+parseInt(_0xcf034f(0x8d))/0x7+-parseInt(_0xcf034f(0x98))/0x8*(parseInt(_0xcf034f(0x7a))/0x9);if(_0x4e272c===_0x4d3367)break;else _0x1bed10['push'](_0x1bed10['shift']());}catch(_0x282fe6){_0x1bed10['push'](_0x1bed10['shift']());}}}(a0_0x488f,0x5d916));var __createBinding=this&&this[a0_0x46144c(0x83)]||(Object['create']?function(_0x337f3e,_0x28b786,_0x3df608,_0x265fc0){const _0x5ca3f6=a0_0x46144c;if(_0x265fc0===undefined)_0x265fc0=_0x3df608;var _0x38a91c=Object[_0x5ca3f6(0x8b)](_0x28b786,_0x3df608);(!_0x38a91c||(_0x5ca3f6(0x7d)in _0x38a91c?!_0x28b786[_0x5ca3f6(0x97)]:_0x38a91c[_0x5ca3f6(0x8e)]||_0x38a91c[_0x5ca3f6(0x91)]))&&(_0x38a91c={'enumerable':!![],'get':function(){return _0x28b786[_0x3df608];}}),Object['defineProperty'](_0x337f3e,_0x265fc0,_0x38a91c);}:function(_0x23c0da,_0x3afc83,_0x55a3c2,_0x5c9f1d){if(_0x5c9f1d===undefined)_0x5c9f1d=_0x55a3c2;_0x23c0da[_0x5c9f1d]=_0x3afc83[_0x55a3c2];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a0_0x46144c(0x84)]?function(_0xeccbaa,_0x3215ba){const _0x3add6a=a0_0x46144c;Object[_0x3add6a(0x85)](_0xeccbaa,_0x3add6a(0x8c),{'enumerable':!![],'value':_0x3215ba});}:function(_0x352f80,_0x5bc430){_0x352f80['default']=_0x5bc430;}),__importStar=this&&this[a0_0x46144c(0x82)]||(function(){var _0x2c54fe=function(_0x53621a){const _0x1a45e3=a0_0xb658;return _0x2c54fe=Object[_0x1a45e3(0x78)]||function(_0x609e15){const _0x164856=_0x1a45e3;var _0x4394a2=[];for(var _0x4dba71 in _0x609e15)if(Object[_0x164856(0x7b)][_0x164856(0x88)][_0x164856(0x77)](_0x609e15,_0x4dba71))_0x4394a2[_0x4394a2['length']]=_0x4dba71;return _0x4394a2;},_0x2c54fe(_0x53621a);};return function(_0x17dfd3){const _0xd79f64=a0_0xb658;if(_0x17dfd3&&_0x17dfd3[_0xd79f64(0x97)])return _0x17dfd3;var _0x3ee302={};if(_0x17dfd3!=null){for(var _0x18535d=_0x2c54fe(_0x17dfd3),_0x4b6ec1=0x0;_0x4b6ec1<_0x18535d[_0xd79f64(0x90)];_0x4b6ec1++)if(_0x18535d[_0x4b6ec1]!==_0xd79f64(0x8c))__createBinding(_0x3ee302,_0x17dfd3,_0x18535d[_0x4b6ec1]);}return __setModuleDefault(_0x3ee302,_0x17dfd3),_0x3ee302;};}());Object['defineProperty'](exports,a0_0x46144c(0x97),{'value':!![]}),exports['filterGitStatus']=filterGitStatus,exports[a0_0x46144c(0x8a)]=filterGitLog,exports[a0_0x46144c(0x9c)]=filterGitDiff;function a0_0xb658(_0x5659f0,_0x43bbe9){_0x5659f0=_0x5659f0-0x6e;const _0x488f29=a0_0x488f();let _0xb65880=_0x488f29[_0x5659f0];return _0xb65880;}function a0_0x488f(){const _0x426784=['slice','split','filter','filterGitDiff','join','unknown_file','\x20untracked\x20files)','4408590gpVDIM','1119cCfcRv','startsWith','/\x20(','---','push','3039185tqOOHl','\x20\x20...\x20(+','trim','call','getOwnPropertyNames','entries','165897SciZVz','prototype','*\x20Branch:\x20','get','substring','path','map','2957984aaFEWo','__importStar','__createBinding','create','defineProperty','replace','---END---','hasOwnProperty','2242692gRfFMt','filterGitLog','getOwnPropertyDescriptor','default','4341260GDLqIM','writable','[file]\x20','length','configurable','1306XRjHsi','\x20more\x20modifications','\x20\x20??\x20','Clean\x20working\x20tree','basename','__esModule','376gWvEDd'];a0_0x488f=function(){return _0x426784;};return a0_0x488f();}const path=__importStar(require(a0_0x46144c(0x7f)));function filterGitStatus(_0x27e7a3){const _0x117630=a0_0x46144c,_0x59471a=_0x27e7a3['split']('\x0a')[_0x117630(0x80)](_0x39ae07=>_0x39ae07[_0x117630(0x76)]())['filter'](_0x47f3d=>_0x47f3d[_0x117630(0x90)]>0x0);if(_0x59471a[_0x117630(0x90)]===0x0)return _0x117630(0x95);const _0x4e11fe=[],_0x273321=[],_0x1203ff=[];for(const _0xb98dc7 of _0x59471a){if(_0xb98dc7['startsWith']('##')){const _0x1cd8b3=_0xb98dc7[_0x117630(0x86)](/^##\s*/,'');_0x4e11fe[_0x117630(0x73)](_0x117630(0x7c)+_0x1cd8b3);}else _0xb98dc7[_0x117630(0x70)]('??')?_0x273321[_0x117630(0x73)](_0xb98dc7[_0x117630(0x7e)](0x3)[_0x117630(0x76)]()):_0x1203ff[_0x117630(0x73)](_0xb98dc7);}_0x1203ff['length']>0x0&&(_0x4e11fe['push']('\x0aChanges:'),_0x4e11fe[_0x117630(0x73)](..._0x1203ff[_0x117630(0x80)](_0x5d3976=>'\x20\x20'+_0x5d3976)));if(_0x273321[_0x117630(0x90)]>0x0){_0x4e11fe[_0x117630(0x73)]('\x0aUntracked\x20files:');const _0x37ad23={},_0xdbf0ef=[];for(const _0x419a19 of _0x273321){const _0x4c7bd4=path['dirname'](_0x419a19);_0x4c7bd4==='.'||_0x4c7bd4===''?_0xdbf0ef['push'](_0x419a19):(!_0x37ad23[_0x4c7bd4]&&(_0x37ad23[_0x4c7bd4]=[]),_0x37ad23[_0x4c7bd4][_0x117630(0x73)](path[_0x117630(0x96)](_0x419a19)));}for(const [_0x155015,_0x5102ab]of Object[_0x117630(0x79)](_0x37ad23)){if(_0x5102ab[_0x117630(0x90)]>0x5)_0x4e11fe[_0x117630(0x73)](_0x117630(0x94)+_0x155015+_0x117630(0x71)+_0x5102ab[_0x117630(0x90)]+_0x117630(0x9f));else for(const _0x4c1f29 of _0x5102ab){_0x4e11fe['push']('\x20\x20??\x20'+path[_0x117630(0x9d)](_0x155015,_0x4c1f29));}}for(const _0x301e5b of _0xdbf0ef){_0x4e11fe['push']('\x20\x20??\x20'+_0x301e5b);}}return _0x4e11fe[_0x117630(0x9d)]('\x0a');}function filterGitLog(_0x56216f){const _0x14f23a=a0_0x46144c,_0x44418e=_0x56216f['split'](_0x14f23a(0x87))['map'](_0x422005=>_0x422005['trim']())[_0x14f23a(0x9b)](_0x3ffbec=>_0x3ffbec[_0x14f23a(0x90)]>0x0);if(_0x44418e['length']===0x0)return _0x56216f;const _0x5a925f=[];for(const _0x2aba40 of _0x44418e){const _0x16db75=_0x2aba40[_0x14f23a(0x9a)]('\x0a'),_0x2c6648=_0x16db75[0x0]||'',_0x37ab58=_0x16db75['slice'](0x1)[_0x14f23a(0x80)](_0xf9247c=>_0xf9247c[_0x14f23a(0x76)]())[_0x14f23a(0x9b)](_0x4bb182=>_0x4bb182[_0x14f23a(0x90)]>0x0);_0x5a925f[_0x14f23a(0x73)]('-\x20'+_0x2c6648),_0x37ab58['length']>0x0&&(_0x5a925f[_0x14f23a(0x73)]('\x20\x20'+_0x37ab58[0x0]),_0x37ab58[_0x14f23a(0x90)]>0x1&&_0x5a925f[_0x14f23a(0x73)](_0x14f23a(0x75)+(_0x37ab58[_0x14f23a(0x90)]-0x1)+'\x20lines\x20of\x20description)'));}return _0x5a925f['join']('\x0a');}function filterGitDiff(_0x494dd9){const _0x1c5d0d=a0_0x46144c,_0x3099d8=_0x494dd9[_0x1c5d0d(0x9a)]('\x0a'),_0x28b004=[];let _0x4a33fc='',_0x1a2816=0x0,_0x35cd0e=0x0,_0x12b54f=[];const _0xf40c11=()=>{const _0x1ee2e2=_0x1c5d0d;if(_0x4a33fc&&(_0x1a2816>0x0||_0x35cd0e>0x0)){_0x28b004['push'](_0x1ee2e2(0x8f)+_0x4a33fc+'\x20(+'+_0x1a2816+'\x20-'+_0x35cd0e+')');const _0x47172e=0xa,_0x445058=_0x12b54f[_0x1ee2e2(0x99)](0x0,_0x47172e);for(const _0x427b5c of _0x445058){_0x28b004[_0x1ee2e2(0x73)]('\x20\x20'+_0x427b5c);}const _0x59eeb7=_0x1a2816+_0x35cd0e-_0x47172e;_0x59eeb7>0x0&&_0x28b004[_0x1ee2e2(0x73)]('\x20\x20...\x20+'+_0x59eeb7+_0x1ee2e2(0x93));}_0x1a2816=0x0,_0x35cd0e=0x0,_0x12b54f=[];};for(const _0x143e47 of _0x3099d8){if(_0x143e47[_0x1c5d0d(0x70)]('diff\x20--git')){_0xf40c11();const _0x35461c=_0x143e47['match'](/\sb\/(.+)$/);_0x4a33fc=_0x35461c?_0x35461c[0x1]:_0x1c5d0d(0x9e);}else{if(_0x143e47[_0x1c5d0d(0x70)]('+')&&!_0x143e47[_0x1c5d0d(0x70)]('+++'))_0x1a2816++,_0x12b54f[_0x1c5d0d(0x73)](_0x143e47);else _0x143e47[_0x1c5d0d(0x70)]('-')&&!_0x143e47[_0x1c5d0d(0x70)](_0x1c5d0d(0x72))&&(_0x35cd0e++,_0x12b54f['push'](_0x143e47));}}_0xf40c11();const _0x8fe38d=_0x28b004[_0x1c5d0d(0x9d)]('\x0a');return _0x8fe38d['length']>0x0?_0x8fe38d:'No\x20modifications';}
|
package/filters/go.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x20d19f=a0_0x4b8e;(function(_0x1938bc,_0x24fddf){const _0x15645d=a0_0x4b8e,_0x29a15d=_0x1938bc();while(!![]){try{const _0x3cd8d0=parseInt(_0x15645d(0x1e3))/0x1+-parseInt(_0x15645d(0x1e8))/0x2*(-parseInt(_0x15645d(0x1d6))/0x3)+parseInt(_0x15645d(0x1c6))/0x4+-parseInt(_0x15645d(0x1cd))/0x5+-parseInt(_0x15645d(0x1d3))/0x6+parseInt(_0x15645d(0x1d2))/0x7+parseInt(_0x15645d(0x1d0))/0x8*(-parseInt(_0x15645d(0x1dd))/0x9);if(_0x3cd8d0===_0x24fddf)break;else _0x29a15d['push'](_0x29a15d['shift']());}catch(_0x2d6c54){_0x29a15d['push'](_0x29a15d['shift']());}}}(a0_0x4e64,0x6b302));function a0_0x4b8e(_0x1a3a6e,_0xe49133){_0x1a3a6e=_0x1a3a6e-0x1be;const _0x4e640b=a0_0x4e64();let _0x4b8e1c=_0x4e640b[_0x1a3a6e];return _0x4b8e1c;}Object['defineProperty'](exports,a0_0x20d19f(0x1c7),{'value':!![]}),exports[a0_0x20d19f(0x1e7)]=filterGoTest,exports[a0_0x20d19f(0x1c9)]=filterGoVet;function filterGoTest(_0x2a0801){const _0x5705d4=a0_0x20d19f,_0x1c7701=_0x2a0801['split']('\x0a');let _0x1d9673=0x0,_0x32d28a=0x0,_0x5b74bf=0x0;const _0x3ba336=[],_0x43c900=[];let _0x50a10e=null;for(const _0x545b37 of _0x1c7701){const _0x357f12=_0x545b37[_0x5705d4(0x1c1)](),_0x2418f0=_0x357f12['match'](/^ok\s+\S+\s+[\d.]+s/);if(_0x2418f0){_0x43c900[_0x5705d4(0x1c8)](_0x357f12);continue;}const _0x55f905=_0x357f12[_0x5705d4(0x1c0)](/^FAIL\s+\S+/);if(_0x55f905){_0x43c900[_0x5705d4(0x1c8)](_0x357f12);continue;}const _0x5007ef=_0x357f12['match'](/^--- PASS:/);if(_0x5007ef){_0x1d9673++;continue;}const _0x26e048=_0x357f12[_0x5705d4(0x1c0)](/^--- FAIL:\s+(\S+)/);if(_0x26e048){if(_0x50a10e)_0x3ba336[_0x5705d4(0x1c8)](_0x50a10e);_0x50a10e={'name':_0x26e048[0x1],'lines':[]},_0x32d28a++;continue;}if(_0x357f12[_0x5705d4(0x1e1)](_0x5705d4(0x1df))){_0x5b74bf++;continue;}_0x50a10e&&_0x357f12[_0x5705d4(0x1ce)]>0x0&&!_0x357f12[_0x5705d4(0x1e1)](_0x5705d4(0x1c5))&&_0x50a10e[_0x5705d4(0x1ca)][_0x5705d4(0x1c8)](_0x545b37),_0x357f12[_0x5705d4(0x1e1)]('===\x20RUN')&&(_0x50a10e&&(_0x3ba336[_0x5705d4(0x1c8)](_0x50a10e),_0x50a10e=null));}if(_0x50a10e)_0x3ba336[_0x5705d4(0x1c8)](_0x50a10e);if(_0x1d9673===0x0&&_0x32d28a===0x0&&_0x5b74bf===0x0){if(_0x2a0801['includes'](_0x5705d4(0x1cc))&&!_0x2a0801[_0x5705d4(0x1cb)](_0x5705d4(0x1c3)))return _0x5705d4(0x1d4);if(_0x2a0801[_0x5705d4(0x1cb)](_0x5705d4(0x1d7)))return _0x5705d4(0x1d9);return _0x2a0801;}if(_0x32d28a===0x0){const _0x436daa=['Go\x20test:\x20'+_0x1d9673+_0x5705d4(0x1be)];if(_0x5b74bf>0x0)_0x436daa[_0x5705d4(0x1c8)](_0x5b74bf+_0x5705d4(0x1d5));return _0x436daa[_0x5705d4(0x1da)](',\x20');}const _0x2942ab=['Go\x20test:\x20'+_0x1d9673+_0x5705d4(0x1c2)+_0x32d28a+'\x20failed,\x20'+_0x5b74bf+'\x20skipped'];if(_0x3ba336[_0x5705d4(0x1ce)]>0x0){_0x2942ab[_0x5705d4(0x1c8)](_0x5705d4(0x1c4));const _0x39cc65=0x3;for(let _0x3c5fa5=0x0;_0x3c5fa5<Math[_0x5705d4(0x1e4)](_0x3ba336['length'],_0x39cc65);_0x3c5fa5++){const _0xf7d6d7=_0x3ba336[_0x3c5fa5];_0x2942ab[_0x5705d4(0x1c8)]('\x20\x20'+(_0x3c5fa5+0x1)+'.\x20'+_0xf7d6d7[_0x5705d4(0x1db)]);for(const _0x4745f0 of _0xf7d6d7[_0x5705d4(0x1ca)]['slice'](0x0,0x5)){_0x2942ab[_0x5705d4(0x1c8)](_0x5705d4(0x1d1)+_0x4745f0[_0x5705d4(0x1c1)]());}_0xf7d6d7[_0x5705d4(0x1ca)][_0x5705d4(0x1ce)]>0x5&&_0x2942ab[_0x5705d4(0x1c8)](_0x5705d4(0x1bf)+(_0xf7d6d7[_0x5705d4(0x1ca)][_0x5705d4(0x1ce)]-0x5)+_0x5705d4(0x1dc));}_0x3ba336[_0x5705d4(0x1ce)]>_0x39cc65&&_0x2942ab[_0x5705d4(0x1c8)]('\x20\x20...\x20+'+(_0x3ba336['length']-_0x39cc65)+_0x5705d4(0x1e2));}return _0x2942ab['join']('\x0a');}function a0_0x4e64(){const _0x16a3b6=['Go\x20vet:\x20no\x20issues\x20found','slice','filterGoTest','1000772ZRWutv','\x20passed','\x20\x20\x20\x20...\x20+','match','trim','\x20passed,\x20','FAIL','\x0aFailures:','===\x20RUN','2286128elUQUb','__esModule','push','filterGoVet','lines','includes','PASS','1864035DBpdII','length','split','104mIVeZN','\x20\x20\x20\x20','161049KxUKIQ','1713594vPPbIk','Go\x20test:\x20all\x20tests\x20passed','\x20skipped','3erClxg','no\x20test\x20files','\x20issues\x20found','Go\x20test:\x20no\x20test\x20files','join','name','\x20more\x20lines','175185fWEjpG','filter','---\x20SKIP:','\x20more\x20issues','startsWith','\x20more\x20failures','255568kgLRwS','min'];a0_0x4e64=function(){return _0x16a3b6;};return a0_0x4e64();}function filterGoVet(_0x24f90c){const _0x358894=a0_0x20d19f,_0x23eb2c=_0x24f90c[_0x358894(0x1cf)]('\x0a')[_0x358894(0x1de)](_0x45373d=>_0x45373d['trim']()[_0x358894(0x1ce)]>0x0);if(_0x23eb2c[_0x358894(0x1ce)]===0x0)return _0x358894(0x1e5);if(_0x23eb2c[_0x358894(0x1ce)]<=0x14)return _0x24f90c['trim']();const _0x274b31=['Go\x20vet:\x20'+_0x23eb2c[_0x358894(0x1ce)]+_0x358894(0x1d8)];return _0x274b31[_0x358894(0x1c8)](..._0x23eb2c[_0x358894(0x1e6)](0x0,0xa)),_0x23eb2c[_0x358894(0x1ce)]>0xa&&_0x274b31['push']('...\x20+'+(_0x23eb2c[_0x358894(0x1ce)]-0xa)+_0x358894(0x1e0)),_0x274b31['join']('\x0a');}
|
package/filters/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x131d1f=a0_0x5c41;(function(_0x104485,_0x349f23){const _0x5857fe=a0_0x5c41,_0x48e762=_0x104485();while(!![]){try{const _0x29a320=parseInt(_0x5857fe(0x1b8))/0x1*(parseInt(_0x5857fe(0x20e))/0x2)+-parseInt(_0x5857fe(0x1ae))/0x3+-parseInt(_0x5857fe(0x202))/0x4+parseInt(_0x5857fe(0x1b9))/0x5*(parseInt(_0x5857fe(0x1cd))/0x6)+-parseInt(_0x5857fe(0x1fa))/0x7+-parseInt(_0x5857fe(0x209))/0x8+-parseInt(_0x5857fe(0x211))/0x9*(-parseInt(_0x5857fe(0x20c))/0xa);if(_0x29a320===_0x349f23)break;else _0x48e762['push'](_0x48e762['shift']());}catch(_0x322cdb){_0x48e762['push'](_0x48e762['shift']());}}}(a0_0x56d8,0xa2d12));Object[a0_0x131d1f(0x1ea)](exports,a0_0x131d1f(0x1f2),{'value':!![]}),exports[a0_0x131d1f(0x1d9)]=exports['lastRedactAudit']=void 0x0,exports[a0_0x131d1f(0x1cc)]=compressOutput,exports['rewriteCommand']=rewriteCommand;const generic_1=require(a0_0x131d1f(0x1f6)),git_1=require(a0_0x131d1f(0x1b4)),python_1=require(a0_0x131d1f(0x1de)),js_1=require(a0_0x131d1f(0x1cb)),shell_1=require(a0_0x131d1f(0x210)),rust_1=require(a0_0x131d1f(0x1ff)),go_1=require('./go'),devops_1=require(a0_0x131d1f(0x1e1)),redactor_1=require(a0_0x131d1f(0x1ba)),tracker_1=require(a0_0x131d1f(0x1ce));function a0_0x5c41(_0x423840,_0x4c0993){_0x423840=_0x423840-0x1ad;const _0x56d82b=a0_0x56d8();let _0x5c4158=_0x56d82b[_0x423840];return _0x5c4158;}exports[a0_0x131d1f(0x1af)]={'secretsFound':0x0,'secretTypes':[]},exports[a0_0x131d1f(0x1d9)]=[];function isFeatureEnabled(_0x1a6c79){const _0x41c5c6=a0_0x131d1f;try{const _0x155e88=tracker_1[_0x41c5c6(0x219)][_0x41c5c6(0x1eb)](),_0x24ca0b=_0x155e88[_0x41c5c6(0x1b5)];if(!_0x24ca0b||_0x24ca0b[_0x1a6c79]===undefined)return!![];return _0x24ca0b[_0x1a6c79]!==![];}catch{return!![];}}function compressOutput(_0xeb68b3,_0x36438b,_0x2c2763,_0x3ff10a=!![]){const _0x4d3d1b=a0_0x131d1f,_0x376ef5=_0xeb68b3[_0x4d3d1b(0x1d1)]();let _0x4da9ae=_0x36438b;_0x2c2763[_0x4d3d1b(0x1d1)]()[_0x4d3d1b(0x20b)]>0x0&&(_0x4da9ae=_0x36438b+'\x0a'+_0x2c2763);let _0x1e44f2=isFeatureEnabled(_0x4d3d1b(0x1c6))?(0x0,generic_1[_0x4d3d1b(0x1d6)])(_0x4da9ae):_0x4da9ae;const _0x4ca25d=[];if(_0x1e44f2['length']<_0x4da9ae[_0x4d3d1b(0x20b)])_0x4ca25d[_0x4d3d1b(0x1d3)](_0x4d3d1b(0x1c6));const _0x1ce4d2=(_0x236d58,_0x1b1521)=>{const _0x211800=_0x4d3d1b;return _0x4ca25d[_0x211800(0x1d3)](_0x236d58),exports['lastFeatures']=_0x4ca25d,_0x1b1521;};if(_0x3ff10a&&isFeatureEnabled('redact')){const _0x2ce57c=redactor_1[_0x4d3d1b(0x200)][_0x4d3d1b(0x215)](_0x1e44f2);_0x1e44f2=_0x2ce57c[_0x4d3d1b(0x1b6)],exports[_0x4d3d1b(0x1af)]={'secretsFound':_0x2ce57c[_0x4d3d1b(0x204)],'secretTypes':_0x2ce57c[_0x4d3d1b(0x213)]};if(_0x2ce57c[_0x4d3d1b(0x204)]>0x0)_0x4ca25d[_0x4d3d1b(0x1d3)](_0x4d3d1b(0x1c3));}else exports[_0x4d3d1b(0x1af)]={'secretsFound':0x0,'secretTypes':[]};const _0x2df6f9=_0x376ef5[_0x4d3d1b(0x1b3)](),_0xd881aa=isFeatureEnabled(_0x4d3d1b(0x1d5));try{if(_0xd881aa){if(_0x2df6f9[_0x4d3d1b(0x1fb)](_0x4d3d1b(0x206))||_0x2df6f9[_0x4d3d1b(0x1fb)](_0x4d3d1b(0x1f4)))return _0x1ce4d2(_0x4d3d1b(0x1d5),(0x0,git_1[_0x4d3d1b(0x1e7)])(_0x1e44f2));if(_0x2df6f9[_0x4d3d1b(0x1fb)](_0x4d3d1b(0x1ca))||_0x2df6f9[_0x4d3d1b(0x1fb)](_0x4d3d1b(0x201)))return _0x1ce4d2(_0x4d3d1b(0x1d5),(0x0,git_1[_0x4d3d1b(0x1c7)])(_0x1e44f2));if(_0x2df6f9['includes'](_0x4d3d1b(0x218))||_0x2df6f9['includes']('git\x20show')||_0x2df6f9['includes'](_0x4d3d1b(0x205)))return _0x1ce4d2('filter',(0x0,git_1['filterGitDiff'])(_0x1e44f2));if(_0x2df6f9[_0x4d3d1b(0x1fb)]('pytest')||_0x2df6f9[_0x4d3d1b(0x1f9)](/python3?\s+-m\s+pytest/))return _0x1ce4d2(_0x4d3d1b(0x1d5),(0x0,python_1['filterPytest'])(_0x1e44f2));if(_0x2df6f9[_0x4d3d1b(0x1fb)](_0x4d3d1b(0x20a))||_0x2df6f9['includes'](_0x4d3d1b(0x1dc)))return _0x1ce4d2(_0x4d3d1b(0x1d5),(0x0,python_1[_0x4d3d1b(0x1c9)])(_0x1e44f2));if(_0x2df6f9[_0x4d3d1b(0x1fb)](_0x4d3d1b(0x1c1))||_0x2df6f9[_0x4d3d1b(0x1fb)](_0x4d3d1b(0x1e3)))return _0x1ce4d2(_0x4d3d1b(0x1d5),(0x0,devops_1['filterRuff'])(_0x1e44f2));if(_0x2df6f9[_0x4d3d1b(0x1fb)]('npm\x20install')||_0x2df6f9[_0x4d3d1b(0x1fb)](_0x4d3d1b(0x217))||_0x2df6f9[_0x4d3d1b(0x1ee)](_0x4d3d1b(0x1d4))||_0x2df6f9[_0x4d3d1b(0x1fb)](_0x4d3d1b(0x1b2))||_0x2df6f9['includes'](_0x4d3d1b(0x1db)))return _0x1ce4d2(_0x4d3d1b(0x1d5),(0x0,js_1[_0x4d3d1b(0x1c2)])(_0x1e44f2));if(_0x2df6f9['includes'](_0x4d3d1b(0x1bb))||_0x2df6f9[_0x4d3d1b(0x1fb)](_0x4d3d1b(0x1b0)))return _0x1ce4d2(_0x4d3d1b(0x1d5),(0x0,js_1['filterJestVitest'])(_0x1e44f2));if(_0x2df6f9[_0x4d3d1b(0x1fb)](_0x4d3d1b(0x1e8))||_0x2df6f9[_0x4d3d1b(0x1fb)]('pnpm\x20test')||_0x2df6f9['includes'](_0x4d3d1b(0x1c5))||_0x2df6f9['includes'](_0x4d3d1b(0x1be)))return _0x1ce4d2('filter',(0x0,js_1[_0x4d3d1b(0x1f3)])(_0x1e44f2));if(_0x2df6f9[_0x4d3d1b(0x1fb)](_0x4d3d1b(0x203)))return _0x1ce4d2('filter',(0x0,rust_1[_0x4d3d1b(0x1cf)])(_0x1e44f2));if(_0x2df6f9['includes'](_0x4d3d1b(0x1e9))||_0x2df6f9[_0x4d3d1b(0x1fb)](_0x4d3d1b(0x20d))||_0x2df6f9['includes'](_0x4d3d1b(0x214)))return _0x1ce4d2(_0x4d3d1b(0x1d5),(0x0,rust_1[_0x4d3d1b(0x1ec)])(_0x1e44f2));if(_0x2df6f9[_0x4d3d1b(0x1fb)]('go\x20test'))return _0x1ce4d2(_0x4d3d1b(0x1d5),(0x0,go_1[_0x4d3d1b(0x1da)])(_0x1e44f2));if(_0x2df6f9['includes']('go\x20vet'))return _0x1ce4d2(_0x4d3d1b(0x1d5),(0x0,go_1['filterGoVet'])(_0x1e44f2));if(_0x2df6f9[_0x4d3d1b(0x1f9)](/docker\s+ps/))return _0x1ce4d2('filter',(0x0,devops_1[_0x4d3d1b(0x1df)])(_0x1e44f2));if(_0x2df6f9[_0x4d3d1b(0x1f9)](/docker\s+images/))return _0x1ce4d2(_0x4d3d1b(0x1d5),(0x0,devops_1[_0x4d3d1b(0x207)])(_0x1e44f2));if(_0x2df6f9[_0x4d3d1b(0x1f9)](/docker\s+logs/))return _0x1ce4d2(_0x4d3d1b(0x1d5),(0x0,devops_1[_0x4d3d1b(0x1bc)])(_0x1e44f2));if(_0x2df6f9[_0x4d3d1b(0x1fb)](_0x4d3d1b(0x1ef))){const _0x2c9f59=_0x2df6f9[_0x4d3d1b(0x1f9)](/kubectl\s+(get|logs|describe|apply)/),_0x1e1453=_0x2c9f59?_0x2c9f59[0x1]:_0x4d3d1b(0x1fc);return _0x1ce4d2(_0x4d3d1b(0x1d5),(0x0,devops_1['filterKubectl'])(_0x1e44f2,_0x1e1453));}if(_0x2df6f9[_0x4d3d1b(0x1f9)](/^(ls|dir)(\s|$)/)||_0x2df6f9[_0x4d3d1b(0x1fb)](_0x4d3d1b(0x1d2))||_0x2df6f9[_0x4d3d1b(0x1ee)](_0x4d3d1b(0x1d0)))return _0x1ce4d2('filter',(0x0,shell_1[_0x4d3d1b(0x1c4)])(_0x1e44f2));if(_0x2df6f9[_0x4d3d1b(0x1f9)](/^tree(\s|$)/)||_0x2df6f9[_0x4d3d1b(0x1fb)](_0x4d3d1b(0x1d7))||_0x2df6f9[_0x4d3d1b(0x1ee)]('\x20tree'))return _0x1ce4d2(_0x4d3d1b(0x1d5),(0x0,shell_1[_0x4d3d1b(0x21c)])(_0x1e44f2));if(_0x2df6f9[_0x4d3d1b(0x1f9)](/^(cat|head|tail|read|bat)(\s|$)/)){const _0xe4a577=(0x0,shell_1[_0x4d3d1b(0x1c0)])(_0x1e44f2,_0x376ef5);if(_0xe4a577[_0x4d3d1b(0x1fb)](_0x4d3d1b(0x1ed)))_0x4ca25d[_0x4d3d1b(0x1d3)]('lock');else{if(_0xe4a577[_0x4d3d1b(0x1fb)]('[binary')||_0xe4a577['includes'](_0x4d3d1b(0x1e4)))_0x4ca25d[_0x4d3d1b(0x1d3)](_0x4d3d1b(0x1e2));else{if(_0xe4a577[_0x4d3d1b(0x1fb)](_0x4d3d1b(0x216)))_0x4ca25d[_0x4d3d1b(0x1d3)](_0x4d3d1b(0x21a));else{if(_0xe4a577[_0x4d3d1b(0x1fb)]('|\x20')&&_0xe4a577[_0x4d3d1b(0x1fb)](_0x4d3d1b(0x1bd))&&_0xe4a577[_0x4d3d1b(0x20b)]<_0x1e44f2[_0x4d3d1b(0x20b)]*0.5)_0x4ca25d['push'](_0x4d3d1b(0x1e5));else{if(_0xe4a577[_0x4d3d1b(0x1fb)]('lines\x20truncated'))_0x4ca25d[_0x4d3d1b(0x1d3)](_0x4d3d1b(0x1d5));}}}}if(_0xe4a577[_0x4d3d1b(0x20b)]<_0x1e44f2[_0x4d3d1b(0x20b)]&&!_0x4ca25d[_0x4d3d1b(0x1f7)](_0x37b7d9=>_0x37b7d9!==_0x4d3d1b(0x1c6)&&_0x37b7d9!==_0x4d3d1b(0x1c3)))_0x4ca25d[_0x4d3d1b(0x1d3)]('filter');return exports[_0x4d3d1b(0x1d9)]=_0x4ca25d,_0xe4a577;}if(_0x2df6f9[_0x4d3d1b(0x1f9)](/^find(\s|$)/))return _0x1ce4d2(_0x4d3d1b(0x1d5),(0x0,shell_1[_0x4d3d1b(0x1f0)])(_0x1e44f2));if(_0x2df6f9[_0x4d3d1b(0x1f9)](/^(grep|rg|ripgrep)(\s|$)/))return _0x1ce4d2('filter',(0x0,shell_1['filterGrep'])(_0x1e44f2));}}catch(_0x2479c4){}return isFeatureEnabled('whitespace')&&(_0x1e44f2=(0x0,generic_1['collapseWhitespace'])(_0x1e44f2),_0x4ca25d['push']('whitespace')),_0x1e44f2=(0x0,generic_1[_0x4d3d1b(0x212)])(_0x1e44f2),_0x1e44f2=(0x0,generic_1[_0x4d3d1b(0x1ad)])(_0x1e44f2,0x4e20),exports[_0x4d3d1b(0x1d9)]=_0x4ca25d,_0x1e44f2;}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_0x131d1f(0x1b7)},{'pattern':/^gh\s+(pr|issue|run|repo|api|release)/,'prefix':a0_0x131d1f(0x21b)},{'pattern':/^glab\s+(mr|issue|ci|pipeline|api|release)/,'prefix':a0_0x131d1f(0x1e6)},{'pattern':/^cargo\s+(build|test|clippy|check|fmt|install)/,'prefix':a0_0x131d1f(0x1fe)},{'pattern':/^pnpm\s+(exec|i|install|list|ls|outdated|run|run-script)/,'prefix':a0_0x131d1f(0x1f1)},{'pattern':/^npm\s+(exec|run|run-script|rum|urn|x|test)(\s|$)/,'prefix':a0_0x131d1f(0x1c8)},{'pattern':/^npx\s+/,'prefix':a0_0x131d1f(0x20f)},{'pattern':/^(cat|head|tail)\s+/,'prefix':'trim\x20read'},{'pattern':/^(rg|grep)\s+/,'prefix':a0_0x131d1f(0x1bf)},{'pattern':/^ls(\s|$)/,'prefix':'trim\x20ls'},{'pattern':/^tree(\s|$)/,'prefix':a0_0x131d1f(0x208)},{'pattern':/^find\s+/,'prefix':a0_0x131d1f(0x1d8)},{'pattern':/^docker\s+(ps|images|logs|run|exec|build|compose)/,'prefix':a0_0x131d1f(0x1f5)},{'pattern':/^kubectl\s+(get|logs|describe|apply)/,'prefix':a0_0x131d1f(0x1b1)},{'pattern':/^(python3?\s+-m\s+)?pytest(\s|$)/,'prefix':a0_0x131d1f(0x1e0)},{'pattern':/^ruff\s+(check|format)/,'prefix':a0_0x131d1f(0x1fd)},{'pattern':/^(pip3?|uv\s+pip)\s+(list|outdated|install|show)/,'prefix':'trim\x20pip'},{'pattern':/^go\s+(test|build|vet)/,'prefix':'trim\x20go'}];function rewriteCommand(_0x1cf00c){const _0x105f6f=a0_0x131d1f,_0x117fe6=_0x1cf00c['trim']();if(_0x117fe6['startsWith'](_0x105f6f(0x1dd)))return _0x117fe6;for(const _0x1f95ef of REWRITE_RULES){if(_0x1f95ef[_0x105f6f(0x1f8)]['test'](_0x117fe6))return _0x105f6f(0x1dd)+_0x117fe6;}return _0x117fe6;}function a0_0x56d8(){const _0x34855e=['6dDSNIP','../tracker','filterCargoTest','\x20ls','trim','\x20ls\x20','push','npm\x20i','filter','stripAnsi','\x20tree\x20','trim\x20find','lastFeatures','filterGoTest','yarn\x20install','pip3\x20install','trim\x20','./python','filterDockerPs','trim\x20pytest','./devops','binary','ruff\x20','[minified\x20file]','json_crusher','trim\x20glab','filterGitStatus','npm\x20test','cargo\x20build','defineProperty','getConfig','filterCargoBuild','[lock\x20file]','endsWith','kubectl','filterFind','trim\x20pnpm','__esModule','filterJestVitest','yadm\x20status','trim\x20docker','./generic','some','pattern','match','4040575iZakRS','includes','get','trim\x20ruff','trim\x20cargo','./rust','redactor','yadm\x20log','4124368DIVHpn','cargo\x20test','secretsFound','yadm\x20diff','git\x20status','filterDockerImages','trim\x20tree','5416640gnNQCg','pip\x20install','length','40WHqfHo','cargo\x20check','281306ZXpJIG','trim\x20npx','./shell','4792518wMOLYM','collapseDuplicates','secretTypes','cargo\x20clippy','redactWithAudit','[code\x20skeleton]','npm\x20i\x20','git\x20diff','tracker','skeleton','trim\x20gh','filterTree','softTruncate','1394643VUCxcr','lastRedactAudit','vitest','trim\x20kubectl','pnpm\x20install','toLowerCase','./git','features_enabled','text','trim\x20git','3fkmbbe','4326045YBPLbG','../redactor','jest','filterDockerLogs','---','npm\x20run\x20test','trim\x20grep','filterCat','ruff\x20check','filterNpmInstall','redact','filterLs','yarn\x20test','ansi_strip','filterGitLog','trim\x20npm','filterPipInstall','git\x20log','./js','compressOutput'];a0_0x56d8=function(){return _0x34855e;};return a0_0x56d8();}
|
|
1
|
+
'use strict';const a0_0x978ce5=a0_0x3f8c;(function(_0x55c4b6,_0x525665){const _0x4e08ba=a0_0x3f8c,_0x514f2f=_0x55c4b6();while(!![]){try{const _0x14423e=parseInt(_0x4e08ba(0xf0))/0x1+parseInt(_0x4e08ba(0xe8))/0x2+-parseInt(_0x4e08ba(0x12e))/0x3*(parseInt(_0x4e08ba(0xfa))/0x4)+parseInt(_0x4e08ba(0x121))/0x5+-parseInt(_0x4e08ba(0x12a))/0x6+-parseInt(_0x4e08ba(0xdf))/0x7+-parseInt(_0x4e08ba(0x147))/0x8*(-parseInt(_0x4e08ba(0x142))/0x9);if(_0x14423e===_0x525665)break;else _0x514f2f['push'](_0x514f2f['shift']());}catch(_0x1f8ba4){_0x514f2f['push'](_0x514f2f['shift']());}}}(a0_0x8923,0x27646));function a0_0x3f8c(_0x2a584a,_0x20a5cd){_0x2a584a=_0x2a584a-0xdd;const _0x89233c=a0_0x8923();let _0x3f8c52=_0x89233c[_0x2a584a];return _0x3f8c52;}Object['defineProperty'](exports,a0_0x978ce5(0xf1),{'value':!![]}),exports[a0_0x978ce5(0x13e)]=exports[a0_0x978ce5(0x101)]=void 0x0,exports[a0_0x978ce5(0xde)]=compressOutput,exports['rewriteCommand']=rewriteCommand;const generic_1=require(a0_0x978ce5(0x120)),git_1=require(a0_0x978ce5(0x11a)),python_1=require(a0_0x978ce5(0x11d)),js_1=require('./js'),shell_1=require(a0_0x978ce5(0xed)),rust_1=require(a0_0x978ce5(0x10e)),go_1=require(a0_0x978ce5(0xe9)),devops_1=require(a0_0x978ce5(0x10d)),redactor_1=require(a0_0x978ce5(0xeb)),tracker_1=require('../tracker');exports[a0_0x978ce5(0x101)]={'secretsFound':0x0,'secretTypes':[]},exports[a0_0x978ce5(0x13e)]=[];function isFeatureEnabled(_0x4dbd49){const _0x5b5016=a0_0x978ce5;try{const _0x37e987=tracker_1[_0x5b5016(0x10f)][_0x5b5016(0x127)](),_0x5f876a=_0x37e987['features_enabled'];if(!_0x5f876a||_0x5f876a[_0x4dbd49]===undefined)return!![];return _0x5f876a[_0x4dbd49]!==![];}catch{return!![];}}function compressOutput(_0x4140b3,_0x2065eb,_0x59a807,_0x5819f4=!![]){const _0x616ef8=a0_0x978ce5,_0x587eb5=_0x4140b3[_0x616ef8(0x136)]();let _0xcb95e=_0x2065eb;_0x59a807[_0x616ef8(0x136)]()[_0x616ef8(0x138)]>0x0&&(_0xcb95e=_0x2065eb+'\x0a'+_0x59a807);let _0x528394=isFeatureEnabled(_0x616ef8(0x11e))?(0x0,generic_1[_0x616ef8(0x11c)])(_0xcb95e):_0xcb95e;const _0x164af3=[];if(_0x528394[_0x616ef8(0x138)]<_0xcb95e[_0x616ef8(0x138)])_0x164af3[_0x616ef8(0x125)](_0x616ef8(0x11e));const _0x1edfaf=(_0x23329e,_0x3fae27)=>{const _0x4e2bcd=_0x616ef8;return _0x164af3[_0x4e2bcd(0x125)](_0x23329e),exports[_0x4e2bcd(0x13e)]=_0x164af3,_0x3fae27;};if(_0x5819f4&&isFeatureEnabled('redact')){const _0x59dd36=redactor_1[_0x616ef8(0x13b)][_0x616ef8(0x10b)](_0x528394);_0x528394=_0x59dd36[_0x616ef8(0x140)],exports['lastRedactAudit']={'secretsFound':_0x59dd36[_0x616ef8(0x119)],'secretTypes':_0x59dd36[_0x616ef8(0x126)]};if(_0x59dd36['secretsFound']>0x0)_0x164af3[_0x616ef8(0x125)]('redact');}else exports[_0x616ef8(0x101)]={'secretsFound':0x0,'secretTypes':[]};const _0x4c0735=_0x587eb5[_0x616ef8(0x113)](),_0x19c46a=isFeatureEnabled(_0x616ef8(0x13c));try{if(_0x19c46a){if(_0x4c0735[_0x616ef8(0x14d)](_0x616ef8(0x14b))||_0x4c0735[_0x616ef8(0x14d)](_0x616ef8(0x12d)))return _0x1edfaf('filter',(0x0,git_1[_0x616ef8(0x134)])(_0x528394));if(_0x4c0735[_0x616ef8(0x14d)](_0x616ef8(0x131))||_0x4c0735['includes'](_0x616ef8(0xe2)))return _0x1edfaf(_0x616ef8(0x13c),(0x0,git_1['filterGitLog'])(_0x528394));if(_0x4c0735[_0x616ef8(0x14d)](_0x616ef8(0x146))||_0x4c0735[_0x616ef8(0x14d)](_0x616ef8(0xe7))||_0x4c0735['includes'](_0x616ef8(0x130)))return _0x1edfaf('filter',(0x0,git_1[_0x616ef8(0xfc)])(_0x528394));if(_0x4c0735[_0x616ef8(0x14d)](_0x616ef8(0x12f))||_0x4c0735[_0x616ef8(0xe0)](/python3?\s+-m\s+pytest/))return _0x1edfaf('filter',(0x0,python_1[_0x616ef8(0x11b)])(_0x528394));if(_0x4c0735[_0x616ef8(0x14d)](_0x616ef8(0x112))||_0x4c0735['includes'](_0x616ef8(0xe3)))return _0x1edfaf(_0x616ef8(0x13c),(0x0,python_1[_0x616ef8(0x104)])(_0x528394));if(_0x4c0735['includes'](_0x616ef8(0x12b))||_0x4c0735[_0x616ef8(0x14d)](_0x616ef8(0x143)))return _0x1edfaf('filter',(0x0,devops_1[_0x616ef8(0xf9)])(_0x528394));if(_0x4c0735['includes'](_0x616ef8(0xf2))||_0x4c0735[_0x616ef8(0x14d)]('npm\x20i\x20')||_0x4c0735['endsWith'](_0x616ef8(0x107))||_0x4c0735[_0x616ef8(0x14d)](_0x616ef8(0x122))||_0x4c0735['includes'](_0x616ef8(0x105)))return _0x1edfaf(_0x616ef8(0x13c),(0x0,js_1[_0x616ef8(0x144)])(_0x528394));if(_0x4c0735[_0x616ef8(0x14d)](_0x616ef8(0x132))||_0x4c0735[_0x616ef8(0x14d)]('vitest'))return _0x1edfaf('filter',(0x0,js_1[_0x616ef8(0x117)])(_0x528394));if(_0x4c0735[_0x616ef8(0x14d)]('npm\x20test')||_0x4c0735['includes']('pnpm\x20test')||_0x4c0735['includes'](_0x616ef8(0xee))||_0x4c0735[_0x616ef8(0x14d)](_0x616ef8(0x108)))return _0x1edfaf(_0x616ef8(0x13c),(0x0,js_1[_0x616ef8(0x117)])(_0x528394));if(_0x4c0735['includes']('cargo\x20test'))return _0x1edfaf(_0x616ef8(0x13c),(0x0,rust_1[_0x616ef8(0x149)])(_0x528394));if(_0x4c0735[_0x616ef8(0x14d)](_0x616ef8(0x14c))||_0x4c0735['includes'](_0x616ef8(0xdd))||_0x4c0735[_0x616ef8(0x14d)](_0x616ef8(0xfb)))return _0x1edfaf(_0x616ef8(0x13c),(0x0,rust_1[_0x616ef8(0x145)])(_0x528394));if(_0x4c0735[_0x616ef8(0x14d)]('go\x20test'))return _0x1edfaf(_0x616ef8(0x13c),(0x0,go_1[_0x616ef8(0x102)])(_0x528394));if(_0x4c0735[_0x616ef8(0x14d)](_0x616ef8(0x124)))return _0x1edfaf(_0x616ef8(0x13c),(0x0,go_1['filterGoVet'])(_0x528394));if(_0x4c0735[_0x616ef8(0xe0)](/docker\s+ps/))return _0x1edfaf('filter',(0x0,devops_1[_0x616ef8(0xf4)])(_0x528394));if(_0x4c0735[_0x616ef8(0xe0)](/docker\s+images/))return _0x1edfaf(_0x616ef8(0x13c),(0x0,devops_1[_0x616ef8(0x148)])(_0x528394));if(_0x4c0735['match'](/docker\s+logs/))return _0x1edfaf(_0x616ef8(0x13c),(0x0,devops_1['filterDockerLogs'])(_0x528394));if(_0x4c0735['includes'](_0x616ef8(0xea))){const _0x4d3492=_0x4c0735[_0x616ef8(0xe0)](/kubectl\s+(get|logs|describe|apply)/),_0xca8aca=_0x4d3492?_0x4d3492[0x1]:_0x616ef8(0x129);return _0x1edfaf('filter',(0x0,devops_1[_0x616ef8(0x103)])(_0x528394,_0xca8aca));}if(_0x4c0735[_0x616ef8(0xe0)](/^(ls|dir)(\s|$)/)||_0x4c0735[_0x616ef8(0x14d)]('\x20ls\x20')||_0x4c0735[_0x616ef8(0x12c)](_0x616ef8(0xe5)))return _0x1edfaf(_0x616ef8(0x13c),(0x0,shell_1['filterLs'])(_0x528394));if(_0x4c0735[_0x616ef8(0xe0)](/^tree(\s|$)/)||_0x4c0735['includes'](_0x616ef8(0x100))||_0x4c0735[_0x616ef8(0x12c)](_0x616ef8(0xf8)))return _0x1edfaf(_0x616ef8(0x13c),(0x0,shell_1[_0x616ef8(0xe6)])(_0x528394));if(_0x4c0735['match'](/^(cat|head|tail|read|bat)(\s|$)/)){const _0x204df1=(0x0,shell_1['filterCat'])(_0x528394,_0x587eb5);if(_0x204df1[_0x616ef8(0x14d)](_0x616ef8(0x13f)))_0x164af3['push'](_0x616ef8(0x123));else{if(_0x204df1[_0x616ef8(0x14d)]('[binary')||_0x204df1[_0x616ef8(0x14d)]('[minified\x20file]'))_0x164af3['push'](_0x616ef8(0x106));else{if(_0x204df1[_0x616ef8(0x14d)](_0x616ef8(0x13a)))_0x164af3[_0x616ef8(0x125)](_0x616ef8(0xf5));else{if(_0x204df1[_0x616ef8(0x14d)]('|\x20')&&_0x204df1[_0x616ef8(0x14d)](_0x616ef8(0x14a))&&_0x204df1[_0x616ef8(0x138)]<_0x528394[_0x616ef8(0x138)]*0.5)_0x164af3[_0x616ef8(0x125)](_0x616ef8(0xe1));else{if(_0x204df1['includes'](_0x616ef8(0xec)))_0x164af3['push'](_0x616ef8(0x13c));}}}}if(_0x204df1[_0x616ef8(0x138)]<_0x528394[_0x616ef8(0x138)]&&!_0x164af3['some'](_0x260739=>_0x260739!==_0x616ef8(0x11e)&&_0x260739!==_0x616ef8(0x116)))_0x164af3[_0x616ef8(0x125)](_0x616ef8(0x13c));return exports[_0x616ef8(0x13e)]=_0x164af3,_0x204df1;}if(_0x4c0735[_0x616ef8(0xe0)](/^find(\s|$)/))return _0x1edfaf('filter',(0x0,shell_1[_0x616ef8(0xfe)])(_0x528394));if(_0x4c0735['match'](/^(grep|rg|ripgrep)(\s|$)/))return _0x1edfaf(_0x616ef8(0x13c),(0x0,shell_1[_0x616ef8(0xf7)])(_0x528394));}}catch(_0xccf632){}return isFeatureEnabled('whitespace')&&(_0x528394=(0x0,generic_1['collapseWhitespace'])(_0x528394),_0x164af3[_0x616ef8(0x125)](_0x616ef8(0x139))),_0x528394=(0x0,generic_1['collapseDuplicates'])(_0x528394),_0x528394=(0x0,generic_1[_0x616ef8(0x11f)])(_0x528394,0x4e20),exports[_0x616ef8(0x13e)]=_0x164af3,_0x528394;}function a0_0x8923(){const _0x4507df=['[lock\x20file]','text','trim\x20grep','4025772FDwzRe','ruff\x20','filterNpmInstall','filterCargoBuild','git\x20diff','8QubydE','filterDockerImages','filterCargoTest','---','git\x20status','cargo\x20build','includes','cargo\x20check','compressOutput','2141951MBoPbV','match','json_crusher','yadm\x20log','pip3\x20install','trim\x20pip','\x20ls','filterTree','git\x20show','132448EGazhY','./go','kubectl','../redactor','lines\x20truncated','./shell','yarn\x20test','trim\x20pnpm','240150NqMzQy','__esModule','npm\x20install','trim\x20gh','filterDockerPs','skeleton','trim\x20cargo','filterGrep','\x20tree','filterRuff','12hJIqdx','cargo\x20clippy','filterGitDiff','trim\x20git','filterFind','trim\x20pytest','\x20tree\x20','lastRedactAudit','filterGoTest','filterKubectl','filterPipInstall','yarn\x20install','binary','npm\x20i','npm\x20run\x20test','trim\x20tree','trim\x20glab','redactWithAudit','trim\x20docker','./devops','./rust','tracker','trim\x20','trim\x20find','pip\x20install','toLowerCase','trim\x20ruff','test','redact','filterJestVitest','trim\x20read','secretsFound','./git','filterPytest','stripAnsi','./python','ansi_strip','softTruncate','./generic','528740ZCdImy','pnpm\x20install','lock','go\x20vet','push','secretTypes','getConfig','trim\x20go','get','1671024dnRyhQ','ruff\x20check','endsWith','yadm\x20status','113583Bavhky','pytest','yadm\x20diff','git\x20log','jest','trim\x20npm','filterGitStatus','trim\x20kubectl','trim','pattern','length','whitespace','[code\x20skeleton]','redactor','filter','trim\x20ls','lastFeatures'];a0_0x8923=function(){return _0x4507df;};return a0_0x8923();}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_0x978ce5(0xfd)},{'pattern':/^gh\s+(pr|issue|run|repo|api|release)/,'prefix':a0_0x978ce5(0xf3)},{'pattern':/^glab\s+(mr|issue|ci|pipeline|api|release)/,'prefix':a0_0x978ce5(0x10a)},{'pattern':/^cargo\s+(build|test|clippy|check|fmt|install)/,'prefix':a0_0x978ce5(0xf6)},{'pattern':/^pnpm\s+(exec|i|install|list|ls|outdated|run|run-script)/,'prefix':a0_0x978ce5(0xef)},{'pattern':/^npm\s+(exec|run|run-script|rum|urn|x|test)(\s|$)/,'prefix':a0_0x978ce5(0x133)},{'pattern':/^npx\s+/,'prefix':'trim\x20npx'},{'pattern':/^(cat|head|tail)\s+/,'prefix':a0_0x978ce5(0x118)},{'pattern':/^(rg|grep)\s+/,'prefix':a0_0x978ce5(0x141)},{'pattern':/^ls(\s|$)/,'prefix':a0_0x978ce5(0x13d)},{'pattern':/^tree(\s|$)/,'prefix':a0_0x978ce5(0x109)},{'pattern':/^find\s+/,'prefix':a0_0x978ce5(0x111)},{'pattern':/^docker\s+(ps|images|logs|run|exec|build|compose)/,'prefix':a0_0x978ce5(0x10c)},{'pattern':/^kubectl\s+(get|logs|describe|apply)/,'prefix':a0_0x978ce5(0x135)},{'pattern':/^(python3?\s+-m\s+)?pytest(\s|$)/,'prefix':a0_0x978ce5(0xff)},{'pattern':/^ruff\s+(check|format)/,'prefix':a0_0x978ce5(0x114)},{'pattern':/^(pip3?|uv\s+pip)\s+(list|outdated|install|show)/,'prefix':a0_0x978ce5(0xe4)},{'pattern':/^go\s+(test|build|vet)/,'prefix':a0_0x978ce5(0x128)}];function rewriteCommand(_0x44823b){const _0x5c871f=a0_0x978ce5,_0x95657d=_0x44823b[_0x5c871f(0x136)]();if(_0x95657d['startsWith'](_0x5c871f(0x110)))return _0x95657d;for(const _0x348eed of REWRITE_RULES){if(_0x348eed[_0x5c871f(0x137)][_0x5c871f(0x115)](_0x95657d))return'trim\x20'+_0x95657d;}return _0x95657d;}
|
package/filters/js.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function a0_0x38db(){const _0x32674b=['filterNpmInstall','FAIL','1068eBQPsQ','includes','3135268yiqEoh','trim','split','\x20passed,\x20','slice','NPM:\x20Packages\x20verified/installed\x20successfully','\x20lines\x20of\x20trace\x20details\x20truncated)','all','join','PASS','3784107pGBiPu','removed\x20','186011bcKuIS','\x0aFailures:','1281220EJbqvl','startsWith','added\x20','match','defineProperty','3798016aJLpeu','Tests:','36505RhmCZB','Test\x20Runner:\x20','\x20failed\x20(','Test\x20Suites:','__esModule','filterJestVitest','replace','push','\x20passed','\x20\x20...\x20(','length','40KJjGXE','20489427acGSrK'];a0_0x38db=function(){return _0x32674b;};return a0_0x38db();}const a0_0x27f5d3=a0_0x214e;(function(_0x3b191f,_0x51f11e){const _0x4b5940=a0_0x214e,_0x397a76=_0x3b191f();while(!![]){try{const _0x3a7614=parseInt(_0x4b5940(0x212))/0x1+-parseInt(_0x4b5940(0x204))/0x2+parseInt(_0x4b5940(0x20e))/0x3+parseInt(_0x4b5940(0x1f1))/0x4+-parseInt(_0x4b5940(0x1f3))/0x5*(-parseInt(_0x4b5940(0x202))/0x6)+parseInt(_0x4b5940(0x210))/0x7*(-parseInt(_0x4b5940(0x1fe))/0x8)+-parseInt(_0x4b5940(0x1ff))/0x9;if(_0x3a7614===_0x51f11e)break;else _0x397a76['push'](_0x397a76['shift']());}catch(_0x1124ff){_0x397a76['push'](_0x397a76['shift']());}}}(a0_0x38db,0xc6de9));Object[a0_0x27f5d3(0x216)](exports,a0_0x27f5d3(0x1f7),{'value':!![]}),exports[a0_0x27f5d3(0x200)]=filterNpmInstall,exports[a0_0x27f5d3(0x1f8)]=filterJestVitest;function filterNpmInstall(_0x4b78cc){const _0x30a7dc=a0_0x27f5d3,_0x6affd=_0x4b78cc[_0x30a7dc(0x1f9)](/\r/g,'\x0a'),_0x4e2298=_0x6affd[_0x30a7dc(0x206)]('\x0a'),_0x46adca=[];for(const _0x40b894 of _0x4e2298){const _0x7e10df=_0x40b894[_0x30a7dc(0x205)]();(_0x7e10df[_0x30a7dc(0x203)](_0x30a7dc(0x214))||_0x7e10df[_0x30a7dc(0x203)](_0x30a7dc(0x20f))||_0x7e10df[_0x30a7dc(0x203)]('audited\x20')||_0x7e10df[_0x30a7dc(0x203)]('up\x20to\x20date')||_0x7e10df[_0x30a7dc(0x203)]('found\x20'))&&(!_0x7e10df[_0x30a7dc(0x203)]('%')&&!_0x7e10df[_0x30a7dc(0x213)]('⠋')&&!_0x7e10df[_0x30a7dc(0x213)]('⠙')&&_0x46adca[_0x30a7dc(0x1fa)](_0x7e10df));}const _0x45c520=_0x46adca[_0x30a7dc(0x20c)]('\x0a')[_0x30a7dc(0x205)]();return _0x45c520[_0x30a7dc(0x1fd)]>0x0?_0x45c520:_0x30a7dc(0x209);}function a0_0x214e(_0x3e9087,_0x15fa2f){_0x3e9087=_0x3e9087-0x1f1;const _0x38db83=a0_0x38db();let _0x214e64=_0x38db83[_0x3e9087];return _0x214e64;}function filterJestVitest(_0xa281c8){const _0x5e9fca=a0_0x27f5d3,_0x51ed4a=_0xa281c8[_0x5e9fca(0x206)]('\x0a');let _0x176b3c=0x0,_0x4c27b5=0x0,_0x37a769=0x0;const _0x4e1af1=[];let _0x32fbb0=![];for(const _0x4a44ef of _0x51ed4a){const _0x375549=_0x4a44ef[_0x5e9fca(0x205)]();if(_0x375549[_0x5e9fca(0x213)](_0x5e9fca(0x1f2))||_0x375549[_0x5e9fca(0x203)]('Test\x20Files:')){const _0x1bea3a=_0x375549['match'](/(\d+)\s+passed/),_0x40fedf=_0x375549[_0x5e9fca(0x215)](/(\d+)\s+failed/),_0x5597cf=_0x375549['match'](/(\d+)\s+total/);if(_0x1bea3a)_0x176b3c=parseInt(_0x1bea3a[0x1]);if(_0x40fedf)_0x4c27b5=parseInt(_0x40fedf[0x1]);if(_0x5597cf)_0x37a769=parseInt(_0x5597cf[0x1]);continue;}(_0x375549[_0x5e9fca(0x213)]('❯')||_0x375549['startsWith']('●')||_0x375549[_0x5e9fca(0x213)]('FAIL\x20\x20'))&&(_0x32fbb0=!![]),_0x32fbb0&&(_0x375549[_0x5e9fca(0x1fd)]>0x0&&!_0x375549[_0x5e9fca(0x213)](_0x5e9fca(0x1f6))&&!_0x375549[_0x5e9fca(0x213)](_0x5e9fca(0x1f2))&&_0x4e1af1[_0x5e9fca(0x1fa)](_0x4a44ef));}if(_0x37a769===0x0&&_0x176b3c===0x0&&_0x4c27b5===0x0){if(_0xa281c8[_0x5e9fca(0x203)](_0x5e9fca(0x20d))&&!_0xa281c8[_0x5e9fca(0x203)](_0x5e9fca(0x201))){const _0x20c05f=_0xa281c8[_0x5e9fca(0x215)](/(\d+)\s+passed/),_0x4e4e31=_0x20c05f?_0x20c05f[0x1]:_0x5e9fca(0x20b);return'Test\x20Runner:\x20'+_0x4e4e31+_0x5e9fca(0x1fb);}return _0xa281c8;}if(_0x4c27b5===0x0&&_0x176b3c>0x0)return _0x5e9fca(0x1f4)+_0x176b3c+'\x20passed';const _0x4b3ca7=['Test\x20Runner:\x20'+_0x176b3c+_0x5e9fca(0x207)+_0x4c27b5+_0x5e9fca(0x1f5)+_0x37a769+'\x20total)'];if(_0x4e1af1[_0x5e9fca(0x1fd)]>0x0){_0x4b3ca7['push'](_0x5e9fca(0x211));const _0x4e1645=0x19,_0x18fe65=_0x4e1af1[_0x5e9fca(0x208)](0x0,_0x4e1645);for(const _0x4f91a6 of _0x18fe65){_0x4b3ca7[_0x5e9fca(0x1fa)]('\x20\x20'+_0x4f91a6);}_0x4e1af1[_0x5e9fca(0x1fd)]>_0x4e1645&&_0x4b3ca7[_0x5e9fca(0x1fa)](_0x5e9fca(0x1fc)+(_0x4e1af1[_0x5e9fca(0x1fd)]-_0x4e1645)+_0x5e9fca(0x20a));}return _0x4b3ca7[_0x5e9fca(0x20c)]('\x0a');}
|
package/filters/python.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';function a0_0x3cb5(_0x9d0cdd,_0x596f8d){_0x9d0cdd=_0x9d0cdd-0x17a;const _0x505904=a0_0x5059();let _0x3cb567=_0x505904[_0x9d0cdd];return _0x3cb567;}const a0_0x409337=a0_0x3cb5;function a0_0x5059(){const _0x101249=['\x20\x20...\x20+','3881433MHdrmN','===\x20ERRORS\x20===','slice','join','7895840rqQuHQ','includes','defineProperty','===','\x20more\x20failures\x20truncated','1750152aTlcIk','Downloading','\x20xpassed\x20(warning!)','E\x20\x20\x20','.\x20[FAIL]\x20','6592996ykyAsf','\x0aFailures:','filter','filterPytest','match','Pytest:\x20','__esModule','7ObpOAr','Using\x20cached','startsWith','\x20xfailed','Pytest:\x20All\x20tests\x20passed','filterPipInstall','passed','\x20in\x20','===\x20short\x20test\x20summary\x20info\x20===','failed','\x20lines\x20of\x20stacktrace\x20truncated)','\x20skipped','764325wEJTbK','___','push','replace','2xDkqiB','1005385UCsrHg','length','\x20\x20\x20\x20...\x20(','trim','16890030srODVP','===\x20FAILURES\x20===','\x20passed','Requirement\x20already\x20satisfied','\x20failed','AssertionError:','Collecting'];a0_0x5059=function(){return _0x101249;};return a0_0x5059();}(function(_0x12d126,_0xecf5aa){const _0x398c85=a0_0x3cb5,_0x4d50e3=_0x12d126();while(!![]){try{const _0x4c3347=parseInt(_0x398c85(0x1a5))/0x1+parseInt(_0x398c85(0x1a4))/0x2*(-parseInt(_0x398c85(0x17f))/0x3)+parseInt(_0x398c85(0x18d))/0x4+parseInt(_0x398c85(0x1a0))/0x5+parseInt(_0x398c85(0x188))/0x6+-parseInt(_0x398c85(0x194))/0x7*(-parseInt(_0x398c85(0x183))/0x8)+-parseInt(_0x398c85(0x1a9))/0x9;if(_0x4c3347===_0xecf5aa)break;else _0x4d50e3['push'](_0x4d50e3['shift']());}catch(_0x2529e){_0x4d50e3['push'](_0x4d50e3['shift']());}}}(a0_0x5059,0xdf502));Object[a0_0x409337(0x185)](exports,a0_0x409337(0x193),{'value':!![]}),exports[a0_0x409337(0x190)]=filterPytest,exports[a0_0x409337(0x199)]=filterPipInstall;function filterPytest(_0x326863){const _0xa6cabe=a0_0x409337,_0x25ae46=_0x326863['split']('\x0a');let _0x11b24b=0x0,_0x451058=0x0,_0x4e3377=0x0,_0x2e9b02=0x0,_0x4c5c30=0x0;const _0x47616a=[];let _0x3ad7e4=[],_0x178576=![];for(const _0x22b231 of _0x25ae46){const _0x3b2582=_0x22b231['trim']();if(_0x3b2582[_0xa6cabe(0x196)](_0xa6cabe(0x1aa))||_0x3b2582[_0xa6cabe(0x196)](_0xa6cabe(0x180))){_0x178576=!![];continue;}else(_0x3b2582[_0xa6cabe(0x196)](_0xa6cabe(0x19c))||_0x3b2582[_0xa6cabe(0x196)](_0xa6cabe(0x186))&&_0x3b2582['includes']('passed'))&&(_0x178576=![],_0x3ad7e4[_0xa6cabe(0x1a6)]>0x0&&(_0x47616a['push'](_0x3ad7e4),_0x3ad7e4=[]));if(_0x178576){if(_0x3b2582[_0xa6cabe(0x196)](_0xa6cabe(0x1a1)))_0x3ad7e4[_0xa6cabe(0x1a6)]>0x0&&(_0x47616a[_0xa6cabe(0x1a2)](_0x3ad7e4),_0x3ad7e4=[]),_0x3ad7e4[_0xa6cabe(0x1a2)](_0x3b2582);else _0x3b2582[_0xa6cabe(0x1a6)]>0x0&&_0x3ad7e4[_0xa6cabe(0x1a2)](_0x22b231);continue;}if(_0x3b2582[_0xa6cabe(0x196)](_0xa6cabe(0x186))&&_0x3b2582[_0xa6cabe(0x184)](_0xa6cabe(0x19b))){const _0x49dae0=_0x3b2582[_0xa6cabe(0x191)](/(\d+)\s+passed/),_0x1d895b=_0x3b2582['match'](/(\d+)\s+failed/),_0x25caf0=_0x3b2582[_0xa6cabe(0x191)](/(\d+)\s+skipped/),_0x307b01=_0x3b2582['match'](/(\d+)\s+xfailed/),_0x4af6c9=_0x3b2582[_0xa6cabe(0x191)](/(\d+)\s+xpassed/);if(_0x49dae0)_0x11b24b=parseInt(_0x49dae0[0x1]);if(_0x1d895b)_0x451058=parseInt(_0x1d895b[0x1]);if(_0x25caf0)_0x4e3377=parseInt(_0x25caf0[0x1]);if(_0x307b01)_0x2e9b02=parseInt(_0x307b01[0x1]);if(_0x4af6c9)_0x4c5c30=parseInt(_0x4af6c9[0x1]);}}_0x3ad7e4[_0xa6cabe(0x1a6)]>0x0&&_0x47616a[_0xa6cabe(0x1a2)](_0x3ad7e4);if(_0x11b24b===0x0&&_0x451058===0x0&&_0x4e3377===0x0&&_0x2e9b02===0x0&&_0x4c5c30===0x0){if(_0x326863[_0xa6cabe(0x184)](_0xa6cabe(0x19a))&&!_0x326863[_0xa6cabe(0x184)](_0xa6cabe(0x19d)))return _0xa6cabe(0x198);return _0x326863;}if(_0x451058===0x0&&_0x11b24b>0x0&&_0x4e3377===0x0&&_0x2e9b02===0x0&&_0x4c5c30===0x0)return _0xa6cabe(0x192)+_0x11b24b+_0xa6cabe(0x1ab);const _0x4bb55b=[];_0x4bb55b[_0xa6cabe(0x1a2)](_0xa6cabe(0x192)+_0x11b24b+_0xa6cabe(0x1ab));if(_0x451058>0x0)_0x4bb55b[_0xa6cabe(0x1a2)](_0x451058+_0xa6cabe(0x17b));if(_0x4e3377>0x0)_0x4bb55b[_0xa6cabe(0x1a2)](_0x4e3377+_0xa6cabe(0x19f));if(_0x2e9b02>0x0)_0x4bb55b[_0xa6cabe(0x1a2)](_0x2e9b02+_0xa6cabe(0x197));if(_0x4c5c30>0x0)_0x4bb55b[_0xa6cabe(0x1a2)](_0x4c5c30+_0xa6cabe(0x18a));const _0x5e4ebf=[_0x4bb55b[_0xa6cabe(0x182)](',\x20')];if(_0x47616a[_0xa6cabe(0x1a6)]>0x0){_0x5e4ebf[_0xa6cabe(0x1a2)](_0xa6cabe(0x18e));const _0x1af43e=0x3,_0x5f58ff=_0x47616a[_0xa6cabe(0x181)](0x0,_0x1af43e);for(let _0xbad828=0x0;_0xbad828<_0x5f58ff[_0xa6cabe(0x1a6)];_0xbad828++){const _0x5538bb=_0x5f58ff[_0xbad828],_0xd426e6=_0x5538bb[0x0][_0xa6cabe(0x1a3)](/_/g,'')['trim']();_0x5e4ebf[_0xa6cabe(0x1a2)]('\x20\x20'+(_0xbad828+0x1)+_0xa6cabe(0x18c)+_0xd426e6);const _0x414a4d=_0x5538bb[_0xa6cabe(0x181)](0x1),_0x207933=_0x414a4d[_0xa6cabe(0x18f)](_0x1105a8=>{const _0x30e35b=_0xa6cabe,_0x338ee1=_0x1105a8[_0x30e35b(0x1a8)]();return _0x338ee1['startsWith']('>')||_0x338ee1[_0x30e35b(0x196)](_0x30e35b(0x18b))||_0x338ee1[_0x30e35b(0x184)]('.py:')||_0x338ee1[_0x30e35b(0x184)](_0x30e35b(0x17c));});for(const _0x568530 of _0x207933[_0xa6cabe(0x181)](0x0,0x8)){_0x5e4ebf[_0xa6cabe(0x1a2)]('\x20\x20\x20\x20'+_0x568530);}_0x207933[_0xa6cabe(0x1a6)]>0x8&&_0x5e4ebf[_0xa6cabe(0x1a2)](_0xa6cabe(0x1a7)+(_0x207933[_0xa6cabe(0x1a6)]-0x8)+_0xa6cabe(0x19e));}_0x47616a[_0xa6cabe(0x1a6)]>_0x1af43e&&_0x5e4ebf[_0xa6cabe(0x1a2)](_0xa6cabe(0x17e)+(_0x47616a[_0xa6cabe(0x1a6)]-_0x1af43e)+_0xa6cabe(0x187));}return _0x5e4ebf[_0xa6cabe(0x182)]('\x0a');}function filterPipInstall(_0x4cc39e){const _0x5ef483=a0_0x409337,_0x56b3ea=_0x4cc39e['split']('\x0a'),_0x5e3406=[];for(const _0xc0423b of _0x56b3ea){const _0x5bcc23=_0xc0423b['trim']();_0x5bcc23[_0x5ef483(0x196)]('Successfully\x20installed')&&_0x5e3406['push'](_0x5bcc23);}if(_0x5e3406[_0x5ef483(0x1a6)]>0x0)return _0x5e3406['join']('\x0a');return _0x56b3ea['filter'](_0x182e78=>{const _0x44e21f=_0x5ef483,_0x2c633e=_0x182e78['trim']();return!_0x2c633e[_0x44e21f(0x196)](_0x44e21f(0x17d))&&!_0x2c633e[_0x44e21f(0x196)](_0x44e21f(0x189))&&!_0x2c633e[_0x44e21f(0x184)](_0x44e21f(0x195))&&!_0x2c633e[_0x44e21f(0x196)](_0x44e21f(0x17a));})['join']('\x0a')[_0x5ef483(0x1a8)]();}
|
package/filters/rust.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const a0_0x131ea4=a0_0x144b;(function(_0xe72e6,_0x105f21){const _0x22ee8b=a0_0x144b,_0xa71c33=_0xe72e6();while(!![]){try{const _0xd40206=parseInt(_0x22ee8b(0x80))/0x1+parseInt(_0x22ee8b(0x77))/0x2*(-parseInt(_0x22ee8b(0x95))/0x3)+parseInt(_0x22ee8b(0x91))/0x4*(parseInt(_0x22ee8b(0x97))/0x5)+-parseInt(_0x22ee8b(0xa2))/0x6*(-parseInt(_0x22ee8b(0x86))/0x7)+-parseInt(_0x22ee8b(0xa6))/0x8+parseInt(_0x22ee8b(0x7b))/0x9*(parseInt(_0x22ee8b(0x82))/0xa)+parseInt(_0x22ee8b(0x7d))/0xb;if(_0xd40206===_0x105f21)break;else _0xa71c33['push'](_0xa71c33['shift']());}catch(_0x566b9b){_0xa71c33['push'](_0xa71c33['shift']());}}}(a0_0x12b8,0x2657f));Object[a0_0x131ea4(0x8b)](exports,a0_0x131ea4(0x8e),{'value':!![]}),exports['filterCargoTest']=filterCargoTest,exports['filterCargoBuild']=filterCargoBuild;function filterCargoTest(_0x3b1f78){const _0x26b244=a0_0x131ea4,_0x501b42=_0x3b1f78[_0x26b244(0x9f)]('\x0a');let _0x1eb605=0x0,_0x161073=0x0,_0x480e6a=0x0,_0x15ba36=0x0;const _0x4aad0f=[];let _0x21bc47=![],_0x30e5d1=[];for(const _0xd4c4cc of _0x501b42){const _0x37cb51=_0xd4c4cc[_0x26b244(0x9c)](),_0x5d8b05=_0x37cb51[_0x26b244(0x85)](/test result:\s*(\w+)\.\s*(\d+)\s+passed;\s*(\d+)\s+failed;\s*(\d+)\s+ignored;\s*(\d+)\s+measured/);if(_0x5d8b05){_0x1eb605+=parseInt(_0x5d8b05[0x2]),_0x161073+=parseInt(_0x5d8b05[0x3]),_0x480e6a+=parseInt(_0x5d8b05[0x4]),_0x15ba36+=parseInt(_0x5d8b05[0x5]);continue;}if(_0x37cb51===_0x26b244(0x9e)||_0x37cb51==='----\x20failures\x20----'){_0x21bc47=!![];continue;}if(_0x21bc47){if(_0x37cb51['startsWith'](_0x26b244(0x7c))&&_0x37cb51[_0x26b244(0x99)]('\x20----')){if(_0x30e5d1[_0x26b244(0x7a)]>0x0)_0x4aad0f[_0x26b244(0x92)](_0x30e5d1['join']('\x0a'));_0x30e5d1=[_0x37cb51[_0x26b244(0x8d)](/^-+\s*/,'')[_0x26b244(0x8d)](/\s*-+$/,'')];}else{if(_0x37cb51===_0x26b244(0x9e)||_0x37cb51['startsWith']('test\x20result:')){if(_0x30e5d1[_0x26b244(0x7a)]>0x0)_0x4aad0f[_0x26b244(0x92)](_0x30e5d1[_0x26b244(0x96)]('\x0a'));_0x30e5d1=[],_0x21bc47=![];}else _0x37cb51[_0x26b244(0x7a)]>0x0&&_0x30e5d1[_0x26b244(0x92)](_0xd4c4cc);}}}if(_0x30e5d1[_0x26b244(0x7a)]>0x0)_0x4aad0f['push'](_0x30e5d1[_0x26b244(0x96)]('\x0a'));if(_0x1eb605===0x0&&_0x161073===0x0&&_0x480e6a===0x0){if(_0x3b1f78[_0x26b244(0x93)]('test\x20result:\x20ok'))return _0x26b244(0x79);return _0x3b1f78;}if(_0x161073===0x0){const _0x47c69e=['Cargo\x20test:\x20'+_0x1eb605+_0x26b244(0xa3)];if(_0x480e6a>0x0)_0x47c69e['push'](_0x480e6a+_0x26b244(0xa0));return _0x47c69e[_0x26b244(0x96)](',\x20');}const _0x14d28c=[_0x26b244(0x94)+_0x1eb605+_0x26b244(0x81)+_0x161073+'\x20failed,\x20'+_0x480e6a+_0x26b244(0xa0)];if(_0x4aad0f['length']>0x0){_0x14d28c['push'](_0x26b244(0x87));const _0x3e1507=0x3;for(let _0x99fc88=0x0;_0x99fc88<Math[_0x26b244(0x89)](_0x4aad0f['length'],_0x3e1507);_0x99fc88++){const _0x4613f6=_0x4aad0f[_0x99fc88][_0x26b244(0x9f)]('\x0a');_0x14d28c[_0x26b244(0x92)]('\x20\x20'+(_0x99fc88+0x1)+'.\x20'+_0x4613f6[0x0]);const _0x2dd15a=_0x4613f6['slice'](0x1),_0x20171a=_0x2dd15a[_0x26b244(0x88)](_0xf60a57=>_0xf60a57['trim']()[_0x26b244(0xa5)](_0x26b244(0x78))||_0xf60a57[_0x26b244(0x93)](_0x26b244(0xa7))||_0xf60a57['includes'](_0x26b244(0x9b))||_0xf60a57[_0x26b244(0x93)](_0x26b244(0x90))||_0xf60a57[_0x26b244(0x93)](_0x26b244(0x7f)));for(const _0x1f017f of _0x20171a[_0x26b244(0x83)](0x0,0x5)){_0x14d28c[_0x26b244(0x92)](_0x26b244(0x9d)+_0x1f017f[_0x26b244(0x9c)]());}}_0x4aad0f[_0x26b244(0x7a)]>_0x3e1507&&_0x14d28c[_0x26b244(0x92)](_0x26b244(0x9a)+(_0x4aad0f['length']-_0x3e1507)+_0x26b244(0x7e));}return _0x14d28c[_0x26b244(0x96)]('\x0a');}function a0_0x12b8(){const _0x2ce17f=['\x0aFailures:','filter','min','\x0aErrors:','defineProperty','warning:','replace','__esModule','Cargo:\x20compiled\x20','left:','31508MisDUU','push','includes','Cargo\x20test:\x20','6duVJBJ','join','95PBAbRn','warning[','endsWith','\x20\x20...\x20+','assert','trim','\x20\x20\x20\x20','failures:','split','\x20ignored','Compiling\x20','15528OEpoPe','\x20passed','\x20more\x20errors','startsWith','1647656iZbKNw','panicked','266894mvWcnH','thread','Cargo\x20test:\x20all\x20tests\x20passed','length','72vkMxga','----\x20','1057749tAsehS','\x20more\x20failures','right:','201952ShBCfA','\x20passed,\x20','36800qDQDUv','slice','error[','match','413vueGKK'];a0_0x12b8=function(){return _0x2ce17f;};return a0_0x12b8();}function a0_0x144b(_0x5471b7,_0xaeb61e){_0x5471b7=_0x5471b7-0x77;const _0x12b825=a0_0x12b8();let _0x144be4=_0x12b825[_0x5471b7];return _0x144be4;}function filterCargoBuild(_0x444b06){const _0x359599=a0_0x131ea4,_0x125233=_0x444b06[_0x359599(0x9f)]('\x0a'),_0x1d214f=[],_0x759071=[];let _0x2291d7=0x0;for(const _0x133187 of _0x125233){const _0x4c59b8=_0x133187[_0x359599(0x9c)]();if(_0x4c59b8[_0x359599(0xa5)](_0x359599(0xa1)))_0x2291d7++;else{if(_0x4c59b8[_0x359599(0xa5)](_0x359599(0x98))||_0x4c59b8['startsWith'](_0x359599(0x8c)))_0x1d214f[_0x359599(0x92)](_0x4c59b8);else{if(_0x4c59b8[_0x359599(0xa5)](_0x359599(0x84))||_0x4c59b8[_0x359599(0xa5)]('error:'))_0x759071['push'](_0x4c59b8);}}}if(_0x759071[_0x359599(0x7a)]===0x0&&_0x1d214f[_0x359599(0x7a)]===0x0)return _0x2291d7>0x0?_0x359599(0x8f)+_0x2291d7+'\x20crates\x20successfully':_0x444b06[_0x359599(0x9c)]();const _0x37c938=[];if(_0x759071['length']>0x0){_0x37c938[_0x359599(0x92)]('Cargo:\x20'+_0x759071['length']+'\x20errors,\x20'+_0x1d214f['length']+'\x20warnings'),_0x37c938[_0x359599(0x92)](_0x359599(0x8a));for(const _0x2c52fe of _0x759071[_0x359599(0x83)](0x0,0x5))_0x37c938[_0x359599(0x92)]('\x20\x20'+_0x2c52fe);if(_0x759071['length']>0x5)_0x37c938[_0x359599(0x92)](_0x359599(0x9a)+(_0x759071[_0x359599(0x7a)]-0x5)+_0x359599(0xa4));}else _0x37c938['push'](_0x359599(0x8f)+_0x2291d7+'\x20crates,\x20'+_0x1d214f[_0x359599(0x7a)]+'\x20warnings');if(_0x1d214f[_0x359599(0x7a)]>0x0&&_0x1d214f['length']<=0x5){_0x37c938['push']('\x0aWarnings:');for(const _0x58b477 of _0x1d214f)_0x37c938[_0x359599(0x92)]('\x20\x20'+_0x58b477);}else _0x1d214f[_0x359599(0x7a)]>0x5&&_0x37c938[_0x359599(0x92)]('\x0a('+_0x1d214f['length']+'\x20warnings\x20—\x20run\x20cargo\x20clippy\x20for\x20details)');return _0x37c938[_0x359599(0x96)]('\x0a');}
|
package/filters/shell.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x384783=a0_0x142a;(function(_0xcc6790,_0xa5c45d){const _0x5eaf29=a0_0x142a,_0x26b513=_0xcc6790();while(!![]){try{const _0x2fe05a=parseInt(_0x5eaf29(0xa7))/0x1*(parseInt(_0x5eaf29(0x7f))/0x2)+-parseInt(_0x5eaf29(0xcc))/0x3+parseInt(_0x5eaf29(0x91))/0x4*(-parseInt(_0x5eaf29(0xb0))/0x5)+-parseInt(_0x5eaf29(0xeb))/0x6*(-parseInt(_0x5eaf29(0xc1))/0x7)+parseInt(_0x5eaf29(0xad))/0x8+parseInt(_0x5eaf29(0x8e))/0x9+-parseInt(_0x5eaf29(0x99))/0xa;if(_0x2fe05a===_0xa5c45d)break;else _0x26b513['push'](_0x26b513['shift']());}catch(_0x1846f0){_0x26b513['push'](_0x26b513['shift']());}}}(a0_0x553d,0x675b1));function a0_0x553d(){const _0x42b653=['.tsx','.eot','\x20more\x20directories','.tgz','\x0a...\x20[','\x20dependencies,\x20','hasOwnProperty','\x20more\x20matches','binary','443690njuRAA','.dll','trim','\x20lines\x20total)','\x20\x20...\x20+','collapseWhitespace','create','\x20lines)','No\x20files\x20found','.woff2','.exe','.otf','composer.lock','./generic','@param','2905173YiLonr','startsWith','some','332eiGoBw','/\x20(','.min.js','features_enabled','.jpeg','configurable','json_crusher','.obj','2910730LcXWAy','filterGrep','.dylib','\x20more\x20files','filter','defineProperty','smartCrushJson','.cpp','.map','call','[minified\x20file]\x20','slice','indexOf','match','3kMqHyw','\x20matches\x20across\x20',':\x20...\x20(','split','.mov','push','3259368hVUSkF','@return','.dat','17505Vifdje','No\x20matches\x20found','lock','.class','../tracker','\x20(content\x20omitted\x20—\x20not\x20useful\x20for\x20LLM\x20context)','.pyo','includes','Gemfile.lock','dirname','.jsx','.gif','\x20files\x20found\x20across\x20','yarn.lock','length','dependencies','packages','665476YyFCxv','\x20more\x20files\x20with\x20matches','package-lock.json','.webp','from\x20','poetry.lock','\x20lines\x20total,\x20','.py','__setModuleDefault','endsWith','.js','1742664UYVCfF','keys','getOwnPropertyDescriptor','default','\x0a...\x20(','get','.ico','extname','bun.lockb','__esModule','import\x20','\x20directories,\x20','stringify','.db','pnpm-lock.yaml','__importStar','join','.pyc','.zip','.java','\x20structural\x20lines\x20shown)','.wasm','parse','.bmp','#include\x20','.gz','.ts','Empty\x20directory','.mp3','skeleton','\x20files\x20total\x20—\x20deep\x20entries\x20truncated)','12xgLZVf','export\x20','.jpg','sort','[binary\x20file]\x20','__createBinding','.bz2','substring','Cargo.lock','writable','use\x20','\x20lines\x20truncated]\x20...\x0a','.ttf','[lock\x20file]\x20','.svg','.rar','.so','.rb','\x20files)','toLocaleString','toLowerCase','getOwnPropertyNames','.tar.gz','\x20chars\x20(content\x20omitted\x20—\x20lock\x20files\x20are\x20not\x20useful\x20for\x20LLM\x20context)','.bin','go.sum','\x20chars,\x20type:\x20','basename','package\x20','filterTree','...\x20+','[binary/minified\x20file]\x20','charCodeAt','[code\x20skeleton]\x20'];a0_0x553d=function(){return _0x42b653;};return a0_0x553d();}var __createBinding=this&&this[a0_0x384783(0xf0)]||(Object[a0_0x384783(0x85)]?function(_0x4b0232,_0x3891c6,_0x1b9d9c,_0x47eef2){const _0x1fe04b=a0_0x384783;if(_0x47eef2===undefined)_0x47eef2=_0x1b9d9c;var _0x19f1ca=Object[_0x1fe04b(0xce)](_0x3891c6,_0x1b9d9c);(!_0x19f1ca||(_0x1fe04b(0xd1)in _0x19f1ca?!_0x3891c6[_0x1fe04b(0xd5)]:_0x19f1ca[_0x1fe04b(0xf4)]||_0x19f1ca[_0x1fe04b(0x96)]))&&(_0x19f1ca={'enumerable':!![],'get':function(){return _0x3891c6[_0x1b9d9c];}}),Object[_0x1fe04b(0x9e)](_0x4b0232,_0x47eef2,_0x19f1ca);}:function(_0x58ccb0,_0x246b48,_0x184036,_0x16a4e0){if(_0x16a4e0===undefined)_0x16a4e0=_0x184036;_0x58ccb0[_0x16a4e0]=_0x246b48[_0x184036];}),__setModuleDefault=this&&this[a0_0x384783(0xc9)]||(Object[a0_0x384783(0x85)]?function(_0x36c4f4,_0x233e52){const _0x2e7114=a0_0x384783;Object[_0x2e7114(0x9e)](_0x36c4f4,_0x2e7114(0xcf),{'enumerable':!![],'value':_0x233e52});}:function(_0x61177e,_0x651855){_0x61177e['default']=_0x651855;}),__importStar=this&&this[a0_0x384783(0xdb)]||(function(){var _0x46046b=function(_0x2ea7ee){const _0x2b47f1=a0_0x142a;return _0x46046b=Object[_0x2b47f1(0x69)]||function(_0x4ffb62){const _0x301514=_0x2b47f1;var _0x184ad3=[];for(var _0x5919fa in _0x4ffb62)if(Object['prototype'][_0x301514(0x7c)][_0x301514(0xa2)](_0x4ffb62,_0x5919fa))_0x184ad3[_0x184ad3[_0x301514(0xbe)]]=_0x5919fa;return _0x184ad3;},_0x46046b(_0x2ea7ee);};return function(_0x1809cd){const _0x5516fb=a0_0x142a;if(_0x1809cd&&_0x1809cd['__esModule'])return _0x1809cd;var _0x2cac5d={};if(_0x1809cd!=null){for(var _0x2531ac=_0x46046b(_0x1809cd),_0x531ded=0x0;_0x531ded<_0x2531ac[_0x5516fb(0xbe)];_0x531ded++)if(_0x2531ac[_0x531ded]!==_0x5516fb(0xcf))__createBinding(_0x2cac5d,_0x1809cd,_0x2531ac[_0x531ded]);}return __setModuleDefault(_0x2cac5d,_0x1809cd),_0x2cac5d;};}());Object[a0_0x384783(0x9e)](exports,a0_0x384783(0xd5),{'value':!![]}),exports['filterLs']=filterLs,exports[a0_0x384783(0x71)]=filterTree,exports['filterCat']=filterCat,exports[a0_0x384783(0x9a)]=filterGrep,exports['filterFind']=filterFind;const path=__importStar(require('path')),generic_1=require(a0_0x384783(0x8c)),tracker_1=require(a0_0x384783(0xb4));function isFeatureEnabled(_0x39084b){const _0x272f42=a0_0x384783;try{const _0x305710=tracker_1['tracker']['getConfig'](),_0x157d1b=_0x305710[_0x272f42(0x94)];if(!_0x157d1b||_0x157d1b[_0x39084b]===undefined)return!![];return _0x157d1b[_0x39084b]!==![];}catch{return!![];}}const LOCK_FILES=['package-lock.json',a0_0x384783(0xbd),a0_0x384783(0xda),a0_0x384783(0xf3),'go.sum','poetry.lock',a0_0x384783(0x8b),a0_0x384783(0xb8),a0_0x384783(0xd4)],BINARY_EXTENSIONS=[a0_0x384783(0x93),'.min.css',a0_0x384783(0xa1),a0_0x384783(0xe1),'.png',a0_0x384783(0xed),a0_0x384783(0x95),a0_0x384783(0xbb),a0_0x384783(0xd2),a0_0x384783(0xe3),a0_0x384783(0xc4),a0_0x384783(0xf9),'.pdf',a0_0x384783(0xde),a0_0x384783(0x6a),a0_0x384783(0x79),a0_0x384783(0xe5),a0_0x384783(0xf1),'.7z',a0_0x384783(0xfa),a0_0x384783(0x89),a0_0x384783(0x80),a0_0x384783(0xfb),a0_0x384783(0x9b),a0_0x384783(0x6c),a0_0x384783(0xaf),'.sqlite',a0_0x384783(0xd9),'.sqlite3','.woff',a0_0x384783(0x88),a0_0x384783(0xf7),a0_0x384783(0x77),a0_0x384783(0x8a),a0_0x384783(0xe8),'.mp4','.wav','.avi',a0_0x384783(0xab),'.webm',a0_0x384783(0xdd),a0_0x384783(0xb6),a0_0x384783(0xb3),'.o',a0_0x384783(0x98)];function extractFilename(_0x38e12c){const _0x3c7fa7=a0_0x384783,_0x5b9be6=_0x38e12c[_0x3c7fa7(0x81)]()['split'](/\s+/);for(let _0x431797=0x1;_0x431797<_0x5b9be6[_0x3c7fa7(0xbe)];_0x431797++){if(!_0x5b9be6[_0x431797]['startsWith']('-'))return _0x5b9be6[_0x431797];}return null;}function filterLockFile(_0x59b25c,_0x1c0715){const _0xf2d300=a0_0x384783;try{const _0x507eb4=path[_0xf2d300(0x6f)](_0x1c0715)[_0xf2d300(0x68)]();if(!LOCK_FILES[_0xf2d300(0x90)](_0x5c254d=>_0x507eb4===_0x5c254d[_0xf2d300(0x68)]()))return null;const _0x540931=_0x59b25c[_0xf2d300(0xbe)];let _0x171044=0x0;if(_0x507eb4===_0xf2d300(0xc3))try{const _0x32d19f=JSON[_0xf2d300(0xe2)](_0x59b25c);_0x171044=Object['keys'](_0x32d19f[_0xf2d300(0xc0)]||_0x32d19f[_0xf2d300(0xbf)]||{})[_0xf2d300(0xbe)];}catch{_0x171044=(_0x59b25c[_0xf2d300(0xa6)](/"resolved":/g)||[])[_0xf2d300(0xbe)];}else{if(_0x507eb4==='yarn.lock')_0x171044=(_0x59b25c['match'](/^"?[^#\s][^:]*:$/gm)||[])[_0xf2d300(0xbe)];else{if(_0x507eb4==='cargo.lock'||_0x507eb4===_0xf2d300(0xc6))_0x171044=(_0x59b25c[_0xf2d300(0xa6)](/\[\[package\]\]/g)||[])['length'];else{if(_0x507eb4===_0xf2d300(0x6d))_0x171044=Math['floor'](_0x59b25c[_0xf2d300(0xaa)]('\x0a')[_0xf2d300(0x9d)](_0x5d4d93=>_0x5d4d93['trim']())['length']/0x2);else{if(_0x507eb4===_0xf2d300(0x8b))try{_0x171044=JSON[_0xf2d300(0xe2)](_0x59b25c)[_0xf2d300(0xc0)]?.[_0xf2d300(0xbe)]||0x0;}catch{}else _0x507eb4==='pnpm-lock.yaml'?_0x171044=(_0x59b25c[_0xf2d300(0xa6)](/^\s{2}['"@a-z]/gm)||[])['length']:_0x171044=_0x59b25c[_0xf2d300(0xaa)]('\x0a')[_0xf2d300(0x9d)](_0xa349ba=>_0xa349ba[_0xf2d300(0x81)]())['length'];}}}}return _0xf2d300(0xf8)+path[_0xf2d300(0x6f)](_0x1c0715)+':\x20'+_0x171044+_0xf2d300(0x7b)+_0x540931[_0xf2d300(0x67)]()+_0xf2d300(0x6b);}catch{return null;}}function filterBinaryOrMinified(_0x34a0a4,_0x167055){const _0x2b505f=a0_0x384783;try{if(_0x167055){const _0x4e7d0a=_0x167055[_0x2b505f(0x68)]();for(const _0xf5f0b2 of BINARY_EXTENSIONS){if(_0x4e7d0a[_0x2b505f(0xca)](_0xf5f0b2))return _0x2b505f(0x73)+path[_0x2b505f(0x6f)](_0x167055)+',\x20'+_0x34a0a4['length']['toLocaleString']()+_0x2b505f(0x6e)+_0xf5f0b2+_0x2b505f(0xb5);}}const _0x322a02=_0x34a0a4[_0x2b505f(0xf2)](0x0,0x3e8);let _0x5c8e7c=0x0;for(let _0x106f4b=0x0;_0x106f4b<_0x322a02[_0x2b505f(0xbe)];_0x106f4b++){if(_0x322a02['charCodeAt'](_0x106f4b)===0x0)_0x5c8e7c++;}if(_0x5c8e7c>0x0)return _0x2b505f(0xef)+_0x34a0a4['length'][_0x2b505f(0x67)]()+'\x20chars\x20(contains\x20null\x20bytes\x20—\x20binary\x20content\x20omitted)';let _0x5ef691=0x0;for(let _0x27f41d=0x0;_0x27f41d<_0x322a02['length'];_0x27f41d++){const _0x1c7353=_0x322a02[_0x2b505f(0x74)](_0x27f41d);if(_0x1c7353<0x20&&_0x1c7353!==0xa&&_0x1c7353!==0xd&&_0x1c7353!==0x9)_0x5ef691++;}if(_0x322a02['length']>0x64&&_0x5ef691>_0x322a02[_0x2b505f(0xbe)]*0.1)return _0x2b505f(0xef)+_0x34a0a4[_0x2b505f(0xbe)][_0x2b505f(0x67)]()+'\x20chars\x20(high\x20non-printable\x20ratio\x20—\x20content\x20omitted)';const _0x36fb5b=_0x34a0a4[_0x2b505f(0xaa)]('\x0a');if(_0x36fb5b['length']<=0x3&&_0x34a0a4[_0x2b505f(0xbe)]>0x1388)return _0x2b505f(0xa3)+_0x34a0a4[_0x2b505f(0xbe)]['toLocaleString']()+'\x20chars\x20across\x20'+_0x36fb5b['length']+'\x20line(s)\x20(content\x20omitted\x20—\x20not\x20human-readable)';return null;}catch{return null;}}function filterJsonMinify(_0x1bc5b3){const _0x17dea9=a0_0x384783;try{const _0x2593e0=_0x1bc5b3['trim']();if(!_0x2593e0['startsWith']('{')&&!_0x2593e0['startsWith']('['))return null;const _0x3a3df7=_0x2593e0[_0x17dea9(0xaa)]('\x0a');if(_0x3a3df7[_0x17dea9(0xbe)]<=0x14)return null;const _0x1fb6b2=JSON[_0x17dea9(0xe2)](_0x2593e0),_0x57db35=JSON[_0x17dea9(0xd8)](_0x1fb6b2);if(_0x57db35[_0x17dea9(0xbe)]<_0x2593e0[_0x17dea9(0xbe)])return _0x57db35;return null;}catch{return null;}}function filterLs(_0x43668b){const _0x54e2a6=a0_0x384783,_0x323997=_0x43668b['split']('\x0a')[_0x54e2a6(0x9d)](_0x3f4f91=>_0x3f4f91[_0x54e2a6(0x81)]()['length']>0x0);if(_0x323997['length']===0x0)return _0x54e2a6(0xe7);if(_0x323997['length']<=0x1e)return _0x43668b[_0x54e2a6(0x81)]();const _0x2149c0=[],_0x227d4a=[];for(const _0x6ef66a of _0x323997){const _0x313eb5=_0x6ef66a['trim']();if(_0x313eb5[_0x54e2a6(0x8f)]('total\x20')||_0x313eb5[_0x54e2a6(0x8f)]('d')&&_0x313eb5[_0x54e2a6(0xb7)]('..'))continue;_0x313eb5[_0x54e2a6(0xca)]('/')||_0x313eb5[_0x54e2a6(0x8f)]('d')&&_0x313eb5[_0x54e2a6(0xb7)]('\x20')?_0x2149c0[_0x54e2a6(0xac)](_0x313eb5):_0x227d4a[_0x54e2a6(0xac)](_0x313eb5);}const _0x3edec4=[];return _0x2149c0['length']>0x0&&(_0x2149c0[_0x54e2a6(0xbe)]<=0xf?_0x3edec4['push'](..._0x2149c0):(_0x3edec4[_0x54e2a6(0xac)](..._0x2149c0[_0x54e2a6(0xa4)](0x0,0xa)),_0x3edec4[_0x54e2a6(0xac)](_0x54e2a6(0x72)+(_0x2149c0['length']-0xa)+_0x54e2a6(0x78)))),_0x227d4a[_0x54e2a6(0xbe)]>0x0&&(_0x227d4a[_0x54e2a6(0xbe)]<=0x14?_0x3edec4[_0x54e2a6(0xac)](..._0x227d4a):(_0x3edec4['push'](..._0x227d4a[_0x54e2a6(0xa4)](0x0,0xf)),_0x3edec4[_0x54e2a6(0xac)](_0x54e2a6(0x72)+(_0x227d4a[_0x54e2a6(0xbe)]-0xf)+_0x54e2a6(0x9c)))),_0x3edec4[_0x54e2a6(0xac)]('\x0a('+_0x2149c0[_0x54e2a6(0xbe)]+'\x20directories,\x20'+_0x227d4a[_0x54e2a6(0xbe)]+_0x54e2a6(0x66)),_0x3edec4['join']('\x0a');}function filterTree(_0x2f4d9d){const _0x2cf119=a0_0x384783,_0x37bd39=_0x2f4d9d['split']('\x0a');if(_0x37bd39[_0x2cf119(0xbe)]<=0x32)return _0x2f4d9d[_0x2cf119(0x81)]();const _0x426023=[];let _0x136c07=0x0,_0x100357=0x0,_0x3abaf3=0x0;for(const _0x1cf94e of _0x37bd39){const _0x401516=_0x1cf94e['match'](/(\d+)\s+director/),_0x1bc922=_0x1cf94e[_0x2cf119(0xa6)](/(\d+)\s+file/);if(_0x401516)_0x3abaf3=parseInt(_0x401516[0x1]);if(_0x1bc922)_0x100357=parseInt(_0x1bc922[0x1]);const _0x10a7ae=(_0x1cf94e[_0x2cf119(0xa6)](/^[│├└\s─]+/)||[''])[0x0][_0x2cf119(0xbe)];_0x10a7ae<=0x4&&(_0x426023[_0x2cf119(0xac)](_0x1cf94e),_0x136c07++);}return _0x37bd39[_0x2cf119(0xbe)]>_0x426023[_0x2cf119(0xbe)]&&_0x426023['push'](_0x2cf119(0xd0)+_0x3abaf3+_0x2cf119(0xd7)+_0x100357+_0x2cf119(0xea)),_0x426023['join']('\x0a');}function filterCat(_0x3ff10c,_0x555d3b=''){const _0x394768=a0_0x384783,_0x180be6=extractFilename(_0x555d3b);try{if(_0x180be6&&isFeatureEnabled(_0x394768(0xb2))){const _0x232334=filterLockFile(_0x3ff10c,_0x180be6);if(_0x232334)return _0x232334;}if(isFeatureEnabled(_0x394768(0x7e))){const _0x1da608=filterBinaryOrMinified(_0x3ff10c,_0x180be6);if(_0x1da608)return _0x1da608;}if(isFeatureEnabled(_0x394768(0x97))){const _0x1f1bbb=(0x0,generic_1[_0x394768(0x9f)])(_0x3ff10c);if(_0x1f1bbb)return _0x1f1bbb;}const _0x28a8bf=filterJsonMinify(_0x3ff10c);if(_0x28a8bf)return _0x28a8bf;if(_0x180be6&&isFeatureEnabled(_0x394768(0xe9))){const _0x4b4f31=path['extname'](_0x180be6)[_0x394768(0x68)](),_0x13db08=[_0x394768(0xe6),_0x394768(0xcb),_0x394768(0x76),_0x394768(0xba),_0x394768(0xc8),'.go','.rs',_0x394768(0xdf),'.c',_0x394768(0xa0),'.cs',_0x394768(0x65),'.swift','.kt'];if(_0x13db08[_0x394768(0xb7)](_0x4b4f31)){const _0x24a6f1=_0x3ff10c[_0x394768(0xaa)]('\x0a');if(_0x24a6f1['length']>0x64){const _0x1c75e6=[];_0x1c75e6[_0x394768(0xac)](_0x394768(0x75)+path['basename'](_0x180be6)+'\x20('+_0x24a6f1['length']+_0x394768(0x86)),_0x1c75e6[_0x394768(0xac)]('');for(const _0x572513 of _0x24a6f1){const _0x324d4f=_0x572513[_0x394768(0x81)]();if(_0x324d4f[_0x394768(0x8f)](_0x394768(0xd6))||_0x324d4f['startsWith'](_0x394768(0xc5))||_0x324d4f[_0x394768(0x8f)]('require(')||_0x324d4f[_0x394768(0xa6)](/=\s*require\(/)||_0x324d4f['startsWith'](_0x394768(0xe4))||_0x324d4f['startsWith'](_0x394768(0xf5))||_0x324d4f[_0x394768(0x8f)](_0x394768(0x70)))_0x1c75e6[_0x394768(0xac)](_0x572513);else{if(_0x324d4f[_0x394768(0xa6)](/^(export\s+)?(async\s+)?function\s+/)||_0x324d4f['match'](/^(export\s+)?(default\s+)?class\s+/)||_0x324d4f['match'](/^(export\s+)?(type|interface|enum)\s+/)||_0x324d4f[_0x394768(0xa6)](/^(async\s+)?def\s+/)||_0x324d4f[_0x394768(0xa6)](/^func\s+/)||_0x324d4f[_0x394768(0xa6)](/^type\s+\w+\s+(struct|interface)/)||_0x324d4f['match'](/^(pub\s+)?(async\s+)?fn\s+/)||_0x324d4f[_0x394768(0xa6)](/^(pub\s+)?(struct|enum|trait|impl)\s+/)||_0x324d4f[_0x394768(0xa6)](/^(public|private|protected|static)\s+/))_0x1c75e6['push'](_0x572513);else{if(_0x324d4f[_0x394768(0x8f)](_0x394768(0xec))&&!_0x324d4f['includes']('=>')&&_0x324d4f[_0x394768(0xbe)]<0x78)_0x1c75e6[_0x394768(0xac)](_0x572513);else _0x324d4f[_0x394768(0x8f)]('@')&&!_0x324d4f[_0x394768(0x8f)](_0x394768(0x8d))&&!_0x324d4f[_0x394768(0x8f)](_0x394768(0xae))&&_0x1c75e6[_0x394768(0xac)](_0x572513);}}}_0x1c75e6[_0x394768(0xac)](''),_0x1c75e6['push']('('+_0x24a6f1[_0x394768(0xbe)]+_0x394768(0xc7)+(_0x1c75e6[_0x394768(0xbe)]-0x2)+_0x394768(0xe0));const _0x4830f8=_0x1c75e6[_0x394768(0xdc)]('\x0a');if(_0x4830f8[_0x394768(0xbe)]<_0x3ff10c[_0x394768(0xbe)])return _0x4830f8;}}}}catch{}let _0xfdc06b=(0x0,generic_1[_0x394768(0x84)])(_0x3ff10c);if(_0x180be6){const _0x18b88a=path[_0x394768(0xd3)](_0x180be6)[_0x394768(0x68)]();_0xfdc06b=(0x0,generic_1['stripComments'])(_0xfdc06b,_0x18b88a);}const _0x24a5a8=_0xfdc06b[_0x394768(0xaa)]('\x0a');if(_0x24a5a8[_0x394768(0xbe)]<=0x64)return _0xfdc06b;const _0xece6b8=[];return _0xece6b8[_0x394768(0xac)](..._0x24a5a8[_0x394768(0xa4)](0x0,0x32)),_0xece6b8[_0x394768(0xac)](_0x394768(0x7a)+(_0x24a5a8['length']-0x50)+_0x394768(0xf6)),_0xece6b8['push'](..._0x24a5a8[_0x394768(0xa4)](-0x1e)),_0xece6b8['push']('\x0a('+_0x24a5a8[_0x394768(0xbe)]+_0x394768(0x82)),_0xece6b8[_0x394768(0xdc)]('\x0a');}function a0_0x142a(_0x44eb77,_0x225b03){_0x44eb77=_0x44eb77-0x65;const _0x553d54=a0_0x553d();let _0x142a60=_0x553d54[_0x44eb77];return _0x142a60;}function filterGrep(_0xf56894){const _0x3c0627=a0_0x384783,_0x4098a4=_0xf56894[_0x3c0627(0xaa)]('\x0a')[_0x3c0627(0x9d)](_0x187ca9=>_0x187ca9[_0x3c0627(0x81)]()[_0x3c0627(0xbe)]>0x0);if(_0x4098a4[_0x3c0627(0xbe)]===0x0)return _0x3c0627(0xb1);if(_0x4098a4[_0x3c0627(0xbe)]<=0x32)return _0xf56894[_0x3c0627(0x81)]();const _0x1c35d3={},_0x1bd95f=[];for(const _0x17de6b of _0x4098a4){const _0x25e7d8=_0x17de6b[_0x3c0627(0xa5)](':');if(_0x25e7d8>0x0&&_0x25e7d8<0xc8){const _0xf9b702=_0x17de6b[_0x3c0627(0xf2)](0x0,_0x25e7d8);if(_0xf9b702[_0x3c0627(0xb7)]('/')||_0xf9b702[_0x3c0627(0xb7)]('\x5c')||_0xf9b702['includes']('.')){if(!_0x1c35d3[_0xf9b702])_0x1c35d3[_0xf9b702]=[];_0x1c35d3[_0xf9b702][_0x3c0627(0xac)](_0x17de6b[_0x3c0627(0xf2)](_0x25e7d8+0x1)[_0x3c0627(0x81)]());continue;}}_0x1bd95f['push'](_0x17de6b);}const _0x479d39=[],_0xb8361e=Object[_0x3c0627(0xcd)](_0x1c35d3);if(_0xb8361e[_0x3c0627(0xbe)]>0x0){const _0x21d55c=0x14,_0x43630c=_0xb8361e[_0x3c0627(0xa4)](0x0,_0x21d55c);for(const _0x11acfd of _0x43630c){const _0x54ccea=_0x1c35d3[_0x11acfd];if(_0x54ccea[_0x3c0627(0xbe)]<=0x3)for(const _0x5afd7f of _0x54ccea){_0x479d39[_0x3c0627(0xac)](_0x11acfd+':\x20'+_0x5afd7f);}else _0x479d39[_0x3c0627(0xac)](_0x11acfd+':\x20'+_0x54ccea[0x0]),_0x479d39['push'](_0x11acfd+_0x3c0627(0xa9)+_0x54ccea['length']+'\x20matches\x20in\x20this\x20file)');}_0xb8361e[_0x3c0627(0xbe)]>_0x21d55c&&_0x479d39['push'](_0x3c0627(0x72)+(_0xb8361e['length']-_0x21d55c)+_0x3c0627(0xc2));}if(_0x1bd95f[_0x3c0627(0xbe)]>0x0){const _0x2ce511=0x1e;_0x479d39[_0x3c0627(0xac)](..._0x1bd95f[_0x3c0627(0xa4)](0x0,_0x2ce511)),_0x1bd95f[_0x3c0627(0xbe)]>_0x2ce511&&_0x479d39[_0x3c0627(0xac)](_0x3c0627(0x72)+(_0x1bd95f[_0x3c0627(0xbe)]-_0x2ce511)+_0x3c0627(0x7d));}const _0x3e9bce=_0x4098a4[_0x3c0627(0xbe)];return _0x479d39[_0x3c0627(0xac)]('\x0a('+_0x3e9bce+_0x3c0627(0xa8)+(_0xb8361e[_0x3c0627(0xbe)]||'?')+_0x3c0627(0x66)),_0x479d39['join']('\x0a');}function filterFind(_0x7dae79){const _0x2616bc=a0_0x384783,_0x3c4abf=_0x7dae79[_0x2616bc(0xaa)]('\x0a')['filter'](_0x377c54=>_0x377c54[_0x2616bc(0x81)]()['length']>0x0);if(_0x3c4abf[_0x2616bc(0xbe)]===0x0)return _0x2616bc(0x87);if(_0x3c4abf[_0x2616bc(0xbe)]<=0x32)return _0x7dae79[_0x2616bc(0x81)]();const _0x33b6a2={};for(const _0xb7782e of _0x3c4abf){const _0x30b7b7=path[_0x2616bc(0xb9)](_0xb7782e['trim']())||'.';_0x33b6a2[_0x30b7b7]=(_0x33b6a2[_0x30b7b7]||0x0)+0x1;}const _0x129d79=Object['entries'](_0x33b6a2)[_0x2616bc(0xee)]((_0x26ae0c,_0x13c509)=>_0x13c509[0x1]-_0x26ae0c[0x1]),_0x411c13=[_0x3c4abf['length']+_0x2616bc(0xbc)+_0x129d79['length']+'\x20directories',''],_0x139688=0x1e;for(const [_0x126096,_0x32b6bc]of _0x129d79[_0x2616bc(0xa4)](0x0,_0x139688)){_0x411c13[_0x2616bc(0xac)]('\x20\x20'+_0x126096+_0x2616bc(0x92)+_0x32b6bc+_0x2616bc(0x66));}return _0x129d79[_0x2616bc(0xbe)]>_0x139688&&_0x411c13[_0x2616bc(0xac)](_0x2616bc(0x83)+(_0x129d79[_0x2616bc(0xbe)]-_0x139688)+_0x2616bc(0x78)),_0x411c13[_0x2616bc(0xdc)]('\x0a');}
|
|
1
|
+
'use strict';const a0_0x2ee26c=a0_0x4f5a;(function(_0x2cf8c4,_0x1ff88c){const _0x108b4d=a0_0x4f5a,_0x5b183e=_0x2cf8c4();while(!![]){try{const _0x48eae4=parseInt(_0x108b4d(0x15b))/0x1*(-parseInt(_0x108b4d(0xf0))/0x2)+-parseInt(_0x108b4d(0x154))/0x3+parseInt(_0x108b4d(0x160))/0x4+parseInt(_0x108b4d(0x16b))/0x5+-parseInt(_0x108b4d(0x14b))/0x6+parseInt(_0x108b4d(0x150))/0x7*(-parseInt(_0x108b4d(0x113))/0x8)+parseInt(_0x108b4d(0x105))/0x9;if(_0x48eae4===_0x1ff88c)break;else _0x5b183e['push'](_0x5b183e['shift']());}catch(_0x3a6980){_0x5b183e['push'](_0x5b183e['shift']());}}}(a0_0x1c12,0xb9081));var __createBinding=this&&this[a0_0x2ee26c(0x131)]||(Object['create']?function(_0x5e8bb9,_0x419a7c,_0x4f2516,_0x229f91){const _0x52a795=a0_0x2ee26c;if(_0x229f91===undefined)_0x229f91=_0x4f2516;var _0x595354=Object['getOwnPropertyDescriptor'](_0x419a7c,_0x4f2516);(!_0x595354||(_0x52a795(0x110)in _0x595354?!_0x419a7c[_0x52a795(0x162)]:_0x595354['writable']||_0x595354[_0x52a795(0x15e)]))&&(_0x595354={'enumerable':!![],'get':function(){return _0x419a7c[_0x4f2516];}}),Object[_0x52a795(0x11c)](_0x5e8bb9,_0x229f91,_0x595354);}:function(_0x52320f,_0x4b4bd0,_0x4539c5,_0x5a0954){if(_0x5a0954===undefined)_0x5a0954=_0x4539c5;_0x52320f[_0x5a0954]=_0x4b4bd0[_0x4539c5];}),__setModuleDefault=this&&this[a0_0x2ee26c(0x124)]||(Object[a0_0x2ee26c(0x16f)]?function(_0x88d381,_0x858101){const _0x55900c=a0_0x2ee26c;Object[_0x55900c(0x11c)](_0x88d381,_0x55900c(0x142),{'enumerable':!![],'value':_0x858101});}:function(_0x50e815,_0x451378){const _0x1dc109=a0_0x2ee26c;_0x50e815[_0x1dc109(0x142)]=_0x451378;}),__importStar=this&&this[a0_0x2ee26c(0x123)]||(function(){var _0x5b8adb=function(_0x2570b8){const _0x36e1e9=a0_0x4f5a;return _0x5b8adb=Object[_0x36e1e9(0x129)]||function(_0x3474f0){const _0xcbbe4d=_0x36e1e9;var _0xe87823=[];for(var _0x278179 in _0x3474f0)if(Object[_0xcbbe4d(0x17b)][_0xcbbe4d(0x153)][_0xcbbe4d(0x11b)](_0x3474f0,_0x278179))_0xe87823[_0xe87823[_0xcbbe4d(0x166)]]=_0x278179;return _0xe87823;},_0x5b8adb(_0x2570b8);};return function(_0x484892){const _0x275df9=a0_0x4f5a;if(_0x484892&&_0x484892[_0x275df9(0x162)])return _0x484892;var _0x355ad1={};if(_0x484892!=null){for(var _0x47817a=_0x5b8adb(_0x484892),_0x224333=0x0;_0x224333<_0x47817a[_0x275df9(0x166)];_0x224333++)if(_0x47817a[_0x224333]!==_0x275df9(0x142))__createBinding(_0x355ad1,_0x484892,_0x47817a[_0x224333]);}return __setModuleDefault(_0x355ad1,_0x484892),_0x355ad1;};}());Object[a0_0x2ee26c(0x11c)](exports,a0_0x2ee26c(0x162),{'value':!![]}),exports[a0_0x2ee26c(0x13a)]=filterLs,exports['filterTree']=filterTree,exports['filterCat']=filterCat,exports[a0_0x2ee26c(0xf6)]=filterGrep,exports['filterFind']=filterFind;const path=__importStar(require('path')),generic_1=require(a0_0x2ee26c(0x135)),tracker_1=require('../tracker');function isFeatureEnabled(_0x19e1fd){const _0x535561=a0_0x2ee26c;try{const _0x545992=tracker_1[_0x535561(0xee)][_0x535561(0x169)](),_0x328885=_0x545992[_0x535561(0x171)];if(!_0x328885||_0x328885[_0x19e1fd]===undefined)return!![];return _0x328885[_0x19e1fd]!==![];}catch{return!![];}}const LOCK_FILES=['package-lock.json',a0_0x2ee26c(0x107),a0_0x2ee26c(0x132),a0_0x2ee26c(0x144),a0_0x2ee26c(0xeb),a0_0x2ee26c(0x174),a0_0x2ee26c(0x127),a0_0x2ee26c(0x15d),a0_0x2ee26c(0x13f)],BINARY_EXTENSIONS=[a0_0x2ee26c(0xf3),'.min.css',a0_0x2ee26c(0x11e),a0_0x2ee26c(0x143),a0_0x2ee26c(0x10e),a0_0x2ee26c(0x114),a0_0x2ee26c(0x16c),a0_0x2ee26c(0xf5),a0_0x2ee26c(0x101),'.bmp',a0_0x2ee26c(0x103),a0_0x2ee26c(0x100),'.pdf',a0_0x2ee26c(0x102),a0_0x2ee26c(0xfb),a0_0x2ee26c(0x108),a0_0x2ee26c(0x14e),'.bz2',a0_0x2ee26c(0x178),'.rar',a0_0x2ee26c(0x177),a0_0x2ee26c(0x11d),a0_0x2ee26c(0x12d),'.dylib',a0_0x2ee26c(0x179),'.dat','.sqlite',a0_0x2ee26c(0xf8),'.sqlite3',a0_0x2ee26c(0x112),a0_0x2ee26c(0x14a),'.ttf',a0_0x2ee26c(0x10f),'.otf',a0_0x2ee26c(0x175),a0_0x2ee26c(0x13b),a0_0x2ee26c(0x15a),a0_0x2ee26c(0x159),a0_0x2ee26c(0x165),a0_0x2ee26c(0x134),a0_0x2ee26c(0x128),a0_0x2ee26c(0xef),a0_0x2ee26c(0x130),'.o',a0_0x2ee26c(0x14f)];function extractFilename(_0x2c6f2d){const _0x4176f7=a0_0x2ee26c,_0x4a0ca6=_0x2c6f2d['trim']()[_0x4176f7(0x115)](/\s+/);for(let _0x35ff11=0x1;_0x35ff11<_0x4a0ca6[_0x4176f7(0x166)];_0x35ff11++){if(!_0x4a0ca6[_0x35ff11]['startsWith']('-'))return _0x4a0ca6[_0x35ff11];}return null;}function filterLockFile(_0x13cab2,_0x4f43ae){const _0x3d14ef=a0_0x2ee26c;try{const _0x69ccd2=path[_0x3d14ef(0x16e)](_0x4f43ae)[_0x3d14ef(0xfc)]();if(!LOCK_FILES[_0x3d14ef(0x173)](_0xf0aa08=>_0x69ccd2===_0xf0aa08[_0x3d14ef(0xfc)]()))return null;const _0xa280cd=_0x13cab2[_0x3d14ef(0x166)];let _0x1035e8=0x0;if(_0x69ccd2===_0x3d14ef(0x141))try{const _0xf21a49=JSON[_0x3d14ef(0x109)](_0x13cab2);_0x1035e8=Object[_0x3d14ef(0x176)](_0xf21a49[_0x3d14ef(0x148)]||_0xf21a49[_0x3d14ef(0x12e)]||{})['length'];}catch{_0x1035e8=(_0x13cab2[_0x3d14ef(0x17a)](/"resolved":/g)||[])[_0x3d14ef(0x166)];}else{if(_0x69ccd2==='yarn.lock')_0x1035e8=(_0x13cab2[_0x3d14ef(0x17a)](/^"?[^#\s][^:]*:$/gm)||[])[_0x3d14ef(0x166)];else{if(_0x69ccd2===_0x3d14ef(0x10a)||_0x69ccd2===_0x3d14ef(0x174))_0x1035e8=(_0x13cab2[_0x3d14ef(0x17a)](/\[\[package\]\]/g)||[])['length'];else{if(_0x69ccd2==='go.sum')_0x1035e8=Math[_0x3d14ef(0x164)](_0x13cab2[_0x3d14ef(0x115)]('\x0a')[_0x3d14ef(0xf1)](_0x17c72f=>_0x17c72f['trim']())[_0x3d14ef(0x166)]/0x2);else{if(_0x69ccd2==='composer.lock')try{_0x1035e8=JSON[_0x3d14ef(0x109)](_0x13cab2)[_0x3d14ef(0x148)]?.[_0x3d14ef(0x166)]||0x0;}catch{}else _0x69ccd2===_0x3d14ef(0x132)?_0x1035e8=(_0x13cab2['match'](/^\s{2}['"@a-z]/gm)||[])[_0x3d14ef(0x166)]:_0x1035e8=_0x13cab2[_0x3d14ef(0x115)]('\x0a')[_0x3d14ef(0xf1)](_0x371105=>_0x371105[_0x3d14ef(0x10d)]())[_0x3d14ef(0x166)];}}}}return _0x3d14ef(0x122)+path[_0x3d14ef(0x16e)](_0x4f43ae)+':\x20'+_0x1035e8+_0x3d14ef(0x170)+_0xa280cd[_0x3d14ef(0x12c)]()+_0x3d14ef(0x16d);}catch{return null;}}function filterBinaryOrMinified(_0x5b0d49,_0x328246){const _0x273ec5=a0_0x2ee26c;try{if(_0x328246){const _0x48333f=_0x328246['toLowerCase']();for(const _0x281d3f of BINARY_EXTENSIONS){if(_0x48333f[_0x273ec5(0x118)](_0x281d3f))return _0x273ec5(0x138)+path[_0x273ec5(0x16e)](_0x328246)+',\x20'+_0x5b0d49[_0x273ec5(0x166)][_0x273ec5(0x12c)]()+_0x273ec5(0x17e)+_0x281d3f+_0x273ec5(0x146);}}const _0x2d3dd5=_0x5b0d49[_0x273ec5(0xec)](0x0,0x3e8);let _0x5de70d=0x0;for(let _0x55fadb=0x0;_0x55fadb<_0x2d3dd5['length'];_0x55fadb++){if(_0x2d3dd5['charCodeAt'](_0x55fadb)===0x0)_0x5de70d++;}if(_0x5de70d>0x0)return _0x273ec5(0x13c)+_0x5b0d49['length'][_0x273ec5(0x12c)]()+_0x273ec5(0xed);let _0x7d18cb=0x0;for(let _0xa727d2=0x0;_0xa727d2<_0x2d3dd5[_0x273ec5(0x166)];_0xa727d2++){const _0x3a556b=_0x2d3dd5['charCodeAt'](_0xa727d2);if(_0x3a556b<0x20&&_0x3a556b!==0xa&&_0x3a556b!==0xd&&_0x3a556b!==0x9)_0x7d18cb++;}if(_0x2d3dd5[_0x273ec5(0x166)]>0x64&&_0x7d18cb>_0x2d3dd5['length']*0.1)return'[binary\x20file]\x20'+_0x5b0d49[_0x273ec5(0x166)][_0x273ec5(0x12c)]()+_0x273ec5(0x12f);const _0x910322=_0x5b0d49[_0x273ec5(0x115)]('\x0a');if(_0x910322[_0x273ec5(0x166)]<=0x3&&_0x5b0d49['length']>0x1388)return _0x273ec5(0x119)+_0x5b0d49[_0x273ec5(0x166)][_0x273ec5(0x12c)]()+_0x273ec5(0x155)+_0x910322[_0x273ec5(0x166)]+_0x273ec5(0x11f);return null;}catch{return null;}}function filterJsonMinify(_0x304baf){const _0x273a5f=a0_0x2ee26c;try{const _0x499be3=_0x304baf[_0x273a5f(0x10d)]();if(!_0x499be3[_0x273a5f(0x17d)]('{')&&!_0x499be3[_0x273a5f(0x17d)]('['))return null;const _0x164169=_0x499be3[_0x273a5f(0x115)]('\x0a');if(_0x164169[_0x273a5f(0x166)]<=0x14)return null;const _0x21e740=JSON[_0x273a5f(0x109)](_0x499be3),_0x9ecf66=JSON[_0x273a5f(0x121)](_0x21e740);if(_0x9ecf66[_0x273a5f(0x166)]<_0x499be3['length'])return _0x9ecf66;return null;}catch{return null;}}function filterLs(_0x4bc56b){const _0x71033b=a0_0x2ee26c,_0x2c5e39=_0x4bc56b[_0x71033b(0x115)]('\x0a')['filter'](_0x3f927e=>_0x3f927e[_0x71033b(0x10d)]()[_0x71033b(0x166)]>0x0);if(_0x2c5e39[_0x71033b(0x166)]===0x0)return _0x71033b(0x106);if(_0x2c5e39[_0x71033b(0x166)]<=0x1e)return _0x4bc56b[_0x71033b(0x10d)]();const _0x1211fe=[],_0xdc9621=[];for(const _0x54212f of _0x2c5e39){const _0x1eea6b=_0x54212f[_0x71033b(0x10d)]();if(_0x1eea6b[_0x71033b(0x17d)]('total\x20')||_0x1eea6b[_0x71033b(0x17d)]('d')&&_0x1eea6b[_0x71033b(0xfa)]('..'))continue;_0x1eea6b[_0x71033b(0x118)]('/')||_0x1eea6b[_0x71033b(0x17d)]('d')&&_0x1eea6b['includes']('\x20')?_0x1211fe[_0x71033b(0x172)](_0x1eea6b):_0xdc9621[_0x71033b(0x172)](_0x1eea6b);}const _0x503e67=[];return _0x1211fe[_0x71033b(0x166)]>0x0&&(_0x1211fe[_0x71033b(0x166)]<=0xf?_0x503e67[_0x71033b(0x172)](..._0x1211fe):(_0x503e67[_0x71033b(0x172)](..._0x1211fe[_0x71033b(0x15f)](0x0,0xa)),_0x503e67[_0x71033b(0x172)](_0x71033b(0x116)+(_0x1211fe[_0x71033b(0x166)]-0xa)+'\x20more\x20directories'))),_0xdc9621['length']>0x0&&(_0xdc9621[_0x71033b(0x166)]<=0x14?_0x503e67[_0x71033b(0x172)](..._0xdc9621):(_0x503e67[_0x71033b(0x172)](..._0xdc9621['slice'](0x0,0xf)),_0x503e67[_0x71033b(0x172)]('...\x20+'+(_0xdc9621['length']-0xf)+'\x20more\x20files'))),_0x503e67[_0x71033b(0x172)]('\x0a('+_0x1211fe[_0x71033b(0x166)]+_0x71033b(0x16a)+_0xdc9621[_0x71033b(0x166)]+_0x71033b(0x17c)),_0x503e67['join']('\x0a');}function filterTree(_0x3cf8b5){const _0x6d9e09=a0_0x2ee26c,_0x52b94b=_0x3cf8b5[_0x6d9e09(0x115)]('\x0a');if(_0x52b94b[_0x6d9e09(0x166)]<=0x32)return _0x3cf8b5[_0x6d9e09(0x10d)]();const _0x3b65d0=[];let _0x46247d=0x0,_0x3010cf=0x0,_0x1ccbc0=0x0;for(const _0x1d37b7 of _0x52b94b){const _0x4368d7=_0x1d37b7[_0x6d9e09(0x17a)](/(\d+)\s+director/),_0x3433c9=_0x1d37b7[_0x6d9e09(0x17a)](/(\d+)\s+file/);if(_0x4368d7)_0x1ccbc0=parseInt(_0x4368d7[0x1]);if(_0x3433c9)_0x3010cf=parseInt(_0x3433c9[0x1]);const _0x42cbcb=(_0x1d37b7[_0x6d9e09(0x17a)](/^[│├└\s─]+/)||[''])[0x0][_0x6d9e09(0x166)];_0x42cbcb<=0x4&&(_0x3b65d0[_0x6d9e09(0x172)](_0x1d37b7),_0x46247d++);}return _0x52b94b['length']>_0x3b65d0['length']&&_0x3b65d0['push'](_0x6d9e09(0xf7)+_0x1ccbc0+_0x6d9e09(0x16a)+_0x3010cf+_0x6d9e09(0x156)),_0x3b65d0['join']('\x0a');}function filterCat(_0x444a66,_0x821c04=''){const _0x172486=a0_0x2ee26c,_0x22706b=extractFilename(_0x821c04);try{if(_0x22706b&&isFeatureEnabled('lock')){const _0x229fcd=filterLockFile(_0x444a66,_0x22706b);if(_0x229fcd)return _0x229fcd;}if(isFeatureEnabled(_0x172486(0x145))){const _0x58b16c=filterBinaryOrMinified(_0x444a66,_0x22706b);if(_0x58b16c)return _0x58b16c;}if(isFeatureEnabled(_0x172486(0x14d))){const _0x44fcbc=(0x0,generic_1['smartCrushJson'])(_0x444a66);if(_0x44fcbc)return _0x44fcbc;}const _0x562cd8=filterJsonMinify(_0x444a66);if(_0x562cd8)return _0x562cd8;if(_0x22706b&&isFeatureEnabled(_0x172486(0x15c))){const _0x551824=path[_0x172486(0xff)](_0x22706b)[_0x172486(0xfc)](),_0x36f17c=['.ts',_0x172486(0x126),_0x172486(0x163),_0x172486(0x11a),'.py','.go',_0x172486(0x133),_0x172486(0x157),'.c',_0x172486(0x152),'.cs','.rb',_0x172486(0xf2),'.kt'];if(_0x36f17c[_0x172486(0xfa)](_0x551824)){const _0x560bb0=_0x444a66[_0x172486(0x115)]('\x0a');if(_0x560bb0[_0x172486(0x166)]>0x64){const _0x367073=[];_0x367073[_0x172486(0x172)](_0x172486(0x117)+path[_0x172486(0x16e)](_0x22706b)+'\x20('+_0x560bb0[_0x172486(0x166)]+'\x20lines)'),_0x367073[_0x172486(0x172)]('');for(const _0x4448a0 of _0x560bb0){const _0x1cabff=_0x4448a0['trim']();if(_0x1cabff[_0x172486(0x17d)](_0x172486(0x137))||_0x1cabff[_0x172486(0x17d)](_0x172486(0xf9))||_0x1cabff[_0x172486(0x17d)](_0x172486(0x13e))||_0x1cabff['match'](/=\s*require\(/)||_0x1cabff[_0x172486(0x17d)](_0x172486(0x125))||_0x1cabff['startsWith'](_0x172486(0x14c))||_0x1cabff[_0x172486(0x17d)](_0x172486(0x151)))_0x367073[_0x172486(0x172)](_0x4448a0);else{if(_0x1cabff['match'](/^(export\s+)?(async\s+)?function\s+/)||_0x1cabff['match'](/^(export\s+)?(default\s+)?class\s+/)||_0x1cabff[_0x172486(0x17a)](/^(export\s+)?(type|interface|enum)\s+/)||_0x1cabff[_0x172486(0x17a)](/^(async\s+)?def\s+/)||_0x1cabff['match'](/^func\s+/)||_0x1cabff[_0x172486(0x17a)](/^type\s+\w+\s+(struct|interface)/)||_0x1cabff['match'](/^(pub\s+)?(async\s+)?fn\s+/)||_0x1cabff['match'](/^(pub\s+)?(struct|enum|trait|impl)\s+/)||_0x1cabff[_0x172486(0x17a)](/^(public|private|protected|static)\s+/))_0x367073['push'](_0x4448a0);else{if(_0x1cabff[_0x172486(0x17d)](_0x172486(0x167))&&!_0x1cabff[_0x172486(0xfa)]('=>')&&_0x1cabff['length']<0x78)_0x367073['push'](_0x4448a0);else _0x1cabff['startsWith']('@')&&!_0x1cabff[_0x172486(0x17d)]('@param')&&!_0x1cabff[_0x172486(0x17d)]('@return')&&_0x367073['push'](_0x4448a0);}}}_0x367073[_0x172486(0x172)](''),_0x367073['push']('('+_0x560bb0['length']+_0x172486(0x12a)+(_0x367073[_0x172486(0x166)]-0x2)+_0x172486(0x120));const _0x435f7c=_0x367073[_0x172486(0xfe)]('\x0a');if(_0x435f7c['length']<_0x444a66['length'])return _0x435f7c;}}}}catch{}let _0x23ac9d=(0x0,generic_1['collapseWhitespace'])(_0x444a66);if(_0x22706b){const _0x8a8cb1=path[_0x172486(0xff)](_0x22706b)[_0x172486(0xfc)]();_0x23ac9d=(0x0,generic_1['stripComments'])(_0x23ac9d,_0x8a8cb1);}const _0x38b02c=_0x23ac9d[_0x172486(0x115)]('\x0a');if(_0x38b02c[_0x172486(0x166)]<=0x64)return _0x23ac9d;const _0x33bb25=[];return _0x33bb25[_0x172486(0x172)](..._0x38b02c[_0x172486(0x15f)](0x0,0x32)),_0x33bb25['push'](_0x172486(0x12b)+(_0x38b02c['length']-0x50)+_0x172486(0x136)),_0x33bb25[_0x172486(0x172)](..._0x38b02c[_0x172486(0x15f)](-0x1e)),_0x33bb25[_0x172486(0x172)]('\x0a('+_0x38b02c[_0x172486(0x166)]+_0x172486(0xfd)),_0x33bb25[_0x172486(0xfe)]('\x0a');}function a0_0x1c12(){const _0xc437ba=['length','export\x20','dirname','getConfig','\x20directories,\x20','4859425avGBIF','.jpeg','\x20chars\x20(content\x20omitted\x20—\x20lock\x20files\x20are\x20not\x20useful\x20for\x20LLM\x20context)','basename','create','\x20dependencies,\x20','features_enabled','push','some','poetry.lock','.mp3','keys','.exe','.7z','.bin','match','prototype','\x20files)','startsWith','\x20chars,\x20type:\x20','go.sum','substring','\x20chars\x20(contains\x20null\x20bytes\x20—\x20binary\x20content\x20omitted)','tracker','.pyo','2vWWiLe','filter','.swift','.min.js','entries','.gif','filterGrep','\x0a...\x20(','.db','from\x20','includes','.tar.gz','toLowerCase','\x20lines\x20total)','join','extname','.svg','.ico','.zip','.webp','\x20files\x20found\x20across\x20','9903924icjjBA','Empty\x20directory','yarn.lock','.tgz','parse','cargo.lock','\x20\x20...\x20+','\x20more\x20directories','trim','.png','.eot','get','No\x20files\x20found','.woff','56DAGVtG','.jpg','split','...\x20+','[code\x20skeleton]\x20','endsWith','[minified\x20file]\x20','.jsx','call','defineProperty','.dll','.map','\x20line(s)\x20(content\x20omitted\x20—\x20not\x20human-readable)','\x20structural\x20lines\x20shown)','stringify','[lock\x20file]\x20','__importStar','__setModuleDefault','#include\x20','.js','composer.lock','.pyc','getOwnPropertyNames','\x20lines\x20total,\x20','\x0a...\x20[','toLocaleString','.so','dependencies','\x20chars\x20(high\x20non-printable\x20ratio\x20—\x20content\x20omitted)','.class','__createBinding','pnpm-lock.yaml','.rs','.webm','./generic','\x20lines\x20truncated]\x20...\x0a','import\x20','[binary/minified\x20file]\x20',':\x20...\x20(','filterLs','.mp4','[binary\x20file]\x20','\x20more\x20files\x20with\x20matches','require(','bun.lockb','indexOf','package-lock.json','default','.wasm','Cargo.lock','binary','\x20(content\x20omitted\x20—\x20not\x20useful\x20for\x20LLM\x20context)','/\x20(','packages','No\x20matches\x20found','.woff2','5276370ZlLJzR','use\x20','json_crusher','.gz','.obj','638904bsrZNt','package\x20','.cpp','hasOwnProperty','2918076WPDXLZ','\x20chars\x20across\x20','\x20files\x20total\x20—\x20deep\x20entries\x20truncated)','.java','\x20matches\x20in\x20this\x20file)','.avi','.wav','122489GtOzAb','skeleton','Gemfile.lock','configurable','slice','5196192famTDU','\x20directories','__esModule','.tsx','floor','.mov'];a0_0x1c12=function(){return _0xc437ba;};return a0_0x1c12();}function filterGrep(_0x59099d){const _0x4ac22d=a0_0x2ee26c,_0x292825=_0x59099d[_0x4ac22d(0x115)]('\x0a')[_0x4ac22d(0xf1)](_0x3d515c=>_0x3d515c[_0x4ac22d(0x10d)]()[_0x4ac22d(0x166)]>0x0);if(_0x292825[_0x4ac22d(0x166)]===0x0)return _0x4ac22d(0x149);if(_0x292825[_0x4ac22d(0x166)]<=0x32)return _0x59099d[_0x4ac22d(0x10d)]();const _0x5806f1={},_0x48be11=[];for(const _0x5e5fe5 of _0x292825){const _0x4a9c98=_0x5e5fe5[_0x4ac22d(0x140)](':');if(_0x4a9c98>0x0&&_0x4a9c98<0xc8){const _0x15b01d=_0x5e5fe5[_0x4ac22d(0xec)](0x0,_0x4a9c98);if(_0x15b01d[_0x4ac22d(0xfa)]('/')||_0x15b01d[_0x4ac22d(0xfa)]('\x5c')||_0x15b01d[_0x4ac22d(0xfa)]('.')){if(!_0x5806f1[_0x15b01d])_0x5806f1[_0x15b01d]=[];_0x5806f1[_0x15b01d][_0x4ac22d(0x172)](_0x5e5fe5[_0x4ac22d(0xec)](_0x4a9c98+0x1)[_0x4ac22d(0x10d)]());continue;}}_0x48be11[_0x4ac22d(0x172)](_0x5e5fe5);}const _0x3c8f15=[],_0x17b07f=Object[_0x4ac22d(0x176)](_0x5806f1);if(_0x17b07f['length']>0x0){const _0x3a2de0=0x14,_0x5efdbf=_0x17b07f['slice'](0x0,_0x3a2de0);for(const _0x2de96d of _0x5efdbf){const _0x5441ee=_0x5806f1[_0x2de96d];if(_0x5441ee['length']<=0x3)for(const _0x8dbd7 of _0x5441ee){_0x3c8f15[_0x4ac22d(0x172)](_0x2de96d+':\x20'+_0x8dbd7);}else _0x3c8f15[_0x4ac22d(0x172)](_0x2de96d+':\x20'+_0x5441ee[0x0]),_0x3c8f15[_0x4ac22d(0x172)](_0x2de96d+_0x4ac22d(0x139)+_0x5441ee[_0x4ac22d(0x166)]+_0x4ac22d(0x158));}_0x17b07f[_0x4ac22d(0x166)]>_0x3a2de0&&_0x3c8f15[_0x4ac22d(0x172)]('...\x20+'+(_0x17b07f[_0x4ac22d(0x166)]-_0x3a2de0)+_0x4ac22d(0x13d));}if(_0x48be11[_0x4ac22d(0x166)]>0x0){const _0x156ac9=0x1e;_0x3c8f15[_0x4ac22d(0x172)](..._0x48be11[_0x4ac22d(0x15f)](0x0,_0x156ac9)),_0x48be11[_0x4ac22d(0x166)]>_0x156ac9&&_0x3c8f15[_0x4ac22d(0x172)](_0x4ac22d(0x116)+(_0x48be11['length']-_0x156ac9)+'\x20more\x20matches');}const _0x5c8684=_0x292825[_0x4ac22d(0x166)];return _0x3c8f15['push']('\x0a('+_0x5c8684+'\x20matches\x20across\x20'+(_0x17b07f[_0x4ac22d(0x166)]||'?')+_0x4ac22d(0x17c)),_0x3c8f15[_0x4ac22d(0xfe)]('\x0a');}function a0_0x4f5a(_0x307747,_0x15a1b3){_0x307747=_0x307747-0xeb;const _0x1c1201=a0_0x1c12();let _0x4f5ad4=_0x1c1201[_0x307747];return _0x4f5ad4;}function filterFind(_0x439d0f){const _0x5ea1d0=a0_0x2ee26c,_0x14a41=_0x439d0f[_0x5ea1d0(0x115)]('\x0a')['filter'](_0x1f9fbf=>_0x1f9fbf['trim']()[_0x5ea1d0(0x166)]>0x0);if(_0x14a41[_0x5ea1d0(0x166)]===0x0)return _0x5ea1d0(0x111);if(_0x14a41[_0x5ea1d0(0x166)]<=0x32)return _0x439d0f['trim']();const _0x21480e={};for(const _0x416b94 of _0x14a41){const _0x5c3696=path[_0x5ea1d0(0x168)](_0x416b94['trim']())||'.';_0x21480e[_0x5c3696]=(_0x21480e[_0x5c3696]||0x0)+0x1;}const _0x407b3f=Object[_0x5ea1d0(0xf4)](_0x21480e)['sort']((_0x43dc7b,_0x140ce7)=>_0x140ce7[0x1]-_0x43dc7b[0x1]),_0x550071=[_0x14a41['length']+_0x5ea1d0(0x104)+_0x407b3f[_0x5ea1d0(0x166)]+_0x5ea1d0(0x161),''],_0xe706d=0x1e;for(const [_0x18bf54,_0x537ce6]of _0x407b3f[_0x5ea1d0(0x15f)](0x0,_0xe706d)){_0x550071[_0x5ea1d0(0x172)]('\x20\x20'+_0x18bf54+_0x5ea1d0(0x147)+_0x537ce6+_0x5ea1d0(0x17c));}return _0x407b3f[_0x5ea1d0(0x166)]>_0xe706d&&_0x550071['push'](_0x5ea1d0(0x10b)+(_0x407b3f['length']-_0xe706d)+_0x5ea1d0(0x10c)),_0x550071[_0x5ea1d0(0xfe)]('\x0a');}
|
package/hooks/claude-hook.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function a0_0x4314(_0x4ba0b0,_0x941df2){_0x4ba0b0=_0x4ba0b0-0x99;var _0x180a32=a0_0x180a();var _0x431495=_0x180a32[_0x4ba0b0];return _0x431495;}var a0_0x128c01=a0_0x4314;(function(_0x2c8b9e,_0x283460){var _0x3cece4=a0_0x4314,_0x4aacfe=_0x2c8b9e();while(!![]){try{var _0x2d6bb5=parseInt(_0x3cece4(0x9f))/0x1+-parseInt(_0x3cece4(0xaf))/0x2*(-parseInt(_0x3cece4(0xa3))/0x3)+parseInt(_0x3cece4(0xa2))/0x4*(-parseInt(_0x3cece4(0xa9))/0x5)+parseInt(_0x3cece4(0xae))/0x6+-parseInt(_0x3cece4(0xb7))/0x7+-parseInt(_0x3cece4(0x9b))/0x8*(-parseInt(_0x3cece4(0xa7))/0x9)+-parseInt(_0x3cece4(0xb6))/0xa;if(_0x2d6bb5===_0x283460)break;else _0x4aacfe['push'](_0x4aacfe['shift']());}catch(_0x49d517){_0x4aacfe['push'](_0x4aacfe['shift']());}}}(a0_0x180a,0xd93ec));var __createBinding=this&&this[a0_0x128c01(0x9c)]||(Object[a0_0x128c01(0xac)]?function(_0x437d36,_0x350a82,_0x551dab,_0x76ffae){var _0x1b7c12=a0_0x128c01;if(_0x76ffae===undefined)_0x76ffae=_0x551dab;var _0x19d384=Object[_0x1b7c12(0xb2)](_0x350a82,_0x551dab);(!_0x19d384||('get'in _0x19d384?!_0x350a82[_0x1b7c12(0xa4)]:_0x19d384[_0x1b7c12(0x9d)]||_0x19d384[_0x1b7c12(0xa8)]))&&(_0x19d384={'enumerable':!![],'get':function(){return _0x350a82[_0x551dab];}}),Object[_0x1b7c12(0xaa)](_0x437d36,_0x76ffae,_0x19d384);}:function(_0x2a590e,_0x1d9388,_0x30c1ff,_0x142292){if(_0x142292===undefined)_0x142292=_0x30c1ff;_0x2a590e[_0x142292]=_0x1d9388[_0x30c1ff];}),__setModuleDefault=this&&this[a0_0x128c01(0xb1)]||(Object[a0_0x128c01(0xac)]?function(_0x250170,_0xe9e2d6){var _0x1aaad1=a0_0x128c01;Object['defineProperty'](_0x250170,_0x1aaad1(0xba),{'enumerable':!![],'value':_0xe9e2d6});}:function(_0x57a69a,_0xd0a310){var _0x1bd643=a0_0x128c01;_0x57a69a[_0x1bd643(0xba)]=_0xd0a310;}),__importStar=this&&this[a0_0x128c01(0xb8)]||(function(){var _0x56a8c1=function(_0x322277){var _0x4e083f=a0_0x4314;return _0x56a8c1=Object[_0x4e083f(0xb5)]||function(_0x431e55){var _0x51a2a5=_0x4e083f,_0x20c9d8=[];for(var _0x3dcc7a in _0x431e55)if(Object[_0x51a2a5(0xb3)][_0x51a2a5(0xa6)][_0x51a2a5(0xa5)](_0x431e55,_0x3dcc7a))_0x20c9d8[_0x20c9d8[_0x51a2a5(0xb0)]]=_0x3dcc7a;return _0x20c9d8;},_0x56a8c1(_0x322277);};return function(_0x1c67f6){var _0x117301=a0_0x4314;if(_0x1c67f6&&_0x1c67f6[_0x117301(0xa4)])return _0x1c67f6;var _0x37baaf={};if(_0x1c67f6!=null){for(var _0x1d98a9=_0x56a8c1(_0x1c67f6),_0x292536=0x0;_0x292536<_0x1d98a9['length'];_0x292536++)if(_0x1d98a9[_0x292536]!==_0x117301(0xba))__createBinding(_0x37baaf,_0x1c67f6,_0x1d98a9[_0x292536]);}return __setModuleDefault(_0x37baaf,_0x1c67f6),_0x37baaf;};}());Object['defineProperty'](exports,a0_0x128c01(0xa4),{'value':!![]}),exports[a0_0x128c01(0xb9)]=installClaudeHooks;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x128c01(0xad))),os=__importStar(require('os'));function installClaudeHooks(){var _0x40bd95=a0_0x128c01;try{const _0x518bed=path[_0x40bd95(0x9a)](os[_0x40bd95(0xa0)](),'.claude',_0x40bd95(0xa1));!fs[_0x40bd95(0xab)](_0x518bed)&&fs[_0x40bd95(0x9e)](_0x518bed,{'recursive':!![]});const _0x44396e=path['join'](_0x518bed,'post_tool_use.js'),_0x44a22d=_0x40bd95(0xb4);fs[_0x40bd95(0x99)](_0x44396e,_0x44a22d,_0x40bd95(0xbb));}catch(_0x167424){}}function a0_0x180a(){var _0x3f8ebb=['create','path','288618MYpNGa','3338814gFYtZn','length','__setModuleDefault','getOwnPropertyDescriptor','prototype','//\x20TrimPrompt\x20Native\x20PostToolUse\x20Hook\x20for\x20Claude\x20Code\x0aconst\x20fs\x20=\x20require(\x27fs\x27);\x0aconst\x20path\x20=\x20require(\x27path\x27);\x0aconst\x20os\x20=\x20require(\x27os\x27);\x0a\x0amodule.exports\x20=\x20async\x20function\x20postToolUse(event)\x20{\x0a\x20\x20try\x20{\x0a\x20\x20\x20\x20if\x20(!event\x20||\x20!event.result)\x20return\x20event;\x0a\x20\x20\x20\x20let\x20contentStr\x20=\x20typeof\x20event.result\x20===\x20\x27string\x27\x20?\x20event.result\x20:\x20JSON.stringify(event.result);\x0a\x20\x20\x20\x20if\x20(contentStr.length\x20>\x20500)\x20{\x0a\x20\x20\x20\x20\x20\x20const\x20baseDir\x20=\x20path.join(os.homedir(),\x20\x27.trimprompt\x27);\x0a\x20\x20\x20\x20\x20\x20const\x20cacheDir\x20=\x20path.join(baseDir,\x20\x27cache\x27);\x0a\x20\x20\x20\x20\x20\x20if\x20(!fs.existsSync(cacheDir))\x20fs.mkdirSync(cacheDir,\x20{\x20recursive:\x20true\x20});\x0a\x20\x20\x20\x20\x20\x20const\x20chunkId\x20=\x20\x27chunk_\x27\x20+\x20Math.random().toString(36).substring(2,\x2011);\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20const\x20rawTokens\x20=\x20Math.ceil(contentStr.length\x20/\x204);\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20const\x20snippet\x20=\x20contentStr.substring(0,\x20200).replace(/\x5cn/g,\x20\x27\x20\x27);\x0a\x20\x20\x20\x20\x20\x20const\x20replacement\x20=\x20`>\x20[!NOTE]\x5cn>\x20**[TrimPrompt\x20Context\x20Offloaded]**\x20Raw\x20tool\x20output\x20(${contentStr.length.toLocaleString()}\x20chars)\x20side-cached\x20locally.\x5cn>\x20Preview:\x20${snippet}...\x5cn>\x20Retrieve\x20raw:\x20\x5c`trim\x20retrieve\x20${chunkId}\x5c``;\x0a\x20\x20\x20\x20\x20\x20const\x20compressedTokens\x20=\x20Math.ceil(replacement.length\x20/\x204);\x0a\x20\x20\x20\x20\x20\x20const\x20savedTokens\x20=\x20Math.max(0,\x20rawTokens\x20-\x20compressedTokens);\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20fs.writeFileSync(path.join(cacheDir,\x20chunkId\x20+\x20\x27.json\x27),\x20JSON.stringify({\x0a\x20\x20\x20\x20\x20\x20\x20\x20chunk_id:\x20chunkId,\x0a\x20\x20\x20\x20\x20\x20\x20\x20raw_tokens:\x20rawTokens,\x0a\x20\x20\x20\x20\x20\x20\x20\x20compressed_tokens:\x20compressedTokens,\x0a\x20\x20\x20\x20\x20\x20\x20\x20created_at:\x20new\x20Date().toISOString(),\x0a\x20\x20\x20\x20\x20\x20\x20\x20last_accessed_at:\x20new\x20Date().toISOString(),\x0a\x20\x20\x20\x20\x20\x20\x20\x20summary:\x20`Summary:\x20Tool\x20result\x20offloaded\x20(${rawTokens}\x20tokens).`,\x0a\x20\x20\x20\x20\x20\x20\x20\x20raw_payload:\x20contentStr\x0a\x20\x20\x20\x20\x20\x20},\x20null,\x202));\x0a\x0a\x20\x20\x20\x20\x20\x20if\x20(typeof\x20event.result\x20===\x20\x27string\x27)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20event.result\x20=\x20replacement;\x0a\x20\x20\x20\x20\x20\x20}\x20else\x20if\x20(event.result\x20&&\x20typeof\x20event.result\x20===\x20\x27object\x27)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20event.result.content\x20=\x20replacement;\x0a\x20\x20\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20\x20\x20//\x20Update\x20sessions_state.json\x20with\x20hook\x20savings\x0a\x20\x20\x20\x20\x20\x20try\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20statePath\x20=\x20path.join(baseDir,\x20\x27sessions_state.json\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20let\x20state\x20=\x20{};\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(fs.existsSync(statePath))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x20state\x20=\x20JSON.parse(fs.readFileSync(statePath,\x20\x27utf8\x27))\x20||\x20{};\x20}\x20catch\x20(e)\x20{}\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20Find\x20latest\x20session\x20file\x20for\x20\x27claude\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20claudeDirs\x20=\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20path.join(os.homedir(),\x20\x27.claude\x27,\x20\x27projects\x27),\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20path.join(os.homedir(),\x20\x27.claude\x27,\x20\x27history\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20];\x0a\x20\x20\x20\x20\x20\x20\x20\x20let\x20latestFullPath\x20=\x20null;\x0a\x20\x20\x20\x20\x20\x20\x20\x20let\x20latestTime\x20=\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20for\x20(const\x20dir\x20of\x20claudeDirs)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(fs.existsSync(dir))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20scanDir\x20=\x20(currentDir,\x20depth\x20=\x200)\x20=>\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(depth\x20>\x206)\x20return;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20entries\x20=\x20fs.readdirSync(currentDir,\x20{\x20withFileTypes:\x20true\x20});\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20for\x20(const\x20entry\x20of\x20entries)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20full\x20=\x20path.join(currentDir,\x20entry.name);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(entry.isDirectory())\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20scanDir(full,\x20depth\x20+\x201);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x20else\x20if\x20(entry.isFile()\x20&&\x20!entry.name.startsWith(\x27.\x27))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(entry.name.endsWith(\x27.jsonl\x27)\x20||\x20entry.name.endsWith(\x27.json1\x27))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20stat\x20=\x20fs.statSync(full);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(stat.mtimeMs\x20>\x20latestTime)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20latestTime\x20=\x20stat.mtimeMs;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20latestFullPath\x20=\x20full;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x20catch\x20(e)\x20{}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20};\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20scanDir(dir);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(latestFullPath)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20existing\x20=\x20state[latestFullPath]\x20||\x20{};\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20prevHook\x20=\x20existing.hookSavedTokens\x20||\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20newHook\x20=\x20prevHook\x20+\x20savedTokens;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20finalOfficial\x20=\x20existing.officialCompactSaved\x20||\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20finalAuto\x20=\x20existing.autoCompactSaved\x20||\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20state[latestFullPath]\x20=\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20lineCount:\x20existing.lineCount\x20||\x201,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20activeSavedTokens:\x20finalOfficial\x20+\x20finalAuto\x20+\x20newHook,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20sideCacheSaved:\x20existing.sideCacheSaved\x20||\x200,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20officialCompactSaved:\x20finalOfficial,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20autoCompactSaved:\x20finalAuto,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20hookSavedTokens:\x20newHook\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20};\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20fs.writeFileSync(statePath,\x20JSON.stringify(state,\x20null,\x202),\x20\x27utf8\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20}\x20catch\x20(e)\x20{}\x0a\x20\x20\x20\x20}\x0a\x20\x20}\x20catch\x20(e)\x20{}\x0a\x20\x20return\x20event;\x0a};\x0a','getOwnPropertyNames','20540810LxZoLI','606109idUFTJ','__importStar','installClaudeHooks','default','utf8','writeFileSync','join','10757056QRSpnK','__createBinding','writable','mkdirSync','997445SzHwCm','homedir','hooks','374212EyqQXk','3FxqMhp','__esModule','call','hasOwnProperty','9OKhzHx','configurable','55mPIiEy','defineProperty','existsSync'];a0_0x180a=function(){return _0x3f8ebb;};return a0_0x180a();}
|
|
1
|
+
'use strict';var a0_0x16077d=a0_0x247d;(function(_0x5d8c31,_0x1f03c6){var _0x125218=a0_0x247d,_0x2dec9f=_0x5d8c31();while(!![]){try{var _0x4eb144=parseInt(_0x125218(0x152))/0x1*(-parseInt(_0x125218(0x14a))/0x2)+-parseInt(_0x125218(0x14b))/0x3+-parseInt(_0x125218(0x139))/0x4+-parseInt(_0x125218(0x138))/0x5+-parseInt(_0x125218(0x14e))/0x6*(-parseInt(_0x125218(0x146))/0x7)+-parseInt(_0x125218(0x147))/0x8+parseInt(_0x125218(0x154))/0x9*(parseInt(_0x125218(0x142))/0xa);if(_0x4eb144===_0x1f03c6)break;else _0x2dec9f['push'](_0x2dec9f['shift']());}catch(_0x290bb8){_0x2dec9f['push'](_0x2dec9f['shift']());}}}(a0_0x3a77,0x723f5));var __createBinding=this&&this['__createBinding']||(Object['create']?function(_0x34b124,_0x3de6e2,_0x4e7fba,_0x4bcb6c){var _0x24ef41=a0_0x247d;if(_0x4bcb6c===undefined)_0x4bcb6c=_0x4e7fba;var _0x3f9d95=Object[_0x24ef41(0x136)](_0x3de6e2,_0x4e7fba);(!_0x3f9d95||(_0x24ef41(0x140)in _0x3f9d95?!_0x3de6e2[_0x24ef41(0x14f)]:_0x3f9d95[_0x24ef41(0x14d)]||_0x3f9d95['configurable']))&&(_0x3f9d95={'enumerable':!![],'get':function(){return _0x3de6e2[_0x4e7fba];}}),Object[_0x24ef41(0x145)](_0x34b124,_0x4bcb6c,_0x3f9d95);}:function(_0x5c244e,_0x19700b,_0x434278,_0x5a3633){if(_0x5a3633===undefined)_0x5a3633=_0x434278;_0x5c244e[_0x5a3633]=_0x19700b[_0x434278];}),__setModuleDefault=this&&this[a0_0x16077d(0x14c)]||(Object[a0_0x16077d(0x149)]?function(_0x2f104a,_0x1f1753){var _0x166a56=a0_0x16077d;Object[_0x166a56(0x145)](_0x2f104a,_0x166a56(0x13f),{'enumerable':!![],'value':_0x1f1753});}:function(_0x4d6e0b,_0x4fa465){_0x4d6e0b['default']=_0x4fa465;}),__importStar=this&&this['__importStar']||(function(){var _0x10a0bd=function(_0x54bb01){var _0x47119a=a0_0x247d;return _0x10a0bd=Object[_0x47119a(0x137)]||function(_0x548439){var _0x56239c=_0x47119a,_0x4f28bd=[];for(var _0xecc10 in _0x548439)if(Object[_0x56239c(0x13a)]['hasOwnProperty'][_0x56239c(0x144)](_0x548439,_0xecc10))_0x4f28bd[_0x4f28bd[_0x56239c(0x13d)]]=_0xecc10;return _0x4f28bd;},_0x10a0bd(_0x54bb01);};return function(_0x563f00){var _0x4aa902=a0_0x247d;if(_0x563f00&&_0x563f00[_0x4aa902(0x14f)])return _0x563f00;var _0x29b2da={};if(_0x563f00!=null){for(var _0x5f033f=_0x10a0bd(_0x563f00),_0x425b36=0x0;_0x425b36<_0x5f033f['length'];_0x425b36++)if(_0x5f033f[_0x425b36]!=='default')__createBinding(_0x29b2da,_0x563f00,_0x5f033f[_0x425b36]);}return __setModuleDefault(_0x29b2da,_0x563f00),_0x29b2da;};}());function a0_0x247d(_0x4e9b98,_0x5ac640){_0x4e9b98=_0x4e9b98-0x135;var _0x3a7708=a0_0x3a77();var _0x247dbf=_0x3a7708[_0x4e9b98];return _0x247dbf;}function a0_0x3a77(){var _0x134aa7=['writeFileSync','default','get','join','30DvgBDv','//\x20TrimPrompt\x20Native\x20PostToolUse\x20Hook\x20for\x20Claude\x20Code\x0aconst\x20fs\x20=\x20require(\x27fs\x27);\x0aconst\x20path\x20=\x20require(\x27path\x27);\x0aconst\x20os\x20=\x20require(\x27os\x27);\x0a\x0amodule.exports\x20=\x20async\x20function\x20postToolUse(event)\x20{\x0a\x20\x20try\x20{\x0a\x20\x20\x20\x20if\x20(!event\x20||\x20!event.result)\x20return\x20event;\x0a\x20\x20\x20\x20let\x20contentStr\x20=\x20typeof\x20event.result\x20===\x20\x27string\x27\x20?\x20event.result\x20:\x20JSON.stringify(event.result);\x0a\x20\x20\x20\x20if\x20(contentStr.length\x20>\x20500)\x20{\x0a\x20\x20\x20\x20\x20\x20const\x20baseDir\x20=\x20path.join(os.homedir(),\x20\x27.trimprompt\x27);\x0a\x20\x20\x20\x20\x20\x20const\x20cacheDir\x20=\x20path.join(baseDir,\x20\x27cache\x27);\x0a\x20\x20\x20\x20\x20\x20if\x20(!fs.existsSync(cacheDir))\x20fs.mkdirSync(cacheDir,\x20{\x20recursive:\x20true\x20});\x0a\x20\x20\x20\x20\x20\x20const\x20chunkId\x20=\x20\x27chunk_\x27\x20+\x20Math.random().toString(36).substring(2,\x2011);\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20const\x20rawTokens\x20=\x20Math.ceil(contentStr.length\x20/\x204);\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20const\x20snippet\x20=\x20contentStr.substring(0,\x20200).replace(/\x5cn/g,\x20\x27\x20\x27);\x0a\x20\x20\x20\x20\x20\x20const\x20replacement\x20=\x20`>\x20[!NOTE]\x5cn>\x20**[TrimPrompt\x20Context\x20Offloaded]**\x20Raw\x20tool\x20output\x20(${contentStr.length.toLocaleString()}\x20chars)\x20side-cached\x20locally.\x5cn>\x20Preview:\x20${snippet}...\x5cn>\x20Retrieve\x20raw:\x20\x5c`trim\x20retrieve\x20${chunkId}\x5c``;\x0a\x20\x20\x20\x20\x20\x20const\x20compressedTokens\x20=\x20Math.ceil(replacement.length\x20/\x204);\x0a\x20\x20\x20\x20\x20\x20const\x20savedTokens\x20=\x20Math.max(0,\x20rawTokens\x20-\x20compressedTokens);\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20fs.writeFileSync(path.join(cacheDir,\x20chunkId\x20+\x20\x27.json\x27),\x20JSON.stringify({\x0a\x20\x20\x20\x20\x20\x20\x20\x20chunk_id:\x20chunkId,\x0a\x20\x20\x20\x20\x20\x20\x20\x20raw_tokens:\x20rawTokens,\x0a\x20\x20\x20\x20\x20\x20\x20\x20compressed_tokens:\x20compressedTokens,\x0a\x20\x20\x20\x20\x20\x20\x20\x20created_at:\x20new\x20Date().toISOString(),\x0a\x20\x20\x20\x20\x20\x20\x20\x20last_accessed_at:\x20new\x20Date().toISOString(),\x0a\x20\x20\x20\x20\x20\x20\x20\x20summary:\x20`Summary:\x20Tool\x20result\x20offloaded\x20(${rawTokens}\x20tokens).`,\x0a\x20\x20\x20\x20\x20\x20\x20\x20raw_payload:\x20contentStr\x0a\x20\x20\x20\x20\x20\x20},\x20null,\x202));\x0a\x0a\x20\x20\x20\x20\x20\x20if\x20(typeof\x20event.result\x20===\x20\x27string\x27)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20event.result\x20=\x20replacement;\x0a\x20\x20\x20\x20\x20\x20}\x20else\x20if\x20(event.result\x20&&\x20typeof\x20event.result\x20===\x20\x27object\x27)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20event.result.content\x20=\x20replacement;\x0a\x20\x20\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20\x20\x20//\x20Update\x20sessions_state.json\x20with\x20hook\x20savings\x0a\x20\x20\x20\x20\x20\x20try\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20statePath\x20=\x20path.join(baseDir,\x20\x27sessions_state.json\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20let\x20state\x20=\x20{};\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(fs.existsSync(statePath))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x20state\x20=\x20JSON.parse(fs.readFileSync(statePath,\x20\x27utf8\x27))\x20||\x20{};\x20}\x20catch\x20(e)\x20{}\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20Find\x20latest\x20session\x20file\x20for\x20\x27claude\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20claudeDirs\x20=\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20path.join(os.homedir(),\x20\x27.claude\x27,\x20\x27projects\x27),\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20path.join(os.homedir(),\x20\x27.claude\x27,\x20\x27history\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20];\x0a\x20\x20\x20\x20\x20\x20\x20\x20let\x20latestFullPath\x20=\x20null;\x0a\x20\x20\x20\x20\x20\x20\x20\x20let\x20latestTime\x20=\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20for\x20(const\x20dir\x20of\x20claudeDirs)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(fs.existsSync(dir))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20scanDir\x20=\x20(currentDir,\x20depth\x20=\x200)\x20=>\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(depth\x20>\x206)\x20return;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20entries\x20=\x20fs.readdirSync(currentDir,\x20{\x20withFileTypes:\x20true\x20});\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20for\x20(const\x20entry\x20of\x20entries)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20full\x20=\x20path.join(currentDir,\x20entry.name);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(entry.isDirectory())\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20scanDir(full,\x20depth\x20+\x201);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x20else\x20if\x20(entry.isFile()\x20&&\x20!entry.name.startsWith(\x27.\x27))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(entry.name.endsWith(\x27.jsonl\x27)\x20||\x20entry.name.endsWith(\x27.json1\x27))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20stat\x20=\x20fs.statSync(full);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(stat.mtimeMs\x20>\x20latestTime)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20latestTime\x20=\x20stat.mtimeMs;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20latestFullPath\x20=\x20full;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x20catch\x20(e)\x20{}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20};\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20scanDir(dir);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(latestFullPath)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20existing\x20=\x20state[latestFullPath]\x20||\x20{};\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20prevHook\x20=\x20existing.hookSavedTokens\x20||\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20newHook\x20=\x20prevHook\x20+\x20savedTokens;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20finalOfficial\x20=\x20existing.officialCompactSaved\x20||\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20const\x20finalAuto\x20=\x20existing.autoCompactSaved\x20||\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20state[latestFullPath]\x20=\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20lineCount:\x20existing.lineCount\x20||\x201,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20activeSavedTokens:\x20finalOfficial\x20+\x20finalAuto\x20+\x20newHook,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20sideCacheSaved:\x20existing.sideCacheSaved\x20||\x200,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20officialCompactSaved:\x20finalOfficial,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20autoCompactSaved:\x20finalAuto,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20hookSavedTokens:\x20newHook\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20};\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20fs.writeFileSync(statePath,\x20JSON.stringify(state,\x20null,\x202),\x20\x27utf8\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20}\x20catch\x20(e)\x20{}\x0a\x20\x20\x20\x20}\x0a\x20\x20}\x20catch\x20(e)\x20{}\x0a\x20\x20return\x20event;\x0a};\x0a','call','defineProperty','2286452BwthOQ','1750936BniRuG','post_tool_use.js','create','285586iClRdu','1317924WKuvOL','__setModuleDefault','writable','6GROluC','__esModule','homedir','installClaudeHooks','1daLJmY','.claude','5400252oPfFuM','mkdirSync','getOwnPropertyDescriptor','getOwnPropertyNames','2670665HDtwvK','1294648KoAKSd','prototype','path','utf8','length'];a0_0x3a77=function(){return _0x134aa7;};return a0_0x3a77();}Object['defineProperty'](exports,a0_0x16077d(0x14f),{'value':!![]}),exports[a0_0x16077d(0x151)]=installClaudeHooks;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x16077d(0x13b))),os=__importStar(require('os'));function installClaudeHooks(){var _0x4bfdee=a0_0x16077d;try{const _0x4e6773=path[_0x4bfdee(0x141)](os[_0x4bfdee(0x150)](),_0x4bfdee(0x153),'hooks');!fs['existsSync'](_0x4e6773)&&fs[_0x4bfdee(0x135)](_0x4e6773,{'recursive':!![]});const _0x56da73=path[_0x4bfdee(0x141)](_0x4e6773,_0x4bfdee(0x148)),_0x578321=_0x4bfdee(0x143);fs[_0x4bfdee(0x13e)](_0x56da73,_0x578321,_0x4bfdee(0x13c));}catch(_0x202f26){}}
|