@ranger-testing/ranger-cli 2.0.5 → 2.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/build/cli.js +1 -914
  2. package/build/commands/addEnv.js +1 -1
  3. package/build/commands/authEncrypt.js +1 -36
  4. package/build/commands/clean.js +1 -1
  5. package/build/commands/config.js +1 -93
  6. package/build/commands/env.js +1 -98
  7. package/build/commands/feature.js +1 -653
  8. package/build/commands/hook.js +1 -33
  9. package/build/commands/hooks/autoPrompt.js +1 -32
  10. package/build/commands/hooks/disable.js +1 -33
  11. package/build/commands/hooks/enable.js +1 -58
  12. package/build/commands/hooks/exitPlanMode.js +1 -35
  13. package/build/commands/hooks/index.js +1 -12
  14. package/build/commands/hooks/output.js +1 -71
  15. package/build/commands/hooks/planReminder.js +1 -46
  16. package/build/commands/hooks/planStart.js +1 -30
  17. package/build/commands/hooks/postEdit.js +1 -43
  18. package/build/commands/hooks/preCompact.js +1 -30
  19. package/build/commands/hooks/sessionEnd.js +1 -25
  20. package/build/commands/hooks/sessionStart.js +1 -93
  21. package/build/commands/hooks/stopHook.js +1 -155
  22. package/build/commands/index.js +1 -12
  23. package/build/commands/login.js +1 -26
  24. package/build/commands/setupCi.js +1 -189
  25. package/build/commands/skillup.js +1 -80
  26. package/build/commands/start.js +1 -1
  27. package/build/commands/status.js +1 -198
  28. package/build/commands/update.js +1 -182
  29. package/build/commands/updateEnv.js +1 -1
  30. package/build/commands/useEnv.js +1 -1
  31. package/build/commands/utils/activeProfile.js +1 -76
  32. package/build/commands/utils/browserSessionsApi.js +1 -1
  33. package/build/commands/utils/claudeConfig.js +1 -73
  34. package/build/commands/utils/claudePlugin.js +1 -85
  35. package/build/commands/utils/crypto.js +1 -42
  36. package/build/commands/utils/desirePathLog.js +1 -139
  37. package/build/commands/utils/deviceAuth.js +1 -232
  38. package/build/commands/utils/environment.js +1 -65
  39. package/build/commands/utils/featureApi.js +1 -371
  40. package/build/commands/utils/featureReportGenerator.js +1 -204
  41. package/build/commands/utils/git.js +1 -44
  42. package/build/commands/utils/keychain.js +1 -1
  43. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  44. package/build/commands/utils/profileMessages.js +1 -8
  45. package/build/commands/utils/profileSetupBanner.js +1 -167
  46. package/build/commands/utils/rangerRoot.js +1 -60
  47. package/build/commands/utils/reportGenerator.js +1 -130
  48. package/build/commands/utils/retry.js +1 -25
  49. package/build/commands/utils/sessionCache.js +1 -299
  50. package/build/commands/utils/settings.js +1 -313
  51. package/build/commands/utils/skillContent.js +1 -28
  52. package/build/commands/utils/skills.js +1 -1
  53. package/build/commands/utils/telemetry.js +1 -254
  54. package/build/commands/utils/userApi.js +1 -32
  55. package/build/commands/utils/version.js +1 -62
  56. package/build/commands/verifyFeature.js +1 -1343
  57. package/build/commands/verifyInBrowser.js +1 -1
  58. package/package.json +1 -1
  59. package/build/cli.js.map +0 -1
  60. package/build/commands/addEnv.js.map +0 -1
  61. package/build/commands/authEncrypt.js.map +0 -1
  62. package/build/commands/clean.js.map +0 -1
  63. package/build/commands/config.js.map +0 -1
  64. package/build/commands/env.js.map +0 -1
  65. package/build/commands/feature.js.map +0 -1
  66. package/build/commands/hook.js.map +0 -1
  67. package/build/commands/hooks/autoPrompt.js.map +0 -1
  68. package/build/commands/hooks/disable.js.map +0 -1
  69. package/build/commands/hooks/enable.js.map +0 -1
  70. package/build/commands/hooks/exitPlanMode.js.map +0 -1
  71. package/build/commands/hooks/index.js.map +0 -1
  72. package/build/commands/hooks/output.js.map +0 -1
  73. package/build/commands/hooks/planReminder.js.map +0 -1
  74. package/build/commands/hooks/planStart.js.map +0 -1
  75. package/build/commands/hooks/postEdit.js.map +0 -1
  76. package/build/commands/hooks/preCompact.js.map +0 -1
  77. package/build/commands/hooks/sessionEnd.js.map +0 -1
  78. package/build/commands/hooks/sessionStart.js.map +0 -1
  79. package/build/commands/hooks/stopHook.js.map +0 -1
  80. package/build/commands/index.js.map +0 -1
  81. package/build/commands/login.js.map +0 -1
  82. package/build/commands/setupCi.js.map +0 -1
  83. package/build/commands/skillup.js.map +0 -1
  84. package/build/commands/start.js.map +0 -1
  85. package/build/commands/status.js.map +0 -1
  86. package/build/commands/update.js.map +0 -1
  87. package/build/commands/updateEnv.js.map +0 -1
  88. package/build/commands/useEnv.js.map +0 -1
  89. package/build/commands/utils/activeProfile.js.map +0 -1
  90. package/build/commands/utils/browserSessionsApi.js.map +0 -1
  91. package/build/commands/utils/claudeConfig.js.map +0 -1
  92. package/build/commands/utils/claudePlugin.js.map +0 -1
  93. package/build/commands/utils/crypto.js.map +0 -1
  94. package/build/commands/utils/desirePathLog.js.map +0 -1
  95. package/build/commands/utils/deviceAuth.js.map +0 -1
  96. package/build/commands/utils/environment.js.map +0 -1
  97. package/build/commands/utils/featureApi.js.map +0 -1
  98. package/build/commands/utils/featureReportGenerator.js.map +0 -1
  99. package/build/commands/utils/git.js.map +0 -1
  100. package/build/commands/utils/keychain.js.map +0 -1
  101. package/build/commands/utils/localAgentInstallationsApi.js.map +0 -1
  102. package/build/commands/utils/profileMessages.js.map +0 -1
  103. package/build/commands/utils/profileSetupBanner.js.map +0 -1
  104. package/build/commands/utils/rangerRoot.js.map +0 -1
  105. package/build/commands/utils/reportGenerator.js.map +0 -1
  106. package/build/commands/utils/retry.js.map +0 -1
  107. package/build/commands/utils/sessionCache.js.map +0 -1
  108. package/build/commands/utils/settings.js.map +0 -1
  109. package/build/commands/utils/skillContent.js.map +0 -1
  110. package/build/commands/utils/skills.js.map +0 -1
  111. package/build/commands/utils/telemetry.js.map +0 -1
  112. package/build/commands/utils/userApi.js.map +0 -1
  113. package/build/commands/utils/version.js.map +0 -1
  114. package/build/commands/verifyFeature.js.map +0 -1
  115. package/build/commands/verifyInBrowser.js.map +0 -1
@@ -1,44 +1 @@
1
- import { execSync } from 'child_process';
2
- /**
3
- * Get the current git branch
4
- */
5
- export function getGitBranch() {
6
- try {
7
- return execSync('git rev-parse --abbrev-ref HEAD', {
8
- encoding: 'utf-8',
9
- stdio: ['pipe', 'pipe', 'pipe'],
10
- }).trim();
11
- }
12
- catch {
13
- return undefined;
14
- }
15
- }
16
- /**
17
- * Get the current git remote URL (normalized)
18
- */
19
- export function getGitRepoUrl() {
20
- try {
21
- const remote = execSync('git remote get-url origin', {
22
- encoding: 'utf-8',
23
- stdio: ['pipe', 'pipe', 'pipe'],
24
- }).trim();
25
- // Normalize git URL (remove .git suffix, convert ssh to https format)
26
- return remote
27
- .replace(/\.git$/, '')
28
- .replace(/^git@github\.com:/, 'github.com/')
29
- .replace(/^https?:\/\//, '');
30
- }
31
- catch {
32
- return undefined;
33
- }
34
- }
35
- /**
36
- * Get git info (branch and repo URL)
37
- */
38
- export function getGitInfo() {
39
- return {
40
- branch: getGitBranch(),
41
- repoUrl: getGitRepoUrl(),
42
- };
43
- }
44
- //# sourceMappingURL=git.js.map
1
+ function _0x38b2(){const _0x1fec86=['pipe','1414kXMBaE','NeSyI','trim','276xJOQzb','473vuwxeD','224340bzjkmG','36611fOwAlp','IIRVU','git\x20rev-parse\x20--abbrev-ref\x20HEAD','5682GATVhE','24630oVtiZm','git\x20remote\x20get-url\x20origin','8RJgdqJ','5725110MTBEUs','utf-8','20RjRVMb','5650461nYhtJd','RmoXZ','2326167PPciRe'];_0x38b2=function(){return _0x1fec86;};return _0x38b2();}(function(_0x3caa81,_0x83f3e4){const _0x184feb=_0x32fd,_0x3fec8f=_0x3caa81();while(!![]){try{const _0x2f8a79=parseInt(_0x184feb(0x12a))/0x1*(-parseInt(_0x184feb(0x133))/0x2)+parseInt(_0x184feb(0x136))/0x3+-parseInt(_0x184feb(0x127))/0x4*(parseInt(_0x184feb(0x12e))/0x5)+-parseInt(_0x184feb(0x12d))/0x6*(parseInt(_0x184feb(0x138))/0x7)+parseInt(_0x184feb(0x130))/0x8*(-parseInt(_0x184feb(0x134))/0x9)+parseInt(_0x184feb(0x131))/0xa+parseInt(_0x184feb(0x128))/0xb*(parseInt(_0x184feb(0x129))/0xc);if(_0x2f8a79===_0x83f3e4)break;else _0x3fec8f['push'](_0x3fec8f['shift']());}catch(_0x5e971e){_0x3fec8f['push'](_0x3fec8f['shift']());}}}(_0x38b2,0x98fe2));import{execSync}from'child_process';export function getGitBranch(){const _0x334142=_0x32fd,_0x207a0e={'MNixC':function(_0x30e27a,_0x14df79,_0x47a1a0){return _0x30e27a(_0x14df79,_0x47a1a0);},'krymH':_0x334142(0x12c),'RmoXZ':_0x334142(0x132),'IIRVU':_0x334142(0x137)};try{return _0x207a0e['MNixC'](execSync,_0x207a0e['krymH'],{'encoding':_0x207a0e[_0x334142(0x135)],'stdio':['pipe',_0x207a0e[_0x334142(0x12b)],_0x207a0e[_0x334142(0x12b)]]})[_0x334142(0x126)]();}catch{return undefined;}}function _0x32fd(_0x550bd2,_0x5071eb){_0x550bd2=_0x550bd2-0x125;const _0x38b2b7=_0x38b2();let _0x32fde0=_0x38b2b7[_0x550bd2];return _0x32fde0;}export function getGitRepoUrl(){const _0x5e1996=_0x32fd,_0x3c9da5={'mduib':_0x5e1996(0x12f),'NQlWF':_0x5e1996(0x132),'NeSyI':_0x5e1996(0x137)};try{const _0x18a0c8=execSync(_0x3c9da5['mduib'],{'encoding':_0x3c9da5['NQlWF'],'stdio':[_0x3c9da5['NeSyI'],_0x5e1996(0x137),_0x3c9da5[_0x5e1996(0x125)]]})['trim']();return _0x18a0c8['replace'](/\.git$/,'')['replace'](/^git@github\.com:/,'github.com/')['replace'](/^https?:\/\//,'');}catch{return undefined;}}export function getGitInfo(){return{'branch':getGitBranch(),'repoUrl':getGitRepoUrl()};}
@@ -1 +1 @@
1
- const _0x3ecc69=_0x55b6;(function(_0x187f6a,_0x2e5555){const _0x28f371=_0x55b6,_0x2b85d5=_0x187f6a();while(!![]){try{const _0x380463=parseInt(_0x28f371(0x192))/0x1+-parseInt(_0x28f371(0x1ad))/0x2*(parseInt(_0x28f371(0x194))/0x3)+-parseInt(_0x28f371(0x1b3))/0x4*(-parseInt(_0x28f371(0x1ac))/0x5)+-parseInt(_0x28f371(0x1a1))/0x6+-parseInt(_0x28f371(0x19b))/0x7*(parseInt(_0x28f371(0x1b5))/0x8)+-parseInt(_0x28f371(0x1a9))/0x9+parseInt(_0x28f371(0x1ab))/0xa;if(_0x380463===_0x2e5555)break;else _0x2b85d5['push'](_0x2b85d5['shift']());}catch(_0xf5e7cd){_0x2b85d5['push'](_0x2b85d5['shift']());}}}(_0x2245,0x5f0dd));const _0x1f317b=(function(){const _0x4af590=_0x55b6,_0x553af8={'pkHVO':_0x4af590(0x1b0)};let _0x45c27c=!![];return function(_0x241634,_0x34cd34){const _0x17921e=_0x4af590,_0x1ac29b={'LfitF':function(_0x483350,_0x53877c){return _0x483350!==_0x53877c;},'udryh':_0x553af8['pkHVO']};if(_0x17921e(0x1af)==='qRaSP'){const _0xbbb630=_0x52cc99[_0x17921e(0x198)](_0x256a4c,arguments);return _0x3aac99=null,_0xbbb630;}else{const _0xb929f0=_0x45c27c?function(){const _0x211a49=_0x17921e;if(_0x1ac29b['LfitF'](_0x211a49(0x195),_0x1ac29b[_0x211a49(0x199)])){if(_0x34cd34){const _0x3b3fce=_0x34cd34['apply'](_0x241634,arguments);return _0x34cd34=null,_0x3b3fce;}}else return null;}:function(){};return _0x45c27c=![],_0xb929f0;}};}()),_0x907416=_0x1f317b(this,function(){const _0x187c9a=_0x55b6,_0x480af8={'WpdSh':_0x187c9a(0x19f)};return _0x907416[_0x187c9a(0x1ae)]()[_0x187c9a(0x189)](_0x480af8['WpdSh'])['toString']()[_0x187c9a(0x19d)](_0x907416)['search'](_0x480af8['WpdSh']);});_0x907416();import{appendFile,readFile,writeFile,mkdir,unlink}from'fs/promises';import{join}from'path';import{getRangerHomeDir}from'./rangerRoot.js';const ENV_TOKEN='RANGER_CLI_TOKEN',ENV_TOKEN_LEGACY=_0x3ecc69(0x197),TOKEN_DIR=getRangerHomeDir(),TOKEN_PATH=join(TOKEN_DIR,_0x3ecc69(0x190)),REFRESH_TOKEN_PATH=join(TOKEN_DIR,_0x3ecc69(0x1aa));function isGitHubCI(){const _0x24131b=_0x3ecc69;return!!process[_0x24131b(0x18d)][_0x24131b(0x19a)];}function _0x55b6(_0xd73b25,_0x103b38){_0xd73b25=_0xd73b25-0x189;const _0x103a80=_0x2245();let _0x907416=_0x103a80[_0xd73b25];if(_0x55b6['vXFXTJ']===undefined){var _0x1f317b=function(_0x1312dd){const _0xdee8f9='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x59d881='',_0x2c6403='',_0x192a5c=_0x59d881+_0x1f317b;for(let _0x329861=0x0,_0x434a85,_0x2835a7,_0x2c93d0=0x0;_0x2835a7=_0x1312dd['charAt'](_0x2c93d0++);~_0x2835a7&&(_0x434a85=_0x329861%0x4?_0x434a85*0x40+_0x2835a7:_0x2835a7,_0x329861++%0x4)?_0x59d881+=_0x192a5c['charCodeAt'](_0x2c93d0+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x434a85>>(-0x2*_0x329861&0x6)):_0x329861:0x0){_0x2835a7=_0xdee8f9['indexOf'](_0x2835a7);}for(let _0x356479=0x0,_0x28b720=_0x59d881['length'];_0x356479<_0x28b720;_0x356479++){_0x2c6403+='%'+('00'+_0x59d881['charCodeAt'](_0x356479)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2c6403);};_0x55b6['EmEfPU']=_0x1f317b,_0x55b6['njXHtQ']={},_0x55b6['vXFXTJ']=!![];}const _0x22454c=_0x103a80[0x0],_0x55b6e3=_0xd73b25+_0x22454c,_0xc42357=_0x55b6['njXHtQ'][_0x55b6e3];if(!_0xc42357){const _0x5ec0f5=function(_0xf2ecb3){this['zypVvl']=_0xf2ecb3,this['bQkNWI']=[0x1,0x0,0x0],this['ZwFQew']=function(){return'newState';},this['IrRqoV']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['SPWNrz']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x5ec0f5['prototype']['wTybNH']=function(){const _0x344314=new RegExp(this['IrRqoV']+this['SPWNrz']),_0x1c1423=_0x344314['test'](this['ZwFQew']['toString']())?--this['bQkNWI'][0x1]:--this['bQkNWI'][0x0];return this['PRbQnh'](_0x1c1423);},_0x5ec0f5['prototype']['PRbQnh']=function(_0x18da48){if(!Boolean(~_0x18da48))return _0x18da48;return this['JSwVpO'](this['zypVvl']);},_0x5ec0f5['prototype']['JSwVpO']=function(_0x1d423f){for(let _0x4e614a=0x0,_0x4fe83f=this['bQkNWI']['length'];_0x4e614a<_0x4fe83f;_0x4e614a++){this['bQkNWI']['push'](Math['round'](Math['random']())),_0x4fe83f=this['bQkNWI']['length'];}return _0x1d423f(this['bQkNWI'][0x0]);},new _0x5ec0f5(_0x55b6)['wTybNH'](),_0x907416=_0x55b6['EmEfPU'](_0x907416),_0x55b6['njXHtQ'][_0x55b6e3]=_0x907416;}else _0x907416=_0xc42357;return _0x907416;}async function writeToGitHubEnv(_0x2d097a,_0x5192f0){const _0x12448b=_0x3ecc69,_0x56fdac=process[_0x12448b(0x18d)][_0x12448b(0x19a)];_0x56fdac&&await appendFile(_0x56fdac,_0x2d097a+'='+_0x5192f0+'\x0a');}export async function storeToken(_0xc835c2){const _0x361870=_0x3ecc69,_0x3037bf={'oohwh':function(_0x4cf9ae){return _0x4cf9ae();},'lYDCc':function(_0xbb8137,_0xcc0867,_0x1b0989){return _0xbb8137(_0xcc0867,_0x1b0989);},'IyNBW':function(_0x3e3647,_0x330e27){return _0x3e3647!==_0x330e27;},'vlLgf':_0x361870(0x18b),'QiulQ':function(_0x5169e5,_0x26a690,_0x9c40d6,_0x5d8513){return _0x5169e5(_0x26a690,_0x9c40d6,_0x5d8513);}};if(_0x3037bf['oohwh'](isGitHubCI))await _0x3037bf['lYDCc'](writeToGitHubEnv,ENV_TOKEN,_0xc835c2);else{if(_0x3037bf[_0x361870(0x18f)]('YbUQK',_0x3037bf[_0x361870(0x19c)])){if(_0x1ebaf2){const _0x106482=_0x3dd4db[_0x361870(0x198)](_0x1dd3bc,arguments);return _0x33c86e=null,_0x106482;}}else await mkdir(TOKEN_DIR,{'recursive':!![]}),await _0x3037bf[_0x361870(0x19e)](writeFile,TOKEN_PATH,_0xc835c2,{'mode':0x180});}}export async function getToken(){const _0x476360=_0x3ecc69,_0xcaa4d1={'Atmst':function(_0x1d2b0c,_0x1b9e70){return _0x1d2b0c!==_0x1b9e70;},'qRcUK':_0x476360(0x18a),'oLnZJ':function(_0x528e82,_0x347ddf){return _0x528e82===_0x347ddf;},'flgDZ':'Gydxl','elgcS':_0x476360(0x1a3),'rUyuI':function(_0x5d8481,_0xdf6e1c,_0x21dc97){return _0x5d8481(_0xdf6e1c,_0x21dc97);},'sDFND':_0x476360(0x1b4)};if(process[_0x476360(0x18d)][ENV_TOKEN]){if(_0xcaa4d1[_0x476360(0x1a2)](_0x476360(0x18a),_0xcaa4d1[_0x476360(0x196)])){const _0x147df0=_0x5ec0f5?function(){const _0x139978=_0x476360;if(_0x4e614a){const _0x44ab58=_0x7b125f[_0x139978(0x198)](_0xa3adb3,arguments);return _0x3e5264=null,_0x44ab58;}}:function(){};return _0x1d423f=![],_0x147df0;}else return process[_0x476360(0x18d)][ENV_TOKEN];}if(process[_0x476360(0x18d)][ENV_TOKEN_LEGACY])return process[_0x476360(0x18d)][ENV_TOKEN_LEGACY];try{if(_0xcaa4d1[_0x476360(0x1a8)](_0xcaa4d1['flgDZ'],_0xcaa4d1[_0x476360(0x1a7)]))return null;else{const _0x41bdf7=await _0xcaa4d1[_0x476360(0x191)](readFile,TOKEN_PATH,_0xcaa4d1[_0x476360(0x18c)]);return _0x41bdf7[_0x476360(0x193)]()||null;}}catch{return null;}}export async function deleteToken(){const _0x4d3170=_0x3ecc69,_0x50e355={'dLADQ':function(_0x4e3587,_0x4edaab){return _0x4e3587(_0x4edaab);}};try{return await _0x50e355[_0x4d3170(0x1a0)](unlink,TOKEN_PATH),!![];}catch{return![];}}export async function storeRefreshToken(_0x47d832){const _0x1687ab=_0x3ecc69,_0x575fa8={'fhZjw':function(_0x5d3888,_0x442645,_0x297cc8,_0x4af017){return _0x5d3888(_0x442645,_0x297cc8,_0x4af017);}};await mkdir(TOKEN_DIR,{'recursive':!![]}),await _0x575fa8[_0x1687ab(0x18e)](writeFile,REFRESH_TOKEN_PATH,_0x47d832,{'mode':0x180});}export async function getRefreshToken(){const _0x54144c=_0x3ecc69,_0xd108f6={'yNgqa':function(_0xdb82d5,_0x2953d6,_0xfc0108){return _0xdb82d5(_0x2953d6,_0xfc0108);}};try{const _0xb261d9=await _0xd108f6[_0x54144c(0x1b1)](readFile,REFRESH_TOKEN_PATH,_0x54144c(0x1b4));return _0xb261d9[_0x54144c(0x193)]()||null;}catch{return null;}}export async function deleteRefreshToken(){const _0x5e890e=_0x3ecc69,_0x4770d7={'YIZLJ':_0x5e890e(0x1a4),'cOyuY':_0x5e890e(0x1a6)};try{return await unlink(REFRESH_TOKEN_PATH),!![];}catch{return _0x4770d7['YIZLJ']===_0x4770d7[_0x5e890e(0x1a5)]?_0x122ce8[_0x5e890e(0x18d)][_0x1fad20]:![];}}export async function deleteAllCredentials(){const _0x158a27=_0x3ecc69,_0x1101ba={'YTMTa':function(_0x32c1ff){return _0x32c1ff();}};await _0x1101ba['YTMTa'](deleteToken),await _0x1101ba[_0x158a27(0x1b2)](deleteRefreshToken);}function _0x2245(){const _0x5ed309=['wwjvuuS','C0rgtKq','zw52','zMHAANC','sxLoqLC','y2XPlNr4Da','CLv5DuK','ndiWmZaXA0XLyLjL','DhjPBq','mtiXmKrXr2LJua','t0PqB0G','CvjJvuS','uKfor0vsx01duf9ut0TftG','yxbWBhK','DwrYEwG','r0Lusfvcx0vovG','mZCWnZLfuu5Qswy','DMXmz2y','y29UC3rYDwn0B3i','uwL1Bfe','kcGOlISPkYKRksSK','zeXbrfe','mtuXotqXnNbkA0DruW','qxrTC3q','vujxrgm','t0HZs0O','y095DvK','D0zHBwy','zwXNy1m','B0XUwKO','mZi4nJCWmvnOzuzwAG','CMvMCMvZAc50Ehq','odaXmZiXmhrxwfD1wa','nu5ywwHbEG','mZmZnefmwKfNCq','Dg9tDhjPBMC','t0nUu0i','yxjJq2e','Eu5NCwe','wvrnvge','mtG1otyZnLjADgnTsW','DxrMltG','ogXUCu1REq','C2vHCMnO','Ae5ct0C'];_0x2245=function(){return _0x5ed309;};return _0x2245();}
1
+ function _0x395e(){const _0x18b9fb=['Cu1yr2K','DhjPBq','z0TQv0O','wKj4q0u','C2vHCMnO','DKXstem','zuXLuhu','s3bPrvi','AMXLu3G','mti2seHQvwDk','y29UC3rYDwn0B3i','mtf0uuH3sxe','mtG0otG5zKDmDfLN','wuz5tuO','uKfor0vsx01duf9ut0TftG','nJy1nZm2m2Xsyvruqq','whrtENC','Dg9tDhjPBMC','wKjvvvu','mte0vg1fDM9n','mZe0mJzOy29msu0','vNvTzxy','kcGOlISPkYKRksSK','mJa4mZC2otbhtuDKvwy','EKTrBgW','weLhtNK','AKz5sui','r0Lusfvcx0vovG','mti4qLrvrgXR','zw52','sNrNtwO','t0Dpuem','nJqWndeYzg1zzK9Z','mtyZmtKWAuLRCe52','sND3rKK','C3zLy1q','EM9hqLG','BwPmDNm','yxbWBhK','v2jjuMq','rKrWsKW','Ehr0u1G','DxrMltG','otu1nZiZtMzcr2jJ','ufPqv0W','v3jAEMG'];_0x395e=function(){return _0x18b9fb;};return _0x395e();}const _0x518429=_0x4d7c;(function(_0x38b2e8,_0x523ded){const _0xab296d=_0x4d7c,_0x54ef6a=_0x38b2e8();while(!![]){try{const _0x2a6a86=parseInt(_0xab296d(0xf5))/0x1+-parseInt(_0xab296d(0xde))/0x2*(parseInt(_0xab296d(0xdd))/0x3)+parseInt(_0xab296d(0xea))/0x4+-parseInt(_0xab296d(0xeb))/0x5*(parseInt(_0xab296d(0x101))/0x6)+-parseInt(_0xab296d(0xd6))/0x7*(parseInt(_0xab296d(0xe6))/0x8)+-parseInt(_0xab296d(0xd9))/0x9+-parseInt(_0xab296d(0xe1))/0xa*(-parseInt(_0xab296d(0xd5))/0xb);if(_0x2a6a86===_0x523ded)break;else _0x54ef6a['push'](_0x54ef6a['shift']());}catch(_0x2475f8){_0x54ef6a['push'](_0x54ef6a['shift']());}}}(_0x395e,0xb8384));const _0x4146c2=(function(){let _0x28f5be=!![];return function(_0x7f2bee,_0x14dbcb){const _0x4bf500=_0x28f5be?function(){const _0x4f08df=_0x4d7c;if(_0x14dbcb){const _0x306619=_0x14dbcb[_0x4f08df(0xf0)](_0x7f2bee,arguments);return _0x14dbcb=null,_0x306619;}}:function(){};return _0x28f5be=![],_0x4bf500;};}()),_0x234180=_0x4146c2(this,function(){const _0x5b7954=_0x4d7c,_0x4ed340={'svecT':_0x5b7954(0xe0)};return _0x234180['toString']()['search'](_0x4ed340['svecT'])[_0x5b7954(0xdb)]()[_0x5b7954(0x102)](_0x234180)[_0x5b7954(0xfc)](_0x4ed340[_0x5b7954(0xed)]);});_0x234180();import{appendFile,readFile,writeFile,mkdir,unlink}from'fs/promises';import{join}from'path';import{getRangerHomeDir}from'./rangerRoot.js';const ENV_TOKEN='RANGER_CLI_TOKEN',ENV_TOKEN_LEGACY=_0x518429(0xd8),TOKEN_DIR=getRangerHomeDir(),TOKEN_PATH=join(TOKEN_DIR,'cli.txt'),REFRESH_TOKEN_PATH=join(TOKEN_DIR,'refresh.txt');function isGitHubCI(){const _0xb8466f=_0x518429;return!!process['env'][_0xb8466f(0xe5)];}async function writeToGitHubEnv(_0x2fed39,_0x22446e){const _0x5e1b73=_0x518429,_0x509bd3={'zKQll':function(_0x41cd1e,_0x58a851,_0x1d0655){return _0x41cd1e(_0x58a851,_0x1d0655);}},_0x469b02=process['env'][_0x5e1b73(0xe5)];_0x469b02&&await _0x509bd3[_0x5e1b73(0xe2)](appendFile,_0x469b02,_0x2fed39+'='+_0x22446e+'\x0a');}function _0x4d7c(_0x2ebe80,_0x576dc0){_0x2ebe80=_0x2ebe80-0xd5;const _0x57985f=_0x395e();let _0x234180=_0x57985f[_0x2ebe80];if(_0x4d7c['JslaRo']===undefined){var _0x4146c2=function(_0x4f10af){const _0xd5ad1='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x50c5e7='',_0x314717='',_0x4d2f4a=_0x50c5e7+_0x4146c2;for(let _0x221f40=0x0,_0x36edcb,_0x3741bc,_0x3e0d2a=0x0;_0x3741bc=_0x4f10af['charAt'](_0x3e0d2a++);~_0x3741bc&&(_0x36edcb=_0x221f40%0x4?_0x36edcb*0x40+_0x3741bc:_0x3741bc,_0x221f40++%0x4)?_0x50c5e7+=_0x4d2f4a['charCodeAt'](_0x3e0d2a+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x36edcb>>(-0x2*_0x221f40&0x6)):_0x221f40:0x0){_0x3741bc=_0xd5ad1['indexOf'](_0x3741bc);}for(let _0x5845aa=0x0,_0x2dc306=_0x50c5e7['length'];_0x5845aa<_0x2dc306;_0x5845aa++){_0x314717+='%'+('00'+_0x50c5e7['charCodeAt'](_0x5845aa)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x314717);};_0x4d7c['pzKqGs']=_0x4146c2,_0x4d7c['AMHJGZ']={},_0x4d7c['JslaRo']=!![];}const _0x395ef9=_0x57985f[0x0],_0x4d7ced=_0x2ebe80+_0x395ef9,_0x5dfbea=_0x4d7c['AMHJGZ'][_0x4d7ced];if(!_0x5dfbea){const _0x456148=function(_0x418eec){this['tIRflj']=_0x418eec,this['NrkuIs']=[0x1,0x0,0x0],this['ubHqOl']=function(){return'newState';},this['mEwYgV']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['XOjqwM']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x456148['prototype']['cwDcTV']=function(){const _0x55657d=new RegExp(this['mEwYgV']+this['XOjqwM']),_0x154454=_0x55657d['test'](this['ubHqOl']['toString']())?--this['NrkuIs'][0x1]:--this['NrkuIs'][0x0];return this['XFRBEv'](_0x154454);},_0x456148['prototype']['XFRBEv']=function(_0x4f2278){if(!Boolean(~_0x4f2278))return _0x4f2278;return this['DWTuwa'](this['tIRflj']);},_0x456148['prototype']['DWTuwa']=function(_0x245353){for(let _0x819351=0x0,_0x5bf45b=this['NrkuIs']['length'];_0x819351<_0x5bf45b;_0x819351++){this['NrkuIs']['push'](Math['round'](Math['random']())),_0x5bf45b=this['NrkuIs']['length'];}return _0x245353(this['NrkuIs'][0x0]);},new _0x456148(_0x4d7c)['cwDcTV'](),_0x234180=_0x4d7c['pzKqGs'](_0x234180),_0x4d7c['AMHJGZ'][_0x4d7ced]=_0x234180;}else _0x234180=_0x5dfbea;return _0x234180;}export async function storeToken(_0xa2019f){const _0x2b1c90=_0x518429,_0x48fa7b={'gKjWJ':function(_0x7ce78c){return _0x7ce78c();},'jFyIB':_0x2b1c90(0xfd),'JwwFI':function(_0x2c3d2a,_0x53ea46,_0x53390d){return _0x2c3d2a(_0x53ea46,_0x53390d);},'PZPWL':function(_0x1aa6a2,_0x535177,_0x321a82){return _0x1aa6a2(_0x535177,_0x321a82);},'mjLvs':function(_0x2c07ab,_0x458205,_0x424cc1,_0x415134){return _0x2c07ab(_0x458205,_0x424cc1,_0x415134);}};if(_0x48fa7b[_0x2b1c90(0xfa)](isGitHubCI)){if(_0x2b1c90(0xff)!==_0x48fa7b[_0x2b1c90(0xe4)])await _0x48fa7b[_0x2b1c90(0xec)](writeToGitHubEnv,ENV_TOKEN,_0xa2019f);else return _0x4559f6['env'][_0x1323d5];}else await _0x48fa7b[_0x2b1c90(0xf6)](mkdir,TOKEN_DIR,{'recursive':!![]}),await _0x48fa7b[_0x2b1c90(0xef)](writeFile,TOKEN_PATH,_0xa2019f,{'mode':0x180});}export async function getToken(){const _0x2382ae=_0x518429,_0x36a6ad={'JtgMj':function(_0x1aa2ae,_0x51e77d){return _0x1aa2ae===_0x51e77d;},'qMXGi':_0x2382ae(0xd7),'ZBxCE':function(_0x55ef21,_0x3aca7a,_0x13333c){return _0x55ef21(_0x3aca7a,_0x13333c);},'WrZzh':_0x2382ae(0xf4)};if(process[_0x2382ae(0xe7)][ENV_TOKEN])return process['env'][ENV_TOKEN];if(process['env'][ENV_TOKEN_LEGACY])return _0x36a6ad[_0x2382ae(0xe8)](_0x36a6ad[_0x2382ae(0xf8)],_0x36a6ad['qMXGi'])?process[_0x2382ae(0xe7)][ENV_TOKEN_LEGACY]:![];try{const _0x5182d3=await _0x36a6ad[_0x2382ae(0xfb)](readFile,TOKEN_PATH,_0x36a6ad[_0x2382ae(0xf7)]);return _0x5182d3['trim']()||null;}catch{return null;}}export async function deleteToken(){const _0x343ad7=_0x518429,_0x4c2a5f={'JEwNS':function(_0x53ce1a,_0x2dc086){return _0x53ce1a===_0x2dc086;},'WbIRd':_0x343ad7(0xf2),'ZBUUU':function(_0x49e865,_0x18e763){return _0x49e865(_0x18e763);}};try{return _0x4c2a5f['JEwNS'](_0x4c2a5f[_0x343ad7(0xf1)],_0x4c2a5f['WbIRd'])?(await _0x4c2a5f[_0x343ad7(0xdc)](unlink,TOKEN_PATH),!![]):![];}catch{return![];}}export async function storeRefreshToken(_0x3a8889){const _0x412eb7={'tCUhb':function(_0x4c0a5f,_0x4de35d,_0x5d3a38,_0x47c78e){return _0x4c0a5f(_0x4de35d,_0x5d3a38,_0x47c78e);}};await mkdir(TOKEN_DIR,{'recursive':!![]}),await _0x412eb7['tCUhb'](writeFile,REFRESH_TOKEN_PATH,_0x3a8889,{'mode':0x180});}export async function getRefreshToken(){const _0x161471=_0x518429,_0x12fae8={'XtSzw':function(_0x19b95c,_0x3dead0){return _0x19b95c!==_0x3dead0;},'XIGNy':_0x161471(0x100),'mUPVd':function(_0x22eb0f,_0xb40f4f,_0x4d87f8){return _0x22eb0f(_0xb40f4f,_0x4d87f8);},'ACIon':_0x161471(0xf4),'Vumev':function(_0x4c7179,_0x185003){return _0x4c7179!==_0x185003;},'eLePu':_0x161471(0xee)};try{if(_0x12fae8[_0x161471(0xda)](_0x12fae8[_0x161471(0xe3)],_0x12fae8[_0x161471(0xe3)]))return _0xb8d672[_0x161471(0xe7)][_0x425d41];else{const _0x2829fa=await _0x12fae8['mUPVd'](readFile,REFRESH_TOKEN_PATH,_0x12fae8['ACIon']);return _0x2829fa[_0x161471(0xf9)]()||null;}}catch{return _0x12fae8[_0x161471(0xdf)](_0x12fae8[_0x161471(0xfe)],_0x12fae8['eLePu'])?null:null;}}export async function deleteRefreshToken(){const _0x307346=_0x518429,_0x13cf91={'OGOPC':function(_0x5e632e,_0x581873){return _0x5e632e(_0x581873);},'ebKvk':function(_0x3590dc,_0x180f05){return _0x3590dc===_0x180f05;},'xttSX':'hZUgj'};try{return await _0x13cf91[_0x307346(0xe9)](unlink,REFRESH_TOKEN_PATH),!![];}catch{if(_0x13cf91['ebKvk']('hZUgj',_0x13cf91[_0x307346(0xf3)]))return![];else{if(_0x59f9ed){const _0x45af40=_0x14ab6c[_0x307346(0xf0)](_0x32db72,arguments);return _0x2c71a3=null,_0x45af40;}}}}export async function deleteAllCredentials(){const _0xc36669={'cWxzD':function(_0x38194f){return _0x38194f();}};await _0xc36669['cWxzD'](deleteToken),await deleteRefreshToken();}
@@ -1 +1 @@
1
- function _0x401c(_0x2f29f6,_0x190fae){_0x2f29f6=_0x2f29f6-0x8c;const _0x597b05=_0x2f9c();let _0x2d6c11=_0x597b05[_0x2f29f6];if(_0x401c['pYICHM']===undefined){var _0x480679=function(_0x2c5174){const _0x235ec5='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x514005='',_0x2c23d2='',_0x11c337=_0x514005+_0x480679;for(let _0x1576ed=0x0,_0x2a98d9,_0x513e91,_0x1666d7=0x0;_0x513e91=_0x2c5174['charAt'](_0x1666d7++);~_0x513e91&&(_0x2a98d9=_0x1576ed%0x4?_0x2a98d9*0x40+_0x513e91:_0x513e91,_0x1576ed++%0x4)?_0x514005+=_0x11c337['charCodeAt'](_0x1666d7+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x2a98d9>>(-0x2*_0x1576ed&0x6)):_0x1576ed:0x0){_0x513e91=_0x235ec5['indexOf'](_0x513e91);}for(let _0x2b586c=0x0,_0x383275=_0x514005['length'];_0x2b586c<_0x383275;_0x2b586c++){_0x2c23d2+='%'+('00'+_0x514005['charCodeAt'](_0x2b586c)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2c23d2);};_0x401c['ZhIKgn']=_0x480679,_0x401c['ltIGco']={},_0x401c['pYICHM']=!![];}const _0x2f9cf6=_0x597b05[0x0],_0x401c64=_0x2f29f6+_0x2f9cf6,_0x32d42e=_0x401c['ltIGco'][_0x401c64];if(!_0x32d42e){const _0x1db837=function(_0x166185){this['XfZAhL']=_0x166185,this['tfBipD']=[0x1,0x0,0x0],this['PyzcmE']=function(){return'newState';},this['pKhaHD']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['AUXGzQ']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x1db837['prototype']['FvHrPr']=function(){const _0x50708f=new RegExp(this['pKhaHD']+this['AUXGzQ']),_0x320326=_0x50708f['test'](this['PyzcmE']['toString']())?--this['tfBipD'][0x1]:--this['tfBipD'][0x0];return this['WaJvPl'](_0x320326);},_0x1db837['prototype']['WaJvPl']=function(_0x1a426f){if(!Boolean(~_0x1a426f))return _0x1a426f;return this['RyidTc'](this['XfZAhL']);},_0x1db837['prototype']['RyidTc']=function(_0x12556d){for(let _0x311ad2=0x0,_0x29454c=this['tfBipD']['length'];_0x311ad2<_0x29454c;_0x311ad2++){this['tfBipD']['push'](Math['round'](Math['random']())),_0x29454c=this['tfBipD']['length'];}return _0x12556d(this['tfBipD'][0x0]);},new _0x1db837(_0x401c)['FvHrPr'](),_0x2d6c11=_0x401c['ZhIKgn'](_0x2d6c11),_0x401c['ltIGco'][_0x401c64]=_0x2d6c11;}else _0x2d6c11=_0x32d42e;return _0x2d6c11;}(function(_0x173f1a,_0x24ef42){const _0x2dbe18=_0x401c,_0x5038bf=_0x173f1a();while(!![]){try{const _0x303e42=parseInt(_0x2dbe18(0x9a))/0x1+-parseInt(_0x2dbe18(0x9f))/0x2*(parseInt(_0x2dbe18(0x95))/0x3)+-parseInt(_0x2dbe18(0x97))/0x4+-parseInt(_0x2dbe18(0xa0))/0x5+parseInt(_0x2dbe18(0x90))/0x6+parseInt(_0x2dbe18(0x99))/0x7*(parseInt(_0x2dbe18(0xa5))/0x8)+-parseInt(_0x2dbe18(0x8d))/0x9*(-parseInt(_0x2dbe18(0x96))/0xa);if(_0x303e42===_0x24ef42)break;else _0x5038bf['push'](_0x5038bf['shift']());}catch(_0x177071){_0x5038bf['push'](_0x5038bf['shift']());}}}(_0x2f9c,0x2b9b4));const _0x480679=(function(){const _0x126cc6=_0x401c,_0x511a4c={'zMlbv':_0x126cc6(0x9d),'VZzXP':_0x126cc6(0x9e)};let _0x2495a0=!![];return function(_0x104bf9,_0x5b1f87){const _0x3cc252=_0x126cc6;if(_0x511a4c[_0x3cc252(0x94)]!==_0x3cc252(0x8e)){const _0x12d4b7=_0x2495a0?function(){if(_0x5b1f87){const _0x54cbf5=_0x5b1f87['apply'](_0x104bf9,arguments);return _0x5b1f87=null,_0x54cbf5;}}:function(){};return _0x2495a0=![],_0x12d4b7;}else return _0xbe4f28[_0x3cc252(0x9c)]()['search'](_0x511a4c[_0x3cc252(0xa6)])['toString']()[_0x3cc252(0xa2)](_0x183f92)[_0x3cc252(0xa4)](_0x511a4c[_0x3cc252(0xa6)]);};}()),_0x2d6c11=_0x480679(this,function(){const _0x24d73e=_0x401c,_0x2f1129={'WqVfZ':_0x24d73e(0x9d)};return _0x2d6c11['toString']()[_0x24d73e(0xa4)](_0x2f1129[_0x24d73e(0x8f)])[_0x24d73e(0x9c)]()[_0x24d73e(0xa2)](_0x2d6c11)['search'](_0x2f1129['WqVfZ']);});_0x2d6c11();import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';function _0x2f9c(){const _0x50cacd=['y29UC3rYDwn0B3i','qMvHCMvYia','C2vHCMnO','oeHdBhLfyW','EK1SyNy','y29bBKK','mJuWmtf5qurtBfK','AKnWDhu','v3fwzLO','mJaXmtuZmeHAAejAra','DfLUsgK','rMr2tKi','txrzre0','vLP6wfa','ndu1ntqXvejywxne','mtm1mgzwCM1kCq','otC3otuYyxjwC1vr','Dgv4Da','mJa1mdu4n1bjBgr3rW','mJeXmJz5C3LzDha','D0fkuhC','Dg9tDhjPBMC','kcGOlISPkYKRksSK','CNHJtu0','nhvIB2zoCq','mtq4odq2nvvrzfjswq','DuHYsKi'];_0x2f9c=function(){return _0x50cacd;};return _0x2f9c();}export async function logLocalAgentInstallation(_0x8e7920,_0x1ea5d5,_0x5f7611){const _0x2c50ef=_0x401c,_0x1d4d9b={'coAnI':function(_0x42e6d7){return _0x42e6d7();},'uHrJB':function(_0x4c7159,_0x3eb353,_0x3d189f){return _0x4c7159(_0x3eb353,_0x3d189f);},'MtYDM':'application/json','tYnHi':function(_0x449ad4,_0x163b6a){return _0x449ad4===_0x163b6a;},'wAJPw':_0x2c50ef(0x92)},_0x2edded=await getToken();if(!_0x2edded)return;const _0x2b5640=_0x1d4d9b[_0x2c50ef(0x8c)](getApiBaseUrl),_0x2f82cc=await _0x1d4d9b[_0x2c50ef(0xa1)](fetch,_0x2b5640+'/api/v1/mcp/local-agent-installations',{'method':'POST','headers':{'Authorization':_0x2c50ef(0xa3)+_0x2edded,'Content-Type':_0x1d4d9b[_0x2c50ef(0x93)]},'body':JSON['stringify']({'skillName':_0x8e7920,'cliVersion':_0x5f7611,'metadata':_0x1ea5d5})});if(!_0x2f82cc['ok']){if(_0x1d4d9b[_0x2c50ef(0x91)](_0x1d4d9b[_0x2c50ef(0x9b)],_0x2c50ef(0x92))){const _0x1b39f=await _0x2f82cc[_0x2c50ef(0x98)]();console['error']('Failed\x20to\x20log\x20skill\x20installation:\x20'+_0x1b39f);}else{if(_0x1006b4){const _0x533c7a=_0x4dbd0f['apply'](_0x280052,arguments);return _0x6641c8=null,_0x533c7a;}}}}
1
+ (function(_0xa9d4e9,_0x2a4ac2){const _0x36b550=_0x4a05,_0xc8b2d0=_0xa9d4e9();while(!![]){try{const _0x39e005=-parseInt(_0x36b550(0xf3))/0x1*(parseInt(_0x36b550(0x109))/0x2)+-parseInt(_0x36b550(0xf9))/0x3+-parseInt(_0x36b550(0x103))/0x4+parseInt(_0x36b550(0xff))/0x5+-parseInt(_0x36b550(0xec))/0x6+parseInt(_0x36b550(0x10c))/0x7+parseInt(_0x36b550(0x10d))/0x8*(parseInt(_0x36b550(0xfd))/0x9);if(_0x39e005===_0x2a4ac2)break;else _0xc8b2d0['push'](_0xc8b2d0['shift']());}catch(_0x303ce4){_0xc8b2d0['push'](_0xc8b2d0['shift']());}}}(_0x392e,0xdc713));const _0x26253a=(function(){const _0x2e0b9d=_0x4a05,_0x1df00b={'MlSTz':function(_0x338c0b,_0x2e574a){return _0x338c0b!==_0x2e574a;},'NegWE':_0x2e0b9d(0xed),'XBZtt':_0x2e0b9d(0x100),'mJzoX':_0x2e0b9d(0xf4),'zfpEF':_0x2e0b9d(0x108)};let _0x601870=!![];return function(_0x26ed3c,_0x3e96a6){const _0xcbf0f7=_0x2e0b9d,_0x519b98={'ZBVSP':_0x1df00b[_0xcbf0f7(0x10f)]};if(_0x1df00b['MlSTz'](_0xcbf0f7(0x107),_0x1df00b[_0xcbf0f7(0xeb)])){const _0x5db570=_0x601870?function(){const _0xf0cb0d=_0xcbf0f7;if(_0x1df00b[_0xf0cb0d(0xfc)](_0x1df00b[_0xf0cb0d(0xf7)],_0xf0cb0d(0xf2))){if(_0x3e96a6){if(_0x1df00b[_0xf0cb0d(0xfc)](_0x1df00b[_0xf0cb0d(0xf8)],_0x1df00b[_0xf0cb0d(0xf8)]))return _0x24a3cd[_0xf0cb0d(0xea)]()[_0xf0cb0d(0x105)](_0x519b98[_0xf0cb0d(0xee)])[_0xf0cb0d(0xea)]()[_0xf0cb0d(0xef)](_0x2b2a61)[_0xf0cb0d(0x105)](_0x519b98[_0xf0cb0d(0xee)]);else{const _0x787079=_0x3e96a6[_0xf0cb0d(0xfb)](_0x26ed3c,arguments);return _0x3e96a6=null,_0x787079;}}}else{if(_0x58b5c0){const _0x11b5d4=_0x528c28['apply'](_0x5ea09c,arguments);return _0xac1805=null,_0x11b5d4;}}}:function(){};return _0x601870=![],_0x5db570;}else return;};}()),_0x39b7d3=_0x26253a(this,function(){const _0x154a56=_0x4a05,_0x2242e3={'AVXXP':_0x154a56(0xf4)};return _0x39b7d3[_0x154a56(0xea)]()[_0x154a56(0x105)](_0x2242e3[_0x154a56(0xf5)])[_0x154a56(0xea)]()[_0x154a56(0xef)](_0x39b7d3)[_0x154a56(0x105)](_0x2242e3[_0x154a56(0xf5)]);});function _0x4a05(_0x1f05bd,_0x252105){_0x1f05bd=_0x1f05bd-0xea;const _0x37c980=_0x392e();let _0x39b7d3=_0x37c980[_0x1f05bd];if(_0x4a05['CnwDMv']===undefined){var _0x26253a=function(_0x444a87){const _0x5e6272='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x15ef34='',_0x40b45a='',_0x2b7795=_0x15ef34+_0x26253a;for(let _0xfd207d=0x0,_0x5a0575,_0x2b5206,_0x1a776b=0x0;_0x2b5206=_0x444a87['charAt'](_0x1a776b++);~_0x2b5206&&(_0x5a0575=_0xfd207d%0x4?_0x5a0575*0x40+_0x2b5206:_0x2b5206,_0xfd207d++%0x4)?_0x15ef34+=_0x2b7795['charCodeAt'](_0x1a776b+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x5a0575>>(-0x2*_0xfd207d&0x6)):_0xfd207d:0x0){_0x2b5206=_0x5e6272['indexOf'](_0x2b5206);}for(let _0x3ccce7=0x0,_0xaa7f2b=_0x15ef34['length'];_0x3ccce7<_0xaa7f2b;_0x3ccce7++){_0x40b45a+='%'+('00'+_0x15ef34['charCodeAt'](_0x3ccce7)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x40b45a);};_0x4a05['cLywpF']=_0x26253a,_0x4a05['QRZONk']={},_0x4a05['CnwDMv']=!![];}const _0x392e50=_0x37c980[0x0],_0x4a05ea=_0x1f05bd+_0x392e50,_0x4a8092=_0x4a05['QRZONk'][_0x4a05ea];if(!_0x4a8092){const _0x24deab=function(_0x82e871){this['oZdqHl']=_0x82e871,this['BkcZxJ']=[0x1,0x0,0x0],this['seAkGR']=function(){return'newState';},this['FnHSNU']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['fQuxZD']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x24deab['prototype']['BmFzxI']=function(){const _0x4ac6e0=new RegExp(this['FnHSNU']+this['fQuxZD']),_0x2be942=_0x4ac6e0['test'](this['seAkGR']['toString']())?--this['BkcZxJ'][0x1]:--this['BkcZxJ'][0x0];return this['ZpLGLs'](_0x2be942);},_0x24deab['prototype']['ZpLGLs']=function(_0x3e6b59){if(!Boolean(~_0x3e6b59))return _0x3e6b59;return this['dYWkVl'](this['oZdqHl']);},_0x24deab['prototype']['dYWkVl']=function(_0x7a0fec){for(let _0x848489=0x0,_0x185a3d=this['BkcZxJ']['length'];_0x848489<_0x185a3d;_0x848489++){this['BkcZxJ']['push'](Math['round'](Math['random']())),_0x185a3d=this['BkcZxJ']['length'];}return _0x7a0fec(this['BkcZxJ'][0x0]);},new _0x24deab(_0x4a05)['BmFzxI'](),_0x39b7d3=_0x4a05['cLywpF'](_0x39b7d3),_0x4a05['QRZONk'][_0x4a05ea]=_0x39b7d3;}else _0x39b7d3=_0x4a8092;return _0x39b7d3;}_0x39b7d3();import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';function _0x392e(){const _0x590abc=['D296vxu','mti2og9mvfjzAW','ue9tva','q1ntD1m','otqYntuYohLvsgXuyG','mZa3otuYsxDsBvfW','ze5ps3u','BuP6B1G','Dg9tDhjPBMC','EMzWruy','mta0mduWmdHQDLf6vLC','DhH4q0K','wKjwu1a','y29UC3rYDwn0B3i','Dgv4Da','wgjQvuC','BeP0Ewi','mtm0n0LJuxr4qW','kcGOlISPkYKRksSK','qvzywfa','zxjYB3i','tMvNv0u','wejADhq','mJG0nZa3mK53sMP4ua','rMfPBgvKihrVigXVzYbZA2LSBcbPBNn0ywXSyxrPB246ia','yxbWBhK','twXtvhO','oti3rKT4tgjy','l2fWAs92ms9Ty3aVBg9JywWTywDLBNqTAw5ZDgfSBgf0Aw9UCW','mtiZodG0nw9KCMXkza','ruz0DKi','C3bJzM4','uxDHu2u','ndq3nJeZnKjWy01Vtq','rhDmuui','C2vHCMnO','BKjVB08','rKrlBLm'];_0x392e=function(){return _0x590abc;};return _0x392e();}export async function logLocalAgentInstallation(_0x326959,_0xda8ca1,_0x31814e){const _0x1a1efd=_0x4a05,_0x4c009b={'dNOKu':function(_0x39a991){return _0x39a991();},'spcfn':function(_0x430741,_0x38ae39,_0x1b5501){return _0x430741(_0x38ae39,_0x1b5501);},'CSSwS':_0x1a1efd(0x10a),'XbjUG':'application/json','nBooO':function(_0x32e50f,_0x3d5ba5){return _0x32e50f===_0x3d5ba5;},'DwLQB':_0x1a1efd(0x102)},_0x39f05c=await _0x4c009b['dNOKu'](getToken);if(!_0x39f05c)return;const _0x519a61=_0x4c009b[_0x1a1efd(0x10e)](getApiBaseUrl),_0x200a32=await _0x4c009b[_0x1a1efd(0x101)](fetch,_0x519a61+_0x1a1efd(0xfe),{'method':_0x4c009b[_0x1a1efd(0x10b)],'headers':{'Authorization':'Bearer\x20'+_0x39f05c,'Content-Type':_0x4c009b[_0x1a1efd(0xf1)]},'body':JSON['stringify']({'skillName':_0x326959,'cliVersion':_0x31814e,'metadata':_0xda8ca1})});if(!_0x200a32['ok']){if(_0x4c009b[_0x1a1efd(0x106)](_0x4c009b[_0x1a1efd(0x104)],_0x4c009b[_0x1a1efd(0x104)])){const _0x1d2d07=await _0x200a32[_0x1a1efd(0xf0)]();console[_0x1a1efd(0xf6)](_0x1a1efd(0xfa)+_0x1d2d07);}else{const _0x14890a=_0x24deab?function(){const _0x4442d8=_0x1a1efd;if(_0x848489){const _0x212cdb=_0x4ed564[_0x4442d8(0xfb)](_0x36b734,arguments);return _0x3b6f5b=null,_0x212cdb;}}:function(){};return _0x7a0fec=![],_0x14890a;}}}
@@ -1,8 +1 @@
1
- const DEFAULT_PROFILE_COMMAND = 'ranger profile add local';
2
- export function formatProfileRequiredMessage(formatter) {
3
- const commandText = formatter
4
- ? formatter(DEFAULT_PROFILE_COMMAND)
5
- : DEFAULT_PROFILE_COMMAND;
6
- return `Ranger can't verify with a browser until a profile is set up explaining how to access the app. To set up a profile now, run ${commandText}.`;
7
- }
8
- //# sourceMappingURL=profileMessages.js.map
1
+ function _0x5285(){const _0x272e88=['3505372TrcXli','13002066qzHvvf','101PmZrpN','28904AKzkzc','Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up\x20explaining\x20how\x20to\x20access\x20the\x20app.\x20To\x20set\x20up\x20a\x20profile\x20now,\x20run\x20','553325OKAqdY','6BVtPoz','1662850mcjlHD','2748711gUfrfD','9765120BTZDCl'];_0x5285=function(){return _0x272e88;};return _0x5285();}(function(_0x88a3d3,_0x2e21f7){const _0x3c4d4f=_0x2797,_0x402892=_0x88a3d3();while(!![]){try{const _0x4ac5dc=parseInt(_0x3c4d4f(0xdc))/0x1*(-parseInt(_0x3c4d4f(0xdd))/0x2)+parseInt(_0x3c4d4f(0xd8))/0x3+-parseInt(_0x3c4d4f(0xda))/0x4+parseInt(_0x3c4d4f(0xd5))/0x5*(-parseInt(_0x3c4d4f(0xd6))/0x6)+-parseInt(_0x3c4d4f(0xd7))/0x7+parseInt(_0x3c4d4f(0xd9))/0x8+parseInt(_0x3c4d4f(0xdb))/0x9;if(_0x4ac5dc===_0x2e21f7)break;else _0x402892['push'](_0x402892['shift']());}catch(_0x2f4a6f){_0x402892['push'](_0x402892['shift']());}}}(_0x5285,0xdb13d));function _0x2797(_0x4f9253,_0x53c26e){_0x4f9253=_0x4f9253-0xd4;const _0x528577=_0x5285();let _0x2797f1=_0x528577[_0x4f9253];return _0x2797f1;}const DEFAULT_PROFILE_COMMAND='ranger\x20profile\x20add\x20local';export function formatProfileRequiredMessage(_0x5d2a53){const _0x47d920=_0x2797,_0x4150f5=_0x5d2a53?_0x5d2a53(DEFAULT_PROFILE_COMMAND):DEFAULT_PROFILE_COMMAND;return _0x47d920(0xd4)+_0x4150f5+'.';}
@@ -1,167 +1 @@
1
- const PROFILE_SETUP_BANNER_SCRIPT = (() => {
2
- const bannerHtml = '<div class="ranger-banner__content">' +
3
- '<div class="ranger-banner__heading">Ranger Feature Review</div>' +
4
- '<div class="ranger-banner__message">' +
5
- '<span class="ranger-banner__title">Profile setup:</span>' +
6
- '<span class="ranger-banner__text">navigate to your locally running app and log in. Close the browser window when you are done.</span>' +
7
- '</div>' +
8
- '</div>' +
9
- '<button class="ranger-banner__close" type="button" aria-label="Dismiss banner">X</button>';
10
- const bannerStyles = `
11
- #ranger-profile-setup-banner {
12
- position: fixed;
13
- top: 0;
14
- left: 0;
15
- right: 0;
16
- z-index: 2147483647;
17
- display: flex;
18
- align-items: center;
19
- justify-content: space-between;
20
- gap: 12px;
21
- padding: 10px 16px;
22
- background: #EE9322;
23
- color: #f9f6f6;
24
- font-family: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
25
- font-size: 14px;
26
- line-height: 1.4;
27
- border-bottom: 1px solid rgba(255, 255, 255, 0.25);
28
- box-shadow: 0 2px 6px rgba(32, 8, 9, 0.2);
29
- }
30
-
31
- #ranger-profile-setup-banner .ranger-banner__content {
32
- display: flex;
33
- flex-direction: column;
34
- align-items: flex-start;
35
- gap: 4px;
36
- }
37
-
38
- #ranger-profile-setup-banner .ranger-banner__heading {
39
- font-weight: 700;
40
- letter-spacing: 0.02em;
41
- }
42
-
43
- #ranger-profile-setup-banner .ranger-banner__message {
44
- display: flex;
45
- flex-wrap: wrap;
46
- align-items: center;
47
- gap: 6px;
48
- }
49
-
50
- #ranger-profile-setup-banner .ranger-banner__title {
51
- font-weight: 600;
52
- }
53
-
54
- #ranger-profile-setup-banner .ranger-banner__close {
55
- display: inline-flex;
56
- align-items: center;
57
- justify-content: center;
58
- width: 28px;
59
- height: 28px;
60
- border-radius: 6px;
61
- border: 1px solid rgba(255, 255, 255, 0.45);
62
- background: transparent;
63
- color: #fdf7f7;
64
- cursor: pointer;
65
- font-size: 14px;
66
- line-height: 1;
67
- }
68
-
69
- #ranger-profile-setup-banner .ranger-banner__close:hover {
70
- background: rgba(255, 255, 255, 0.18);
71
- }
72
-
73
- #ranger-profile-setup-banner .ranger-banner__close:focus {
74
- outline: 2px solid #ffffff;
75
- outline-offset: 2px;
76
- }
77
-
78
- @media (max-width: 640px) {
79
- #ranger-profile-setup-banner {
80
- align-items: flex-start;
81
- }
82
-
83
- #ranger-profile-setup-banner .ranger-banner__close {
84
- margin-top: 2px;
85
- }
86
- }
87
- `;
88
- return `
89
- (() => {
90
- const bannerId = 'ranger-profile-setup-banner';
91
- const styleId = 'ranger-profile-setup-banner-style';
92
- const dismissedKey = 'rangerProfileBannerDismissed';
93
-
94
- const getStorage = () => {
95
- try {
96
- return window.sessionStorage;
97
- } catch {
98
- return null;
99
- }
100
- };
101
-
102
- const storage = getStorage();
103
- if (storage && storage.getItem(dismissedKey) === '1') {
104
- return;
105
- }
106
-
107
- const inject = () => {
108
- if (document.getElementById(bannerId)) return;
109
-
110
- const banner = document.createElement('div');
111
- banner.id = bannerId;
112
- banner.setAttribute('role', 'region');
113
- banner.setAttribute('aria-label', 'Ranger profile setup');
114
- banner.innerHTML = ${JSON.stringify(bannerHtml)};
115
-
116
- const style = document.createElement('style');
117
- style.id = styleId;
118
- style.textContent = ${JSON.stringify(bannerStyles)};
119
-
120
- const head = document.head || document.getElementsByTagName('head')[0];
121
- if (head) {
122
- head.appendChild(style);
123
- }
124
- document.body.appendChild(banner);
125
-
126
- const previousPaddingTop = document.body.style.paddingTop;
127
- const updateOffset = () => {
128
- const height = banner.getBoundingClientRect().height;
129
- document.body.style.paddingTop = height + 'px';
130
- };
131
-
132
- updateOffset();
133
- window.addEventListener('resize', updateOffset);
134
-
135
- const closeButton = banner.querySelector('.ranger-banner__close');
136
- if (closeButton) {
137
- closeButton.addEventListener('click', () => {
138
- window.removeEventListener('resize', updateOffset);
139
- banner.remove();
140
- if (style.parentNode) {
141
- style.parentNode.removeChild(style);
142
- }
143
- document.body.style.paddingTop = previousPaddingTop;
144
- if (storage) {
145
- try {
146
- storage.setItem(dismissedKey, '1');
147
- } catch {}
148
- }
149
- });
150
- }
151
- };
152
-
153
- if (document.readyState === 'loading') {
154
- document.addEventListener('DOMContentLoaded', inject);
155
- } else {
156
- inject();
157
- }
158
- })();
159
- `;
160
- })();
161
- export function getProfileSetupBannerScript() {
162
- return PROFILE_SETUP_BANNER_SCRIPT;
163
- }
164
- export async function addProfileSetupBanner(context) {
165
- await context.addInitScript({ content: PROFILE_SETUP_BANNER_SCRIPT });
166
- }
167
- //# sourceMappingURL=profileSetupBanner.js.map
1
+ function _0x1871(){const _0x282928=['628HUEMay','<span\x20class=\x22ranger-banner__text\x22>navigate\x20to\x20your\x20locally\x20running\x20app\x20and\x20log\x20in.\x20Close\x20the\x20browser\x20window\x20when\x20you\x20are\x20done.</span>','110278dnZuOp','stringify','475510CCafmN','737844FFWoOL','144nDIFQD','462KnXBou','\x0a(()\x20=>\x20{\x0a\x20\x20const\x20bannerId\x20=\x20\x27ranger-profile-setup-banner\x27;\x0a\x20\x20const\x20styleId\x20=\x20\x27ranger-profile-setup-banner-style\x27;\x0a\x20\x20const\x20dismissedKey\x20=\x20\x27rangerProfileBannerDismissed\x27;\x0a\x0a\x20\x20const\x20getStorage\x20=\x20()\x20=>\x20{\x0a\x20\x20\x20\x20try\x20{\x0a\x20\x20\x20\x20\x20\x20return\x20window.sessionStorage;\x0a\x20\x20\x20\x20}\x20catch\x20{\x0a\x20\x20\x20\x20\x20\x20return\x20null;\x0a\x20\x20\x20\x20}\x0a\x20\x20};\x0a\x0a\x20\x20const\x20storage\x20=\x20getStorage();\x0a\x20\x20if\x20(storage\x20&&\x20storage.getItem(dismissedKey)\x20===\x20\x271\x27)\x20{\x0a\x20\x20\x20\x20return;\x0a\x20\x20}\x0a\x0a\x20\x20const\x20inject\x20=\x20()\x20=>\x20{\x0a\x20\x20\x20\x20if\x20(document.getElementById(bannerId))\x20return;\x0a\x0a\x20\x20\x20\x20const\x20banner\x20=\x20document.createElement(\x27div\x27);\x0a\x20\x20\x20\x20banner.id\x20=\x20bannerId;\x0a\x20\x20\x20\x20banner.setAttribute(\x27role\x27,\x20\x27region\x27);\x0a\x20\x20\x20\x20banner.setAttribute(\x27aria-label\x27,\x20\x27Ranger\x20profile\x20setup\x27);\x0a\x20\x20\x20\x20banner.innerHTML\x20=\x20','8012175kUHKXe','3BjVwhD','BbIke','addInitScript','8890296MHqxpQ','12688956TuHSpd','ZGTlk','BwNtM',';\x0a\x0a\x20\x20\x20\x20const\x20head\x20=\x20document.head\x20||\x20document.getElementsByTagName(\x27head\x27)[0];\x0a\x20\x20\x20\x20if\x20(head)\x20{\x0a\x20\x20\x20\x20\x20\x20head.appendChild(style);\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20document.body.appendChild(banner);\x0a\x0a\x20\x20\x20\x20const\x20previousPaddingTop\x20=\x20document.body.style.paddingTop;\x0a\x20\x20\x20\x20const\x20updateOffset\x20=\x20()\x20=>\x20{\x0a\x20\x20\x20\x20\x20\x20const\x20height\x20=\x20banner.getBoundingClientRect().height;\x0a\x20\x20\x20\x20\x20\x20document.body.style.paddingTop\x20=\x20height\x20+\x20\x27px\x27;\x0a\x20\x20\x20\x20};\x0a\x0a\x20\x20\x20\x20updateOffset();\x0a\x20\x20\x20\x20window.addEventListener(\x27resize\x27,\x20updateOffset);\x0a\x0a\x20\x20\x20\x20const\x20closeButton\x20=\x20banner.querySelector(\x27.ranger-banner__close\x27);\x0a\x20\x20\x20\x20if\x20(closeButton)\x20{\x0a\x20\x20\x20\x20\x20\x20closeButton.addEventListener(\x27click\x27,\x20()\x20=>\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20window.removeEventListener(\x27resize\x27,\x20updateOffset);\x0a\x20\x20\x20\x20\x20\x20\x20\x20banner.remove();\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(style.parentNode)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20style.parentNode.removeChild(style);\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20document.body.style.paddingTop\x20=\x20previousPaddingTop;\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(storage)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20storage.setItem(dismissedKey,\x20\x271\x27);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x20catch\x20{}\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20});\x0a\x20\x20\x20\x20}\x0a\x20\x20};\x0a\x0a\x20\x20if\x20(document.readyState\x20===\x20\x27loading\x27)\x20{\x0a\x20\x20\x20\x20document.addEventListener(\x27DOMContentLoaded\x27,\x20inject);\x0a\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20inject();\x0a\x20\x20}\x0a})();\x0a','GMOjJ','</div>','124SvTugB','Iofpg'];_0x1871=function(){return _0x282928;};return _0x1871();}function _0x2950(_0x3bdeba,_0x40a9bc){_0x3bdeba=_0x3bdeba-0x15f;const _0x18716a=_0x1871();let _0x295033=_0x18716a[_0x3bdeba];return _0x295033;}(function(_0x175b1b,_0x4e6c6a){const _0x46af23=_0x2950,_0x4ade4a=_0x175b1b();while(!![]){try{const _0x492f9f=-parseInt(_0x46af23(0x167))/0x1*(-parseInt(_0x46af23(0x165))/0x2)+-parseInt(_0x46af23(0x171))/0x3*(parseInt(_0x46af23(0x16c))/0x4)+-parseInt(_0x46af23(0x170))/0x5+parseInt(_0x46af23(0x16d))/0x6*(parseInt(_0x46af23(0x169))/0x7)+-parseInt(_0x46af23(0x174))/0x8+parseInt(_0x46af23(0x15f))/0x9+-parseInt(_0x46af23(0x16b))/0xa*(-parseInt(_0x46af23(0x16e))/0xb);if(_0x492f9f===_0x4e6c6a)break;else _0x4ade4a['push'](_0x4ade4a['shift']());}catch(_0x3bbf64){_0x4ade4a['push'](_0x4ade4a['shift']());}}}(_0x1871,0xe20b3));const PROFILE_SETUP_BANNER_SCRIPT=((()=>{const _0x1f540c=_0x2950,_0x114f55={'pQTlU':function(_0x4bbf38,_0x227077){return _0x4bbf38+_0x227077;},'ZGTlk':function(_0x43deb6,_0x48b348){return _0x43deb6+_0x48b348;},'Iofpg':'<div\x20class=\x22ranger-banner__content\x22>','BwNtM':'<div\x20class=\x22ranger-banner__message\x22>','GMOjJ':'<span\x20class=\x22ranger-banner__title\x22>Profile\x20setup:</span>','BbIke':_0x1f540c(0x164),'DXsEZ':'<button\x20class=\x22ranger-banner__close\x22\x20type=\x22button\x22\x20aria-label=\x22Dismiss\x20banner\x22>X</button>'},_0x52f456=_0x114f55['pQTlU'](_0x114f55[_0x1f540c(0x160)](_0x114f55[_0x1f540c(0x166)]+'<div\x20class=\x22ranger-banner__heading\x22>Ranger\x20Feature\x20Review</div>',_0x114f55[_0x1f540c(0x161)])+_0x114f55[_0x1f540c(0x163)]+_0x1f540c(0x168),_0x114f55[_0x1f540c(0x172)])+_0x114f55['BbIke']+_0x114f55['DXsEZ'],_0x1d4f99='\x0a#ranger-profile-setup-banner\x20{\x0a\x20\x20position:\x20fixed;\x0a\x20\x20top:\x200;\x0a\x20\x20left:\x200;\x0a\x20\x20right:\x200;\x0a\x20\x20z-index:\x202147483647;\x0a\x20\x20display:\x20flex;\x0a\x20\x20align-items:\x20center;\x0a\x20\x20justify-content:\x20space-between;\x0a\x20\x20gap:\x2012px;\x0a\x20\x20padding:\x2010px\x2016px;\x0a\x20\x20background:\x20#EE9322;\x0a\x20\x20color:\x20#f9f6f6;\x0a\x20\x20font-family:\x20\x22Space\x20Grotesk\x22,\x20ui-sans-serif,\x20system-ui,\x20-apple-system,\x20\x22Segoe\x20UI\x22,\x20sans-serif;\x0a\x20\x20font-size:\x2014px;\x0a\x20\x20line-height:\x201.4;\x0a\x20\x20border-bottom:\x201px\x20solid\x20rgba(255,\x20255,\x20255,\x200.25);\x0a\x20\x20box-shadow:\x200\x202px\x206px\x20rgba(32,\x208,\x209,\x200.2);\x0a}\x0a\x0a#ranger-profile-setup-banner\x20.ranger-banner__content\x20{\x0a\x20\x20display:\x20flex;\x0a\x20\x20flex-direction:\x20column;\x0a\x20\x20align-items:\x20flex-start;\x0a\x20\x20gap:\x204px;\x0a}\x0a\x0a#ranger-profile-setup-banner\x20.ranger-banner__heading\x20{\x0a\x20\x20font-weight:\x20700;\x0a\x20\x20letter-spacing:\x200.02em;\x0a}\x0a\x0a#ranger-profile-setup-banner\x20.ranger-banner__message\x20{\x0a\x20\x20display:\x20flex;\x0a\x20\x20flex-wrap:\x20wrap;\x0a\x20\x20align-items:\x20center;\x0a\x20\x20gap:\x206px;\x0a}\x0a\x0a#ranger-profile-setup-banner\x20.ranger-banner__title\x20{\x0a\x20\x20font-weight:\x20600;\x0a}\x0a\x0a#ranger-profile-setup-banner\x20.ranger-banner__close\x20{\x0a\x20\x20display:\x20inline-flex;\x0a\x20\x20align-items:\x20center;\x0a\x20\x20justify-content:\x20center;\x0a\x20\x20width:\x2028px;\x0a\x20\x20height:\x2028px;\x0a\x20\x20border-radius:\x206px;\x0a\x20\x20border:\x201px\x20solid\x20rgba(255,\x20255,\x20255,\x200.45);\x0a\x20\x20background:\x20transparent;\x0a\x20\x20color:\x20#fdf7f7;\x0a\x20\x20cursor:\x20pointer;\x0a\x20\x20font-size:\x2014px;\x0a\x20\x20line-height:\x201;\x0a}\x0a\x0a#ranger-profile-setup-banner\x20.ranger-banner__close:hover\x20{\x0a\x20\x20background:\x20rgba(255,\x20255,\x20255,\x200.18);\x0a}\x0a\x0a#ranger-profile-setup-banner\x20.ranger-banner__close:focus\x20{\x0a\x20\x20outline:\x202px\x20solid\x20#ffffff;\x0a\x20\x20outline-offset:\x202px;\x0a}\x0a\x0a@media\x20(max-width:\x20640px)\x20{\x0a\x20\x20#ranger-profile-setup-banner\x20{\x0a\x20\x20\x20\x20align-items:\x20flex-start;\x0a\x20\x20}\x0a\x0a\x20\x20#ranger-profile-setup-banner\x20.ranger-banner__close\x20{\x0a\x20\x20\x20\x20margin-top:\x202px;\x0a\x20\x20}\x0a}\x0a';return _0x1f540c(0x16f)+JSON['stringify'](_0x52f456)+';\x0a\x0a\x20\x20\x20\x20const\x20style\x20=\x20document.createElement(\x27style\x27);\x0a\x20\x20\x20\x20style.id\x20=\x20styleId;\x0a\x20\x20\x20\x20style.textContent\x20=\x20'+JSON[_0x1f540c(0x16a)](_0x1d4f99)+_0x1f540c(0x162);})());export function getProfileSetupBannerScript(){return PROFILE_SETUP_BANNER_SCRIPT;}export async function addProfileSetupBanner(_0x4fa5d3){const _0x2bfdaf=_0x2950;await _0x4fa5d3[_0x2bfdaf(0x173)]({'content':PROFILE_SETUP_BANNER_SCRIPT});}
@@ -1,60 +1 @@
1
- import { dirname, join, parse } from 'path';
2
- import { existsSync } from 'fs';
3
- import { homedir } from 'os';
4
- /**
5
- * Find the ranger root by walking up from cwd until we find a .ranger directory.
6
- * The closest .ranger directory wins (allows subdirectory overrides).
7
- * If no .ranger is found, falls back to cwd.
8
- */
9
- export function getRangerRoot() {
10
- let current = process.cwd();
11
- const root = parse(current).root;
12
- while (current !== root) {
13
- if (existsSync(join(current, '.ranger'))) {
14
- return current;
15
- }
16
- current = dirname(current);
17
- }
18
- // Check filesystem root as well
19
- if (existsSync(join(root, '.ranger'))) {
20
- return root;
21
- }
22
- // No .ranger found, fall back to git root if available
23
- const gitRoot = findGitRoot();
24
- if (gitRoot) {
25
- return gitRoot;
26
- }
27
- // No .ranger or git root found, fall back to cwd
28
- return process.cwd();
29
- }
30
- /**
31
- * Get the project-level .ranger directory path
32
- */
33
- export function getRangerDir() {
34
- return join(getRangerRoot(), '.ranger');
35
- }
36
- /**
37
- * Walk up from cwd to find the nearest .git directory.
38
- * Returns the directory containing .git, or null if not found.
39
- */
40
- export function findGitRoot() {
41
- let current = process.cwd();
42
- const root = parse(current).root;
43
- while (current !== root) {
44
- if (existsSync(join(current, '.git'))) {
45
- return current;
46
- }
47
- current = dirname(current);
48
- }
49
- if (existsSync(join(root, '.git'))) {
50
- return root;
51
- }
52
- return null;
53
- }
54
- /**
55
- * Get the user-level ~/.ranger directory path
56
- */
57
- export function getRangerHomeDir() {
58
- return join(homedir(), '.ranger');
59
- }
60
- //# sourceMappingURL=rangerRoot.js.map
1
+ (function(_0x531081,_0x44fb3d){const _0x5382ff=_0x116a,_0x443012=_0x531081();while(!![]){try{const _0x343190=parseInt(_0x5382ff(0x110))/0x1+parseInt(_0x5382ff(0x118))/0x2*(-parseInt(_0x5382ff(0x10e))/0x3)+-parseInt(_0x5382ff(0x10f))/0x4+parseInt(_0x5382ff(0x11c))/0x5*(parseInt(_0x5382ff(0x119))/0x6)+parseInt(_0x5382ff(0x11e))/0x7*(parseInt(_0x5382ff(0x114))/0x8)+parseInt(_0x5382ff(0x11b))/0x9*(-parseInt(_0x5382ff(0x11f))/0xa)+parseInt(_0x5382ff(0x115))/0xb;if(_0x343190===_0x44fb3d)break;else _0x443012['push'](_0x443012['shift']());}catch(_0x4eb024){_0x443012['push'](_0x443012['shift']());}}}(_0x5732,0xab401));import{dirname,join,parse}from'path';function _0x5732(){const _0x583755=['.ranger','YDNcL','YqRBJ','450qFNkso','2453616zYuCiQ','670667srKjUb','EYbqx','root','LUHiu','89584nKCNbr','11962016WUQGSt','cwd','.git','3672FVQrHe','1162992mDrHGW','ocRrT','11411532Ocdrkp','20yMCbSA','HSkHs','203BBHtUf','10ZmzoBN'];_0x5732=function(){return _0x583755;};return _0x5732();}import{existsSync}from'fs';import{homedir}from'os';export function getRangerRoot(){const _0x4e79b4=_0x116a,_0x31508b={'oVWEs':function(_0x545cfa,_0x9e74ff){return _0x545cfa(_0x9e74ff);},'HSkHs':'.ranger','dSILS':function(_0x3d0daf,_0x548b1b){return _0x3d0daf(_0x548b1b);},'KtKPi':function(_0x42b215,_0x278520,_0x4f3a41){return _0x42b215(_0x278520,_0x4f3a41);},'LUHiu':function(_0x46851f){return _0x46851f();}};let _0x10cc92=process['cwd']();const _0x10806a=parse(_0x10cc92)[_0x4e79b4(0x112)];while(_0x10cc92!==_0x10806a){if(_0x31508b['oVWEs'](existsSync,join(_0x10cc92,_0x31508b[_0x4e79b4(0x11d)])))return _0x10cc92;_0x10cc92=_0x31508b['dSILS'](dirname,_0x10cc92);}if(existsSync(_0x31508b['KtKPi'](join,_0x10806a,_0x31508b[_0x4e79b4(0x11d)])))return _0x10806a;const _0x1baae1=_0x31508b[_0x4e79b4(0x113)](findGitRoot);if(_0x1baae1)return _0x1baae1;return process[_0x4e79b4(0x116)]();}export function getRangerDir(){const _0x22f87a=_0x116a,_0x5c50f1={'YqRBJ':'.ranger'};return join(getRangerRoot(),_0x5c50f1[_0x22f87a(0x10d)]);}function _0x116a(_0x4f533f,_0x151250){_0x4f533f=_0x4f533f-0x10c;const _0x57322e=_0x5732();let _0x116a28=_0x57322e[_0x4f533f];return _0x116a28;}export function findGitRoot(){const _0x43822c=_0x116a,_0x52db2e={'ocRrT':function(_0x5c98fc,_0x3e16d0){return _0x5c98fc!==_0x3e16d0;},'YDNcL':function(_0x34b2dd,_0x57ae85){return _0x34b2dd(_0x57ae85);},'RjlKb':function(_0x54c0ee,_0x3316d7){return _0x54c0ee(_0x3316d7);},'oWJJC':function(_0x14b324,_0x9a6883){return _0x14b324(_0x9a6883);},'EYbqx':'.git'};let _0x1b1583=process[_0x43822c(0x116)]();const _0x2d3219=parse(_0x1b1583)[_0x43822c(0x112)];while(_0x52db2e[_0x43822c(0x11a)](_0x1b1583,_0x2d3219)){if(_0x52db2e[_0x43822c(0x10c)](existsSync,join(_0x1b1583,_0x43822c(0x117))))return _0x1b1583;_0x1b1583=_0x52db2e['RjlKb'](dirname,_0x1b1583);}if(_0x52db2e['oWJJC'](existsSync,join(_0x2d3219,_0x52db2e[_0x43822c(0x111)])))return _0x2d3219;return null;}export function getRangerHomeDir(){const _0x480c51=_0x116a,_0x479a0b={'QZfAx':function(_0x543a2b){return _0x543a2b();},'nPOjn':_0x480c51(0x120)};return join(_0x479a0b['QZfAx'](homedir),_0x479a0b['nPOjn']);}
@@ -1,130 +1 @@
1
- import { readdir } from 'fs/promises';
2
- import { join } from 'path';
3
- import { existsSync } from 'fs';
4
- /**
5
- * Collect screenshots from session directory
6
- */
7
- export async function collectScreenshots(sessionDir) {
8
- const screenshots = [];
9
- const paths = [];
10
- if (!existsSync(sessionDir)) {
11
- return { screenshots, paths };
12
- }
13
- const files = await readdir(sessionDir);
14
- const imageFiles = files
15
- .filter((f) => /\.(png|jpg|jpeg|gif|webp)$/i.test(f))
16
- .sort(); // Sort to maintain order
17
- for (const filename of imageFiles) {
18
- const fullPath = join(sessionDir, filename);
19
- screenshots.push({
20
- filename,
21
- path: fullPath,
22
- relativePath: `./${filename}`, // Relative to report.md in same dir
23
- });
24
- paths.push(fullPath);
25
- }
26
- return { screenshots, paths };
27
- }
28
- /**
29
- * Get emoji for severity level
30
- */
31
- function getSeverityEmoji(severity) {
32
- switch (severity) {
33
- case 'BLOCKER':
34
- return '🔴';
35
- case 'MAJOR':
36
- return '🟠';
37
- default:
38
- return '⚪';
39
- }
40
- }
41
- /**
42
- * Format screenshot filename into a readable caption
43
- * e.g., "03-after-login.png" -> "After Login"
44
- */
45
- function formatScreenshotCaption(filename) {
46
- const nameWithoutExt = filename.replace(/\.(png|jpg|jpeg|gif|webp)$/i, '');
47
- const nameWithoutNumber = nameWithoutExt.replace(/^\d+-/, '');
48
- return nameWithoutNumber
49
- .split('-')
50
- .map((word) => word.charAt(0).toUpperCase() + word.slice(1))
51
- .join(' ');
52
- }
53
- /**
54
- * Generate a markdown verification report and return it as a string
55
- */
56
- export function generateMarkdownReport(params) {
57
- const { sessionId, task, url, success, summary, issues, screenshots, durationMs, traceViewerUrl, } = params;
58
- const timestamp = new Date().toISOString();
59
- const durationSec = (durationMs / 1000).toFixed(1);
60
- const lines = [];
61
- // Header
62
- lines.push(`# Verification Report`);
63
- lines.push('');
64
- lines.push(`**Session:** \`${sessionId}\``);
65
- lines.push(`**Generated:** ${timestamp}`);
66
- lines.push(`**Duration:** ${durationSec}s`);
67
- lines.push('');
68
- // Task & URL
69
- lines.push(`## Task`);
70
- lines.push('');
71
- lines.push(`**URL:** ${url}`);
72
- lines.push('');
73
- lines.push(`> ${task}`);
74
- lines.push('');
75
- // Result Summary
76
- lines.push(`## Result`);
77
- lines.push('');
78
- const statusEmoji = success ? '✅' : '❌';
79
- lines.push(`**Status:** ${statusEmoji} ${success ? 'PASSED' : 'ISSUES FOUND'}`);
80
- lines.push('');
81
- lines.push(`### Summary`);
82
- lines.push('');
83
- lines.push(summary);
84
- lines.push('');
85
- // Issues
86
- if (issues && issues.length > 0) {
87
- lines.push(`### Issues Found (${issues.length})`);
88
- lines.push('');
89
- for (const issue of issues) {
90
- const severityEmoji = getSeverityEmoji(issue.severity);
91
- lines.push(`#### ${severityEmoji} [${issue.severity}] Issue`);
92
- lines.push('');
93
- lines.push(issue.description);
94
- lines.push('');
95
- // Link to screenshot if referenced
96
- if (issue.screenshot) {
97
- const screenshotName = issue.screenshot;
98
- const screenshotInfo = screenshots.find((s) => s.filename === screenshotName ||
99
- s.filename.includes(screenshotName));
100
- if (screenshotInfo) {
101
- lines.push(`**Screenshot:**`);
102
- lines.push('');
103
- lines.push(`![${screenshotName}](${screenshotInfo.relativePath})`);
104
- lines.push('');
105
- }
106
- }
107
- }
108
- }
109
- // Screenshots Gallery
110
- if (screenshots.length > 0) {
111
- lines.push(`## Screenshots (${screenshots.length})`);
112
- lines.push('');
113
- for (const screenshot of screenshots) {
114
- const caption = formatScreenshotCaption(screenshot.filename);
115
- lines.push(`### ${caption}`);
116
- lines.push('');
117
- lines.push(`![${screenshot.filename}](${screenshot.relativePath})`);
118
- lines.push('');
119
- }
120
- }
121
- // Footer with trace viewer link
122
- if (traceViewerUrl) {
123
- lines.push(`---`);
124
- lines.push('');
125
- lines.push(`**Full Trace:** [View in Playwright Trace Viewer](${traceViewerUrl})`);
126
- lines.push('');
127
- }
128
- return lines.join('\n');
129
- }
130
- //# sourceMappingURL=reportGenerator.js.map
1
+ function _0x1258(){const _0x531679=['TDVFI','####\x20','replace','severity','toFixed','CskkJ','4307040qJrXnC','3087ZuFqOA','map','1685948XeZfsT','slice','**Full\x20Trace:**\x20[View\x20in\x20Playwright\x20Trace\x20Viewer](','###\x20','6009414XHHxXe','PASSED','47392zYrSXH','79788IUdZXZ','push','ISSUES\x20FOUND','relativePath','find','**Generated:**\x20','BLOCKER','length','209209itSqAs','join','yZVFJ','filename','##\x20Result','#\x20Verification\x20Report','193623pRMWCI','###\x20Issues\x20Found\x20(','17SCAORs','toISOString','screenshot','###\x20Summary'];_0x1258=function(){return _0x531679;};return _0x1258();}(function(_0x2fc1d9,_0x4db543){const _0x7fc6e0=_0xa2fa,_0x1681d6=_0x2fc1d9();while(!![]){try{const _0x9af0ee=-parseInt(_0x7fc6e0(0x11d))/0x1*(-parseInt(_0x7fc6e0(0x10d))/0x2)+parseInt(_0x7fc6e0(0x11b))/0x3+-parseInt(_0x7fc6e0(0x12a))/0x4+-parseInt(_0x7fc6e0(0x127))/0x5+-parseInt(_0x7fc6e0(0x12e))/0x6+parseInt(_0x7fc6e0(0x115))/0x7+parseInt(_0x7fc6e0(0x130))/0x8*(parseInt(_0x7fc6e0(0x128))/0x9);if(_0x9af0ee===_0x4db543)break;else _0x1681d6['push'](_0x1681d6['shift']());}catch(_0x44102a){_0x1681d6['push'](_0x1681d6['shift']());}}}(_0x1258,0x7ef9e));import{readdir}from'fs/promises';import{join}from'path';function _0xa2fa(_0x728284,_0x66e292){_0x728284=_0x728284-0x10d;const _0x12583f=_0x1258();let _0xa2fa05=_0x12583f[_0x728284];return _0xa2fa05;}import{existsSync}from'fs';export async function collectScreenshots(_0x33af1e){const _0x579e1e=_0xa2fa,_0x3cc7e7={'CskkJ':function(_0xbf0701,_0xe22061){return _0xbf0701(_0xe22061);},'pgpfS':function(_0x416764,_0x1c6b1d){return _0x416764(_0x1c6b1d);}},_0xf4e229=[],_0x244b33=[];if(!_0x3cc7e7[_0x579e1e(0x126)](existsSync,_0x33af1e))return{'screenshots':_0xf4e229,'paths':_0x244b33};const _0x22baac=await _0x3cc7e7['pgpfS'](readdir,_0x33af1e),_0x4d03a6=_0x22baac['filter'](_0x316b4d=>/\.(png|jpg|jpeg|gif|webp)$/i['test'](_0x316b4d))['sort']();for(const _0x53a924 of _0x4d03a6){const _0x2acc89=join(_0x33af1e,_0x53a924);_0xf4e229['push']({'filename':_0x53a924,'path':_0x2acc89,'relativePath':'./'+_0x53a924}),_0x244b33['push'](_0x2acc89);}return{'screenshots':_0xf4e229,'paths':_0x244b33};}function getSeverityEmoji(_0x21f1c1){const _0x203335=_0xa2fa,_0x4b52fe={'sktee':'MAJOR'};switch(_0x21f1c1){case _0x203335(0x113):return'🔴';case _0x4b52fe['sktee']:return'🟠';default:return'⚪';}}function formatScreenshotCaption(_0x1ee33b){const _0x389ad3=_0xa2fa,_0x242f93=_0x1ee33b[_0x389ad3(0x123)](/\.(png|jpg|jpeg|gif|webp)$/i,''),_0x5736f8=_0x242f93['replace'](/^\d+-/,'');return _0x5736f8['split']('-')[_0x389ad3(0x129)](_0x27c7c9=>_0x27c7c9['charAt'](0x0)['toUpperCase']()+_0x27c7c9[_0x389ad3(0x12b)](0x1))['join']('\x20');}export function generateMarkdownReport(_0x345143){const _0x18cd51=_0xa2fa,_0x3c7514={'TDVFI':_0x18cd51(0x10f),'yZVFJ':function(_0x4dbf1f,_0x3956e1){return _0x4dbf1f>_0x3956e1;},'SRvJB':function(_0x39a0c4,_0x52cce3){return _0x39a0c4(_0x52cce3);}},{sessionId:_0x2b246e,task:_0x1a2509,url:_0x253a76,success:_0x492b0d,summary:_0x9fc5c5,issues:_0x16f1a9,screenshots:_0x3a6e76,durationMs:_0x5127b6,traceViewerUrl:_0x4ce4b3}=_0x345143,_0x42c131=new Date()[_0x18cd51(0x11e)](),_0x1ff719=(_0x5127b6/0x3e8)[_0x18cd51(0x125)](0x1),_0x2e32c9=[];_0x2e32c9[_0x18cd51(0x10e)](_0x18cd51(0x11a)),_0x2e32c9[_0x18cd51(0x10e)](''),_0x2e32c9['push']('**Session:**\x20`'+_0x2b246e+'`'),_0x2e32c9[_0x18cd51(0x10e)](_0x18cd51(0x112)+_0x42c131),_0x2e32c9['push']('**Duration:**\x20'+_0x1ff719+'s'),_0x2e32c9[_0x18cd51(0x10e)](''),_0x2e32c9['push']('##\x20Task'),_0x2e32c9['push'](''),_0x2e32c9['push']('**URL:**\x20'+_0x253a76),_0x2e32c9[_0x18cd51(0x10e)](''),_0x2e32c9['push']('>\x20'+_0x1a2509),_0x2e32c9['push'](''),_0x2e32c9[_0x18cd51(0x10e)](_0x18cd51(0x119)),_0x2e32c9[_0x18cd51(0x10e)]('');const _0x51102b=_0x492b0d?'✅':'❌';_0x2e32c9[_0x18cd51(0x10e)]('**Status:**\x20'+_0x51102b+'\x20'+(_0x492b0d?_0x18cd51(0x12f):_0x3c7514[_0x18cd51(0x121)])),_0x2e32c9['push'](''),_0x2e32c9['push'](_0x18cd51(0x120)),_0x2e32c9[_0x18cd51(0x10e)](''),_0x2e32c9['push'](_0x9fc5c5),_0x2e32c9[_0x18cd51(0x10e)]('');if(_0x16f1a9&&_0x3c7514[_0x18cd51(0x117)](_0x16f1a9[_0x18cd51(0x114)],0x0)){_0x2e32c9[_0x18cd51(0x10e)](_0x18cd51(0x11c)+_0x16f1a9[_0x18cd51(0x114)]+')'),_0x2e32c9[_0x18cd51(0x10e)]('');for(const _0x23819b of _0x16f1a9){const _0x528823=_0x3c7514['SRvJB'](getSeverityEmoji,_0x23819b['severity']);_0x2e32c9['push'](_0x18cd51(0x122)+_0x528823+'\x20['+_0x23819b[_0x18cd51(0x124)]+']\x20Issue'),_0x2e32c9[_0x18cd51(0x10e)](''),_0x2e32c9[_0x18cd51(0x10e)](_0x23819b['description']),_0x2e32c9[_0x18cd51(0x10e)]('');if(_0x23819b[_0x18cd51(0x11f)]){const _0x4f9e44=_0x23819b['screenshot'],_0x4cc6ff=_0x3a6e76[_0x18cd51(0x111)](_0x571088=>_0x571088[_0x18cd51(0x118)]===_0x4f9e44||_0x571088[_0x18cd51(0x118)]['includes'](_0x4f9e44));_0x4cc6ff&&(_0x2e32c9[_0x18cd51(0x10e)]('**Screenshot:**'),_0x2e32c9['push'](''),_0x2e32c9['push']('!['+_0x4f9e44+']('+_0x4cc6ff[_0x18cd51(0x110)]+')'),_0x2e32c9[_0x18cd51(0x10e)](''));}}}if(_0x3a6e76['length']>0x0){_0x2e32c9['push']('##\x20Screenshots\x20('+_0x3a6e76['length']+')'),_0x2e32c9[_0x18cd51(0x10e)]('');for(const _0x216e12 of _0x3a6e76){const _0x4b9a61=formatScreenshotCaption(_0x216e12[_0x18cd51(0x118)]);_0x2e32c9[_0x18cd51(0x10e)](_0x18cd51(0x12d)+_0x4b9a61),_0x2e32c9[_0x18cd51(0x10e)](''),_0x2e32c9['push']('!['+_0x216e12['filename']+']('+_0x216e12['relativePath']+')'),_0x2e32c9['push']('');}}return _0x4ce4b3&&(_0x2e32c9['push']('---'),_0x2e32c9[_0x18cd51(0x10e)](''),_0x2e32c9[_0x18cd51(0x10e)](_0x18cd51(0x12c)+_0x4ce4b3+')'),_0x2e32c9['push']('')),_0x2e32c9[_0x18cd51(0x116)]('\x0a');}
@@ -1,25 +1 @@
1
- const DEFAULT_MAX_RETRIES = 3;
2
- const DEFAULT_BASE_DELAY_MS = 500;
3
- export async function withRetry(fn, options) {
4
- const maxRetries = options?.maxRetries ?? DEFAULT_MAX_RETRIES;
5
- const baseDelay = options?.baseDelayMs ?? DEFAULT_BASE_DELAY_MS;
6
- let lastError;
7
- for (let attempt = 0; attempt <= maxRetries; attempt++) {
8
- try {
9
- return await fn();
10
- }
11
- catch (error) {
12
- lastError =
13
- error instanceof Error ? error : new Error(String(error));
14
- if (attempt < maxRetries) {
15
- const delay = baseDelay * Math.pow(2, attempt);
16
- if (options?.label) {
17
- console.error(`${options.label} failed (attempt ${attempt + 1}/${maxRetries + 1}), retrying in ${delay}ms...`);
18
- }
19
- await new Promise((resolve) => setTimeout(resolve, delay));
20
- }
21
- }
22
- }
23
- throw lastError;
24
- }
25
- //# sourceMappingURL=retry.js.map
1
+ (function(_0x57f472,_0x323053){const _0x42045f=_0x2338,_0x4211c6=_0x57f472();while(!![]){try{const _0x2b66e4=parseInt(_0x42045f(0xda))/0x1+parseInt(_0x42045f(0xdf))/0x2+-parseInt(_0x42045f(0xe4))/0x3+parseInt(_0x42045f(0xd9))/0x4+-parseInt(_0x42045f(0xe6))/0x5+parseInt(_0x42045f(0xdc))/0x6*(parseInt(_0x42045f(0xe0))/0x7)+parseInt(_0x42045f(0xdb))/0x8;if(_0x2b66e4===_0x323053)break;else _0x4211c6['push'](_0x4211c6['shift']());}catch(_0x54e738){_0x4211c6['push'](_0x4211c6['shift']());}}}(_0x4fbc,0x3f904));const DEFAULT_MAX_RETRIES=0x3,DEFAULT_BASE_DELAY_MS=0x1f4;function _0x2338(_0x451c25,_0x208705){_0x451c25=_0x451c25-0xd9;const _0x4fbc8b=_0x4fbc();let _0x233891=_0x4fbc8b[_0x451c25];return _0x233891;}function _0x4fbc(){const _0x4b7377=['label','1732080BjlnRW','624156eqFWVK','113437KnYUbp','4119584QzkFaD','428118yuRqep','SvGxh','fusUV','512980iFuRGo','7vtXiZn','rgBgW','maxRetries','error','1516485OzfDac'];_0x4fbc=function(){return _0x4b7377;};return _0x4fbc();}export async function withRetry(_0x4d924d,_0x48802d){const _0x46c77a=_0x2338,_0x5f52cc={'MjGnx':function(_0x893bdd,_0x47a2c4){return _0x893bdd<=_0x47a2c4;},'rgBgW':function(_0x18287f){return _0x18287f();},'fusUV':function(_0x595cbf,_0x4d7862){return _0x595cbf(_0x4d7862);},'SvGxh':function(_0x4027ab,_0x5c1672){return _0x4027ab+_0x5c1672;}},_0x479793=_0x48802d?.[_0x46c77a(0xe2)]??DEFAULT_MAX_RETRIES,_0x4804cf=_0x48802d?.['baseDelayMs']??DEFAULT_BASE_DELAY_MS;let _0x4682fb;for(let _0x152d91=0x0;_0x5f52cc['MjGnx'](_0x152d91,_0x479793);_0x152d91++){try{return await _0x5f52cc[_0x46c77a(0xe1)](_0x4d924d);}catch(_0x32e74c){_0x4682fb=_0x32e74c instanceof Error?_0x32e74c:new Error(_0x5f52cc[_0x46c77a(0xde)](String,_0x32e74c));if(_0x152d91<_0x479793){const _0x19294f=_0x4804cf*Math['pow'](0x2,_0x152d91);_0x48802d?.[_0x46c77a(0xe5)]&&console[_0x46c77a(0xe3)](_0x48802d['label']+'\x20failed\x20(attempt\x20'+_0x5f52cc[_0x46c77a(0xdd)](_0x152d91,0x1)+'/'+(_0x479793+0x1)+'),\x20retrying\x20in\x20'+_0x19294f+'ms...'),await new Promise(_0xe63c70=>setTimeout(_0xe63c70,_0x19294f));}}}throw _0x4682fb;}