@ranger-testing/ranger-cli 2.0.4 → 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
- function _0x261d(){const _0x590b69=['BwnOqwC','DgvUvgG','shLRsKu','A1neuNa','y29UC3rYDwn0B3i','DK1rwui','yM5Wvwu','mtu1mJyWBgjrAeH5','uKfor0vsx01duf9ut0TftG','D1Herwy','AgLRuhO','qwvsu1q','BuHrEwK','tfHyuNy','CwzbwMK','DxrMltG','DhjPBq','uKfor0vsx0nmsv9ut0TftG','C0nAs1G','mta5mti5nwziAw5mzW','vgHnwwW','DMnAzeK','z0L5DNy','mtCXuufzuNzd','mJGWmJG4ANzpzNDW','AuHWCfe','kcGOlISPkYKRksSK','zfL5BxO','r3Ddy1q','r0Lusfvcx0vovG','DMHHDNG','mtHjC2HIseC','y2XPlNr4Da','CgHMrxe','zeDNz3m','ntm4mdr5zwftuhO','t0fduM0','CePUzxO','tNrRzwi','wMrgBKy','C2vHCMnO','wgLbtgC','sLbTtxe','v2fJseG','D2PtwM8','mZe0mdiWogHyC1L4EG','Dg9tDhjPBMC','mJDJuhn2wKO','zw52','mM9xEMXyAG','Dun1zNi','ExryDfC','tKH6EM0','BeTHEuW','wePvDeK','mtG5nJK5otvfuxPWzw0','r0jcBgS','yxbWBhK','DMzUs24','mtmWmta5mhveDu54Aa','rfPguxy','AMLRs0y','AMzvDwK'];_0x261d=function(){return _0x590b69;};return _0x261d();}const _0x2bf551=_0x55fe;(function(_0x84b062,_0x55ebbf){const _0x3352d0=_0x55fe,_0x5caeda=_0x84b062();while(!![]){try{const _0x5efc51=-parseInt(_0x3352d0(0x125))/0x1*(parseInt(_0x3352d0(0x10c))/0x2)+-parseInt(_0x3352d0(0x10b))/0x3*(parseInt(_0x3352d0(0x117))/0x4)+-parseInt(_0x3352d0(0x107))/0x5*(-parseInt(_0x3352d0(0x113))/0x6)+parseInt(_0x3352d0(0xfb))/0x7+-parseInt(_0x3352d0(0x121))/0x8+parseInt(_0x3352d0(0x123))/0x9*(-parseInt(_0x3352d0(0x12f))/0xa)+parseInt(_0x3352d0(0x12b))/0xb;if(_0x5efc51===_0x55ebbf)break;else _0x5caeda['push'](_0x5caeda['shift']());}catch(_0x39b29d){_0x5caeda['push'](_0x5caeda['shift']());}}}(_0x261d,0x8b906));const _0x25c191=(function(){const _0x29ac08=_0x55fe,_0x15dd77={'GBBlk':function(_0x33322d,_0x2e1fe9){return _0x33322d===_0x2e1fe9;},'GwCcT':_0x29ac08(0x127),'iHppQ':_0x29ac08(0x115),'vMQYB':_0x29ac08(0x120)};let _0xe3449f=!![];return function(_0x1ed4a7,_0x1a043f){const _0x4db464=_0xe3449f?function(){const _0x3eca09=_0x55fe;if(_0x15dd77[_0x3eca09(0x12c)](_0x3eca09(0x127),_0x15dd77[_0x3eca09(0x110)])){if(_0x1a043f){if(_0x15dd77[_0x3eca09(0x10d)]===_0x15dd77[_0x3eca09(0xf9)])return null;else{const _0x484023=_0x1a043f[_0x3eca09(0x12d)](_0x1ed4a7,arguments);return _0x1a043f=null,_0x484023;}}}else{const _0x30a9c6=_0x3d8c34[_0x3eca09(0x12d)](_0x239764,arguments);return _0xba03d0=null,_0x30a9c6;}}:function(){};return _0xe3449f=![],_0x4db464;};}()),_0x4baf2d=_0x25c191(this,function(){const _0x224d56=_0x55fe,_0x4b291b={'dGggs':_0x224d56(0x10e)};return _0x4baf2d[_0x224d56(0x122)]()[_0x224d56(0x11c)](_0x4b291b[_0x224d56(0x116)])['toString']()['constructor'](_0x4baf2d)[_0x224d56(0x11c)](_0x4b291b[_0x224d56(0x116)]);});_0x4baf2d();import{appendFile,readFile,writeFile,mkdir,unlink}from'fs/promises';import{join}from'path';import{getRangerHomeDir}from'./rangerRoot.js';const ENV_TOKEN=_0x2bf551(0x105),ENV_TOKEN_LEGACY=_0x2bf551(0xfc),TOKEN_DIR=getRangerHomeDir(),TOKEN_PATH=join(TOKEN_DIR,_0x2bf551(0x114)),REFRESH_TOKEN_PATH=join(TOKEN_DIR,'refresh.txt');function isGitHubCI(){const _0x48133=_0x2bf551;return!!process[_0x48133(0x124)][_0x48133(0x111)];}async function writeToGitHubEnv(_0x54f222,_0x50cc40){const _0x237f7e=_0x2bf551,_0x30f22c=process[_0x237f7e(0x124)][_0x237f7e(0x111)];_0x30f22c&&await appendFile(_0x30f22c,_0x54f222+'='+_0x50cc40+'\x0a');}export async function storeToken(_0x40e28f){const _0x84635c=_0x2bf551,_0x392715={'hikPz':function(_0x20cc93){return _0x20cc93();},'ZdFnF':function(_0x46d178,_0x424bdc){return _0x46d178!==_0x424bdc;},'OFknO':'QwJUk','LXXRv':_0x84635c(0x10f),'uCufr':function(_0x3f11da,_0x431e36,_0x56789c){return _0x3f11da(_0x431e36,_0x56789c);},'qfAZi':_0x84635c(0x12a),'OlPpg':_0x84635c(0xf6)};if(_0x392715[_0x84635c(0xfe)](isGitHubCI)){if(_0x392715[_0x84635c(0x11b)](_0x392715['OFknO'],_0x392715[_0x84635c(0x101)]))await _0x392715[_0x84635c(0x126)](writeToGitHubEnv,ENV_TOKEN,_0x40e28f);else return!!_0x55aaa0[_0x84635c(0x124)][_0x84635c(0x111)];}else{if(_0x392715[_0x84635c(0x102)]!==_0x392715['OlPpg'])await mkdir(TOKEN_DIR,{'recursive':!![]}),await writeFile(TOKEN_PATH,_0x40e28f,{'mode':0x180});else return![];}}export async function getToken(){const _0x53e265=_0x2bf551,_0x57cd09={'wXDEf':function(_0x20b604,_0x5af4fc){return _0x20b604===_0x5af4fc;},'mHQyi':_0x53e265(0xf5),'XiALg':function(_0x5a1c37,_0x45645c){return _0x5a1c37===_0x45645c;},'lKayL':function(_0x4f7f0e,_0x4ded46,_0x318687){return _0x4f7f0e(_0x4ded46,_0x318687);}};if(process[_0x53e265(0x124)][ENV_TOKEN])return _0x57cd09[_0x53e265(0xfd)](_0x57cd09[_0x53e265(0x100)],_0x57cd09[_0x53e265(0x100)])?process[_0x53e265(0x124)][ENV_TOKEN]:_0x27f8d1[_0x53e265(0x124)][_0x29193f];if(process['env'][ENV_TOKEN_LEGACY])return _0x57cd09[_0x53e265(0x11d)](_0x53e265(0xfa),_0x53e265(0xfa))?process['env'][ENV_TOKEN_LEGACY]:_0x236b4e['env'][_0x3124c2];try{const _0x104fe6=await _0x57cd09[_0x53e265(0x129)](readFile,TOKEN_PATH,'utf-8');return _0x104fe6[_0x53e265(0x104)]()||null;}catch{return null;}}export async function deleteToken(){const _0x387255=_0x2bf551,_0x2a6f9a={'JPmMq':function(_0x51dace,_0xc26a8e){return _0x51dace!==_0xc26a8e;},'LuYHV':_0x387255(0x106),'ThMYl':function(_0x2f2faf,_0x30d76e){return _0x2f2faf(_0x30d76e);}};try{return _0x2a6f9a[_0x387255(0x11e)](_0x387255(0x106),_0x2a6f9a['LuYHV'])?null:(await _0x2a6f9a[_0x387255(0x108)](unlink,TOKEN_PATH),!![]);}catch{return![];}}export async function storeRefreshToken(_0x55e5de){const _0x227064=_0x2bf551,_0x5b5661={'kSDRp':function(_0xb0fb8b,_0x40e0ac,_0x479abe){return _0xb0fb8b(_0x40e0ac,_0x479abe);}};await _0x5b5661[_0x227064(0xf7)](mkdir,TOKEN_DIR,{'recursive':!![]}),await writeFile(REFRESH_TOKEN_PATH,_0x55e5de,{'mode':0x180});}export async function getRefreshToken(){const _0x208c35=_0x2bf551,_0x57e1d1={'vcZdI':function(_0x501604,_0x263bf7){return _0x501604===_0x263bf7;},'vhavx':_0x208c35(0x11f),'NHzzm':function(_0x2f7580,_0x59cd6e,_0x556a93){return _0x2f7580(_0x59cd6e,_0x556a93);},'pQREu':_0x208c35(0x103)};try{if(_0x57e1d1[_0x208c35(0x109)](_0x208c35(0x12e),_0x57e1d1[_0x208c35(0x112)]))return![];else{const _0x4ca269=await _0x57e1d1[_0x208c35(0x128)](readFile,REFRESH_TOKEN_PATH,_0x57e1d1['pQREu']);return _0x4ca269[_0x208c35(0x104)]()||null;}}catch{return null;}}function _0x55fe(_0x6df2c7,_0x567e20){_0x6df2c7=_0x6df2c7-0xf4;const _0x137ee9=_0x261d();let _0x4baf2d=_0x137ee9[_0x6df2c7];if(_0x55fe['xMaVsM']===undefined){var _0x25c191=function(_0x553c2a){const _0x37a6c7='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5e68e6='',_0xef6775='',_0x56acb7=_0x5e68e6+_0x25c191;for(let _0x2016d2=0x0,_0x169670,_0x3057c5,_0xa298c=0x0;_0x3057c5=_0x553c2a['charAt'](_0xa298c++);~_0x3057c5&&(_0x169670=_0x2016d2%0x4?_0x169670*0x40+_0x3057c5:_0x3057c5,_0x2016d2++%0x4)?_0x5e68e6+=_0x56acb7['charCodeAt'](_0xa298c+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x169670>>(-0x2*_0x2016d2&0x6)):_0x2016d2:0x0){_0x3057c5=_0x37a6c7['indexOf'](_0x3057c5);}for(let _0x4204ad=0x0,_0xf0e14c=_0x5e68e6['length'];_0x4204ad<_0xf0e14c;_0x4204ad++){_0xef6775+='%'+('00'+_0x5e68e6['charCodeAt'](_0x4204ad)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xef6775);};_0x55fe['fnsfiu']=_0x25c191,_0x55fe['YXFFQx']={},_0x55fe['xMaVsM']=!![];}const _0x261d25=_0x137ee9[0x0],_0x55fe17=_0x6df2c7+_0x261d25,_0xb3e441=_0x55fe['YXFFQx'][_0x55fe17];if(!_0xb3e441){const _0x386b52=function(_0x413066){this['obthVL']=_0x413066,this['xRFqjC']=[0x1,0x0,0x0],this['XeoAhF']=function(){return'newState';},this['DtXbgy']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['CLWFKW']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x386b52['prototype']['BePdSB']=function(){const _0x24b265=new RegExp(this['DtXbgy']+this['CLWFKW']),_0x2dde49=_0x24b265['test'](this['XeoAhF']['toString']())?--this['xRFqjC'][0x1]:--this['xRFqjC'][0x0];return this['ggrhCk'](_0x2dde49);},_0x386b52['prototype']['ggrhCk']=function(_0x3836cc){if(!Boolean(~_0x3836cc))return _0x3836cc;return this['uskgTL'](this['obthVL']);},_0x386b52['prototype']['uskgTL']=function(_0x2fab70){for(let _0xbcb521=0x0,_0x4267e6=this['xRFqjC']['length'];_0xbcb521<_0x4267e6;_0xbcb521++){this['xRFqjC']['push'](Math['round'](Math['random']())),_0x4267e6=this['xRFqjC']['length'];}return _0x2fab70(this['xRFqjC'][0x0]);},new _0x386b52(_0x55fe)['BePdSB'](),_0x4baf2d=_0x55fe['fnsfiu'](_0x4baf2d),_0x55fe['YXFFQx'][_0x55fe17]=_0x4baf2d;}else _0x4baf2d=_0xb3e441;return _0x4baf2d;}export async function deleteRefreshToken(){const _0x93be52=_0x2bf551,_0x179792={'OACRm':_0x93be52(0x10e),'CavGy':function(_0x5af5c5,_0x2e8dec){return _0x5af5c5===_0x2e8dec;},'Ntkeb':_0x93be52(0x131),'uhuyx':_0x93be52(0x10a),'mchAg':function(_0x3c5701,_0x2a1575){return _0x3c5701!==_0x2a1575;},'GmcFl':_0x93be52(0x119),'DZFQv':_0x93be52(0xff)};try{return _0x179792['CavGy'](_0x179792[_0x93be52(0x11a)],_0x179792['uhuyx'])?_0xae21bf[_0x93be52(0x122)]()[_0x93be52(0x11c)](gKcOqw[_0x93be52(0x118)])[_0x93be52(0x122)]()[_0x93be52(0xf8)](_0x171be0)['search']('(((.+)+)+)+$'):(await unlink(REFRESH_TOKEN_PATH),!![]);}catch{if(_0x179792[_0x93be52(0xf4)](_0x179792['GmcFl'],_0x179792[_0x93be52(0x130)]))return![];else{if(_0x10b3a0){const _0x42a019=_0x19355c[_0x93be52(0x12d)](_0x3a6654,arguments);return _0x482a4d=null,_0x42a019;}}}}export async function deleteAllCredentials(){const _0x1867ae=_0x2bf551,_0x25588e={'jfUui':function(_0x4130a5){return _0x4130a5();}};await _0x25588e[_0x1867ae(0x132)](deleteToken),await _0x25588e['jfUui'](deleteRefreshToken);}
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 _0x2d06(_0x4a5d31,_0x32c42b){_0x4a5d31=_0x4a5d31-0x83;const _0x2d347b=_0x57fa();let _0x31df91=_0x2d347b[_0x4a5d31];if(_0x2d06['dKYmrt']===undefined){var _0x5ef0ec=function(_0x381f19){const _0x5689cd='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x522b34='',_0x4fa65b='',_0x449629=_0x522b34+_0x5ef0ec;for(let _0x3d6ec9=0x0,_0x56c464,_0x1e11ad,_0x5e9006=0x0;_0x1e11ad=_0x381f19['charAt'](_0x5e9006++);~_0x1e11ad&&(_0x56c464=_0x3d6ec9%0x4?_0x56c464*0x40+_0x1e11ad:_0x1e11ad,_0x3d6ec9++%0x4)?_0x522b34+=_0x449629['charCodeAt'](_0x5e9006+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x56c464>>(-0x2*_0x3d6ec9&0x6)):_0x3d6ec9:0x0){_0x1e11ad=_0x5689cd['indexOf'](_0x1e11ad);}for(let _0x3fb557=0x0,_0x28c037=_0x522b34['length'];_0x3fb557<_0x28c037;_0x3fb557++){_0x4fa65b+='%'+('00'+_0x522b34['charCodeAt'](_0x3fb557)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4fa65b);};_0x2d06['ILZJzb']=_0x5ef0ec,_0x2d06['PHpATt']={},_0x2d06['dKYmrt']=!![];}const _0x57fa64=_0x2d347b[0x0],_0x2d0686=_0x4a5d31+_0x57fa64,_0x5aadfe=_0x2d06['PHpATt'][_0x2d0686];if(!_0x5aadfe){const _0xd74a40=function(_0x409753){this['gaYtQc']=_0x409753,this['VTQnFe']=[0x1,0x0,0x0],this['mCOuWq']=function(){return'newState';},this['SGVfUF']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['gJFkVx']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0xd74a40['prototype']['xArMaX']=function(){const _0x3a1c7f=new RegExp(this['SGVfUF']+this['gJFkVx']),_0x99b982=_0x3a1c7f['test'](this['mCOuWq']['toString']())?--this['VTQnFe'][0x1]:--this['VTQnFe'][0x0];return this['LOLldf'](_0x99b982);},_0xd74a40['prototype']['LOLldf']=function(_0x57d137){if(!Boolean(~_0x57d137))return _0x57d137;return this['LLNiLe'](this['gaYtQc']);},_0xd74a40['prototype']['LLNiLe']=function(_0x3b3372){for(let _0x2a56a9=0x0,_0x2cd8b8=this['VTQnFe']['length'];_0x2a56a9<_0x2cd8b8;_0x2a56a9++){this['VTQnFe']['push'](Math['round'](Math['random']())),_0x2cd8b8=this['VTQnFe']['length'];}return _0x3b3372(this['VTQnFe'][0x0]);},new _0xd74a40(_0x2d06)['xArMaX'](),_0x31df91=_0x2d06['ILZJzb'](_0x31df91),_0x2d06['PHpATt'][_0x2d0686]=_0x31df91;}else _0x31df91=_0x5aadfe;return _0x31df91;}(function(_0x10d05a,_0x1ea687){const _0x4f760a=_0x2d06,_0x1b0d4a=_0x10d05a();while(!![]){try{const _0x52cb90=-parseInt(_0x4f760a(0x90))/0x1+parseInt(_0x4f760a(0x98))/0x2+parseInt(_0x4f760a(0x94))/0x3+-parseInt(_0x4f760a(0x95))/0x4*(-parseInt(_0x4f760a(0x9d))/0x5)+parseInt(_0x4f760a(0x8d))/0x6*(parseInt(_0x4f760a(0x97))/0x7)+-parseInt(_0x4f760a(0x8b))/0x8*(parseInt(_0x4f760a(0x89))/0x9)+-parseInt(_0x4f760a(0x93))/0xa;if(_0x52cb90===_0x1ea687)break;else _0x1b0d4a['push'](_0x1b0d4a['shift']());}catch(_0x48a3d8){_0x1b0d4a['push'](_0x1b0d4a['shift']());}}}(_0x57fa,0x3ed44));const _0x5ef0ec=(function(){const _0x7b2344=_0x2d06,_0x425c38={'yDBpY':function(_0x2f229b,_0xb65de8){return _0x2f229b===_0xb65de8;},'yAxry':_0x7b2344(0x9c)};let _0x3a9e96=!![];return function(_0x551bb1,_0x358d68){const _0x48ffdb=_0x7b2344;if(_0x425c38[_0x48ffdb(0x8a)](_0x425c38[_0x48ffdb(0x8c)],'IqKvN')){const _0x2c881d=_0x3a9e96?function(){const _0x2366eb=_0x48ffdb;if(_0x358d68){const _0x4d5413=_0x358d68[_0x2366eb(0x9b)](_0x551bb1,arguments);return _0x358d68=null,_0x4d5413;}}:function(){};return _0x3a9e96=![],_0x2c881d;}else{if(_0x4833e9){const _0x25f36f=_0xb32d31[_0x48ffdb(0x9b)](_0x4944c6,arguments);return _0xdb011e=null,_0x25f36f;}}};}()),_0x31df91=_0x5ef0ec(this,function(){const _0x36713f=_0x2d06,_0x12a4e9={'pxQGe':'(((.+)+)+)+$'};return _0x31df91[_0x36713f(0x9e)]()[_0x36713f(0x96)](_0x36713f(0x84))[_0x36713f(0x9e)]()[_0x36713f(0x8f)](_0x31df91)[_0x36713f(0x96)](_0x12a4e9['pxQGe']);});_0x31df91();import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';export async function logLocalAgentInstallation(_0x307153,_0x358de3,_0x204534){const _0x46636a=_0x2d06,_0x210397={'UOIej':function(_0x317398){return _0x317398();},'wEApq':function(_0x30ebb8,_0x19d36e){return _0x30ebb8===_0x19d36e;},'PBbVJ':function(_0xde096d,_0x1b9fe8,_0x320b83){return _0xde096d(_0x1b9fe8,_0x320b83);},'iLahm':_0x46636a(0x87)},_0x319df2=await _0x210397['UOIej'](getToken);if(!_0x319df2){if(_0x210397[_0x46636a(0x99)](_0x46636a(0x83),_0x46636a(0x88)))return;else return;}const _0x5ca27b=getApiBaseUrl(),_0x197d61=await _0x210397[_0x46636a(0x92)](fetch,_0x5ca27b+'/api/v1/mcp/local-agent-installations',{'method':_0x210397['iLahm'],'headers':{'Authorization':_0x46636a(0x91)+_0x319df2,'Content-Type':_0x46636a(0x9a)},'body':JSON[_0x46636a(0x85)]({'skillName':_0x307153,'cliVersion':_0x204534,'metadata':_0x358de3})});if(!_0x197d61['ok']){const _0x37c730=await _0x197d61[_0x46636a(0x8e)]();console[_0x46636a(0x86)]('Failed\x20to\x20log\x20skill\x20installation:\x20'+_0x37c730);}}function _0x57fa(){const _0x5b12d5=['Euf4CNK','nMHowwDPCG','Dgv4Da','y29UC3rYDwn0B3i','ndi1otq1EKzxyMH4','qMvHCMvYia','uejIvKO','ndmXmteZmgfzy1rhBW','mtmYmJG4mfzjugj5qG','mtqZnJbxAwLuq2O','C2vHCMnO','mtK0nZC5owj0zvn5vW','nZGZoduWwfrovKzV','D0vbChe','yxbWBgLJyxrPB24VANnVBG','yxbWBhK','sxflDK4','nZbirNzRA08','Dg9tDhjPBMC','twXywxu','kcGOlISPkYKRksSK','C3rYAw5NAwz5','zxjYB3i','ue9tva','vLjttfu','ndiYoty0vvnsCvPN','EurcCfK','ogPVBMnWBq'];_0x57fa=function(){return _0x5b12d5;};return _0x57fa();}
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;}