@ranger-testing/ranger-cli 2.5.4-alpha.36a12ca-10 → 2.5.4-alpha.57338f5-12
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/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/mcpBootstrap.js +1 -1
- package/build/commands/migrateProfile.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/agentEnv.js +1 -1
- package/build/commands/utils/browserSessionsApi.js +1 -1
- package/build/commands/utils/claudeConfig.js +1 -1
- package/build/commands/utils/claudeOverrideSettings.js +1 -1
- package/build/commands/utils/claudePlugin.js +1 -1
- package/build/commands/utils/cloudProfile.js +1 -1
- package/build/commands/utils/cloudProfileSession.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/fixWebmDuration.js +1 -1
- package/build/commands/utils/gitTracked.js +1 -1
- package/build/commands/utils/keychain.js +1 -1
- package/build/commands/utils/legacyWarning.js +1 -0
- package/build/commands/utils/localAgentInstallationsApi.js +1 -1
- package/build/commands/utils/matchAuthEnvironment.js +1 -1
- package/build/commands/utils/mcpImageBase64.js +1 -1
- package/build/commands/utils/model.js +1 -1
- package/build/commands/utils/opencodeConfig.js +1 -1
- package/build/commands/utils/playwrightCli.js +1 -1
- package/build/commands/utils/profileMessages.js +1 -1
- package/build/commands/utils/profileSetupBanner.js +1 -1
- package/build/commands/utils/projectsConfig.js +1 -1
- package/build/commands/utils/rangerConfig.js +1 -1
- package/build/commands/utils/rangerRoot.js +1 -1
- package/build/commands/utils/resolveProfileContext.js +1 -1
- package/build/commands/utils/resolveProfileUrl.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/stitchWebmFiles.js +1 -1
- package/build/commands/utils/telemetry.js +1 -1
- package/build/commands/utils/tokenRefresh.js +1 -1
- package/build/commands/utils/traceSnapshotMapper.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/verifyFeatureCli.js +1 -1
- package/build/skills/ranger/SKILL.md +13 -7
- package/build/skills/ranger/create.md +16 -3
- package/build/skills/ranger/verify.md +23 -10
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x19ea43,_0x137f08){const _0x96528b=_0x4db7,_0x189db8=_0x19ea43();while(!![]){try{const _0x20757a=-parseInt(_0x96528b(0x16c))/0x1+-parseInt(_0x96528b(0x15b))/0x2+parseInt(_0x96528b(0x169))/0x3+parseInt(_0x96528b(0x16f))/0x4*(-parseInt(_0x96528b(0x15e))/0x5)+-parseInt(_0x96528b(0x162))/0x6+parseInt(_0x96528b(0x168))/0x7+parseInt(_0x96528b(0x155))/0x8;if(_0x20757a===_0x137f08)break;else _0x189db8['push'](_0x189db8['shift']());}catch(_0xebff44){_0x189db8['push'](_0x189db8['shift']());}}}(_0xfa62,0x3828a));function _0xfa62(){const _0x1e358a=['includes','plugin','stringify','3194008RwQKoU','Project\x20(shared\x20with\x20team\x20via\x20git)','ISULo','\x0a📦\x20OpenCode\x20Plugin\x0a','opencode.json','log','71296aseKNo','jXcik','Where\x20should\x20the\x20plugin\x20be\x20installed?','860345kAZoXU','isArray','dwQpO','$schema','1083594OZfEbQ','User\x20(available\x20in\x20all\x20your\x20projects)','⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','rncZm','user','parse','2387084iZYztD','244500hNizpK','YmMBY','project','31352dpqVIu','error','pZLMA','8sZOjpe','pluginScope','https://opencode.ai/config.json','UlfGp','@ranger-testing/opencode-plugin'];_0xfa62=function(){return _0x1e358a;};return _0xfa62();}import{join}from'path';import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';import _0x37e26c from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';function _0x4db7(_0x410f5a,_0x442281){_0x410f5a=_0x410f5a-0x153;const _0xfa6221=_0xfa62();let _0x4db7bc=_0xfa6221[_0x410f5a];return _0x4db7bc;}export async function ensureOpencodePluginConfig(_0x2e91cb){const _0x38dd3a=_0x4db7,_0x3d0df7={'dwQpO':function(_0x13c892,_0x17fb34){return _0x13c892(_0x17fb34);},'inRSH':function(_0x335ddf,_0x197316,_0x189b68){return _0x335ddf(_0x197316,_0x189b68);},'YmMBY':function(_0x2d5f10,_0xabd421){return _0x2d5f10(_0xabd421);},'ISULo':_0x38dd3a(0x16b),'rncZm':_0x38dd3a(0x158),'kZnMs':_0x38dd3a(0x170),'eIMTt':'user','UlfGp':_0x38dd3a(0x159),'zIQwm':_0x38dd3a(0x171),'jXcik':_0x38dd3a(0x164),'pZLMA':'✓\x20OpenCode\x20plugin\x20already\x20configured','nfZoN':function(_0x59ac76,_0x285f69){return _0x59ac76(_0x285f69);},'DYwBk':function(_0x13370b,_0xc6f5c4){return _0x13370b+_0xc6f5c4;},'jzOnY':'✓\x20OpenCode\x20plugin\x20configured'},_0x308f24=_0x3d0df7[_0x38dd3a(0x160)](existsSync,_0x3d0df7['inRSH'](join,_0x3d0df7[_0x38dd3a(0x16a)](getOpencodeConfigDir,_0x3d0df7[_0x38dd3a(0x157)]),'opencode.json'));let _0x39a487;if(_0x2e91cb)_0x39a487=_0x2e91cb;else{if(_0x308f24)_0x39a487=_0x3d0df7['ISULo'];else{console['log'](_0x3d0df7[_0x38dd3a(0x165)]);const _0x58a392=await _0x37e26c['prompt']([{'type':'list','name':_0x3d0df7['kZnMs'],'message':_0x38dd3a(0x15d),'choices':[{'name':_0x38dd3a(0x163),'value':_0x3d0df7['eIMTt']},{'name':_0x38dd3a(0x156),'value':_0x38dd3a(0x16b)}],'default':_0x38dd3a(0x166)}]);_0x39a487=_0x58a392['pluginScope'];}}const _0x359203=_0x3d0df7['inRSH'](join,getOpencodeConfigDir(_0x39a487),_0x3d0df7[_0x38dd3a(0x172)]),_0x50920c=_0x38dd3a(0x173),_0xc651be=_0x3d0df7['zIQwm'];let _0xd689bf={};if(existsSync(_0x359203))try{const _0x8af09a=await readFile(_0x359203,'utf-8');_0xd689bf=JSON[_0x38dd3a(0x167)](_0x8af09a);}catch(_0x2ee0bc){return console[_0x38dd3a(0x16d)](_0x3d0df7[_0x38dd3a(0x15c)]),{'configured':![],'scope':_0x39a487,'error':'Failed\x20to\x20read\x20opencode.json','details':_0x2ee0bc};}const _0x640b7c=Array[_0x38dd3a(0x15f)](_0xd689bf['plugin'])?_0xd689bf[_0x38dd3a(0x153)]:[];if(_0x640b7c[_0x38dd3a(0x174)](_0x50920c))return console['log'](_0x3d0df7[_0x38dd3a(0x16e)]),{'configured':![],'scope':_0x39a487};return _0xd689bf[_0x38dd3a(0x161)]=_0xd689bf[_0x38dd3a(0x161)]||_0xc651be,_0xd689bf[_0x38dd3a(0x153)]=[..._0x640b7c,_0x50920c],await mkdir(_0x3d0df7['nfZoN'](getOpencodeConfigDir,_0x39a487),{'recursive':!![]}),await _0x3d0df7['inRSH'](writeFile,_0x359203,_0x3d0df7['DYwBk'](JSON[_0x38dd3a(0x154)](_0xd689bf,null,0x2),'\x0a')),console[_0x38dd3a(0x15a)](_0x3d0df7['jzOnY']),{'configured':!![],'scope':_0x39a487};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x4efd13,_0x1333ea){const _0x133552=_0x1c16,_0x3da377=_0x4efd13();while(!![]){try{const _0x55b750=-parseInt(_0x133552(0x12a))/0x1+parseInt(_0x133552(0x118))/0x2+-parseInt(_0x133552(0x12f))/0x3*(parseInt(_0x133552(0x129))/0x4)+parseInt(_0x133552(0x105))/0x5*(parseInt(_0x133552(0x127))/0x6)+parseInt(_0x133552(0x11d))/0x7+-parseInt(_0x133552(0x101))/0x8+-parseInt(_0x133552(0x10f))/0x9;if(_0x55b750===_0x1333ea)break;else _0x3da377['push'](_0x3da377['shift']());}catch(_0x21aa16){_0x3da377['push'](_0x3da377['shift']());}}}(_0x22cc,0xb2596));import{mkdir,readFile,readdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{authenticate,ensureRangerDir,ensureChromium,writeRangerGitignore}from'./start.js';function _0x22cc(){const _0x580a42=['filter','14310vQIlPe','plugin','install','No\x20API\x20token\x20available\x20for\x20decryption','ktmGt','SwnyJ','✓\x20Encrypted\x20auth\x20verified\x20(will\x20decrypt\x20at\x20runtime)','Failed\x20to\x20add\x20marketplace:','BLlOJ','path','4347135CnLhou','Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.','length','\x0a✅\x20Ranger\x20CI\x20setup\x20complete!\x0a','trackPhaseStart','No\x20CI\x20profiles\x20found.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','flCje','No\x20CI\x20profiles\x20found\x20in\x20.ranger/ci/.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','error','1947206tgxxRc','vZZHF','You\x20can\x20install\x20manually:\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20project','oTPUj','\x22\x20has\x20no\x20settings.json.\x20Use\x20--base-url\x20to\x20configure\x20it.','8107078SSbSQG','wlkOL','ZCOTV','\x22:\x20','dir_setup','sessions','log','AiiPP','skipChromium','.\x20Use\x20--profile\x20to\x20specify\x20which\x20one.','2520dxcNgn','GXTxR','643172CBpBRs','125107VkKYuY','ZMkAS','✓\x20Marketplace\x20already\x20added','project','rJIaY','15SGmEhx','join','baseUrl','wilrR','Multiple\x20CI\x20profiles\x20found:\x20','✓\x20Claude\x20Code\x20plugin\x20already\x20installed','add','You\x20can\x20install\x20manually:\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','skills','isDirectory','faORS','trackPhaseEnd','noOtp','name','Failed\x20to\x20verify\x20encrypted\x20auth\x20for\x20profile\x20\x22','fRYSe','Installing\x20Claude\x20Code\x20plugin\x20(project\x20level)...','CI\x20profile\x20\x22','HoFKm','9529536iKYjwV','Auto-detected\x20CI\x20profile:\x20','chromium'];_0x22cc=function(){return _0x580a42;};return _0x22cc();}import{skillup}from'./skillup.js';import{getRangerDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{saveSettings}from'./utils/settings.js';import{decrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function findCiProfile(_0x2e7d20){const _0x5a6986=_0x1c16,_0x11a86f={'FGvzz':function(_0x38da0e){return _0x38da0e();},'gJksD':function(_0x1ebd56,_0x176cfb,_0x1be13e){return _0x1ebd56(_0x176cfb,_0x1be13e);},'wilrR':function(_0x26b56b,_0x17001a){return _0x26b56b(_0x17001a);},'noOtp':_0x5a6986(0x114)},_0x369d9b=_0x11a86f['FGvzz'](getRangerDir),_0x4a7aad=_0x11a86f['gJksD'](join,_0x369d9b,'ci');if(_0x2e7d20){const _0x3c8ab2=join(_0x4a7aad,_0x2e7d20);return{'name':_0x2e7d20,'path':_0x3c8ab2};}if(!_0x11a86f[_0x5a6986(0x132)](existsSync,_0x4a7aad))throw new Error(_0x11a86f[_0x5a6986(0xfa)]+'Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.');const _0x4cf075=await readdir(_0x4a7aad,{'withFileTypes':!![]}),_0x1e3930=_0x4cf075[_0x5a6986(0x104)](_0x18d8eb=>_0x18d8eb[_0x5a6986(0xf7)]())['map'](_0x1fc710=>_0x1fc710[_0x5a6986(0xfb)]);if(_0x1e3930[_0x5a6986(0x111)]===0x0)throw new Error(_0x5a6986(0x116)+_0x5a6986(0x110));if(_0x1e3930['length']===0x1){const _0x4b56c4=_0x1e3930[0x0];return console[_0x5a6986(0x123)](_0x5a6986(0x102)+_0x4b56c4),{'name':_0x4b56c4,'path':_0x11a86f['gJksD'](join,_0x4a7aad,_0x4b56c4)};}throw new Error(_0x5a6986(0x133)+_0x1e3930[_0x5a6986(0x130)](',\x20')+_0x5a6986(0x126));}function _0x1c16(_0xbb27f8,_0xc46af7){_0xbb27f8=_0xbb27f8-0xf7;const _0x22cc98=_0x22cc();let _0x1c1665=_0x22cc98[_0xbb27f8];return _0x1c1665;}async function installPluginNonInteractive(){const _0x301713=_0x1c16,_0x3266e4={'GXTxR':function(_0x2c5218,_0x53ff47){return _0x2c5218(_0x53ff47);},'BkAxz':function(_0x143aa6,_0x3403b4){return _0x143aa6(_0x3403b4);},'NGnwt':_0x301713(0x12c),'NIAki':'ranger-testing/trailhead','ZCOTV':_0x301713(0x136),'faORS':_0x301713(0x107),'JhCPD':'--scope','fRYSe':_0x301713(0x12d),'yVwKa':_0x301713(0x11a),'wlkOL':'✓\x20Claude\x20Code\x20plugin\x20installed'},_0x3a56d5=await _0x3266e4['GXTxR'](isPluginInstalled,'ranger@trailhead');if(_0x3a56d5)return console['log'](_0x301713(0x134)),![];console['log'](_0x301713(0xfe));const _0x3b58b0=await _0x3266e4['BkAxz'](isMarketplaceAdded,'trailhead');let _0x54a7f5=_0x3b58b0;if(_0x3b58b0)console['log'](_0x3266e4['NGnwt']);else{const _0x569b5b=await _0x3266e4[_0x301713(0x128)](runClaudeCommand,['plugin','marketplace',_0x301713(0x135),_0x3266e4['NIAki']]);!_0x569b5b['success']?(console['error'](_0x301713(0x10c),_0x569b5b[_0x301713(0x117)]),console['log'](_0x3266e4[_0x301713(0x11f)])):_0x54a7f5=!![];}if(_0x54a7f5){const _0x484f70=await runClaudeCommand(['plugin',_0x3266e4[_0x301713(0xf8)],'ranger@trailhead',_0x3266e4['JhCPD'],_0x3266e4[_0x301713(0xfd)]]);!_0x484f70['success']?(console[_0x301713(0x117)]('Failed\x20to\x20install\x20plugin:',_0x484f70['error']),console['log'](_0x3266e4['yVwKa'])):console[_0x301713(0x123)](_0x3266e4[_0x301713(0x11e)]);}return!![];}export async function setupCi(_0x19fec1,_0x192c71,_0xa795b0){const _0xecb60d=_0x1c16,_0x132717={'flCje':'auth','AiiPP':function(_0x93168d,_0x21d028,_0x258662){return _0x93168d(_0x21d028,_0x258662);},'rJIaY':_0xecb60d(0x122),'LDqxv':function(_0x2f69d4,_0x4af0f7,_0x5621fe){return _0x2f69d4(_0x4af0f7,_0x5621fe);},'ZMkAS':_0xecb60d(0x103),'KeBAn':'✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','biunz':function(_0x17fac9){return _0x17fac9();},'GxHmi':'settings.json','ktmGt':function(_0x5a9886,_0xef7316,_0x4a4ff5){return _0x5a9886(_0xef7316,_0x4a4ff5);},'vxaak':'auth.json','ZKZQi':function(_0x258694,_0x46860f,_0x28f2b9){return _0x258694(_0x46860f,_0x28f2b9);},'SwnyJ':'auth.json.enc','BLlOJ':function(_0x332e40,_0x3ca99b){return _0x332e40(_0x3ca99b);},'HoFKm':function(_0x40b9e5,_0x5484a8){return _0x40b9e5 instanceof _0x5484a8;},'dPjUr':'✓\x20Auth\x20state\x20found','rQJQf':'\x20\x20No\x20auth\x20state\x20found\x20(app\x20may\x20not\x20require\x20authentication)','HnsLn':function(_0x54b669,_0xfc130e){return _0x54b669(_0xfc130e);},'fOfgu':'profile_activate','mVAAQ':_0xecb60d(0x106),'tCFgq':'skills','oTPUj':function(_0x3332eb,_0x3b42f0){return _0x3332eb(_0x3b42f0);},'vZZHF':_0xecb60d(0x12d)};console['log']('\x0a🔧\x20Ranger\x20CI\x20Setup\x0a'),_0xa795b0?.[_0xecb60d(0x113)](_0x132717[_0xecb60d(0x115)]),await authenticate(_0x19fec1),_0xa795b0?.[_0xecb60d(0xf9)]('auth'),_0xa795b0?.[_0xecb60d(0x113)](_0xecb60d(0x121));const {path:_0x4f38b5,installed:_0x4f1479}=await ensureRangerDir();await writeRangerGitignore(_0x4f38b5);const _0x2ba13e=_0x132717['AiiPP'](join,_0x4f38b5,_0x132717[_0xecb60d(0x12e)]);!existsSync(_0x2ba13e)&&await _0x132717['LDqxv'](mkdir,_0x2ba13e,{'recursive':!![]});_0xa795b0?.['trackPhaseEnd']('dir_setup',{'installed':_0x4f1479}),_0xa795b0?.[_0xecb60d(0x113)](_0x132717[_0xecb60d(0x12b)]);let _0x4b3371=![];_0x192c71?.[_0xecb60d(0x125)]?console[_0xecb60d(0x123)](_0x132717['KeBAn']):_0x4b3371=await _0x132717['biunz'](ensureChromium);_0xa795b0?.[_0xecb60d(0xf9)](_0x132717['ZMkAS'],{'installed':_0x4b3371,'skipped':!!_0x192c71?.['skipChromium']}),_0xa795b0?.[_0xecb60d(0x113)]('profile_activate');const _0x335e80=await findCiProfile(_0x192c71?.['profile']);let _0x2327b7=![];_0x192c71?.[_0xecb60d(0x131)]&&(await mkdir(_0x335e80['path'],{'recursive':!![]}),await saveSettings(_0x335e80[_0xecb60d(0xfb)],{'baseUrl':_0x192c71[_0xecb60d(0x131)],'headless':!![]}),console['log']('✓\x20Created\x20profile\x20settings:\x20baseUrl='+_0x192c71[_0xecb60d(0x131)]),_0x2327b7=!![]);const _0x3aa928=_0x132717[_0xecb60d(0x124)](join,_0x335e80[_0xecb60d(0x10e)],_0x132717['GxHmi']);if(!existsSync(_0x3aa928)&&!_0x2327b7)throw new Error(_0xecb60d(0xff)+_0x335e80[_0xecb60d(0xfb)]+_0xecb60d(0x11c));const _0x3ab628=_0x132717[_0xecb60d(0x109)](join,_0x335e80['path'],_0x132717['vxaak']),_0x30b889=_0x132717['ZKZQi'](join,_0x335e80['path'],_0x132717[_0xecb60d(0x10a)]),_0x478539=_0x132717[_0xecb60d(0x10d)](existsSync,_0x3ab628),_0x2f6943=_0x132717[_0xecb60d(0x10d)](existsSync,_0x30b889);if(_0x2f6943)try{const _0x45efa0=await _0x132717['biunz'](getToken);if(!_0x45efa0)throw new Error(_0xecb60d(0x108));const _0xbf55d3=await _0x132717[_0xecb60d(0x10d)](readFile,_0x30b889);decrypt(_0xbf55d3,_0x45efa0),console[_0xecb60d(0x123)](_0xecb60d(0x10b));}catch(_0x1fe2d9){const _0x176918=_0x132717[_0xecb60d(0x100)](_0x1fe2d9,Error)?_0x1fe2d9['message']:_0x132717['BLlOJ'](String,_0x1fe2d9);throw new Error(_0xecb60d(0xfc)+_0x335e80[_0xecb60d(0xfb)]+_0xecb60d(0x120)+_0x176918);}else _0x478539?console['log'](_0x132717['dPjUr']):console['log'](_0x132717['rQJQf']);await _0x132717['HnsLn'](writeActiveProfileName,_0x335e80[_0xecb60d(0xfb)]),console[_0xecb60d(0x123)]('✓\x20Active\x20profile:\x20'+_0x335e80[_0xecb60d(0xfb)]),_0xa795b0?.['trackPhaseEnd'](_0x132717['fOfgu'],{'profileName':_0x335e80[_0xecb60d(0xfb)],'hasAuth':_0x478539,'hasEncryptedAuth':_0x2f6943,'createdSettings':_0x2327b7}),_0xa795b0?.[_0xecb60d(0x113)](_0x132717['mVAAQ']);const _0x58ff06=await _0x132717['biunz'](installPluginNonInteractive);_0xa795b0?.[_0xecb60d(0xf9)]('plugin',{'installed':_0x58ff06}),_0xa795b0?.[_0xecb60d(0x113)](_0x132717['tCFgq']),await _0x132717[_0xecb60d(0x11b)](skillup,{'autoInstall':_0x132717[_0xecb60d(0x119)]}),_0xa795b0?.[_0xecb60d(0xf9)](_0xecb60d(0x137)),console['log'](_0xecb60d(0x112));}
|
|
1
|
+
function _0x19a4(_0x1b8667,_0x130e0f){_0x1b8667=_0x1b8667-0x94;var _0x4298d3=_0x4298();var _0x19a4a3=_0x4298d3[_0x1b8667];return _0x19a4a3;}(function(_0x579db9,_0x5c99ce){var _0x7333f7=_0x19a4,_0x5baa87=_0x579db9();while(!![]){try{var _0x388e38=-parseInt(_0x7333f7(0x94))/0x1*(parseInt(_0x7333f7(0x99))/0x2)+-parseInt(_0x7333f7(0x95))/0x3*(-parseInt(_0x7333f7(0xa1))/0x4)+parseInt(_0x7333f7(0x9d))/0x5+-parseInt(_0x7333f7(0xa2))/0x6*(parseInt(_0x7333f7(0x9b))/0x7)+-parseInt(_0x7333f7(0x96))/0x8*(-parseInt(_0x7333f7(0x97))/0x9)+parseInt(_0x7333f7(0x98))/0xa+-parseInt(_0x7333f7(0x9f))/0xb*(parseInt(_0x7333f7(0xa0))/0xc);if(_0x388e38===_0x5c99ce)break;else _0x5baa87['push'](_0x5baa87['shift']());}catch(_0x436a58){_0x5baa87['push'](_0x5baa87['shift']());}}}(_0x4298,0xb96f4));export async function setupCi(_0x4a5f8d,_0x558ed7,_0x5b824e){var _0x326b9f=_0x19a4,_0x2080bc={'xiDqZ':function(_0x55343d,_0x44e3fc){return _0x55343d+_0x44e3fc;},'zbEaV':function(_0x5d4f0c,_0x56fea6){return _0x5d4f0c+_0x56fea6;},'VGrEw':function(_0x757fd2,_0x3a1f57){return _0x757fd2+_0x3a1f57;},'XUEhn':'ranger\x20setup\x20--ci\x20writes\x20to\x20the\x20legacy\x20.ranger/ci/\x20tree\x20which\x20is\x20no\x20longer\x20supported.\x0a','GuEDW':_0x326b9f(0x9a),'PKdpk':_0x326b9f(0x9e)};console['error'](_0x2080bc[_0x326b9f(0xa3)](_0x2080bc['xiDqZ'](_0x2080bc['zbEaV'](_0x2080bc['VGrEw'](_0x2080bc['XUEhn'],'Use\x20the\x20new\x20flow:\x0a'),_0x2080bc['GuEDW']),'For\x20a\x20shared\x20cloud\x20profile:\x20ranger\x20profile\x20add\x20<account-email>\x0a'),_0x2080bc['PKdpk'])),process[_0x326b9f(0x9c)](0x1);}function _0x4298(){var _0x4ed4f8=['213507IpSyCm','422220BwHmBV','55084pRKdZe','\x20\x20RANGER_TEST_USERNAME=...\x20RANGER_TEST_PASSWORD=...\x20ranger\x20go\x20--base-url\x20<url>\x0a','77ThBqKE','exit','5068245Vcaohw','See:\x20docs/feature/cloud-profiles-old-vs-new-structure.md','175219bOEhAf','804zUuNpD','3090392wFKDze','179994hvCLRi','xiDqZ','1gTDZwc','3LtBYYl','120YuFfKP'];_0x4298=function(){return _0x4ed4f8;};return _0x4298();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0xf8f7(_0x515b0d,_0x4402ea){_0x515b0d=_0x515b0d-0xf6;const _0x3845ea=_0x3845();let _0xf8f7a0=_0x3845ea[_0x515b0d];return _0xf8f7a0;}(function(_0x833e3d,_0xd27363){const _0x4cf072=_0xf8f7,_0x2b2970=_0x833e3d();while(!![]){try{const _0x31750d=parseInt(_0x4cf072(0x123))/0x1*(parseInt(_0x4cf072(0xff))/0x2)+-parseInt(_0x4cf072(0x118))/0x3*(-parseInt(_0x4cf072(0x106))/0x4)+parseInt(_0x4cf072(0x10e))/0x5*(-parseInt(_0x4cf072(0x10a))/0x6)+-parseInt(_0x4cf072(0x10c))/0x7*(parseInt(_0x4cf072(0x110))/0x8)+-parseInt(_0x4cf072(0xf6))/0x9*(-parseInt(_0x4cf072(0x100))/0xa)+parseInt(_0x4cf072(0x114))/0xb+parseInt(_0x4cf072(0x11d))/0xc;if(_0x31750d===_0xd27363)break;else _0x2b2970['push'](_0x2b2970['shift']());}catch(_0x34474a){_0x2b2970['push'](_0x2b2970['shift']());}}}(_0x3845,0x79ca8));import{basename}from'path';import _0x1baa64 from'inquirer';import{getToken}from'./utils/keychain.js';import{installSkill}from'./utils/skills.js';import{getCurrentVersion}from'./utils/version.js';function _0x3845(){const _0x3634c3=['\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a','\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','gYPzX','vqmLq','20238oXTawX','dvwEM','9sriaoR','BrFKC','project-level','This\x20project\x20only\x20(','VoaGj','ldgdN','user','opencode','\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','26GgrdMr','246550cnbyDt','❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','warn','claude','Mcpcq','log','972UVkJJp','/.opencode/skills/','installLevel','KgYnR','151716OlBZQo','stdout','70nMjnlq','ranger','115ITgvPr','\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','503872sCKZbu','\x20skill','\x20<your-api-token>','KbNUV','4220722vSLZqF','stdin','\x20\x20-\x20Open\x20Claude\x20Code\x20in\x20plan\x20mode\x20and\x20run\x20/ranger:enable.\x20Plan\x20out\x20a\x20UI\x20feature\x20with\x20Ranger\x20and\x20watch\x20Ranger\x20test\x20it\x20for\x20you!','Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20(','11517nlMWnc','\x0a✅\x20Installed\x20','autoInstall','suppressUsage','To\x20get\x20started:','1271352lJrKhd','All\x20projects\x20('];_0x3845=function(){return _0x3634c3;};return _0x3845();}import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0x54f3a1={}){const _0xc624a1=_0xf8f7,_0x18e11b={'zubvu':_0xc624a1(0xfe),'VoaGj':function(_0x3e9ea0){return _0x3e9ea0();},'gkDLO':_0xc624a1(0x11c),'Mcpcq':function(_0xb05d0d,_0x1a1d43){return _0xb05d0d===_0x1a1d43;},'BrFKC':_0xc624a1(0xfd),'KbNUV':'\x20--opencode','OnQKQ':function(_0x4abb7c,_0x4fc8ac){return _0x4abb7c===_0x4fc8ac;},'srEPF':function(_0x38e7d6){return _0x38e7d6();},'KgYnR':function(_0x5d7185,_0x10d4b9){return _0x5d7185(_0x10d4b9);},'pjnVx':function(_0x9a94da){return _0x9a94da();},'PkNRH':'Where\x20should\x20skills\x20be\x20installed?','gYPzX':_0xc624a1(0xfc),'rRgHG':'project','vqmLq':_0xc624a1(0x10d),'dvwEM':_0xc624a1(0x10f),'dTXvh':function(_0x5544bc,_0x37774f){return _0x5544bc instanceof _0x37774f;},'FXJCZ':function(_0x3a7f29,_0x124f25){return _0x3a7f29>_0x124f25;},'YFzxv':'user-level','UZPJM':_0xc624a1(0xf8),'ldgdN':function(_0x16ca30,_0x3e663f){return _0x16ca30>_0x3e663f;}};console['log'](_0x18e11b['zubvu']);const _0x5788f0=_0x54f3a1['platform']??_0xc624a1(0x103),_0x2d4d0f=await _0x18e11b[_0xc624a1(0xfa)](getToken);if(!_0x2d4d0f){console['log'](_0xc624a1(0x101)),console[_0xc624a1(0x105)](_0x18e11b['gkDLO']),console['log']('\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli'),console['log']('\x20\x202.\x20Run:\x20ranger\x20setup'+(_0x18e11b[_0xc624a1(0x104)](_0x5788f0,_0x18e11b[_0xc624a1(0xf7)])?_0x18e11b[_0xc624a1(0x113)]:'')+_0xc624a1(0x112)),console[_0xc624a1(0x105)]('\x20\x203.\x20Run:\x20ranger\x20skillup'+(_0x18e11b['OnQKQ'](_0x5788f0,_0x18e11b[_0xc624a1(0xf7)])?_0x18e11b[_0xc624a1(0x113)]:'')+'\x0a');return;}console['log']('✓\x20Found\x20API\x20token');const _0x128ca9=_0x18e11b['srEPF'](getProjectRoot),_0x1735a0=_0x18e11b['KgYnR'](basename,_0x128ca9),_0x3654dc=_0x5788f0===_0x18e11b[_0xc624a1(0xf7)]?_0x18e11b[_0xc624a1(0x109)](getOpencodeConfigDir,_0xc624a1(0xfc))+'/skills/':_0x18e11b['pjnVx'](getClaudeConfigDir)+'/skills/',_0x32bc2b=_0x18e11b['OnQKQ'](_0x5788f0,_0xc624a1(0xfd))?_0x128ca9+_0xc624a1(0x107):_0x128ca9+'/.claude/skills/',_0x4543e0=process[_0xc624a1(0x115)]['isTTY']&&process[_0xc624a1(0x10b)]['isTTY'];let _0x3bfde1;if(_0x54f3a1['autoInstall'])_0x3bfde1=_0x54f3a1[_0xc624a1(0x11a)];else{if(_0x4543e0){const _0x2ba52d=await _0x1baa64['prompt']([{'type':'list','name':'installLevel','message':_0x18e11b['PkNRH'],'choices':[{'name':_0xc624a1(0x11e)+_0x3654dc+')','value':_0x18e11b[_0xc624a1(0x121)]},{'name':_0xc624a1(0xf9)+_0x32bc2b+')','value':'project'}]}]);_0x3bfde1=_0x2ba52d[_0xc624a1(0x108)];}else _0x3bfde1=_0x18e11b['rRgHG'],console['log'](_0xc624a1(0x117)+_0x32bc2b+')');}let _0x302306=0x0;const _0x3f98f6=getCurrentVersion();console[_0xc624a1(0x105)]('\x0a📦\x20Installing\x20skills...\x0a');try{const _0xa2464b=await installSkill(_0x18e11b[_0xc624a1(0x122)],{'cliVersion':_0x3f98f6,'level':_0x3bfde1,'platform':_0x5788f0});_0xa2464b&&_0x302306++;}catch(_0x131d7d){console[_0xc624a1(0x102)](_0x18e11b[_0xc624a1(0x124)],_0x18e11b['dTXvh'](_0x131d7d,Error)?_0x131d7d['message']:_0x131d7d);}if(_0x18e11b['FXJCZ'](_0x302306,0x0)){const _0x3f0bd3=_0x18e11b[_0xc624a1(0x104)](_0x3bfde1,'user')?_0x18e11b['YFzxv']:_0x18e11b['UZPJM'];console['log'](_0xc624a1(0x119)+_0x302306+'\x20'+_0x3f0bd3+_0xc624a1(0x111)+(_0x18e11b[_0xc624a1(0xfb)](_0x302306,0x1)?'s':'')+'\x20successfully!\x0a'),!_0x54f3a1[_0xc624a1(0x11b)]&&(console[_0xc624a1(0x105)]('To\x20use:'),_0x5788f0==='opencode'?console['log'](_0xc624a1(0x120)):console[_0xc624a1(0x105)](_0xc624a1(0x116)));}else console[_0xc624a1(0x105)](_0xc624a1(0x11f));}
|
package/build/commands/start.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x409d75=_0x3d13;(function(_0x54025f,_0x50d2a0){const _0x4a8a75=_0x3d13,_0x117fb9=_0x54025f();while(!![]){try{const _0x5711f5=-parseInt(_0x4a8a75(0xd1))/0x1*(-parseInt(_0x4a8a75(0x10c))/0x2)+parseInt(_0x4a8a75(0xf5))/0x3+-parseInt(_0x4a8a75(0xa2))/0x4*(parseInt(_0x4a8a75(0xc4))/0x5)+-parseInt(_0x4a8a75(0xc3))/0x6+parseInt(_0x4a8a75(0xc6))/0x7*(-parseInt(_0x4a8a75(0xbe))/0x8)+parseInt(_0x4a8a75(0xde))/0x9+parseInt(_0x4a8a75(0x109))/0xa*(parseInt(_0x4a8a75(0xad))/0xb);if(_0x5711f5===_0x50d2a0)break;else _0x117fb9['push'](_0x117fb9['shift']());}catch(_0x39260a){_0x117fb9['push'](_0x117fb9['shift']());}}}(_0x1009,0xcfb0a));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x469b3a from'inquirer';import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';import{chromium}from'playwright';import{addEnv}from'./addEnv.js';import{getRangerHomeDir,findGitRoot}from'./utils/rangerRoot.js';import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{findExistingEnv}from'./utils/settings.js';import{getCurrentVersion}from'./utils/version.js';import{ensureClaudePlugin,ensureClaudeSkills}from'./setup/claude.js';import{ensureOpencodePluginConfig}from'./setup/opencode.js';import{installSkill}from'./utils/skills.js';const require=createRequire(import.meta.url);function _0x3d13(_0x159cdc,_0xf88f8d){_0x159cdc=_0x159cdc-0xa2;const _0x1009b9=_0x1009();let _0x3d1398=_0x1009b9[_0x159cdc];return _0x3d1398;}export const PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION='1.58.2';const bold=_0x1f6574=>_0x409d75(0xf4)+_0x1f6574+_0x409d75(0xf9);function _0x1009(){const _0x496985=['kVUDh','90WqSSvi','force','allowInsecureLocalhost','2154SkAjbP','jZcOB','2698584OPnuCz','\x20now?','✓\x20Skipping\x20authentication\x20(--skip-auth)','✓\x20Authenticated\x20to\x20','vGtpY','TEiJM','\x20may\x20need\x20a\x20one-time\x20headed\x20login\x20instead\x20—',')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','✓\x20~/.ranger/\x20directory\x20already\x20exists','✓\x20Exported\x20credentials\x20for\x20CI','mXxkz','339482RDibix','prompt','You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','opencode','scope','\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','\x20\x20npx\x20playwright@','status','chromium','message','\x0a🚀\x20Ranger\x20Setup\x0a','provided_token','✓\x20Playwright\x20Chromium\x20browser\x20found','You\x20can\x20install\x20it\x20manually\x20by\x20running:','RANGER_TEST_USERNAME','warn','QiCjN','45984uTKJxb','npx','keVTK','AcxqW','wSKSf','8333088NlSHcm','5QalAsH','SUPix','721jlpWuz','user','success','\x0aTo\x20verify\x20with\x20a\x20browser,\x20set\x20','kTWee','The\x20required\x20version\x20(','\x0aInstalling\x20Chromium\x20browser...\x0a','XjhQh','with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','trackPhaseStart','\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20','502WPgcpG','ignore','withDeps','\x0a⚠\x20Skipping\x20Chromium\x20installation.','--with-deps','\x0a✅\x20Ranger\x20setup\x20complete!\x0a','local','/ranger:enable','device_auth','RbxEn','organizationName','\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with','\x0a\x20\x20your\x20org\x27s\x20auth\x20config\x20drives\x20which\x20flow\x20runs.','11417967tOTRFh','\x20(fallback\x20version)','YHYFx','skipAuth','ZqadV','plugin','\x20install\x20chromium','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','\x20for\x20explicit\x20profile\x20management).','ffcHi','nIayw','trackPhaseEnd','KKvWS','ready','Authentication\x20failed:\x20','\x0aSkipping\x20profile\x20setup\x20(--skip-auth).\x20Run\x20`ranger\x20setup`\x20with\x20auth\x20to\x20add\x20a\x20profile\x20later.\x0a','Yzdsp','platform','isTTY','✓\x20Created\x20.ranger/.gitignore','VAHdj','✓\x20Local\x20profile\x20already\x20exists','\x1b[1m','4257483vmBAod','\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','lfeJn','\x0a❌\x20Failed\x20to\x20install\x20Chromium:','\x1b[0m','resolve','skipped','\x20and\x20prompt\x20the\x20coding','QuLXb','XOkID','stdout','error','aVwNL','btJpd','jqfXF','cDUtX','and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','existing_token','log'];_0x1009=function(){return _0x496985;};return _0x1009();}export function getPlaywrightVersion(){const _0x4c6cf2=_0x409d75,_0xea7100={'ZqadV':'playwright/package.json'};try{const _0x36c2c7=require[_0x4c6cf2(0xfa)](_0xea7100[_0x4c6cf2(0xe2)]),_0x358051=require(_0x36c2c7);return _0x358051['version'];}catch{return null;}}export function installChromiumBinary(_0x2bed3b,_0x5bc291=![]){const _0x5e00c7=_0x409d75,_0x4571b8={'BjtuK':_0x5e00c7(0xd5),'wSKSf':_0x5e00c7(0xd2),'imAqv':function(_0x34f9ca,_0x3cfa8d){return _0x34f9ca===_0x3cfa8d;},'wUGhM':'error'};return new Promise((_0x15d3cc,_0x11bfb9)=>{const _0x1346da=_0x5e00c7,_0x54d166={'SUPix':function(_0x4c9f27,_0x1564e9){return _0x4c9f27===_0x1564e9;},'fKdlG':function(_0x52546f){return _0x52546f();}},_0x41de42=['playwright@'+_0x2bed3b,'install',..._0x5bc291?[_0x4571b8['BjtuK']]:[],_0x1346da(0xb5)],_0x2effe4=spawn(_0x1346da(0xbf),_0x41de42,{'stdio':[_0x4571b8[_0x1346da(0xc2)],'inherit','inherit'],'shell':_0x4571b8['imAqv'](process[_0x1346da(0xef)],'win32')});_0x2effe4['on']('close',_0x1eb962=>{const _0x221c8b=_0x1346da;_0x54d166[_0x221c8b(0xc5)](_0x1eb962,0x0)?_0x54d166['fKdlG'](_0x15d3cc):_0x11bfb9(new Error('Installation\x20failed\x20with\x20exit\x20code\x20'+_0x1eb962));}),_0x2effe4['on'](_0x4571b8['wUGhM'],_0x39b9a6=>{_0x11bfb9(_0x39b9a6);});});}export async function authenticate(_0x5be8e6){const _0x207b04=_0x409d75,_0x501e58={'jTIVe':_0x207b04(0x106),'YHYFx':function(_0x3d7933,_0x352c69){return _0x3d7933 instanceof _0x352c69;},'KZBXY':function(_0x3194e3,_0x31e27e){return _0x3194e3(_0x31e27e);},'QiCjN':_0x207b04(0xd9),'ffcHi':'Validating\x20API\x20token...','XOkID':'✓\x20Stored\x20credentials\x20locally','QPDoO':_0x207b04(0xb8)};if(!_0x5be8e6){const _0x377b39=await getToken();if(_0x377b39){const _0x1c5d0d=await getCurrentUser(_0x377b39);if(_0x1c5d0d['success'])return console[_0x207b04(0x107)]('✓\x20Already\x20authenticated\x20to\x20'+_0x1c5d0d[_0x207b04(0xc7)]['organizationName']),{'token':_0x377b39,'method':_0x501e58['jTIVe']};}try{_0x5be8e6=await runDeviceAuthFlow();}catch(_0x447182){throw new Error('Authentication\x20failed:\x20'+(_0x501e58[_0x207b04(0xe0)](_0x447182,Error)?_0x447182['message']:_0x447182));}const _0x3fd7e6=await _0x501e58['KZBXY'](getCurrentUser,_0x5be8e6);if(!_0x3fd7e6['success'])throw new Error('Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20'+_0x3fd7e6[_0x207b04(0x100)]);return console['log'](_0x207b04(0xa5)+_0x3fd7e6[_0x207b04(0xc7)][_0x207b04(0xdb)]),{'token':_0x5be8e6,'method':_0x501e58[_0x207b04(0xbd)]};}console['log'](_0x501e58[_0x207b04(0xe7)]);const _0x3dafb0=await _0x501e58['KZBXY'](getCurrentUser,_0x5be8e6);if(!_0x3dafb0[_0x207b04(0xc8)]){if(_0x3dafb0[_0x207b04(0xb4)])throw new Error(_0x207b04(0xec)+_0x3dafb0[_0x207b04(0x100)]+'.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.');else throw new Error('Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20'+_0x3dafb0['error']+'.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.');}return console[_0x207b04(0x107)]('✓\x20Authenticated\x20to\x20'+_0x3dafb0[_0x207b04(0xc7)]['organizationName']),await _0x501e58['KZBXY'](storeToken,_0x5be8e6),console[_0x207b04(0x107)](process['env']['GITHUB_ENV']?_0x207b04(0xab):_0x501e58[_0x207b04(0xfe)]),{'token':_0x5be8e6,'method':_0x501e58['QPDoO']};}export async function ensureRangerDir(_0x2950ba){const _0x1bb19f=_0x409d75,_0x2f2de1={'mlMaV':function(_0xad10b4,_0x2cdce8){return _0xad10b4(_0x2cdce8);},'ebgDY':function(_0x358ac2,_0x510b82,_0x395fc3){return _0x358ac2(_0x510b82,_0x395fc3);},'FPJWY':'✓\x20Created\x20~/.ranger/\x20directory','fcXBx':_0x1bb19f(0xaa)};void _0x2950ba;const _0x2b8ce4=getRangerHomeDir();return!_0x2f2de1['mlMaV'](existsSync,_0x2b8ce4)?(await _0x2f2de1['ebgDY'](mkdir,_0x2b8ce4,{'recursive':!![]}),console['log'](_0x2f2de1['FPJWY']),{'path':_0x2b8ce4,'installed':!![]}):(console['log'](_0x2f2de1['fcXBx']),{'path':_0x2b8ce4,'installed':![]});}export async function ensureChromium(_0x4473c3=![]){const _0x5c8311=_0x409d75,_0x50d87f={'NbLwu':_0x5c8311(0xb9),'jreeH':function(_0x52e464){return _0x52e464();},'lgabD':function(_0x3d19c9,_0x30e09){return _0x3d19c9??_0x30e09;},'GVaER':_0x5c8311(0xdf),'kTWee':_0x5c8311(0xaf)};let _0x1f9f54=![];try{const _0x598370=chromium['executablePath']();_0x1f9f54=existsSync(_0x598370);}catch{_0x1f9f54=![];}if(_0x1f9f54)return console['log'](_0x50d87f['NbLwu']),![];const _0x4ee2e9=_0x50d87f['jreeH'](getPlaywrightVersion),_0x347335=_0x50d87f['lgabD'](_0x4ee2e9,PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION),_0x434ef6=!_0x4ee2e9,_0x5d00eb=process['stdin'][_0x5c8311(0xf0)]&&process[_0x5c8311(0xff)][_0x5c8311(0xf0)];let _0x8705c6=!![];if(_0x5d00eb){const {install:_0x274337}=await _0x469b3a[_0x5c8311(0xae)]([{'type':'confirm','name':'install','message':_0x434ef6?'Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20'+_0x347335+_0x5c8311(0xa3):_0x5c8311(0xcb)+_0x347335+_0x5c8311(0xa9),'default':!![]}]);_0x8705c6=_0x274337;}else console['log'](_0x5c8311(0xd0)+_0x347335+(_0x434ef6?_0x50d87f['GVaER']:'')+'...');if(_0x8705c6){console[_0x5c8311(0x107)](_0x5c8311(0xcc));try{await installChromiumBinary(_0x347335,_0x4473c3),console[_0x5c8311(0x107)]('\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully');}catch(_0x181e52){console[_0x5c8311(0x100)](_0x5c8311(0xf8),_0x181e52 instanceof Error?_0x181e52[_0x5c8311(0xb6)]:_0x181e52),console['log'](_0x5c8311(0xba)),console[_0x5c8311(0x107)](_0x5c8311(0xb3)+_0x347335+'\x20install\x20chromium');}}else console[_0x5c8311(0x107)](_0x5c8311(0xd4)),console['log'](_0x50d87f[_0x5c8311(0xca)]),console[_0x5c8311(0x107)](_0x5c8311(0xb3)+_0x347335+_0x5c8311(0xe4));return!![];}export async function writeRangerGitignore(_0x4872eb){const _0x90f860=_0x409d75,_0x4ff283=join(_0x4872eb,'.gitignore'),_0x108d4f='\x0a\x0a#\x20Ignore\x20local-only\x20directories\x0alocal/\x0asessions/\x0abug-bashes/\x0areports/\x0afeedback-images/\x0a\x0aactive-profile.txt\x0aactive-feature.txt\x0a.gitignore\x0a\x0a#\x20Ignore\x20plaintext\x20auth\x20files\x20(encrypted\x20.enc\x20files\x20are\x20safe\x20to\x20commit)\x0a**/auth.json\x0a';await writeFile(_0x4ff283,_0x108d4f),console[_0x90f860(0x107)](_0x90f860(0xf1));}export async function ensureLocalEnv(_0xadce61,_0x412fa7){const _0xa0f57d=_0x409d75,_0xb88090={'jJZgD':function(_0x43594a){return _0x43594a();},'trYgS':_0xa0f57d(0xc7),'vGtpY':_0xa0f57d(0xd7),'kVUDh':_0xa0f57d(0xf3),'AcxqW':function(_0x3a6a34,_0x4efdcd,_0xe5c6ed,_0x31efbd){return _0x3a6a34(_0x4efdcd,_0xe5c6ed,_0x31efbd);},'btJpd':function(_0xd03324,_0x4a57c3){return _0xd03324 instanceof _0x4a57c3;}};if(!_0xb88090['jJZgD'](findGitRoot)&&_0xadce61?.['scope']!==_0xb88090['trYgS'])return console['log']('⚠\x20No\x20git\x20repository\x20found.\x20Re-run\x20with\x20`--scope\x20user`\x20to\x20store\x20the\x20profile\x20at\x20~/.ranger/.'),{'ready':![],'skipped':!![]};const _0x16a579=_0xadce61?.[_0xa0f57d(0xb1)]==='user'?getRangerHomeDir():undefined;if(findExistingEnv(_0xb88090[_0xa0f57d(0xa6)],{'locations':[_0xa0f57d(0xd7)],'rangerDir':_0x16a579}))return console['log'](_0xb88090[_0xa0f57d(0x108)]),{'ready':!![],'skipped':![]};try{return await _0xb88090[_0xa0f57d(0xc1)](addEnv,_0xb88090[_0xa0f57d(0xa6)],{'url':_0xadce61?.['url'],'force':_0xadce61?.['force'],'allowInsecureLocalhost':_0xadce61?.['allowInsecureLocalhost'],'scope':_0xadce61?.[_0xa0f57d(0xb1)]},_0x412fa7),{'ready':!![],'skipped':![]};}catch(_0x4f74ac){return console[_0xa0f57d(0x100)]('\x0a❌\x20Profile\x20setup\x20failed:',_0xb88090[_0xa0f57d(0x102)](_0x4f74ac,Error)?_0x4f74ac['message']:_0x4f74ac),{'ready':![],'skipped':![]};}}export async function start(_0x1fa4bb,_0x5b5b35,_0x1f517d){const _0x409b17=_0x409d75,_0x57ac63={'Yzdsp':'user','lfeJn':function(_0x569300,_0x36d820){return _0x569300(_0x36d820);},'cDUtX':function(_0x51bd65){return _0x51bd65();},'KKvWS':'auth','JRVGM':_0x409b17(0xfb),'KCoOA':function(_0x2210ce,_0x4ad418){return _0x2210ce(_0x4ad418);},'HFkbz':_0x409b17(0xb5),'PkPTi':'plugin','UuXzA':function(_0x2aaa18,_0x34e3b8){return _0x2aaa18&&_0x34e3b8;},'keVTK':'skills','LpElM':function(_0x2ed3c9,_0x49662e,_0x20aeb0){return _0x2ed3c9(_0x49662e,_0x20aeb0);},'XjhQh':_0x409b17(0xf6),'pBnpE':function(_0x18507b,_0x4c5d83){return _0x18507b instanceof _0x4c5d83;},'jqfXF':'profile','egpJn':function(_0x212682,_0x5632fc){return _0x212682+_0x5632fc;},'mmdZK':_0x409b17(0xbb),'TEiJM':'RANGER_TEST_PASSWORD','nIayw':'ranger\x20profile\x20add','VAHdj':_0x409b17(0xb2),'QuLXb':_0x409b17(0xce),'aVwNL':'verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','jZcOB':function(_0x2b009d,_0x205c2d){return _0x2b009d(_0x205c2d);},'qtgZt':_0x409b17(0xd8),'RbxEn':function(_0x5d3ae3,_0x24deff){return _0x5d3ae3+_0x24deff;},'mXxkz':function(_0xb66b81,_0x23d6bd){return _0xb66b81+_0x23d6bd;}};console[_0x409b17(0x107)](_0x409b17(0xb7)),_0x5b5b35={..._0x5b5b35,'scope':_0x57ac63[_0x409b17(0xee)]};const _0x1d578a=!_0x57ac63['lfeJn'](existsSync,_0x57ac63[_0x409b17(0x104)](getRangerHomeDir));await _0x57ac63['lfeJn'](ensureRangerDir,_0x57ac63[_0x409b17(0xee)]);if(_0x5b5b35?.[_0x409b17(0xe1)])console['log'](_0x409b17(0xa4)),_0x1f517d?.['trackPhaseEnd'](_0x57ac63[_0x409b17(0xea)],{'isFirstRun':_0x1d578a,'method':_0x57ac63['JRVGM']});else{_0x1f517d?.['trackPhaseStart'](_0x57ac63[_0x409b17(0xea)]);const _0x3596ce=await _0x57ac63['KCoOA'](authenticate,_0x1fa4bb);_0x1f517d?.['trackPhaseEnd']('auth',{'isFirstRun':_0x1d578a,'method':_0x3596ce['method']});}_0x1f517d?.['trackPhaseStart'](_0x409b17(0xb5));_0x5b5b35?.['skipChromium']?console[_0x409b17(0x107)]('✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)'):await ensureChromium(_0x5b5b35?.[_0x409b17(0xd3)]);_0x1f517d?.[_0x409b17(0xe9)](_0x57ac63['HFkbz'],{'isFirstRun':_0x1d578a,'skipped':!!_0x5b5b35?.['skipChromium']}),console[_0x409b17(0x107)](_0x409b17(0xd6));const _0x85fbb5=_0x5b5b35?.[_0x409b17(0xb1)],_0x2b9c66=_0x5b5b35?.[_0x409b17(0xb0)]??![];let _0x2a6924=null;_0x2b9c66?(_0x1f517d?.[_0x409b17(0xcf)](_0x409b17(0xe3)),_0x2a6924=await ensureOpencodePluginConfig(_0x85fbb5),_0x1f517d?.['trackPhaseEnd'](_0x57ac63['PkPTi'],{'isFirstRun':_0x1d578a,'opencode':!![]})):(_0x1f517d?.['trackPhaseStart'](_0x409b17(0xe3)),await ensureClaudePlugin(_0x85fbb5),_0x1f517d?.[_0x409b17(0xe9)]('plugin',{'isFirstRun':_0x1d578a}));if(_0x57ac63['UuXzA'](_0x2b9c66,_0x2a6924)){_0x1f517d?.[_0x409b17(0xcf)](_0x57ac63[_0x409b17(0xc0)]);try{await _0x57ac63['LpElM'](installSkill,'ranger',{'level':_0x2a6924['scope'],'cliVersion':_0x57ac63[_0x409b17(0x104)](getCurrentVersion),'platform':_0x409b17(0xb0)}),_0x1f517d?.[_0x409b17(0xe9)](_0x57ac63[_0x409b17(0xc0)],{'isFirstRun':_0x1d578a,'opencode':!![]});}catch(_0x1c110d){console[_0x409b17(0xbc)](_0x57ac63[_0x409b17(0xcd)],_0x57ac63['pBnpE'](_0x1c110d,Error)?_0x1c110d['message']:_0x1c110d),_0x1f517d?.[_0x409b17(0xe9)]('skills',{'isFirstRun':_0x1d578a,'opencode':!![],'failed':!![]});}}else _0x1f517d?.[_0x409b17(0xcf)]('skills'),await ensureClaudeSkills(_0x85fbb5),_0x1f517d?.['trackPhaseEnd'](_0x57ac63['keVTK'],{'isFirstRun':_0x1d578a});if(_0x5b5b35?.[_0x409b17(0xe1)])console[_0x409b17(0x107)](_0x409b17(0xed));else{if(_0x5b5b35?.['url']){_0x1f517d?.['trackPhaseStart'](_0x57ac63['jqfXF']);const _0x453232=await ensureLocalEnv({'url':_0x5b5b35['url'],'force':_0x5b5b35?.[_0x409b17(0x10a)],'allowInsecureLocalhost':_0x5b5b35?.[_0x409b17(0x10b)],'scope':'user'},_0x1f517d);_0x1f517d?.[_0x409b17(0xe9)](_0x57ac63[_0x409b17(0x103)],{'isFirstRun':_0x1d578a,'profileReady':_0x453232[_0x409b17(0xeb)],'userSkipped':_0x453232[_0x409b17(0xfb)]});}else console['log'](_0x57ac63['egpJn'](_0x409b17(0xc9)+_0x57ac63['KCoOA'](bold,_0x57ac63['mmdZK'])+'\x20'+('(and\x20'+_0x57ac63['KCoOA'](bold,_0x57ac63[_0x409b17(0xa7)])+'\x20when\x20the\x20org\x27s\x20login')+'\x0a\x20\x20config\x20uses\x20username+password).\x20Orgs\x20on\x20SSO/SAML/OAuth',_0x409b17(0xa8))+_0x409b17(0xdd)),console['log']('\x20\x20(or\x20use\x20'+_0x57ac63[_0x409b17(0xf7)](bold,_0x57ac63[_0x409b17(0xe8)])+_0x409b17(0xe6));}if(_0x2b9c66)console[_0x409b17(0x107)](_0x57ac63[_0x409b17(0xf2)]),console['log'](_0x409b17(0x105)),console[_0x409b17(0x107)](_0x57ac63[_0x409b17(0xfd)]),console['log'](_0x57ac63[_0x409b17(0x101)]);else{const _0x24275b=_0x57ac63[_0x409b17(0x10d)](bold,_0x57ac63['qtgZt']);console['log'](_0x57ac63[_0x409b17(0xda)](_0x57ac63[_0x409b17(0xac)]('\x0aIn\x20Claude\x20Code,\x20run\x20'+_0x24275b+_0x409b17(0xfc)+_0x409b17(0xdc),_0x409b17(0xe5)),'\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.'));}}
|
|
1
|
+
const _0x12da14=_0x5a86;(function(_0x4f7829,_0x5528be){const _0x265e13=_0x5a86,_0x49e020=_0x4f7829();while(!![]){try{const _0x168bb2=parseInt(_0x265e13(0x179))/0x1+parseInt(_0x265e13(0x18a))/0x2*(-parseInt(_0x265e13(0x1b0))/0x3)+-parseInt(_0x265e13(0x1ac))/0x4*(parseInt(_0x265e13(0x1cb))/0x5)+parseInt(_0x265e13(0x1e4))/0x6*(parseInt(_0x265e13(0x184))/0x7)+-parseInt(_0x265e13(0x1e1))/0x8+-parseInt(_0x265e13(0x177))/0x9*(-parseInt(_0x265e13(0x1b3))/0xa)+parseInt(_0x265e13(0x1da))/0xb*(-parseInt(_0x265e13(0x1dd))/0xc);if(_0x168bb2===_0x5528be)break;else _0x49e020['push'](_0x49e020['shift']());}catch(_0x3d49e9){_0x49e020['push'](_0x49e020['shift']());}}}(_0x95d4,0x59fa1));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x1287d4 from'inquirer';import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';import{chromium}from'playwright';import{addEnv}from'./addEnv.js';import{getRangerHomeDir,findGitRoot}from'./utils/rangerRoot.js';import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{findExistingEnv}from'./utils/settings.js';import{getCurrentVersion}from'./utils/version.js';import{ensureClaudePlugin,ensureClaudeSkills}from'./setup/claude.js';import{ensureOpencodePluginConfig}from'./setup/opencode.js';import{installSkill}from'./utils/skills.js';const require=createRequire(import.meta.url);export const PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION=_0x12da14(0x193);const bold=_0x369f67=>_0x12da14(0x1db)+_0x369f67+'\x1b[0m';export function getPlaywrightVersion(){try{const _0x25d3e7=require['resolve']('playwright/package.json'),_0x44355c=require(_0x25d3e7);return _0x44355c['version'];}catch{return null;}}export function installChromiumBinary(_0x2bf272,_0x459ab0=![]){const _0x32a197=_0x12da14,_0x7378d9={'bGoYy':function(_0x5a2b88,_0x5406c4){return _0x5a2b88(_0x5406c4);},'ThgfW':function(_0x140018){return _0x140018();},'TjvQx':_0x32a197(0x1d0),'WzDCY':function(_0x2bf31d,_0x2e8f2d,_0x585cc4,_0x1f588a){return _0x2bf31d(_0x2e8f2d,_0x585cc4,_0x1f588a);},'ahdGQ':_0x32a197(0x174),'qfqxj':'ignore','oKHzm':_0x32a197(0x1b5),'fwNWg':function(_0x3101ad,_0x83c046){return _0x3101ad===_0x83c046;},'rPTrR':_0x32a197(0x170),'RbOcw':_0x32a197(0x178),'FZXex':'error'};return new Promise((_0x4fb238,_0x1d1b80)=>{const _0xaf1d66=_0x32a197,_0x3617e2={'OlNGN':function(_0x3576b2){const _0x16be7b=_0x5a86;return _0x7378d9[_0x16be7b(0x1e6)](_0x3576b2);}},_0x2eb552=['playwright@'+_0x2bf272,'install',..._0x459ab0?['--with-deps']:[],_0x7378d9[_0xaf1d66(0x17f)]],_0x5a2759=_0x7378d9['WzDCY'](spawn,_0x7378d9[_0xaf1d66(0x186)],_0x2eb552,{'stdio':[_0x7378d9['qfqxj'],_0x7378d9['oKHzm'],'inherit'],'shell':_0x7378d9['fwNWg'](process[_0xaf1d66(0x1a6)],_0x7378d9['rPTrR'])});_0x5a2759['on'](_0x7378d9['RbOcw'],_0x2cb176=>{const _0x474a00=_0xaf1d66;_0x2cb176===0x0?_0x3617e2[_0x474a00(0x1a9)](_0x4fb238):_0x1d1b80(new Error('Installation\x20failed\x20with\x20exit\x20code\x20'+_0x2cb176));}),_0x5a2759['on'](_0x7378d9['FZXex'],_0x5739ed=>{const _0x5d44ce=_0xaf1d66;_0x7378d9[_0x5d44ce(0x1cd)](_0x1d1b80,_0x5739ed);});});}export async function authenticate(_0xf57481){const _0x3dd560=_0x12da14,_0x29fe31={'TdUPQ':function(_0x43b67d){return _0x43b67d();},'UefMW':function(_0x4cd1ba,_0x3c5cd7){return _0x4cd1ba(_0x3c5cd7);},'eAssv':_0x3dd560(0x1bb),'ruMyX':function(_0x384daf,_0x2bd3d1){return _0x384daf(_0x2bd3d1);}};if(!_0xf57481){const _0x44a34b=await _0x29fe31['TdUPQ'](getToken);if(_0x44a34b){const _0x37727c=await _0x29fe31[_0x3dd560(0x1d4)](getCurrentUser,_0x44a34b);if(_0x37727c[_0x3dd560(0x1b9)])return console[_0x3dd560(0x1a2)](_0x3dd560(0x18f)+_0x37727c[_0x3dd560(0x1bf)]['organizationName']),{'token':_0x44a34b,'method':'existing_token'};}try{_0xf57481=await _0x29fe31[_0x3dd560(0x19a)](runDeviceAuthFlow);}catch(_0x4c45d2){throw new Error('Authentication\x20failed:\x20'+(_0x4c45d2 instanceof Error?_0x4c45d2[_0x3dd560(0x188)]:_0x4c45d2));}const _0x2582b6=await getCurrentUser(_0xf57481);if(!_0x2582b6['success'])throw new Error('Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20'+_0x2582b6[_0x3dd560(0x1d7)]);return console['log'](_0x3dd560(0x1c5)+_0x2582b6['user'][_0x3dd560(0x17b)]),{'token':_0xf57481,'method':_0x3dd560(0x19e)};}console['log'](_0x29fe31['eAssv']);const _0xdb1952=await _0x29fe31[_0x3dd560(0x198)](getCurrentUser,_0xf57481);if(!_0xdb1952['success']){if(_0xdb1952[_0x3dd560(0x1a0)])throw new Error(_0x3dd560(0x1c3)+_0xdb1952['error']+'.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.');else throw new Error(_0x3dd560(0x171)+_0xdb1952[_0x3dd560(0x1d7)]+_0x3dd560(0x17d));}return console['log']('✓\x20Authenticated\x20to\x20'+_0xdb1952[_0x3dd560(0x1bf)][_0x3dd560(0x17b)]),await _0x29fe31[_0x3dd560(0x198)](storeToken,_0xf57481),console['log'](process['env']['GITHUB_ENV']?'✓\x20Exported\x20credentials\x20for\x20CI':_0x3dd560(0x1b4)),{'token':_0xf57481,'method':'provided_token'};}export async function ensureRangerDir(_0x361d26){const _0xed6ef=_0x12da14,_0x33a9d2={'MCTji':function(_0x240e33,_0x32b92d){return _0x240e33(_0x32b92d);},'TklmY':_0xed6ef(0x194)};void _0x361d26;const _0x4b1cf1=getRangerHomeDir();return!_0x33a9d2[_0xed6ef(0x1c9)](existsSync,_0x4b1cf1)?(await mkdir(_0x4b1cf1,{'recursive':!![]}),console[_0xed6ef(0x1a2)](_0x33a9d2[_0xed6ef(0x1a5)]),{'path':_0x4b1cf1,'installed':!![]}):(console['log']('✓\x20~/.ranger/\x20directory\x20already\x20exists'),{'path':_0x4b1cf1,'installed':![]});}export async function ensureChromium(_0x5b37ea=![]){const _0x2d565f=_0x12da14,_0x43a53a={'nOyLv':function(_0x1fbc18,_0x132d25){return _0x1fbc18(_0x132d25);},'YIFJM':function(_0x13f6bd,_0x471fd8){return _0x13f6bd??_0x471fd8;},'OfSbb':'confirm','lCwoP':'\x0aInstalling\x20Chromium\x20browser...\x0a','WsLhk':'\x0a❌\x20Failed\x20to\x20install\x20Chromium:','duLng':function(_0x916e1,_0x2d9cfa){return _0x916e1 instanceof _0x2d9cfa;}};let _0x40951e=![];try{const _0x4490a9=chromium[_0x2d565f(0x1e2)]();_0x40951e=_0x43a53a['nOyLv'](existsSync,_0x4490a9);}catch{_0x40951e=![];}if(_0x40951e)return console['log'](_0x2d565f(0x1b1)),![];const _0x33e6a7=getPlaywrightVersion(),_0xa5cf24=_0x43a53a['YIFJM'](_0x33e6a7,PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION),_0x5fa35b=!_0x33e6a7,_0x173020=process[_0x2d565f(0x1a8)]['isTTY']&&process[_0x2d565f(0x1ba)]['isTTY'];let _0x4485ea=!![];if(_0x173020){const {install:_0x3aae04}=await _0x1287d4['prompt']([{'type':_0x43a53a[_0x2d565f(0x187)],'name':_0x2d565f(0x1b2),'message':_0x5fa35b?_0x2d565f(0x17e)+_0xa5cf24+_0x2d565f(0x190):_0x2d565f(0x192)+_0xa5cf24+')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','default':!![]}]);_0x4485ea=_0x3aae04;}else console['log']('\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20'+_0xa5cf24+(_0x5fa35b?'\x20(fallback\x20version)':'')+'...');if(_0x4485ea){console['log'](_0x43a53a['lCwoP']);try{await installChromiumBinary(_0xa5cf24,_0x5b37ea),console['log'](_0x2d565f(0x1d2));}catch(_0x7dcbd){console[_0x2d565f(0x1d7)](_0x43a53a['WsLhk'],_0x43a53a['duLng'](_0x7dcbd,Error)?_0x7dcbd[_0x2d565f(0x188)]:_0x7dcbd),console[_0x2d565f(0x1a2)](_0x2d565f(0x18b)),console['log'](_0x2d565f(0x1e5)+_0xa5cf24+_0x2d565f(0x185));}}else console['log']('\x0a⚠\x20Skipping\x20Chromium\x20installation.'),console[_0x2d565f(0x1a2)]('You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:'),console['log'](_0x2d565f(0x1e5)+_0xa5cf24+'\x20install\x20chromium');return!![];}export async function writeRangerGitignore(_0x535c8b){const _0x2a2a7c=_0x12da14,_0x195a27={'OnLOa':function(_0x4ec462,_0x314e23,_0x41c648){return _0x4ec462(_0x314e23,_0x41c648);},'ahlVK':'✓\x20Created\x20.ranger/.gitignore'},_0x56832b=_0x195a27[_0x2a2a7c(0x1c2)](join,_0x535c8b,_0x2a2a7c(0x18d)),_0xb9a37a=_0x2a2a7c(0x1e0);await _0x195a27[_0x2a2a7c(0x1c2)](writeFile,_0x56832b,_0xb9a37a),console[_0x2a2a7c(0x1a2)](_0x195a27[_0x2a2a7c(0x1cf)]);}function _0x5a86(_0x579157,_0x4ce8fb){_0x579157=_0x579157-0x16f;const _0x95d48e=_0x95d4();let _0x5a8655=_0x95d48e[_0x579157];return _0x5a8655;}function _0x95d4(){const _0x4fa806=['You\x20can\x20install\x20it\x20manually\x20by\x20running:','\x0aIn\x20Claude\x20Code,\x20run\x20','.gitignore','/ranger:enable','✓\x20Already\x20authenticated\x20to\x20','\x20now?','\x0aTo\x20verify\x20with\x20a\x20browser,\x20set\x20','The\x20required\x20version\x20(','1.58.2','✓\x20Created\x20~/.ranger/\x20directory','ranger\x20profile\x20add','\x20and\x20prompt\x20the\x20coding','\x0a\x20\x20config\x20uses\x20username+password).\x20Orgs\x20on\x20SSO/SAML/OAuth','ruMyX','qBaHQ','TdUPQ','auth','HsMQk','✓\x20Local\x20profile\x20already\x20exists','device_auth','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','status','XPIHA','log','Setup\x20always\x20installs\x20at\x20user\x20scope\x20now\x20(cloud\x20profiles\x20make\x20','scope','TklmY','platform','allowInsecureLocalhost','stdin','OlNGN','with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','UgiBN','5452vggeCw','✓\x20Skipping\x20authentication\x20(--skip-auth)','trackPhaseEnd','\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with','9AGZGuk','✓\x20Playwright\x20Chromium\x20browser\x20found','install','10wwomXy','✓\x20Stored\x20credentials\x20locally','inherit','\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','\x0aSkipping\x20profile\x20setup\x20(--skip-auth).\x20Run\x20`ranger\x20setup`\x20with\x20auth\x20to\x20add\x20a\x20profile\x20later.\x0a','\x0a\x20\x20your\x20org\x27s\x20auth\x20config\x20drives\x20which\x20flow\x20runs.','success','stdout','Validating\x20API\x20token...','gDXYr','cZKDq','⚠\x20No\x20git\x20repository\x20found.\x20Re-run\x20with\x20`--scope\x20user`\x20to\x20store\x20the\x20profile\x20at\x20~/.ranger/.','user','opencode','profile','OnLOa','Authentication\x20failed:\x20','\x20may\x20need\x20a\x20one-time\x20headed\x20login\x20instead\x20—','✓\x20Authenticated\x20to\x20','ready','BoULs','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','MCTji','\x20is\x20no\x20longer\x20supported.\x20','1610hnoqsH','LrBmS','bGoYy','trackPhaseStart','ahlVK','chromium','skills','\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','skipAuth','UefMW','IVbkg','plugin','error','skipped','HYqPw','22zpakuw','\x1b[1m','\x20\x20(or\x20use\x20','2216316fYgzgz','jPNAQ','vhNJS','\x0a\x0a#\x20Ignore\x20local-only\x20directories\x0alocal/\x0asessions/\x0abug-bashes/\x0areports/\x0afeedback-images/\x0a\x0aactive-profile.txt\x0aactive-feature.txt\x0a.gitignore\x0a\x0a#\x20Ignore\x20plaintext\x20auth\x20files\x20(encrypted\x20.enc\x20files\x20are\x20safe\x20to\x20commit)\x0a**/auth.json\x0a','437280vvfgdP','executablePath','CsGDX','48TwogbS','\x20\x20npx\x20playwright@','ThgfW','RANGER_TEST_USERNAME','OGXek','win32','Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20','fXcaX','VKxjs','npx','\x0a❌\x20Profile\x20setup\x20failed:','cSpaC','5152392VGPUnv','close','265264zlSLcI','dECrW','organizationName','ranger\x20setup\x20--scope=','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20','TjvQx','buNdk','ZyPZT','force','url','561358OmxKFk','\x20install\x20chromium','ahdGQ','OfSbb','message','local','165218aWZvVO'];_0x95d4=function(){return _0x4fa806;};return _0x95d4();}export async function ensureLocalEnv(_0xdabcfb,_0x956764){const _0x5130e5=_0x12da14,_0x82245c={'cSpaC':function(_0x2c6163){return _0x2c6163();},'vhNJS':function(_0x35cf1a,_0x185ba7){return _0x35cf1a!==_0x185ba7;},'IVbkg':_0x5130e5(0x1bf),'ufDQD':_0x5130e5(0x1be),'dECrW':function(_0x12a893){return _0x12a893();},'zEYrf':function(_0x367ff0,_0x1dbdff,_0x544011){return _0x367ff0(_0x1dbdff,_0x544011);},'XPIHA':_0x5130e5(0x189),'qBaHQ':_0x5130e5(0x19d),'tJTUX':function(_0x348c0f,_0x404e8f,_0x3a9972,_0x536e81){return _0x348c0f(_0x404e8f,_0x3a9972,_0x536e81);},'nntpm':_0x5130e5(0x175),'LsJWE':function(_0x3c306c,_0x3b5062){return _0x3c306c instanceof _0x3b5062;}};if(!_0x82245c[_0x5130e5(0x176)](findGitRoot)&&_0x82245c[_0x5130e5(0x1df)](_0xdabcfb?.['scope'],_0x82245c[_0x5130e5(0x1d5)]))return console[_0x5130e5(0x1a2)](_0x82245c['ufDQD']),{'ready':![],'skipped':!![]};const _0x233202=_0xdabcfb?.['scope']===_0x82245c['IVbkg']?_0x82245c[_0x5130e5(0x17a)](getRangerHomeDir):undefined;if(_0x82245c['zEYrf'](findExistingEnv,_0x82245c[_0x5130e5(0x1a1)],{'locations':[_0x82245c[_0x5130e5(0x1a1)]],'rangerDir':_0x233202}))return console['log'](_0x82245c[_0x5130e5(0x199)]),{'ready':!![],'skipped':![]};try{return await _0x82245c['tJTUX'](addEnv,'local',{'url':_0xdabcfb?.['url'],'force':_0xdabcfb?.[_0x5130e5(0x182)],'allowInsecureLocalhost':_0xdabcfb?.['allowInsecureLocalhost'],'scope':_0xdabcfb?.['scope']},_0x956764),{'ready':!![],'skipped':![]};}catch(_0x272339){return console['error'](_0x82245c['nntpm'],_0x82245c['LsJWE'](_0x272339,Error)?_0x272339['message']:_0x272339),{'ready':![],'skipped':![]};}}export async function start(_0x527efe,_0x3aa466,_0x2ff430){const _0x532cc2=_0x12da14,_0x427ea9={'ZyPZT':'\x0a🚀\x20Ranger\x20Setup\x0a','OGXek':function(_0x2446ad,_0x2daaf6){return _0x2446ad!==_0x2daaf6;},'RLAwz':function(_0xe527c1,_0x55e73d){return _0xe527c1+_0x55e73d;},'gDXYr':function(_0x5e409e,_0x2c1ada){return _0x5e409e(_0x2c1ada);},'jPNAQ':function(_0x3e5567,_0x410455){return _0x3e5567(_0x410455);},'LrBmS':_0x532cc2(0x1ad),'tOVVM':_0x532cc2(0x19b),'ynnHg':function(_0x779509,_0x2dd81a){return _0x779509(_0x2dd81a);},'UgiBN':function(_0x276e4d,_0x470946){return _0x276e4d(_0x470946);},'CsGDX':'plugin','xNoSE':function(_0x1db47e,_0x37bb7d){return _0x1db47e(_0x37bb7d);},'Bqdzb':_0x532cc2(0x1d1),'buNdk':function(_0x14889e,_0x29d46d,_0x25b4a0){return _0x14889e(_0x29d46d,_0x25b4a0);},'SHJRR':_0x532cc2(0x1c0),'hpfou':function(_0x5b197c,_0x4a1ed0){return _0x5b197c instanceof _0x4a1ed0;},'BoULs':function(_0x501794,_0x1943ad){return _0x501794(_0x1943ad);},'cZKDq':_0x532cc2(0x1c1),'fXcaX':function(_0x3b4db8,_0x5acaba,_0x3b118d){return _0x3b4db8(_0x5acaba,_0x3b118d);},'fSuHy':function(_0xcab11d,_0x2b29e0){return _0xcab11d(_0x2b29e0);},'VKxjs':'RANGER_TEST_PASSWORD','UFdNF':function(_0x232391,_0x405605){return _0x232391(_0x405605);},'zxPdc':_0x532cc2(0x195),'HsMQk':'\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','HYqPw':'verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','TjFuQ':function(_0x2b5a0d,_0x522561){return _0x2b5a0d+_0x522561;},'IAYKV':function(_0x3c7163,_0x49c841){return _0x3c7163+_0x49c841;}};console['log'](_0x427ea9[_0x532cc2(0x181)]);_0x3aa466?.[_0x532cc2(0x1a4)]!==undefined&&_0x427ea9[_0x532cc2(0x16f)](_0x3aa466['scope'],'user')&&(console[_0x532cc2(0x1d7)](_0x427ea9['RLAwz'](_0x532cc2(0x17c)+_0x427ea9[_0x532cc2(0x1bc)](String,_0x3aa466[_0x532cc2(0x1a4)])+_0x532cc2(0x1ca)+_0x532cc2(0x1a3),'project-scope\x20setup\x20obsolete).\x20Drop\x20the\x20--scope\x20flag\x20or\x20pass\x20--scope=user.')),process['exit'](0x1));_0x3aa466={..._0x3aa466,'scope':_0x532cc2(0x1bf)};const _0x3ebd74=!existsSync(getRangerHomeDir());await _0x427ea9['jPNAQ'](ensureRangerDir,_0x532cc2(0x1bf));if(_0x3aa466?.['skipAuth'])console[_0x532cc2(0x1a2)](_0x427ea9[_0x532cc2(0x1cc)]),_0x2ff430?.[_0x532cc2(0x1ae)]('auth',{'isFirstRun':_0x3ebd74,'method':'skipped'});else{_0x2ff430?.[_0x532cc2(0x1ce)](_0x427ea9['tOVVM']);const _0x3b74c6=await _0x427ea9['ynnHg'](authenticate,_0x527efe);_0x2ff430?.[_0x532cc2(0x1ae)]('auth',{'isFirstRun':_0x3ebd74,'method':_0x3b74c6['method']});}_0x2ff430?.['trackPhaseStart'](_0x532cc2(0x1d0));_0x3aa466?.['skipChromium']?console['log'](_0x532cc2(0x19f)):await _0x427ea9[_0x532cc2(0x1de)](ensureChromium,_0x3aa466?.['withDeps']);_0x2ff430?.['trackPhaseEnd'](_0x532cc2(0x1d0),{'isFirstRun':_0x3ebd74,'skipped':!!_0x3aa466?.['skipChromium']}),console[_0x532cc2(0x1a2)]('\x0a✅\x20Ranger\x20setup\x20complete!\x0a');const _0x41447a=_0x3aa466?.[_0x532cc2(0x1a4)],_0xec96a8=_0x3aa466?.['opencode']??![];let _0x53a665=null;_0xec96a8?(_0x2ff430?.[_0x532cc2(0x1ce)](_0x532cc2(0x1d6)),_0x53a665=await _0x427ea9[_0x532cc2(0x1ab)](ensureOpencodePluginConfig,_0x41447a),_0x2ff430?.['trackPhaseEnd'](_0x427ea9[_0x532cc2(0x1e3)],{'isFirstRun':_0x3ebd74,'opencode':!![]})):(_0x2ff430?.[_0x532cc2(0x1ce)](_0x427ea9[_0x532cc2(0x1e3)]),await _0x427ea9['xNoSE'](ensureClaudePlugin,_0x41447a),_0x2ff430?.['trackPhaseEnd']('plugin',{'isFirstRun':_0x3ebd74}));if(_0xec96a8&&_0x53a665){_0x2ff430?.[_0x532cc2(0x1ce)](_0x427ea9['Bqdzb']);try{await _0x427ea9[_0x532cc2(0x180)](installSkill,'ranger',{'level':_0x53a665[_0x532cc2(0x1a4)],'cliVersion':getCurrentVersion(),'platform':_0x427ea9['SHJRR']}),_0x2ff430?.['trackPhaseEnd'](_0x532cc2(0x1d1),{'isFirstRun':_0x3ebd74,'opencode':!![]});}catch(_0x3a59b4){console['warn'](_0x532cc2(0x1b6),_0x427ea9['hpfou'](_0x3a59b4,Error)?_0x3a59b4['message']:_0x3a59b4),_0x2ff430?.[_0x532cc2(0x1ae)](_0x532cc2(0x1d1),{'isFirstRun':_0x3ebd74,'opencode':!![],'failed':!![]});}}else _0x2ff430?.[_0x532cc2(0x1ce)](_0x532cc2(0x1d1)),await _0x427ea9[_0x532cc2(0x1c7)](ensureClaudeSkills,_0x41447a),_0x2ff430?.[_0x532cc2(0x1ae)](_0x427ea9['Bqdzb'],{'isFirstRun':_0x3ebd74});if(_0x3aa466?.[_0x532cc2(0x1d3)])console[_0x532cc2(0x1a2)](_0x532cc2(0x1b7));else{if(_0x3aa466?.[_0x532cc2(0x183)]){_0x2ff430?.[_0x532cc2(0x1ce)](_0x427ea9[_0x532cc2(0x1bd)]);const _0x1fbf4e=await _0x427ea9[_0x532cc2(0x172)](ensureLocalEnv,{'url':_0x3aa466[_0x532cc2(0x183)],'force':_0x3aa466?.['force'],'allowInsecureLocalhost':_0x3aa466?.[_0x532cc2(0x1a7)],'scope':_0x532cc2(0x1bf)},_0x2ff430);_0x2ff430?.[_0x532cc2(0x1ae)](_0x427ea9['cZKDq'],{'isFirstRun':_0x3ebd74,'profileReady':_0x1fbf4e[_0x532cc2(0x1c6)],'userSkipped':_0x1fbf4e[_0x532cc2(0x1d8)]});}else console['log'](_0x427ea9['RLAwz'](_0x532cc2(0x191)+_0x427ea9['fSuHy'](bold,_0x532cc2(0x1e7))+'\x20','(and\x20'+_0x427ea9['gDXYr'](bold,_0x427ea9[_0x532cc2(0x173)])+'\x20when\x20the\x20org\x27s\x20login')+_0x532cc2(0x197)+_0x532cc2(0x1c4)+_0x532cc2(0x1b8)),console['log'](_0x532cc2(0x1dc)+_0x427ea9['UFdNF'](bold,_0x427ea9['zxPdc'])+'\x20for\x20explicit\x20profile\x20management).');}if(_0xec96a8)console[_0x532cc2(0x1a2)](_0x427ea9[_0x532cc2(0x19c)]),console[_0x532cc2(0x1a2)]('and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review'),console['log'](_0x532cc2(0x1aa)),console['log'](_0x427ea9[_0x532cc2(0x1d9)]);else{const _0x21a93e=bold(_0x532cc2(0x18e));console[_0x532cc2(0x1a2)](_0x427ea9['TjFuQ'](_0x427ea9['IAYKV'](_0x532cc2(0x18c)+_0x21a93e+_0x532cc2(0x196)+_0x532cc2(0x1af),_0x532cc2(0x1c8)),'\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.'));}}
|
package/build/commands/status.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x3b1eee=_0x39ae;(function(_0x11bd3c,_0x47e4d1){const _0x3d1c0c=_0x39ae,_0x5a71d1=_0x11bd3c();while(!![]){try{const _0x11d56b=-parseInt(_0x3d1c0c(0xca))/0x1+-parseInt(_0x3d1c0c(0x9a))/0x2*(parseInt(_0x3d1c0c(0x73))/0x3)+parseInt(_0x3d1c0c(0x86))/0x4+parseInt(_0x3d1c0c(0x88))/0x5+-parseInt(_0x3d1c0c(0xaf))/0x6*(parseInt(_0x3d1c0c(0x94))/0x7)+parseInt(_0x3d1c0c(0x72))/0x8*(-parseInt(_0x3d1c0c(0xb7))/0x9)+parseInt(_0x3d1c0c(0xae))/0xa;if(_0x11d56b===_0x47e4d1)break;else _0x5a71d1['push'](_0x5a71d1['shift']());}catch(_0x46c5ec){_0x5a71d1['push'](_0x5a71d1['shift']());}}}(_0x4e41,0x62017));import{readFile,readdir}from'fs/promises';import{join,basename}from'path';import{existsSync}from'fs';import{getToken}from'./utils/keychain.js';function _0x4e41(){const _0x311f20=['scope','11610450zWyUGt','6BfVMoY','raISh','length','error','configured','auth.json','user','\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','183798rlsYSv','wKADD','FCTDM','(not\x20found)','LRKlq','encrypted','HcUgy','\x0a---\x20Skills\x20---','cwd','\x0a---\x20Claude\x20Code\x20Plugin\x20---','\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','string','Root:\x20','\x20\x20User-level:','Xhpkk','cuSHx','Version:\x20','\x1b]8;;\x07','jDwWd','152336uGxqEj','organizationName','trim','none','\x20\x20Run:\x20ranger\x20setup\x20[token]','RJwnp','parse','noWUQ','not_configured','No\x20profiles\x20configured','\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20','296mWvMnf','276jTuUnr','isDirectory','hLlGB','stdout','details','not_installed','version','some','siVGI','settingsPath','ivnSM','\x20\x20Run:\x20ranger\x20skillup','wiTMX','log','xPRtB','env','XkrvS','auth.json.enc','\x0a📊\x20Ranger\x20Status\x0a','2622468VmULdO','filter','821740qrhgwP','\x20(latest:\x20','@ranger-testing/opencode-plugin','HeHTD','\x20plugin(s)\x20configured','\x1b]8;;file://','displayName','data','vijdF','close','rXWiW','\x20\x20\x20\x20Auth:\x20','3893827CiZduC','SKILL.md','disabled','qWgDL','\x1b[0m','Organization:\x20','2508VprLZf','includes','map','join','API\x20URL:\x20','MFnID','\x0a---\x20Profiles\x20---','pZuTb','\x20\x20Not\x20configured','Rkfud','name','cslno','status','opencode','success','pxpJs','path','\x20\x20\x20\x20','stderr'];_0x4e41=function(){return _0x311f20;};return _0x4e41();}import{getCurrentVersion,getLatestVersion}from'./utils/version.js';import{getApiBaseUrl,getCurrentEnvironment}from'./utils/environment.js';import{getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getEnvNames}from'./env.js';import{getCurrentUser}from'./utils/userApi.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getEnvDir}from'./utils/settings.js';function _0x39ae(_0x2450d8,_0x2a8579){_0x2450d8=_0x2450d8-0x72;const _0x4e4135=_0x4e41();let _0x39ae05=_0x4e4135[_0x2450d8];return _0x39ae05;}import{getPluginInfo}from'./utils/claudePlugin.js';import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';import{spawn}from'child_process';const bold=_0x5903db=>'\x1b[1m'+_0x5903db+_0x3b1eee(0x98),link=(_0x10c110,_0x128edc)=>_0x3b1eee(0x8d)+_0x10c110+'\x07'+(_0x128edc||_0x10c110)+_0x3b1eee(0xc8);async function getOpencodePluginStatus(){const _0x4a5479=_0x3b1eee,_0x50a0f4={'xjlva':function(_0x5ef4f4,_0x4de65c){return _0x5ef4f4(_0x4de65c);},'qWgDL':_0x4a5479(0x78),'wiTMX':function(_0x279444,_0x1e0ca8){return _0x279444(_0x1e0ca8);},'wKADD':_0x4a5479(0xb3),'UEuev':function(_0x14fc1e,_0x22a595){return _0x14fc1e>_0x22a595;},'vijdF':function(_0x2b18e1,_0x3e9d5c){return _0x2b18e1(_0x3e9d5c);},'MFnID':_0x4a5479(0xd2),'Xhpkk':'debug','CoJBq':'config','zsOYb':'ignore','LlElM':_0x4a5479(0x8f),'LRKlq':_0x4a5479(0x91)};return new Promise(_0x5a2d1f=>{const _0x34d575=_0x4a5479,_0x292249=spawn(_0x34d575(0xa7),[_0x50a0f4[_0x34d575(0xc5)],_0x50a0f4['CoJBq']],{'stdio':[_0x50a0f4['zsOYb'],'pipe','pipe']});let _0x4e75a0='';_0x292249[_0x34d575(0x76)]?.['on'](_0x50a0f4['LlElM'],_0x92f76c=>{_0x4e75a0+=_0x92f76c['toString']();}),_0x292249[_0x34d575(0xac)]?.['on'](_0x34d575(0x8f),_0xa1dd2a=>{_0x4e75a0+=_0xa1dd2a['toString']();}),_0x292249['on'](_0x34d575(0xb2),()=>{const _0x17f036=_0x34d575;_0x50a0f4['xjlva'](_0x5a2d1f,{'status':_0x50a0f4[_0x17f036(0x97)]});}),_0x292249['on'](_0x50a0f4[_0x34d575(0xbb)],_0x514456=>{const _0x2ea4a6=_0x34d575,_0x4c45c8={'rXWiW':'opencode-plugin'};if(_0x514456!==0x0){_0x5a2d1f({'status':_0x50a0f4['qWgDL']});return;}const _0x1ef329=_0x4e75a0[_0x2ea4a6(0xcc)]();let _0x462132=null;if(_0x1ef329)try{_0x462132=JSON[_0x2ea4a6(0xd0)](_0x1ef329);}catch{const _0x120584=_0x1ef329['match'](/\{[\s\S]*\}$/);if(_0x120584)try{_0x462132=JSON[_0x2ea4a6(0xd0)](_0x120584[0x0]);}catch{_0x462132=null;}}const _0x5a019c=Array['isArray'](_0x462132?.['plugin'])?_0x462132?.['plugin']:[],_0x38dbde=_0x5a019c[_0x2ea4a6(0x7a)](_0x43a319=>{const _0x32691a=_0x2ea4a6;if(typeof _0x43a319!==_0x32691a(0xc2))return![];return _0x43a319['includes'](_0x32691a(0x8a))||_0x43a319[_0x32691a(0x9b)](_0x4c45c8[_0x32691a(0x92)]);});if(_0x38dbde){_0x50a0f4[_0x2ea4a6(0x7f)](_0x5a2d1f,{'status':_0x50a0f4[_0x2ea4a6(0xb8)],'details':_0x50a0f4['UEuev'](_0x5a019c[_0x2ea4a6(0xb1)],0x0)?_0x5a019c['length']+_0x2ea4a6(0x8c):undefined});return;}if(_0x5a019c['length']>0x0){_0x50a0f4['vijdF'](_0x5a2d1f,{'status':_0x2ea4a6(0xd2),'details':_0x5a019c[_0x2ea4a6(0xb1)]+_0x2ea4a6(0x8c)});return;}_0x50a0f4[_0x2ea4a6(0x90)](_0x5a2d1f,{'status':_0x50a0f4[_0x2ea4a6(0x9f)]});});});}async function getSkillsFromDir(_0x4b62e3,_0x4b634a){const _0x6755ab=_0x3b1eee,_0x50f68c={'pZuTb':function(_0x5b95c4,_0x536923){return _0x5b95c4(_0x536923);},'cuSHx':function(_0x12e3af,_0x598ac8,_0x489934,_0x1396d3){return _0x12e3af(_0x598ac8,_0x489934,_0x1396d3);}};if(!_0x50f68c[_0x6755ab(0xa1)](existsSync,_0x4b62e3))return[];const _0x49ccc0=[];try{const _0x26516c=await readdir(_0x4b62e3,{'withFileTypes':!![]});for(const _0x5c6f76 of _0x26516c){if(_0x5c6f76[_0x6755ab(0x74)]()){const _0x35679b=_0x50f68c[_0x6755ab(0xc6)](join,_0x4b62e3,_0x5c6f76[_0x6755ab(0xa4)],_0x6755ab(0x95));if(_0x50f68c['pZuTb'](existsSync,_0x35679b)){let _0x19641a=_0x5c6f76[_0x6755ab(0xa4)];try{const _0x98e6f8=await readFile(_0x35679b,'utf-8'),_0xdd4d87=_0x98e6f8['match'](/name:\s*(.+)/);_0xdd4d87&&(_0x19641a=_0xdd4d87[0x1][_0x6755ab(0xcc)]());}catch{}_0x49ccc0['push']({'name':_0x5c6f76['name'],'displayName':_0x19641a,'path':_0x35679b,'level':_0x4b634a});}}}}catch{return[];}return _0x49ccc0;}async function getInstalledSkills(){const _0x3e97c9=_0x3b1eee,_0xf44a59={'MQWkw':function(_0x1be3d1,_0x41294f,_0x2db9f8){return _0x1be3d1(_0x41294f,_0x2db9f8);},'raISh':function(_0x188c65){return _0x188c65();},'SBJzE':'project','xPRtB':_0x3e97c9(0xb5)},[_0x3ba5c9,_0x34c74e]=await Promise['all']([_0xf44a59['MQWkw'](getSkillsFromDir,_0xf44a59[_0x3e97c9(0xb0)](getProjectSkillsDir),_0xf44a59['SBJzE']),getSkillsFromDir(getUserSkillsDir(),_0xf44a59[_0x3e97c9(0x81)])]);return{'project':_0x3ba5c9,'user':_0x34c74e};}async function getEnvironments(){const _0x146126=_0x3b1eee,_0x48a6b2={'DhNEY':function(_0x2f4ece,_0x565d76,_0x49bbaa){return _0x2f4ece(_0x565d76,_0x49bbaa);},'pxpJs':function(_0x4dd66f,_0x4f3dd4,_0x356b3e){return _0x4dd66f(_0x4f3dd4,_0x356b3e);},'jDwWd':_0x146126(0xb4),'NPHLs':_0x146126(0x84),'mKzIz':'(not\x20found)','jYHuu':function(_0x1dbd5d){return _0x1dbd5d();}},{envNames:_0x307352,activeEnv:_0x4e21c0}=await _0x48a6b2['jYHuu'](getEnvNames),_0x39fde5=getRangerDir();if(!existsSync(_0x39fde5))return{'envs':[],'activeEnv':null};const _0x264cf3=_0x307352[_0x146126(0x9c)](_0x1be039=>{const _0x3073ee=_0x146126,_0x36fd31=getEnvDir(_0x1be039),_0x38fe9d=_0x48a6b2['DhNEY'](join,_0x36fd31,'settings.json'),_0xaf652c=_0x48a6b2[_0x3073ee(0xa9)](join,_0x36fd31,_0x48a6b2[_0x3073ee(0xc9)]),_0x184c8e=join(_0x36fd31,_0x48a6b2['NPHLs']);return{'name':_0x1be039,'settingsPath':existsSync(_0x38fe9d)?_0x38fe9d:_0x48a6b2['mKzIz'],'hasPlaintextAuth':existsSync(_0xaf652c),'hasEncryptedAuth':existsSync(_0x184c8e),'isActive':_0x1be039===_0x4e21c0};});return{'envs':_0x264cf3,'activeEnv':_0x4e21c0};}export async function status(){const _0x215fda=_0x3b1eee,_0x3a16de={'FCTDM':_0x215fda(0x85),'siVGI':function(_0x5361f4){return _0x5361f4();},'XkrvS':function(_0x490e74,_0x47c4bf){return _0x490e74(_0x47c4bf);},'PqMmF':function(_0x49b2de,_0x1ef024,_0x3c8b4f){return _0x49b2de(_0x1ef024,_0x3c8b4f);},'hLlGB':function(_0x3d8e90,_0x575b66){return _0x3d8e90!==_0x575b66;},'SYoNQ':function(_0x2c0b4e){return _0x2c0b4e();},'GQqHr':'\x0a---\x20OpenCode\x20Plugin\x20---','HeHTD':function(_0x553ae0,_0x36d33d){return _0x553ae0===_0x36d33d;},'BjxSK':_0x215fda(0xa2),'HcUgy':'\x20\x20Run:\x20ranger\x20setup\x20--opencode','RJwnp':_0x215fda(0xc0),'UJzqi':'ranger@trailhead','pZhlJ':'unknown','NAZpO':'enabled','CEhPe':_0x215fda(0x96),'cslno':'\x20\x20Not\x20installed','dLEuJ':_0x215fda(0xbe),'WLiBG':function(_0x2a0c81){return _0x2a0c81();},'ivnSM':function(_0x37dc02,_0x266bb7){return _0x37dc02+_0x266bb7;},'Rkfud':function(_0x4905cc,_0x27fb1e){return _0x4905cc>_0x27fb1e;},'noWUQ':_0x215fda(0xc4),'IFpyR':'plaintext','QJOTY':_0x215fda(0xcd),'THIvR':_0x215fda(0xba)};console[_0x215fda(0x80)](_0x3a16de[_0x215fda(0xb9)]);const _0x62ae00=process[_0x215fda(0xbf)](),_0x1543b7=_0x3a16de[_0x215fda(0x7b)](getRangerDir);if(!_0x3a16de['XkrvS'](existsSync,_0x1543b7)){console[_0x215fda(0x80)]('Root:\x20'+link(_0x62ae00,bold(basename(_0x62ae00)))),console['log']('\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.'),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a');return;}console[_0x215fda(0x80)](_0x215fda(0xc3)+_0x3a16de['PqMmF'](link,_0x62ae00,bold(basename(_0x62ae00))));const _0x57af51=getCurrentVersion(),_0x406eda=getLatestVersion();if(_0x406eda[_0x215fda(0x79)]&&_0x3a16de[_0x215fda(0x75)](_0x406eda['version'],_0x57af51))console['log'](_0x215fda(0xc7)+_0x57af51+_0x215fda(0x89)+_0x406eda[_0x215fda(0x79)]+')'),console[_0x215fda(0x80)]('\x20\x20Run:\x20ranger\x20update');else _0x406eda['version']?console['log'](_0x215fda(0xc7)+_0x57af51+'\x20(up\x20to\x20date)'):console[_0x215fda(0x80)](_0x215fda(0xc7)+_0x57af51);const _0x4d2504=await _0x3a16de['SYoNQ'](getToken);if(_0x4d2504){const _0x2d1c91=await getCurrentUser(_0x4d2504);_0x2d1c91[_0x215fda(0xa8)]?console[_0x215fda(0x80)](_0x215fda(0x99)+bold(_0x2d1c91[_0x215fda(0xb5)][_0x215fda(0xcb)])):(console[_0x215fda(0x80)]('API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired'),console['log'](_0x215fda(0xce)));}else console[_0x215fda(0x80)]('API\x20Token:\x20✗\x20Not\x20found'),console[_0x215fda(0x80)](_0x215fda(0xce));process[_0x215fda(0x82)]['DEBUG']&&(console['log']('API\x20Environment:\x20'+getCurrentEnvironment()),console[_0x215fda(0x80)](_0x215fda(0x9e)+getApiBaseUrl()));console[_0x215fda(0x80)](_0x3a16de['GQqHr']);const _0x5cc455=await _0x3a16de['SYoNQ'](getOpencodePluginStatus);if(_0x3a16de['HeHTD'](_0x5cc455['status'],'configured'))console[_0x215fda(0x80)]('\x20\x20'+_0x3a16de['XkrvS'](bold,_0x215fda(0x8a))+':\x20configured'),_0x5cc455['details']&&console[_0x215fda(0x80)]('\x20\x20'+_0x5cc455['details']);else _0x3a16de[_0x215fda(0x8b)](_0x5cc455[_0x215fda(0xa6)],'not_configured')?(console[_0x215fda(0x80)](_0x3a16de['BjxSK']),_0x5cc455[_0x215fda(0x77)]&&console[_0x215fda(0x80)]('\x20\x20'+_0x5cc455[_0x215fda(0x77)]),console[_0x215fda(0x80)](_0x3a16de[_0x215fda(0xbd)])):console['log'](_0x215fda(0xc1));console['log'](_0x3a16de[_0x215fda(0xcf)]);const _0x526a5f=await getPluginInfo(_0x3a16de['UJzqi']);if(_0x526a5f){const _0x4bebf0=_0x526a5f[_0x215fda(0xad)]||_0x3a16de['pZhlJ'],_0x5cb334=_0x526a5f['enabled']?_0x3a16de['NAZpO']:_0x3a16de['CEhPe'];console[_0x215fda(0x80)]('\x20\x20'+_0x3a16de[_0x215fda(0x83)](bold,_0x3a16de['UJzqi'])+':\x20installed\x20('+_0x4bebf0+',\x20'+_0x5cb334+')');}else console['log'](_0x3a16de[_0x215fda(0xa5)]),console[_0x215fda(0x80)](_0x215fda(0xb6));console['log'](_0x3a16de['dLEuJ']);const {project:_0x2ec281,user:_0xcc2c54}=await _0x3a16de['WLiBG'](getInstalledSkills),_0x5b1882=_0x2ec281[_0x215fda(0x87)](_0x21b47e=>RANGER_MANAGED_SKILLS['includes'](_0x21b47e['name'])),_0x530629=_0xcc2c54[_0x215fda(0x87)](_0x340da3=>RANGER_MANAGED_SKILLS['includes'](_0x340da3['name'])),_0x1845c7=_0x3a16de[_0x215fda(0x7d)](_0x5b1882[_0x215fda(0xb1)],_0x530629[_0x215fda(0xb1)]);if(_0x1845c7===0x0)console['log']('No\x20skills\x20installed'),console[_0x215fda(0x80)](_0x215fda(0x7e));else{if(_0x5b1882['length']>0x0){console[_0x215fda(0x80)]('\x20\x20Project-level:');for(const _0x453539 of _0x5b1882){console['log']('\x20\x20\x20\x20'+bold(_0x453539['displayName'])+':\x20'+link(_0x453539[_0x215fda(0xaa)],_0x3a16de[_0x215fda(0x83)](basename,_0x453539[_0x215fda(0xaa)])));}}if(_0x3a16de[_0x215fda(0xa3)](_0x530629[_0x215fda(0xb1)],0x0)){console[_0x215fda(0x80)](_0x3a16de[_0x215fda(0xd1)]);for(const _0x159cbd of _0x530629){console['log'](_0x215fda(0xab)+_0x3a16de['XkrvS'](bold,_0x159cbd[_0x215fda(0x8e)])+':\x20'+link(_0x159cbd['path'],basename(_0x159cbd['path'])));}}}console['log'](_0x215fda(0xa0));const {envs:_0x315180,activeEnv:_0x4f2f0f}=await getEnvironments();if(_0x315180['length']===0x0)console[_0x215fda(0x80)](_0x215fda(0xd3)),console['log']('\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>');else{for(const _0x5116a9 of _0x315180){const _0x559589=_0x5116a9['isActive']?'\x20(active)':'',_0x277adb=_0x5116a9['hasEncryptedAuth']?_0x215fda(0xbc):_0x5116a9['hasPlaintextAuth']?_0x3a16de['IFpyR']:_0x3a16de['QJOTY'];console['log']('\x20\x20'+bold(_0x5116a9[_0x215fda(0xa4)])+_0x559589),console[_0x215fda(0x80)](_0x215fda(0x93)+_0x277adb),_0x3a16de['hLlGB'](_0x5116a9[_0x215fda(0x7c)],_0x3a16de['THIvR'])&&console['log']('\x20\x20\x20\x20Settings:\x20'+link(_0x5116a9[_0x215fda(0x7c)],basename(_0x5116a9['settingsPath'])));}!_0x4f2f0f&&(console[_0x215fda(0x80)]('\x0a\x20\x20No\x20active\x20profile\x20set'),console['log'](_0x215fda(0xd4)+_0x315180[_0x215fda(0x9c)](_0x29ff19=>_0x29ff19['name'])[_0x215fda(0x9d)](',\x20')+')'));}console['log']('');}
|
|
1
|
+
const _0x44fe5d=_0x129c;(function(_0x5a143a,_0x1740cd){const _0x4f1e39=_0x129c,_0x20bacb=_0x5a143a();while(!![]){try{const _0x3531ca=-parseInt(_0x4f1e39(0x92))/0x1+-parseInt(_0x4f1e39(0xd7))/0x2+parseInt(_0x4f1e39(0xd8))/0x3*(-parseInt(_0x4f1e39(0x7c))/0x4)+-parseInt(_0x4f1e39(0x81))/0x5+parseInt(_0x4f1e39(0xa6))/0x6*(-parseInt(_0x4f1e39(0xc5))/0x7)+-parseInt(_0x4f1e39(0x8d))/0x8+-parseInt(_0x4f1e39(0xa7))/0x9*(-parseInt(_0x4f1e39(0x85))/0xa);if(_0x3531ca===_0x1740cd)break;else _0x20bacb['push'](_0x20bacb['shift']());}catch(_0x4c63f9){_0x20bacb['push'](_0x20bacb['shift']());}}}(_0x3d66,0x84d37));import{readFile,readdir}from'fs/promises';function _0x129c(_0x4f604c,_0x249bbc){_0x4f604c=_0x4f604c-0x7c;const _0x3d66bb=_0x3d66();let _0x129cfa=_0x3d66bb[_0x4f604c];return _0x129cfa;}import{join,basename}from'path';import{existsSync}from'fs';import{getToken}from'./utils/keychain.js';import{getCurrentVersion,getLatestVersion}from'./utils/version.js';import{getApiBaseUrl,getCurrentEnvironment}from'./utils/environment.js';import{getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getEnvNames}from'./env.js';import{getCurrentUser}from'./utils/userApi.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getEnvDir}from'./utils/settings.js';import{getPluginInfo}from'./utils/claudePlugin.js';import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';import{spawn}from'child_process';const bold=_0xd95dea=>_0x44fe5d(0xc2)+_0xd95dea+'\x1b[0m',link=(_0x55f39f,_0x2b48f5)=>_0x44fe5d(0xcb)+_0x55f39f+'\x07'+(_0x2b48f5||_0x55f39f)+'\x1b]8;;\x07';async function getOpencodePluginStatus(){const _0x52147f=_0x44fe5d,_0x3173fd={'pWwhz':function(_0x15627e,_0x57a887){return _0x15627e(_0x57a887);},'WimtV':function(_0x3dbdb6,_0x5eaa2e){return _0x3dbdb6!==_0x5eaa2e;},'ydfxV':_0x52147f(0xb2),'Zttfx':function(_0x2e6a70,_0x27700b){return _0x2e6a70>_0x27700b;},'bIXjh':'not_configured','kawnX':_0x52147f(0xd3),'KLZUE':_0x52147f(0xb4),'uxikz':_0x52147f(0xd0)};return new Promise(_0x51dda7=>{const _0x46e28e=_0x52147f,_0x125e18={'PoDDA':function(_0x378f12,_0x211f32){const _0x2d9022=_0x129c;return _0x3173fd[_0x2d9022(0x93)](_0x378f12,_0x211f32);},'QCFOx':_0x46e28e(0x89),'tPOyv':function(_0x442463,_0x26487d){return _0x3173fd['WimtV'](_0x442463,_0x26487d);},'aYsPx':_0x3173fd['ydfxV'],'GzZFV':function(_0x55956e,_0x4851df){const _0x88e37e=_0x46e28e;return _0x3173fd[_0x88e37e(0xc8)](_0x55956e,_0x4851df);},'XsoAj':_0x3173fd[_0x46e28e(0x90)]},_0x2fd5ed=spawn('opencode',['debug',_0x46e28e(0xd4)],{'stdio':['ignore','pipe',_0x3173fd['kawnX']]});let _0x4bff22='';_0x2fd5ed[_0x46e28e(0xa5)]?.['on'](_0x46e28e(0xb4),_0x454fa3=>{const _0x333905=_0x46e28e;_0x4bff22+=_0x454fa3[_0x333905(0x83)]();}),_0x2fd5ed[_0x46e28e(0x9b)]?.['on'](_0x3173fd['KLZUE'],_0x2159ee=>{const _0x12354c=_0x46e28e;_0x4bff22+=_0x2159ee[_0x12354c(0x83)]();}),_0x2fd5ed['on'](_0x46e28e(0x8f),()=>{const _0x1de091=_0x46e28e;_0x125e18[_0x1de091(0x7e)](_0x51dda7,{'status':_0x125e18['QCFOx']});}),_0x2fd5ed['on'](_0x3173fd['uxikz'],_0x3bb556=>{const _0x93431e=_0x46e28e;if(_0x125e18['tPOyv'](_0x3bb556,0x0)){_0x125e18['PoDDA'](_0x51dda7,{'status':_0x93431e(0x89)});return;}const _0x2a60f3=_0x4bff22[_0x93431e(0xb7)]();let _0x4464c1=null;if(_0x2a60f3)try{_0x4464c1=JSON['parse'](_0x2a60f3);}catch{const _0x2ff866=_0x2a60f3[_0x93431e(0x86)](/\{[\s\S]*\}$/);if(_0x2ff866)try{_0x4464c1=JSON['parse'](_0x2ff866[0x0]);}catch{_0x4464c1=null;}}const _0x2a6270=Array['isArray'](_0x4464c1?.['plugin'])?_0x4464c1?.['plugin']:[],_0x443078=_0x2a6270[_0x93431e(0xba)](_0x219bfe=>{const _0x57bf0d=_0x93431e;if(_0x125e18[_0x57bf0d(0xc9)](typeof _0x219bfe,'string'))return![];return _0x219bfe[_0x57bf0d(0xbe)](_0x57bf0d(0x98))||_0x219bfe[_0x57bf0d(0xbe)]('opencode-plugin');});if(_0x443078){_0x51dda7({'status':_0x125e18['aYsPx'],'details':_0x125e18['GzZFV'](_0x2a6270[_0x93431e(0xb8)],0x0)?_0x2a6270[_0x93431e(0xb8)]+'\x20plugin(s)\x20configured':undefined});return;}if(_0x2a6270['length']>0x0){_0x51dda7({'status':_0x125e18['XsoAj'],'details':_0x2a6270[_0x93431e(0xb8)]+'\x20plugin(s)\x20configured'});return;}_0x51dda7({'status':_0x125e18[_0x93431e(0x88)]});});});}async function getSkillsFromDir(_0x63ae91,_0x1172e2){const _0x2332f2=_0x44fe5d,_0x2989d7={'pwKbY':function(_0x599ded,_0x3b0c36,_0xfc68b3){return _0x599ded(_0x3b0c36,_0xfc68b3);},'wBbaZ':function(_0x54b1e9,_0xb73e68,_0x1774d1,_0x5a7075){return _0x54b1e9(_0xb73e68,_0x1774d1,_0x5a7075);},'uIBhi':'SKILL.md','MbyDP':function(_0x5a8b28,_0x4b39f5){return _0x5a8b28(_0x4b39f5);},'OBwhS':function(_0x432aea,_0x673cb0,_0x9dbfda){return _0x432aea(_0x673cb0,_0x9dbfda);},'QAbkI':'utf-8'};if(!existsSync(_0x63ae91))return[];const _0x4bd464=[];try{const _0x123122=await _0x2989d7['pwKbY'](readdir,_0x63ae91,{'withFileTypes':!![]});for(const _0x525111 of _0x123122){if(_0x525111['isDirectory']()){const _0x2d8d41=_0x2989d7['wBbaZ'](join,_0x63ae91,_0x525111['name'],_0x2989d7[_0x2332f2(0xcf)]);if(_0x2989d7['MbyDP'](existsSync,_0x2d8d41)){let _0x130169=_0x525111[_0x2332f2(0xaa)];try{const _0x583dd8=await _0x2989d7[_0x2332f2(0xbd)](readFile,_0x2d8d41,_0x2989d7['QAbkI']),_0x769663=_0x583dd8[_0x2332f2(0x86)](/name:\s*(.+)/);_0x769663&&(_0x130169=_0x769663[0x1][_0x2332f2(0xb7)]());}catch{}_0x4bd464[_0x2332f2(0x87)]({'name':_0x525111['name'],'displayName':_0x130169,'path':_0x2d8d41,'level':_0x1172e2});}}}}catch{return[];}return _0x4bd464;}async function getInstalledSkills(){const _0x1b2445=_0x44fe5d,_0x16ca12={'eFmLR':function(_0x56aaf9,_0x4a4df6,_0x4af89d){return _0x56aaf9(_0x4a4df6,_0x4af89d);},'sPwDT':_0x1b2445(0x91),'MSrUm':function(_0xbea098,_0x95cab0,_0x2aa7c0){return _0xbea098(_0x95cab0,_0x2aa7c0);},'vLykE':function(_0xe00b52){return _0xe00b52();}},[_0x1c272b,_0x566026]=await Promise[_0x1b2445(0xdb)]([_0x16ca12[_0x1b2445(0xc3)](getSkillsFromDir,getProjectSkillsDir(),_0x16ca12['sPwDT']),_0x16ca12[_0x1b2445(0x9a)](getSkillsFromDir,_0x16ca12[_0x1b2445(0xa1)](getUserSkillsDir),_0x1b2445(0xb1))]);return{'project':_0x1c272b,'user':_0x566026};}async function getEnvironments(){const _0x2272ec=_0x44fe5d,_0x253803={'UmgzB':function(_0x5df3a7,_0x40b38c,_0x3d33b3){return _0x5df3a7(_0x40b38c,_0x3d33b3);},'YxSuE':_0x2272ec(0xb5),'adrBm':function(_0xc1f0ac,_0x1af590){return _0xc1f0ac(_0x1af590);},'cqAuV':function(_0xe7faf4,_0x2d1a77){return _0xe7faf4(_0x2d1a77);},'GGQlC':function(_0x2829a8,_0x4e5b3d){return _0x2829a8===_0x4e5b3d;},'NempO':function(_0x163ca4){return _0x163ca4();}},{envNames:_0xbee584,activeEnv:_0x1af0d8}=await _0x253803['NempO'](getEnvNames),_0x1ad3bb=getRangerDir();if(!existsSync(_0x1ad3bb))return{'envs':[],'activeEnv':null};const _0x5a5a56=_0xbee584[_0x2272ec(0x95)](_0x25938f=>{const _0x2c26c5=_0x2272ec,_0x38aaa1=getEnvDir(_0x25938f),_0x1a65ff=_0x253803['UmgzB'](join,_0x38aaa1,'settings.json'),_0x1507cf=join(_0x38aaa1,'auth.json'),_0x42b077=join(_0x38aaa1,_0x253803[_0x2c26c5(0x96)]);return{'name':_0x25938f,'settingsPath':_0x253803['adrBm'](existsSync,_0x1a65ff)?_0x1a65ff:_0x2c26c5(0xb9),'hasPlaintextAuth':_0x253803['cqAuV'](existsSync,_0x1507cf),'hasEncryptedAuth':_0x253803[_0x2c26c5(0xcd)](existsSync,_0x42b077),'isActive':_0x253803[_0x2c26c5(0x9e)](_0x25938f,_0x1af0d8)};});return{'envs':_0x5a5a56,'activeEnv':_0x1af0d8};}export async function status(){const _0x23f008=_0x44fe5d,_0x49ed78={'eepwL':function(_0x1c8ac8){return _0x1c8ac8();},'aWVyu':function(_0x2d94ba,_0x549bcd){return _0x2d94ba(_0x549bcd);},'gvMEk':function(_0x396a71,_0x394a5c,_0x52089c){return _0x396a71(_0x394a5c,_0x52089c);},'Kthlg':'\x0a---\x20OpenCode\x20Plugin\x20---','dkGYK':function(_0x552943,_0x572fbb){return _0x552943===_0x572fbb;},'hUsRE':'@ranger-testing/opencode-plugin','SLfSg':_0x23f008(0xca),'wddiq':'\x20\x20Not\x20configured','BmNIk':_0x23f008(0x9c),'BObZS':_0x23f008(0xa8),'pxCPc':_0x23f008(0xa4),'lvMQO':'\x20\x20Project-level:','QuRgV':function(_0x1906a9,_0x55c721,_0x3b547e){return _0x1906a9(_0x55c721,_0x3b547e);},'MefuI':function(_0x2051a2,_0x45a6a7){return _0x2051a2>_0x45a6a7;},'JKBkW':'\x20\x20User-level:','CMJCK':function(_0x4e7ef6,_0x5d98b8){return _0x4e7ef6(_0x5d98b8);},'sgEJT':function(_0x1c89b4,_0x1f9811){return _0x1c89b4(_0x1f9811);},'IAROF':'\x0a---\x20Profiles\x20---','EgvXm':function(_0x2361bd){return _0x2361bd();},'jXaSF':'\x20(active)','OIsGI':'encrypted'};console['log'](_0x23f008(0x8c));const _0x28f642=process[_0x23f008(0xa2)](),_0x44a84a=_0x49ed78[_0x23f008(0xcc)](getRangerDir);if(!existsSync(_0x44a84a)){console[_0x23f008(0x94)](_0x23f008(0xbf)+link(_0x28f642,_0x49ed78[_0x23f008(0x8b)](bold,basename(_0x28f642)))),console[_0x23f008(0x94)]('\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.'),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a');return;}console[_0x23f008(0x94)]('Root:\x20'+_0x49ed78['gvMEk'](link,_0x28f642,bold(basename(_0x28f642))));const _0x4c7d7b=getCurrentVersion(),_0x39d922=getLatestVersion();if(_0x39d922['version']&&_0x39d922['version']!==_0x4c7d7b)console['log']('Version:\x20'+_0x4c7d7b+'\x20(latest:\x20'+_0x39d922[_0x23f008(0x7f)]+')'),console[_0x23f008(0x94)](_0x23f008(0xd5));else _0x39d922[_0x23f008(0x7f)]?console['log']('Version:\x20'+_0x4c7d7b+_0x23f008(0x84)):console['log']('Version:\x20'+_0x4c7d7b);const _0x1ea93f=await getToken();if(_0x1ea93f){const _0x4d15d3=await getCurrentUser(_0x1ea93f);_0x4d15d3['success']?console[_0x23f008(0x94)](_0x23f008(0xd9)+bold(_0x4d15d3[_0x23f008(0xb1)]['organizationName'])):(console['log']('API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired'),console[_0x23f008(0x94)]('\x20\x20Run:\x20ranger\x20setup\x20[token]'));}else console['log']('API\x20Token:\x20✗\x20Not\x20found'),console['log'](_0x23f008(0x8a));process['env'][_0x23f008(0x80)]&&(console[_0x23f008(0x94)]('API\x20Environment:\x20'+getCurrentEnvironment()),console[_0x23f008(0x94)](_0x23f008(0xae)+_0x49ed78[_0x23f008(0xcc)](getApiBaseUrl)));console['log'](_0x49ed78['Kthlg']);const _0x409c51=await getOpencodePluginStatus();if(_0x49ed78[_0x23f008(0xc7)](_0x409c51['status'],'configured'))console['log']('\x20\x20'+bold(_0x49ed78[_0x23f008(0x82)])+':\x20configured'),_0x409c51['details']&&console['log']('\x20\x20'+_0x409c51[_0x23f008(0xab)]);else _0x409c51['status']===_0x49ed78[_0x23f008(0xda)]?(console[_0x23f008(0x94)](_0x49ed78[_0x23f008(0xdc)]),_0x409c51['details']&&console[_0x23f008(0x94)]('\x20\x20'+_0x409c51[_0x23f008(0xab)]),console['log'](_0x49ed78['BmNIk'])):console[_0x23f008(0x94)](_0x23f008(0x8e));console[_0x23f008(0x94)]('\x0a---\x20Claude\x20Code\x20Plugin\x20---');const _0x5f1153=await getPluginInfo(_0x49ed78['BObZS']);if(_0x5f1153){const _0xdd2967=_0x5f1153[_0x23f008(0xc4)]||_0x23f008(0xc0),_0x2f2d75=_0x5f1153['enabled']?_0x23f008(0xce):'disabled';console[_0x23f008(0x94)]('\x20\x20'+bold('ranger@trailhead')+_0x23f008(0x97)+_0xdd2967+',\x20'+_0x2f2d75+')');}else console[_0x23f008(0x94)]('\x20\x20Not\x20installed'),console[_0x23f008(0x94)](_0x49ed78['pxCPc']);console[_0x23f008(0x94)]('\x0a---\x20Skills\x20---');const {project:_0x352909,user:_0x506a44}=await _0x49ed78[_0x23f008(0xcc)](getInstalledSkills),_0x5e310d=_0x352909[_0x23f008(0x9d)](_0x5128b1=>RANGER_MANAGED_SKILLS['includes'](_0x5128b1[_0x23f008(0xaa)])),_0x319f24=_0x506a44[_0x23f008(0x9d)](_0x1359d4=>RANGER_MANAGED_SKILLS['includes'](_0x1359d4['name'])),_0x2e2149=_0x5e310d[_0x23f008(0xb8)]+_0x319f24['length'];if(_0x2e2149===0x0)console[_0x23f008(0x94)](_0x23f008(0xd2)),console[_0x23f008(0x94)]('\x20\x20Run:\x20ranger\x20skillup');else{if(_0x5e310d['length']>0x0){console['log'](_0x49ed78['lvMQO']);for(const _0x31122d of _0x5e310d){console['log']('\x20\x20\x20\x20'+bold(_0x31122d[_0x23f008(0xb6)])+':\x20'+_0x49ed78[_0x23f008(0xaf)](link,_0x31122d['path'],basename(_0x31122d[_0x23f008(0xa0)])));}}if(_0x49ed78[_0x23f008(0xbb)](_0x319f24[_0x23f008(0xb8)],0x0)){console[_0x23f008(0x94)](_0x49ed78[_0x23f008(0xad)]);for(const _0x493ffa of _0x319f24){console[_0x23f008(0x94)]('\x20\x20\x20\x20'+_0x49ed78['CMJCK'](bold,_0x493ffa['displayName'])+':\x20'+link(_0x493ffa[_0x23f008(0xa0)],_0x49ed78['sgEJT'](basename,_0x493ffa['path'])));}}}console['log'](_0x49ed78[_0x23f008(0xa3)]);const {envs:_0x3b64b5,activeEnv:_0x3af80c}=await _0x49ed78['EgvXm'](getEnvironments);if(_0x49ed78[_0x23f008(0xc7)](_0x3b64b5[_0x23f008(0xb8)],0x0))console[_0x23f008(0x94)]('No\x20profiles\x20configured'),console['log']('\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>');else{for(const _0x41ceb7 of _0x3b64b5){const _0x3f66cc=_0x41ceb7[_0x23f008(0xc1)]?_0x49ed78[_0x23f008(0x9f)]:'',_0x3a226d=_0x41ceb7['hasEncryptedAuth']?_0x49ed78[_0x23f008(0xa9)]:_0x41ceb7[_0x23f008(0xbc)]?_0x23f008(0xb0):'none';console[_0x23f008(0x94)]('\x20\x20'+_0x49ed78[_0x23f008(0xb3)](bold,_0x41ceb7[_0x23f008(0xaa)])+_0x3f66cc),console[_0x23f008(0x94)](_0x23f008(0x7d)+_0x3a226d),_0x41ceb7[_0x23f008(0xac)]!=='(not\x20found)'&&console[_0x23f008(0x94)](_0x23f008(0xc6)+link(_0x41ceb7[_0x23f008(0xac)],basename(_0x41ceb7['settingsPath'])));}!_0x3af80c&&(console['log'](_0x23f008(0xd1)),console['log'](_0x23f008(0xd6)+_0x3b64b5['map'](_0xffdbb=>_0xffdbb[_0x23f008(0xaa)])[_0x23f008(0x99)](',\x20')+')'));}console[_0x23f008(0x94)]('');}function _0x3d66(){const _0x14c302=['toString','\x20(up\x20to\x20date)','950BBgxeL','match','push','XsoAj','not_installed','\x20\x20Run:\x20ranger\x20setup\x20[token]','aWVyu','\x0a📊\x20Ranger\x20Status\x0a','3958000JFUMKp','\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','error','bIXjh','project','137650Xapfax','pWwhz','log','map','YxSuE',':\x20installed\x20(','@ranger-testing/opencode-plugin','join','MSrUm','stderr','\x20\x20Run:\x20ranger\x20setup\x20--opencode','filter','GGQlC','jXaSF','path','vLykE','cwd','IAROF','\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','stdout','12bAZmMH','271377uKUPZo','ranger@trailhead','OIsGI','name','details','settingsPath','JKBkW','API\x20URL:\x20','QuRgV','plaintext','user','configured','sgEJT','data','auth.json.enc','displayName','trim','length','(not\x20found)','some','MefuI','hasPlaintextAuth','OBwhS','includes','Root:\x20','unknown','isActive','\x1b[1m','eFmLR','scope','1478666pvLnFi','\x20\x20\x20\x20Settings:\x20','dkGYK','Zttfx','tPOyv','not_configured','\x1b]8;;file://','eepwL','adrBm','enabled','uIBhi','close','\x0a\x20\x20No\x20active\x20profile\x20set','No\x20skills\x20installed','pipe','config','\x20\x20Run:\x20ranger\x20update','\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20','714450Wszhap','1258539PvzvaZ','Organization:\x20','SLfSg','all','wddiq','8TzryAo','\x20\x20\x20\x20Auth:\x20','PoDDA','version','DEBUG','346765LYmaSM','hUsRE'];_0x3d66=function(){return _0x14c302;};return _0x3d66();}
|
package/build/commands/update.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x4ffbf0,_0x3bea72){const _0x37c91b=_0x2ca4,_0x135553=_0x4ffbf0();while(!![]){try{const _0x28b4d9=-parseInt(_0x37c91b(0xf4))/0x1+parseInt(_0x37c91b(0xb1))/0x2+parseInt(_0x37c91b(0xc2))/0x3*(-parseInt(_0x37c91b(0xdd))/0x4)+parseInt(_0x37c91b(0xce))/0x5+parseInt(_0x37c91b(0xdb))/0x6+parseInt(_0x37c91b(0xe9))/0x7+-parseInt(_0x37c91b(0xea))/0x8*(parseInt(_0x37c91b(0xd1))/0x9);if(_0x28b4d9===_0x3bea72)break;else _0x135553['push'](_0x135553['shift']());}catch(_0xfcf99d){_0x135553['push'](_0x135553['shift']());}}}(_0x38e1,0x21a6b));import{spawn}from'child_process';import{existsSync}from'fs';import{readFile,writeFile}from'fs/promises';import{installSkill,removeSkill,RANGER_MANAGED_SKILLS,DEPRECATED_SKILLS}from'./utils/skills.js';function _0x2ca4(_0x26bd0b,_0x263722){_0x26bd0b=_0x26bd0b-0xa8;const _0x38e1bf=_0x38e1();let _0x2ca4b3=_0x38e1bf[_0x26bd0b];return _0x2ca4b3;}import{PACKAGE_NAME,getCurrentVersion,getLatestVersion,compareVersions}from'./utils/version.js';import{getSkillsDir}from'./utils/claudeConfig.js';import{getOpencodeSkillsDir}from'./utils/opencodeConfig.js';import{join}from'path';import{migrateActiveProfileFile}from'./utils/activeProfile.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getPluginInfo,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';const CLAUDE_COMMAND_TIMEOUT_MS=0x1d4c0;function _0x38e1(){const _0x2638ae=['oMwLW','splice','\x0aCould\x20not\x20check\x20latest\x20version:\x20','JkWBp','tJAYU','nsiFL','IjHOi','split','umVAu','Update\x20failed\x20for\x20@','marketplace','ranger@trailhead','project','pGMTj','lDwJu','...','woYed','platform','161030rboxxP','HXpdf','\x20skill\x20','trim','\x20ranger-managed\x20skill(s)...','test','\x0aInstalling\x20','\x0aSuccessfully\x20installed\x20latest\x20version.','llOov','hpHtQ','Latest\x20version:\x20\x20','\x20\x20Failed\x20to\x20reinstall\x20','warn','lMopE','bNdOF','cmekY','CaFaO','3Usnmbf','scope','ItsAb','✓\x20Migrated\x20active\x20profile\x20file','utf-8','length','\x0aYour\x20version\x20(','ILJXj','beta','niVRK','win32','opencode','203730RAnaaX','log','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','225Ujnvha','close','FMjda','\x0aReinstalling\x20','alpha','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','LywrH','findIndex','inherit','HtfVA','1072674cakTTj','GDBvf','148844cbQHDY','user','thyWZ','trailhead','ZfrBv','error','npm','Checking\x20for\x20updates...','dkAhV','version','KgUAb','TOUqW','457653ZTYufh','38056tBKZzj','plugin','Claude\x20plugin\x20update\x20failed\x20for\x20','\x0a✅\x20Update\x20complete!','...\x0a','join','--scope','mWqBi','xPkcZ','push','71448LCPnNh'];_0x38e1=function(){return _0x2638ae;};return _0x38e1();}async function runCommand(_0x1b0b2d,_0x268178,_0x236d3a){const _0x117258={'TOUqW':function(_0x2edcc7,_0x58fc82){return _0x2edcc7(_0x58fc82);},'xPkcZ':function(_0x1b082b,_0x5d73eb){return _0x1b082b(_0x5d73eb);},'GDBvf':function(_0x4cc9a4,_0x216fab){return _0x4cc9a4===_0x216fab;},'ILJXj':function(_0x4a3b99,_0x4cb2c5,_0x92d7c0,_0x360531){return _0x4a3b99(_0x4cb2c5,_0x92d7c0,_0x360531);},'IjHOi':'error'};return new Promise(_0x3a228e=>{const _0x474e75=_0x2ca4;let _0x5c18fa=![],_0x2cf24b;const _0x4e04eb=_0x4d1980=>{const _0xc331fb=_0x2ca4;if(_0x5c18fa)return;_0x5c18fa=!![],_0x2cf24b&&_0x117258['TOUqW'](clearTimeout,_0x2cf24b),_0x117258[_0xc331fb(0xe8)](_0x3a228e,_0x4d1980);},_0x3d4ef0=_0x117258[_0x474e75(0xc9)](spawn,_0x1b0b2d,_0x268178,{'stdio':['ignore',_0x236d3a?.['stdio']??_0x474e75(0xd9),_0x236d3a?.['stdio']??'inherit'],'shell':process[_0x474e75(0xb0)]===_0x474e75(0xcc)});_0x2cf24b=_0x236d3a?.['timeoutMs']?setTimeout(()=>{_0x3d4ef0['kill'](),_0x3d4ef0['unref'](),_0x4e04eb(![]);},_0x236d3a['timeoutMs']):undefined,_0x3d4ef0['on'](_0x474e75(0xd2),_0x26f171=>{const _0x27bde9=_0x474e75;_0x117258[_0x27bde9(0xf2)](_0x4e04eb,_0x117258[_0x27bde9(0xdc)](_0x26f171,0x0));}),_0x3d4ef0['on'](_0x117258[_0x474e75(0xfb)],()=>{_0x4e04eb(![]);});});}export function resolveDistTag(_0x1729c1){const _0x163b0f=_0x2ca4,_0x3ef5b0={'ZfrBv':_0x163b0f(0xd5)};if(/-alpha\./i['test'](_0x1729c1))return _0x3ef5b0[_0x163b0f(0xe1)];if(/-beta\./i[_0x163b0f(0xb6)](_0x1729c1))return _0x163b0f(0xca);if(/-rc\./i[_0x163b0f(0xb6)](_0x1729c1))return'rc';return'latest';}async function runInstall(_0x1cf6aa='latest'){const _0x52abd0=_0x2ca4,_0x48647f={'EFreL':_0x52abd0(0xe3),'LywrH':'install','woYed':function(_0x34dfc7,_0xb6b72f){return _0x34dfc7===_0xb6b72f;},'pqGVu':'close','dkAhV':_0x52abd0(0xe2)};return new Promise(_0x50dbca=>{const _0x50cd1d=_0x52abd0;console['log'](_0x50cd1d(0xb7)+PACKAGE_NAME+'@'+_0x1cf6aa+_0x50cd1d(0xee));const _0x2a8fb1=spawn(_0x48647f['EFreL'],[_0x48647f[_0x50cd1d(0xd7)],'-g',PACKAGE_NAME+'@'+_0x1cf6aa],{'stdio':['ignore',_0x50cd1d(0xd9),_0x50cd1d(0xd9)],'shell':_0x48647f[_0x50cd1d(0xaf)](process['platform'],_0x50cd1d(0xcc))});_0x2a8fb1['on'](_0x48647f['pqGVu'],_0x22497c=>{_0x50dbca(_0x22497c===0x0);}),_0x2a8fb1['on'](_0x48647f[_0x50cd1d(0xe5)],()=>{_0x50dbca(![]);});});}async function updateClaudeMarketplace(){const _0x4817c5=_0x2ca4,_0x149565={'pGMTj':'claude','yvYIA':_0x4817c5(0xeb),'XzqcI':_0x4817c5(0xa9)},_0x3db35a=await runCommand(_0x149565[_0x4817c5(0xac)],[_0x149565['yvYIA'],_0x149565['XzqcI'],'update','trailhead'],{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0x3db35a)throw new Error('Claude\x20marketplace\x20update\x20command\x20failed\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).');}async function updateClaudePlugin(_0x14bbd7){const _0x21d0ca=_0x2ca4,_0x2e71cf=[_0x21d0ca(0xeb),'update','ranger@trailhead'];_0x14bbd7&&_0x2e71cf[_0x21d0ca(0xf3)](_0x21d0ca(0xf0),_0x14bbd7);const _0x131c82=await runCommand('claude',_0x2e71cf,{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0x131c82){const _0x39a42f=_0x14bbd7??_0x21d0ca(0xde);throw new Error(_0x21d0ca(0xec)+_0x39a42f+'\x20scope\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).');}}function isSkillInstalled(_0x5ab9e4,_0x3f4c65,_0x1987c3){const _0x27fb5a=_0x2ca4,_0x529f2f={'llOov':'opencode','cmekY':function(_0x5c7456,_0x4c9169){return _0x5c7456(_0x4c9169);}},_0x396196=_0x1987c3===_0x529f2f[_0x27fb5a(0xb9)]?getOpencodeSkillsDir(_0x3f4c65):getSkillsDir(_0x3f4c65),_0x449d32=join(_0x396196,_0x5ab9e4);return _0x529f2f[_0x27fb5a(0xc0)](existsSync,_0x449d32);}async function reinstallSkills(_0x492906){const _0x2ee4ff=_0x2ca4,_0x1d8b9f={'umVAu':'claude','tJAYU':function(_0x597fab,_0x295458,_0x493e4c,_0x3ec716){return _0x597fab(_0x295458,_0x493e4c,_0x3ec716);},'lDwJu':_0x2ee4ff(0xcd),'HtfVA':function(_0x124eec,_0x24b37b,_0xb23b33){return _0x124eec(_0x24b37b,_0xb23b33);}},_0x23c2ec=['project',_0x2ee4ff(0xde)],_0x116f08=[];for(const _0x217a17 of _0x23c2ec){for(const _0x177ea9 of RANGER_MANAGED_SKILLS){isSkillInstalled(_0x177ea9,_0x217a17,_0x1d8b9f['umVAu'])&&_0x116f08['push']({'skillName':_0x177ea9,'level':_0x217a17,'platform':_0x1d8b9f[_0x2ee4ff(0xfd)]}),_0x1d8b9f[_0x2ee4ff(0xf9)](isSkillInstalled,_0x177ea9,_0x217a17,_0x1d8b9f['lDwJu'])&&_0x116f08[_0x2ee4ff(0xf3)]({'skillName':_0x177ea9,'level':_0x217a17,'platform':_0x1d8b9f[_0x2ee4ff(0xad)]});}}for(const _0x3e3fe1 of _0x23c2ec){for(const _0x434bcc of DEPRECATED_SKILLS){await removeSkill(_0x434bcc,_0x3e3fe1);}}if(_0x116f08[_0x2ee4ff(0xc7)]===0x0){console[_0x2ee4ff(0xcf)](_0x2ee4ff(0xd0));return;}console[_0x2ee4ff(0xcf)](_0x2ee4ff(0xd4)+_0x116f08[_0x2ee4ff(0xc7)]+_0x2ee4ff(0xb5));for(const {skillName:_0x21665b,level:_0x4b2a99,platform:_0x1027eb}of _0x116f08){try{await _0x1d8b9f[_0x2ee4ff(0xda)](installSkill,_0x21665b,{'level':_0x4b2a99,'cliVersion':_0x492906,'platform':_0x1027eb});}catch(_0x58325e){console['warn'](_0x2ee4ff(0xbc)+_0x1027eb+'\x20'+_0x4b2a99+_0x2ee4ff(0xb3)+_0x21665b+':',_0x58325e);}}}async function ensureActiveProfileGitignored(){const _0x45d25c=_0x2ca4,_0x3e7e86={'CaFaO':'.gitignore','ItsAb':function(_0x1066e5,_0x35b1db,_0x5162a7){return _0x1066e5(_0x35b1db,_0x5162a7);},'JkWBp':'active-profile.txt','gXPAN':function(_0x354cee,_0x5f0d5f,_0x1ea67b,_0x50aaf3){return _0x354cee(_0x5f0d5f,_0x1ea67b,_0x50aaf3);}},_0x4877ac=join(getRangerDir(),_0x3e7e86[_0x45d25c(0xc1)]);if(!existsSync(_0x4877ac))return![];let _0x507c96='';try{_0x507c96=await _0x3e7e86[_0x45d25c(0xc4)](readFile,_0x4877ac,_0x45d25c(0xc6));}catch{return![];}const _0x20f99d=_0x507c96[_0x45d25c(0xfc)](/\r?\n/);if(_0x20f99d['some'](_0x510672=>_0x510672['trim']()==='active-profile.txt'))return![];let _0xdab089=_0x20f99d[_0x45d25c(0xd8)](_0x3c1bf9=>_0x3c1bf9[_0x45d25c(0xb4)]()==='active-feature.txt');_0xdab089===-0x1&&(_0xdab089=_0x20f99d[_0x45d25c(0xc7)]);_0x20f99d[_0x45d25c(0xf6)](_0xdab089,0x0,_0x3e7e86[_0x45d25c(0xf8)]);let _0xe07c=_0x20f99d[_0x45d25c(0xef)]('\x0a');!_0xe07c['endsWith']('\x0a')&&(_0xe07c+='\x0a');try{await _0x3e7e86['gXPAN'](writeFile,_0x4877ac,_0xe07c,_0x45d25c(0xc6));}catch{return![];}return!![];}export async function update(){const _0x3a81a7=_0x2ca4,_0x5f1282={'UxCKc':function(_0x14d736){return _0x14d736();},'thyWZ':function(_0x1b09b7,_0x5a5dd1){return _0x1b09b7(_0x5a5dd1);},'HXpdf':function(_0x31c140,_0x5d9340){return _0x31c140!==_0x5d9340;},'FMjda':function(_0x2ab0e5,_0x236dda){return _0x2ab0e5(_0x236dda);},'nsiFL':_0x3a81a7(0xed),'bNdOF':_0x3a81a7(0xb8),'bFPzN':function(_0x4ca510){return _0x4ca510();},'hpHtQ':function(_0x2eedea,_0x340593){return _0x2eedea===_0x340593;},'fPwnj':function(_0x3b350a){return _0x3b350a();},'ZUqbn':function(_0x2d15be,_0x2407da){return _0x2d15be(_0x2407da);},'mWqBi':function(_0x2f6ff1,_0xd6db9a){return _0x2f6ff1(_0xd6db9a);},'KgUAb':_0x3a81a7(0xe0),'niVRK':_0x3a81a7(0xaa),'lMopE':function(_0x469904,_0x91cc4e){return _0x469904===_0x91cc4e;},'oMwLW':'project','XJoKN':_0x3a81a7(0xc5)},_0x3721bc=_0x5f1282['UxCKc'](getCurrentVersion);console['log']('\x0aCurrent\x20version:\x20'+_0x3721bc);const _0x1735c6=_0x5f1282[_0x3a81a7(0xdf)](resolveDistTag,_0x3721bc);if(_0x5f1282[_0x3a81a7(0xb2)](_0x1735c6,'latest')){console[_0x3a81a7(0xcf)]('Prerelease\x20channel\x20detected\x20(@'+_0x1735c6+').\x20Staying\x20on\x20'+_0x1735c6+'\x20—\x20reinstalling\x20@'+_0x1735c6+_0x3a81a7(0xae));const _0x572219=await runInstall(_0x1735c6);if(!_0x572219)throw new Error(_0x3a81a7(0xa8)+_0x1735c6+'\x20channel.');const _0x434554=getCurrentVersion();console['log']('\x0aSuccessfully\x20installed\x20'+PACKAGE_NAME+'@'+_0x1735c6+'.'),await _0x5f1282[_0x3a81a7(0xd3)](reinstallSkills,_0x434554);const _0x5ce4cb=await _0x5f1282['UxCKc'](migrateActiveProfileFile);_0x5ce4cb&&console['log'](_0x3a81a7(0xc5));await ensureActiveProfileGitignored(),console['log'](_0x5f1282[_0x3a81a7(0xfa)]);return;}console['log'](_0x3a81a7(0xe4));const _0x35e82b=getLatestVersion();let _0x2f4b77=_0x3721bc;if(!_0x35e82b[_0x3a81a7(0xe6)]){console[_0x3a81a7(0xbd)](_0x3a81a7(0xf7)+_0x35e82b[_0x3a81a7(0xe2)]),console['log']('Attempting\x20install\x20anyway...');const _0x1d0b76=await runInstall();if(_0x1d0b76)console['log'](_0x5f1282[_0x3a81a7(0xbf)]),_0x2f4b77=_0x5f1282['bFPzN'](getCurrentVersion);else throw new Error('Update\x20failed:\x20'+_0x35e82b['error']);}else{const _0x34b0f1=_0x35e82b[_0x3a81a7(0xe6)];console['log'](_0x3a81a7(0xbb)+_0x34b0f1);const _0xda6ca6=compareVersions(_0x3721bc,_0x34b0f1);if(_0x5f1282[_0x3a81a7(0xba)](_0xda6ca6,0x0))console['log']('\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.');else{if(_0xda6ca6<0x0)console['log'](_0x3a81a7(0xc8)+_0x3721bc+')\x20is\x20newer\x20than\x20the\x20published\x20version\x20('+_0x34b0f1+').');else{const _0x2393c6=await _0x5f1282['fPwnj'](runInstall);if(_0x2393c6)console['log']('\x0aSuccessfully\x20updated\x20to\x20version\x20'+_0x34b0f1),_0x2f4b77=_0x34b0f1;else throw new Error('Update\x20failed.');}}}await _0x5f1282['ZUqbn'](reinstallSkills,_0x2f4b77);const _0x2f8029=await _0x5f1282[_0x3a81a7(0xf1)](isMarketplaceAdded,_0x5f1282[_0x3a81a7(0xe7)]),_0x4018cc=await _0x5f1282['ZUqbn'](isPluginInstalled,_0x5f1282[_0x3a81a7(0xcb)]);_0x2f8029&&(await updateClaudeMarketplace(),console['log']('\x0aClaude\x20marketplace\x20updated\x20(trailhead).'));if(_0x4018cc){const _0x4f556e=await getPluginInfo(_0x3a81a7(0xaa));_0x5f1282[_0x3a81a7(0xbe)](_0x4f556e?.[_0x3a81a7(0xc3)],_0x5f1282[_0x3a81a7(0xf5)])?(await _0x5f1282['ZUqbn'](updateClaudePlugin,_0x3a81a7(0xab)),console['log']('\x0aClaude\x20plugin\x20updated\x20(project\x20scope).')):(await _0x5f1282['bFPzN'](updateClaudePlugin),console['log'](_0x3a81a7(0xd6)));}const _0x4d035d=await _0x5f1282['fPwnj'](migrateActiveProfileFile);_0x4d035d&&console[_0x3a81a7(0xcf)](_0x5f1282['XJoKN']);const _0x221ff5=await _0x5f1282['bFPzN'](ensureActiveProfileGitignored);console[_0x3a81a7(0xcf)](_0x5f1282['nsiFL']);}
|
|
1
|
+
const _0x3edbc4=_0x38f3;(function(_0x3cc98b,_0x356ebc){const _0x3cdf27=_0x38f3,_0x5c88fc=_0x3cc98b();while(!![]){try{const _0x536537=parseInt(_0x3cdf27(0x176))/0x1*(parseInt(_0x3cdf27(0x186))/0x2)+parseInt(_0x3cdf27(0x152))/0x3+parseInt(_0x3cdf27(0x141))/0x4*(parseInt(_0x3cdf27(0x180))/0x5)+parseInt(_0x3cdf27(0x165))/0x6*(-parseInt(_0x3cdf27(0x188))/0x7)+parseInt(_0x3cdf27(0x184))/0x8*(-parseInt(_0x3cdf27(0x14e))/0x9)+parseInt(_0x3cdf27(0x18b))/0xa*(parseInt(_0x3cdf27(0x162))/0xb)+-parseInt(_0x3cdf27(0x16a))/0xc;if(_0x536537===_0x356ebc)break;else _0x5c88fc['push'](_0x5c88fc['shift']());}catch(_0x4d8365){_0x5c88fc['push'](_0x5c88fc['shift']());}}}(_0x4d46,0x36ea3));import{spawn}from'child_process';function _0x38f3(_0x27ee43,_0x2f2c8d){_0x27ee43=_0x27ee43-0x13f;const _0x4d46a3=_0x4d46();let _0x38f3f5=_0x4d46a3[_0x27ee43];return _0x38f3f5;}import{existsSync}from'fs';import{readFile,writeFile}from'fs/promises';import{installSkill,removeSkill,RANGER_MANAGED_SKILLS,DEPRECATED_SKILLS}from'./utils/skills.js';import{PACKAGE_NAME,getCurrentVersion,getLatestVersion,compareVersions}from'./utils/version.js';import{getProjectRoot,getSkillsDir}from'./utils/claudeConfig.js';import{getOpencodeSkillsDir}from'./utils/opencodeConfig.js';import{join}from'path';import{getRangerDir}from'./utils/rangerRoot.js';import{getPluginInfo,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';const CLAUDE_COMMAND_TIMEOUT_MS=0x1d4c0;async function runCommand(_0x3fa286,_0x15d4c1,_0x1cb032){const _0x4817b0=_0x38f3,_0x5ba5fe={'DyEru':function(_0x87e47,_0x27925a){return _0x87e47(_0x27925a);},'Olaub':function(_0x4c2d43,_0x426200){return _0x4c2d43===_0x426200;},'buOVb':'ignore','ojgeH':_0x4817b0(0x143),'LfJpb':function(_0x30a499,_0x195d46){return _0x30a499===_0x195d46;},'SyyON':'win32'};return new Promise(_0x381c58=>{const _0x4661bf=_0x4817b0;let _0x1ef498=![],_0x1d3d81;const _0x3151f1=_0x30a68a=>{if(_0x1ef498)return;_0x1ef498=!![],_0x1d3d81&&clearTimeout(_0x1d3d81),_0x381c58(_0x30a68a);},_0x148df4=spawn(_0x3fa286,_0x15d4c1,{'stdio':[_0x5ba5fe['buOVb'],_0x1cb032?.['stdio']??_0x4661bf(0x143),_0x1cb032?.[_0x4661bf(0x179)]??_0x5ba5fe[_0x4661bf(0x15b)]],'cwd':_0x1cb032?.['cwd'],'shell':_0x5ba5fe[_0x4661bf(0x17d)](process[_0x4661bf(0x159)],_0x5ba5fe[_0x4661bf(0x191)])});_0x1d3d81=_0x1cb032?.['timeoutMs']?setTimeout(()=>{const _0x28d588=_0x4661bf;_0x148df4['kill'](),_0x148df4[_0x28d588(0x17e)](),_0x3151f1(![]);},_0x1cb032[_0x4661bf(0x166)]):undefined,_0x148df4['on']('close',_0x39f857=>{const _0x4b91b4=_0x4661bf;_0x5ba5fe[_0x4b91b4(0x192)](_0x3151f1,_0x5ba5fe[_0x4b91b4(0x17c)](_0x39f857,0x0));}),_0x148df4['on']('error',()=>{_0x3151f1(![]);});});}export function resolveDistTag(_0x1cba0f){const _0x4d136f=_0x38f3,_0x2f2487={'HqTgz':_0x4d136f(0x164)};if(/-alpha\./i['test'](_0x1cba0f))return _0x2f2487[_0x4d136f(0x18f)];if(/-beta\./i['test'](_0x1cba0f))return'beta';if(/-rc\./i[_0x4d136f(0x145)](_0x1cba0f))return'rc';return'latest';}async function runInstall(_0x1b31f3='latest'){const _0x4b0b01=_0x38f3,_0x148b71={'HNFLu':function(_0x396d41,_0x2d3172,_0x99fb0b,_0x57975d){return _0x396d41(_0x2d3172,_0x99fb0b,_0x57975d);},'UKfEO':_0x4b0b01(0x160),'saTBZ':'ignore','ZARaa':'close'};return new Promise(_0x24676b=>{const _0x347105=_0x4b0b01;console[_0x347105(0x163)](_0x347105(0x144)+PACKAGE_NAME+'@'+_0x1b31f3+_0x347105(0x15a));const _0x43abec=_0x148b71['HNFLu'](spawn,'npm',[_0x148b71['UKfEO'],'-g',PACKAGE_NAME+'@'+_0x1b31f3],{'stdio':[_0x148b71[_0x347105(0x173)],_0x347105(0x143),_0x347105(0x143)],'shell':process['platform']==='win32'});_0x43abec['on'](_0x148b71[_0x347105(0x151)],_0x2cdec8=>{_0x24676b(_0x2cdec8===0x0);}),_0x43abec['on']('error',()=>{_0x24676b(![]);});});}async function updateClaudeMarketplace(){const _0x1ee044=_0x38f3,_0xbd7908={'FWyna':_0x1ee044(0x15e),'TfVsw':_0x1ee044(0x13f),'Cmnyz':'marketplace','nWJRI':_0x1ee044(0x168),'QGTyO':'Claude\x20marketplace\x20update\x20command\x20failed\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).'},_0x415954=await runCommand(_0xbd7908['FWyna'],[_0xbd7908[_0x1ee044(0x18c)],_0xbd7908['Cmnyz'],'update',_0xbd7908[_0x1ee044(0x18e)]],{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0x415954)throw new Error(_0xbd7908[_0x1ee044(0x189)]);}async function updateClaudePlugin(_0x1d2c40=_0x3edbc4(0x16d)){const _0x6f5149=_0x3edbc4,_0x14d6a6={'dYwAc':'plugin','cJnoO':_0x6f5149(0x14a),'lrnKW':function(_0x15c3c3,_0xf45ac7){return _0x15c3c3!==_0xf45ac7;},'sFxlX':function(_0x25f3a3,_0x332cf0,_0x5c868c,_0x45a126){return _0x25f3a3(_0x332cf0,_0x5c868c,_0x45a126);},'WCjXU':'project','bnvHt':function(_0x4e4d79,_0x3531d1){return _0x4e4d79===_0x3531d1;},'Skmlc':'local'},_0x31bfca=[_0x14d6a6[_0x6f5149(0x14b)],'update',_0x14d6a6[_0x6f5149(0x16e)]];_0x14d6a6['lrnKW'](_0x1d2c40,'user')&&_0x31bfca[_0x6f5149(0x171)](_0x6f5149(0x14f),_0x1d2c40);const _0x50e0fa=await _0x14d6a6['sFxlX'](runCommand,'claude',_0x31bfca,{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS,'cwd':_0x1d2c40===_0x14d6a6[_0x6f5149(0x154)]||_0x14d6a6[_0x6f5149(0x158)](_0x1d2c40,_0x14d6a6['Skmlc'])?getProjectRoot():undefined});if(!_0x50e0fa)throw new Error('Claude\x20plugin\x20update\x20failed\x20for\x20'+_0x1d2c40+'\x20scope\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).');}function isSkillInstalled(_0x28b8fd,_0x230129,_0x5ba117){const _0x5ae101=_0x3edbc4,_0x409f0b={'Zvsko':function(_0xa2383a,_0x49c5b3){return _0xa2383a===_0x49c5b3;},'gjMqN':_0x5ae101(0x15f),'CzNwU':function(_0x4b7840,_0x50a19b){return _0x4b7840(_0x50a19b);},'hyiWh':function(_0x1dc965,_0x3df063){return _0x1dc965(_0x3df063);}},_0x1e9ae6=_0x409f0b[_0x5ae101(0x15c)](_0x5ba117,_0x409f0b['gjMqN'])?getOpencodeSkillsDir(_0x230129):_0x409f0b['CzNwU'](getSkillsDir,_0x230129),_0xde8d2=join(_0x1e9ae6,_0x28b8fd);return _0x409f0b['hyiWh'](existsSync,_0xde8d2);}function _0x4d46(){const _0xb52e97=['DhWnv','splice','36CfKzlb','--scope','GejMy','ZARaa','1047618qzahAK','active-feature.txt','WCjXU','\x0aClaude\x20plugin\x20updated\x20(local\x20scope).','DhOpX','dWYyM','bnvHt','platform','...\x0a','ojgeH','Zvsko','\x0aClaude\x20plugin\x20updated\x20(project\x20scope).','claude','opencode','install','\x20ranger-managed\x20skill(s)...','451FiCQYz','log','alpha','138aHfcIJ','timeoutMs','trim','trailhead','\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','7419300MCAAlL','warn','QfBVx','user','cJnoO','Latest\x20version:\x20\x20','\x20channel.','push','\x0aCurrent\x20version:\x20','saTBZ','length','scope','4083qxOISP','mTaOr','Rxhuw','stdio','local','mPVht','Olaub','LfJpb','unref','.gitignore','686945QwbqqO','project','error','Attempting\x20install\x20anyway...','863368gZmBBi','utf-8','206ZYJaqI','FisnD','100219wUTxmW','QGTyO','\x0aYour\x20version\x20(','102990UbryzG','TfVsw','endsWith','nWJRI','HqTgz','\x0aClaude\x20marketplace\x20updated\x20(trailhead).','SyyON','DyEru','plugin','NUUAG','12HcmlZE','PkFxW','inherit','\x0aInstalling\x20','test','\x0a✅\x20Update\x20complete!',').\x20Staying\x20on\x20','DcYxS',')\x20is\x20newer\x20than\x20the\x20published\x20version\x20(','ranger@trailhead','dYwAc'];_0x4d46=function(){return _0xb52e97;};return _0x4d46();}async function reinstallSkills(_0x132f43){const _0x1b49a3=_0x3edbc4,_0x5d3cc9={'grGbi':'claude','MbssX':function(_0x1bc204,_0x34b5dc,_0x44167c,_0x58fcf7){return _0x1bc204(_0x34b5dc,_0x44167c,_0x58fcf7);},'DhOpX':function(_0x41a526,_0xd1ad65){return _0x41a526===_0xd1ad65;},'KBfjd':'\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.'},_0x469204=[_0x1b49a3(0x181),'user'],_0x1b86a1=[];for(const _0x330278 of _0x469204){for(const _0x4f36dc of RANGER_MANAGED_SKILLS){isSkillInstalled(_0x4f36dc,_0x330278,_0x5d3cc9['grGbi'])&&_0x1b86a1['push']({'skillName':_0x4f36dc,'level':_0x330278,'platform':'claude'}),_0x5d3cc9['MbssX'](isSkillInstalled,_0x4f36dc,_0x330278,'opencode')&&_0x1b86a1['push']({'skillName':_0x4f36dc,'level':_0x330278,'platform':'opencode'});}}for(const _0x15189a of _0x469204){for(const _0x2f820d of DEPRECATED_SKILLS){await removeSkill(_0x2f820d,_0x15189a);}}if(_0x5d3cc9[_0x1b49a3(0x156)](_0x1b86a1[_0x1b49a3(0x174)],0x0)){console[_0x1b49a3(0x163)](_0x5d3cc9['KBfjd']);return;}console[_0x1b49a3(0x163)]('\x0aReinstalling\x20'+_0x1b86a1['length']+_0x1b49a3(0x161));for(const {skillName:_0x30eeab,level:_0x1c4329,platform:_0x32d5bf}of _0x1b86a1){try{await installSkill(_0x30eeab,{'level':_0x1c4329,'cliVersion':_0x132f43,'platform':_0x32d5bf});}catch(_0x19214f){console[_0x1b49a3(0x16b)]('\x20\x20Failed\x20to\x20reinstall\x20'+_0x32d5bf+'\x20'+_0x1c4329+'\x20skill\x20'+_0x30eeab+':',_0x19214f);}}}async function ensureActiveProfileGitignored(){const _0x3d64d9=_0x3edbc4,_0x3a5539={'BYrCf':function(_0x28920b){return _0x28920b();},'fWejc':_0x3d64d9(0x17f),'wyWGT':function(_0x3c9e25,_0x4c91c3){return _0x3c9e25(_0x4c91c3);},'wSmJc':'active-profile.txt','QfBVx':_0x3d64d9(0x185)},_0x5345aa=join(_0x3a5539['BYrCf'](getRangerDir),_0x3a5539['fWejc']);if(!_0x3a5539['wyWGT'](existsSync,_0x5345aa))return![];let _0x252fb6='';try{_0x252fb6=await readFile(_0x5345aa,'utf-8');}catch{return![];}const _0x474211=_0x252fb6['split'](/\r?\n/);if(_0x474211['some'](_0x5602a5=>_0x5602a5[_0x3d64d9(0x167)]()==='active-profile.txt'))return![];let _0x45ce9a=_0x474211['findIndex'](_0xfd72af=>_0xfd72af[_0x3d64d9(0x167)]()===_0x3d64d9(0x153));_0x45ce9a===-0x1&&(_0x45ce9a=_0x474211['length']);_0x474211[_0x3d64d9(0x14d)](_0x45ce9a,0x0,_0x3a5539['wSmJc']);let _0x288e98=_0x474211['join']('\x0a');!_0x288e98[_0x3d64d9(0x18d)]('\x0a')&&(_0x288e98+='\x0a');try{await writeFile(_0x5345aa,_0x288e98,_0x3a5539[_0x3d64d9(0x16c)]);}catch{return![];}return!![];}export async function update(){const _0x58051a=_0x3edbc4,_0x23ebe7={'Rxhuw':function(_0x58f723){return _0x58f723();},'PkFxW':function(_0x1b11d2,_0x3d068a){return _0x1b11d2(_0x3d068a);},'NUUAG':function(_0xe9ca70){return _0xe9ca70();},'mTaOr':_0x58051a(0x183),'XCstK':_0x58051a(0x169),'mPVht':'Update\x20failed.','dWYyM':_0x58051a(0x14a),'jgTuT':function(_0x553c8d){return _0x553c8d();},'FisnD':function(_0x220ef9,_0x269eaa){return _0x220ef9===_0x269eaa;},'DhWnv':'project','DcYxS':function(_0x5e7700,_0x409199){return _0x5e7700===_0x409199;},'GejMy':'\x0aClaude\x20plugin\x20updated\x20(user\x20scope).'},_0x190f9f=_0x23ebe7[_0x58051a(0x178)](getCurrentVersion);console['log'](_0x58051a(0x172)+_0x190f9f);const _0x14fddc=resolveDistTag(_0x190f9f);if(_0x14fddc!=='latest'){console['log']('Prerelease\x20channel\x20detected\x20(@'+_0x14fddc+_0x58051a(0x147)+_0x14fddc+'\x20—\x20reinstalling\x20@'+_0x14fddc+'...');const _0x459699=await runInstall(_0x14fddc);if(!_0x459699)throw new Error('Update\x20failed\x20for\x20@'+_0x14fddc+_0x58051a(0x170));const _0x33f4e8=getCurrentVersion();console['log']('\x0aSuccessfully\x20installed\x20'+PACKAGE_NAME+'@'+_0x14fddc+'.'),await _0x23ebe7[_0x58051a(0x142)](reinstallSkills,_0x33f4e8),await _0x23ebe7['NUUAG'](ensureActiveProfileGitignored),console['log'](_0x58051a(0x146));return;}console['log']('Checking\x20for\x20updates...');const _0xe6541=getLatestVersion();let _0x2bf084=_0x190f9f;if(!_0xe6541['version']){console[_0x58051a(0x16b)]('\x0aCould\x20not\x20check\x20latest\x20version:\x20'+_0xe6541['error']),console[_0x58051a(0x163)](_0x23ebe7[_0x58051a(0x177)]);const _0x2869af=await _0x23ebe7[_0x58051a(0x140)](runInstall);if(_0x2869af)console['log']('\x0aSuccessfully\x20installed\x20latest\x20version.'),_0x2bf084=getCurrentVersion();else throw new Error('Update\x20failed:\x20'+_0xe6541[_0x58051a(0x182)]);}else{const _0x2cafa0=_0xe6541['version'];console[_0x58051a(0x163)](_0x58051a(0x16f)+_0x2cafa0);const _0x1f086c=compareVersions(_0x190f9f,_0x2cafa0);if(_0x1f086c===0x0)console['log'](_0x23ebe7['XCstK']);else{if(_0x1f086c<0x0)console[_0x58051a(0x163)](_0x58051a(0x18a)+_0x190f9f+_0x58051a(0x149)+_0x2cafa0+').');else{const _0x3ecc25=await _0x23ebe7[_0x58051a(0x140)](runInstall);if(_0x3ecc25)console[_0x58051a(0x163)]('\x0aSuccessfully\x20updated\x20to\x20version\x20'+_0x2cafa0),_0x2bf084=_0x2cafa0;else throw new Error(_0x23ebe7[_0x58051a(0x17b)]);}}}await reinstallSkills(_0x2bf084);const _0x1d576a=await isMarketplaceAdded('trailhead'),_0xa158e4=await isPluginInstalled(_0x23ebe7[_0x58051a(0x157)]);_0x1d576a&&(await _0x23ebe7['jgTuT'](updateClaudeMarketplace),console['log'](_0x58051a(0x190)));if(_0xa158e4){const _0x3ca3c9=await _0x23ebe7['PkFxW'](getPluginInfo,_0x58051a(0x14a)),_0x4acc3f=_0x3ca3c9?.[_0x58051a(0x175)]??'user';await updateClaudePlugin(_0x4acc3f);if(_0x23ebe7[_0x58051a(0x187)](_0x4acc3f,_0x23ebe7[_0x58051a(0x14c)]))console['log'](_0x58051a(0x15d));else _0x23ebe7[_0x58051a(0x148)](_0x4acc3f,_0x58051a(0x17a))?console['log'](_0x58051a(0x155)):console[_0x58051a(0x163)](_0x23ebe7[_0x58051a(0x150)]);}const _0x2f3d5e=await ensureActiveProfileGitignored();console['log'](_0x58051a(0x146));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1009ef,_0x131e88){var _0x4499ff=_0x4cce,_0x1ea6b3=_0x1009ef();while(!![]){try{var _0x583fa5=-parseInt(_0x4499ff(0x1f0))/0x1*(parseInt(_0x4499ff(0x1f8))/0x2)+-parseInt(_0x4499ff(0x1ec))/0x3*(parseInt(_0x4499ff(0x1eb))/0x4)+parseInt(_0x4499ff(0x1f2))/0x5+-parseInt(_0x4499ff(0x1ee))/0x6*(parseInt(_0x4499ff(0x1f4))/0x7)+-parseInt(_0x4499ff(0x1f5))/0x8+-parseInt(_0x4499ff(0x1ef))/0x9*(-parseInt(_0x4499ff(0x1f1))/0xa)+parseInt(_0x4499ff(0x1ed))/0xb*(parseInt(_0x4499ff(0x1f6))/0xc);if(_0x583fa5===_0x131e88)break;else _0x1ea6b3['push'](_0x1ea6b3['shift']());}catch(_0x1f4145){_0x1ea6b3['push'](_0x1ea6b3['shift']());}}}(_0x20f3,0xe0028));function _0x4cce(_0x5609df,_0x2707c7){_0x5609df=_0x5609df-0x1eb;var _0x20f332=_0x20f3();var _0x4cce4b=_0x20f332[_0x5609df];return _0x4cce4b;}export async function updateEnv(_0x4c6083,_0x590168,_0x16f6dd){var _0x18cb0c=_0x4cce,_0x3da309={'bIPnn':function(_0x5824ab,_0x9004ca){return _0x5824ab+_0x9004ca;},'lStCT':function(_0x257536,_0x5c92d9){return _0x257536+_0x5c92d9;},'jevfJ':'For\x20SSO/headed\x20login:\x20ranger\x20profile\x20add\x20<account-email>\x0a'};console[_0x18cb0c(0x1f3)](_0x3da309['bIPnn'](_0x3da309['lStCT'](_0x3da309['lStCT']('ranger\x20profile\x20update\x20writes\x20to\x20the\x20legacy\x20.ranger/\x20tree\x20which\x20is\x20no\x20longer\x20supported.\x0a'+'Cloud\x20profiles\x20own\x20canonical\x20session\x20state;\x20re-auth\x20via:\x0a','\x20\x20RANGER_TEST_USERNAME=...\x20RANGER_TEST_PASSWORD=...\x20ranger\x20go\x20--base-url\x20<url>\x0a'),_0x3da309['jevfJ']),'See:\x20docs/feature/cloud-profiles-old-vs-new-structure.md')),process[_0x18cb0c(0x1f7)](0x1);}function _0x20f3(){var _0x30a285=['88JBShjT','18RWjqxo','4217877REHDTh','4toxXGP','10OjEjAj','551140jPjdOo','error','4140339GxWFNM','14273352MVKpHI','9188232pBLzMA','exit','410506EVdlxE','1876284DcFLwj','9iQOLew'];_0x20f3=function(){return _0x30a285;};return _0x20f3();}
|
package/build/commands/useEnv.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5a19f2,_0x2930ef){const _0x29dec3=_0xd81a,_0x52cf0e=_0x5a19f2();while(!![]){try{const _0x560ace=parseInt(_0x29dec3(0xc6))/0x1+-parseInt(_0x29dec3(0xb9))/0x2*(-parseInt(_0x29dec3(0xbe))/0x3)+parseInt(_0x29dec3(0xba))/0x4+parseInt(_0x29dec3(0xbc))/0x5+parseInt(_0x29dec3(0xb8))/0x6*(parseInt(_0x29dec3(0xc1))/0x7)+parseInt(_0x29dec3(0xc2))/0x8*(-parseInt(_0x29dec3(0xc0))/0x9)+parseInt(_0x29dec3(0xc4))/0xa*(-parseInt(_0x29dec3(0xc3))/0xb);if(_0x560ace===_0x2930ef)break;else _0x52cf0e['push'](_0x52cf0e['shift']());}catch(_0x3f6e5c){_0x52cf0e['push'](_0x52cf0e['shift']());}}}(_0x329e,0x748de));import{join}from'path';function _0xd81a(_0x57c82f,_0x1f437b){_0x57c82f=_0x57c82f-0xb8;const _0x329ee5=_0x329e();let _0xd81add=_0x329ee5[_0x57c82f];return _0xd81add;}import{existsSync}from'fs';import{getEnvDir}from'./utils/settings.js';import{writeActiveProfileName}from'./utils/activeProfile.js';function _0x329e(){const _0xe42c16=['3351472TtbAAc','46717jAdcIr','2290svGhXy','`ranger\x20profile\x20add\x20','605932DhxFcP','1788sqtSgI','265332QLRkkt','1721508MyUxjz','log','2432520rMKvnG','QnYaA','6kNAMoD','lgfCK','9woBkRX','1897GfVHWk'];_0x329e=function(){return _0xe42c16;};return _0x329e();}import{ApiError,fetchCloudProfile}from'./utils/cloudProfile.js';export async function useEnv(_0x3fdfb0){const _0x45915e=_0xd81a,_0x316564={'dkvel':'settings.json','QnYaA':function(_0x3fe742,_0x4873ca){return _0x3fe742(_0x4873ca);},'lgfCK':function(_0x2b3bcc,_0x1a8923){return _0x2b3bcc instanceof _0x1a8923;},'QVZdF':function(_0x27a577,_0x279930){return _0x27a577+_0x279930;}},_0x4b2771=getEnvDir(_0x3fdfb0),_0xe1b038=join(_0x4b2771,_0x316564['dkvel']),_0x95cee9=_0x316564['QnYaA'](existsSync,_0x4b2771)&&existsSync(_0xe1b038);if(_0x95cee9){await _0x316564[_0x45915e(0xbd)](writeActiveProfileName,_0x3fdfb0),console[_0x45915e(0xbb)]('\x0a✓\x20Now\x20using\x20profile\x20\x22'+_0x3fdfb0+'\x22');return;}let _0x30b00c=null,_0x58e579=![];try{_0x30b00c=await fetchCloudProfile(_0x3fdfb0);if(!_0x30b00c)_0x58e579=!![];}catch(_0x1eaf88){_0x316564[_0x45915e(0xbf)](_0x1eaf88,ApiError)&&_0x1eaf88['status']===0x194&&(_0x58e579=!![]);}if(_0x58e579)throw new Error(_0x316564['QVZdF']('Profile\x20\x22'+_0x3fdfb0+'\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x20'+'Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20',_0x45915e(0xc5)+_0x3fdfb0+'`\x20to\x20create\x20one.'));await _0x316564['QnYaA'](writeActiveProfileName,_0x3fdfb0),console['log']('\x0a✓\x20Now\x20using\x20profile\x20\x22'+_0x3fdfb0+'\x22');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x52db48=_0x30ac;(function(_0x3fe01d,_0x8d1c5c){const _0x4cc9e7=_0x30ac,_0x238196=_0x3fe01d();while(!![]){try{const _0x26af80=-parseInt(_0x4cc9e7(0x1b2))/0x1*(parseInt(_0x4cc9e7(0x1b0))/0x2)+parseInt(_0x4cc9e7(0x1ab))/0x3+parseInt(_0x4cc9e7(0x1a9))/0x4+-parseInt(_0x4cc9e7(0x1ac))/0x5*(parseInt(_0x4cc9e7(0x1af))/0x6)+parseInt(_0x4cc9e7(0x1a5))/0x7*(parseInt(_0x4cc9e7(0x1ad))/0x8)+-parseInt(_0x4cc9e7(0x1a7))/0x9+parseInt(_0x4cc9e7(0x1a6))/0xa*(parseInt(_0x4cc9e7(0x1ae))/0xb);if(_0x26af80===_0x8d1c5c)break;else _0x238196['push'](_0x238196['shift']());}catch(_0x31c289){_0x238196['push'](_0x238196['shift']());}}}(_0x24f8,0xe223f));import{existsSync}from'fs';function _0x30ac(_0x3722bf,_0x290a38){_0x3722bf=_0x3722bf-0x1a3;const _0x24f8d8=_0x24f8();let _0x30ac02=_0x24f8d8[_0x3722bf];return _0x30ac02;}import{readFile}from'fs/promises';import{join}from'path';import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';import{readLastProfile,writeLastProfile}from'./projectsConfig.js';const LEGACY_ACTIVE_PROFILE_FILE=_0x52db48(0x1a4),LEGACY_ACTIVE_ENV_FILE='active-env.txt';function _0x24f8(){const _0x51e593=['cwd','active-profile.txt','28HzyjPu','18470OyNgFE','14603436FYGPJA','sdviw','2174444TzrNwv','XSpUv','26076qiKRAg','105iHrJsD','3273568xRQPIw','22187MgliuK','486654NOHatm','3324644oAHjhh','pcWMZ','1YadgGH'];_0x24f8=function(){return _0x51e593;};return _0x24f8();}function readLegacyActiveProfileFile(){const _0x439feb=_0x52db48,_0x3979e5={'EZwiM':function(_0x4024b0,_0x4e71c0,_0x253169){return _0x4024b0(_0x4e71c0,_0x253169);},'pcWMZ':function(_0x2066d8){return _0x2066d8();}},_0x47b398=[_0x3979e5['EZwiM'](join,getRangerDir(),LEGACY_ACTIVE_PROFILE_FILE),join(getRangerHomeDir(),LEGACY_ACTIVE_PROFILE_FILE),join(_0x3979e5[_0x439feb(0x1b1)](getRangerDir),LEGACY_ACTIVE_ENV_FILE),join(getRangerHomeDir(),LEGACY_ACTIVE_ENV_FILE)];for(const _0x243327 of _0x47b398){if(existsSync(_0x243327))return _0x243327;}return null;}export async function readActiveProfileName(){const _0x5637ac=_0x52db48,_0x333eea={'sdviw':'utf-8'},_0x5d956f=readLastProfile(process[_0x5637ac(0x1a3)]());if(_0x5d956f)return _0x5d956f;const _0x18947a=readLegacyActiveProfileFile();if(!_0x18947a)return null;try{return(await readFile(_0x18947a,_0x333eea[_0x5637ac(0x1a8)]))['trim']()||null;}catch{return null;}}export async function writeActiveProfileName(_0x34a107){const _0x4c9a2c=_0x52db48,_0x577f85={'XSpUv':function(_0x15f18d,_0x362201,_0x5b35dc){return _0x15f18d(_0x362201,_0x5b35dc);}};_0x577f85[_0x4c9a2c(0x1aa)](writeLastProfile,process['cwd'](),_0x34a107);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const _0x472a96=_0x505e;(function(_0x532a61,_0x10ab25){const _0x2c7d95=_0x505e,_0x43cd4e=_0x532a61();while(!![]){try{const _0xe5ac39=-parseInt(_0x2c7d95(0x7d))/0x1+parseInt(_0x2c7d95(0x8f))/0x2*(-parseInt(_0x2c7d95(0x8b))/0x3)+parseInt(_0x2c7d95(0x66))/0x4*(parseInt(_0x2c7d95(0x95))/0x5)+parseInt(_0x2c7d95(0x89))/0x6*(-parseInt(_0x2c7d95(0x88))/0x7)+-parseInt(_0x2c7d95(0x84))/0x8*(parseInt(_0x2c7d95(0x76))/0x9)+parseInt(_0x2c7d95(0x96))/0xa+parseInt(_0x2c7d95(0x7c))/0xb*(parseInt(_0x2c7d95(0x9c))/0xc);if(_0xe5ac39===_0x10ab25)break;else _0x43cd4e['push'](_0x43cd4e['shift']());}catch(_0x81f598){_0x43cd4e['push'](_0x43cd4e['shift']());}}}(_0x5def,0x7b8eb));import{delimiter,join}from'path';import{tmpdir}from'os';import{mkdirSync}from'fs';function _0x505e(_0x5905a1,_0x2d236e){_0x5905a1=_0x5905a1-0x65;const _0x5deff9=_0x5def();let _0x505eb3=_0x5deff9[_0x5905a1];return _0x505eb3;}import{getAiProxyUrl}from'./environment.js';const AI_PROXY_METADATA_HEADERS_ENV_VAR='ANTHROPIC_CUSTOM_HEADERS',AGENT_ENV_PASSTHROUGH_KEYS=['PATH','HOME',_0x472a96(0x9b),'TMP',_0x472a96(0x91),'USERPROFILE',_0x472a96(0x98),_0x472a96(0x67),_0x472a96(0x90),'XDG_CONFIG_HOME','PLAYWRIGHT_BROWSERS_PATH',_0x472a96(0x6c),_0x472a96(0x74),'CHROMIUM_BIN',_0x472a96(0x92),_0x472a96(0x9f),'npm_config_userconfig',_0x472a96(0x81),_0x472a96(0x75),_0x472a96(0xa3),'npm_config_registry','NPM_CONFIG_REGISTRY','DEBUG',_0x472a96(0x7f),_0x472a96(0x9a),_0x472a96(0x7a),AI_PROXY_METADATA_HEADERS_ENV_VAR],UNEXPANDED_PATH_TOKEN_PATTERNS=['${PATH}','$PATH',_0x472a96(0x79)];function _0x5def(){const _0xa14ead=['599828mEPqxC','LOCALAPPDATA','PATH\x20contains\x20an\x20unexpanded\x20placeholder\x20like\x20`${PATH}`\x20instead\x20of\x20the\x20expanded\x20current\x20PATH.','Your\x20PATH\x20looks\x20incomplete\x20for\x20browser\x20automation.\x20Ranger\x20will\x20keep\x20going,\x20but\x20browser\x20setup\x20may\x20fail.','bWsbs','lglxE','PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD','byokEnabled','push','true','add','PyZYh','fromEntries','trim','CHROME_BIN','npm_config_prefix','2645793nDrUqy','bKqZt','length','%PATH%','RANGER_DISABLE_MCP','set','1078ysMVjW','722849mMFAfF','PATH\x20is\x20missing\x20core\x20system\x20directories\x20like\x20`/usr/bin`\x20and\x20`/bin`.','NODE_ENV','zQpgr','NPM_CONFIG_USERCONFIG','sessionToken','metadata','24bebtnG','slice','map','includes','602AeYuvq','70122QBZlnV','CdWXF','381azLNvh','/bin','filter','split','5624idCwLG','XDG_CACHE_HOME','TEMP','npm_config_cache','/usr/bin','QmTLT','25lftPEl','1911680xYhJJG','string','APPDATA','env','RANGER_TEST_SKIP_BROWSER_WAIT','TMPDIR','310056CTICnf','ranger-claude-tmp','indexOf','NPM_CONFIG_CACHE','fNuEa','platform','Session\x20token\x20is\x20required\x20when\x20RANGER_BYOK=false','NPM_CONFIG_PREFIX','toLowerCase','oDWXn'];_0x5def=function(){return _0xa14ead;};return _0x5def();}function parseCustomHeaders(_0x5da3db){const _0x4c55d5=_0x472a96,_0x32a972={'vAKfs':function(_0x5c2773,_0xa70bcb){return _0x5c2773===_0xa70bcb;}};if(!_0x5da3db)return[];return _0x5da3db[_0x4c55d5(0x8e)](/\r?\n/)[_0x4c55d5(0x86)](_0x1dfdf0=>_0x1dfdf0['trim']())[_0x4c55d5(0x8d)](Boolean)[_0x4c55d5(0x86)](_0x3d1bb8=>{const _0x45809f=_0x4c55d5,_0x1152a3=_0x3d1bb8[_0x45809f(0x9e)](':');if(_0x32a972['vAKfs'](_0x1152a3,-0x1))return null;const _0xaea564=_0x3d1bb8[_0x45809f(0x85)](0x0,_0x1152a3)[_0x45809f(0x73)](),_0x3ca65d=_0x3d1bb8['slice'](_0x1152a3+0x1)['trim']();if(!_0xaea564)return null;return[_0xaea564,_0x3ca65d];})['filter'](_0x3f599b=>_0x3f599b!==null);}export function getAgentPathHealthWarning(_0x5cbc44,_0x1b30de=process[_0x472a96(0xa1)]){const _0x519137=_0x472a96,_0x522704={'QmTLT':function(_0x5ddcb3,_0x3234dc){return _0x5ddcb3===_0x3234dc;},'bKqZt':'PATH\x20is\x20empty,\x20so\x20npm\x20and\x20core\x20system\x20tools\x20may\x20be\x20unavailable.','PyZYh':_0x519137(0x68),'CdWXF':function(_0x296243,_0xe435eb){return _0x296243!==_0xe435eb;},'fNuEa':_0x519137(0x93),'rzBSv':function(_0x14858c,_0x543d43){return _0x14858c&&_0x543d43;}},_0x3f95ba=[],_0x36166e=(_0x5cbc44||'')[_0x519137(0x8e)](delimiter)[_0x519137(0x8d)](Boolean);_0x522704['QmTLT'](_0x36166e[_0x519137(0x78)],0x0)&&_0x3f95ba[_0x519137(0x6e)](_0x522704[_0x519137(0x77)]);UNEXPANDED_PATH_TOKEN_PATTERNS['some'](_0x44391d=>(_0x5cbc44||'')[_0x519137(0x87)](_0x44391d))&&_0x3f95ba[_0x519137(0x6e)](_0x522704[_0x519137(0x71)]);if(_0x522704[_0x519137(0x8a)](_0x1b30de,'win32')){const _0x39e55a=_0x36166e[_0x519137(0x87)](_0x522704[_0x519137(0xa0)]),_0x146418=_0x36166e[_0x519137(0x87)](_0x519137(0x8c));_0x522704['rzBSv'](!_0x39e55a,!_0x146418)&&_0x3f95ba['push'](_0x519137(0x7e));}if(_0x522704[_0x519137(0x94)](_0x3f95ba['length'],0x0))return null;return{'summary':_0x519137(0x69),'issues':_0x3f95ba};}export function buildAgentEnv(_0x28f58a){const _0x23dd43=_0x472a96,_0x26b771={'zQpgr':_0x23dd43(0xa2),'lglxE':function(_0x4f16d1){return _0x4f16d1();},'LbfaR':_0x23dd43(0x6f),'oDWXn':'TMPDIR','RDEwX':'TMP','bWsbs':_0x23dd43(0x91),'zQxWg':function(_0x3c46d8,_0x1bb810,_0x20353c){return _0x3c46d8(_0x1bb810,_0x20353c);},'alYbS':_0x23dd43(0x9d),'okBip':function(_0x1fc3c1,_0x3753a7){return _0x1fc3c1==_0x3753a7;}};if(_0x28f58a[_0x23dd43(0x6d)])return Object[_0x23dd43(0x72)](Object['entries'](process['env'])[_0x23dd43(0x8d)](_0x3e42f4=>typeof _0x3e42f4[0x1]===_0x23dd43(0x97)));if(!_0x28f58a[_0x23dd43(0x82)])throw new Error(_0x26b771[_0x23dd43(0x80)]);const _0x45fe66={'ANTHROPIC_API_KEY':_0x28f58a[_0x23dd43(0x82)],'ANTHROPIC_BASE_URL':_0x26b771[_0x23dd43(0x6b)](getAiProxyUrl),'DISABLE_TELEMETRY':_0x26b771['LbfaR']};for(const _0x233c98 of AGENT_ENV_PASSTHROUGH_KEYS){const _0x47406d=process[_0x23dd43(0x99)][_0x233c98];_0x47406d&&![_0x26b771[_0x23dd43(0x65)],_0x26b771['RDEwX'],_0x26b771[_0x23dd43(0x6a)]][_0x23dd43(0x87)](_0x233c98)&&(_0x45fe66[_0x233c98]=_0x47406d);}const _0x5adf61=_0x26b771['zQxWg'](join,tmpdir(),_0x26b771['alYbS']);try{_0x26b771['zQxWg'](mkdirSync,_0x5adf61,{'recursive':!![]});}catch{}_0x45fe66[_0x26b771['oDWXn']]=_0x5adf61,_0x45fe66[_0x26b771['RDEwX']]=_0x5adf61,_0x45fe66['TEMP']=_0x5adf61;const _0x55223b=parseCustomHeaders(process[_0x23dd43(0x99)][AI_PROXY_METADATA_HEADERS_ENV_VAR]),_0x59ff22=new Map(_0x55223b),_0x3347e5=new Set(_0x55223b[_0x23dd43(0x86)](([_0x4ef9d4])=>_0x4ef9d4[_0x23dd43(0xa4)]()));if(_0x28f58a[_0x23dd43(0x83)])for(const [_0x41c824,_0x5d9e61]of Object['entries'](_0x28f58a['metadata'])){if(_0x26b771['okBip'](_0x5d9e61,null)||_0x5d9e61==='')continue;const _0x3b8435='x-ranger-'+_0x41c824;!_0x3347e5['has'](_0x3b8435[_0x23dd43(0xa4)]())&&(_0x59ff22[_0x23dd43(0x7b)](_0x3b8435,_0x5d9e61),_0x3347e5[_0x23dd43(0x70)](_0x3b8435['toLowerCase']()));}const _0x441156=Array['from'](_0x59ff22['entries']())[_0x23dd43(0x86)](([_0xbd734a,_0x390af9])=>_0xbd734a+':\x20'+_0x390af9)['join']('\x0a');return _0x441156&&(_0x45fe66[AI_PROXY_METADATA_HEADERS_ENV_VAR]=_0x441156),_0x45fe66;}
|