@ranger-testing/ranger-cli 2.0.5 → 2.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cli.js +1 -914
- package/build/commands/addEnv.js +1 -1
- package/build/commands/authEncrypt.js +1 -36
- package/build/commands/clean.js +1 -1
- package/build/commands/config.js +1 -93
- package/build/commands/env.js +1 -98
- package/build/commands/feature.js +1 -653
- package/build/commands/hook.js +1 -33
- package/build/commands/hooks/autoPrompt.js +1 -32
- package/build/commands/hooks/disable.js +1 -33
- package/build/commands/hooks/enable.js +1 -58
- package/build/commands/hooks/exitPlanMode.js +1 -35
- package/build/commands/hooks/index.js +1 -12
- package/build/commands/hooks/output.js +1 -71
- package/build/commands/hooks/planReminder.js +1 -46
- package/build/commands/hooks/planStart.js +1 -30
- package/build/commands/hooks/postEdit.js +1 -43
- package/build/commands/hooks/preCompact.js +1 -30
- package/build/commands/hooks/sessionEnd.js +1 -25
- package/build/commands/hooks/sessionStart.js +1 -93
- package/build/commands/hooks/stopHook.js +1 -155
- package/build/commands/index.js +1 -12
- package/build/commands/login.js +1 -26
- package/build/commands/setupCi.js +1 -189
- package/build/commands/skillup.js +1 -80
- package/build/commands/start.js +1 -1
- package/build/commands/status.js +1 -198
- package/build/commands/update.js +1 -182
- package/build/commands/updateEnv.js +1 -1
- package/build/commands/useEnv.js +1 -1
- package/build/commands/utils/activeProfile.js +1 -76
- package/build/commands/utils/browserSessionsApi.js +1 -1
- package/build/commands/utils/claudeConfig.js +1 -73
- package/build/commands/utils/claudePlugin.js +1 -85
- package/build/commands/utils/crypto.js +1 -42
- package/build/commands/utils/desirePathLog.js +1 -139
- package/build/commands/utils/deviceAuth.js +1 -232
- package/build/commands/utils/environment.js +1 -65
- package/build/commands/utils/featureApi.js +1 -371
- package/build/commands/utils/featureReportGenerator.js +1 -204
- package/build/commands/utils/fixWebmDuration.js +1 -0
- package/build/commands/utils/git.js +1 -44
- package/build/commands/utils/keychain.js +1 -1
- package/build/commands/utils/localAgentInstallationsApi.js +1 -1
- package/build/commands/utils/profileMessages.js +1 -8
- package/build/commands/utils/profileSetupBanner.js +1 -167
- package/build/commands/utils/rangerRoot.js +1 -60
- package/build/commands/utils/reportGenerator.js +1 -130
- package/build/commands/utils/retry.js +1 -25
- package/build/commands/utils/sessionCache.js +1 -299
- package/build/commands/utils/settings.js +1 -313
- package/build/commands/utils/skillContent.js +1 -28
- package/build/commands/utils/skills.js +1 -1
- package/build/commands/utils/telemetry.js +1 -254
- package/build/commands/utils/userApi.js +1 -32
- package/build/commands/utils/version.js +1 -62
- package/build/commands/verifyFeature.js +1 -1343
- package/build/commands/verifyInBrowser.js +1 -1
- package/package.json +4 -1
- package/build/cli.js.map +0 -1
- package/build/commands/addEnv.js.map +0 -1
- package/build/commands/authEncrypt.js.map +0 -1
- package/build/commands/clean.js.map +0 -1
- package/build/commands/config.js.map +0 -1
- package/build/commands/env.js.map +0 -1
- package/build/commands/feature.js.map +0 -1
- package/build/commands/hook.js.map +0 -1
- package/build/commands/hooks/autoPrompt.js.map +0 -1
- package/build/commands/hooks/disable.js.map +0 -1
- package/build/commands/hooks/enable.js.map +0 -1
- package/build/commands/hooks/exitPlanMode.js.map +0 -1
- package/build/commands/hooks/index.js.map +0 -1
- package/build/commands/hooks/output.js.map +0 -1
- package/build/commands/hooks/planReminder.js.map +0 -1
- package/build/commands/hooks/planStart.js.map +0 -1
- package/build/commands/hooks/postEdit.js.map +0 -1
- package/build/commands/hooks/preCompact.js.map +0 -1
- package/build/commands/hooks/sessionEnd.js.map +0 -1
- package/build/commands/hooks/sessionStart.js.map +0 -1
- package/build/commands/hooks/stopHook.js.map +0 -1
- package/build/commands/index.js.map +0 -1
- package/build/commands/login.js.map +0 -1
- package/build/commands/setupCi.js.map +0 -1
- package/build/commands/skillup.js.map +0 -1
- package/build/commands/start.js.map +0 -1
- package/build/commands/status.js.map +0 -1
- package/build/commands/update.js.map +0 -1
- package/build/commands/updateEnv.js.map +0 -1
- package/build/commands/useEnv.js.map +0 -1
- package/build/commands/utils/activeProfile.js.map +0 -1
- package/build/commands/utils/browserSessionsApi.js.map +0 -1
- package/build/commands/utils/claudeConfig.js.map +0 -1
- package/build/commands/utils/claudePlugin.js.map +0 -1
- package/build/commands/utils/crypto.js.map +0 -1
- package/build/commands/utils/desirePathLog.js.map +0 -1
- package/build/commands/utils/deviceAuth.js.map +0 -1
- package/build/commands/utils/environment.js.map +0 -1
- package/build/commands/utils/featureApi.js.map +0 -1
- package/build/commands/utils/featureReportGenerator.js.map +0 -1
- package/build/commands/utils/git.js.map +0 -1
- package/build/commands/utils/keychain.js.map +0 -1
- package/build/commands/utils/localAgentInstallationsApi.js.map +0 -1
- package/build/commands/utils/profileMessages.js.map +0 -1
- package/build/commands/utils/profileSetupBanner.js.map +0 -1
- package/build/commands/utils/rangerRoot.js.map +0 -1
- package/build/commands/utils/reportGenerator.js.map +0 -1
- package/build/commands/utils/retry.js.map +0 -1
- package/build/commands/utils/sessionCache.js.map +0 -1
- package/build/commands/utils/settings.js.map +0 -1
- package/build/commands/utils/skillContent.js.map +0 -1
- package/build/commands/utils/skills.js.map +0 -1
- package/build/commands/utils/telemetry.js.map +0 -1
- package/build/commands/utils/userApi.js.map +0 -1
- package/build/commands/utils/version.js.map +0 -1
- package/build/commands/verifyFeature.js.map +0 -1
- package/build/commands/verifyInBrowser.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const _0x577e25=_0x4731;(function(_0x26b20f,_0x3b0d61){const _0x54f64e=_0x4731,_0x3757b6=_0x26b20f();while(!![]){try{const _0x48c4fb=parseInt(_0x54f64e(0x1e0))/0x1+-parseInt(_0x54f64e(0x1cc))/0x2*(-parseInt(_0x54f64e(0x1ae))/0x3)+-parseInt(_0x54f64e(0x1d1))/0x4+parseInt(_0x54f64e(0x1bc))/0x5+parseInt(_0x54f64e(0x1dd))/0x6*(parseInt(_0x54f64e(0x1d7))/0x7)+parseInt(_0x54f64e(0x1df))/0x8+parseInt(_0x54f64e(0x1de))/0x9*(-parseInt(_0x54f64e(0x1c4))/0xa);if(_0x48c4fb===_0x3b0d61)break;else _0x3757b6['push'](_0x3757b6['shift']());}catch(_0x4e8e53){_0x3757b6['push'](_0x3757b6['shift']());}}}(_0x380d,0x90cd6));function _0x380d(){const _0x1504de=['OGYrk','nKudh','YRLOR','Usage:\x20fixWebmDuration\x20<input.webm>\x20<output.webm>','ByFZS','endsWith','hyCNI','JZTzs','Not\x20a\x20valid\x20WebM\x20file:\x20missing\x20Segment','gqBuS','850690CgaVnD','gxOmH','MiiEQ','sizeLen','length','error','fixWebmDuration.js','Could\x20not\x20compute\x20duration','10VZdyuU','pJPdS','concat','dataSize','FMbVB','pFQDo','GNPQf','min','128bzcyPd','fOehI','CLnCw','zrCXI','slice','4022872SwSndH','alloc','offset','from','log','IHRQU','7vaXEsG','fgfxF','IBXQX','WHqKz','idLen','xfCBP','4935366iBYhMO','2996982wKNWvw','2352432WgWWNM','70801MXXEyw','ImzPz','dataOffset','NLRwG','IbSyK','fLatK','tSVJk','APrcT','Fixed:\x20','fixWebmDuration.ts','DGINX','argv','pow','oOZji','LZWRH','GLmwH','HEfLz','26919fGwxGx','gviIs','fuRhd','USEvr'];_0x380d=function(){return _0x1504de;};return _0x380d();}import{readFileSync,writeFileSync}from'fs';const ID_SEGMENT=0x18538067,ID_INFO=0x1549a966,ID_TIMESTAMP_SCALE=0x2ad7b1,ID_DURATION=0x4489,ID_VOID=0xec,ID_CLUSTER=0x1f43b675,ID_TIMESTAMP=0xe7,ID_SIMPLE_BLOCK=0xa3;function readVint(_0x48b23c,_0x3b7751){const _0x150a0e=_0x4731,_0x3053b8={'SXGHn':function(_0x125a21,_0x380ed3){return _0x125a21>=_0x380ed3;},'ByFZS':function(_0x3b3f6,_0x1b41ed){return _0x3b3f6<=_0x1b41ed;},'hyCNI':function(_0x147fad,_0x4c8991){return _0x147fad>_0x4c8991;},'FMbVB':function(_0x16477b,_0x3e2222){return _0x16477b+_0x3e2222;},'rRGpH':function(_0x46cc8e,_0x5dd1c2){return _0x46cc8e&_0x5dd1c2;},'tSVJk':function(_0x4b7e19,_0x4b9b32){return _0x4b7e19<_0x4b9b32;},'BbFhw':function(_0x1f5b9a,_0x11b36f){return _0x1f5b9a+_0x11b36f;},'USEvr':function(_0xc6a37e,_0x2649dc){return _0xc6a37e*_0x2649dc;}};if(_0x3053b8['SXGHn'](_0x3b7751,_0x48b23c[_0x150a0e(0x1c0)]))return[0x0,0x0];const _0x3063a7=_0x48b23c[_0x3b7751];let _0x3417db=0x1,_0x33c269=0x80;while(_0x3053b8[_0x150a0e(0x1b6)](_0x3417db,0x8)&&!(_0x3063a7&_0x33c269)){_0x3417db++,_0x33c269>>=0x1;}if(_0x3053b8[_0x150a0e(0x1b8)](_0x3053b8[_0x150a0e(0x1c8)](_0x3b7751,_0x3417db),_0x48b23c['length']))return[0x0,0x0];let _0x36892c=_0x3053b8['rRGpH'](_0x3063a7,_0x33c269-0x1);for(let _0x3dcb93=0x1;_0x3053b8[_0x150a0e(0x1e6)](_0x3dcb93,_0x3417db);_0x3dcb93++){_0x36892c=_0x3053b8['BbFhw'](_0x3053b8[_0x150a0e(0x1b1)](_0x36892c,0x100),_0x48b23c[_0x3b7751+_0x3dcb93]);}return[_0x36892c,_0x3417db];}function readId(_0x2fe53e,_0x428282){const _0x2e3e71={'jEVKl':function(_0x4973b3,_0x2dba7c){return _0x4973b3>=_0x2dba7c;},'RwPMZ':function(_0x37302e,_0x287945){return _0x37302e>_0x287945;},'DHXbu':function(_0x19edf7,_0x24d53c){return _0x19edf7+_0x24d53c;},'etvkz':function(_0x7aaf64,_0x4ed27a){return _0x7aaf64+_0x4ed27a;}};if(_0x428282>=_0x2fe53e['length'])return[0x0,0x0];const _0x593096=_0x2fe53e[_0x428282];let _0x16595d;if(_0x593096>=0x80)_0x16595d=0x1;else{if(_0x2e3e71['jEVKl'](_0x593096,0x40))_0x16595d=0x2;else{if(_0x593096>=0x20)_0x16595d=0x3;else{if(_0x593096>=0x10)_0x16595d=0x4;else return[_0x593096,0x1];}}}if(_0x2e3e71['RwPMZ'](_0x428282+_0x16595d,_0x2fe53e['length']))return[0x0,0x0];let _0x1a7576=0x0;for(let _0x1579eb=0x0;_0x1579eb<_0x16595d;_0x1579eb++){_0x1a7576=_0x2e3e71['DHXbu'](_0x1a7576*0x100,_0x2fe53e[_0x2e3e71['etvkz'](_0x428282,_0x1579eb)]);}return[_0x1a7576,_0x16595d];}function readUint(_0x569a2c,_0x36f3af,_0x3ee189){const _0x30e62e={'oNWPL':function(_0x309291,_0x25f32c){return _0x309291+_0x25f32c;}};let _0x36c1ba=0x0;for(let _0x3e93dc=0x0;_0x3e93dc<_0x3ee189;_0x3e93dc++){_0x36c1ba=_0x30e62e['oNWPL'](_0x36c1ba*0x100,_0x569a2c[_0x36f3af+_0x3e93dc]);}return _0x36c1ba;}function isUnknownSize(_0x365ccf,_0x219176){const _0x25e7a2=_0x4731;return _0x365ccf===Math[_0x25e7a2(0x1a9)](0x2,0x7*_0x219176)-0x1;}function writeId(_0x254e62){const _0x57ac81=_0x4731,_0x31397c={'fOehI':function(_0x428c43,_0x4488b6){return _0x428c43<=_0x4488b6;},'Lwjam':function(_0x196255,_0x29c355){return _0x196255&_0x29c355;},'fPafP':function(_0x497497,_0x4a3825){return _0x497497>>_0x4a3825;},'FcyEb':function(_0x16c915,_0x4cf4a2){return _0x16c915&_0x4cf4a2;},'HEfLz':function(_0x59c480,_0x5c4b2f){return _0x59c480>>_0x5c4b2f;},'LjtRY':function(_0x258f03,_0x1626de){return _0x258f03&_0x1626de;},'CPPIE':function(_0x26e24c,_0x1d8c9a){return _0x26e24c&_0x1d8c9a;},'fgfxF':function(_0x11e648,_0x332867){return _0x11e648>>_0x332867;}};if(_0x254e62<=0xff)return Buffer['from']([_0x254e62]);if(_0x31397c[_0x57ac81(0x1cd)](_0x254e62,0xffff))return Buffer[_0x57ac81(0x1d4)]([_0x31397c['Lwjam'](_0x31397c['fPafP'](_0x254e62,0x8),0xff),_0x31397c['Lwjam'](_0x254e62,0xff)]);if(_0x254e62<=0xffffff)return Buffer[_0x57ac81(0x1d4)]([_0x31397c['FcyEb'](_0x254e62>>0x10,0xff),_0x31397c[_0x57ac81(0x1ad)](_0x254e62,0x8)&0xff,_0x31397c['LjtRY'](_0x254e62,0xff)]);return Buffer['from']([_0x31397c['FcyEb'](_0x254e62>>0x18,0xff),_0x31397c['CPPIE'](_0x31397c['fPafP'](_0x254e62,0x10),0xff),_0x31397c[_0x57ac81(0x1d8)](_0x254e62,0x8)&0xff,_0x254e62&0xff]);}function writeVint(_0x33a172,_0x3eb430){const _0x50118e=_0x4731,_0x47ba23={'oOZji':function(_0x3885b1,_0x4cd608){return _0x3885b1||_0x4cd608;},'soaXS':function(_0x1461de,_0x262a93){return _0x1461de<_0x262a93;},'ImzPz':function(_0x4af130,_0x1b6d72){return _0x4af130>=_0x1b6d72;},'svyMc':function(_0x45f6e9,_0x14b253){return _0x45f6e9<<_0x14b253;}};let _0x59fa19=_0x47ba23[_0x50118e(0x1aa)](_0x3eb430,0x1);while(_0x47ba23['soaXS'](Math[_0x50118e(0x1a9)](0x2,0x7*_0x59fa19)-0x2,_0x33a172))_0x59fa19++;const _0x585be7=Buffer['alloc'](_0x59fa19);for(let _0x49e11f=_0x59fa19-0x1;_0x47ba23[_0x50118e(0x1e1)](_0x49e11f,0x0);_0x49e11f--){_0x585be7[_0x49e11f]=_0x33a172&0xff,_0x33a172=Math['floor'](_0x33a172/0x100);}return _0x585be7[0x0]|=_0x47ba23['svyMc'](0x1,0x8-_0x59fa19),_0x585be7;}function writeFloat64(_0x539389){const _0x42927d=Buffer['alloc'](0x8);return _0x42927d['writeDoubleBE'](_0x539389,0x0),_0x42927d;}function writeVoid(_0x3d026b){const _0x5d6ef0=_0x4731,_0x12be24={'fLatK':function(_0x9b7d22,_0x42d014){return _0x9b7d22-_0x42d014;},'pJPdS':function(_0x3c582c,_0x36a23f,_0x3d6546){return _0x3c582c(_0x36a23f,_0x3d6546);}};for(let _0x3eff04=0x1;_0x3eff04<=0x8;_0x3eff04++){const _0x3aea82=_0x12be24[_0x5d6ef0(0x1e5)](_0x3d026b-0x1,_0x3eff04);if(_0x3aea82>=0x0&&_0x3aea82<=Math['pow'](0x2,0x7*_0x3eff04)-0x2)return Buffer['concat']([Buffer[_0x5d6ef0(0x1d4)]([ID_VOID]),_0x12be24[_0x5d6ef0(0x1c5)](writeVint,_0x3aea82,_0x3eff04),Buffer['alloc'](_0x3aea82)]);}return Buffer[_0x5d6ef0(0x1d2)](0x0);}function findElement(_0x4313f9,_0x2ae040,_0x1f7989,_0x31fef8){const _0x40d8e5=_0x4731,_0xa0015e={'UFajy':function(_0x295f23,_0x1f7de0){return _0x295f23<_0x1f7de0;},'IbSyK':function(_0x366c87,_0x3cb063,_0x557535){return _0x366c87(_0x3cb063,_0x557535);},'AoaUN':function(_0x4cbcb7,_0x33bad6,_0x4997f8){return _0x4cbcb7(_0x33bad6,_0x4997f8);},'lYwvT':function(_0x42106b,_0x2c013e){return _0x42106b===_0x2c013e;}};let _0x343ddd=_0x2ae040;while(_0xa0015e['UFajy'](_0x343ddd,_0x1f7989)){const [_0x11b772,_0x48b2bc]=_0xa0015e[_0x40d8e5(0x1e4)](readId,_0x4313f9,_0x343ddd),[_0x489928,_0x2149ff]=_0xa0015e['AoaUN'](readVint,_0x4313f9,_0x343ddd+_0x48b2bc);if(_0xa0015e['lYwvT'](_0x11b772,_0x31fef8))return{'offset':_0x343ddd,'idLen':_0x48b2bc,'sizeLen':_0x2149ff,'dataSize':_0x489928,'dataOffset':_0x343ddd+_0x48b2bc+_0x2149ff};if(_0xa0015e['IbSyK'](isUnknownSize,_0x489928,_0x2149ff))break;_0x343ddd+=_0x48b2bc+_0x2149ff+_0x489928;}return null;}function computeDurationMs(_0x3530d9,_0x4f7305){const _0x1992d9=_0x4731,_0x570209={'iteva':function(_0x1ec429,_0x2c6870){return _0x1ec429<_0x2c6870;},'xfCBP':function(_0x38036c,_0x34a1c7){return _0x38036c!==_0x34a1c7;},'DGINX':function(_0x4593e8,_0x333a0f){return _0x4593e8+_0x333a0f;},'awBMo':function(_0x29a4de,_0x58d749){return _0x29a4de-_0x58d749;},'gxOmH':function(_0xd8e32c,_0x128333){return _0xd8e32c===_0x128333;},'NLRwG':function(_0x4b0dd7,_0x4e7b6c){return _0x4b0dd7+_0x4e7b6c;},'OUlpp':function(_0x155150,_0x89db5b,_0x4f5d44){return _0x155150(_0x89db5b,_0x4f5d44);},'fuRhd':function(_0x44202c,_0x4e871e){return _0x44202c+_0x4e871e;},'QVzRg':function(_0x20ce10,_0x5bab59,_0x5bbc06,_0x1b28ea){return _0x20ce10(_0x5bab59,_0x5bbc06,_0x1b28ea);},'aeBbP':function(_0x5994ab,_0x3a45cc){return _0x5994ab/_0x3a45cc;},'JZTzs':function(_0x38ae67,_0x1bbbce){return _0x38ae67*_0x1bbbce;},'IHRQU':function(_0x37c39f,_0x3d9746){return _0x37c39f+_0x3d9746;},'Lbyfg':function(_0x8abbe,_0x3d44e1){return _0x8abbe+_0x3d44e1;},'IBXQX':function(_0x329e8d,_0xb37d39){return _0x329e8d+_0xb37d39;}};let _0x3575fb=0x0;const _0x177000=Buffer['from']([0x1f,0x43,0xb6,0x75]);let _0x4a8210=_0x3530d9['indexOf'](_0x177000);if(_0x4a8210===-0x1)return 0x0;while(_0x570209['iteva'](_0x4a8210,_0x3530d9[_0x1992d9(0x1c0)])){const [_0x1171e9,_0x4bd294]=readId(_0x3530d9,_0x4a8210);if(_0x570209[_0x1992d9(0x1dc)](_0x1171e9,ID_CLUSTER))break;const [_0x3ff8be,_0x23e120]=readVint(_0x3530d9,_0x4a8210+_0x4bd294),_0x23c782=_0x570209[_0x1992d9(0x1ea)](_0x4a8210+_0x4bd294,_0x23e120),_0x2fa12b=isUnknownSize(_0x3ff8be,_0x23e120);let _0x1ab364;if(_0x2fa12b){let _0x5bba75=_0x23c782;while(_0x5bba75<_0x570209['awBMo'](_0x3530d9['length'],0x4)){const [_0xde8f91,_0x24b1c7]=readId(_0x3530d9,_0x5bba75);if(_0x570209[_0x1992d9(0x1bd)](_0xde8f91,ID_CLUSTER)){_0x1ab364=_0x5bba75;break;}const [_0x1cd505,_0xb842cd]=readVint(_0x3530d9,_0x5bba75+_0x24b1c7);if(isUnknownSize(_0x1cd505,_0xb842cd)){_0x1ab364=_0x3530d9['length'];break;}_0x5bba75+=_0x570209[_0x1992d9(0x1e3)](_0x24b1c7,_0xb842cd)+_0x1cd505;}_0x1ab364??=_0x3530d9['length'];}else _0x1ab364=_0x23c782+_0x3ff8be;let _0x4f0dc0=0x0,_0x272320=_0x23c782;while(_0x570209['iteva'](_0x272320,_0x1ab364)){const [_0x276b69,_0x2ce3b8]=_0x570209['OUlpp'](readId,_0x3530d9,_0x272320),[_0x57c0c9,_0x215e38]=_0x570209['OUlpp'](readVint,_0x3530d9,_0x570209[_0x1992d9(0x1b0)](_0x272320,_0x2ce3b8));if(_0x276b69===ID_TIMESTAMP)_0x4f0dc0=_0x570209['QVzRg'](readUint,_0x3530d9,_0x570209['DGINX'](_0x272320,_0x2ce3b8)+_0x215e38,_0x57c0c9);else{if(_0x276b69===ID_SIMPLE_BLOCK&&_0x57c0c9>=0x4){const _0x1b241d=_0x570209[_0x1992d9(0x1ea)](_0x272320,_0x2ce3b8)+_0x215e38,[,_0x4dbc1d]=_0x570209['OUlpp'](readVint,_0x3530d9,_0x1b241d),_0x14aaa6=_0x3530d9['readInt16BE'](_0x1b241d+_0x4dbc1d),_0x32e590=_0x570209['aeBbP'](_0x570209[_0x1992d9(0x1b9)](_0x570209[_0x1992d9(0x1d6)](_0x4f0dc0,_0x14aaa6),_0x4f7305),0xf4240);_0x32e590>_0x3575fb&&(_0x3575fb=_0x32e590);}else{if(_0x276b69===ID_CLUSTER)break;}}if(isUnknownSize(_0x57c0c9,_0x215e38))break;_0x272320+=_0x570209['Lbyfg'](_0x570209[_0x1992d9(0x1d9)](_0x2ce3b8,_0x215e38),_0x57c0c9);}_0x4a8210=_0x1ab364;}return _0x3575fb;}export function fixWebmDuration(_0x3e9c63,_0xfc2e2){const _0x3a2256=_0x4731,_0x3d69a7={'IYgzE':function(_0x514ec8,_0x238b31){return _0x514ec8(_0x238b31);},'zrCXI':function(_0x382639,_0xa63397){return _0x382639+_0xa63397;},'GNPQf':function(_0x3afc8e,_0x49f953){return _0x3afc8e!==_0x49f953;},'gqBuS':function(_0x5b92ab,_0x50a41b,_0x9916f){return _0x5b92ab(_0x50a41b,_0x9916f);},'AoJxq':function(_0x3fc18d,_0xcfe5b5){return _0x3fc18d+_0xcfe5b5;},'pFQDo':function(_0x252b18,_0x612ff5){return _0x252b18+_0x612ff5;},'nKudh':function(_0x24d398,_0x372052){return _0x24d398===_0x372052;},'MiiEQ':function(_0x519d26,_0xa98c73){return _0x519d26===_0xa98c73;},'CLnCw':function(_0x500e79,_0x178b4f){return _0x500e79+_0x178b4f;},'GLmwH':function(_0x4503d4,_0x2a7d5){return _0x4503d4===_0x2a7d5;},'uuzQO':'Could\x20not\x20find\x20Info\x20element','PnHFL':function(_0x5ade47,_0x5bfbe7,_0x36ca94,_0x247a4b,_0x367bfe){return _0x5ade47(_0x5bfbe7,_0x36ca94,_0x247a4b,_0x367bfe);},'LZWRH':function(_0x13e703,_0x34ea65){return _0x13e703<=_0x34ea65;},'dhvDe':_0x3a2256(0x1c3),'bhVRv':function(_0x2560eb,_0x21876c){return _0x2560eb/_0x21876c;},'YRLOR':function(_0x2c66fc,_0x690752){return _0x2c66fc(_0x690752);},'APrcT':function(_0x34161d,_0x14c0f2){return _0x34161d-_0x14c0f2;},'WHqKz':function(_0x188af0,_0x3d5efe){return _0x188af0<_0x3d5efe;},'tNsaG':function(_0x5bab77,_0x2584b1,_0x210eec,_0x1b0099,_0x219bda,_0x4fdbc7,_0x27cf83){return _0x5bab77(_0x2584b1,_0x210eec,_0x1b0099,_0x219bda,_0x4fdbc7,_0x27cf83);},'OGYrk':function(_0x50cbba,_0x47e4e7,_0x38c797){return _0x50cbba(_0x47e4e7,_0x38c797);},'gviIs':function(_0x4641cc,_0x1d1804){return _0x4641cc(_0x1d1804);},'hxFux':function(_0x31cc68,_0x3eb4ae,_0x4018cb){return _0x31cc68(_0x3eb4ae,_0x4018cb);}},_0x5b3503=_0x3d69a7['IYgzE'](readFileSync,_0x3e9c63);let _0x3063b8=0x0;const [_0x5ba079,_0x213992]=readId(_0x5b3503,_0x3063b8),[_0x5a5fa3,_0x4bc490]=readVint(_0x5b3503,_0x3d69a7[_0x3a2256(0x1cf)](_0x3063b8,_0x213992));_0x3063b8+=_0x213992+_0x4bc490+_0x5a5fa3;const [_0x534c31,_0x2dfab8]=readId(_0x5b3503,_0x3063b8);if(_0x3d69a7[_0x3a2256(0x1ca)](_0x534c31,ID_SEGMENT))return console[_0x3a2256(0x1c1)](_0x3a2256(0x1ba)),![];const [,_0x44ba10]=_0x3d69a7['gqBuS'](readVint,_0x5b3503,_0x3063b8+_0x2dfab8),_0x490604=_0x3d69a7['AoJxq'](_0x3d69a7['zrCXI'](_0x3063b8,_0x2dfab8),_0x44ba10);let _0x300bdb=_0x490604;const _0xde6137=Math[_0x3a2256(0x1cb)](_0x5b3503[_0x3a2256(0x1c0)],_0x3d69a7[_0x3a2256(0x1c9)](_0x490604,0x2710));let _0x407023=null,_0x241887=null;while(_0x300bdb<_0xde6137){const [_0x4857dd,_0x7a482]=readId(_0x5b3503,_0x300bdb),[_0x318209,_0x304ce2]=readVint(_0x5b3503,_0x300bdb+_0x7a482);_0x3d69a7[_0x3a2256(0x1b3)](_0x4857dd,ID_VOID)&&!_0x407023&&(_0x407023={'offset':_0x300bdb,'idLen':_0x7a482,'sizeLen':_0x304ce2,'dataSize':_0x318209,'dataOffset':_0x3d69a7['pFQDo'](_0x300bdb+_0x7a482,_0x304ce2)});if(_0x3d69a7[_0x3a2256(0x1be)](_0x4857dd,ID_INFO)){_0x241887={'offset':_0x300bdb,'idLen':_0x7a482,'sizeLen':_0x304ce2,'dataSize':_0x318209,'dataOffset':_0x3d69a7[_0x3a2256(0x1ce)](_0x300bdb,_0x7a482)+_0x304ce2};break;}if(_0x3d69a7[_0x3a2256(0x1ac)](_0x4857dd,ID_CLUSTER))break;if(_0x3d69a7[_0x3a2256(0x1bb)](isUnknownSize,_0x318209,_0x304ce2))break;_0x300bdb+=_0x3d69a7['CLnCw'](_0x7a482,_0x304ce2)+_0x318209;}if(!_0x241887)return console['error'](_0x3d69a7['uuzQO']),![];const _0x252220=_0x3d69a7['PnHFL'](findElement,_0x5b3503,_0x241887['dataOffset'],_0x241887['dataOffset']+_0x241887[_0x3a2256(0x1c7)],ID_DURATION);if(_0x252220)return![];const _0x15ec35=findElement(_0x5b3503,_0x241887[_0x3a2256(0x1e2)],_0x241887['dataOffset']+_0x241887['dataSize'],ID_TIMESTAMP_SCALE);let _0x2f3449=0xf4240;_0x15ec35&&(_0x2f3449=readUint(_0x5b3503,_0x15ec35[_0x3a2256(0x1e2)],_0x15ec35[_0x3a2256(0x1c7)]));const _0x4b2003=computeDurationMs(_0x5b3503,_0x2f3449);if(_0x3d69a7[_0x3a2256(0x1ab)](_0x4b2003,0x0))return console['error'](_0x3d69a7['dhvDe']),![];const _0xb216be=_0x3d69a7['bhVRv'](_0x4b2003*0xf4240,_0x2f3449),_0x3de4a3=Buffer['concat']([writeId(ID_DURATION),writeVint(0x8),_0x3d69a7[_0x3a2256(0x1b4)](writeFloat64,_0xb216be)]),_0x16cb52=_0x3de4a3[_0x3a2256(0x1c0)];if(!_0x407023||_0x407023['offset']<_0x241887['offset']){if(_0x407023){const _0x11efd7=_0x407023[_0x3a2256(0x1db)]+_0x407023[_0x3a2256(0x1bf)]+_0x407023['dataSize'],_0x3cc65e=_0x3d69a7[_0x3a2256(0x1e7)](_0x11efd7,_0x16cb52);if(_0x3d69a7[_0x3a2256(0x1da)](_0x3cc65e,0x2))return _0x3d69a7['tNsaG'](rewriteFile,_0x5b3503,_0x241887,_0x3de4a3,_0x2f3449,_0x4b2003,_0xfc2e2);const _0x4ddf1d=_0x3d69a7[_0x3a2256(0x1cf)](_0x241887[_0x3a2256(0x1c7)],_0x16cb52),_0x4fe651=Buffer['concat']([writeId(ID_INFO),_0x3d69a7[_0x3a2256(0x1b2)](writeVint,_0x4ddf1d,_0x241887[_0x3a2256(0x1bf)])]),_0x3ba57e=_0x5b3503['slice'](_0x241887[_0x3a2256(0x1e2)],_0x241887[_0x3a2256(0x1e2)]+_0x241887['dataSize']),_0x31feb6=_0x3d69a7[_0x3a2256(0x1af)](writeVoid,_0x3cc65e),_0x5162e8=_0x5b3503[_0x3a2256(0x1d0)](0x0,_0x407023['offset']),_0x19d4f1=_0x5b3503[_0x3a2256(0x1d0)](_0x241887[_0x3a2256(0x1e2)]+_0x241887[_0x3a2256(0x1c7)]);return _0x3d69a7['hxFux'](writeFileSync,_0xfc2e2,Buffer[_0x3a2256(0x1c6)]([_0x5162e8,_0x31feb6,_0x4fe651,_0x3ba57e,_0x3de4a3,_0x19d4f1])),!![];}}return _0x3d69a7['tNsaG'](rewriteFile,_0x5b3503,_0x241887,_0x3de4a3,_0x2f3449,_0x4b2003,_0xfc2e2);}function _0x4731(_0x1ce77a,_0x2164df){_0x1ce77a=_0x1ce77a-0x1a9;const _0x380dd8=_0x380d();let _0x47316c=_0x380dd8[_0x1ce77a];return _0x47316c;}function rewriteFile(_0x4341be,_0x222a6c,_0x26ad4d,_0x314f07,_0x172393,_0x22c381){const _0x56a8ad=_0x4731,_0x7e0ed4={'kQEIL':function(_0x357695,_0x42eb91){return _0x357695+_0x42eb91;},'uuAeR':function(_0x341b98,_0x5de1d6){return _0x341b98+_0x5de1d6;}},_0x7ab1de=_0x7e0ed4['kQEIL'](_0x222a6c[_0x56a8ad(0x1c7)],_0x26ad4d[_0x56a8ad(0x1c0)]),_0x3cd49b=Buffer['concat']([writeId(ID_INFO),writeVint(_0x7ab1de)]),_0xa1bbc8=_0x222a6c['idLen']+_0x222a6c['sizeLen'],_0x519ba5=_0x4341be['slice'](0x0,_0x222a6c[_0x56a8ad(0x1d3)]),_0x502365=_0x4341be['slice'](_0x222a6c[_0x56a8ad(0x1e2)],_0x7e0ed4['kQEIL'](_0x222a6c['dataOffset'],_0x222a6c['dataSize'])),_0x161b2f=_0x4341be['slice'](_0x7e0ed4['uuAeR'](_0x222a6c[_0x56a8ad(0x1d3)]+_0xa1bbc8,_0x222a6c[_0x56a8ad(0x1c7)]));return writeFileSync(_0x22c381,Buffer[_0x56a8ad(0x1c6)]([_0x519ba5,_0x3cd49b,_0x502365,_0x26ad4d,_0x161b2f])),!![];}if(process[_0x577e25(0x1eb)][0x1]?.[_0x577e25(0x1b7)](_0x577e25(0x1e9))||process['argv'][0x1]?.[_0x577e25(0x1b7)](_0x577e25(0x1c2))){const input=process[_0x577e25(0x1eb)][0x2],output=process[_0x577e25(0x1eb)][0x3];(!input||!output)&&(console[_0x577e25(0x1c1)](_0x577e25(0x1b5)),process['exit'](0x1));const fixed=fixWebmDuration(input,output);fixed?console[_0x577e25(0x1d5)](_0x577e25(0x1e8)+output):console['log']('File\x20already\x20has\x20duration\x20or\x20could\x20not\x20be\x20fixed.');}
|
|
@@ -1,44 +1 @@
|
|
|
1
|
-
import { execSync }
|
|
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(_0x4686e7,_0x580347){const _0x59edc6=_0x3b34,_0x25df38=_0x4686e7();while(!![]){try{const _0x32b7ef=parseInt(_0x59edc6(0x12c))/0x1+-parseInt(_0x59edc6(0x131))/0x2+parseInt(_0x59edc6(0x138))/0x3+parseInt(_0x59edc6(0x12f))/0x4*(parseInt(_0x59edc6(0x133))/0x5)+-parseInt(_0x59edc6(0x130))/0x6+-parseInt(_0x59edc6(0x13a))/0x7+parseInt(_0x59edc6(0x136))/0x8*(parseInt(_0x59edc6(0x135))/0x9);if(_0x32b7ef===_0x580347)break;else _0x25df38['push'](_0x25df38['shift']());}catch(_0x436eda){_0x25df38['push'](_0x25df38['shift']());}}}(_0x3a4e,0x2051d));import{execSync}from'child_process';function _0x3a4e(){const _0x42302d=['194632fsyqVr','pipe','232224hAGBhX','uwVfs','886760pDqudr','116514kGuypC','hOFQR','ojqzX','3900pejxLH','1387806HRayDf','171060VUdJsC','github.com/','1335MyuNMv','utf-8','45xFdMcj'];_0x3a4e=function(){return _0x42302d;};return _0x3a4e();}export function getGitBranch(){const _0x37941a=_0x3b34,_0x258d2a={'uwVfs':_0x37941a(0x134),'ojqzX':_0x37941a(0x137)};try{return execSync('git\x20rev-parse\x20--abbrev-ref\x20HEAD',{'encoding':_0x258d2a[_0x37941a(0x139)],'stdio':[_0x258d2a[_0x37941a(0x12e)],_0x258d2a['ojqzX'],_0x37941a(0x137)]})['trim']();}catch{return undefined;}}function _0x3b34(_0x2d9c07,_0x149087){_0x2d9c07=_0x2d9c07-0x12c;const _0x3a4eda=_0x3a4e();let _0x3b349c=_0x3a4eda[_0x2d9c07];return _0x3b349c;}export function getGitRepoUrl(){const _0x364b3c=_0x3b34,_0x35d5d8={'hOFQR':function(_0xb903f1,_0x591292,_0x15e3ab){return _0xb903f1(_0x591292,_0x15e3ab);},'LSowi':'git\x20remote\x20get-url\x20origin'};try{const _0x4feee7=_0x35d5d8[_0x364b3c(0x12d)](execSync,_0x35d5d8['LSowi'],{'encoding':_0x364b3c(0x134),'stdio':[_0x364b3c(0x137),_0x364b3c(0x137),'pipe']})['trim']();return _0x4feee7['replace'](/\.git$/,'')['replace'](/^git@github\.com:/,_0x364b3c(0x132))['replace'](/^https?:\/\//,'');}catch{return undefined;}}export function getGitInfo(){return{'branch':getGitBranch(),'repoUrl':getGitRepoUrl()};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x49c7c9=_0x2a90;(function(_0xb2a235,_0x30e67a){const _0xb6704a=_0x2a90,_0x17b961=_0xb2a235();while(!![]){try{const _0x3edb7d=parseInt(_0xb6704a(0xc0))/0x1+parseInt(_0xb6704a(0xbc))/0x2*(-parseInt(_0xb6704a(0xa4))/0x3)+parseInt(_0xb6704a(0xac))/0x4*(parseInt(_0xb6704a(0xaa))/0x5)+parseInt(_0xb6704a(0xaf))/0x6+-parseInt(_0xb6704a(0xb0))/0x7*(parseInt(_0xb6704a(0xb8))/0x8)+parseInt(_0xb6704a(0xcc))/0x9+-parseInt(_0xb6704a(0xb6))/0xa*(parseInt(_0xb6704a(0xab))/0xb);if(_0x3edb7d===_0x30e67a)break;else _0x17b961['push'](_0x17b961['shift']());}catch(_0xc4a6c7){_0x17b961['push'](_0x17b961['shift']());}}}(_0x5e48,0x1ced6));const _0xeddcd2=(function(){const _0x43806d=_0x2a90,_0x57a4fa={'XbIgB':function(_0x45f165,_0x4b5d6b){return _0x45f165===_0x4b5d6b;},'QXTsd':'URbyj','omYbA':_0x43806d(0xc4)};let _0x479cdc=!![];return function(_0x8ea037,_0x456518){const _0x426ca3=_0x479cdc?function(){const _0x5e7c63=_0x2a90;if(_0x57a4fa['XbIgB'](_0x57a4fa[_0x5e7c63(0xcd)],_0x57a4fa['omYbA']))return _0x290892[_0x5e7c63(0xad)][_0x7dc336];else{if(_0x456518){const _0x4191e1=_0x456518[_0x5e7c63(0xd0)](_0x8ea037,arguments);return _0x456518=null,_0x4191e1;}}}:function(){};return _0x479cdc=![],_0x426ca3;};}()),_0x263d03=_0xeddcd2(this,function(){const _0x420cf3=_0x2a90,_0x1f9c4b={'cbVZj':_0x420cf3(0xbd)};return _0x263d03['toString']()[_0x420cf3(0xa9)](_0x1f9c4b[_0x420cf3(0xbe)])[_0x420cf3(0xc1)]()[_0x420cf3(0xcb)](_0x263d03)[_0x420cf3(0xa9)](_0x1f9c4b[_0x420cf3(0xbe)]);});_0x263d03();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='RANGER_MCP_TOKEN',TOKEN_DIR=getRangerHomeDir(),TOKEN_PATH=join(TOKEN_DIR,_0x49c7c9(0xb2)),REFRESH_TOKEN_PATH=join(TOKEN_DIR,'refresh.txt');function isGitHubCI(){const _0x1fcbc6=_0x49c7c9;return!!process[_0x1fcbc6(0xad)][_0x1fcbc6(0xc5)];}function _0x2a90(_0x4d7965,_0x259acb){_0x4d7965=_0x4d7965-0xa3;const _0x28ab04=_0x5e48();let _0x263d03=_0x28ab04[_0x4d7965];if(_0x2a90['IvfQXy']===undefined){var _0xeddcd2=function(_0x304e8f){const _0x23deb8='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x26e5a6='',_0x198e4f='',_0x2bfc32=_0x26e5a6+_0xeddcd2;for(let _0x246fe1=0x0,_0x28a0cb,_0x56c62d,_0x144941=0x0;_0x56c62d=_0x304e8f['charAt'](_0x144941++);~_0x56c62d&&(_0x28a0cb=_0x246fe1%0x4?_0x28a0cb*0x40+_0x56c62d:_0x56c62d,_0x246fe1++%0x4)?_0x26e5a6+=_0x2bfc32['charCodeAt'](_0x144941+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x28a0cb>>(-0x2*_0x246fe1&0x6)):_0x246fe1:0x0){_0x56c62d=_0x23deb8['indexOf'](_0x56c62d);}for(let _0x5cb3f4=0x0,_0x18e17d=_0x26e5a6['length'];_0x5cb3f4<_0x18e17d;_0x5cb3f4++){_0x198e4f+='%'+('00'+_0x26e5a6['charCodeAt'](_0x5cb3f4)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x198e4f);};_0x2a90['jzwvLj']=_0xeddcd2,_0x2a90['mTQUUa']={},_0x2a90['IvfQXy']=!![];}const _0x5e485a=_0x28ab04[0x0],_0x2a905a=_0x4d7965+_0x5e485a,_0x2cae94=_0x2a90['mTQUUa'][_0x2a905a];if(!_0x2cae94){const _0x5a44f1=function(_0x5c9196){this['KyBNnm']=_0x5c9196,this['XxZzfJ']=[0x1,0x0,0x0],this['HRZogB']=function(){return'newState';},this['HvaSMu']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['PjVYOm']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x5a44f1['prototype']['ZyckyY']=function(){const _0x237e43=new RegExp(this['HvaSMu']+this['PjVYOm']),_0x4ded2f=_0x237e43['test'](this['HRZogB']['toString']())?--this['XxZzfJ'][0x1]:--this['XxZzfJ'][0x0];return this['lEvoFx'](_0x4ded2f);},_0x5a44f1['prototype']['lEvoFx']=function(_0x389093){if(!Boolean(~_0x389093))return _0x389093;return this['IAASdW'](this['KyBNnm']);},_0x5a44f1['prototype']['IAASdW']=function(_0x50eb75){for(let _0x3305b4=0x0,_0x1a1ea5=this['XxZzfJ']['length'];_0x3305b4<_0x1a1ea5;_0x3305b4++){this['XxZzfJ']['push'](Math['round'](Math['random']())),_0x1a1ea5=this['XxZzfJ']['length'];}return _0x50eb75(this['XxZzfJ'][0x0]);},new _0x5a44f1(_0x2a90)['ZyckyY'](),_0x263d03=_0x2a90['jzwvLj'](_0x263d03),_0x2a90['mTQUUa'][_0x2a905a]=_0x263d03;}else _0x263d03=_0x2cae94;return _0x263d03;}function _0x5e48(){const _0x126438=['wgjTAMm','v1vTzgK','z29Suuu','v0j6qM8','y29UC3rYDwn0B3i','mtu5nJeXnevqvLnOuq','uvHuC2q','zKDNu3m','ANfMuK0','yxbWBhK','s25Hq3q','otyWmdzrAvPoAwS','CK1TDhi','zuTwzwO','EKvjBuG','ywnqq2m','C2vHCMnO','ndq1oda1vhPmqunz','ode3m3L4quHTDa','ognNDxvjrq','zw52','EgXTChm','mtmXnde3ngjhC0HbEa','mJGZntDUve5KENy','CND2wve','y2XPlNr4Da','zfDWzhG','DxrMltG','whDIELi','ndCXmfPmCLLAtW','DhjPBq','mJGWwxD1sxHi','s1nTv2u','sMXer0G','qMjzAhm','oePquKnTtW','kcGOlISPkYKRksSK','y2jwwMO','q0zyDey','mtyZntm1DhP3Cw1Z','Dg9tDhjPBMC','wgHOuey','DKjtrfC','B0rmD0i','r0Lusfvcx0vovG','sMPtr1C'];_0x5e48=function(){return _0x126438;};return _0x5e48();}async function writeToGitHubEnv(_0x4d0110,_0x2f3e63){const _0x23647d=_0x49c7c9,_0x4d00ba={'MeXZU':_0x23647d(0xb9),'vfvwP':function(_0x589e9d,_0x13ac44,_0x2ee4d2){return _0x589e9d(_0x13ac44,_0x2ee4d2);}},_0x21aa4c=process[_0x23647d(0xad)][_0x23647d(0xc5)];if(_0x21aa4c){if(_0x23647d(0xb9)===_0x4d00ba['MeXZU'])await _0x4d00ba['vfvwP'](appendFile,_0x21aa4c,_0x4d0110+'='+_0x2f3e63+'\x0a');else{const _0x236c7b=_0xcf5a0a['apply'](_0x41e017,arguments);return _0x347ce1=null,_0x236c7b;}}}export async function storeToken(_0x205c5c){const _0x2ef10d=_0x49c7c9,_0x171d4d={'eKVej':function(_0xea4ef5,_0x49c92d,_0x5ee653){return _0xea4ef5(_0x49c92d,_0x5ee653);},'XhhPF':function(_0x5c5e68,_0x53625a,_0x3d2bc0,_0x2897c4){return _0x5c5e68(_0x53625a,_0x3d2bc0,_0x2897c4);}};isGitHubCI()?await _0x171d4d['eKVej'](writeToGitHubEnv,ENV_TOKEN,_0x205c5c):(await _0x171d4d[_0x2ef10d(0xa6)](mkdir,TOKEN_DIR,{'recursive':!![]}),await _0x171d4d[_0x2ef10d(0xc2)](writeFile,TOKEN_PATH,_0x205c5c,{'mode':0x180}));}export async function getToken(){const _0x4189b3=_0x49c7c9,_0x5bace6={'JjSGW':function(_0x38894f,_0x192e22){return _0x38894f!==_0x192e22;},'MprBE':_0x4189b3(0xb3),'WUmdi':_0x4189b3(0xa3),'XwbzR':_0x4189b3(0xb4)};if(process['env'][ENV_TOKEN])return _0x5bace6[_0x4189b3(0xc6)](_0x5bace6['MprBE'],_0x5bace6[_0x4189b3(0xc8)])?process['env'][ENV_TOKEN]:![];if(process[_0x4189b3(0xad)][ENV_TOKEN_LEGACY])return process[_0x4189b3(0xad)][ENV_TOKEN_LEGACY];try{const _0xda5052=await readFile(TOKEN_PATH,_0x5bace6[_0x4189b3(0xb5)]);return _0xda5052[_0x4189b3(0xb7)]()||null;}catch{return null;}}export async function deleteToken(){const _0x49afa0=_0x49c7c9,_0x1dd7f7={'acPCc':function(_0x2d73bf,_0x40eee9){return _0x2d73bf===_0x40eee9;},'jqfRM':_0x49afa0(0xce),'Xbmjc':function(_0x3942ac,_0x11cc2a){return _0x3942ac(_0x11cc2a);}};try{return _0x1dd7f7[_0x49afa0(0xa8)](_0x49afa0(0xb1),_0x1dd7f7[_0x49afa0(0xcf)])?![]:(await _0x1dd7f7[_0x49afa0(0xc7)](unlink,TOKEN_PATH),!![]);}catch{return![];}}export async function storeRefreshToken(_0x4f00ce){const _0x3683f8={'nKHZh':function(_0x4a056e,_0x1685f7,_0x1c09dd){return _0x4a056e(_0x1685f7,_0x1c09dd);},'aQmqD':function(_0xa6b5bf,_0x29e493,_0x1c720f,_0x3208cb){return _0xa6b5bf(_0x29e493,_0x1c720f,_0x3208cb);}};await _0x3683f8['nKHZh'](mkdir,TOKEN_DIR,{'recursive':!![]}),await _0x3683f8['aQmqD'](writeFile,REFRESH_TOKEN_PATH,_0x4f00ce,{'mode':0x180});}export async function getRefreshToken(){const _0x36abca=_0x49c7c9,_0x4f45f5={'golQE':function(_0x225892,_0xcf38da,_0x6800cc){return _0x225892(_0xcf38da,_0x6800cc);}};try{const _0x483f92=await _0x4f45f5[_0x36abca(0xc9)](readFile,REFRESH_TOKEN_PATH,_0x36abca(0xb4));return _0x483f92[_0x36abca(0xb7)]()||null;}catch{return null;}}export async function deleteRefreshToken(){const _0x54ae84=_0x49c7c9,_0x38a883={'vBSDW':function(_0x5667b7,_0x12202a){return _0x5667b7===_0x12202a;},'WBzBo':_0x54ae84(0xba),'HVvzc':function(_0x1cf3ec,_0x47c430){return _0x1cf3ec!==_0x47c430;},'xlmps':_0x54ae84(0xa7),'rMmtr':_0x54ae84(0xbf)};try{return _0x38a883[_0x54ae84(0xc3)](_0x38a883['WBzBo'],_0x38a883[_0x54ae84(0xca)])?(await unlink(REFRESH_TOKEN_PATH),!![]):null;}catch{return _0x38a883['HVvzc'](_0x38a883[_0x54ae84(0xae)],_0x38a883[_0x54ae84(0xa5)])?![]:_0x4f14aa[_0x54ae84(0xad)][_0x1dd2e4];}}export async function deleteAllCredentials(){const _0x288515=_0x49c7c9,_0x52c8d7={'BbYhs':function(_0x1ec03c){return _0x1ec03c();}};await _0x52c8d7[_0x288515(0xbb)](deleteToken),await _0x52c8d7[_0x288515(0xbb)](deleteRefreshToken);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x11eb(_0x341631,_0x3f4971){_0x341631=_0x341631-0x168;const _0x35933b=_0x4c5c();let _0x18fe8c=_0x35933b[_0x341631];if(_0x11eb['RXtLYi']===undefined){var _0x9af53a=function(_0x14fbc0){const _0x89f978='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x28460b='',_0x10262b='',_0x47aa67=_0x28460b+_0x9af53a;for(let _0x40317e=0x0,_0x38311a,_0x42872d,_0x4798fa=0x0;_0x42872d=_0x14fbc0['charAt'](_0x4798fa++);~_0x42872d&&(_0x38311a=_0x40317e%0x4?_0x38311a*0x40+_0x42872d:_0x42872d,_0x40317e++%0x4)?_0x28460b+=_0x47aa67['charCodeAt'](_0x4798fa+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x38311a>>(-0x2*_0x40317e&0x6)):_0x40317e:0x0){_0x42872d=_0x89f978['indexOf'](_0x42872d);}for(let _0x525cb9=0x0,_0x3118d2=_0x28460b['length'];_0x525cb9<_0x3118d2;_0x525cb9++){_0x10262b+='%'+('00'+_0x28460b['charCodeAt'](_0x525cb9)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x10262b);};_0x11eb['afiPJa']=_0x9af53a,_0x11eb['sAHGJH']={},_0x11eb['RXtLYi']=!![];}const _0x4c5c34=_0x35933b[0x0],_0x11eb6e=_0x341631+_0x4c5c34,_0x33edf3=_0x11eb['sAHGJH'][_0x11eb6e];if(!_0x33edf3){const _0xa06b2f=function(_0x2706b1){this['xRQuyR']=_0x2706b1,this['HddbBA']=[0x1,0x0,0x0],this['qcqTms']=function(){return'newState';},this['XNzzDt']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['uZdoGe']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0xa06b2f['prototype']['InSqDn']=function(){const _0x26d0e8=new RegExp(this['XNzzDt']+this['uZdoGe']),_0x1b9c44=_0x26d0e8['test'](this['qcqTms']['toString']())?--this['HddbBA'][0x1]:--this['HddbBA'][0x0];return this['UXFMuW'](_0x1b9c44);},_0xa06b2f['prototype']['UXFMuW']=function(_0x54eec6){if(!Boolean(~_0x54eec6))return _0x54eec6;return this['wMPjbl'](this['xRQuyR']);},_0xa06b2f['prototype']['wMPjbl']=function(_0x54a75b){for(let _0x4bf6f4=0x0,_0x174cbe=this['HddbBA']['length'];_0x4bf6f4<_0x174cbe;_0x4bf6f4++){this['HddbBA']['push'](Math['round'](Math['random']())),_0x174cbe=this['HddbBA']['length'];}return _0x54a75b(this['HddbBA'][0x0]);},new _0xa06b2f(_0x11eb)['InSqDn'](),_0x18fe8c=_0x11eb['afiPJa'](_0x18fe8c),_0x11eb['sAHGJH'][_0x11eb6e]=_0x18fe8c;}else _0x18fe8c=_0x33edf3;return _0x18fe8c;}(function(_0x119a16,_0x25537d){const _0x536d55=_0x11eb,_0x4dabac=_0x119a16();while(!![]){try{const _0x5ae2e2=parseInt(_0x536d55(0x184))/0x1*(-parseInt(_0x536d55(0x180))/0x2)+parseInt(_0x536d55(0x16d))/0x3+-parseInt(_0x536d55(0x178))/0x4+parseInt(_0x536d55(0x17c))/0x5*(parseInt(_0x536d55(0x181))/0x6)+parseInt(_0x536d55(0x16f))/0x7+parseInt(_0x536d55(0x175))/0x8*(-parseInt(_0x536d55(0x183))/0x9)+parseInt(_0x536d55(0x16b))/0xa;if(_0x5ae2e2===_0x25537d)break;else _0x4dabac['push'](_0x4dabac['shift']());}catch(_0x46f6e2){_0x4dabac['push'](_0x4dabac['shift']());}}}(_0x4c5c,0x514d4));const _0x9af53a=(function(){const _0xd53da0=_0x11eb,_0x542350={'GnGAX':_0xd53da0(0x16e),'rpsri':function(_0x1ddab2,_0x3a4cf8){return _0x1ddab2!==_0x3a4cf8;},'dPBgF':'QXGxR','TfpdK':_0xd53da0(0x170),'BJORc':function(_0x18d653,_0x5c9739){return _0x18d653!==_0x5c9739;},'GylFp':_0xd53da0(0x182)};let _0x314a8a=!![];return function(_0x163de4,_0x3c82be){const _0x3006fe=_0xd53da0,_0x213dfc={'TEIQv':_0x542350[_0x3006fe(0x18d)],'rLqkK':function(_0x1fc3ad,_0x1e9b25){const _0x105b98=_0x3006fe;return _0x542350[_0x105b98(0x17a)](_0x1fc3ad,_0x1e9b25);},'FUQWe':_0x542350[_0x3006fe(0x18b)],'CpTdf':_0x542350['TfpdK']};if(_0x542350[_0x3006fe(0x16a)](_0x542350[_0x3006fe(0x173)],_0x3006fe(0x168))){const _0x4c1fd9=_0x314a8a?function(){const _0x493e42=_0x3006fe;if(_0x213dfc['TEIQv']===_0x213dfc[_0x493e42(0x176)]){if(_0x3c82be){if(_0x213dfc['rLqkK'](_0x213dfc[_0x493e42(0x177)],_0x213dfc[_0x493e42(0x186)])){const _0xdc85f8=_0x3c82be['apply'](_0x163de4,arguments);return _0x3c82be=null,_0xdc85f8;}else{if(_0x3a8786){const _0x131dba=_0x169e33[_0x493e42(0x17f)](_0xe0a816,arguments);return _0x1c1d6a=null,_0x131dba;}}}}else{const _0x467ac7=_0x2a377f[_0x493e42(0x17f)](_0x296423,arguments);return _0x4f6b92=null,_0x467ac7;}}:function(){};return _0x314a8a=![],_0x4c1fd9;}else return;};}()),_0x18fe8c=_0x9af53a(this,function(){const _0x290912=_0x11eb,_0x55bd7b={'kljig':_0x290912(0x187)};return _0x18fe8c[_0x290912(0x188)]()['search'](_0x55bd7b['kljig'])[_0x290912(0x188)]()[_0x290912(0x17b)](_0x18fe8c)[_0x290912(0x17d)](_0x55bd7b['kljig']);});_0x18fe8c();import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';function _0x4c5c(){const _0x3fc99d=['y29UC3rYDwn0B3i','mJi5merpBgDyEG','C2vHCMnO','qMn2ywe','yxbWBhK','mZaYmtGWrxjeCKzb','mZm0oeXcD1zsyG','ufLIuKW','mti2Cw5kENvc','mwzAt3LjDG','yu5HsLK','q3buzgy','kcGOlISPkYKRksSK','Dg9tDhjPBMC','C3rYAw5NAwz5','l2fWAs92ms9Ty3aVBg9JywWTywDLBNqTAw5ZDgfSBgf0Aw9UCW','zfbcz0y','rMfPBgvKihrVigXVzYbZA2LSBcbPBNn0ywXSyxrPB246ia','r25hqvG','r0TeDNe','Dvznruu','qKPpuMm','mtyWnZK5mgHKrefNCq','yxbWBgLJyxrPB24VANnVBG','mtC2ntK2nvjpte9OrW','q0X1reG','ndyZndqYn0TcBurvqG','qLnLt0K','DMThrMO','BNDOz28','r3LSrNa','zxjYB3i','mZq4odK2yu5Mu3nW','vevjuxy','rLvrv2u','mJi4otyZnNfyt3vJwG','Dgv4Da','CNbZCMK'];_0x4c5c=function(){return _0x3fc99d;};return _0x4c5c();}export async function logLocalAgentInstallation(_0x2f30b7,_0x563be8,_0x19f623){const _0x4e6953=_0x11eb,_0xba6699={'uVMEE':_0x4e6953(0x187),'vkGFj':function(_0x3aa530){return _0x3aa530();},'aNaJY':'DwpgR','Bcvaa':_0x4e6953(0x16c)},_0x319adf=await _0xba6699[_0x4e6953(0x171)](getToken);if(!_0x319adf){if(_0x4e6953(0x172)!==_0xba6699[_0x4e6953(0x185)])return;else return _0x18045b['toString']()['search'](CAWvBt[_0x4e6953(0x169)])[_0x4e6953(0x188)]()[_0x4e6953(0x17b)](_0x52f641)['search'](CAWvBt[_0x4e6953(0x169)]);}const _0x3ec9a1=_0xba6699[_0x4e6953(0x171)](getApiBaseUrl),_0x4ca312=await fetch(_0x3ec9a1+_0x4e6953(0x18a),{'method':'POST','headers':{'Authorization':'Bearer\x20'+_0x319adf,'Content-Type':_0xba6699[_0x4e6953(0x17e)]},'body':JSON[_0x4e6953(0x189)]({'skillName':_0x2f30b7,'cliVersion':_0x19f623,'metadata':_0x563be8})});if(!_0x4ca312['ok']){const _0x6f0923=await _0x4ca312[_0x4e6953(0x179)]();console[_0x4e6953(0x174)](_0x4e6953(0x18c)+_0x6f0923);}}
|
|
@@ -1,8 +1 @@
|
|
|
1
|
-
const DEFAULT_PROFILE_COMMAND = '
|
|
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
|
+
const _0x2c47f2=_0x5086;(function(_0x3f0bba,_0x50ff25){const _0x5292fa=_0x5086,_0x47be17=_0x3f0bba();while(!![]){try{const _0x534186=-parseInt(_0x5292fa(0x1d2))/0x1+parseInt(_0x5292fa(0x1d1))/0x2*(parseInt(_0x5292fa(0x1d4))/0x3)+parseInt(_0x5292fa(0x1cf))/0x4+parseInt(_0x5292fa(0x1d5))/0x5*(-parseInt(_0x5292fa(0x1cd))/0x6)+parseInt(_0x5292fa(0x1d3))/0x7+parseInt(_0x5292fa(0x1ca))/0x8+-parseInt(_0x5292fa(0x1d0))/0x9*(parseInt(_0x5292fa(0x1cc))/0xa);if(_0x534186===_0x50ff25)break;else _0x47be17['push'](_0x47be17['shift']());}catch(_0x356f72){_0x47be17['push'](_0x47be17['shift']());}}}(_0x3f1c,0x683f3));const DEFAULT_PROFILE_COMMAND=_0x2c47f2(0x1ce);export function formatProfileRequiredMessage(_0x284f56){const _0x1839f5=_0x2c47f2,_0x38fc4c={'fYIXo':function(_0x3bddb9,_0x9fe293){return _0x3bddb9(_0x9fe293);}},_0x4e6509=_0x284f56?_0x38fc4c['fYIXo'](_0x284f56,DEFAULT_PROFILE_COMMAND):DEFAULT_PROFILE_COMMAND;return _0x1839f5(0x1cb)+_0x4e6509+'.';}function _0x5086(_0x37c878,_0x4badc5){_0x37c878=_0x37c878-0x1ca;const _0x3f1caf=_0x3f1c();let _0x5086bd=_0x3f1caf[_0x37c878];return _0x5086bd;}function _0x3f1c(){const _0x20a9ca=['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','18710PMxuvL','11526vAdfAw','ranger\x20profile\x20add\x20local','3254272NAKShZ','2952grFZDh','10jqofHb','424491PUOYEF','231623DIOjCp','204933lBZEXT','985SJkJnA','5243192NxtvIT'];_0x3f1c=function(){return _0x20a9ca;};return _0x3f1c();}
|
|
@@ -1,167 +1 @@
|
|
|
1
|
-
const
|
|
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 _0x1cf3(_0x5eb270,_0x17cc75){_0x5eb270=_0x5eb270-0xef;const _0x11dd75=_0x11dd();let _0x1cf398=_0x11dd75[_0x5eb270];return _0x1cf398;}(function(_0x445f64,_0x5d5632){const _0x1b8eed=_0x1cf3,_0x69109c=_0x445f64();while(!![]){try{const _0x4c95ac=parseInt(_0x1b8eed(0xfc))/0x1*(parseInt(_0x1b8eed(0x100))/0x2)+parseInt(_0x1b8eed(0x103))/0x3*(parseInt(_0x1b8eed(0xf2))/0x4)+-parseInt(_0x1b8eed(0xf4))/0x5+parseInt(_0x1b8eed(0xf7))/0x6*(parseInt(_0x1b8eed(0xfb))/0x7)+parseInt(_0x1b8eed(0xf5))/0x8+parseInt(_0x1b8eed(0xf9))/0x9+-parseInt(_0x1b8eed(0xf1))/0xa;if(_0x4c95ac===_0x5d5632)break;else _0x69109c['push'](_0x69109c['shift']());}catch(_0x3d60eb){_0x69109c['push'](_0x69109c['shift']());}}}(_0x11dd,0xd1d24));const PROFILE_SETUP_BANNER_SCRIPT=((()=>{const _0x455fc8=_0x1cf3,_0x53a81b={'CAqiR':function(_0x588369,_0x2846d2){return _0x588369+_0x2846d2;},'XeYQB':function(_0x5bbf61,_0x428e8e){return _0x5bbf61+_0x428e8e;},'zUukB':_0x455fc8(0xf3),'OuCKC':'<div\x20class=\x22ranger-banner__heading\x22>Ranger\x20Feature\x20Review</div>','HeYQQ':_0x455fc8(0xf0),'oZzdR':_0x455fc8(0xf8)},_0x2f680c=_0x53a81b['CAqiR'](_0x53a81b['XeYQB'](_0x53a81b['zUukB']+_0x53a81b[_0x455fc8(0xfa)],'<div\x20class=\x22ranger-banner__message\x22>')+_0x53a81b[_0x455fc8(0xfe)]+_0x455fc8(0xff)+_0x455fc8(0xf8),_0x53a81b[_0x455fc8(0x102)])+_0x455fc8(0xef),_0x4729f6='\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'\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'+JSON['stringify'](_0x2f680c)+_0x455fc8(0x101)+JSON[_0x455fc8(0xfd)](_0x4729f6)+';\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';})());export function getProfileSetupBannerScript(){return PROFILE_SETUP_BANNER_SCRIPT;}function _0x11dd(){const _0x49ffb8=['2226595loGcet','3IefmYe','stringify','HeYQQ','<span\x20class=\x22ranger-banner__text\x22>navigate\x20to\x20your\x20locally\x20running\x20app\x20and\x20log\x20in.\x20Close\x20the\x20browser\x20window\x20when\x20you\x20are\x20done.</span>','358754IfwePm',';\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','oZzdR','1320027uHUrzu','<button\x20class=\x22ranger-banner__close\x22\x20type=\x22button\x22\x20aria-label=\x22Dismiss\x20banner\x22>X</button>','<span\x20class=\x22ranger-banner__title\x22>Profile\x20setup:</span>','4573240kPDPPh','4lomXsG','<div\x20class=\x22ranger-banner__content\x22>','4202090rgXzod','5588416kAugBD','addInitScript','6UVlpZd','</div>','1461537rQxHNH','OuCKC'];_0x11dd=function(){return _0x49ffb8;};return _0x11dd();}export async function addProfileSetupBanner(_0x27c884){const _0x3b6eff=_0x1cf3;await _0x27c884[_0x3b6eff(0xf6)]({'content':PROFILE_SETUP_BANNER_SCRIPT});}
|
|
@@ -1,60 +1 @@
|
|
|
1
|
-
import { dirname, join, parse }
|
|
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(_0x48b045,_0x329aeb){const _0x1903d8=_0xd188,_0x3f8215=_0x48b045();while(!![]){try{const _0x447aa1=-parseInt(_0x1903d8(0x1be))/0x1*(parseInt(_0x1903d8(0x1b5))/0x2)+parseInt(_0x1903d8(0x1b9))/0x3+parseInt(_0x1903d8(0x1bd))/0x4*(parseInt(_0x1903d8(0x1b4))/0x5)+parseInt(_0x1903d8(0x1c2))/0x6*(parseInt(_0x1903d8(0x1c0))/0x7)+parseInt(_0x1903d8(0x1b7))/0x8*(parseInt(_0x1903d8(0x1c3))/0x9)+parseInt(_0x1903d8(0x1ba))/0xa+-parseInt(_0x1903d8(0x1b3))/0xb;if(_0x447aa1===_0x329aeb)break;else _0x3f8215['push'](_0x3f8215['shift']());}catch(_0xe68588){_0x3f8215['push'](_0x3f8215['shift']());}}}(_0x58f4,0x3bbf5));import{dirname,join,parse}from'path';function _0xd188(_0x9e188,_0xeb7a5b){_0x9e188=_0x9e188-0x1af;const _0x58f446=_0x58f4();let _0xd1880f=_0x58f446[_0x9e188];return _0xd1880f;}import{existsSync}from'fs';import{homedir}from'os';export function getRangerRoot(){const _0x1d4ace=_0xd188,_0x5dc825={'Fmetz':function(_0x436902,_0x6b32ad){return _0x436902(_0x6b32ad);},'YPbSy':function(_0x1b2208,_0xea3ddb){return _0x1b2208!==_0xea3ddb;},'qhaOR':function(_0x256b01,_0x559a61,_0x21042f){return _0x256b01(_0x559a61,_0x21042f);},'DYbDg':function(_0x58ff8a){return _0x58ff8a();}};let _0x27a26f=process['cwd']();const _0x4228bf=_0x5dc825[_0x1d4ace(0x1c1)](parse,_0x27a26f)['root'];while(_0x5dc825[_0x1d4ace(0x1bf)](_0x27a26f,_0x4228bf)){if(_0x5dc825[_0x1d4ace(0x1c1)](existsSync,_0x5dc825[_0x1d4ace(0x1b0)](join,_0x27a26f,_0x1d4ace(0x1b6))))return _0x27a26f;_0x27a26f=dirname(_0x27a26f);}if(existsSync(_0x5dc825[_0x1d4ace(0x1b0)](join,_0x4228bf,_0x1d4ace(0x1b6))))return _0x4228bf;const _0x1be02f=_0x5dc825['DYbDg'](findGitRoot);if(_0x1be02f)return _0x1be02f;return process['cwd']();}export function getRangerDir(){const _0x3a138a=_0xd188,_0x3bc600={'sHwDw':function(_0x3e1ab8,_0x133b09,_0x44f61c){return _0x3e1ab8(_0x133b09,_0x44f61c);},'DaHTQ':function(_0x5df080){return _0x5df080();}};return _0x3bc600[_0x3a138a(0x1b1)](join,_0x3bc600['DaHTQ'](getRangerRoot),'.ranger');}function _0x58f4(){const _0x5eddb5=['5871811ykzqPl','476815jBSjOB','724618xiygSg','.ranger','46224xYCvFH','.git','1025814EbFoBH','1482890DEGDTc','vDZdc','rrcRh','8tPVtai','1XQEBTw','YPbSy','50764KwohMv','Fmetz','108UfvZDA','513glwtiy','Mjdpn','qhaOR','sHwDw','root'];_0x58f4=function(){return _0x5eddb5;};return _0x58f4();}export function findGitRoot(){const _0x495f37=_0xd188,_0x127e70={'rrcRh':function(_0x57469d,_0x460261){return _0x57469d(_0x460261);},'xBEzj':function(_0x53f8a3,_0x33c876){return _0x53f8a3!==_0x33c876;},'vDZdc':function(_0x70ab66,_0x19d81b,_0x1ff4b9){return _0x70ab66(_0x19d81b,_0x1ff4b9);},'cxPdo':'.git'};let _0x35d9db=process['cwd']();const _0x11f79e=_0x127e70[_0x495f37(0x1bc)](parse,_0x35d9db)[_0x495f37(0x1b2)];while(_0x127e70['xBEzj'](_0x35d9db,_0x11f79e)){if(_0x127e70['rrcRh'](existsSync,_0x127e70['vDZdc'](join,_0x35d9db,_0x495f37(0x1b8))))return _0x35d9db;_0x35d9db=_0x127e70[_0x495f37(0x1bc)](dirname,_0x35d9db);}if(existsSync(_0x127e70[_0x495f37(0x1bb)](join,_0x11f79e,_0x127e70['cxPdo'])))return _0x11f79e;return null;}export function getRangerHomeDir(){const _0x18c470=_0xd188,_0x5039de={'Mjdpn':function(_0x979adc){return _0x979adc();}};return join(_0x5039de[_0x18c470(0x1af)](homedir),'.ranger');}
|
|
@@ -1,130 +1 @@
|
|
|
1
|
-
import { readdir }
|
|
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(``);
|
|
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(``);
|
|
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(_0x318bff,_0x1b6dab){const _0x4d5bb1=_0xa6b0,_0x236b57=_0x318bff();while(!![]){try{const _0x2bebfe=-parseInt(_0x4d5bb1(0x8d))/0x1*(parseInt(_0x4d5bb1(0x75))/0x2)+parseInt(_0x4d5bb1(0x8a))/0x3*(-parseInt(_0x4d5bb1(0x90))/0x4)+parseInt(_0x4d5bb1(0x86))/0x5*(parseInt(_0x4d5bb1(0x7b))/0x6)+parseInt(_0x4d5bb1(0x7c))/0x7+-parseInt(_0x4d5bb1(0x8b))/0x8*(parseInt(_0x4d5bb1(0x9b))/0x9)+-parseInt(_0x4d5bb1(0x8c))/0xa+parseInt(_0x4d5bb1(0x8e))/0xb*(parseInt(_0x4d5bb1(0x87))/0xc);if(_0x2bebfe===_0x1b6dab)break;else _0x236b57['push'](_0x236b57['shift']());}catch(_0x295825){_0x236b57['push'](_0x236b57['shift']());}}}(_0x4a94,0xbf893));import{readdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';export async function collectScreenshots(_0x3e71f3){const _0x440684=_0xa6b0,_0x4bdde4={'PxjBC':function(_0x17f3ec,_0x254e60){return _0x17f3ec(_0x254e60);},'ZwUrA':function(_0x4c0163,_0x444b37,_0x35cd61){return _0x4c0163(_0x444b37,_0x35cd61);}},_0x2bba1f=[],_0x936e43=[];if(!_0x4bdde4[_0x440684(0x7e)](existsSync,_0x3e71f3))return{'screenshots':_0x2bba1f,'paths':_0x936e43};const _0x540d6b=await readdir(_0x3e71f3),_0x2080bf=_0x540d6b['filter'](_0x43c101=>/\.(png|jpg|jpeg|gif|webp)$/i[_0x440684(0x78)](_0x43c101))['sort']();for(const _0x5e2e9c of _0x2080bf){const _0x327851=_0x4bdde4[_0x440684(0x84)](join,_0x3e71f3,_0x5e2e9c);_0x2bba1f['push']({'filename':_0x5e2e9c,'path':_0x327851,'relativePath':'./'+_0x5e2e9c}),_0x936e43[_0x440684(0x8f)](_0x327851);}return{'screenshots':_0x2bba1f,'paths':_0x936e43};}function _0xa6b0(_0x1fa9be,_0x37ac12){_0x1fa9be=_0x1fa9be-0x71;const _0x4a9421=_0x4a94();let _0xa6b0d7=_0x4a9421[_0x1fa9be];return _0xa6b0d7;}function getSeverityEmoji(_0x51d8c7){const _0x31f218={'UrMap':'MAJOR'};switch(_0x51d8c7){case'BLOCKER':return'🔴';case _0x31f218['UrMap']:return'🟠';default:return'⚪';}}function _0x4a94(){const _0x5b780d=['11903xhiXTC','155936vSWrZV','push','5692oNWgpp','###\x20Issues\x20Found\x20(','xDdTy','**Generated:**\x20','severity','toFixed','**Full\x20Trace:**\x20[View\x20in\x20Playwright\x20Trace\x20Viewer](',']\x20Issue','slice','**Duration:**\x20','**Screenshot:**','4925709AvwWUG','replace','**URL:**\x20','screenshot','charAt','####\x20','202muIFjD','toUpperCase','ISSUES\x20FOUND','test','###\x20Summary','filename','1617402pySaLM','2499266tyIpEM','##\x20Screenshots\x20(','PxjBC','TgefT','find','length','description','##\x20Task','ZwUrA','##\x20Result','15WqToxz','2328UDHZVR','relativePath','---','873TMpZPH','8BmAkAf','9677550YuJURz'];_0x4a94=function(){return _0x5b780d;};return _0x4a94();}function formatScreenshotCaption(_0x246285){const _0x5e7835=_0xa6b0,_0x88e63f=_0x246285['replace'](/\.(png|jpg|jpeg|gif|webp)$/i,''),_0x276ecb=_0x88e63f[_0x5e7835(0x9c)](/^\d+-/,'');return _0x276ecb['split']('-')['map'](_0x550a16=>_0x550a16[_0x5e7835(0x73)](0x0)[_0x5e7835(0x76)]()+_0x550a16[_0x5e7835(0x98)](0x1))['join']('\x20');}export function generateMarkdownReport(_0x320145){const _0x35cb44=_0xa6b0,_0x304043={'xDdTy':'PASSED','TgefT':function(_0x4bde35,_0x47f4a1){return _0x4bde35(_0x47f4a1);}},{sessionId:_0x1853f7,task:_0x133d1f,url:_0x307ef3,success:_0x14ceae,summary:_0x34baaf,issues:_0x22bf42,screenshots:_0x4e9c2e,durationMs:_0x2d2e4b,traceViewerUrl:_0x53fe92}=_0x320145,_0x1969c1=new Date()['toISOString'](),_0x514865=(_0x2d2e4b/0x3e8)[_0x35cb44(0x95)](0x1),_0x2a6f66=[];_0x2a6f66['push']('#\x20Verification\x20Report'),_0x2a6f66['push'](''),_0x2a6f66['push']('**Session:**\x20`'+_0x1853f7+'`'),_0x2a6f66[_0x35cb44(0x8f)](_0x35cb44(0x93)+_0x1969c1),_0x2a6f66['push'](_0x35cb44(0x99)+_0x514865+'s'),_0x2a6f66[_0x35cb44(0x8f)](''),_0x2a6f66['push'](_0x35cb44(0x83)),_0x2a6f66['push'](''),_0x2a6f66[_0x35cb44(0x8f)](_0x35cb44(0x71)+_0x307ef3),_0x2a6f66[_0x35cb44(0x8f)](''),_0x2a6f66['push']('>\x20'+_0x133d1f),_0x2a6f66[_0x35cb44(0x8f)](''),_0x2a6f66[_0x35cb44(0x8f)](_0x35cb44(0x85)),_0x2a6f66['push']('');const _0xbb176e=_0x14ceae?'✅':'❌';_0x2a6f66[_0x35cb44(0x8f)]('**Status:**\x20'+_0xbb176e+'\x20'+(_0x14ceae?_0x304043[_0x35cb44(0x92)]:_0x35cb44(0x77))),_0x2a6f66['push'](''),_0x2a6f66[_0x35cb44(0x8f)](_0x35cb44(0x79)),_0x2a6f66['push'](''),_0x2a6f66[_0x35cb44(0x8f)](_0x34baaf),_0x2a6f66[_0x35cb44(0x8f)]('');if(_0x22bf42&&_0x22bf42[_0x35cb44(0x81)]>0x0){_0x2a6f66[_0x35cb44(0x8f)](_0x35cb44(0x91)+_0x22bf42['length']+')'),_0x2a6f66['push']('');for(const _0x453916 of _0x22bf42){const _0x1210ea=_0x304043[_0x35cb44(0x7f)](getSeverityEmoji,_0x453916[_0x35cb44(0x94)]);_0x2a6f66[_0x35cb44(0x8f)](_0x35cb44(0x74)+_0x1210ea+'\x20['+_0x453916[_0x35cb44(0x94)]+_0x35cb44(0x97)),_0x2a6f66['push'](''),_0x2a6f66[_0x35cb44(0x8f)](_0x453916[_0x35cb44(0x82)]),_0x2a6f66[_0x35cb44(0x8f)]('');if(_0x453916['screenshot']){const _0x51e9bb=_0x453916[_0x35cb44(0x72)],_0xef685a=_0x4e9c2e[_0x35cb44(0x80)](_0x58a5da=>_0x58a5da[_0x35cb44(0x7a)]===_0x51e9bb||_0x58a5da[_0x35cb44(0x7a)]['includes'](_0x51e9bb));_0xef685a&&(_0x2a6f66['push'](_0x35cb44(0x9a)),_0x2a6f66[_0x35cb44(0x8f)](''),_0x2a6f66['push'](''),_0x2a6f66['push'](''));}}}if(_0x4e9c2e['length']>0x0){_0x2a6f66['push'](_0x35cb44(0x7d)+_0x4e9c2e[_0x35cb44(0x81)]+')'),_0x2a6f66[_0x35cb44(0x8f)]('');for(const _0x1166d8 of _0x4e9c2e){const _0x3f4599=formatScreenshotCaption(_0x1166d8[_0x35cb44(0x7a)]);_0x2a6f66['push']('###\x20'+_0x3f4599),_0x2a6f66[_0x35cb44(0x8f)](''),_0x2a6f66['push']('!['+_0x1166d8['filename']+']('+_0x1166d8[_0x35cb44(0x88)]+')'),_0x2a6f66['push']('');}}return _0x53fe92&&(_0x2a6f66['push'](_0x35cb44(0x89)),_0x2a6f66['push'](''),_0x2a6f66['push'](_0x35cb44(0x96)+_0x53fe92+')'),_0x2a6f66[_0x35cb44(0x8f)]('')),_0x2a6f66['join']('\x0a');}
|