@ranger-testing/ranger-cli 2.5.4-alpha.071b7bd-1 → 2.5.4-alpha.1d983c3-19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -14
- package/build/cli.js +1 -1
- package/build/commands/addEnv.js +1 -1
- package/build/commands/authEncrypt.js +1 -1
- package/build/commands/clean.js +1 -1
- package/build/commands/config.js +1 -1
- package/build/commands/env.js +1 -1
- package/build/commands/feature.js +1 -1
- package/build/commands/hook.js +1 -1
- package/build/commands/hooks/autoPrompt.js +1 -1
- package/build/commands/hooks/disable.js +1 -1
- package/build/commands/hooks/enable.js +1 -1
- package/build/commands/hooks/exitPlanMode.js +1 -1
- package/build/commands/hooks/index.js +1 -1
- package/build/commands/hooks/output.js +1 -1
- package/build/commands/hooks/planReminder.js +1 -1
- package/build/commands/hooks/planStart.js +1 -1
- package/build/commands/hooks/postEdit.js +1 -1
- package/build/commands/hooks/preCompact.js +1 -1
- package/build/commands/hooks/sessionEnd.js +1 -1
- package/build/commands/hooks/sessionStart.js +1 -1
- package/build/commands/hooks/stopHook.js +1 -1
- package/build/commands/index.js +1 -1
- package/build/commands/login.js +1 -1
- package/build/commands/mcpBootstrap.js +1 -1
- package/build/commands/migrateProfile.js +1 -0
- package/build/commands/setup/claude.js +1 -1
- package/build/commands/setup/opencode.js +1 -1
- package/build/commands/setupCi.js +1 -1
- package/build/commands/skillup.js +1 -1
- package/build/commands/start.js +1 -1
- package/build/commands/status.js +1 -1
- package/build/commands/update.js +1 -1
- package/build/commands/updateEnv.js +1 -1
- package/build/commands/useEnv.js +1 -1
- package/build/commands/utils/activeProfile.js +1 -1
- package/build/commands/utils/agentEnv.js +1 -1
- package/build/commands/utils/browserSessionsApi.js +1 -1
- package/build/commands/utils/claudeConfig.js +1 -1
- package/build/commands/utils/claudeOverrideSettings.js +1 -1
- package/build/commands/utils/claudePlugin.js +1 -1
- package/build/commands/utils/cloudProfile.js +1 -0
- package/build/commands/utils/cloudProfileSession.js +1 -0
- package/build/commands/utils/crypto.js +1 -1
- package/build/commands/utils/desirePathLog.js +1 -1
- package/build/commands/utils/deviceAuth.js +1 -1
- package/build/commands/utils/environment.js +1 -1
- package/build/commands/utils/featureApi.js +1 -1
- package/build/commands/utils/fixWebmDuration.js +1 -1
- package/build/commands/utils/gitTracked.js +1 -0
- package/build/commands/utils/keychain.js +1 -1
- package/build/commands/utils/legacyWarning.js +1 -0
- package/build/commands/utils/localAgentInstallationsApi.js +1 -1
- package/build/commands/utils/matchAuthEnvironment.js +1 -0
- package/build/commands/utils/mcpImageBase64.js +1 -1
- package/build/commands/utils/model.js +1 -1
- package/build/commands/utils/opencodeConfig.js +1 -1
- package/build/commands/utils/playwrightCli.js +1 -1
- package/build/commands/utils/profileMessages.js +1 -1
- package/build/commands/utils/profileSetupBanner.js +1 -1
- package/build/commands/utils/projectsConfig.js +1 -0
- package/build/commands/utils/rangerConfig.js +1 -1
- package/build/commands/utils/rangerRoot.js +1 -1
- package/build/commands/utils/resolveProfileContext.js +1 -0
- package/build/commands/utils/resolveProfileUrl.js +1 -0
- package/build/commands/utils/retry.js +1 -1
- package/build/commands/utils/sessionCache.js +1 -1
- package/build/commands/utils/settings.js +1 -1
- package/build/commands/utils/skillContent.js +1 -1
- package/build/commands/utils/skills.js +1 -1
- package/build/commands/utils/stitchWebmFiles.js +1 -1
- package/build/commands/utils/telemetry.js +1 -1
- package/build/commands/utils/tokenRefresh.js +1 -1
- package/build/commands/utils/traceSnapshotMapper.js +1 -1
- package/build/commands/utils/userApi.js +1 -1
- package/build/commands/utils/version.js +1 -1
- package/build/commands/verifyFeature.js +1 -1
- package/build/commands/verifyFeatureCli.js +1 -1
- package/build/skills/ranger/SKILL.md +36 -6
- package/build/skills/ranger/create.md +19 -0
- package/build/skills/ranger/verify.md +46 -7
- package/package.json +8 -3
package/build/commands/addEnv.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x5b2467,_0x30ec30){const _0xd6da53=_0x5472,_0x537bf9=_0x5b2467();while(!![]){try{const _0x5a47f5=-parseInt(_0xd6da53(0xb3))/0x1*(-parseInt(_0xd6da53(0xa8))/0x2)+-parseInt(_0xd6da53(0x8d))/0x3+parseInt(_0xd6da53(0x7e))/0x4+parseInt(_0xd6da53(0xc0))/0x5*(-parseInt(_0xd6da53(0x8b))/0x6)+parseInt(_0xd6da53(0x7f))/0x7*(-parseInt(_0xd6da53(0xcf))/0x8)+parseInt(_0xd6da53(0x7b))/0x9*(parseInt(_0xd6da53(0xa1))/0xa)+parseInt(_0xd6da53(0xdd))/0xb;if(_0x5a47f5===_0x30ec30)break;else _0x537bf9['push'](_0x537bf9['shift']());}catch(_0x417946){_0x537bf9['push'](_0x537bf9['shift']());}}}(_0x57a8,0xee64b));function _0x5472(_0x50d7f1,_0xe49c73){_0x50d7f1=_0x50d7f1-0x6d;const _0x57a807=_0x57a8();let _0x547246=_0x57a807[_0x50d7f1];return _0x547246;}import{mkdir,writeFile,readFile,unlink,rm,mkdtemp,rename}from'fs/promises';import{join}from'path';import _0x1eac44 from'inquirer';import{chromium}from'playwright';import{findExistingEnv,loadSettings}from'./utils/settings.js';import{encrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';function _0x57a8(){const _0x120ee4=['Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','yNSan','Browser\x20closed\x20before\x20authentication\x20was\x20saved.','list','retry','Invalid\x20--setup-header\x20format:\x20\x22','.backup-','HEAD','close','location','action','push','14688ubDHRv','isTTY','now','\x20\x20Did\x20you\x20mean\x20','local','Warning:\x20Could\x20not\x20remove\x20old\x20profile\x20at\x20','Enter\x20a\x20different\x20URL','error','AMGQY','env','isProtocolError','test','shouldReplace','HTTP\x20','2428140xzyDrs','NODE_TLS_REJECT_UNAUTHORIZED','DNgiO','\x20\x20\x20If\x20you\x20are\x20an\x20agent,\x20background\x20this\x20process\x20and\x20let\x20your\x20user\x20know\x20they\x20need\x20to\x20complete\x20browser\x20authentication.\x0a','LODAb','confirm','ydyTv','Warning:\x20Could\x20not\x20remove\x20old\x20profile\x20backup\x20at\x20','DdzaZ','newPage','trackPhaseStart','goto','✓\x20Encrypted\x20auth\x20saved\x20to:\x20','\x22.\x20Expected\x20\x22Name:\x20Value\x22.','kVljb','\x22\x20configured','qyZoR','UxvtU','\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','PPvNJ','Delete\x20existing\x20and\x20create\x20new\x20in\x20','\x0a🌐\x20Profile\x20Setup\x0a','stdin','trim','tZuCi','slice','21555XxPJiW','NVGjS','\x20\x20ranger\x20profile\x20add\x20','6045700tPrQTn','2429XtERkM','What\x20would\x20you\x20like\x20to\x20do?','prompt','name','setupHeader','.enc','ceyrL','npdGX','CvcZw','path','ltUIq','assign','373326KvGcgP','browser_auth','4281672cDJnJH','✓\x20Created\x20settings:\x20','zMSxn','includes','trackPhaseEnd','\x20(continuing\x20with\x20--force)','log','\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.','\x20\x20\x20Creating\x20it\x20in\x20','WMJSJ','force','baseUrl','cdpEndpoint','eGzkL','IHNvB','fetch\x20failed','Missing\x20API\x20token;\x20aborting\x20CI\x20profile\x20creation.','newContext','--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','iGUSt','2170yPQlBc','wLqTR','Profile\x20\x22','url','length','JBqef','vasZM','4iZBhHR','TypeError','\x20--safe-mode\x20\x20\x20\x20(disables\x20browser\x20features\x20that\x20can\x20cause\x20crashes)','about:blank','Lyehl','auth.json','safeMode','\x0a📋\x20Authentication\x20Setup','\x0a\x20\x20Could\x20not\x20reach\x20','kzMDg','catch','425558mhBwiq','keys','skipAuth','Invalid\x20URL','use_suggestion','cmwhV','MxXPr','⚠\x20Could\x20not\x20reach\x20','url_setup','Removed\x20existing\x20profile\x20at\x20','UjlHs','Could\x20not\x20reach\x20','config_write','5vnMHCZ','message','Ykysc'];_0x57a8=function(){return _0x120ee4;};return _0x57a8();}import{addProfileSetupBanner}from'./utils/profileSetupBanner.js';async function checkUrlReachability(_0x56e3ff){const _0x2927fa=_0x5472,_0xb89df2={'eGzkL':function(_0x1db9e1,_0x39e67a,_0x581e02){return _0x1db9e1(_0x39e67a,_0x581e02);},'oUhac':_0x2927fa(0xca),'Ykysc':'manual','MoZPt':function(_0x3dd7a9,_0x2099b5,_0x3aed47){return _0x3dd7a9(_0x2099b5,_0x3aed47);},'qYlsq':function(_0x1a8593,_0x3ece34){return _0x1a8593(_0x3ece34);},'npdGX':_0x2927fa(0xb6),'OqpRp':function(_0x55b619,_0xd6661c){return _0x55b619===_0xd6661c;}};try{const _0x56a1ea=new AbortController(),_0x5946bd=_0xb89df2[_0x2927fa(0x9a)](setTimeout,()=>_0x56a1ea['abort'](),0x1388),_0x103eb0={'method':_0xb89df2['oUhac'],'signal':_0x56a1ea['signal'],'redirect':_0xb89df2[_0x2927fa(0xc2)]};/^https:\/\/localhost(:\d+)?/i[_0x2927fa(0xda)](_0x56e3ff)&&(process['env']['NODE_TLS_REJECT_UNAUTHORIZED']='0');const _0x3fa376=await _0xb89df2['MoZPt'](fetch,_0x56e3ff,_0x103eb0);delete process[_0x2927fa(0xd8)]['NODE_TLS_REJECT_UNAUTHORIZED'],_0xb89df2['qYlsq'](clearTimeout,_0x5946bd);if(_0x3fa376['status']<0x190)return{'ok':!![]};return{'ok':![],'error':_0x2927fa(0xdc)+_0x3fa376['status']};}catch(_0x284d3c){delete process[_0x2927fa(0xd8)][_0x2927fa(0xde)];const _0x1e3438=_0x284d3c,_0x3cb99b=_0x1e3438[_0x2927fa(0xc1)]||_0xb89df2['qYlsq'](String,_0x284d3c),_0x13065d=_0x3cb99b['includes'](_0xb89df2[_0x2927fa(0x86)])||_0xb89df2['OqpRp'](_0x1e3438[_0x2927fa(0x82)],_0x2927fa(0xa9))||_0x3cb99b[_0x2927fa(0x90)](_0x2927fa(0x9c));return{'ok':![],'error':_0x3cb99b,'isProtocolError':_0x13065d};}}export async function addEnv(_0x52a729,_0x1bcb45={},_0x2c51f9){const _0x42fc70=_0x5472,_0x3b7371={'yNSan':'Saving\x20authentication\x20state...','gvBUJ':function(_0x5e0a98,_0xafa037){return _0x5e0a98===_0xafa037;},'XpjxN':'user','nMWys':function(_0xbb4c6d){return _0xbb4c6d();},'IHNvB':function(_0x5f1fe2,_0x14a007){return _0x5f1fe2+_0x14a007;},'WMJSJ':function(_0x472a59,_0x547b7b,_0x140e48){return _0x472a59(_0x547b7b,_0x140e48);},'MxXPr':function(_0x47a753,_0x5a3f34){return _0x47a753!==_0x5a3f34;},'kVljb':_0x42fc70(0x9f),'ZbmfS':'--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.','CvcZw':'--ci\x20and\x20--cdp-endpoint\x20cannot\x20be\x20used\x20together.\x20Electron/CDP\x20profiles\x20only\x20work\x20with\x20a\x20locally\x20running\x20app\x20and\x20are\x20not\x20supported\x20in\x20CI.','JsBlZ':function(_0x442314,_0x2bbf5c){return _0x442314(_0x2bbf5c);},'JBqef':function(_0x473ee4,_0x574fe1,_0x3fc08a){return _0x473ee4(_0x574fe1,_0x3fc08a);},'wLqTR':'Aborted.','DdzaZ':'legacy','APxiJ':_0x42fc70(0xbb),'ltUIq':'\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','LODAb':function(_0x2e3c2d,_0x677818){return _0x2e3c2d(_0x677818);},'AMGQY':_0x42fc70(0x76),'kzMDg':'\x20\x20Ranger\x20will\x20open\x20it\x20in\x20a\x20browser\x20so\x20you\x20can\x20log\x20in\x20and\x20save\x20your\x20session.\x0a','UjlHs':function(_0x39fc95,_0x19d7a6){return _0x39fc95||_0x19d7a6;},'cmwhV':'http://localhost:3000','DNgiO':function(_0x1a9a4f,_0xe9b374){return _0x1a9a4f(_0xe9b374);},'ceyrL':_0x42fc70(0x80),'XNFpD':'Continue\x20anyway','iGUSt':'continue','ydyTv':function(_0x176e00,_0x1680e3,_0x5de3){return _0x176e00(_0x1680e3,_0x5de3);},'cIJpA':'browser_auth','UxvtU':_0x42fc70(0xaf),'mCmqg':'\x0a\x20\x20\x20⚠\x20This\x20step\x20requires\x20human\x20interaction\x20in\x20a\x20browser.','ilMEQ':_0x42fc70(0xe0),'vasZM':'--disable-features=WebBluetooth','OezgP':function(_0x235f75,_0x20ce4e){return _0x235f75||_0x20ce4e;},'VrWna':_0x42fc70(0xab),'lbAFb':'\x0aThe\x20browser\x20closed\x20unexpectedly\x20before\x20authentication\x20could\x20be\x20saved.','PPvNJ':'You\x20can\x20try\x20again\x20with\x20one\x20of:','NVGjS':_0x42fc70(0xc5),'qyZoR':function(_0x418380,_0x12b1b9,_0x5d9f0f){return _0x418380(_0x12b1b9,_0x5d9f0f);},'zMSxn':'utf-8','FmGBB':function(_0x1ac4c2,_0x3d810c){return _0x1ac4c2(_0x3d810c);},'VDgPO':_0x42fc70(0x9d),'nDBHG':function(_0x5eb394,_0x5cff0f,_0x9eaea5){return _0x5eb394(_0x5cff0f,_0x9eaea5);},'DwYTv':function(_0x289363,_0x3eb95b){return _0x289363+_0x3eb95b;},'gRBnW':_0x42fc70(0x84),'tZuCi':'config_write','SpdWA':function(_0x5de283,_0x15c988){return _0x5de283>_0x15c988;},'QeVoF':function(_0x5761c7,_0x31273c,_0x2b552c){return _0x5761c7(_0x31273c,_0x2b552c);},'zyPiJ':function(_0x2ec979,_0x287a6e,_0x470802){return _0x2ec979(_0x287a6e,_0x470802);},'Lyehl':function(_0x30b19d,_0x38602b,_0x5598f5){return _0x30b19d(_0x38602b,_0x5598f5);},'OVsRq':function(_0x352250,_0x3a0d8e,_0x21f5c2){return _0x352250(_0x3a0d8e,_0x21f5c2);}},_0x534418=_0x1bcb45['ci']??![],_0x6a86ff=_0x534418?'ci':_0x42fc70(0xd3),_0x3f5b5c=_0x3b7371['gvBUJ'](_0x1bcb45['scope'],_0x3b7371['XpjxN'])?getRangerHomeDir():_0x3b7371['nMWys'](getRangerDir),_0x507b3c=join(_0x3f5b5c,_0x6a86ff,_0x52a729),_0x53b99e={};if(_0x1bcb45[_0x42fc70(0x83)])for(const _0x4f750c of _0x1bcb45['setupHeader']){const _0xc84b3b=_0x4f750c['indexOf'](':');if(_0xc84b3b===-0x1)throw new Error(_0x42fc70(0xc8)+_0x4f750c+_0x42fc70(0x6e));const _0xf6ecdb=_0x4f750c['slice'](0x0,_0xc84b3b)['trim'](),_0x1bcab7=_0x4f750c[_0x42fc70(0x7a)](_0x3b7371[_0x42fc70(0x9b)](_0xc84b3b,0x1))[_0x42fc70(0x78)]();_0x53b99e[_0xf6ecdb]=_0x1bcab7;}const _0x4f6835=_0x3b7371[_0x42fc70(0x96)](join,_0x3f5b5c,_0x6a86ff);if(_0x3b7371[_0x42fc70(0xb9)](_0x1bcb45[_0x42fc70(0x99)],undefined)&&_0x3b7371['gvBUJ'](_0x1bcb45[_0x42fc70(0x99)]['trim'](),''))throw new Error(_0x3b7371[_0x42fc70(0x6f)]);if(_0x1bcb45['cdpEndpoint']&&_0x1bcb45[_0x42fc70(0xa4)])throw new Error(_0x3b7371['ZbmfS']);if(_0x1bcb45[_0x42fc70(0x99)]&&_0x1bcb45['ci'])throw new Error(_0x3b7371[_0x42fc70(0x87)]);const _0x43026a=_0x3b7371['JsBlZ'](Boolean,_0x1bcb45[_0x42fc70(0x99)]),_0x46f603=!_0x1bcb45[_0x42fc70(0xb5)]&&!_0x43026a,_0x4aa789=process[_0x42fc70(0x77)]['isTTY']&&process['stdout'][_0x42fc70(0xd0)];if(!_0x4aa789&&!_0x1bcb45[_0x42fc70(0xa4)]&&!_0x43026a)throw new Error('Please\x20provide\x20--url\x20when\x20running\x20in\x20non-interactive\x20mode.\x0aMake\x20sure\x20the\x20service\x20is\x20running\x20on\x20that\x20port\x20before\x20retrying.\x0aExample:\x20ranger\x20profile\x20add\x20local\x20--url\x20http://localhost:3000');const _0xdc9935=_0x3b7371[_0x42fc70(0xa6)](findExistingEnv,_0x52a729,{'rangerDir':_0x3f5b5c});let _0x5087aa=null;if(_0xdc9935){if(!_0x4aa789)_0x5087aa=_0xdc9935;else{if(_0xdc9935['location']===_0x6a86ff){const {overwrite:_0x26512e}=await _0x1eac44['prompt']([{'type':'confirm','name':'overwrite','message':_0x42fc70(0xa3)+_0x52a729+'\x22\x20already\x20exists.\x20Overwrite?','default':![]}]);if(!_0x26512e){console['log'](_0x3b7371[_0x42fc70(0xa2)]);return;}_0x5087aa=_0xdc9935;}else{const _0x2f4fa4=_0xdc9935['location']===_0x3b7371[_0x42fc70(0xe5)]?'root\x20(.ranger/)':_0xdc9935[_0x42fc70(0xcc)];console['error']('\x0a⚠️\x20\x20Profile\x20\x22'+_0x52a729+'\x22\x20already\x20exists\x20in\x20'+_0x2f4fa4+':\x20'+_0xdc9935[_0x42fc70(0x88)]),console[_0x42fc70(0xd6)](_0x42fc70(0x95)+_0x6a86ff+'\x20would\x20shadow\x20the\x20existing\x20profile.');const {shouldReplace:_0x4431b1}=await _0x1eac44['prompt']([{'type':_0x42fc70(0xe2),'name':_0x42fc70(0xdb),'message':_0x42fc70(0x75)+_0x6a86ff+'?','default':![]}]);if(!_0x4431b1){console['log'](_0x3b7371['wLqTR']);return;}_0x5087aa=_0xdc9935;}}}_0x2c51f9?.[_0x42fc70(0xe7)](_0x3b7371['APxiJ']);let _0x1174c3='';if(_0x43026a)console[_0x42fc70(0x93)](_0x3b7371[_0x42fc70(0x89)]),console['log']('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x1bcb45[_0x42fc70(0x99)]),console[_0x42fc70(0x93)]('\x20\x20Make\x20sure\x20your\x20Electron\x20app\x20(or\x20browser)\x20is\x20running\x20with\x20remote\x20debugging\x20enabled.\x0a');else{if(_0x1bcb45[_0x42fc70(0xa4)]){_0x1174c3=_0x1bcb45[_0x42fc70(0xa4)];const _0x45ec58=await _0x3b7371[_0x42fc70(0xe1)](checkUrlReachability,_0x1174c3);if(!_0x45ec58['ok']&&!_0x1bcb45['force'])throw new Error(_0x42fc70(0xbe)+_0x1174c3+':\x20'+_0x45ec58['error']+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x45ec58['ok']&&_0x1bcb45[_0x42fc70(0x97)]&&console['log'](_0x42fc70(0xba)+_0x1174c3+':\x20'+_0x45ec58[_0x42fc70(0xd6)]+_0x42fc70(0x92));}else{console[_0x42fc70(0x93)](_0x3b7371[_0x42fc70(0xd7)]),console[_0x42fc70(0x93)](_0x42fc70(0x73)),console['log'](_0x3b7371[_0x42fc70(0xb1)]);let _0x28e557=![];while(!![]){const _0x1e889f=await _0x1eac44['prompt']([{'type':'input','name':_0x42fc70(0x98),'message':_0x28e557?_0x42fc70(0xc3):'What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','default':_0x3b7371[_0x42fc70(0xbd)](_0x1174c3,_0x3b7371[_0x42fc70(0xb8)])}]);_0x1174c3=_0x1e889f['baseUrl'];const _0x4053cd=await _0x3b7371['DNgiO'](checkUrlReachability,_0x1174c3);if(_0x4053cd['ok'])break;const _0x529656=/^[a-zA-Z][\w+.-]*:\/\//['test'](_0x1174c3),_0x5dc5b2=_0x4053cd[_0x42fc70(0xd9)]&&!_0x529656,_0x28eab8=_0x5dc5b2?'http://'+_0x1174c3:null;_0x28e557=!![],console['log'](_0x42fc70(0xb0)+_0x1174c3+':\x20'+_0x4053cd['error']);_0x28eab8&&console[_0x42fc70(0x93)](_0x42fc70(0xd2)+_0x28eab8+'?');const {action:_0x1e3857}=await _0x1eac44[_0x42fc70(0x81)]([{'type':_0x42fc70(0xc6),'name':_0x42fc70(0xcd),'message':_0x3b7371[_0x42fc70(0x85)],'choices':[..._0x28eab8?[{'name':'Use\x20'+_0x28eab8,'value':_0x42fc70(0xb7)}]:[],{'name':_0x42fc70(0xd5),'value':_0x42fc70(0xc7)},{'name':_0x3b7371['XNFpD'],'value':'continue'}]}]);if(_0x3b7371['gvBUJ'](_0x1e3857,'use_suggestion')&&_0x28eab8){_0x1174c3=_0x28eab8;const _0x19fd9a=await _0x3b7371['JsBlZ'](checkUrlReachability,_0x1174c3);if(_0x19fd9a['ok'])break;console[_0x42fc70(0x93)]('\x0a\x20\x20Still\x20could\x20not\x20reach\x20'+_0x1174c3+':\x20'+_0x19fd9a['error']);}else{if(_0x1e3857===_0x3b7371[_0x42fc70(0xa0)])break;}}}}_0x2c51f9?.['trackPhaseEnd'](_0x42fc70(0xbb));const _0x516e14={};if(_0x5087aa){const _0x566019=await loadSettings(_0x52a729);Object[_0x42fc70(0x8a)](_0x516e14,_0x566019['setupHeaders']);}Object['assign'](_0x516e14,_0x53b99e),await _0x3b7371[_0x42fc70(0xe3)](mkdir,_0x4f6835,{'recursive':!![]});const _0x8810ef=await mkdtemp(join(_0x4f6835,'.tmp-'+_0x52a729+'-')),_0x189823=_0x3b7371['ydyTv'](join,_0x8810ef,_0x42fc70(0xad)),_0x2ca9a4=Boolean(_0x1174c3)&&/^https:\/\/localhost(:\d+)?/i[_0x42fc70(0xda)](_0x1174c3);try{if(_0x46f603){_0x2c51f9?.['trackPhaseStart'](_0x3b7371['cIJpA']),console[_0x42fc70(0x93)](_0x3b7371[_0x42fc70(0x72)]),console['log']('\x20\x20\x20A\x20browser\x20will\x20open.\x20Please\x20log\x20in\x20to\x20the\x20profile\x20you\x20want\x20to\x20test\x20so\x20Ranger\x20can\x20access\x20it.'),console['log']('\x20\x20\x20When\x20done\x20logging\x20in,\x20close\x20the\x20browser\x20to\x20save\x20the\x20session.');!_0x4aa789?(console[_0x42fc70(0x93)](_0x3b7371['mCmqg']),console['log'](_0x3b7371['ilMEQ'])):console['log']('');await new Promise(_0x24ce93=>setTimeout(_0x24ce93,0xbb8));const _0x5a26c3=[];_0x1bcb45[_0x42fc70(0xae)]&&_0x5a26c3[_0x42fc70(0xce)](_0x3b7371[_0x42fc70(0xa7)]);const _0x570eb4=_0x1bcb45['allowInsecureLocalhost']||_0x2ca9a4;_0x570eb4&&_0x5a26c3[_0x42fc70(0xce)]('--allow-insecure-localhost');const _0x383d2f=await chromium['launch']({'headless':![],..._0x5a26c3[_0x42fc70(0xa5)]>0x0?{'args':_0x5a26c3}:{}});try{const _0xc89ce0=Object[_0x42fc70(0xb4)](_0x516e14)['length']>0x0,_0x4b46c8={'ignoreHTTPSErrors':!![]};_0xc89ce0&&(_0x4b46c8['extraHTTPHeaders']=_0x516e14);const _0x127aa0=await _0x383d2f[_0x42fc70(0x9e)](_0x4b46c8);await _0x3b7371[_0x42fc70(0xdf)](addProfileSetupBanner,_0x127aa0);const _0x1c1c2c=await _0x127aa0[_0x42fc70(0xe6)]();await _0x1c1c2c[_0x42fc70(0xe8)](_0x3b7371['OezgP'](_0x1174c3,_0x3b7371['VrWna']));let _0x42e4e8=![];await new Promise(_0x4d1b5e=>{const _0x4f45c4=_0x42fc70;_0x1c1c2c['on'](_0x4f45c4(0xcb),async()=>{const _0x167785=_0x4f45c4;try{console[_0x167785(0x93)](_0x3b7371[_0x167785(0xc4)]),await _0x127aa0['storageState']({'path':_0x189823}),_0x42e4e8=!![];}catch{}_0x4d1b5e();});});if(!_0x42e4e8){console[_0x42fc70(0x93)](_0x3b7371['lbAFb']);!_0x1bcb45['safeMode']&&(console['log']('This\x20can\x20happen\x20due\x20to\x20a\x20browser\x20compatibility\x20issue\x20on\x20some\x20systems.\x0a'),console['log'](_0x3b7371[_0x42fc70(0x74)]),console['log']('\x20\x20ranger\x20profile\x20add\x20'+_0x52a729+_0x42fc70(0xaa)),console[_0x42fc70(0x93)](_0x42fc70(0x7d)+_0x52a729+'\x20--skip-auth\x20\x20\x20\x20(skip\x20browser\x20auth\x20entirely)\x0a'));throw new Error(_0x3b7371[_0x42fc70(0x7c)]);}}finally{await _0x383d2f[_0x42fc70(0xcb)]()[_0x42fc70(0xb2)](()=>{});}if(_0x534418){const _0x18f346=await _0x3b7371[_0x42fc70(0x71)](readFile,_0x189823,_0x3b7371[_0x42fc70(0x8f)]),_0x4d6889=await getToken();if(!_0x4d6889){console[_0x42fc70(0xd6)]('\x20\x20Could\x20not\x20encrypt:\x20No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]'),await _0x3b7371['FmGBB'](unlink,_0x189823)['catch'](()=>{});throw new Error(_0x3b7371['VDgPO']);}else{const _0x56cd3f=_0x3b7371['nDBHG'](encrypt,_0x18f346,_0x4d6889);await writeFile(_0x3b7371['DwYTv'](_0x189823,_0x3b7371['gRBnW']),_0x56cd3f),await unlink(_0x189823),console[_0x42fc70(0x93)](_0x42fc70(0x6d)+_0x189823+_0x42fc70(0x84)),console['log']('\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.'),console[_0x42fc70(0x93)](_0x42fc70(0x94));}}else console['log']('✓\x20Auth\x20state\x20saved\x20to:\x20'+_0x189823);_0x2c51f9?.['trackPhaseEnd'](_0x42fc70(0x8c));}_0x2c51f9?.['trackPhaseStart'](_0x3b7371[_0x42fc70(0x79)]);const _0x557939={};_0x1174c3&&(_0x557939['baseUrl']=_0x1174c3);_0x1bcb45[_0x42fc70(0x99)]&&(_0x557939['cdpEndpoint']=_0x1bcb45['cdpEndpoint'],_0x557939['isElectron']=!![]);(_0x1bcb45['allowInsecureLocalhost']||_0x2ca9a4)&&(_0x557939['allowInsecureLocalhost']=!![]);_0x1bcb45[_0x42fc70(0xae)]&&(_0x557939[_0x42fc70(0xae)]=!![]);_0x3b7371['SpdWA'](Object[_0x42fc70(0xb4)](_0x516e14)['length'],0x0)&&(_0x557939['setupHeaders']=_0x516e14);await _0x3b7371['ydyTv'](writeFile,_0x3b7371['QeVoF'](join,_0x8810ef,'settings.json'),JSON['stringify'](_0x557939,null,0x2)),console[_0x42fc70(0x93)](_0x42fc70(0x8e)+join(_0x507b3c,'settings.json'));if(_0x5087aa?.[_0x42fc70(0xcc)]===_0x6a86ff){const _0x408dfc=_0x5087aa[_0x42fc70(0x88)]+_0x42fc70(0xc9)+Date[_0x42fc70(0xd1)]();await rename(_0x5087aa['path'],_0x408dfc);try{await rename(_0x8810ef,_0x507b3c);}catch(_0xd3f53b){await _0x3b7371['zyPiJ'](rename,_0x408dfc,_0x5087aa['path']);throw _0xd3f53b;}try{await _0x3b7371['ydyTv'](rm,_0x408dfc,{'recursive':!![]});}catch{console[_0x42fc70(0x93)](_0x42fc70(0xe4)+_0x408dfc);}}else{await _0x3b7371['qyZoR'](rename,_0x8810ef,_0x507b3c);if(_0x5087aa)try{await _0x3b7371[_0x42fc70(0xac)](rm,_0x5087aa['path'],{'recursive':!![]}),console['log'](_0x42fc70(0xbc)+_0x5087aa['path']);}catch{console['log'](_0x42fc70(0xd4)+_0x5087aa['path']);}}try{await writeActiveProfileName(_0x52a729),console['log']('\x20\x20Set\x20active\x20profile:\x20'+_0x52a729);}catch{console['log']('Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.');}_0x2c51f9?.[_0x42fc70(0x91)](_0x42fc70(0xbf)),console['log']('\x0a\x20\x20Profile\x20\x22'+_0x52a729+_0x42fc70(0x70));}catch(_0x4d3b73){await _0x3b7371['OVsRq'](rm,_0x8810ef,{'recursive':!![],'force':!![]});throw _0x4d3b73;}}
|
|
1
|
+
function _0x48ca(_0x15546d,_0x416072){_0x15546d=_0x15546d-0x1f1;const _0x260a87=_0x260a();let _0x48cab7=_0x260a87[_0x15546d];return _0x48cab7;}(function(_0x31866b,_0x1c534f){const _0x464a8c=_0x48ca,_0x1bb601=_0x31866b();while(!![]){try{const _0x3a5eb5=-parseInt(_0x464a8c(0x251))/0x1+parseInt(_0x464a8c(0x229))/0x2+parseInt(_0x464a8c(0x209))/0x3*(parseInt(_0x464a8c(0x239))/0x4)+-parseInt(_0x464a8c(0x220))/0x5+-parseInt(_0x464a8c(0x20e))/0x6+-parseInt(_0x464a8c(0x217))/0x7*(-parseInt(_0x464a8c(0x1ff))/0x8)+parseInt(_0x464a8c(0x206))/0x9;if(_0x3a5eb5===_0x1c534f)break;else _0x1bb601['push'](_0x1bb601['shift']());}catch(_0x3b5f2e){_0x1bb601['push'](_0x1bb601['shift']());}}}(_0x260a,0x63714));import{readdir,rm}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0x72d912 from'inquirer';function _0x260a(){const _0x2ced13=['756760SsGnaA','indexOf','What\x20would\x20you\x20like\x20to\x20do?','trackPhaseEnd','zbPQw','ZXQru','url','4031748qWmChR','QJENR','\x20\x20To\x20get\x20automated\x20login\x20set\x20up\x20for\x20your\x20team\x20(a\x20one-time\x20call):\x20eng@ranger.net\x0a','3pHsmLz','Use\x20','cASfG','for\x20you,\x20so\x20the\x20encrypted-CI\x20flow\x20is\x20unnecessary.\x0a','trim','3282150eOucTP','env','environments','wPAhk','lIGLa','name','log','setupHeaders','Found\x20auth\x20environment\x20\x27','35kjiAha','\x20--url\x20','GUukE','manual','XUAvz','cdpEndpoint','jxToh','prompt','baseUrl','1252380EsNWxc','\x20\x20https://docs.ranger.net/main/concepts/profiles','ewiiB','Hzpba','profile.add.autoRouteSkipped','confirm','sOyWx','RfViH','`\x20again\x20without\x20--skip-auth.','901096OoqUGE','message','lpPYi','Warning:\x20Profile\x20created,\x20but\x20failed\x20to\x20mark\x20it\x20as\x20active.','For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a','--cdp-endpoint\x20must\x20not\x20be\x20empty.\x20Provide\x20the\x20CDP\x20URL,\x20e.g.\x20--cdp-endpoint\x20http://localhost:9222','\x20\x20Did\x20you\x20mean\x20','hiEEe','profile.add.autoRouted','\x20\x20Note:\x20cloud\x20profile\x20created,\x20but\x20failed\x20to\x20sweep\x20orphan\x20local\x20dirs\x20(','\x0a✓\x20Profile\x20\x27','\x22\x20already\x20exists.\x20Choose\x20a\x20different\x20name\x20or\x20delete\x20the\x20existing\x20profile\x20first.','\x22:\x20','http://','\x0a\x20\x20Still\x20could\x20not\x20reach\x20','NODE_TLS_REJECT_UNAUTHORIZED','24212nmAzRc','iYIxR','\x20\x20Details:\x20https://docs.ranger.net/main/concepts/profiles#automated-login','VQnJc','JExYi','.tmp-','jUVIn','http://localhost:3000','origin','xFUJl','TFtTE','\x20\x20Cleaned\x20up\x20orphan\x20local\x20profile\x20at\x20','test','UajKT','\x0a\x20\x20Failed\x20to\x20create\x20cloud\x20profile\x20\x22','EJoUh','\x20\x20Ranger\x20will\x20use\x20it\x20to\x20look\x20up\x20the\x20right\x20cloud\x20auth\x20env\x20to\x20attach.\x0a','stdout','continue','zhvkH','jxALd','\x27\x20to\x20the\x20cloud?','✓\x20Profile\x20\x27','Enter\x20a\x20new\x20URL\x20(or\x20press\x20enter\x20to\x20keep\x20current):','172731uBYxXi','slice','use_suggestion','Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team.\x20Capture\x20a\x20session\x20via\x20a\x20headed\x20browser\x20instead?','\x0a\x20\x20A\x20cloud\x20profile\x20named\x20\x22','skipAuth','Mvynb','sBpIB','GCnWN','domains','exit','force','KBLOt','setupHeader','gtkBH','keys','join','signal','\x20\x20When\x20you\x27re\x20ready\x20to\x20log\x20in,\x20run\x20`ranger\x20profile\x20add\x20','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20session,\x0a','To\x20set\x20up\x20a\x20profile,\x20run:\x0a','local','LhOHa','wItDV','\x20\x20or\x20contact\x20eng@ranger.net\x20to\x20set\x20up\x20automated\x20login\x20for\x20your\x20team.','dqMAZ','isProtocolError','error','status','Ussdo','isTTY','length','user_declined','abort','PyRGA','gCqSk','\x0a\x20\x20Declined.\x20Re-run\x20with\x20--skip-auth\x20to\x20create\x20a\x20profile\x20without\x20a\x20cloud-managed\x20session.','\x0a\x20\x20Could\x20not\x20reach\x20'];_0x260a=function(){return _0x2ced13;};return _0x260a();}import{getRangerDir,getRangerHomeDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';import{fetchAuthConfig,createCloudProfile,manualBrowserLogin,ApiError}from'./utils/cloudProfile.js';import{matchAuthEnvironment}from'./utils/matchAuthEnvironment.js';import{isPathGitTracked}from'./utils/gitTracked.js';import{setProfileOverride}from'./utils/projectsConfig.js';async function checkUrlReachability(_0x259c84){const _0x21fea1=_0x48ca,_0x1dfe0f={'RfViH':'HEAD','ewiiB':_0x21fea1(0x21a),'VKUnq':function(_0xd4f652,_0x1f4d5d,_0x4cdeda){return _0xd4f652(_0x1f4d5d,_0x4cdeda);},'nvkkK':function(_0x11df8f,_0x1a7135){return _0x11df8f(_0x1a7135);},'ghbnh':function(_0x31f050,_0x15b8c6){return _0x31f050<_0x15b8c6;},'JExYi':'Invalid\x20URL','lkQSo':'fetch\x20failed'};try{const _0x438d7d=new AbortController(),_0x4c68b6=setTimeout(()=>_0x438d7d[_0x21fea1(0x1fa)](),0x1388),_0x56a418={'method':_0x1dfe0f[_0x21fea1(0x227)],'signal':_0x438d7d[_0x21fea1(0x262)],'redirect':_0x1dfe0f[_0x21fea1(0x222)]};/^https:\/\/localhost(:\d+)?/i[_0x21fea1(0x245)](_0x259c84)&&(process['env']['NODE_TLS_REJECT_UNAUTHORIZED']='0');const _0x1dd188=await _0x1dfe0f['VKUnq'](fetch,_0x259c84,_0x56a418);delete process[_0x21fea1(0x20f)][_0x21fea1(0x238)],_0x1dfe0f['nvkkK'](clearTimeout,_0x4c68b6);if(_0x1dfe0f['ghbnh'](_0x1dd188[_0x21fea1(0x1f5)],0x190))return{'ok':!![]};return{'ok':![],'error':'HTTP\x20'+_0x1dd188['status']};}catch(_0x18d711){delete process[_0x21fea1(0x20f)][_0x21fea1(0x238)];const _0x37082f=_0x18d711,_0x2fcd40=_0x37082f['message']||String(_0x18d711),_0x2754ac=_0x2fcd40['includes'](_0x1dfe0f[_0x21fea1(0x23d)])||_0x37082f[_0x21fea1(0x213)]==='TypeError'||_0x2fcd40['includes'](_0x1dfe0f['lkQSo']);return{'ok':![],'error':_0x2fcd40,'isProtocolError':_0x2754ac};}}async function sweepOrphanLocalProfile(_0x1da532,_0x38702f,_0xf1887e){const _0x451cb7=_0x48ca,_0x5387c4={'gtkBH':_0x451cb7(0x266),'rsONk':function(_0x16c66d,_0xe9479f,_0x4e6284){return _0x16c66d(_0xe9479f,_0x4e6284);},'dqMAZ':function(_0x11a5c7,_0x52509c){return _0x11a5c7(_0x52509c);},'sBpIB':function(_0xcad340,_0x5b98b9,_0x471262){return _0xcad340(_0x5b98b9,_0x471262);},'PyRGA':function(_0x6c5e79,_0x2dadef){return _0x6c5e79(_0x2dadef);}},_0x5381e9=join(_0x38702f,_0x5387c4[_0x451cb7(0x25f)]),_0xb60c82=_0x5387c4['rsONk'](join,_0x5381e9,_0x1da532);_0x5387c4[_0x451cb7(0x1f2)](existsSync,_0xb60c82)&&(_0xf1887e&&await isPathGitTracked(_0xb60c82)?console['log']('\x20\x20Note:\x20found\x20git-tracked\x20local\x20profile\x20at\x20'+_0xb60c82+'\x20—\x20not\x20removing.\x20Delete\x20manually\x20if\x20you\x20want\x20it\x20gone.'):(await _0x5387c4[_0x451cb7(0x258)](rm,_0xb60c82,{'recursive':!![],'force':!![]}),console[_0x451cb7(0x214)](_0x451cb7(0x244)+_0xb60c82)));if(_0x5387c4[_0x451cb7(0x1fb)](existsSync,_0x5381e9)){let _0x1d33bc=[];try{_0x1d33bc=await _0x5387c4[_0x451cb7(0x1f2)](readdir,_0x5381e9);}catch{return;}const _0x227998=_0x451cb7(0x23e)+_0x1da532+'-';for(const _0x5bfa55 of _0x1d33bc){if(!_0x5bfa55['startsWith'](_0x227998))continue;const _0x57dabe=join(_0x5381e9,_0x5bfa55);await rm(_0x57dabe,{'recursive':!![],'force':!![]}),console['log'](_0x451cb7(0x244)+_0x57dabe);}}}async function sweepOrphansBestEffort(_0x13e90d){const _0x5549af=_0x48ca,_0x42049b={'XNCdq':function(_0x5c6ac0){return _0x5c6ac0();},'wPAhk':function(_0x4fb46e){return _0x4fb46e();},'lIGLa':function(_0x5f4f23,_0x5114a5){return _0x5f4f23(_0x5114a5);}};try{await sweepOrphanLocalProfile(_0x13e90d,_0x42049b['XNCdq'](getRangerHomeDir),![]);const _0x4976d7=_0x42049b[_0x5549af(0x211)](getRangerDir);_0x4976d7!==_0x42049b[_0x5549af(0x211)](getRangerHomeDir)&&await sweepOrphanLocalProfile(_0x13e90d,_0x4976d7,!![]);}catch(_0x3e3799){console[_0x5549af(0x214)](_0x5549af(0x232)+(_0x3e3799 instanceof Error?_0x3e3799[_0x5549af(0x22a)]:_0x42049b[_0x5549af(0x212)](String,_0x3e3799))+').');}}async function markActive(_0x49f289){const _0x300e64=_0x48ca;try{await writeActiveProfileName(_0x49f289),console['log']('\x20\x20Set\x20active\x20profile:\x20'+_0x49f289);}catch{console[_0x300e64(0x214)](_0x300e64(0x22c));}}async function tryAutoRouteCloudProfile(_0xcbfd6d,_0x6c84c3,_0x35c16c,_0x209960,_0x48df52){const _0x44b2c3=_0x48ca,_0x5f837a={'RSdGf':function(_0x14870e){return _0x14870e();},'GCnWN':'no_auth_config','Hzpba':function(_0xd6bb48,_0x4461e9){return _0xd6bb48===_0x4461e9;},'LhOHa':'profile.add.autoRouteSkipped','XUAvz':function(_0x417c0b,_0x5e84aa){return _0x417c0b+_0x5e84aa;},'dzavu':function(_0xc5bdd8,_0xf0d819){return _0xc5bdd8+_0xf0d819;},'xFUJl':'\x0a\x20\x20Automated\x20login\x20isn\x27t\x20set\x20up\x20for\x20your\x20team\x20yet\x20—\x20that\x27s\x20the\x20path\x20that\x20lets\x20Ranger\x20log\x20into\x20your\x20app\x20for\x20you\x20in\x20CI\x20/\x20background\x20agents.\x0a','hiEEe':_0x44b2c3(0x208),'lpPYi':'saveToCloud','jxToh':_0x44b2c3(0x1fd),'zbPQw':function(_0x53c1b5,_0x51c594,_0x51eb4d,_0x5f389f){return _0x53c1b5(_0x51c594,_0x51eb4d,_0x5f389f);},'YpwMf':function(_0x460f5d,_0x4321d7){return _0x460f5d(_0x4321d7);}};let _0x5b4036;try{_0x5b4036=await _0x5f837a['RSdGf'](fetchAuthConfig);}catch(_0x73ed33){return _0x48df52?.[_0x44b2c3(0x202)]('profile.add.autoRouteSkipped',{'reason':_0x5f837a[_0x44b2c3(0x259)],'profileName':_0xcbfd6d}),console[_0x44b2c3(0x1f4)]('\x0a\x20\x20Could\x20not\x20fetch\x20this\x20org\x27s\x20auth\x20config:\x20'+(_0x73ed33 instanceof Error?_0x73ed33['message']:String(_0x73ed33))),![];}if(!_0x5b4036||!_0x5b4036['environments']||_0x5f837a[_0x44b2c3(0x223)](Object['keys'](_0x5b4036[_0x44b2c3(0x210)])[_0x44b2c3(0x1f8)],0x0)){if(_0x209960)return await captureEnvLessProfile(_0xcbfd6d,_0x6c84c3,_0x35c16c,_0x48df52);return _0x48df52?.['trackPhaseEnd'](_0x5f837a[_0x44b2c3(0x267)],{'reason':'no_auth_config','profileName':_0xcbfd6d}),console['error'](_0x5f837a[_0x44b2c3(0x21b)](_0x5f837a['dzavu'](_0x5f837a['dzavu'](_0x5f837a[_0x44b2c3(0x242)]+'\x0a'+'\x20\x20Workaround\x20for\x20now:\x20create\x20a\x20profile\x20without\x20a\x20captured\x20session\x20and\x20supply\x20one\x20later:\x0a','\x20\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20'+_0xcbfd6d+_0x44b2c3(0x218)+_0x6c84c3+'\x20--skip-auth\x0a'),'\x0a'),_0x5f837a[_0x44b2c3(0x230)])+_0x44b2c3(0x23b)),![];}const _0x170190=matchAuthEnvironment(_0x6c84c3,_0x5b4036);if(!_0x170190)return _0x48df52?.['trackPhaseEnd'](_0x44b2c3(0x224),{'reason':'no_match','profileName':_0xcbfd6d}),console['error']('\x0a\x20\x20No\x20auth\x20env\x20matches\x20'+_0x6c84c3+'.\x20Configured\x20envs:\x20'+Object['keys'](_0x5b4036[_0x44b2c3(0x210)])[_0x44b2c3(0x261)](',\x20')+'.'),![];const _0x3b2431=_0x5b4036[_0x44b2c3(0x210)][_0x170190],_0x1b6445=_0x3b2431?.[_0x44b2c3(0x25a)]??[];if(_0x209960&&!_0x35c16c['yes']){const {saveToCloud:_0x2e5fb9}=await _0x72d912[_0x44b2c3(0x21e)]([{'type':_0x44b2c3(0x225),'name':_0x5f837a[_0x44b2c3(0x22b)],'message':_0x44b2c3(0x216)+_0x170190+'\x27\x20matching\x20'+_0x6c84c3+'\x0a\x20\x20(domains:\x20'+_0x1b6445[_0x44b2c3(0x261)](',\x20')+')\x0a\x20\x20Save\x20\x27'+_0xcbfd6d+_0x44b2c3(0x24e),'default':!![]}]);if(!_0x2e5fb9)return _0x48df52?.['trackPhaseEnd'](_0x5f837a[_0x44b2c3(0x267)],{'reason':_0x44b2c3(0x1f9),'profileName':_0xcbfd6d}),console[_0x44b2c3(0x1f4)](_0x5f837a[_0x44b2c3(0x21d)]),![];}const _0x1b3714=_0x1b6445['some'](_0x1320f6=>{const _0x363f5a=_0x44b2c3;try{return new URL(_0x1320f6)[_0x363f5a(0x241)]===new URL(_0x6c84c3)[_0x363f5a(0x241)];}catch{return![];}}),_0x16a831={};!_0x1b3714&&(_0x16a831[_0x44b2c3(0x21f)]=_0x6c84c3);try{await _0x5f837a[_0x44b2c3(0x203)](createCloudProfile,_0xcbfd6d,_0x170190,{'settings':_0x16a831});}catch(_0x406c4d){if(_0x406c4d instanceof ApiError&&_0x406c4d[_0x44b2c3(0x1f5)]===0x199){console[_0x44b2c3(0x1f4)]('\x0a\x20\x20A\x20cloud\x20profile\x20named\x20\x22'+_0xcbfd6d+_0x44b2c3(0x234));throw _0x406c4d;}throw _0x406c4d;}return console[_0x44b2c3(0x214)](_0x44b2c3(0x24f)+_0xcbfd6d+'\x27\x20created.\x0a'+('\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0xcbfd6d)),await _0x5f837a['YpwMf'](sweepOrphansBestEffort,_0xcbfd6d),_0x48df52?.['trackPhaseEnd'](_0x44b2c3(0x231),{'envKey':_0x170190,'profileName':_0xcbfd6d}),!![];}async function createUnconfiguredCloudProfile(_0x3df749,_0x4237d0){const _0x446c36=_0x48ca,_0x4b0628={'sOyWx':function(_0x4e861b,_0x1ccab2){return _0x4e861b===_0x1ccab2;}};try{await createCloudProfile(_0x3df749,undefined,{'settings':_0x4237d0});}catch(_0x4979b5){_0x4979b5 instanceof ApiError&&_0x4b0628[_0x446c36(0x226)](_0x4979b5[_0x446c36(0x1f5)],0x199)&&console['error'](_0x446c36(0x255)+_0x3df749+'\x22\x20already\x20exists.\x20Choose\x20a\x20different\x20name\x20or\x20delete\x20the\x20existing\x20profile\x20first.');throw _0x4979b5;}}async function captureEnvLessProfile(_0x19fe41,_0x58bb18,_0x11303b,_0x45c52a){const _0x3596bd=_0x48ca,_0x31990e={'luCSF':'capture','oePBX':'user_declined','eMFUf':function(_0x4b49d4,_0x1a0216){return _0x4b49d4+_0x1a0216;},'plQCG':function(_0x513a54,_0x163037){return _0x513a54===_0x163037;},'PYajg':function(_0x25a8bf,_0x541309){return _0x25a8bf>_0x541309;},'flWmJ':function(_0x32cfb8,_0x3cd880,_0x50a5f5,_0x28c259){return _0x32cfb8(_0x3cd880,_0x50a5f5,_0x28c259);},'UGfGd':function(_0x33dae2,_0x1698c1,_0x19bc53){return _0x33dae2(_0x1698c1,_0x19bc53);},'GUukE':function(_0x398bcf,_0x301641){return _0x398bcf>_0x301641;}};if(!_0x11303b['yes']){const {capture:_0x36dee2}=await _0x72d912[_0x3596bd(0x21e)]([{'type':_0x3596bd(0x225),'name':_0x31990e['luCSF'],'message':_0x3596bd(0x254),'default':!![]}]);if(!_0x36dee2)return _0x45c52a?.['trackPhaseEnd']('profile.add.autoRouteSkipped',{'reason':_0x31990e['oePBX'],'profileName':_0x19fe41}),console['error'](_0x31990e['eMFUf'](_0x3596bd(0x264),_0x3596bd(0x1f1))),![];}const _0x15c818={};if(_0x11303b[_0x3596bd(0x25e)])for(const _0x1c3d4a of _0x11303b[_0x3596bd(0x25e)]){const _0x1f48a5=_0x1c3d4a[_0x3596bd(0x200)](':');if(_0x31990e['plQCG'](_0x1f48a5,-0x1))continue;_0x15c818[_0x1c3d4a['slice'](0x0,_0x1f48a5)['trim']()]=_0x1c3d4a[_0x3596bd(0x252)](_0x1f48a5+0x1)[_0x3596bd(0x20d)]();}const _0x525463={'baseUrl':_0x58bb18};_0x31990e['PYajg'](Object[_0x3596bd(0x260)](_0x15c818)[_0x3596bd(0x1f8)],0x0)&&(_0x525463['setupHeaders']=_0x15c818);let _0x311f47;try{_0x311f47=await _0x31990e['flWmJ'](createCloudProfile,_0x19fe41,undefined,{'settings':_0x525463});}catch(_0x470f15){_0x470f15 instanceof ApiError&&_0x31990e['plQCG'](_0x470f15[_0x3596bd(0x1f5)],0x199)&&console['error'](_0x3596bd(0x255)+_0x19fe41+_0x3596bd(0x234));throw _0x470f15;}return await _0x31990e['UGfGd'](manualBrowserLogin,_0x311f47,{'key':'','domains':[_0x58bb18],'setupHeaders':_0x31990e[_0x3596bd(0x219)](Object['keys'](_0x15c818)[_0x3596bd(0x1f8)],0x0)?_0x15c818:undefined}),console[_0x3596bd(0x214)](_0x3596bd(0x233)+_0x19fe41+'\x27\x20created\x20with\x20a\x20captured\x20session.\x0a'+('\x20\x20Next:\x20ranger\x20go\x20--profile\x20'+_0x19fe41)),await sweepOrphansBestEffort(_0x19fe41),_0x45c52a?.['trackPhaseEnd'](_0x3596bd(0x231),{'envKey':null,'profileName':_0x19fe41}),!![];}export async function addEnv(_0x300fba,_0x1607e4={},_0x2fb957){const _0x31ba3b=_0x48ca,_0x5eafc4={'iYIxR':function(_0x5866fc,_0x3b1616){return _0x5866fc+_0x3b1616;},'CznuZ':function(_0x1de358,_0x3cd2b6){return _0x1de358+_0x3cd2b6;},'zhvkH':'The\x20--ci\x20flag\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x20session\x20state\x0a','lUiKy':_0x31ba3b(0x20c),'QJENR':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a','bVxBX':'\x0a🔌\x20CDP\x20Profile\x20Setup\x0a','JnHDJ':function(_0x343967,_0x15c90e){return _0x343967>_0x15c90e;},'UajKT':function(_0x4e0bdd,_0xd72de5,_0x4cc781){return _0x4e0bdd(_0xd72de5,_0x4cc781);},'ZXQru':function(_0x17b89a,_0x1a1672,_0x5e995f,_0x35f43a,_0x410a61){return _0x17b89a(_0x1a1672,_0x5e995f,_0x35f43a,_0x410a61);},'jUVIn':function(_0x28ea4c,_0x2568e0){return _0x28ea4c instanceof _0x2568e0;},'wItDV':function(_0xea34f4,_0x400c42){return _0xea34f4(_0x400c42);},'jxALd':function(_0x57b3b2,_0x4dcc75){return _0x57b3b2+_0x4dcc75;},'InDWV':'\x20\x20Make\x20sure\x20your\x20app\x20is\x20running\x20locally\x20before\x20continuing.','OJWeW':_0x31ba3b(0x249),'bamFi':'input','dtaAd':_0x31ba3b(0x250),'VQnJc':function(_0xc0c12f,_0x4b6d63){return _0xc0c12f||_0x4b6d63;},'TFtTE':function(_0x4e68c2,_0x24a923){return _0x4e68c2(_0x24a923);},'EJoUh':'list','cASfG':_0x31ba3b(0x253),'Mvynb':'Enter\x20a\x20different\x20URL','Ussdo':_0x31ba3b(0x24b),'KBLOt':function(_0x42db08,_0x382990){return _0x42db08===_0x382990;},'gCqSk':function(_0x1403cc,_0x22f71d){return _0x1403cc(_0x22f71d);}};_0x1607e4['ci']&&(console['error'](_0x5eafc4['iYIxR'](_0x5eafc4['iYIxR'](_0x5eafc4[_0x31ba3b(0x23a)](_0x5eafc4[_0x31ba3b(0x23a)](_0x5eafc4['CznuZ'](_0x5eafc4[_0x31ba3b(0x24c)],_0x5eafc4['lUiKy'])+'\x0a',_0x31ba3b(0x265)),_0x5eafc4[_0x31ba3b(0x207)]),'\x0a'),_0x31ba3b(0x22d))+_0x31ba3b(0x221)),process[_0x31ba3b(0x25b)](0x1));const _0x3c48dd={};if(_0x1607e4['setupHeader'])for(const _0x2379d0 of _0x1607e4['setupHeader']){const _0x2c1790=_0x2379d0[_0x31ba3b(0x200)](':');if(_0x2c1790===-0x1)throw new Error('Invalid\x20--setup-header\x20format:\x20\x22'+_0x2379d0+'\x22.\x20Expected\x20\x22Name:\x20Value\x22.');const _0x526f61=_0x2379d0[_0x31ba3b(0x252)](0x0,_0x2c1790)['trim'](),_0x4c9ad6=_0x2379d0['slice'](_0x2c1790+0x1)['trim']();_0x3c48dd[_0x526f61]=_0x4c9ad6;}if(_0x1607e4[_0x31ba3b(0x21c)]!==undefined&&_0x1607e4[_0x31ba3b(0x21c)]['trim']()==='')throw new Error(_0x31ba3b(0x22e));if(_0x1607e4[_0x31ba3b(0x21c)]&&_0x1607e4['url'])throw new Error('--url\x20and\x20--cdp-endpoint\x20are\x20mutually\x20exclusive.\x20Use\x20--url\x20for\x20web\x20apps\x20or\x20--cdp-endpoint\x20for\x20Electron/CDP\x20apps,\x20not\x20both.');const _0x22c229=Boolean(_0x1607e4['cdpEndpoint']),_0xa6d41f=process['stdin'][_0x31ba3b(0x1f7)]&&process[_0x31ba3b(0x24a)][_0x31ba3b(0x1f7)];if(!_0xa6d41f&&!_0x1607e4[_0x31ba3b(0x205)]&&!_0x22c229&&!_0x1607e4[_0x31ba3b(0x256)])throw new Error('Please\x20provide\x20--url\x20when\x20running\x20in\x20non-interactive\x20mode.\x0aMake\x20sure\x20the\x20service\x20is\x20running\x20on\x20that\x20port\x20before\x20retrying.\x0aExample:\x20ranger\x20profile\x20add\x20local\x20--url\x20http://localhost:3000');if(_0x22c229){const _0x45b9c5=_0x1607e4['cdpEndpoint'];console[_0x31ba3b(0x214)](_0x5eafc4['bVxBX']),console[_0x31ba3b(0x214)]('\x20\x20Configuring\x20Ranger\x20to\x20connect\x20to:\x20'+_0x45b9c5);const _0x2f8f7e={'cdpEndpoint':_0x45b9c5,'isElectron':!![]};_0x5eafc4['JnHDJ'](Object[_0x31ba3b(0x260)](_0x3c48dd)['length'],0x0)&&(_0x2f8f7e[_0x31ba3b(0x215)]=_0x3c48dd);await _0x5eafc4[_0x31ba3b(0x246)](createUnconfiguredCloudProfile,_0x300fba,_0x2f8f7e);try{_0x5eafc4[_0x31ba3b(0x204)](setProfileOverride,process['cwd'](),_0x300fba,_0x31ba3b(0x21c),_0x45b9c5),_0x5eafc4[_0x31ba3b(0x204)](setProfileOverride,process['cwd'](),_0x300fba,'isElectron',!![]);}catch(_0x79a79a){console[_0x31ba3b(0x1f4)]('\x0a\x20\x20Cloud\x20profile\x20created,\x20but\x20failed\x20to\x20write\x20per-cwd\x20CDP\x20override\x20to\x20projects.json:\x20'+(_0x5eafc4[_0x31ba3b(0x23f)](_0x79a79a,Error)?_0x79a79a[_0x31ba3b(0x22a)]:String(_0x79a79a)));}console['log']('✓\x20Cloud\x20profile\x20\x27'+_0x300fba+'\x27\x20created\x20(CDP).'),await _0x5eafc4['wItDV'](sweepOrphansBestEffort,_0x300fba),await _0x5eafc4[_0x31ba3b(0x268)](markActive,_0x300fba);return;}if(_0x1607e4['skipAuth']){const _0x219046={};_0x1607e4[_0x31ba3b(0x205)]&&(_0x219046[_0x31ba3b(0x21f)]=_0x1607e4['url']);Object[_0x31ba3b(0x260)](_0x3c48dd)['length']>0x0&&(_0x219046[_0x31ba3b(0x215)]=_0x3c48dd);await createUnconfiguredCloudProfile(_0x300fba,_0x219046),console['log'](_0x5eafc4[_0x31ba3b(0x24d)](_0x31ba3b(0x24f)+_0x300fba+'\x27\x20created\x20(no\x20session).\x0a',_0x31ba3b(0x263)+_0x300fba+_0x31ba3b(0x228))),await sweepOrphansBestEffort(_0x300fba),await markActive(_0x300fba);return;}if(_0x1607e4[_0x31ba3b(0x205)]){const _0x32ffcd=_0x1607e4[_0x31ba3b(0x205)],_0x38b3fc=await _0x5eafc4['wItDV'](checkUrlReachability,_0x32ffcd);if(!_0x38b3fc['ok']&&!_0x1607e4['force'])throw new Error('Could\x20not\x20reach\x20'+_0x32ffcd+':\x20'+_0x38b3fc['error']+'\x0aMake\x20sure\x20your\x20app\x20is\x20running,\x20then\x20try\x20again.\x20To\x20skip\x20this\x20check,\x20pass\x20--force.');!_0x38b3fc['ok']&&_0x1607e4[_0x31ba3b(0x25c)]&&console['log']('⚠\x20Could\x20not\x20reach\x20'+_0x32ffcd+':\x20'+_0x38b3fc['error']+'\x20(continuing\x20with\x20--force)');}else{console[_0x31ba3b(0x214)]('\x0a🌐\x20Profile\x20Setup\x0a'),console[_0x31ba3b(0x214)](_0x5eafc4['InDWV']),console['log'](_0x5eafc4['OJWeW']);let _0xc1ef00='',_0x22aa3b=![];while(!![]){const _0x11ed8d=await _0x72d912['prompt']([{'type':_0x5eafc4['bamFi'],'name':'baseUrl','message':_0x22aa3b?_0x5eafc4['dtaAd']:'What\x20is\x20the\x20URL\x20of\x20your\x20running\x20app?','default':_0x5eafc4[_0x31ba3b(0x23c)](_0xc1ef00,_0x31ba3b(0x240))}]);_0xc1ef00=_0x11ed8d[_0x31ba3b(0x21f)];const _0x5a4048=await _0x5eafc4['TFtTE'](checkUrlReachability,_0xc1ef00);if(_0x5a4048['ok'])break;const _0x2674bb=/^[a-zA-Z][\w+.-]*:\/\//[_0x31ba3b(0x245)](_0xc1ef00),_0x1f791e=_0x5a4048[_0x31ba3b(0x1f3)]&&!_0x2674bb,_0x3da0bc=_0x1f791e?_0x31ba3b(0x236)+_0xc1ef00:null;_0x22aa3b=!![],console['log'](_0x31ba3b(0x1fe)+_0xc1ef00+':\x20'+_0x5a4048['error']);_0x3da0bc&&console[_0x31ba3b(0x214)](_0x31ba3b(0x22f)+_0x3da0bc+'?');const {action:_0x230062}=await _0x72d912[_0x31ba3b(0x21e)]([{'type':_0x5eafc4[_0x31ba3b(0x248)],'name':'action','message':_0x31ba3b(0x201),'choices':[..._0x3da0bc?[{'name':_0x31ba3b(0x20a)+_0x3da0bc,'value':_0x5eafc4[_0x31ba3b(0x20b)]}]:[],{'name':_0x5eafc4[_0x31ba3b(0x257)],'value':'retry'},{'name':'Continue\x20anyway','value':_0x5eafc4[_0x31ba3b(0x1f6)]}]}]);if(_0x230062===_0x31ba3b(0x253)&&_0x3da0bc){_0xc1ef00=_0x3da0bc;const _0x4dba1c=await checkUrlReachability(_0xc1ef00);if(_0x4dba1c['ok'])break;console[_0x31ba3b(0x214)](_0x31ba3b(0x237)+_0xc1ef00+':\x20'+_0x4dba1c['error']);}else{if(_0x5eafc4[_0x31ba3b(0x25d)](_0x230062,'continue'))break;}}_0x1607e4={..._0x1607e4,'url':_0xc1ef00};}let _0xcef6d8=![];try{_0xcef6d8=await tryAutoRouteCloudProfile(_0x300fba,_0x1607e4['url'],_0x1607e4,_0xa6d41f,_0x2fb957);}catch(_0x252ddf){console['error'](_0x31ba3b(0x247)+_0x300fba+_0x31ba3b(0x235)+(_0x5eafc4[_0x31ba3b(0x23f)](_0x252ddf,Error)?_0x252ddf[_0x31ba3b(0x22a)]:_0x5eafc4[_0x31ba3b(0x1fc)](String,_0x252ddf))),process['exit'](0x1);}!_0xcef6d8&&process[_0x31ba3b(0x25b)](0x1),await _0x5eafc4[_0x31ba3b(0x243)](markActive,_0x300fba);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x3c9d(){var _0x534b57=['4093590LSdBTe','ranger\x20profile\x20encrypt-auth\x20is\x20no\x20longer\x20supported.\x20Ranger\x20now\x20manages\x0a','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a','5966982ElSXcA','\x20\x20https://docs.ranger.net/main/concepts/profiles','ITBiH','10195uolVoR','990SNNIPf','51196dieIAz','KqCNx','51mHtPSk','1729360LWidhz','session\x20state\x20for\x20you,\x20so\x20encrypted\x20on-disk\x20auth\x20is\x20unnecessary.\x0a','2HDTjrg','2535030lqDHXB','46210mHMKix'];_0x3c9d=function(){return _0x534b57;};return _0x3c9d();}function _0x3156(_0x2e0697,_0x3ea30f){_0x2e0697=_0x2e0697-0x1e3;var _0x3c9d11=_0x3c9d();var _0x31563a=_0x3c9d11[_0x2e0697];return _0x31563a;}(function(_0x32b7d7,_0x1c0932){var _0x94e014=_0x3156,_0x444ebc=_0x32b7d7();while(!![]){try{var _0xbf1ff2=-parseInt(_0x94e014(0x1e3))/0x1*(parseInt(_0x94e014(0x1e5))/0x2)+-parseInt(_0x94e014(0x1f0))/0x3*(-parseInt(_0x94e014(0x1ee))/0x4)+-parseInt(_0x94e014(0x1ec))/0x5*(-parseInt(_0x94e014(0x1ed))/0x6)+parseInt(_0x94e014(0x1e9))/0x7+-parseInt(_0x94e014(0x1f1))/0x8+-parseInt(_0x94e014(0x1e4))/0x9+-parseInt(_0x94e014(0x1e6))/0xa;if(_0xbf1ff2===_0x1c0932)break;else _0x444ebc['push'](_0x444ebc['shift']());}catch(_0x3884a9){_0x444ebc['push'](_0x444ebc['shift']());}}}(_0x3c9d,0x6e9ab));export async function authEncrypt(_0xe2f21){var _0x5369d0=_0x3156,_0x5e91f6={'Niijl':function(_0x2c65fe,_0x3b6eed){return _0x2c65fe+_0x3b6eed;},'ITBiH':function(_0x1de21b,_0x272c46){return _0x1de21b+_0x272c46;},'KqCNx':_0x5369d0(0x1e7),'WIFxA':_0x5369d0(0x1f2),'UwDuF':_0x5369d0(0x1e8),'HDHoe':'\x20\x20ranger\x20profile\x20add\x20<name>\x0a'};console['error'](_0x5e91f6['Niijl'](_0x5e91f6[_0x5369d0(0x1eb)](_0x5e91f6[_0x5369d0(0x1ef)],_0x5e91f6['WIFxA'])+'\x0a'+_0x5e91f6['UwDuF']+_0x5e91f6['HDHoe']+'\x0a'+'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a',_0x5369d0(0x1ea))),process['exit'](0x1);}
|
package/build/commands/clean.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x3ac242=_0x129a;(function(_0x55979e,_0x4478fd){const _0x12c0c1=_0x129a,_0x1569f4=_0x55979e();while(!![]){try{const _0x49e743=-parseInt(_0x12c0c1(0xfe))/0x1*(-parseInt(_0x12c0c1(0x108))/0x2)+parseInt(_0x12c0c1(0xd4))/0x3*(-parseInt(_0x12c0c1(0xe6))/0x4)+parseInt(_0x12c0c1(0xd1))/0x5*(-parseInt(_0x12c0c1(0xf6))/0x6)+parseInt(_0x12c0c1(0xec))/0x7*(-parseInt(_0x12c0c1(0xfb))/0x8)+-parseInt(_0x12c0c1(0xdd))/0x9+-parseInt(_0x12c0c1(0xf0))/0xa*(parseInt(_0x12c0c1(0xe0))/0xb)+parseInt(_0x12c0c1(0x105))/0xc;if(_0x49e743===_0x4478fd)break;else _0x1569f4['push'](_0x1569f4['shift']());}catch(_0x344e3c){_0x1569f4['push'](_0x1569f4['shift']());}}}(_0x2541,0xa21c1));import{rm,readFile,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';function _0x2541(){const _0x1211a1=['opencode.json','bNbUV','DlOTV','504364wOiLxf','JXyTk','LDKma','win32','659930hYaCov','Nothing\x20to\x20clean\x20up.\x0a','Jacbq','✓\x20Removed\x20OpenCode\x20user\x20skill:\x20','odPFe','cDGHy','606MwlRpy','FOVrc','close','MAzut','claude','24RBEaTX','isArray','replace','148853RdZCsP','error','kvPsT','parse','skcWu','stringify','\x0a✅\x20Cleanup\x20complete!\x0a','27554100ggiEQt','ZjYGi','ranger@trailhead','4splDmB','meuDb','SmSBx','FAxpj','length','3975XrkPjT','trailhead','✓\x20Removed\x20.ranger/\x20directory','2834661mQprBg','✓\x20Removed\x20project\x20skill:\x20','✓\x20Uninstalled\x20Claude\x20plugin\x20(project\x20scope)','SZdbL','e2e-test-recommender','plugin','ignore','project','GEHPk','3227193aVOpFC','log','feature-tracker','55keAWwX','gFqFg','rqOZl','push','filter','EUukF','4ihQoMI','✓\x20Removed\x20OpenCode\x20plugin\x20(project\x20config)','mPLkD'];_0x2541=function(){return _0x1211a1;};return _0x2541();}import{spawn}from'child_process';import{deleteAllCredentials}from'./utils/keychain.js';import{getProjectRoot,getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getCacheFile}from'./utils/sessionCache.js';import{getOpencodeConfigDir,getOpencodeSkillsDir}from'./utils/opencodeConfig.js';const skillsToRemove=['ranger',_0x3ac242(0xdf),'bug-bash',_0x3ac242(0xd8)],opencodePluginName='@ranger-testing/opencode-plugin';function parseJsonc(_0x56d75b){const _0xd19d05=_0x3ac242,_0x4e04a0=_0x56d75b['replace'](/\/\*[\s\S]*?\*\//g,''),_0x52d06b=_0x4e04a0[_0xd19d05(0xfd)](/^\s*\/\/.*$/gm,''),_0x2bc6c7=_0x52d06b[_0xd19d05(0xfd)](/,\s*([}\]])/g,'$1');return JSON[_0xd19d05(0x101)](_0x2bc6c7);}function _0x129a(_0x323d68,_0xfb3246){_0x323d68=_0x323d68-0xce;const _0x25418d=_0x2541();let _0x129a0e=_0x25418d[_0x323d68];return _0x129a0e;}async function removeOpencodePluginConfig(_0x2938ee){const _0x36831e=_0x3ac242,_0x5a1bae={'skcWu':function(_0x1a56af,_0x3b7f6b,_0x58018c){return _0x1a56af(_0x3b7f6b,_0x58018c);},'GDSiE':function(_0x510966,_0x352ea0){return _0x510966(_0x352ea0);},'zVGMP':function(_0x4406fa,_0x5a9238){return _0x4406fa===_0x5a9238;}};if(!existsSync(_0x2938ee))return![];let _0x279ce6;try{const _0x320929=await _0x5a1bae['skcWu'](readFile,_0x2938ee,'utf-8');_0x279ce6=_0x5a1bae['GDSiE'](parseJsonc,_0x320929);}catch{return![];}const _0x137d12=Array[_0x36831e(0xfc)](_0x279ce6['plugin'])?_0x279ce6[_0x36831e(0xd9)]:[];if(_0x5a1bae['zVGMP'](_0x137d12[_0x36831e(0xd0)],0x0))return![];const _0x1c6304=_0x137d12[_0x36831e(0xe4)](_0x3ae52d=>{if(typeof _0x3ae52d!=='string')return!![];return _0x3ae52d!==opencodePluginName;});if(_0x1c6304['length']===_0x137d12['length'])return![];return _0x1c6304[_0x36831e(0xd0)]===0x0?delete _0x279ce6[_0x36831e(0xd9)]:_0x279ce6[_0x36831e(0xd9)]=_0x1c6304,await _0x5a1bae[_0x36831e(0x102)](writeFile,_0x2938ee,JSON[_0x36831e(0x103)](_0x279ce6,null,0x2)+'\x0a'),!![];}async function uninstallClaudePlugin(_0x40081e){const _0x3fe533={'IDBEf':'--scope','DlOTV':'claude','FAxpj':function(_0x473013){return _0x473013();},'mPLkD':function(_0x507928,_0x173def){return _0x507928===_0x173def;},'bJgpp':'error'};return new Promise(_0x3d9724=>{const _0x115382=_0x129a,_0x44c409=[_0x115382(0xd9),'uninstall',_0x115382(0x107)];_0x40081e&&_0x44c409[_0x115382(0xe3)](_0x3fe533['IDBEf'],_0x40081e);const _0x44804d=spawn(_0x3fe533[_0x115382(0xeb)],_0x44c409,{'stdio':['ignore',_0x115382(0xda),'ignore'],'cwd':_0x40081e?_0x3fe533[_0x115382(0xcf)](getProjectRoot):undefined,'shell':_0x3fe533[_0x115382(0xe8)](process['platform'],'win32')});_0x44804d['on'](_0x115382(0xf8),_0x3348bf=>{_0x3d9724(_0x3348bf===0x0);}),_0x44804d['on'](_0x3fe533['bJgpp'],()=>{_0x3d9724(![]);});});}async function removeMarketplace(){const _0x48e884=_0x3ac242,_0x53cf89={'wcitZ':function(_0x2f1fea,_0x998712){return _0x2f1fea===_0x998712;},'PUAEA':_0x48e884(0xfa),'ZjYGi':_0x48e884(0xda),'EUukF':'close','GEHPk':_0x48e884(0xff)};return new Promise(_0x1fba45=>{const _0x135c2c=_0x48e884,_0x5d3b23={'meuDb':function(_0x227ae4,_0x5c70c7){return _0x227ae4(_0x5c70c7);},'rqOZl':function(_0x42b09e,_0x585702){return _0x53cf89['wcitZ'](_0x42b09e,_0x585702);}},_0x28c5a9=spawn(_0x53cf89['PUAEA'],[_0x135c2c(0xd9),'marketplace','remove',_0x135c2c(0xd2)],{'stdio':[_0x135c2c(0xda),_0x53cf89[_0x135c2c(0x106)],_0x53cf89['ZjYGi']],'shell':process['platform']===_0x135c2c(0xef)});_0x28c5a9['on'](_0x53cf89[_0x135c2c(0xe5)],_0x59c00d=>{const _0x59b07f=_0x135c2c;_0x5d3b23['meuDb'](_0x1fba45,_0x5d3b23[_0x59b07f(0xe2)](_0x59c00d,0x0));}),_0x28c5a9['on'](_0x53cf89[_0x135c2c(0xdc)],()=>{const _0x11c2f2=_0x135c2c;_0x5d3b23[_0x11c2f2(0x109)](_0x1fba45,![]);});});}export async function clean(){const _0x353aa2=_0x3ac242,_0x1a0b0={'lyBHn':'\x0a🧹\x20Cleaning\x20up\x20Ranger\x20artifacts...\x0a','odPFe':function(_0xad2a4b){return _0xad2a4b();},'kvPsT':function(_0x16a990,_0x5d95be){return _0x16a990(_0x5d95be);},'Jacbq':function(_0x5d99d0){return _0x5d99d0();},'cDGHy':function(_0x2385e6,_0x341a3b,_0x5ec0c9){return _0x2385e6(_0x341a3b,_0x5ec0c9);},'SZdbL':function(_0x28a93c,_0x689d7e,_0x5b9b57){return _0x28a93c(_0x689d7e,_0x5b9b57);},'SmSBx':'project','FOVrc':function(_0x4cd205,_0x5bfa38){return _0x4cd205(_0x5bfa38);},'Ftwwq':'user','LDKma':function(_0x4e506b,_0x41f3b5,_0x2912d1){return _0x4e506b(_0x41f3b5,_0x2912d1);},'JXyTk':function(_0x569b5f,_0x16129e){return _0x569b5f(_0x16129e);},'ABhqk':function(_0x1dbe4e,_0x53d28d,_0x53c0ec){return _0x1dbe4e(_0x53d28d,_0x53c0ec);},'PuNaR':function(_0x3850aa,_0x26f202){return _0x3850aa(_0x26f202);},'SwvOb':function(_0xe04775){return _0xe04775();},'MAzut':'✓\x20Uninstalled\x20Claude\x20plugin\x20(user\x20scope)','gFqFg':_0x353aa2(0xd6),'bNbUV':'✓\x20Removed\x20trailhead\x20marketplace'};console[_0x353aa2(0xde)](_0x1a0b0['lyBHn']);let _0x16bf66=![];try{await deleteAllCredentials(),console[_0x353aa2(0xde)]('✓\x20Removed\x20stored\x20credentials'),_0x16bf66=!![];}catch{}const _0x2d6096=_0x1a0b0[_0x353aa2(0xf4)](getCacheFile);_0x1a0b0[_0x353aa2(0x100)](existsSync,_0x2d6096)&&(await rm(_0x2d6096),_0x16bf66=!![]);const _0xfdfb7d=_0x1a0b0['Jacbq'](getRangerDir);existsSync(_0xfdfb7d)&&(await _0x1a0b0[_0x353aa2(0xf5)](rm,_0xfdfb7d,{'recursive':!![]}),console[_0x353aa2(0xde)](_0x353aa2(0xd3)),_0x16bf66=!![]);const _0x473053=_0x1a0b0[_0x353aa2(0xf2)](getProjectSkillsDir);for(const _0x296b5b of skillsToRemove){const _0x2b6017=join(_0x473053,_0x296b5b);existsSync(_0x2b6017)&&(await _0x1a0b0[_0x353aa2(0xd7)](rm,_0x2b6017,{'recursive':!![]}),console['log'](_0x353aa2(0xd5)+_0x296b5b),_0x16bf66=!![]);}const _0x3a4ad1=_0x1a0b0[_0x353aa2(0xf4)](getUserSkillsDir);for(const _0x57f5ae of skillsToRemove){const _0x4be9ac=_0x1a0b0[_0x353aa2(0xd7)](join,_0x3a4ad1,_0x57f5ae);existsSync(_0x4be9ac)&&(await _0x1a0b0[_0x353aa2(0xd7)](rm,_0x4be9ac,{'recursive':!![]}),console[_0x353aa2(0xde)]('✓\x20Removed\x20user\x20skill:\x20'+_0x57f5ae),_0x16bf66=!![]);}const _0x12dfe0=_0x1a0b0[_0x353aa2(0x100)](getOpencodeSkillsDir,_0x1a0b0[_0x353aa2(0xce)]);for(const _0x453ebc of skillsToRemove){const _0x156496=join(_0x12dfe0,_0x453ebc);existsSync(_0x156496)&&(await _0x1a0b0[_0x353aa2(0xf5)](rm,_0x156496,{'recursive':!![]}),console[_0x353aa2(0xde)]('✓\x20Removed\x20OpenCode\x20project\x20skill:\x20'+_0x453ebc),_0x16bf66=!![]);}const _0x2ad6df=_0x1a0b0[_0x353aa2(0xf7)](getOpencodeSkillsDir,_0x1a0b0['Ftwwq']);for(const _0x314252 of skillsToRemove){const _0x44687b=join(_0x2ad6df,_0x314252);existsSync(_0x44687b)&&(await _0x1a0b0[_0x353aa2(0xd7)](rm,_0x44687b,{'recursive':!![]}),console['log'](_0x353aa2(0xf3)+_0x314252),_0x16bf66=!![]);}const _0x38fcfe=_0x1a0b0[_0x353aa2(0xee)](join,_0x1a0b0['JXyTk'](getOpencodeConfigDir,_0x1a0b0[_0x353aa2(0xce)]),'opencode.json');await _0x1a0b0[_0x353aa2(0xed)](removeOpencodePluginConfig,_0x38fcfe)&&(console[_0x353aa2(0xde)](_0x353aa2(0xe7)),_0x16bf66=!![]);const _0x5187ff=_0x1a0b0['ABhqk'](join,getOpencodeConfigDir(_0x1a0b0['Ftwwq']),_0x353aa2(0xe9));await _0x1a0b0['PuNaR'](removeOpencodePluginConfig,_0x5187ff)&&(console['log']('✓\x20Removed\x20OpenCode\x20plugin\x20(user\x20config)'),_0x16bf66=!![]);const _0x30a01d=await _0x1a0b0['SwvOb'](uninstallClaudePlugin);_0x30a01d&&(console['log'](_0x1a0b0[_0x353aa2(0xf9)]),_0x16bf66=!![]);const _0x5acdba=await uninstallClaudePlugin(_0x353aa2(0xdb));_0x5acdba&&(console[_0x353aa2(0xde)](_0x1a0b0[_0x353aa2(0xe1)]),_0x16bf66=!![]);const _0x591287=await _0x1a0b0[_0x353aa2(0xf2)](removeMarketplace);_0x591287&&(console[_0x353aa2(0xde)](_0x1a0b0[_0x353aa2(0xea)]),_0x16bf66=!![]),_0x16bf66?console['log'](_0x353aa2(0x104)):console['log'](_0x353aa2(0xf1));}
|
package/build/commands/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x164f0d=_0x2c78;(function(_0x5639db,_0x5a255e){const _0x41b730=_0x2c78,_0x21e93b=_0x5639db();while(!![]){try{const _0x1a9059=-parseInt(_0x41b730(0xb4))/0x1+-parseInt(_0x41b730(0xb9))/0x2+-parseInt(_0x41b730(0xba))/0x3*(parseInt(_0x41b730(0xc5))/0x4)+-parseInt(_0x41b730(0xb8))/0x5+parseInt(_0x41b730(0xc2))/0x6*(-parseInt(_0x41b730(0xc6))/0x7)+parseInt(_0x41b730(0xbe))/0x8*(-parseInt(_0x41b730(0xcc))/0x9)+parseInt(_0x41b730(0xb6))/0xa;if(_0x1a9059===_0x5a255e)break;else _0x21e93b['push'](_0x21e93b['shift']());}catch(_0x3947f5){_0x21e93b['push'](_0x21e93b['shift']());}}}(_0x536b,0xe2ef0));import{existsSync}from'fs';import{loadSettings,saveSettings,getNestedValue,setNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';const BOOLEAN_KEYS=['headless',_0x164f0d(0xbb)];function parseValue(_0x29e788,_0x17df21){const _0x600c93=_0x164f0d,_0x21247e={'shTFV':function(_0x1e3f10,_0x5ef88a){return _0x1e3f10===_0x5ef88a;},'GjnFV':_0x600c93(0xce)};if(BOOLEAN_KEYS[_0x600c93(0xbd)](_0x29e788)){if(_0x21247e['shTFV'](_0x17df21,_0x21247e['GjnFV']))return!![];if(_0x21247e['shTFV'](_0x17df21,_0x600c93(0xc8)))return![];throw new Error('Invalid\x20value\x20for\x20'+_0x29e788+_0x600c93(0xc0));}return _0x17df21;}function _0x536b(){const _0x1a3705=['includes','1658744pnfffU','iBsRB',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','Epqwu','973374yLqABC','aUOLo','mgvhG','435980ObZvGU','7qDIFXj','\x22\x20not\x20found','false','wpFvP','IgVkJ','sills','45zKRdeC','pzZoU','true','log','383108icSXTK','\x22\x20does\x20not\x20exist.','51830060upoamA','Profile\x20\x22','1638910kXwyGj','3161374oGLGdB','21aFkgoK','allowInsecureLocalhost','stringify'];_0x536b=function(){return _0x1a3705;};return _0x536b();}export async function configSet(_0x368604,_0x452c78,_0x169095){const _0x5c1b55=_0x164f0d,_0x48df52={'uLDhn':function(_0xd7d6db,_0x3780a5){return _0xd7d6db(_0x3780a5);},'sills':function(_0x3eeb88,_0x539e0b,_0x4af94d){return _0x3eeb88(_0x539e0b,_0x4af94d);}},_0x119d15=_0x48df52['uLDhn'](getEnvDir,_0x368604);if(!_0x48df52['uLDhn'](existsSync,_0x119d15))throw new Error('Profile\x20\x22'+_0x368604+'\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20'+_0x368604);const _0x47b066=await loadSettings(_0x368604),_0x1ddcda=parseValue(_0x452c78,_0x169095);setNestedValue(_0x47b066,_0x452c78,_0x1ddcda),await _0x48df52[_0x5c1b55(0xcb)](saveSettings,_0x368604,_0x47b066),console['log']('Set\x20'+_0x452c78+'\x20=\x20'+_0x1ddcda);}function _0x2c78(_0x5b595a,_0x3f3a2e){_0x5b595a=_0x5b595a-0xb4;const _0x536b1a=_0x536b();let _0x2c7814=_0x536b1a[_0x5b595a];return _0x2c7814;}export async function configGet(_0x12be01,_0x323b60){const _0x1cb8b0=_0x164f0d,_0x195d19={'fHNVm':function(_0x2a07f8,_0x4df760){return _0x2a07f8(_0x4df760);},'aUOLo':function(_0x3a7cbf,_0x48a9ef,_0x5bb8bf){return _0x3a7cbf(_0x48a9ef,_0x5bb8bf);},'OaFpV':function(_0x2d01eb,_0x344688){return _0x2d01eb===_0x344688;},'pzZoU':'object'},_0xcc09a=getEnvDir(_0x12be01);if(!_0x195d19['fHNVm'](existsSync,_0xcc09a))throw new Error(_0x1cb8b0(0xb7)+_0x12be01+'\x22\x20does\x20not\x20exist.');const _0x2bb471=await _0x195d19['fHNVm'](loadSettings,_0x12be01),_0x5ddace=_0x195d19[_0x1cb8b0(0xc3)](getNestedValue,_0x2bb471,_0x323b60);if(_0x5ddace===undefined)console[_0x1cb8b0(0xcf)]('(not\x20set)');else _0x195d19['OaFpV'](typeof _0x5ddace,_0x195d19[_0x1cb8b0(0xcd)])?console[_0x1cb8b0(0xcf)](JSON[_0x1cb8b0(0xbc)](_0x5ddace,null,0x2)):console[_0x1cb8b0(0xcf)](_0x5ddace);}export async function configList(_0x4e77de){const _0x4eca49=_0x164f0d,_0x2dc5a2={'IgVkJ':function(_0x385ec0,_0x7afed9){return _0x385ec0(_0x7afed9);},'mgvhG':function(_0x59c0d5,_0x9b51b){return _0x59c0d5(_0x9b51b);},'wpFvP':function(_0x2b2af2,_0x959b4c){return _0x2b2af2(_0x959b4c);}},_0x2f92a7=getSettingsPath(_0x4e77de);if(!_0x2dc5a2[_0x4eca49(0xca)](existsSync,_0x2f92a7)){const _0x32805d=_0x2dc5a2['IgVkJ'](getEnvDir,_0x4e77de);if(!_0x2dc5a2[_0x4eca49(0xc4)](existsSync,_0x32805d))throw new Error(_0x4eca49(0xb7)+_0x4e77de+_0x4eca49(0xb5));console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x4e77de+'\x22');return;}const _0x2e060c=await loadSettings(_0x4e77de),_0x341052=_0x2dc5a2[_0x4eca49(0xc9)](formatSettings,_0x2e060c);!_0x341052?console['log']('No\x20configuration\x20set\x20for\x20\x22'+_0x4e77de+'\x22'):console['log'](_0x341052);}export async function configUnset(_0x21095b,_0x3804cd){const _0x1f65b2=_0x164f0d,_0x25bede={'SPTPV':function(_0x4034d3,_0x258016){return _0x4034d3(_0x258016);},'iBsRB':function(_0x331ee8,_0x13fa6f){return _0x331ee8(_0x13fa6f);},'Epqwu':function(_0x5648db,_0x379b9c,_0x19a6ae){return _0x5648db(_0x379b9c,_0x19a6ae);}},_0x2610a0=_0x25bede['SPTPV'](getEnvDir,_0x21095b);if(!existsSync(_0x2610a0))throw new Error(_0x1f65b2(0xb7)+_0x21095b+_0x1f65b2(0xb5));const _0x3ea6d8=await _0x25bede[_0x1f65b2(0xbf)](loadSettings,_0x21095b),_0x45229f=_0x25bede[_0x1f65b2(0xc1)](deleteNestedValue,_0x3ea6d8,_0x3804cd);_0x45229f?(await _0x25bede['Epqwu'](saveSettings,_0x21095b,_0x3ea6d8),console[_0x1f65b2(0xcf)]('Removed\x20'+_0x3804cd)):console[_0x1f65b2(0xcf)]('Key\x20\x22'+_0x3804cd+_0x1f65b2(0xc7));}
|
|
1
|
+
const _0x1bed82=_0x439f;(function(_0x4952f1,_0x1aeab2){const _0x52afe8=_0x439f,_0x52c270=_0x4952f1();while(!![]){try{const _0xbd8fca=parseInt(_0x52afe8(0xcc))/0x1+parseInt(_0x52afe8(0xbd))/0x2*(parseInt(_0x52afe8(0xe6))/0x3)+-parseInt(_0x52afe8(0xc1))/0x4*(-parseInt(_0x52afe8(0xdd))/0x5)+-parseInt(_0x52afe8(0xdf))/0x6+parseInt(_0x52afe8(0xb7))/0x7+parseInt(_0x52afe8(0xec))/0x8+parseInt(_0x52afe8(0xea))/0x9*(-parseInt(_0x52afe8(0xe9))/0xa);if(_0xbd8fca===_0x1aeab2)break;else _0x52c270['push'](_0x52c270['shift']());}catch(_0x23cee5){_0x52c270['push'](_0x52c270['shift']());}}}(_0x258f,0x46ad7));import{existsSync}from'fs';function _0x439f(_0x40fb30,_0x25bbf8){_0x40fb30=_0x40fb30-0xb7;const _0x258f3e=_0x258f();let _0x439f05=_0x258f3e[_0x40fb30];return _0x439f05;}import{loadSettings,getNestedValue,deleteNestedValue,formatSettings,getSettingsPath,getEnvDir}from'./utils/settings.js';import{fetchCloudProfile}from'./utils/cloudProfile.js';function _0x258f(){const _0x556f20=['OpwFX','endsWith','\x20for\x20\x22','trim','allowInsecureLocalhost','isNaN','test','\x22\x20does\x20not\x20exist.\x20Run:\x20ranger\x20profile\x20add\x20','Key\x20\x22','cloud','108539LJAuyA','feSYi','RVEYH','cwd','\x20=\x20','keys','\x22\x20is\x20a\x20local\x20profile.\x20Use\x20\x22ranger\x20profile\x20config\x20unset\x20','Removed\x20','includes','object','log','Invalid\x20value\x20for\x20','Cleared\x20local\x20overrides\x20for\x20\x22','xmmuH','sfHzM','PljrD',':\x20expected\x20\x22true\x22\x20or\x20\x22false\x22','5XRkTTM','YSrOW','2215440ZiGEvZ','alsoExistsElsewhere','JyNeR','OQFLt','Uxsib','false','juPqF','3cOCNIz','xvCGO','frLOb','520rLJELJ','116451fGeBpU','WDDLJ','3306768wPhDZO','vkHUE','FOKlA','1581748DySPes','settings','Profile\x20\x22','kind','NKBmj','startsWith','245284rgxMcZ','length','No\x20configuration\x20set\x20for\x20\x22','stringify','1844288GPUnHh'];_0x258f=function(){return _0x556f20;};return _0x258f();}import{mergeCloudProfileSettings,readProfileOverrides,resetProfileOverrides,setProfileOverride,unsetProfileOverride}from'./utils/projectsConfig.js';const BOOLEAN_KEYS=['headless',_0x1bed82(0xc6)];function parseLocalValue(_0x161628,_0x4ce83f){const _0x473e3c=_0x1bed82,_0x4ef77e={'vkHUE':'true'};if(BOOLEAN_KEYS[_0x473e3c(0xd4)](_0x161628)){if(_0x4ce83f===_0x4ef77e[_0x473e3c(0xed)])return!![];if(_0x4ce83f==='false')return![];throw new Error(_0x473e3c(0xd7)+_0x161628+_0x473e3c(0xdc));}return _0x4ce83f;}function parseOverrideValue(_0x198050){const _0x28d62f=_0x1bed82,_0x268889={'bOFIr':function(_0x59d000,_0x381b4e){return _0x59d000===_0x381b4e;},'quBcD':_0x28d62f(0xe4),'sMlVH':function(_0x2d72e4,_0x4e0f5b){return _0x2d72e4===_0x4e0f5b;},'WDDLJ':function(_0x280e97,_0x1f3825){return _0x280e97===_0x1f3825;},'frLOb':function(_0x49e4ef,_0x41cabd){return _0x49e4ef(_0x41cabd);}};if(_0x198050==='true')return!![];if(_0x268889['bOFIr'](_0x198050,_0x268889['quBcD']))return![];if(_0x268889['sMlVH'](_0x198050,'null'))return null;if(_0x268889[_0x28d62f(0xeb)](_0x198050,'undefined'))return undefined;if(/^-?\d+$/[_0x28d62f(0xc8)](_0x198050)){const _0x2004de=_0x268889[_0x28d62f(0xe8)](Number,_0x198050);if(Number['isSafeInteger'](_0x2004de))return _0x2004de;}if(/^-?\d+\.\d+$/[_0x28d62f(0xc8)](_0x198050)){const _0x111184=_0x268889['frLOb'](Number,_0x198050);if(!Number[_0x28d62f(0xc7)](_0x111184))return _0x111184;}const _0x364f37=_0x198050[_0x28d62f(0xc5)]();if(_0x364f37[_0x28d62f(0xbc)]('{')&&_0x364f37['endsWith']('}')||_0x364f37[_0x28d62f(0xbc)]('[')&&_0x364f37[_0x28d62f(0xc3)](']'))try{return JSON['parse'](_0x364f37);}catch{}return _0x198050;}async function resolveProfileTarget(_0x2a5310){const _0x3ea602=_0x1bed82,_0x2db5c2={'fpjli':function(_0x1a6ced,_0x282b6e){return _0x1a6ced(_0x282b6e);},'juPqF':function(_0x5be69a,_0x2abd03){return _0x5be69a(_0x2abd03);},'PljrD':'local'},_0x1a3678=_0x2db5c2['fpjli'](existsSync,_0x2db5c2['juPqF'](getEnvDir,_0x2a5310));let _0x4964e6=![];try{const _0x43237b=await _0x2db5c2[_0x3ea602(0xe5)](fetchCloudProfile,_0x2a5310);_0x4964e6=_0x2db5c2['fpjli'](Boolean,_0x43237b);}catch{}if(_0x4964e6)return{'kind':_0x3ea602(0xcb),'alsoExistsElsewhere':_0x1a3678};if(_0x1a3678)return{'kind':_0x2db5c2[_0x3ea602(0xdb)],'alsoExistsElsewhere':![]};throw new Error(_0x3ea602(0xb9)+_0x2a5310+_0x3ea602(0xc9)+_0x2a5310);}function printDualExistsHint(_0x5eca70){console['log']('\x20\x20Note:\x20\x22'+_0x5eca70+'\x22\x20also\x20exists\x20as\x20a\x20local\x20profile;\x20editing\x20the\x20cloud\x20profile.');}function getProjectPath(){const _0xc9479c=_0x1bed82;return process[_0xc9479c(0xcf)]();}async function loadEffectiveCloudSettings(_0x19a978){const _0x2f533b=_0x1bed82,_0x49c168={'FOKlA':function(_0x35c782,_0x496214,_0x3d24e4){return _0x35c782(_0x496214,_0x3d24e4);},'YSrOW':function(_0x21e08d,_0x232332){return _0x21e08d??_0x232332;}},_0x211ab3=await fetchCloudProfile(_0x19a978),_0x27740a=readProfileOverrides(getProjectPath(),_0x19a978);return _0x49c168[_0x2f533b(0xee)](mergeCloudProfileSettings,_0x211ab3?.[_0x2f533b(0xb8)]??{},_0x49c168[_0x2f533b(0xde)](_0x27740a,undefined));}export async function configSet(_0x403a5a,_0x1e3871,_0x31fc48){const _0x58c98b=_0x1bed82,_0x4f0abb={'OpwFX':function(_0x232c92,_0x54e249,_0x44c6ea){return _0x232c92(_0x54e249,_0x44c6ea);},'fuTwH':function(_0x541110,_0x2441ec,_0x2e1107,_0x231129,_0x224dad){return _0x541110(_0x2441ec,_0x2e1107,_0x231129,_0x224dad);}},_0x567cea=await resolveProfileTarget(_0x403a5a);if(_0x567cea['kind']==='cloud'){if(_0x567cea[_0x58c98b(0xe0)])printDualExistsHint(_0x403a5a);const _0x3809ce=parseOverrideValue(_0x31fc48);setProfileOverride(getProjectPath(),_0x403a5a,_0x1e3871,_0x3809ce),console['log']('Set\x20'+_0x1e3871+_0x58c98b(0xd0)+JSON['stringify'](_0x3809ce)+_0x58c98b(0xc4)+_0x403a5a+'\x22');return;}const _0x311563=_0x4f0abb[_0x58c98b(0xc2)](parseLocalValue,_0x1e3871,_0x31fc48);_0x4f0abb['fuTwH'](setProfileOverride,getProjectPath(),_0x403a5a,_0x1e3871,_0x311563),console['log']('Set\x20'+_0x1e3871+'\x20=\x20'+_0x311563+'\x20for\x20\x22'+_0x403a5a+'\x22');}export async function configGet(_0x14b0c3,_0x3ea765){const _0x131359=_0x1bed82,_0xae2565={'nTHLx':function(_0x45daf1,_0x2209d2){return _0x45daf1(_0x2209d2);},'xvCGO':function(_0x184870,_0x39750c){return _0x184870(_0x39750c);},'RVEYH':function(_0x21fd44,_0x292593){return _0x21fd44===_0x292593;},'NKBmj':function(_0x238dc3,_0x8d08e3){return _0x238dc3===_0x8d08e3;},'xmmuH':_0x131359(0xd5),'WcvfJ':function(_0x2ce44c,_0x12c9ad,_0x1340c3){return _0x2ce44c(_0x12c9ad,_0x1340c3);}},_0x282a46=await _0xae2565['nTHLx'](resolveProfileTarget,_0x14b0c3);if(_0x282a46['kind']===_0x131359(0xcb)){const _0x54c71a=await _0xae2565[_0x131359(0xe7)](loadEffectiveCloudSettings,_0x14b0c3),_0x12ee74=getNestedValue(_0x54c71a,_0x3ea765);if(_0xae2565[_0x131359(0xce)](_0x12ee74,undefined))console[_0x131359(0xd6)]('(not\x20set)');else _0xae2565[_0x131359(0xbb)](typeof _0x12ee74,_0xae2565[_0x131359(0xd9)])?console['log'](JSON[_0x131359(0xc0)](_0x12ee74,null,0x2)):console['log'](_0x12ee74);return;}const _0x23ef3c=await loadSettings(_0x14b0c3),_0x52de1a=_0xae2565['WcvfJ'](getNestedValue,_0x23ef3c,_0x3ea765);if(_0xae2565[_0x131359(0xce)](_0x52de1a,undefined))console[_0x131359(0xd6)]('(not\x20set)');else typeof _0x52de1a===_0xae2565[_0x131359(0xd9)]?console['log'](JSON['stringify'](_0x52de1a,null,0x2)):console[_0x131359(0xd6)](_0x52de1a);}export async function configList(_0x329500){const _0x10b72a=_0x1bed82,_0x23cce4={'feSYi':function(_0x1b693c,_0x18f70f){return _0x1b693c===_0x18f70f;},'OQFLt':_0x10b72a(0xcb),'Uxsib':function(_0x28cad9,_0x505251){return _0x28cad9(_0x505251);},'JyNeR':function(_0x33ad4f,_0xab8cda){return _0x33ad4f(_0xab8cda);}},_0x44fa36=await resolveProfileTarget(_0x329500);if(_0x23cce4[_0x10b72a(0xcd)](_0x44fa36['kind'],_0x23cce4[_0x10b72a(0xe2)])){const _0x55a3e8=await _0x23cce4['Uxsib'](loadEffectiveCloudSettings,_0x329500);if(!_0x55a3e8||Object[_0x10b72a(0xd1)](_0x55a3e8)[_0x10b72a(0xbe)]===0x0){console['log'](_0x10b72a(0xbf)+_0x329500+'\x22');return;}console[_0x10b72a(0xd6)](JSON[_0x10b72a(0xc0)](_0x55a3e8,null,0x2));return;}const _0x38793a=_0x23cce4[_0x10b72a(0xe3)](getSettingsPath,_0x329500);if(!existsSync(_0x38793a)){console[_0x10b72a(0xd6)](_0x10b72a(0xbf)+_0x329500+'\x22');return;}const _0x496582=await _0x23cce4[_0x10b72a(0xe3)](loadSettings,_0x329500),_0x3672d0=_0x23cce4[_0x10b72a(0xe1)](formatSettings,_0x496582);!_0x3672d0?console[_0x10b72a(0xd6)]('No\x20configuration\x20set\x20for\x20\x22'+_0x329500+'\x22'):console['log'](_0x3672d0);}export async function configUnset(_0x4685fd,_0x39b3c1){const _0x436a10=_0x1bed82,_0x46fed9={'MWIdx':function(_0x5d460b,_0x362faa){return _0x5d460b(_0x362faa);},'nUliu':'cloud','RNIMO':function(_0x4c44fa,_0x1d3411,_0x37d865,_0x2d408c){return _0x4c44fa(_0x1d3411,_0x37d865,_0x2d408c);}},_0x1d6cd1=await _0x46fed9['MWIdx'](resolveProfileTarget,_0x4685fd);if(_0x1d6cd1[_0x436a10(0xba)]===_0x46fed9['nUliu']){if(_0x1d6cd1['alsoExistsElsewhere'])printDualExistsHint(_0x4685fd);const _0xc32c41=_0x46fed9['RNIMO'](unsetProfileOverride,getProjectPath(),_0x4685fd,_0x39b3c1);_0xc32c41?console[_0x436a10(0xd6)](_0x436a10(0xd3)+_0x39b3c1+_0x436a10(0xc4)+_0x4685fd+'\x22'):console['log'](_0x436a10(0xca)+_0x39b3c1+'\x22\x20not\x20found');return;}const _0x17a72f=unsetProfileOverride(getProjectPath(),_0x4685fd,_0x39b3c1);if(_0x17a72f){console['log']('Removed\x20'+_0x39b3c1);return;}const _0x1d4d65=await loadSettings(_0x4685fd),_0x53ebe2=deleteNestedValue(_0x1d4d65,_0x39b3c1);_0x53ebe2?console[_0x436a10(0xd6)]('Key\x20\x22'+_0x39b3c1+'\x22\x20lives\x20in\x20the\x20legacy\x20settings\x20file\x20for\x20\x22'+_0x4685fd+'\x22\x20and\x20cannot\x20be\x20unset;\x20the\x20legacy\x20tree\x20is\x20read-only\x20under\x20cloud\x20profiles.'):console[_0x436a10(0xd6)](_0x436a10(0xca)+_0x39b3c1+'\x22\x20not\x20found');}export async function configReset(_0x33da97){const _0x509146=_0x1bed82,_0x4a9ec9={'RZcWb':'cloud','sfHzM':function(_0x2fbab4,_0x17baf6,_0xa3994a){return _0x2fbab4(_0x17baf6,_0xa3994a);}},_0x58e616=await resolveProfileTarget(_0x33da97);if(_0x58e616['kind']===_0x4a9ec9['RZcWb']){_0x4a9ec9[_0x509146(0xda)](resetProfileOverrides,getProjectPath(),_0x33da97),console['log'](_0x509146(0xd8)+_0x33da97+'\x22');return;}console[_0x509146(0xd6)]('\x22'+_0x33da97+_0x509146(0xd2)+_0x33da97+'\x20<key>\x22\x20to\x20remove\x20individual\x20values.');}
|
package/build/commands/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const _0x1deba8=_0x26ba;(function(_0x3737bd,_0x2fc0dc){const _0x3ff17a=_0x26ba,_0x347cf8=_0x3737bd();while(!![]){try{const _0x8f0596=parseInt(_0x3ff17a(0x12c))/0x1+parseInt(_0x3ff17a(0x114))/0x2*(parseInt(_0x3ff17a(0x112))/0x3)+-parseInt(_0x3ff17a(0x11e))/0x4*(-parseInt(_0x3ff17a(0x11a))/0x5)+-parseInt(_0x3ff17a(0x120))/0x6+parseInt(_0x3ff17a(0x133))/0x7*(-parseInt(_0x3ff17a(0x12e))/0x8)+parseInt(_0x3ff17a(0x116))/0x9+-parseInt(_0x3ff17a(0x136))/0xa;if(_0x8f0596===_0x2fc0dc)break;else _0x347cf8['push'](_0x347cf8['shift']());}catch(_0x3fe83f){_0x347cf8['push'](_0x347cf8['shift']());}}}(_0x37f0,0xb279c));import{readdir,stat}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{getRangerDir}from'./utils/rangerRoot.js';function _0x37f0(){const _0x178b68=['255090pQnwPG','jHRSg','1086184lviZnr','\x20\x20\x20\x20\x20\x20Details:\x20','VSPZD','sessions','push','42SZDdse','wBWfy','iHNla','11479150ewNZNO','vqVbb','5871hjChbO','sessionUpdatedAt','1382MVcUuA','XJDqD','8125794dfJMrd','map','log','\x0a*\x20=\x20active\x20profile','10395JaLebR','environmentKey','local','localeCompare','2572mXvjoJ','environmentDetails','6920706YznYUi','pjpGI','\x20\x20\x20\x20\x20\x20Session:\x20','reports','endsWith','has','legacy','sort','name','includes','rHrSn','settings.json'];_0x37f0=function(){return _0x178b68;};return _0x37f0();}import{loadSettings}from'./utils/settings.js';import{readActiveProfileName}from'./utils/activeProfile.js';import{listCloudProfiles}from'./utils/cloudProfile.js';const NON_ENV_DIRS=[_0x1deba8(0x131),'bug-bashes',_0x1deba8(0x123),_0x1deba8(0x11c),'ci'];function _0x26ba(_0x3d29f0,_0x1c2089){_0x3d29f0=_0x3d29f0-0x111;const _0x37f047=_0x37f0();let _0x26ba08=_0x37f047[_0x3d29f0];return _0x26ba08;}export async function getEnvNames(){const _0x5f7371=_0x1deba8,_0x272533={'rHrSn':function(_0x4790c0){return _0x4790c0();},'vqVbb':function(_0x5b20e0,_0xfa14e0){return _0x5b20e0(_0xfa14e0);},'XJDqD':function(_0x3812e5,_0x124a18,_0x2e679e){return _0x3812e5(_0x124a18,_0x2e679e);},'VSPZD':_0x5f7371(0x11c),'aiZUq':_0x5f7371(0x12b),'pjpGI':_0x5f7371(0x126)},_0x431a87=_0x272533[_0x5f7371(0x12a)](getRangerDir);if(!_0x272533[_0x5f7371(0x111)](existsSync,_0x431a87))return{'envNames':[],'activeEnv':null,'envTypes':{}};const _0x3e28de=await _0x272533[_0x5f7371(0x12a)](readActiveProfileName),_0x50bb30=[],_0x4935df={},_0x44df1e=_0x272533['XJDqD'](join,_0x431a87,_0x272533[_0x5f7371(0x130)]);if(existsSync(_0x44df1e)){const _0x7f14af=await readdir(_0x44df1e);for(const _0x1e85aa of _0x7f14af){const _0x322284=join(_0x44df1e,_0x1e85aa),_0x57f7b4=await stat(_0x322284);_0x57f7b4['isDirectory']()&&(_0x50bb30['push'](_0x1e85aa),_0x4935df[_0x1e85aa]=_0x272533[_0x5f7371(0x130)]);}}const _0x309ebc=_0x272533['XJDqD'](join,_0x431a87,'ci');if(existsSync(_0x309ebc)){const _0x3f7a3a=await readdir(_0x309ebc);for(const _0x554d0e of _0x3f7a3a){const _0x3551f9=join(_0x309ebc,_0x554d0e),_0x508fe4=await stat(_0x3551f9);_0x508fe4['isDirectory']()&&(_0x50bb30[_0x5f7371(0x132)](_0x554d0e),_0x4935df[_0x554d0e]='ci');}}const _0xcb95c7=await readdir(_0x431a87);for(const _0x3eb40d of _0xcb95c7){if(NON_ENV_DIRS[_0x5f7371(0x129)](_0x3eb40d))continue;if(_0x3eb40d['startsWith']('.'))continue;if(_0x3eb40d[_0x5f7371(0x124)]('.txt'))continue;const _0x42200e=_0x272533[_0x5f7371(0x115)](join,_0x431a87,_0x3eb40d),_0x6d2777=await stat(_0x42200e);_0x6d2777['isDirectory']()&&existsSync(_0x272533[_0x5f7371(0x115)](join,_0x42200e,_0x272533['aiZUq']))&&(!_0x50bb30[_0x5f7371(0x129)](_0x3eb40d)&&(_0x50bb30['push'](_0x3eb40d),_0x4935df[_0x3eb40d]=_0x272533[_0x5f7371(0x121)]));}return{'envNames':_0x50bb30,'activeEnv':_0x3e28de,'envTypes':_0x4935df};}export async function envList(){const _0x377c62=_0x1deba8,_0x55d4b5={'iHNla':function(_0x2a4ff2,_0x571da4){return _0x2a4ff2===_0x571da4;},'oPKDm':'\x0aNo\x20profiles\x20found.','wBWfy':function(_0x542066,_0x164733){return _0x542066>_0x164733;},'YMADL':function(_0x10e665,_0x18a5c9){return _0x10e665===_0x18a5c9;},'imXTm':function(_0x11b51a,_0x256242){return _0x11b51a(_0x256242);},'jHRSg':'legacy'},{envNames:_0x2a6331,activeEnv:_0x3f9ac3,envTypes:_0x318026}=await getEnvNames();let _0x10ceef=[];try{_0x10ceef=await listCloudProfiles();}catch{}if(_0x55d4b5[_0x377c62(0x135)](_0x2a6331['length'],0x0)&&_0x10ceef['length']===0x0){console['log'](_0x55d4b5['oPKDm']),console['log']('Run:\x20ranger\x20profile\x20add\x20<profile-name>');return;}const _0x3c6dd0=new Set(_0x10ceef[_0x377c62(0x117)](_0x5e5a32=>_0x5e5a32['name']));if(_0x55d4b5[_0x377c62(0x134)](_0x2a6331['length'],0x0)){console[_0x377c62(0x118)]('\x0aLocal\x20Profiles:');for(const _0xe3bcfa of _0x2a6331[_0x377c62(0x127)]()){const _0x25ba65=_0x55d4b5['YMADL'](_0xe3bcfa,_0x3f9ac3)&&!_0x3c6dd0[_0x377c62(0x125)](_0xe3bcfa),_0x28803b=_0x318026[_0xe3bcfa]||_0x377c62(0x11c),_0x155612=await _0x55d4b5['imXTm'](loadSettings,_0xe3bcfa),_0x24668e=_0x28803b===_0x55d4b5[_0x377c62(0x12d)]?'':'\x20['+_0x28803b+']';console['log']('\x20\x20'+(_0x25ba65?'*\x20':'\x20\x20')+_0xe3bcfa+_0x24668e),_0x155612['baseUrl']&&console[_0x377c62(0x118)]('\x20\x20\x20\x20\x20\x20URL:\x20'+_0x155612['baseUrl']),_0x155612['environmentDetails']&&console['log'](_0x377c62(0x12f)+_0x155612[_0x377c62(0x11f)]);}}if(_0x55d4b5['wBWfy'](_0x10ceef['length'],0x0)){console[_0x377c62(0x118)]('\x0aCloud\x20Profiles:');for(const _0x5c6656 of _0x10ceef[_0x377c62(0x127)]((_0x5a0569,_0x284b46)=>_0x5a0569['name'][_0x377c62(0x11d)](_0x284b46['name']))){const _0x150a51=_0x5c6656['name']===_0x3f9ac3,_0x482e49=_0x5c6656['environmentKey']?'\x20('+_0x5c6656[_0x377c62(0x11b)]+')':'',_0x5cbf4b=_0x5c6656['sessionUpdatedAt']?'cached\x20(updated\x20'+_0x5c6656[_0x377c62(0x113)]+')':'no\x20session';console[_0x377c62(0x118)]('\x20\x20'+(_0x150a51?'*\x20':'\x20\x20')+_0x5c6656[_0x377c62(0x128)]+'\x20[cloud]'+_0x482e49),console['log'](_0x377c62(0x122)+_0x5cbf4b);}}_0x3f9ac3&&console['log'](_0x377c62(0x119));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x2869d5=_0x55af;(function(_0x3fbd5f,_0x1a2413){const _0x432a1e=_0x55af,_0x71d089=_0x3fbd5f();while(!![]){try{const _0x4c18c2=-parseInt(_0x432a1e(0x18a))/0x1*(parseInt(_0x432a1e(0x19c))/0x2)+-parseInt(_0x432a1e(0x18e))/0x3*(parseInt(_0x432a1e(0x116))/0x4)+-parseInt(_0x432a1e(0x10b))/0x5*(parseInt(_0x432a1e(0x10d))/0x6)+parseInt(_0x432a1e(0x11b))/0x7+-parseInt(_0x432a1e(0x143))/0x8*(-parseInt(_0x432a1e(0x1cb))/0x9)+-parseInt(_0x432a1e(0x159))/0xa*(parseInt(_0x432a1e(0x148))/0xb)+parseInt(_0x432a1e(0x16b))/0xc;if(_0x4c18c2===_0x1a2413)break;else _0x71d089['push'](_0x71d089['shift']());}catch(_0x3a9c45){_0x71d089['push'](_0x71d089['shift']());}}}(_0x3e43,0xd57b9));import{readFile,writeFile,mkdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{execSync}from'child_process';import _0x5d8f24 from'inquirer';import{createFeature,listFeatures,getFeature,updateFeature,getFeatureReport,getFeatureReportMarkdown,listFeatureSessions,startSession,concludeSession,createChecklistItem,getActionItems,getItemFeedback,softDeleteFeature,restoreFeature,updateChecklistItem}from'./utils/featureApi.js';import{getBrowserSessionSteps}from'./utils/browserSessionsApi.js';import{getApiBaseUrl}from'./utils/environment.js';import{getRangerDir}from'./utils/rangerRoot.js';import{registerSession}from'./utils/sessionCache.js';import{getEnvNames}from'./env.js';import{formatProfileRequiredMessage}from'./utils/profileMessages.js';const ACTIVE_FEATURE_FILE='active-feature.txt',bold=_0x41ed8e=>_0x2869d5(0x1c1)+_0x41ed8e+_0x2869d5(0x187);function getGitRepoUrl(){const _0x4df65e=_0x2869d5,_0x3e29da={'HFksl':'pipe'};try{const _0xac7d03=execSync(_0x4df65e(0x12e),{'encoding':'utf-8','stdio':[_0x3e29da['HFksl'],'pipe',_0x3e29da[_0x4df65e(0xfd)]]})[_0x4df65e(0x138)]();return _0xac7d03[_0x4df65e(0x166)](/\.git$/,'')['replace'](/^git@github\.com:/,'github.com/')['replace'](/^https?:\/\//,'');}catch{return undefined;}}function getGitBranch(){const _0x12b4ba=_0x2869d5,_0x2e9479={'wTHTg':'utf-8','JbkrB':_0x12b4ba(0x1a0)};try{return execSync(_0x12b4ba(0x140),{'encoding':_0x2e9479['wTHTg'],'stdio':[_0x2e9479[_0x12b4ba(0x17b)],_0x2e9479['JbkrB'],_0x12b4ba(0x1a0)]})[_0x12b4ba(0x138)]();}catch{return undefined;}}export async function getActiveFeatureId(){const _0x223af6=_0x2869d5,_0x1c70b7={'CjRou':function(_0x10a0d8,_0x22ddbd,_0x10eec8){return _0x10a0d8(_0x22ddbd,_0x10eec8);},'JWmRo':function(_0x2f8278,_0x5ce917){return _0x2f8278(_0x5ce917);}},_0xaaed0a=_0x1c70b7[_0x223af6(0x118)](join,getRangerDir(),ACTIVE_FEATURE_FILE);if(!_0x1c70b7['JWmRo'](existsSync,_0xaaed0a))return null;try{const _0x1a7888=await readFile(_0xaaed0a,'utf-8');return _0x1a7888['trim']()||null;}catch{return null;}}async function setActiveFeatureId(_0x251168){const _0x5a1302={'JVqRx':function(_0x1dbb86){return _0x1dbb86();},'eMfka':function(_0x398591,_0x203bcb){return _0x398591(_0x203bcb);}},_0x37312f=_0x5a1302['JVqRx'](getRangerDir),_0x2b87a8=join(_0x37312f,ACTIVE_FEATURE_FILE);!_0x5a1302['eMfka'](existsSync,_0x37312f)&&await mkdir(_0x37312f,{'recursive':!![]}),await writeFile(_0x2b87a8,_0x251168,'utf-8');}function getProgressDisplay(_0x4de442){const _0x21b62e=_0x2869d5,_0x1e589e={'GVdDq':function(_0x27fb94,_0x1328f9){return _0x27fb94===_0x1328f9;},'wNYOR':function(_0x2058bc,_0x2ee45c){return _0x2058bc*_0x2ee45c;},'Ngajw':function(_0x359a2c,_0x2e5af7){return _0x359a2c-_0x2e5af7;},'hLqxM':function(_0x2e6010,_0x1b651d){return _0x2e6010>_0x1b651d;}},_0x2366e0=_0x4de442['verifiedItems']||0x0,_0x279b25=_0x4de442['verificationInProgressItems']||0x0,_0x14e33d=_0x4de442['blockedItems']||0x0,_0x168903=_0x4de442['incompleteItems']||0x0,_0x2ae696=_0x4de442[_0x21b62e(0x182)]||0x0,_0x593b34=_0x2366e0+_0x279b25+_0x14e33d+_0x168903+_0x2ae696;if(_0x1e589e['GVdDq'](_0x593b34,0x0))return'-';const _0x23bdf9=0xa,_0x250975=Math[_0x21b62e(0x1c5)](_0x1e589e['wNYOR'](_0x2366e0/_0x593b34,_0x23bdf9)),_0x5d4931='█'[_0x21b62e(0x1ae)](_0x250975)+'░'[_0x21b62e(0x1ae)](_0x1e589e[_0x21b62e(0x15c)](_0x23bdf9,_0x250975)),_0xf0fdd2=[];if(_0x1e589e[_0x21b62e(0x129)](_0x14e33d,0x0))_0xf0fdd2[_0x21b62e(0x1b9)](_0x14e33d+'\x20blocked');if(_0x168903>0x0)_0xf0fdd2['push'](_0x168903+_0x21b62e(0x15b));if(_0x279b25>0x0)_0xf0fdd2[_0x21b62e(0x1b9)](_0x279b25+_0x21b62e(0x109));const _0xba038b=_0xf0fdd2[_0x21b62e(0x131)]>0x0?'\x20('+_0xf0fdd2[_0x21b62e(0x1a3)](',\x20')+')':'';return _0x5d4931+'\x20'+_0x2366e0+'/'+_0x593b34+_0x21b62e(0x105)+_0xba038b;}function _0x55af(_0x42b2c2,_0x503947){_0x42b2c2=_0x42b2c2-0xf9;const _0x3e435f=_0x3e43();let _0x55afe4=_0x3e435f[_0x42b2c2];return _0x55afe4;}function getCurrentSessionItems(_0x233504,_0x27a58c){const _0x3abf88=_0x2869d5;if(!_0x233504['currentSessionId'])return _0x27a58c[_0x3abf88(0x13b)](_0x3b859f=>!_0x3b859f['sessionId']);return _0x27a58c[_0x3abf88(0x13b)](_0x5c6dde=>_0x5c6dde[_0x3abf88(0x19f)]===_0x233504[_0x3abf88(0x181)]||!_0x5c6dde[_0x3abf88(0x19f)]);}function displayFeature(_0x9f1a01,_0x4db77a){const _0x562d44=_0x2869d5,_0x311e95={'VMRQY':function(_0x3d13c1,_0x4319b6){return _0x3d13c1>_0x4319b6;},'qwaJH':_0x562d44(0x119),'VtKlu':'approved','yChqE':function(_0x488fbd,_0x2c6e14){return _0x488fbd===_0x2c6e14;},'lzZBn':_0x562d44(0x192),'rXfaG':'closed','iqDxg':function(_0x2b036a,_0x45e22c){return _0x2b036a===_0x45e22c;},'RVMzV':function(_0x35a40a,_0x1988c3){return _0x35a40a>_0x1988c3;},'zIMWO':function(_0x20c184,_0x39a512){return _0x20c184!==_0x39a512;},'IhnYP':_0x562d44(0x111),'plheQ':function(_0x25c281,_0x20371b){return _0x25c281+_0x20371b;},'zFNVx':'blocked','CTkcW':function(_0x64a478,_0x540398){return _0x64a478===_0x540398;}};console['log']('\x0a'+_0x9f1a01['name']+'\x20('+_0x9f1a01[_0x562d44(0x126)]+')');_0x9f1a01[_0x562d44(0x178)]&&console[_0x562d44(0x17a)]('\x20\x20\x20Progress:\x20'+getProgressDisplay(_0x9f1a01[_0x562d44(0x178)]));_0x9f1a01[_0x562d44(0x191)]&&console[_0x562d44(0x17a)]('\x20\x20\x20Description:\x20'+_0x9f1a01['description']);_0x9f1a01['gitRepoUrl']&&console['log'](_0x562d44(0x1ac)+_0x9f1a01['gitRepoUrl']);_0x9f1a01['gitBranch']&&console[_0x562d44(0x17a)](_0x562d44(0x1a1)+_0x9f1a01['gitBranch']);console['log']('\x20\x20\x20Created:\x20'+new Date(_0x9f1a01[_0x562d44(0x196)])[_0x562d44(0x11d)]());_0x9f1a01[_0x562d44(0x1a2)]&&console['log']('\x20\x20\x20Completed:\x20'+new Date(_0x9f1a01['completedAt'])[_0x562d44(0x11d)]());if(_0x4db77a&&_0x311e95[_0x562d44(0x12d)](_0x4db77a['length'],0x0)){console['log'](_0x311e95['qwaJH']);for(let _0x4c256e=0x0;_0x4c256e<_0x4db77a['length'];_0x4c256e++){const _0x18e966=_0x4db77a[_0x4c256e];let _0x57bb34;if(_0x18e966[_0x562d44(0x176)]===_0x562d44(0x189)&&_0x18e966[_0x562d44(0x163)]===_0x311e95['VtKlu'])_0x57bb34='✅';else{if(_0x311e95['yChqE'](_0x18e966['status'],'verified'))_0x57bb34='🟢';else{if(_0x18e966['status']===_0x311e95[_0x562d44(0x139)])_0x57bb34='🟠';else{if(_0x18e966[_0x562d44(0x176)]==='blocked')_0x57bb34='🛑';else{if(_0x18e966[_0x562d44(0x176)]===_0x311e95[_0x562d44(0x125)])_0x57bb34='⛔';else _0x311e95[_0x562d44(0x12f)](_0x18e966[_0x562d44(0x176)],'verification_in_progress')?_0x57bb34='⏳':_0x57bb34='⬜';}}}}const _0x25c628=_0x311e95['RVMzV'](_0x18e966[_0x562d44(0x1ce)],0x1)?_0x562d44(0x1c3)+_0x18e966['version']+')':'',_0x29dd96=_0x311e95[_0x562d44(0x12d)](_0x18e966['version'],0x1)&&_0x18e966[_0x562d44(0x132)]&&_0x311e95[_0x562d44(0x10e)](_0x18e966['status'],_0x311e95['rXfaG'])&&_0x311e95[_0x562d44(0x10e)](_0x18e966['status'],_0x311e95['IhnYP'])?_0x562d44(0x198):'';console[_0x562d44(0x17a)](_0x562d44(0x19b)+_0x311e95[_0x562d44(0x110)](_0x4c256e,0x1)+'.\x20'+_0x57bb34+'\x20'+_0x18e966[_0x562d44(0x191)]+_0x25c628+_0x29dd96);_0x18e966[_0x562d44(0x176)]===_0x311e95['zFNVx']&&_0x18e966[_0x562d44(0x193)]&&console['log']('\x20\x20\x20\x20\x20\x20Blocked:\x20'+_0x18e966['blockedReason']);_0x18e966[_0x562d44(0x176)]==='incomplete'&&_0x18e966[_0x562d44(0x1b8)]&&console[_0x562d44(0x17a)]('\x20\x20\x20\x20\x20\x20Incomplete:\x20'+_0x18e966[_0x562d44(0x1b8)]);if(_0x18e966['status']==='closed'&&_0x311e95['CTkcW'](_0x18e966['terminalReason'],_0x311e95['VtKlu']))console[_0x562d44(0x17a)](_0x562d44(0x101));else _0x18e966['status']==='closed'&&_0x18e966[_0x562d44(0x173)]&&console[_0x562d44(0x17a)](_0x562d44(0x1b4)+_0x18e966[_0x562d44(0x173)]);}}}export async function featureCreate(_0x5e9ffb,_0x28ffa1){const _0x18f247=_0x2869d5,_0x2a2162={'YEqaT':function(_0x147275,_0x4fdb54){return _0x147275===_0x4fdb54;},'jwAjI':function(_0x166875){return _0x166875();},'LcOFS':function(_0x1d8826,_0x238f9c){return _0x1d8826(_0x238f9c);},'yhjAL':function(_0x42682a,_0x4ffc34){return _0x42682a(_0x4ffc34);},'SQZsr':function(_0x32978e,_0x4fbd85,_0xd77b8a){return _0x32978e(_0x4fbd85,_0xd77b8a);}},{envNames:_0x10e16c}=await getEnvNames();_0x2a2162['YEqaT'](_0x10e16c['length'],0x0)&&console[_0x18f247(0x14a)]('\x0a'+formatProfileRequiredMessage(_0x1b53eb=>bold(_0x1b53eb)));const _0x34ea4d=_0x28ffa1['scenarios']?_0x28ffa1['scenarios']['map'](_0x21640d=>_0x21640d[_0x18f247(0x138)]()):[],_0x2ef83f=_0x2a2162[_0x18f247(0xfe)](getGitRepoUrl),_0x3f0140=getGitBranch();console[_0x18f247(0x17a)]('\x0aCreating\x20feature\x20review...');const _0x319481=await createFeature({'name':_0x5e9ffb,'description':_0x28ffa1[_0x18f247(0x191)],'checklist':_0x34ea4d,'gitRepoUrl':_0x2ef83f,'gitBranch':_0x3f0140});await _0x2a2162[_0x18f247(0x10a)](setActiveFeatureId,_0x319481['id']),await _0x2a2162['yhjAL'](tryStartCurrentSession,_0x319481['id']);const _0x126264=process['env']['CLAUDE_SESSION_ID'];_0x126264&&_0x2a2162[_0x18f247(0x16d)](registerSession,_0x126264,_0x319481['id']),console['log']('\x0a✅\x20Feature\x20review\x20created:\x20'+_0x319481['id']),displayFeature(_0x319481,_0x319481[_0x18f247(0x17f)]),console[_0x18f247(0x17a)](_0x18f247(0x18d));}export async function featureList(_0x364034){const _0x1cd867=_0x2869d5,_0x173b9a={'AJrph':function(_0xb7b8d1){return _0xb7b8d1();},'UeuoN':function(_0x1121c7,_0x66f297){return _0x1121c7(_0x66f297);},'scRaY':function(_0x40343f,_0x171025){return _0x40343f(_0x171025);},'mMLkw':function(_0x1b5a2f,_0xaff0f5){return _0x1b5a2f+_0xaff0f5;},'mCewH':_0x1cd867(0x188),'KMHSd':'\x20--include-deleted'},_0x281aaf={'limit':_0x364034['limit']??0xa,'offset':_0x364034['offset']??0x0,'includeDeleted':_0x364034['includeDeleted']};_0x364034[_0x1cd867(0x1bb)]&&(_0x281aaf[_0x1cd867(0x12b)]=_0x173b9a['AJrph'](getGitRepoUrl),_0x281aaf[_0x1cd867(0x199)]=getGitBranch());const _0x461a9e=await _0x173b9a['UeuoN'](listFeatures,_0x281aaf);if(_0x461a9e[_0x1cd867(0x1c8)][_0x1cd867(0x131)]===0x0){console[_0x1cd867(0x17a)](_0x1cd867(0x1b6));return;}const _0xb10365=_0x461a9e['totalCount']>_0x461a9e['items'][_0x1cd867(0x131)]?'Showing\x20'+_0x461a9e[_0x1cd867(0x1c8)][_0x1cd867(0x131)]+_0x1cd867(0x1b0)+_0x461a9e['totalCount']:_0x461a9e[_0x1cd867(0x122)]+'\x20feature\x20review(s)\x20found';console[_0x1cd867(0x17a)]('\x0a'+_0xb10365+':\x0a');for(const _0x12df7d of _0x461a9e['items']){console['log'](''+_0x12df7d['name']),console[_0x1cd867(0x17a)](_0x1cd867(0x1c9)+_0x12df7d['id']),_0x12df7d[_0x1cd867(0x178)]&&console['log']('\x20\x20\x20Progress:\x20'+_0x173b9a[_0x1cd867(0x150)](getProgressDisplay,_0x12df7d[_0x1cd867(0x178)])),_0x12df7d['gitBranch']&&console['log']('\x20\x20\x20Branch:\x20'+_0x12df7d[_0x1cd867(0x199)]),console[_0x1cd867(0x17a)]('\x20\x20\x20Created:\x20'+new Date(_0x12df7d[_0x1cd867(0x196)])['toLocaleDateString']()),console['log']('');}const _0x785ccb=_0x281aaf[_0x1cd867(0x11f)]??0xa,_0x44ac77=_0x173b9a['mMLkw'](_0x281aaf['offset']??0x0,_0x461a9e['items']['length']);if(_0x44ac77<_0x461a9e['totalCount']){const _0x57aec9=_0x785ccb!==0xa?'\x20--limit\x20'+_0x785ccb:'',_0x7dbed4=_0x364034['currentBranch']?_0x173b9a[_0x1cd867(0x19d)]:'',_0x26ec17=_0x364034['includeDeleted']?_0x173b9a['KMHSd']:'';console[_0x1cd867(0x17a)](_0x1cd867(0x155)+_0x44ac77+_0x57aec9+_0x7dbed4+_0x26ec17);}}function _0x3e43(){const _0xd0c246=['\x20\x20\x20To\x20restore\x20it,\x20run:\x20ranger\x20restore\x20','scRaY','\x0a❌\x20No\x20scenarios\x20found\x20to\x20edit.','Run:\x20ranger\x20create\x20\x22<name>\x22\x20to\x20create\x20a\x20new\x20feature\x20review','\x20\x20\x20\x20\x20Progress:\x20','NKznY','Next\x20page:\x20ranger\x20list\x20--offset\x20','Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','json','Please\x20specify\x20the\x20feature\x20review\x20ID:\x20ranger\x20resume\x20<id>','2824560dUTKyz','\x0a❌\x20No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','\x20incomplete','Ngajw','peihP','\x20\x20✅\x20No\x20feedback\x20to\x20address','completed','No\x20scenarios\x20found.','content','\x20—\x20','terminalReason','Screenshot\x20','lQalh','replace','stepName','isTTY','stdout','4|5|0|1|3|2','35759064IujGFF','name','SQZsr','TWLDZ','No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','\x0a📁\x20Sessions\x20for\x20feature\x20review:\x20','\x0aAvailable\x20scenarios:','linkedSession','canceledReason','gBJZE','textContent','status','style','stats','isInteger','log','JbkrB','Rmkvf','numeric','PcxFg','checklistItems','exit','currentSessionId','pendingItems','tEgeD','/api/v1/mcp/browser-sessions/','IVgZD','\x0a✅\x20Restored\x20feature\x20review:\x20','\x1b[0m','\x20--current-branch','closed','4177TKZmGQ','\x20\x20\x20\x20\x20🎯\x20Element:\x20<','assetUrl','\x0a➡️\x20\x20Set\x20as\x20active\x20feature\x20review','11499HsrmiE','FXLNJ','toFixed','description','incomplete','blockedReason','ready','list','createdAt','in_progress','\x20[has\x20reviewer\x20feedback]','gitBranch','lRdGl','\x20\x20\x20','184pNPKxw','mCewH','CLAUDE_SESSION_ID','sessionId','pipe','\x20\x20\x20Branch:\x20','completedAt','join','KaLbF','latestReview','Cannot\x20add\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.\x20Please\x20finish\x20your\x20review\x20first:\x20','\x0a❌\x20All\x20scenarios\x20were\x20excluded.','\x0a❌\x20Invalid\x20scenario\x20number(s):\x20','env','all','DXEHn','\x20\x20\x20Repository:\x20','unaddressedComments','repeat','prompt','\x20of\x20','spatial','coordinates','npxkA','\x20\x20\x20\x20\x20\x20Cancelled:\x20','iteration','\x0aNo\x20feature\x20reviews\x20found.','timing','incompleteReason','push','\x0a✅\x20Session\x20is\x20already\x20completed.','currentBranch','submittedAt','No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','\x20Session\x20','mWkRH','ruOyX','\x1b[1m','\x0a✅\x20Scenario\x20updated','\x20(v','\x20at\x20[','round','MWUXw','\x20\x20\x20\x20\x20📷\x20Screenshot:\x20','items','\x20\x20\x20ID:\x20','split','11652714hXvuOd','Unknown','DCCDo','version','map','TbpQS','screenshotUrls','browserSessionId','\x0a✅\x20Resumed\x20feature\x20review:\x20','ZXwon','\x20concluded.','\x0aNo\x20matching\x20active\x20feature\x20reviews\x20found.','HFksl','jwAjI','\x0a🗑️\x20\x20Deleted\x20feature\x20review:\x20','iAIqc','\x20\x20\x20\x20\x20\x20Approved','cTWqN','\x20>\x20','\x20\x20\x20Updated\x20branch\x20to:\x20','\x20verified','AROtU','isKeyStep','\x20unaddressed\x20comment(s)','\x20in\x20progress','LcOFS','5760yxRLAe','Multiple\x20feature\x20reviews\x20found.\x20Select\x20one:','7794mXGhLf','zIMWO',':\x20\x22','plheQ','verified','assets','frmPU','canonicalFlow','has','1352PQTeUT','IcHpD','CjRou','\x0a\x20\x20\x20Scenarios:','verification_in_progress','4363877xJVuLz','QKMuS','toLocaleString','find','limit','fDULb','\x20\x20\x20\x20\x20📍\x20Annotation:\x20','totalCount','GBodT','screenshot','rXfaG','dashboardUrl','AIChm','agentResponse','hLqxM','HWaKb','gitRepoUrl','JqAGs','VMRQY','git\x20remote\x20get-url\x20origin','iqDxg','selected','length','parentItemId','.\x20Feature\x20review\x20has\x20','.png','error','domRef','HOUJD','trim','lzZBn','snMtb','filter','POuRF','pop','write','feedback-images','git\x20rev-parse\x20--abbrev-ref\x20HEAD','reports','type','8HWGNap','scenario','assetType','\x20\x20\x20\x20\x20Branch:\x20','hOyEA','33mfhgVT','WXQQa','warn','excludeScenarios','\x20scenario(s).','\x20\x20\x20Created:\x20','UProH'];_0x3e43=function(){return _0xd0c246;};return _0x3e43();}export async function featureShow(_0x233ecb){const _0x1b606a=_0x2869d5,_0x3d89d2={'ccLlK':function(_0x33a678){return _0x33a678();},'bBfUC':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','iAIqc':function(_0x16c16b,_0x2ac89e,_0xabe666){return _0x16c16b(_0x2ac89e,_0xabe666);}},_0x2434eb=_0x233ecb||await _0x3d89d2['ccLlK'](getActiveFeatureId);if(!_0x2434eb)throw new Error(_0x3d89d2['bBfUC']);const _0x4ac840=await getFeature(_0x2434eb);_0x3d89d2[_0x1b606a(0x100)](displayFeature,_0x4ac840,_0x4ac840[_0x1b606a(0x17f)]);}export async function featureResume(_0x59fda9){const _0x31197c=_0x2869d5,_0x275a88={'DCCDo':function(_0x4fc529,_0x9d9c16){return _0x4fc529(_0x9d9c16);},'FXLNJ':function(_0x199856,_0x390192,_0x38e51a){return _0x199856(_0x390192,_0x38e51a);},'NKznY':function(_0x313c10,_0x5ae81e){return _0x313c10&&_0x5ae81e;},'mWkRH':'any','KOVjo':function(_0x576907,_0x4a1098){return _0x576907===_0x4a1098;},'ruOyX':_0x31197c(0x152),'SFQcc':'\x0aNon-interactive\x20mode\x20detected.\x20Multiple\x20feature\x20reviews\x20found:','MagCK':_0x31197c(0x158),'AilSl':_0x31197c(0x195),'BTzBB':_0x31197c(0x10c),'QKMuS':function(_0x4afb37,_0x133da5){return _0x4afb37(_0x133da5);}};if(_0x59fda9){const _0x35050c=await getFeature(_0x59fda9);await _0x275a88['DCCDo'](setActiveFeatureId,_0x35050c['id']);const _0x4d1cdc=getGitBranch();_0x4d1cdc&&_0x4d1cdc!==_0x35050c['gitBranch']&&(await updateFeature(_0x35050c['id'],{'gitBranch':_0x4d1cdc}),console[_0x31197c(0x17a)](_0x31197c(0x104)+_0x4d1cdc));console['log'](_0x31197c(0xf9)+_0x35050c[_0x31197c(0x16c)]+'\x20('+_0x35050c['id']+')'),await tryStartCurrentSession(_0x35050c['id']);const _0xb1935d=process[_0x31197c(0x1a9)][_0x31197c(0x19e)];_0xb1935d&®isterSession(_0xb1935d,_0x35050c['id']);_0x275a88[_0x31197c(0x18f)](displayFeature,_0x35050c,_0x35050c[_0x31197c(0x17f)]),await printFeedbackNudge(_0x35050c['id']);return;}const _0x5507db=getGitRepoUrl(),_0x51c0fa=getGitBranch();if(_0x275a88[_0x31197c(0x154)](!_0x5507db,!_0x51c0fa))throw new Error('Not\x20in\x20a\x20git\x20repository.');console['log']('\x0aSearching\x20for\x20feature\x20reviews\x20matching:\x20'+(_0x5507db||_0x275a88[_0x31197c(0x1bf)])+'\x20/\x20'+(_0x51c0fa||_0x275a88['mWkRH'])+'...');const _0x1073ef=await listFeatures({'gitRepoUrl':_0x5507db,'gitBranch':_0x51c0fa}),_0x1a069f=_0x1073ef[_0x31197c(0x1c8)][_0x31197c(0x13b)](_0x47a33f=>_0x47a33f['status']?_0x47a33f['status']!=='verified':!_0x47a33f[_0x31197c(0x1a2)]);if(_0x275a88['KOVjo'](_0x1a069f[_0x31197c(0x131)],0x0)){console['log'](_0x31197c(0xfc)),console['log'](_0x275a88[_0x31197c(0x1c0)]);return;}let _0x519cbe;if(_0x275a88['KOVjo'](_0x1a069f['length'],0x1))_0x519cbe=_0x1a069f[0x0];else{const _0x25f8df=process['stdin'][_0x31197c(0x168)]&&process['stdout']['isTTY'];if(!_0x25f8df){console['log'](_0x275a88['SFQcc']);for(const _0x2615f4 of _0x1a069f){console['log']('\x20\x20'+_0x2615f4['name']),console[_0x31197c(0x17a)]('\x20\x20\x20\x20\x20ID:\x20'+_0x2615f4['id']),_0x2615f4[_0x31197c(0x178)]&&console[_0x31197c(0x17a)](_0x31197c(0x153)+_0x275a88[_0x31197c(0x1cd)](getProgressDisplay,_0x2615f4['stats'])),_0x2615f4[_0x31197c(0x199)]&&console['log'](_0x31197c(0x146)+_0x2615f4['gitBranch']);}throw new Error(_0x275a88['MagCK']);}const {selected:_0x4691f3}=await _0x5d8f24[_0x31197c(0x1af)]([{'type':_0x275a88['AilSl'],'name':_0x31197c(0x130),'message':_0x275a88['BTzBB'],'choices':_0x1a069f[_0x31197c(0x1cf)](_0x5f4360=>({'name':_0x5f4360['name']+'\x20('+_0x5f4360['id']+')','value':_0x5f4360['id']}))}]);_0x519cbe=_0x1a069f['find'](_0x2711d6=>_0x2711d6['id']===_0x4691f3);}await setActiveFeatureId(_0x519cbe['id']);_0x51c0fa&&_0x51c0fa!==_0x519cbe['gitBranch']&&(await _0x275a88['FXLNJ'](updateFeature,_0x519cbe['id'],{'gitBranch':_0x51c0fa}),console[_0x31197c(0x17a)](_0x31197c(0x104)+_0x51c0fa));console['log'](_0x31197c(0xf9)+_0x519cbe['name']+'\x20('+_0x519cbe['id']+')'),await _0x275a88[_0x31197c(0x11c)](tryStartCurrentSession,_0x519cbe['id']);const _0x3d29f9=await _0x275a88[_0x31197c(0x1cd)](getFeature,_0x519cbe['id']),_0x1b86da=process[_0x31197c(0x1a9)]['CLAUDE_SESSION_ID'];_0x1b86da&&_0x275a88[_0x31197c(0x18f)](registerSession,_0x1b86da,_0x3d29f9['id']),displayFeature(_0x3d29f9,_0x3d29f9[_0x31197c(0x17f)]),await _0x275a88[_0x31197c(0x1cd)](printFeedbackNudge,_0x3d29f9['id']);}async function printFeedbackNudge(_0x3063ee){const _0x3cadb2=_0x2869d5,_0x7a8ce9={'MWUXw':function(_0x435c48,_0x3d1de5,_0x5e5ac1){return _0x435c48(_0x3d1de5,_0x5e5ac1);},'tZtrU':'\x20\x20\x20Run\x20`ranger\x20get-review`\x20to\x20see\x20what\x20needs\x20to\x20be\x20fixed.'};try{const {items:_0x51c435}=await getActionItems(_0x3063ee);let _0x3d689f=0x0,_0xc7a149=0x0;for(const _0x50809f of _0x51c435){const _0x316f56=await _0x7a8ce9[_0x3cadb2(0x1c6)](getItemFeedback,_0x3063ee,_0x50809f['id']);_0x316f56[_0x3cadb2(0x1ad)][_0x3cadb2(0x131)]>0x0&&(_0x3d689f+=_0x316f56[_0x3cadb2(0x1ad)][_0x3cadb2(0x131)],_0xc7a149++);}_0x3d689f>0x0&&(console[_0x3cadb2(0x17a)]('\x0a⚠️\x20\x20'+_0x3d689f+'\x20unaddressed\x20reviewer\x20comment(s)\x20across\x20'+_0xc7a149+_0x3cadb2(0x14c)),console['log'](_0x7a8ce9['tZtrU']));}catch{}}async function tryStartCurrentSession(_0x1cba69){const _0x257caf=_0x2869d5,_0x31c9a3={'IcHpD':function(_0x205205,_0x3e8370){return _0x205205(_0x3e8370);}};try{const {sessions:_0x5e556d}=await _0x31c9a3[_0x257caf(0x117)](listFeatureSessions,_0x1cba69),_0x11928c=_0x5e556d['find'](_0xbdd681=>_0xbdd681['status']===_0x257caf(0x194));_0x11928c&&(await startSession(_0x1cba69,_0x11928c['id']),console[_0x257caf(0x17a)]('\x20\x20\x20▶️\x20Started\x20session\x20'+_0x11928c[_0x257caf(0x1b5)]));}catch{}}export async function featureReport(_0x59d711,_0x5dd53b){const _0x93de16=_0x2869d5,_0x35979c={'VQekv':function(_0x39b1b5){return _0x39b1b5();},'ZXwon':function(_0x258455,_0x1a57db,_0x338790){return _0x258455(_0x1a57db,_0x338790);},'RHPRl':function(_0x47abfa,_0x3de2ef,_0x576d88,_0x2cd1cd){return _0x47abfa(_0x3de2ef,_0x576d88,_0x2cd1cd);},'NFBhT':function(_0x223931,_0xb57ed3){return _0x223931(_0xb57ed3);},'gBJZE':function(_0x46534a,_0x19f08f,_0xa6378a,_0x47d6c1){return _0x46534a(_0x19f08f,_0xa6378a,_0x47d6c1);},'Ewslj':'utf-8'},_0x3069de=_0x59d711||await _0x35979c['VQekv'](getActiveFeatureId);if(!_0x3069de)throw new Error('No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.');console['log']('\x0aGenerating\x20report...');const _0x59eb6c=await _0x35979c[_0x93de16(0xfa)](getFeatureReportMarkdown,_0x3069de,{'style':_0x5dd53b[_0x93de16(0x177)]}),_0x5f22db=_0x5dd53b['output']||_0x35979c['RHPRl'](join,getRangerDir(),_0x93de16(0x141),_0x3069de+'.md'),_0x451b6a=_0x35979c['ZXwon'](join,_0x5f22db,'..');!_0x35979c['NFBhT'](existsSync,_0x451b6a)&&await mkdir(_0x451b6a,{'recursive':!![]}),await _0x35979c[_0x93de16(0x174)](writeFile,_0x5f22db,_0x59eb6c,_0x35979c['Ewslj']),console[_0x93de16(0x17a)]('\x0a✅\x20Report\x20generated:\x20'+_0x5f22db);}function getScenarioResult(_0x53d478){const _0x387c52=_0x2869d5,_0x34156b={'IVgZD':_0x387c52(0x189),'HOUJD':_0x387c52(0x11a)};if(_0x53d478['status']===_0x34156b[_0x387c52(0x185)])return _0x53d478['terminalReason']??_0x34156b[_0x387c52(0x185)];if(_0x53d478[_0x387c52(0x176)]===_0x34156b[_0x387c52(0x137)])return _0x387c52(0x197);return _0x53d478[_0x387c52(0x176)];}function getScenarioRationale(_0xf211f4,_0x269d57){const _0x551352=_0x2869d5,_0x435c13={'TbpQS':_0x551352(0x16a)},_0x31a9b3=_0x435c13[_0x551352(0x1d0)]['split']('|');let _0x234252=0x0;while(!![]){switch(_0x31a9b3[_0x234252++]){case'0':if(_0xf211f4[_0x551352(0x1b8)])return _0xf211f4[_0x551352(0x1b8)];continue;case'1':if(_0xf211f4[_0x551352(0x173)])return _0xf211f4['canceledReason'];continue;case'2':return null;case'3':if(_0xf211f4['notes'])return _0xf211f4['notes'];continue;case'4':if(_0x269d57)return _0x269d57;continue;case'5':if(_0xf211f4['blockedReason'])return _0xf211f4[_0x551352(0x193)];continue;}break;}}export async function featureReportPrDescription(_0x185889,_0x10cbc4){const _0x57e4cc=_0x2869d5,_0x59bda9={'xvNbP':_0x57e4cc(0x16f),'Rmkvf':'\x0a❌\x20No\x20scenarios\x20found\x20to\x20include.','lRdGl':function(_0x29987a,_0x4e117f,_0x2f151a,_0x5c12e1){return _0x29987a(_0x4e117f,_0x2f151a,_0x5c12e1);},'cTWqN':function(_0x3e4102,_0x223f61,_0xf4da6a){return _0x3e4102(_0x223f61,_0xf4da6a);}},_0x59bfec=_0x185889||await getActiveFeatureId();if(!_0x59bfec)throw new Error(_0x59bda9['xvNbP']);const _0x33689f=await getFeature(_0x59bfec),_0x3b7c23=_0x33689f['checklistItems']||[],_0x409188=getCurrentSessionItems(_0x33689f,_0x3b7c23);_0x409188[_0x57e4cc(0x131)]===0x0&&(console[_0x57e4cc(0x135)](_0x59bda9[_0x57e4cc(0x17c)]),process[_0x57e4cc(0x180)](0x1));const _0x5cddfd=_0x10cbc4[_0x57e4cc(0x14b)]??[],_0x8df020=_0x5cddfd[_0x57e4cc(0x13b)](_0xd10010=>!Number[_0x57e4cc(0x179)](_0xd10010)||_0xd10010<0x1||_0xd10010>_0x409188['length']);if(_0x8df020['length']>0x0){console['error'](_0x57e4cc(0x1a8)+_0x8df020['join'](',\x20')),console['log'](_0x57e4cc(0x171));for(let _0x7e6fd4=0x0;_0x7e6fd4<_0x409188[_0x57e4cc(0x131)];_0x7e6fd4++){console[_0x57e4cc(0x17a)]('\x20\x20'+(_0x7e6fd4+0x1)+'.\x20'+_0x409188[_0x7e6fd4]['description']);}process[_0x57e4cc(0x180)](0x1);}const _0x53f696=new Set(_0x5cddfd['map'](_0x4cbeea=>_0x4cbeea-0x1)),_0x3d8101=_0x409188['filter']((_0x3e1346,_0x5e7be6)=>!_0x53f696[_0x57e4cc(0x115)](_0x5e7be6));_0x3d8101['length']===0x0&&(console[_0x57e4cc(0x135)](_0x57e4cc(0x1a7)),process[_0x57e4cc(0x180)](0x1));if(_0x10cbc4[_0x57e4cc(0x157)])await _0x59bda9[_0x57e4cc(0x19a)](outputJsonReport,_0x59bfec,_0x33689f,_0x3d8101);else{const _0x41fdb1=await _0x59bda9[_0x57e4cc(0x102)](getFeatureReportMarkdown,_0x59bfec,{'itemIds':_0x3d8101[_0x57e4cc(0x1cf)](_0x5fe2b3=>_0x5fe2b3['id'])});process[_0x57e4cc(0x169)]['write'](_0x41fdb1['trimEnd']()+'\x0a');}}async function outputJsonReport(_0x52aa30,_0x2aa4b2,_0x50377b){const _0x21637f=_0x2869d5,_0x81058c={'MTOoa':function(_0x456f48,_0x4190e8){return _0x456f48(_0x4190e8);},'aXaZl':function(_0x530d66){return _0x530d66();}},_0x5df406=_0x81058c['aXaZl'](getApiBaseUrl),_0x3113f9=await getFeatureReport(_0x52aa30),_0x22f0c4=new Map(_0x3113f9['checklistItems'][_0x21637f(0x1cf)](_0x5bc489=>[_0x5bc489['id'],_0x5bc489])),_0x440837=await Promise[_0x21637f(0x1aa)](_0x50377b['map'](async _0x14f7fb=>{const _0x4b962f=_0x21637f,_0xdc5f30=_0x22f0c4['get'](_0x14f7fb['id']),_0xd7692a=_0xdc5f30?.[_0x4b962f(0x172)]??null;let _0x356b73=[];if(_0x14f7fb['browserSessionId'])try{const {steps:_0x34aa9c}=await _0x81058c['MTOoa'](getBrowserSessionSteps,_0x14f7fb[_0x4b962f(0x1d2)]);_0x34aa9c[_0x4b962f(0x131)]>0x0&&(_0x356b73=_0x34aa9c[_0x4b962f(0x1cf)](_0x2892d0=>{const _0x2f9ca2=_0x4b962f,_0x45aaf4=_0x2892d0[_0x2f9ca2(0x112)]['find'](_0x35d35a=>_0x35d35a['assetType']===_0x2f9ca2(0x124)&&_0x35d35a[_0x2f9ca2(0x1b7)]==='after')??_0x2892d0[_0x2f9ca2(0x112)]['find'](_0x3ee229=>_0x3ee229[_0x2f9ca2(0x145)]==='screenshot');let _0xa5a808=null,_0xee45c1=null;if(_0x45aaf4){const _0x9087e6=_0x45aaf4['storage']['location'][_0x2f9ca2(0x1ca)]('/')[_0x2f9ca2(0x13d)]();_0xa5a808=_0x5df406+_0x2f9ca2(0x184)+_0x14f7fb['browserSessionId']+'/artifacts/'+_0x9087e6,_0x9087e6&&(_0xee45c1=_0x9087e6['replace'](/\.\w+$/,'')[_0x2f9ca2(0x166)](/^(key_)?\d+_/,'')[_0x2f9ca2(0x166)](/[-_]/g,'\x20'));}return{'description':_0xee45c1||_0x2892d0[_0x2f9ca2(0x191)]||_0x2892d0[_0x2f9ca2(0x167)]||'Step\x20'+_0x2892d0['position'],'screenshot':_0xa5a808,'is_key_step':_0x2892d0[_0x2f9ca2(0x107)]};}));}catch{}return _0x356b73[_0x4b962f(0x131)]===0x0&&_0xd7692a?.['screenshotUrls']&&(_0x356b73=_0xd7692a[_0x4b962f(0x1d1)]['map']((_0x4a8a70,_0xda45fa)=>({'description':_0x4b962f(0x164)+(_0xda45fa+0x1),'screenshot':_0x4a8a70,'is_key_step':![]}))),{'description':_0x14f7fb[_0x4b962f(0x191)],'result':getScenarioResult(_0x14f7fb),'rationale':getScenarioRationale(_0x14f7fb,_0xd7692a?.[_0x4b962f(0x128)]),'steps':_0x356b73};})),_0x5a0ce7={'url':_0x2aa4b2[_0x21637f(0x126)],'scenarios':_0x440837};process['stdout'][_0x21637f(0x13e)](JSON['stringify'](_0x5a0ce7,null,0x2)+'\x0a');}export async function featureConcludeSession(_0x33c43c){const _0x43c955=_0x2869d5,_0x3b3ce3={'tEgeD':function(_0x4ad32e){return _0x4ad32e();},'frmPU':_0x43c955(0x1bd),'kDFAi':function(_0x308a95,_0x1f8eb1){return _0x308a95(_0x1f8eb1);},'Ogcej':'Current\x20session\x20not\x20found.','YdcFI':_0x43c955(0x1ba),'wiEus':function(_0x183bc4,_0x62df8f){return _0x183bc4!==_0x62df8f;},'IjiAH':'\x0aConcluding\x20session...','QgYuF':function(_0x82c5f,_0x20e9c7,_0xfdfb2a){return _0x82c5f(_0x20e9c7,_0xfdfb2a);}},_0x4be9c0=_0x33c43c||await _0x3b3ce3[_0x43c955(0x183)](getActiveFeatureId);if(!_0x4be9c0)throw new Error(_0x3b3ce3[_0x43c955(0x113)]);const _0x2caab2=await getFeature(_0x4be9c0);if(!_0x2caab2[_0x43c955(0x181)])throw new Error('No\x20active\x20session\x20for\x20this\x20feature\x20review.');const {sessions:_0x20e1a6}=await _0x3b3ce3['kDFAi'](listFeatureSessions,_0x4be9c0),_0x586516=_0x20e1a6[_0x43c955(0x11e)](_0x36b953=>_0x36b953['id']===_0x2caab2[_0x43c955(0x181)]);if(!_0x586516)throw new Error(_0x3b3ce3['Ogcej']);if(_0x586516[_0x43c955(0x176)]==='completed'){console['log'](_0x3b3ce3['YdcFI']);return;}if(_0x3b3ce3['wiEus'](_0x586516['status'],_0x43c955(0x197)))throw new Error('Cannot\x20conclude\x20session\x20with\x20status:\x20'+_0x586516[_0x43c955(0x176)]);console['log'](_0x3b3ce3['IjiAH']),await _0x3b3ce3['QgYuF'](concludeSession,_0x4be9c0,_0x2caab2['currentSessionId']),console[_0x43c955(0x17a)]('\x0a✅\x20Session\x20'+_0x586516[_0x43c955(0x1b5)]+_0x43c955(0xfb)),console['log']('\x20\x20\x20The\x20feature\x20review\x20is\x20now\x20ready\x20for\x20human\x20review\x20on\x20the\x20Ranger\x20dashboard.');}export async function featureSessions(_0x4b4a3c){const _0x2e8724=_0x2869d5,_0x259a8e={'nFwmJ':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','DXEHn':function(_0x120bb7,_0x479041){return _0x120bb7(_0x479041);},'UProH':function(_0x4a5074,_0x5b6e53){return _0x4a5074===_0x5b6e53;},'GBodT':'No\x20sessions\x20found.','rThup':_0x2e8724(0x15f)},_0x2adf65=_0x4b4a3c||await getActiveFeatureId();if(!_0x2adf65)throw new Error(_0x259a8e['nFwmJ']);const _0x585d57=await _0x259a8e[_0x2e8724(0x1ab)](getFeature,_0x2adf65);console['log'](_0x2e8724(0x170)+_0x585d57['name']+'\x0a');const {sessions:_0x21900f}=await listFeatureSessions(_0x2adf65);if(_0x259a8e[_0x2e8724(0x14e)](_0x21900f[_0x2e8724(0x131)],0x0)){console['log'](_0x259a8e[_0x2e8724(0x123)]);return;}for(const _0x2c950d of _0x21900f){const _0x570daa=_0x259a8e['UProH'](_0x2c950d['status'],_0x259a8e['rThup'])?'✅':_0x259a8e[_0x2e8724(0x14e)](_0x2c950d[_0x2e8724(0x176)],_0x2e8724(0x197))?'🔄':'▶️';console[_0x2e8724(0x17a)](_0x570daa+_0x2e8724(0x1be)+_0x2c950d[_0x2e8724(0x1b5)]+'\x20('+_0x2c950d['id']+')'),console[_0x2e8724(0x17a)]('\x20\x20\x20Status:\x20'+_0x2c950d[_0x2e8724(0x176)]),console[_0x2e8724(0x17a)](_0x2e8724(0x14d)+new Date(_0x2c950d[_0x2e8724(0x196)])[_0x2e8724(0x11d)]()),_0x2c950d['completedAt']&&console[_0x2e8724(0x17a)]('\x20\x20\x20Completed:\x20'+new Date(_0x2c950d['completedAt'])['toLocaleString']()),console[_0x2e8724(0x17a)]('');}}export async function featureAddScenario(_0x4e7823,_0x12045f){const _0x4c74fd=_0x2869d5,_0x4c359a={'VCZXB':function(_0x590ef4,_0x6297ce,_0x87a802){return _0x590ef4(_0x6297ce,_0x87a802);}},_0x529d4a=_0x12045f||await getActiveFeatureId();if(!_0x529d4a)throw new Error(_0x4c74fd(0x1bd));const _0xd0cd4c=await getFeature(_0x529d4a);if(_0xd0cd4c['latestReview']&&!_0xd0cd4c[_0x4c74fd(0x1a5)][_0x4c74fd(0x1bc)])throw new Error(_0x4c74fd(0x1a6)+_0xd0cd4c['dashboardUrl']);await _0x4c359a['VCZXB'](createChecklistItem,_0x529d4a,_0x4e7823);const _0x59d74e=await getFeature(_0x529d4a);console['log']('\x0a✅\x20Scenario\x20added'),_0x4c359a['VCZXB'](displayFeature,_0x59d74e,_0x59d74e[_0x4c74fd(0x17f)]);}export async function featureEditScenario(_0x21ca2d,_0x88532a){const _0x353b00=_0x2869d5,_0x1ad142={'sVqWn':function(_0x88117a,_0x23b5a9){return _0x88117a===_0x23b5a9;},'TWLDZ':'\x0aAvailable\x20scenarios:','kmjUI':function(_0x4b4dcf,_0x174996){return _0x4b4dcf<_0x174996;},'hOyEA':function(_0x4f1c0d,_0x4d4fae){return _0x4f1c0d-_0x4d4fae;},'PcxFg':function(_0x686766,_0x5563a2){return _0x686766>=_0x5563a2;},'HWaKb':function(_0x3b8ff6,_0x4336ac){return _0x3b8ff6+_0x4336ac;}},_0x52179c=_0x88532a['id']||await getActiveFeatureId();!_0x52179c&&(console[_0x353b00(0x135)](_0x353b00(0x15a)),console['error'](_0x353b00(0x156)),process['exit'](0x1));const _0xd079ab=await getFeature(_0x52179c);_0xd079ab[_0x353b00(0x1a5)]&&!_0xd079ab['latestReview'][_0x353b00(0x1bc)]&&(console[_0x353b00(0x135)]('\x0a❌\x20Cannot\x20edit\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.'),console['error']('Please\x20finish\x20your\x20review\x20first:'),console[_0x353b00(0x135)]('\x20\x20'+_0xd079ab['dashboardUrl']),process[_0x353b00(0x180)](0x1));const _0x432500=_0xd079ab['checklistItems']||[];_0x1ad142['sVqWn'](_0x432500[_0x353b00(0x131)],0x0)&&(console[_0x353b00(0x135)](_0x353b00(0x151)),process[_0x353b00(0x180)](0x1));if(_0x88532a[_0x353b00(0x144)]===undefined){console[_0x353b00(0x135)]('\x0a❌\x20No\x20scenario\x20number\x20provided.\x20Use\x20--scenario\x20<number>.'),console[_0x353b00(0x17a)](_0x1ad142[_0x353b00(0x16e)]);for(let _0xf2843e=0x0;_0x1ad142['kmjUI'](_0xf2843e,_0x432500['length']);_0xf2843e++){console[_0x353b00(0x17a)]('\x20\x20'+(_0xf2843e+0x1)+'.\x20'+_0x432500[_0xf2843e]['description']);}process[_0x353b00(0x180)](0x1);}const _0x139b98=_0x1ad142[_0x353b00(0x147)](_0x88532a[_0x353b00(0x144)],0x1);if(_0x139b98<0x0||_0x1ad142[_0x353b00(0x17e)](_0x139b98,_0x432500[_0x353b00(0x131)])){console['error']('\x0a❌\x20Invalid\x20scenario\x20index:\x20'+_0x88532a[_0x353b00(0x144)]+_0x353b00(0x133)+_0x432500['length']+'\x20scenarios.'),console['log'](_0x1ad142[_0x353b00(0x16e)]);for(let _0x5809f9=0x0;_0x5809f9<_0x432500[_0x353b00(0x131)];_0x5809f9++){console[_0x353b00(0x17a)]('\x20\x20'+_0x1ad142[_0x353b00(0x12a)](_0x5809f9,0x1)+'.\x20'+_0x432500[_0x5809f9]['description']);}process['exit'](0x1);}const _0x11f69c=_0x432500[_0x139b98];await updateChecklistItem(_0x52179c,_0x11f69c['id'],{'description':_0x21ca2d});const _0xa39039=await getFeature(_0x52179c);console['log'](_0x353b00(0x1c2)),displayFeature(_0xa39039,_0xa39039[_0x353b00(0x17f)]);}async function downloadFeedbackImage(_0x438687,_0x4a5d39){const _0x29820e=_0x2869d5,_0xb2ad99={'npxkA':function(_0x474f1c){return _0x474f1c();},'KaLbF':_0x29820e(0x13f),'lQalh':function(_0x27cfb7,_0x593339){return _0x27cfb7(_0x593339);},'JqAGs':function(_0x50e6e8,_0x20a6f0,_0x1b996b){return _0x50e6e8(_0x20a6f0,_0x1b996b);}};try{const _0x3f611b=join(_0xb2ad99[_0x29820e(0x1b3)](getRangerDir),_0xb2ad99[_0x29820e(0x1a4)]);await mkdir(_0x3f611b,{'recursive':!![]});const _0x1a6cb4=join(_0x3f611b,'comment_'+_0x4a5d39+_0x29820e(0x134)),_0xcea68d=await _0xb2ad99[_0x29820e(0x165)](fetch,_0x438687);if(!_0xcea68d['ok'])return null;const _0x2fc004=Buffer['from'](await _0xcea68d['arrayBuffer']());return await _0xb2ad99[_0x29820e(0x12c)](writeFile,_0x1a6cb4,_0x2fc004),_0x1a6cb4;}catch{return null;}}export async function featureGetReview(_0x54840a){const _0x3d11f2=_0x2869d5,_0x11ce79={'AIChm':_0x3d11f2(0x1bd),'PzHsm':function(_0x340944,_0x393eef){return _0x340944(_0x393eef);},'bszlY':_0x3d11f2(0x160),'FqSIr':function(_0x3176c5,_0x3f657a){return _0x3176c5+_0x3f657a;},'peihP':'en-US','Qguzh':_0x3d11f2(0x17d),'fDULb':function(_0x2f25a2,_0x4cdcca,_0x2947ea){return _0x2f25a2(_0x4cdcca,_0x2947ea);},'Rrwuh':'element','AROtU':function(_0x19b5ed,_0x4a2b13){return _0x19b5ed>=_0x4a2b13;}},_0x1b6c8a=_0x54840a||await getActiveFeatureId();if(!_0x1b6c8a)throw new Error(_0x11ce79[_0x3d11f2(0x127)]);const _0x400e1f=await _0x11ce79['PzHsm'](getFeature,_0x1b6c8a),{items:_0x5f508a}=await getActionItems(_0x1b6c8a);console['log']('\x0a📋\x20Feedback\x20for:\x20'+_0x400e1f[_0x3d11f2(0x16c)]+'\x20('+_0x400e1f['id']+')\x0a');if(_0x5f508a[_0x3d11f2(0x131)]===0x0){console['log'](_0x11ce79['bszlY']);return;}for(let _0x51eba9=0x0;_0x51eba9<_0x5f508a[_0x3d11f2(0x131)];_0x51eba9++){const _0x1ca688=_0x5f508a[_0x51eba9],_0x5d1279=_0x1ca688['version']>0x1?'\x20(v'+_0x1ca688[_0x3d11f2(0x1ce)]+')':'',_0x1fc4ab=await getItemFeedback(_0x1b6c8a,_0x1ca688['id']);if(_0x1fc4ab['unaddressedComments'][_0x3d11f2(0x131)]>0x0){console['log']('Scenario\x20'+_0x11ce79['FqSIr'](_0x51eba9,0x1)+_0x3d11f2(0x10f)+_0x1ca688[_0x3d11f2(0x191)]+'\x22'+_0x5d1279+_0x3d11f2(0x162)+_0x1fc4ab['unaddressedComments']['length']+_0x3d11f2(0x108));for(const _0x27aa05 of _0x1fc4ab['unaddressedComments']){const _0x4ebf99=new Date(_0x27aa05[_0x3d11f2(0x196)])['toLocaleDateString'](_0x11ce79[_0x3d11f2(0x15d)],{'month':'short','day':_0x11ce79['Qguzh']}),_0x5305ed=_0x27aa05['authorName']||_0x27aa05['authorEmail']||_0x3d11f2(0x1cc);console['log']('\x20\x20💬\x20'+_0x5305ed+'\x20('+_0x4ebf99+'):\x20\x22'+_0x27aa05[_0x3d11f2(0x161)]+'\x22');if(_0x27aa05['assetUrl']){const _0xba6203=await _0x11ce79[_0x3d11f2(0x120)](downloadFeedbackImage,_0x27aa05[_0x3d11f2(0x18c)],_0x27aa05['id']);_0xba6203&&console[_0x3d11f2(0x17a)](_0x3d11f2(0x1c7)+_0xba6203);}if(_0x27aa05['domRef']){const _0x21580a=_0x27aa05[_0x3d11f2(0x136)]['selector']['split'](_0x3d11f2(0x103))['pop']()?.['split'](':')[0x0]||_0x11ce79['Rrwuh'],_0x58545d=_0x27aa05[_0x3d11f2(0x136)][_0x3d11f2(0x175)]?'\x20\x22'+_0x27aa05[_0x3d11f2(0x136)][_0x3d11f2(0x175)]['slice'](0x0,0x3c)+'\x22':'';console['log'](_0x3d11f2(0x18b)+_0x21580a+'>'+_0x58545d),console['log']('\x20\x20\x20\x20\x20📋\x20Selector:\x20'+_0x27aa05['domRef']['selector']);}else{if(_0x27aa05['spatial']){const _0x23a806=_0x27aa05[_0x3d11f2(0x1b1)][_0x3d11f2(0x1b2)];_0x27aa05[_0x3d11f2(0x1b1)][_0x3d11f2(0x142)]==='point'&&_0x11ce79[_0x3d11f2(0x106)](_0x23a806[_0x3d11f2(0x131)],0x2)?console['log']('\x20\x20\x20\x20\x20📍\x20Annotation:\x20point\x20at\x20('+_0x23a806[0x0]['toFixed'](0x2)+',\x20'+_0x23a806[0x1][_0x3d11f2(0x190)](0x2)+')'):console['log'](_0x3d11f2(0x121)+_0x27aa05['spatial'][_0x3d11f2(0x142)]+_0x3d11f2(0x1c4)+_0x23a806[_0x3d11f2(0x1cf)](_0x4d1927=>_0x4d1927[_0x3d11f2(0x190)](0x2))[_0x3d11f2(0x1a3)](',\x20')+']');}}}if(_0x1fc4ab[_0x3d11f2(0x114)]){console['log']('\x20\x20Expected\x20flow:');for(const _0x2427b6 of _0x1fc4ab[_0x3d11f2(0x114)]['split']('\x0a')){console[_0x3d11f2(0x17a)]('\x20\x20\x20\x20'+_0x2427b6);}}}else console['log']('Scenario\x20'+(_0x51eba9+0x1)+':\x20\x22'+_0x1ca688[_0x3d11f2(0x191)]+'\x22'+_0x5d1279+'\x20—\x20no\x20comments'),console[_0x3d11f2(0x17a)](_0x3d11f2(0x15e));console['log']('');}}export async function featureDelete(_0x5a9917){const _0x31fc45=_0x2869d5,_0x2e1536={'POuRF':function(_0x162700){return _0x162700();},'jhtbu':function(_0x391070,_0x1e046a){return _0x391070(_0x1e046a);},'WXQQa':_0x31fc45(0x14f)},_0x28f4ce=_0x5a9917||await _0x2e1536[_0x31fc45(0x13c)](getActiveFeatureId);if(!_0x28f4ce)throw new Error('No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review');const _0x4179ce=await getFeature(_0x28f4ce);await _0x2e1536['jhtbu'](softDeleteFeature,_0x28f4ce),console[_0x31fc45(0x17a)](_0x31fc45(0xff)+_0x4179ce['name']+'\x20('+_0x28f4ce+')'),console['log'](_0x2e1536[_0x31fc45(0x149)]+_0x28f4ce);}export async function featureRestore(_0xd0fb30){const _0x4b0f9e=_0x2869d5,_0x4a1095={'iSNRT':function(_0x2b9789,_0x2166e2){return _0x2b9789(_0x2166e2);},'snMtb':function(_0xb00d92,_0x2c537e){return _0xb00d92(_0x2c537e);}};await _0x4a1095['iSNRT'](restoreFeature,_0xd0fb30);const _0x1e2eb6=await _0x4a1095[_0x4b0f9e(0x13a)](getFeature,_0xd0fb30);console[_0x4b0f9e(0x17a)](_0x4b0f9e(0x186)+_0x1e2eb6[_0x4b0f9e(0x16c)]+'\x20('+_0xd0fb30+')'),displayFeature(_0x1e2eb6,_0x1e2eb6[_0x4b0f9e(0x17f)]);}
|
|
1
|
+
const _0x2d6a78=_0x5d88;(function(_0x1af68e,_0xba6394){const _0x22dbf4=_0x5d88,_0x17becb=_0x1af68e();while(!![]){try{const _0x45e9b7=parseInt(_0x22dbf4(0x109))/0x1+parseInt(_0x22dbf4(0x18b))/0x2+-parseInt(_0x22dbf4(0x15f))/0x3+parseInt(_0x22dbf4(0x1d5))/0x4+-parseInt(_0x22dbf4(0x102))/0x5*(-parseInt(_0x22dbf4(0x1a6))/0x6)+-parseInt(_0x22dbf4(0x14e))/0x7+-parseInt(_0x22dbf4(0x15d))/0x8;if(_0x45e9b7===_0xba6394)break;else _0x17becb['push'](_0x17becb['shift']());}catch(_0x552e21){_0x17becb['push'](_0x17becb['shift']());}}}(_0x1fbe,0x3d03e));import{readFile,writeFile,mkdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{execSync}from'child_process';import _0xa97b08 from'inquirer';import{createFeature,listFeatures,getFeature,updateFeature,getFeatureReport,getFeatureReportMarkdown,listFeatureSessions,startSession,concludeSession,createChecklistItem,getActionItems,getItemFeedback,softDeleteFeature,restoreFeature,updateChecklistItem}from'./utils/featureApi.js';import{getBrowserSessionSteps}from'./utils/browserSessionsApi.js';function _0x5d88(_0x596bab,_0x5c8008){_0x596bab=_0x596bab-0xf8;const _0x1fbec4=_0x1fbe();let _0x5d88d8=_0x1fbec4[_0x596bab];return _0x5d88d8;}import{getApiBaseUrl}from'./utils/environment.js';import{getRangerDir}from'./utils/rangerRoot.js';import{registerSession}from'./utils/sessionCache.js';import{getEnvNames}from'./env.js';import{formatProfileRequiredMessage}from'./utils/profileMessages.js';import{listCloudProfiles}from'./utils/cloudProfile.js';const ACTIVE_FEATURE_FILE=_0x2d6a78(0x129),bold=_0x294574=>_0x2d6a78(0x1d1)+_0x294574+'\x1b[0m';function getGitRepoUrl(){const _0x468291=_0x2d6a78,_0x16364d={'aXqsL':'utf-8','PAmvz':'pipe','KPXGp':'github.com/'};try{const _0x11a02a=execSync(_0x468291(0x105),{'encoding':_0x16364d[_0x468291(0x148)],'stdio':['pipe','pipe',_0x16364d[_0x468291(0xfc)]]})[_0x468291(0x106)]();return _0x11a02a[_0x468291(0x193)](/\.git$/,'')[_0x468291(0x193)](/^git@github\.com:/,_0x16364d['KPXGp'])[_0x468291(0x193)](/^https?:\/\//,'');}catch{return undefined;}}function getGitBranch(){const _0x944bb3=_0x2d6a78,_0x33a370={'qARaD':function(_0x33da5e,_0x3fabaf,_0x4d87a0){return _0x33da5e(_0x3fabaf,_0x4d87a0);},'pSSsW':'git\x20rev-parse\x20--abbrev-ref\x20HEAD','ztTIE':'utf-8','TuaMF':_0x944bb3(0x169)};try{return _0x33a370['qARaD'](execSync,_0x33a370['pSSsW'],{'encoding':_0x33a370[_0x944bb3(0x13f)],'stdio':['pipe',_0x33a370[_0x944bb3(0x12f)],_0x33a370[_0x944bb3(0x12f)]]})['trim']();}catch{return undefined;}}export async function getActiveFeatureId(){const _0x5f03ef=_0x2d6a78,_0x14bae6={'FFtTw':function(_0x21b344){return _0x21b344();},'AvIgF':function(_0x578460,_0x125ec6,_0x2eb49a){return _0x578460(_0x125ec6,_0x2eb49a);},'LmKsu':'utf-8'},_0xaa8b6c=join(_0x14bae6[_0x5f03ef(0x171)](getRangerDir),ACTIVE_FEATURE_FILE);if(!existsSync(_0xaa8b6c))return null;try{const _0xc8c8eb=await _0x14bae6[_0x5f03ef(0x19b)](readFile,_0xaa8b6c,_0x14bae6[_0x5f03ef(0x107)]);return _0xc8c8eb['trim']()||null;}catch{return null;}}async function setActiveFeatureId(_0x4fbf32){const _0x37e427=_0x2d6a78,_0x1070fe={'AjJNf':function(_0x51afb9,_0x5f3160,_0x1181fb){return _0x51afb9(_0x5f3160,_0x1181fb);}},_0x21ca71=getRangerDir(),_0x2de6ee=_0x1070fe[_0x37e427(0x1cd)](join,_0x21ca71,ACTIVE_FEATURE_FILE);!existsSync(_0x21ca71)&&await mkdir(_0x21ca71,{'recursive':!![]}),await writeFile(_0x2de6ee,_0x4fbf32,_0x37e427(0xfe));}function getProgressDisplay(_0x4ac2dc){const _0x1445f5=_0x2d6a78,_0x582c8f={'nfamo':function(_0xf75a9e,_0xd19e2){return _0xf75a9e+_0xd19e2;},'kamCf':function(_0x359104,_0x29c7b1){return _0x359104===_0x29c7b1;},'gtrPu':function(_0x5c5094,_0x1793e2){return _0x5c5094*_0x1793e2;},'ubunB':function(_0x9a49e4,_0x54b688){return _0x9a49e4/_0x54b688;}},_0x5f0c42=_0x4ac2dc[_0x1445f5(0x182)]||0x0,_0x4005d4=_0x4ac2dc['verificationInProgressItems']||0x0,_0x5f0765=_0x4ac2dc[_0x1445f5(0x165)]||0x0,_0x22c078=_0x4ac2dc['incompleteItems']||0x0,_0x42a1c8=_0x4ac2dc[_0x1445f5(0x103)]||0x0,_0x3d2225=_0x582c8f['nfamo'](_0x582c8f[_0x1445f5(0x104)](_0x5f0c42,_0x4005d4)+_0x5f0765+_0x22c078,_0x42a1c8);if(_0x582c8f[_0x1445f5(0x10b)](_0x3d2225,0x0))return'-';const _0x58b0c8=0xa,_0x1e0386=Math['round'](_0x582c8f[_0x1445f5(0x1b3)](_0x582c8f['ubunB'](_0x5f0c42,_0x3d2225),_0x58b0c8)),_0x6f2fd6=_0x582c8f[_0x1445f5(0x104)]('█'['repeat'](_0x1e0386),'░'['repeat'](_0x58b0c8-_0x1e0386)),_0x46cc06=[];if(_0x5f0765>0x0)_0x46cc06[_0x1445f5(0x154)](_0x5f0765+'\x20blocked');if(_0x22c078>0x0)_0x46cc06['push'](_0x22c078+'\x20incomplete');if(_0x4005d4>0x0)_0x46cc06[_0x1445f5(0x154)](_0x4005d4+_0x1445f5(0x14c));const _0x30a5f0=_0x46cc06['length']>0x0?'\x20('+_0x46cc06[_0x1445f5(0x1c1)](',\x20')+')':'';return _0x6f2fd6+'\x20'+_0x5f0c42+'/'+_0x3d2225+'\x20verified'+_0x30a5f0;}function getCurrentSessionItems(_0x6ffe4e,_0x178100){const _0x34f591=_0x2d6a78;if(!_0x6ffe4e[_0x34f591(0x17a)])return _0x178100[_0x34f591(0x195)](_0x1c4583=>!_0x1c4583['sessionId']);return _0x178100[_0x34f591(0x195)](_0xd5dbda=>_0xd5dbda[_0x34f591(0x1d4)]===_0x6ffe4e['currentSessionId']||!_0xd5dbda['sessionId']);}function displayFeature(_0x144316,_0x193ad0){const _0x2184c2=_0x2d6a78,_0x925123={'TfUMO':function(_0x29bb3a,_0x19eed5){return _0x29bb3a(_0x19eed5);},'YslGQ':function(_0x1cbc08,_0x4fdc85){return _0x1cbc08>_0x4fdc85;},'WfKsu':function(_0xcff8c0,_0x4b1906){return _0xcff8c0<_0x4b1906;},'Wdrxk':_0x2184c2(0x189),'PPynX':function(_0x9c0029,_0x39fb20){return _0x9c0029===_0x39fb20;},'HJYEC':'verified','gIQKf':_0x2184c2(0x118),'nJaxI':function(_0x724b24,_0x330fc0){return _0x724b24===_0x330fc0;},'JwNBK':'blocked','xuIEi':'closed','Bumja':function(_0x25f335,_0x5efae6){return _0x25f335===_0x5efae6;},'vfsaV':function(_0x5cc94e,_0x170583){return _0x5cc94e!==_0x170583;},'DtQpf':function(_0xa45560,_0x537bc1){return _0xa45560!==_0x537bc1;},'rAuvB':'\x20[has\x20reviewer\x20feedback]'};console['log']('\x0a'+_0x144316['name']+'\x20('+_0x144316['dashboardUrl']+')');_0x144316['stats']&&console[_0x2184c2(0x168)](_0x2184c2(0x150)+_0x925123[_0x2184c2(0x12e)](getProgressDisplay,_0x144316[_0x2184c2(0x180)]));_0x144316['description']&&console['log'](_0x2184c2(0x151)+_0x144316['description']);_0x144316['gitRepoUrl']&&console['log'](_0x2184c2(0x1a2)+_0x144316[_0x2184c2(0x1a7)]);_0x144316['gitBranch']&&console[_0x2184c2(0x168)](_0x2184c2(0x17c)+_0x144316['gitBranch']);console['log']('\x20\x20\x20Created:\x20'+new Date(_0x144316[_0x2184c2(0xf8)])[_0x2184c2(0x16f)]());_0x144316[_0x2184c2(0x128)]&&console[_0x2184c2(0x168)](_0x2184c2(0x1bc)+new Date(_0x144316[_0x2184c2(0x128)])[_0x2184c2(0x16f)]());if(_0x193ad0&&_0x925123['YslGQ'](_0x193ad0['length'],0x0)){console['log'](_0x2184c2(0x140));for(let _0x502bba=0x0;_0x925123['WfKsu'](_0x502bba,_0x193ad0[_0x2184c2(0x12a)]);_0x502bba++){const _0x26499f=_0x193ad0[_0x502bba];let _0x3803b3;if(_0x26499f[_0x2184c2(0x1a5)]==='closed'&&_0x26499f['terminalReason']===_0x925123[_0x2184c2(0x1b6)])_0x3803b3='✅';else{if(_0x925123['PPynX'](_0x26499f[_0x2184c2(0x1a5)],_0x925123['HJYEC']))_0x3803b3='🟢';else{if(_0x925123['PPynX'](_0x26499f[_0x2184c2(0x1a5)],_0x925123[_0x2184c2(0x176)]))_0x3803b3='🟠';else{if(_0x925123['nJaxI'](_0x26499f['status'],_0x925123[_0x2184c2(0x133)]))_0x3803b3='🛑';else{if(_0x26499f[_0x2184c2(0x1a5)]===_0x925123['xuIEi'])_0x3803b3='⛔';else _0x925123['Bumja'](_0x26499f[_0x2184c2(0x1a5)],_0x2184c2(0x1b5))?_0x3803b3='⏳':_0x3803b3='⬜';}}}}const _0x581fb2=_0x26499f[_0x2184c2(0x1db)]>0x1?'\x20(v'+_0x26499f['version']+')':'',_0x562f99=_0x26499f[_0x2184c2(0x1db)]>0x1&&_0x26499f['parentItemId']&&_0x925123['vfsaV'](_0x26499f['status'],_0x2184c2(0x167))&&_0x925123['DtQpf'](_0x26499f['status'],_0x925123['HJYEC'])?_0x925123[_0x2184c2(0xfa)]:'';console[_0x2184c2(0x168)](_0x2184c2(0x11a)+(_0x502bba+0x1)+'.\x20'+_0x3803b3+'\x20'+_0x26499f[_0x2184c2(0xff)]+_0x581fb2+_0x562f99);_0x26499f['status']==='blocked'&&_0x26499f[_0x2184c2(0x127)]&&console[_0x2184c2(0x168)](_0x2184c2(0x1cf)+_0x26499f[_0x2184c2(0x127)]);_0x925123[_0x2184c2(0x1a1)](_0x26499f[_0x2184c2(0x1a5)],_0x925123['gIQKf'])&&_0x26499f['incompleteReason']&&console['log']('\x20\x20\x20\x20\x20\x20Incomplete:\x20'+_0x26499f['incompleteReason']);if(_0x26499f[_0x2184c2(0x1a5)]===_0x2184c2(0x167)&&_0x925123[_0x2184c2(0x11b)](_0x26499f[_0x2184c2(0x170)],'approved'))console['log']('\x20\x20\x20\x20\x20\x20Approved');else _0x26499f['status']==='closed'&&_0x26499f[_0x2184c2(0x12b)]&&console[_0x2184c2(0x168)](_0x2184c2(0x138)+_0x26499f['canceledReason']);}}}export async function featureCreate(_0x11e835,_0x459682){const _0x3ba2db=_0x2d6a78,_0x1623b5={'YHZEr':function(_0x98892d){return _0x98892d();},'mwPlb':function(_0x142bbd,_0x4c3f7a){return _0x142bbd===_0x4c3f7a;},'XkPfW':function(_0x48845b){return _0x48845b();},'jcuYt':function(_0x398d41,_0x5ccc37){return _0x398d41(_0x5ccc37);}},{envNames:_0x20ce43}=await getEnvNames();if(_0x20ce43['length']===0x0&&!process['env'][_0x3ba2db(0x194)]){let _0x122369=0x0;try{_0x122369=(await _0x1623b5[_0x3ba2db(0x16b)](listCloudProfiles))['length'];}catch{_0x122369=0x1;}_0x1623b5['mwPlb'](_0x122369,0x0)&&console['warn']('\x0a'+formatProfileRequiredMessage(_0x27f5a1=>bold(_0x27f5a1)));}const _0x1aa3b6=_0x459682['scenarios']?_0x459682[_0x3ba2db(0x153)]['map'](_0x9674b7=>_0x9674b7[_0x3ba2db(0x106)]()):[],_0x58c3b6=getGitRepoUrl(),_0x423014=_0x1623b5['XkPfW'](getGitBranch);console['log'](_0x3ba2db(0x179));const _0x47af20=await _0x1623b5[_0x3ba2db(0x14d)](createFeature,{'name':_0x11e835,'description':_0x459682[_0x3ba2db(0xff)],'checklist':_0x1aa3b6,'gitRepoUrl':_0x58c3b6,'gitBranch':_0x423014});await _0x1623b5['jcuYt'](setActiveFeatureId,_0x47af20['id']),await _0x1623b5[_0x3ba2db(0x14d)](tryStartCurrentSession,_0x47af20['id']);const _0x2dbfd1=process[_0x3ba2db(0x18e)][_0x3ba2db(0x1dd)];_0x2dbfd1&®isterSession(_0x2dbfd1,_0x47af20['id']),console[_0x3ba2db(0x168)]('\x0a✅\x20Feature\x20review\x20created:\x20'+_0x47af20['id']),displayFeature(_0x47af20,_0x47af20['checklistItems']),console[_0x3ba2db(0x168)]('\x0a➡️\x20\x20Set\x20as\x20active\x20feature\x20review');}export async function featureList(_0xa25f2d){const _0x4863ad=_0x2d6a78,_0x5d447c={'KGrRv':function(_0x50521e,_0xf06265){return _0x50521e(_0xf06265);},'oXejq':_0x4863ad(0x1a4),'ARRcu':function(_0x16ae8e,_0x412594){return _0x16ae8e(_0x412594);},'uofgN':'\x20--current-branch'},_0x565a91={'limit':_0xa25f2d[_0x4863ad(0x117)]??0xa,'offset':_0xa25f2d[_0x4863ad(0x1c4)]??0x0,'includeDeleted':_0xa25f2d['includeDeleted']};_0xa25f2d[_0x4863ad(0x13e)]&&(_0x565a91[_0x4863ad(0x1a7)]=getGitRepoUrl(),_0x565a91[_0x4863ad(0x1ba)]=getGitBranch());const _0x2ea854=await _0x5d447c['KGrRv'](listFeatures,_0x565a91);if(_0x2ea854[_0x4863ad(0x177)][_0x4863ad(0x12a)]===0x0){console['log'](_0x5d447c[_0x4863ad(0x134)]);return;}const _0xa0aec9=_0x2ea854[_0x4863ad(0x187)]>_0x2ea854[_0x4863ad(0x177)]['length']?'Showing\x20'+_0x2ea854[_0x4863ad(0x177)][_0x4863ad(0x12a)]+'\x20of\x20'+_0x2ea854['totalCount']:_0x2ea854['totalCount']+_0x4863ad(0x166);console['log']('\x0a'+_0xa0aec9+':\x0a');for(const _0x5dceb8 of _0x2ea854['items']){console[_0x4863ad(0x168)](''+_0x5dceb8[_0x4863ad(0x1bb)]),console['log']('\x20\x20\x20ID:\x20'+_0x5dceb8['id']),_0x5dceb8['stats']&&console[_0x4863ad(0x168)](_0x4863ad(0x150)+_0x5d447c['ARRcu'](getProgressDisplay,_0x5dceb8[_0x4863ad(0x180)])),_0x5dceb8['gitBranch']&&console[_0x4863ad(0x168)]('\x20\x20\x20Branch:\x20'+_0x5dceb8[_0x4863ad(0x1ba)]),console[_0x4863ad(0x168)](_0x4863ad(0x126)+new Date(_0x5dceb8[_0x4863ad(0xf8)])[_0x4863ad(0x132)]()),console['log']('');}const _0x333b6d=_0x565a91['limit']??0xa,_0x2f3911=(_0x565a91['offset']??0x0)+_0x2ea854[_0x4863ad(0x177)][_0x4863ad(0x12a)];if(_0x2f3911<_0x2ea854[_0x4863ad(0x187)]){const _0x4870f3=_0x333b6d!==0xa?'\x20--limit\x20'+_0x333b6d:'',_0x32cbd1=_0xa25f2d[_0x4863ad(0x13e)]?_0x5d447c['uofgN']:'',_0x46e66d=_0xa25f2d['includeDeleted']?'\x20--include-deleted':'';console['log']('Next\x20page:\x20ranger\x20list\x20--offset\x20'+_0x2f3911+_0x4870f3+_0x32cbd1+_0x46e66d);}}export async function featureShow(_0x4da754){const _0x271d48=_0x2d6a78,_0x17c9e6={'maiKc':function(_0x44ac44){return _0x44ac44();},'wkEyj':function(_0x23b4b9,_0x58a024){return _0x23b4b9(_0x58a024);},'hgfWu':function(_0x387b10,_0xc0ee71,_0x15d7df){return _0x387b10(_0xc0ee71,_0x15d7df);}},_0x62dc30=_0x4da754||await _0x17c9e6[_0x271d48(0x146)](getActiveFeatureId);if(!_0x62dc30)throw new Error('No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review');const _0x224ec8=await _0x17c9e6[_0x271d48(0x1ce)](getFeature,_0x62dc30);_0x17c9e6[_0x271d48(0x1d9)](displayFeature,_0x224ec8,_0x224ec8['checklistItems']);}export async function featureResume(_0x14a04c){const _0xc60e31=_0x2d6a78,_0x478ccb={'ArQol':function(_0x24e9fa,_0x55cc78){return _0x24e9fa!==_0x55cc78;},'VaTLY':function(_0x423db2,_0x3c32ed){return _0x423db2(_0x3c32ed);},'rRTMS':function(_0x4aacc6,_0x3fbf85,_0x560fab){return _0x4aacc6(_0x3fbf85,_0x560fab);},'YHJgf':function(_0x40bc6c){return _0x40bc6c();},'JvVtT':function(_0x7ad1f5,_0x5f0472){return _0x7ad1f5&&_0x5f0472;},'Puraj':'any','uJQik':function(_0x34724b,_0x4952e7){return _0x34724b(_0x4952e7);},'fmfFT':function(_0x1384a6,_0x12116c){return _0x1384a6===_0x12116c;},'DxIuV':'\x0aNo\x20matching\x20active\x20feature\x20reviews\x20found.','dtLEg':_0xc60e31(0x178),'CEbfa':function(_0x11bc83,_0x3e8aaa){return _0x11bc83===_0x3e8aaa;},'zEkkq':'list','vaxXp':'selected','AVZWV':function(_0x531d49,_0x4664a1){return _0x531d49(_0x4664a1);}};if(_0x14a04c){const _0x28cf65=await getFeature(_0x14a04c);await setActiveFeatureId(_0x28cf65['id']);const _0x113e29=getGitBranch();_0x113e29&&_0x478ccb[_0xc60e31(0x174)](_0x113e29,_0x28cf65[_0xc60e31(0x1ba)])&&(await updateFeature(_0x28cf65['id'],{'gitBranch':_0x113e29}),console[_0xc60e31(0x168)](_0xc60e31(0x199)+_0x113e29));console['log'](_0xc60e31(0x116)+_0x28cf65[_0xc60e31(0x1bb)]+'\x20('+_0x28cf65['id']+')'),await _0x478ccb['VaTLY'](tryStartCurrentSession,_0x28cf65['id']);const _0x2071af=process[_0xc60e31(0x18e)]['CLAUDE_SESSION_ID'];_0x2071af&&_0x478ccb[_0xc60e31(0x183)](registerSession,_0x2071af,_0x28cf65['id']);displayFeature(_0x28cf65,_0x28cf65[_0xc60e31(0x161)]),await printFeedbackNudge(_0x28cf65['id']);return;}const _0x285c1e=getGitRepoUrl(),_0x36535c=_0x478ccb[_0xc60e31(0x125)](getGitBranch);if(_0x478ccb['JvVtT'](!_0x285c1e,!_0x36535c))throw new Error('Not\x20in\x20a\x20git\x20repository.');console[_0xc60e31(0x168)]('\x0aSearching\x20for\x20feature\x20reviews\x20matching:\x20'+(_0x285c1e||_0x478ccb['Puraj'])+'\x20/\x20'+(_0x36535c||_0x478ccb['Puraj'])+_0xc60e31(0x173));const _0x7181fb=await _0x478ccb['uJQik'](listFeatures,{'gitRepoUrl':_0x285c1e,'gitBranch':_0x36535c}),_0x1d5402=_0x7181fb[_0xc60e31(0x177)][_0xc60e31(0x195)](_0x436acf=>_0x436acf[_0xc60e31(0x1a5)]?_0x436acf['status']!==_0xc60e31(0x175):!_0x436acf['completedAt']);if(_0x478ccb['fmfFT'](_0x1d5402['length'],0x0)){console['log'](_0x478ccb[_0xc60e31(0x16e)]),console[_0xc60e31(0x168)](_0x478ccb['dtLEg']);return;}let _0x4bffc7;if(_0x478ccb[_0xc60e31(0x155)](_0x1d5402['length'],0x1))_0x4bffc7=_0x1d5402[0x0];else{const _0x5998f=process[_0xc60e31(0x1c7)]['isTTY']&&process['stdout']['isTTY'];if(!_0x5998f){console['log']('\x0aNon-interactive\x20mode\x20detected.\x20Multiple\x20feature\x20reviews\x20found:');for(const _0x32757a of _0x1d5402){console[_0xc60e31(0x168)]('\x20\x20'+_0x32757a['name']),console['log']('\x20\x20\x20\x20\x20ID:\x20'+_0x32757a['id']),_0x32757a['stats']&&console[_0xc60e31(0x168)]('\x20\x20\x20\x20\x20Progress:\x20'+getProgressDisplay(_0x32757a['stats'])),_0x32757a[_0xc60e31(0x1ba)]&&console[_0xc60e31(0x168)](_0xc60e31(0x14f)+_0x32757a['gitBranch']);}throw new Error('Please\x20specify\x20the\x20feature\x20review\x20ID:\x20ranger\x20resume\x20<id>');}const {selected:_0x3d529b}=await _0xa97b08[_0xc60e31(0x15c)]([{'type':_0x478ccb[_0xc60e31(0x149)],'name':_0x478ccb['vaxXp'],'message':'Multiple\x20feature\x20reviews\x20found.\x20Select\x20one:','choices':_0x1d5402['map'](_0x564fda=>({'name':_0x564fda['name']+'\x20('+_0x564fda['id']+')','value':_0x564fda['id']}))}]);_0x4bffc7=_0x1d5402['find'](_0x572e63=>_0x572e63['id']===_0x3d529b);}await setActiveFeatureId(_0x4bffc7['id']);_0x36535c&&_0x36535c!==_0x4bffc7[_0xc60e31(0x1ba)]&&(await _0x478ccb['rRTMS'](updateFeature,_0x4bffc7['id'],{'gitBranch':_0x36535c}),console[_0xc60e31(0x168)](_0xc60e31(0x199)+_0x36535c));console['log']('\x0a✅\x20Resumed\x20feature\x20review:\x20'+_0x4bffc7['name']+'\x20('+_0x4bffc7['id']+')'),await tryStartCurrentSession(_0x4bffc7['id']);const _0x41712c=await _0x478ccb['AVZWV'](getFeature,_0x4bffc7['id']),_0x151079=process[_0xc60e31(0x18e)]['CLAUDE_SESSION_ID'];_0x151079&&_0x478ccb['rRTMS'](registerSession,_0x151079,_0x41712c['id']),_0x478ccb['rRTMS'](displayFeature,_0x41712c,_0x41712c['checklistItems']),await printFeedbackNudge(_0x41712c['id']);}async function printFeedbackNudge(_0xf71159){const _0x1221a9=_0x2d6a78,_0xb5b2d={'UIGss':function(_0x37458f,_0x7870c2){return _0x37458f(_0x7870c2);},'rfPuX':function(_0x55e84b,_0x7f1623){return _0x55e84b>_0x7f1623;},'DAGAE':'\x20\x20\x20Run\x20`ranger\x20get-review`\x20to\x20see\x20what\x20needs\x20to\x20be\x20fixed.'};try{const {items:_0x9ab07a}=await _0xb5b2d['UIGss'](getActionItems,_0xf71159);let _0x3b2cf7=0x0,_0x789267=0x0;for(const _0x44ed94 of _0x9ab07a){const _0x2def08=await getItemFeedback(_0xf71159,_0x44ed94['id']);_0x2def08[_0x1221a9(0x1b4)]['length']>0x0&&(_0x3b2cf7+=_0x2def08['unaddressedComments']['length'],_0x789267++);}_0xb5b2d[_0x1221a9(0x1c8)](_0x3b2cf7,0x0)&&(console[_0x1221a9(0x168)](_0x1221a9(0x164)+_0x3b2cf7+_0x1221a9(0x16d)+_0x789267+_0x1221a9(0x1dc)),console[_0x1221a9(0x168)](_0xb5b2d['DAGAE']));}catch{}}async function tryStartCurrentSession(_0x707edf){const _0x63f490=_0x2d6a78;try{const {sessions:_0x294c09}=await listFeatureSessions(_0x707edf),_0xd11b01=_0x294c09['find'](_0x3b59a7=>_0x3b59a7['status']===_0x63f490(0x1d3));_0xd11b01&&(await startSession(_0x707edf,_0xd11b01['id']),console['log'](_0x63f490(0x136)+_0xd11b01['iteration']));}catch{}}export async function featureReport(_0x763c3e,_0x148776){const _0x4183fd=_0x2d6a78,_0x497e81={'vkatd':_0x4183fd(0x1c5),'OyKyp':'reports','fgTDh':function(_0x1bc2c1,_0x3798f9,_0x54949f){return _0x1bc2c1(_0x3798f9,_0x54949f);},'MsGiO':function(_0x4fa686,_0x4ec9d9){return _0x4fa686(_0x4ec9d9);},'uCHuF':function(_0x14a00e,_0x1489ae,_0x3ab403,_0x6a0324){return _0x14a00e(_0x1489ae,_0x3ab403,_0x6a0324);}},_0x2b64da=_0x763c3e||await getActiveFeatureId();if(!_0x2b64da)throw new Error(_0x4183fd(0x14b));console['log'](_0x497e81[_0x4183fd(0x190)]);const _0xda4873=await getFeatureReportMarkdown(_0x2b64da,{'style':_0x148776['style']}),_0x39186d=_0x148776['output']||join(getRangerDir(),_0x497e81[_0x4183fd(0x19a)],_0x2b64da+'.md'),_0x56be44=_0x497e81[_0x4183fd(0x159)](join,_0x39186d,'..');!_0x497e81[_0x4183fd(0x15e)](existsSync,_0x56be44)&&await mkdir(_0x56be44,{'recursive':!![]}),await _0x497e81[_0x4183fd(0x163)](writeFile,_0x39186d,_0xda4873,'utf-8'),console['log'](_0x4183fd(0x110)+_0x39186d);}function getScenarioResult(_0x3704f0){const _0x156020=_0x2d6a78,_0x3ce5d1={'UfAQj':function(_0x4d741e,_0x714325){return _0x4d741e===_0x714325;},'jOzja':'closed','qeLxr':'verification_in_progress'};if(_0x3ce5d1['UfAQj'](_0x3704f0[_0x156020(0x1a5)],_0x156020(0x167)))return _0x3704f0['terminalReason']??_0x3ce5d1[_0x156020(0x112)];if(_0x3ce5d1['UfAQj'](_0x3704f0['status'],_0x3ce5d1[_0x156020(0x144)]))return _0x156020(0x10e);return _0x3704f0[_0x156020(0x1a5)];}function getScenarioRationale(_0x3901f0,_0x4e6f7f){const _0x533e08=_0x2d6a78,_0x18654={'KhTAK':'3|5|0|1|4|2'},_0x175159=_0x18654['KhTAK'][_0x533e08(0x15a)]('|');let _0x18d87c=0x0;while(!![]){switch(_0x175159[_0x18d87c++]){case'0':if(_0x3901f0['incompleteReason'])return _0x3901f0[_0x533e08(0x1a0)];continue;case'1':if(_0x3901f0[_0x533e08(0x12b)])return _0x3901f0['canceledReason'];continue;case'2':return null;case'3':if(_0x4e6f7f)return _0x4e6f7f;continue;case'4':if(_0x3901f0[_0x533e08(0x111)])return _0x3901f0[_0x533e08(0x111)];continue;case'5':if(_0x3901f0[_0x533e08(0x127)])return _0x3901f0['blockedReason'];continue;}break;}}export async function featureReportPrDescription(_0x209384,_0x233a3b){const _0x8ed607=_0x2d6a78,_0x12b1d2={'vEpzy':function(_0x13992a,_0x236683){return _0x13992a(_0x236683);},'sESGT':function(_0x4420e0,_0x33ae4d,_0x422bdd){return _0x4420e0(_0x33ae4d,_0x422bdd);},'EatYa':function(_0x43b97e,_0x2456f2){return _0x43b97e===_0x2456f2;},'vXRWG':'\x0a❌\x20No\x20scenarios\x20found\x20to\x20include.','ocAwl':function(_0x4a8d21,_0x4904c3){return _0x4a8d21>_0x4904c3;},'hSrNC':_0x8ed607(0x19f),'HiaEo':function(_0x18d907,_0x580fd3){return _0x18d907<_0x580fd3;},'KCwqk':function(_0x2fbeb4,_0x2e3e0d){return _0x2fbeb4+_0x2e3e0d;},'KUhvm':_0x8ed607(0x156),'rdfvc':function(_0x524d16,_0x474133,_0x16c323,_0x231f40){return _0x524d16(_0x474133,_0x16c323,_0x231f40);}},_0x49294f=_0x209384||await getActiveFeatureId();if(!_0x49294f)throw new Error('No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.');const _0x10e5ad=await _0x12b1d2['vEpzy'](getFeature,_0x49294f),_0x12d1fd=_0x10e5ad['checklistItems']||[],_0x16a90e=_0x12b1d2['sESGT'](getCurrentSessionItems,_0x10e5ad,_0x12d1fd);_0x12b1d2['EatYa'](_0x16a90e[_0x8ed607(0x12a)],0x0)&&(console['error'](_0x12b1d2['vXRWG']),process[_0x8ed607(0xfd)](0x1));const _0x40ff8b=_0x233a3b[_0x8ed607(0x1d7)]??[],_0x1a174a=_0x40ff8b['filter'](_0x148e17=>!Number[_0x8ed607(0x115)](_0x148e17)||_0x148e17<0x1||_0x148e17>_0x16a90e[_0x8ed607(0x12a)]);if(_0x12b1d2[_0x8ed607(0x18a)](_0x1a174a['length'],0x0)){console[_0x8ed607(0x119)]('\x0a❌\x20Invalid\x20scenario\x20number(s):\x20'+_0x1a174a[_0x8ed607(0x1c1)](',\x20')),console[_0x8ed607(0x168)](_0x12b1d2['hSrNC']);for(let _0x10cfc5=0x0;_0x12b1d2[_0x8ed607(0x1b8)](_0x10cfc5,_0x16a90e[_0x8ed607(0x12a)]);_0x10cfc5++){console['log']('\x20\x20'+_0x12b1d2['KCwqk'](_0x10cfc5,0x1)+'.\x20'+_0x16a90e[_0x10cfc5][_0x8ed607(0xff)]);}process[_0x8ed607(0xfd)](0x1);}const _0x4a73e1=new Set(_0x40ff8b[_0x8ed607(0x137)](_0x4df9f4=>_0x4df9f4-0x1)),_0x544823=_0x16a90e[_0x8ed607(0x195)]((_0x12ad86,_0x2d3bf0)=>!_0x4a73e1['has'](_0x2d3bf0));_0x12b1d2[_0x8ed607(0x1d8)](_0x544823[_0x8ed607(0x12a)],0x0)&&(console[_0x8ed607(0x119)](_0x12b1d2[_0x8ed607(0x158)]),process['exit'](0x1));if(_0x233a3b[_0x8ed607(0x1ac)])await _0x12b1d2[_0x8ed607(0x181)](outputJsonReport,_0x49294f,_0x10e5ad,_0x544823);else{const _0x2ce66e=await getFeatureReportMarkdown(_0x49294f,{'itemIds':_0x544823[_0x8ed607(0x137)](_0x175848=>_0x175848['id'])});process[_0x8ed607(0x10c)]['write'](_0x2ce66e['trimEnd']()+'\x0a');}}async function outputJsonReport(_0x1f16d2,_0x36ab3f,_0x270181){const _0x3117e6=_0x2d6a78,_0x510777={'ChxBw':function(_0x30fbff,_0x367717){return _0x30fbff>_0x367717;},'GDvjK':function(_0x45189e){return _0x45189e();},'ScubR':function(_0xdfc802,_0x317f19){return _0xdfc802(_0x317f19);},'xjtWd':function(_0x1a7e08,_0x4f6bb1){return _0x1a7e08+_0x4f6bb1;}},_0x26ab11=_0x510777['GDvjK'](getApiBaseUrl),_0x4f7bec=await _0x510777['ScubR'](getFeatureReport,_0x1f16d2),_0x1913f1=new Map(_0x4f7bec['checklistItems'][_0x3117e6(0x137)](_0x1b225b=>[_0x1b225b['id'],_0x1b225b])),_0x572da3=await Promise[_0x3117e6(0x1b0)](_0x270181[_0x3117e6(0x137)](async _0x47849c=>{const _0x22a1ca=_0x3117e6,_0x216e92=_0x1913f1[_0x22a1ca(0x11f)](_0x47849c['id']),_0x55b0ad=_0x216e92?.['linkedSession']??null;let _0x33b7aa=[];if(_0x47849c[_0x22a1ca(0x172)])try{const {steps:_0x31c265}=await getBrowserSessionSteps(_0x47849c[_0x22a1ca(0x172)]);_0x510777['ChxBw'](_0x31c265[_0x22a1ca(0x12a)],0x0)&&(_0x33b7aa=_0x31c265[_0x22a1ca(0x137)](_0x599d9a=>{const _0x4b7eea=_0x22a1ca,_0x3b66dd=_0x599d9a[_0x4b7eea(0x19d)][_0x4b7eea(0x11e)](_0x9ee36=>_0x9ee36['assetType']===_0x4b7eea(0x1d0)&&_0x9ee36[_0x4b7eea(0x1c3)]===_0x4b7eea(0x123))??_0x599d9a['assets'][_0x4b7eea(0x11e)](_0x3e9091=>_0x3e9091['assetType']===_0x4b7eea(0x1d0));let _0x56c471=null,_0x4d7410=null;if(_0x3b66dd){const _0x14d856=_0x3b66dd['storage'][_0x4b7eea(0x10a)][_0x4b7eea(0x15a)]('/')[_0x4b7eea(0x192)]();_0x56c471=_0x26ab11+_0x4b7eea(0x19c)+_0x47849c['browserSessionId']+_0x4b7eea(0x1cb)+_0x14d856,_0x14d856&&(_0x4d7410=_0x14d856[_0x4b7eea(0x193)](/\.\w+$/,'')[_0x4b7eea(0x193)](/^(key_)?\d+_/,'')[_0x4b7eea(0x193)](/[-_]/g,'\x20'));}return{'description':_0x4d7410||_0x599d9a[_0x4b7eea(0xff)]||_0x599d9a['stepName']||_0x4b7eea(0xf9)+_0x599d9a['position'],'screenshot':_0x56c471,'is_key_step':_0x599d9a['isKeyStep']};}));}catch{}return _0x33b7aa[_0x22a1ca(0x12a)]===0x0&&_0x55b0ad?.[_0x22a1ca(0x1b9)]&&(_0x33b7aa=_0x55b0ad['screenshotUrls']['map']((_0x5079d1,_0x4dbc86)=>({'description':_0x22a1ca(0x1c0)+(_0x4dbc86+0x1),'screenshot':_0x5079d1,'is_key_step':![]}))),{'description':_0x47849c['description'],'result':getScenarioResult(_0x47849c),'rationale':getScenarioRationale(_0x47849c,_0x55b0ad?.['agentResponse']),'steps':_0x33b7aa};})),_0x493b6f={'url':_0x36ab3f[_0x3117e6(0x1da)],'scenarios':_0x572da3};process[_0x3117e6(0x10c)][_0x3117e6(0x122)](_0x510777['xjtWd'](JSON['stringify'](_0x493b6f,null,0x2),'\x0a'));}export async function featureConcludeSession(_0x11f744){const _0x1c7728=_0x2d6a78,_0x5f025b={'ZFErW':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','NshOa':_0x1c7728(0xfb),'ETHKY':function(_0x355ec7,_0x521cbc){return _0x355ec7===_0x521cbc;},'DTrps':_0x1c7728(0x11c),'ufQKo':function(_0x2364eb,_0x3ef8c3){return _0x2364eb!==_0x3ef8c3;},'SBjCc':_0x1c7728(0x10e)},_0x5367a9=_0x11f744||await getActiveFeatureId();if(!_0x5367a9)throw new Error(_0x5f025b['ZFErW']);const _0x52d009=await getFeature(_0x5367a9);if(!_0x52d009[_0x1c7728(0x17a)])throw new Error(_0x1c7728(0x17b));const {sessions:_0x36355c}=await listFeatureSessions(_0x5367a9),_0x30edd9=_0x36355c[_0x1c7728(0x11e)](_0x33880c=>_0x33880c['id']===_0x52d009[_0x1c7728(0x17a)]);if(!_0x30edd9)throw new Error(_0x5f025b[_0x1c7728(0x1aa)]);if(_0x5f025b['ETHKY'](_0x30edd9[_0x1c7728(0x1a5)],'completed')){console['log'](_0x5f025b[_0x1c7728(0x1bd)]);return;}if(_0x5f025b['ufQKo'](_0x30edd9['status'],_0x5f025b[_0x1c7728(0x12d)]))throw new Error('Cannot\x20conclude\x20session\x20with\x20status:\x20'+_0x30edd9['status']);console[_0x1c7728(0x168)](_0x1c7728(0x184)),await concludeSession(_0x5367a9,_0x52d009['currentSessionId']),console[_0x1c7728(0x168)]('\x0a✅\x20Session\x20'+_0x30edd9['iteration']+_0x1c7728(0x18c)),console[_0x1c7728(0x168)]('\x20\x20\x20The\x20feature\x20review\x20is\x20now\x20ready\x20for\x20human\x20review\x20on\x20the\x20Ranger\x20dashboard.');}export async function featureSessions(_0x3dbf94){const _0x1544c6=_0x2d6a78,_0x5411b5={'LAzuO':function(_0x28f42){return _0x28f42();},'tPVqm':'No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','XFvoG':function(_0x27063f,_0x27a299){return _0x27063f(_0x27a299);},'cbdVQ':_0x1544c6(0x1c2),'uBChY':function(_0x51a18a,_0x4ae033){return _0x51a18a===_0x4ae033;},'SGFrB':function(_0x37c6f1,_0x5892f1){return _0x37c6f1===_0x5892f1;},'sdiSC':_0x1544c6(0x10e)},_0x296e8e=_0x3dbf94||await _0x5411b5['LAzuO'](getActiveFeatureId);if(!_0x296e8e)throw new Error(_0x5411b5['tPVqm']);const _0x28b086=await getFeature(_0x296e8e);console['log'](_0x1544c6(0x113)+_0x28b086[_0x1544c6(0x1bb)]+'\x0a');const {sessions:_0x1ed062}=await _0x5411b5[_0x1544c6(0x1a8)](listFeatureSessions,_0x296e8e);if(_0x1ed062['length']===0x0){console['log'](_0x5411b5[_0x1544c6(0x143)]);return;}for(const _0x7fd9cc of _0x1ed062){const _0x57fd7e=_0x5411b5['uBChY'](_0x7fd9cc['status'],_0x1544c6(0x198))?'✅':_0x5411b5[_0x1544c6(0x157)](_0x7fd9cc[_0x1544c6(0x1a5)],_0x5411b5['sdiSC'])?'🔄':'▶️';console[_0x1544c6(0x168)](_0x57fd7e+'\x20Session\x20'+_0x7fd9cc[_0x1544c6(0x14a)]+'\x20('+_0x7fd9cc['id']+')'),console[_0x1544c6(0x168)]('\x20\x20\x20Status:\x20'+_0x7fd9cc['status']),console['log']('\x20\x20\x20Created:\x20'+new Date(_0x7fd9cc['createdAt'])[_0x1544c6(0x16f)]()),_0x7fd9cc['completedAt']&&console[_0x1544c6(0x168)]('\x20\x20\x20Completed:\x20'+new Date(_0x7fd9cc[_0x1544c6(0x128)])[_0x1544c6(0x16f)]()),console['log']('');}}export async function featureAddScenario(_0x12ca04,_0x5ec68a){const _0x3ce6c6=_0x2d6a78,_0x4e85b4={'NJPNK':function(_0x7fba0f,_0x4748b3){return _0x7fba0f(_0x4748b3);},'npLgf':function(_0x2c26a2,_0x40c587){return _0x2c26a2(_0x40c587);},'WLTLU':function(_0x516ef7,_0x33a25a,_0x3cb53d){return _0x516ef7(_0x33a25a,_0x3cb53d);}},_0x3fe869=_0x5ec68a||await getActiveFeatureId();if(!_0x3fe869)throw new Error(_0x3ce6c6(0x13c));const _0x168ab5=await _0x4e85b4['NJPNK'](getFeature,_0x3fe869);if(_0x168ab5['latestReview']&&!_0x168ab5['latestReview'][_0x3ce6c6(0x1be)])throw new Error('Cannot\x20add\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.\x20Please\x20finish\x20your\x20review\x20first:\x20'+_0x168ab5['dashboardUrl']);await createChecklistItem(_0x3fe869,_0x12ca04);const _0x54a92d=await _0x4e85b4['npLgf'](getFeature,_0x3fe869);console['log'](_0x3ce6c6(0x152)),_0x4e85b4[_0x3ce6c6(0x1de)](displayFeature,_0x54a92d,_0x54a92d[_0x3ce6c6(0x161)]);}function _0x1fbe(){const _0x500523=['\x20in\x20progress','jcuYt','2359427igdVHP','\x20\x20\x20\x20\x20Branch:\x20','\x20\x20\x20Progress:\x20','\x20\x20\x20Description:\x20','\x0a✅\x20Scenario\x20added','scenarios','push','CEbfa','\x0a❌\x20All\x20scenarios\x20were\x20excluded.','SGFrB','KUhvm','fgTDh','split','\x0a🗑️\x20\x20Deleted\x20feature\x20review:\x20','prompt','1683576hfogrv','MsGiO','887631nHXIJp','\x20\x20\x20\x20\x20📋\x20Selector:\x20','checklistItems','type','uCHuF','\x0a⚠️\x20\x20','blockedItems','\x20feature\x20review(s)\x20found','closed','log','pipe','en-US','YHZEr','jHull','\x20unaddressed\x20reviewer\x20comment(s)\x20across\x20','DxIuV','toLocaleString','terminalReason','FFtTw','browserSessionId','...','ArQol','verified','gIQKf','items','Run:\x20ranger\x20create\x20\x22<name>\x22\x20to\x20create\x20a\x20new\x20feature\x20review','\x0aCreating\x20feature\x20review...','currentSessionId','No\x20active\x20session\x20for\x20this\x20feature\x20review.','\x20\x20\x20Branch:\x20','\x0a❌\x20No\x20scenarios\x20found\x20to\x20edit.','JIIST','pSEZO','stats','rdfvc','verifiedItems','rRTMS','\x0aConcluding\x20session...','yCbaG','EiUHV','totalCount','LTNKa','approved','ocAwl','451508qJxLXs','\x20concluded.','MZzHZ','env','feedback-images','vkatd','latestReview','pop','replace','RANGER_TEST_USERNAME','filter','AsRUX','selector','completed','\x20\x20\x20Updated\x20branch\x20to:\x20','OyKyp','AvIgF','/api/v1/mcp/browser-sessions/','assets','\x20scenarios.','\x0aAvailable\x20scenarios:','incompleteReason','nJaxI','\x20\x20\x20Repository:\x20','xTUMJ','\x0aNo\x20feature\x20reviews\x20found.','status','176382nCRocM','gitRepoUrl','XFvoG','toFixed','NshOa','wTNzB','json','WMjHL','arrayBuffer','assetUrl','all','\x20\x20\x20\x20\x20🎯\x20Element:\x20<','Ylipd','gtrPu','unaddressedComments','verification_in_progress','Wdrxk','spatial','HiaEo','screenshotUrls','gitBranch','name','\x20\x20\x20Completed:\x20','DTrps','submittedAt','Scenario\x20','Screenshot\x20','join','No\x20sessions\x20found.','timing','offset','\x0aGenerating\x20report...','scenario','stdin','rfPuX','\x20\x20✅\x20No\x20feedback\x20to\x20address','slice','/artifacts/','oqhUE','AjJNf','wkEyj','\x20\x20\x20\x20\x20\x20Blocked:\x20','screenshot','\x1b[1m','.\x20Feature\x20review\x20has\x20','ready','sessionId','216196IlOnae','coordinates','excludeScenarios','EatYa','hgfWu','dashboardUrl','version','\x20scenario(s).','CLAUDE_SESSION_ID','WLTLU','createdAt','Step\x20','rAuvB','Current\x20session\x20not\x20found.','PAmvz','exit','utf-8','description','point','\x20\x20\x20\x20\x20📷\x20Screenshot:\x20','65ayrooD','pendingItems','nfamo','git\x20remote\x20get-url\x20origin','trim','LmKsu','):\x20\x22','431339UxktnO','location','kamCf','stdout','\x20at\x20[','in_progress','Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','\x0a✅\x20Report\x20generated:\x20','notes','jOzja','\x0a📁\x20Sessions\x20for\x20feature\x20review:\x20','numeric','isInteger','\x0a✅\x20Resumed\x20feature\x20review:\x20','limit','incomplete','error','\x20\x20\x20','PPynX','\x0a✅\x20Session\x20is\x20already\x20completed.','aUOYm','find','get','dMjiJ','\x20\x20💬\x20','write','after','WoWwM','YHJgf','\x20\x20\x20Created:\x20','blockedReason','completedAt','active-feature.txt','length','canceledReason','\x20\x20\x20To\x20restore\x20it,\x20run:\x20ranger\x20restore\x20','SBjCc','TfUMO','TuaMF','MgYNM','canonicalFlow','toLocaleDateString','JwNBK','oXejq','\x20—\x20','\x20\x20\x20▶️\x20Started\x20session\x20','map','\x20\x20\x20\x20\x20\x20Cancelled:\x20','\x0a✅\x20Restored\x20feature\x20review:\x20','comment_','wUAZN','No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.\x20Run:\x20ranger\x20resume\x20<id>\x20to\x20set\x20an\x20active\x20feature\x20review','\x20\x20\x20\x20','currentBranch','ztTIE','\x0a\x20\x20\x20Scenarios:','jFEHE','textContent','cbdVQ','qeLxr','\x20unaddressed\x20comment(s)','maiKc','domRef','aXqsL','zEkkq','iteration','No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.'];_0x1fbe=function(){return _0x500523;};return _0x1fbe();}export async function featureEditScenario(_0x1f6296,_0x4f46be){const _0x511b5f=_0x2d6a78,_0x5860a2={'eEkjM':function(_0x13aab8){return _0x13aab8();},'wUAZN':'\x0a❌\x20No\x20feature\x20review\x20ID\x20provided\x20and\x20no\x20active\x20feature\x20review\x20set.','JIIST':function(_0x4d36de,_0x9bcf18){return _0x4d36de(_0x9bcf18);},'wTNzB':_0x511b5f(0x17d),'AsRUX':function(_0x13faea,_0x5e5659){return _0x13faea===_0x5e5659;},'EiUHV':'\x0a❌\x20No\x20scenario\x20number\x20provided.\x20Use\x20--scenario\x20<number>.','Ylipd':function(_0x4ffa96,_0x40b315){return _0x4ffa96<_0x40b315;},'ycNPA':function(_0x4eee46,_0xa2fad6){return _0x4eee46-_0xa2fad6;},'AVILF':function(_0x171e30,_0x375607){return _0x171e30+_0x375607;},'MgYNM':function(_0x1e51e6,_0xa49904,_0x173563,_0x4b112f){return _0x1e51e6(_0xa49904,_0x173563,_0x4b112f);}},_0x5cfb9a=_0x4f46be['id']||await _0x5860a2['eEkjM'](getActiveFeatureId);!_0x5cfb9a&&(console['error'](_0x5860a2[_0x511b5f(0x13b)]),console['error'](_0x511b5f(0x10f)),process[_0x511b5f(0xfd)](0x1));const _0x2ec9f9=await _0x5860a2[_0x511b5f(0x17e)](getFeature,_0x5cfb9a);_0x2ec9f9[_0x511b5f(0x191)]&&!_0x2ec9f9['latestReview'][_0x511b5f(0x1be)]&&(console['error']('\x0a❌\x20Cannot\x20edit\x20scenario:\x20feature\x20review\x20has\x20an\x20active\x20review.'),console[_0x511b5f(0x119)]('Please\x20finish\x20your\x20review\x20first:'),console['error']('\x20\x20'+_0x2ec9f9['dashboardUrl']),process[_0x511b5f(0xfd)](0x1));const _0x24e706=_0x2ec9f9['checklistItems']||[];_0x24e706[_0x511b5f(0x12a)]===0x0&&(console[_0x511b5f(0x119)](_0x5860a2[_0x511b5f(0x1ab)]),process[_0x511b5f(0xfd)](0x1));if(_0x5860a2[_0x511b5f(0x196)](_0x4f46be[_0x511b5f(0x1c6)],undefined)){console['error'](_0x5860a2[_0x511b5f(0x186)]),console['log']('\x0aAvailable\x20scenarios:');for(let _0x2760c3=0x0;_0x5860a2[_0x511b5f(0x1b2)](_0x2760c3,_0x24e706[_0x511b5f(0x12a)]);_0x2760c3++){console[_0x511b5f(0x168)]('\x20\x20'+(_0x2760c3+0x1)+'.\x20'+_0x24e706[_0x2760c3][_0x511b5f(0xff)]);}process['exit'](0x1);}const _0x456407=_0x5860a2['ycNPA'](_0x4f46be['scenario'],0x1);if(_0x456407<0x0||_0x456407>=_0x24e706['length']){console['error']('\x0a❌\x20Invalid\x20scenario\x20index:\x20'+_0x4f46be[_0x511b5f(0x1c6)]+_0x511b5f(0x1d2)+_0x24e706[_0x511b5f(0x12a)]+_0x511b5f(0x19e)),console[_0x511b5f(0x168)]('\x0aAvailable\x20scenarios:');for(let _0xb2be56=0x0;_0xb2be56<_0x24e706[_0x511b5f(0x12a)];_0xb2be56++){console[_0x511b5f(0x168)]('\x20\x20'+_0x5860a2['AVILF'](_0xb2be56,0x1)+'.\x20'+_0x24e706[_0xb2be56][_0x511b5f(0xff)]);}process['exit'](0x1);}const _0x330d93=_0x24e706[_0x456407];await _0x5860a2[_0x511b5f(0x130)](updateChecklistItem,_0x5cfb9a,_0x330d93['id'],{'description':_0x1f6296});const _0x7280d6=await _0x5860a2['JIIST'](getFeature,_0x5cfb9a);console[_0x511b5f(0x168)]('\x0a✅\x20Scenario\x20updated'),displayFeature(_0x7280d6,_0x7280d6[_0x511b5f(0x161)]);}async function downloadFeedbackImage(_0x5e58b0,_0x5e1cf2){const _0x18559e=_0x2d6a78,_0x3b9246={'dMjiJ':function(_0x4e6f02,_0x6e08db,_0x376a3b){return _0x4e6f02(_0x6e08db,_0x376a3b);},'jHull':function(_0x201b2c){return _0x201b2c();},'yCbaG':function(_0x8d0d48,_0x372aea,_0x4cd653){return _0x8d0d48(_0x372aea,_0x4cd653);}};try{const _0x425316=_0x3b9246[_0x18559e(0x120)](join,_0x3b9246[_0x18559e(0x16c)](getRangerDir),_0x18559e(0x18f));await mkdir(_0x425316,{'recursive':!![]});const _0x37305e=join(_0x425316,_0x18559e(0x13a)+_0x5e1cf2+'.png'),_0x1db80e=await fetch(_0x5e58b0);if(!_0x1db80e['ok'])return null;const _0x51e358=Buffer['from'](await _0x1db80e[_0x18559e(0x1ae)]());return await _0x3b9246[_0x18559e(0x185)](writeFile,_0x37305e,_0x51e358),_0x37305e;}catch{return null;}}export async function featureGetReview(_0x41277a){const _0xdadeb0=_0x2d6a78,_0x3adeae={'gYQbX':function(_0x54a6f6){return _0x54a6f6();},'lNGjJ':_0xdadeb0(0x13c),'GHWDj':function(_0xe6ac70,_0x2e332f){return _0xe6ac70(_0x2e332f);},'jFEHE':function(_0x11db1d,_0x4f91f7){return _0x11db1d===_0x4f91f7;},'DiQcL':'No\x20scenarios\x20found.','MZzHZ':function(_0x444a22,_0x57ff33,_0x35b249){return _0x444a22(_0x57ff33,_0x35b249);},'WoWwM':_0xdadeb0(0x16a),'LTNKa':'short','xTUMJ':'element','pSEZO':_0xdadeb0(0x100),'iHlMf':function(_0x16e807,_0x36d4de){return _0x16e807>=_0x36d4de;}},_0x46ae80=_0x41277a||await _0x3adeae['gYQbX'](getActiveFeatureId);if(!_0x46ae80)throw new Error(_0x3adeae['lNGjJ']);const _0x3c1b06=await _0x3adeae['GHWDj'](getFeature,_0x46ae80),{items:_0x2c99d5}=await getActionItems(_0x46ae80);console['log']('\x0a📋\x20Feedback\x20for:\x20'+_0x3c1b06['name']+'\x20('+_0x3c1b06['id']+')\x0a');if(_0x3adeae[_0xdadeb0(0x141)](_0x2c99d5['length'],0x0)){console['log'](_0x3adeae['DiQcL']);return;}for(let _0x259790=0x0;_0x259790<_0x2c99d5[_0xdadeb0(0x12a)];_0x259790++){const _0x4cae85=_0x2c99d5[_0x259790],_0x110de3=_0x4cae85[_0xdadeb0(0x1db)]>0x1?'\x20(v'+_0x4cae85['version']+')':'',_0x5ce858=await _0x3adeae['MZzHZ'](getItemFeedback,_0x46ae80,_0x4cae85['id']);if(_0x5ce858['unaddressedComments'][_0xdadeb0(0x12a)]>0x0){console['log']('Scenario\x20'+(_0x259790+0x1)+':\x20\x22'+_0x4cae85[_0xdadeb0(0xff)]+'\x22'+_0x110de3+_0xdadeb0(0x135)+_0x5ce858[_0xdadeb0(0x1b4)]['length']+_0xdadeb0(0x145));for(const _0x21a6d4 of _0x5ce858['unaddressedComments']){const _0x466184=new Date(_0x21a6d4[_0xdadeb0(0xf8)])['toLocaleDateString'](_0x3adeae[_0xdadeb0(0x124)],{'month':_0x3adeae[_0xdadeb0(0x188)],'day':_0xdadeb0(0x114)}),_0x4f970a=_0x21a6d4['authorName']||_0x21a6d4['authorEmail']||'Unknown';console['log'](_0xdadeb0(0x121)+_0x4f970a+'\x20('+_0x466184+_0xdadeb0(0x108)+_0x21a6d4['content']+'\x22');if(_0x21a6d4['assetUrl']){const _0x4f235b=await _0x3adeae[_0xdadeb0(0x18d)](downloadFeedbackImage,_0x21a6d4[_0xdadeb0(0x1af)],_0x21a6d4['id']);_0x4f235b&&console[_0xdadeb0(0x168)](_0xdadeb0(0x101)+_0x4f235b);}if(_0x21a6d4['domRef']){const _0x5c52ee=_0x21a6d4[_0xdadeb0(0x147)][_0xdadeb0(0x197)]['split']('\x20>\x20')['pop']()?.[_0xdadeb0(0x15a)](':')[0x0]||_0x3adeae[_0xdadeb0(0x1a3)],_0x5177ad=_0x21a6d4[_0xdadeb0(0x147)][_0xdadeb0(0x142)]?'\x20\x22'+_0x21a6d4[_0xdadeb0(0x147)]['textContent'][_0xdadeb0(0x1ca)](0x0,0x3c)+'\x22':'';console['log'](_0xdadeb0(0x1b1)+_0x5c52ee+'>'+_0x5177ad),console['log'](_0xdadeb0(0x160)+_0x21a6d4[_0xdadeb0(0x147)][_0xdadeb0(0x197)]);}else{if(_0x21a6d4['spatial']){const _0x18374f=_0x21a6d4['spatial'][_0xdadeb0(0x1d6)];_0x3adeae[_0xdadeb0(0x141)](_0x21a6d4['spatial']['type'],_0x3adeae[_0xdadeb0(0x17f)])&&_0x3adeae['iHlMf'](_0x18374f['length'],0x2)?console['log']('\x20\x20\x20\x20\x20📍\x20Annotation:\x20point\x20at\x20('+_0x18374f[0x0]['toFixed'](0x2)+',\x20'+_0x18374f[0x1][_0xdadeb0(0x1a9)](0x2)+')'):console[_0xdadeb0(0x168)]('\x20\x20\x20\x20\x20📍\x20Annotation:\x20'+_0x21a6d4[_0xdadeb0(0x1b7)][_0xdadeb0(0x162)]+_0xdadeb0(0x10d)+_0x18374f['map'](_0x174e5d=>_0x174e5d[_0xdadeb0(0x1a9)](0x2))[_0xdadeb0(0x1c1)](',\x20')+']');}}}if(_0x5ce858[_0xdadeb0(0x131)]){console[_0xdadeb0(0x168)]('\x20\x20Expected\x20flow:');for(const _0x557da4 of _0x5ce858[_0xdadeb0(0x131)]['split']('\x0a')){console[_0xdadeb0(0x168)](_0xdadeb0(0x13d)+_0x557da4);}}}else console['log'](_0xdadeb0(0x1bf)+(_0x259790+0x1)+':\x20\x22'+_0x4cae85['description']+'\x22'+_0x110de3+'\x20—\x20no\x20comments'),console['log'](_0xdadeb0(0x1c9));console[_0xdadeb0(0x168)]('');}}export async function featureDelete(_0x28ba9b){const _0x2c007c=_0x2d6a78,_0x513027={'oqhUE':function(_0x512581){return _0x512581();},'WMjHL':function(_0x221a59,_0xfa1d38){return _0x221a59(_0xfa1d38);}},_0x787b24=_0x28ba9b||await _0x513027[_0x2c007c(0x1cc)](getActiveFeatureId);if(!_0x787b24)throw new Error(_0x2c007c(0x13c));const _0x206d41=await _0x513027[_0x2c007c(0x1ad)](getFeature,_0x787b24);await _0x513027[_0x2c007c(0x1ad)](softDeleteFeature,_0x787b24),console[_0x2c007c(0x168)](_0x2c007c(0x15b)+_0x206d41['name']+'\x20('+_0x787b24+')'),console['log'](_0x2c007c(0x12c)+_0x787b24);}export async function featureRestore(_0x55c6c8){const _0x237624=_0x2d6a78,_0x157fbf={'Jkrbz':function(_0x348c83,_0x28a515){return _0x348c83(_0x28a515);},'aUOYm':function(_0x5ba622,_0x179c09){return _0x5ba622(_0x179c09);},'axPOv':function(_0x186e1b,_0x5c08e9,_0x3b04cd){return _0x186e1b(_0x5c08e9,_0x3b04cd);}};await _0x157fbf['Jkrbz'](restoreFeature,_0x55c6c8);const _0x31555f=await _0x157fbf[_0x237624(0x11d)](getFeature,_0x55c6c8);console['log'](_0x237624(0x139)+_0x31555f[_0x237624(0x1bb)]+'\x20('+_0x55c6c8+')'),_0x157fbf['axPOv'](displayFeature,_0x31555f,_0x31555f[_0x237624(0x161)]);}
|
package/build/commands/hook.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x321faa,_0xb29375){const _0x3cdbee=_0x57cd,_0x2704b5=_0x321faa();while(!![]){try{const _0x3119e3=parseInt(_0x3cdbee(0x7f))/0x1+-parseInt(_0x3cdbee(0x6f))/0x2+parseInt(_0x3cdbee(0x77))/0x3*(-parseInt(_0x3cdbee(0x76))/0x4)+parseInt(_0x3cdbee(0x72))/0x5+parseInt(_0x3cdbee(0x7a))/0x6*(-parseInt(_0x3cdbee(0x7c))/0x7)+-parseInt(_0x3cdbee(0x6e))/0x8*(parseInt(_0x3cdbee(0x7b))/0x9)+parseInt(_0x3cdbee(0x7d))/0xa*(parseInt(_0x3cdbee(0x79))/0xb);if(_0x3119e3===_0xb29375)break;else _0x2704b5['push'](_0x2704b5['shift']());}catch(_0x21861c){_0x2704b5['push'](_0x2704b5['shift']());}}}(_0x278d,0xc01f1));function _0x57cd(_0x2190d6,_0x5ebb1d){_0x2190d6=_0x2190d6-0x6e;const _0x278d68=_0x278d();let _0x57cdb3=_0x278d68[_0x2190d6];return _0x57cdb3;}import{sessionStart,sessionEnd,preCompact,postEdit,planStart,planReminder,exitPlanMode,stopHook,enable,disable,autoPrompt}from'./hooks/index.js';const HOOKS={'session-start':sessionStart,'session-end':sessionEnd,'pre-compact':preCompact,'post-edit':postEdit,'plan-start':planStart,'plan-reminder':planReminder,'exit-plan-mode':exitPlanMode,'stop':stopHook,'enable':enable,'disable':disable,'auto-prompt':autoPrompt};let cancellationHandlersInstalled=![];function installCancellationHandlers(){const _0xcc7f4f=_0x57cd,_0x377981={'pqCJO':'SIGTERM'};if(cancellationHandlersInstalled)return;const _0x99c3ed=()=>{process['exit'](0x0);};process[_0xcc7f4f(0x71)](_0xcc7f4f(0x74),_0x99c3ed),process[_0xcc7f4f(0x71)](_0x377981[_0xcc7f4f(0x70)],_0x99c3ed),process[_0xcc7f4f(0x71)](_0xcc7f4f(0x7e),_0x99c3ed),cancellationHandlersInstalled=!![];}function _0x278d(){const _0x34a6ee=['1932810uNDtiV','pqCJO','once','4146055CCGbnY','Valid\x20hooks:\x20','SIGINT','Unknown\x20hook:\x20','488eckXDA','36516fRntsy','psIMu','11jlosOn','18uqIvEw','9LTcMlR','2739303rPhkja','26516440EPHIMI','SIGHUP','1335113mkKWRF','join','3229304xYmiWg'];_0x278d=function(){return _0x34a6ee;};return _0x278d();}export async function hook(_0x4716ab,_0x4e0009){const _0x27c92f=_0x57cd,_0x238ad5={'psIMu':function(_0x2303db,_0x40002f){return _0x2303db(_0x40002f);}};installCancellationHandlers();const _0x4c66e2=HOOKS[_0x4716ab];if(!_0x4c66e2){const _0x4a3967=Object['keys'](HOOKS)[_0x27c92f(0x80)](',\x20');console['error'](_0x27c92f(0x75)+_0x4716ab),console['error'](_0x27c92f(0x73)+_0x4a3967),process['exit'](0x1);}await _0x238ad5[_0x27c92f(0x78)](_0x4c66e2,_0x4e0009);}
|