trimprompt 1.0.30 → 1.0.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -0
- package/api-proxy.js +1 -1
- package/cache-manager.js +1 -1
- package/cache.js +1 -1
- package/ccr.js +1 -1
- package/cli.js +1 -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 +1 -4
- package/proxy-conv.js +1 -1
- package/proxy-daemon.js +1 -1
- package/proxy-resp.js +1 -1
- package/redactor.js +1 -1
- package/seed.js +1 -1
- package/shims.js +1 -1
- package/simulate.js +1 -1
- package/sync.js +1 -1
- package/tracker.js +1 -1
- package/traffic-interceptor.js +1 -1
package/file-watcher.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x517c16=a0_0x2839;function a0_0x3956(){const _0x77adaa=['raw_tokens','conversation_toggles','TrimPrompt\x20Cache\x20Engine','chunk_id','config.json','cwd','sessions','tracker','extname','processSessionFile','Gemini','active_turn','messages','default','copilot','push','.gif','getOwnPropertyNames','github-copilot-cli','.opencode','228543wcKEet','.wal','opencode','isDirectory','mtimeMs','4082089QTwMfx','loadConfig','claude','repeat','conv_','\x20tokens)\x20was\x20moved\x20to\x20local\x20side-cache.\x0a>\x20**Chunk\x20Reference\x20ID:**\x20`','startsWith','24bUWtnt','history','endsWith','includes','./hooks/claude-hook','sideCacheSaved','.codex','.jpeg','object','50aMyBON','win32','.lock','codex','.json','get','length','image_','169173uTbCoN','existsSync','ceil','.tmp','cortex','context','.shm','homedir','.gemini','message','.jsonl','round','saveChunk','598970YJgzTH','AppData','call','name','defineProperty','readdirSync','replace','\x22\x20&\x20\x22\x22\x22\x20ui\x20--headless\x22,\x200,\x20False\x0a','.trimprompt','projects','custom_storage_paths','__importStar','loadSessionsState','User','readFileSync','cache','Codex','storage','toLowerCase','Roaming','startWatcherDaemon','.aider.chat.history.md','hasOwnProperty','content','live-conv','parse','trim','openclaw','.openclaw','trim_offload','path','isArray','.json1','statSync','writable','.webp','Application\x20Support','antigravity','max','.cortex','activeSavedTokens','split','watch','getAgentStoragePaths','string','mkdirSync','lineCount','modified','writeFileSync','248bICaqc','.config','logExecution','Summary:\x20Tool\x20result\x20offloaded\x20(','Cursor','Summary:\x20Text\x20block\x20offloaded\x20(','Set\x20WshShell\x20=\x20CreateObject(\x22WScript.Shell\x22)\x0aWshShell.Run\x20\x22node\x20\x22\x22\x22\x20&\x20\x22','official_compact','basename','join','cursor','gemini','isFile','\x20tokens).','21aPldqg','getLatestSessionFile','conv:','__createBinding','stringify','compressed_tokens','1986092bYhRfR','create','248961zIGfUc','fullPath','configurable','1317558XlpmFD','officialCompactSaved','TrimPromptDaemon.vbs','.dat','Microsoft','.claude','media__','`\x0a>\x20Retrieve\x20with:\x20`trim\x20retrieve\x20','saveConfig','\x0a>\x20[!IMPORTANT]\x0a>\x20**[TrimPrompt\x20Cache\x20Engine\x20—\x20Context\x20Offloaded]**\x0a>\x20**Chunk\x20Reference\x20ID:**\x20`','utf8','toISOString','text'];a0_0x3956=function(){return _0x77adaa;};return a0_0x3956();}(function(_0x26eac8,_0x1b0abb){const _0x448785=a0_0x2839,_0x5c5da6=_0x26eac8();while(!![]){try{const _0x3c720a=-parseInt(_0x448785(0x18f))/0x1+parseInt(_0x448785(0x169))/0x2+-parseInt(_0x448785(0x16b))/0x3*(-parseInt(_0x448785(0x19b))/0x4)+-parseInt(_0x448785(0x1b9))/0x5+-parseInt(_0x448785(0x16e))/0x6*(-parseInt(_0x448785(0x163))/0x7)+-parseInt(_0x448785(0x155))/0x8*(-parseInt(_0x448785(0x1ac))/0x9)+parseInt(_0x448785(0x1a4))/0xa*(-parseInt(_0x448785(0x194))/0xb);if(_0x3c720a===_0x1b0abb)break;else _0x5c5da6['push'](_0x5c5da6['shift']());}catch(_0x3fb371){_0x5c5da6['push'](_0x5c5da6['shift']());}}}(a0_0x3956,0x810ee));var __createBinding=this&&this[a0_0x517c16(0x166)]||(Object[a0_0x517c16(0x16a)]?function(_0x1b04a6,_0x231efa,_0x2abc5f,_0x587b8a){const _0x2584a4=a0_0x517c16;if(_0x587b8a===undefined)_0x587b8a=_0x2abc5f;var _0x316232=Object['getOwnPropertyDescriptor'](_0x231efa,_0x2abc5f);(!_0x316232||(_0x2584a4(0x1a9)in _0x316232?!_0x231efa['__esModule']:_0x316232[_0x2584a4(0x1db)]||_0x316232[_0x2584a4(0x16d)]))&&(_0x316232={'enumerable':!![],'get':function(){return _0x231efa[_0x2abc5f];}}),Object[_0x2584a4(0x1bd)](_0x1b04a6,_0x587b8a,_0x316232);}:function(_0x62c5ba,_0x30a797,_0x2249a5,_0xeb8195){if(_0xeb8195===undefined)_0xeb8195=_0x2249a5;_0x62c5ba[_0xeb8195]=_0x30a797[_0x2249a5];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a0_0x517c16(0x16a)]?function(_0x3a41c8,_0x5a84cc){const _0x5ce255=a0_0x517c16;Object['defineProperty'](_0x3a41c8,_0x5ce255(0x188),{'enumerable':!![],'value':_0x5a84cc});}:function(_0x4cd396,_0xb624ea){const _0x467439=a0_0x517c16;_0x4cd396[_0x467439(0x188)]=_0xb624ea;}),__importStar=this&&this[a0_0x517c16(0x1c4)]||(function(){var _0x18e172=function(_0x56b473){const _0x45572b=a0_0x2839;return _0x18e172=Object[_0x45572b(0x18c)]||function(_0x3818a3){const _0x199910=_0x45572b;var _0x407d4a=[];for(var _0x3517a0 in _0x3818a3)if(Object['prototype'][_0x199910(0x1cf)][_0x199910(0x1bb)](_0x3818a3,_0x3517a0))_0x407d4a[_0x407d4a[_0x199910(0x1aa)]]=_0x3517a0;return _0x407d4a;},_0x18e172(_0x56b473);};return function(_0x1adc3e){const _0x56268c=a0_0x2839;if(_0x1adc3e&&_0x1adc3e['__esModule'])return _0x1adc3e;var _0x3df53f={};if(_0x1adc3e!=null){for(var _0x391ac0=_0x18e172(_0x1adc3e),_0x5e37dd=0x0;_0x5e37dd<_0x391ac0[_0x56268c(0x1aa)];_0x5e37dd++)if(_0x391ac0[_0x5e37dd]!==_0x56268c(0x188))__createBinding(_0x3df53f,_0x1adc3e,_0x391ac0[_0x5e37dd]);}return __setModuleDefault(_0x3df53f,_0x1adc3e),_0x3df53f;};}());Object[a0_0x517c16(0x1bd)](exports,'__esModule',{'value':!![]}),exports[a0_0x517c16(0x195)]=loadConfig,exports[a0_0x517c16(0x176)]=saveConfig,exports[a0_0x517c16(0x1e4)]=getAgentStoragePaths,exports[a0_0x517c16(0x164)]=getLatestSessionFile,exports[a0_0x517c16(0x1c5)]=loadSessionsState,exports[a0_0x517c16(0x184)]=processSessionFile,exports['installWindowsStartupService']=installWindowsStartupService,exports[a0_0x517c16(0x1cd)]=startWatcherDaemon;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x517c16(0x1d7))),os=__importStar(require('os')),cache_manager_1=require('./cache-manager'),tracker_1=require('./tracker'),baseDir=path[a0_0x517c16(0x15e)](os[a0_0x517c16(0x1b3)](),a0_0x517c16(0x1c1)),configPath=path[a0_0x517c16(0x15e)](baseDir,a0_0x517c16(0x17f)),DEFAULT_CONFIG={'autostart_enabled':!![],'conversation_toggles':{'conv_claude':!![],'conv_codex':!![],'conv_cursor':!![],'conv_aider':!![],'conv_copilot':!![],'conv_openclaw':!![],'conv_opencode':!![],'conv_cortex':!![]},'custom_storage_paths':{'claude':null,'codex':null,'cursor':null,'aider':null,'copilot':null,'openclaw':null,'opencode':null,'cortex':null}};function loadConfig(){const _0x3396aa=a0_0x517c16;try{if(!fs[_0x3396aa(0x1ad)](baseDir))fs['mkdirSync'](baseDir,{'recursive':!![]});if(fs[_0x3396aa(0x1ad)](configPath)){const _0x3dc6ae=JSON[_0x3396aa(0x1d2)](fs[_0x3396aa(0x1c7)](configPath,'utf8'));return{...DEFAULT_CONFIG,..._0x3dc6ae,'conversation_toggles':{...DEFAULT_CONFIG[_0x3396aa(0x17c)],..._0x3dc6ae[_0x3396aa(0x17c)]||{}},'custom_storage_paths':{...DEFAULT_CONFIG['custom_storage_paths'],..._0x3dc6ae[_0x3396aa(0x1c3)]||{}}};}}catch{}return DEFAULT_CONFIG;}function saveConfig(_0x7f9a11){const _0x56eded=a0_0x517c16,_0x10b1df=loadConfig(),_0x1df747={..._0x10b1df,..._0x7f9a11,'conversation_toggles':{..._0x10b1df[_0x56eded(0x17c)],..._0x7f9a11['conversation_toggles']||{}},'custom_storage_paths':{..._0x10b1df[_0x56eded(0x1c3)],..._0x7f9a11[_0x56eded(0x1c3)]||{}}};try{if(!fs['existsSync'](baseDir))fs[_0x56eded(0x1e6)](baseDir,{'recursive':!![]});fs[_0x56eded(0x154)](configPath,JSON[_0x56eded(0x167)](_0x1df747,null,0x2),_0x56eded(0x178));}catch{}return _0x1df747;}function a0_0x2839(_0x3b842f,_0xded721){_0x3b842f=_0x3b842f-0x154;const _0x3956e1=a0_0x3956();let _0x2839de=_0x3956e1[_0x3b842f];return _0x2839de;}function getAgentStoragePaths(_0x2f6833){const _0x54baa3=a0_0x517c16,_0x2de53d=loadConfig(),_0x20f67e=_0x2de53d[_0x54baa3(0x1c3)][_0x2f6833];if(_0x20f67e&&fs[_0x54baa3(0x1ad)](_0x20f67e))return[_0x20f67e];const _0x45a174=os[_0x54baa3(0x1b3)](),_0x6e6f93=process['platform']===_0x54baa3(0x1a5),_0x43cb79=process['platform']==='darwin';switch(_0x2f6833){case _0x54baa3(0x196):return[path['join'](_0x45a174,_0x54baa3(0x173),_0x54baa3(0x1c2)),path[_0x54baa3(0x15e)](_0x45a174,_0x54baa3(0x173),_0x54baa3(0x19c))];case _0x54baa3(0x1a7):return[path[_0x54baa3(0x15e)](_0x45a174,_0x54baa3(0x1a1),_0x54baa3(0x181)),path[_0x54baa3(0x15e)](_0x45a174,_0x54baa3(0x1ba),_0x54baa3(0x1cc),_0x54baa3(0x1c9))];case'gemini':return[path[_0x54baa3(0x15e)](_0x45a174,_0x54baa3(0x1b4),_0x54baa3(0x1de)),path[_0x54baa3(0x15e)](_0x45a174,_0x54baa3(0x1b4)),path['join'](_0x45a174,_0x54baa3(0x1ba),_0x54baa3(0x1cc),_0x54baa3(0x185)),path[_0x54baa3(0x15e)](_0x45a174,_0x54baa3(0x156),_0x54baa3(0x160))];case'cursor':if(_0x6e6f93)return[path[_0x54baa3(0x15e)](_0x45a174,_0x54baa3(0x1ba),_0x54baa3(0x1cc),'Cursor',_0x54baa3(0x1c6),'workspaceStorage')];if(_0x43cb79)return[path['join'](_0x45a174,'Library',_0x54baa3(0x1dd),_0x54baa3(0x159),_0x54baa3(0x1c6),'workspaceStorage')];return[path['join'](_0x45a174,_0x54baa3(0x156),_0x54baa3(0x159),_0x54baa3(0x1c6),'workspaceStorage')];case'aider':return[process[_0x54baa3(0x180)](),path['join'](_0x45a174,_0x54baa3(0x1ce))];case'copilot':if(_0x6e6f93)return[path[_0x54baa3(0x15e)](_0x45a174,_0x54baa3(0x1ba),'Local',_0x54baa3(0x18d))];return[path[_0x54baa3(0x15e)](_0x45a174,'.config',_0x54baa3(0x18d))];case _0x54baa3(0x1d4):return[path[_0x54baa3(0x15e)](_0x45a174,'.openclaw',_0x54baa3(0x1ca)),path[_0x54baa3(0x15e)](process[_0x54baa3(0x180)](),_0x54baa3(0x1d5),_0x54baa3(0x1b1))];case _0x54baa3(0x191):return[path['join'](_0x45a174,_0x54baa3(0x18e),_0x54baa3(0x181))];case _0x54baa3(0x1b0):return[path[_0x54baa3(0x15e)](_0x45a174,_0x54baa3(0x1e0),_0x54baa3(0x1c8))];default:return[];}}function getLatestSessionFile(_0x1a43b5){const _0x553ded=a0_0x517c16,_0x1a13e0=getAgentStoragePaths(_0x1a43b5);let _0x271c0a=null,_0x40f347=0x0,_0x352e0c=null,_0x1976a4=null;for(const _0x451adb of _0x1a13e0){if(fs[_0x553ded(0x1ad)](_0x451adb)){if(!_0x1976a4)_0x1976a4=_0x451adb;const _0x41932b=(_0x17bb73,_0x5915a8=0x0)=>{const _0x44029e=_0x553ded;if(_0x5915a8>0x3)return;try{const _0x15475a=fs[_0x44029e(0x1be)](_0x17bb73,{'withFileTypes':!![]});for(const _0xba4fe5 of _0x15475a){const _0x48f29a=path[_0x44029e(0x15e)](_0x17bb73,_0xba4fe5['name']);if(_0xba4fe5['isDirectory']())_0x41932b(_0x48f29a,_0x5915a8+0x1);else{if(_0xba4fe5[_0x44029e(0x161)]()&&!_0xba4fe5[_0x44029e(0x1bc)][_0x44029e(0x19a)]('.')){const _0x29d419=_0xba4fe5[_0x44029e(0x1bc)]['toLowerCase']();if(_0x29d419[_0x44029e(0x19d)]('.png')||_0x29d419[_0x44029e(0x19d)]('.jpg')||_0x29d419[_0x44029e(0x19d)](_0x44029e(0x1a2))||_0x29d419[_0x44029e(0x19d)](_0x44029e(0x18b))||_0x29d419[_0x44029e(0x19d)](_0x44029e(0x1dc))||_0x29d419[_0x44029e(0x19d)]('.pb')||_0x29d419[_0x44029e(0x19d)](_0x44029e(0x190))||_0x29d419[_0x44029e(0x19d)](_0x44029e(0x1b2))||_0x29d419[_0x44029e(0x19d)]('.tmp')||_0x29d419['endsWith'](_0x44029e(0x1a6))||_0x29d419[_0x44029e(0x19d)](_0x44029e(0x171))||_0x29d419[_0x44029e(0x19a)](_0x44029e(0x174))||_0x29d419[_0x44029e(0x19a)](_0x44029e(0x1ab)))continue;const _0x198627=fs[_0x44029e(0x1da)](_0x48f29a);_0x198627[_0x44029e(0x193)]>_0x40f347&&(_0x40f347=_0x198627[_0x44029e(0x193)],_0x271c0a=_0xba4fe5['name'],_0x352e0c=_0x48f29a,_0x1976a4=_0x451adb);}}}}catch{}};_0x41932b(_0x451adb);}}return{'fileName':_0x271c0a,'lastModified':_0x40f347>0x0?new Date(_0x40f347)[_0x553ded(0x179)]():null,'fullPath':_0x352e0c,'dirPath':_0x1976a4};}const debounceTimers=new Map(),lastLoggedTimes=new Map();function compressMessageContent(_0x395a68,_0x603dc5,_0x5e8100){const _0x130449=a0_0x517c16;let _0x398d05=![],_0x317ddd=0x0;if(!_0x395a68)return{'modified':_0x398d05,'savedTokens':_0x317ddd};const _0x3f170c=_0x47cdd5=>_0x47cdd5[_0x130449(0x1bf)](/\r\n/g,'\x0a')['replace'](/\n{3,}/g,'\x0a\x0a');if(typeof _0x395a68[_0x130449(0x1d0)]===_0x130449(0x1e5)){let _0x5151b2=_0x395a68[_0x130449(0x1d0)],_0x91e9ad=_0x3f170c(_0x5151b2);_0x91e9ad[_0x130449(0x1aa)]<_0x5151b2[_0x130449(0x1aa)]&&(_0x395a68['content']=_0x91e9ad,_0x398d05=!![],_0x317ddd+=Math[_0x130449(0x1ae)]((_0x5151b2[_0x130449(0x1aa)]-_0x91e9ad[_0x130449(0x1aa)])/0x4));if(_0x395a68[_0x130449(0x1d0)]['length']>0x12c&&!_0x395a68['content'][_0x130449(0x19e)](_0x130449(0x17d))){const _0x13c420='Summary:\x20Content\x20offloaded\x20('+Math[_0x130449(0x1ae)](_0x395a68[_0x130449(0x1d0)]['length']/0x4)+_0x130449(0x162),_0x1ddb4c=(0x0,cache_manager_1[_0x130449(0x1b8)])(_0x603dc5,_0x5e8100,_0x395a68[_0x130449(0x1d0)],_0x13c420);_0x395a68[_0x130449(0x1d0)]='\x0a>\x20[!IMPORTANT]\x0a>\x20**[TrimPrompt\x20Cache\x20Engine\x20—\x20Context\x20Offloaded]**\x0a>\x20The\x20raw\x20content\x20of\x20this\x20step\x20('+_0x1ddb4c[_0x130449(0x17b)]+_0x130449(0x199)+_0x1ddb4c[_0x130449(0x17e)]+'`\x0a>\x20If\x20required,\x20execute:\x20`trim\x20retrieve\x20'+_0x1ddb4c[_0x130449(0x17e)]+'`\x0a',_0x398d05=!![],_0x317ddd+=Math[_0x130449(0x1df)](0x0,_0x1ddb4c['raw_tokens']-_0x1ddb4c[_0x130449(0x168)]);}}else{if(Array[_0x130449(0x1d8)](_0x395a68[_0x130449(0x1d0)]))for(const _0x28ac20 of _0x395a68['content']){if(_0x28ac20&&typeof _0x28ac20===_0x130449(0x1a3)){if(typeof _0x28ac20[_0x130449(0x17a)]==='string'){let _0x5ef8cb=_0x28ac20[_0x130449(0x17a)],_0x4c5b88=_0x3f170c(_0x5ef8cb);_0x4c5b88[_0x130449(0x1aa)]<_0x5ef8cb['length']&&(_0x28ac20['text']=_0x4c5b88,_0x398d05=!![],_0x317ddd+=Math['ceil']((_0x5ef8cb[_0x130449(0x1aa)]-_0x4c5b88[_0x130449(0x1aa)])/0x4));if(_0x28ac20[_0x130449(0x17a)]['length']>0x12c&&!_0x28ac20[_0x130449(0x17a)][_0x130449(0x19e)]('TrimPrompt\x20Cache\x20Engine')){const _0x56b203=_0x130449(0x15a)+Math[_0x130449(0x1ae)](_0x28ac20['text'][_0x130449(0x1aa)]/0x4)+_0x130449(0x162),_0x30b73a=(0x0,cache_manager_1[_0x130449(0x1b8)])(_0x603dc5,_0x5e8100,_0x28ac20[_0x130449(0x17a)],_0x56b203);_0x28ac20[_0x130449(0x17a)]=_0x130449(0x177)+_0x30b73a[_0x130449(0x17e)]+_0x130449(0x175)+_0x30b73a['chunk_id']+'`\x0a',_0x398d05=!![],_0x317ddd+=Math['max'](0x0,_0x30b73a[_0x130449(0x17b)]-_0x30b73a[_0x130449(0x168)]);}}else{if(typeof _0x28ac20[_0x130449(0x1d0)]===_0x130449(0x1e5)){let _0x51a902=_0x28ac20[_0x130449(0x1d0)],_0x254d58=_0x3f170c(_0x51a902);_0x254d58[_0x130449(0x1aa)]<_0x51a902[_0x130449(0x1aa)]&&(_0x28ac20['content']=_0x254d58,_0x398d05=!![],_0x317ddd+=Math['ceil']((_0x51a902[_0x130449(0x1aa)]-_0x254d58['length'])/0x4));if(_0x28ac20[_0x130449(0x1d0)][_0x130449(0x1aa)]>0x12c&&!_0x28ac20['content']['includes']('TrimPrompt\x20Cache\x20Engine')){const _0x1e83f8=_0x130449(0x158)+Math[_0x130449(0x1ae)](_0x28ac20[_0x130449(0x1d0)][_0x130449(0x1aa)]/0x4)+_0x130449(0x162),_0x4d74fe=(0x0,cache_manager_1[_0x130449(0x1b8)])(_0x603dc5,_0x5e8100,_0x28ac20['content'],_0x1e83f8);_0x28ac20[_0x130449(0x1d0)]='\x0a>\x20[!IMPORTANT]\x0a>\x20**[TrimPrompt\x20Cache\x20Engine\x20—\x20Context\x20Offloaded]**\x0a>\x20**Chunk\x20Reference\x20ID:**\x20`'+_0x4d74fe[_0x130449(0x17e)]+'`\x0a>\x20Retrieve\x20with:\x20`trim\x20retrieve\x20'+_0x4d74fe[_0x130449(0x17e)]+'`\x0a',_0x398d05=!![],_0x317ddd+=Math[_0x130449(0x1df)](0x0,_0x4d74fe['raw_tokens']-_0x4d74fe[_0x130449(0x168)]);}}}}}}return{'modified':_0x398d05,'savedTokens':_0x317ddd};}const sessionsStatePath=path[a0_0x517c16(0x15e)](baseDir,'sessions_state.json');let sessionsStateMemoryCache=null;function loadSessionsState(){const _0x8527a=a0_0x517c16;try{if(fs[_0x8527a(0x1ad)](sessionsStatePath)){const _0x210193=JSON[_0x8527a(0x1d2)](fs['readFileSync'](sessionsStatePath,_0x8527a(0x178)));if(_0x210193&&typeof _0x210193===_0x8527a(0x1a3))return sessionsStateMemoryCache=_0x210193,_0x210193;}}catch{}return sessionsStateMemoryCache||{};}function saveSessionStateItem(_0x1936ea,_0x14db71,_0x39a6e9,_0x35a1f2=0x0,_0x5c1dbc=0x0){const _0x1f5192=a0_0x517c16;try{const _0x631ffc=loadSessionsState();_0x631ffc[_0x1936ea]={'lineCount':_0x14db71,'activeSavedTokens':_0x39a6e9,'sideCacheSaved':_0x35a1f2,'officialCompactSaved':_0x5c1dbc},sessionsStateMemoryCache=_0x631ffc;if(!fs[_0x1f5192(0x1ad)](baseDir))fs[_0x1f5192(0x1e6)](baseDir,{'recursive':!![]});const _0x298bce=sessionsStatePath+_0x1f5192(0x1af);fs[_0x1f5192(0x154)](_0x298bce,JSON[_0x1f5192(0x167)](_0x631ffc,null,0x2),'utf8'),fs['renameSync'](_0x298bce,sessionsStatePath);}catch{}}function processSessionFile(_0x478639,_0x2d556e){const _0x58fba8=a0_0x517c16;try{if(!fs[_0x58fba8(0x1ad)](_0x478639))return;const _0x5d6531=fs[_0x58fba8(0x1da)](_0x478639);if(_0x5d6531[_0x58fba8(0x192)]()||_0x5d6531['size']===0x0)return;const _0x1e1b80=loadConfig(),_0x18612f=_0x58fba8(0x198)+_0x2d556e;if(_0x1e1b80['conversation_toggles'][_0x18612f]===![])return;const _0x1ad922=fs[_0x58fba8(0x1c7)](_0x478639,_0x58fba8(0x178));let _0xee39c2=![],_0x4d403a=_0x1ad922,_0x13a07e=0x0;const _0x5a4084=path[_0x58fba8(0x183)](_0x478639)[_0x58fba8(0x1cb)](),_0x52fbed=path[_0x58fba8(0x15d)](_0x478639,_0x5a4084);let _0x866cff=0x1;if(_0x2d556e!==_0x58fba8(0x196)){if(_0x5a4084===_0x58fba8(0x1a8))try{const _0x54e8e9=JSON['parse'](_0x1ad922),_0xc60501=Array[_0x58fba8(0x1d8)](_0x54e8e9[_0x58fba8(0x187)])?_0x54e8e9[_0x58fba8(0x187)]:Array[_0x58fba8(0x1d8)](_0x54e8e9)?_0x54e8e9:null;if(_0xc60501){_0x866cff=_0xc60501['length'];for(let _0x51399a=0x0;_0x51399a<_0xc60501['length'];_0x51399a++){const _0x56c2cf=compressMessageContent(_0xc60501[_0x51399a],_0x52fbed,_0x2d556e);_0x56c2cf[_0x58fba8(0x1e8)]&&(_0xee39c2=!![],_0x13a07e+=_0x56c2cf['savedTokens']);}_0xee39c2&&(_0x4d403a=JSON['stringify'](_0x54e8e9,null,0x2));}}catch{}else{if(_0x5a4084===_0x58fba8(0x1b6)||_0x5a4084===_0x58fba8(0x1d9))try{const _0x1ad439=_0x1ad922['split']('\x0a');_0x866cff=_0x1ad439[_0x58fba8(0x1aa)];const _0x558672=[];for(let _0x46f6a2 of _0x1ad439){if(!_0x46f6a2[_0x58fba8(0x1d3)]()){_0x558672[_0x58fba8(0x18a)](_0x46f6a2);continue;}try{const _0x40907e=JSON[_0x58fba8(0x1d2)](_0x46f6a2),_0x47cb09=_0x40907e[_0x58fba8(0x1b5)]||_0x40907e;if(_0x47cb09){const _0x3e4f27=compressMessageContent(_0x47cb09,_0x52fbed,_0x2d556e);_0x3e4f27[_0x58fba8(0x1e8)]&&(_0xee39c2=!![],_0x13a07e+=_0x3e4f27['savedTokens'],_0x46f6a2=JSON[_0x58fba8(0x167)](_0x40907e));}}catch{}_0x558672[_0x58fba8(0x18a)](_0x46f6a2);}_0xee39c2&&(_0x4d403a=_0x558672[_0x58fba8(0x15e)]('\x0a'));}catch{}}}else(_0x5a4084===_0x58fba8(0x1b6)||_0x5a4084==='.json1')&&(_0x866cff=_0x1ad922[_0x58fba8(0x1e2)]('\x0a')['filter'](Boolean)['length']);let _0xa39ed4=0x0;const _0x4ddc8c=_0x1ad922['matchAll'](/(?:Compacted conversation\s*·\s*)?saved\s*([\d\.]+)k?\s*tokens/gi);for(const _0x40628f of _0x4ddc8c){let _0x27ff98=parseFloat(_0x40628f[0x1]);_0x40628f[0x0][_0x58fba8(0x1cb)]()['includes']('k')&&(_0x27ff98=_0x27ff98*0x3e8),_0xa39ed4+=Math[_0x58fba8(0x1b7)](_0x27ff98);}const _0x195ae0=loadSessionsState(),_0x289e64=_0x195ae0[_0x478639],_0x15b857=_0x289e64&&_0x289e64[_0x58fba8(0x1a0)]!==undefined?_0x289e64[_0x58fba8(0x1a0)]:0x0,_0x3aec7c=_0x289e64&&_0x289e64['officialCompactSaved']!==undefined?_0x289e64[_0x58fba8(0x16f)]:_0x289e64?_0x289e64[_0x58fba8(0x1e1)]:0x0,_0xc12c6c=_0x289e64?_0x289e64[_0x58fba8(0x1e7)]:0x0,_0x4d65ce=_0x866cff>_0xc12c6c;let _0x505574=_0x15b857,_0x3803e4=Math['max'](_0x3aec7c,_0xa39ed4);if(_0xee39c2){fs[_0x58fba8(0x154)](_0x478639,_0x4d403a,_0x58fba8(0x178)),_0x505574+=_0x13a07e;const _0x4fe9f2=_0x505574+_0x3803e4;saveSessionStateItem(_0x478639,_0x866cff,_0x4fe9f2,_0x505574,_0x3803e4);const _0xa76acd='x'[_0x58fba8(0x197)](_0x4fe9f2*0x4);tracker_1[_0x58fba8(0x182)]['logExecution'](_0x58fba8(0x165)+_0x2d556e,_0xa76acd,'',0x0,undefined,[_0x58fba8(0x198)+_0x2d556e,_0x58fba8(0x1d1),_0x2d556e,_0x58fba8(0x1d6)]);}else{if(_0xa39ed4>_0x3aec7c){_0x3803e4=_0xa39ed4;const _0x487fe0=_0x505574+_0x3803e4;saveSessionStateItem(_0x478639,_0x866cff,_0x487fe0,_0x505574,_0x3803e4);const _0x2dda9f='x'['repeat'](_0x487fe0*0x4);tracker_1['tracker'][_0x58fba8(0x157)](_0x58fba8(0x165)+_0x2d556e,_0x2dda9f,'',0x0,undefined,[_0x58fba8(0x198)+_0x2d556e,_0x58fba8(0x1d1),_0x2d556e,_0x58fba8(0x15c)]);}else{if(_0x4d65ce){const _0x2f238d=_0x505574+_0x3803e4;saveSessionStateItem(_0x478639,_0x866cff,_0x2f238d,_0x505574,_0x3803e4);if(_0x2f238d>0x0){const _0x1e5567='x'[_0x58fba8(0x197)](_0x2f238d*0x4);tracker_1[_0x58fba8(0x182)][_0x58fba8(0x157)]('conv:'+_0x2d556e,_0x1e5567,'',0x0,undefined,[_0x58fba8(0x198)+_0x2d556e,_0x58fba8(0x1d1),_0x2d556e,_0x58fba8(0x186)]);}}else{const _0x58e54d=_0x505574+_0x3803e4;saveSessionStateItem(_0x478639,_0x866cff,_0x58e54d,_0x505574,_0x3803e4);}}}}catch{}}function installWindowsStartupService(){const _0x2924b7=a0_0x517c16;if(process['platform']!=='win32')return;try{const _0x30a72d=path[_0x2924b7(0x15e)](os[_0x2924b7(0x1b3)](),_0x2924b7(0x1ba),_0x2924b7(0x1cc),_0x2924b7(0x172),'Windows','Start\x20Menu','Programs','Startup');if(!fs[_0x2924b7(0x1ad)](_0x30a72d))fs[_0x2924b7(0x1e6)](_0x30a72d,{'recursive':!![]});const _0x4642c3=path[_0x2924b7(0x15e)](_0x30a72d,_0x2924b7(0x170)),_0x537298=path['join'](__dirname,'cli.js'),_0x9755c8=_0x537298[_0x2924b7(0x1bf)](/\\/g,'\x5c\x5c'),_0x4090b5=_0x2924b7(0x15b)+_0x9755c8+_0x2924b7(0x1c0);fs[_0x2924b7(0x154)](_0x4642c3,_0x4090b5,_0x2924b7(0x178));}catch{}}function startWatcherDaemon(){const _0x41723a=a0_0x517c16;installWindowsStartupService();try{const {installClaudeHooks:_0x243110}=require(_0x41723a(0x19f));_0x243110();}catch(_0x1a748f){}const _0x290522=[_0x41723a(0x196),_0x41723a(0x160),_0x41723a(0x1a7),_0x41723a(0x15f),'aider',_0x41723a(0x189),_0x41723a(0x1d4),'opencode',_0x41723a(0x1b0)];for(const _0x482229 of _0x290522){const _0x295733=getAgentStoragePaths(_0x482229);for(const _0x75994a of _0x295733){if(fs['existsSync'](_0x75994a))try{fs[_0x41723a(0x1e3)](_0x75994a,{'recursive':!![]},(_0x37de0a,_0x4f6ee3)=>{const _0x370748=_0x41723a;if(!_0x4f6ee3)return;const _0x194c25=path[_0x370748(0x15e)](_0x75994a,_0x4f6ee3);if(debounceTimers['has'](_0x194c25))clearTimeout(debounceTimers['get'](_0x194c25));const _0x4b6689=setTimeout(()=>processSessionFile(_0x194c25,_0x482229),0x1f4);debounceTimers['set'](_0x194c25,_0x4b6689);});}catch{}}}setInterval(()=>{const _0x3637d3=_0x41723a;for(const _0x3b1a1f of _0x290522){try{const _0x693e9f=getLatestSessionFile(_0x3b1a1f);_0x693e9f&&_0x693e9f['fullPath']&&processSessionFile(_0x693e9f[_0x3637d3(0x16c)],_0x3b1a1f);}catch{}}},0xbb8);}
|
|
1
|
+
'use strict';function a0_0x3fd7(){const _0x1eeed6=['startWatcherDaemon','trim_offload','conv:','12qNUkjI','.webp','getOwnPropertyDescriptor','loadSessionsState','Startup','push','\x20tokens).','context','Codex','getLatestSessionFile','mtimeMs','.opencode','codex','Windows','filter','.config','parse','\x22\x20&\x20\x22\x22\x22\x20ui\x20--headless\x22,\x200,\x20False\x0a','get','text','startsWith','messages','.jpg','officialCompactSaved','object','./cache-manager','projects','round','activeSavedTokens','.gif','Roaming','\x0a>\x20[!IMPORTANT]\x0a>\x20**[TrimPrompt\x20Cache\x20Engine\x20—\x20Context\x20Offloaded]**\x0a>\x20**Chunk\x20Reference\x20ID:**\x20`','sessions','.aider.chat.history.md','TrimPromptDaemon.vbs','live-conv','openclaw','Gemini','TrimPrompt\x20Cache\x20Engine','custom_storage_paths','processSessionFile','join','2gnYxot','isArray','cache','stringify','cursor','conversation_toggles','Microsoft','call','length','matchAll','max','configurable','__esModule','Cursor','raw_tokens','tracker','.pb','Summary:\x20Text\x20block\x20offloaded\x20(','Library','.shm','.json1','win32','workspaceStorage','Programs','.wal','defineProperty','`\x0a>\x20If\x20required,\x20execute:\x20`trim\x20retrieve\x20','\x20tokens)\x20was\x20moved\x20to\x20local\x20side-cache.\x0a>\x20**Chunk\x20Reference\x20ID:**\x20`','name','darwin','utf8','cwd','./tracker','3863050tedYIE','claude','Start\x20Menu','existsSync','copilot','4886cUaexz','modified','basename','getAgentStoragePaths','.claude','.codex','saveConfig','./hooks/claude-hook','34672627nsXGsz','renameSync','message','statSync','14511820kcxCup','homedir','fullPath','platform','toISOString','2408625miCUaH','isDirectory','create','saveChunk','__importStar','cortex','.gemini','5061411sFjyQW','gemini','lineCount','AppData','storage','isFile','conv_','toLowerCase','trim','loadConfig','savedTokens','compressed_tokens','sideCacheSaved','content','installWindowsStartupService','chunk_id','Local','active_turn','logExecution','User','8zJAWeC','readdirSync','readFileSync','.openclaw','4qvTuTp','replace','1181586audkTp','repeat','`\x0a>\x20Retrieve\x20with:\x20`trim\x20retrieve\x20','aider','includes','opencode','.tmp','mkdirSync','ceil','Summary:\x20Content\x20offloaded\x20(','github-copilot-cli','writeFileSync','image_','size','string','Application\x20Support','has','endsWith','default','split','\x0a>\x20[!IMPORTANT]\x0a>\x20**[TrimPrompt\x20Cache\x20Engine\x20—\x20Context\x20Offloaded]**\x0a>\x20The\x20raw\x20content\x20of\x20this\x20step\x20(','prototype','6492IEAQqA'];a0_0x3fd7=function(){return _0x1eeed6;};return a0_0x3fd7();}const a0_0x5aff7f=a0_0x495a;(function(_0x521a68,_0x85e061){const _0x2f81d6=a0_0x495a,_0x185be0=_0x521a68();while(!![]){try{const _0x55769f=-parseInt(_0x2f81d6(0x134))/0x1*(-parseInt(_0x2f81d6(0xdc))/0x2)+parseInt(_0x2f81d6(0x113))/0x3+parseInt(_0x2f81d6(0x132))/0x4*(parseInt(_0x2f81d6(0xfd))/0x5)+-parseInt(_0x2f81d6(0x14a))/0x6*(parseInt(_0x2f81d6(0x102))/0x7)+parseInt(_0x2f81d6(0x12e))/0x8*(parseInt(_0x2f81d6(0x11a))/0x9)+parseInt(_0x2f81d6(0x10e))/0xa+-parseInt(_0x2f81d6(0x10a))/0xb*(parseInt(_0x2f81d6(0x14e))/0xc);if(_0x55769f===_0x85e061)break;else _0x185be0['push'](_0x185be0['shift']());}catch(_0x207f4b){_0x185be0['push'](_0x185be0['shift']());}}}(a0_0x3fd7,0xd2c6b));var __createBinding=this&&this['__createBinding']||(Object[a0_0x5aff7f(0x115)]?function(_0x23ebd6,_0x145129,_0x208e95,_0x3c6032){const _0x50ee1f=a0_0x5aff7f;if(_0x3c6032===undefined)_0x3c6032=_0x208e95;var _0x52f4a6=Object[_0x50ee1f(0x150)](_0x145129,_0x208e95);(!_0x52f4a6||(_0x50ee1f(0xc4)in _0x52f4a6?!_0x145129['__esModule']:_0x52f4a6['writable']||_0x52f4a6[_0x50ee1f(0xe7)]))&&(_0x52f4a6={'enumerable':!![],'get':function(){return _0x145129[_0x208e95];}}),Object['defineProperty'](_0x23ebd6,_0x3c6032,_0x52f4a6);}:function(_0x20d10d,_0x344617,_0x4d8fe4,_0x53eeb8){if(_0x53eeb8===undefined)_0x53eeb8=_0x4d8fe4;_0x20d10d[_0x53eeb8]=_0x344617[_0x4d8fe4];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a0_0x5aff7f(0x115)]?function(_0x30c3b4,_0x4f8c4c){const _0x1d198e=a0_0x5aff7f;Object['defineProperty'](_0x30c3b4,_0x1d198e(0x146),{'enumerable':!![],'value':_0x4f8c4c});}:function(_0x1d8880,_0x2ec059){const _0x30ae82=a0_0x5aff7f;_0x1d8880[_0x30ae82(0x146)]=_0x2ec059;}),__importStar=this&&this[a0_0x5aff7f(0x117)]||(function(){var _0x7a4852=function(_0x184aad){return _0x7a4852=Object['getOwnPropertyNames']||function(_0x73429e){const _0x28ead8=a0_0x495a;var _0x2a2cca=[];for(var _0x1f88f5 in _0x73429e)if(Object[_0x28ead8(0x149)]['hasOwnProperty'][_0x28ead8(0xe3)](_0x73429e,_0x1f88f5))_0x2a2cca[_0x2a2cca[_0x28ead8(0xe4)]]=_0x1f88f5;return _0x2a2cca;},_0x7a4852(_0x184aad);};return function(_0x5d8823){const _0x11bbc3=a0_0x495a;if(_0x5d8823&&_0x5d8823[_0x11bbc3(0xe8)])return _0x5d8823;var _0x332236={};if(_0x5d8823!=null){for(var _0x36cc3f=_0x7a4852(_0x5d8823),_0x59f837=0x0;_0x59f837<_0x36cc3f[_0x11bbc3(0xe4)];_0x59f837++)if(_0x36cc3f[_0x59f837]!==_0x11bbc3(0x146))__createBinding(_0x332236,_0x5d8823,_0x36cc3f[_0x59f837]);}return __setModuleDefault(_0x332236,_0x5d8823),_0x332236;};}());Object[a0_0x5aff7f(0xf5)](exports,a0_0x5aff7f(0xe8),{'value':!![]}),exports[a0_0x5aff7f(0x123)]=loadConfig,exports[a0_0x5aff7f(0x108)]=saveConfig,exports[a0_0x5aff7f(0x105)]=getAgentStoragePaths,exports[a0_0x5aff7f(0xbb)]=getLatestSessionFile,exports[a0_0x5aff7f(0x151)]=loadSessionsState,exports[a0_0x5aff7f(0xda)]=processSessionFile,exports[a0_0x5aff7f(0x128)]=installWindowsStartupService,exports[a0_0x5aff7f(0x14b)]=startWatcherDaemon;const fs=__importStar(require('fs')),path=__importStar(require('path')),os=__importStar(require('os')),cache_manager_1=require(a0_0x5aff7f(0xcb)),tracker_1=require(a0_0x5aff7f(0xfc)),baseDir=path['join'](os[a0_0x5aff7f(0x10f)](),'.trimprompt'),configPath=path[a0_0x5aff7f(0xdb)](baseDir,'config.json'),DEFAULT_CONFIG={'autostart_enabled':!![],'conversation_toggles':{'conv_claude':!![],'conv_codex':!![],'conv_cursor':!![],'conv_aider':!![],'conv_copilot':!![],'conv_openclaw':!![],'conv_opencode':!![],'conv_cortex':!![]},'custom_storage_paths':{'claude':null,'codex':null,'cursor':null,'aider':null,'copilot':null,'openclaw':null,'opencode':null,'cortex':null}};function loadConfig(){const _0x5b0f25=a0_0x5aff7f;try{if(!fs[_0x5b0f25(0x100)](baseDir))fs[_0x5b0f25(0x13b)](baseDir,{'recursive':!![]});if(fs['existsSync'](configPath)){const _0x165641=JSON['parse'](fs[_0x5b0f25(0x130)](configPath,_0x5b0f25(0xfa)));return{...DEFAULT_CONFIG,..._0x165641,'conversation_toggles':{...DEFAULT_CONFIG['conversation_toggles'],..._0x165641[_0x5b0f25(0xe1)]||{}},'custom_storage_paths':{...DEFAULT_CONFIG[_0x5b0f25(0xd9)],..._0x165641[_0x5b0f25(0xd9)]||{}}};}}catch{}return DEFAULT_CONFIG;}function saveConfig(_0x59121d){const _0x367d30=a0_0x5aff7f,_0x35a920=loadConfig(),_0x10b953={..._0x35a920,..._0x59121d,'conversation_toggles':{..._0x35a920[_0x367d30(0xe1)],..._0x59121d[_0x367d30(0xe1)]||{}},'custom_storage_paths':{..._0x35a920[_0x367d30(0xd9)],..._0x59121d[_0x367d30(0xd9)]||{}}};try{if(!fs[_0x367d30(0x100)](baseDir))fs['mkdirSync'](baseDir,{'recursive':!![]});fs[_0x367d30(0x13f)](configPath,JSON[_0x367d30(0xdf)](_0x10b953,null,0x2),_0x367d30(0xfa));}catch{}return _0x10b953;}function getAgentStoragePaths(_0x25305d){const _0x2f2655=a0_0x5aff7f,_0x308d3f=loadConfig(),_0x8eb3d8=_0x308d3f[_0x2f2655(0xd9)][_0x25305d];if(_0x8eb3d8&&fs['existsSync'](_0x8eb3d8))return[_0x8eb3d8];const _0x5dc8b8=os[_0x2f2655(0x10f)](),_0x37188f=process[_0x2f2655(0x111)]===_0x2f2655(0xf1),_0x1a86c8=process['platform']===_0x2f2655(0xf9);switch(_0x25305d){case _0x2f2655(0xfe):return[path[_0x2f2655(0xdb)](_0x5dc8b8,_0x2f2655(0x106),_0x2f2655(0xcc)),path[_0x2f2655(0xdb)](_0x5dc8b8,_0x2f2655(0x106),'history')];case'codex':return[path[_0x2f2655(0xdb)](_0x5dc8b8,_0x2f2655(0x107),_0x2f2655(0xd2)),path['join'](_0x5dc8b8,_0x2f2655(0x11d),'Roaming',_0x2f2655(0xba))];case _0x2f2655(0x11b):return[path[_0x2f2655(0xdb)](_0x5dc8b8,_0x2f2655(0x119),'antigravity'),path['join'](_0x5dc8b8,'.gemini'),path[_0x2f2655(0xdb)](_0x5dc8b8,'AppData',_0x2f2655(0xd0),_0x2f2655(0xd7)),path[_0x2f2655(0xdb)](_0x5dc8b8,'.config',_0x2f2655(0x11b))];case _0x2f2655(0xe0):if(_0x37188f)return[path[_0x2f2655(0xdb)](_0x5dc8b8,_0x2f2655(0x11d),_0x2f2655(0xd0),_0x2f2655(0xe9),_0x2f2655(0x12d),_0x2f2655(0xf2))];if(_0x1a86c8)return[path[_0x2f2655(0xdb)](_0x5dc8b8,_0x2f2655(0xee),_0x2f2655(0x143),'Cursor',_0x2f2655(0x12d),'workspaceStorage')];return[path[_0x2f2655(0xdb)](_0x5dc8b8,'.config',_0x2f2655(0xe9),_0x2f2655(0x12d),_0x2f2655(0xf2))];case _0x2f2655(0x137):return[process[_0x2f2655(0xfb)](),path['join'](_0x5dc8b8,_0x2f2655(0xd3))];case _0x2f2655(0x101):if(_0x37188f)return[path[_0x2f2655(0xdb)](_0x5dc8b8,_0x2f2655(0x11d),_0x2f2655(0x12a),'github-copilot-cli')];return[path[_0x2f2655(0xdb)](_0x5dc8b8,_0x2f2655(0xc1),_0x2f2655(0x13e))];case _0x2f2655(0xd6):return[path[_0x2f2655(0xdb)](_0x5dc8b8,_0x2f2655(0x131),_0x2f2655(0x11e)),path[_0x2f2655(0xdb)](process[_0x2f2655(0xfb)](),'.openclaw',_0x2f2655(0xb9))];case _0x2f2655(0x139):return[path[_0x2f2655(0xdb)](_0x5dc8b8,_0x2f2655(0xbd),_0x2f2655(0xd2))];case _0x2f2655(0x118):return[path[_0x2f2655(0xdb)](_0x5dc8b8,'.cortex',_0x2f2655(0xde))];default:return[];}}function getLatestSessionFile(_0x4fe822){const _0x239244=a0_0x5aff7f,_0x13bd19=getAgentStoragePaths(_0x4fe822);let _0xfce739=null,_0x671c41=0x0,_0x3a934f=null,_0x155bee=null;for(const _0x36459a of _0x13bd19){if(fs[_0x239244(0x100)](_0x36459a)){if(!_0x155bee)_0x155bee=_0x36459a;const _0xcefab5=(_0x47d06f,_0x3c92d6=0x0)=>{const _0x538e1a=_0x239244;if(_0x3c92d6>0x3)return;try{const _0x19e03f=fs[_0x538e1a(0x12f)](_0x47d06f,{'withFileTypes':!![]});for(const _0x546f7d of _0x19e03f){const _0x1d2eb9=path[_0x538e1a(0xdb)](_0x47d06f,_0x546f7d['name']);if(_0x546f7d[_0x538e1a(0x114)]())_0xcefab5(_0x1d2eb9,_0x3c92d6+0x1);else{if(_0x546f7d[_0x538e1a(0x11f)]()&&!_0x546f7d['name'][_0x538e1a(0xc6)]('.')){const _0x31ce28=_0x546f7d[_0x538e1a(0xf8)][_0x538e1a(0x121)]();if(_0x31ce28['endsWith']('.png')||_0x31ce28['endsWith'](_0x538e1a(0xc8))||_0x31ce28['endsWith']('.jpeg')||_0x31ce28['endsWith'](_0x538e1a(0xcf))||_0x31ce28[_0x538e1a(0x145)](_0x538e1a(0x14f))||_0x31ce28[_0x538e1a(0x145)](_0x538e1a(0xec))||_0x31ce28[_0x538e1a(0x145)](_0x538e1a(0xf4))||_0x31ce28[_0x538e1a(0x145)](_0x538e1a(0xef))||_0x31ce28[_0x538e1a(0x145)](_0x538e1a(0x13a))||_0x31ce28['endsWith']('.lock')||_0x31ce28[_0x538e1a(0x145)]('.dat')||_0x31ce28[_0x538e1a(0xc6)]('media__')||_0x31ce28['startsWith'](_0x538e1a(0x140)))continue;const _0x24e23d=fs['statSync'](_0x1d2eb9);_0x24e23d[_0x538e1a(0xbc)]>_0x671c41&&(_0x671c41=_0x24e23d[_0x538e1a(0xbc)],_0xfce739=_0x546f7d[_0x538e1a(0xf8)],_0x3a934f=_0x1d2eb9,_0x155bee=_0x36459a);}}}}catch{}};_0xcefab5(_0x36459a);}}return{'fileName':_0xfce739,'lastModified':_0x671c41>0x0?new Date(_0x671c41)[_0x239244(0x112)]():null,'fullPath':_0x3a934f,'dirPath':_0x155bee};}const debounceTimers=new Map(),lastLoggedTimes=new Map();function compressMessageContent(_0xd85414,_0x38425f,_0x47938b){const _0x3f4892=a0_0x5aff7f;let _0x5cd7c9=![],_0x2721f4=0x0;if(!_0xd85414)return{'modified':_0x5cd7c9,'savedTokens':_0x2721f4};const _0x578a48=_0xdc2676=>_0xdc2676[_0x3f4892(0x133)](/\r\n/g,'\x0a')[_0x3f4892(0x133)](/\n{3,}/g,'\x0a\x0a');if(typeof _0xd85414[_0x3f4892(0x127)]===_0x3f4892(0x142)){let _0x52046d=_0xd85414[_0x3f4892(0x127)],_0x3fd31e=_0x578a48(_0x52046d);_0x3fd31e[_0x3f4892(0xe4)]<_0x52046d['length']&&(_0xd85414['content']=_0x3fd31e,_0x5cd7c9=!![],_0x2721f4+=Math[_0x3f4892(0x13c)]((_0x52046d[_0x3f4892(0xe4)]-_0x3fd31e[_0x3f4892(0xe4)])/0x4));if(_0xd85414[_0x3f4892(0x127)][_0x3f4892(0xe4)]>0x12c&&!_0xd85414['content']['includes'](_0x3f4892(0xd8))){const _0x3f79f=_0x3f4892(0x13d)+Math[_0x3f4892(0x13c)](_0xd85414[_0x3f4892(0x127)][_0x3f4892(0xe4)]/0x4)+_0x3f4892(0xb8),_0x128f14=(0x0,cache_manager_1[_0x3f4892(0x116)])(_0x38425f,_0x47938b,_0xd85414[_0x3f4892(0x127)],_0x3f79f);_0xd85414[_0x3f4892(0x127)]=_0x3f4892(0x148)+_0x128f14[_0x3f4892(0xea)]+_0x3f4892(0xf7)+_0x128f14[_0x3f4892(0x129)]+_0x3f4892(0xf6)+_0x128f14[_0x3f4892(0x129)]+'`\x0a',_0x5cd7c9=!![],_0x2721f4+=Math['max'](0x0,_0x128f14[_0x3f4892(0xea)]-_0x128f14[_0x3f4892(0x125)]);}}else{if(Array[_0x3f4892(0xdd)](_0xd85414[_0x3f4892(0x127)]))for(const _0x35c93a of _0xd85414[_0x3f4892(0x127)]){if(_0x35c93a&&typeof _0x35c93a===_0x3f4892(0xca)){if(typeof _0x35c93a[_0x3f4892(0xc5)]===_0x3f4892(0x142)){let _0x317554=_0x35c93a[_0x3f4892(0xc5)],_0x3fa44e=_0x578a48(_0x317554);_0x3fa44e[_0x3f4892(0xe4)]<_0x317554['length']&&(_0x35c93a['text']=_0x3fa44e,_0x5cd7c9=!![],_0x2721f4+=Math[_0x3f4892(0x13c)]((_0x317554[_0x3f4892(0xe4)]-_0x3fa44e[_0x3f4892(0xe4)])/0x4));if(_0x35c93a[_0x3f4892(0xc5)][_0x3f4892(0xe4)]>0x12c&&!_0x35c93a[_0x3f4892(0xc5)][_0x3f4892(0x138)](_0x3f4892(0xd8))){const _0x117713=_0x3f4892(0xed)+Math[_0x3f4892(0x13c)](_0x35c93a[_0x3f4892(0xc5)][_0x3f4892(0xe4)]/0x4)+_0x3f4892(0xb8),_0x333065=(0x0,cache_manager_1['saveChunk'])(_0x38425f,_0x47938b,_0x35c93a[_0x3f4892(0xc5)],_0x117713);_0x35c93a[_0x3f4892(0xc5)]=_0x3f4892(0xd1)+_0x333065[_0x3f4892(0x129)]+'`\x0a>\x20Retrieve\x20with:\x20`trim\x20retrieve\x20'+_0x333065[_0x3f4892(0x129)]+'`\x0a',_0x5cd7c9=!![],_0x2721f4+=Math[_0x3f4892(0xe6)](0x0,_0x333065[_0x3f4892(0xea)]-_0x333065[_0x3f4892(0x125)]);}}else{if(typeof _0x35c93a[_0x3f4892(0x127)]===_0x3f4892(0x142)){let _0x58fd9e=_0x35c93a[_0x3f4892(0x127)],_0x3321be=_0x578a48(_0x58fd9e);_0x3321be['length']<_0x58fd9e[_0x3f4892(0xe4)]&&(_0x35c93a[_0x3f4892(0x127)]=_0x3321be,_0x5cd7c9=!![],_0x2721f4+=Math['ceil']((_0x58fd9e[_0x3f4892(0xe4)]-_0x3321be[_0x3f4892(0xe4)])/0x4));if(_0x35c93a[_0x3f4892(0x127)][_0x3f4892(0xe4)]>0x12c&&!_0x35c93a['content']['includes'](_0x3f4892(0xd8))){const _0x422852='Summary:\x20Tool\x20result\x20offloaded\x20('+Math[_0x3f4892(0x13c)](_0x35c93a[_0x3f4892(0x127)][_0x3f4892(0xe4)]/0x4)+_0x3f4892(0xb8),_0x2758fe=(0x0,cache_manager_1[_0x3f4892(0x116)])(_0x38425f,_0x47938b,_0x35c93a[_0x3f4892(0x127)],_0x422852);_0x35c93a['content']=_0x3f4892(0xd1)+_0x2758fe[_0x3f4892(0x129)]+_0x3f4892(0x136)+_0x2758fe[_0x3f4892(0x129)]+'`\x0a',_0x5cd7c9=!![],_0x2721f4+=Math[_0x3f4892(0xe6)](0x0,_0x2758fe[_0x3f4892(0xea)]-_0x2758fe[_0x3f4892(0x125)]);}}}}}}return{'modified':_0x5cd7c9,'savedTokens':_0x2721f4};}const sessionsStatePath=path[a0_0x5aff7f(0xdb)](baseDir,'sessions_state.json');let sessionsStateMemoryCache=null;function a0_0x495a(_0x3dc4d2,_0x5c7e6a){const _0x3fd77b=a0_0x3fd7();return a0_0x495a=function(_0x495a92,_0x53bc17){_0x495a92=_0x495a92-0xb7;let _0xf0839b=_0x3fd77b[_0x495a92];return _0xf0839b;},a0_0x495a(_0x3dc4d2,_0x5c7e6a);}function loadSessionsState(){const _0x4a9d48=a0_0x5aff7f;try{if(fs[_0x4a9d48(0x100)](sessionsStatePath)){const _0x414740=JSON[_0x4a9d48(0xc2)](fs['readFileSync'](sessionsStatePath,_0x4a9d48(0xfa)));if(_0x414740&&typeof _0x414740==='object')return sessionsStateMemoryCache=_0x414740,_0x414740;}}catch{}return sessionsStateMemoryCache||{};}function saveSessionStateItem(_0x5826dd,_0x292ece,_0x12a98d,_0x11354f=0x0,_0x132a4a=0x0){const _0x48e978=a0_0x5aff7f;try{const _0xdaa53c=loadSessionsState();_0xdaa53c[_0x5826dd]={'lineCount':_0x292ece,'activeSavedTokens':_0x12a98d,'sideCacheSaved':_0x11354f,'officialCompactSaved':_0x132a4a},sessionsStateMemoryCache=_0xdaa53c;if(!fs[_0x48e978(0x100)](baseDir))fs['mkdirSync'](baseDir,{'recursive':!![]});const _0x392ef0=sessionsStatePath+_0x48e978(0x13a);fs['writeFileSync'](_0x392ef0,JSON[_0x48e978(0xdf)](_0xdaa53c,null,0x2),_0x48e978(0xfa)),fs[_0x48e978(0x10b)](_0x392ef0,sessionsStatePath);}catch{}}function processSessionFile(_0x4db657,_0x13df88){const _0x2336a6=a0_0x5aff7f;try{if(!fs[_0x2336a6(0x100)](_0x4db657))return;const _0x5b8174=fs[_0x2336a6(0x10d)](_0x4db657);if(_0x5b8174['isDirectory']()||_0x5b8174[_0x2336a6(0x141)]===0x0)return;const _0x2a496d=loadConfig(),_0x50c8e4=_0x2336a6(0x120)+_0x13df88;if(_0x2a496d['conversation_toggles'][_0x50c8e4]===![])return;const _0x41e758=fs[_0x2336a6(0x130)](_0x4db657,_0x2336a6(0xfa));let _0x4be9e6=![],_0x2f9f8f=_0x41e758,_0xc47871=0x0;const _0x48d277=path['extname'](_0x4db657)[_0x2336a6(0x121)](),_0x21515a=path[_0x2336a6(0x104)](_0x4db657,_0x48d277);let _0x52c22e=0x1;if(_0x13df88!==_0x2336a6(0xfe)){if(_0x48d277==='.json')try{const _0x17c388=JSON['parse'](_0x41e758),_0x25a77d=Array[_0x2336a6(0xdd)](_0x17c388[_0x2336a6(0xc7)])?_0x17c388[_0x2336a6(0xc7)]:Array['isArray'](_0x17c388)?_0x17c388:null;if(_0x25a77d){_0x52c22e=_0x25a77d['length'];for(let _0xbdf007=0x0;_0xbdf007<_0x25a77d[_0x2336a6(0xe4)];_0xbdf007++){const _0x40a345=compressMessageContent(_0x25a77d[_0xbdf007],_0x21515a,_0x13df88);_0x40a345[_0x2336a6(0x103)]&&(_0x4be9e6=!![],_0xc47871+=_0x40a345['savedTokens']);}_0x4be9e6&&(_0x2f9f8f=JSON[_0x2336a6(0xdf)](_0x17c388,null,0x2));}}catch{}else{if(_0x48d277==='.jsonl'||_0x48d277===_0x2336a6(0xf0))try{const _0x4ab6ad=_0x41e758[_0x2336a6(0x147)]('\x0a');_0x52c22e=_0x4ab6ad['length'];const _0x7cddfd=[];for(let _0x41c4be of _0x4ab6ad){if(!_0x41c4be[_0x2336a6(0x122)]()){_0x7cddfd['push'](_0x41c4be);continue;}try{const _0x334c58=JSON[_0x2336a6(0xc2)](_0x41c4be),_0x53a6c0=_0x334c58[_0x2336a6(0x10c)]||_0x334c58;if(_0x53a6c0){const _0x295bd2=compressMessageContent(_0x53a6c0,_0x21515a,_0x13df88);_0x295bd2[_0x2336a6(0x103)]&&(_0x4be9e6=!![],_0xc47871+=_0x295bd2[_0x2336a6(0x124)],_0x41c4be=JSON[_0x2336a6(0xdf)](_0x334c58));}}catch{}_0x7cddfd[_0x2336a6(0xb7)](_0x41c4be);}_0x4be9e6&&(_0x2f9f8f=_0x7cddfd[_0x2336a6(0xdb)]('\x0a'));}catch{}}}else(_0x48d277==='.jsonl'||_0x48d277===_0x2336a6(0xf0))&&(_0x52c22e=_0x41e758['split']('\x0a')[_0x2336a6(0xc0)](Boolean)['length']);let _0x3d2676=0x0;const _0x509b5c=_0x41e758[_0x2336a6(0xe5)](/(?:Compacted conversation\s*·\s*)?saved\s*([\d\.]+)k?\s*tokens/gi);for(const _0x14ab95 of _0x509b5c){let _0x1de867=parseFloat(_0x14ab95[0x1]);_0x14ab95[0x0][_0x2336a6(0x121)]()[_0x2336a6(0x138)]('k')&&(_0x1de867=_0x1de867*0x3e8),_0x3d2676+=Math[_0x2336a6(0xcd)](_0x1de867);}const _0x3e5523=loadSessionsState(),_0x31e6e5=_0x3e5523[_0x4db657],_0x3a340d=_0x31e6e5&&_0x31e6e5[_0x2336a6(0x126)]!==undefined?_0x31e6e5[_0x2336a6(0x126)]:0x0,_0x21b178=_0x31e6e5&&_0x31e6e5['officialCompactSaved']!==undefined?_0x31e6e5[_0x2336a6(0xc9)]:_0x31e6e5?_0x31e6e5[_0x2336a6(0xce)]:0x0,_0x1777ec=_0x31e6e5?_0x31e6e5[_0x2336a6(0x11c)]:0x0,_0x1c33e3=_0x52c22e>_0x1777ec;let _0x374bab=_0x3a340d,_0x137f25=Math['max'](_0x21b178,_0x3d2676);if(_0x4be9e6){fs['writeFileSync'](_0x4db657,_0x2f9f8f,_0x2336a6(0xfa)),_0x374bab+=_0xc47871;const _0x5ae2b5=_0x374bab+_0x137f25;saveSessionStateItem(_0x4db657,_0x52c22e,_0x5ae2b5,_0x374bab,_0x137f25);const _0x589ff6='x'[_0x2336a6(0x135)](_0x5ae2b5*0x4);tracker_1['tracker'][_0x2336a6(0x12c)](_0x2336a6(0x14d)+_0x13df88,_0x589ff6,'',0x0,undefined,[_0x2336a6(0x120)+_0x13df88,_0x2336a6(0xd5),_0x13df88,_0x2336a6(0x14c)]);}else{if(_0x3d2676>_0x21b178){_0x137f25=_0x3d2676;const _0x7e0686=_0x374bab+_0x137f25;saveSessionStateItem(_0x4db657,_0x52c22e,_0x7e0686,_0x374bab,_0x137f25);const _0x108945='x'[_0x2336a6(0x135)](_0x7e0686*0x4);tracker_1[_0x2336a6(0xeb)][_0x2336a6(0x12c)](_0x2336a6(0x14d)+_0x13df88,_0x108945,'',0x0,undefined,[_0x2336a6(0x120)+_0x13df88,'live-conv',_0x13df88,'official_compact']);}else{if(_0x1c33e3){const _0x1d0649=_0x374bab+_0x137f25;saveSessionStateItem(_0x4db657,_0x52c22e,_0x1d0649,_0x374bab,_0x137f25);if(_0x1d0649>0x0){const _0x27776a='x'['repeat'](_0x1d0649*0x4);tracker_1[_0x2336a6(0xeb)][_0x2336a6(0x12c)](_0x2336a6(0x14d)+_0x13df88,_0x27776a,'',0x0,undefined,[_0x2336a6(0x120)+_0x13df88,_0x2336a6(0xd5),_0x13df88,_0x2336a6(0x12b)]);}}else{const _0x3fce0e=_0x374bab+_0x137f25;saveSessionStateItem(_0x4db657,_0x52c22e,_0x3fce0e,_0x374bab,_0x137f25);}}}}catch{}}function installWindowsStartupService(){const _0x134256=a0_0x5aff7f;if(process['platform']!=='win32')return;try{const _0x2de18c=path['join'](os[_0x134256(0x10f)](),_0x134256(0x11d),_0x134256(0xd0),_0x134256(0xe2),_0x134256(0xbf),_0x134256(0xff),_0x134256(0xf3),_0x134256(0x152));if(!fs['existsSync'](_0x2de18c))fs[_0x134256(0x13b)](_0x2de18c,{'recursive':!![]});const _0x171b78=path[_0x134256(0xdb)](_0x2de18c,_0x134256(0xd4)),_0x3d368a=path[_0x134256(0xdb)](__dirname,'cli.js'),_0x836a63=_0x3d368a[_0x134256(0x133)](/\\/g,'\x5c\x5c'),_0x1e0d5f='Set\x20WshShell\x20=\x20CreateObject(\x22WScript.Shell\x22)\x0aWshShell.Run\x20\x22node\x20\x22\x22\x22\x20&\x20\x22'+_0x836a63+_0x134256(0xc3);fs['writeFileSync'](_0x171b78,_0x1e0d5f,'utf8');}catch{}}function startWatcherDaemon(){const _0x50021c=a0_0x5aff7f;installWindowsStartupService();try{const {installClaudeHooks:_0x26bcd4}=require(_0x50021c(0x109));_0x26bcd4();}catch(_0x4669b9){}const _0xb64e52=['claude',_0x50021c(0x11b),_0x50021c(0xbe),_0x50021c(0xe0),_0x50021c(0x137),'copilot','openclaw',_0x50021c(0x139),_0x50021c(0x118)];for(const _0x16c126 of _0xb64e52){const _0x8a4219=getAgentStoragePaths(_0x16c126);for(const _0x3da3e3 of _0x8a4219){if(fs[_0x50021c(0x100)](_0x3da3e3))try{fs['watch'](_0x3da3e3,{'recursive':!![]},(_0x5ccf14,_0x31e3c0)=>{const _0x4c3ae0=_0x50021c;if(!_0x31e3c0)return;const _0x1dab88=path['join'](_0x3da3e3,_0x31e3c0);if(debounceTimers[_0x4c3ae0(0x144)](_0x1dab88))clearTimeout(debounceTimers['get'](_0x1dab88));const _0x5e0c15=setTimeout(()=>processSessionFile(_0x1dab88,_0x16c126),0x1f4);debounceTimers['set'](_0x1dab88,_0x5e0c15);});}catch{}}}setInterval(()=>{const _0x96c8cd=_0x50021c;for(const _0x211b97 of _0xb64e52){try{const _0x5204be=getLatestSessionFile(_0x211b97);_0x5204be&&_0x5204be['fullPath']&&processSessionFile(_0x5204be[_0x96c8cd(0x110)],_0x211b97);}catch{}}},0xbb8);}
|
package/filters/devops.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x520b17=a0_0x397b;function a0_0x21b9(){const _0x5774ef=['872MYmTTx','\x20files','join','Ruff:\x20','length','filter','All\x20checks\x20passed','Containers:\x20','\x20log\x20lines\x20total)','defineProperty','split','\x0a...\x20[','match','Ruff:\x20all\x20checks\x20passed','3627594ohcBEx','\x20issues\x20in\x20','filterDockerPs','\x20total','\x20more\x20resources','Events:','\x20resources\x20found','logs','Docker\x20images:\x20','420783lUiyzS','...\x20+','filterRuff','keys','1094699LSpKhs','\x20\x20...\x20+','trim','startsWith','\x20more','8NIVGmX','push','\x20\x20...\x20(','\x20lines\x20truncated]\x20...\x0a','slice','4741492vfivJk','__esModule','filterDockerLogs','\x20more\x20events','2jKBiPl','94977LPDZxp','1882255JokEQJ','get','24968920cUBbZd','includes','\x0a...\x20+'];a0_0x21b9=function(){return _0x5774ef;};return a0_0x21b9();}(function(_0x322fb9,_0x38301c){const _0x337733=a0_0x397b,_0x545cd6=_0x322fb9();while(!![]){try{const _0x23d7b5=parseInt(_0x337733(0xc5))/0x1*(-parseInt(_0x337733(0xa3))/0x2)+-parseInt(_0x337733(0xc1))/0x3+-parseInt(_0x337733(0x9a))/0x4*(-parseInt(_0x337733(0xa5))/0x5)+parseInt(_0x337733(0xb8))/0x6+-parseInt(_0x337733(0x9f))/0x7+parseInt(_0x337733(0xaa))/0x8*(-parseInt(_0x337733(0xa4))/0x9)+parseInt(_0x337733(0xa7))/0xa;if(_0x23d7b5===_0x38301c)break;else _0x545cd6['push'](_0x545cd6['shift']());}catch(_0x308df5){_0x545cd6['push'](_0x545cd6['shift']());}}}(a0_0x21b9,0xc14f8));Object[a0_0x520b17(0xb3)](exports,a0_0x520b17(0xa0),{'value':!![]}),exports[a0_0x520b17(0xba)]=filterDockerPs,exports['filterDockerImages']=filterDockerImages,exports[a0_0x520b17(0xa1)]=filterDockerLogs,exports['filterKubectl']=filterKubectl,exports[a0_0x520b17(0xc3)]=filterRuff;function filterDockerPs(_0x49a478){const _0x5923df=a0_0x520b17,_0x3a3adb=_0x49a478[_0x5923df(0xb4)]('\x0a')[_0x5923df(0xaf)](_0x2fd8e1=>_0x2fd8e1[_0x5923df(0x97)]()[_0x5923df(0xae)]>0x0);if(_0x3a3adb[_0x5923df(0xae)]===0x0)return'No\x20containers\x20running';if(_0x3a3adb[_0x5923df(0xae)]<=0xa)return _0x49a478[_0x5923df(0x97)]();const _0x5e7f70=_0x3a3adb[0x0],_0x294fe1=_0x3a3adb[_0x5923df(0x9e)](0x1),_0x428528=[];_0x428528[_0x5923df(0x9b)](_0x5923df(0xb1)+_0x294fe1['length']+_0x5923df(0xbb)),_0x428528[_0x5923df(0x9b)]('');for(const _0x46c666 of _0x294fe1){const _0x38d97a=_0x46c666['split'](/\s{2,}/);if(_0x38d97a[_0x5923df(0xae)]>=0x5){const _0x52e586=_0x38d97a[0x0]['substring'](0x0,0xc),_0xc23706=_0x38d97a[0x1],_0x79bf0d=_0x38d97a[_0x38d97a[_0x5923df(0xae)]-0x2]||'',_0x512282=_0x38d97a[_0x38d97a[_0x5923df(0xae)]-0x1]||'';_0x428528[_0x5923df(0x9b)]('\x20\x20'+_0x52e586+'\x20\x20'+_0xc23706+'\x20\x20'+_0x79bf0d+'\x20\x20'+_0x512282);}else _0x428528[_0x5923df(0x9b)]('\x20\x20'+_0x46c666[_0x5923df(0x97)]());}return _0x428528[_0x5923df(0xac)]('\x0a');}function filterDockerImages(_0x3944be){const _0x58c573=a0_0x520b17,_0x899118=_0x3944be[_0x58c573(0xb4)]('\x0a')['filter'](_0x4d315f=>_0x4d315f['trim']()[_0x58c573(0xae)]>0x0);if(_0x899118[_0x58c573(0xae)]<=0x1)return'No\x20images\x20found';if(_0x899118[_0x58c573(0xae)]<=0xf)return _0x3944be['trim']();const _0x20a7ad=_0x899118[_0x58c573(0x9e)](0x1),_0x7004b3=[_0x58c573(0xc0)+_0x20a7ad['length']+_0x58c573(0xbb)];_0x7004b3['push']('');const _0x565dd1=_0x20a7ad['slice'](0x0,0x14);for(const _0x2783b7 of _0x565dd1){const _0x201895=_0x2783b7[_0x58c573(0xb4)](/\s{2,}/);if(_0x201895[_0x58c573(0xae)]>=0x3){const _0x66a472=_0x201895[0x0],_0x4b8dba=_0x201895[0x1],_0x490f90=_0x201895[_0x201895['length']-0x1]||'';_0x7004b3[_0x58c573(0x9b)]('\x20\x20'+_0x66a472+':'+_0x4b8dba+'\x20\x20'+_0x490f90);}else _0x7004b3[_0x58c573(0x9b)]('\x20\x20'+_0x2783b7[_0x58c573(0x97)]());}return _0x20a7ad[_0x58c573(0xae)]>0x14&&_0x7004b3[_0x58c573(0x9b)]('\x20\x20...\x20+'+(_0x20a7ad[_0x58c573(0xae)]-0x14)+'\x20more\x20images'),_0x7004b3[_0x58c573(0xac)]('\x0a');}function filterDockerLogs(_0x5d436d){const _0x3532cf=a0_0x520b17,_0x25d135=_0x5d436d[_0x3532cf(0xb4)]('\x0a');if(_0x25d135[_0x3532cf(0xae)]<=0x32)return _0x5d436d;const _0x2c9ff3=[];return _0x2c9ff3[_0x3532cf(0x9b)](..._0x25d135['slice'](0x0,0x14)),_0x2c9ff3[_0x3532cf(0x9b)](_0x3532cf(0xb5)+(_0x25d135[_0x3532cf(0xae)]-0x28)+_0x3532cf(0x9d)),_0x2c9ff3[_0x3532cf(0x9b)](..._0x25d135['slice'](-0x14)),_0x2c9ff3[_0x3532cf(0x9b)]('\x0a('+_0x25d135[_0x3532cf(0xae)]+_0x3532cf(0xb2)),_0x2c9ff3['join']('\x0a');}function filterKubectl(_0x580330,_0x5bd9b2){const _0x5636a5=a0_0x520b17,_0x5e633b=_0x580330['split']('\x0a')[_0x5636a5(0xaf)](_0x450698=>_0x450698[_0x5636a5(0x97)]()['length']>0x0);if(_0x5e633b[_0x5636a5(0xae)]===0x0)return'No\x20resources\x20found';if(_0x5e633b[_0x5636a5(0xae)]<=0x14)return _0x580330[_0x5636a5(0x97)]();if(_0x5bd9b2===_0x5636a5(0xa6)){const _0x491d53=_0x5e633b[0x0],_0x597b33=_0x5e633b[_0x5636a5(0x9e)](0x1),_0x58ca81=[_0x597b33[_0x5636a5(0xae)]+_0x5636a5(0xbe),'',_0x491d53];return _0x597b33['length']<=0x1e?_0x58ca81[_0x5636a5(0x9b)](..._0x597b33):(_0x58ca81[_0x5636a5(0x9b)](..._0x597b33[_0x5636a5(0x9e)](0x0,0x19)),_0x58ca81[_0x5636a5(0x9b)](_0x5636a5(0xc2)+(_0x597b33[_0x5636a5(0xae)]-0x19)+_0x5636a5(0xbc))),_0x58ca81[_0x5636a5(0xac)]('\x0a');}if(_0x5bd9b2==='describe'){const _0x4f86f4=[];let _0x27e352=![],_0x2caa73=0x0;for(const _0x408a52 of _0x5e633b){if(_0x408a52[_0x5636a5(0x98)](_0x5636a5(0xbd))){_0x27e352=!![],_0x4f86f4[_0x5636a5(0x9b)](_0x408a52);continue;}if(_0x27e352){_0x2caa73++;if(_0x2caa73<=0x5)_0x4f86f4[_0x5636a5(0x9b)](_0x408a52);}else _0x4f86f4[_0x5636a5(0x9b)](_0x408a52);}return _0x2caa73>0x5&&_0x4f86f4[_0x5636a5(0x9b)](_0x5636a5(0xc6)+(_0x2caa73-0x5)+_0x5636a5(0xa2)),_0x4f86f4[_0x5636a5(0xac)]('\x0a');}if(_0x5bd9b2===_0x5636a5(0xbf))return filterDockerLogs(_0x580330);const _0x58060d=_0x5e633b[_0x5636a5(0x9e)](0x0,0x1e);return _0x5e633b[_0x5636a5(0xae)]>0x1e&&_0x58060d[_0x5636a5(0x9b)](_0x5636a5(0xc2)+(_0x5e633b['length']-0x1e)+'\x20more\x20lines'),_0x58060d[_0x5636a5(0xac)]('\x0a');}function a0_0x397b(_0x214d1e,_0x530f17){const _0x21b93b=a0_0x21b9();return a0_0x397b=function(_0x397b1f,_0x53a7bc){_0x397b1f=_0x397b1f-0x97;let _0x52e900=_0x21b93b[_0x397b1f];return _0x52e900;},a0_0x397b(_0x214d1e,_0x530f17);}function filterRuff(_0x59a606){const _0x510625=a0_0x520b17,_0x3368dc=_0x59a606[_0x510625(0xb4)]('\x0a')['filter'](_0x59738b=>_0x59738b['trim']()[_0x510625(0xae)]>0x0);if(_0x3368dc['length']===0x0)return'Ruff:\x20no\x20issues\x20found';if(_0x59a606[_0x510625(0xa8)](_0x510625(0xb0))||_0x59a606['includes']('Found\x200\x20error'))return _0x510625(0xb7);const _0x41dadb=_0x59a606[_0x510625(0xb6)](/Found (\d+) error/),_0x452324=_0x41dadb?parseInt(_0x41dadb[0x1]):_0x3368dc[_0x510625(0xae)],_0xde606d={},_0x224ece=[];for(const _0x5add8f of _0x3368dc){const _0x29ed2c=_0x5add8f[_0x510625(0xb6)](/^([^:]+:\d+:\d+):\s*(.*)/);if(_0x29ed2c){const _0x43bfad=_0x29ed2c[0x1],_0x2bc51f=_0x43bfad[_0x510625(0xb4)](':')[0x0];if(!_0xde606d[_0x2bc51f])_0xde606d[_0x2bc51f]=[];_0xde606d[_0x2bc51f]['push'](_0x5add8f);}else _0x224ece[_0x510625(0x9b)](_0x5add8f);}const _0xfb2211=Object[_0x510625(0xc4)](_0xde606d);if(_0xfb2211['length']===0x0){if(_0x3368dc[_0x510625(0xae)]<=0x14)return _0x59a606[_0x510625(0x97)]();return _0x3368dc[_0x510625(0x9e)](0x0,0xf)[_0x510625(0xac)]('\x0a')+(_0x510625(0xa9)+(_0x3368dc[_0x510625(0xae)]-0xf)+_0x510625(0x99));}const _0x12d319=[_0x510625(0xad)+_0x452324+_0x510625(0xb9)+_0xfb2211[_0x510625(0xae)]+_0x510625(0xab)];_0x12d319['push']('');const _0x2e0b4a=0xa;for(const _0x4a4062 of _0xfb2211[_0x510625(0x9e)](0x0,_0x2e0b4a)){const _0x134de8=_0xde606d[_0x4a4062];if(_0x134de8[_0x510625(0xae)]<=0x3){for(const _0x1b2def of _0x134de8)_0x12d319['push']('\x20\x20'+_0x1b2def);}else _0x12d319[_0x510625(0x9b)]('\x20\x20'+_0x134de8[0x0]),_0x12d319[_0x510625(0x9b)](_0x510625(0x9c)+_0x134de8[_0x510625(0xae)]+_0x510625(0xb9)+_0x4a4062+')');}return _0xfb2211['length']>_0x2e0b4a&&_0x12d319['push']('\x20\x20...\x20+'+(_0xfb2211[_0x510625(0xae)]-_0x2e0b4a)+'\x20more\x20files'),_0x12d319[_0x510625(0xac)]('\x0a');}
|
package/filters/generic.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0xe9078d=a0_0x482e;function a0_0x482e(_0x4ac9eb,_0x3a1129){const _0x46980c=a0_0x4698();return a0_0x482e=function(_0x482ecf,_0x5f4db8){_0x482ecf=_0x482ecf-0x13f;let _0x56100f=_0x46980c[_0x482ecf];return _0x56100f;},a0_0x482e(_0x4ac9eb,_0x3a1129);}(function(_0x5bcfa9,_0x40b550){const _0x18fcf9=a0_0x482e,_0x403389=_0x5bcfa9();while(!![]){try{const _0x2c85e6=-parseInt(_0x18fcf9(0x140))/0x1+-parseInt(_0x18fcf9(0x161))/0x2+-parseInt(_0x18fcf9(0x146))/0x3*(-parseInt(_0x18fcf9(0x163))/0x4)+parseInt(_0x18fcf9(0x15a))/0x5+parseInt(_0x18fcf9(0x154))/0x6*(-parseInt(_0x18fcf9(0x166))/0x7)+-parseInt(_0x18fcf9(0x16c))/0x8*(-parseInt(_0x18fcf9(0x141))/0x9)+parseInt(_0x18fcf9(0x151))/0xa*(parseInt(_0x18fcf9(0x15b))/0xb);if(_0x2c85e6===_0x40b550)break;else _0x403389['push'](_0x403389['shift']());}catch(_0x34237d){_0x403389['push'](_0x403389['shift']());}}}(a0_0x4698,0x99b58));Object['defineProperty'](exports,a0_0xe9078d(0x15d),{'value':!![]}),exports[a0_0xe9078d(0x168)]=stripAnsi,exports[a0_0xe9078d(0x16d)]=collapseDuplicates,exports[a0_0xe9078d(0x169)]=collapseWhitespace,exports[a0_0xe9078d(0x153)]=stripComments,exports[a0_0xe9078d(0x14e)]=smartCrushJson,exports[a0_0xe9078d(0x16b)]=softTruncate;function stripAnsi(_0x76e294){const _0x2e1399=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g;return _0x76e294['replace'](_0x2e1399,'');}function collapseDuplicates(_0x12d08b){const _0x2a0f01=a0_0xe9078d,_0x358f95=_0x12d08b['split']('\x0a');if(_0x358f95[_0x2a0f01(0x165)]<=0x1)return _0x12d08b;const _0x318336=[];let _0x843985=_0x358f95[0x0],_0xb4ddbb=0x1;for(let _0x539ef0=0x1;_0x539ef0<_0x358f95['length'];_0x539ef0++){const _0x267a2d=_0x358f95[_0x539ef0];_0x267a2d===_0x843985&&_0x267a2d[_0x2a0f01(0x149)]()[_0x2a0f01(0x165)]>0x0?_0xb4ddbb++:(_0xb4ddbb>0x1?_0x318336['push'](_0x843985+'\x20[x'+_0xb4ddbb+']'):_0x318336['push'](_0x843985),_0x843985=_0x267a2d,_0xb4ddbb=0x1);}return _0xb4ddbb>0x1?_0x318336[_0x2a0f01(0x155)](_0x843985+_0x2a0f01(0x14a)+_0xb4ddbb+']'):_0x318336[_0x2a0f01(0x155)](_0x843985),_0x318336[_0x2a0f01(0x158)]('\x0a');}function collapseWhitespace(_0x25d1f9){const _0x2e4980=a0_0xe9078d;let _0x2a5331=_0x25d1f9['replace'](/[ \t]+$/gm,'');return _0x2a5331=_0x2a5331['replace'](/\n{4,}/g,_0x2e4980(0x142)),_0x2a5331;}function stripComments(_0xe398a1,_0x44b634){const _0xe04921=a0_0xe9078d;if(!_0x44b634)return _0xe398a1;const _0x37c319=_0xe398a1['split']('\x0a');if(_0x37c319[_0xe04921(0x165)]<=0x96)return _0xe398a1;const _0x3abdc4={'.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*#(?!!)/},_0x3c7697=_0x3abdc4[_0x44b634[_0xe04921(0x143)]()];if(!_0x3c7697)return _0xe398a1;const _0x151713=_0x37c319[_0xe04921(0x164)](_0x2b373a=>!_0x3c7697['test'](_0x2b373a));return _0x151713[_0xe04921(0x158)]('\x0a');}function smartCrushJson(_0x3738cd){const _0x451bc0=a0_0xe9078d;try{const _0x510cbe=_0x3738cd[_0x451bc0(0x149)]();if(!_0x510cbe[_0x451bc0(0x13f)]('['))return null;const _0x33aded=JSON['parse'](_0x510cbe);if(!Array[_0x451bc0(0x159)](_0x33aded)||_0x33aded[_0x451bc0(0x165)]<0x3)return null;if(typeof _0x33aded[0x0]!==_0x451bc0(0x152)||_0x33aded[0x0]===null)return null;const _0x286bbf=Object[_0x451bc0(0x14b)](_0x33aded[0x0]);if(_0x286bbf[_0x451bc0(0x165)]===0x0)return null;const _0x565e96=_0x286bbf[_0x451bc0(0x164)](_0x44f334=>{const _0x1f6dcd=_0x451bc0,_0x1e4556=_0x44f334[_0x1f6dcd(0x143)]();return!_0x1e4556[_0x1f6dcd(0x15f)](_0x1f6dcd(0x157))&&!_0x1e4556['includes'](_0x1f6dcd(0x14d))&&!_0x1e4556[_0x1f6dcd(0x15f)](_0x1f6dcd(0x14c))&&!_0x1e4556[_0x1f6dcd(0x15f)](_0x1f6dcd(0x15e))&&!_0x1e4556[_0x1f6dcd(0x15f)](_0x1f6dcd(0x167))&&!_0x1e4556[_0x1f6dcd(0x15f)]('signature')&&!_0x1e4556[_0x1f6dcd(0x15f)](_0x1f6dcd(0x15c))&&_0x1e4556!==_0x1f6dcd(0x144)&&_0x1e4556!=='engines'&&_0x1e4556!=='bugs'&&_0x1e4556!==_0x1f6dcd(0x162);})[_0x451bc0(0x160)](0x0,0x6);if(_0x565e96['length']===0x0)return null;const _0x1a346d=[];_0x1a346d[_0x451bc0(0x155)](_0x565e96['join']('|'));const _0x1d132b=0x1e;for(let _0x4f5792=0x0;_0x4f5792<Math['min'](_0x33aded[_0x451bc0(0x165)],_0x1d132b);_0x4f5792++){const _0x29535d=_0x565e96['map'](_0x1b8f0b=>{const _0x3d22c7=_0x451bc0,_0x558165=_0x33aded[_0x4f5792][_0x1b8f0b];if(_0x558165===null||_0x558165===undefined)return'';if(typeof _0x558165==='object')return JSON[_0x3d22c7(0x14f)](_0x558165)['substring'](0x0,0x28);return String(_0x558165)[_0x3d22c7(0x16a)](0x0,0x3c);});_0x1a346d['push'](_0x29535d[_0x451bc0(0x158)]('|'));}_0x33aded[_0x451bc0(0x165)]>_0x1d132b&&_0x1a346d[_0x451bc0(0x155)]('...\x20+'+(_0x33aded['length']-_0x1d132b)+_0x451bc0(0x156));_0x1a346d[_0x451bc0(0x155)]('\x0a('+_0x33aded[_0x451bc0(0x165)]+_0x451bc0(0x145)+_0x286bbf['length']+_0x451bc0(0x150)+_0x565e96['length']+'\x20key\x20fields)');const _0x2b2fb2=_0x1a346d[_0x451bc0(0x158)]('\x0a');if(_0x2b2fb2[_0x451bc0(0x165)]<_0x510cbe['length'])return _0x2b2fb2;return null;}catch{return null;}}function a0_0x4698(){const _0x10174d=['repository','4wsFdeY','filter','length','7RnFdYF','checksum','stripAnsi','collapseWhitespace','substring','softTruncate','344gfTuuj','collapseDuplicates','startsWith','1119093geXYmV','8919xuIqkc','\x0a\x0a\x0a','toLowerCase','funding','\x20items,\x20','1808901LvPLtF','\x20characters\x20of\x20output]\x20...\x0a','split','trim','\x20[x','keys','sha','integrity','smartCrushJson','stringify','\x20fields,\x20showing\x20','290yDaYIZ','object','stripComments','523902jujken','push','\x20more\x20rows','resolved','join','isArray','2811015OzprVL','617089kZTLrG','dev','__esModule','hash','includes','slice','1997304fpQJjf'];a0_0x4698=function(){return _0x10174d;};return a0_0x4698();}function softTruncate(_0x3ca13c,_0x69b530=0x4e20){const _0x472b0c=a0_0xe9078d;if(_0x3ca13c[_0x472b0c(0x165)]<=_0x69b530)return _0x3ca13c;const _0x3d9c3b=_0x3ca13c[_0x472b0c(0x148)]('\x0a');if(_0x3d9c3b[_0x472b0c(0x165)]<=0xc8)return _0x3ca13c;const _0x107dbe=0x32,_0x11d1ba=0x96,_0x21a5b4=_0x3d9c3b[_0x472b0c(0x160)](0x0,_0x107dbe),_0xfb0355=_0x3d9c3b[_0x472b0c(0x160)](_0x3d9c3b['length']-_0x11d1ba),_0x228986=_0x3ca13c[_0x472b0c(0x165)]-(_0x21a5b4[_0x472b0c(0x158)]('\x0a')[_0x472b0c(0x165)]+_0xfb0355[_0x472b0c(0x158)]('\x0a')[_0x472b0c(0x165)]);return[..._0x21a5b4,'\x0a...\x20[TrimPrompt:\x20Truncated\x20'+_0x228986+_0x472b0c(0x147),..._0xfb0355][_0x472b0c(0x158)]('\x0a');}
|
package/filters/git.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const a0_0x241c6a=a0_0x2b5d;(function(_0x31963,_0x5b6b50){const _0x5f03ab=a0_0x2b5d,_0x4d1bb6=_0x31963();while(!![]){try{const _0x1cba9c=-parseInt(_0x5f03ab(0x115))/0x1+-parseInt(_0x5f03ab(0x141))/0x2+parseInt(_0x5f03ab(0x137))/0x3+parseInt(_0x5f03ab(0x12e))/0x4+parseInt(_0x5f03ab(0x135))/0x5*(-parseInt(_0x5f03ab(0x113))/0x6)+-parseInt(_0x5f03ab(0x11e))/0x7*(parseInt(_0x5f03ab(0x114))/0x8)+parseInt(_0x5f03ab(0x146))/0x9;if(_0x1cba9c===_0x5b6b50)break;else _0x4d1bb6['push'](_0x4d1bb6['shift']());}catch(_0x5b0ad4){_0x4d1bb6['push'](_0x4d1bb6['shift']());}}}(a0_0x44d6,0xebef1));var __createBinding=this&&this[a0_0x241c6a(0x127)]||(Object['create']?function(_0x5b1b66,_0x3e9d9b,_0x44b84d,_0x265e9f){const _0x582ca9=a0_0x241c6a;if(_0x265e9f===undefined)_0x265e9f=_0x44b84d;var _0x5ed535=Object[_0x582ca9(0x128)](_0x3e9d9b,_0x44b84d);(!_0x5ed535||('get'in _0x5ed535?!_0x3e9d9b[_0x582ca9(0x138)]:_0x5ed535[_0x582ca9(0x136)]||_0x5ed535['configurable']))&&(_0x5ed535={'enumerable':!![],'get':function(){return _0x3e9d9b[_0x44b84d];}}),Object[_0x582ca9(0x12d)](_0x5b1b66,_0x265e9f,_0x5ed535);}:function(_0x22b9b6,_0x10ea8a,_0x5921b9,_0x3583c8){if(_0x3583c8===undefined)_0x3583c8=_0x5921b9;_0x22b9b6[_0x3583c8]=_0x10ea8a[_0x5921b9];}),__setModuleDefault=this&&this[a0_0x241c6a(0x13e)]||(Object[a0_0x241c6a(0x112)]?function(_0x32b59b,_0x3d2ae7){const _0x2da863=a0_0x241c6a;Object['defineProperty'](_0x32b59b,_0x2da863(0x130),{'enumerable':!![],'value':_0x3d2ae7});}:function(_0x5ce488,_0x35607d){const _0x5ba6af=a0_0x241c6a;_0x5ce488[_0x5ba6af(0x130)]=_0x35607d;}),__importStar=this&&this[a0_0x241c6a(0x11c)]||(function(){var _0x59a3cf=function(_0x246bbc){const _0x1b8173=a0_0x2b5d;return _0x59a3cf=Object[_0x1b8173(0x144)]||function(_0x407c25){const _0xe005e0=_0x1b8173;var _0x493a08=[];for(var _0xf14c55 in _0x407c25)if(Object[_0xe005e0(0x121)][_0xe005e0(0x111)][_0xe005e0(0x12f)](_0x407c25,_0xf14c55))_0x493a08[_0x493a08[_0xe005e0(0x11f)]]=_0xf14c55;return _0x493a08;},_0x59a3cf(_0x246bbc);};return function(_0x34b68f){const _0x4ffae7=a0_0x2b5d;if(_0x34b68f&&_0x34b68f[_0x4ffae7(0x138)])return _0x34b68f;var _0x317ba8={};if(_0x34b68f!=null){for(var _0x1db795=_0x59a3cf(_0x34b68f),_0x1833d5=0x0;_0x1833d5<_0x1db795[_0x4ffae7(0x11f)];_0x1833d5++)if(_0x1db795[_0x1833d5]!=='default')__createBinding(_0x317ba8,_0x34b68f,_0x1db795[_0x1833d5]);}return __setModuleDefault(_0x317ba8,_0x34b68f),_0x317ba8;};}());Object[a0_0x241c6a(0x12d)](exports,a0_0x241c6a(0x138),{'value':!![]}),exports[a0_0x241c6a(0x120)]=filterGitStatus,exports[a0_0x241c6a(0x11b)]=filterGitLog,exports[a0_0x241c6a(0x124)]=filterGitDiff;const path=__importStar(require(a0_0x241c6a(0x147)));function filterGitStatus(_0xbca27b){const _0x10f4ee=a0_0x241c6a,_0x105245=_0xbca27b[_0x10f4ee(0x118)]('\x0a')[_0x10f4ee(0x126)](_0x535854=>_0x535854[_0x10f4ee(0x11d)]())[_0x10f4ee(0x140)](_0x4ec9e1=>_0x4ec9e1[_0x10f4ee(0x11f)]>0x0);if(_0x105245['length']===0x0)return _0x10f4ee(0x145);const _0x2d94e6=[],_0x499f88=[],_0x5d9938=[];for(const _0x43a9de of _0x105245){if(_0x43a9de[_0x10f4ee(0x119)]('##')){const _0x583c5a=_0x43a9de[_0x10f4ee(0x13d)](/^##\s*/,'');_0x2d94e6[_0x10f4ee(0x11a)](_0x10f4ee(0x116)+_0x583c5a);}else _0x43a9de[_0x10f4ee(0x119)]('??')?_0x499f88[_0x10f4ee(0x11a)](_0x43a9de[_0x10f4ee(0x142)](0x3)['trim']()):_0x5d9938[_0x10f4ee(0x11a)](_0x43a9de);}_0x5d9938['length']>0x0&&(_0x2d94e6['push'](_0x10f4ee(0x13b)),_0x2d94e6[_0x10f4ee(0x11a)](..._0x5d9938[_0x10f4ee(0x126)](_0xf0eb0c=>'\x20\x20'+_0xf0eb0c)));if(_0x499f88['length']>0x0){_0x2d94e6[_0x10f4ee(0x11a)](_0x10f4ee(0x12a));const _0x1d7e52={},_0x22fd72=[];for(const _0x327155 of _0x499f88){const _0x4d0d42=path[_0x10f4ee(0x13f)](_0x327155);_0x4d0d42==='.'||_0x4d0d42===''?_0x22fd72['push'](_0x327155):(!_0x1d7e52[_0x4d0d42]&&(_0x1d7e52[_0x4d0d42]=[]),_0x1d7e52[_0x4d0d42]['push'](path['basename'](_0x327155)));}for(const [_0x4438b2,_0x3a8271]of Object[_0x10f4ee(0x117)](_0x1d7e52)){if(_0x3a8271['length']>0x5)_0x2d94e6['push'](_0x10f4ee(0x134)+_0x4438b2+'/\x20('+_0x3a8271[_0x10f4ee(0x11f)]+_0x10f4ee(0x132));else for(const _0xdd1add of _0x3a8271){_0x2d94e6[_0x10f4ee(0x11a)](_0x10f4ee(0x134)+path[_0x10f4ee(0x12c)](_0x4438b2,_0xdd1add));}}for(const _0x5d91c1 of _0x22fd72){_0x2d94e6[_0x10f4ee(0x11a)](_0x10f4ee(0x134)+_0x5d91c1);}}return _0x2d94e6['join']('\x0a');}function filterGitLog(_0x2b4feb){const _0x706407=a0_0x241c6a,_0x24433e=_0x2b4feb['split']('---END---')['map'](_0xbbd7df=>_0xbbd7df[_0x706407(0x11d)]())['filter'](_0x19787f=>_0x19787f[_0x706407(0x11f)]>0x0);if(_0x24433e[_0x706407(0x11f)]===0x0)return _0x2b4feb;const _0x4d664d=[];for(const _0x54a5a5 of _0x24433e){const _0x1c3ee7=_0x54a5a5[_0x706407(0x118)]('\x0a'),_0x418379=_0x1c3ee7[0x0]||'',_0x13976e=_0x1c3ee7[_0x706407(0x123)](0x1)[_0x706407(0x126)](_0x2efd01=>_0x2efd01[_0x706407(0x11d)]())[_0x706407(0x140)](_0x41ae13=>_0x41ae13[_0x706407(0x11f)]>0x0);_0x4d664d[_0x706407(0x11a)]('-\x20'+_0x418379),_0x13976e[_0x706407(0x11f)]>0x0&&(_0x4d664d['push']('\x20\x20'+_0x13976e[0x0]),_0x13976e[_0x706407(0x11f)]>0x1&&_0x4d664d['push'](_0x706407(0x13c)+(_0x13976e['length']-0x1)+_0x706407(0x13a)));}return _0x4d664d[_0x706407(0x12c)]('\x0a');}function a0_0x2b5d(_0x259add,_0x57c515){const _0x44d66d=a0_0x44d6();return a0_0x2b5d=function(_0x2b5d97,_0x3cc1d2){_0x2b5d97=_0x2b5d97-0x111;let _0x6cc5ac=_0x44d66d[_0x2b5d97];return _0x6cc5ac;},a0_0x2b5d(_0x259add,_0x57c515);}function a0_0x44d6(){const _0x1f78d8=['replace','__setModuleDefault','dirname','filter','3367668ItgMrQ','substring','No\x20modifications','getOwnPropertyNames','Clean\x20working\x20tree','49394853OFkAfl','path','hasOwnProperty','create','5560254nLTJtA','16ydCCFg','1105063jUSTgP','*\x20Branch:\x20','entries','split','startsWith','push','filterGitLog','__importStar','trim','5279323IkpyHk','length','filterGitStatus','prototype','+++','slice','filterGitDiff','diff\x20--git','map','__createBinding','getOwnPropertyDescriptor','unknown_file','\x0aUntracked\x20files:','[file]\x20','join','defineProperty','301048NonJSd','call','default','\x20more\x20modifications','\x20untracked\x20files)','match','\x20\x20??\x20','5dAnEFd','writable','1880370UqunDg','__esModule','---','\x20lines\x20of\x20description)','\x0aChanges:','\x20\x20...\x20(+'];a0_0x44d6=function(){return _0x1f78d8;};return a0_0x44d6();}function filterGitDiff(_0x348fd0){const _0x4ddc41=a0_0x241c6a,_0x27249c=_0x348fd0['split']('\x0a'),_0x162b0f=[];let _0x2d572d='',_0x53d809=0x0,_0x32cac7=0x0,_0x105f0e=[];const _0xb8eb2c=()=>{const _0x9fc504=a0_0x2b5d;if(_0x2d572d&&(_0x53d809>0x0||_0x32cac7>0x0)){_0x162b0f[_0x9fc504(0x11a)](_0x9fc504(0x12b)+_0x2d572d+'\x20(+'+_0x53d809+'\x20-'+_0x32cac7+')');const _0x26f90a=0xa,_0x5c2520=_0x105f0e[_0x9fc504(0x123)](0x0,_0x26f90a);for(const _0x23cfdb of _0x5c2520){_0x162b0f[_0x9fc504(0x11a)]('\x20\x20'+_0x23cfdb);}const _0x36a0ad=_0x53d809+_0x32cac7-_0x26f90a;_0x36a0ad>0x0&&_0x162b0f[_0x9fc504(0x11a)]('\x20\x20...\x20+'+_0x36a0ad+_0x9fc504(0x131));}_0x53d809=0x0,_0x32cac7=0x0,_0x105f0e=[];};for(const _0x25befe of _0x27249c){if(_0x25befe[_0x4ddc41(0x119)](_0x4ddc41(0x125))){_0xb8eb2c();const _0x17e2ca=_0x25befe[_0x4ddc41(0x133)](/\sb\/(.+)$/);_0x2d572d=_0x17e2ca?_0x17e2ca[0x1]:_0x4ddc41(0x129);}else{if(_0x25befe['startsWith']('+')&&!_0x25befe[_0x4ddc41(0x119)](_0x4ddc41(0x122)))_0x53d809++,_0x105f0e[_0x4ddc41(0x11a)](_0x25befe);else _0x25befe[_0x4ddc41(0x119)]('-')&&!_0x25befe[_0x4ddc41(0x119)](_0x4ddc41(0x139))&&(_0x32cac7++,_0x105f0e[_0x4ddc41(0x11a)](_0x25befe));}}_0xb8eb2c();const _0x170d78=_0x162b0f[_0x4ddc41(0x12c)]('\x0a');return _0x170d78[_0x4ddc41(0x11f)]>0x0?_0x170d78:_0x4ddc41(0x143);}
|
package/filters/go.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function a0_0x2646(_0x68713b,_0x554f5a){const _0x159b5d=a0_0x159b();return a0_0x2646=function(_0x264695,_0x42daf3){_0x264695=_0x264695-0xe2;let _0x36e84e=_0x159b5d[_0x264695];return _0x36e84e;},a0_0x2646(_0x68713b,_0x554f5a);}const a0_0x3bfefe=a0_0x2646;(function(_0x3b9928,_0x6b8c82){const _0x4e5e44=a0_0x2646,_0x641185=_0x3b9928();while(!![]){try{const _0xd0d688=-parseInt(_0x4e5e44(0xe5))/0x1+parseInt(_0x4e5e44(0xee))/0x2+parseInt(_0x4e5e44(0x109))/0x3+-parseInt(_0x4e5e44(0xe7))/0x4*(parseInt(_0x4e5e44(0x10a))/0x5)+-parseInt(_0x4e5e44(0xf2))/0x6*(-parseInt(_0x4e5e44(0xec))/0x7)+-parseInt(_0x4e5e44(0xfc))/0x8+parseInt(_0x4e5e44(0xf7))/0x9;if(_0xd0d688===_0x6b8c82)break;else _0x641185['push'](_0x641185['shift']());}catch(_0x40e2c7){_0x641185['push'](_0x641185['shift']());}}}(a0_0x159b,0x2976d));function a0_0x159b(){const _0x281cc4=['Go\x20test:\x20','\x20failed,\x20','defineProperty','filterGoTest','join','220316VqWhvB','slice','885896MYHCYr','\x20skipped','push','length','no\x20test\x20files','7AcnTIs','\x20\x20...\x20+','361370XlfZRk','===\x20RUN','...\x20+','includes','4404Kycvxu','\x20more\x20issues','name','\x20passed','trim','4469157wUAKgt','__esModule','\x20\x20\x20\x20...\x20+','Go\x20test:\x20no\x20test\x20files','split','2060512vxLMeh','---\x20SKIP:','\x20more\x20failures','\x20more\x20lines','match','Go\x20vet:\x20','lines','\x20\x20\x20\x20','\x0aFailures:','Go\x20vet:\x20no\x20issues\x20found','Go\x20test:\x20all\x20tests\x20passed','\x20passed,\x20','startsWith','573597PVDvUw','5DYGCTw'];a0_0x159b=function(){return _0x281cc4;};return a0_0x159b();}Object[a0_0x3bfefe(0xe2)](exports,a0_0x3bfefe(0xf8),{'value':!![]}),exports[a0_0x3bfefe(0xe3)]=filterGoTest,exports['filterGoVet']=filterGoVet;function filterGoTest(_0x2fa42e){const _0x542b19=a0_0x3bfefe,_0x449a14=_0x2fa42e[_0x542b19(0xfb)]('\x0a');let _0x177d4f=0x0,_0x1219b6=0x0,_0x5b13f9=0x0;const _0x2e5e8b=[],_0x394c54=[];let _0x5493d2=null;for(const _0x16af95 of _0x449a14){const _0x23d94c=_0x16af95[_0x542b19(0xf6)](),_0x383378=_0x23d94c['match'](/^ok\s+\S+\s+[\d.]+s/);if(_0x383378){_0x394c54['push'](_0x23d94c);continue;}const _0x18c245=_0x23d94c['match'](/^FAIL\s+\S+/);if(_0x18c245){_0x394c54[_0x542b19(0xe9)](_0x23d94c);continue;}const _0xb2a63d=_0x23d94c['match'](/^--- PASS:/);if(_0xb2a63d){_0x177d4f++;continue;}const _0x3a5f79=_0x23d94c[_0x542b19(0x100)](/^--- FAIL:\s+(\S+)/);if(_0x3a5f79){if(_0x5493d2)_0x2e5e8b['push'](_0x5493d2);_0x5493d2={'name':_0x3a5f79[0x1],'lines':[]},_0x1219b6++;continue;}if(_0x23d94c['startsWith'](_0x542b19(0xfd))){_0x5b13f9++;continue;}_0x5493d2&&_0x23d94c[_0x542b19(0xea)]>0x0&&!_0x23d94c[_0x542b19(0x108)]('===\x20RUN')&&_0x5493d2[_0x542b19(0x102)][_0x542b19(0xe9)](_0x16af95),_0x23d94c[_0x542b19(0x108)](_0x542b19(0xef))&&(_0x5493d2&&(_0x2e5e8b[_0x542b19(0xe9)](_0x5493d2),_0x5493d2=null));}if(_0x5493d2)_0x2e5e8b[_0x542b19(0xe9)](_0x5493d2);if(_0x177d4f===0x0&&_0x1219b6===0x0&&_0x5b13f9===0x0){if(_0x2fa42e['includes']('PASS')&&!_0x2fa42e['includes']('FAIL'))return _0x542b19(0x106);if(_0x2fa42e[_0x542b19(0xf1)](_0x542b19(0xeb)))return _0x542b19(0xfa);return _0x2fa42e;}if(_0x1219b6===0x0){const _0x1bc852=[_0x542b19(0x10b)+_0x177d4f+_0x542b19(0xf5)];if(_0x5b13f9>0x0)_0x1bc852[_0x542b19(0xe9)](_0x5b13f9+_0x542b19(0xe8));return _0x1bc852[_0x542b19(0xe4)](',\x20');}const _0x46923c=[_0x542b19(0x10b)+_0x177d4f+_0x542b19(0x107)+_0x1219b6+_0x542b19(0x10c)+_0x5b13f9+_0x542b19(0xe8)];if(_0x2e5e8b[_0x542b19(0xea)]>0x0){_0x46923c['push'](_0x542b19(0x104));const _0xa87b93=0x3;for(let _0x2a8b85=0x0;_0x2a8b85<Math['min'](_0x2e5e8b[_0x542b19(0xea)],_0xa87b93);_0x2a8b85++){const _0x5441e3=_0x2e5e8b[_0x2a8b85];_0x46923c[_0x542b19(0xe9)]('\x20\x20'+(_0x2a8b85+0x1)+'.\x20'+_0x5441e3[_0x542b19(0xf4)]);for(const _0xc9ead2 of _0x5441e3[_0x542b19(0x102)][_0x542b19(0xe6)](0x0,0x5)){_0x46923c[_0x542b19(0xe9)](_0x542b19(0x103)+_0xc9ead2['trim']());}_0x5441e3['lines'][_0x542b19(0xea)]>0x5&&_0x46923c[_0x542b19(0xe9)](_0x542b19(0xf9)+(_0x5441e3[_0x542b19(0x102)][_0x542b19(0xea)]-0x5)+_0x542b19(0xff));}_0x2e5e8b['length']>_0xa87b93&&_0x46923c['push'](_0x542b19(0xed)+(_0x2e5e8b[_0x542b19(0xea)]-_0xa87b93)+_0x542b19(0xfe));}return _0x46923c['join']('\x0a');}function filterGoVet(_0x518d69){const _0x5ce529=a0_0x3bfefe,_0x1d5d5d=_0x518d69[_0x5ce529(0xfb)]('\x0a')['filter'](_0x1359fd=>_0x1359fd['trim']()[_0x5ce529(0xea)]>0x0);if(_0x1d5d5d[_0x5ce529(0xea)]===0x0)return _0x5ce529(0x105);if(_0x1d5d5d[_0x5ce529(0xea)]<=0x14)return _0x518d69[_0x5ce529(0xf6)]();const _0x39f364=[_0x5ce529(0x101)+_0x1d5d5d[_0x5ce529(0xea)]+'\x20issues\x20found'];return _0x39f364['push'](..._0x1d5d5d[_0x5ce529(0xe6)](0x0,0xa)),_0x1d5d5d[_0x5ce529(0xea)]>0xa&&_0x39f364['push'](_0x5ce529(0xf0)+(_0x1d5d5d[_0x5ce529(0xea)]-0xa)+_0x5ce529(0xf3)),_0x39f364['join']('\x0a');}
|
package/filters/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x1a8d2d=a0_0x552f;(function(_0x5e0343,_0x4d325c){const _0x175db1=a0_0x552f,_0x1708ac=_0x5e0343();while(!![]){try{const _0x2dbc9f=-parseInt(_0x175db1(0xe5))/0x1*(-parseInt(_0x175db1(0xfd))/0x2)+parseInt(_0x175db1(0xd4))/0x3*(-parseInt(_0x175db1(0xfc))/0x4)+parseInt(_0x175db1(0x102))/0x5+parseInt(_0x175db1(0xf9))/0x6+parseInt(_0x175db1(0xe7))/0x7*(-parseInt(_0x175db1(0x109))/0x8)+-parseInt(_0x175db1(0x104))/0x9*(-parseInt(_0x175db1(0xf7))/0xa)+-parseInt(_0x175db1(0xb0))/0xb;if(_0x2dbc9f===_0x4d325c)break;else _0x1708ac['push'](_0x1708ac['shift']());}catch(_0x3c7c25){_0x1708ac['push'](_0x1708ac['shift']());}}}(a0_0x4cec,0xa19da));Object[a0_0x1a8d2d(0xd6)](exports,a0_0x1a8d2d(0x11a),{'value':!![]}),exports[a0_0x1a8d2d(0xf8)]=exports[a0_0x1a8d2d(0xe8)]=void 0x0,exports['compressOutput']=compressOutput,exports[a0_0x1a8d2d(0xdd)]=rewriteCommand;const generic_1=require('./generic'),git_1=require('./git'),python_1=require(a0_0x1a8d2d(0xd7)),js_1=require(a0_0x1a8d2d(0xe9)),shell_1=require('./shell'),rust_1=require(a0_0x1a8d2d(0xd3)),go_1=require(a0_0x1a8d2d(0xbc)),devops_1=require(a0_0x1a8d2d(0xeb)),redactor_1=require('../redactor'),tracker_1=require('../tracker');exports[a0_0x1a8d2d(0xe8)]={'secretsFound':0x0,'secretTypes':[]},exports[a0_0x1a8d2d(0xf8)]=[];function a0_0x4cec(){const _0x466b16=['trim\x20cargo','23476794CKauoZ','\x20tree\x20','filterTree','\x20tree','trim\x20kubectl','filterNpmInstall','cargo\x20build','match','yadm\x20log','trim\x20grep','secretsFound','tracker','./go','[minified\x20file]','filterJestVitest','filterDockerPs','jest','push','text','filterPipInstall','git\x20show','trim\x20glab','secretTypes','filterDockerLogs','trim','npm\x20run\x20test','trim\x20ls','some','trim\x20git','startsWith','go\x20vet','---','trim\x20gh','pattern','toLowerCase','./rust','222bIDshD','cargo\x20clippy','defineProperty','./python','filterGoVet','ansi_strip','npm\x20i\x20','trim\x20docker','pnpm\x20install','rewriteCommand','endsWith','trim\x20npx','ruff\x20check','filterRuff','filterGitDiff','filterKubectl','getConfig','12114WuBctG','\x20ls','539LaTHfW','lastRedactAudit','./js','filter','./devops','yarn\x20test','collapseWhitespace','filterDockerImages','pip3\x20install','yadm\x20diff','softTruncate','includes','[code\x20skeleton]','ruff\x20','npm\x20i','npm\x20test','1746790cVNLNP','lastFeatures','7472892JhmAiy','trim\x20pytest','trim\x20pip','38860LjDxbZ','158ixMFKU','filterGitStatus','[lock\x20file]','filterPytest','get','5106510ACxMhN','whitespace','45wNfGfm','binary','filterFind','\x20ls\x20','redactWithAudit','60472CPQfUd','collapseDuplicates','test','trim\x20go','kubectl','filterGrep','git\x20log','redact','filterCat','skeleton','features_enabled','json_crusher','trim\x20','yadm\x20status','length','lines\x20truncated','cargo\x20test','__esModule'];a0_0x4cec=function(){return _0x466b16;};return a0_0x4cec();}function isFeatureEnabled(_0x93c8bd){const _0x15e11a=a0_0x1a8d2d;try{const _0x5050e0=tracker_1[_0x15e11a(0xbb)][_0x15e11a(0xe4)](),_0x5e6dfe=_0x5050e0[_0x15e11a(0x113)];if(!_0x5e6dfe||_0x5e6dfe[_0x93c8bd]===undefined)return!![];return _0x5e6dfe[_0x93c8bd]!==![];}catch{return!![];}}function a0_0x552f(_0x2036f8,_0x2f3cbc){_0x2036f8=_0x2036f8-0xaf;const _0x4cecc4=a0_0x4cec();let _0x552f4b=_0x4cecc4[_0x2036f8];return _0x552f4b;}function compressOutput(_0x437124,_0x1e3714,_0x49e54d,_0x1aa897=!![]){const _0xe8a016=a0_0x1a8d2d,_0x3c67f1=_0x437124['trim']();let _0x1fafc3=_0x1e3714;_0x49e54d[_0xe8a016(0xc8)]()[_0xe8a016(0x117)]>0x0&&(_0x1fafc3=_0x1e3714+'\x0a'+_0x49e54d);let _0xce41cd=isFeatureEnabled(_0xe8a016(0xd9))?(0x0,generic_1['stripAnsi'])(_0x1fafc3):_0x1fafc3;const _0x21a06c=[];if(_0xce41cd['length']<_0x1fafc3['length'])_0x21a06c[_0xe8a016(0xc1)](_0xe8a016(0xd9));const _0x16b3d6=(_0x181282,_0x5dade6)=>{const _0x4d45ab=_0xe8a016;return _0x21a06c[_0x4d45ab(0xc1)](_0x181282),exports[_0x4d45ab(0xf8)]=_0x21a06c,_0x5dade6;};if(_0x1aa897&&isFeatureEnabled(_0xe8a016(0x110))){const _0x300300=redactor_1['redactor'][_0xe8a016(0x108)](_0xce41cd);_0xce41cd=_0x300300[_0xe8a016(0xc2)],exports['lastRedactAudit']={'secretsFound':_0x300300[_0xe8a016(0xba)],'secretTypes':_0x300300[_0xe8a016(0xc6)]};if(_0x300300[_0xe8a016(0xba)]>0x0)_0x21a06c[_0xe8a016(0xc1)](_0xe8a016(0x110));}else exports[_0xe8a016(0xe8)]={'secretsFound':0x0,'secretTypes':[]};const _0x53caef=_0x3c67f1[_0xe8a016(0xd2)](),_0x4fc495=isFeatureEnabled('filter');try{if(_0x4fc495){if(_0x53caef['includes']('git\x20status')||_0x53caef[_0xe8a016(0xf2)](_0xe8a016(0x116)))return _0x16b3d6(_0xe8a016(0xea),(0x0,git_1[_0xe8a016(0xfe)])(_0xce41cd));if(_0x53caef[_0xe8a016(0xf2)](_0xe8a016(0x10f))||_0x53caef[_0xe8a016(0xf2)](_0xe8a016(0xb8)))return _0x16b3d6(_0xe8a016(0xea),(0x0,git_1['filterGitLog'])(_0xce41cd));if(_0x53caef[_0xe8a016(0xf2)]('git\x20diff')||_0x53caef[_0xe8a016(0xf2)](_0xe8a016(0xc4))||_0x53caef[_0xe8a016(0xf2)](_0xe8a016(0xf0)))return _0x16b3d6('filter',(0x0,git_1[_0xe8a016(0xe2)])(_0xce41cd));if(_0x53caef['includes']('pytest')||_0x53caef[_0xe8a016(0xb7)](/python3?\s+-m\s+pytest/))return _0x16b3d6(_0xe8a016(0xea),(0x0,python_1[_0xe8a016(0x100)])(_0xce41cd));if(_0x53caef[_0xe8a016(0xf2)]('pip\x20install')||_0x53caef[_0xe8a016(0xf2)](_0xe8a016(0xef)))return _0x16b3d6('filter',(0x0,python_1[_0xe8a016(0xc3)])(_0xce41cd));if(_0x53caef[_0xe8a016(0xf2)](_0xe8a016(0xe0))||_0x53caef[_0xe8a016(0xf2)](_0xe8a016(0xf4)))return _0x16b3d6('filter',(0x0,devops_1[_0xe8a016(0xe1)])(_0xce41cd));if(_0x53caef[_0xe8a016(0xf2)]('npm\x20install')||_0x53caef[_0xe8a016(0xf2)](_0xe8a016(0xda))||_0x53caef[_0xe8a016(0xde)](_0xe8a016(0xf5))||_0x53caef['includes'](_0xe8a016(0xdc))||_0x53caef['includes']('yarn\x20install'))return _0x16b3d6(_0xe8a016(0xea),(0x0,js_1[_0xe8a016(0xb5)])(_0xce41cd));if(_0x53caef['includes'](_0xe8a016(0xc0))||_0x53caef[_0xe8a016(0xf2)]('vitest'))return _0x16b3d6(_0xe8a016(0xea),(0x0,js_1[_0xe8a016(0xbe)])(_0xce41cd));if(_0x53caef[_0xe8a016(0xf2)](_0xe8a016(0xf6))||_0x53caef[_0xe8a016(0xf2)]('pnpm\x20test')||_0x53caef[_0xe8a016(0xf2)](_0xe8a016(0xec))||_0x53caef[_0xe8a016(0xf2)](_0xe8a016(0xc9)))return _0x16b3d6('filter',(0x0,js_1[_0xe8a016(0xbe)])(_0xce41cd));if(_0x53caef[_0xe8a016(0xf2)](_0xe8a016(0x119)))return _0x16b3d6('filter',(0x0,rust_1['filterCargoTest'])(_0xce41cd));if(_0x53caef['includes'](_0xe8a016(0xb6))||_0x53caef[_0xe8a016(0xf2)]('cargo\x20check')||_0x53caef[_0xe8a016(0xf2)](_0xe8a016(0xd5)))return _0x16b3d6(_0xe8a016(0xea),(0x0,rust_1['filterCargoBuild'])(_0xce41cd));if(_0x53caef['includes']('go\x20test'))return _0x16b3d6(_0xe8a016(0xea),(0x0,go_1['filterGoTest'])(_0xce41cd));if(_0x53caef[_0xe8a016(0xf2)](_0xe8a016(0xce)))return _0x16b3d6(_0xe8a016(0xea),(0x0,go_1[_0xe8a016(0xd8)])(_0xce41cd));if(_0x53caef[_0xe8a016(0xb7)](/docker\s+ps/))return _0x16b3d6('filter',(0x0,devops_1[_0xe8a016(0xbf)])(_0xce41cd));if(_0x53caef[_0xe8a016(0xb7)](/docker\s+images/))return _0x16b3d6(_0xe8a016(0xea),(0x0,devops_1[_0xe8a016(0xee)])(_0xce41cd));if(_0x53caef[_0xe8a016(0xb7)](/docker\s+logs/))return _0x16b3d6(_0xe8a016(0xea),(0x0,devops_1[_0xe8a016(0xc7)])(_0xce41cd));if(_0x53caef[_0xe8a016(0xf2)](_0xe8a016(0x10d))){const _0x3c103=_0x53caef[_0xe8a016(0xb7)](/kubectl\s+(get|logs|describe|apply)/),_0x484187=_0x3c103?_0x3c103[0x1]:_0xe8a016(0x101);return _0x16b3d6('filter',(0x0,devops_1[_0xe8a016(0xe3)])(_0xce41cd,_0x484187));}if(_0x53caef[_0xe8a016(0xb7)](/^(ls|dir)(\s|$)/)||_0x53caef[_0xe8a016(0xf2)](_0xe8a016(0x107))||_0x53caef[_0xe8a016(0xde)](_0xe8a016(0xe6)))return _0x16b3d6(_0xe8a016(0xea),(0x0,shell_1['filterLs'])(_0xce41cd));if(_0x53caef['match'](/^tree(\s|$)/)||_0x53caef[_0xe8a016(0xf2)](_0xe8a016(0xb1))||_0x53caef[_0xe8a016(0xde)](_0xe8a016(0xb3)))return _0x16b3d6(_0xe8a016(0xea),(0x0,shell_1[_0xe8a016(0xb2)])(_0xce41cd));if(_0x53caef['match'](/^(cat|head|tail|read|bat)(\s|$)/)){const _0x2da928=(0x0,shell_1[_0xe8a016(0x111)])(_0xce41cd,_0x3c67f1);if(_0x2da928['includes'](_0xe8a016(0xff)))_0x21a06c['push']('lock');else{if(_0x2da928['includes']('[binary')||_0x2da928[_0xe8a016(0xf2)](_0xe8a016(0xbd)))_0x21a06c['push'](_0xe8a016(0x105));else{if(_0x2da928['includes'](_0xe8a016(0xf3)))_0x21a06c[_0xe8a016(0xc1)](_0xe8a016(0x112));else{if(_0x2da928['includes']('|\x20')&&_0x2da928[_0xe8a016(0xf2)](_0xe8a016(0xcf))&&_0x2da928[_0xe8a016(0x117)]<_0xce41cd[_0xe8a016(0x117)]*0.5)_0x21a06c[_0xe8a016(0xc1)](_0xe8a016(0x114));else{if(_0x2da928[_0xe8a016(0xf2)](_0xe8a016(0x118)))_0x21a06c['push'](_0xe8a016(0xea));}}}}if(_0x2da928[_0xe8a016(0x117)]<_0xce41cd[_0xe8a016(0x117)]&&!_0x21a06c[_0xe8a016(0xcb)](_0xfa0fe4=>_0xfa0fe4!==_0xe8a016(0xd9)&&_0xfa0fe4!=='redact'))_0x21a06c[_0xe8a016(0xc1)](_0xe8a016(0xea));return exports[_0xe8a016(0xf8)]=_0x21a06c,_0x2da928;}if(_0x53caef[_0xe8a016(0xb7)](/^find(\s|$)/))return _0x16b3d6(_0xe8a016(0xea),(0x0,shell_1[_0xe8a016(0x106)])(_0xce41cd));if(_0x53caef['match'](/^(grep|rg|ripgrep)(\s|$)/))return _0x16b3d6(_0xe8a016(0xea),(0x0,shell_1[_0xe8a016(0x10e)])(_0xce41cd));}}catch(_0x4eb51b){}return isFeatureEnabled('whitespace')&&(_0xce41cd=(0x0,generic_1[_0xe8a016(0xed)])(_0xce41cd),_0x21a06c[_0xe8a016(0xc1)](_0xe8a016(0x103))),_0xce41cd=(0x0,generic_1[_0xe8a016(0x10a)])(_0xce41cd),_0xce41cd=(0x0,generic_1[_0xe8a016(0xf1)])(_0xce41cd,0x4e20),exports['lastFeatures']=_0x21a06c,_0xce41cd;}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_0x1a8d2d(0xcc)},{'pattern':/^gh\s+(pr|issue|run|repo|api|release)/,'prefix':a0_0x1a8d2d(0xd0)},{'pattern':/^glab\s+(mr|issue|ci|pipeline|api|release)/,'prefix':a0_0x1a8d2d(0xc5)},{'pattern':/^cargo\s+(build|test|clippy|check|fmt|install)/,'prefix':a0_0x1a8d2d(0xaf)},{'pattern':/^pnpm\s+(exec|i|install|list|ls|outdated|run|run-script)/,'prefix':'trim\x20pnpm'},{'pattern':/^npm\s+(exec|run|run-script|rum|urn|x|test)(\s|$)/,'prefix':'trim\x20npm'},{'pattern':/^npx\s+/,'prefix':a0_0x1a8d2d(0xdf)},{'pattern':/^(cat|head|tail)\s+/,'prefix':'trim\x20read'},{'pattern':/^(rg|grep)\s+/,'prefix':a0_0x1a8d2d(0xb9)},{'pattern':/^ls(\s|$)/,'prefix':a0_0x1a8d2d(0xca)},{'pattern':/^tree(\s|$)/,'prefix':'trim\x20tree'},{'pattern':/^find\s+/,'prefix':'trim\x20find'},{'pattern':/^docker\s+(ps|images|logs|run|exec|build|compose)/,'prefix':a0_0x1a8d2d(0xdb)},{'pattern':/^kubectl\s+(get|logs|describe|apply)/,'prefix':a0_0x1a8d2d(0xb4)},{'pattern':/^(python3?\s+-m\s+)?pytest(\s|$)/,'prefix':a0_0x1a8d2d(0xfa)},{'pattern':/^ruff\s+(check|format)/,'prefix':'trim\x20ruff'},{'pattern':/^(pip3?|uv\s+pip)\s+(list|outdated|install|show)/,'prefix':a0_0x1a8d2d(0xfb)},{'pattern':/^go\s+(test|build|vet)/,'prefix':a0_0x1a8d2d(0x10c)}];function rewriteCommand(_0x3fd896){const _0x3f1dc6=a0_0x1a8d2d,_0x3e327b=_0x3fd896[_0x3f1dc6(0xc8)]();if(_0x3e327b[_0x3f1dc6(0xcd)](_0x3f1dc6(0x115)))return _0x3e327b;for(const _0x445cac of REWRITE_RULES){if(_0x445cac[_0x3f1dc6(0xd1)][_0x3f1dc6(0x10b)](_0x3e327b))return _0x3f1dc6(0x115)+_0x3e327b;}return _0x3e327b;}
|
|
1
|
+
'use strict';const a0_0x3eadba=a0_0x4902;(function(_0x19a74a,_0x81aa25){const _0xf2d565=a0_0x4902,_0x57da0b=_0x19a74a();while(!![]){try{const _0x3d92cc=-parseInt(_0xf2d565(0x145))/0x1*(parseInt(_0xf2d565(0x130))/0x2)+parseInt(_0xf2d565(0x124))/0x3+parseInt(_0xf2d565(0x166))/0x4+parseInt(_0xf2d565(0x152))/0x5*(-parseInt(_0xf2d565(0x111))/0x6)+parseInt(_0xf2d565(0x12e))/0x7+parseInt(_0xf2d565(0x149))/0x8*(-parseInt(_0xf2d565(0x143))/0x9)+parseInt(_0xf2d565(0x148))/0xa;if(_0x3d92cc===_0x81aa25)break;else _0x57da0b['push'](_0x57da0b['shift']());}catch(_0x24a06e){_0x57da0b['push'](_0x57da0b['shift']());}}}(a0_0x25f0,0x7f517));function a0_0x4902(_0x5d1700,_0x448028){const _0x25f0ff=a0_0x25f0();return a0_0x4902=function(_0x490292,_0x4edd82){_0x490292=_0x490292-0xf7;let _0x1af4d1=_0x25f0ff[_0x490292];return _0x1af4d1;},a0_0x4902(_0x5d1700,_0x448028);}Object[a0_0x3eadba(0x14d)](exports,'__esModule',{'value':!![]}),exports[a0_0x3eadba(0x11f)]=exports[a0_0x3eadba(0x138)]=void 0x0,exports[a0_0x3eadba(0x121)]=compressOutput,exports[a0_0x3eadba(0x112)]=rewriteCommand;const generic_1=require(a0_0x3eadba(0x113)),git_1=require(a0_0x3eadba(0x132)),python_1=require(a0_0x3eadba(0x147)),js_1=require(a0_0x3eadba(0x155)),shell_1=require(a0_0x3eadba(0x11d)),rust_1=require(a0_0x3eadba(0x104)),go_1=require(a0_0x3eadba(0x101)),devops_1=require(a0_0x3eadba(0x14c)),redactor_1=require(a0_0x3eadba(0x129)),tracker_1=require(a0_0x3eadba(0xfb));exports[a0_0x3eadba(0x138)]={'secretsFound':0x0,'secretTypes':[]},exports[a0_0x3eadba(0x11f)]=[];function a0_0x25f0(){const _0x37ab5c=['pip3\x20install','./shell','npm\x20install','lastFeatures','pip\x20install','compressOutput','trim\x20ls','npm\x20i','202227ObpzUy','test','features_enabled','collapseWhitespace','\x20ls\x20','../redactor','git\x20log','filter','git\x20show','trim\x20kubectl','105007xzsjhX','yadm\x20log','36172QGiGsC','trim\x20tree','./git','match','\x20ls','pnpm\x20install','length','trim\x20pytest','lastRedactAudit','trim\x20read','some','trim\x20npx','secretsFound','trim\x20glab','filterDockerImages','startsWith','skeleton','jest','cargo\x20build','261hHrZpD','filterKubectl','3wnXQpW','---','./python','2833300zcbdCu','95216lGpmka','yadm\x20diff','lines\x20truncated','./devops','defineProperty','npm\x20test','go\x20vet','git\x20status','filterPipInstall','10EOwDoc','trim\x20','ruff\x20check','./js','redactor','yarn\x20test','get','filterDockerLogs','endsWith','collapseDuplicates','[binary','filterCat','filterGrep','npm\x20run\x20test','npm\x20i\x20','filterCargoBuild','filterDockerPs','softTruncate','vitest','redactWithAudit','2611244WOcKCZ','stripAnsi','go\x20test','trim\x20pip','trim\x20gh','trim\x20cargo','../tracker','ansi_strip','trim','trim\x20pnpm','secretTypes','trim\x20npm','./go','cargo\x20test','filterNpmInstall','./rust','filterPytest','push','pattern','cargo\x20clippy','trim\x20ruff','binary','text','filterCargoTest','includes','\x20tree\x20','yarn\x20install','tracker','292920aiLwcP','rewriteCommand','./generic','[lock\x20file]','filterGoTest','trim\x20git','cargo\x20check','redact','filterJestVitest','kubectl','whitespace'];a0_0x25f0=function(){return _0x37ab5c;};return a0_0x25f0();}function isFeatureEnabled(_0x3467bc){const _0xfbb37a=a0_0x3eadba;try{const _0x17d81f=tracker_1[_0xfbb37a(0x110)]['getConfig'](),_0x25137b=_0x17d81f[_0xfbb37a(0x126)];if(!_0x25137b||_0x25137b[_0x3467bc]===undefined)return!![];return _0x25137b[_0x3467bc]!==![];}catch{return!![];}}function compressOutput(_0x42d206,_0x57e310,_0xcf6bce,_0xa147fc=!![]){const _0x2dd564=a0_0x3eadba,_0x49c7bc=_0x42d206[_0x2dd564(0xfd)]();let _0x36a2b0=_0x57e310;_0xcf6bce['trim']()[_0x2dd564(0x136)]>0x0&&(_0x36a2b0=_0x57e310+'\x0a'+_0xcf6bce);let _0x37cd70=isFeatureEnabled(_0x2dd564(0xfc))?(0x0,generic_1[_0x2dd564(0x167)])(_0x36a2b0):_0x36a2b0;const _0x3dae7b=[];if(_0x37cd70['length']<_0x36a2b0[_0x2dd564(0x136)])_0x3dae7b[_0x2dd564(0x106)](_0x2dd564(0xfc));const _0x499319=(_0x5103cf,_0x19f202)=>{const _0x521564=_0x2dd564;return _0x3dae7b[_0x521564(0x106)](_0x5103cf),exports[_0x521564(0x11f)]=_0x3dae7b,_0x19f202;};if(_0xa147fc&&isFeatureEnabled(_0x2dd564(0x118))){const _0x369860=redactor_1[_0x2dd564(0x156)][_0x2dd564(0x165)](_0x37cd70);_0x37cd70=_0x369860[_0x2dd564(0x10b)],exports[_0x2dd564(0x138)]={'secretsFound':_0x369860[_0x2dd564(0x13c)],'secretTypes':_0x369860[_0x2dd564(0xff)]};if(_0x369860[_0x2dd564(0x13c)]>0x0)_0x3dae7b[_0x2dd564(0x106)](_0x2dd564(0x118));}else exports['lastRedactAudit']={'secretsFound':0x0,'secretTypes':[]};const _0x37f4e4=_0x49c7bc['toLowerCase'](),_0x3ecb92=isFeatureEnabled(_0x2dd564(0x12b));try{if(_0x3ecb92){if(_0x37f4e4['includes'](_0x2dd564(0x150))||_0x37f4e4[_0x2dd564(0x10d)]('yadm\x20status'))return _0x499319(_0x2dd564(0x12b),(0x0,git_1['filterGitStatus'])(_0x37cd70));if(_0x37f4e4[_0x2dd564(0x10d)](_0x2dd564(0x12a))||_0x37f4e4[_0x2dd564(0x10d)](_0x2dd564(0x12f)))return _0x499319(_0x2dd564(0x12b),(0x0,git_1['filterGitLog'])(_0x37cd70));if(_0x37f4e4['includes']('git\x20diff')||_0x37f4e4['includes'](_0x2dd564(0x12c))||_0x37f4e4[_0x2dd564(0x10d)](_0x2dd564(0x14a)))return _0x499319(_0x2dd564(0x12b),(0x0,git_1['filterGitDiff'])(_0x37cd70));if(_0x37f4e4['includes']('pytest')||_0x37f4e4[_0x2dd564(0x133)](/python3?\s+-m\s+pytest/))return _0x499319(_0x2dd564(0x12b),(0x0,python_1[_0x2dd564(0x105)])(_0x37cd70));if(_0x37f4e4[_0x2dd564(0x10d)](_0x2dd564(0x120))||_0x37f4e4[_0x2dd564(0x10d)](_0x2dd564(0x11c)))return _0x499319(_0x2dd564(0x12b),(0x0,python_1[_0x2dd564(0x151)])(_0x37cd70));if(_0x37f4e4[_0x2dd564(0x10d)](_0x2dd564(0x154))||_0x37f4e4['includes']('ruff\x20'))return _0x499319(_0x2dd564(0x12b),(0x0,devops_1['filterRuff'])(_0x37cd70));if(_0x37f4e4[_0x2dd564(0x10d)](_0x2dd564(0x11e))||_0x37f4e4[_0x2dd564(0x10d)](_0x2dd564(0x160))||_0x37f4e4[_0x2dd564(0x15a)](_0x2dd564(0x123))||_0x37f4e4[_0x2dd564(0x10d)](_0x2dd564(0x135))||_0x37f4e4[_0x2dd564(0x10d)](_0x2dd564(0x10f)))return _0x499319(_0x2dd564(0x12b),(0x0,js_1[_0x2dd564(0x103)])(_0x37cd70));if(_0x37f4e4[_0x2dd564(0x10d)](_0x2dd564(0x141))||_0x37f4e4['includes'](_0x2dd564(0x164)))return _0x499319(_0x2dd564(0x12b),(0x0,js_1[_0x2dd564(0x119)])(_0x37cd70));if(_0x37f4e4['includes'](_0x2dd564(0x14e))||_0x37f4e4[_0x2dd564(0x10d)]('pnpm\x20test')||_0x37f4e4['includes'](_0x2dd564(0x157))||_0x37f4e4[_0x2dd564(0x10d)](_0x2dd564(0x15f)))return _0x499319(_0x2dd564(0x12b),(0x0,js_1[_0x2dd564(0x119)])(_0x37cd70));if(_0x37f4e4[_0x2dd564(0x10d)](_0x2dd564(0x102)))return _0x499319('filter',(0x0,rust_1[_0x2dd564(0x10c)])(_0x37cd70));if(_0x37f4e4[_0x2dd564(0x10d)](_0x2dd564(0x142))||_0x37f4e4[_0x2dd564(0x10d)](_0x2dd564(0x117))||_0x37f4e4[_0x2dd564(0x10d)](_0x2dd564(0x108)))return _0x499319('filter',(0x0,rust_1[_0x2dd564(0x161)])(_0x37cd70));if(_0x37f4e4['includes'](_0x2dd564(0xf7)))return _0x499319(_0x2dd564(0x12b),(0x0,go_1[_0x2dd564(0x115)])(_0x37cd70));if(_0x37f4e4[_0x2dd564(0x10d)](_0x2dd564(0x14f)))return _0x499319(_0x2dd564(0x12b),(0x0,go_1['filterGoVet'])(_0x37cd70));if(_0x37f4e4['match'](/docker\s+ps/))return _0x499319(_0x2dd564(0x12b),(0x0,devops_1[_0x2dd564(0x162)])(_0x37cd70));if(_0x37f4e4[_0x2dd564(0x133)](/docker\s+images/))return _0x499319('filter',(0x0,devops_1[_0x2dd564(0x13e)])(_0x37cd70));if(_0x37f4e4[_0x2dd564(0x133)](/docker\s+logs/))return _0x499319(_0x2dd564(0x12b),(0x0,devops_1[_0x2dd564(0x159)])(_0x37cd70));if(_0x37f4e4[_0x2dd564(0x10d)](_0x2dd564(0x11a))){const _0x4f69cc=_0x37f4e4['match'](/kubectl\s+(get|logs|describe|apply)/),_0x150cab=_0x4f69cc?_0x4f69cc[0x1]:_0x2dd564(0x158);return _0x499319(_0x2dd564(0x12b),(0x0,devops_1[_0x2dd564(0x144)])(_0x37cd70,_0x150cab));}if(_0x37f4e4['match'](/^(ls|dir)(\s|$)/)||_0x37f4e4[_0x2dd564(0x10d)](_0x2dd564(0x128))||_0x37f4e4['endsWith'](_0x2dd564(0x134)))return _0x499319(_0x2dd564(0x12b),(0x0,shell_1['filterLs'])(_0x37cd70));if(_0x37f4e4[_0x2dd564(0x133)](/^tree(\s|$)/)||_0x37f4e4[_0x2dd564(0x10d)](_0x2dd564(0x10e))||_0x37f4e4[_0x2dd564(0x15a)]('\x20tree'))return _0x499319(_0x2dd564(0x12b),(0x0,shell_1['filterTree'])(_0x37cd70));if(_0x37f4e4[_0x2dd564(0x133)](/^(cat|head|tail|read|bat)(\s|$)/)){const _0x4fdf29=(0x0,shell_1[_0x2dd564(0x15d)])(_0x37cd70,_0x49c7bc);if(_0x4fdf29[_0x2dd564(0x10d)](_0x2dd564(0x114)))_0x3dae7b[_0x2dd564(0x106)]('lock');else{if(_0x4fdf29['includes'](_0x2dd564(0x15c))||_0x4fdf29['includes']('[minified\x20file]'))_0x3dae7b['push'](_0x2dd564(0x10a));else{if(_0x4fdf29['includes']('[code\x20skeleton]'))_0x3dae7b[_0x2dd564(0x106)](_0x2dd564(0x140));else{if(_0x4fdf29[_0x2dd564(0x10d)]('|\x20')&&_0x4fdf29[_0x2dd564(0x10d)](_0x2dd564(0x146))&&_0x4fdf29[_0x2dd564(0x136)]<_0x37cd70[_0x2dd564(0x136)]*0.5)_0x3dae7b[_0x2dd564(0x106)]('json_crusher');else{if(_0x4fdf29[_0x2dd564(0x10d)](_0x2dd564(0x14b)))_0x3dae7b[_0x2dd564(0x106)](_0x2dd564(0x12b));}}}}if(_0x4fdf29[_0x2dd564(0x136)]<_0x37cd70[_0x2dd564(0x136)]&&!_0x3dae7b[_0x2dd564(0x13a)](_0x45735b=>_0x45735b!==_0x2dd564(0xfc)&&_0x45735b!==_0x2dd564(0x118)))_0x3dae7b[_0x2dd564(0x106)](_0x2dd564(0x12b));return exports[_0x2dd564(0x11f)]=_0x3dae7b,_0x4fdf29;}if(_0x37f4e4[_0x2dd564(0x133)](/^find(\s|$)/))return _0x499319('filter',(0x0,shell_1['filterFind'])(_0x37cd70));if(_0x37f4e4['match'](/^(grep|rg|ripgrep)(\s|$)/))return _0x499319('filter',(0x0,shell_1[_0x2dd564(0x15e)])(_0x37cd70));}}catch(_0x3de84f){}return isFeatureEnabled(_0x2dd564(0x11b))&&(_0x37cd70=(0x0,generic_1[_0x2dd564(0x127)])(_0x37cd70),_0x3dae7b[_0x2dd564(0x106)](_0x2dd564(0x11b))),_0x37cd70=(0x0,generic_1[_0x2dd564(0x15b)])(_0x37cd70),_0x37cd70=(0x0,generic_1[_0x2dd564(0x163)])(_0x37cd70,0x4e20),exports['lastFeatures']=_0x3dae7b,_0x37cd70;}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_0x3eadba(0x116)},{'pattern':/^gh\s+(pr|issue|run|repo|api|release)/,'prefix':a0_0x3eadba(0xf9)},{'pattern':/^glab\s+(mr|issue|ci|pipeline|api|release)/,'prefix':a0_0x3eadba(0x13d)},{'pattern':/^cargo\s+(build|test|clippy|check|fmt|install)/,'prefix':a0_0x3eadba(0xfa)},{'pattern':/^pnpm\s+(exec|i|install|list|ls|outdated|run|run-script)/,'prefix':a0_0x3eadba(0xfe)},{'pattern':/^npm\s+(exec|run|run-script|rum|urn|x|test)(\s|$)/,'prefix':a0_0x3eadba(0x100)},{'pattern':/^npx\s+/,'prefix':a0_0x3eadba(0x13b)},{'pattern':/^(cat|head|tail)\s+/,'prefix':a0_0x3eadba(0x139)},{'pattern':/^(rg|grep)\s+/,'prefix':'trim\x20grep'},{'pattern':/^ls(\s|$)/,'prefix':a0_0x3eadba(0x122)},{'pattern':/^tree(\s|$)/,'prefix':a0_0x3eadba(0x131)},{'pattern':/^find\s+/,'prefix':'trim\x20find'},{'pattern':/^docker\s+(ps|images|logs|run|exec|build|compose)/,'prefix':'trim\x20docker'},{'pattern':/^kubectl\s+(get|logs|describe|apply)/,'prefix':a0_0x3eadba(0x12d)},{'pattern':/^(python3?\s+-m\s+)?pytest(\s|$)/,'prefix':a0_0x3eadba(0x137)},{'pattern':/^ruff\s+(check|format)/,'prefix':a0_0x3eadba(0x109)},{'pattern':/^(pip3?|uv\s+pip)\s+(list|outdated|install|show)/,'prefix':a0_0x3eadba(0xf8)},{'pattern':/^go\s+(test|build|vet)/,'prefix':'trim\x20go'}];function rewriteCommand(_0x41b41a){const _0x4a0377=a0_0x3eadba,_0x6f3f0b=_0x41b41a[_0x4a0377(0xfd)]();if(_0x6f3f0b[_0x4a0377(0x13f)](_0x4a0377(0x153)))return _0x6f3f0b;for(const _0xab9f5d of REWRITE_RULES){if(_0xab9f5d[_0x4a0377(0x107)][_0x4a0377(0x125)](_0x6f3f0b))return'trim\x20'+_0x6f3f0b;}return _0x6f3f0b;}
|
package/filters/js.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const a0_0x4c3895=a0_0x163a;(function(_0x46d951,_0x1ac055){const _0x476047=a0_0x163a,_0x1e6498=_0x46d951();while(!![]){try{const _0x274e02=-parseInt(_0x476047(0x1b4))/0x1+-parseInt(_0x476047(0x1a7))/0x2+-parseInt(_0x476047(0x1a8))/0x3*(-parseInt(_0x476047(0x199))/0x4)+-parseInt(_0x476047(0x1b6))/0x5*(parseInt(_0x476047(0x1a1))/0x6)+-parseInt(_0x476047(0x1b2))/0x7+parseInt(_0x476047(0x1aa))/0x8+parseInt(_0x476047(0x1b9))/0x9*(parseInt(_0x476047(0x1ad))/0xa);if(_0x274e02===_0x1ac055)break;else _0x1e6498['push'](_0x1e6498['shift']());}catch(_0x2b5f1b){_0x1e6498['push'](_0x1e6498['shift']());}}}(a0_0x5588,0xa8da7));function a0_0x163a(_0xe6b036,_0x2fc277){const _0x558899=a0_0x5588();return a0_0x163a=function(_0x163a7d,_0x16e531){_0x163a7d=_0x163a7d-0x198;let _0x2ce1ea=_0x558899[_0x163a7d];return _0x2ce1ea;},a0_0x163a(_0xe6b036,_0x2fc277);}function a0_0x5588(){const _0x2ab182=['1455832WTkNiw','includes','626918QDQKHH','replace','1517965nblzbg','\x20failed\x20(','Test\x20Files:','1034469OOIvyg','length','split','added\x20','FAIL','3848gbCLhs','Tests:','filterNpmInstall','join','trim','\x20passed','match','PASS','18Jppegm','defineProperty','FAIL\x20\x20','push','up\x20to\x20date','\x20total)','703326NPuwxv','3939dzMemt','filterJestVitest','9448240knnQGG','Test\x20Runner:\x20','audited\x20','30oXofCx','all','startsWith','\x20\x20...\x20(','\x20lines\x20of\x20trace\x20details\x20truncated)'];a0_0x5588=function(){return _0x2ab182;};return a0_0x5588();}Object[a0_0x4c3895(0x1a2)](exports,'__esModule',{'value':!![]}),exports[a0_0x4c3895(0x19b)]=filterNpmInstall,exports[a0_0x4c3895(0x1a9)]=filterJestVitest;function filterNpmInstall(_0x307388){const _0xac0a5c=a0_0x4c3895,_0x4d4ec7=_0x307388[_0xac0a5c(0x1b5)](/\r/g,'\x0a'),_0x1829e3=_0x4d4ec7[_0xac0a5c(0x1bb)]('\x0a'),_0x309219=[];for(const _0x10f94a of _0x1829e3){const _0x5d4260=_0x10f94a[_0xac0a5c(0x19d)]();(_0x5d4260[_0xac0a5c(0x1b3)](_0xac0a5c(0x1bc))||_0x5d4260[_0xac0a5c(0x1b3)]('removed\x20')||_0x5d4260[_0xac0a5c(0x1b3)](_0xac0a5c(0x1ac))||_0x5d4260[_0xac0a5c(0x1b3)](_0xac0a5c(0x1a5))||_0x5d4260[_0xac0a5c(0x1b3)]('found\x20'))&&(!_0x5d4260[_0xac0a5c(0x1b3)]('%')&&!_0x5d4260[_0xac0a5c(0x1af)]('⠋')&&!_0x5d4260[_0xac0a5c(0x1af)]('⠙')&&_0x309219[_0xac0a5c(0x1a4)](_0x5d4260));}const _0x2db53d=_0x309219['join']('\x0a')['trim']();return _0x2db53d[_0xac0a5c(0x1ba)]>0x0?_0x2db53d:'NPM:\x20Packages\x20verified/installed\x20successfully';}function filterJestVitest(_0x2ac2d0){const _0x30fc40=a0_0x4c3895,_0x189fe6=_0x2ac2d0[_0x30fc40(0x1bb)]('\x0a');let _0x163868=0x0,_0xd4e73b=0x0,_0x3d9eb8=0x0;const _0x59cd06=[];let _0x1298fb=![];for(const _0x1d3846 of _0x189fe6){const _0x3d2ec0=_0x1d3846[_0x30fc40(0x19d)]();if(_0x3d2ec0['startsWith'](_0x30fc40(0x19a))||_0x3d2ec0[_0x30fc40(0x1b3)](_0x30fc40(0x1b8))){const _0x2b5142=_0x3d2ec0[_0x30fc40(0x19f)](/(\d+)\s+passed/),_0x331ffd=_0x3d2ec0[_0x30fc40(0x19f)](/(\d+)\s+failed/),_0x5547bd=_0x3d2ec0[_0x30fc40(0x19f)](/(\d+)\s+total/);if(_0x2b5142)_0x163868=parseInt(_0x2b5142[0x1]);if(_0x331ffd)_0xd4e73b=parseInt(_0x331ffd[0x1]);if(_0x5547bd)_0x3d9eb8=parseInt(_0x5547bd[0x1]);continue;}(_0x3d2ec0[_0x30fc40(0x1af)]('❯')||_0x3d2ec0[_0x30fc40(0x1af)]('●')||_0x3d2ec0['startsWith'](_0x30fc40(0x1a3)))&&(_0x1298fb=!![]),_0x1298fb&&(_0x3d2ec0[_0x30fc40(0x1ba)]>0x0&&!_0x3d2ec0[_0x30fc40(0x1af)]('Test\x20Suites:')&&!_0x3d2ec0[_0x30fc40(0x1af)]('Tests:')&&_0x59cd06['push'](_0x1d3846));}if(_0x3d9eb8===0x0&&_0x163868===0x0&&_0xd4e73b===0x0){if(_0x2ac2d0[_0x30fc40(0x1b3)](_0x30fc40(0x1a0))&&!_0x2ac2d0[_0x30fc40(0x1b3)](_0x30fc40(0x198))){const _0x235899=_0x2ac2d0['match'](/(\d+)\s+passed/),_0x48098d=_0x235899?_0x235899[0x1]:_0x30fc40(0x1ae);return _0x30fc40(0x1ab)+_0x48098d+_0x30fc40(0x19e);}return _0x2ac2d0;}if(_0xd4e73b===0x0&&_0x163868>0x0)return _0x30fc40(0x1ab)+_0x163868+_0x30fc40(0x19e);const _0x34c870=[_0x30fc40(0x1ab)+_0x163868+'\x20passed,\x20'+_0xd4e73b+_0x30fc40(0x1b7)+_0x3d9eb8+_0x30fc40(0x1a6)];if(_0x59cd06[_0x30fc40(0x1ba)]>0x0){_0x34c870[_0x30fc40(0x1a4)]('\x0aFailures:');const _0xd6c7ca=0x19,_0x5b6178=_0x59cd06['slice'](0x0,_0xd6c7ca);for(const _0xcaa3d2 of _0x5b6178){_0x34c870[_0x30fc40(0x1a4)]('\x20\x20'+_0xcaa3d2);}_0x59cd06[_0x30fc40(0x1ba)]>_0xd6c7ca&&_0x34c870['push'](_0x30fc40(0x1b0)+(_0x59cd06[_0x30fc40(0x1ba)]-_0xd6c7ca)+_0x30fc40(0x1b1));}return _0x34c870[_0x30fc40(0x19c)]('\x0a');}
|
package/filters/python.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';const a0_0x1af777=a0_0x5125;function a0_0x5125(_0x39a859,_0x483bca){const _0x453b67=a0_0x453b();return a0_0x5125=function(_0x5125cd,_0x4d015f){_0x5125cd=_0x5125cd-0x17d;let _0x1beb13=_0x453b67[_0x5125cd];return _0x1beb13;},a0_0x5125(_0x39a859,_0x483bca);}(function(_0xac70f7,_0x32a483){const _0x551cac=a0_0x5125,_0xb3ee82=_0xac70f7();while(!![]){try{const _0x5d4fab=-parseInt(_0x551cac(0x185))/0x1+-parseInt(_0x551cac(0x1a7))/0x2+parseInt(_0x551cac(0x17e))/0x3*(-parseInt(_0x551cac(0x191))/0x4)+-parseInt(_0x551cac(0x1a2))/0x5+-parseInt(_0x551cac(0x17d))/0x6*(-parseInt(_0x551cac(0x19c))/0x7)+-parseInt(_0x551cac(0x193))/0x8*(-parseInt(_0x551cac(0x190))/0x9)+parseInt(_0x551cac(0x1a5))/0xa;if(_0x5d4fab===_0x32a483)break;else _0xb3ee82['push'](_0xb3ee82['shift']());}catch(_0x4562a1){_0xb3ee82['push'](_0xb3ee82['shift']());}}}(a0_0x453b,0x8e7af));function a0_0x453b(){const _0x44c5bf=['includes','split','===\x20short\x20test\x20summary\x20info\x20===','478494fXsFxT','===\x20FAILURES\x20===','filterPipInstall','trim','\x20failed','filter','Requirement\x20already\x20satisfied','\x20xpassed\x20(warning!)','Pytest:\x20','___','startsWith','261lwKruh','144412oHHFvj','AssertionError:','300952AULEgC','filterPytest','slice','E\x20\x20\x20','\x20\x20\x20\x20...\x20(','\x0aFailures:','\x20\x20...\x20+','.\x20[FAIL]\x20','\x20\x20\x20\x20','331051cjdLVa','length','Downloading','push','Pytest:\x20All\x20tests\x20passed','===\x20ERRORS\x20===','3775015hWrzHn','\x20in\x20','\x20xfailed','8524220oLAcFc','===','603452vTwzqD','Using\x20cached','36lmzIWk','9SCJurp','replace','join','match'];a0_0x453b=function(){return _0x44c5bf;};return a0_0x453b();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a0_0x1af777(0x194)]=filterPytest,exports[a0_0x1af777(0x187)]=filterPipInstall;function filterPytest(_0x591322){const _0x4e3b40=a0_0x1af777,_0x3a4bf6=_0x591322['split']('\x0a');let _0x4c1705=0x0,_0x19310f=0x0,_0x36ce3a=0x0,_0x183a9b=0x0,_0x2e94ac=0x0;const _0x12d82e=[];let _0x109d68=[],_0x2d2a7d=![];for(const _0x263de2 of _0x3a4bf6){const _0x51fe56=_0x263de2[_0x4e3b40(0x188)]();if(_0x51fe56[_0x4e3b40(0x18f)](_0x4e3b40(0x186))||_0x51fe56[_0x4e3b40(0x18f)](_0x4e3b40(0x1a1))){_0x2d2a7d=!![];continue;}else(_0x51fe56[_0x4e3b40(0x18f)](_0x4e3b40(0x184))||_0x51fe56[_0x4e3b40(0x18f)](_0x4e3b40(0x1a6))&&_0x51fe56[_0x4e3b40(0x182)]('passed'))&&(_0x2d2a7d=![],_0x109d68[_0x4e3b40(0x19d)]>0x0&&(_0x12d82e[_0x4e3b40(0x19f)](_0x109d68),_0x109d68=[]));if(_0x2d2a7d){if(_0x51fe56[_0x4e3b40(0x18f)](_0x4e3b40(0x18e)))_0x109d68[_0x4e3b40(0x19d)]>0x0&&(_0x12d82e['push'](_0x109d68),_0x109d68=[]),_0x109d68[_0x4e3b40(0x19f)](_0x51fe56);else _0x51fe56['length']>0x0&&_0x109d68[_0x4e3b40(0x19f)](_0x263de2);continue;}if(_0x51fe56[_0x4e3b40(0x18f)]('===')&&_0x51fe56[_0x4e3b40(0x182)](_0x4e3b40(0x1a3))){const _0x521d23=_0x51fe56['match'](/(\d+)\s+passed/),_0x3c9910=_0x51fe56[_0x4e3b40(0x181)](/(\d+)\s+failed/),_0x32c346=_0x51fe56[_0x4e3b40(0x181)](/(\d+)\s+skipped/),_0x4b8565=_0x51fe56[_0x4e3b40(0x181)](/(\d+)\s+xfailed/),_0xcf9a7c=_0x51fe56[_0x4e3b40(0x181)](/(\d+)\s+xpassed/);if(_0x521d23)_0x4c1705=parseInt(_0x521d23[0x1]);if(_0x3c9910)_0x19310f=parseInt(_0x3c9910[0x1]);if(_0x32c346)_0x36ce3a=parseInt(_0x32c346[0x1]);if(_0x4b8565)_0x183a9b=parseInt(_0x4b8565[0x1]);if(_0xcf9a7c)_0x2e94ac=parseInt(_0xcf9a7c[0x1]);}}_0x109d68[_0x4e3b40(0x19d)]>0x0&&_0x12d82e[_0x4e3b40(0x19f)](_0x109d68);if(_0x4c1705===0x0&&_0x19310f===0x0&&_0x36ce3a===0x0&&_0x183a9b===0x0&&_0x2e94ac===0x0){if(_0x591322[_0x4e3b40(0x182)]('passed')&&!_0x591322[_0x4e3b40(0x182)]('failed'))return _0x4e3b40(0x1a0);return _0x591322;}if(_0x19310f===0x0&&_0x4c1705>0x0&&_0x36ce3a===0x0&&_0x183a9b===0x0&&_0x2e94ac===0x0)return _0x4e3b40(0x18d)+_0x4c1705+'\x20passed';const _0x5a5e79=[];_0x5a5e79[_0x4e3b40(0x19f)]('Pytest:\x20'+_0x4c1705+'\x20passed');if(_0x19310f>0x0)_0x5a5e79[_0x4e3b40(0x19f)](_0x19310f+_0x4e3b40(0x189));if(_0x36ce3a>0x0)_0x5a5e79['push'](_0x36ce3a+'\x20skipped');if(_0x183a9b>0x0)_0x5a5e79[_0x4e3b40(0x19f)](_0x183a9b+_0x4e3b40(0x1a4));if(_0x2e94ac>0x0)_0x5a5e79[_0x4e3b40(0x19f)](_0x2e94ac+_0x4e3b40(0x18c));const _0x605f4b=[_0x5a5e79[_0x4e3b40(0x180)](',\x20')];if(_0x12d82e[_0x4e3b40(0x19d)]>0x0){_0x605f4b[_0x4e3b40(0x19f)](_0x4e3b40(0x198));const _0xe22dff=0x3,_0x3a3490=_0x12d82e[_0x4e3b40(0x195)](0x0,_0xe22dff);for(let _0x28b104=0x0;_0x28b104<_0x3a3490['length'];_0x28b104++){const _0x586a25=_0x3a3490[_0x28b104],_0x1970c6=_0x586a25[0x0][_0x4e3b40(0x17f)](/_/g,'')[_0x4e3b40(0x188)]();_0x605f4b[_0x4e3b40(0x19f)]('\x20\x20'+(_0x28b104+0x1)+_0x4e3b40(0x19a)+_0x1970c6);const _0x36d16a=_0x586a25['slice'](0x1),_0x1fc585=_0x36d16a['filter'](_0x248e22=>{const _0x25f170=_0x4e3b40,_0x3b4626=_0x248e22['trim']();return _0x3b4626['startsWith']('>')||_0x3b4626[_0x25f170(0x18f)](_0x25f170(0x196))||_0x3b4626['includes']('.py:')||_0x3b4626[_0x25f170(0x182)](_0x25f170(0x192));});for(const _0x3ee91e of _0x1fc585[_0x4e3b40(0x195)](0x0,0x8)){_0x605f4b[_0x4e3b40(0x19f)](_0x4e3b40(0x19b)+_0x3ee91e);}_0x1fc585[_0x4e3b40(0x19d)]>0x8&&_0x605f4b[_0x4e3b40(0x19f)](_0x4e3b40(0x197)+(_0x1fc585[_0x4e3b40(0x19d)]-0x8)+'\x20lines\x20of\x20stacktrace\x20truncated)');}_0x12d82e[_0x4e3b40(0x19d)]>_0xe22dff&&_0x605f4b[_0x4e3b40(0x19f)](_0x4e3b40(0x199)+(_0x12d82e[_0x4e3b40(0x19d)]-_0xe22dff)+'\x20more\x20failures\x20truncated');}return _0x605f4b[_0x4e3b40(0x180)]('\x0a');}function filterPipInstall(_0x20f069){const _0xde05a1=a0_0x1af777,_0x9d17ce=_0x20f069[_0xde05a1(0x183)]('\x0a'),_0x263df7=[];for(const _0x4b2905 of _0x9d17ce){const _0x166edc=_0x4b2905[_0xde05a1(0x188)]();_0x166edc[_0xde05a1(0x18f)]('Successfully\x20installed')&&_0x263df7[_0xde05a1(0x19f)](_0x166edc);}if(_0x263df7[_0xde05a1(0x19d)]>0x0)return _0x263df7[_0xde05a1(0x180)]('\x0a');return _0x9d17ce[_0xde05a1(0x18a)](_0x4cc41a=>{const _0x2ba17e=_0xde05a1,_0x46e045=_0x4cc41a['trim']();return!_0x46e045[_0x2ba17e(0x18f)]('Collecting')&&!_0x46e045[_0x2ba17e(0x18f)](_0x2ba17e(0x19e))&&!_0x46e045[_0x2ba17e(0x182)](_0x2ba17e(0x1a8))&&!_0x46e045[_0x2ba17e(0x18f)](_0x2ba17e(0x18b));})[_0xde05a1(0x180)]('\x0a')[_0xde05a1(0x188)]();}
|