@ranger-testing/ranger-cli 2.1.0 → 2.1.2
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 +10 -1
- package/build/cli.js +1 -1
- package/build/commands/addEnv.js +1 -1
- package/build/commands/authEncrypt.js +1 -1
- package/build/commands/clean.js +1 -1
- package/build/commands/config.js +1 -1
- package/build/commands/env.js +1 -1
- package/build/commands/feature.js +1 -1
- package/build/commands/hook.js +1 -1
- package/build/commands/hooks/autoPrompt.js +1 -1
- package/build/commands/hooks/disable.js +1 -1
- package/build/commands/hooks/enable.js +1 -1
- package/build/commands/hooks/exitPlanMode.js +1 -1
- package/build/commands/hooks/index.js +1 -1
- package/build/commands/hooks/output.js +1 -1
- package/build/commands/hooks/planReminder.js +1 -1
- package/build/commands/hooks/planStart.js +1 -1
- package/build/commands/hooks/postEdit.js +1 -1
- package/build/commands/hooks/preCompact.js +1 -1
- package/build/commands/hooks/sessionEnd.js +1 -1
- package/build/commands/hooks/sessionStart.js +1 -1
- package/build/commands/hooks/stopHook.js +1 -1
- package/build/commands/index.js +1 -1
- package/build/commands/login.js +1 -1
- package/build/commands/setup/claude.js +1 -1
- package/build/commands/setup/opencode.js +1 -1
- package/build/commands/setupCi.js +1 -1
- package/build/commands/skillup.js +1 -1
- package/build/commands/start.js +1 -1
- package/build/commands/status.js +1 -1
- package/build/commands/update.js +1 -1
- package/build/commands/updateEnv.js +1 -1
- package/build/commands/useEnv.js +1 -1
- package/build/commands/utils/activeProfile.js +1 -1
- package/build/commands/utils/browserSessionsApi.js +1 -1
- package/build/commands/utils/claudeConfig.js +1 -1
- package/build/commands/utils/claudePlugin.js +1 -1
- package/build/commands/utils/crypto.js +1 -1
- package/build/commands/utils/desirePathLog.js +1 -1
- package/build/commands/utils/deviceAuth.js +1 -1
- package/build/commands/utils/environment.js +1 -1
- package/build/commands/utils/featureApi.js +1 -1
- package/build/commands/utils/featureReportGenerator.js +1 -1
- package/build/commands/utils/fixWebmDuration.js +1 -1
- package/build/commands/utils/git.js +1 -1
- package/build/commands/utils/keychain.js +1 -1
- package/build/commands/utils/localAgentInstallationsApi.js +1 -1
- package/build/commands/utils/mcpImageBase64.js +1 -0
- package/build/commands/utils/model.js +1 -0
- package/build/commands/utils/opencodeConfig.js +1 -1
- package/build/commands/utils/profileMessages.js +1 -1
- package/build/commands/utils/profileSetupBanner.js +1 -1
- package/build/commands/utils/rangerConfig.js +1 -0
- package/build/commands/utils/rangerRoot.js +1 -1
- package/build/commands/utils/reportGenerator.js +1 -1
- package/build/commands/utils/retry.js +1 -1
- package/build/commands/utils/sessionCache.js +1 -1
- package/build/commands/utils/settings.js +1 -1
- package/build/commands/utils/skillContent.js +1 -1
- package/build/commands/utils/skills.js +1 -1
- package/build/commands/utils/telemetry.js +1 -1
- package/build/commands/utils/userApi.js +1 -1
- package/build/commands/utils/version.js +1 -1
- package/build/commands/verifyFeature.js +1 -1
- package/build/commands/verifyInBrowser.js +1 -1
- package/build/skills/ranger/SKILL.md +16 -14
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x436662=_0x3553;(function(_0x2c9df1,_0x47fe09){const _0x21fd5b=_0x3553,_0x32937d=_0x2c9df1();while(!![]){try{const _0x7fac05=-parseInt(_0x21fd5b(0x196))/0x1+-parseInt(_0x21fd5b(0x1c1))/0x2*(parseInt(_0x21fd5b(0x1c3))/0x3)+-parseInt(_0x21fd5b(0x1b0))/0x4+-parseInt(_0x21fd5b(0x190))/0x5*(-parseInt(_0x21fd5b(0x191))/0x6)+parseInt(_0x21fd5b(0x1a3))/0x7*(-parseInt(_0x21fd5b(0x1b9))/0x8)+-parseInt(_0x21fd5b(0x1a9))/0x9+parseInt(_0x21fd5b(0x1a5))/0xa;if(_0x7fac05===_0x47fe09)break;else _0x32937d['push'](_0x32937d['shift']());}catch(_0x34934f){_0x32937d['push'](_0x32937d['shift']());}}}(_0x2418,0xe4ec6));import*as _0x16eda8 from'fs';import*as _0x244cdf from'path';import*as _0x2df074 from'os';import{execSync}from'child_process';const CACHE_FILE=_0x244cdf[_0x436662(0x198)](_0x2df074['homedir'](),'.claude',_0x436662(0x1be));function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x584204=_0x436662;try{if(_0x16eda8[_0x584204(0x199)](CACHE_FILE)){const _0x5a5634=JSON[_0x584204(0x1b1)](_0x16eda8['readFileSync'](CACHE_FILE,_0x584204(0x1a2)));return{'version':0x3,'sessions':_0x5a5634['sessions']||{},'branches':_0x5a5634[_0x584204(0x1ae)]||{},'lastEnabledSessionClearedAt':_0x5a5634['lastEnabledSessionClearedAt']};}}catch{}return createEmptyCache();}function saveCache(_0x4e8855){const _0x37e98f=_0x436662;try{const _0x2c9b3d=_0x244cdf['dirname'](CACHE_FILE);!_0x16eda8[_0x37e98f(0x199)](_0x2c9b3d)&&_0x16eda8['mkdirSync'](_0x2c9b3d,{'recursive':!![]}),_0x16eda8[_0x37e98f(0x1b2)](CACHE_FILE,JSON['stringify'](_0x4e8855,null,0x2));}catch{}}export function getCurrentBranch(){const _0x3f3c73=_0x436662,_0x5e9c2e={'oafxo':'utf-8','Qdgno':'pipe','WpFyt':function(_0x302a6d,_0x433c23){return _0x302a6d===_0x433c23;},'GqvKq':_0x3f3c73(0x1b3)};try{const _0x366dea=execSync('git\x20rev-parse\x20--abbrev-ref\x20HEAD',{'encoding':_0x5e9c2e['oafxo'],'stdio':[_0x5e9c2e[_0x3f3c73(0x194)],'pipe',_0x5e9c2e['Qdgno']]})[_0x3f3c73(0x1b6)]();if(!_0x366dea||_0x5e9c2e['WpFyt'](_0x366dea,_0x5e9c2e['GqvKq']))return null;return _0x366dea;}catch{return null;}}export function enableBranch(_0x5e7ac8){const _0x52582e={'WVbjd':function(_0x58f51d){return _0x58f51d();}},_0xb00c50=_0x52582e['WVbjd'](loadCache);_0xb00c50['branches'][_0x5e7ac8]=!![],saveCache(_0xb00c50);}export function disableBranch(_0x104fda){const _0x3e44fa=_0x436662,_0x5264d8={'SayOY':function(_0x4c1494){return _0x4c1494();},'MEDIv':function(_0x1b4927,_0x182ac0){return _0x1b4927(_0x182ac0);}},_0x5bf261=_0x5264d8['SayOY'](loadCache);delete _0x5bf261['branches'][_0x104fda],_0x5264d8[_0x3e44fa(0x1a0)](saveCache,_0x5bf261);}export function isBranchEnabled(_0x156943){const _0x2da4b8=_0x436662,_0x42d603={'sjUbg':function(_0x39762b){return _0x39762b();}},_0x70e50e=_0x42d603[_0x2da4b8(0x1c2)](loadCache);return _0x70e50e['branches'][_0x156943]===!![];}function getOrCreateSession(_0x72016f,_0x37978d){return!_0x72016f['sessions'][_0x37978d]&&(_0x72016f['sessions'][_0x37978d]={}),_0x72016f['sessions'][_0x37978d];}export function enableSession(_0x456781){const _0x3742bf=_0x436662,_0x4d0e0b={'YbUwB':function(_0x1cc7ad){return _0x1cc7ad();},'VCLxD':function(_0x57a4ef,_0x4050cb,_0x4be758){return _0x57a4ef(_0x4050cb,_0x4be758);},'Wvbso':_0x3742bf(0x1ad),'rWoyX':function(_0x40053c,_0x554993){return _0x40053c(_0x554993);}},_0x4feebe=_0x4d0e0b['YbUwB'](loadCache),_0x11e1f3=_0x4d0e0b[_0x3742bf(0x19b)](getOrCreateSession,_0x4feebe,_0x456781);_0x11e1f3['enabled']=!![];const _0x2d9435=getCurrentBranch();_0x2d9435&&_0x2d9435!==_0x3742bf(0x1b7)&&_0x2d9435!==_0x4d0e0b[_0x3742bf(0x19a)]&&(_0x4feebe[_0x3742bf(0x1ae)][_0x2d9435]=!![],_0x11e1f3['currentBranch']=_0x2d9435),_0x4d0e0b[_0x3742bf(0x193)](saveCache,_0x4feebe);}export function isSessionEnabled(_0x7e7a6a){const _0x4eed2b=_0x436662,_0x136732={'dXDqR':function(_0x324dd8,_0x5ae4ac){return _0x324dd8===_0x5ae4ac;},'qAgKJ':_0x4eed2b(0x1b7),'quZts':function(_0x2aeb09,_0x4fa80d){return _0x2aeb09===_0x4fa80d;},'RYDAQ':function(_0x338782,_0x47cdff){return _0x338782||_0x47cdff;}},_0x38e8ae=loadCache(),_0x55dc70=getCurrentBranch();if(!_0x55dc70||_0x136732[_0x4eed2b(0x195)](_0x55dc70,_0x136732[_0x4eed2b(0x19d)])||_0x136732['dXDqR'](_0x55dc70,'master'))return _0x38e8ae[_0x4eed2b(0x1b4)][_0x7e7a6a]?.['enabled']===!![];const _0x5a358e=_0x136732['dXDqR'](_0x38e8ae[_0x4eed2b(0x1ae)][_0x55dc70],!![]),_0x4c2afe=_0x136732[_0x4eed2b(0x1a4)](_0x38e8ae['sessions'][_0x7e7a6a]?.['enabled'],!![]);return _0x136732['RYDAQ'](_0x5a358e,_0x4c2afe);}export function disableSession(_0x2ee6bf){const _0x29f371=_0x436662,_0x2f1bd3=loadCache(),_0x369c27=getOrCreateSession(_0x2f1bd3,_0x2ee6bf);_0x369c27[_0x29f371(0x1c0)]=![],saveCache(_0x2f1bd3);}export function updateBranchTracking(_0x35eb98){const _0x3fb16c=_0x436662,_0x3de528={'kgNQk':function(_0xc7039d,_0x440038){return _0xc7039d===_0x440038;},'uGgwR':'main','hoHvw':'master','VtxfV':function(_0x261bbc,_0xb5bb5c){return _0x261bbc(_0xb5bb5c);}},_0x3880d5=loadCache(),_0x189ac2=_0x3880d5['sessions'][_0x35eb98];if(!_0x189ac2?.['enabled'])return;const _0x39b88c=getCurrentBranch();if(!_0x39b88c||_0x3de528['kgNQk'](_0x39b88c,_0x3de528[_0x3fb16c(0x1ba)])||_0x39b88c===_0x3de528[_0x3fb16c(0x1bd)])return;_0x189ac2['currentBranch']!==_0x39b88c&&(_0x3880d5[_0x3fb16c(0x1ae)][_0x39b88c]=!![],_0x189ac2[_0x3fb16c(0x1a7)]=_0x39b88c,_0x3de528[_0x3fb16c(0x1a1)](saveCache,_0x3880d5));}export function initBranchTracking(_0xa6569f){const _0x41d887=_0x436662,_0x28f3f6={'NcPsk':function(_0x3f3bb6){return _0x3f3bb6();},'EzvHg':function(_0x5a5415,_0x346dfd){return _0x5a5415===_0x346dfd;},'kCiXg':'main','VhIwU':function(_0x4d1fbb,_0x1e278a,_0x59153e){return _0x4d1fbb(_0x1e278a,_0x59153e);},'YOMCO':function(_0x3f12b5,_0x29d1e0){return _0x3f12b5(_0x29d1e0);}},_0x8a4eeb=_0x28f3f6[_0x41d887(0x1b5)](loadCache),_0x2273ee=getCurrentBranch();if(!_0x2273ee||_0x28f3f6[_0x41d887(0x1bb)](_0x2273ee,_0x28f3f6['kCiXg'])||_0x28f3f6['EzvHg'](_0x2273ee,'master'))return;if(_0x8a4eeb[_0x41d887(0x1ae)][_0x2273ee]===!![]){const _0x4c9081=_0x28f3f6['VhIwU'](getOrCreateSession,_0x8a4eeb,_0xa6569f);_0x4c9081[_0x41d887(0x1c0)]=!![],_0x4c9081[_0x41d887(0x1a7)]=_0x2273ee,_0x28f3f6['YOMCO'](saveCache,_0x8a4eeb);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x516fc4){const _0x8021c0=_0x436662,_0x3ac54c={'MeaVr':function(_0x2196e4,_0x46e5ab){return _0x2196e4(_0x46e5ab);}},_0x4972cb=loadCache(),_0x2c653c=_0x4972cb[_0x8021c0(0x1b4)][_0x516fc4];_0x2c653c?.['enabled']&&(_0x4972cb['lastEnabledSessionClearedAt']=Date[_0x8021c0(0x1bc)](),_0x3ac54c['MeaVr'](saveCache,_0x4972cb));}export function shouldAutoEnableAfterClear(_0x6c0208){const _0x3a89c2=_0x436662,_0x585266={'SBoYg':_0x3a89c2(0x19e),'xeRjB':function(_0x49abb6,_0x356a48){return _0x49abb6<=_0x356a48;}};if(_0x6c0208!==_0x585266['SBoYg'])return![];const _0x215fa2=loadCache(),_0x50cbc5=_0x215fa2['lastEnabledSessionClearedAt'];if(!_0x50cbc5)return![];const _0x4097cf=Date[_0x3a89c2(0x1bc)]()-_0x50cbc5;return _0x585266[_0x3a89c2(0x197)](_0x4097cf,CLEAR_AUTO_ENABLE_WINDOW_MS);}export function autoEnableAfterClear(_0x58a582){const _0x3db84d=_0x436662,_0x3f3c79={'AWuSL':function(_0x1d1567){return _0x1d1567();},'SGXqD':function(_0x5a1e1e,_0x531e89){return _0x5a1e1e!==_0x531e89;}},_0x108334=loadCache(),_0x47d09d=getOrCreateSession(_0x108334,_0x58a582);_0x47d09d[_0x3db84d(0x1c0)]=!![];const _0x16009b=_0x3f3c79[_0x3db84d(0x1a6)](getCurrentBranch);_0x16009b&&_0x3f3c79[_0x3db84d(0x1a8)](_0x16009b,'main')&&_0x16009b!==_0x3db84d(0x1ad)&&(_0x47d09d['currentBranch']=_0x16009b),delete _0x108334['lastEnabledSessionClearedAt'],saveCache(_0x108334);}export function registerSession(_0x2b27e3,_0x16077f){const _0x5eb8a9=_0x436662,_0x15bcb9={'PaGsT':function(_0x3abc71){return _0x3abc71();},'FiGmm':function(_0x374460,_0x85ca3){return _0x374460(_0x85ca3);}},_0x2cb4cf=_0x15bcb9['PaGsT'](loadCache),_0x21a77e=getOrCreateSession(_0x2cb4cf,_0x2b27e3);_0x21a77e[_0x5eb8a9(0x192)]=_0x16077f,_0x21a77e['registeredAt']=new Date()[_0x5eb8a9(0x19c)](),_0x15bcb9[_0x5eb8a9(0x19f)](saveCache,_0x2cb4cf);}export function getSessionEntry(_0x454159){const _0x2c7ad8=_0x436662,_0x8bb61={'dnoDw':function(_0x5bae64){return _0x5bae64();}},_0x5dc616=_0x8bb61['dnoDw'](loadCache),_0x433aa1=_0x5dc616['sessions'][_0x454159];if(_0x433aa1?.[_0x2c7ad8(0x192)]&&_0x433aa1?.[_0x2c7ad8(0x1b8)])return{'featureId':_0x433aa1[_0x2c7ad8(0x192)],'registeredAt':_0x433aa1[_0x2c7ad8(0x1b8)]};return null;}function _0x2418(){const _0x368668=['.ranger_cache.json','FNtjv','enabled','326tJEShg','sjUbg','4923YHVPmh','1746375rOxomm','6JuvaeT','featureId','rWoyX','Qdgno','dXDqR','171020dKkvoD','xeRjB','join','existsSync','Wvbso','VCLxD','toISOString','qAgKJ','clear','FiGmm','MEDIv','VtxfV','utf-8','13643gkjNzN','quZts','51614160bbfOPN','AWuSL','currentBranch','SGXqD','13716414yMcfKm','CIhXd','lastPlanReminderAt','nCcvn','master','branches','spUoS','5304324ntRWEL','parse','writeFileSync','HEAD','sessions','NcPsk','trim','main','registeredAt','5272fyNGve','uGgwR','EzvHg','now','hoHvw'];_0x2418=function(){return _0x368668;};return _0x2418();}export function unregisterSession(_0x377e4f){const _0x57897b=_0x436662,_0xe71ef={'nCcvn':function(_0x111cbf){return _0x111cbf();}},_0x4a2065=_0xe71ef[_0x57897b(0x1ac)](loadCache),_0x39819e=_0x4a2065[_0x57897b(0x1b4)][_0x377e4f];_0x39819e&&(delete _0x39819e['featureId'],delete _0x39819e['registeredAt'],saveCache(_0x4a2065));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x2deb8f){const _0x43a46c=_0x436662,_0x5d4f44={'FNtjv':function(_0x52492b,_0x23a69e,_0x5872ea){return _0x52492b(_0x23a69e,_0x5872ea);},'spUoS':function(_0xeafdb8,_0x297aa6){return _0xeafdb8(_0x297aa6);}},_0x313700=loadCache(),_0x1a2d09=_0x5d4f44[_0x43a46c(0x1bf)](getOrCreateSession,_0x313700,_0x2deb8f),_0x4ab247=_0x1a2d09[_0x43a46c(0x1ab)]||0x0,_0x417546=Date[_0x43a46c(0x1bc)]();if(_0x417546-_0x4ab247>=PLAN_REMINDER_INTERVAL_MS)return _0x1a2d09['lastPlanReminderAt']=_0x417546,_0x5d4f44[_0x43a46c(0x1af)](saveCache,_0x313700),!![];return![];}export function hasSessionBeenPrompted(_0xc2b9f6){const _0x4e286b=_0x436662,_0x5761df={'ROSTF':function(_0x39eb01){return _0x39eb01();},'CIhXd':function(_0x153bb3,_0x303115){return _0x153bb3===_0x303115;}},_0x1e9356=_0x5761df['ROSTF'](loadCache);return _0x5761df[_0x4e286b(0x1aa)](_0x1e9356[_0x4e286b(0x1b4)][_0xc2b9f6]?.['prompted'],!![]);}function _0x3553(_0x550ff9,_0x4a2428){_0x550ff9=_0x550ff9-0x190;const _0x2418c3=_0x2418();let _0x355322=_0x2418c3[_0x550ff9];return _0x355322;}export function markSessionPrompted(_0x31dca2){const _0x1e16be={'kqlqB':function(_0x4d1330,_0x52c6df,_0x5c63f7){return _0x4d1330(_0x52c6df,_0x5c63f7);},'ucxZr':function(_0x31ad42,_0x40cd6e){return _0x31ad42(_0x40cd6e);}},_0x3ba8b0=loadCache(),_0x2b2419=_0x1e16be['kqlqB'](getOrCreateSession,_0x3ba8b0,_0x31dca2);_0x2b2419['prompted']=!![],_0x1e16be['ucxZr'](saveCache,_0x3ba8b0);}export function getCacheFile(){return CACHE_FILE;}
|
|
1
|
+
const _0x2354cf=_0x1872;(function(_0x1ed448,_0xf27554){const _0x3173fc=_0x1872,_0x194a51=_0x1ed448();while(!![]){try{const _0x3cc8bb=-parseInt(_0x3173fc(0x127))/0x1*(-parseInt(_0x3173fc(0x107))/0x2)+parseInt(_0x3173fc(0x11a))/0x3+parseInt(_0x3173fc(0xf8))/0x4*(parseInt(_0x3173fc(0x117))/0x5)+-parseInt(_0x3173fc(0xfc))/0x6*(parseInt(_0x3173fc(0x11c))/0x7)+parseInt(_0x3173fc(0xf9))/0x8+-parseInt(_0x3173fc(0x11f))/0x9*(-parseInt(_0x3173fc(0x10b))/0xa)+-parseInt(_0x3173fc(0x118))/0xb;if(_0x3cc8bb===_0xf27554)break;else _0x194a51['push'](_0x194a51['shift']());}catch(_0x528504){_0x194a51['push'](_0x194a51['shift']());}}}(_0x4ffe,0x7302c));import*as _0x556362 from'fs';import*as _0x53f2af from'path';import*as _0x2173f0 from'os';import{execSync}from'child_process';const CACHE_FILE=_0x53f2af['join'](_0x2173f0[_0x2354cf(0x11b)](),'.claude',_0x2354cf(0x12a));function _0x1872(_0x8a57b1,_0x595176){_0x8a57b1=_0x8a57b1-0xf6;const _0x4ffe52=_0x4ffe();let _0x1872bb=_0x4ffe52[_0x8a57b1];return _0x1872bb;}function createEmptyCache(){return{'version':0x3,'sessions':{},'branches':{}};}function loadCache(){const _0x15ddbf=_0x2354cf,_0x3f5336={'hgNJR':_0x15ddbf(0x119),'RJvJb':function(_0x33cad9){return _0x33cad9();}};try{if(_0x556362['existsSync'](CACHE_FILE)){const _0x21af73=JSON['parse'](_0x556362['readFileSync'](CACHE_FILE,_0x3f5336[_0x15ddbf(0x101)]));return{'version':0x3,'sessions':_0x21af73[_0x15ddbf(0x105)]||{},'branches':_0x21af73[_0x15ddbf(0x116)]||{},'lastEnabledSessionClearedAt':_0x21af73[_0x15ddbf(0xfb)]};}}catch{}return _0x3f5336[_0x15ddbf(0x10d)](createEmptyCache);}function saveCache(_0x7188cd){const _0xcb78d4=_0x2354cf;try{const _0x57bb94=_0x53f2af['dirname'](CACHE_FILE);!_0x556362[_0xcb78d4(0xfa)](_0x57bb94)&&_0x556362[_0xcb78d4(0x120)](_0x57bb94,{'recursive':!![]}),_0x556362['writeFileSync'](CACHE_FILE,JSON[_0xcb78d4(0x104)](_0x7188cd,null,0x2));}catch{}}export function getCurrentBranch(){const _0x238d4d=_0x2354cf,_0x3b3006={'KAhkF':function(_0x2ce383,_0x1fe343,_0x5043fe){return _0x2ce383(_0x1fe343,_0x5043fe);},'FZXsb':'utf-8','gzWKe':'pipe','CrKtJ':function(_0x34d2e0,_0x4b6254){return _0x34d2e0===_0x4b6254;},'dbXOc':'HEAD'};try{const _0x402e9e=_0x3b3006['KAhkF'](execSync,'git\x20rev-parse\x20--abbrev-ref\x20HEAD',{'encoding':_0x3b3006[_0x238d4d(0x109)],'stdio':[_0x3b3006['gzWKe'],_0x3b3006['gzWKe'],_0x3b3006['gzWKe']]})['trim']();if(!_0x402e9e||_0x3b3006[_0x238d4d(0x102)](_0x402e9e,_0x3b3006[_0x238d4d(0x126)]))return null;return _0x402e9e;}catch{return null;}}export function enableBranch(_0x26fba9){const _0x2840c2={'oRHFn':function(_0x49c371,_0x5dd821){return _0x49c371(_0x5dd821);}},_0x2f4c17=loadCache();_0x2f4c17['branches'][_0x26fba9]=!![],_0x2840c2['oRHFn'](saveCache,_0x2f4c17);}export function disableBranch(_0x1ef1a6){const _0x490864=_0x2354cf,_0x1d1002={'Yilcd':function(_0x129fb0,_0x8fb50b){return _0x129fb0(_0x8fb50b);}},_0x4b62f8=loadCache();delete _0x4b62f8[_0x490864(0x116)][_0x1ef1a6],_0x1d1002[_0x490864(0x11e)](saveCache,_0x4b62f8);}export function isBranchEnabled(_0x4ca08f){const _0x2e2ae0=loadCache();return _0x2e2ae0['branches'][_0x4ca08f]===!![];}function getOrCreateSession(_0x44972f,_0x38af7c){const _0x1d8e0f=_0x2354cf;return!_0x44972f[_0x1d8e0f(0x105)][_0x38af7c]&&(_0x44972f['sessions'][_0x38af7c]={}),_0x44972f['sessions'][_0x38af7c];}export function enableSession(_0x34181b){const _0x299c76=_0x2354cf,_0x3f1d5d={'csGta':function(_0x39f0bf){return _0x39f0bf();},'FNsHJ':function(_0x5757b7,_0x2d463e){return _0x5757b7!==_0x2d463e;}},_0x1a2701=_0x3f1d5d['csGta'](loadCache),_0x51cd99=getOrCreateSession(_0x1a2701,_0x34181b);_0x51cd99['enabled']=!![];const _0x11f4fe=getCurrentBranch();_0x11f4fe&&_0x11f4fe!=='main'&&_0x3f1d5d[_0x299c76(0xfd)](_0x11f4fe,'master')&&(_0x1a2701['branches'][_0x11f4fe]=!![],_0x51cd99[_0x299c76(0x10f)]=_0x11f4fe),saveCache(_0x1a2701);}export function isSessionEnabled(_0xe42e65){const _0x4d08bc=_0x2354cf,_0xb6372c={'tUiyu':function(_0x1ca66a){return _0x1ca66a();},'wscbl':_0x4d08bc(0x100),'jbCKs':function(_0x5d9ab3,_0x4a877f){return _0x5d9ab3===_0x4a877f;},'qrPeY':function(_0x3b92fc,_0x355449){return _0x3b92fc===_0x355449;},'clPfN':function(_0x53c89c,_0x2b4fc6){return _0x53c89c||_0x2b4fc6;}},_0x728567=loadCache(),_0x3b1798=_0xb6372c['tUiyu'](getCurrentBranch);if(!_0x3b1798||_0x3b1798===_0xb6372c['wscbl']||_0xb6372c['jbCKs'](_0x3b1798,_0x4d08bc(0x10e)))return _0x728567[_0x4d08bc(0x105)][_0xe42e65]?.['enabled']===!![];const _0x31d720=_0xb6372c['qrPeY'](_0x728567['branches'][_0x3b1798],!![]),_0x2e6818=_0x728567[_0x4d08bc(0x105)][_0xe42e65]?.[_0x4d08bc(0x125)]===!![];return _0xb6372c['clPfN'](_0x31d720,_0x2e6818);}export function disableSession(_0x3b6fea){const _0x37bb22=_0x2354cf,_0x33372b={'pSbLh':function(_0x56ead4,_0x5d9d5a,_0x16f998){return _0x56ead4(_0x5d9d5a,_0x16f998);}},_0x54afaa=loadCache(),_0xd191db=_0x33372b['pSbLh'](getOrCreateSession,_0x54afaa,_0x3b6fea);_0xd191db[_0x37bb22(0x125)]=![],saveCache(_0x54afaa);}export function updateBranchTracking(_0x49e09c){const _0x1973d1=_0x2354cf,_0x4daca2={'GfZmV':function(_0x50879e){return _0x50879e();},'EAqrU':function(_0x244b78,_0x4d6711){return _0x244b78===_0x4d6711;},'lKCoY':function(_0x13881d,_0x3223bf){return _0x13881d===_0x3223bf;},'eWysl':_0x1973d1(0x10e),'LCYeh':function(_0x23c7da,_0x1ff159){return _0x23c7da(_0x1ff159);}},_0x4f08dc=loadCache(),_0x2783bf=_0x4f08dc['sessions'][_0x49e09c];if(!_0x2783bf?.['enabled'])return;const _0x7c20fd=_0x4daca2[_0x1973d1(0x123)](getCurrentBranch);if(!_0x7c20fd||_0x4daca2[_0x1973d1(0xf6)](_0x7c20fd,_0x1973d1(0x100))||_0x4daca2['lKCoY'](_0x7c20fd,_0x4daca2['eWysl']))return;_0x2783bf['currentBranch']!==_0x7c20fd&&(_0x4f08dc[_0x1973d1(0x116)][_0x7c20fd]=!![],_0x2783bf['currentBranch']=_0x7c20fd,_0x4daca2[_0x1973d1(0x128)](saveCache,_0x4f08dc));}export function initBranchTracking(_0x3547d5){const _0x2949e3=_0x2354cf,_0x228594={'JNiQR':function(_0x548ef8,_0x3b6347){return _0x548ef8===_0x3b6347;},'AFQAp':'master','tdElt':function(_0x4d75f7,_0x797b87){return _0x4d75f7===_0x797b87;},'eJzAw':function(_0x55d7a7,_0x21162d,_0x169e35){return _0x55d7a7(_0x21162d,_0x169e35);},'lAeRQ':function(_0x975e3f,_0x1c1e80){return _0x975e3f(_0x1c1e80);}},_0x126b0e=loadCache(),_0x2fd299=getCurrentBranch();if(!_0x2fd299||_0x228594[_0x2949e3(0xf7)](_0x2fd299,_0x2949e3(0x100))||_0x2fd299===_0x228594[_0x2949e3(0x108)])return;if(_0x228594[_0x2949e3(0x121)](_0x126b0e[_0x2949e3(0x116)][_0x2fd299],!![])){const _0x219725=_0x228594[_0x2949e3(0x106)](getOrCreateSession,_0x126b0e,_0x3547d5);_0x219725['enabled']=!![],_0x219725['currentBranch']=_0x2fd299,_0x228594[_0x2949e3(0x122)](saveCache,_0x126b0e);}}const CLEAR_AUTO_ENABLE_WINDOW_MS=0x1388;export function recordEnabledSessionCleared(_0x21109a){const _0xcd5b0d=_0x2354cf,_0xb0b70a={'WQles':function(_0x9a62aa){return _0x9a62aa();},'HPYLr':function(_0x5a5c35,_0x2b2b55){return _0x5a5c35(_0x2b2b55);}},_0x48623f=_0xb0b70a['WQles'](loadCache),_0x4da9a1=_0x48623f['sessions'][_0x21109a];_0x4da9a1?.[_0xcd5b0d(0x125)]&&(_0x48623f['lastEnabledSessionClearedAt']=Date[_0xcd5b0d(0x110)](),_0xb0b70a['HPYLr'](saveCache,_0x48623f));}export function shouldAutoEnableAfterClear(_0x252789){const _0x4111f7=_0x2354cf,_0x25b16c={'CRGEP':'clear','NvlAl':function(_0x392839,_0x5497d9){return _0x392839-_0x5497d9;},'lzQyM':function(_0x1a9567,_0x10cd9e){return _0x1a9567<=_0x10cd9e;}};if(_0x252789!==_0x25b16c[_0x4111f7(0x111)])return![];const _0x547034=loadCache(),_0x43a0a2=_0x547034[_0x4111f7(0xfb)];if(!_0x43a0a2)return![];const _0x32c92a=_0x25b16c[_0x4111f7(0x129)](Date[_0x4111f7(0x110)](),_0x43a0a2);return _0x25b16c[_0x4111f7(0xff)](_0x32c92a,CLEAR_AUTO_ENABLE_WINDOW_MS);}export function autoEnableAfterClear(_0x1e4db4){const _0x43ea7a=_0x2354cf,_0x329773={'fVIgl':function(_0xd1a4e5){return _0xd1a4e5();},'ddsbe':function(_0x29a186){return _0x29a186();},'yfZPy':function(_0x4d2c39,_0x2f672d){return _0x4d2c39!==_0x2f672d;}},_0x53d1fb=_0x329773[_0x43ea7a(0x10c)](loadCache),_0x54be2c=getOrCreateSession(_0x53d1fb,_0x1e4db4);_0x54be2c[_0x43ea7a(0x125)]=!![];const _0x5f51b5=_0x329773['ddsbe'](getCurrentBranch);_0x5f51b5&&_0x5f51b5!=='main'&&_0x329773[_0x43ea7a(0x11d)](_0x5f51b5,'master')&&(_0x54be2c[_0x43ea7a(0x10f)]=_0x5f51b5),delete _0x53d1fb['lastEnabledSessionClearedAt'],saveCache(_0x53d1fb);}export function registerSession(_0x49acb7,_0x4264a5){const _0x29e962=_0x2354cf,_0x5867da={'kxjta':function(_0xfc15e){return _0xfc15e();}},_0x4509a7=_0x5867da[_0x29e962(0x115)](loadCache),_0x65ebc=getOrCreateSession(_0x4509a7,_0x49acb7);_0x65ebc[_0x29e962(0x124)]=_0x4264a5,_0x65ebc['registeredAt']=new Date()[_0x29e962(0xfe)](),saveCache(_0x4509a7);}function _0x4ffe(){const _0x497406=['master','currentBranch','now','CRGEP','comYc','prompted','dFtjI','kxjta','branches','10AGEKac','16444417HpWfbc','utf-8','1185012nGCJaY','homedir','35ePiFvh','yfZPy','Yilcd','109818Trtwwn','mkdirSync','tdElt','lAeRQ','GfZmV','featureId','enabled','dbXOc','354147dXxeUe','LCYeh','NvlAl','.ranger_cache.json','EAqrU','JNiQR','113676tLTOWD','3892288eCNfOR','existsSync','lastEnabledSessionClearedAt','744234XojUwp','FNsHJ','toISOString','lzQyM','main','hgNJR','CrKtJ','JTcIz','stringify','sessions','eJzAw','4wkzdxe','AFQAp','FZXsb','registeredAt','770EcjcvD','fVIgl','RJvJb'];_0x4ffe=function(){return _0x497406;};return _0x4ffe();}export function getSessionEntry(_0x43f9f2){const _0x414ee4=_0x2354cf,_0x40fc6e=loadCache(),_0x610807=_0x40fc6e['sessions'][_0x43f9f2];if(_0x610807?.[_0x414ee4(0x124)]&&_0x610807?.[_0x414ee4(0x10a)])return{'featureId':_0x610807['featureId'],'registeredAt':_0x610807[_0x414ee4(0x10a)]};return null;}export function unregisterSession(_0x2573b3){const _0x396d20=_0x2354cf,_0x5eacf7={'dFtjI':function(_0x5c3bf9,_0x244b14){return _0x5c3bf9(_0x244b14);}},_0x1ccd41=loadCache(),_0xf0116b=_0x1ccd41[_0x396d20(0x105)][_0x2573b3];_0xf0116b&&(delete _0xf0116b['featureId'],delete _0xf0116b['registeredAt'],_0x5eacf7[_0x396d20(0x114)](saveCache,_0x1ccd41));}const PLAN_REMINDER_INTERVAL_MS=0x5*0x3c*0x3e8;export function shouldShowPlanReminder(_0x204fe6){const _0x205ae3=_0x2354cf,_0x5bd8d6={'comYc':function(_0x1c0dc5,_0x3d20fd,_0x3314b4){return _0x1c0dc5(_0x3d20fd,_0x3314b4);}},_0x483676=loadCache(),_0x4c74e5=_0x5bd8d6[_0x205ae3(0x112)](getOrCreateSession,_0x483676,_0x204fe6),_0x5558e8=_0x4c74e5['lastPlanReminderAt']||0x0,_0x4b2db8=Date['now']();if(_0x4b2db8-_0x5558e8>=PLAN_REMINDER_INTERVAL_MS)return _0x4c74e5['lastPlanReminderAt']=_0x4b2db8,saveCache(_0x483676),!![];return![];}export function hasSessionBeenPrompted(_0x5a33d2){const _0x4b7fb5=_0x2354cf,_0x5f4f6c={'lnHrc':function(_0x44e10c,_0x42daa7){return _0x44e10c===_0x42daa7;}},_0x1ad6b7=loadCache();return _0x5f4f6c['lnHrc'](_0x1ad6b7[_0x4b7fb5(0x105)][_0x5a33d2]?.[_0x4b7fb5(0x113)],!![]);}export function markSessionPrompted(_0x140e40){const _0x162615=_0x2354cf,_0x110dab={'JTcIz':function(_0x38cb08){return _0x38cb08();}},_0x333a86=_0x110dab[_0x162615(0x103)](loadCache),_0x3d48fc=getOrCreateSession(_0x333a86,_0x140e40);_0x3d48fc['prompted']=!![],saveCache(_0x333a86);}export function getCacheFile(){return CACHE_FILE;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x4cd0a2,_0x6612ca){const _0x54dbe8=_0x2b39,_0x4375e3=_0x4cd0a2();while(!![]){try{const _0x5d8935=-parseInt(_0x54dbe8(0x1cc))/0x1+-parseInt(_0x54dbe8(0x1bc))/0x2+-parseInt(_0x54dbe8(0x1ba))/0x3*(-parseInt(_0x54dbe8(0x199))/0x4)+-parseInt(_0x54dbe8(0x1b2))/0x5+parseInt(_0x54dbe8(0x1bd))/0x6+-parseInt(_0x54dbe8(0x1c9))/0x7+parseInt(_0x54dbe8(0x19e))/0x8;if(_0x5d8935===_0x6612ca)break;else _0x4375e3['push'](_0x4375e3['shift']());}catch(_0x383276){_0x4375e3['push'](_0x4375e3['shift']());}}}(_0xbfbf,0x75460));import{readFile,writeFile,mkdir,unlink}from'fs/promises';import{join,dirname}from'path';function _0x2b39(_0x57d274,_0x339277){_0x57d274=_0x57d274-0x17f;const _0xbfbf1=_0xbfbf();let _0x2b3919=_0xbfbf1[_0x57d274];return _0x2b3919;}import{existsSync}from'fs';import{tmpdir}from'os';import{randomUUID}from'crypto';import{decrypt}from'./crypto.js';import{getToken}from'./keychain.js';import{getRangerDir}from'./rangerRoot.js';export function getEnvDir(_0x4b8f61){const _0xb7b6a=_0x2b39,_0x31ae27={'LiWQy':function(_0x996a08){return _0x996a08();},'PeFVw':function(_0x472d88,_0xb323db,_0x29e301,_0x547060){return _0x472d88(_0xb323db,_0x29e301,_0x547060);},'oLZPd':'local','FeNJf':function(_0x2efa7d,_0x286c23,_0x2dcdd0){return _0x2efa7d(_0x286c23,_0x2dcdd0);},'rdIns':function(_0x5e925c,_0x4d7201){return _0x5e925c(_0x4d7201);},'jebly':function(_0x41ac57,_0x34cc14){return _0x41ac57(_0x34cc14);}},_0x6a53e7=_0x31ae27['LiWQy'](getRangerDir),_0x1de89a=_0x31ae27[_0xb7b6a(0x1c5)](join,_0x6a53e7,'ci',_0x4b8f61),_0x37f052=join(_0x6a53e7,_0xb7b6a(0x193),_0x4b8f61),_0x4b29f2=join(_0x6a53e7,_0x4b8f61),_0x33c0ce=join(_0x6a53e7,_0x31ae27[_0xb7b6a(0x18f)]),_0x9ad2b7=_0x31ae27['FeNJf'](join,_0x6a53e7,'ci');if(_0x31ae27[_0xb7b6a(0x198)](existsSync,_0x1de89a))return _0x1de89a;if(existsSync(_0x37f052))return _0x37f052;if(existsSync(_0x4b29f2)&&(_0x4b29f2!==_0x33c0ce&&_0x4b29f2!==_0x9ad2b7?!![]:_0x31ae27['jebly'](hasLegacyProfileFiles,_0x4b29f2)))return _0x4b29f2;return _0x37f052;}export function findExistingEnv(_0x2044d3,_0x2473c6){const _0x32c144=_0x2b39,_0xcd94b5={'cJzmC':function(_0x20d559){return _0x20d559();},'dBVOO':'legacy','dHLEw':function(_0x4fe366,_0x161e81,_0x5c6a2){return _0x4fe366(_0x161e81,_0x5c6a2);},'yJuWt':function(_0xae8fea,_0x19f34d){return _0xae8fea===_0x19f34d;},'dQZQz':function(_0x1c64d3,_0x29f930){return _0x1c64d3(_0x29f930);}},_0x4ac946=_0xcd94b5[_0x32c144(0x19d)](getRangerDir),_0x5689b7=_0x2473c6?.[_0x32c144(0x1b7)]??['ci',_0x32c144(0x193),_0xcd94b5['dBVOO']],_0x488d89=_0xcd94b5['dHLEw'](join,_0x4ac946,_0x32c144(0x193)),_0x3a7136=join(_0x4ac946,'ci'),_0xc5202=[{'location':'ci','path':join(_0x4ac946,'ci',_0x2044d3)},{'location':_0x32c144(0x193),'path':join(_0x4ac946,_0x32c144(0x193),_0x2044d3)},{'location':_0x32c144(0x182),'path':_0xcd94b5['dHLEw'](join,_0x4ac946,_0x2044d3)}];for(const _0x311f4b of _0xc5202){if(_0x5689b7[_0x32c144(0x1c3)](_0x311f4b[_0x32c144(0x1ca)])&&existsSync(_0x311f4b[_0x32c144(0x1c1)])){if(_0xcd94b5[_0x32c144(0x1a2)](_0x311f4b['location'],'legacy')&&(_0x311f4b['path']===_0x488d89||_0x311f4b['path']===_0x3a7136)&&!_0xcd94b5['dQZQz'](hasLegacyProfileFiles,_0x311f4b['path']))continue;return{'path':_0x311f4b[_0x32c144(0x1c1)],'location':_0x311f4b[_0x32c144(0x1ca)]};}}return null;}function hasLegacyProfileFiles(_0x3ed036){const _0x47b98a=_0x2b39,_0x306477={'OWGDv':function(_0x5531d3,_0x43166f){return _0x5531d3(_0x43166f);},'ObMJs':function(_0x57c16f,_0x342405,_0x5d8a7d){return _0x57c16f(_0x342405,_0x5d8a7d);},'XzsqO':function(_0x565e05,_0x45cb94){return _0x565e05(_0x45cb94);},'rYzwk':function(_0x3842dd,_0x437f79){return _0x3842dd(_0x437f79);},'eKjsk':_0x47b98a(0x1b4)};return _0x306477[_0x47b98a(0x1a3)](existsSync,_0x306477['ObMJs'](join,_0x3ed036,'settings.json'))||_0x306477[_0x47b98a(0x1c4)](existsSync,_0x306477['ObMJs'](join,_0x3ed036,_0x47b98a(0x1cb)))||_0x306477[_0x47b98a(0x1ac)](existsSync,_0x306477['ObMJs'](join,_0x3ed036,_0x306477['eKjsk']));}export function isEnvCi(_0x54b514){const _0x22ee65=_0x2b39,_0x2ce504={'WdBBx':function(_0x3a3f19,_0x3ff006){return _0x3a3f19(_0x3ff006);},'lRmdw':function(_0x460ca2,_0x1dbc4e,_0x148d04,_0x153e3a){return _0x460ca2(_0x1dbc4e,_0x148d04,_0x153e3a);},'hTOkF':function(_0xa36b27){return _0xa36b27();}};return _0x2ce504[_0x22ee65(0x19b)](existsSync,_0x2ce504['lRmdw'](join,_0x2ce504['hTOkF'](getRangerDir),'ci',_0x54b514));}export async function cleanupTempFiles(_0xd76836){const _0x46dd2b=_0x2b39,_0x3d2412={'Bpuwh':function(_0x1bf368,_0x6cc8a2){return _0x1bf368!==_0x6cc8a2;}},_0x3f55a0=[_0xd76836['tempAuthPath'],_0xd76836[_0x46dd2b(0x1c0)]][_0x46dd2b(0x191)](Boolean);await Promise[_0x46dd2b(0x1a0)](_0x3f55a0[_0x46dd2b(0x1b1)](_0x17dda2=>unlink(_0x17dda2)['catch'](_0x462ae5=>{const _0x343395=_0x46dd2b;_0x3d2412[_0x343395(0x196)](_0x462ae5[_0x343395(0x1ae)],'ENOENT')&&console[_0x343395(0x1c7)]('Failed\x20to\x20clean\x20up\x20temp\x20file\x20'+_0x17dda2+':',_0x462ae5[_0x343395(0x194)]);})));}export function getSettingsPath(_0x15bd6f){const _0x3a94e7=_0x2b39;return join(getEnvDir(_0x15bd6f),_0x3a94e7(0x1b8));}export async function loadSettings(_0x2ca51d){const _0x4cc8e9=_0x2b39,_0x3f4bfb={'MNcil':function(_0x1fee95,_0x4d2eb6){return _0x1fee95(_0x4d2eb6);},'UnxFb':function(_0x2d7b10,_0x502018,_0x520804){return _0x2d7b10(_0x502018,_0x520804);},'lRZMJ':_0x4cc8e9(0x1ab)},_0x3e1d79=getSettingsPath(_0x2ca51d);if(!_0x3f4bfb[_0x4cc8e9(0x1be)](existsSync,_0x3e1d79))return{};try{const _0x191418=await _0x3f4bfb['UnxFb'](readFile,_0x3e1d79,_0x3f4bfb[_0x4cc8e9(0x18e)]);return JSON['parse'](_0x191418);}catch{return{};}}export async function saveSettings(_0x43f5eb,_0x8517cb){const _0x359094={'UktSR':function(_0x24b92b,_0x348d84){return _0x24b92b(_0x348d84);},'vgxVi':function(_0x560a58,_0x1214fc,_0x8bf098){return _0x560a58(_0x1214fc,_0x8bf098);},'mDhnM':function(_0x2f8080,_0x10cde9,_0x370b53){return _0x2f8080(_0x10cde9,_0x370b53);}},_0x569277=_0x359094['UktSR'](getSettingsPath,_0x43f5eb),_0x83207d=dirname(_0x569277);!existsSync(_0x83207d)&&await _0x359094['vgxVi'](mkdir,_0x83207d,{'recursive':!![]}),await _0x359094['mDhnM'](writeFile,_0x569277,JSON['stringify'](_0x8517cb,null,0x2));}export function resolveEnvVars(_0x515b28){const _0x113bb4=_0x2b39,_0x1c7d39={'drtvl':function(_0xf1c414,_0x2f83c4){return _0xf1c414===_0x2f83c4;},'BTLfY':_0x113bb4(0x18d)};if(typeof _0x515b28===_0x1c7d39['BTLfY'])return _0x515b28[_0x113bb4(0x1c2)](/\$\{(\w+)\}/g,(_0xf9a21a,_0x520617)=>{const _0x3b5ea7=_0x113bb4,_0x2d797a=process[_0x3b5ea7(0x186)][_0x520617];if(_0x1c7d39[_0x3b5ea7(0x1bb)](_0x2d797a,undefined))throw new Error('Environment\x20variable\x20'+_0x520617+'\x20is\x20not\x20set');return _0x2d797a;});if(Array['isArray'](_0x515b28))return _0x515b28[_0x113bb4(0x1b1)](resolveEnvVars);if(_0x515b28&&typeof _0x515b28===_0x113bb4(0x188))return Object['fromEntries'](Object['entries'](_0x515b28)['map'](([_0x59733e,_0x2d78f5])=>[_0x59733e,resolveEnvVars(_0x2d78f5)]));return _0x515b28;}export async function buildPlaywrightConfig(_0x5f3582,_0x5ebd62,_0x14f725,_0x15a4b2){const _0x4bffed=_0x2b39,_0xeb3ddf={'trYsA':function(_0x558d3e,_0x3de534){return _0x558d3e(_0x3de534);},'HwQIS':function(_0x112777,_0x24641d,_0xb2ffef){return _0x112777(_0x24641d,_0xb2ffef);},'RQVVt':function(_0x2e399b){return _0x2e399b();},'byZzJ':function(_0x2e1c1e,_0x4c8e21){return _0x2e1c1e(_0x4c8e21);},'jzgdn':function(_0x2f392c,_0x610ae2){return _0x2f392c(_0x610ae2);},'FLWuF':function(_0x43faa4){return _0x43faa4();},'JkSkw':function(_0x196f2d,_0x30fda0,_0x42db5a,_0x2d8d1b){return _0x196f2d(_0x30fda0,_0x42db5a,_0x2d8d1b);},'sXbBF':'sessions','aCdPa':function(_0x488df8,_0x10fe31){return _0x488df8(_0x10fe31);},'rmYBD':_0x4bffed(0x187),'QEMur':'clipboard-read','DVOoQ':'vision','DHpql':function(_0x1658d1,_0x234fee){return _0x1658d1===_0x234fee;},'qZede':function(_0x9dde61,_0xe90dde,_0x302613){return _0x9dde61(_0xe90dde,_0x302613);},'oppGK':function(_0x2f2236){return _0x2f2236();},'OndDk':function(_0x137d85,_0x2240cf,_0x33e29c){return _0x137d85(_0x2240cf,_0x33e29c);}},_0x471461=_0xeb3ddf['trYsA'](getEnvDir,_0x5ebd62),_0x5766f9=_0xeb3ddf[_0x4bffed(0x1af)](join,_0x471461,'auth.json.enc'),_0x20c0d1=join(_0x471461,'auth.json');let _0x448bef,_0x1ca129;if(existsSync(_0x5766f9))try{const _0x4bf143=await _0xeb3ddf[_0x4bffed(0x1a9)](getToken);if(!_0x4bf143)throw new Error('No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]');const _0x254524=await _0xeb3ddf[_0x4bffed(0x180)](readFile,_0x5766f9),_0x501dfa=decrypt(_0x254524,_0x4bf143);_0x1ca129=join(tmpdir(),_0x4bffed(0x1a8)+Date['now']()+_0x4bffed(0x1aa)),await writeFile(_0x1ca129,_0x501dfa),_0x448bef=_0x1ca129;}catch(_0x1795e0){const _0x4af332=_0x1795e0 instanceof Error?_0x1795e0['message']:_0xeb3ddf['byZzJ'](String,_0x1795e0);throw new Error(_0x4bffed(0x1a5)+_0x4af332);}else _0xeb3ddf[_0x4bffed(0x19a)](existsSync,_0x20c0d1)&&(_0x448bef=_0x20c0d1);const _0x228618=_0x14f725||_0xeb3ddf[_0x4bffed(0x184)](randomUUID),_0x1c6c3a=_0xeb3ddf[_0x4bffed(0x1c8)](join,getRangerDir(),_0xeb3ddf[_0x4bffed(0x18c)],_0x228618),_0x449c2f=_0xeb3ddf[_0x4bffed(0x1b9)](Boolean,_0x5f3582['cdpEndpoint']),_0x450923=_0x449c2f?{'browserName':'chromium','cdpEndpoint':_0x5f3582['cdpEndpoint']}:{'isolated':!![],'browserName':_0x4bffed(0x1ad),'launchOptions':{'headless':_0x15a4b2?![]:_0x5f3582['headless']??!![],...process['getuid']?.()===0x0&&{'args':[_0xeb3ddf[_0x4bffed(0x1bf)],_0x4bffed(0x1b0)]}},'contextOptions':{'permissions':[_0xeb3ddf['QEMur'],_0x4bffed(0x1b5)],'userAgent':_0x5f3582[_0x4bffed(0x185)]||undefined,'extraHTTPHeaders':_0x5f3582['headers']||{},'storageState':_0x448bef,'viewport':{'width':0x500,'height':0x2d0}}},_0x93b170={'name':_0x5ebd62,'browser':_0x450923,'capabilities':['core',_0x4bffed(0x183),'install','pdf',_0xeb3ddf[_0x4bffed(0x1c6)]],'imageResponses':'allow','saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x1c6c3a};if(!_0x449c2f){const _0x1fbd3e=_0x93b170[_0x4bffed(0x1a4)],_0x46ab40=_0x1fbd3e[_0x4bffed(0x1a1)];if(_0xeb3ddf[_0x4bffed(0x190)](_0x46ab40[_0x4bffed(0x185)],undefined))delete _0x46ab40['userAgent'];if(_0x46ab40[_0x4bffed(0x18a)]===undefined)delete _0x46ab40[_0x4bffed(0x18a)];}const _0x387d69=_0xeb3ddf['qZede'](join,_0xeb3ddf[_0x4bffed(0x189)](tmpdir),_0x4bffed(0x18b));!existsSync(_0x387d69)&&await _0xeb3ddf['HwQIS'](mkdir,_0x387d69,{'recursive':!![]});const _0x4c6aaf=_0xeb3ddf[_0x4bffed(0x1af)](join,_0x387d69,_0x5ebd62+'-'+Date[_0x4bffed(0x1a6)]()+_0x4bffed(0x1aa));return await _0xeb3ddf[_0x4bffed(0x181)](writeFile,_0x4c6aaf,JSON['stringify'](_0x93b170,null,0x2)),{'configPath':_0x4c6aaf,'tempAuthPath':_0x1ca129};}export function getNestedValue(_0x500ccf,_0xab9b33){const _0x2b6181=_0x2b39,_0x5123b5={'vECCo':function(_0x109590,_0x23ae33){return _0x109590(_0x23ae33);},'FPUbD':function(_0x4ab6f2,_0x10a72d){return _0x4ab6f2===_0x10a72d;},'wyOOD':function(_0x57d8e9,_0x33a4f7){return _0x57d8e9!==_0x33a4f7;}},_0x59388e=_0x5123b5['vECCo'](parseKeyPath,_0xab9b33);let _0x15d1c2=_0x500ccf;for(const _0x3073a8 of _0x59388e){if(_0x5123b5['FPUbD'](_0x15d1c2,null)||_0x15d1c2===undefined||_0x5123b5['wyOOD'](typeof _0x15d1c2,_0x2b6181(0x188)))return undefined;_0x15d1c2=_0x15d1c2[_0x3073a8];}return _0x15d1c2;}export function setNestedValue(_0x335690,_0x30199d,_0xab9ba6){const _0x43c226=_0x2b39,_0x5cb48e={'vNvie':'object'},_0xc48e17=parseKeyPath(_0x30199d);let _0x4d7637=_0x335690;for(let _0x213daa=0x0;_0x213daa<_0xc48e17[_0x43c226(0x195)]-0x1;_0x213daa++){const _0x3e4d8c=_0xc48e17[_0x213daa];(!(_0x3e4d8c in _0x4d7637)||typeof _0x4d7637[_0x3e4d8c]!==_0x5cb48e[_0x43c226(0x19c)])&&(_0x4d7637[_0x3e4d8c]={}),_0x4d7637=_0x4d7637[_0x3e4d8c];}_0x4d7637[_0xc48e17[_0xc48e17[_0x43c226(0x195)]-0x1]]=_0xab9ba6;}export function deleteNestedValue(_0x1ac4d1,_0x5a66a8){const _0x2c1f57=_0x2b39,_0x243ec3={'pXOQn':function(_0x1416c4,_0xd7981f){return _0x1416c4(_0xd7981f);},'eUoAg':function(_0x2ce4c2,_0x319cea){return _0x2ce4c2===_0x319cea;},'sNoYV':_0x2c1f57(0x188),'oHtYs':function(_0x28b4eb,_0x1669e8){return _0x28b4eb-_0x1669e8;},'CwdZD':function(_0x257d41,_0x5cb8a2){return _0x257d41 in _0x5cb8a2;}},_0x6495b=_0x243ec3['pXOQn'](parseKeyPath,_0x5a66a8);let _0x5e74db=_0x1ac4d1;for(let _0x50206f=0x0;_0x50206f<_0x6495b[_0x2c1f57(0x195)]-0x1;_0x50206f++){if(_0x5e74db===null||_0x243ec3[_0x2c1f57(0x17f)](_0x5e74db,undefined)||typeof _0x5e74db!=='object')return![];_0x5e74db=_0x5e74db[_0x6495b[_0x50206f]];}if(_0x5e74db===null||_0x5e74db===undefined||typeof _0x5e74db!==_0x243ec3['sNoYV'])return![];const _0x36e982=_0x6495b[_0x243ec3[_0x2c1f57(0x1b3)](_0x6495b['length'],0x1)];if(_0x243ec3['CwdZD'](_0x36e982,_0x5e74db))return delete _0x5e74db[_0x36e982],!![];return![];}function parseKeyPath(_0x5735a6){const _0x11e2bd=_0x2b39,_0x345662={'mSrMx':_0x11e2bd(0x1b6)},_0x265050=_0x5735a6[_0x11e2bd(0x197)]('.');return _0x265050[0x0]==='header'&&(_0x265050[0x0]=_0x345662['mSrMx']),_0x265050;}function _0xbfbf(){const _0xcebd51=['utf-8','rYzwk','chromium','code','HwQIS','--disable-setuid-sandbox','map','4574610MKoAce','oHtYs','auth.json.enc','clipboard-write','headers','locations','settings.json','aCdPa','6228NSPtwx','drtvl','1774044GzXuCT','3979296IaElCe','MNcil','rmYBD','configPath','path','replace','includes','XzsqO','PeFVw','DVOoQ','warn','JkSkw','4585602ORqldl','location','auth.json','339754ZhjPyi','eUoAg','trYsA','OndDk','legacy','tabs','FLWuF','userAgent','env','--no-sandbox','object','oppGK','storageState','ranger-config','sXbBF','string','lRZMJ','oLZPd','DHpql','filter','repeat','local','message','length','Bpuwh','split','rdIns','212bJhhlM','jzgdn','WdBBx','vNvie','cJzmC','20031136bFYmpS','push','all','contextOptions','yJuWt','OWGDv','browser','Failed\x20to\x20decrypt\x20auth\x20state:\x20','now','entries','ranger-auth-','RQVVt','.json'];_0xbfbf=function(){return _0xcebd51;};return _0xbfbf();}export function formatSettings(_0x2d9e92,_0x65f956=0x0){const _0x570aba=_0x2b39,_0x475ec6={'rEeDe':function(_0x15abbc,_0xe84fc6){return _0x15abbc===_0xe84fc6;}},_0x1e0e25=[],_0xd5dba9='\x20\x20'[_0x570aba(0x192)](_0x65f956);for(const [_0x2cb2ba,_0x4f043d]of Object['entries'](_0x2d9e92)){if(_0x475ec6['rEeDe'](_0x4f043d,undefined))continue;if(typeof _0x4f043d===_0x570aba(0x188)&&_0x4f043d!==null){_0x1e0e25[_0x570aba(0x19f)](''+_0xd5dba9+_0x2cb2ba+':');for(const [_0x26c37e,_0x80d9af]of Object[_0x570aba(0x1a7)](_0x4f043d)){_0x1e0e25['push'](_0xd5dba9+'\x20\x20'+_0x26c37e+':\x20'+_0x80d9af);}}else _0x1e0e25[_0x570aba(0x19f)](''+_0xd5dba9+_0x2cb2ba+':\x20'+_0x4f043d);}return _0x1e0e25['join']('\x0a');}
|
|
1
|
+
(function(_0x475b2c,_0x3cbeb7){const _0x46200c=_0x20db,_0x38a0d4=_0x475b2c();while(!![]){try{const _0x180365=parseInt(_0x46200c(0xb2))/0x1*(parseInt(_0x46200c(0xeb))/0x2)+parseInt(_0x46200c(0xc6))/0x3+parseInt(_0x46200c(0xfb))/0x4+-parseInt(_0x46200c(0xe3))/0x5*(parseInt(_0x46200c(0xe9))/0x6)+-parseInt(_0x46200c(0xf7))/0x7+-parseInt(_0x46200c(0xef))/0x8*(-parseInt(_0x46200c(0xfe))/0x9)+-parseInt(_0x46200c(0xf0))/0xa*(parseInt(_0x46200c(0xc0))/0xb);if(_0x180365===_0x3cbeb7)break;else _0x38a0d4['push'](_0x38a0d4['shift']());}catch(_0x59072f){_0x38a0d4['push'](_0x38a0d4['shift']());}}}(_0x498a,0x647e0));import{readFile,writeFile,mkdir,unlink}from'fs/promises';import{join,dirname}from'path';import{existsSync}from'fs';import{tmpdir}from'os';import{randomUUID}from'crypto';import{decrypt}from'./crypto.js';function _0x498a(){const _0xf8a365=['nhHQl','OnzaF','fnScO','928018vmQrvN','local','iXSnk','yDqHk','2105820EIoEgt','NiFLB','headers','189ivIbYh','ECMZu','SbsnC','GolRS','stringify','hURMB','1302QzxXWm','.json','push','browser','pbKgi','WAafS','hRBDc','dnzng','bGSTp','tzeAt','XYVbi','rYIsI','includes','tempAuthPath','7186674KujoFJ','ranger-config','Diore','path','\x20is\x20not\x20set','WVhNE','1899933wNacxd','replace','OJNws','pWyzV','ranger-auth-','clipboard-read','Dzunn','auth.json.enc','Environment\x20variable\x20','now','storageState','length','parse','location','warn','gRHVV','chromium','ctDlU','ENOENT','object','vision','bwAaJ','core','HtPOS','split','pdf','all','cdpEndpoint','xWGdQ','2410IpmPTy','JSgAK','locations','legacy','sessions','allow','3672rGZonx','PlQyw','634qegOEh','entries','QiJJA','getuid','218416yNKKSp','20jFJAxq','oivQD','qpoGY','sRTUz'];_0x498a=function(){return _0xf8a365;};return _0x498a();}import{getToken}from'./keychain.js';import{getRangerDir}from'./rangerRoot.js';export function getEnvDir(_0x241653){const _0x27ad0e=_0x20db,_0x28eb8f={'sorrt':function(_0x10ad6f){return _0x10ad6f();},'vhMxf':'local','hURMB':function(_0x2dbeda,_0x488e74,_0x42407d){return _0x2dbeda(_0x488e74,_0x42407d);},'vzCRl':function(_0x35cdaf,_0x4909b2,_0x14be16){return _0x35cdaf(_0x4909b2,_0x14be16);},'pWyzV':function(_0x40997b,_0xbe3ef6){return _0x40997b(_0xbe3ef6);},'qYlHt':function(_0x238184,_0x536767){return _0x238184(_0x536767);},'nhHQl':function(_0x34945e,_0x58ce71){return _0x34945e!==_0x58ce71;}},_0x5bfc17=_0x28eb8f['sorrt'](getRangerDir),_0x36a422=join(_0x5bfc17,'ci',_0x241653),_0x32407e=join(_0x5bfc17,_0x28eb8f['vhMxf'],_0x241653),_0x4687ca=join(_0x5bfc17,_0x241653),_0x25d19e=_0x28eb8f[_0x27ad0e(0x103)](join,_0x5bfc17,_0x28eb8f['vhMxf']),_0x1bc077=_0x28eb8f['vzCRl'](join,_0x5bfc17,'ci');if(existsSync(_0x36a422))return _0x36a422;if(_0x28eb8f[_0x27ad0e(0xc9)](existsSync,_0x32407e))return _0x32407e;if(_0x28eb8f['qYlHt'](existsSync,_0x4687ca)&&(_0x4687ca!==_0x25d19e&&_0x28eb8f[_0x27ad0e(0xf4)](_0x4687ca,_0x1bc077)?!![]:hasLegacyProfileFiles(_0x4687ca)))return _0x4687ca;return _0x32407e;}export function findExistingEnv(_0x1995a2,_0xc0a903){const _0x2cd3c8=_0x20db,_0x3daaa9={'iiazQ':function(_0x53b5ce){return _0x53b5ce();},'ctDlU':_0x2cd3c8(0xe6),'ECMZu':function(_0x129436,_0x53d54e,_0x3e6abe){return _0x129436(_0x53d54e,_0x3e6abe);},'xWGdQ':_0x2cd3c8(0xf8),'XYVbi':function(_0x80ba49,_0x1a9ea6,_0x3e02e7,_0x37540c){return _0x80ba49(_0x1a9ea6,_0x3e02e7,_0x37540c);},'AffqE':function(_0xb01606,_0x10ccff,_0xcc985c){return _0xb01606(_0x10ccff,_0xcc985c);},'XKcBx':function(_0x4a9d47,_0x3b26a2){return _0x4a9d47===_0x3b26a2;},'fMEuV':function(_0x814fd4,_0x528da6){return _0x814fd4(_0x528da6);}},_0x3f0b34=_0x3daaa9['iiazQ'](getRangerDir),_0x418908=_0xc0a903?.[_0x2cd3c8(0xe5)]??['ci',_0x2cd3c8(0xf8),_0x3daaa9[_0x2cd3c8(0xd7)]],_0x4c3467=_0x3daaa9['ECMZu'](join,_0x3f0b34,_0x3daaa9[_0x2cd3c8(0xe2)]),_0x1003b0=_0x3daaa9[_0x2cd3c8(0xff)](join,_0x3f0b34,'ci'),_0x4e8acb=[{'location':'ci','path':join(_0x3f0b34,'ci',_0x1995a2)},{'location':'local','path':_0x3daaa9[_0x2cd3c8(0xbc)](join,_0x3f0b34,_0x3daaa9['xWGdQ'],_0x1995a2)},{'location':_0x3daaa9['ctDlU'],'path':_0x3daaa9['AffqE'](join,_0x3f0b34,_0x1995a2)}];for(const _0x890031 of _0x4e8acb){if(_0x418908[_0x2cd3c8(0xbe)](_0x890031[_0x2cd3c8(0xd3)])&&existsSync(_0x890031['path'])){if(_0x890031[_0x2cd3c8(0xd3)]==='legacy'&&(_0x890031[_0x2cd3c8(0xc3)]===_0x4c3467||_0x3daaa9['XKcBx'](_0x890031[_0x2cd3c8(0xc3)],_0x1003b0))&&!_0x3daaa9['fMEuV'](hasLegacyProfileFiles,_0x890031[_0x2cd3c8(0xc3)]))continue;return{'path':_0x890031['path'],'location':_0x890031['location']};}}return null;}function hasLegacyProfileFiles(_0x64c4c3){const _0x252158=_0x20db,_0x1b79c4={'rYIsI':function(_0x28c517,_0x3daa4c){return _0x28c517(_0x3daa4c);},'yDqHk':'settings.json','tRPlk':function(_0x573b13,_0x27d20c){return _0x573b13(_0x27d20c);},'sRTUz':function(_0x209815,_0x399345){return _0x209815(_0x399345);},'QkfDV':function(_0xc3a5b2,_0x32068f,_0x5c76eb){return _0xc3a5b2(_0x32068f,_0x5c76eb);},'SbsnC':_0x252158(0xcd)};return _0x1b79c4[_0x252158(0xbd)](existsSync,join(_0x64c4c3,_0x1b79c4[_0x252158(0xfa)]))||_0x1b79c4['tRPlk'](existsSync,join(_0x64c4c3,'auth.json'))||_0x1b79c4[_0x252158(0xf3)](existsSync,_0x1b79c4['QkfDV'](join,_0x64c4c3,_0x1b79c4[_0x252158(0x100)]));}function _0x20db(_0x23faee,_0x388994){_0x23faee=_0x23faee-0xb2;const _0x498aa2=_0x498a();let _0x20dba4=_0x498aa2[_0x23faee];return _0x20dba4;}export function isEnvCi(_0x5a9097){const _0x2186a4={'lOcQD':function(_0x2c0419,_0x23d3b5){return _0x2c0419(_0x23d3b5);}};return _0x2186a4['lOcQD'](existsSync,join(getRangerDir(),'ci',_0x5a9097));}export async function cleanupTempFiles(_0x4f21f8){const _0xe6cc3a=_0x20db,_0x2456e1={'dkIQA':function(_0x28b7ca,_0x5c65db){return _0x28b7ca!==_0x5c65db;}},_0x449887=[_0x4f21f8[_0xe6cc3a(0xbf)],_0x4f21f8['configPath']]['filter'](Boolean);await Promise[_0xe6cc3a(0xe0)](_0x449887['map'](_0x497458=>unlink(_0x497458)['catch'](_0xce3f02=>{const _0xbea048=_0xe6cc3a;_0x2456e1['dkIQA'](_0xce3f02['code'],_0xbea048(0xd8))&&console[_0xbea048(0xd4)]('Failed\x20to\x20clean\x20up\x20temp\x20file\x20'+_0x497458+':',_0xce3f02['message']);})));}export function getSettingsPath(_0x2803d6){const _0x5c1121=_0x20db,_0x358779={'GolRS':function(_0x375edf,_0x1a98cb,_0x14fc4a){return _0x375edf(_0x1a98cb,_0x14fc4a);},'qpoGY':function(_0x5570bb,_0x4de41b){return _0x5570bb(_0x4de41b);},'Diore':'settings.json'};return _0x358779[_0x5c1121(0x101)](join,_0x358779[_0x5c1121(0xf2)](getEnvDir,_0x2803d6),_0x358779[_0x5c1121(0xc2)]);}export async function loadSettings(_0x217da1){const _0x37a417=_0x20db,_0x48e5ef={'OJNws':function(_0x1ef53f,_0x48f958){return _0x1ef53f(_0x48f958);}},_0x5767da=_0x48e5ef[_0x37a417(0xc8)](getSettingsPath,_0x217da1);if(!existsSync(_0x5767da))return{};try{const _0x44e634=await readFile(_0x5767da,'utf-8');return JSON[_0x37a417(0xd2)](_0x44e634);}catch{return{};}}export async function saveSettings(_0x14273e,_0x57d8c8){const _0x6691a=_0x20db,_0x1d75d0={'wbvbA':function(_0x45cb49,_0x5673d2){return _0x45cb49(_0x5673d2);},'PlQyw':function(_0x54fca1,_0x12d85a){return _0x54fca1(_0x12d85a);},'bGSTp':function(_0x86d1ee,_0x3a3c82,_0x35ed45){return _0x86d1ee(_0x3a3c82,_0x35ed45);}},_0x20cffc=getSettingsPath(_0x14273e),_0xb7bd14=_0x1d75d0['wbvbA'](dirname,_0x20cffc);!_0x1d75d0[_0x6691a(0xea)](existsSync,_0xb7bd14)&&await _0x1d75d0['bGSTp'](mkdir,_0xb7bd14,{'recursive':!![]}),await _0x1d75d0[_0x6691a(0xba)](writeFile,_0x20cffc,JSON['stringify'](_0x57d8c8,null,0x2));}export function resolveEnvVars(_0x47e197){const _0x34dd10=_0x20db,_0x28c87a={'JSgAK':function(_0x5b046a,_0x509050){return _0x5b046a===_0x509050;}};if(_0x28c87a[_0x34dd10(0xe4)](typeof _0x47e197,'string'))return _0x47e197[_0x34dd10(0xc7)](/\$\{(\w+)\}/g,(_0x201991,_0x245dc2)=>{const _0x5b0419=_0x34dd10,_0x148527=process['env'][_0x245dc2];if(_0x148527===undefined)throw new Error(_0x5b0419(0xce)+_0x245dc2+_0x5b0419(0xc4));return _0x148527;});if(Array['isArray'](_0x47e197))return _0x47e197['map'](resolveEnvVars);if(_0x47e197&&_0x28c87a[_0x34dd10(0xe4)](typeof _0x47e197,'object'))return Object['fromEntries'](Object[_0x34dd10(0xec)](_0x47e197)['map'](([_0x400f84,_0x5e8f81])=>[_0x400f84,resolveEnvVars(_0x5e8f81)]));return _0x47e197;}export async function buildPlaywrightConfig(_0x231914,_0x48b788,_0x51c358,_0x5aa341){const _0x5cdd61=_0x20db,_0x2062f9={'dnzng':function(_0x49df8a,_0x6f94ba){return _0x49df8a(_0x6f94ba);},'GlWYB':function(_0x2a85ee,_0xb616a3,_0x56be1b){return _0x2a85ee(_0xb616a3,_0x56be1b);},'AUtCJ':function(_0x4a2487,_0x2dce72,_0x214c35){return _0x4a2487(_0x2dce72,_0x214c35);},'RqfLt':'auth.json','oivQD':function(_0x2c67d5){return _0x2c67d5();},'hRBDc':function(_0x1600ad,_0x523a36){return _0x1600ad instanceof _0x523a36;},'vFWih':function(_0x4492cf,_0x5b0a30){return _0x4492cf(_0x5b0a30);},'OnzaF':'chromium','fnScO':function(_0x166765,_0x2daee4){return _0x166765===_0x2daee4;},'gRHVV':'--disable-setuid-sandbox','BWzjj':'clipboard-write','iXSnk':_0x5cdd61(0xdc),'bwAaJ':_0x5cdd61(0xdf),'gEDzg':_0x5cdd61(0xda)},_0x5c8cac=_0x2062f9[_0x5cdd61(0xb9)](getEnvDir,_0x48b788),_0x298bc7=_0x2062f9['GlWYB'](join,_0x5c8cac,'auth.json.enc'),_0x1e1b27=_0x2062f9['AUtCJ'](join,_0x5c8cac,_0x2062f9['RqfLt']);let _0x1bc24f,_0x272f35;if(existsSync(_0x298bc7))try{const _0x48c435=await _0x2062f9[_0x5cdd61(0xf1)](getToken);if(!_0x48c435)throw new Error('No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]');const _0x30a754=await readFile(_0x298bc7),_0x240e5f=decrypt(_0x30a754,_0x48c435);_0x272f35=join(tmpdir(),_0x5cdd61(0xca)+Date[_0x5cdd61(0xcf)]()+_0x5cdd61(0xb3)),await writeFile(_0x272f35,_0x240e5f),_0x1bc24f=_0x272f35;}catch(_0x2b0cce){const _0x28ed51=_0x2062f9[_0x5cdd61(0xb8)](_0x2b0cce,Error)?_0x2b0cce['message']:_0x2062f9[_0x5cdd61(0xb9)](String,_0x2b0cce);throw new Error('Failed\x20to\x20decrypt\x20auth\x20state:\x20'+_0x28ed51);}else _0x2062f9['vFWih'](existsSync,_0x1e1b27)&&(_0x1bc24f=_0x1e1b27);const _0x43fd94=_0x51c358||randomUUID(),_0x5a3c03=join(_0x2062f9[_0x5cdd61(0xf1)](getRangerDir),_0x5cdd61(0xe7),_0x43fd94),_0x202aa0=Boolean(_0x231914[_0x5cdd61(0xe1)]),_0x7be106=_0x202aa0?{'browserName':_0x2062f9[_0x5cdd61(0xf5)],'cdpEndpoint':_0x231914['cdpEndpoint']}:{'isolated':!![],'browserName':_0x5cdd61(0xd6),'launchOptions':{'headless':_0x5aa341?![]:_0x231914['headless']??!![],..._0x2062f9[_0x5cdd61(0xf6)](process[_0x5cdd61(0xee)]?.(),0x0)&&{'args':['--no-sandbox',_0x2062f9[_0x5cdd61(0xd5)]]}},'contextOptions':{'permissions':[_0x5cdd61(0xcb),_0x2062f9['BWzjj']],'userAgent':_0x231914['userAgent']||undefined,'extraHTTPHeaders':_0x231914['headers']||{},'storageState':_0x1bc24f,'viewport':{'width':0x500,'height':0x2d0}}},_0xb5627a={'name':_0x48b788,'browser':_0x7be106,'capabilities':[_0x2062f9[_0x5cdd61(0xf9)],'tabs','install',_0x2062f9[_0x5cdd61(0xdb)],_0x2062f9['gEDzg']],'imageResponses':_0x5cdd61(0xe8),'saveTrace':!![],'saveVideo':{'width':0x500,'height':0x2d0},'outputDir':_0x5a3c03};if(!_0x202aa0){const _0x48ce77=_0xb5627a[_0x5cdd61(0xb5)],_0x1c374c=_0x48ce77['contextOptions'];if(_0x2062f9['fnScO'](_0x1c374c['userAgent'],undefined))delete _0x1c374c['userAgent'];if(_0x1c374c[_0x5cdd61(0xd0)]===undefined)delete _0x1c374c[_0x5cdd61(0xd0)];}const _0x167560=join(tmpdir(),_0x5cdd61(0xc1));!existsSync(_0x167560)&&await mkdir(_0x167560,{'recursive':!![]});const _0x45c97f=_0x2062f9['AUtCJ'](join,_0x167560,_0x48b788+'-'+Date[_0x5cdd61(0xcf)]()+'.json');return await writeFile(_0x45c97f,JSON[_0x5cdd61(0x102)](_0xb5627a,null,0x2)),{'configPath':_0x45c97f,'tempAuthPath':_0x272f35};}export function getNestedValue(_0x4de881,_0x5be24e){const _0x310d9c=_0x20db,_0x2e117f={'QiJJA':function(_0x3528ac,_0x257f16){return _0x3528ac(_0x257f16);},'onzVb':function(_0x532140,_0x4d3c0a){return _0x532140===_0x4d3c0a;},'ThlPR':function(_0x54450b,_0x41f76f){return _0x54450b===_0x41f76f;},'NiFLB':'object'},_0x5e39d3=_0x2e117f[_0x310d9c(0xed)](parseKeyPath,_0x5be24e);let _0x40aa01=_0x4de881;for(const _0x5239b3 of _0x5e39d3){if(_0x2e117f['onzVb'](_0x40aa01,null)||_0x2e117f['ThlPR'](_0x40aa01,undefined)||typeof _0x40aa01!==_0x2e117f[_0x310d9c(0xfc)])return undefined;_0x40aa01=_0x40aa01[_0x5239b3];}return _0x40aa01;}export function setNestedValue(_0x4eace6,_0x10df25,_0xa31fa7){const _0x7f954f=_0x20db,_0x2fe9ab={'HtPOS':function(_0x244810,_0x272020){return _0x244810<_0x272020;},'mjTgw':function(_0x30f633,_0x51ce39){return _0x30f633-_0x51ce39;},'pbKgi':function(_0x5a6826,_0x26ab9d){return _0x5a6826 in _0x26ab9d;},'dNfmv':_0x7f954f(0xd9)},_0x209ad1=parseKeyPath(_0x10df25);let _0x3764d4=_0x4eace6;for(let _0x55dbcb=0x0;_0x2fe9ab[_0x7f954f(0xdd)](_0x55dbcb,_0x2fe9ab['mjTgw'](_0x209ad1['length'],0x1));_0x55dbcb++){const _0x33e052=_0x209ad1[_0x55dbcb];(!_0x2fe9ab[_0x7f954f(0xb6)](_0x33e052,_0x3764d4)||typeof _0x3764d4[_0x33e052]!==_0x2fe9ab['dNfmv'])&&(_0x3764d4[_0x33e052]={}),_0x3764d4=_0x3764d4[_0x33e052];}_0x3764d4[_0x209ad1[_0x209ad1['length']-0x1]]=_0xa31fa7;}export function deleteNestedValue(_0x5e3d85,_0x343faf){const _0x58ad06=_0x20db,_0x17f508={'qDOHr':function(_0x34702c,_0x1bbfb7){return _0x34702c(_0x1bbfb7);},'gvUeu':function(_0x44b9c0,_0x2c41c0){return _0x44b9c0<_0x2c41c0;},'jLrxH':function(_0x1eb039,_0xc8e5ea){return _0x1eb039-_0xc8e5ea;},'tzeAt':function(_0x2f3dcd,_0x1a5a78){return _0x2f3dcd===_0x1a5a78;},'bWKCM':function(_0x352378,_0x35514e){return _0x352378!==_0x35514e;}},_0x34f195=_0x17f508['qDOHr'](parseKeyPath,_0x343faf);let _0x3432f7=_0x5e3d85;for(let _0x378cab=0x0;_0x17f508['gvUeu'](_0x378cab,_0x17f508['jLrxH'](_0x34f195[_0x58ad06(0xd1)],0x1));_0x378cab++){if(_0x3432f7===null||_0x17f508[_0x58ad06(0xbb)](_0x3432f7,undefined)||typeof _0x3432f7!=='object')return![];_0x3432f7=_0x3432f7[_0x34f195[_0x378cab]];}if(_0x3432f7===null||_0x3432f7===undefined||_0x17f508['bWKCM'](typeof _0x3432f7,'object'))return![];const _0x5ae404=_0x34f195[_0x34f195['length']-0x1];if(_0x5ae404 in _0x3432f7)return delete _0x3432f7[_0x5ae404],!![];return![];}function parseKeyPath(_0x28249a){const _0x35f5a7=_0x20db,_0xd8063c={'GtMmb':function(_0x395dee,_0x25b446){return _0x395dee===_0x25b446;},'Dzunn':'header','WAafS':_0x35f5a7(0xfd)},_0x52a403=_0x28249a[_0x35f5a7(0xde)]('.');return _0xd8063c['GtMmb'](_0x52a403[0x0],_0xd8063c[_0x35f5a7(0xcc)])&&(_0x52a403[0x0]=_0xd8063c[_0x35f5a7(0xb7)]),_0x52a403;}export function formatSettings(_0x447f46,_0x1d0df6=0x0){const _0x4bf909=_0x20db,_0x1b58bd={'MyClO':function(_0x5e4a0b,_0x1e758e){return _0x5e4a0b===_0x1e758e;},'WVhNE':function(_0x451593,_0x53ced3){return _0x451593!==_0x53ced3;}},_0x4b1b8b=[],_0x4e3d4e='\x20\x20'['repeat'](_0x1d0df6);for(const [_0x6bb1f5,_0x4dfe6a]of Object[_0x4bf909(0xec)](_0x447f46)){if(_0x1b58bd['MyClO'](_0x4dfe6a,undefined))continue;if(typeof _0x4dfe6a==='object'&&_0x1b58bd[_0x4bf909(0xc5)](_0x4dfe6a,null)){_0x4b1b8b['push'](''+_0x4e3d4e+_0x6bb1f5+':');for(const [_0x2ab61c,_0x9df320]of Object[_0x4bf909(0xec)](_0x4dfe6a)){_0x4b1b8b[_0x4bf909(0xb4)](_0x4e3d4e+'\x20\x20'+_0x2ab61c+':\x20'+_0x9df320);}}else _0x4b1b8b[_0x4bf909(0xb4)](''+_0x4e3d4e+_0x6bb1f5+':\x20'+_0x4dfe6a);}return _0x4b1b8b['join']('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x57b883,_0x50d412){const _0xc39cb9=_0x2450,_0x1312f5=_0x57b883();while(!![]){try{const _0x399231=parseInt(_0xc39cb9(0x1a8))/0x1*(parseInt(_0xc39cb9(0x1aa))/0x2)+parseInt(_0xc39cb9(0x19f))/0x3+-parseInt(_0xc39cb9(0x1a3))/0x4*(parseInt(_0xc39cb9(0x1ab))/0x5)+parseInt(_0xc39cb9(0x1a1))/0x6*(parseInt(_0xc39cb9(0x1a9))/0x7)+parseInt(_0xc39cb9(0x1a7))/0x8*(-parseInt(_0xc39cb9(0x1a4))/0x9)+-parseInt(_0xc39cb9(0x1a5))/0xa*(parseInt(_0xc39cb9(0x1a2))/0xb)+-parseInt(_0xc39cb9(0x1a6))/0xc*(-parseInt(_0xc39cb9(0x1a0))/0xd);if(_0x399231===_0x50d412)break;else _0x1312f5['push'](_0x1312f5['shift']());}catch(_0x3ce17b){_0x1312f5['push'](_0x1312f5['shift']());}}}(_0x158f,0x9172c));function _0x158f(){const _0x40f23b=['13HHFqLB','5429538oyFVUm','3883TsQRXl','4396xeEFmz','558081CWAjOF','2420ECexpo','6573804BncJCU','72XcJuig','1qbuact','7gyVGSS','808552GOqjav','5095ZczcbI','1506384soUvKi'];_0x158f=function(){return _0x40f23b;};return _0x158f();}function _0x2450(_0xb08759,_0x28d613){_0xb08759=_0xb08759-0x19f;const _0x158f65=_0x158f();let _0x2450a8=_0x158f65[_0xb08759];return _0x2450a8;}import{readFileSync}from'fs';import{dirname,join}from'path';import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export function readSkillContent(_0x5c1512){const _0x19b0ae={'jmTsi':function(_0x32aff8,_0x16bfe7,_0x3d5a19,_0x1cc6b2,_0xc5a6dc){return _0x32aff8(_0x16bfe7,_0x3d5a19,_0x1cc6b2,_0xc5a6dc);},'pUBTP':function(_0x406572,_0x2cfe8e,_0x2995ca){return _0x406572(_0x2cfe8e,_0x2995ca);},'BCUCv':'utf-8'},_0x2e07db=_0x19b0ae['jmTsi'](join,__dirname,'..','..','skills'),_0x4a03c5=join(_0x2e07db,_0x5c1512);try{return _0x19b0ae['pUBTP'](readFileSync,_0x4a03c5,_0x19b0ae['BCUCv']);}catch{return'';}}export function getRangerSkillContent(){const _0x1e994a={'ysgPb':function(_0x2e50dd,_0x294490){return _0x2e50dd(_0x294490);}};return _0x1e994a['ysgPb'](readSkillContent,'ranger/SKILL.md');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function _0x4d15(_0x114251,_0x278743){_0x114251=_0x114251-0x78;const _0x5169ad=_0x5169();let _0x4d1577=_0x5169ad[_0x114251];return _0x4d1577;}const _0x4203a3=_0x4d15;(function(_0x3af201,_0x30ea3a){const _0x143202=_0x4d15,_0x561f6c=_0x3af201();while(!![]){try{const _0x1903ae=parseInt(_0x143202(0x87))/0x1*(parseInt(_0x143202(0x8b))/0x2)+parseInt(_0x143202(0x8d))/0x3*(parseInt(_0x143202(0x8a))/0x4)+-parseInt(_0x143202(0x78))/0x5*(-parseInt(_0x143202(0x7d))/0x6)+parseInt(_0x143202(0x86))/0x7+-parseInt(_0x143202(0x98))/0x8+parseInt(_0x143202(0x7f))/0x9*(parseInt(_0x143202(0x94))/0xa)+-parseInt(_0x143202(0x90))/0xb*(parseInt(_0x143202(0x93))/0xc);if(_0x1903ae===_0x30ea3a)break;else _0x561f6c['push'](_0x561f6c['shift']());}catch(_0x4f80c5){_0x561f6c['push'](_0x561f6c['shift']());}}}(_0x5169,0x786db));import{readFile,writeFile,mkdir,readdir,copyFile,rm}from'fs/promises';function _0x5169(){const _0x1fb896=['654DSZqnW','warn','27jYvVPM','skills','e2e-test-recommender','log','join','fksQY','opencode','2093861WBAgTf','1LgpOxu','bug-bash','trim','3686632wbtyNW','1703404vNNKLv','\x20\x20Location:\x20','3PFJWcP','aeftE','push','2936131olpylL','Cyqvh','dRhEV','84ZQsXXg','1663980SRRXEW','Stogd','SKILL.md','\x20\x20Skill\x20not\x20found:\x20','2036288nOspzS','OSZum','match','IhlSB','2045owAACC','project','isDirectory','oXRNq','NPzdB'];_0x5169=function(){return _0x1fb896;};return _0x5169();}import{join,dirname}from'path';import{existsSync,statSync}from'fs';import{fileURLToPath}from'url';import{logLocalAgentInstallation}from'./localAgentInstallationsApi.js';import{getSkillsDir}from'./claudeConfig.js';import{getOpencodeSkillsDir}from'./opencodeConfig.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export const RANGER_MANAGED_SKILLS=['ranger'];export const DEPRECATED_SKILLS=[_0x4203a3(0x81),_0x4203a3(0x88),'feature-tracker'];export async function installSkill(_0x4feede,_0x1b8f7c={}){const _0xa61667=_0x4203a3,_0x455706={'Cyqvh':function(_0x4989b8,_0x350436,_0x1276c8){return _0x4989b8(_0x350436,_0x1276c8);},'Stogd':function(_0x554dca,_0x63977f){return _0x554dca&&_0x63977f;},'ckCXJ':function(_0x215f52,_0x1e9b85){return _0x215f52(_0x1e9b85);},'OSZum':function(_0x5486e8,_0x1ae7d0,_0x151c90){return _0x5486e8(_0x1ae7d0,_0x151c90);},'eGBmn':function(_0x7a45f4,_0x4c5bc2,_0x2e49ef){return _0x7a45f4(_0x4c5bc2,_0x2e49ef);},'IhlSB':'utf-8','EHyYL':function(_0x4f4021,_0x1922cc,_0x152025){return _0x4f4021(_0x1922cc,_0x152025);},'FjGQE':_0xa61667(0x96),'rTobQ':function(_0x1d00b0,_0x13140c,_0x2d61e0,_0x187b34){return _0x1d00b0(_0x13140c,_0x2d61e0,_0x187b34);},'NPzdB':function(_0x44b50e,_0x4c5d26){return _0x44b50e(_0x4c5d26);},'sZRrF':function(_0x209be6,_0x294c6d){return _0x209be6>_0x294c6d;},'BSWFz':function(_0x4a7c99,_0x894ac2,_0x23d4e8,_0x5cc7c1){return _0x4a7c99(_0x894ac2,_0x23d4e8,_0x5cc7c1);}},{level:level=_0xa61667(0x79),cliVersion:_0x2b066a,platform:platform='claude'}=_0x1b8f7c,_0x54c1be=getSourceSkillsDir(),_0x24e4e0=join(_0x54c1be,_0x4feede),_0x2c42fd=join(_0x54c1be,_0x4feede+'.md'),_0x42ffa0=existsSync(_0x24e4e0)&&statSync(_0x24e4e0)[_0xa61667(0x7a)]()&&existsSync(_0x455706[_0xa61667(0x91)](join,_0x24e4e0,'SKILL.md')),_0x53cc48=existsSync(_0x2c42fd);if(_0x455706[_0xa61667(0x95)](!_0x42ffa0,!_0x53cc48))return console[_0xa61667(0x7e)](_0xa61667(0x97)+_0x4feede),![];const _0x2aa474=platform===_0xa61667(0x85)?_0x455706['ckCXJ'](getOpencodeSkillsDir,level):_0x455706['ckCXJ'](getSkillsDir,level),_0x5d43aa=_0x455706['Cyqvh'](join,_0x2aa474,_0x4feede);await mkdir(_0x5d43aa,{'recursive':!![]});let _0x1eee70,_0x548664=[];if(_0x42ffa0){const _0x2a9dbc=await readdir(_0x24e4e0),_0x2dda36=_0x2a9dbc['filter'](_0x28bbb1=>_0x28bbb1['endsWith']('.md'));for(const _0xae16cf of _0x2dda36){const _0x13d71b=_0x455706[_0xa61667(0x99)](join,_0x24e4e0,_0xae16cf),_0x348ec9=join(_0x5d43aa,_0xae16cf);await copyFile(_0x13d71b,_0x348ec9),_0x548664[_0xa61667(0x8f)](_0xae16cf);}_0x1eee70=await readFile(join(_0x24e4e0,_0xa61667(0x96)),'utf-8');}else{_0x1eee70=await _0x455706['eGBmn'](readFile,_0x2c42fd,_0x455706[_0xa61667(0x9b)]);const _0x5c8dfc=_0x455706['EHyYL'](join,_0x5d43aa,_0x455706['FjGQE']);await _0x455706['rTobQ'](writeFile,_0x5c8dfc,_0x1eee70,_0x455706[_0xa61667(0x9b)]),_0x548664['push'](_0xa61667(0x96));}const {name:_0x1208e9}=_0x455706[_0xa61667(0x7c)](parseFrontmatter,_0x1eee70);return console[_0xa61667(0x82)]('\x20\x20Installed\x20skill:\x20'+_0x1208e9),console[_0xa61667(0x82)](_0xa61667(0x8c)+_0x5d43aa),_0x455706['sZRrF'](_0x548664['length'],0x1)&&console[_0xa61667(0x82)]('\x20\x20Files:\x20'+_0x548664[_0xa61667(0x83)](',\x20')),_0x455706['BSWFz'](logLocalAgentInstallation,_0x4feede,{'skillDisplayName':_0x1208e9,'installLevel':level},_0x2b066a)['catch'](()=>{}),!![];}function getSourceSkillsDir(){const _0x44613c=_0x4203a3,_0x61e0a8={'dRhEV':function(_0x1900bd,_0x96eecb,_0x463f3c,_0x4e2012,_0x113c50){return _0x1900bd(_0x96eecb,_0x463f3c,_0x4e2012,_0x113c50);}},_0x42538e=[_0x61e0a8[_0x44613c(0x92)](join,__dirname,'..','..','skills'),join(__dirname,'..','..','..',_0x44613c(0x80))];for(const _0x5199d4 of _0x42538e){if(existsSync(_0x5199d4))return _0x5199d4;}return _0x42538e[0x0];}function parseFrontmatter(_0x1795b9){const _0x2cd846=_0x4203a3,_0x1073dc=_0x1795b9['match'](/^---\n([\s\S]+?)\n---/);if(!_0x1073dc)throw new Error('Invalid\x20skill\x20frontmatter');const _0x860f65=_0x1073dc[0x1],_0x2d3845=_0x860f65[_0x2cd846(0x9a)](/name:\s*(.+)/),_0x564b9a=_0x860f65[_0x2cd846(0x9a)](/description:\s*"?(.+?)"?\n/);return{'name':_0x2d3845?.[0x1]['trim']()||'','description':_0x564b9a?.[0x1][_0x2cd846(0x89)]()||''};}export async function removeSkill(_0x282441,_0x5dc3f6){const _0x174398=_0x4203a3,_0xd830be={'aeftE':function(_0xfb67a9,_0x37a965){return _0xfb67a9(_0x37a965);},'oXRNq':function(_0x152e31,_0x28bdea){return _0x152e31(_0x28bdea);},'fksQY':function(_0x1736a1,_0x3902cf,_0x3624c4){return _0x1736a1(_0x3902cf,_0x3624c4);}},_0x5830b9=_0xd830be[_0x174398(0x8e)](getSkillsDir,_0x5dc3f6),_0x3a1e03=join(_0x5830b9,_0x282441);if(!_0xd830be[_0x174398(0x7b)](existsSync,_0x3a1e03))return![];try{return await _0xd830be[_0x174398(0x84)](rm,_0x3a1e03,{'recursive':!![]}),console['log']('\x20\x20Removed\x20deprecated\x20skill:\x20'+_0x282441),!![];}catch{return console[_0x174398(0x7e)]('\x20\x20Failed\x20to\x20remove\x20deprecated\x20skill:\x20'+_0x282441),![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x457719=_0xfdd9;(function(_0xab939c,_0x57f899){const _0x3f469a=_0xfdd9,_0x2674f4=_0xab939c();while(!![]){try{const _0x49cc34=-parseInt(_0x3f469a(0x204))/0x1+parseInt(_0x3f469a(0x212))/0x2*(-parseInt(_0x3f469a(0x226))/0x3)+-parseInt(_0x3f469a(0x20d))/0x4*(parseInt(_0x3f469a(0x205))/0x5)+-parseInt(_0x3f469a(0x202))/0x6*(-parseInt(_0x3f469a(0x228))/0x7)+-parseInt(_0x3f469a(0x209))/0x8*(parseInt(_0x3f469a(0x21a))/0x9)+parseInt(_0x3f469a(0x1f3))/0xa+-parseInt(_0x3f469a(0x213))/0xb*(-parseInt(_0x3f469a(0x201))/0xc);if(_0x49cc34===_0x57f899)break;else _0x2674f4['push'](_0x2674f4['shift']());}catch(_0x6e8b83){_0x2674f4['push'](_0x2674f4['shift']());}}}(_0x2654,0x50f6f));import{randomUUID}from'crypto';import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{getCurrentVersion}from'./version.js';export class TelemetryCollector{['buffer']=[];['commandId'];[_0x457719(0x21c)];[_0x457719(0x225)];['phaseCounter']=0x0;[_0x457719(0x229)]=new Map();[_0x457719(0x217)]=null;[_0x457719(0x1fe)];[_0x457719(0x1f9)];[_0x457719(0x211)];[_0x457719(0x200)];[_0x457719(0x21b)];[_0x457719(0x20b)];[_0x457719(0x214)];['browserSessionId'];constructor(_0x1f5123){const _0x1cd6ec=_0x457719;this[_0x1cd6ec(0x216)]=randomUUID(),this[_0x1cd6ec(0x21c)]=_0x1f5123,this['commandStartTime']=Date[_0x1cd6ec(0x1fd)](),this['cliVersion']=getCurrentVersion(),this[_0x1cd6ec(0x1f9)]=process['version'],this[_0x1cd6ec(0x211)]=process[_0x1cd6ec(0x211)],this[_0x1cd6ec(0x200)]=process['stdout']['isTTY']??![],this['isCI']=!!(process['env']['CI']||process[_0x1cd6ec(0x220)][_0x1cd6ec(0x22f)]);}['setContext'](_0x109909){const _0x43390c=_0x457719;if(_0x109909[_0x43390c(0x20b)])this[_0x43390c(0x20b)]=_0x109909['featureId'];if(_0x109909[_0x43390c(0x214)])this[_0x43390c(0x214)]=_0x109909['checklistItemId'];if(_0x109909[_0x43390c(0x1fb)])this['browserSessionId']=_0x109909[_0x43390c(0x1fb)];}async[_0x457719(0x221)](_0x810535){const _0x1c2939=_0x457719,_0x2e7df8=this['buildEvent']({'eventType':_0x1c2939(0x20a),'metadata':_0x810535});await this[_0x1c2939(0x1fc)](_0x2e7df8);}async[_0x457719(0x224)](_0x7440af,_0x2736d4){const _0x2fbc1a=_0x457719,_0x5c888={'dZuQA':'command_end'},_0x55af57=this['buildEvent']({'eventType':_0x5c888[_0x2fbc1a(0x203)],'outcome':_0x7440af,'durationMs':Date['now']()-this[_0x2fbc1a(0x225)],'metadata':_0x2736d4});await this[_0x2fbc1a(0x1fc)](_0x55af57),await this['flush']();}async[_0x457719(0x219)](_0x1038b9,_0x20ebad){const _0x919a28=_0x457719,_0xf1aed0={'TxkqR':function(_0x3ce224,_0x7f2589){return _0x3ce224 instanceof _0x7f2589;},'gvBGe':_0x919a28(0x215)},_0x11cddb=this['buildEvent']({'eventType':'command_error','errorMessage':truncate(_0x1038b9 instanceof Error?_0x1038b9['message']:String(_0x1038b9),0x1f4),'errorType':_0xf1aed0['TxkqR'](_0x1038b9,Error)?_0x1038b9[_0x919a28(0x218)][_0x919a28(0x1f6)]:_0xf1aed0[_0x919a28(0x21e)],'durationMs':Date[_0x919a28(0x1fd)]()-this[_0x919a28(0x225)],'metadata':_0x20ebad});await this['sendImmediate'](_0x11cddb),await this['flush']();}['trackPhaseStart'](_0x2e652c,_0x52a3cd){const _0x1205ca=_0x457719;this[_0x1205ca(0x20f)]++,this[_0x1205ca(0x229)]['set'](_0x2e652c,Date['now']());const _0x2f3e5b=this['buildEvent']({'eventType':'phase_start','phase':_0x2e652c,'phaseIndex':this[_0x1205ca(0x20f)],'metadata':_0x52a3cd});this[_0x1205ca(0x1f4)][_0x1205ca(0x1f5)](_0x2f3e5b);}[_0x457719(0x20e)](_0x469827,_0x1fdf34){const _0x2bedaa=_0x457719,_0x54a8e4={'KSTbG':function(_0x1ca101,_0x26f938){return _0x1ca101-_0x26f938;}},_0x55db95=this['phaseStartTimes'][_0x2bedaa(0x22d)](_0x469827),_0x473449=_0x55db95?_0x54a8e4[_0x2bedaa(0x1f8)](Date[_0x2bedaa(0x1fd)](),_0x55db95):undefined;this[_0x2bedaa(0x229)]['delete'](_0x469827);const _0x361bc5=this[_0x2bedaa(0x21f)]({'eventType':_0x2bedaa(0x223),'phase':_0x469827,'durationMs':_0x473449,'metadata':_0x1fdf34});this['buffer']['push'](_0x361bc5),this[_0x2bedaa(0x1f4)][_0x2bedaa(0x208)]>=0xa&&this[_0x2bedaa(0x22c)]();}async['trackPhaseError'](_0x286e28,_0x45c880,_0x3e4544){const _0x45744d=_0x457719,_0x15c8d5={'BofOK':function(_0x167c6a,_0x55c03e,_0x56164c){return _0x167c6a(_0x55c03e,_0x56164c);},'dPrdp':function(_0x3d8755,_0x174c12){return _0x3d8755(_0x174c12);},'rCrgb':_0x45744d(0x215)},_0x40b0f4=this['phaseStartTimes']['get'](_0x286e28),_0x524cc6=_0x40b0f4?Date[_0x45744d(0x1fd)]()-_0x40b0f4:undefined;this['phaseStartTimes']['delete'](_0x286e28);const _0x122bc0=this['buildEvent']({'eventType':'phase_error','phase':_0x286e28,'durationMs':_0x524cc6,'errorMessage':_0x15c8d5['BofOK'](truncate,_0x45c880 instanceof Error?_0x45c880[_0x45744d(0x22a)]:_0x15c8d5[_0x45744d(0x231)](String,_0x45c880),0x1f4),'errorType':_0x45c880 instanceof Error?_0x45c880[_0x45744d(0x218)]['name']:_0x15c8d5['rCrgb'],'metadata':_0x3e4544});await this[_0x45744d(0x1fc)](_0x122bc0);}async['flush'](){const _0xcaec5e=_0x457719;if(this['buffer'][_0xcaec5e(0x208)]===0x0)return;const _0x29a4de=this[_0xcaec5e(0x1f4)]['splice'](0x0);try{await this['sendBatch'](_0x29a4de);}catch{}}['buildEvent'](_0x20540f){const _0x36edd9=_0x457719;return{'eventType':_0x20540f['eventType'],'command':this['command'],'commandId':this['commandId'],'timestamp':new Date()['toISOString'](),'durationMs':_0x20540f[_0x36edd9(0x20c)],'phase':_0x20540f['phase'],'phaseIndex':_0x20540f[_0x36edd9(0x210)],'outcome':_0x20540f['outcome'],'errorMessage':_0x20540f['errorMessage'],'errorType':_0x20540f['errorType'],'featureId':this[_0x36edd9(0x20b)],'checklistItemId':this[_0x36edd9(0x214)],'browserSessionId':this[_0x36edd9(0x1fb)],'evaluation':_0x20540f['evaluation'],'cliVersion':this[_0x36edd9(0x1fe)],'nodeVersion':this[_0x36edd9(0x1f9)],'platform':this['platform'],'isTty':this[_0x36edd9(0x200)],'isCI':this[_0x36edd9(0x21b)],'metadata':_0x20540f[_0x36edd9(0x22b)]};}async[_0x457719(0x1fc)](_0x267846){const _0x56d1f7=_0x457719;try{await this[_0x56d1f7(0x206)]([_0x267846]);}catch{}}['flushAsync'](){const _0x754bd5=_0x457719;if(this[_0x754bd5(0x217)])return;this['flushing']=this['flush']()[_0x754bd5(0x207)](()=>{const _0x4a14e0=_0x754bd5;this[_0x4a14e0(0x217)]=null;});}async[_0x457719(0x206)](_0xa9cd1c){const _0x30fe7f=_0x457719,_0xdacecb={'rHuLz':_0x30fe7f(0x222)},_0x2f3438=await getToken()[_0x30fe7f(0x227)](()=>null),_0x2a2077=getApiBaseUrl(),_0x449e1b={'Content-Type':_0xdacecb['rHuLz']};_0x2f3438&&(_0x449e1b['Authorization']='Bearer\x20'+_0x2f3438);const _0x51c77c={'events':_0xa9cd1c};process['env'][_0x30fe7f(0x230)]&&console['error']('[telemetry]\x20Sending\x20'+_0xa9cd1c[_0x30fe7f(0x208)]+_0x30fe7f(0x22e)+_0x2a2077+_0x30fe7f(0x1fa));const _0x1a445c=new AbortController(),_0x26c240=setTimeout(()=>_0x1a445c['abort'](),0x1388);try{await fetch(_0x2a2077+'/api/v1/mcp/cli-telemetry',{'method':'POST','headers':_0x449e1b,'body':JSON['stringify'](_0x51c77c),'signal':_0x1a445c['signal']});}finally{clearTimeout(_0x26c240);}}}function _0xfdd9(_0x5563e5,_0x590f98){_0x5563e5=_0x5563e5-0x1f3;const _0x2654eb=_0x2654();let _0xfdd9cb=_0x2654eb[_0x5563e5];return _0xfdd9cb;}let currentCollector=null;export function createTelemetryCollector(_0x20f727){return currentCollector=new TelemetryCollector(_0x20f727),currentCollector;}function _0x2654(){const _0x4f85bf=['browserSessionId','sendImmediate','now','cliVersion','slice','isTty','36DIuoua','1162266zomvGY','dZuQA','177132AZqICn','1055155QfbprV','sendBatch','finally','length','14608IZHLdY','command_start','featureId','durationMs','4UMzUhg','trackPhaseEnd','phaseCounter','phaseIndex','platform','792eJiuHT','4371103DGSKSN','checklistItemId','Unknown','commandId','flushing','constructor','trackCommandError','2727xOnwJh','isCI','command','success','gvBGe','buildEvent','env','trackCommandStart','application/json','phase_end','trackCommandEnd','commandStartTime','3183WhKagV','catch','7QBidZe','phaseStartTimes','message','metadata','flushAsync','get','\x20event(s)\x20to\x20','GITHUB_ACTIONS','DEBUG','dPrdp','3073980EilPYL','buffer','push','name','flush','KSTbG','nodeVersion','/api/v1/mcp/cli-telemetry'];_0x2654=function(){return _0x4f85bf;};return _0x2654();}export function getCurrentCollector(){return currentCollector;}export async function withTelemetry(_0x29f04d,_0x2c2a83,_0x52de9d){const _0x5a1675=_0x457719,_0x572815={'FEQRw':function(_0x17621d,_0xeb98bc){return _0x17621d(_0xeb98bc);}},_0x14f9fc=createTelemetryCollector(_0x29f04d);await _0x14f9fc['trackCommandStart'](_0x52de9d);try{const _0x491937=await _0x572815['FEQRw'](_0x2c2a83,_0x14f9fc);return await _0x14f9fc['trackCommandEnd'](_0x5a1675(0x21d)),_0x491937;}catch(_0x115c80){await _0x14f9fc[_0x5a1675(0x219)](_0x115c80);throw _0x115c80;}finally{await _0x14f9fc[_0x5a1675(0x1f7)]();}}function truncate(_0x226b1f,_0x512f71){const _0x459e3c=_0x457719,_0x5a1e1c={'NpbSt':function(_0x4443ec,_0x5b8bc8){return _0x4443ec>_0x5b8bc8;}};return _0x5a1e1c['NpbSt'](_0x226b1f['length'],_0x512f71)?_0x226b1f[_0x459e3c(0x1ff)](0x0,_0x512f71)+'...':_0x226b1f;}
|
|
1
|
+
const _0x213d49=_0x2d9a;function _0x36aa(){const _0x94890a=['/api/v1/mcp/cli-telemetry','flushing','isTTY','.ranger','jJnCC','success','commandId','trackCommandEnd','ltqBs','POST','abort','3CExXZL','TWXiG','32jRUQOm','setContext','flush','WDIZw','150110rzbkkA','browserSessionId','checklistItemId','99577GWdPuO','phase_end','name','version','JuYgA','deviceId','push','PpXVt','42560dMgXOD','1540wSoCJC','phase','buildEvent','message','featureId','sendImmediate','now','platform','Przxk','1502750mPlyxI','trackPhaseError','TvVgN','sendBatch','buffer','constructor','command_start','phaseCounter','GITHUB_ACTIONS','4873kLGYWX','[telemetry]\x20Sending\x20','isTty','GQfTW','cliVersion','evaluation','command_end','LjPjF','phaseStartTimes','stdout','ncEzZ','MqAYr','env','isCI','40RVopAn','4392TutXNw','DEBUG','5064jswhua','set','333873pxOUds','delete','trackCommandError','Unknown','phase_error','trackCommandStart','trackPhaseStart','trim','command','trackPhaseEnd'];_0x36aa=function(){return _0x94890a;};return _0x36aa();}(function(_0x4d8b21,_0x4bc6f5){const _0x4983da=_0x2d9a,_0x1665c3=_0x4d8b21();while(!![]){try{const _0x4381b0=parseInt(_0x4983da(0xd8))/0x1+parseInt(_0x4983da(0xd5))/0x2*(parseInt(_0x4983da(0xcf))/0x3)+parseInt(_0x4983da(0xb5))/0x4*(-parseInt(_0x4983da(0x94))/0x5)+-parseInt(_0x4983da(0xb8))/0x6*(-parseInt(_0x4983da(0x95))/0x7)+-parseInt(_0x4983da(0xd1))/0x8*(-parseInt(_0x4983da(0xba))/0x9)+-parseInt(_0x4983da(0x9e))/0xa+-parseInt(_0x4983da(0xa7))/0xb*(parseInt(_0x4983da(0xb6))/0xc);if(_0x4381b0===_0x4bc6f5)break;else _0x1665c3['push'](_0x1665c3['shift']());}catch(_0xafd29a){_0x1665c3['push'](_0x1665c3['shift']());}}}(_0x36aa,0x1b23f));import{randomUUID}from'crypto';import{existsSync,mkdirSync,readFileSync,writeFileSync}from'fs';import{join}from'path';import{homedir}from'os';import{getToken}from'./keychain.js';function _0x2d9a(_0x380658,_0x12bed0){_0x380658=_0x380658-0x8d;const _0x36aa94=_0x36aa();let _0x2d9a9c=_0x36aa94[_0x380658];return _0x2d9a9c;}import{getApiBaseUrl}from'./environment.js';import{getCurrentVersion}from'./version.js';let cachedDeviceId=null;function getDeviceId(){const _0x2a4bc4=_0x2d9a,_0x4098ad={'Przxk':function(_0x589ab6,_0x520de8,_0x228b8a){return _0x589ab6(_0x520de8,_0x228b8a);},'kMbkT':_0x2a4bc4(0xc7),'LjPjF':function(_0x5987d2,_0x55cb76){return _0x5987d2(_0x55cb76);},'TWXiG':function(_0xd04568,_0xca395,_0x1a8647){return _0xd04568(_0xca395,_0x1a8647);},'vrWFV':function(_0x281b77){return _0x281b77();},'PpXVt':function(_0x243fd2){return _0x243fd2();}};if(cachedDeviceId)return cachedDeviceId;try{const _0x4737ee=_0x4098ad[_0x2a4bc4(0x9d)](join,homedir(),_0x4098ad['kMbkT']),_0x602bde=join(_0x4737ee,'.session');if(_0x4098ad[_0x2a4bc4(0xae)](existsSync,_0x602bde)){cachedDeviceId=_0x4098ad[_0x2a4bc4(0xd0)](readFileSync,_0x602bde,'utf-8')[_0x2a4bc4(0xc1)]();if(cachedDeviceId)return cachedDeviceId;}return cachedDeviceId=_0x4098ad['vrWFV'](randomUUID),mkdirSync(_0x4737ee,{'recursive':!![]}),writeFileSync(_0x602bde,cachedDeviceId),cachedDeviceId;}catch{return cachedDeviceId=_0x4098ad[_0x2a4bc4(0x93)](randomUUID),cachedDeviceId;}}export class TelemetryCollector{['buffer']=[];[_0x213d49(0xca)];['command'];['commandStartTime'];[_0x213d49(0xa5)]=0x0;['phaseStartTimes']=new Map();[_0x213d49(0xc5)]=null;[_0x213d49(0x91)];[_0x213d49(0xab)];['nodeVersion'];[_0x213d49(0x9c)];[_0x213d49(0xa9)];[_0x213d49(0xb4)];[_0x213d49(0x99)];['checklistItemId'];[_0x213d49(0xd6)];constructor(_0x3741f2){const _0x26d444=_0x213d49,_0x5b9250={'ysTpo':function(_0x251b17){return _0x251b17();},'ltqBs':function(_0x24a4b3){return _0x24a4b3();}};this['commandId']=_0x5b9250['ysTpo'](randomUUID),this[_0x26d444(0xc2)]=_0x3741f2,this['commandStartTime']=Date['now'](),this['deviceId']=_0x5b9250[_0x26d444(0xcc)](getDeviceId),this['cliVersion']=_0x5b9250['ltqBs'](getCurrentVersion),this['nodeVersion']=process[_0x26d444(0x8f)],this['platform']=process[_0x26d444(0x9c)],this[_0x26d444(0xa9)]=process[_0x26d444(0xb0)][_0x26d444(0xc6)]??![],this[_0x26d444(0xb4)]=!!(process[_0x26d444(0xb3)]['CI']||process[_0x26d444(0xb3)][_0x26d444(0xa6)]);}[_0x213d49(0xd2)](_0x407da9){const _0x529649=_0x213d49;if(_0x407da9['featureId'])this[_0x529649(0x99)]=_0x407da9[_0x529649(0x99)];if(_0x407da9[_0x529649(0xd7)])this['checklistItemId']=_0x407da9[_0x529649(0xd7)];if(_0x407da9[_0x529649(0xd6)])this['browserSessionId']=_0x407da9[_0x529649(0xd6)];}async[_0x213d49(0xbf)](_0x1ad0c6){const _0x3a4214=_0x213d49,_0x3c71ca={'tVLSg':_0x3a4214(0xa4)},_0x2cf506=this[_0x3a4214(0x97)]({'eventType':_0x3c71ca['tVLSg'],'metadata':_0x1ad0c6});await this['sendImmediate'](_0x2cf506);}async[_0x213d49(0xcb)](_0x31a9a6,_0x38145c){const _0x40cce8=_0x213d49,_0x39df02=this['buildEvent']({'eventType':_0x40cce8(0xad),'outcome':_0x31a9a6,'durationMs':Date['now']()-this['commandStartTime'],'metadata':_0x38145c});await this[_0x40cce8(0x9a)](_0x39df02),await this['flush']();}async[_0x213d49(0xbc)](_0x851ae4,_0x1922ea){const _0x399538=_0x213d49,_0xfabf95={'SFuBj':'command_error','JuYgA':function(_0x56cbe7,_0x2d0d11){return _0x56cbe7 instanceof _0x2d0d11;},'aOaOZ':function(_0x24e876,_0x4008e7){return _0x24e876 instanceof _0x4008e7;},'QwRMH':_0x399538(0xbd),'VZsVg':function(_0x386fc3,_0x2ceb1a){return _0x386fc3-_0x2ceb1a;}},_0x4a0acc=this[_0x399538(0x97)]({'eventType':_0xfabf95['SFuBj'],'errorMessage':truncate(_0xfabf95[_0x399538(0x90)](_0x851ae4,Error)?_0x851ae4[_0x399538(0x98)]:String(_0x851ae4),0x1f4),'errorType':_0xfabf95['aOaOZ'](_0x851ae4,Error)?_0x851ae4[_0x399538(0xa3)][_0x399538(0x8e)]:_0xfabf95['QwRMH'],'durationMs':_0xfabf95['VZsVg'](Date['now'](),this['commandStartTime']),'metadata':_0x1922ea});await this[_0x399538(0x9a)](_0x4a0acc),await this[_0x399538(0xd3)]();}[_0x213d49(0xc0)](_0xab885a,_0x5c7d2c){const _0x92eeaf=_0x213d49;this[_0x92eeaf(0xa5)]++,this[_0x92eeaf(0xaf)][_0x92eeaf(0xb9)](_0xab885a,Date[_0x92eeaf(0x9b)]());const _0x2bfcdd=this['buildEvent']({'eventType':'phase_start','phase':_0xab885a,'phaseIndex':this['phaseCounter'],'metadata':_0x5c7d2c});this[_0x92eeaf(0xa2)]['push'](_0x2bfcdd);}[_0x213d49(0xc3)](_0x24b2bb,_0x2211c4){const _0x394946=_0x213d49,_0x421663={'jJnCC':function(_0xeaa7f2,_0x2cf507){return _0xeaa7f2-_0x2cf507;},'ncEzZ':_0x394946(0x8d)},_0x14b60d=this[_0x394946(0xaf)]['get'](_0x24b2bb),_0x5efc78=_0x14b60d?_0x421663[_0x394946(0xc8)](Date['now'](),_0x14b60d):undefined;this[_0x394946(0xaf)][_0x394946(0xbb)](_0x24b2bb);const _0x17f34e=this[_0x394946(0x97)]({'eventType':_0x421663[_0x394946(0xb1)],'phase':_0x24b2bb,'durationMs':_0x5efc78,'metadata':_0x2211c4});this['buffer'][_0x394946(0x92)](_0x17f34e),this[_0x394946(0xa2)]['length']>=0xa&&this['flushAsync']();}async[_0x213d49(0x9f)](_0x6cea3c,_0x2460e7,_0x1caa45){const _0x3ee965=_0x213d49,_0x45ef09={'QWYpE':_0x3ee965(0xbe),'FyXYt':function(_0x39bb6a,_0x24c5b9,_0x4fed64){return _0x39bb6a(_0x24c5b9,_0x4fed64);},'TvVgN':function(_0x3a6db4,_0x56c408){return _0x3a6db4(_0x56c408);},'SjwFD':'Unknown'},_0x36d3dd=this[_0x3ee965(0xaf)]['get'](_0x6cea3c),_0x44bcbb=_0x36d3dd?Date['now']()-_0x36d3dd:undefined;this[_0x3ee965(0xaf)][_0x3ee965(0xbb)](_0x6cea3c);const _0x520b1e=this[_0x3ee965(0x97)]({'eventType':_0x45ef09['QWYpE'],'phase':_0x6cea3c,'durationMs':_0x44bcbb,'errorMessage':_0x45ef09['FyXYt'](truncate,_0x2460e7 instanceof Error?_0x2460e7['message']:_0x45ef09[_0x3ee965(0xa0)](String,_0x2460e7),0x1f4),'errorType':_0x2460e7 instanceof Error?_0x2460e7['constructor']['name']:_0x45ef09['SjwFD'],'metadata':_0x1caa45});await this[_0x3ee965(0x9a)](_0x520b1e);}async['flush'](){const _0x380fbe=_0x213d49;if(this[_0x380fbe(0xa2)]['length']===0x0)return;const _0x2bc805=this['buffer']['splice'](0x0);try{await this[_0x380fbe(0xa1)](_0x2bc805);}catch{}}['buildEvent'](_0x4039fc){const _0x318a26=_0x213d49;return{'eventType':_0x4039fc['eventType'],'command':this['command'],'commandId':this[_0x318a26(0xca)],'deviceId':this['deviceId'],'timestamp':new Date()['toISOString'](),'durationMs':_0x4039fc['durationMs'],'phase':_0x4039fc[_0x318a26(0x96)],'phaseIndex':_0x4039fc['phaseIndex'],'outcome':_0x4039fc['outcome'],'errorMessage':_0x4039fc['errorMessage'],'errorType':_0x4039fc['errorType'],'featureId':this[_0x318a26(0x99)],'checklistItemId':this['checklistItemId'],'browserSessionId':this[_0x318a26(0xd6)],'evaluation':_0x4039fc[_0x318a26(0xac)],'cliVersion':this['cliVersion'],'nodeVersion':this['nodeVersion'],'platform':this['platform'],'isTty':this[_0x318a26(0xa9)],'isCI':this[_0x318a26(0xb4)],'metadata':_0x4039fc['metadata']};}async[_0x213d49(0x9a)](_0x5e81e3){const _0x46b9ed=_0x213d49;try{await this[_0x46b9ed(0xa1)]([_0x5e81e3]);}catch{}}['flushAsync'](){const _0x57a8b7=_0x213d49;if(this['flushing'])return;this[_0x57a8b7(0xc5)]=this[_0x57a8b7(0xd3)]()['finally'](()=>{this['flushing']=null;});}async['sendBatch'](_0x2fda4c){const _0x27e9ae=_0x213d49,_0x21de6b={'tMAII':function(_0x4652e6){return _0x4652e6();},'JZBWI':function(_0x14c1b7){return _0x14c1b7();},'IOnhi':'application/json','GQfTW':function(_0x201084,_0x1a9724,_0x5a3da7){return _0x201084(_0x1a9724,_0x5a3da7);},'PCElA':function(_0x36efdf,_0x5d92e7){return _0x36efdf(_0x5d92e7);}},_0x3be4e7=await _0x21de6b['tMAII'](getToken)['catch'](()=>null),_0x45d6ee=_0x21de6b['JZBWI'](getApiBaseUrl),_0x1eee3b={'Content-Type':_0x21de6b['IOnhi']};_0x3be4e7&&(_0x1eee3b['Authorization']='Bearer\x20'+_0x3be4e7);const _0x24bb0f={'events':_0x2fda4c};process['env'][_0x27e9ae(0xb7)]&&console['error'](_0x27e9ae(0xa8)+_0x2fda4c['length']+'\x20event(s)\x20to\x20'+_0x45d6ee+_0x27e9ae(0xc4));const _0x25f093=new AbortController(),_0x33fd8d=_0x21de6b[_0x27e9ae(0xaa)](setTimeout,()=>_0x25f093[_0x27e9ae(0xce)](),0x1388);try{await _0x21de6b['GQfTW'](fetch,_0x45d6ee+_0x27e9ae(0xc4),{'method':_0x27e9ae(0xcd),'headers':_0x1eee3b,'body':JSON['stringify'](_0x24bb0f),'signal':_0x25f093['signal']});}finally{_0x21de6b['PCElA'](clearTimeout,_0x33fd8d);}}}let currentCollector=null;export function createTelemetryCollector(_0x29d742){return currentCollector=new TelemetryCollector(_0x29d742),currentCollector;}export function getCurrentCollector(){return currentCollector;}export async function withTelemetry(_0x3aaec3,_0x49843e,_0x1161a5){const _0x22e386=_0x213d49,_0xcff3ee={'IBTUz':function(_0x4951f0,_0x74192){return _0x4951f0(_0x74192);},'WDIZw':function(_0x4721e7,_0x5aa4ac){return _0x4721e7(_0x5aa4ac);},'MqAYr':_0x22e386(0xc9)},_0x5564c8=_0xcff3ee['IBTUz'](createTelemetryCollector,_0x3aaec3);await _0x5564c8['trackCommandStart'](_0x1161a5);try{const _0x58db14=await _0xcff3ee[_0x22e386(0xd4)](_0x49843e,_0x5564c8);return await _0x5564c8[_0x22e386(0xcb)](_0xcff3ee[_0x22e386(0xb2)]),_0x58db14;}catch(_0x3fbe6c){await _0x5564c8['trackCommandError'](_0x3fbe6c);throw _0x3fbe6c;}finally{await _0x5564c8['flush']();}}function truncate(_0x1664bf,_0x8e2a2){const _0x551949={'dxrPr':function(_0x31f3f6,_0x27f317){return _0x31f3f6>_0x27f317;},'GkvbQ':function(_0x4cf4a2,_0x4ea36f){return _0x4cf4a2+_0x4ea36f;},'LjfEr':'...'};return _0x551949['dxrPr'](_0x1664bf['length'],_0x8e2a2)?_0x551949['GkvbQ'](_0x1664bf['slice'](0x0,_0x8e2a2),_0x551949['LjfEr']):_0x1664bf;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3fe5c4,_0x1f4d98){const _0x23a7e2=_0xb01b,_0x22a13e=_0x3fe5c4();while(!![]){try{const _0x55cc3e=parseInt(_0x23a7e2(0x1c2))/0x1*(-parseInt(_0x23a7e2(0x1c3))/0x2)+parseInt(_0x23a7e2(0x1c9))/0x3*(parseInt(_0x23a7e2(0x1c4))/0x4)+-parseInt(_0x23a7e2(0x1c7))/0x5*(parseInt(_0x23a7e2(0x1bd))/0x6)+parseInt(_0x23a7e2(0x1be))/0x7+parseInt(_0x23a7e2(0x1c6))/0x8*(parseInt(_0x23a7e2(0x1c1))/0x9)+parseInt(_0x23a7e2(0x1bf))/0xa*(parseInt(_0x23a7e2(0x1c8))/0xb)+parseInt(_0x23a7e2(0x1c0))/0xc;if(_0x55cc3e===_0x1f4d98)break;else _0x22a13e['push'](_0x22a13e['shift']());}catch(_0x4c7065){_0x22a13e['push'](_0x22a13e['shift']());}}}(_0x546c,0x7fa47));import{getApiBaseUrl}from'./environment.js';function _0xb01b(_0x5bc684,_0x5ec09a){_0x5bc684=_0x5bc684-0x1bc;const _0x546c35=_0x546c();let _0xb01ba5=_0x546c35[_0x5bc684];return _0xb01ba5;}export async function getCurrentUser(_0x1a592d){const _0x56b576=_0xb01b,_0x301a09={'yBpkp':function(_0x2a1c9e,_0x1b9f69){return _0x2a1c9e(_0x1b9f69);}},_0x2e1a75=getApiBaseUrl();try{const _0x3f0112=await fetch(_0x2e1a75+'/api/v1/mcp/me',{'method':'GET','headers':{'Authorization':'Bearer\x20'+_0x1a592d}});if(!_0x3f0112['ok'])return{'success':![],'error':_0x3f0112['status']+'\x20'+_0x3f0112['statusText'],'status':_0x3f0112[_0x56b576(0x1c5)]};const _0x400679=await _0x3f0112['json']();return{'success':!![],'user':_0x400679};}catch(_0x3562d0){return{'success':![],'error':_0x3562d0 instanceof Error?_0x3562d0[_0x56b576(0x1bc)]:_0x301a09['yBpkp'](String,_0x3562d0)};}}function _0x546c(){const _0x36f356=['580738klfrVr','504VTwUtA','status','8CmfRdS','5fOxjFV','99ESXetc','8655uSXCFg','message','4902372eqUcLD','2780792bRYEUR','66470jTXQpT','6720480SHaoOC','2246625cXoMzI','1qGNgJu'];_0x546c=function(){return _0x36f356;};return _0x546c();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x13a3(){const _0x54ffb0=['2949615CiyIwp','version','2434775aMdsUc','8293YovJlI','1132664dZaQeZ','1865UWqngM','9132twflAJ','rQDYh','7539128QuJxXr','utf-8','10844037IxGVww','10Kqhwhz','package.json','parse','map','sHgII','126imdYXr','npm\x20view\x20','\x20version\x202>/dev/null'];_0x13a3=function(){return _0x54ffb0;};return _0x13a3();}(function(_0x3bdd63,_0x52b235){const _0x179919=_0x5d4e,_0x1a92b8=_0x3bdd63();while(!![]){try{const _0x4c5ca1=parseInt(_0x179919(0x1ce))/0x1*(-parseInt(_0x179919(0x1c8))/0x2)+-parseInt(_0x179919(0x1cb))/0x3+-parseInt(_0x179919(0x1cf))/0x4+parseInt(_0x179919(0x1d0))/0x5*(parseInt(_0x179919(0x1d1))/0x6)+-parseInt(_0x179919(0x1cd))/0x7+parseInt(_0x179919(0x1d3))/0x8+parseInt(_0x179919(0x1d5))/0x9*(parseInt(_0x179919(0x1d6))/0xa);if(_0x4c5ca1===_0x52b235)break;else _0x1a92b8['push'](_0x1a92b8['shift']());}catch(_0x4527fc){_0x1a92b8['push'](_0x1a92b8['shift']());}}}(_0x13a3,0x8d31f));import{readFileSync}from'fs';import{existsSync}from'fs';import{execSync}from'child_process';import{fileURLToPath}from'url';import{dirname,join}from'path';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);export const PACKAGE_NAME='@ranger-testing/ranger-cli';export function getCurrentVersion(){const _0x500d73=_0x5d4e,_0x1ca73f={'TTVuh':_0x500d73(0x1c4),'zmlMS':function(_0x58ec94,_0x531f34,_0x5e1637,_0x2f2cf0,_0x212f2b,_0x4bd94a){return _0x58ec94(_0x531f34,_0x5e1637,_0x2f2cf0,_0x212f2b,_0x4bd94a);},'rQDYh':function(_0x4b8fae,_0x14af3e){return _0x4b8fae(_0x14af3e);},'sHgII':'utf-8','CLprx':'unknown'},_0x5722fb=[join(__dirname,'..','..',_0x1ca73f['TTVuh']),_0x1ca73f['zmlMS'](join,__dirname,'..','..','..',_0x1ca73f['TTVuh'])];for(const _0x51f9ee of _0x5722fb){if(_0x1ca73f[_0x500d73(0x1d2)](existsSync,_0x51f9ee))try{const _0x154cc9=JSON[_0x500d73(0x1c5)](readFileSync(_0x51f9ee,_0x1ca73f[_0x500d73(0x1c7)]));return _0x154cc9[_0x500d73(0x1cc)]||_0x1ca73f['CLprx'];}catch{continue;}}return'unknown';}function _0x5d4e(_0x2e87fc,_0x5838de){_0x2e87fc=_0x2e87fc-0x1c4;const _0x13a307=_0x13a3();let _0x5d4e49=_0x13a307[_0x2e87fc];return _0x5d4e49;}export function getLatestVersion(){const _0x48d42b=_0x5d4e;try{const _0x11555e=execSync(_0x48d42b(0x1c9)+PACKAGE_NAME+_0x48d42b(0x1ca),{'encoding':_0x48d42b(0x1d4),'timeout':0x1388});return _0x11555e['trim']();}catch{return null;}}export function compareVersions(_0x32817d,_0x1da5ba){const _0x827b36=_0x5d4e,_0x144c6c={'OfTGq':function(_0x1ae135,_0x31f90d){return _0x1ae135<_0x31f90d;},'JmTBq':function(_0x21319b,_0x3c07bf){return _0x21319b>_0x3c07bf;}},_0x35c281=_0x32817d['split']('.')[_0x827b36(0x1c6)](Number),_0x2f98e5=_0x1da5ba['split']('.')[_0x827b36(0x1c6)](Number);for(let _0x2f1afd=0x0;_0x144c6c['OfTGq'](_0x2f1afd,0x3);_0x2f1afd++){const _0x49fff5=_0x35c281[_0x2f1afd]||0x0,_0x2f9e16=_0x2f98e5[_0x2f1afd]||0x0;if(_0x144c6c['JmTBq'](_0x2f9e16,_0x49fff5))return 0x1;if(_0x2f9e16<_0x49fff5)return-0x1;}return 0x0;}
|