@ranger-testing/ranger-cli 2.4.4 → 2.4.6
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/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/crypto.js +1 -1
- package/build/commands/utils/desirePathLog.js +1 -1
- package/build/commands/utils/deviceAuth.js +1 -1
- package/build/commands/utils/environment.js +1 -1
- package/build/commands/utils/featureApi.js +1 -1
- package/build/commands/utils/featureReportGenerator.js +1 -1
- package/build/commands/utils/fixWebmDuration.js +1 -1
- package/build/commands/utils/git.js +1 -1
- package/build/commands/utils/keychain.js +1 -1
- package/build/commands/utils/localAgentInstallationsApi.js +1 -1
- package/build/commands/utils/mcpImageBase64.js +1 -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/rangerConfig.js +1 -1
- package/build/commands/utils/rangerRoot.js +1 -1
- package/build/commands/utils/reportGenerator.js +1 -1
- package/build/commands/utils/retry.js +1 -1
- package/build/commands/utils/sessionCache.js +1 -1
- package/build/commands/utils/settings.js +1 -1
- package/build/commands/utils/skillContent.js +1 -1
- package/build/commands/utils/skills.js +1 -1
- package/build/commands/utils/stitchWebmFiles.js +1 -1
- package/build/commands/utils/telemetry.js +1 -1
- package/build/commands/utils/tokenRefresh.js +1 -0
- 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/commands/verifyInBrowser.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x284241,_0x4d8c2a){const _0x2c29f5=_0x168f,_0x273427=_0x284241();while(!![]){try{const _0x15f891=-parseInt(_0x2c29f5(0x1c3))/0x1+parseInt(_0x2c29f5(0x1c8))/0x2*(parseInt(_0x2c29f5(0x1bd))/0x3)+parseInt(_0x2c29f5(0x1c7))/0x4+-parseInt(_0x2c29f5(0x1c6))/0x5+-parseInt(_0x2c29f5(0x1ae))/0x6*(parseInt(_0x2c29f5(0x1ba))/0x7)+parseInt(_0x2c29f5(0x1b5))/0x8+parseInt(_0x2c29f5(0x1b3))/0x9*(parseInt(_0x2c29f5(0x1b0))/0xa);if(_0x15f891===_0x4d8c2a)break;else _0x273427['push'](_0x273427['shift']());}catch(_0x40ef8f){_0x273427['push'](_0x273427['shift']());}}}(_0x5129,0xc034f));function _0x5129(){const _0x27d0f7=['2tebLxw','stringify','5494668FmpTsi','log','1390pIDGsJ','oPcTe','success','128943mHnIIU','SessionStart','5825624NsPWxd','HtfDJ','vXkax','KwpkK','main','7TdCMEE','ZjfYk','xwCsl','3720189upCZDe','ZXvfA','source','trackCommandStart','hook:session-start','\x20(Branch:\x20','1307566RMNEXO','export\x20CLAUDE_SESSION_ID=\x22','master','5027675pgUsVL','225756QFQtob'];_0x5129=function(){return _0x27d0f7;};return _0x5129();}import{appendFile}from'fs/promises';import{initBranchTracking,shouldAutoEnableAfterClear,autoEnableAfterClear,isSessionEnabled,getCurrentBranch}from'../utils/sessionCache.js';import{createTelemetryCollector}from'../utils/telemetry.js';function _0x168f(_0x42e3ce,_0x143346){_0x42e3ce=_0x42e3ce-0x1ad;const _0x5129b1=_0x5129();let _0x168f1b=_0x5129b1[_0x42e3ce];return _0x168f1b;}import{getToken}from'../utils/keychain.js';const RANGER_AUTO_ENABLED_PROMPT='=================================================================\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20🚨\x20RANGER\x20IS\x20ACTIVE\x20🚨\x0a=================================================================\x0a\x0aThis\x20session\x20has\x20Ranger\x20ENABLED.\x20Before\x20doing\x20ANYTHING\x20else:\x0a\x0a1.\x20**READ\x20the\x20/ranger\x20skill\x20FIRST**\x20-\x20Run\x20the\x20skill\x20to\x20understand\x20the\x20required\x20workflow\x20for\x20UI\x20features\x0a\x0a2.\x20**Check\x20for\x20existing\x20feature\x20reviews**\x20-\x20Run\x20`ranger\x20list`\x20to\x20see\x20if\x20there\x27s\x20an\x20in-progress\x20feature\x20review\x20to\x20resume\x0a\x0a3.\x20**For\x20ANY\x20UI\x20work**:\x20You\x20MUST\x20either:\x0a\x20\x20\x20-\x20Resume\x20an\x20existing\x20feature\x20review:\x20`ranger\x20resume\x20<id>`\x0a\x20\x20\x20-\x20Create\x20a\x20new\x20feature\x20review:\x20`ranger\x20create\x20\x22<name>\x22\x20-d\x20\x22<desc>\x22\x20-c\x20\x22<scenario>\x22`\x0a\x0a4.\x20**If\x20resuming\x20a\x20feature\x20review\x20with\x20reviewer\x20comments**:\x20Run\x20`ranger\x20get-review`\x20to\x20see\x20what\x20reviewers\x20want\x20fixed\x20before\x20making\x20code\x20changes\x0a\x0a=================================================================';export async function sessionStart(_0x578da2){const _0x30daa2=_0x168f,_0x97d205={'wWJWM':function(_0x1100ff,_0x28d691){return _0x1100ff||_0x28d691;},'vXkax':'session_id','xwCsl':_0x30daa2(0x1bf),'ZjfYk':function(_0x4bab1a,_0x2a90af){return _0x4bab1a&&_0x2a90af;},'mkFKe':function(_0x2b24c6,_0x48c6f8){return _0x2b24c6(_0x48c6f8);},'oPcTe':function(_0x28c365,_0x7bacd9){return _0x28c365(_0x7bacd9);},'KwpkK':_0x30daa2(0x1c1),'HtfDJ':_0x30daa2(0x1b2),'JnsuU':function(_0x94185e){return _0x94185e();},'ZXvfA':_0x30daa2(0x1b9),'NwEWq':function(_0x289c86,_0x3169d4){return _0x289c86!==_0x3169d4;}};let _0xf13d3a=_0x97d205['wWJWM'](_0x578da2,''),_0x25d20c;if(!_0x578da2){let _0x26ed01='';for await(const _0x2fbb92 of process['stdin']){_0x26ed01+=_0x2fbb92;}try{const _0x38645d=JSON['parse'](_0x26ed01);_0xf13d3a=_0x38645d[_0x97d205[_0x30daa2(0x1b7)]]||'',_0x25d20c=_0x38645d[_0x97d205[_0x30daa2(0x1bc)]];}catch{}const _0x769f11=process['env']['CLAUDE_ENV_FILE'];if(_0x97d205[_0x30daa2(0x1bb)](_0x769f11,_0xf13d3a))try{await appendFile(_0x769f11,_0x30daa2(0x1c4)+_0xf13d3a+'\x22\x0a');}catch{}}try{await getToken();}catch{}if(_0xf13d3a){_0x97d205['mkFKe'](shouldAutoEnableAfterClear,_0x25d20c)&&autoEnableAfterClear(_0xf13d3a);_0x97d205['mkFKe'](initBranchTracking,_0xf13d3a);const _0x3b6169=isSessionEnabled(_0xf13d3a);try{const _0x3a6d63=_0x97d205[_0x30daa2(0x1b1)](createTelemetryCollector,_0x97d205[_0x30daa2(0x1b8)]);await _0x3a6d63[_0x30daa2(0x1c0)]({'sessionId':_0xf13d3a,'hooksEnabled':_0x3b6169}),await _0x3a6d63['trackCommandEnd'](_0x97d205[_0x30daa2(0x1b6)]);}catch{}if(_0x3b6169){const _0x523081=_0x97d205['JnsuU'](getCurrentBranch),_0x2d5ea5=_0x523081&&_0x523081!==_0x97d205[_0x30daa2(0x1be)]&&_0x97d205['NwEWq'](_0x523081,_0x30daa2(0x1c5))?_0x30daa2(0x1c2)+_0x523081+')':'',_0x310360={'hookSpecificOutput':{'hookEventName':_0x30daa2(0x1b4),'additionalContext':RANGER_AUTO_ENABLED_PROMPT+_0x2d5ea5}};console[_0x30daa2(0x1af)](JSON[_0x30daa2(0x1ad)](_0x310360));}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x136cf2,_0x1b9e51){const _0x3e1a5e=_0x2529,_0x256120=_0x136cf2();while(!![]){try{const _0x33bfc2=-parseInt(_0x3e1a5e(0x187))/0x1*(parseInt(_0x3e1a5e(0x181))/0x2)+-parseInt(_0x3e1a5e(0x177))/0x3*(parseInt(_0x3e1a5e(0x171))/0x4)+parseInt(_0x3e1a5e(0x182))/0x5*(-parseInt(_0x3e1a5e(0x16b))/0x6)+parseInt(_0x3e1a5e(0x188))/0x7*(-parseInt(_0x3e1a5e(0x17f))/0x8)+parseInt(_0x3e1a5e(0x17a))/0x9+parseInt(_0x3e1a5e(0x17d))/0xa*(parseInt(_0x3e1a5e(0x172))/0xb)+-parseInt(_0x3e1a5e(0x16f))/0xc*(-parseInt(_0x3e1a5e(0x16d))/0xd);if(_0x33bfc2===_0x1b9e51)break;else _0x256120['push'](_0x256120['shift']());}catch(_0x4ca93e){_0x256120['push'](_0x256120['shift']());}}}(_0x214e,0x902b9));import{getToken}from'../utils/keychain.js';function _0x214e(){const _0x7be608=['ixbjR','80nIfCOg','featureId','8UxZxeP','RANGER:\x20The\x20active\x20feature\x20review\x20still\x20has\x20unfinished\x20checklist\x20items.\x20Before\x20responding\x20to\x20the\x20user,\x20if\x20this\x20UI\x20work\x20is\x20ready,\x20run\x20`ranger\x20show`\x20and\x20then\x20`ranger\x20go`\x20for\x20the\x20relevant\x20scenario(s).\x20If\x20it\x20is\x20not\x20ready\x20for\x20browser\x20verification\x20yet,\x20continue\x20implementing.\x20Dashboard:\x20','2VpormA','108890QnNXrZ','IkMri','checklistItems','some','log','856346tetBeF','402829hddOhX','cdAkz','78yxUilb','verification_in_progress','1488526ZoijuF','blocked','192vEfVtF','sessionId','3836072IMEVPk','28468oDRpYB','status','trackCommandEnd','verified','success','3fOJHYR','FJcZe','incomplete','8044290kBVZBo','closed'];_0x214e=function(){return _0x7be608;};return _0x214e();}import{getFeature,concludeSession}from'../utils/featureApi.js';import{getSessionEntry,shouldShowStopReminder}from'../utils/sessionCache.js';import{getEnabledHookContext}from'./output.js';import{createTelemetryCollector}from'../utils/telemetry.js';export async function stopHook(_0x28c6bf){const _0x8624b5=_0x2529,_0x3bf615={'IkMri':function(_0x3a16c5,_0x2b10c4,_0x43328a,_0x3d979d){return _0x3a16c5(_0x2b10c4,_0x43328a,_0x3d979d);},'uMnkD':function(_0x4aff3d,_0x4678d5){return _0x4aff3d(_0x4678d5);},'PoPFT':function(_0x42e31b){return _0x42e31b();},'FJcZe':function(_0x55903a,_0x566060){return _0x55903a&&_0x566060;},'GssoY':function(_0x51daff,_0x8de748){return _0x51daff(_0x8de748);},'fRxwM':'Stop','FSbVA':function(_0x1f0447,_0x1505e9,_0x115ff8){return _0x1f0447(_0x1505e9,_0x115ff8);}},_0x50efd6=await getEnabledHookContext(_0x28c6bf),_0xf86576=_0x50efd6?.[_0x8624b5(0x170)]??null;let _0x55cc0a=!![];if(!_0xf86576){await _0x3bf615[_0x8624b5(0x183)](trackStop,_0xf86576,![],_0x55cc0a);return;}try{const _0x5cbe2c=_0x3bf615['uMnkD'](getSessionEntry,_0xf86576);if(!_0x5cbe2c){await trackStop(_0xf86576,!![],_0x55cc0a);return;}const _0x4f1895=await _0x3bf615['PoPFT'](getToken),_0x2a3ecb='https://dashboard.ranger.net/features/'+_0x5cbe2c[_0x8624b5(0x17e)];let _0x592dd6=null,_0x58a145=![],_0x374cda=![];if(_0x4f1895)try{const _0x1a17e6=await getFeature(_0x5cbe2c[_0x8624b5(0x17e)]);_0x592dd6=_0x1a17e6['currentSessionId']??null;const _0x44cab8=_0x1a17e6[_0x8624b5(0x184)]['filter'](_0x11a83d=>_0x11a83d[_0x8624b5(0x170)]===_0x592dd6);_0x58a145=_0x44cab8[_0x8624b5(0x185)](_0x185d25=>_0x185d25[_0x8624b5(0x173)]!==_0x8624b5(0x175)&&_0x185d25[_0x8624b5(0x173)]!==_0x8624b5(0x16e)&&_0x185d25['status']!==_0x8624b5(0x17b)&&_0x185d25['status']!==_0x8624b5(0x179)),_0x374cda=_0x44cab8[_0x8624b5(0x185)](_0x536316=>_0x536316[_0x8624b5(0x173)]===_0x8624b5(0x16c));}catch{}if(_0x3bf615[_0x8624b5(0x178)](_0x4f1895,_0x592dd6)&&_0x58a145){if(!_0x374cda&&_0x3bf615['GssoY'](shouldShowStopReminder,_0xf86576)){const _0x45bd0a={'hookSpecificOutput':{'hookEventName':_0x3bf615['fRxwM'],'additionalContext':_0x8624b5(0x180)+_0x2a3ecb}};console[_0x8624b5(0x186)](JSON['stringify'](_0x45bd0a));}}if(_0x4f1895&&_0x592dd6&&!_0x58a145)try{await _0x3bf615['FSbVA'](concludeSession,_0x5cbe2c[_0x8624b5(0x17e)],_0x592dd6);}catch{}await trackStop(_0xf86576,!![],_0x55cc0a);return;}catch{await trackStop(_0xf86576,!![],_0x55cc0a);return;}}function _0x2529(_0x295e09,_0x1096de){_0x295e09=_0x295e09-0x16b;const _0x214e51=_0x214e();let _0x2529a1=_0x214e51[_0x295e09];return _0x2529a1;}async function trackStop(_0x283d3f,_0x3b0ff2,_0x463add){const _0x2167d8=_0x2529,_0x6b30ad={'cdAkz':function(_0x4711ff,_0x149601){return _0x4711ff(_0x149601);},'roOxl':function(_0x854616,_0x2c6a77){return _0x854616??_0x2c6a77;},'ixbjR':_0x2167d8(0x176)};try{const _0x2e0b60=_0x6b30ad[_0x2167d8(0x189)](createTelemetryCollector,'hook:stop');await _0x2e0b60['trackCommandStart']({'sessionId':_0x6b30ad['roOxl'](_0x283d3f,undefined),'hooksEnabled':_0x3b0ff2,'stopAllowed':_0x463add}),await _0x2e0b60[_0x2167d8(0x174)](_0x6b30ad[_0x2167d8(0x17c)]);}catch{}}
|
package/build/commands/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x7b88c2,_0x1662a8){var _0x27e654=_0x53f5,_0x5e9c0=_0x7b88c2();while(!![]){try{var _0x2f95cf=-parseInt(_0x27e654(0x1a2))/0x1*(-parseInt(_0x27e654(0x19c))/0x2)+-parseInt(_0x27e654(0x1a1))/0x3+-parseInt(_0x27e654(0x19f))/0x4+parseInt(_0x27e654(0x19a))/0x5*(-parseInt(_0x27e654(0x19e))/0x6)+-parseInt(_0x27e654(0x19b))/0x7+-parseInt(_0x27e654(0x1a0))/0x8+parseInt(_0x27e654(0x199))/0x9*(parseInt(_0x27e654(0x19d))/0xa);if(_0x2f95cf===_0x1662a8)break;else _0x5e9c0['push'](_0x5e9c0['shift']());}catch(_0x1b60b){_0x5e9c0['push'](_0x5e9c0['shift']());}}}(_0x5630,0x9f5b2));export{addEnv}from'./addEnv.js';export{clean}from'./clean.js';export{login}from'./login.js';export{start}from'./start.js';export{useEnv}from'./useEnv.js';export{updateEnv}from'./updateEnv.js';export{update}from'./update.js';export{skillup}from'./skillup.js';function _0x53f5(_0x448e27,_0x6e53e5){_0x448e27=_0x448e27-0x199;var _0x5630e2=_0x5630();var _0x53f54d=_0x5630e2[_0x448e27];return _0x53f54d;}function _0x5630(){var _0x47cb78=['37321SviFnQ','603jUszSK','255iPkiON','577017BuyhMx','62vSPEVp','342530WnPUrG','52086dBUHqw','2239252DcrJzv','4560696enhtbV','3432354pFtSQL'];_0x5630=function(){return _0x47cb78;};return _0x5630();}export{envList}from'./env.js';export{hook}from'./hook.js';export{setupCi}from'./setupCi.js';
|
package/build/commands/login.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x3859(_0x37b890,_0x10d82f){_0x37b890=_0x37b890-0x1b9;const _0x464dd0=_0x464d();let _0x385926=_0x464dd0[_0x37b890];return _0x385926;}(function(_0x1641e1,_0x23ed11){const _0x4c56ca=_0x3859,_0x582a1f=_0x1641e1();while(!![]){try{const _0x5e2ca4=-parseInt(_0x4c56ca(0x1b9))/0x1*(parseInt(_0x4c56ca(0x1c6))/0x2)+parseInt(_0x4c56ca(0x1c8))/0x3+parseInt(_0x4c56ca(0x1bb))/0x4+-parseInt(_0x4c56ca(0x1bf))/0x5*(parseInt(_0x4c56ca(0x1c1))/0x6)+parseInt(_0x4c56ca(0x1c4))/0x7*(-parseInt(_0x4c56ca(0x1bc))/0x8)+parseInt(_0x4c56ca(0x1ba))/0x9*(-parseInt(_0x4c56ca(0x1bd))/0xa)+parseInt(_0x4c56ca(0x1c0))/0xb;if(_0x5e2ca4===_0x23ed11)break;else _0x582a1f['push'](_0x582a1f['shift']());}catch(_0x301485){_0x582a1f['push'](_0x582a1f['shift']());}}}(_0x464d,0x902af));import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{getCurrentUser}from'./utils/userApi.js';function _0x464d(){const _0x16ce13=['organizationName','2897AqiLsV','116199YjBtkb','794252QhEUQH','1117976vinMZF','80ySVevu','\x0a✅\x20API\x20key\x20stored\x20successfully','5ZbERFQ','6405575wyergW','1356738ilpuiY','stdin','bmHLz','35tUBsxA','message','14IBcmLh','success','2574144nzuUpQ','stdout'];_0x464d=function(){return _0x16ce13;};return _0x464d();}export async function login(){const _0x24a17f=_0x3859,_0x5551ff={'WKgTx':'Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','KczOj':function(_0x24bf89){return _0x24bf89();},'bmHLz':function(_0x5b5a4e,_0x49ab86){return _0x5b5a4e instanceof _0x49ab86;}},_0x49bbe0=process[_0x24a17f(0x1c2)]['isTTY']&&process[_0x24a17f(0x1c9)]['isTTY'];if(!_0x49bbe0)throw new Error(_0x5551ff['WKgTx']);try{const _0x5f286d=await _0x5551ff['KczOj'](runDeviceAuthFlow),_0x3e9050=await getCurrentUser(_0x5f286d);_0x3e9050[_0x24a17f(0x1c7)]?console['log']('\x0a✅\x20Logged\x20in\x20to\x20'+_0x3e9050['user'][_0x24a17f(0x1ca)]):console['log'](_0x24a17f(0x1be));}catch(_0x370b9a){throw new Error('Login\x20failed:\x20'+(_0x5551ff[_0x24a17f(0x1c3)](_0x370b9a,Error)?_0x370b9a[_0x24a17f(0x1c5)]:_0x370b9a));}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x53c41c,_0x3cac7b){const _0x20281f=_0x4c2f,_0x277a9a=_0x53c41c();while(!![]){try{const _0x3c47bf=-parseInt(_0x20281f(0x19b))/0x1+parseInt(_0x20281f(0x178))/0x2+-parseInt(_0x20281f(0x170))/0x3*(-parseInt(_0x20281f(0x17b))/0x4)+parseInt(_0x20281f(0x18d))/0x5+-parseInt(_0x20281f(0x173))/0x6*(parseInt(_0x20281f(0x17e))/0x7)+-parseInt(_0x20281f(0x1a3))/0x8*(parseInt(_0x20281f(0x176))/0x9)+parseInt(_0x20281f(0x186))/0xa;if(_0x3c47bf===_0x3cac7b)break;else _0x277a9a['push'](_0x277a9a['shift']());}catch(_0x13a4df){_0x277a9a['push'](_0x277a9a['shift']());}}}(_0x2436,0x2d93b));import{join}from'path';import{existsSync}from'fs';import _0x59d928 from'inquirer';function _0x2436(){const _0x4e1908=['yCOqy','.claude','push','mVwnz','yXTIR','marketplace','Project\x20(shared\x20with\x20team\x20via\x20git)','22656QUHKUQ','trailhead','UXYKc','\x0a📦\x20Claude\x20Code\x20Plugin\x0a','prompt','PAApI','SKILL.md','project','197528FAoIMC','WTzvr','mGLMg','jXAvj','\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','✓\x20Claude\x20Code\x20plugin\x20already\x20installed','yysbc','✓\x20Marketplace\x20already\x20added','2181oTvJgo','--scope','plugin','552MwEClP','add','✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','117bjbbii','Oatmk','691194pABArx','❌\x20Failed\x20to\x20add\x20marketplace:','lUIMO','1516CBMdwX','log','HIUXy','19369ptuxuJ','UwHec','DQdsZ','Where\x20should\x20the\x20plugin\x20be\x20installed?','confirm','SDQEn','Tdtiv','wantsSkillup','1138210svRAyB','list','ZbWkE','Baugr','ranger','already\x20enabled','JgZcC','249675cGkUdL','ranger-testing/trailhead','BNiXE','Argvb','Kwynv','pluginScope','user'];_0x2436=function(){return _0x4e1908;};return _0x2436();}function _0x4c2f(_0x40fc1e,_0x1821fe){_0x40fc1e=_0x40fc1e-0x16f;const _0x2436bb=_0x2436();let _0x4c2f22=_0x2436bb[_0x40fc1e];return _0x4c2f22;}import{skillup}from'../skillup.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';export async function ensureClaudePlugin(_0x3033b1){const _0x4c4da0=_0x4c2f,_0x55936c={'jXAvj':function(_0xe634b0,_0x1c6c09){return _0xe634b0(_0x1c6c09);},'ZtfsQ':function(_0x202299){return _0x202299();},'deiAZ':_0x4c4da0(0x193),'SLQhJ':_0x4c4da0(0x172),'PAApI':_0x4c4da0(0x199),'Oatmk':_0x4c4da0(0x174),'yXTIR':_0x4c4da0(0x18e),'SIWKX':_0x4c4da0(0x179),'mVwnz':'\x0aYou\x20can\x20install\x20manually\x20with:','Tdtiv':_0x4c4da0(0x1a7),'mGLMg':'install','BNiXE':_0x4c4da0(0x171),'UXYKc':'❌\x20Failed\x20to\x20install\x20plugin:','TuWEC':'ranger@trailhead','fbfqE':function(_0x8274c1,_0x6bab7c){return _0x8274c1===_0x6bab7c;},'zceVT':function(_0x5a0401,_0x3d2c6b,_0x97dc44){return _0x5a0401(_0x3d2c6b,_0x97dc44);},'iXZYh':_0x4c4da0(0x18b),'Baugr':'⚠\x20Failed\x20to\x20enable\x20plugin:','hnNEk':'✓\x20Claude\x20Code\x20plugin\x20enabled'},_0x5199a2=await _0x55936c['jXAvj'](isPluginInstalled,'ranger@trailhead');if(_0x5199a2)return console[_0x4c4da0(0x17c)](_0x4c4da0(0x1a8)),![];const _0x156ce3=_0x55936c['jXAvj'](existsSync,join(_0x55936c['ZtfsQ'](getProjectRoot),'.claude'));let _0x1a89c0;if(_0x3033b1)_0x1a89c0=_0x3033b1;else{if(_0x156ce3)_0x1a89c0='project';else{console[_0x4c4da0(0x17c)](_0x4c4da0(0x19e));const _0x237a95=await _0x59d928['prompt']([{'type':_0x4c4da0(0x187),'name':_0x4c4da0(0x192),'message':_0x4c4da0(0x181),'choices':[{'name':'User\x20(available\x20in\x20all\x20your\x20projects)','value':_0x4c4da0(0x193)},{'name':_0x4c4da0(0x19a),'value':'project'}],'default':_0x55936c['deiAZ']}]);_0x1a89c0=_0x237a95['pluginScope'];}}console['log']('\x0aInstalling\x20Claude\x20Code\x20plugin\x20('+_0x1a89c0+'\x20level)...\x0a');const _0x4425b6=await _0x55936c[_0x4c4da0(0x1a6)](isMarketplaceAdded,_0x4c4da0(0x19c));let _0xbc3a78=_0x4425b6;if(_0x4425b6)console['log'](_0x4c4da0(0x16f));else{const _0xe076b1=await runClaudeCommand([_0x55936c['SLQhJ'],_0x55936c[_0x4c4da0(0x1a0)],_0x55936c[_0x4c4da0(0x177)],_0x55936c[_0x4c4da0(0x198)]]);!_0xe076b1['success']?(console['error'](_0x55936c['SIWKX'],_0xe076b1['error']),console[_0x4c4da0(0x17c)](_0x55936c[_0x4c4da0(0x197)]),console[_0x4c4da0(0x17c)](_0x55936c[_0x4c4da0(0x184)]),console[_0x4c4da0(0x17c)]('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x1a89c0)):_0xbc3a78=!![];}if(_0xbc3a78){const _0x10d08b=await _0x55936c['jXAvj'](runClaudeCommand,[_0x55936c['SLQhJ'],_0x55936c[_0x4c4da0(0x1a5)],'ranger@trailhead',_0x55936c['BNiXE'],_0x1a89c0]);if(!_0x10d08b['success'])console['error'](_0x55936c[_0x4c4da0(0x19d)],_0x10d08b['error']),console[_0x4c4da0(0x17c)](_0x55936c['mVwnz']),console['log']('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x1a89c0);else{console[_0x4c4da0(0x17c)](_0x4c4da0(0x175));const _0x580d0e=[_0x4c4da0(0x172),'enable',_0x55936c['TuWEC']];_0x55936c['fbfqE'](_0x1a89c0,_0x4c4da0(0x1a2))&&_0x580d0e[_0x4c4da0(0x196)](_0x55936c[_0x4c4da0(0x18f)],'project');const _0xacfd=await _0x55936c['zceVT'](runClaudeCommand,_0x580d0e,{'captureOutput':!![]}),_0xb70265=_0xacfd['output']?.['includes'](_0x55936c['iXZYh']);!_0xacfd['success']&&!_0xb70265?console['error'](_0x55936c[_0x4c4da0(0x189)],_0xacfd['error']):console['log'](_0x55936c['hnNEk']);}}return!![];}export async function ensureClaudeSkills(_0x309053){const _0x52a608=_0x4c2f,_0x1cfd9f={'Kwynv':'user','HIUXy':_0x52a608(0x18a),'FyAng':_0x52a608(0x1a1),'lUIMO':function(_0x45bed0,_0x4705bf){return _0x45bed0(_0x4705bf);},'DQdsZ':function(_0x1c23bf,_0x22732f,_0x4e08b5,_0x3edfc4){return _0x1c23bf(_0x22732f,_0x4e08b5,_0x3edfc4);},'ZbWkE':function(_0x5339ac,_0x4f5685){return _0x5339ac||_0x4f5685;},'SDQEn':'✓\x20Ranger\x20skills\x20already\x20installed','JgZcC':function(_0x599db0,_0x2d9696){return _0x599db0(_0x2d9696);},'yCOqy':function(_0xbc3f5e,_0x297d5f,_0x46267b){return _0xbc3f5e(_0x297d5f,_0x46267b);},'Argvb':_0x52a608(0x195),'oWfui':function(_0x42086c,_0x3635da){return _0x42086c(_0x3635da);},'YDvCN':'project','UwHec':_0x52a608(0x182),'yysbc':_0x52a608(0x185),'WTzvr':'Would\x20you\x20like\x20to\x20install\x20skills?'},_0x155fab=existsSync(join(getSkillsDir(_0x1cfd9f[_0x52a608(0x191)]),_0x1cfd9f['HIUXy'],_0x1cfd9f['FyAng'])),_0x579dd9=_0x1cfd9f[_0x52a608(0x17a)](existsSync,_0x1cfd9f[_0x52a608(0x180)](join,getSkillsDir('project'),_0x1cfd9f[_0x52a608(0x17d)],_0x1cfd9f['FyAng']));if(_0x1cfd9f[_0x52a608(0x188)](_0x155fab,_0x579dd9))return console['log'](_0x1cfd9f[_0x52a608(0x183)]),![];const _0x5ae55f=_0x1cfd9f[_0x52a608(0x18c)](existsSync,_0x1cfd9f[_0x52a608(0x194)](join,getProjectRoot(),_0x1cfd9f[_0x52a608(0x190)]));let _0x4d7258=!![];if(_0x309053)await _0x1cfd9f['oWfui'](skillup,{'autoInstall':_0x309053,'suppressUsage':!![]});else{if(_0x5ae55f)await skillup({'autoInstall':_0x1cfd9f['YDvCN'],'suppressUsage':!![]});else{const _0x3b09c0=await _0x59d928[_0x52a608(0x19f)]([{'type':_0x1cfd9f[_0x52a608(0x17f)],'name':_0x1cfd9f[_0x52a608(0x1a9)],'message':_0x1cfd9f[_0x52a608(0x1a4)],'default':!![]}]);_0x4d7258=_0x3b09c0[_0x52a608(0x185)],_0x4d7258&&await _0x1cfd9f['JgZcC'](skillup,{'suppressUsage':!![]});}}return _0x4d7258;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x188616,_0xd3d149){const _0x5b6467=_0xd009,_0x281bd3=_0x188616();while(!![]){try{const _0x32525a=parseInt(_0x5b6467(0x1c3))/0x1+-parseInt(_0x5b6467(0x1c7))/0x2*(parseInt(_0x5b6467(0x1cb))/0x3)+-parseInt(_0x5b6467(0x1bf))/0x4*(-parseInt(_0x5b6467(0x1d6))/0x5)+parseInt(_0x5b6467(0x1c9))/0x6+-parseInt(_0x5b6467(0x1c2))/0x7+parseInt(_0x5b6467(0x1c0))/0x8+parseInt(_0x5b6467(0x1d1))/0x9*(-parseInt(_0x5b6467(0x1c6))/0xa);if(_0x32525a===_0xd3d149)break;else _0x281bd3['push'](_0x281bd3['shift']());}catch(_0x57fc5c){_0x281bd3['push'](_0x281bd3['shift']());}}}(_0x2fda,0xf0d54));import{join}from'path';function _0xd009(_0x44ca64,_0x201b39){_0x44ca64=_0x44ca64-0x1ba;const _0x2fda75=_0x2fda();let _0xd00905=_0x2fda75[_0x44ca64];return _0xd00905;}import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';import _0x308690 from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';function _0x2fda(){const _0x332e3a=['ilBXB','Project\x20(shared\x20with\x20team\x20via\x20git)','project','✓\x20OpenCode\x20plugin\x20already\x20configured','8kPURWw','4416392HSHwck','opencode.json','8524229gMkNRu','1798217noLxur','pluginScope','lGoJV','10olatvu','514018GXRdse','KDWZP','6811728SgPERm','XewaS','12XzBtAW','Failed\x20to\x20read\x20opencode.json','dnQme','utf-8','Where\x20should\x20the\x20plugin\x20be\x20installed?','error','5895369wRPfBR','includes','stringify','list','UHich','1004305TjEzpR','⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','User\x20(available\x20in\x20all\x20your\x20projects)'];_0x2fda=function(){return _0x332e3a;};return _0x2fda();}export async function ensureOpencodePluginConfig(_0x5448c3){const _0x4f802d=_0xd009,_0x3bf0f4={'NMqXq':function(_0x51ded8,_0x1c4451){return _0x51ded8(_0x1c4451);},'KDWZP':'\x0a📦\x20OpenCode\x20Plugin\x0a','tdbfR':_0x4f802d(0x1d4),'lGoJV':_0x4f802d(0x1cf),'qSYYl':_0x4f802d(0x1c1),'GXPeP':'@ranger-testing/opencode-plugin','UHich':'https://opencode.ai/config.json','dnQme':_0x4f802d(0x1cc),'ilBXB':_0x4f802d(0x1be),'WKORC':function(_0x5e71e9,_0x3b3938,_0x44cd57){return _0x5e71e9(_0x3b3938,_0x44cd57);},'XewaS':function(_0x23cdf5,_0x26ecdb){return _0x23cdf5+_0x26ecdb;}},_0x48aa67=_0x3bf0f4['NMqXq'](existsSync,join(getOpencodeConfigDir('project'),_0x4f802d(0x1c1)));let _0x4f8460;if(_0x5448c3)_0x4f8460=_0x5448c3;else{if(_0x48aa67)_0x4f8460='project';else{console['log'](_0x3bf0f4[_0x4f802d(0x1c8)]);const _0x215ec7=await _0x308690['prompt']([{'type':_0x3bf0f4['tdbfR'],'name':'pluginScope','message':_0x3bf0f4[_0x4f802d(0x1c5)],'choices':[{'name':_0x4f802d(0x1ba),'value':'user'},{'name':_0x4f802d(0x1bc),'value':_0x4f802d(0x1bd)}],'default':'user'}]);_0x4f8460=_0x215ec7[_0x4f802d(0x1c4)];}}const _0x37cccf=join(getOpencodeConfigDir(_0x4f8460),_0x3bf0f4['qSYYl']),_0xc8a5dd=_0x3bf0f4['GXPeP'],_0x2e7fe6=_0x3bf0f4[_0x4f802d(0x1d5)];let _0x49faee={};if(existsSync(_0x37cccf))try{const _0x353120=await readFile(_0x37cccf,_0x4f802d(0x1ce));_0x49faee=JSON['parse'](_0x353120);}catch(_0x486752){return console[_0x4f802d(0x1d0)](_0x4f802d(0x1d7)),{'configured':![],'scope':_0x4f8460,'error':_0x3bf0f4[_0x4f802d(0x1cd)],'details':_0x486752};}const _0xbea028=Array['isArray'](_0x49faee['plugin'])?_0x49faee['plugin']:[];if(_0xbea028[_0x4f802d(0x1d2)](_0xc8a5dd))return console['log'](_0x3bf0f4[_0x4f802d(0x1bb)]),{'configured':![],'scope':_0x4f8460};return _0x49faee['$schema']=_0x49faee['$schema']||_0x2e7fe6,_0x49faee['plugin']=[..._0xbea028,_0xc8a5dd],await mkdir(_0x3bf0f4['NMqXq'](getOpencodeConfigDir,_0x4f8460),{'recursive':!![]}),await _0x3bf0f4['WKORC'](writeFile,_0x37cccf,_0x3bf0f4[_0x4f802d(0x1ca)](JSON[_0x4f802d(0x1d3)](_0x49faee,null,0x2),'\x0a')),console['log']('✓\x20OpenCode\x20plugin\x20configured'),{'configured':!![],'scope':_0x4f8460};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x40cd29,_0x1217c3){const _0x34d37c=_0x270d,_0x189a88=_0x40cd29();while(!![]){try{const _0x1bd6ea=-parseInt(_0x34d37c(0x11e))/0x1*(-parseInt(_0x34d37c(0x12c))/0x2)+parseInt(_0x34d37c(0x115))/0x3*(-parseInt(_0x34d37c(0x111))/0x4)+parseInt(_0x34d37c(0x109))/0x5*(-parseInt(_0x34d37c(0x108))/0x6)+parseInt(_0x34d37c(0x122))/0x7+-parseInt(_0x34d37c(0x136))/0x8*(parseInt(_0x34d37c(0x114))/0x9)+-parseInt(_0x34d37c(0x11d))/0xa*(-parseInt(_0x34d37c(0x12a))/0xb)+parseInt(_0x34d37c(0x10e))/0xc;if(_0x1bd6ea===_0x1217c3)break;else _0x189a88['push'](_0x189a88['shift']());}catch(_0x4a8c66){_0x189a88['push'](_0x189a88['shift']());}}}(_0x159c,0xd27ae));import{mkdir,readFile,readdir}from'fs/promises';import{join}from'path';function _0x159c(){const _0x50eecc=['ranger-testing/trailhead','jPvwT','SHeaU','filter','\x20\x20No\x20auth\x20state\x20found\x20(app\x20may\x20not\x20require\x20authentication)','Failed\x20to\x20install\x20plugin:','path','trackPhaseStart','add','Failed\x20to\x20add\x20marketplace:','Cvaez','plugin','IaAsI','GQvGV','ZDdGp','Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.','No\x20CI\x20profiles\x20found\x20in\x20.ranger/ci/.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','brQDO','\x0a✅\x20Ranger\x20CI\x20setup\x20complete!\x0a','No\x20CI\x20profiles\x20found.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','project','6zdiUiJ','1949095jnNBDu','dir_setup','BNHsL','zypYU','exLHK','19886448TSjmlK','baseUrl','\x0a🔧\x20Ranger\x20CI\x20Setup\x0a','4TNzUaI','skipChromium','JWhaN','23175AnAJqu','1821813fxHIFZ','QMrUY','Failed\x20to\x20verify\x20encrypted\x20auth\x20for\x20profile\x20\x22','LHDvd','ARmKb','marketplace','bgyUu','length','10jqsUOl','7TmLvas','chromium','ICUvc','KZSYg','1495459GlxjOw','✓\x20Encrypted\x20auth\x20verified\x20(will\x20decrypt\x20at\x20runtime)','isDirectory','sessions','log','uWaNG','profile_activate','success','1056781XRCzdT','trackPhaseEnd','431994ovBRZs','auth.json.enc','error','scAmr','miNIG','QXqdj','mGKJC','name','\x22\x20has\x20no\x20settings.json.\x20Use\x20--base-url\x20to\x20configure\x20it.','Mjgqv','5032XDYKwl','settings.json','✓\x20Claude\x20Code\x20plugin\x20installed','trailhead'];_0x159c=function(){return _0x50eecc;};return _0x159c();}import{existsSync}from'fs';import{authenticate,ensureRangerDir,ensureChromium,writeRangerGitignore}from'./start.js';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';function _0x270d(_0x359284,_0x375202){_0x359284=_0x359284-0xf5;const _0x159c3b=_0x159c();let _0x270d96=_0x159c3b[_0x359284];return _0x270d96;}import{getToken}from'./utils/keychain.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function findCiProfile(_0x2d4ebb){const _0x336bc8=_0x270d,_0x24257e={'nuzJQ':function(_0xaa6fb6){return _0xaa6fb6();},'ICUvc':function(_0xf65743,_0x514bab,_0x9661fb){return _0xf65743(_0x514bab,_0x9661fb);},'exLHK':function(_0x217ab1,_0x40dbc5){return _0x217ab1+_0x40dbc5;},'SHeaU':_0x336bc8(0x102),'ARmKb':function(_0x4858f0,_0x262307){return _0x4858f0===_0x262307;},'Cvaez':function(_0x190002,_0x1d8d2c){return _0x190002===_0x1d8d2c;}},_0x500044=_0x24257e['nuzJQ'](getRangerDir),_0x552f84=join(_0x500044,'ci');if(_0x2d4ebb){const _0x462d24=_0x24257e[_0x336bc8(0x120)](join,_0x552f84,_0x2d4ebb);return{'name':_0x2d4ebb,'path':_0x462d24};}if(!existsSync(_0x552f84))throw new Error(_0x24257e[_0x336bc8(0x10d)](_0x336bc8(0x106),_0x24257e[_0x336bc8(0xf5)]));const _0x315c28=await readdir(_0x552f84,{'withFileTypes':!![]}),_0x4f0eba=_0x315c28[_0x336bc8(0xf6)](_0x4e1ec1=>_0x4e1ec1[_0x336bc8(0x124)]())['map'](_0x2a5882=>_0x2a5882[_0x336bc8(0x133)]);if(_0x24257e[_0x336bc8(0x119)](_0x4f0eba[_0x336bc8(0x11c)],0x0))throw new Error(_0x24257e['exLHK'](_0x336bc8(0x103),_0x336bc8(0x102)));if(_0x24257e[_0x336bc8(0xfd)](_0x4f0eba[_0x336bc8(0x11c)],0x1)){const _0x138f86=_0x4f0eba[0x0];return console['log']('Auto-detected\x20CI\x20profile:\x20'+_0x138f86),{'name':_0x138f86,'path':join(_0x552f84,_0x138f86)};}throw new Error('Multiple\x20CI\x20profiles\x20found:\x20'+_0x4f0eba['join'](',\x20')+'.\x20Use\x20--profile\x20to\x20specify\x20which\x20one.');}async function installPluginNonInteractive(){const _0x191b55=_0x270d,_0x545228={'WglqU':function(_0x263890,_0x4ad841){return _0x263890(_0x4ad841);},'JWhaN':'Installing\x20Claude\x20Code\x20plugin\x20(project\x20level)...','Zmpld':_0x191b55(0x11a),'GQvGV':_0x191b55(0xfb),'vNnmv':_0x191b55(0x13a),'KZSYg':_0x191b55(0xfc),'DBgHQ':'You\x20can\x20install\x20manually:\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','Mjgqv':_0x191b55(0xfe),'BNHsL':'--scope','IaAsI':'project','ZDdGp':_0x191b55(0xf8),'bgyUu':_0x191b55(0x138)},_0x8c0aa6=await _0x545228['WglqU'](isPluginInstalled,'ranger@trailhead');if(_0x8c0aa6)return console['log']('✓\x20Claude\x20Code\x20plugin\x20already\x20installed'),![];console[_0x191b55(0x126)](_0x545228[_0x191b55(0x113)]);const _0x1e0ee7=await isMarketplaceAdded(_0x191b55(0x139));let _0x308d3f=_0x1e0ee7;if(_0x1e0ee7)console['log']('✓\x20Marketplace\x20already\x20added');else{const _0x11cb61=await runClaudeCommand(['plugin',_0x545228['Zmpld'],_0x545228[_0x191b55(0x100)],_0x545228['vNnmv']]);!_0x11cb61['success']?(console['error'](_0x545228[_0x191b55(0x121)],_0x11cb61[_0x191b55(0x12e)]),console['log'](_0x545228['DBgHQ'])):_0x308d3f=!![];}if(_0x308d3f){const _0x2cd2d1=await runClaudeCommand([_0x545228[_0x191b55(0x135)],'install','ranger@trailhead',_0x545228[_0x191b55(0x10b)],_0x545228[_0x191b55(0xff)]]);!_0x2cd2d1[_0x191b55(0x129)]?(console['error'](_0x545228[_0x191b55(0x101)],_0x2cd2d1[_0x191b55(0x12e)]),console[_0x191b55(0x126)]('You\x20can\x20install\x20manually:\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20project')):console['log'](_0x545228[_0x191b55(0x11b)]);}return!![];}export async function setupCi(_0x3cdf40,_0x5e8962,_0x5f1c91){const _0x2585c8=_0x270d,_0x31ed41={'brQDO':_0x2585c8(0x110),'cBiTa':'auth','LHDvd':function(_0x203e53,_0x101b69){return _0x203e53(_0x101b69);},'yBwjp':function(_0x1e17b7){return _0x1e17b7();},'QMrUY':function(_0xf8d067,_0x5210e1,_0x1e03f1){return _0xf8d067(_0x5210e1,_0x1e03f1);},'scAmr':_0x2585c8(0x10a),'QMWdm':'chromium','dXYVE':function(_0x18bd84,_0x5af8c8){return _0x18bd84(_0x5af8c8);},'zypYU':function(_0x4f09fd,_0x5f0d22){return _0x4f09fd(_0x5f0d22);},'QXqdj':_0x2585c8(0x12d),'mGKJC':function(_0x2f0a35,_0x36f25b){return _0x2f0a35(_0x36f25b);},'miNIG':_0x2585c8(0x123),'mPqcD':function(_0x406913,_0x4a8521){return _0x406913 instanceof _0x4a8521;},'jPvwT':_0x2585c8(0xfe),'uWaNG':'skills'};console[_0x2585c8(0x126)](_0x31ed41[_0x2585c8(0x104)]),_0x5f1c91?.[_0x2585c8(0xfa)](_0x31ed41['cBiTa']),await _0x31ed41[_0x2585c8(0x118)](authenticate,_0x3cdf40),_0x5f1c91?.['trackPhaseEnd']('auth'),_0x5f1c91?.[_0x2585c8(0xfa)](_0x2585c8(0x10a));const {path:_0x3e1fcd,installed:_0xc4ac0c}=await _0x31ed41['yBwjp'](ensureRangerDir);await _0x31ed41[_0x2585c8(0x118)](writeRangerGitignore,_0x3e1fcd);const _0x2e494c=_0x31ed41['QMrUY'](join,_0x3e1fcd,_0x2585c8(0x125));!_0x31ed41[_0x2585c8(0x118)](existsSync,_0x2e494c)&&await _0x31ed41['QMrUY'](mkdir,_0x2e494c,{'recursive':!![]});_0x5f1c91?.[_0x2585c8(0x12b)](_0x31ed41[_0x2585c8(0x12f)],{'installed':_0xc4ac0c}),_0x5f1c91?.['trackPhaseStart'](_0x31ed41['QMWdm']);let _0x132221=![];_0x5e8962?.[_0x2585c8(0x112)]?console['log']('✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)'):_0x132221=await ensureChromium();_0x5f1c91?.[_0x2585c8(0x12b)](_0x2585c8(0x11f),{'installed':_0x132221,'skipped':!!_0x5e8962?.['skipChromium']}),_0x5f1c91?.['trackPhaseStart']('profile_activate');const _0x1f4513=await _0x31ed41['dXYVE'](findCiProfile,_0x5e8962?.['profile']);let _0x3b935c=![];_0x5e8962?.[_0x2585c8(0x10f)]&&(await mkdir(_0x1f4513['path'],{'recursive':!![]}),await saveSettings(_0x1f4513['name'],{'baseUrl':_0x5e8962[_0x2585c8(0x10f)],'headless':!![]}),console[_0x2585c8(0x126)]('✓\x20Created\x20profile\x20settings:\x20baseUrl='+_0x5e8962[_0x2585c8(0x10f)]),_0x3b935c=!![]);const _0x2fb7f6=_0x31ed41['QMrUY'](join,_0x1f4513[_0x2585c8(0xf9)],_0x2585c8(0x137));if(!_0x31ed41[_0x2585c8(0x10c)](existsSync,_0x2fb7f6)&&!_0x3b935c)throw new Error('CI\x20profile\x20\x22'+_0x1f4513[_0x2585c8(0x133)]+_0x2585c8(0x134));const _0x58acef=_0x31ed41['QMrUY'](join,_0x1f4513['path'],'auth.json'),_0x18be45=join(_0x1f4513[_0x2585c8(0xf9)],_0x31ed41[_0x2585c8(0x131)]),_0x2b50dc=_0x31ed41[_0x2585c8(0x132)](existsSync,_0x58acef),_0x4278d3=existsSync(_0x18be45);if(_0x4278d3)try{const _0x455ad6=await getToken();if(!_0x455ad6)throw new Error('No\x20API\x20token\x20available\x20for\x20decryption');const _0x2d70a8=await readFile(_0x18be45);_0x31ed41[_0x2585c8(0x116)](decrypt,_0x2d70a8,_0x455ad6),console['log'](_0x31ed41[_0x2585c8(0x130)]);}catch(_0xa88f0c){const _0x55b09b=_0x31ed41['mPqcD'](_0xa88f0c,Error)?_0xa88f0c['message']:String(_0xa88f0c);throw new Error(_0x2585c8(0x117)+_0x1f4513['name']+'\x22:\x20'+_0x55b09b);}else _0x2b50dc?console['log']('✓\x20Auth\x20state\x20found'):console[_0x2585c8(0x126)](_0x2585c8(0xf7));await writeActiveProfileName(_0x1f4513[_0x2585c8(0x133)]),console['log']('✓\x20Active\x20profile:\x20'+_0x1f4513[_0x2585c8(0x133)]),_0x5f1c91?.['trackPhaseEnd'](_0x2585c8(0x128),{'profileName':_0x1f4513[_0x2585c8(0x133)],'hasAuth':_0x2b50dc,'hasEncryptedAuth':_0x4278d3,'createdSettings':_0x3b935c}),_0x5f1c91?.['trackPhaseStart'](_0x31ed41[_0x2585c8(0x13b)]);const _0x3ae714=await installPluginNonInteractive();_0x5f1c91?.['trackPhaseEnd'](_0x31ed41['jPvwT'],{'installed':_0x3ae714}),_0x5f1c91?.[_0x2585c8(0xfa)]('skills'),await skillup({'autoInstall':_0x2585c8(0x107)}),_0x5f1c91?.['trackPhaseEnd'](_0x31ed41[_0x2585c8(0x127)]),console[_0x2585c8(0x126)](_0x2585c8(0x105));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xbf6206,_0x89e29f){const _0x2c6c77=_0x4d7b,_0x462e80=_0xbf6206();while(!![]){try{const _0x60e89c=parseInt(_0x2c6c77(0x6a))/0x1*(-parseInt(_0x2c6c77(0x87))/0x2)+-parseInt(_0x2c6c77(0x8b))/0x3*(-parseInt(_0x2c6c77(0x88))/0x4)+parseInt(_0x2c6c77(0x7c))/0x5+parseInt(_0x2c6c77(0x80))/0x6+parseInt(_0x2c6c77(0x71))/0x7*(-parseInt(_0x2c6c77(0x89))/0x8)+-parseInt(_0x2c6c77(0x67))/0x9*(parseInt(_0x2c6c77(0x73))/0xa)+parseInt(_0x2c6c77(0x7e))/0xb;if(_0x60e89c===_0x89e29f)break;else _0x462e80['push'](_0x462e80['shift']());}catch(_0x52f645){_0x462e80['push'](_0x462e80['shift']());}}}(_0x5019,0xbab2d));import{basename}from'path';import _0x4983ee from'inquirer';function _0x5019(){const _0x128cb4=['/skills/','autoInstall','TrCcc','prompt','fBocB','712152Foxtkr','mVAKE','4610HIlxTv','installLevel','❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','To\x20get\x20started:','\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','\x20successfully!\x0a','TqOfb','project-level','\x20<your-api-token>','3725320VsftIj','isTTY','18281461rhiEPO','message','5745048VjSCEA','warn','suppressUsage','\x0a✅\x20Installed\x20','eZuNl','platform','user','20gJeZED','2515228IgNnKY','120xMxiuZ','\x0a📦\x20Installing\x20skills...\x0a','3hlCDfk','/.claude/skills/','Where\x20should\x20skills\x20be\x20installed?','\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','fMyzY','26487QAjglY','\x20\x202.\x20Run:\x20ranger\x20setup','log','34585ljtJQp','fwpeq'];_0x5019=function(){return _0x128cb4;};return _0x5019();}function _0x4d7b(_0x2f3b41,_0x53428d){_0x2f3b41=_0x2f3b41-0x64;const _0x5019cb=_0x5019();let _0x4d7bd3=_0x5019cb[_0x2f3b41];return _0x4d7bd3;}import{getToken}from'./utils/keychain.js';import{installSkill}from'./utils/skills.js';import{getCurrentVersion}from'./utils/version.js';import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0x25bb63={}){const _0x39c370=_0x4d7b,_0x2d1b6f={'vheFI':_0x39c370(0x65),'TqOfb':'claude','mXWEy':_0x39c370(0x76),'mVAKE':'\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','rtsGK':function(_0x223c74,_0x3d25ec){return _0x223c74===_0x3d25ec;},'fMyzY':'opencode','KgUPw':'\x20--opencode','eZuNl':'✓\x20Found\x20API\x20token','ptHJG':function(_0x4de1f2){return _0x4de1f2();},'FuuXC':function(_0x36f6bd,_0x5678af){return _0x36f6bd(_0x5678af);},'MZRuq':function(_0x20a9b6,_0x2a5f53){return _0x20a9b6===_0x2a5f53;},'TrCcc':'user','faXJb':'list','zXfxU':function(_0x12b781,_0x4f4c68){return _0x12b781 instanceof _0x4f4c68;},'fwpeq':function(_0x4c330c,_0x34e522){return _0x4c330c>_0x34e522;},'IreTV':'user-level','fBocB':function(_0x3a876e,_0x179048){return _0x3a876e===_0x179048;},'rjvIs':'\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a'};console['log'](_0x2d1b6f['vheFI']);const _0x37ba82=_0x25bb63[_0x39c370(0x85)]??_0x2d1b6f[_0x39c370(0x79)],_0x50e5ea=await getToken();if(!_0x50e5ea){console[_0x39c370(0x69)](_0x39c370(0x75)),console[_0x39c370(0x69)](_0x2d1b6f['mXWEy']),console['log'](_0x2d1b6f[_0x39c370(0x72)]),console['log'](_0x39c370(0x68)+(_0x2d1b6f['rtsGK'](_0x37ba82,_0x2d1b6f['fMyzY'])?_0x2d1b6f['KgUPw']:'')+_0x39c370(0x7b)),console[_0x39c370(0x69)]('\x20\x203.\x20Run:\x20ranger\x20skillup'+(_0x2d1b6f['rtsGK'](_0x37ba82,_0x2d1b6f[_0x39c370(0x66)])?_0x2d1b6f['KgUPw']:'')+'\x0a');return;}console[_0x39c370(0x69)](_0x2d1b6f[_0x39c370(0x84)]);const _0x1790de=_0x2d1b6f['ptHJG'](getProjectRoot),_0x4b8f33=_0x2d1b6f['FuuXC'](basename,_0x1790de),_0x29d681=_0x2d1b6f['MZRuq'](_0x37ba82,_0x2d1b6f['fMyzY'])?getOpencodeConfigDir(_0x2d1b6f['TrCcc'])+'/skills/':getClaudeConfigDir()+_0x39c370(0x6c),_0x18d2f6=_0x37ba82==='opencode'?_0x1790de+'/.opencode/skills/':_0x1790de+_0x39c370(0x8c),_0x2dd187=process['stdin']['isTTY']&&process['stdout'][_0x39c370(0x7d)];let _0x557a0c;if(_0x25bb63[_0x39c370(0x6d)])_0x557a0c=_0x25bb63['autoInstall'];else{if(_0x2dd187){const _0x1ce4ca=await _0x4983ee[_0x39c370(0x6f)]([{'type':_0x2d1b6f['faXJb'],'name':_0x39c370(0x74),'message':_0x39c370(0x64),'choices':[{'name':'All\x20projects\x20('+_0x29d681+')','value':_0x2d1b6f[_0x39c370(0x6e)]},{'name':'This\x20project\x20only\x20('+_0x18d2f6+')','value':'project'}]}]);_0x557a0c=_0x1ce4ca['installLevel'];}else _0x557a0c='project',console[_0x39c370(0x69)]('Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20('+_0x18d2f6+')');}let _0x489e8c=0x0;const _0x107847=_0x2d1b6f['ptHJG'](getCurrentVersion);console['log'](_0x39c370(0x8a));try{const _0x2c3cce=await installSkill('ranger',{'cliVersion':_0x107847,'level':_0x557a0c,'platform':_0x37ba82});_0x2c3cce&&_0x489e8c++;}catch(_0x1f8c3b){console[_0x39c370(0x81)]('\x20\x20Failed\x20to\x20install\x20ranger\x20skill:',_0x2d1b6f['zXfxU'](_0x1f8c3b,Error)?_0x1f8c3b[_0x39c370(0x7f)]:_0x1f8c3b);}if(_0x2d1b6f[_0x39c370(0x6b)](_0x489e8c,0x0)){const _0x5e6a00=_0x2d1b6f['MZRuq'](_0x557a0c,_0x39c370(0x86))?_0x2d1b6f['IreTV']:_0x39c370(0x7a);console['log'](_0x39c370(0x83)+_0x489e8c+'\x20'+_0x5e6a00+'\x20skill'+(_0x489e8c>0x1?'s':'')+_0x39c370(0x78)),!_0x25bb63[_0x39c370(0x82)]&&(console['log']('To\x20use:'),_0x2d1b6f[_0x39c370(0x70)](_0x37ba82,_0x2d1b6f[_0x39c370(0x66)])?console[_0x39c370(0x69)](_0x39c370(0x77)):console[_0x39c370(0x69)]('\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!'));}else console['log'](_0x2d1b6f['rjvIs']);}
|
package/build/commands/start.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x32c762=_0x56c5;(function(_0x4c8f7b,_0x48e99d){const _0x316272=_0x56c5,_0x32d86a=_0x4c8f7b();while(!![]){try{const _0x1708d0=parseInt(_0x316272(0x197))/0x1+parseInt(_0x316272(0x16f))/0x2*(parseInt(_0x316272(0x178))/0x3)+parseInt(_0x316272(0x183))/0x4*(-parseInt(_0x316272(0x168))/0x5)+-parseInt(_0x316272(0x160))/0x6*(parseInt(_0x316272(0x1a4))/0x7)+parseInt(_0x316272(0x182))/0x8+parseInt(_0x316272(0x19c))/0x9+parseInt(_0x316272(0x18e))/0xa*(parseInt(_0x316272(0x199))/0xb);if(_0x1708d0===_0x48e99d)break;else _0x32d86a['push'](_0x32d86a['shift']());}catch(_0x5b15a8){_0x32d86a['push'](_0x32d86a['shift']());}}}(_0x1de3,0x6414c));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x5c082e from'inquirer';import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';function _0x1de3(){const _0x22b55e=['6FCJihk','You\x20can\x20install\x20it\x20manually\x20by\x20running:','Installation\x20failed\x20with\x20exit\x20code\x20','trackPhaseError','✓\x20Authenticated\x20to\x20','RUXge','Would\x20you\x20like\x20to\x20set\x20up\x20the\x20profile\x20now?','status','115TgNeid','\x0a❌\x20Profile\x20setup\x20failed:','schmg','scope','DaJCM','✓\x20Playwright\x20Chromium\x20browser\x20found','ready','575740zsjNNA','\x0aIn\x20Claude\x20Code,\x20run\x20','The\x20required\x20version\x20(','CjOnP','GAWTK','Make\x20sure\x20your\x20app\x20is\x20running\x20before\x20you\x20start.\x0a','kvYdx','\x20and\x20prompt\x20the\x20coding','kSGlS','6nufZuk','trackPhaseEnd','unVhO','isTTY','EvhCa','skipped','aIObU','success','version','WOcTg','3837992fTiMWc','100952exDBsX','sPEqS','No\x20git\x20repository\x20found.\x20Please\x20run\x20`ranger\x20setup`\x20from\x20inside\x20your\x20project\x20directory.','✓\x20Created\x20.ranger/.gitignore','\x0a⚠\x20Skipping\x20Chromium\x20installation.','jnbxs','executablePath','No\x20git\x20repository\x20found','✓\x20.ranger/\x20directory\x20already\x20exists','user','PogfR','1479980wWfxQT','trackPhaseStart','\x20install\x20chromium','provided_token','url','git_check','eiQXI','1.58.2','\x20now?','65226mLpbrj','.ranger','22EgpAwD','Validating\x20API\x20token...','UQKdl','714528sHvebg','hiato','with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','YTcLW','skipChromium','use\x20until\x20the\x20session\x20expires.\x0a','stdout','Xridm','3539879SIfPqp','\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20','ZJaEN','method','error','CGTSh','waHDs','rZeAe','✓\x20Already\x20authenticated\x20to\x20','\x0aA\x20profile\x20gives\x20Ranger\x27s\x20browser\x20agent\x20information\x20about\x20how','ONJkW','skills','plugin','cfvek','CbdOP','Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20','mIDnB','Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20','ranger\x20profile\x20add\x20local','env','aYQSs','\x1b[0m','warn','mOnta','NRdgm','local','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','You\x27ll\x20need\x20the\x20app\x20to\x20be\x20running\x20to\x20set\x20up\x20the\x20profile.','cFBxD','Authentication\x20failed:\x20','ranger','force','vNlXe','opencode','XMDYK','profile','kUvna','log','npx','confirm','message','organizationName','nqgLA','install'];_0x1de3=function(){return _0x22b55e;};return _0x1de3();}import{chromium}from'playwright';import{addEnv}from'./addEnv.js';import{getRangerDir,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),PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION=_0x32c762(0x195),bold=_0x3c8ee5=>'\x1b[1m'+_0x3c8ee5+_0x32c762(0x1b9);function _0x56c5(_0x79e9dd,_0x57ef73){_0x79e9dd=_0x79e9dd-0x158;const _0x1de360=_0x1de3();let _0x56c529=_0x1de360[_0x79e9dd];return _0x56c529;}function getPlaywrightVersion(){const _0x5d1875=_0x32c762,_0xab131f={'mIDnB':'playwright/package.json'};try{const _0x20aa00=require['resolve'](_0xab131f[_0x5d1875(0x1b4)]),_0x640abc=require(_0x20aa00);return _0x640abc[_0x5d1875(0x180)];}catch{return null;}}function installChromiumBinary(_0x20ec4f){const _0xbdcaef=_0x32c762,_0x421d4d={'ONJkW':_0xbdcaef(0x15f),'PogfR':'chromium','GBovo':_0xbdcaef(0x15a),'ngaFO':function(_0x3cf8d0,_0x11a430){return _0x3cf8d0===_0x11a430;},'nqgLA':'win32'};return new Promise((_0x264259,_0x378598)=>{const _0x4d8e75=_0xbdcaef,_0xd590b3={'CbdOP':function(_0x5896a,_0x4122c2){return _0x5896a(_0x4122c2);}},_0x2e7ddc=['playwright@'+_0x20ec4f,_0x421d4d[_0x4d8e75(0x1ae)],_0x421d4d[_0x4d8e75(0x18d)]],_0x15bd60=spawn(_0x421d4d['GBovo'],_0x2e7ddc,{'stdio':'inherit','shell':_0x421d4d['ngaFO'](process['platform'],_0x421d4d[_0x4d8e75(0x15e)])});_0x15bd60['on']('close',_0x5d027b=>{const _0x494a14=_0x4d8e75;_0x5d027b===0x0?_0x264259():_0xd590b3[_0x494a14(0x1b2)](_0x378598,new Error(_0x494a14(0x162)+_0x5d027b));}),_0x15bd60['on']('error',_0x5b61f9=>{_0x378598(_0x5b61f9);});});}export async function authenticate(_0x52c6e9){const _0x5c935f=_0x32c762,_0x5e3c10={'pcxPZ':function(_0x3075ea){return _0x3075ea();},'RUXge':function(_0x14b82d,_0x1d44ee){return _0x14b82d(_0x1d44ee);},'EvhCa':'existing_token','JKwJh':function(_0x44618b){return _0x44618b();},'vNlXe':function(_0x2778ae,_0x1e5837){return _0x2778ae(_0x1e5837);},'rrSIw':'✓\x20Exported\x20credentials\x20for\x20CI','waHDs':'✓\x20Stored\x20credentials\x20locally'};if(!_0x52c6e9){const _0x50587c=await _0x5e3c10['pcxPZ'](getToken);if(_0x50587c){const _0x426755=await _0x5e3c10[_0x5c935f(0x165)](getCurrentUser,_0x50587c);if(_0x426755['success'])return console['log'](_0x5c935f(0x1ac)+_0x426755['user']['organizationName']),{'token':_0x50587c,'method':_0x5e3c10[_0x5c935f(0x17c)]};}try{_0x52c6e9=await _0x5e3c10['JKwJh'](runDeviceAuthFlow);}catch(_0x4f67c3){throw new Error('Authentication\x20failed:\x20'+(_0x4f67c3 instanceof Error?_0x4f67c3[_0x5c935f(0x15c)]:_0x4f67c3));}const _0x3580d2=await getCurrentUser(_0x52c6e9);if(!_0x3580d2[_0x5c935f(0x17f)])throw new Error(_0x5c935f(0x1b5)+_0x3580d2[_0x5c935f(0x1a8)]);return console['log'](_0x5c935f(0x164)+_0x3580d2[_0x5c935f(0x18c)][_0x5c935f(0x15d)]),{'token':_0x52c6e9,'method':'device_auth'};}console[_0x5c935f(0x159)](_0x5c935f(0x19a));const _0x51bd90=await _0x5e3c10[_0x5c935f(0x165)](getCurrentUser,_0x52c6e9);if(!_0x51bd90['success']){if(_0x51bd90[_0x5c935f(0x167)])throw new Error(_0x5c935f(0x1c1)+_0x51bd90['error']+'.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.');else throw new Error('Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20'+_0x51bd90[_0x5c935f(0x1a8)]+'.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.');}return console[_0x5c935f(0x159)]('✓\x20Authenticated\x20to\x20'+_0x51bd90[_0x5c935f(0x18c)]['organizationName']),await _0x5e3c10[_0x5c935f(0x1c4)](storeToken,_0x52c6e9),console[_0x5c935f(0x159)](process[_0x5c935f(0x1b7)]['GITHUB_ENV']?_0x5e3c10['rrSIw']:_0x5e3c10[_0x5c935f(0x1aa)]),{'token':_0x52c6e9,'method':_0x5c935f(0x191)};}export async function ensureRangerDir(){const _0x2b331b=_0x32c762,_0x3f2290={'mOnta':function(_0x68aae6){return _0x68aae6();},'schmg':_0x2b331b(0x198),'GAWTK':function(_0x1b74c2,_0x168745,_0x5a6932){return _0x1b74c2(_0x168745,_0x5a6932);}},_0x1fb9b0=_0x3f2290[_0x2b331b(0x1bb)](findGitRoot),_0x1e53f2=_0x1fb9b0?join(_0x1fb9b0,_0x3f2290[_0x2b331b(0x16a)]):_0x3f2290['mOnta'](getRangerDir);return!existsSync(_0x1e53f2)?(await _0x3f2290[_0x2b331b(0x173)](mkdir,_0x1e53f2,{'recursive':!![]}),console['log']('✓\x20Created\x20.ranger/\x20directory'),{'path':_0x1e53f2,'installed':!![]}):(console['log'](_0x2b331b(0x18b)),{'path':_0x1e53f2,'installed':![]});}export async function ensureChromium(){const _0x4033ad=_0x32c762,_0x539fcc={'rZeAe':function(_0x7775e4,_0x4aa9d5){return _0x7775e4(_0x4aa9d5);},'oKoHz':function(_0x2f64d7){return _0x2f64d7();},'qhkeC':'\x0aInstalling\x20Chromium\x20browser...\x0a','WOcTg':'\x0a❌\x20Failed\x20to\x20install\x20Chromium:','YTcLW':function(_0x23a1e1,_0x4a65c5){return _0x23a1e1 instanceof _0x4a65c5;},'uAfnh':_0x4033ad(0x161),'jnbxs':'You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:'};let _0x1065ca=![];try{const _0x57f457=chromium[_0x4033ad(0x189)]();_0x1065ca=_0x539fcc[_0x4033ad(0x1ab)](existsSync,_0x57f457);}catch{_0x1065ca=![];}if(_0x1065ca)return console[_0x4033ad(0x159)](_0x4033ad(0x16d)),![];const _0x294340=_0x539fcc['oKoHz'](getPlaywrightVersion),_0x159a05=_0x294340??PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION,_0x4e937a=!_0x294340,_0x48876d=process['stdin'][_0x4033ad(0x17b)]&&process['stdout']['isTTY'];let _0x4fd716=!![];if(_0x48876d){const {install:_0x3d76ab}=await _0x5c082e['prompt']([{'type':_0x4033ad(0x15b),'name':_0x4033ad(0x15f),'message':_0x4e937a?_0x4033ad(0x1b3)+_0x159a05+_0x4033ad(0x196):_0x4033ad(0x171)+_0x159a05+')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','default':!![]}]);_0x4fd716=_0x3d76ab;}else console[_0x4033ad(0x159)](_0x4033ad(0x1a5)+_0x159a05+(_0x4e937a?'\x20(fallback\x20version)':'')+'...');if(_0x4fd716){console[_0x4033ad(0x159)](_0x539fcc['qhkeC']);try{await _0x539fcc[_0x4033ad(0x1ab)](installChromiumBinary,_0x159a05),console[_0x4033ad(0x159)]('\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully');}catch(_0x13564a){console['error'](_0x539fcc[_0x4033ad(0x181)],_0x539fcc[_0x4033ad(0x19f)](_0x13564a,Error)?_0x13564a[_0x4033ad(0x15c)]:_0x13564a),console[_0x4033ad(0x159)](_0x539fcc['uAfnh']),console['log']('\x20\x20npx\x20playwright@'+_0x159a05+_0x4033ad(0x190));}}else console[_0x4033ad(0x159)](_0x4033ad(0x187)),console['log'](_0x539fcc[_0x4033ad(0x188)]),console[_0x4033ad(0x159)]('\x20\x20npx\x20playwright@'+_0x159a05+'\x20install\x20chromium');return!![];}export async function writeRangerGitignore(_0x3d0c10){const _0x7b366e=_0x32c762,_0x163382={'FvGGR':function(_0x3d2f4b,_0x349af9,_0x5656b3){return _0x3d2f4b(_0x349af9,_0x5656b3);}},_0x22a5ff=_0x163382['FvGGR'](join,_0x3d0c10,'.gitignore'),_0x22ff8a='\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(_0x22a5ff,_0x22ff8a),console[_0x7b366e(0x159)](_0x7b366e(0x186));}function printProfileSetupLaterInstructions(){const _0x34317b=_0x32c762,_0x3eb2b4={'aYQSs':'\x0aIn\x20order\x20for\x20Ranger\x20to\x20verify\x20your\x20work,\x20you\x27ll\x20need\x20to\x20set\x20up\x20a\x20profile\x20later\x20with:','cfvek':function(_0x4e398d,_0x5e1fb5){return _0x4e398d(_0x5e1fb5);},'MYFHW':_0x34317b(0x1b6),'ivWGD':_0x34317b(0x174)};console['log'](_0x3eb2b4[_0x34317b(0x1b8)]),console[_0x34317b(0x159)]('\x20\x20'+_0x3eb2b4[_0x34317b(0x1b1)](bold,_0x3eb2b4['MYFHW'])),console['log'](_0x3eb2b4['ivWGD']);}async function ensureLocalEnv(_0x7ab1d9,_0x5a07cc){const _0x6eebdf=_0x32c762,_0x2937a5={'Tzwfx':function(_0x1eddd3,_0x4a3f25,_0xd5de7d){return _0x1eddd3(_0x4a3f25,_0xd5de7d);},'ZQaHw':_0x6eebdf(0x1bd),'sPEqS':_0x6eebdf(0x1ad),'eiQXI':'to\x20access\x20your\x20app.\x20If\x20the\x20part\x20of\x20your\x20app\x20you\x20want\x20to\x20test\x20is\x20behind','kUvna':'auth,\x20you\x20can\x20log\x20in\x20and\x20we\x27ll\x20save\x20the\x20session\x20state\x20for\x20Ranger\x20to','yJQID':_0x6eebdf(0x166),'cjyPu':function(_0x5e05fe,_0x20fbd7,_0x24adb5,_0x5703cb){return _0x5e05fe(_0x20fbd7,_0x24adb5,_0x5703cb);}};if(!findGitRoot())return console[_0x6eebdf(0x159)]('⚠\x20No\x20git\x20repository\x20found.\x20Run\x20`ranger\x20profile\x20add\x20local`\x20from\x20your\x20project\x20directory.'),{'ready':![],'skipped':!![]};if(_0x2937a5['Tzwfx'](findExistingEnv,'local',{'locations':[_0x2937a5['ZQaHw']]}))return console['log']('✓\x20Local\x20profile\x20already\x20exists'),{'ready':!![],'skipped':![]};const _0x5496f0=process['stdin'][_0x6eebdf(0x17b)]&&process[_0x6eebdf(0x1a2)][_0x6eebdf(0x17b)];if(_0x5496f0&&!_0x7ab1d9?.[_0x6eebdf(0x192)]){console['log'](_0x2937a5[_0x6eebdf(0x184)]),console[_0x6eebdf(0x159)](_0x2937a5[_0x6eebdf(0x194)]),console[_0x6eebdf(0x159)](_0x2937a5[_0x6eebdf(0x158)]),console['log'](_0x6eebdf(0x1a1)),console[_0x6eebdf(0x159)](_0x6eebdf(0x1bf));const {wantsProfile:_0x5753e6}=await _0x5c082e['prompt']([{'type':_0x6eebdf(0x15b),'name':'wantsProfile','message':_0x2937a5['yJQID'],'default':!![]}]);if(!_0x5753e6)return printProfileSetupLaterInstructions(),{'ready':![],'skipped':!![]};}try{return await _0x2937a5['cjyPu'](addEnv,_0x6eebdf(0x1bd),{'url':_0x7ab1d9?.['url'],'force':_0x7ab1d9?.['force'],'allowInsecureLocalhost':_0x7ab1d9?.['allowInsecureLocalhost']},_0x5a07cc),{'ready':!![],'skipped':![]};}catch(_0x3e0844){return console['error'](_0x6eebdf(0x169),_0x3e0844 instanceof Error?_0x3e0844[_0x6eebdf(0x15c)]:_0x3e0844),printProfileSetupLaterInstructions(),{'ready':![],'skipped':![]};}}export async function start(_0x1b58ca,_0x490809,_0xb7c512){const _0x39eee9=_0x32c762,_0x4f460a={'CuKkf':'git_check','cVbJp':_0x39eee9(0x18a),'iexQd':_0x39eee9(0x185),'cFBxD':function(_0x5a6d8b,_0x12acd9){return _0x5a6d8b(_0x12acd9);},'ZJaEN':'auth','BosCt':function(_0x151bb8,_0x218ce4){return _0x151bb8(_0x218ce4);},'CGTSh':'chromium','hwKiH':'✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','NRdgm':'plugin','DaJCM':function(_0x3cc07e,_0x2e1819){return _0x3cc07e&&_0x2e1819;},'mKojz':_0x39eee9(0x1af),'aIObU':_0x39eee9(0x1c2),'CjOnP':function(_0x2012dc){return _0x2012dc();},'UQKdl':'opencode','XMDYK':function(_0x1788e1,_0x4a3436){return _0x1788e1 instanceof _0x4a3436;},'kvYdx':function(_0x3b5647,_0x35655c){return _0x3b5647(_0x35655c);},'wVYji':'Non-interactive\x20mode:\x20Skipping\x20profile\x20setup.\x20To\x20set\x20up\x20a\x20profile,\x20pass\x20--url\x20or\x20run\x20later:','unVhO':_0x39eee9(0x1b6),'nabeK':function(_0x54cbf4,_0x1cbb52,_0x99ba18){return _0x54cbf4(_0x1cbb52,_0x99ba18);},'FIRtt':_0x39eee9(0x1c7),'kSGlS':'and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','hiato':_0x39eee9(0x19e),'Xridm':function(_0xe01644,_0x177ef){return _0xe01644+_0x177ef;}};console[_0x39eee9(0x159)]('\x0a🚀\x20Ranger\x20Setup\x0a');const _0x32fda9=process['stdin'][_0x39eee9(0x17b)]&&process[_0x39eee9(0x1a2)][_0x39eee9(0x17b)];!_0x32fda9&&!_0x490809?.[_0x39eee9(0x16b)]&&(console[_0x39eee9(0x159)]('Non-interactive\x20mode:\x20No\x20--scope\x20provided,\x20defaulting\x20to\x20user.'),_0x490809={..._0x490809,'scope':'user'});_0xb7c512?.['trackPhaseStart'](_0x4f460a['CuKkf']);if(!findGitRoot()){await _0xb7c512?.[_0x39eee9(0x163)]('git_check',new Error(_0x4f460a['cVbJp']));throw new Error(_0x4f460a['iexQd']);}_0xb7c512?.['trackPhaseEnd'](_0x39eee9(0x193));const _0xd33075=!_0x4f460a[_0x39eee9(0x1c0)](existsSync,getRangerDir()),{path:_0x530597}=await ensureRangerDir();_0xb7c512?.[_0x39eee9(0x18f)](_0x4f460a['ZJaEN']);const _0x54e61b=await _0x4f460a['BosCt'](authenticate,_0x1b58ca);_0xb7c512?.['trackPhaseEnd'](_0x4f460a[_0x39eee9(0x1a6)],{'isFirstRun':_0xd33075,'method':_0x54e61b[_0x39eee9(0x1a7)]}),_0xb7c512?.[_0x39eee9(0x18f)](_0x4f460a['CGTSh']);_0x490809?.[_0x39eee9(0x1a0)]?console[_0x39eee9(0x159)](_0x4f460a['hwKiH']):await ensureChromium();_0xb7c512?.['trackPhaseEnd'](_0x4f460a[_0x39eee9(0x1a9)],{'isFirstRun':_0xd33075,'skipped':!!_0x490809?.['skipChromium']}),await writeRangerGitignore(_0x530597),console['log']('\x0a✅\x20Ranger\x20setup\x20complete!\x0a');const _0x386b13=_0x490809?.['scope'],_0x42ad09=_0x490809?.[_0x39eee9(0x1c5)]??![];let _0x3d9af5=null;_0x42ad09?(_0xb7c512?.[_0x39eee9(0x18f)](_0x4f460a[_0x39eee9(0x1bc)]),_0x3d9af5=await ensureOpencodePluginConfig(_0x386b13),_0xb7c512?.[_0x39eee9(0x179)](_0x4f460a[_0x39eee9(0x1bc)],{'isFirstRun':_0xd33075,'opencode':!![]})):(_0xb7c512?.['trackPhaseStart'](_0x39eee9(0x1b0)),await ensureClaudePlugin(_0x386b13),_0xb7c512?.[_0x39eee9(0x179)](_0x39eee9(0x1b0),{'isFirstRun':_0xd33075}));if(_0x4f460a[_0x39eee9(0x16c)](_0x42ad09,_0x3d9af5)){_0xb7c512?.['trackPhaseStart'](_0x4f460a['mKojz']);try{await installSkill(_0x4f460a[_0x39eee9(0x17e)],{'level':_0x3d9af5[_0x39eee9(0x16b)],'cliVersion':_0x4f460a[_0x39eee9(0x172)](getCurrentVersion),'platform':_0x4f460a[_0x39eee9(0x19b)]}),_0xb7c512?.[_0x39eee9(0x179)](_0x39eee9(0x1af),{'isFirstRun':_0xd33075,'opencode':!![]});}catch(_0x4b771e){console[_0x39eee9(0x1ba)]('\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:',_0x4f460a[_0x39eee9(0x1c6)](_0x4b771e,Error)?_0x4b771e['message']:_0x4b771e),_0xb7c512?.['trackPhaseEnd'](_0x39eee9(0x1af),{'isFirstRun':_0xd33075,'opencode':!![],'failed':!![]});}}else _0xb7c512?.['trackPhaseStart']('skills'),await _0x4f460a[_0x39eee9(0x175)](ensureClaudeSkills,_0x386b13),_0xb7c512?.[_0x39eee9(0x179)](_0x4f460a['mKojz'],{'isFirstRun':_0xd33075});if(!_0x32fda9&&!_0x490809?.['url'])console[_0x39eee9(0x159)](_0x4f460a['wVYji']),console[_0x39eee9(0x159)]('\x20\x20'+_0x4f460a['BosCt'](bold,_0x4f460a[_0x39eee9(0x17a)])+'\x0a');else{_0xb7c512?.[_0x39eee9(0x18f)]('profile');const _0x54c9ff=await _0x4f460a['nabeK'](ensureLocalEnv,{'url':_0x490809?.['url'],'force':_0x490809?.[_0x39eee9(0x1c3)],'allowInsecureLocalhost':_0x490809?.['allowInsecureLocalhost']},_0xb7c512);_0xb7c512?.[_0x39eee9(0x179)](_0x4f460a['FIRtt'],{'isFirstRun':_0xd33075,'profileReady':_0x54c9ff['ready'],'userSkipped':_0x54c9ff[_0x39eee9(0x17d)]}),_0x54c9ff[_0x39eee9(0x16e)]&&console[_0x39eee9(0x159)]('\x0a✅\x20You\x27re\x20ready\x20to\x20start\x20using\x20Ranger\x20Feature\x20Review.');}if(_0x42ad09)console['log']('\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)'),console['log'](_0x4f460a[_0x39eee9(0x177)]),console['log'](_0x4f460a[_0x39eee9(0x19d)]),console['log']('verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.');else{const _0x31f44b=_0x4f460a[_0x39eee9(0x175)](bold,'/ranger:enable');console[_0x39eee9(0x159)](_0x4f460a[_0x39eee9(0x1a3)](_0x4f460a['Xridm'](_0x39eee9(0x170)+_0x31f44b+_0x39eee9(0x176),'\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with')+'\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser',_0x39eee9(0x1be)));}}
|
|
1
|
+
const _0xa4df6f=_0x1ddf;(function(_0x399780,_0x3cf7c7){const _0x1bb421=_0x1ddf,_0x372f9f=_0x399780();while(!![]){try{const _0x57474d=parseInt(_0x1bb421(0xc0))/0x1+-parseInt(_0x1bb421(0x80))/0x2*(-parseInt(_0x1bb421(0x89))/0x3)+parseInt(_0x1bb421(0xcf))/0x4+parseInt(_0x1bb421(0xbd))/0x5*(-parseInt(_0x1bb421(0x98))/0x6)+-parseInt(_0x1bb421(0xc6))/0x7*(parseInt(_0x1bb421(0xc7))/0x8)+-parseInt(_0x1bb421(0x8e))/0x9+parseInt(_0x1bb421(0x8a))/0xa;if(_0x57474d===_0x3cf7c7)break;else _0x372f9f['push'](_0x372f9f['shift']());}catch(_0x55142d){_0x372f9f['push'](_0x372f9f['shift']());}}}(_0x2520,0xcd71e));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x2eb4b6 from'inquirer';import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';import{chromium}from'playwright';import{addEnv}from'./addEnv.js';function _0x2520(){const _0x32e16b=['8195HYxePA','chromium','⚠\x20No\x20git\x20repository\x20found.\x20Run\x20`ranger\x20profile\x20add\x20local`\x20from\x20your\x20project\x20directory.','600359XBGnjL','git_check','iTKnc','Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20','provided_token','GvcEo','324436cEfAUT','104SWDntM','error','cNHqd','\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','url','/ranger:enable','organizationName','use\x20until\x20the\x20session\x20expires.\x0a','6673828BvfooC','stdout','NdCgi','GEGfF','kSPSJ','CzqiE','ready','platform','eLsIo','ranger\x20profile\x20add\x20local','qWwpg','SjZMK','jSWzG','QDDbz','confirm','trackPhaseStart','Lqbon','\x20(fallback\x20version)','allowInsecureLocalhost','skills','Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20','✓\x20Playwright\x20Chromium\x20browser\x20found','existing_token','to\x20access\x20your\x20app.\x20If\x20the\x20part\x20of\x20your\x20app\x20you\x20want\x20to\x20test\x20is\x20behind','XZbLZ','with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','OGSFX','2uKzizs','\x20install\x20chromium','jifWn','skipChromium','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','\x0aA\x20profile\x20gives\x20Ranger\x27s\x20browser\x20agent\x20information\x20about\x20how','\x0a✅\x20Ranger\x20setup\x20complete!\x0a','trackPhaseEnd','\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','337467wGfgjr','9446490jAyplV','\x1b[1m','plugin','stdin','1906083NwHvSr','profile','install','GITHUB_ENV','resolve','prompt','fwmIg','log','\x20now?','fAKzJ','6114bcDzlu','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','\x0aIn\x20Claude\x20Code,\x20run\x20','You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','You\x27ll\x20need\x20the\x20app\x20to\x20be\x20running\x20to\x20set\x20up\x20the\x20profile.','executablePath','verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','isTTY',')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','vfCER','and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','VRlBJ','GFQws','abnyk','JEvSE','\x20\x20npx\x20playwright@','success','TPhXp','message','vOQaJ','tzkHb','vYQpS','OShco','The\x20required\x20version\x20(','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','status','inherit','opencode','Make\x20sure\x20your\x20app\x20is\x20running\x20before\x20you\x20start.\x0a','cTnIv','playwright/package.json','aoGFc','env','user','JnEGZ','BzqJY','✓\x20.ranger/\x20directory\x20already\x20exists'];_0x2520=function(){return _0x32e16b;};return _0x2520();}import{getRangerDir,findGitRoot}from'./utils/rangerRoot.js';import{runDeviceAuthFlow}from'./utils/deviceAuth.js';function _0x1ddf(_0x3d4de1,_0x50676f){_0x3d4de1=_0x3d4de1-0x75;const _0x252013=_0x2520();let _0x1ddfcc=_0x252013[_0x3d4de1];return _0x1ddfcc;}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),PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION='1.58.2',bold=_0x297966=>_0xa4df6f(0x8b)+_0x297966+'\x1b[0m';function getPlaywrightVersion(){const _0x4177a5=_0xa4df6f,_0x221cb2={'pwKts':function(_0x2d5c51,_0x23d133){return _0x2d5c51(_0x23d133);}};try{const _0x35eb2a=require[_0x4177a5(0x92)](_0x4177a5(0xb6)),_0x54a81e=_0x221cb2['pwKts'](require,_0x35eb2a);return _0x54a81e['version'];}catch{return null;}}function installChromiumBinary(_0x4c6207){const _0x427fa3=_0xa4df6f,_0x656d5={'jSWzG':function(_0x45cd0e){return _0x45cd0e();},'wlGcj':_0x427fa3(0x90),'vYQpS':'close'};return new Promise((_0x32114a,_0x5d14fc)=>{const _0x44f05a=_0x427fa3,_0x20a563=['playwright@'+_0x4c6207,_0x656d5['wlGcj'],'chromium'],_0x4b4a0a=spawn('npx',_0x20a563,{'stdio':_0x44f05a(0xb2),'shell':process[_0x44f05a(0xd6)]==='win32'});_0x4b4a0a['on'](_0x656d5[_0x44f05a(0xad)],_0x5130f4=>{const _0x238ced=_0x44f05a;_0x5130f4===0x0?_0x656d5[_0x238ced(0xdb)](_0x32114a):_0x5d14fc(new Error('Installation\x20failed\x20with\x20exit\x20code\x20'+_0x5130f4));}),_0x4b4a0a['on'](_0x44f05a(0xc8),_0x11d4a2=>{_0x5d14fc(_0x11d4a2);});});}export async function authenticate(_0x36f050){const _0x4169ad=_0xa4df6f,_0x3a3af5={'MTpgi':_0x4169ad(0x7b),'bwrwv':function(_0x5b3899,_0x2b61f8){return _0x5b3899 instanceof _0x2b61f8;},'qWwpg':function(_0x2fa7b9,_0x1eb997){return _0x2fa7b9(_0x1eb997);},'JEvSE':'device_auth','VRlBJ':'Validating\x20API\x20token...','tzkHb':'✓\x20Exported\x20credentials\x20for\x20CI','Lqbon':'✓\x20Stored\x20credentials\x20locally','FGzUh':_0x4169ad(0xc4)};if(!_0x36f050){const _0x25fa44=await getToken();if(_0x25fa44){const _0x429f62=await getCurrentUser(_0x25fa44);if(_0x429f62[_0x4169ad(0xa8)])return console[_0x4169ad(0x95)]('✓\x20Already\x20authenticated\x20to\x20'+_0x429f62[_0x4169ad(0xb9)][_0x4169ad(0xcd)]),{'token':_0x25fa44,'method':_0x3a3af5['MTpgi']};}try{_0x36f050=await runDeviceAuthFlow();}catch(_0x40ac55){throw new Error('Authentication\x20failed:\x20'+(_0x3a3af5['bwrwv'](_0x40ac55,Error)?_0x40ac55['message']:_0x40ac55));}const _0x1f1ee2=await _0x3a3af5[_0x4169ad(0xd9)](getCurrentUser,_0x36f050);if(!_0x1f1ee2[_0x4169ad(0xa8)])throw new Error(_0x4169ad(0xc3)+_0x1f1ee2[_0x4169ad(0xc8)]);return console[_0x4169ad(0x95)]('✓\x20Authenticated\x20to\x20'+_0x1f1ee2[_0x4169ad(0xb9)]['organizationName']),{'token':_0x36f050,'method':_0x3a3af5[_0x4169ad(0xa6)]};}console[_0x4169ad(0x95)](_0x3a3af5[_0x4169ad(0xa3)]);const _0x4afcce=await getCurrentUser(_0x36f050);if(!_0x4afcce[_0x4169ad(0xa8)]){if(_0x4afcce[_0x4169ad(0xb1)])throw new Error('Authentication\x20failed:\x20'+_0x4afcce['error']+_0x4169ad(0x84));else throw new Error('Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20'+_0x4afcce['error']+'.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.');}return console['log']('✓\x20Authenticated\x20to\x20'+_0x4afcce[_0x4169ad(0xb9)]['organizationName']),await storeToken(_0x36f050),console[_0x4169ad(0x95)](process[_0x4169ad(0xb8)][_0x4169ad(0x91)]?_0x3a3af5[_0x4169ad(0xac)]:_0x3a3af5[_0x4169ad(0x75)]),{'token':_0x36f050,'method':_0x3a3af5['FGzUh']};}export async function ensureRangerDir(){const _0x502c97=_0xa4df6f,_0x3ae5e3={'cTnIv':function(_0x594968){return _0x594968();},'jifWn':function(_0x3fb49d,_0x4980c9,_0x19f097){return _0x3fb49d(_0x4980c9,_0x19f097);},'TPhXp':function(_0x37df93,_0x4de62d){return _0x37df93(_0x4de62d);},'iTKnc':_0x502c97(0xbc)},_0x4e169a=_0x3ae5e3[_0x502c97(0xb5)](findGitRoot),_0x369e77=_0x4e169a?_0x3ae5e3[_0x502c97(0x82)](join,_0x4e169a,'.ranger'):getRangerDir();return!_0x3ae5e3[_0x502c97(0xa9)](existsSync,_0x369e77)?(await mkdir(_0x369e77,{'recursive':!![]}),console[_0x502c97(0x95)]('✓\x20Created\x20.ranger/\x20directory'),{'path':_0x369e77,'installed':!![]}):(console['log'](_0x3ae5e3[_0x502c97(0xc2)]),{'path':_0x369e77,'installed':![]});}export async function ensureChromium(){const _0x5a2341=_0xa4df6f,_0x52b270={'OShco':function(_0x44c4cb,_0x24690e){return _0x44c4cb(_0x24690e);},'mLmIn':_0x5a2341(0x7a),'fDyXa':function(_0x4b42eb){return _0x4b42eb();},'SjZMK':'confirm','ODWcz':'install','BSfct':'\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','CkVcA':'\x0a❌\x20Failed\x20to\x20install\x20Chromium:','jWQIR':'You\x20can\x20install\x20it\x20manually\x20by\x20running:','ZZelO':'\x0a⚠\x20Skipping\x20Chromium\x20installation.'};let _0x332ea5=![];try{const _0x71f0c6=chromium[_0x5a2341(0x9d)]();_0x332ea5=_0x52b270[_0x5a2341(0xae)](existsSync,_0x71f0c6);}catch{_0x332ea5=![];}if(_0x332ea5)return console['log'](_0x52b270['mLmIn']),![];const _0x33954d=_0x52b270['fDyXa'](getPlaywrightVersion),_0x2590fe=_0x33954d??PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION,_0x14aab8=!_0x33954d,_0x1a6ea4=process[_0x5a2341(0x8d)]['isTTY']&&process[_0x5a2341(0xd0)]['isTTY'];let _0x3495ad=!![];if(_0x1a6ea4){const {install:_0x215639}=await _0x2eb4b6[_0x5a2341(0x93)]([{'type':_0x52b270[_0x5a2341(0xda)],'name':_0x52b270['ODWcz'],'message':_0x14aab8?_0x5a2341(0x79)+_0x2590fe+_0x5a2341(0x96):_0x5a2341(0xaf)+_0x2590fe+_0x5a2341(0xa0),'default':!![]}]);_0x3495ad=_0x215639;}else console['log']('\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20'+_0x2590fe+(_0x14aab8?_0x5a2341(0x76):'')+'...');if(_0x3495ad){console[_0x5a2341(0x95)]('\x0aInstalling\x20Chromium\x20browser...\x0a');try{await installChromiumBinary(_0x2590fe),console[_0x5a2341(0x95)](_0x52b270['BSfct']);}catch(_0x2e2474){console['error'](_0x52b270['CkVcA'],_0x2e2474 instanceof Error?_0x2e2474[_0x5a2341(0xaa)]:_0x2e2474),console[_0x5a2341(0x95)](_0x52b270['jWQIR']),console['log'](_0x5a2341(0xa7)+_0x2590fe+_0x5a2341(0x81));}}else console['log'](_0x52b270['ZZelO']),console['log'](_0x5a2341(0x9b)),console[_0x5a2341(0x95)]('\x20\x20npx\x20playwright@'+_0x2590fe+'\x20install\x20chromium');return!![];}export async function writeRangerGitignore(_0x5e9dd7){const _0x189f83=_0xa4df6f,_0x1b1007={'JPfng':'.gitignore','CzqiE':function(_0x38393b,_0x186232,_0x3594f2){return _0x38393b(_0x186232,_0x3594f2);}},_0x2de7e0=join(_0x5e9dd7,_0x1b1007['JPfng']),_0x675561=_0x189f83(0xca);await _0x1b1007[_0x189f83(0xd4)](writeFile,_0x2de7e0,_0x675561),console[_0x189f83(0x95)]('✓\x20Created\x20.ranger/.gitignore');}function printProfileSetupLaterInstructions(){const _0x20ecd5=_0xa4df6f,_0x429b46={'GEGfF':_0x20ecd5(0xd8),'kSPSJ':_0x20ecd5(0xb4)};console[_0x20ecd5(0x95)]('\x0aIn\x20order\x20for\x20Ranger\x20to\x20verify\x20your\x20work,\x20you\x27ll\x20need\x20to\x20set\x20up\x20a\x20profile\x20later\x20with:'),console[_0x20ecd5(0x95)]('\x20\x20'+bold(_0x429b46[_0x20ecd5(0xd2)])),console['log'](_0x429b46[_0x20ecd5(0xd3)]);}async function ensureLocalEnv(_0x3fa2ef,_0x11a7b0){const _0x2a5f51=_0xa4df6f,_0x38e9c3={'petHH':_0x2a5f51(0xbf),'mPpBy':function(_0x27f17e,_0x4d275c,_0x10159d){return _0x27f17e(_0x4d275c,_0x10159d);},'fAKzJ':'local','jZLRp':_0x2a5f51(0x85),'eLsIo':'auth,\x20you\x20can\x20log\x20in\x20and\x20we\x27ll\x20save\x20the\x20session\x20state\x20for\x20Ranger\x20to','GvcEo':_0x2a5f51(0x9c),'cNHqd':_0x2a5f51(0xdd),'NdCgi':'wantsProfile','tnrcp':function(_0x5e4b7e,_0x5980cd,_0x3ce7ab,_0x59700f){return _0x5e4b7e(_0x5980cd,_0x3ce7ab,_0x59700f);},'GFQws':'\x0a❌\x20Profile\x20setup\x20failed:','vOQaJ':function(_0x1fc813){return _0x1fc813();}};if(!findGitRoot())return console['log'](_0x38e9c3['petHH']),{'ready':![],'skipped':!![]};if(_0x38e9c3['mPpBy'](findExistingEnv,_0x38e9c3['fAKzJ'],{'locations':[_0x38e9c3[_0x2a5f51(0x97)]]}))return console[_0x2a5f51(0x95)]('✓\x20Local\x20profile\x20already\x20exists'),{'ready':!![],'skipped':![]};const _0x364bab=process[_0x2a5f51(0x8d)]['isTTY']&&process[_0x2a5f51(0xd0)]['isTTY'];if(_0x364bab&&!_0x3fa2ef?.['url']){console[_0x2a5f51(0x95)](_0x38e9c3['jZLRp']),console['log'](_0x2a5f51(0x7c)),console[_0x2a5f51(0x95)](_0x38e9c3[_0x2a5f51(0xd7)]),console['log'](_0x2a5f51(0xce)),console[_0x2a5f51(0x95)](_0x38e9c3[_0x2a5f51(0xc5)]);const {wantsProfile:_0x319757}=await _0x2eb4b6['prompt']([{'type':_0x38e9c3[_0x2a5f51(0xc9)],'name':_0x38e9c3[_0x2a5f51(0xd1)],'message':'Would\x20you\x20like\x20to\x20set\x20up\x20the\x20profile\x20now?','default':!![]}]);if(!_0x319757)return printProfileSetupLaterInstructions(),{'ready':![],'skipped':!![]};}try{return await _0x38e9c3['tnrcp'](addEnv,'local',{'url':_0x3fa2ef?.['url'],'force':_0x3fa2ef?.['force'],'allowInsecureLocalhost':_0x3fa2ef?.[_0x2a5f51(0x77)]},_0x11a7b0),{'ready':!![],'skipped':![]};}catch(_0x37da4d){return console['error'](_0x38e9c3[_0x2a5f51(0xa4)],_0x37da4d instanceof Error?_0x37da4d['message']:_0x37da4d),_0x38e9c3[_0x2a5f51(0xab)](printProfileSetupLaterInstructions),{'ready':![],'skipped':![]};}}export async function start(_0x2d5575,_0x1b6e6e,_0x35359a){const _0x20e98d=_0xa4df6f,_0x399bd1={'XZbLZ':'\x0a🚀\x20Ranger\x20Setup\x0a','xXfIw':'Non-interactive\x20mode:\x20No\x20--scope\x20provided,\x20defaulting\x20to\x20user.','abnyk':_0x20e98d(0xb9),'aoGFc':_0x20e98d(0xc1),'rOfzE':function(_0x79272c){return _0x79272c();},'OGSFX':function(_0x3c6613,_0x33922c){return _0x3c6613(_0x33922c);},'oShyx':'auth','nQFXJ':'chromium','fwmIg':_0x20e98d(0x86),'BzqJY':_0x20e98d(0x8c),'eBcDP':function(_0x5d7ac5,_0x1fa50f){return _0x5d7ac5(_0x1fa50f);},'VGXxF':'skills','uUQSP':function(_0x52109d,_0x188c9e,_0x37d261){return _0x52109d(_0x188c9e,_0x37d261);},'BkbPE':function(_0x211779,_0x36a1c5){return _0x211779(_0x36a1c5);},'QDDbz':'Non-interactive\x20mode:\x20Skipping\x20profile\x20setup.\x20To\x20set\x20up\x20a\x20profile,\x20pass\x20--url\x20or\x20run\x20later:','vfCER':_0x20e98d(0x88),'ojPaB':_0x20e98d(0x9e),'JnEGZ':_0x20e98d(0xcc),'WOrou':function(_0x4fd207,_0x505011){return _0x4fd207+_0x505011;}};console[_0x20e98d(0x95)](_0x399bd1[_0x20e98d(0x7d)]);const _0x2520e3=process[_0x20e98d(0x8d)]['isTTY']&&process['stdout'][_0x20e98d(0x9f)];!_0x2520e3&&!_0x1b6e6e?.['scope']&&(console['log'](_0x399bd1['xXfIw']),_0x1b6e6e={..._0x1b6e6e,'scope':_0x399bd1[_0x20e98d(0xa5)]});_0x35359a?.[_0x20e98d(0xde)]('git_check');if(!findGitRoot()){await _0x35359a?.['trackPhaseError']('git_check',new Error('No\x20git\x20repository\x20found'));throw new Error('No\x20git\x20repository\x20found.\x20Please\x20run\x20`ranger\x20setup`\x20from\x20inside\x20your\x20project\x20directory.');}_0x35359a?.['trackPhaseEnd'](_0x399bd1[_0x20e98d(0xb7)]);const _0xc68a23=!existsSync(_0x399bd1['rOfzE'](getRangerDir)),{path:_0x47879b}=await ensureRangerDir();_0x35359a?.[_0x20e98d(0xde)]('auth');const _0x2cb24a=await _0x399bd1[_0x20e98d(0x7f)](authenticate,_0x2d5575);_0x35359a?.['trackPhaseEnd'](_0x399bd1['oShyx'],{'isFirstRun':_0xc68a23,'method':_0x2cb24a['method']}),_0x35359a?.['trackPhaseStart'](_0x399bd1['nQFXJ']);_0x1b6e6e?.[_0x20e98d(0x83)]?console[_0x20e98d(0x95)](_0x20e98d(0xb0)):await ensureChromium();_0x35359a?.['trackPhaseEnd'](_0x20e98d(0xbe),{'isFirstRun':_0xc68a23,'skipped':!!_0x1b6e6e?.['skipChromium']}),await writeRangerGitignore(_0x47879b),console[_0x20e98d(0x95)](_0x399bd1[_0x20e98d(0x94)]);const _0x15a8ba=_0x1b6e6e?.['scope'],_0x49f201=_0x1b6e6e?.[_0x20e98d(0xb3)]??![];let _0x4e2e63=null;_0x49f201?(_0x35359a?.[_0x20e98d(0xde)](_0x399bd1[_0x20e98d(0xbb)]),_0x4e2e63=await _0x399bd1['eBcDP'](ensureOpencodePluginConfig,_0x15a8ba),_0x35359a?.[_0x20e98d(0x87)]('plugin',{'isFirstRun':_0xc68a23,'opencode':!![]})):(_0x35359a?.['trackPhaseStart'](_0x399bd1[_0x20e98d(0xbb)]),await ensureClaudePlugin(_0x15a8ba),_0x35359a?.['trackPhaseEnd'](_0x20e98d(0x8c),{'isFirstRun':_0xc68a23}));if(_0x49f201&&_0x4e2e63){_0x35359a?.['trackPhaseStart'](_0x399bd1['VGXxF']);try{await _0x399bd1['uUQSP'](installSkill,'ranger',{'level':_0x4e2e63['scope'],'cliVersion':getCurrentVersion(),'platform':'opencode'}),_0x35359a?.[_0x20e98d(0x87)](_0x20e98d(0x78),{'isFirstRun':_0xc68a23,'opencode':!![]});}catch(_0x76b346){console['warn']('\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:',_0x76b346 instanceof Error?_0x76b346[_0x20e98d(0xaa)]:_0x76b346),_0x35359a?.[_0x20e98d(0x87)]('skills',{'isFirstRun':_0xc68a23,'opencode':!![],'failed':!![]});}}else _0x35359a?.['trackPhaseStart'](_0x20e98d(0x78)),await _0x399bd1['BkbPE'](ensureClaudeSkills,_0x15a8ba),_0x35359a?.['trackPhaseEnd'](_0x20e98d(0x78),{'isFirstRun':_0xc68a23});if(!_0x2520e3&&!_0x1b6e6e?.['url'])console['log'](_0x399bd1[_0x20e98d(0xdc)]),console[_0x20e98d(0x95)]('\x20\x20'+_0x399bd1['eBcDP'](bold,_0x20e98d(0xd8))+'\x0a');else{_0x35359a?.['trackPhaseStart']('profile');const _0x2c4b1f=await ensureLocalEnv({'url':_0x1b6e6e?.[_0x20e98d(0xcb)],'force':_0x1b6e6e?.['force'],'allowInsecureLocalhost':_0x1b6e6e?.[_0x20e98d(0x77)]},_0x35359a);_0x35359a?.['trackPhaseEnd'](_0x20e98d(0x8f),{'isFirstRun':_0xc68a23,'profileReady':_0x2c4b1f[_0x20e98d(0xd5)],'userSkipped':_0x2c4b1f['skipped']}),_0x2c4b1f['ready']&&console['log']('\x0a✅\x20You\x27re\x20ready\x20to\x20start\x20using\x20Ranger\x20Feature\x20Review.');}if(_0x49f201)console['log'](_0x399bd1[_0x20e98d(0xa1)]),console[_0x20e98d(0x95)](_0x20e98d(0xa2)),console[_0x20e98d(0x95)](_0x20e98d(0x7e)),console['log'](_0x399bd1['ojPaB']);else{const _0x33a07b=bold(_0x399bd1[_0x20e98d(0xba)]);console['log'](_0x399bd1['WOrou'](_0x20e98d(0x9a)+_0x33a07b+'\x20and\x20prompt\x20the\x20coding'+'\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser')+_0x20e98d(0x99));}}
|
package/build/commands/status.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x198f8c=_0x27eb;(function(_0x4f25aa,_0x202f8d){const _0x3eb397=_0x27eb,_0xe5bac7=_0x4f25aa();while(!![]){try{const _0x5f0550=-parseInt(_0x3eb397(0x1df))/0x1*(-parseInt(_0x3eb397(0x1b3))/0x2)+-parseInt(_0x3eb397(0x1b4))/0x3*(-parseInt(_0x3eb397(0x1ae))/0x4)+parseInt(_0x3eb397(0x1e1))/0x5+parseInt(_0x3eb397(0x1e9))/0x6+parseInt(_0x3eb397(0x20b))/0x7+-parseInt(_0x3eb397(0x1ee))/0x8*(parseInt(_0x3eb397(0x1c9))/0x9)+-parseInt(_0x3eb397(0x1fc))/0xa;if(_0x5f0550===_0x202f8d)break;else _0xe5bac7['push'](_0xe5bac7['shift']());}catch(_0x1b0857){_0xe5bac7['push'](_0xe5bac7['shift']());}}}(_0x5771,0x5229a));function _0x5771(){const _0x48d478=['ignore','ipfmG','faxsd','success','JIARY','parse','grRsr','not_installed','(not\x20found)','DtPZH','18waXvjP','eomYB','\x20\x20\x20\x20Auth:\x20','Version:\x20','@ranger-testing/opencode-plugin','uvYyb','LwTDu','\x20plugin(s)\x20configured','fmzmt','\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a','Root:\x20','\x0a📊\x20Ranger\x20Status\x0a','organizationName','\x1b[1m','displayName','name','ElUfc','configured','match','details','tatvh','stdout','285385rUWMiS','bmgIp','1285065weqsNv','\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','plaintext','ptdNW','\x1b]8;;\x07','vrBdB','debug','hnPtk','1082520fXQbmO','isArray','nammQ','gkFrS','\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>','1709032UwkGtQ','log','\x20\x20Not\x20installed','wmuTO','No\x20skills\x20installed','nSdrf','close','qUILt','Ruhki','ranger@trailhead','\x20(latest:\x20','pPlDX','duDNU','NskpG','6590800NQxGQE','aSHlJ','wNpCT','wgOwL','\x0a\x20\x20No\x20active\x20profile\x20set','No\x20profiles\x20configured',':\x20configured','iDdqj','config','string','data','iIsjy','wDreH','not_configured','API\x20Token:\x20✗\x20Not\x20found','2074716NyjiBs','elSfI','path','\x20\x20User-level:','pipe','\x0a---\x20Profiles\x20---','\x20\x20\x20\x20','ylJsV','enabled','\x1b[0m','filter','version','plugin','hasPlaintextAuth','OEGnz','GBfwh','kFgCP','161468iNRNkr','length','settings.json','opencode-plugin','settingsPath','2zTErMy','30pwXejS','sLVTj','isActive','jroNs','includes','status','jXVuH','opencode','auth.json','iZyWe','\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20'];_0x5771=function(){return _0x48d478;};return _0x5771();}import{readFile,readdir}from'fs/promises';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';function _0x27eb(_0x5f3449,_0x351ee6){_0x5f3449=_0x5f3449-0x1a5;const _0x577111=_0x5771();let _0x27eb39=_0x577111[_0x5f3449];return _0x27eb39;}const bold=_0x551deb=>_0x198f8c(0x1d6)+_0x551deb+_0x198f8c(0x1a6),link=(_0x3f4a77,_0x5842ec)=>'\x1b]8;;file://'+_0x3f4a77+'\x07'+(_0x5842ec||_0x3f4a77)+_0x198f8c(0x1e5);async function getOpencodePluginStatus(){const _0x4f5834=_0x198f8c,_0x5a58de={'RECHK':_0x4f5834(0x1c6),'GBfwh':function(_0xee877b,_0x3d5c9c){return _0xee877b(_0x3d5c9c);},'wmuTO':'not_configured','HYAZr':_0x4f5834(0x205),'jroNs':_0x4f5834(0x1b1),'elSfI':_0x4f5834(0x1bb),'ozulb':_0x4f5834(0x1e7),'SkxRG':_0x4f5834(0x1bf),'wNpCT':_0x4f5834(0x20f)};return new Promise(_0x85ee39=>{const _0x1a71f1=_0x4f5834,_0x175645={'FTrqv':_0x5a58de['HYAZr'],'iDdqj':_0x5a58de[_0x1a71f1(0x1b7)]},_0x232152=spawn(_0x5a58de[_0x1a71f1(0x20c)],[_0x5a58de['ozulb'],_0x1a71f1(0x204)],{'stdio':[_0x5a58de['SkxRG'],_0x5a58de[_0x1a71f1(0x1fe)],_0x1a71f1(0x20f)]});let _0x114fd9='';_0x232152[_0x1a71f1(0x1de)]?.['on'](_0x1a71f1(0x206),_0x19430c=>{_0x114fd9+=_0x19430c['toString']();}),_0x232152['stderr']?.['on'](_0x1a71f1(0x206),_0x226be7=>{_0x114fd9+=_0x226be7['toString']();}),_0x232152['on']('error',()=>{_0x85ee39({'status':'not_installed'});}),_0x232152['on'](_0x1a71f1(0x1f4),_0x4acb5d=>{const _0x4915ab=_0x1a71f1;if(_0x4acb5d!==0x0){_0x85ee39({'status':_0x5a58de['RECHK']});return;}const _0x9b10a2=_0x114fd9['trim']();let _0x337018=null;if(_0x9b10a2)try{_0x337018=JSON['parse'](_0x9b10a2);}catch{const _0x16353f=_0x9b10a2[_0x4915ab(0x1db)](/\{[\s\S]*\}$/);if(_0x16353f)try{_0x337018=JSON[_0x4915ab(0x1c4)](_0x16353f[0x0]);}catch{_0x337018=null;}}const _0x210dfb=Array[_0x4915ab(0x1ea)](_0x337018?.[_0x4915ab(0x1a9)])?_0x337018?.['plugin']:[],_0x1f7315=_0x210dfb['some'](_0x2177b7=>{const _0x51eeb8=_0x4915ab;if(typeof _0x2177b7!==_0x175645['FTrqv'])return![];return _0x2177b7[_0x51eeb8(0x1b8)]('@ranger-testing/opencode-plugin')||_0x2177b7['includes'](_0x175645[_0x51eeb8(0x203)]);});if(_0x1f7315){_0x85ee39({'status':_0x4915ab(0x1da),'details':_0x210dfb['length']>0x0?_0x210dfb['length']+_0x4915ab(0x1d0):undefined});return;}if(_0x210dfb['length']>0x0){_0x5a58de['GBfwh'](_0x85ee39,{'status':_0x5a58de[_0x4915ab(0x1f1)],'details':_0x210dfb[_0x4915ab(0x1af)]+_0x4915ab(0x1d0)});return;}_0x5a58de[_0x4915ab(0x1ac)](_0x85ee39,{'status':_0x4915ab(0x209)});});});}async function getSkillsFromDir(_0x14e0cc,_0x537817){const _0x4893dc=_0x198f8c,_0x435897={'gkFrS':function(_0x56069b,_0x19f758,_0x1100b3){return _0x56069b(_0x19f758,_0x1100b3);},'MjNEj':function(_0x42dbd0,_0x34af4c,_0x43ef51,_0x3b76ab){return _0x42dbd0(_0x34af4c,_0x43ef51,_0x3b76ab);},'NskpG':'SKILL.md','Rqfuq':function(_0x520a4a,_0x5c32d7){return _0x520a4a(_0x5c32d7);},'eomYB':'utf-8'};if(!existsSync(_0x14e0cc))return[];const _0x491009=[];try{const _0x442eb7=await _0x435897[_0x4893dc(0x1ec)](readdir,_0x14e0cc,{'withFileTypes':!![]});for(const _0x456e6d of _0x442eb7){if(_0x456e6d['isDirectory']()){const _0x3dec3d=_0x435897['MjNEj'](join,_0x14e0cc,_0x456e6d[_0x4893dc(0x1d8)],_0x435897[_0x4893dc(0x1fb)]);if(_0x435897['Rqfuq'](existsSync,_0x3dec3d)){let _0x38dc6a=_0x456e6d[_0x4893dc(0x1d8)];try{const _0x4f0ed0=await _0x435897['gkFrS'](readFile,_0x3dec3d,_0x435897[_0x4893dc(0x1ca)]),_0x55614f=_0x4f0ed0['match'](/name:\s*(.+)/);_0x55614f&&(_0x38dc6a=_0x55614f[0x1]['trim']());}catch{}_0x491009['push']({'name':_0x456e6d['name'],'displayName':_0x38dc6a,'path':_0x3dec3d,'level':_0x537817});}}}}catch{return[];}return _0x491009;}async function getInstalledSkills(){const _0x5f058b=_0x198f8c,_0x17a956={'hnPtk':'project','nammQ':function(_0x3f1e43,_0x4c0eb0,_0x325547){return _0x3f1e43(_0x4c0eb0,_0x325547);}},[_0x3e0df9,_0x3f5134]=await Promise['all']([getSkillsFromDir(getProjectSkillsDir(),_0x17a956[_0x5f058b(0x1e8)]),_0x17a956[_0x5f058b(0x1eb)](getSkillsFromDir,getUserSkillsDir(),'user')]);return{'project':_0x3e0df9,'user':_0x3f5134};}async function getEnvironments(){const _0xca0415=_0x198f8c,_0x53bbc7={'uvYyb':function(_0x3b55fe,_0x341932){return _0x3b55fe(_0x341932);},'KMmlU':function(_0x1f7469,_0x449e88,_0x3be6cc){return _0x1f7469(_0x449e88,_0x3be6cc);},'Ruhki':_0xca0415(0x1bc),'OEGnz':'auth.json.enc','tatvh':_0xca0415(0x1c7),'iZyWe':function(_0xaf63a8,_0x36130c){return _0xaf63a8(_0x36130c);},'SxsoW':function(_0x1b1660,_0x5376d9){return _0x1b1660(_0x5376d9);},'aSHlJ':function(_0x893b15,_0x17a0b2){return _0x893b15===_0x17a0b2;},'vrBdB':function(_0x42e3f6){return _0x42e3f6();}},{envNames:_0xc09d65,activeEnv:_0x29c312}=await getEnvNames(),_0x49aead=_0x53bbc7[_0xca0415(0x1e6)](getRangerDir);if(!existsSync(_0x49aead))return{'envs':[],'activeEnv':null};const _0x515888=_0xc09d65['map'](_0x4e3647=>{const _0x356791=_0xca0415,_0x2a4814=_0x53bbc7[_0x356791(0x1ce)](getEnvDir,_0x4e3647),_0x469ab1=join(_0x2a4814,_0x356791(0x1b0)),_0x4492e0=_0x53bbc7['KMmlU'](join,_0x2a4814,_0x53bbc7[_0x356791(0x1f6)]),_0x41549d=_0x53bbc7['KMmlU'](join,_0x2a4814,_0x53bbc7[_0x356791(0x1ab)]);return{'name':_0x4e3647,'settingsPath':existsSync(_0x469ab1)?_0x469ab1:_0x53bbc7[_0x356791(0x1dd)],'hasPlaintextAuth':_0x53bbc7[_0x356791(0x1bd)](existsSync,_0x4492e0),'hasEncryptedAuth':_0x53bbc7['SxsoW'](existsSync,_0x41549d),'isActive':_0x53bbc7[_0x356791(0x1fd)](_0x4e3647,_0x29c312)};});return{'envs':_0x515888,'activeEnv':_0x29c312};}export async function status(){const _0x11a4ee=_0x198f8c,_0x47cba5={'duDNU':_0x11a4ee(0x1d4),'yKmCO':function(_0x121c26){return _0x121c26();},'sLVTj':function(_0x110e0c,_0xbf644a,_0x43db97){return _0x110e0c(_0xbf644a,_0x43db97);},'jXVuH':function(_0x3c5016,_0x1aeb82){return _0x3c5016(_0x1aeb82);},'kFgCP':function(_0x4c9e1b,_0x5241a3){return _0x4c9e1b(_0x5241a3);},'faxsd':function(_0x4b08de){return _0x4b08de();},'ZhQUc':function(_0xd0db4,_0x2bcd4c){return _0xd0db4(_0x2bcd4c);},'POhDS':'\x0a---\x20OpenCode\x20Plugin\x20---','ElUfc':'configured','sbcZJ':_0x11a4ee(0x1cd),'wDreH':function(_0x2cd178,_0x26fa97){return _0x2cd178===_0x26fa97;},'grRsr':'not_configured','bqAwX':'\x20\x20Not\x20configured','fiHBw':'\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','LwTDu':'disabled','fmzmt':_0x11a4ee(0x1f7),'ipfmG':_0x11a4ee(0x1e2),'wgOwL':'\x0a---\x20Skills\x20---','JIARY':function(_0x4d1df3){return _0x4d1df3();},'pPlDX':function(_0x4ea9d8,_0x555d93){return _0x4ea9d8+_0x555d93;},'ptdNW':function(_0x1dc08a,_0x13a142){return _0x1dc08a===_0x13a142;},'iIsjy':'\x20\x20Project-level:','nSdrf':_0x11a4ee(0x20e),'ygCyb':function(_0x3f008f,_0x17eed5){return _0x3f008f(_0x17eed5);},'bmgIp':_0x11a4ee(0x210),'jEdIc':function(_0x57451c,_0x687692){return _0x57451c===_0x687692;},'ylJsV':'\x20(active)','qUILt':'encrypted','DtPZH':'(not\x20found)','NLGhS':function(_0x5e2072,_0x30d574){return _0x5e2072(_0x30d574);}};console['log'](_0x47cba5[_0x11a4ee(0x1fa)]);const _0x2fdfb2=process['cwd'](),_0x1d25a3=_0x47cba5['yKmCO'](getRangerDir);if(!existsSync(_0x1d25a3)){console['log']('Root:\x20'+_0x47cba5[_0x11a4ee(0x1b5)](link,_0x2fdfb2,_0x47cba5['jXVuH'](bold,basename(_0x2fdfb2)))),console[_0x11a4ee(0x1ef)]('\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.'),console['log'](_0x11a4ee(0x1d2));return;}console[_0x11a4ee(0x1ef)](_0x11a4ee(0x1d3)+_0x47cba5['sLVTj'](link,_0x2fdfb2,_0x47cba5['kFgCP'](bold,_0x47cba5[_0x11a4ee(0x1ad)](basename,_0x2fdfb2))));const _0x24aa75=getCurrentVersion(),_0x2aa840=getLatestVersion();if(_0x2aa840['version']&&_0x2aa840[_0x11a4ee(0x1a8)]!==_0x24aa75)console[_0x11a4ee(0x1ef)](_0x11a4ee(0x1cc)+_0x24aa75+_0x11a4ee(0x1f8)+_0x2aa840['version']+')'),console[_0x11a4ee(0x1ef)]('\x20\x20Run:\x20ranger\x20update');else _0x2aa840['version']?console[_0x11a4ee(0x1ef)]('Version:\x20'+_0x24aa75+'\x20(up\x20to\x20date)'):console[_0x11a4ee(0x1ef)]('Version:\x20'+_0x24aa75);const _0x131036=await _0x47cba5[_0x11a4ee(0x1c1)](getToken);if(_0x131036){const _0x57e393=await _0x47cba5['ZhQUc'](getCurrentUser,_0x131036);_0x57e393[_0x11a4ee(0x1c2)]?console[_0x11a4ee(0x1ef)]('Organization:\x20'+bold(_0x57e393['user'][_0x11a4ee(0x1d5)])):(console['log']('API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired'),console[_0x11a4ee(0x1ef)]('\x20\x20Run:\x20ranger\x20setup\x20[token]'));}else console[_0x11a4ee(0x1ef)](_0x11a4ee(0x20a)),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]');process['env']['DEBUG']&&(console[_0x11a4ee(0x1ef)]('API\x20Environment:\x20'+getCurrentEnvironment()),console[_0x11a4ee(0x1ef)]('API\x20URL:\x20'+getApiBaseUrl()));console['log'](_0x47cba5['POhDS']);const _0x2d08f3=await getOpencodePluginStatus();if(_0x2d08f3['status']===_0x47cba5[_0x11a4ee(0x1d9)])console['log']('\x20\x20'+bold(_0x47cba5['sbcZJ'])+_0x11a4ee(0x202)),_0x2d08f3['details']&&console['log']('\x20\x20'+_0x2d08f3[_0x11a4ee(0x1dc)]);else _0x47cba5[_0x11a4ee(0x208)](_0x2d08f3[_0x11a4ee(0x1b9)],_0x47cba5[_0x11a4ee(0x1c5)])?(console['log'](_0x47cba5['bqAwX']),_0x2d08f3[_0x11a4ee(0x1dc)]&&console[_0x11a4ee(0x1ef)]('\x20\x20'+_0x2d08f3['details']),console[_0x11a4ee(0x1ef)]('\x20\x20Run:\x20ranger\x20setup\x20--opencode')):console['log'](_0x47cba5['fiHBw']);console[_0x11a4ee(0x1ef)]('\x0a---\x20Claude\x20Code\x20Plugin\x20---');const _0x4abd8d=await getPluginInfo('ranger@trailhead');if(_0x4abd8d){const _0x46693d=_0x4abd8d['scope']||'unknown',_0x43d6d0=_0x4abd8d[_0x11a4ee(0x1a5)]?_0x11a4ee(0x1a5):_0x47cba5[_0x11a4ee(0x1cf)];console[_0x11a4ee(0x1ef)]('\x20\x20'+bold(_0x47cba5[_0x11a4ee(0x1d1)])+':\x20installed\x20('+_0x46693d+',\x20'+_0x43d6d0+')');}else console[_0x11a4ee(0x1ef)](_0x11a4ee(0x1f0)),console[_0x11a4ee(0x1ef)](_0x47cba5[_0x11a4ee(0x1c0)]);console['log'](_0x47cba5[_0x11a4ee(0x1ff)]);const {project:_0x2487e2,user:_0x3fa8b8}=await _0x47cba5[_0x11a4ee(0x1c3)](getInstalledSkills),_0x51f342=_0x2487e2[_0x11a4ee(0x1a7)](_0x43ee77=>RANGER_MANAGED_SKILLS['includes'](_0x43ee77['name'])),_0x4e3271=_0x3fa8b8[_0x11a4ee(0x1a7)](_0xe36342=>RANGER_MANAGED_SKILLS['includes'](_0xe36342['name'])),_0x1c54d1=_0x47cba5[_0x11a4ee(0x1f9)](_0x51f342['length'],_0x4e3271[_0x11a4ee(0x1af)]);if(_0x47cba5[_0x11a4ee(0x1e4)](_0x1c54d1,0x0))console[_0x11a4ee(0x1ef)](_0x11a4ee(0x1f2)),console[_0x11a4ee(0x1ef)]('\x20\x20Run:\x20ranger\x20skillup');else{if(_0x51f342['length']>0x0){console[_0x11a4ee(0x1ef)](_0x47cba5[_0x11a4ee(0x207)]);for(const _0x426e59 of _0x51f342){console[_0x11a4ee(0x1ef)](_0x11a4ee(0x211)+bold(_0x426e59['displayName'])+':\x20'+_0x47cba5['sLVTj'](link,_0x426e59['path'],_0x47cba5[_0x11a4ee(0x1ba)](basename,_0x426e59[_0x11a4ee(0x20d)])));}}if(_0x4e3271[_0x11a4ee(0x1af)]>0x0){console[_0x11a4ee(0x1ef)](_0x47cba5[_0x11a4ee(0x1f3)]);for(const _0x20a9b3 of _0x4e3271){console['log']('\x20\x20\x20\x20'+_0x47cba5['ygCyb'](bold,_0x20a9b3[_0x11a4ee(0x1d7)])+':\x20'+link(_0x20a9b3[_0x11a4ee(0x20d)],_0x47cba5['ygCyb'](basename,_0x20a9b3['path'])));}}}console[_0x11a4ee(0x1ef)](_0x47cba5[_0x11a4ee(0x1e0)]);const {envs:_0x34b60f,activeEnv:_0x4c0cef}=await getEnvironments();if(_0x47cba5['jEdIc'](_0x34b60f[_0x11a4ee(0x1af)],0x0))console[_0x11a4ee(0x1ef)](_0x11a4ee(0x201)),console[_0x11a4ee(0x1ef)](_0x11a4ee(0x1ed));else{for(const _0x7659ae of _0x34b60f){const _0x3f2616=_0x7659ae[_0x11a4ee(0x1b6)]?_0x47cba5[_0x11a4ee(0x212)]:'',_0x47f62c=_0x7659ae['hasEncryptedAuth']?_0x47cba5[_0x11a4ee(0x1f5)]:_0x7659ae[_0x11a4ee(0x1aa)]?_0x11a4ee(0x1e3):'none';console['log']('\x20\x20'+_0x47cba5[_0x11a4ee(0x1ba)](bold,_0x7659ae[_0x11a4ee(0x1d8)])+_0x3f2616),console['log'](_0x11a4ee(0x1cb)+_0x47f62c),_0x7659ae[_0x11a4ee(0x1b2)]!==_0x47cba5[_0x11a4ee(0x1c8)]&&console[_0x11a4ee(0x1ef)]('\x20\x20\x20\x20Settings:\x20'+link(_0x7659ae[_0x11a4ee(0x1b2)],_0x47cba5['NLGhS'](basename,_0x7659ae['settingsPath'])));}!_0x4c0cef&&(console['log'](_0x11a4ee(0x200)),console['log'](_0x11a4ee(0x1be)+_0x34b60f['map'](_0x505cec=>_0x505cec[_0x11a4ee(0x1d8)])['join'](',\x20')+')'));}console[_0x11a4ee(0x1ef)]('');}
|
|
1
|
+
const _0x485d6c=_0x258d;function _0x19cf(){const _0x48084d=['organizationName','\x20\x20\x20\x20Settings:\x20','string','1119760NnksgE','displayName','cwd','aHPCk','auth.json.enc','\x20\x20User-level:','length','KUIwf','plaintext','ignore','6029jNaRZe','Version:\x20','wADcz','\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.','259vWzGHy','name','map','(not\x20found)','API\x20URL:\x20','project','API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired','\x0a📊\x20Ranger\x20Status\x0a','enabled','90981Ybdpth','sVdUL','\x1b[1m','BpYPF','\x20\x20Not\x20installed','\x0a---\x20Skills\x20---','GiClP','parse','Qhphu','zUszj','version','\x20(up\x20to\x20date)','trim','1157364UyvpcX','filter','success','20WGDZsI','SKILL.md','scope','mxFwd','MkXpp','146mKiPLM','\x20\x20\x20\x20','hkhfg','log','Root:\x20','\x0a\x20\x20No\x20active\x20profile\x20set','auth.json','QBrCt',':\x20configured','isArray','\x1b]8;;\x07','path','not_installed','\x20plugin(s)\x20configured','PVYwK','some','jrlLa','oCFJi','pdYUo','error','ZillO','Organization:\x20','GiJOk','hasEncryptedAuth','close','10wBfNxm','GMCQl','unknown','MEQRs','details','DgnUv','match','Qlfwt','\x20\x20Run:\x20ranger\x20setup\x20--opencode','13928893lIvkhs','VIrnK','\x20(active)','ksELP','klUSf','env','includes','uHJam','91880VXNWNT','isActive','status','XKCTp','@ranger-testing/opencode-plugin','ehFGs','disabled','JhCdB','utf-8','LUrSy','toString','API\x20Token:\x20✗\x20Not\x20found','XcqVJ','3734244PeQdCY'];_0x19cf=function(){return _0x48084d;};return _0x19cf();}(function(_0x211641,_0x389c9c){const _0x2ab8f0=_0x258d,_0x47612c=_0x211641();while(!![]){try{const _0x89dc6b=parseInt(_0x2ab8f0(0xec))/0x1*(-parseInt(_0x2ab8f0(0x10e))/0x2)+parseInt(_0x2ab8f0(0xf9))/0x3*(-parseInt(_0x2ab8f0(0x109))/0x4)+-parseInt(_0x2ab8f0(0x149))/0x5+-parseInt(_0x2ab8f0(0x106))/0x6+-parseInt(_0x2ab8f0(0xf0))/0x7*(parseInt(_0x2ab8f0(0x138))/0x8)+parseInt(_0x2ab8f0(0x145))/0x9+parseInt(_0x2ab8f0(0x127))/0xa*(parseInt(_0x2ab8f0(0x130))/0xb);if(_0x89dc6b===_0x389c9c)break;else _0x47612c['push'](_0x47612c['shift']());}catch(_0x1523ea){_0x47612c['push'](_0x47612c['shift']());}}}(_0x19cf,0x3c754));import{readFile,readdir}from'fs/promises';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';function _0x258d(_0x1ec3b5,_0x4003d4){_0x1ec3b5=_0x1ec3b5-0xe7;const _0x19cf17=_0x19cf();let _0x258d2c=_0x19cf17[_0x1ec3b5];return _0x258d2c;}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=_0x2292b7=>_0x485d6c(0xfb)+_0x2292b7+'\x1b[0m',link=(_0x3fd319,_0x323b5a)=>'\x1b]8;;file://'+_0x3fd319+'\x07'+(_0x323b5a||_0x3fd319)+_0x485d6c(0x118);async function getOpencodePluginStatus(){const _0x503468=_0x485d6c,_0x4f2948={'AhYXd':function(_0x45b1c8,_0xdc0fbc){return _0x45b1c8!==_0xdc0fbc;},'uHJam':'configured','LUrSy':function(_0x2e6c13,_0x51ecc8){return _0x2e6c13>_0x51ecc8;},'SedbP':'not_configured','GiJOk':'opencode','HGuqG':'debug','MkXpp':_0x503468(0xeb),'XcqVJ':'pipe','Qlfwt':'data','bUOAj':_0x503468(0x121)};return new Promise(_0xfe2f0=>{const _0xb62203=_0x503468,_0x1a165f={'ehFGs':function(_0x2aca20,_0x10b423){return _0x2aca20(_0x10b423);},'JhCdB':_0xb62203(0x11a)},_0x21e653=spawn(_0x4f2948[_0xb62203(0x124)],[_0x4f2948['HGuqG'],'config'],{'stdio':[_0x4f2948[_0xb62203(0x10d)],_0x4f2948[_0xb62203(0x144)],'pipe']});let _0xf274c1='';_0x21e653['stdout']?.['on']('data',_0x105398=>{const _0x1a9eff=_0xb62203;_0xf274c1+=_0x105398[_0x1a9eff(0x142)]();}),_0x21e653['stderr']?.['on'](_0x4f2948[_0xb62203(0x12e)],_0x329882=>{const _0x51bb76=_0xb62203;_0xf274c1+=_0x329882[_0x51bb76(0x142)]();}),_0x21e653['on'](_0x4f2948['bUOAj'],()=>{const _0x424599=_0xb62203;_0x1a165f[_0x424599(0x13d)](_0xfe2f0,{'status':_0x1a165f[_0x424599(0x13f)]});}),_0x21e653['on'](_0xb62203(0x126),_0x10de9c=>{const _0xf2b996=_0xb62203,_0x1f1d8d={'pdYUo':_0xf2b996(0x148),'KIKXZ':_0xf2b996(0x13c)};if(_0x4f2948['AhYXd'](_0x10de9c,0x0)){_0xfe2f0({'status':'not_installed'});return;}const _0x392817=_0xf274c1[_0xf2b996(0x105)]();let _0x8bb765=null;if(_0x392817)try{_0x8bb765=JSON[_0xf2b996(0x100)](_0x392817);}catch{const _0x39da8e=_0x392817[_0xf2b996(0x12d)](/\{[\s\S]*\}$/);if(_0x39da8e)try{_0x8bb765=JSON[_0xf2b996(0x100)](_0x39da8e[0x0]);}catch{_0x8bb765=null;}}const _0x58c57c=Array[_0xf2b996(0x117)](_0x8bb765?.['plugin'])?_0x8bb765?.['plugin']:[],_0x3c5f19=_0x58c57c[_0xf2b996(0x11d)](_0x1be161=>{const _0x1ad0d9=_0xf2b996;if(typeof _0x1be161!==_0x1f1d8d[_0x1ad0d9(0x120)])return![];return _0x1be161[_0x1ad0d9(0x136)](_0x1f1d8d['KIKXZ'])||_0x1be161['includes']('opencode-plugin');});if(_0x3c5f19){_0xfe2f0({'status':_0x4f2948[_0xf2b996(0x137)],'details':_0x4f2948[_0xf2b996(0x141)](_0x58c57c[_0xf2b996(0xe8)],0x0)?_0x58c57c['length']+_0xf2b996(0x11b):undefined});return;}if(_0x58c57c['length']>0x0){_0xfe2f0({'status':'not_configured','details':_0x58c57c['length']+_0xf2b996(0x11b)});return;}_0xfe2f0({'status':_0x4f2948['SedbP']});});});}async function getSkillsFromDir(_0x1f9c26,_0xcc4783){const _0x58ddab=_0x485d6c,_0x5c2947={'DgnUv':function(_0xe70fef,_0x393617){return _0xe70fef(_0x393617);},'zUszj':function(_0x3c5fef,_0x35e1eb,_0x49e1a2){return _0x3c5fef(_0x35e1eb,_0x49e1a2);},'PTnwd':function(_0x40fd6a,_0xf7dab,_0x306a6c,_0x3f0948){return _0x40fd6a(_0xf7dab,_0x306a6c,_0x3f0948);},'HXvFL':_0x58ddab(0x140)};if(!_0x5c2947[_0x58ddab(0x12c)](existsSync,_0x1f9c26))return[];const _0xaa9048=[];try{const _0x375ca3=await _0x5c2947[_0x58ddab(0x102)](readdir,_0x1f9c26,{'withFileTypes':!![]});for(const _0x21407f of _0x375ca3){if(_0x21407f['isDirectory']()){const _0x174cfd=_0x5c2947['PTnwd'](join,_0x1f9c26,_0x21407f[_0x58ddab(0xf1)],_0x58ddab(0x10a));if(existsSync(_0x174cfd)){let _0x490044=_0x21407f['name'];try{const _0x27be86=await readFile(_0x174cfd,_0x5c2947['HXvFL']),_0x6aebe6=_0x27be86['match'](/name:\s*(.+)/);_0x6aebe6&&(_0x490044=_0x6aebe6[0x1]['trim']());}catch{}_0xaa9048['push']({'name':_0x21407f['name'],'displayName':_0x490044,'path':_0x174cfd,'level':_0xcc4783});}}}}catch{return[];}return _0xaa9048;}async function getInstalledSkills(){const _0x4e5eae=_0x485d6c,_0x348ad9={'UPXnY':function(_0x21f5e2,_0x2efbfe,_0x376f14){return _0x21f5e2(_0x2efbfe,_0x376f14);},'sVdUL':_0x4e5eae(0xf5),'hkhfg':function(_0x34909f){return _0x34909f();}},[_0x37ce7d,_0x3defa2]=await Promise['all']([_0x348ad9['UPXnY'](getSkillsFromDir,getProjectSkillsDir(),_0x348ad9[_0x4e5eae(0xfa)]),_0x348ad9['UPXnY'](getSkillsFromDir,_0x348ad9[_0x4e5eae(0x110)](getUserSkillsDir),'user')]);return{'project':_0x37ce7d,'user':_0x3defa2};}async function getEnvironments(){const _0x24db1e=_0x485d6c,_0x4362e0={'mxFwd':function(_0x25214e,_0x5a5dcd){return _0x25214e(_0x5a5dcd);},'ktYRa':function(_0x4b8bd1,_0x575826,_0x23cd8b){return _0x4b8bd1(_0x575826,_0x23cd8b);},'GMCQl':'settings.json','jrlLa':function(_0x19c8d4,_0x25a92f,_0x1b3973){return _0x19c8d4(_0x25a92f,_0x1b3973);},'VIrnK':_0x24db1e(0x114),'MEQRs':_0x24db1e(0x14d),'vyFjR':'(not\x20found)','ksELP':function(_0x34e624,_0x2d838c){return _0x34e624(_0x2d838c);},'Qhphu':function(_0x28f010,_0x32da1d){return _0x28f010===_0x32da1d;},'GiClP':function(_0x43fdc7){return _0x43fdc7();}},{envNames:_0x3f4337,activeEnv:_0x34c3dc}=await _0x4362e0[_0x24db1e(0xff)](getEnvNames),_0x244e36=getRangerDir();if(!_0x4362e0[_0x24db1e(0x133)](existsSync,_0x244e36))return{'envs':[],'activeEnv':null};const _0x76b9c1=_0x3f4337[_0x24db1e(0xf2)](_0x229db4=>{const _0x4f3b5e=_0x24db1e,_0x40dc50=_0x4362e0[_0x4f3b5e(0x10c)](getEnvDir,_0x229db4),_0x342671=_0x4362e0['ktYRa'](join,_0x40dc50,_0x4362e0[_0x4f3b5e(0x128)]),_0xdc49bf=_0x4362e0[_0x4f3b5e(0x11e)](join,_0x40dc50,_0x4362e0[_0x4f3b5e(0x131)]),_0x3fbabc=join(_0x40dc50,_0x4362e0[_0x4f3b5e(0x12a)]);return{'name':_0x229db4,'settingsPath':existsSync(_0x342671)?_0x342671:_0x4362e0['vyFjR'],'hasPlaintextAuth':_0x4362e0[_0x4f3b5e(0x10c)](existsSync,_0xdc49bf),'hasEncryptedAuth':_0x4362e0['ksELP'](existsSync,_0x3fbabc),'isActive':_0x4362e0[_0x4f3b5e(0x101)](_0x229db4,_0x34c3dc)};});return{'envs':_0x76b9c1,'activeEnv':_0x34c3dc};}export async function status(){const _0x22d37a=_0x485d6c,_0x32dd26={'WUYES':function(_0x361213,_0x4e27c5,_0x3ba820){return _0x361213(_0x4e27c5,_0x3ba820);},'klUSf':function(_0x37a25e,_0x518246){return _0x37a25e(_0x518246);},'XKCTp':function(_0x3ed2b6,_0x59efdc){return _0x3ed2b6!==_0x59efdc;},'PVYwK':function(_0x5124bf){return _0x5124bf();},'OrMfA':'\x0a---\x20OpenCode\x20Plugin\x20---','KUIwf':function(_0x9d7101,_0x54456a){return _0x9d7101===_0x54456a;},'wAbDh':_0x22d37a(0x13c),'NaFxe':function(_0x5b9c52,_0x2c451a){return _0x5b9c52===_0x2c451a;},'BpYPF':'not_configured','JkInI':'\x20\x20Not\x20configured','aHPCk':_0x22d37a(0x12f),'ZGTMZ':function(_0x2a48bf,_0x4c8a44){return _0x2a48bf(_0x4c8a44);},'wLHeG':'ranger@trailhead','ZeeXZ':'\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','ZillO':_0x22d37a(0xfe),'WGuXO':function(_0x43c120,_0x4e4fae){return _0x43c120+_0x4e4fae;},'oCFJi':function(_0x14d313,_0x4eadeb,_0x27eb3e){return _0x14d313(_0x4eadeb,_0x27eb3e);},'QBrCt':function(_0x49021c,_0x125445){return _0x49021c(_0x125445);},'wADcz':function(_0x51b524,_0x706ca0){return _0x51b524>_0x706ca0;},'STioP':function(_0x33ecd5,_0x5b3fb8){return _0x33ecd5(_0x5b3fb8);},'lCHdd':_0x22d37a(0x132),'rLPrP':'none','NYiyF':_0x22d37a(0xf3)};console['log'](_0x22d37a(0xf7));const _0x49cace=process[_0x22d37a(0x14b)](),_0x38e0aa=getRangerDir();if(!existsSync(_0x38e0aa)){console['log'](_0x22d37a(0x112)+_0x32dd26['WUYES'](link,_0x49cace,bold(_0x32dd26['klUSf'](basename,_0x49cace)))),console['log'](_0x22d37a(0xef)),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a');return;}console['log']('Root:\x20'+link(_0x49cace,bold(basename(_0x49cace))));const _0x1ccd9d=getCurrentVersion(),_0x4144f5=getLatestVersion();if(_0x4144f5[_0x22d37a(0x103)]&&_0x32dd26[_0x22d37a(0x13b)](_0x4144f5[_0x22d37a(0x103)],_0x1ccd9d))console[_0x22d37a(0x111)]('Version:\x20'+_0x1ccd9d+'\x20(latest:\x20'+_0x4144f5['version']+')'),console[_0x22d37a(0x111)]('\x20\x20Run:\x20ranger\x20update');else _0x4144f5[_0x22d37a(0x103)]?console['log']('Version:\x20'+_0x1ccd9d+_0x22d37a(0x104)):console[_0x22d37a(0x111)](_0x22d37a(0xed)+_0x1ccd9d);const _0x3ffeba=await getToken();if(_0x3ffeba){const _0x20b84b=await _0x32dd26[_0x22d37a(0x134)](getCurrentUser,_0x3ffeba);_0x20b84b[_0x22d37a(0x108)]?console[_0x22d37a(0x111)](_0x22d37a(0x123)+bold(_0x20b84b['user'][_0x22d37a(0x146)])):(console['log'](_0x22d37a(0xf6)),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]'));}else console[_0x22d37a(0x111)](_0x22d37a(0x143)),console[_0x22d37a(0x111)]('\x20\x20Run:\x20ranger\x20setup\x20[token]');process[_0x22d37a(0x135)]['DEBUG']&&(console[_0x22d37a(0x111)]('API\x20Environment:\x20'+_0x32dd26[_0x22d37a(0x11c)](getCurrentEnvironment)),console['log'](_0x22d37a(0xf4)+getApiBaseUrl()));console[_0x22d37a(0x111)](_0x32dd26['OrMfA']);const _0x7cf884=await _0x32dd26['PVYwK'](getOpencodePluginStatus);if(_0x32dd26[_0x22d37a(0xe9)](_0x7cf884[_0x22d37a(0x13a)],'configured'))console['log']('\x20\x20'+bold(_0x32dd26['wAbDh'])+_0x22d37a(0x116)),_0x7cf884['details']&&console[_0x22d37a(0x111)]('\x20\x20'+_0x7cf884['details']);else _0x32dd26['NaFxe'](_0x7cf884[_0x22d37a(0x13a)],_0x32dd26[_0x22d37a(0xfc)])?(console['log'](_0x32dd26['JkInI']),_0x7cf884[_0x22d37a(0x12b)]&&console[_0x22d37a(0x111)]('\x20\x20'+_0x7cf884['details']),console['log'](_0x32dd26[_0x22d37a(0x14c)])):console['log']('\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available');console[_0x22d37a(0x111)]('\x0a---\x20Claude\x20Code\x20Plugin\x20---');const _0x3b900f=await _0x32dd26['ZGTMZ'](getPluginInfo,_0x32dd26['wLHeG']);if(_0x3b900f){const _0x14c0cc=_0x3b900f[_0x22d37a(0x10b)]||_0x22d37a(0x129),_0x5ad7fd=_0x3b900f[_0x22d37a(0xf8)]?_0x22d37a(0xf8):_0x22d37a(0x13e);console[_0x22d37a(0x111)]('\x20\x20'+_0x32dd26['klUSf'](bold,_0x32dd26['wLHeG'])+':\x20installed\x20('+_0x14c0cc+',\x20'+_0x5ad7fd+')');}else console['log'](_0x22d37a(0xfd)),console[_0x22d37a(0x111)](_0x32dd26['ZeeXZ']);console['log'](_0x32dd26[_0x22d37a(0x122)]);const {project:_0x47a2ba,user:_0x437865}=await getInstalledSkills(),_0x74a75d=_0x47a2ba['filter'](_0x397b1b=>RANGER_MANAGED_SKILLS['includes'](_0x397b1b['name'])),_0x1c20b2=_0x437865[_0x22d37a(0x107)](_0x553b01=>RANGER_MANAGED_SKILLS[_0x22d37a(0x136)](_0x553b01[_0x22d37a(0xf1)])),_0x3b54c9=_0x32dd26['WGuXO'](_0x74a75d['length'],_0x1c20b2[_0x22d37a(0xe8)]);if(_0x3b54c9===0x0)console['log']('No\x20skills\x20installed'),console['log']('\x20\x20Run:\x20ranger\x20skillup');else{if(_0x74a75d['length']>0x0){console[_0x22d37a(0x111)]('\x20\x20Project-level:');for(const _0x22bfc3 of _0x74a75d){console[_0x22d37a(0x111)](_0x22d37a(0x10f)+bold(_0x22bfc3[_0x22d37a(0x14a)])+':\x20'+_0x32dd26[_0x22d37a(0x11f)](link,_0x22bfc3['path'],_0x32dd26[_0x22d37a(0x115)](basename,_0x22bfc3[_0x22d37a(0x119)])));}}if(_0x32dd26[_0x22d37a(0xee)](_0x1c20b2[_0x22d37a(0xe8)],0x0)){console[_0x22d37a(0x111)](_0x22d37a(0xe7));for(const _0x2b246c of _0x1c20b2){console['log'](_0x22d37a(0x10f)+_0x32dd26['STioP'](bold,_0x2b246c['displayName'])+':\x20'+link(_0x2b246c[_0x22d37a(0x119)],basename(_0x2b246c[_0x22d37a(0x119)])));}}}console['log']('\x0a---\x20Profiles\x20---');const {envs:_0x1de8a8,activeEnv:_0x32f5bf}=await getEnvironments();if(_0x1de8a8[_0x22d37a(0xe8)]===0x0)console['log']('No\x20profiles\x20configured'),console[_0x22d37a(0x111)]('\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>');else{for(const _0x1a6138 of _0x1de8a8){const _0x456832=_0x1a6138[_0x22d37a(0x139)]?_0x32dd26['lCHdd']:'',_0x7a3f66=_0x1a6138[_0x22d37a(0x125)]?'encrypted':_0x1a6138['hasPlaintextAuth']?_0x22d37a(0xea):_0x32dd26['rLPrP'];console['log']('\x20\x20'+bold(_0x1a6138[_0x22d37a(0xf1)])+_0x456832),console['log']('\x20\x20\x20\x20Auth:\x20'+_0x7a3f66),_0x32dd26['XKCTp'](_0x1a6138['settingsPath'],_0x32dd26['NYiyF'])&&console['log'](_0x22d37a(0x147)+_0x32dd26['oCFJi'](link,_0x1a6138['settingsPath'],basename(_0x1a6138['settingsPath'])));}!_0x32f5bf&&(console[_0x22d37a(0x111)](_0x22d37a(0x113)),console['log']('\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20'+_0x1de8a8['map'](_0x47fe5d=>_0x47fe5d[_0x22d37a(0xf1)])['join'](',\x20')+')'));}console[_0x22d37a(0x111)]('');}
|