@ranger-testing/ranger-cli 2.5.4-alpha.feb9faf-20 → 2.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -36
- package/build/cli.js +1 -1
- package/build/commands/addEnv.js +1 -1
- package/build/commands/authEncrypt.js +1 -1
- package/build/commands/clean.js +1 -1
- package/build/commands/config.js +1 -1
- package/build/commands/env.js +1 -1
- package/build/commands/feature.js +1 -1
- package/build/commands/hook.js +1 -1
- package/build/commands/hooks/autoPrompt.js +1 -1
- package/build/commands/hooks/disable.js +1 -1
- package/build/commands/hooks/enable.js +1 -1
- package/build/commands/hooks/exitPlanMode.js +1 -1
- package/build/commands/hooks/index.js +1 -1
- package/build/commands/hooks/output.js +1 -1
- package/build/commands/hooks/planReminder.js +1 -1
- package/build/commands/hooks/planStart.js +1 -1
- package/build/commands/hooks/postEdit.js +1 -1
- package/build/commands/hooks/preCompact.js +1 -1
- package/build/commands/hooks/sessionEnd.js +1 -1
- package/build/commands/hooks/sessionStart.js +1 -1
- package/build/commands/hooks/stopHook.js +1 -1
- package/build/commands/index.js +1 -1
- package/build/commands/login.js +1 -1
- package/build/commands/mcpBootstrap.js +1 -1
- package/build/commands/setup/claude.js +1 -1
- package/build/commands/setup/opencode.js +1 -1
- package/build/commands/setupCi.js +1 -1
- package/build/commands/skillup.js +1 -1
- package/build/commands/start.js +1 -1
- package/build/commands/status.js +1 -1
- package/build/commands/update.js +1 -1
- package/build/commands/updateEnv.js +1 -1
- package/build/commands/useEnv.js +1 -1
- package/build/commands/utils/activeProfile.js +1 -1
- package/build/commands/utils/agentEnv.js +1 -1
- package/build/commands/utils/browserSessionsApi.js +1 -1
- package/build/commands/utils/claudeConfig.js +1 -1
- package/build/commands/utils/claudeOverrideSettings.js +1 -1
- package/build/commands/utils/claudePlugin.js +1 -1
- package/build/commands/utils/crypto.js +1 -1
- package/build/commands/utils/desirePathLog.js +1 -1
- package/build/commands/utils/deviceAuth.js +1 -1
- package/build/commands/utils/environment.js +1 -1
- package/build/commands/utils/featureApi.js +1 -1
- package/build/commands/utils/fixWebmDuration.js +1 -1
- package/build/commands/utils/keychain.js +1 -1
- package/build/commands/utils/localAgentInstallationsApi.js +1 -1
- package/build/commands/utils/mcpImageBase64.js +1 -1
- package/build/commands/utils/model.js +1 -1
- package/build/commands/utils/opencodeConfig.js +1 -1
- package/build/commands/utils/playwrightCli.js +1 -1
- package/build/commands/utils/profileMessages.js +1 -1
- package/build/commands/utils/profileSetupBanner.js +1 -1
- package/build/commands/utils/rangerConfig.js +1 -1
- package/build/commands/utils/rangerRoot.js +1 -1
- package/build/commands/utils/retry.js +1 -1
- package/build/commands/utils/sessionCache.js +1 -1
- package/build/commands/utils/settings.js +1 -1
- package/build/commands/utils/skillContent.js +1 -1
- package/build/commands/utils/skills.js +1 -1
- package/build/commands/utils/stitchWebmFiles.js +1 -1
- package/build/commands/utils/telemetry.js +1 -1
- package/build/commands/utils/tokenRefresh.js +1 -1
- package/build/commands/utils/traceSnapshotMapper.js +1 -1
- package/build/commands/utils/userApi.js +1 -1
- package/build/commands/utils/version.js +1 -1
- package/build/commands/verifyFeature.js +1 -1
- package/build/commands/verifyFeatureCli.js +1 -1
- package/build/skills/ranger/SKILL.md +6 -36
- package/build/skills/ranger/create.md +0 -19
- package/build/skills/ranger/verify.md +7 -46
- package/package.json +3 -8
- package/build/commands/migrateProfile.js +0 -1
- package/build/commands/utils/cloudProfile.js +0 -1
- package/build/commands/utils/cloudProfileSession.js +0 -1
- package/build/commands/utils/gitTracked.js +0 -1
- package/build/commands/utils/legacyWarning.js +0 -1
- package/build/commands/utils/matchAuthEnvironment.js +0 -1
- package/build/commands/utils/projectsConfig.js +0 -1
- package/build/commands/utils/resolveProfileContext.js +0 -1
- package/build/commands/utils/resolveProfileUrl.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x2d7805,_0x4ead0e){const _0x1e8b6e=_0x57c9,_0x57d5b3=_0x2d7805();while(!![]){try{const _0x3ede49=-parseInt(_0x1e8b6e(0x1d8))/0x1*(-parseInt(_0x1e8b6e(0x1b7))/0x2)+parseInt(_0x1e8b6e(0x1c4))/0x3*(parseInt(_0x1e8b6e(0x1e6))/0x4)+parseInt(_0x1e8b6e(0x220))/0x5+-parseInt(_0x1e8b6e(0x1ad))/0x6*(-parseInt(_0x1e8b6e(0x1cb))/0x7)+parseInt(_0x1e8b6e(0x20f))/0x8*(parseInt(_0x1e8b6e(0x1d7))/0x9)+-parseInt(_0x1e8b6e(0x1c7))/0xa+parseInt(_0x1e8b6e(0x1b3))/0xb*(-parseInt(_0x1e8b6e(0x1ef))/0xc);if(_0x3ede49===_0x4ead0e)break;else _0x57d5b3['push'](_0x57d5b3['shift']());}catch(_0x586632){_0x57d5b3['push'](_0x57d5b3['shift']());}}}(_0x19fe,0x52b9c));import{mkdir,readFile,readdir,rename,stat}from'fs/promises';import{basename,join}from'path';import{extractBashCommand,parsePlaywrightCliCommand,quoteShellArg,runPlaywrightCliCommand}from'./utils/playwrightCli.js';const PLAYWRIGHT_CLI_COMMAND_TIMEOUT_MS=0xea60,PLAYWRIGHT_CLI_PREVIEW_LIMIT=0xf0,VERIFY_FEATURE_CLI_ARTIFACT_FILE_PATTERN=/^(?:\d{2}_.+\.(?:png|ya?ml)|key_.+\.png|session-recording(?:-\d+)?\.webm|trace(?:\.trace)?(?:-\d+)?\.zip|current_snap\.ya?ml)$/i;function truncatePreview(_0x5b9034,_0x4a394f=PLAYWRIGHT_CLI_PREVIEW_LIMIT){const _0x1cb154=_0x57c9,_0x2597f8={'WnayV':function(_0x339716,_0x3c4262){return _0x339716+_0x3c4262;},'XidBs':'...'};return _0x5b9034['length']>_0x4a394f?_0x2597f8[_0x1cb154(0x1b9)](_0x5b9034[_0x1cb154(0x213)](0x0,_0x4a394f),_0x2597f8[_0x1cb154(0x236)]):_0x5b9034;}function buildCliArtifactPath(_0x414e52,_0x9eeebe){const _0x11880a=_0x57c9,_0x1d07eb={'ptYPU':function(_0x207042,_0x559fa8,_0x171a63){return _0x207042(_0x559fa8,_0x171a63);}};return _0x1d07eb[_0x11880a(0x212)](join,_0x414e52,_0x9eeebe);}function toStepDisplayName(_0xa05073){const _0x3c1571=_0x57c9,_0x88e7a0={'NqfFW':function(_0x5c362b,_0x4dfef6){return _0x5c362b(_0x4dfef6);}},_0x11c280=_0x88e7a0[_0x3c1571(0x229)](basename,_0xa05073)['replace'](/\.(?:png|ya?ml)$/i,'')['replace'](/^key_/i,'')[_0x3c1571(0x1ba)](/^\d+_/,'')['replace'](/-/g,'\x20');return{'name':_0x11c280,'isKeyStep':/^key_/i['test'](_0x88e7a0['NqfFW'](basename,_0xa05073))};}function extractShellValue(_0x104669){if(!_0x104669)return null;return _0x104669[0x1]??_0x104669[0x2]??_0x104669[0x3]??null;}function _0x19fe(){const _0x5bffc4=['WnayV','replace','lKRlt','run\x20custom\x20Playwright\x20code','02_learn-more.yml','textContent','aQmvK','playwright-cli','01_mozilla-homepage.png','\x20video-start`.\x0a3.\x20Save\x20every\x20snapshot\x20and\x20screenshot\x20under\x20`','XTqgG','12aoEKPD','\x0a\x0a1.\x20Run\x20`','stop\x20tracing','4996130GaiZYL','tool_call','`\x0a7.\x20Click\x20the\x20\x22Learn\x20More\x22\x20link\x20with\x20Playwright\x20CLI\x0a8.\x20Run\x20`','numeric','49hFeJFe','\x20run-code\x20\x22<playwright\x20code>\x22`.\x0a7.\x20Do\x20not\x20run\x20`close`,\x20`tracing-stop`,\x20or\x20`video-stop`;\x20the\x20host\x20finalizes\x20the\x20session\x20and\x20artifacts.\x0a8.\x20After\x20completing\x20the\x20verification,\x20evaluate\x20whether\x20the\x20result\x20adequately\x20verifies\x20the\x20scenario','\x0a\x0a##\x20Authentication\x0aBEFORE\x20starting\x20the\x20verification\x20task,\x20you\x20MUST\x20authenticate\x20using\x20these\x20steps:\x0a','lcGhK','capture\x20key\x20step\x20`','check\x20','ijDdY','PoDAN','\x0a\x0aAfter\x20completing\x20authentication,\x20proceed\x20with\x20the\x20verification\x20task\x20below.\x0aIf\x20authentication\x20fails,\x20return\x20immediately\x20with\x20evaluation\x20\x22blocked\x22\x20and\x20describe\x20the\x20auth\x20failure.','\x20screenshot\x20--filename\x20','ngFpJ','\x20open\x20https://www.mozilla.org`\x0a2.\x20Run\x20`','9OGoFvw','426837lQHxtV',']\x20**','trackPhaseStart','press','\x20snapshot\x20--filename\x20','03_learn-more.png','`:\x20\x22','playwright_cli_tracing_stop','capture\x20screenshot','authorEmail','ObHxA','tool_failure','tracing-start','knUCU','654612pdLWeK','video-start','fill','PostToolUseFailure','**\x20(','tool_input','`\x0a\x0a-\x20Write\x20all\x20artifacts\x20under\x20`','`\x0a5.\x20Read\x20the\x20snapshot\x20file\x20to\x20find\x20the\x20\x22Learn\x20More\x22\x20link\x20reference\x0a6.\x20Run\x20`','JWZfz','478776sAYxap','element','select\x20tab\x20','`\x0a-\x20`run-code\x20\x22await\x20page.waitForTimeout(1000)\x22`\x20for\x20waits\x20or\x20small\x20custom\x20checks\x0a\x0a##\x20Screenshot\x20Guidelines\x20-\x20IMPORTANT\x0aTake\x20screenshots\x20throughout\x20the\x20verification\x20flow\x20so\x20a\x20human\x20can\x20review\x20it\x20for\x20completeness.\x20Screenshots\x20are\x20your\x20evidence\x20trail.\x0a\x0a**When\x20to\x20take\x20screenshots\x20(use\x20Playwright\x20CLI\x20screenshot):**\x0a-\x20After\x20the\x20initial\x20snapshot\x20(capture\x20starting\x20state)\x0a-\x20Before\x20and\x20after\x20clicking\x20buttons\x20or\x20submitting\x20forms\x0a-\x20When\x20important\x20UI\x20elements\x20appear\x20(modals,\x20notifications,\x20loading\x20states)\x0a-\x20After\x20navigating\x20to\x20different\x20views\x20or\x20pages\x0a-\x20When\x20verifying\x20specific\x20elements\x20exist\x0a-\x20At\x20the\x20final\x20state\x20showing\x20the\x20completed\x20action\x0a\x0a**Screenshot\x20naming:**\x0a-\x20Use\x20descriptive\x20filenames\x20under\x20`','screenshot','createdAt','unaddressedComments','pop','stop\x20video\x20recording','UiUol','\x22\x0a-\x20The\x20\x22key_\x22\x20prefix\x20marks\x20screenshots\x20as\x20high-priority\x20evidence\x20for\x20human\x20reviewers\x0a\x0a**Aim\x20for\x203-6\x20screenshots\x20per\x20verification**\x20to\x20document\x20the\x20complete\x20flow.\x20Mark\x201-2\x20of\x20the\x20most\x20important\x20ones\x20with\x20the\x20\x22key_\x22\x20prefix.\x0a','click\x20','Bash','):\x20\x22','jdXBU','`\x0a-\x20`snapshot\x20--filename\x20','kWmNk','\x0a\x0a##\x20Critical:\x20Early\x20Error\x20Detection\x0aAfter\x20step\x202\x20(taking\x20initial\x20snapshot),\x20IMMEDIATELY\x20check\x20for\x20blocking\x20HTTP\x20errors:\x0a\x0a**Blocking\x20errors\x20to\x20detect:**\x0a-\x20HTTP\x20404:\x20\x22404\x22,\x20\x22Not\x20Found\x22,\x20\x22Page\x20not\x20found\x22,\x20\x22does\x20not\x20exist\x22\x0a-\x20HTTP\x20500:\x20\x22500\x22,\x20\x22Internal\x20Server\x20Error\x22,\x20\x22Server\x20Error\x22,\x20\x22Something\x20went\x20wrong\x22\x0a-\x20HTTP\x20400:\x20\x22400\x22,\x20\x22Bad\x20Request\x22,\x20\x22Invalid\x20request\x22\x0a\x0a**Also\x20check\x20for:**\x0a-\x20Framework\x20error\x20pages\x20(Next.js\x20error\x20boundary,\x20React\x20error\x20page,\x20\x22Application\x20error\x22)\x0a-\x20Completely\x20blank/empty\x20pages\x20with\x20no\x20content\x0a-\x20\x22Cannot\x20GET\x20/path\x22\x20messages\x0a\x0a**If\x20ANY\x20blocking\x20error\x20is\x20detected:**\x0a1.\x20DO\x20NOT\x20continue\x20with\x20the\x20task\x0a2.\x20Return\x20IMMEDIATELY\x20with\x20evaluation:\x20\x22blocked\x22\x0a3.\x20Set\x20evaluationReason\x20to\x20describe\x20the\x20specific\x20error\x20(e.g.,\x20\x22HTTP\x20404\x20-\x20Page\x20not\x20found\x20at\x20/dashboard\x22)\x0a4.\x20Include\x20the\x20error\x20in\x20issues\x20array\x20with\x20severity:\x20\x22BLOCKER\x22\x20and\x20appropriate\x20type\x20(HTTP_404,\x20HTTP_500,\x20HTTP_400,\x20or\x20NAVIGATION_ERROR)\x0a\x0aThis\x20early\x20exit\x20prevents\x20wasting\x20time\x20on\x20tasks\x20that\x20cannot\x20succeed\x20due\x20to\x20fundamental\x20errors.','notes','test','error','stderr','qXGPV','nkkfa','`\x20style\x20absolute\x20paths\x20at\x20key\x20moments.\x0a6.\x20If\x20you\x20need\x20waits\x20or\x20custom\x20assertions,\x20use\x20`','KOQgv','key_03_success-state.png','capture\x20snapshot\x20`','wxZmZ','domRef','open\x20browser','playwright_cli_close','3448112VCrUPj','start\x20video\x20recording','fYiGc','ptYPU','slice','\x20(on\x20element:\x20<','press\x20','tab-select','You\x20are\x20testing\x20browser\x20automation.\x20Your\x20task\x20is\x20simple:\x0a\x0aUse\x20Bash\x20and\x20Playwright\x20CLI\x20only.\x20The\x20browser\x20command\x20prefix\x20is:\x0a','open\x20','run-code','click','tyiAz','string','02_button-clicked.png','oylGh','(?:^|\x5cs)','3319865koPgEh','trackPhaseError','canonicalFlow','hook_event_name','start\x20tracing','`\x20using\x20absolute\x20paths\x20only.\x20Do\x20not\x20use\x20relative\x20filenames.\x0a5.\x20Run\x20`','UdzEg','XUcuf','\x20>\x20','NqfFW','video-stop','BUqrw','>\x20\x22','Zttzh','description','[playwright-cli]\x20','`,\x20then\x20`','\x20tracing-start`,\x20then\x20`','`\x20using\x20absolute\x20paths\x20only.\x20Do\x20not\x20use\x20relative\x20filenames.\x0a4.\x20Take\x20a\x20snapshot\x20with\x20`','subcommand','check','`\x0a9.\x20Run\x20`','XidBs','match','ArBIU','GzrlK','split','capture\x20step\x20`','\x0a\x0a##\x20Expected\x20Flow\x20(from\x20previous\x20verification)\x0a','\x0a\x0a##\x20Critical:\x20Early\x20Error\x20Detection\x0aAfter\x20taking\x20the\x20initial\x20snapshot,\x20IMMEDIATELY\x20check\x20for\x20blocking\x20errors:\x0a\x0a**Blocking\x20errors\x20to\x20detect:**\x0a-\x20Crash\x20or\x20error\x20dialogs\x20(\x22An\x20error\x20occurred\x22,\x20\x22Something\x20went\x20wrong\x22,\x20unhandled\x20exception\x20messages)\x0a-\x20Blank\x20or\x20empty\x20window\x20with\x20no\x20rendered\x20content\x0a-\x20Framework\x20error\x20boundaries\x20(React\x20error\x20page,\x20Electron\x20crash\x20reporter)\x0a-\x20Unresponsive\x20or\x20frozen\x20UI\x20(no\x20interactive\x20elements\x20in\x20snapshot)\x0a\x0a**If\x20ANY\x20blocking\x20error\x20is\x20detected:**\x0a1.\x20DO\x20NOT\x20continue\x20with\x20the\x20task\x0a2.\x20Return\x20IMMEDIATELY\x20with\x20evaluation:\x20\x22blocked\x22\x0a3.\x20Set\x20evaluationReason\x20to\x20describe\x20the\x20specific\x20error\x20(e.g.,\x20\x22App\x20crashed\x20—\x20error\x20dialog\x20visible\x20on\x20launch\x22)\x0a4.\x20Include\x20the\x20error\x20in\x20issues\x20array\x20with\x20severity:\x20\x22BLOCKER\x22\x20and\x20type:\x20\x22APP_ERROR\x22\x0a\x0aThis\x20early\x20exit\x20prevents\x20wasting\x20time\x20on\x20tasks\x20that\x20cannot\x20succeed\x20due\x20to\x20fundamental\x20errors.','name','\x20run-code\x20\x22<playwright\x20code>\x22`.\x0a9.\x20Do\x20not\x20run\x20`close`,\x20`tracing-stop`,\x20or\x20`video-stop`;\x20the\x20host\x20finalizes\x20the\x20session\x20and\x20artifacts.\x0a10.\x20After\x20completing\x20the\x20verification,\x20evaluate\x20whether\x20the\x20result\x20adequately\x20verifies\x20the\x20scenario','set','\x22,\x20\x22','target','sort','186894rosSSI','trackPhaseEnd','tool_name','DEBUG','`\x20and\x20read\x20the\x20snapshot\x20file\x20to\x20inspect\x20the\x20page.\x0a5.\x20**IMMEDIATELY\x20check\x20for\x20blocking\x20HTTP\x20errors\x20before\x20proceeding.**\x0a6.\x20Execute\x20the\x20task\x20step-by-step\x20with\x20Playwright\x20CLI\x20commands.\x0a7.\x20Use\x20`','phase','429HVkjFH','open\x20new\x20tab','QYses','\x20open\x20','2aGZmBD','\x0a\x0a##\x20Additional\x20Notes\x0a'];_0x19fe=function(){return _0x5bffc4;};return _0x19fe();}function extractFilenameOption(_0x2aba79){return extractShellValue(_0x2aba79['match'](/--filename(?:=|\s+)(?:"([^"]+)"|'([^']+)'|(\S+))/));}function extractFirstCommandArgument(_0x9c783d,_0x1317d8){const _0x181292=_0x57c9,_0x9c326a={'QYses':'\x5c$&'},_0xebf7fd=_0x1317d8[_0x181292(0x1ba)](/[.*+?^${}()|[\]\\]/g,_0x9c326a[_0x181292(0x1b5)]);return extractShellValue(_0x9c783d[_0x181292(0x237)](new RegExp(_0x181292(0x21f)+_0xebf7fd+'(?:\x5cs+(?:\x22([^\x22]+)\x22|\x27([^\x27]+)\x27|(\x5cS+)))')));}function _0x57c9(_0x3b0b4f,_0xe5da32){_0x3b0b4f=_0x3b0b4f-0x1a3;const _0x19feca=_0x19fe();let _0x57c915=_0x19feca[_0x3b0b4f];return _0x57c915;}function formatCommandTarget(_0x288955){const _0x3c3c8d=_0x57c9,_0x26bb4a={'UdzEg':function(_0x73afaf,_0x3b83c1,_0x17bdbd){return _0x73afaf(_0x3b83c1,_0x17bdbd);}};if(!_0x288955)return _0x3c3c8d(0x1ab);if(/^e\d+$/i[_0x3c3c8d(0x202)](_0x288955))return'ref\x20'+_0x288955;return JSON['stringify'](_0x26bb4a[_0x3c3c8d(0x226)](truncatePreview,_0x288955,0x78));}function formatPlaywrightCliLog(_0x319ae5,_0x33885b){const _0x4569a1=_0x57c9,_0x290439={'nkkfa':'open','UiUol':function(_0x2dc371,_0x290a8c,_0xc13e5){return _0x2dc371(_0x290a8c,_0xc13e5);},'dgpID':_0x4569a1(0x20d),'fYiGc':'tracing-stop','zkRyu':_0x4569a1(0x1e7),'SlHMn':_0x4569a1(0x210),'AJpeb':_0x4569a1(0x1f7),'VvkjE':'snapshot','UnkKm':'capture\x20snapshot','lcGhK':function(_0x345bbb,_0xd8cf5c){return _0x345bbb(_0xd8cf5c);},'kWmNk':_0x4569a1(0x234),'jdXBU':_0x4569a1(0x1e8),'tyiAz':function(_0x5a7ed6,_0x363203){return _0x5a7ed6(_0x363203);},'RopHx':function(_0x3a6cbf,_0x3ffb37,_0x5a82c4){return _0x3a6cbf(_0x3ffb37,_0x5a82c4);},'ArBIU':function(_0x13baec,_0x5ce91e){return _0x13baec(_0x5ce91e);},'pAGGx':_0x4569a1(0x219),'Birby':'tab-new','uGREF':function(_0x560be5,_0x2ac224,_0x211c2c){return _0x560be5(_0x2ac224,_0x211c2c);}};switch(_0x33885b){case _0x290439[_0x4569a1(0x206)]:{const _0xec160a=_0x290439[_0x4569a1(0x1f8)](extractFirstCommandArgument,_0x319ae5,_0x33885b);return _0xec160a?_0x4569a1(0x218)+_0xec160a:_0x290439['dgpID'];}case _0x4569a1(0x1e4):return _0x4569a1(0x224);case _0x290439[_0x4569a1(0x211)]:return _0x4569a1(0x1c6);case _0x290439['zkRyu']:return _0x290439['SlHMn'];case _0x4569a1(0x22a):return _0x290439['AJpeb'];case _0x290439['VvkjE']:{const _0x58b5d4=extractFilenameOption(_0x319ae5);if(!_0x58b5d4)return _0x290439['UnkKm'];const {name:_0x1a399a}=toStepDisplayName(_0x58b5d4);return _0x4569a1(0x20a)+_0x1a399a+'`';}case _0x4569a1(0x1f3):{const _0x3ed3c9=_0x290439['lcGhK'](extractFilenameOption,_0x319ae5);if(!_0x3ed3c9)return _0x4569a1(0x1e0);const {name:_0x55fb5b,isKeyStep:_0x244610}=_0x290439['lcGhK'](toStepDisplayName,_0x3ed3c9);return _0x244610?_0x4569a1(0x1cf)+_0x55fb5b+'`':_0x4569a1(0x1a4)+_0x55fb5b+'`';}case _0x4569a1(0x21a):return _0x4569a1(0x1fa)+_0x290439[_0x4569a1(0x1ce)](formatCommandTarget,extractFirstCommandArgument(_0x319ae5,_0x33885b));case _0x290439[_0x4569a1(0x1ff)]:return _0x4569a1(0x1d0)+formatCommandTarget(_0x290439['UiUol'](extractFirstCommandArgument,_0x319ae5,_0x33885b));case _0x290439[_0x4569a1(0x1fd)]:return'fill\x20'+_0x290439[_0x4569a1(0x21b)](formatCommandTarget,_0x290439['RopHx'](extractFirstCommandArgument,_0x319ae5,_0x33885b));case _0x4569a1(0x1db):return _0x4569a1(0x215)+_0x290439[_0x4569a1(0x238)](formatCommandTarget,extractFirstCommandArgument(_0x319ae5,_0x33885b));case _0x290439['pAGGx']:return _0x4569a1(0x1bc);case _0x290439['Birby']:{const _0x5aa257=_0x290439['uGREF'](extractFirstCommandArgument,_0x319ae5,_0x33885b);return _0x5aa257?'open\x20new\x20tab\x20'+_0x5aa257:_0x4569a1(0x1b4);}case _0x4569a1(0x216):{const _0x114ffa=extractFirstCommandArgument(_0x319ae5,_0x33885b);return _0x114ffa?_0x4569a1(0x1f1)+_0x114ffa:'select\x20tab';}default:return _0x33885b;}}function extractPlaywrightCliToolDescription(_0x1d2497){const _0xbaebc1=_0x57c9,_0x41da53={'peIkb':function(_0x52848e,_0x572856){return _0x52848e!==_0x572856;},'MaClQ':_0xbaebc1(0x21c),'ObHxA':function(_0x9da011,_0x5b2599){return _0x9da011>_0x5b2599;}},_0x4af5ff=_0x1d2497[_0xbaebc1(0x22e)];if(_0x41da53['peIkb'](typeof _0x4af5ff,_0x41da53['MaClQ']))return null;const _0x45c500=_0x4af5ff['trim']()[_0xbaebc1(0x1ba)](/\s+/g,'\x20');return _0x41da53[_0xbaebc1(0x1e2)](_0x45c500['length'],0x0)?_0x45c500:null;}export function formatPlaywrightCliConsoleLogMessage(_0x189d20,_0x2bb08b,_0x535477){const _0x101f9b=_0x57c9,_0x42eac0=formatPlaywrightCliLog(_0x2bb08b,_0x535477),_0x5e988c=extractPlaywrightCliToolDescription(_0x189d20);if(!_0x5e988c)return _0x101f9b(0x22f)+_0x42eac0;if(process['env'][_0x101f9b(0x1b0)])return'[ranger-verification-agent]\x20'+_0x5e988c+'\x20('+_0x42eac0+')';return'[ranger-verification-agent]\x20'+_0x5e988c;}export function buildVerifyFeatureCliDebugPrompt(_0x198e45,_0x16e9d4){const _0x5983a4=_0x57c9,_0x96c258={'GzrlK':function(_0x56e8eb,_0x5b774d,_0x4900ba){return _0x56e8eb(_0x5b774d,_0x4900ba);},'knUCU':function(_0x2ab931,_0x47a209){return _0x2ab931(_0x47a209);}},_0x4f7863=_0x96c258['GzrlK'](buildCliArtifactPath,_0x16e9d4,'00_mozilla-homepage.yml'),_0x553072=buildCliArtifactPath(_0x16e9d4,_0x5983a4(0x1c1)),_0x40ddce=_0x96c258['GzrlK'](buildCliArtifactPath,_0x16e9d4,_0x5983a4(0x1bd)),_0x2a4971=_0x96c258[_0x5983a4(0x239)](buildCliArtifactPath,_0x16e9d4,_0x5983a4(0x1dd)),_0x34da29=_0x96c258[_0x5983a4(0x1e5)](quoteShellArg,_0x4f7863),_0x36de62=quoteShellArg(_0x553072),_0x5a659d=_0x96c258['knUCU'](quoteShellArg,_0x40ddce),_0x4b36cd=_0x96c258[_0x5983a4(0x1e5)](quoteShellArg,_0x2a4971);return _0x5983a4(0x217)+_0x198e45+_0x5983a4(0x1c5)+_0x198e45+_0x5983a4(0x1d6)+_0x198e45+'\x20tracing-start`\x0a3.\x20Run\x20`'+_0x198e45+'\x20video-start`\x0a4.\x20Save\x20every\x20snapshot\x20and\x20screenshot\x20under\x20`'+_0x16e9d4+_0x5983a4(0x225)+_0x198e45+_0x5983a4(0x1dc)+_0x34da29+_0x5983a4(0x1ed)+_0x198e45+_0x5983a4(0x1d4)+_0x36de62+_0x5983a4(0x1c9)+_0x198e45+'\x20snapshot\x20--filename\x20'+_0x5a659d+_0x5983a4(0x235)+_0x198e45+'\x20screenshot\x20--filename\x20'+_0x4b36cd+'`\x0a10.\x20Return\x20immediately\x20with\x20the\x20structured\x20output\x0a\x0aReturn\x20your\x20findings\x20in\x20the\x20structured\x20output\x20format.';}export function buildVerifyFeatureCliPrompt(_0x2e5b2a){const _0x5ba4cb=_0x57c9,_0x1448b6={'JWZfz':'en-US','qXGPV':'Reviewer','lKRlt':_0x5ba4cb(0x228),'ijDdY':_0x5ba4cb(0x1f0),'XUcuf':'01_initial.yml','ncVOY':'01_initial-state.png','Zttzh':function(_0x3061c8,_0x5b077a){return _0x3061c8(_0x5b077a);}},{checklistItem:_0x56ba2b,itemFeedback:_0x360434,taskDescription:_0x5a2287,cliCommandPrefix:_0x5749dc,cliArtifactDir:_0x56903f,isCdpMode:_0xf61f5f,url:_0x35a24c,cdpEndpoint:_0x5232d2,loginInstructions:_0x313e4f}=_0x2e5b2a,_0x4a0ebf=buildCliArtifactPath(_0x56903f,_0x1448b6[_0x5ba4cb(0x227)]),_0x4d9054=buildCliArtifactPath(_0x56903f,'02_state.yml'),_0x52339e=buildCliArtifactPath(_0x56903f,_0x5ba4cb(0x209)),_0x50f7b8=buildCliArtifactPath(_0x56903f,_0x1448b6['ncVOY']),_0x386dc0=_0x1448b6[_0x5ba4cb(0x22d)](quoteShellArg,_0x4a0ebf),_0x547973=_0x1448b6[_0x5ba4cb(0x22d)](quoteShellArg,_0x4d9054),_0x2cfc31=quoteShellArg(_0x52339e),_0x2ce6b0=quoteShellArg(_0x50f7b8),_0x9a76fa=_0x56ba2b[_0x5ba4cb(0x201)]?_0x5ba4cb(0x1b8)+_0x56ba2b['notes']:'';let _0x4c4bc4='';if(_0x360434&&_0x360434[_0x5ba4cb(0x1f5)]['length']>0x0){const _0x227238=_0x360434['unaddressedComments']['map'](_0x6c3e51=>{const _0x167eee=_0x5ba4cb,_0x290e9d=new Date(_0x6c3e51[_0x167eee(0x1f4)])['toLocaleDateString'](_0x1448b6[_0x167eee(0x1ee)],{'month':'short','day':_0x167eee(0x1ca)}),_0x33d02e=_0x6c3e51['authorName']||_0x6c3e51[_0x167eee(0x1e1)]||_0x1448b6[_0x167eee(0x205)],_0x1812ab=_0x6c3e51[_0x167eee(0x20c)]?_0x167eee(0x214)+(_0x6c3e51['domRef']['selector'][_0x167eee(0x1a3)](_0x1448b6[_0x167eee(0x1bb)])[_0x167eee(0x1f6)]()?.['split'](':')[0x0]||_0x1448b6[_0x167eee(0x1d1)])+_0x167eee(0x22c)+(_0x6c3e51['domRef'][_0x167eee(0x1be)]||'')['slice'](0x0,0x32)+'\x22)':'';return'-\x20['+_0x6c3e51['id']+_0x167eee(0x1d9)+_0x33d02e+_0x167eee(0x1ea)+_0x290e9d+_0x167eee(0x1fc)+_0x6c3e51['content']+'\x22'+_0x1812ab;})['join']('\x0a');_0x4c4bc4='\x0a\x0a##\x20Reviewer\x20Feedback\x20to\x20Address\x0aThe\x20following\x20reviewer\x20comments\x20were\x20left\x20on\x20the\x20previous\x20version\x20of\x20this\x20item.\x0aVerify\x20that\x20each\x20concern\x20has\x20been\x20addressed\x20in\x20the\x20current\x20implementation.\x0aFor\x20each\x20comment\x20you\x20believe\x20has\x20been\x20addressed,\x20include\x20its\x20ID\x20(the\x20bracketed\x20value)\x20in\x20the\x20addressedCommentIds\x20array\x20in\x20your\x20output.\x0a\x0a'+_0x227238;}const _0x5a99d7=_0x360434?.[_0x5ba4cb(0x222)]?_0x5ba4cb(0x1a5)+_0x360434['canonicalFlow']:'',_0xf52576=_0xf61f5f?'##\x20App\x20Context\x0aYou\x20are\x20connected\x20to\x20a\x20desktop\x20application\x20via\x20CDP\x20(Chrome\x20DevTools\x20Protocol)\x20at\x20'+_0x5232d2+'.\x0aThis\x20is\x20NOT\x20a\x20web\x20app\x20—\x20there\x20is\x20no\x20URL\x20to\x20navigate\x20to.\x20The\x20app\x20is\x20already\x20running\x20and\x20connected.':'CRITICAL\x20URL\x20REQUIREMENT:\x0aYour\x20base\x20URL\x20is:\x20'+_0x35a24c+'\x0a-\x20You\x20may\x20ONLY\x20navigate\x20to\x20paths\x20under\x20this\x20base\x20URL\x20(same\x20protocol,\x20host,\x20and\x20port)\x0a-\x20For\x20example,\x20if\x20the\x20base\x20URL\x20is\x20\x22http://localhost:3000\x22,\x20you\x20can\x20navigate\x20to\x20\x22http://localhost:3000/home\x22,\x20\x22http://localhost:3000/settings\x22,\x20etc.\x0a-\x20DO\x20NOT\x20navigate\x20to\x20any\x20different\x20domain,\x20host,\x20or\x20port\x20under\x20any\x20circumstances\x0a-\x20If\x20documentation\x20or\x20code\x20diffs\x20suggest\x20a\x20path\x20exists\x20(e.g.,\x20\x22/dashboard\x22),\x20you\x20may\x20navigate\x20to\x20that\x20path\x20ONLY\x20under\x20the\x20base\x20URL\x20above\x0a-\x20The\x20base\x20URL\x20above\x20is\x20the\x20ONLY\x20authorized\x20profile\x20for\x20this\x20verification',_0x38ae97=_0x35a24c?quoteShellArg(_0x35a24c):'',_0x47f96c=_0xf61f5f?'##\x20Instructions\x0a1.\x20Use\x20Bash\x20plus\x20Playwright\x20CLI\x20only.\x20Do\x20NOT\x20call\x20MCP\x20browser\x20tools.\x0a2.\x20Start\x20by\x20running\x20`'+_0x5749dc+'\x20open`,\x20then\x20`'+_0x5749dc+'\x20tracing-start`,\x20then\x20`'+_0x5749dc+_0x5ba4cb(0x1c2)+_0x56903f+_0x5ba4cb(0x232)+_0x5749dc+'\x20snapshot\x20--filename\x20'+_0x386dc0+'`\x20to\x20inspect\x20the\x20current\x20app\x20state.\x0a5.\x20Read\x20snapshot\x20YAML\x20files\x20to\x20find\x20element\x20references\x20like\x20`e12`,\x20then\x20use\x20them\x20with\x20`click`,\x20`fill`,\x20`check`,\x20or\x20`select`.\x0a6.\x20Use\x20`'+_0x5749dc+'\x20screenshot\x20--filename\x20'+_0x2ce6b0+_0x5ba4cb(0x207)+_0x5749dc+_0x5ba4cb(0x1cc):'##\x20Instructions\x0a1.\x20Use\x20Bash\x20plus\x20Playwright\x20CLI\x20only.\x20Do\x20NOT\x20call\x20MCP\x20browser\x20tools.\x0a2.\x20Start\x20by\x20running\x20`'+_0x5749dc+_0x5ba4cb(0x1b6)+_0x38ae97+_0x5ba4cb(0x230)+_0x5749dc+_0x5ba4cb(0x231)+_0x5749dc+_0x5ba4cb(0x1c2)+_0x56903f+_0x5ba4cb(0x232)+_0x5749dc+'\x20snapshot\x20--filename\x20'+_0x386dc0+_0x5ba4cb(0x1b1)+_0x5749dc+'\x20screenshot\x20--filename\x20'+_0x2ce6b0+'`\x20style\x20absolute\x20paths\x20at\x20key\x20moments.\x0a8.\x20If\x20you\x20need\x20waits\x20or\x20custom\x20assertions,\x20use\x20`'+_0x5749dc+_0x5ba4cb(0x1a8),_0x2dd20f=_0xf61f5f?_0x5ba4cb(0x1a6):_0x5ba4cb(0x200),_0x4d8101=_0x313e4f?_0x5ba4cb(0x1cd)+_0x313e4f+_0x5ba4cb(0x1d3):'';return'You\x20are\x20a\x20Feature\x20Review\x20Verifier.\x20Your\x20job\x20is\x20to\x20verify\x20a\x20scenario\x20by\x20executing\x20a\x20UI\x20flow\x20and\x20evaluating\x20whether\x20it\x20adequately\x20completes\x20the\x20scenario.\x0a\x0a##\x20Scenario\x20to\x20Verify\x0a'+_0x56ba2b[_0x5ba4cb(0x22e)]+_0x9a76fa+_0x4c4bc4+_0x5a99d7+'\x0a\x0a##\x20Task\x20to\x20Execute\x0a'+_0x5a2287+'\x0a\x0a'+_0xf52576+_0x4d8101+'\x0a\x0a'+_0x47f96c+'\x0a\x0a##\x20Browser\x20Command\x20Reference\x0aUse\x20Bash\x20to\x20run\x20Playwright\x20CLI\x20commands\x20with\x20this\x20exact\x20prefix:\x0a`'+_0x5749dc+_0x5ba4cb(0x1ec)+_0x56903f+_0x5ba4cb(0x1fe)+_0x547973+'`\x20writes\x20a\x20YAML\x20snapshot\x20you\x20can\x20read\x20for\x20element\x20refs\x0a-\x20`click\x20<ref>`,\x20`fill\x20<ref>\x20\x22text\x22`,\x20`check\x20<ref>`,\x20`press\x20Enter`\x0a-\x20`tab-list`,\x20`tab-select\x20<index>`,\x20`tab-new\x20<url>`\x0a-\x20`screenshot\x20--filename\x20'+_0x2cfc31+_0x5ba4cb(0x1f2)+_0x56903f+_0x5ba4cb(0x1de)+_0x50f7b8+_0x5ba4cb(0x1aa)+buildCliArtifactPath(_0x56903f,_0x5ba4cb(0x21d))+'\x22,\x20\x22'+buildCliArtifactPath(_0x56903f,'03_result-visible.png')+'\x22\x0a-\x20Number\x20prefixes\x20(01_,\x2002_,\x20etc.)\x20help\x20maintain\x20chronological\x20order\x0a-\x20For\x20KEY\x20MOMENTS\x20that\x20prove\x20the\x20scenario\x20is\x20complete,\x20prefix\x20with\x20\x22key_\x22:\x20\x22'+buildCliArtifactPath(_0x56903f,'key_04_success-state.png')+_0x5ba4cb(0x1f9)+_0x2dd20f+'\x0a##\x20Evaluation\x20Criteria\x0a-\x20VERIFIED:\x20The\x20task\x20completed\x20successfully\x20and\x20the\x20scenario\x20requirements\x20are\x20fully\x20met\x0a-\x20PARTIAL:\x20The\x20task\x20partially\x20completed\x20but\x20some\x20aspects\x20of\x20the\x20scenario\x20are\x20not\x20verified\x0a-\x20BLOCKED:\x20A\x20blocking\x20issue\x20(bug,\x20error,\x20missing\x20feature)\x20prevents\x20completion\x0a-\x20FAILED:\x20The\x20task\x20could\x20not\x20be\x20completed\x20due\x20to\x20errors\x0a\x0aReturn\x20your\x20findings\x20in\x20the\x20structured\x20output\x20format\x20with\x20your\x20evaluation.';}export function summarizeVerifyFeatureCliCommandAvailability(_0x21b6de){const _0x3ad8bf=[..._0x21b6de['keys']()]['sort']();let _0x1e5e13=0x0;for(const _0x17eaf3 of _0x21b6de['values']()){_0x1e5e13+=_0x17eaf3;}return{'cliCommandCount':_0x1e5e13,'cliCommandsSeen':_0x3ad8bf,'noCliCommandsCalled':_0x1e5e13===0x0};}export function createVerifyFeatureCliHooks(_0x2f3818){const _0x44d1a7=_0x57c9,_0x43833b={'BUqrw':function(_0x130088,_0x3b51df){return _0x130088!==_0x3b51df;},'IsAMa':'PostToolUse','LSqyZ':function(_0x21e7e9,_0x4a5d0a){return _0x21e7e9(_0x4a5d0a);},'PoDAN':'tool_call','BiRep':'playwright-cli','HWnds':'snapshot','oylGh':function(_0x526a8f,_0x1e7a4d,_0xa41fc7,_0x439857){return _0x526a8f(_0x1e7a4d,_0xa41fc7,_0x439857);},'XTqgG':_0x44d1a7(0x1e9),'ImFkY':_0x44d1a7(0x1e3)},_0x5979a3=new Map(),_0x23c1af=async _0x1953c5=>{const _0x2497ec=_0x44d1a7;if(_0x43833b[_0x2497ec(0x22b)](_0x1953c5['hook_event_name'],_0x43833b['IsAMa']))return{};const _0xc42b7c=_0x1953c5;if(_0xc42b7c[_0x2497ec(0x1af)]!==_0x2497ec(0x1fb))return{};const _0x3e65cf=_0xc42b7c[_0x2497ec(0x1eb)],_0x411291=extractBashCommand(_0x3e65cf);if(!_0x411291)return{};const _0x4e503a=_0x43833b['LSqyZ'](parsePlaywrightCliCommand,_0x411291);if(!_0x4e503a)return{};return _0x5979a3[_0x2497ec(0x1a9)](_0x4e503a,(_0x5979a3['get'](_0x4e503a)||0x0)+0x1),_0x2f3818[_0x2497ec(0x1da)](_0x43833b[_0x2497ec(0x1d2)],{'transport':_0x43833b['BiRep'],'toolName':_0x4e503a}),_0x2f3818[_0x2497ec(0x1ae)](_0x2497ec(0x1c8),{'transport':_0x2497ec(0x1c0),'toolName':_0x4e503a,'bashCommandPreview':truncatePreview(_0x411291)}),_0x4e503a!==_0x43833b['HWnds']&&console['log'](_0x43833b[_0x2497ec(0x21e)](formatPlaywrightCliConsoleLogMessage,_0x3e65cf,_0x411291,_0x4e503a)),{};},_0x35a2dc=async _0x34e8ff=>{const _0x7fe6df=_0x44d1a7;if(_0x34e8ff[_0x7fe6df(0x223)]!==_0x43833b[_0x7fe6df(0x1c3)])return{};const _0x42efb8=_0x34e8ff;if(_0x43833b['BUqrw'](_0x42efb8[_0x7fe6df(0x1af)],_0x7fe6df(0x1fb)))return{};return await _0x2f3818['trackPhaseError'](_0x43833b['ImFkY'],_0x42efb8[_0x7fe6df(0x203)],{'transport':'playwright-cli','toolName':'Bash'}),{};};return{'postToolUseHook':_0x23c1af,'postToolUseFailureHook':_0x35a2dc,'commandCounts':_0x5979a3};}async function runPlaywrightCliLifecycleCommand(_0xb9dcdd){const _0x53f36b=_0x57c9,_0x18968d={'KOQgv':function(_0x266b76,_0x320df7){return _0x266b76(_0x320df7);},'jeStx':function(_0x494660,_0x1f7223){return _0x494660??_0x1f7223;},'VVMhX':function(_0x226fcb,_0x8519e,_0x4da094){return _0x226fcb(_0x8519e,_0x4da094);},'XKFmr':function(_0x27ef11,_0x470ace,_0x552d1b){return _0x27ef11(_0x470ace,_0x552d1b);}},{sessionId:_0x319f17,configPath:_0x4df8af,commandArgs:_0x40155e,env:_0x406ff8,telemetry:_0x59937f,phase:_0x3ced9c,metadata:_0x5da0fd,timeoutMs:_0x396801}=_0xb9dcdd;_0x59937f['trackPhaseStart'](_0x3ced9c,_0x5da0fd);try{const _0xdcecfd=await _0x18968d[_0x53f36b(0x208)](runPlaywrightCliCommand,{'sessionId':_0x319f17,'configPath':_0x4df8af,'commandArgs':_0x40155e,'cwd':process['cwd'](),'env':_0x406ff8,'timeoutMs':_0x18968d['jeStx'](_0x396801,PLAYWRIGHT_CLI_COMMAND_TIMEOUT_MS)});_0x59937f[_0x53f36b(0x1ae)](_0x3ced9c,{..._0x5da0fd,'subcommand':_0xdcecfd['invocation'][_0x53f36b(0x233)],'stdoutPreview':_0x18968d['VVMhX'](truncatePreview,_0xdcecfd['stdout'],0x7d0),'stderrPreview':_0x18968d['XKFmr'](truncatePreview,_0xdcecfd[_0x53f36b(0x204)],0x7d0)});}catch(_0x3fd1a0){await _0x59937f[_0x53f36b(0x221)](_0x3ced9c,_0x3fd1a0,_0x5da0fd);throw _0x3fd1a0;}}export async function finalizeVerifyFeatureCliSession(_0x3b5aaa){const _0x11bc43=_0x57c9,_0x46ec3a={'OKbgv':'tracing-stop','XdVwx':'playwright_cli_video_stop','ELtzi':'video-stop','QhJFP':_0x11bc43(0x20e),'aQmvK':function(_0x4e94dc,_0x2e0a9e){return _0x4e94dc(_0x2e0a9e);}},{telemetry:_0x25e48e,sessionId:_0xe0baec,configPath:_0x523041,cliArtifactDir:_0x514e2b,env:_0x13b9c9,transportMetadata:_0x32f8b1}=_0x3b5aaa,_0x557e56=[{'phase':_0x11bc43(0x1df),'commandArgs':[_0x46ec3a['OKbgv']]},{'phase':_0x46ec3a['XdVwx'],'commandArgs':[_0x46ec3a['ELtzi'],'--filename='+buildCliArtifactPath(_0x514e2b,'session-recording.webm')]},{'phase':_0x46ec3a['QhJFP'],'commandArgs':['close']}];for(const _0x174c96 of _0x557e56){try{await _0x46ec3a[_0x11bc43(0x1bf)](runPlaywrightCliLifecycleCommand,{'sessionId':_0xe0baec,'configPath':_0x523041,'commandArgs':[..._0x174c96['commandArgs']],'env':_0x13b9c9,'telemetry':_0x25e48e,'phase':_0x174c96[_0x11bc43(0x1b2)],'metadata':_0x32f8b1});}catch{}}}export async function loadVerifyFeatureCliTraceUploadArtifact(_0x4dcba8){const _0x2e7328={'cxVwk':'trace.trace.zip'},_0x3e654d=['trace.zip',_0x2e7328['cxVwk']];for(const _0x4911d1 of _0x3e654d){const _0x581357=join(_0x4dcba8,_0x4911d1);try{return{'buffer':await readFile(_0x581357),'source':_0x581357};}catch{}}return null;}export async function rehomeVerifyFeatureCliArtifacts(_0xd93def){const _0x1033ce=_0x57c9,_0x2e6d8d={'usWHY':function(_0x115ceb,_0x2840e3,_0x29ca7c){return _0x115ceb(_0x2840e3,_0x29ca7c);},'wxZmZ':function(_0x2dab05,_0x23ae44){return _0x2dab05(_0x23ae44);},'ngFpJ':function(_0x5d9a12,_0x1200be){return _0x5d9a12+_0x1200be;}},{cwd:_0xac58a9,cliArtifactDir:_0x520776,startTime:_0x183d97}=_0xd93def,_0x36fe11=[];await _0x2e6d8d['usWHY'](mkdir,_0x520776,{'recursive':!![]});const _0x5a678e=await readdir(_0xac58a9,{'withFileTypes':!![]});for(const _0x3ba3ec of _0x5a678e){if(!_0x3ba3ec['isFile']()||!VERIFY_FEATURE_CLI_ARTIFACT_FILE_PATTERN[_0x1033ce(0x202)](_0x3ba3ec[_0x1033ce(0x1a7)]))continue;const _0x4a275d=join(_0xac58a9,_0x3ba3ec[_0x1033ce(0x1a7)]),_0x3d07d5=await _0x2e6d8d[_0x1033ce(0x20b)](stat,_0x4a275d);if(_0x2e6d8d[_0x1033ce(0x1d5)](_0x3d07d5['mtimeMs'],0x7d0)<_0x183d97)continue;const _0x1884bd=buildCliArtifactPath(_0x520776,_0x3ba3ec[_0x1033ce(0x1a7)]);if(_0x4a275d===_0x1884bd)continue;await rename(_0x4a275d,_0x1884bd),_0x36fe11['push'](_0x3ba3ec['name']);}return _0x36fe11[_0x1033ce(0x1ac)]();}
|
|
1
|
+
(function(_0x27c880,_0x52a052){const _0x3ba24c=_0x82f9,_0x5ab4a6=_0x27c880();while(!![]){try{const _0x106a76=-parseInt(_0x3ba24c(0x15c))/0x1*(-parseInt(_0x3ba24c(0x16f))/0x2)+-parseInt(_0x3ba24c(0x1ac))/0x3*(-parseInt(_0x3ba24c(0x131))/0x4)+parseInt(_0x3ba24c(0x132))/0x5+parseInt(_0x3ba24c(0x19c))/0x6*(parseInt(_0x3ba24c(0x194))/0x7)+parseInt(_0x3ba24c(0x199))/0x8*(parseInt(_0x3ba24c(0x161))/0x9)+parseInt(_0x3ba24c(0x16a))/0xa*(-parseInt(_0x3ba24c(0x18c))/0xb)+-parseInt(_0x3ba24c(0x135))/0xc;if(_0x106a76===_0x52a052)break;else _0x5ab4a6['push'](_0x5ab4a6['shift']());}catch(_0x12eb80){_0x5ab4a6['push'](_0x5ab4a6['shift']());}}}(_0x3b9b,0xc1414));import{mkdir,readFile,readdir,rename,stat}from'fs/promises';import{basename,join}from'path';import{extractBashCommand,parsePlaywrightCliCommand,quoteShellArg,runPlaywrightCliCommand}from'./utils/playwrightCli.js';const PLAYWRIGHT_CLI_COMMAND_TIMEOUT_MS=0xea60,PLAYWRIGHT_CLI_PREVIEW_LIMIT=0xf0,VERIFY_FEATURE_CLI_ARTIFACT_FILE_PATTERN=/^(?:\d{2}_.+\.(?:png|ya?ml)|key_.+\.png|session-recording(?:-\d+)?\.webm|trace(?:\.trace)?(?:-\d+)?\.zip|current_snap\.ya?ml)$/i;function truncatePreview(_0x454ec6,_0x184e25=PLAYWRIGHT_CLI_PREVIEW_LIMIT){const _0x14e080=_0x82f9,_0x19a28f={'hPjsp':function(_0x576f59,_0x15d4a7){return _0x576f59>_0x15d4a7;},'EZoVl':function(_0x2d5507,_0x13f0fe){return _0x2d5507+_0x13f0fe;},'GPRad':'...'};return _0x19a28f[_0x14e080(0x17b)](_0x454ec6['length'],_0x184e25)?_0x19a28f[_0x14e080(0x15d)](_0x454ec6[_0x14e080(0x178)](0x0,_0x184e25),_0x19a28f['GPRad']):_0x454ec6;}function buildCliArtifactPath(_0x432895,_0x1ad7c1){const _0x36aacc={'NfQWR':function(_0x2c8675,_0x21b463,_0x3adeb0){return _0x2c8675(_0x21b463,_0x3adeb0);}};return _0x36aacc['NfQWR'](join,_0x432895,_0x1ad7c1);}function toStepDisplayName(_0x19957a){const _0x4132c6=_0x82f9,_0x1890a4=basename(_0x19957a)[_0x4132c6(0x14f)](/\.(?:png|ya?ml)$/i,'')['replace'](/^key_/i,'')['replace'](/^\d+_/,'')[_0x4132c6(0x14f)](/-/g,'\x20');return{'name':_0x1890a4,'isKeyStep':/^key_/i[_0x4132c6(0x173)](basename(_0x19957a))};}function extractShellValue(_0x3e6f77){if(!_0x3e6f77)return null;return _0x3e6f77[0x1]??_0x3e6f77[0x2]??_0x3e6f77[0x3]??null;}function extractFilenameOption(_0x1cd737){const _0x62af12=_0x82f9;return extractShellValue(_0x1cd737[_0x62af12(0x1af)](/--filename(?:=|\s+)(?:"([^"]+)"|'([^']+)'|(\S+))/));}function extractFirstCommandArgument(_0x44b022,_0x4736af){const _0x5e800e=_0x82f9,_0x1561de={'ApEMs':_0x5e800e(0x125)},_0x29908b=_0x4736af[_0x5e800e(0x14f)](/[.*+?^${}()|[\]\\]/g,_0x1561de[_0x5e800e(0x153)]);return extractShellValue(_0x44b022['match'](new RegExp('(?:^|\x5cs)'+_0x29908b+_0x5e800e(0x165))));}function formatCommandTarget(_0x1f31ff){const _0x4ae953=_0x82f9,_0x39ffa0={'cCkbt':function(_0x240e75,_0x21c5ae,_0x2e7a87){return _0x240e75(_0x21c5ae,_0x2e7a87);}};if(!_0x1f31ff)return'target';if(/^e\d+$/i['test'](_0x1f31ff))return'ref\x20'+_0x1f31ff;return JSON[_0x4ae953(0x192)](_0x39ffa0['cCkbt'](truncatePreview,_0x1f31ff,0x78));}function formatPlaywrightCliLog(_0x29a80a,_0x2d644d){const _0x421f65=_0x82f9,_0x5f291f={'HVTvM':'open','kHfUm':'tracing-stop','oziDX':_0x421f65(0x18d),'WWnFu':_0x421f65(0x13b),'RNTHW':'stop\x20video\x20recording','SlgTr':function(_0x50f5a7,_0x2b4e9e){return _0x50f5a7(_0x2b4e9e);},'FnEVX':'capture\x20snapshot','YZzSS':'capture\x20screenshot','TAbbH':function(_0x47e799,_0x391d48,_0x454a28){return _0x47e799(_0x391d48,_0x454a28);},'Lqhgh':_0x421f65(0x174),'PkAxE':function(_0x50c5e6,_0x431a){return _0x50c5e6(_0x431a);},'VXsfJ':function(_0x26806b,_0xaecf6d,_0x3d2f52){return _0x26806b(_0xaecf6d,_0x3d2f52);},'uUsrU':function(_0x1ea5f8,_0x17b7b2){return _0x1ea5f8(_0x17b7b2);},'brGcb':function(_0x7131f,_0x4df58f,_0x4c6328){return _0x7131f(_0x4df58f,_0x4c6328);},'lCXFf':_0x421f65(0x1b0),'yMYPW':'run-code','MmOdW':_0x421f65(0x143),'JsfQh':function(_0x3935f7,_0x2d5bf1,_0x2c9a5a){return _0x3935f7(_0x2d5bf1,_0x2c9a5a);},'zayGB':'open\x20new\x20tab','pLsoz':'tab-select'};switch(_0x2d644d){case _0x5f291f[_0x421f65(0x1a0)]:{const _0x3b9bf1=extractFirstCommandArgument(_0x29a80a,_0x2d644d);return _0x3b9bf1?'open\x20'+_0x3b9bf1:'open\x20browser';}case _0x421f65(0x16d):return _0x421f65(0x17a);case _0x5f291f['kHfUm']:return _0x5f291f[_0x421f65(0x15f)];case _0x421f65(0x1ae):return'start\x20video\x20recording';case _0x5f291f['WWnFu']:return _0x5f291f['RNTHW'];case'snapshot':{const _0xc694fc=_0x5f291f['SlgTr'](extractFilenameOption,_0x29a80a);if(!_0xc694fc)return _0x5f291f['FnEVX'];const {name:_0x4fb97e}=toStepDisplayName(_0xc694fc);return _0x421f65(0x146)+_0x4fb97e+'`';}case'screenshot':{const _0x448a6b=_0x5f291f['SlgTr'](extractFilenameOption,_0x29a80a);if(!_0x448a6b)return _0x5f291f['YZzSS'];const {name:_0x2e57d9,isKeyStep:_0x506a81}=toStepDisplayName(_0x448a6b);return _0x506a81?_0x421f65(0x1a8)+_0x2e57d9+'`':'capture\x20step\x20`'+_0x2e57d9+'`';}case'click':return _0x421f65(0x159)+formatCommandTarget(_0x5f291f['TAbbH'](extractFirstCommandArgument,_0x29a80a,_0x2d644d));case _0x5f291f[_0x421f65(0x1aa)]:return _0x421f65(0x12c)+_0x5f291f['PkAxE'](formatCommandTarget,_0x5f291f[_0x421f65(0x12f)](extractFirstCommandArgument,_0x29a80a,_0x2d644d));case _0x421f65(0x1a1):return'fill\x20'+_0x5f291f['uUsrU'](formatCommandTarget,_0x5f291f['brGcb'](extractFirstCommandArgument,_0x29a80a,_0x2d644d));case _0x5f291f[_0x421f65(0x19f)]:return'press\x20'+formatCommandTarget(extractFirstCommandArgument(_0x29a80a,_0x2d644d));case _0x5f291f[_0x421f65(0x124)]:return _0x5f291f[_0x421f65(0x158)];case _0x421f65(0x133):{const _0x467809=_0x5f291f[_0x421f65(0x144)](extractFirstCommandArgument,_0x29a80a,_0x2d644d);return _0x467809?'open\x20new\x20tab\x20'+_0x467809:_0x5f291f['zayGB'];}case _0x5f291f['pLsoz']:{const _0x194491=extractFirstCommandArgument(_0x29a80a,_0x2d644d);return _0x194491?'select\x20tab\x20'+_0x194491:'select\x20tab';}default:return _0x2d644d;}}function extractPlaywrightCliToolDescription(_0x2dbbf1){const _0x1525ac=_0x82f9,_0x382b74={'AHcIZ':function(_0x527bf1,_0x53c364){return _0x527bf1!==_0x53c364;},'IryHm':'string'},_0x1a1c15=_0x2dbbf1['description'];if(_0x382b74[_0x1525ac(0x179)](typeof _0x1a1c15,_0x382b74[_0x1525ac(0x187)]))return null;const _0xedb304=_0x1a1c15[_0x1525ac(0x1a6)]()[_0x1525ac(0x14f)](/\s+/g,'\x20');return _0xedb304[_0x1525ac(0x1a4)]>0x0?_0xedb304:null;}export function formatPlaywrightCliConsoleLogMessage(_0x4a9cea,_0x9c7f16,_0x276f74){const _0x4d7818=_0x82f9,_0x3f8fda={'PLMCS':function(_0x400712,_0x55840b,_0x33b275){return _0x400712(_0x55840b,_0x33b275);}},_0x59cc92=_0x3f8fda['PLMCS'](formatPlaywrightCliLog,_0x9c7f16,_0x276f74),_0xfb8fc3=extractPlaywrightCliToolDescription(_0x4a9cea);if(!_0xfb8fc3)return'[playwright-cli]\x20'+_0x59cc92;if(process['env'][_0x4d7818(0x13a)])return _0x4d7818(0x154)+_0xfb8fc3+'\x20('+_0x59cc92+')';return _0x4d7818(0x154)+_0xfb8fc3;}export function buildVerifyFeatureCliDebugPrompt(_0x3bcb50,_0x28926c){const _0x2c3c5e=_0x82f9,_0x2a91b1={'EuWrR':function(_0x2f11e5,_0x120e2f,_0xb5c75d){return _0x2f11e5(_0x120e2f,_0xb5c75d);},'ZcnmF':'00_mozilla-homepage.yml','pSgyi':function(_0xd35e69,_0x37c5e2,_0x1b20d1){return _0xd35e69(_0x37c5e2,_0x1b20d1);},'cycfy':function(_0x50cf11,_0x4ab3ab,_0x40b5a9){return _0x50cf11(_0x4ab3ab,_0x40b5a9);},'JRhKP':'02_learn-more.yml','RdDKV':_0x2c3c5e(0x145),'ApHxb':function(_0x374971,_0x18c61d){return _0x374971(_0x18c61d);},'Mpgcm':function(_0x2b4a74,_0x47bd0c){return _0x2b4a74(_0x47bd0c);}},_0x230967=_0x2a91b1[_0x2c3c5e(0x182)](buildCliArtifactPath,_0x28926c,_0x2a91b1['ZcnmF']),_0x104423=_0x2a91b1['pSgyi'](buildCliArtifactPath,_0x28926c,_0x2c3c5e(0x1a3)),_0x5c9a1c=_0x2a91b1[_0x2c3c5e(0x141)](buildCliArtifactPath,_0x28926c,_0x2a91b1['JRhKP']),_0x77e6c0=buildCliArtifactPath(_0x28926c,_0x2a91b1[_0x2c3c5e(0x19d)]),_0x529e4b=_0x2a91b1['ApHxb'](quoteShellArg,_0x230967),_0x51d449=_0x2a91b1[_0x2c3c5e(0x138)](quoteShellArg,_0x104423),_0x2b3f9a=quoteShellArg(_0x5c9a1c),_0x5b1367=_0x2a91b1['ApHxb'](quoteShellArg,_0x77e6c0);return'You\x20are\x20testing\x20browser\x20automation.\x20Your\x20task\x20is\x20simple:\x0a\x0aUse\x20Bash\x20and\x20Playwright\x20CLI\x20only.\x20The\x20browser\x20command\x20prefix\x20is:\x0a'+_0x3bcb50+'\x0a\x0a1.\x20Run\x20`'+_0x3bcb50+'\x20open\x20https://www.mozilla.org`\x0a2.\x20Run\x20`'+_0x3bcb50+_0x2c3c5e(0x190)+_0x3bcb50+'\x20video-start`\x0a4.\x20Save\x20every\x20snapshot\x20and\x20screenshot\x20under\x20`'+_0x28926c+_0x2c3c5e(0x14d)+_0x3bcb50+_0x2c3c5e(0x191)+_0x529e4b+_0x2c3c5e(0x19b)+_0x3bcb50+_0x2c3c5e(0x139)+_0x51d449+'`\x0a7.\x20Click\x20the\x20\x22Learn\x20More\x22\x20link\x20with\x20Playwright\x20CLI\x0a8.\x20Run\x20`'+_0x3bcb50+_0x2c3c5e(0x191)+_0x2b3f9a+_0x2c3c5e(0x17e)+_0x3bcb50+'\x20screenshot\x20--filename\x20'+_0x5b1367+'`\x0a10.\x20Return\x20immediately\x20with\x20the\x20structured\x20output\x0a\x0aReturn\x20your\x20findings\x20in\x20the\x20structured\x20output\x20format.';}export function buildVerifyFeatureCliPrompt(_0x1fb613){const _0x5c61dd=_0x82f9,_0x2fcb3b={'zRlxp':'en-US','DYmDh':_0x5c61dd(0x15a),'kzXUh':'\x20>\x20','bYbZO':'01_initial.yml','YIjED':'02_state.yml','FIsed':'key_03_success-state.png','NQRUH':'01_initial-state.png','JFjky':function(_0x36ee5e,_0x440507){return _0x36ee5e(_0x440507);},'SkobT':function(_0x6bd154,_0xb8b6de){return _0x6bd154(_0xb8b6de);},'BUqvB':function(_0x5f061a,_0x3c83c5,_0x36b018){return _0x5f061a(_0x3c83c5,_0x36b018);},'rcGYR':_0x5c61dd(0x193),'cdusl':function(_0x44c00f,_0x1b44c5,_0x2a7d49){return _0x44c00f(_0x1b44c5,_0x2a7d49);}},{checklistItem:_0xb345c8,itemFeedback:_0x47dc29,taskDescription:_0xf9354f,cliCommandPrefix:_0x2848c9,cliArtifactDir:_0x422ef4,isCdpMode:_0x3abcb5,url:_0x692ec8,cdpEndpoint:_0x53ab81,loginInstructions:_0x4de341}=_0x1fb613,_0x32b8c1=buildCliArtifactPath(_0x422ef4,_0x2fcb3b['bYbZO']),_0x2836b4=buildCliArtifactPath(_0x422ef4,_0x2fcb3b[_0x5c61dd(0x130)]),_0x4b0131=buildCliArtifactPath(_0x422ef4,_0x2fcb3b['FIsed']),_0x228864=buildCliArtifactPath(_0x422ef4,_0x2fcb3b[_0x5c61dd(0x186)]),_0x413ac8=quoteShellArg(_0x32b8c1),_0x5f0ed6=_0x2fcb3b[_0x5c61dd(0x185)](quoteShellArg,_0x2836b4),_0x367ed6=quoteShellArg(_0x4b0131),_0x120e6c=_0x2fcb3b[_0x5c61dd(0x17d)](quoteShellArg,_0x228864),_0x275fbf=_0xb345c8[_0x5c61dd(0x167)]?'\x0a\x0a##\x20Additional\x20Notes\x0a'+_0xb345c8['notes']:'';let _0x50fbdd='';if(_0x47dc29&&_0x47dc29[_0x5c61dd(0x157)][_0x5c61dd(0x1a4)]>0x0){const _0x4f5ed8=_0x47dc29['unaddressedComments']['map'](_0x37aeb0=>{const _0x5169dc=_0x5c61dd,_0x5bfbb4=new Date(_0x37aeb0['createdAt'])[_0x5169dc(0x168)](_0x2fcb3b['zRlxp'],{'month':_0x2fcb3b['DYmDh'],'day':'numeric'}),_0x2940e1=_0x37aeb0[_0x5169dc(0x156)]||_0x37aeb0[_0x5169dc(0x152)]||'Reviewer',_0x2ddea2=_0x37aeb0['domRef']?'\x20(on\x20element:\x20<'+(_0x37aeb0['domRef'][_0x5169dc(0x16b)]['split'](_0x2fcb3b['kzXUh'])['pop']()?.['split'](':')[0x0]||'element')+_0x5169dc(0x134)+(_0x37aeb0[_0x5169dc(0x1ad)][_0x5169dc(0x189)]||'')['slice'](0x0,0x32)+'\x22)':'';return _0x5169dc(0x136)+_0x37aeb0['id']+']\x20**'+_0x2940e1+_0x5169dc(0x126)+_0x5bfbb4+'):\x20\x22'+_0x37aeb0['content']+'\x22'+_0x2ddea2;})[_0x5c61dd(0x1ab)]('\x0a');_0x50fbdd='\x0a\x0a##\x20Reviewer\x20Feedback\x20to\x20Address\x0aThe\x20following\x20reviewer\x20comments\x20were\x20left\x20on\x20the\x20previous\x20version\x20of\x20this\x20item.\x0aVerify\x20that\x20each\x20concern\x20has\x20been\x20addressed\x20in\x20the\x20current\x20implementation.\x0aFor\x20each\x20comment\x20you\x20believe\x20has\x20been\x20addressed,\x20include\x20its\x20ID\x20(the\x20bracketed\x20value)\x20in\x20the\x20addressedCommentIds\x20array\x20in\x20your\x20output.\x0a\x0a'+_0x4f5ed8;}const _0x2bb9e6=_0x47dc29?.[_0x5c61dd(0x183)]?'\x0a\x0a##\x20Expected\x20Flow\x20(from\x20previous\x20verification)\x0a'+_0x47dc29['canonicalFlow']:'',_0x210df5=_0x3abcb5?_0x5c61dd(0x19e)+_0x53ab81+'.\x0aThis\x20is\x20NOT\x20a\x20web\x20app\x20—\x20there\x20is\x20no\x20URL\x20to\x20navigate\x20to.\x20The\x20app\x20is\x20already\x20running\x20and\x20connected.':_0x5c61dd(0x18f)+_0x692ec8+_0x5c61dd(0x176),_0x7dad61=_0x692ec8?quoteShellArg(_0x692ec8):'',_0xb63fc=_0x3abcb5?'##\x20Instructions\x0a1.\x20Use\x20Bash\x20plus\x20Playwright\x20CLI\x20only.\x20Do\x20NOT\x20call\x20MCP\x20browser\x20tools.\x0a2.\x20Start\x20by\x20running\x20`'+_0x2848c9+_0x5c61dd(0x169)+_0x2848c9+'\x20tracing-start`,\x20then\x20`'+_0x2848c9+_0x5c61dd(0x170)+_0x422ef4+_0x5c61dd(0x188)+_0x2848c9+'\x20snapshot\x20--filename\x20'+_0x413ac8+'`\x20to\x20inspect\x20the\x20current\x20app\x20state.\x0a5.\x20Read\x20snapshot\x20YAML\x20files\x20to\x20find\x20element\x20references\x20like\x20`e12`,\x20then\x20use\x20them\x20with\x20`click`,\x20`fill`,\x20`check`,\x20or\x20`select`.\x0a6.\x20Use\x20`'+_0x2848c9+'\x20screenshot\x20--filename\x20'+_0x120e6c+'`\x20style\x20absolute\x20paths\x20at\x20key\x20moments.\x0a6.\x20If\x20you\x20need\x20waits\x20or\x20custom\x20assertions,\x20use\x20`'+_0x2848c9+_0x5c61dd(0x175):_0x5c61dd(0x155)+_0x2848c9+_0x5c61dd(0x13e)+_0x7dad61+'`,\x20then\x20`'+_0x2848c9+'\x20tracing-start`,\x20then\x20`'+_0x2848c9+_0x5c61dd(0x170)+_0x422ef4+_0x5c61dd(0x188)+_0x2848c9+_0x5c61dd(0x191)+_0x413ac8+_0x5c61dd(0x128)+_0x2848c9+_0x5c61dd(0x139)+_0x120e6c+'`\x20style\x20absolute\x20paths\x20at\x20key\x20moments.\x0a8.\x20If\x20you\x20need\x20waits\x20or\x20custom\x20assertions,\x20use\x20`'+_0x2848c9+_0x5c61dd(0x162),_0x15b315=_0x3abcb5?_0x5c61dd(0x14a):_0x5c61dd(0x148),_0x1c73c8=_0x4de341?'\x0a\x0a##\x20Authentication\x0aBEFORE\x20starting\x20the\x20verification\x20task,\x20you\x20MUST\x20authenticate\x20using\x20these\x20steps:\x0a'+_0x4de341+'\x0a\x0aAfter\x20completing\x20authentication,\x20proceed\x20with\x20the\x20verification\x20task\x20below.\x0aIf\x20authentication\x20fails,\x20return\x20immediately\x20with\x20evaluation\x20\x22blocked\x22\x20and\x20describe\x20the\x20auth\x20failure.':'';return'You\x20are\x20a\x20Feature\x20Review\x20Verifier.\x20Your\x20job\x20is\x20to\x20verify\x20a\x20scenario\x20by\x20executing\x20a\x20UI\x20flow\x20and\x20evaluating\x20whether\x20it\x20adequately\x20completes\x20the\x20scenario.\x0a\x0a##\x20Scenario\x20to\x20Verify\x0a'+_0xb345c8['description']+_0x275fbf+_0x50fbdd+_0x2bb9e6+'\x0a\x0a##\x20Task\x20to\x20Execute\x0a'+_0xf9354f+'\x0a\x0a'+_0x210df5+_0x1c73c8+'\x0a\x0a'+_0xb63fc+_0x5c61dd(0x195)+_0x2848c9+'`\x0a\x0a-\x20Write\x20all\x20artifacts\x20under\x20`'+_0x422ef4+_0x5c61dd(0x13c)+_0x5f0ed6+_0x5c61dd(0x12a)+_0x367ed6+'`\x0a-\x20`run-code\x20\x22await\x20page.waitForTimeout(1000)\x22`\x20for\x20waits\x20or\x20small\x20custom\x20checks\x0a\x0a##\x20Screenshot\x20Guidelines\x20-\x20IMPORTANT\x0aTake\x20screenshots\x20throughout\x20the\x20verification\x20flow\x20so\x20a\x20human\x20can\x20review\x20it\x20for\x20completeness.\x20Screenshots\x20are\x20your\x20evidence\x20trail.\x0a\x0a**When\x20to\x20take\x20screenshots\x20(use\x20Playwright\x20CLI\x20screenshot):**\x0a-\x20After\x20the\x20initial\x20snapshot\x20(capture\x20starting\x20state)\x0a-\x20Before\x20and\x20after\x20clicking\x20buttons\x20or\x20submitting\x20forms\x0a-\x20When\x20important\x20UI\x20elements\x20appear\x20(modals,\x20notifications,\x20loading\x20states)\x0a-\x20After\x20navigating\x20to\x20different\x20views\x20or\x20pages\x0a-\x20When\x20verifying\x20specific\x20elements\x20exist\x0a-\x20At\x20the\x20final\x20state\x20showing\x20the\x20completed\x20action\x0a\x0a**Screenshot\x20naming:**\x0a-\x20Use\x20descriptive\x20filenames\x20under\x20`'+_0x422ef4+_0x5c61dd(0x1b3)+_0x228864+'\x22,\x20\x22'+_0x2fcb3b[_0x5c61dd(0x147)](buildCliArtifactPath,_0x422ef4,_0x2fcb3b['rcGYR'])+_0x5c61dd(0x129)+buildCliArtifactPath(_0x422ef4,_0x5c61dd(0x18b))+'\x22\x0a-\x20Number\x20prefixes\x20(01_,\x2002_,\x20etc.)\x20help\x20maintain\x20chronological\x20order\x0a-\x20For\x20KEY\x20MOMENTS\x20that\x20prove\x20the\x20scenario\x20is\x20complete,\x20prefix\x20with\x20\x22key_\x22:\x20\x22'+_0x2fcb3b[_0x5c61dd(0x13f)](buildCliArtifactPath,_0x422ef4,_0x5c61dd(0x181))+_0x5c61dd(0x166)+_0x15b315+_0x5c61dd(0x150);}export function summarizeVerifyFeatureCliCommandAvailability(_0x5ac351){const _0x34e93e=_0x82f9,_0x5df073={'znIYM':function(_0x3279cb,_0x49dc2e){return _0x3279cb===_0x49dc2e;}},_0x1b793b=[..._0x5ac351[_0x34e93e(0x15e)]()]['sort']();let _0x946760=0x0;for(const _0x2f02d0 of _0x5ac351['values']()){_0x946760+=_0x2f02d0;}return{'cliCommandCount':_0x946760,'cliCommandsSeen':_0x1b793b,'noCliCommandsCalled':_0x5df073[_0x34e93e(0x177)](_0x946760,0x0)};}export function createVerifyFeatureCliHooks(_0x17a12e){const _0x473233={'Lvuod':function(_0x473c9d,_0x2c2714){return _0x473c9d!==_0x2c2714;},'cPbNt':'Bash','dUehG':function(_0x1186e5,_0x39ffe6){return _0x1186e5(_0x39ffe6);},'HyfOW':function(_0x31db0e,_0x252d7e){return _0x31db0e(_0x252d7e);},'ESKEg':'playwright-cli','EvafZ':'tool_call','bpPrW':function(_0x9bd4be,_0x1eee4d){return _0x9bd4be!==_0x1eee4d;},'Ibpmw':'PostToolUseFailure'},_0x4bf251=new Map(),_0x50e98f=async _0x32a5ee=>{const _0x3f93ae=_0x82f9;if(_0x32a5ee[_0x3f93ae(0x180)]!==_0x3f93ae(0x12b))return{};const _0x98389e=_0x32a5ee;if(_0x473233['Lvuod'](_0x98389e[_0x3f93ae(0x163)],_0x473233[_0x3f93ae(0x16e)]))return{};const _0x57a1ae=_0x98389e['tool_input'],_0x13dd47=_0x473233[_0x3f93ae(0x13d)](extractBashCommand,_0x57a1ae);if(!_0x13dd47)return{};const _0x4c5a20=_0x473233[_0x3f93ae(0x16c)](parsePlaywrightCliCommand,_0x13dd47);if(!_0x4c5a20)return{};return _0x4bf251[_0x3f93ae(0x1a5)](_0x4c5a20,(_0x4bf251[_0x3f93ae(0x1a9)](_0x4c5a20)||0x0)+0x1),_0x17a12e[_0x3f93ae(0x12d)](_0x3f93ae(0x14c),{'transport':_0x473233[_0x3f93ae(0x1b1)],'toolName':_0x4c5a20}),_0x17a12e['trackPhaseEnd'](_0x473233['EvafZ'],{'transport':_0x473233['ESKEg'],'toolName':_0x4c5a20,'bashCommandPreview':truncatePreview(_0x13dd47)}),_0x4c5a20!==_0x3f93ae(0x17c)&&console['log'](formatPlaywrightCliConsoleLogMessage(_0x57a1ae,_0x13dd47,_0x4c5a20)),{};},_0x5b1cc1=async _0x8cc067=>{const _0x462de3=_0x82f9;if(_0x473233[_0x462de3(0x12e)](_0x8cc067[_0x462de3(0x180)],_0x473233['Ibpmw']))return{};const _0x402f99=_0x8cc067;if(_0x402f99[_0x462de3(0x163)]!==_0x462de3(0x1a2))return{};return await _0x17a12e['trackPhaseError']('tool_failure',_0x402f99['error'],{'transport':_0x473233[_0x462de3(0x1b1)],'toolName':'Bash'}),{};};return{'postToolUseHook':_0x50e98f,'postToolUseFailureHook':_0x5b1cc1,'commandCounts':_0x4bf251};}function _0x82f9(_0x794c0d,_0x3aae07){_0x794c0d=_0x794c0d-0x124;const _0x3b9be6=_0x3b9b();let _0x82f9e6=_0x3b9be6[_0x794c0d];return _0x82f9e6;}async function runPlaywrightCliLifecycleCommand(_0x1a1f2f){const _0x15efd3=_0x82f9,_0x3b291a={'dQvEF':function(_0x50da12,_0x17c13b){return _0x50da12(_0x17c13b);},'GHMHi':function(_0x176842,_0x5a531e,_0x4aadff){return _0x176842(_0x5a531e,_0x4aadff);}},{sessionId:_0x4e0ecd,configPath:_0x372481,commandArgs:_0x1939a6,env:_0x3c58a4,telemetry:_0x49ebf3,phase:_0x10cbfc,metadata:_0x47f792,timeoutMs:_0x1381d4}=_0x1a1f2f;_0x49ebf3[_0x15efd3(0x12d)](_0x10cbfc,_0x47f792);try{const _0x2f1d88=await _0x3b291a['dQvEF'](runPlaywrightCliCommand,{'sessionId':_0x4e0ecd,'configPath':_0x372481,'commandArgs':_0x1939a6,'cwd':process[_0x15efd3(0x197)](),'env':_0x3c58a4,'timeoutMs':_0x1381d4??PLAYWRIGHT_CLI_COMMAND_TIMEOUT_MS});_0x49ebf3[_0x15efd3(0x164)](_0x10cbfc,{..._0x47f792,'subcommand':_0x2f1d88['invocation']['subcommand'],'stdoutPreview':_0x3b291a[_0x15efd3(0x1b2)](truncatePreview,_0x2f1d88[_0x15efd3(0x196)],0x7d0),'stderrPreview':_0x3b291a[_0x15efd3(0x1b2)](truncatePreview,_0x2f1d88[_0x15efd3(0x149)],0x7d0)});}catch(_0x41270c){await _0x49ebf3[_0x15efd3(0x160)](_0x10cbfc,_0x41270c,_0x47f792);throw _0x41270c;}}function _0x3b9b(){const _0x39e926=['\x0a-\x20You\x20may\x20ONLY\x20navigate\x20to\x20paths\x20under\x20this\x20base\x20URL\x20(same\x20protocol,\x20host,\x20and\x20port)\x0a-\x20For\x20example,\x20if\x20the\x20base\x20URL\x20is\x20\x22http://localhost:3000\x22,\x20you\x20can\x20navigate\x20to\x20\x22http://localhost:3000/home\x22,\x20\x22http://localhost:3000/settings\x22,\x20etc.\x0a-\x20DO\x20NOT\x20navigate\x20to\x20any\x20different\x20domain,\x20host,\x20or\x20port\x20under\x20any\x20circumstances\x0a-\x20If\x20documentation\x20or\x20code\x20diffs\x20suggest\x20a\x20path\x20exists\x20(e.g.,\x20\x22/dashboard\x22),\x20you\x20may\x20navigate\x20to\x20that\x20path\x20ONLY\x20under\x20the\x20base\x20URL\x20above\x0a-\x20The\x20base\x20URL\x20above\x20is\x20the\x20ONLY\x20authorized\x20profile\x20for\x20this\x20verification','znIYM','slice','AHcIZ','start\x20tracing','hPjsp','snapshot','SkobT','`\x0a9.\x20Run\x20`','hTlYD','hook_event_name','key_04_success-state.png','EuWrR','canonicalFlow','playwright_cli_close','JFjky','NQRUH','IryHm','`\x20using\x20absolute\x20paths\x20only.\x20Do\x20not\x20use\x20relative\x20filenames.\x0a4.\x20Take\x20a\x20snapshot\x20with\x20`','textContent','eBpxl','03_result-visible.png','60379YKvqan','stop\x20tracing','mtimeMs','CRITICAL\x20URL\x20REQUIREMENT:\x0aYour\x20base\x20URL\x20is:\x20','\x20tracing-start`\x0a3.\x20Run\x20`','\x20snapshot\x20--filename\x20','stringify','02_button-clicked.png','7zBzVpk','\x0a\x0a##\x20Browser\x20Command\x20Reference\x0aUse\x20Bash\x20to\x20run\x20Playwright\x20CLI\x20commands\x20with\x20this\x20exact\x20prefix:\x0a`','stdout','cwd','ANBvx','1528624ATEoPo','--filename=','`\x0a5.\x20Read\x20the\x20snapshot\x20file\x20to\x20find\x20the\x20\x22Learn\x20More\x22\x20link\x20reference\x0a6.\x20Run\x20`','934152hEbIxA','RdDKV','##\x20App\x20Context\x0aYou\x20are\x20connected\x20to\x20a\x20desktop\x20application\x20via\x20CDP\x20(Chrome\x20DevTools\x20Protocol)\x20at\x20','lCXFf','HVTvM','fill','Bash','01_mozilla-homepage.png','length','set','trim','trace.zip','capture\x20key\x20step\x20`','get','Lqhgh','join','80991LyBjhx','domRef','video-start','match','press','ESKEg','GHMHi','`:\x20\x22','yMYPW','\x5c$&','**\x20(','gBwZI','`\x20and\x20read\x20the\x20snapshot\x20file\x20to\x20inspect\x20the\x20page.\x0a5.\x20**IMMEDIATELY\x20check\x20for\x20blocking\x20HTTP\x20errors\x20before\x20proceeding.**\x0a6.\x20Execute\x20the\x20task\x20step-by-step\x20with\x20Playwright\x20CLI\x20commands.\x0a7.\x20Use\x20`','\x22,\x20\x22','`\x20writes\x20a\x20YAML\x20snapshot\x20you\x20can\x20read\x20for\x20element\x20refs\x0a-\x20`click\x20<ref>`,\x20`fill\x20<ref>\x20\x22text\x22`,\x20`check\x20<ref>`,\x20`press\x20Enter`\x0a-\x20`tab-list`,\x20`tab-select\x20<index>`,\x20`tab-new\x20<url>`\x0a-\x20`screenshot\x20--filename\x20','PostToolUse','check\x20','trackPhaseStart','bpPrW','VXsfJ','YIjED','228fxnXoy','2155660tgXKRO','tab-new','>\x20\x22','18820524adbCqQ','-\x20[','wcqgB','Mpgcm','\x20screenshot\x20--filename\x20','DEBUG','video-stop','`\x0a-\x20`snapshot\x20--filename\x20','dUehG','\x20open\x20','cdusl','session-recording.webm','cycfy','PuemU','run\x20custom\x20Playwright\x20code','JsfQh','03_learn-more.png','capture\x20snapshot\x20`','BUqvB','\x0a\x0a##\x20Critical:\x20Early\x20Error\x20Detection\x0aAfter\x20step\x202\x20(taking\x20initial\x20snapshot),\x20IMMEDIATELY\x20check\x20for\x20blocking\x20HTTP\x20errors:\x0a\x0a**Blocking\x20errors\x20to\x20detect:**\x0a-\x20HTTP\x20404:\x20\x22404\x22,\x20\x22Not\x20Found\x22,\x20\x22Page\x20not\x20found\x22,\x20\x22does\x20not\x20exist\x22\x0a-\x20HTTP\x20500:\x20\x22500\x22,\x20\x22Internal\x20Server\x20Error\x22,\x20\x22Server\x20Error\x22,\x20\x22Something\x20went\x20wrong\x22\x0a-\x20HTTP\x20400:\x20\x22400\x22,\x20\x22Bad\x20Request\x22,\x20\x22Invalid\x20request\x22\x0a\x0a**Also\x20check\x20for:**\x0a-\x20Framework\x20error\x20pages\x20(Next.js\x20error\x20boundary,\x20React\x20error\x20page,\x20\x22Application\x20error\x22)\x0a-\x20Completely\x20blank/empty\x20pages\x20with\x20no\x20content\x0a-\x20\x22Cannot\x20GET\x20/path\x22\x20messages\x0a\x0a**If\x20ANY\x20blocking\x20error\x20is\x20detected:**\x0a1.\x20DO\x20NOT\x20continue\x20with\x20the\x20task\x0a2.\x20Return\x20IMMEDIATELY\x20with\x20evaluation:\x20\x22blocked\x22\x0a3.\x20Set\x20evaluationReason\x20to\x20describe\x20the\x20specific\x20error\x20(e.g.,\x20\x22HTTP\x20404\x20-\x20Page\x20not\x20found\x20at\x20/dashboard\x22)\x0a4.\x20Include\x20the\x20error\x20in\x20issues\x20array\x20with\x20severity:\x20\x22BLOCKER\x22\x20and\x20appropriate\x20type\x20(HTTP_404,\x20HTTP_500,\x20HTTP_400,\x20or\x20NAVIGATION_ERROR)\x0a\x0aThis\x20early\x20exit\x20prevents\x20wasting\x20time\x20on\x20tasks\x20that\x20cannot\x20succeed\x20due\x20to\x20fundamental\x20errors.','stderr','\x0a\x0a##\x20Critical:\x20Early\x20Error\x20Detection\x0aAfter\x20taking\x20the\x20initial\x20snapshot,\x20IMMEDIATELY\x20check\x20for\x20blocking\x20errors:\x0a\x0a**Blocking\x20errors\x20to\x20detect:**\x0a-\x20Crash\x20or\x20error\x20dialogs\x20(\x22An\x20error\x20occurred\x22,\x20\x22Something\x20went\x20wrong\x22,\x20unhandled\x20exception\x20messages)\x0a-\x20Blank\x20or\x20empty\x20window\x20with\x20no\x20rendered\x20content\x0a-\x20Framework\x20error\x20boundaries\x20(React\x20error\x20page,\x20Electron\x20crash\x20reporter)\x0a-\x20Unresponsive\x20or\x20frozen\x20UI\x20(no\x20interactive\x20elements\x20in\x20snapshot)\x0a\x0a**If\x20ANY\x20blocking\x20error\x20is\x20detected:**\x0a1.\x20DO\x20NOT\x20continue\x20with\x20the\x20task\x0a2.\x20Return\x20IMMEDIATELY\x20with\x20evaluation:\x20\x22blocked\x22\x0a3.\x20Set\x20evaluationReason\x20to\x20describe\x20the\x20specific\x20error\x20(e.g.,\x20\x22App\x20crashed\x20—\x20error\x20dialog\x20visible\x20on\x20launch\x22)\x0a4.\x20Include\x20the\x20error\x20in\x20issues\x20array\x20with\x20severity:\x20\x22BLOCKER\x22\x20and\x20type:\x20\x22APP_ERROR\x22\x0a\x0aThis\x20early\x20exit\x20prevents\x20wasting\x20time\x20on\x20tasks\x20that\x20cannot\x20succeed\x20due\x20to\x20fundamental\x20errors.','name','tool_call','`\x20using\x20absolute\x20paths\x20only.\x20Do\x20not\x20use\x20relative\x20filenames.\x0a5.\x20Run\x20`','playwright_cli_video_stop','replace','\x0a##\x20Evaluation\x20Criteria\x0a-\x20VERIFIED:\x20The\x20task\x20completed\x20successfully\x20and\x20the\x20scenario\x20requirements\x20are\x20fully\x20met\x0a-\x20PARTIAL:\x20The\x20task\x20partially\x20completed\x20but\x20some\x20aspects\x20of\x20the\x20scenario\x20are\x20not\x20verified\x0a-\x20BLOCKED:\x20A\x20blocking\x20issue\x20(bug,\x20error,\x20missing\x20feature)\x20prevents\x20completion\x0a-\x20FAILED:\x20The\x20task\x20could\x20not\x20be\x20completed\x20due\x20to\x20errors\x0a\x0aReturn\x20your\x20findings\x20in\x20the\x20structured\x20output\x20format\x20with\x20your\x20evaluation.','tracing-stop','authorEmail','ApEMs','[ranger-verification-agent]\x20','##\x20Instructions\x0a1.\x20Use\x20Bash\x20plus\x20Playwright\x20CLI\x20only.\x20Do\x20NOT\x20call\x20MCP\x20browser\x20tools.\x0a2.\x20Start\x20by\x20running\x20`','authorName','unaddressedComments','MmOdW','click\x20','short','close','81337wMEdqK','EZoVl','keys','oziDX','trackPhaseError','54QzWqkB','\x20run-code\x20\x22<playwright\x20code>\x22`.\x0a9.\x20Do\x20not\x20run\x20`close`,\x20`tracing-stop`,\x20or\x20`video-stop`;\x20the\x20host\x20finalizes\x20the\x20session\x20and\x20artifacts.\x0a10.\x20After\x20completing\x20the\x20verification,\x20evaluate\x20whether\x20the\x20result\x20adequately\x20verifies\x20the\x20scenario','tool_name','trackPhaseEnd','(?:\x5cs+(?:\x22([^\x22]+)\x22|\x27([^\x27]+)\x27|(\x5cS+)))','\x22\x0a-\x20The\x20\x22key_\x22\x20prefix\x20marks\x20screenshots\x20as\x20high-priority\x20evidence\x20for\x20human\x20reviewers\x0a\x0a**Aim\x20for\x203-6\x20screenshots\x20per\x20verification**\x20to\x20document\x20the\x20complete\x20flow.\x20Mark\x201-2\x20of\x20the\x20most\x20important\x20ones\x20with\x20the\x20\x22key_\x22\x20prefix.\x0a','notes','toLocaleDateString','\x20open`,\x20then\x20`','1810FIeJIT','selector','HyfOW','tracing-start','cPbNt','2pvdAwu','\x20video-start`.\x0a3.\x20Save\x20every\x20snapshot\x20and\x20screenshot\x20under\x20`','commandArgs','isFile','test','check','\x20run-code\x20\x22<playwright\x20code>\x22`.\x0a7.\x20Do\x20not\x20run\x20`close`,\x20`tracing-stop`,\x20or\x20`video-stop`;\x20the\x20host\x20finalizes\x20the\x20session\x20and\x20artifacts.\x0a8.\x20After\x20completing\x20the\x20verification,\x20evaluate\x20whether\x20the\x20result\x20adequately\x20verifies\x20the\x20scenario'];_0x3b9b=function(){return _0x39e926;};return _0x3b9b();}export async function finalizeVerifyFeatureCliSession(_0x307b6c){const _0x335cf9=_0x82f9,_0xc99df8={'wrGbX':_0x335cf9(0x151),'bXMQX':_0x335cf9(0x13b),'ANBvx':_0x335cf9(0x140),'BytYB':_0x335cf9(0x184)},{telemetry:_0x7813a4,sessionId:_0x2e4da5,configPath:_0x3a22e6,cliArtifactDir:_0x5616e2,env:_0x5cf3e2,transportMetadata:_0x5ad973}=_0x307b6c,_0x233110=[{'phase':'playwright_cli_tracing_stop','commandArgs':[_0xc99df8['wrGbX']]},{'phase':_0x335cf9(0x14e),'commandArgs':[_0xc99df8['bXMQX'],_0x335cf9(0x19a)+buildCliArtifactPath(_0x5616e2,_0xc99df8[_0x335cf9(0x198)])]},{'phase':_0xc99df8['BytYB'],'commandArgs':[_0x335cf9(0x15b)]}];for(const _0x344201 of _0x233110){try{await runPlaywrightCliLifecycleCommand({'sessionId':_0x2e4da5,'configPath':_0x3a22e6,'commandArgs':[..._0x344201[_0x335cf9(0x171)]],'env':_0x5cf3e2,'telemetry':_0x7813a4,'phase':_0x344201['phase'],'metadata':_0x5ad973});}catch{}}}export async function loadVerifyFeatureCliTraceUploadArtifact(_0x3a8938){const _0x1e75c5=_0x82f9,_0x43b66a={'UULdU':'trace.trace.zip'},_0x54e28e=[_0x1e75c5(0x1a7),_0x43b66a['UULdU']];for(const _0x35b4ea of _0x54e28e){const _0x4d12a5=join(_0x3a8938,_0x35b4ea);try{return{'buffer':await readFile(_0x4d12a5),'source':_0x4d12a5};}catch{}}return null;}export async function rehomeVerifyFeatureCliArtifacts(_0x14bc8d){const _0x3e216e=_0x82f9,_0x4ac936={'gBwZI':function(_0x51a419,_0x206a2e,_0x1e8471){return _0x51a419(_0x206a2e,_0x1e8471);},'eBpxl':function(_0x162c71,_0x43b18d){return _0x162c71(_0x43b18d);},'hTlYD':function(_0x573a4e,_0x583442){return _0x573a4e<_0x583442;},'wcqgB':function(_0x3f3dde,_0x52af4e){return _0x3f3dde+_0x52af4e;},'GHtlo':function(_0x5ba4e8,_0x2681a2,_0x5f03d9){return _0x5ba4e8(_0x2681a2,_0x5f03d9);},'PuemU':function(_0x2f79cc,_0x521eb1){return _0x2f79cc===_0x521eb1;}},{cwd:_0x164bb9,cliArtifactDir:_0x217de9,startTime:_0x6842b}=_0x14bc8d,_0x54fbf2=[];await _0x4ac936[_0x3e216e(0x127)](mkdir,_0x217de9,{'recursive':!![]});const _0x285cc7=await readdir(_0x164bb9,{'withFileTypes':!![]});for(const _0x3352d2 of _0x285cc7){if(!_0x3352d2[_0x3e216e(0x172)]()||!VERIFY_FEATURE_CLI_ARTIFACT_FILE_PATTERN[_0x3e216e(0x173)](_0x3352d2['name']))continue;const _0x956ac5=join(_0x164bb9,_0x3352d2['name']),_0x35f84e=await _0x4ac936[_0x3e216e(0x18a)](stat,_0x956ac5);if(_0x4ac936[_0x3e216e(0x17f)](_0x4ac936[_0x3e216e(0x137)](_0x35f84e[_0x3e216e(0x18e)],0x7d0),_0x6842b))continue;const _0x1cc8a8=_0x4ac936['GHtlo'](buildCliArtifactPath,_0x217de9,_0x3352d2[_0x3e216e(0x14b)]);if(_0x4ac936[_0x3e216e(0x142)](_0x956ac5,_0x1cc8a8))continue;await _0x4ac936[_0x3e216e(0x127)](rename,_0x956ac5,_0x1cc8a8),_0x54fbf2['push'](_0x3352d2[_0x3e216e(0x14b)]);}return _0x54fbf2['sort']();}
|
|
@@ -7,44 +7,15 @@ description: "Ranger’s browser verification tooling that supplements a coding
|
|
|
7
7
|
|
|
8
8
|
Run Ranger commands using `ranger-cli <args>`.
|
|
9
9
|
|
|
10
|
-
**IMPORTANT: At the start of any session,
|
|
10
|
+
**IMPORTANT: At the start of any session, run `ranger-cli update` to ensure you have the latest CLI and skills.**
|
|
11
11
|
|
|
12
12
|
If you are running in Claude Code, read and suggest the following claude-specific commands to the user: [claude.md](./claude.md).
|
|
13
13
|
|
|
14
14
|
Use Ranger when the work includes any UI or frontend component. Do not suggest Ranger for backend-only or infra-only changes unless the user asks.
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
This skill covers three workflows for Ranger feature review tracking:
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
```bash
|
|
21
|
-
RANGER_TEST_USERNAME='alice@example.com' RANGER_TEST_PASSWORD='hunter2' \
|
|
22
|
-
ranger-cli go --base-url <target-url> --notes '<the goal verbatim>'
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
The CLI:
|
|
26
|
-
- Materializes a profile from `RANGER_TEST_USERNAME` if one doesn't exist
|
|
27
|
-
- Runs the configured login automatically — no human at a browser needed
|
|
28
|
-
- Creates a feature review if one is required but missing
|
|
29
|
-
- Captures trace + screenshots as evidence
|
|
30
|
-
|
|
31
|
-
This works for any login flow Ranger has set up with the customer (username/password, SSO, OAuth, MFA — any shape we can run deterministically with the access we hold).
|
|
32
|
-
|
|
33
|
-
Do **not** chain `ranger-cli create` before `go` unless the user explicitly asks for a structured multi-scenario feature review. The one-shot flow is the happy path for ad-hoc "verify this thing" requests.
|
|
34
|
-
|
|
35
|
-
If credentials live in a `.env` next to the user's repo (look for `RANGER_TEST_USERNAME` / `RANGER_TEST_PASSWORD` / `TARGET_URL`), source that file inline before running `go` instead of typing values (`set -a; source ./.env; set +a`).
|
|
36
|
-
|
|
37
|
-
### When to fall back
|
|
38
|
-
|
|
39
|
-
If `go` returns a 422 / login-failed, automated login probably isn't set up for this account yet. Fall back in this order:
|
|
40
|
-
|
|
41
|
-
1. **Active profile** — try `ranger-cli go` with no env vars. Works if a human already ran `ranger-cli profile add` for this app.
|
|
42
|
-
2. **Interactive setup** — ask the user to run `ranger-cli profile add <name>` (a browser opens, they log in once, you take it from there).
|
|
43
|
-
3. **For automated CI / background-agent setups specifically**: tell the user automated login is set up per-app with the Ranger team — point them at https://docs.ranger.net/main/concepts/profiles#automated-login.
|
|
44
|
-
|
|
45
|
-
If the user did NOT give you credentials in the first place (just said "log in to my app"), skip the env-var path entirely and go straight to fallback #1 or #2.
|
|
46
|
-
|
|
47
|
-
## Structured workflows
|
|
18
|
+
## Supported Workflows
|
|
48
19
|
|
|
49
20
|
| Workflow | When to Use | Required Reading |
|
|
50
21
|
|----------|-------------|------------------|
|
|
@@ -261,10 +232,9 @@ When completing your work or ending the session, your final message to the user
|
|
|
261
232
|
|
|
262
233
|
If you encounter authentication issues:
|
|
263
234
|
|
|
264
|
-
1. **
|
|
265
|
-
2. **
|
|
266
|
-
3. **
|
|
267
|
-
4. **Refresh auth**: For server-side relogin (headless, no human needed), set `RANGER_TEST_USERNAME` / `RANGER_TEST_PASSWORD` and re-run `ranger-cli go ...`. For SSO/OAuth profiles, ask the user to run `ranger-cli profile add <account-email>` to re-capture session in a headed browser. (Note: `ranger-cli profile update` is deprecated under cloud profiles and will exit non-zero.)
|
|
235
|
+
1. **Check your profiles**: Run `ranger-cli profile ls` to see all configured profiles and their details
|
|
236
|
+
2. **Switch profiles**: Use `ranger-cli profile use <profile-name>` to switch to a different profile
|
|
237
|
+
3. **Refresh auth**: Instruct the user to run `ranger-cli profile update <profile-name>` to re-capture authentication for a profile (user will need to help with that)
|
|
268
238
|
|
|
269
239
|
|
|
270
240
|
### Authentication Issues to Ranger
|
|
@@ -2,25 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Create a feature review when starting new work that doesn't have an existing feature review to resume.
|
|
4
4
|
|
|
5
|
-
## ⚠️ When NOT to use this
|
|
6
|
-
|
|
7
|
-
**If the user just wants a quick browser check** (e.g. "log in as X and confirm the dashboard renders", "check that the new button appears on /settings"), **do not run `ranger-cli create`**. Run `ranger-cli go` directly:
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
RANGER_TEST_USERNAME='...' RANGER_TEST_PASSWORD='...' \
|
|
11
|
-
ranger-cli go --base-url <target> --notes '<goal verbatim>'
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
The CLI creates a feature review automatically when one is needed. Chaining `create` first is wasted ceremony and shows up as noise for the reviewer. See the **One-shot verification** section in the parent `SKILL.md`.
|
|
15
|
-
|
|
16
|
-
Reach for `ranger-cli create` only when:
|
|
17
|
-
|
|
18
|
-
1. The work is genuinely multi-scenario (2+ distinct user journeys worth tracking separately)
|
|
19
|
-
2. You need to enumerate the scenarios up front for the reviewer to see before verification runs
|
|
20
|
-
3. The user explicitly asks for a "feature review" rather than just a "browser check"
|
|
21
|
-
|
|
22
|
-
When in doubt, start with one-shot `go` — you can always add scenarios later with `ranger-cli add-scenario`.
|
|
23
|
-
|
|
24
5
|
## Basic Command
|
|
25
6
|
|
|
26
7
|
```bash
|
|
@@ -1,63 +1,24 @@
|
|
|
1
1
|
# Verifying Scenarios
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
After implementing code for a scenario, verify it works in the browser. This creates evidence (screenshots, traces, logs) that the implementation is complete.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
RANGER_TEST_USERNAME='alice@example.com' RANGER_TEST_PASSWORD='hunter2' \
|
|
9
|
-
ranger-cli go --base-url <target-url> --notes '<the goal verbatim>'
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
If credentials already live in a nearby `.env`, source it inline before running `go` instead of typing values (`set -a; source ./.env; set +a`).
|
|
13
|
-
|
|
14
|
-
The CLI:
|
|
15
|
-
|
|
16
|
-
- Materializes a profile from `RANGER_TEST_USERNAME` if one doesn't exist
|
|
17
|
-
- Runs the configured login if no session is cached
|
|
18
|
-
- Creates a feature review automatically when one is needed
|
|
19
|
-
- Captures a trace + screenshots you can link to
|
|
20
|
-
|
|
21
|
-
This works for any login flow Ranger has set up with the customer — username/password, SSO, OAuth, MFA, passkeys. Don't worry about the auth shape; if the user gave you creds, try this path first.
|
|
22
|
-
|
|
23
|
-
Do **not** run `ranger-cli create` first unless the user explicitly asks for a structured feature review with multiple scenarios.
|
|
24
|
-
|
|
25
|
-
### Fallback when the one-shot path fails
|
|
26
|
-
|
|
27
|
-
If `go` returns a 422 / login-failed, automated login probably isn't set up for this account. Fall back in this order:
|
|
28
|
-
|
|
29
|
-
1. **Active profile** — `ranger-cli go` with no env vars (works if a human ran `profile add` for this app)
|
|
30
|
-
2. **Interactive setup** — ask the user to run `ranger-cli profile add <name>`
|
|
31
|
-
3. **For CI / background-agent flows**: automated login is set up per-app with the Ranger team — point the user at https://docs.ranger.net/main/concepts/profiles#automated-login
|
|
32
|
-
|
|
33
|
-
If the user did NOT give you credentials, skip the env-var path entirely and go straight to fallback #1 or #2.
|
|
34
|
-
|
|
35
|
-
## Scenario-driven verification
|
|
36
|
-
|
|
37
|
-
After implementing code against a scenario in an active feature review, verify it:
|
|
5
|
+
## Basic Command
|
|
38
6
|
|
|
39
7
|
```bash
|
|
40
8
|
ranger-cli go --scenario <N> --notes "<what to verify>"
|
|
41
9
|
```
|
|
42
10
|
|
|
43
|
-
|
|
11
|
+
The URL is derived from your active profile's `baseUrl` setting.
|
|
44
12
|
|
|
45
|
-
|
|
46
|
-
2. Saved active profile (`ranger-cli profile use <name>`)
|
|
47
|
-
3. `RANGER_TEST_USERNAME` (reuses or creates a matching profile)
|
|
48
|
-
4. The org's sole profile when exactly one exists
|
|
13
|
+
## Required: Active Feature Review
|
|
49
14
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
If you're verifying a scenario (not a one-shot):
|
|
15
|
+
`go` requires an active feature review. If you don't have one:
|
|
53
16
|
|
|
54
17
|
```bash
|
|
55
18
|
ranger-cli list # Find feature reviews to resume
|
|
56
19
|
ranger-cli resume <id> # Resume a specific feature review
|
|
57
20
|
```
|
|
58
21
|
|
|
59
|
-
For a one-shot `go --base-url ... --notes '...'`, the CLI handles feature-review creation for you.
|
|
60
|
-
|
|
61
22
|
## The Verification Flow
|
|
62
23
|
|
|
63
24
|
1. **Select scenario** - CLI prompts which scenario this verifies
|
|
@@ -80,7 +41,7 @@ You do NOT need to manually include reviewer feedback in your `--notes` descript
|
|
|
80
41
|
|
|
81
42
|
| Option | Required | Description |
|
|
82
43
|
|--------|----------|-------------|
|
|
83
|
-
| `--profile` | No | Profile to use
|
|
44
|
+
| `--profile` | No | Profile to use (defaults to active profile) |
|
|
84
45
|
| `--notes` | No | What to verify (defaults to scenario description) |
|
|
85
46
|
| `--scenario` | No | Scenario index to verify (skips selection prompt) |
|
|
86
47
|
| `--start-path` | No | Path to start on (appended to base URL, e.g., `/dashboard`) |
|
|
@@ -221,7 +182,7 @@ Always end the conversational turn by sharing the dashboard link whenever you ru
|
|
|
221
182
|
Run `ranger-cli list` to find feature reviews, then `ranger-cli resume <id>` to resume one.
|
|
222
183
|
|
|
223
184
|
### "No active profile"
|
|
224
|
-
|
|
185
|
+
Run `ranger-cli profile use <profile-name>` to set a profile with browser access.
|
|
225
186
|
|
|
226
187
|
### Verification times out
|
|
227
188
|
The agent has 59 minutes max. For very long flows, break into smaller scenarios.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ranger-testing/ranger-cli",
|
|
3
|
-
"version": "2.5.4
|
|
3
|
+
"version": "2.5.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"ranger": "./build/cli.js",
|
|
@@ -12,8 +12,7 @@
|
|
|
12
12
|
"obfuscate": "node scripts/obfuscate.cjs",
|
|
13
13
|
"dev": "tsx src/cli.ts",
|
|
14
14
|
"check-playwright-version": "node scripts/check-playwright-version.cjs",
|
|
15
|
-
"postinstall": "node scripts/postinstall.js"
|
|
16
|
-
"test": "jest --config jest.config.cjs"
|
|
15
|
+
"postinstall": "node scripts/postinstall.js"
|
|
17
16
|
},
|
|
18
17
|
"files": [
|
|
19
18
|
"build",
|
|
@@ -30,18 +29,14 @@
|
|
|
30
29
|
},
|
|
31
30
|
"devDependencies": {
|
|
32
31
|
"@types/inquirer": "^9.0.7",
|
|
33
|
-
"@types/jest": "^29.5.0",
|
|
34
32
|
"@types/node": "^22.0.0",
|
|
35
33
|
"@types/yargs": "^17.0.32",
|
|
36
|
-
"jest": "^29.7.0",
|
|
37
34
|
"javascript-obfuscator": "^4.1.1",
|
|
38
|
-
"ts-jest": "^29.1.0",
|
|
39
35
|
"tsx": "^4.20.6",
|
|
40
36
|
"typescript": "^5.0.0"
|
|
41
37
|
},
|
|
42
38
|
"overrides": {
|
|
43
39
|
"minimatch": "^10.2.3",
|
|
44
|
-
"brace-expansion": "^5.0.5"
|
|
45
|
-
"fast-uri": "3.1.2"
|
|
40
|
+
"brace-expansion": "^5.0.5"
|
|
46
41
|
}
|
|
47
42
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0x1aeb1f,_0x56a96e){var _0x42e61d=_0x4680,_0x89ae8=_0x1aeb1f();while(!![]){try{var _0xab1d0=parseInt(_0x42e61d(0xa3))/0x1*(-parseInt(_0x42e61d(0xb1))/0x2)+parseInt(_0x42e61d(0xac))/0x3+-parseInt(_0x42e61d(0xb2))/0x4+-parseInt(_0x42e61d(0xa7))/0x5*(-parseInt(_0x42e61d(0xa9))/0x6)+-parseInt(_0x42e61d(0xb0))/0x7+-parseInt(_0x42e61d(0xad))/0x8+parseInt(_0x42e61d(0xab))/0x9*(parseInt(_0x42e61d(0xa8))/0xa);if(_0xab1d0===_0x56a96e)break;else _0x89ae8['push'](_0x89ae8['shift']());}catch(_0x30c434){_0x89ae8['push'](_0x89ae8['shift']());}}}(_0x421c,0xc6608));function _0x421c(){var _0x4fcfdd=['20751039oMqLcf','1830933LZYiRD','3630384ZOTioJ','xsBYG','\x20\x20ranger\x20profile\x20add\x20<name>\x0a','10755850lLevCF','2477788GAhDEb','1386604rpJMum','1VoZPOM','fallback;\x20you\x20can\x20delete\x20them\x20once\x20you\x20have\x20re-auth-ed.','gdDdH','error','885naMvuh','10EMulKv','49914GKklEq','ranger\x20profile\x20migrate\x20is\x20no\x20longer\x20supported.\x0a'];_0x421c=function(){return _0x4fcfdd;};return _0x421c();}function _0x4680(_0x1ba51a,_0x40838f){_0x1ba51a=_0x1ba51a-0xa3;var _0x421cb4=_0x421c();var _0x4680c2=_0x421cb4[_0x1ba51a];return _0x4680c2;}export async function migrateProfile(_0x389ea5,_0x441bcc){var _0x3004b3=_0x4680,_0x30530c={'xsBYG':function(_0x57d5a9,_0x31e08a){return _0x57d5a9+_0x31e08a;},'cqCOD':function(_0x427d80,_0x146373){return _0x427d80+_0x146373;},'GQMAX':function(_0x7eb988,_0x339e3d){return _0x7eb988+_0x339e3d;},'wfDyC':function(_0x241e0b,_0x4e0257){return _0x241e0b+_0x4e0257;},'hsQeO':'\x20\x20https://docs.ranger.net/main/concepts/profiles\x0a','gdDdH':'Existing\x20sessions\x20in\x20your\x20old\x20<project>/.ranger/\x20dirs\x20still\x20work\x20as\x20a\x0a'};console[_0x3004b3(0xa6)](_0x30530c[_0x3004b3(0xae)](_0x30530c['cqCOD'](_0x30530c['GQMAX'](_0x30530c['wfDyC'](_0x30530c['wfDyC'](_0x30530c['wfDyC'](_0x30530c[_0x3004b3(0xae)](_0x3004b3(0xaa)+'\x0a','To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:\x0a'),_0x3004b3(0xaf)),'\x0a'),'For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:\x0a'),_0x30530c['hsQeO']),'\x0a'),_0x30530c[_0x3004b3(0xa5)])+_0x3004b3(0xa4)),process['exit'](0x1);}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const _0x551773=_0x2e4a;(function(_0x1154c6,_0x2dce94){const _0x321e73=_0x2e4a,_0x195b5a=_0x1154c6();while(!![]){try{const _0x14983e=-parseInt(_0x321e73(0x225))/0x1+-parseInt(_0x321e73(0x1ce))/0x2+parseInt(_0x321e73(0x236))/0x3*(-parseInt(_0x321e73(0x233))/0x4)+parseInt(_0x321e73(0x1fa))/0x5+parseInt(_0x321e73(0x1cd))/0x6*(parseInt(_0x321e73(0x1e9))/0x7)+-parseInt(_0x321e73(0x230))/0x8*(parseInt(_0x321e73(0x1cb))/0x9)+parseInt(_0x321e73(0x231))/0xa*(parseInt(_0x321e73(0x202))/0xb);if(_0x14983e===_0x2dce94)break;else _0x195b5a['push'](_0x195b5a['shift']());}catch(_0x2bee8b){_0x195b5a['push'](_0x195b5a['shift']());}}}(_0x252b,0x62043));import{readFile,writeFile,mkdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import _0xa9d222 from'inquirer';import{chromium}from'playwright';import{getApiBaseUrl}from'./environment.js';import{getToken}from'./keychain.js';import{getRangerHomeDir}from'./rangerRoot.js';import{addProfileSetupBanner}from'./profileSetupBanner.js';import{duplicateCookiesForDomains,getSessionCachePath,getStorageStatePath,isCachedSessionLive,isInteractive,resolveAuthEnvironmentLocally,sessionCacheHash}from'./cloudProfileSession.js';const MANUAL_LOGIN_TIMEOUT_MS=0xa*0x3c*0x3e8;async function requireToken(){const _0x34ac4d=_0x2e4a,_0x22b01b={'CWmNu':_0x34ac4d(0x1f1)},_0x3f2401=await getToken();if(!_0x3f2401)throw new Error(_0x22b01b[_0x34ac4d(0x1cf)]);return _0x3f2401;}async function apiRequest(_0x2e3114,_0x5a8d64={}){const _0x149f35=_0x2e4a,_0x409a7a={'UkZAR':function(_0xe3b455){return _0xe3b455();},'uhesh':'application/json','KzMlr':'string','hhtKW':function(_0x5e4681,_0x3db344){return _0x5e4681===_0x3db344;}},_0x29d727=await _0x409a7a['UkZAR'](requireToken),_0x3a2bc5=getApiBaseUrl(),_0x112f8f=await fetch(''+_0x3a2bc5+_0x2e3114,{..._0x5a8d64,'headers':{'Authorization':_0x149f35(0x1de)+_0x29d727,'Content-Type':_0x409a7a['uhesh'],..._0x5a8d64['headers']??{}}});if(!_0x112f8f['ok']){let _0x5dab2e='',_0x51098f;try{const _0xf1069=await _0x112f8f[_0x149f35(0x20b)]();_0x5dab2e=(typeof _0xf1069[_0x149f35(0x22c)]===_0x409a7a[_0x149f35(0x219)]?_0xf1069[_0x149f35(0x22c)]:undefined)??JSON['stringify'](_0xf1069);if(_0x409a7a['hhtKW'](typeof _0xf1069['code'],_0x149f35(0x1d7)))_0x51098f=_0xf1069[_0x149f35(0x21e)];}catch{_0x5dab2e=_0x112f8f['statusText'];}throw new ApiError(_0x149f35(0x1e5)+_0x2e3114+_0x149f35(0x1e1)+_0x112f8f['status']+_0x149f35(0x21f)+_0x5dab2e,_0x112f8f[_0x149f35(0x1d0)],_0x5dab2e,_0x51098f);}return _0x112f8f['json']();}export class ApiError extends Error{[_0x551773(0x1d0)];[_0x551773(0x1ee)];[_0x551773(0x21e)];constructor(_0x16abfc,_0x56d2c9,_0x290280,_0x182297){const _0x20ef85=_0x551773,_0x31fe0b={'wqwtE':_0x20ef85(0x1f0)},_0x23c7ff='1|2|0|3|4'['split']('|');let _0xb54ddf=0x0;while(!![]){switch(_0x23c7ff[_0xb54ddf++]){case'0':this[_0x20ef85(0x1ee)]=_0x290280;continue;case'1':super(_0x16abfc);continue;case'2':this[_0x20ef85(0x1d0)]=_0x56d2c9;continue;case'3':this[_0x20ef85(0x21e)]=_0x182297;continue;case'4':this[_0x20ef85(0x1eb)]=_0x31fe0b['wqwtE'];continue;}break;}}}function _0x2e4a(_0x68e2c8,_0xe067fd){_0x68e2c8=_0x68e2c8-0x1c5;const _0x252b94=_0x252b();let _0x2e4aa4=_0x252b94[_0x68e2c8];return _0x2e4aa4;}export async function fetchCloudProfile(_0x1b352c){const _0x5f4533=_0x551773,_0x534f59={'wpZqJ':function(_0x14092d,_0x3a1c63){return _0x14092d instanceof _0x3a1c63;},'YxhuL':function(_0x47dc36,_0x9ff10c){return _0x47dc36===_0x9ff10c;}};try{return await apiRequest('/api/v1/profiles/'+encodeURIComponent(_0x1b352c));}catch(_0x18259e){if(_0x534f59['wpZqJ'](_0x18259e,ApiError)&&_0x534f59[_0x5f4533(0x1c5)](_0x18259e['status'],0x194))return null;throw _0x18259e;}}export async function listCloudProfiles(){const _0xabdf20={'XOiHG':function(_0x1030fa,_0x10403f){return _0x1030fa(_0x10403f);}},_0x1b2513=await _0xabdf20['XOiHG'](apiRequest,'/api/v1/profiles');return _0x1b2513['profiles'];}export async function createCloudProfile(_0x1a51da,_0x3aba67,_0x2528b2={}){const _0x6d5511=_0x551773,_0x3f6e6a={'Nqgyw':function(_0x2763c3,_0x2b743a,_0x586cef){return _0x2763c3(_0x2b743a,_0x586cef);},'pHeSs':'POST'},_0x1e24f9={'name':_0x1a51da};if(_0x3aba67)_0x1e24f9[_0x6d5511(0x1d9)]=_0x3aba67;_0x2528b2[_0x6d5511(0x22d)]&&Object[_0x6d5511(0x210)](_0x2528b2['settings'])['length']>0x0&&(_0x1e24f9['settings']=_0x2528b2['settings']);if(_0x2528b2['username'])_0x1e24f9['username']=_0x2528b2[_0x6d5511(0x1ed)];if(_0x2528b2[_0x6d5511(0x22a)])_0x1e24f9['password']=_0x2528b2[_0x6d5511(0x22a)];return await _0x3f6e6a[_0x6d5511(0x1d8)](apiRequest,_0x6d5511(0x1c6),{'method':_0x3f6e6a['pHeSs'],'body':JSON[_0x6d5511(0x208)](_0x1e24f9)});}export async function uploadCloudProfileSession(_0x5888f0,_0x440e34){const _0x31966e=_0x551773,_0x1f2710={'fiLQT':function(_0x4b8d74,_0x42cdd1,_0x2099b1){return _0x4b8d74(_0x42cdd1,_0x2099b1);},'elalj':function(_0x3d8543,_0x33fb24){return _0x3d8543(_0x33fb24);}};return await _0x1f2710[_0x31966e(0x1f4)](apiRequest,'/api/v1/profiles/'+_0x1f2710[_0x31966e(0x1d6)](encodeURIComponent,_0x5888f0)+'/session',{'method':'POST','body':JSON[_0x31966e(0x208)]({'session_state':_0x440e34})});}export async function saveCloudProfileCredentials(_0x432e7d,_0x1b19b1,_0x4053ce){await apiRequest('/api/v1/profiles/'+encodeURIComponent(_0x432e7d),{'method':'PUT','body':JSON['stringify']({'username':_0x1b19b1,'password':_0x4053ce})});}export async function fetchAuthConfig(){const _0x20c0c5=_0x551773,_0x1f02e7={'hXFHH':function(_0x2e73e2,_0x37428c){return _0x2e73e2(_0x37428c);},'JBGAQ':'/api/v1/profiles/auth-config'};try{const _0x1d8e40=await _0x1f02e7[_0x20c0c5(0x228)](apiRequest,_0x1f02e7[_0x20c0c5(0x234)]);return _0x1d8e40['auth_config'];}catch{return null;}}export function pickAdHocEnvKey(_0x5de556){const _0x1f23a9=_0x551773,_0x1c4231={'liFaP':function(_0xb9fa09,_0x3e0081){return _0xb9fa09===_0x3e0081;},'pJWMr':function(_0x1998ef,_0x4c51b8){return _0x1998ef+_0x4c51b8;}};if(!_0x5de556)return null;if(_0x5de556['defaultEnvironmentKey'])return _0x5de556['defaultEnvironmentKey'];const _0x48cb3e=Object['keys'](_0x5de556[_0x1f23a9(0x21a)]??{});if(_0x48cb3e[_0x1f23a9(0x1e8)]===0x1)return _0x48cb3e[0x0];if(_0x1c4231['liFaP'](_0x48cb3e[_0x1f23a9(0x1e8)],0x0))return null;throw new Error(_0x1c4231[_0x1f23a9(0x1db)]('Multiple\x20envs\x20in\x20this\x20org\x27s\x20auth\x20config\x20('+_0x48cb3e['join'](',\x20')+_0x1f23a9(0x1ff),'Pass\x20--env\x20<key>\x20or\x20set\x20\x27defaultEnvironmentKey\x27\x20on\x20the\x20auth\x20config.'));}export async function resolveAdHocProfile(_0x28e5bd=process['env']){const _0x5b187b=_0x551773,_0x571175={'VHHRR':function(_0x1ee1f1){return _0x1ee1f1();},'TCGbI':function(_0x4245ff,_0x1f694e,_0x1d845b,_0x217345){return _0x4245ff(_0x1f694e,_0x1d845b,_0x217345);},'wiRIq':function(_0x5b229d,_0x5ec50d){return _0x5b229d??_0x5ec50d;}},_0x2c1404=_0x28e5bd['RANGER_TEST_USERNAME'];if(!_0x2c1404)return null;const _0x1db736=await fetchCloudProfile(_0x2c1404);if(_0x1db736)return{'name':_0x1db736[_0x5b187b(0x1eb)],'profile':_0x1db736};const _0x1c721b=await _0x571175[_0x5b187b(0x20a)](fetchAuthConfig),_0x285bb1=pickAdHocEnvKey(_0x1c721b),_0x5c1d4a=_0x28e5bd[_0x5b187b(0x211)],_0x4b29dd=await _0x571175[_0x5b187b(0x1cc)](createCloudProfile,_0x2c1404,_0x571175[_0x5b187b(0x1ea)](_0x285bb1,undefined),{'username':_0x2c1404,'password':_0x5c1d4a});return console[_0x5b187b(0x1fb)]('\x20\x20Created\x20cloud\x20profile\x20\x22'+_0x4b29dd[_0x5b187b(0x1eb)]+'\x22\x20for\x20'+_0x2c1404),{'name':_0x4b29dd[_0x5b187b(0x1eb)],'profile':_0x4b29dd};}export async function writeSessionToLocalCache(_0x56da44,_0x34878b,_0x42d487,_0x1938b4,_0x52a29c,_0xa0f84,_0x440fb9){const _0x5276b6=_0x551773,_0x1799fa={'WQPKf':function(_0x32b164,_0xcf963d,_0x5a514a){return _0x32b164(_0xcf963d,_0x5a514a);},'joxQs':function(_0x132f35){return _0x132f35();},'OxeWu':'auth'},_0x1d890c=sessionCacheHash({'orgId':_0x34878b,'profileName':_0x56da44,'effectiveBaseUrl':_0x42d487,'setupHeaders':_0x1938b4,'invalidateOn':_0x440fb9?.['invalidateOn'],'userAgent':_0x440fb9?.['userAgent'],'clientIp':_0x440fb9?.[_0x5276b6(0x224)]}),_0x358ad4=_0x1799fa[_0x5276b6(0x1f9)](getSessionCachePath,_0x1d890c,_0x56da44),_0x432ad1=_0x1799fa[_0x5276b6(0x1f9)](join,_0x1799fa['joxQs'](getRangerHomeDir),_0x1799fa[_0x5276b6(0x1f3)]);!existsSync(_0x432ad1)&&await mkdir(_0x432ad1,{'recursive':!![]});const _0x2fe1bf={..._0x52a29c};_0xa0f84&&_0xa0f84['length']>0x0&&Array[_0x5276b6(0x205)](_0x2fe1bf[_0x5276b6(0x1e7)])&&(_0x2fe1bf[_0x5276b6(0x1e7)]=duplicateCookiesForDomains(_0x2fe1bf[_0x5276b6(0x1e7)],_0xa0f84));const _0x19461e={'cached_at':new Date()['toISOString'](),'session_state':_0x2fe1bf};await writeFile(_0x358ad4,JSON[_0x5276b6(0x208)](_0x19461e,null,0x2));const _0x193dc7=getStorageStatePath(_0x358ad4);return await writeFile(_0x193dc7,JSON['stringify'](_0x2fe1bf,null,0x2)),_0x193dc7;}export async function checkLocalCache(_0x490bf1,_0x4e7fef,_0x48f4d4,_0x564d64,_0x485ae3){const _0x215108=_0x551773,_0x1371bd={'cdLVp':function(_0x3f3c5c,_0x138c30){return _0x3f3c5c(_0x138c30);},'aGRtj':function(_0x28a0c3,_0xb035ea,_0x4fe69f){return _0x28a0c3(_0xb035ea,_0x4fe69f);}},_0x447940=_0x1371bd[_0x215108(0x206)](sessionCacheHash,{'orgId':_0x4e7fef,'profileName':_0x490bf1,'effectiveBaseUrl':_0x48f4d4,'setupHeaders':_0x564d64,'invalidateOn':_0x485ae3?.['invalidateOn'],'userAgent':_0x485ae3?.[_0x215108(0x203)],'clientIp':_0x485ae3?.[_0x215108(0x224)]}),_0x5c9737=getSessionCachePath(_0x447940,_0x490bf1),_0x4c2973=_0x1371bd['cdLVp'](getStorageStatePath,_0x5c9737);if(!_0x1371bd[_0x215108(0x206)](existsSync,_0x5c9737)||!existsSync(_0x4c2973))return null;try{const _0x40ed7e=await _0x1371bd['aGRtj'](readFile,_0x5c9737,'utf-8');return JSON[_0x215108(0x22e)](_0x40ed7e),{'storageStatePath':_0x4c2973};}catch{return null;}}function _0x252b(){const _0x1f510e=['\x22,\x20attempting\x20login...','lXwvx','about:blank','\x20\x20Cloud\x20session\x20for\x20\x22','clientIp','83266XZMhSk','test_output','\x20\x20(hint)\x20Cached\x20session\x20was\x20captured\x20against\x20one\x20of\x20','hXFHH','organizationId','password','/login','error','settings','parse','azWrM','5192632kkXnaE','40tpOvAz','hwRoM','108952yTCCoB','JBGAQ','launch','3cakpoC','YxhuL','/api/v1/profiles','url','setupHeaders','/api/v1/profiles/','hostname','9ynirKR','TCGbI','2825628TUusAj','776004JEcoUU','CWmNu','status','POST','/session','kpOPV','\x20minutes\x20—\x20close\x20the\x20browser\x20to\x20retry.','domains','elalj','string','Nqgyw','environment_key','force','pJWMr','wZbWX','prompt','Bearer\x20','push','UrAgS','\x20failed\x20(','dTotN','newPage','close','API\x20request\x20','\x20\x20Server-side\x20login\x20error:\x20','cookies','length','7syFkHe','wiRIq','name','KCHTH','username','detail','If\x20logins\x20keep\x20failing,\x20declare\x20`invalidateOn:\x20[\x27baseUrl\x27]`\x20on\x20your\x20org\x27s\x20auth-config\x20env\x20so\x20port/domain\x20changes\x20force\x20a\x20fresh\x20login.','ApiError','No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','gYtJf','OxeWu','fiLQT','env','storageStatePath','PUT','HKgLS','WQPKf','1556870WUeuuC','log','Pqtau','confirm','join',').\x20','Jlcza','\x20\x20Using\x20cached\x20session\x20for\x20cloud\x20profile\x20\x22','2108557qnXdIn','userAgent','RANGER_TEST_USERNAME','isArray','cdLVp','message','stringify','extraHTTPHeaders','VHHRR','json','some','session_state','\x20\x20Credentials\x20saved\x20to\x20cloud\x20profile.','origin','keys','RANGER_TEST_PASSWORD','\x22\x20failed\x20validation\x20—\x20refreshing...','sessionState','iPHvA','you\x27re\x20now\x20at\x20\x22','map','enpYA','\x22,\x20cached\x20locally','KzMlr','environments','loginInstructions\x20on\x20the\x20auth\x20environment,\x20or\x20run\x20with\x20a\x20TTY.','sVyYL','\x22,\x20which\x20doesn\x27t\x20match\x20any\x20of\x20them.\x20','code','):\x20'];_0x252b=function(){return _0x1f510e;};return _0x252b();}function launchRealBrowser(){const _0x74f001=_0x551773;return chromium[_0x74f001(0x235)]({'headless':!![]});}function emitSessionValidationHint(_0x3ff8e3,_0x3383aa){const _0x286597=_0x551773,_0x26ea53={'zKoTP':'Your\x20org\x27s\x20auth-config\x20env\x20may\x20need\x20`invalidateOn:\x20[\x27port\x27]`\x20so\x20sessions\x20captured\x20on\x20one\x20port\x20aren\x27t\x20reused\x20on\x20another.','iPHvA':function(_0x28a8fa,_0x1e092a){return _0x28a8fa+_0x1e092a;}};if(!_0x3383aa||!_0x3383aa[_0x286597(0x1d5)]?.['length'])return;let _0x52f48f;try{_0x52f48f=new URL(_0x3ff8e3);}catch{return;}const _0x17cd19=[];for(const _0x1a9737 of _0x3383aa['domains']){try{_0x17cd19[_0x286597(0x1df)]({'raw':_0x1a9737,'url':new URL(_0x1a9737)});}catch{}}if(_0x17cd19['length']===0x0)return;if(_0x17cd19[_0x286597(0x20c)](_0x1b02eb=>_0x1b02eb['url'][_0x286597(0x20f)]===_0x52f48f[_0x286597(0x20f)]))return;const _0x1922b8=_0x17cd19['some'](_0x13e58a=>_0x52f48f[_0x286597(0x1ca)]===_0x13e58a[_0x286597(0x1c7)]['hostname']&&_0x52f48f['protocol']===_0x13e58a[_0x286597(0x1c7)]['protocol']&&_0x52f48f['port']!==_0x13e58a[_0x286597(0x1c7)]['port']),_0x1133dc=_0x1922b8?_0x26ea53['zKoTP']:_0x286597(0x1ef),_0x52e079=_0x17cd19[_0x286597(0x216)](_0x1fe1d4=>'\x22'+_0x1fe1d4['raw']+'\x22')[_0x286597(0x1fe)](',\x20');console[_0x286597(0x1fb)](_0x26ea53[_0x286597(0x214)](_0x286597(0x227)+_0x52e079+';\x20',_0x286597(0x215)+_0x3ff8e3+_0x286597(0x21d)+_0x1133dc));}export async function serverSideLogin(_0x549e0f,_0x4da5c6){const _0xb43de1=_0x551773,_0x292897={'Pqtau':function(_0x33f79d,_0x3f52a0,_0x2c36d0){return _0x33f79d(_0x3f52a0,_0x2c36d0);},'sVyYL':'not_configured'},_0x51b555=process[_0xb43de1(0x1f5)][_0xb43de1(0x204)],_0x19b665=process['env']['RANGER_TEST_PASSWORD'],_0x54be82={};if(_0x51b555)_0x54be82[_0xb43de1(0x1ed)]=_0x51b555;if(_0x19b665)_0x54be82[_0xb43de1(0x22a)]=_0x19b665;if(_0x4da5c6?.[_0xb43de1(0x1da)])_0x54be82['force']=!![];try{return await _0x292897[_0xb43de1(0x1fc)](apiRequest,_0xb43de1(0x1c9)+encodeURIComponent(_0x549e0f)+_0xb43de1(0x22b),{'method':_0xb43de1(0x1d1),'body':JSON[_0xb43de1(0x208)](_0x54be82)});}catch(_0x2e8c62){if(_0x2e8c62 instanceof ApiError&&_0x2e8c62['status']===0x190&&_0x2e8c62['code']===_0x292897[_0xb43de1(0x21c)])return{'status':_0x292897[_0xb43de1(0x21c)],'error':_0x2e8c62[_0xb43de1(0x1ee)]};throw _0x2e8c62;}}export async function manualBrowserLogin(_0x35eb18,_0xf2c224){const _0x14194b=_0x551773,_0x1eb983={'gYtJf':function(_0x249bb2){return _0x249bb2();},'hwRoM':function(_0x195935,_0x13aa20){return _0x195935(_0x13aa20);},'enpYA':function(_0x26de38,_0x26d4fe,_0x1d5d8a){return _0x26de38(_0x26d4fe,_0x1d5d8a);},'azWrM':function(_0x3a2dab,_0x258a3c){return _0x3a2dab+_0x258a3c;},'Jlcza':'\x20\x20Set\x20RANGER_TEST_USERNAME/RANGER_TEST_PASSWORD,\x20configure\x20','UrAgS':function(_0x89d738,_0x5e7c5c){return _0x89d738&&_0x5e7c5c;},'liStG':'Browser\x20login\x20timed\x20out\x20before\x20completion.','KmSjz':'Browser\x20closed\x20before\x20authentication\x20was\x20saved.','kccQs':function(_0x5cb6e4,_0x20e52e,_0x1e72d){return _0x5cb6e4(_0x20e52e,_0x1e72d);}};if(!_0x1eb983[_0x14194b(0x1f2)](isInteractive))throw new Error(_0x1eb983[_0x14194b(0x22f)](_0x1eb983['azWrM']('No\x20automatic\x20login\x20available\x20for\x20profile\x20\x22'+_0x35eb18['name']+'\x22.\x0a',_0x1eb983[_0x14194b(0x200)]),_0x14194b(0x21b)));const _0x46a27f=_0xf2c224&&_0xf2c224['domains'][_0x14194b(0x1e8)]>0x0?_0xf2c224[_0x14194b(0x1d5)][0x0]:_0x14194b(0x222);console[_0x14194b(0x1fb)]('\x0a\x20\x20A\x20browser\x20will\x20open.\x20Please\x20log\x20in\x20manually.'),console['log']('\x20\x20When\x20done,\x20close\x20the\x20browser\x20to\x20save\x20the\x20session.\x0a'),await new Promise(_0x3691ea=>setTimeout(_0x3691ea,0x7d0));const _0x5b65ca=await chromium[_0x14194b(0x235)]({'headless':![]});let _0x4b552d=null;try{const _0x3bd7af={'ignoreHTTPSErrors':!![]};_0xf2c224?.['setupHeaders']&&(_0x3bd7af[_0x14194b(0x209)]=_0xf2c224[_0x14194b(0x1c8)]);const _0x1df06f=await _0x5b65ca['newContext'](_0x3bd7af);await addProfileSetupBanner(_0x1df06f);const _0x5dd4f9=await _0x1df06f[_0x14194b(0x1e3)]();await _0x5dd4f9['goto'](_0x46a27f);let _0x2cf367=![];await new Promise(_0x20bfd5=>{const _0x2fc1dd=_0x14194b,_0xf43f8e={'EROmR':function(_0x5d86b7,_0x5e6a9a){const _0x171aeb=_0x2e4a;return _0x1eb983[_0x171aeb(0x232)](_0x5d86b7,_0x5e6a9a);},'YucZu':function(_0x3dd898){const _0x273d1d=_0x2e4a;return _0x1eb983[_0x273d1d(0x1f2)](_0x3dd898);}},_0x22449a=_0x1eb983[_0x2fc1dd(0x217)](setTimeout,()=>{const _0x4c2135=_0x2fc1dd;_0x2cf367=!![],console['error']('Browser\x20login\x20timed\x20out\x20after\x20'+MANUAL_LOGIN_TIMEOUT_MS/0xea60+_0x4c2135(0x1d4)),_0x1eb983[_0x4c2135(0x1f2)](_0x20bfd5);},MANUAL_LOGIN_TIMEOUT_MS);_0x5dd4f9['on']('close',async()=>{_0xf43f8e['EROmR'](clearTimeout,_0x22449a);try{const _0x3c3f8b=await _0x1df06f['storageState']();_0x4b552d=_0x3c3f8b;}catch{}_0xf43f8e['YucZu'](_0x20bfd5);});});if(_0x1eb983[_0x14194b(0x1e0)](_0x2cf367,!_0x4b552d))throw new Error(_0x1eb983['liStG']);}finally{await _0x5b65ca[_0x14194b(0x1e4)]()['catch'](()=>{});}if(!_0x4b552d)throw new Error(_0x1eb983['KmSjz']);return await _0x1eb983['kccQs'](apiRequest,'/api/v1/profiles/'+encodeURIComponent(_0x35eb18[_0x14194b(0x1eb)])+_0x14194b(0x1d2),{'method':_0x14194b(0x1d1),'body':JSON[_0x14194b(0x208)]({'session_state':_0x4b552d,'updated_by':'cli:manual-login'})}),{'sessionState':_0x4b552d};}export async function promptSaveCredentials(_0x247fa3){const _0x2557c4=_0x551773,_0x26a2a2={'lXwvx':function(_0x4cff7d,_0x284d28){return _0x4cff7d||_0x284d28;},'eWoGt':_0x2557c4(0x1fd),'KCHTH':'save','dTotN':'Save\x20credentials\x20to\x20profile\x20for\x20automatic\x20session\x20refresh?','LKFVJ':_0x2557c4(0x20e)},_0x3ead5b=process['env']['RANGER_TEST_USERNAME'],_0xa16580=process['env'][_0x2557c4(0x211)];if(_0x26a2a2[_0x2557c4(0x221)](!_0x3ead5b,!_0xa16580))return;if(!isInteractive())return;const {save:_0x3f10b5}=await _0xa9d222[_0x2557c4(0x1dd)]([{'type':_0x26a2a2['eWoGt'],'name':_0x26a2a2[_0x2557c4(0x1ec)],'message':_0x26a2a2[_0x2557c4(0x1e2)],'default':![]}]);if(!_0x3f10b5)return;await apiRequest(_0x2557c4(0x1c9)+encodeURIComponent(_0x247fa3),{'method':_0x2557c4(0x1f7),'body':JSON[_0x2557c4(0x208)]({'username':_0x3ead5b,'password':_0xa16580})}),console[_0x2557c4(0x1fb)](_0x26a2a2['LKFVJ']);}export async function resolveCloudProfileSession(_0x4df209,_0x34dd0b={}){const _0x4b76a1=_0x551773,_0x5c4efa={'ykRaZ':function(_0x13d903,_0x4067a8,_0x181429,_0x268de5,_0x273171,_0x3bc69e,_0x102419,_0x824f26){return _0x13d903(_0x4067a8,_0x181429,_0x268de5,_0x273171,_0x3bc69e,_0x102419,_0x824f26);},'opPOh':function(_0x462353,_0x4aee02,_0x3b948c,_0x184d85,_0x51a3f7){return _0x462353(_0x4aee02,_0x3b948c,_0x184d85,_0x51a3f7);},'wZbWX':function(_0xc72e6f,_0x17580b){return _0xc72e6f(_0x17580b);},'HKgLS':function(_0x5b14b2,_0x50abf1){return _0x5b14b2(_0x50abf1);},'hDGRt':'not_configured','kpOPV':'\x0a\x20\x20Server-side\x20login\x20failed.\x20Test\x20output:','ZotMR':'\x20\x20Falling\x20back\x20to\x20manual\x20browser\x20login...'},_0x23ba76=_0x4df209[_0x4b76a1(0x22d)]??{},_0x2b1e2c=await fetchAuthConfig(),_0x315507=_0x2b1e2c?resolveAuthEnvironmentLocally(_0x2b1e2c,_0x4df209['environmentKey']):null,_0xb1ff67=_0x315507?.['domains'],_0xb1e365=_0x23ba76[_0x4b76a1(0x1c8)],_0x14384a=_0xb1e365??_0x315507?.[_0x4b76a1(0x1c8)],_0x4cd4da=_0x34dd0b['effectiveBaseUrl']??_0x23ba76['baseUrl']??(_0xb1ff67&&_0xb1ff67[_0x4b76a1(0x1e8)]>0x0?_0xb1ff67[0x0]:''),_0x338337={'invalidateOn':_0x315507?.['invalidateOn'],'userAgent':_0x315507?.['browserOptions']?.['userAgent']??_0x23ba76[_0x4b76a1(0x203)]},_0x2d146d=await checkLocalCache(_0x4df209['name'],_0x4df209[_0x4b76a1(0x229)],_0x4cd4da,_0x14384a,_0x338337);if(_0x2d146d){if(_0x4cd4da){const _0x1969fe=await isCachedSessionLive(_0x2d146d[_0x4b76a1(0x1f6)],_0x4cd4da,{'sessionCheckPath':_0x315507?.['sessionCheckPath'],'setupHeaders':_0x14384a},{'launchBrowser':launchRealBrowser});if(_0x1969fe)return console['log'](_0x4b76a1(0x201)+_0x4df209['name']+'\x22'),{'authPath':_0x2d146d[_0x4b76a1(0x1f6)],'settings':_0x23ba76,'resolvedEnv':_0x315507};console['log']('\x20\x20Cached\x20session\x20for\x20\x22'+_0x4df209[_0x4b76a1(0x1eb)]+_0x4b76a1(0x212)),emitSessionValidationHint(_0x4cd4da,_0x315507);}else return{'authPath':_0x2d146d['storageStatePath'],'settings':_0x23ba76,'resolvedEnv':_0x315507};}if(_0x4df209[_0x4b76a1(0x213)]){const _0x985c0a=await _0x5c4efa['ykRaZ'](writeSessionToLocalCache,_0x4df209['name'],_0x4df209[_0x4b76a1(0x229)],_0x4cd4da,_0x14384a,_0x4df209[_0x4b76a1(0x213)],_0xb1ff67,_0x338337);if(_0x4cd4da){const _0x433ace=await _0x5c4efa['opPOh'](isCachedSessionLive,_0x985c0a,_0x4cd4da,{'sessionCheckPath':_0x315507?.['sessionCheckPath'],'setupHeaders':_0x14384a},{'launchBrowser':launchRealBrowser});if(_0x433ace)return console['log']('\x20\x20Cloud\x20session\x20is\x20live\x20for\x20\x22'+_0x4df209['name']+_0x4b76a1(0x218)),{'authPath':_0x985c0a,'settings':_0x23ba76,'resolvedEnv':_0x315507};console['log'](_0x4b76a1(0x223)+_0x4df209[_0x4b76a1(0x1eb)]+'\x22\x20failed\x20validation\x20—\x20re-login\x20needed...'),emitSessionValidationHint(_0x4cd4da,_0x315507);}else return{'authPath':_0x985c0a,'settings':_0x23ba76,'resolvedEnv':_0x315507};}console['log']('\x20\x20No\x20live\x20session\x20for\x20\x22'+_0x4df209[_0x4b76a1(0x1eb)]+_0x4b76a1(0x220));const _0x1d6207=_0x5c4efa[_0x4b76a1(0x1dc)](Boolean,process[_0x4b76a1(0x1f5)][_0x4b76a1(0x204)])&&Boolean(process[_0x4b76a1(0x1f5)]['RANGER_TEST_PASSWORD']),_0x376f19=Boolean(_0x4df209['username']);if(_0x1d6207||_0x376f19)try{const _0x2aa8c6=await _0x5c4efa[_0x4b76a1(0x1f8)](serverSideLogin,_0x4df209['name']);if(_0x2aa8c6['status']===_0x5c4efa['hDGRt'])console[_0x4b76a1(0x1fb)]('\x20\x20Server-side\x20login\x20not\x20configured\x20for\x20this\x20org.\x20Falling\x20back\x20to\x20manual\x20login...');else{if(_0x2aa8c6[_0x4b76a1(0x1d0)]==='success'&&_0x2aa8c6[_0x4b76a1(0x20d)]){console[_0x4b76a1(0x1fb)]('\x20\x20Login\x20successful.\x20Session\x20cached.');const _0x46ac92=await writeSessionToLocalCache(_0x4df209['name'],_0x4df209[_0x4b76a1(0x229)],_0x4cd4da,_0x14384a,_0x2aa8c6['session_state'],_0xb1ff67,_0x338337);return _0x1d6207&&!_0x376f19&&await promptSaveCredentials(_0x4df209['name']),{'authPath':_0x46ac92,'settings':_0x23ba76,'resolvedEnv':_0x315507};}else _0x2aa8c6['test_output']&&(console[_0x4b76a1(0x1fb)](_0x5c4efa[_0x4b76a1(0x1d3)]),console[_0x4b76a1(0x1fb)](_0x2aa8c6[_0x4b76a1(0x226)])),console[_0x4b76a1(0x1fb)](_0x5c4efa['ZotMR']);}}catch(_0x39db82){console['log'](_0x4b76a1(0x1e6)+(_0x39db82 instanceof Error?_0x39db82[_0x4b76a1(0x207)]:String(_0x39db82))),console[_0x4b76a1(0x1fb)](_0x5c4efa['ZotMR']);}const {sessionState:_0x4a043d}=await manualBrowserLogin(_0x4df209,_0x315507),_0x1938f0=await writeSessionToLocalCache(_0x4df209[_0x4b76a1(0x1eb)],_0x4df209['organizationId'],_0x4cd4da,_0x14384a,_0x4a043d,_0xb1ff67,_0x338337);return{'authPath':_0x1938f0,'settings':_0x23ba76,'resolvedEnv':_0x315507};}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0x41d633,_0x15437b){const _0x1f06b4=_0x1db8,_0x18bb81=_0x41d633();while(!![]){try{const _0x5030d5=parseInt(_0x1f06b4(0x1ae))/0x1+-parseInt(_0x1f06b4(0x1b8))/0x2*(-parseInt(_0x1f06b4(0x1ac))/0x3)+-parseInt(_0x1f06b4(0x1b0))/0x4+parseInt(_0x1f06b4(0x1a4))/0x5+parseInt(_0x1f06b4(0x196))/0x6*(-parseInt(_0x1f06b4(0x1b9))/0x7)+parseInt(_0x1f06b4(0x197))/0x8+-parseInt(_0x1f06b4(0x1b1))/0x9;if(_0x5030d5===_0x15437b)break;else _0x18bb81['push'](_0x18bb81['shift']());}catch(_0x26dcd9){_0x18bb81['push'](_0x18bb81['shift']());}}}(_0x2f7f,0xe1e00));import{createHash}from'crypto';import{join}from'path';import{getRangerHomeDir}from'./rangerRoot.js';export function isInteractive(_0x49399c=process['env'],_0x225a20={'stdin':process['stdin'],'stdout':process['stdout']}){const _0xdb155e=_0x1db8;if(_0x49399c['CI'])return![];return Boolean(_0x225a20['stdin'][_0xdb155e(0x1a8)])&&Boolean(_0x225a20[_0xdb155e(0x1b3)][_0xdb155e(0x1a8)]);}export const DEFAULT_INVALIDATE_ON=[];export function sessionCacheHash(_0x27896e){const _0x54fd79=_0x1db8,_0x458f68={'uMNlL':_0x54fd79(0x1a1),'ItOBE':_0x54fd79(0x194),'onkRC':function(_0x423367,_0x2af47d){return _0x423367(_0x2af47d);},'VopZW':_0x54fd79(0x19a),'IIOUs':function(_0x4bdb00,_0x26dd6f){return _0x4bdb00!==_0x26dd6f;},'zJaYo':_0x54fd79(0x1a3),'GTSFg':function(_0x32072d,_0x568d7c){return _0x32072d(_0x568d7c);}},_0x226c27=new Set(_0x27896e['invalidateOn']??DEFAULT_INVALIDATE_ON),_0x14e09f={'orgId':_0x27896e[_0x54fd79(0x19e)],'profileName':_0x27896e[_0x54fd79(0x1a0)]};return _0x226c27[_0x54fd79(0x1a7)](_0x458f68[_0x54fd79(0x1a2)])&&(_0x14e09f[_0x54fd79(0x19d)]=_0x27896e[_0x54fd79(0x19d)]),_0x226c27[_0x54fd79(0x1a7)]('setupHeaders')&&(_0x14e09f[_0x54fd79(0x199)]=_0x27896e['setupHeaders']?sortObjectKeys(_0x27896e['setupHeaders']):_0x27896e['setupHeaders']),_0x226c27[_0x54fd79(0x1a7)](_0x458f68['ItOBE'])&&(_0x14e09f['port']=_0x458f68['onkRC'](extractPort,_0x27896e[_0x54fd79(0x19d)])),_0x226c27[_0x54fd79(0x1a7)](_0x458f68['VopZW'])&&_0x458f68[_0x54fd79(0x1b2)](_0x27896e[_0x54fd79(0x19a)],undefined)&&(_0x14e09f[_0x54fd79(0x19a)]=_0x27896e['userAgent']),_0x226c27['has'](_0x458f68['zJaYo'])&&_0x27896e[_0x54fd79(0x1a3)]!==undefined&&(_0x14e09f[_0x54fd79(0x1a3)]=_0x27896e['clientIp']),_0x458f68['GTSFg'](createHash,'sha256')['update'](JSON[_0x54fd79(0x1af)](_0x14e09f))['digest']('hex')['slice'](0x0,0xc);}function extractPort(_0x1691bd){const _0x18abe2=_0x1db8;try{return new URL(_0x1691bd)[_0x18abe2(0x194)];}catch{return'';}}function sortObjectKeys(_0x457448){const _0x18c432={};for(const _0x282506 of Object['keys'](_0x457448)['sort']()){_0x18c432[_0x282506]=_0x457448[_0x282506];}return _0x18c432;}function _0x2f7f(){const _0x2792e6=['has','isTTY','jdNwK','defaultEnvironmentKey','sessionCheckPath','90YMxwPm','.storageState.json','1766116tbFsGe','stringify','1060992CZMVWS','21903129jYNmKe','IIOUs','stdout','replace','map','catch','url','82112zfQauO','140ceJFSo','.json','hostname','port','pathname','155934IhXTQg','1035760cfMgtg','test','setupHeaders','userAgent','localhost.','endsWith','effectiveBaseUrl','orgId','includes','profileName','baseUrl','uMNlL','clientIp','5083135rPwSJT','domain','startsWith'];_0x2f7f=function(){return _0x2792e6;};return _0x2f7f();}export function getSessionCachePath(_0x45282a,_0x1922e1){const _0x18be17=_0x1db8;return join(getRangerHomeDir(),'auth',_0x45282a+'-'+_0x1922e1+_0x18be17(0x1ba));}export function getStorageStatePath(_0x262974){const _0x4dc3de=_0x1db8,_0x556379={'jdNwK':_0x4dc3de(0x1ad)};return _0x262974[_0x4dc3de(0x1b4)](/\.json$/,_0x556379[_0x4dc3de(0x1a9)]);}export function needsTunnel(_0x24f648){const _0x3dbb41=_0x1db8,_0x394d3a={'uwqqm':'127.0.0.1','yOtYk':'.localhost'};let _0x510465;try{_0x510465=new URL(_0x24f648)[_0x3dbb41(0x193)];}catch{return![];}if(_0x510465==='localhost'||_0x510465===_0x394d3a['uwqqm'])return!![];if(_0x510465[_0x3dbb41(0x19c)](_0x394d3a['yOtYk']))return!![];if(_0x510465[_0x3dbb41(0x19f)](_0x3dbb41(0x19b)))return!![];return![];}export function hostnameOf(_0x583578){return new URL(_0x583578)['hostname'];}export function duplicateCookiesForDomains(_0x551a36,_0x2505f2){const _0xaa4f2b=_0x1db8,_0x3a4b23=[..._0x551a36],_0x4fa647=new Set(_0x551a36[_0xaa4f2b(0x1b5)](_0x278b31=>_0x278b31[_0xaa4f2b(0x1a5)]));for(const _0x313547 of _0x2505f2){let _0x27d88d;try{_0x27d88d=hostnameOf(_0x313547);}catch{continue;}if(!_0x27d88d)continue;const _0x2ad37c=_0x27d88d[_0xaa4f2b(0x1a6)]('.')?_0x27d88d:'.'+_0x27d88d;if(_0x4fa647['has'](_0x27d88d)||_0x4fa647[_0xaa4f2b(0x1a7)](_0x2ad37c))continue;for(const _0x3c0b74 of _0x551a36){_0x3a4b23['push']({..._0x3c0b74,'domain':_0x2ad37c});}_0x4fa647['add'](_0x2ad37c);}return _0x3a4b23;}export function resolveAuthEnvironmentLocally(_0x68350e,_0x435511){const _0x2de4e3=_0x1db8,_0x3364d0=_0x68350e['environments'];if(_0x435511){const _0x1a585f=_0x3364d0[_0x435511];if(!_0x1a585f)return null;return{'key':_0x435511,..._0x1a585f};}if(_0x68350e[_0x2de4e3(0x1aa)]){const _0x4cf941=_0x3364d0[_0x68350e['defaultEnvironmentKey']];if(!_0x4cf941)return null;return{'key':_0x68350e['defaultEnvironmentKey'],..._0x4cf941};}const _0xd1f003=Object['keys'](_0x3364d0);if(_0xd1f003['length']===0x1){const _0x27feb3=_0xd1f003[0x0];return{'key':_0x27feb3,..._0x3364d0[_0x27feb3]};}return null;}function _0x1db8(_0xf65f70,_0x171497){_0xf65f70=_0xf65f70-0x193;const _0x2f7f45=_0x2f7f();let _0x1db80c=_0x2f7f45[_0xf65f70];return _0x1db80c;}const LOGIN_URL_PATTERN=/(?:^|\/)(login|signin|sign-in|sso|auth\/login)(?:[/?#]|$)/i;export function buildSessionCheckUrl(_0x586f50,_0x588d42){try{if(_0x588d42)return new URL(_0x588d42,_0x586f50)['toString']();return new URL(_0x586f50)['toString']();}catch{return null;}}export function looksLikeLoginUrl(_0x126f1c){const _0x390f67=_0x1db8;try{const _0x52fcec=new URL(_0x126f1c);return LOGIN_URL_PATTERN['test'](_0x52fcec[_0x390f67(0x195)]);}catch{return LOGIN_URL_PATTERN[_0x390f67(0x198)](_0x126f1c);}}export async function isCachedSessionLive(_0x1acd43,_0x72b912,_0x5f4548={},_0x34e549={}){const _0x555339=_0x1db8,_0x4633af={'EicmV':'domcontentloaded','JkFGD':function(_0x73b7e8,_0x4a5d79){return _0x73b7e8===_0x4a5d79;}},_0xa32590=buildSessionCheckUrl(_0x72b912,_0x5f4548[_0x555339(0x1ab)]);if(!_0xa32590)return!![];if(!_0x34e549['launchBrowser'])return!![];let _0x5ebe43=null;try{_0x5ebe43=await _0x34e549['launchBrowser']();const _0x3a683b=await _0x5ebe43['newContext']({'storageState':_0x1acd43,'ignoreHTTPSErrors':!![],..._0x5f4548[_0x555339(0x199)]?{'extraHTTPHeaders':_0x5f4548[_0x555339(0x199)]}:{}}),_0x2a9fdf=await _0x3a683b['newPage'](),_0x4a23ed=await _0x2a9fdf['goto'](_0xa32590,{'waitUntil':_0x4633af['EicmV'],'timeout':0x3a98}),_0x39e8ff=_0x4a23ed?.['status']();if(_0x4633af['JkFGD'](_0x39e8ff,0x191)||_0x4633af['JkFGD'](_0x39e8ff,0x193))return![];const _0x9fba94=_0x2a9fdf[_0x555339(0x1b7)]();if(looksLikeLoginUrl(_0x9fba94))return![];return!![];}catch{return![];}finally{if(_0x5ebe43)await _0x5ebe43['close']()[_0x555339(0x1b6)](()=>{});}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0x378019,_0x453729){const _0x26a40c=_0x7b3f,_0x22cd02=_0x378019();while(!![]){try{const _0x21ce7c=-parseInt(_0x26a40c(0x1e8))/0x1+parseInt(_0x26a40c(0x1ee))/0x2+-parseInt(_0x26a40c(0x1ec))/0x3*(-parseInt(_0x26a40c(0x1e9))/0x4)+parseInt(_0x26a40c(0x1f0))/0x5+-parseInt(_0x26a40c(0x1eb))/0x6*(parseInt(_0x26a40c(0x1e6))/0x7)+parseInt(_0x26a40c(0x1ed))/0x8+-parseInt(_0x26a40c(0x1e7))/0x9*(parseInt(_0x26a40c(0x1ef))/0xa);if(_0x21ce7c===_0x453729)break;else _0x22cd02['push'](_0x22cd02['shift']());}catch(_0x1b122c){_0x22cd02['push'](_0x22cd02['shift']());}}}(_0x40ee,0x67ed0));function _0x7b3f(_0xd24a9c,_0x374ed2){_0xd24a9c=_0xd24a9c-0x1e6;const _0x40ee61=_0x40ee();let _0x7b3fb2=_0x40ee61[_0xd24a9c];return _0x7b3fb2;}import{execFile as _0x29be92}from'child_process';import{promisify}from'util';const execFile=promisify(_0x29be92);export async function isPathGitTracked(_0x2ebc69){const _0x518864=_0x7b3f,_0x515832={'TJDld':'--error-unmatch'};try{return await execFile(_0x518864(0x1ea),['ls-files',_0x515832['TJDld'],_0x2ebc69],{'cwd':process['cwd']()}),!![];}catch{return![];}}function _0x40ee(){const _0x160eac=['2330VovNIK','1878825qAliQz','10367Dvnrrl','45954KWHQZS','111489lKmuao','16AHAowv','git','1362SrCupG','570957ZrHWto','929976ewlFlj','1619532FErvPn'];_0x40ee=function(){return _0x160eac;};return _0x40ee();}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const _0x5e6c4f=_0x1d2c;(function(_0x1bcf00,_0x5a59e){const _0x3f4f80=_0x1d2c,_0x1f4af6=_0x1bcf00();while(!![]){try{const _0xcf8ff1=-parseInt(_0x3f4f80(0x197))/0x1*(parseInt(_0x3f4f80(0x189))/0x2)+parseInt(_0x3f4f80(0x199))/0x3*(parseInt(_0x3f4f80(0x179))/0x4)+parseInt(_0x3f4f80(0x194))/0x5*(-parseInt(_0x3f4f80(0x196))/0x6)+-parseInt(_0x3f4f80(0x17d))/0x7*(parseInt(_0x3f4f80(0x185))/0x8)+parseInt(_0x3f4f80(0x19e))/0x9*(-parseInt(_0x3f4f80(0x18d))/0xa)+parseInt(_0x3f4f80(0x186))/0xb*(parseInt(_0x3f4f80(0x1a0))/0xc)+-parseInt(_0x3f4f80(0x178))/0xd*(-parseInt(_0x3f4f80(0x187))/0xe);if(_0xcf8ff1===_0x5a59e)break;else _0x1f4af6['push'](_0x1f4af6['shift']());}catch(_0x632307){_0x1f4af6['push'](_0x1f4af6['shift']());}}}(_0x2a95,0x471b2));import{existsSync,writeFileSync,mkdirSync}from'fs';import{join}from'path';function _0x1d2c(_0x3e6451,_0x21daac){_0x3e6451=_0x3e6451-0x178;const _0x2a9511=_0x2a95();let _0x1d2c2f=_0x2a9511[_0x3e6451];return _0x1d2c2f;}import{getRangerDir,getRangerHomeDir}from'./rangerRoot.js';function _0x2a95(){const _0x480c43=['mhuAt','length','start','profiles','setup','8VOoZjx','55HkiHgn','56pMePki','--help','7182lMbHMw','YKGNy','\x20\x20\x20For\x20CI\x20/\x20background\x20agents\x20and\x20other\x20setup\x20options,\x20see:','\x20\x20\x20\x20\x20ranger\x20profile\x20add\x20<name>','653110HdBYLR','\x20\x20\x20Delete\x20these\x20paths\x20after\x20you\x20have\x20re-auth-ed.','fYhrX','active-profile.txt','navpV','\x20\x20\x20\x20\x20','verify-feature','2296990HBOoRJ','eQuUJ','6nAUkmy','29nkrNsB','local','272913pmjibg','\x20\x20\x20\x20\x20https://docs.ranger.net/main/concepts/profiles','verify','jycqA','has','9qJwRwc','HdoDv','312204RryWqT','3346668duSqtM','4joGHbi','RhRRs','vZzIg','slice','2314914eBbmdL','MARXq','map'];_0x2a95=function(){return _0x480c43;};return _0x2a95();}function detectLegacyPaths(){const _0x2ba4f7=_0x1d2c,_0x3bdcef={'navpV':function(_0x275854){return _0x275854();},'jycqA':function(_0x2cc826,_0x1ac5e5,_0x5afcb1){return _0x2cc826(_0x1ac5e5,_0x5afcb1);},'ARKjY':function(_0x2237c8,_0x1879bc,_0x52c9be){return _0x2237c8(_0x1879bc,_0x52c9be);},'eQuUJ':'local','fYhrX':function(_0x4891df,_0x59620a,_0x361813){return _0x4891df(_0x59620a,_0x361813);},'RhRRs':_0x2ba4f7(0x190)},_0x34b4dc=_0x3bdcef[_0x2ba4f7(0x191)](getRangerDir),_0x6acabe=_0x3bdcef['navpV'](getRangerHomeDir);return[join(_0x34b4dc,_0x2ba4f7(0x198)),_0x3bdcef[_0x2ba4f7(0x19c)](join,_0x34b4dc,'ci'),_0x3bdcef['ARKjY'](join,_0x6acabe,_0x3bdcef[_0x2ba4f7(0x195)]),_0x3bdcef[_0x2ba4f7(0x18f)](join,_0x34b4dc,_0x3bdcef[_0x2ba4f7(0x17a)])]['filter'](_0x288b3b=>existsSync(_0x288b3b));}function flagFilePath(){const _0x1e857f=_0x1d2c,_0x545e9e=new Date()['toISOString']()[_0x1e857f(0x17c)](0x0,0xa);return join(getRangerHomeDir(),'.legacy-warning-'+_0x545e9e);}export function showLegacyDeprecationWarning(){const _0x3ec615=_0x1d2c,_0x5181d3={'mhuAt':function(_0x57c670){return _0x57c670();},'vZzIg':function(_0x40ac9e){return _0x40ac9e();},'HDVWi':'\x20\x20\x20Ranger\x20no\x20longer\x20writes\x20to\x20these\x20paths.\x20Existing\x20sessions\x20there\x20still\x20work','XNWgD':_0x3ec615(0x18c),'MARXq':_0x3ec615(0x18b),'uvyHI':_0x3ec615(0x18e),'HdoDv':function(_0x5e37ef,_0x4000aa,_0x1cd7e2,_0x473b28){return _0x5e37ef(_0x4000aa,_0x1cd7e2,_0x473b28);}},_0x4d6085=_0x5181d3[_0x3ec615(0x180)](detectLegacyPaths);if(_0x4d6085[_0x3ec615(0x181)]===0x0)return;const _0x6fe298=_0x5181d3[_0x3ec615(0x17b)](flagFilePath);if(existsSync(_0x6fe298))return;const _0x4aa67d=['','⚠\x20\x20Legacy\x20Ranger\x20paths\x20detected\x20(read-only):',..._0x4d6085[_0x3ec615(0x17f)](_0x51b218=>_0x3ec615(0x192)+_0x51b218),'',_0x5181d3['HDVWi'],'\x20\x20\x20as\x20a\x20fallback.\x20To\x20set\x20up\x20a\x20fresh\x20profile,\x20run:','',_0x5181d3['XNWgD'],'',_0x5181d3[_0x3ec615(0x17e)],_0x3ec615(0x19a),'',_0x5181d3['uvyHI'],''];process['stderr']['write'](_0x4aa67d['join']('\x0a')+'\x0a');try{mkdirSync(getRangerHomeDir(),{'recursive':!![]}),_0x5181d3[_0x3ec615(0x19f)](writeFileSync,_0x6fe298,'',{'mode':0x180});}catch{}}const PROFILE_TOUCHING_COMMANDS=new Set(['go',_0x5e6c4f(0x19b),_0x5e6c4f(0x193),'profile',_0x5e6c4f(0x183),_0x5e6c4f(0x184),'setup-ci',_0x5e6c4f(0x182),'use']);export function shouldShowLegacyWarning(_0x2ec34c){const _0x109119=_0x5e6c4f,_0x2926ee={'BgTdD':function(_0x2aaf6a,_0x14fbed){return _0x2aaf6a<_0x14fbed;},'YKGNy':function(_0x4f6c36,_0x56c898){return _0x4f6c36===_0x56c898;}},_0x4fceb2=_0x2ec34c[0x2];if(!_0x4fceb2)return![];if(_0x4fceb2['startsWith']('-'))return![];if(!PROFILE_TOUCHING_COMMANDS[_0x109119(0x19d)](_0x4fceb2))return![];for(let _0x44e050=0x3;_0x2926ee['BgTdD'](_0x44e050,_0x2ec34c[_0x109119(0x181)]);_0x44e050++){if(_0x2926ee[_0x109119(0x18a)](_0x2ec34c[_0x44e050],_0x109119(0x188))||_0x2926ee[_0x109119(0x18a)](_0x2ec34c[_0x44e050],'-h'))return![];}return!![];}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0x33bd2d,_0x11e1aa){const _0xa3ee3c=_0x3b71,_0xa1db93=_0x33bd2d();while(!![]){try{const _0xf2eded=-parseInt(_0xa3ee3c(0x9f))/0x1*(parseInt(_0xa3ee3c(0xa6))/0x2)+-parseInt(_0xa3ee3c(0xaa))/0x3*(parseInt(_0xa3ee3c(0x9d))/0x4)+parseInt(_0xa3ee3c(0x9c))/0x5*(-parseInt(_0xa3ee3c(0xa4))/0x6)+-parseInt(_0xa3ee3c(0xa3))/0x7+-parseInt(_0xa3ee3c(0xa1))/0x8*(parseInt(_0xa3ee3c(0xa0))/0x9)+-parseInt(_0xa3ee3c(0xa7))/0xa*(parseInt(_0xa3ee3c(0x9a))/0xb)+parseInt(_0xa3ee3c(0xa2))/0xc;if(_0xf2eded===_0x11e1aa)break;else _0xa1db93['push'](_0xa1db93['shift']());}catch(_0x3e7fa2){_0xa1db93['push'](_0xa1db93['shift']());}}}(_0x3a02,0x2b980));function originIdentity(_0xa5b2da){const _0x371cc6=_0x3b71;try{const _0x2f1c70=new URL(_0xa5b2da);return _0x2f1c70[_0x371cc6(0x9b)]+'//'+_0x2f1c70[_0x371cc6(0xa5)];}catch{return undefined;}}function _0x3b71(_0x588164,_0x2ba821){_0x588164=_0x588164-0x9a;const _0x3a023b=_0x3a02();let _0x3b7135=_0x3a023b[_0x588164];return _0x3b7135;}export function matchAuthEnvironment(_0x272c98,_0x270b84){const _0x5783bc=_0x3b71,_0x31cd2d={'CpFUE':function(_0x1f1d95,_0x241542){return _0x1f1d95(_0x241542);},'FriSX':function(_0x47b7e8,_0x380801){return _0x47b7e8===_0x380801;}};if(!_0x270b84||!_0x270b84['environments'])return undefined;const _0x8fb7c9=originIdentity(_0x272c98);if(!_0x8fb7c9){if(_0x270b84[_0x5783bc(0x9e)]&&_0x270b84['environments'][_0x270b84[_0x5783bc(0x9e)]])return _0x270b84['defaultEnvironmentKey'];return undefined;}for(const [_0x358b38,_0x155593]of Object['entries'](_0x270b84['environments'])){for(const _0x435a83 of _0x155593[_0x5783bc(0xa9)]??[]){const _0x1ceddd=_0x31cd2d['CpFUE'](originIdentity,_0x435a83);if(_0x1ceddd&&_0x31cd2d['FriSX'](_0x1ceddd,_0x8fb7c9))return _0x358b38;}}if(_0x270b84[_0x5783bc(0x9e)]&&_0x270b84[_0x5783bc(0xa8)][_0x270b84['defaultEnvironmentKey']])return _0x270b84[_0x5783bc(0x9e)];return undefined;}function _0x3a02(){const _0x3cb441=['4868jSyIfg','defaultEnvironmentKey','1OCiJEc','27qKthck','468704qfzYaj','15340068DNFFwJ','1914997ZHzMGF','6FMeQrP','host','134132TqpjJa','1731370gFgyxB','environments','domains','81vzjkyh','22iDWMXv','protocol','1021225juKlPv'];_0x3a02=function(){return _0x3cb441;};return _0x3a02();}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0x11ea68,_0x2149d9){const _0x1c23f1=_0x55b1,_0x57311d=_0x11ea68();while(!![]){try{const _0x37ff=-parseInt(_0x1c23f1(0xcb))/0x1+-parseInt(_0x1c23f1(0xbf))/0x2+-parseInt(_0x1c23f1(0xb8))/0x3+-parseInt(_0x1c23f1(0xba))/0x4+parseInt(_0x1c23f1(0xd4))/0x5+-parseInt(_0x1c23f1(0xd2))/0x6*(parseInt(_0x1c23f1(0xc3))/0x7)+-parseInt(_0x1c23f1(0xc5))/0x8*(-parseInt(_0x1c23f1(0xd3))/0x9);if(_0x37ff===_0x2149d9)break;else _0x57311d['push'](_0x57311d['shift']());}catch(_0x281c1d){_0x57311d['push'](_0x57311d['shift']());}}}(_0x3086,0x49cb1));import{existsSync,mkdirSync,readFileSync,renameSync,writeFileSync}from'fs';import{unlinkSync}from'fs';import{dirname,join}from'path';function _0x3086(){const _0x139471=['4566eeNYUz','25344kZneqI','629530EWTxZz','pfIsj','projects','GmMmu','eyGrv','isArray','frlhZ','warn','setupHeaders',').\x20Ignoring\x20local\x20profile\x20overrides.','734127UpiDke','VZrQN','2298604FnXCKf','cAPCw','length','[ranger]\x20Warning:\x20','hHVZg','1128954qRZRIq','.tmp','object','YnSlQ','4361cAjcnP','UadTL','6144pBWjKL','KfMky','message','profiles','Vklku','lastProfile','128397cTpYXn','zVVtI','NiKna','QQFlZ','headers','split','settings'];_0x3086=function(){return _0x139471;};return _0x3086();}import{getRangerHomeDir}from'./rangerRoot.js';const CURRENT_VERSION=0x1;export function getProjectsConfigPath(){const _0x543e65=_0x55b1,_0xd371a9={'rUqpT':function(_0x880e0e,_0x5df93e,_0x5dacee){return _0x880e0e(_0x5df93e,_0x5dacee);},'pfIsj':function(_0x1ff715){return _0x1ff715();}};return _0xd371a9['rUqpT'](join,_0xd371a9[_0x543e65(0xd5)](getRangerHomeDir),'projects.json');}function _0x55b1(_0x216556,_0xf1d8e3){_0x216556=_0x216556-0xb7;const _0x30861b=_0x3086();let _0x55b1ef=_0x30861b[_0x216556];return _0x55b1ef;}function emptyConfig(){return{'version':CURRENT_VERSION,'projects':{}};}export function readProjectsConfig(){const _0xe4b3f9=_0x55b1,_0x2fd0fc={'UIBhk':function(_0x1aecb7){return _0x1aecb7();},'TuWwD':function(_0xdf1e90,_0x189772){return _0xdf1e90(_0x189772);},'RtZak':function(_0x421031,_0x1cb553){return _0x421031 instanceof _0x1cb553;},'zVVtI':function(_0x1613a5,_0x17037f){return _0x1613a5(_0x17037f);},'YnSlQ':function(_0x132da2){return _0x132da2();},'FFTeh':'object','cAPCw':function(_0x3dcc2e){return _0x3dcc2e();}},_0x3ded00=_0x2fd0fc['UIBhk'](getProjectsConfigPath);if(!_0x2fd0fc['TuWwD'](existsSync,_0x3ded00))return _0x2fd0fc['UIBhk'](emptyConfig);let _0x5c8ff3;try{_0x5c8ff3=readFileSync(_0x3ded00,'utf-8');}catch(_0x44ce9b){const _0x3604c3=_0x44ce9b instanceof Error?_0x44ce9b[_0xe4b3f9(0xc7)]:String(_0x44ce9b);return console[_0xe4b3f9(0xdb)]('[ranger]\x20Warning:\x20failed\x20to\x20read\x20'+_0x3ded00+':\x20'+_0x3604c3+'.\x20Ignoring\x20local\x20profile\x20overrides.'),emptyConfig();}let _0x29486a;try{_0x29486a=JSON['parse'](_0x5c8ff3);}catch(_0x5a0959){const _0xe7172b=_0x2fd0fc['RtZak'](_0x5a0959,Error)?_0x5a0959[_0xe4b3f9(0xc7)]:_0x2fd0fc[_0xe4b3f9(0xcc)](String,_0x5a0959);return console[_0xe4b3f9(0xdb)](_0xe4b3f9(0xbd)+_0x3ded00+'\x20is\x20not\x20valid\x20JSON\x20('+_0xe7172b+_0xe4b3f9(0xb7)),_0x2fd0fc[_0xe4b3f9(0xc2)](emptyConfig);}if(!_0x29486a||typeof _0x29486a!==_0x2fd0fc['FFTeh']||Array['isArray'](_0x29486a)||_0x29486a['version']!==CURRENT_VERSION||typeof _0x29486a['projects']!==_0x2fd0fc['FFTeh']||_0x29486a[_0xe4b3f9(0xd6)]===null||Array['isArray'](_0x29486a['projects']))return console[_0xe4b3f9(0xdb)](_0xe4b3f9(0xbd)+_0x3ded00+'\x20has\x20an\x20unexpected\x20shape.\x20Ignoring\x20local\x20profile\x20overrides.'),_0x2fd0fc[_0xe4b3f9(0xbb)](emptyConfig);return _0x29486a;}export function writeProjectsConfig(_0x14353b){const _0x454a31=_0x55b1,_0x569a88={'Vklku':function(_0x2eca1f){return _0x2eca1f();},'ybjJd':function(_0x4cdc30,_0x28ebd4){return _0x4cdc30(_0x28ebd4);},'KYGmZ':'utf-8','eyGrv':function(_0x106f47,_0x4fb6c1){return _0x106f47(_0x4fb6c1);}},_0x14665c=_0x569a88[_0x454a31(0xc9)](getProjectsConfigPath),_0x434373=dirname(_0x14665c);!_0x569a88['ybjJd'](existsSync,_0x434373)&&mkdirSync(_0x434373,{'recursive':!![]});const _0x18c424=_0x14665c+'.'+process['pid']+'.'+Date['now']()+_0x454a31(0xc0),_0x40f53e=JSON['stringify'](_0x14353b,null,0x2)+'\x0a';try{writeFileSync(_0x18c424,_0x40f53e,{'encoding':_0x569a88['KYGmZ'],'mode':0x180}),renameSync(_0x18c424,_0x14665c);}catch(_0x8dec5c){try{_0x569a88[_0x454a31(0xd8)](existsSync,_0x18c424)&&_0x569a88[_0x454a31(0xd8)](unlinkSync,_0x18c424);}catch{}throw _0x8dec5c;}}export function readProfileOverrides(_0x3b8252,_0x592bee){const _0x1e5c35=_0x55b1,_0x5d99df={'NiKna':function(_0x2f5e5a){return _0x2f5e5a();}},_0xdff72=_0x5d99df[_0x1e5c35(0xcd)](readProjectsConfig),_0x220ddf=_0xdff72[_0x1e5c35(0xd6)][_0x3b8252];if(!_0x220ddf||!_0x220ddf[_0x1e5c35(0xc8)])return null;const _0x3f6474=_0x220ddf[_0x1e5c35(0xc8)][_0x592bee];if(!_0x3f6474||!_0x3f6474['settings'])return null;return _0x3f6474[_0x1e5c35(0xd1)]??null;}export function setProfileOverride(_0x3f1821,_0x51e813,_0xcb0632,_0xa843bf){const _0x17c611={'TBzns':'keyPath\x20is\x20required','OjSrl':function(_0x561a13,_0x2fb05b){return _0x561a13(_0x2fb05b);}};if(!_0xcb0632)throw new Error(_0x17c611['TBzns']);const _0x31abc0=readProjectsConfig(),_0x291f21=_0x31abc0['projects'][_0x3f1821]??={},_0x4da2f2=_0x291f21['profiles']??={},_0x4a19f9=_0x4da2f2[_0x51e813]??={},_0x2c3bb4=_0x4a19f9['settings']??={};setByKeyPath(_0x2c3bb4,_0xcb0632,_0xa843bf),_0x17c611['OjSrl'](writeProjectsConfig,_0x31abc0);}export function unsetProfileOverride(_0x39db3e,_0x305c03,_0x280cad){const _0x2c2c13=_0x55b1,_0x2e2007={'lcKKO':function(_0x5533bc){return _0x5533bc();}};if(!_0x280cad)throw new Error('keyPath\x20is\x20required');const _0x39e782=_0x2e2007['lcKKO'](readProjectsConfig),_0x3a3c2e=_0x39e782['projects'][_0x39db3e];if(!_0x3a3c2e?.[_0x2c2c13(0xc8)])return![];const _0x342ac6=_0x3a3c2e[_0x2c2c13(0xc8)][_0x305c03];if(!_0x342ac6?.[_0x2c2c13(0xd1)])return![];const _0x13d794=deleteByKeyPath(_0x342ac6[_0x2c2c13(0xd1)],_0x280cad);if(!_0x13d794)return![];return writeProjectsConfig(_0x39e782),!![];}export function resetProfileOverrides(_0x83a3b,_0x526c5f){const _0x3fa931=_0x55b1,_0x2d7d68={'BQjYY':function(_0x45ca36){return _0x45ca36();},'UadTL':function(_0x25277c,_0xefebe0){return _0x25277c in _0xefebe0;},'hHVZg':function(_0x55afd9,_0x26c5c3){return _0x55afd9(_0x26c5c3);}},_0x3984c1=_0x2d7d68['BQjYY'](readProjectsConfig),_0x485b30=_0x3984c1[_0x3fa931(0xd6)][_0x83a3b];if(!_0x485b30?.['profiles'])return;if(!_0x2d7d68[_0x3fa931(0xc4)](_0x526c5f,_0x485b30['profiles']))return;delete _0x485b30[_0x3fa931(0xc8)][_0x526c5f],Object['keys'](_0x485b30['profiles'])['length']===0x0&&(!_0x485b30['lastProfile']?delete _0x3984c1['projects'][_0x83a3b]:_0x485b30[_0x3fa931(0xc8)]={}),_0x2d7d68[_0x3fa931(0xbe)](writeProjectsConfig,_0x3984c1);}export function readLastProfile(_0x2e0fcb){const _0x5e56b4=_0x55b1,_0xd3cae5={'QQFlZ':function(_0x421f18){return _0x421f18();}},_0x55bd7e=_0xd3cae5[_0x5e56b4(0xce)](readProjectsConfig),_0x8facb2=_0x55bd7e[_0x5e56b4(0xd6)][_0x2e0fcb];return _0x8facb2?.[_0x5e56b4(0xca)]??null;}export function writeLastProfile(_0x583af1,_0x5259f5){const _0x5cf83d=_0x55b1,_0x1ed865=readProjectsConfig(),_0x16ec2f=_0x1ed865[_0x5cf83d(0xd6)][_0x583af1]??={};_0x16ec2f['lastProfile']=_0x5259f5,writeProjectsConfig(_0x1ed865);}export function mergeCloudProfileSettings(_0x1f2e8e,_0xeca5e3){const _0x3a6ad4=_0x55b1,_0x26e263={'EEnbw':function(_0x4b27e4,_0x33f0ba){return _0x4b27e4??_0x33f0ba;},'GmMmu':function(_0x332427,_0x29f64e){return _0x332427===_0x29f64e;},'tGzVU':function(_0x52873a,_0x1f8ace){return _0x52873a(_0x1f8ace);},'tjoGq':function(_0x37d278,_0x4178c8){return _0x37d278(_0x4178c8);},'OrDEX':function(_0x29fd8a,_0x57e19f){return _0x29fd8a!==_0x57e19f;}},_0x5c7251={..._0x26e263['EEnbw'](_0x1f2e8e,{})};if(!_0xeca5e3)return _0x5c7251;for(const [_0x2c57c0,_0x245bab]of Object['entries'](_0xeca5e3)){if(_0x245bab===undefined)continue;if(_0x26e263[_0x3a6ad4(0xd7)](_0x245bab,null)){delete _0x5c7251[_0x2c57c0];continue;}if(_0x26e263['GmMmu'](_0x2c57c0,_0x3a6ad4(0xcf))||_0x26e263['GmMmu'](_0x2c57c0,_0x3a6ad4(0xdc))){const _0xd23e57=_0x26e263['tGzVU'](asRecord,_0x5c7251[_0x2c57c0])??{},_0x17884f=_0x26e263['tjoGq'](asRecord,_0x245bab);if(!_0x17884f){_0x5c7251[_0x2c57c0]=_0x245bab;continue;}const _0x5cd8ba={..._0xd23e57};for(const [_0x49d550,_0x1460cd]of Object['entries'](_0x17884f)){if(_0x1460cd===null)delete _0x5cd8ba[_0x49d550];else _0x26e263['OrDEX'](_0x1460cd,undefined)&&(_0x5cd8ba[_0x49d550]=_0x1460cd);}_0x5c7251[_0x2c57c0]=_0x5cd8ba;continue;}_0x5c7251[_0x2c57c0]=_0x245bab;}return _0x5c7251;}function asRecord(_0x1db3f4){const _0x376a22=_0x55b1,_0x43c722={'KfMky':_0x376a22(0xc1)};return _0x1db3f4&&typeof _0x1db3f4===_0x43c722[_0x376a22(0xc6)]&&!Array[_0x376a22(0xd9)](_0x1db3f4)?_0x1db3f4:undefined;}function setByKeyPath(_0x22eb02,_0x2d4824,_0x10cdf5){const _0xbd4fb=_0x55b1,_0x8a28c7={'BMPbO':function(_0x1f0018,_0x1bb797){return _0x1f0018<_0x1bb797;},'frlhZ':function(_0xc1fe85,_0x598a8a){return _0xc1fe85-_0x598a8a;},'hSkOc':function(_0x405bc8,_0x51ef95){return _0x405bc8!==_0x51ef95;}},_0x54668a=_0x2d4824[_0xbd4fb(0xd0)]('.');let _0x41fe06=_0x22eb02;for(let _0x46e595=0x0;_0x8a28c7['BMPbO'](_0x46e595,_0x8a28c7[_0xbd4fb(0xda)](_0x54668a['length'],0x1));_0x46e595++){const _0x466e74=_0x54668a[_0x46e595],_0x1b4f2c=_0x41fe06[_0x466e74];(!_0x1b4f2c||_0x8a28c7['hSkOc'](typeof _0x1b4f2c,_0xbd4fb(0xc1))||Array['isArray'](_0x1b4f2c))&&(_0x41fe06[_0x466e74]={}),_0x41fe06=_0x41fe06[_0x466e74];}_0x41fe06[_0x54668a[_0x8a28c7[_0xbd4fb(0xda)](_0x54668a['length'],0x1)]]=_0x10cdf5;}function deleteByKeyPath(_0x26fa4c,_0x3ca55c){const _0x29e3f1=_0x55b1,_0x2c5c29={'BLZGA':function(_0x546255,_0x11c32b){return _0x546255<_0x11c32b;},'VZrQN':function(_0x52a726,_0x4d9fc6){return _0x52a726-_0x4d9fc6;}},_0x3b351c=_0x3ca55c[_0x29e3f1(0xd0)]('.');let _0x547040=_0x26fa4c;for(let _0x573e63=0x0;_0x2c5c29['BLZGA'](_0x573e63,_0x2c5c29['VZrQN'](_0x3b351c[_0x29e3f1(0xbc)],0x1));_0x573e63++){const _0xa00204=_0x3b351c[_0x573e63],_0x5c8df5=_0x547040[_0xa00204];if(!_0x5c8df5||typeof _0x5c8df5!==_0x29e3f1(0xc1)||Array[_0x29e3f1(0xd9)](_0x5c8df5))return![];_0x547040=_0x5c8df5;}const _0x1b680a=_0x3b351c[_0x2c5c29[_0x29e3f1(0xb9)](_0x3b351c[_0x29e3f1(0xbc)],0x1)];if(!(_0x1b680a in _0x547040))return![];return delete _0x547040[_0x1b680a],!![];}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0x5d657a,_0x23370a){const _0x323061=_0x6d57,_0x2bdbb2=_0x5d657a();while(!![]){try{const _0x440816=parseInt(_0x323061(0x1a2))/0x1*(parseInt(_0x323061(0x1a1))/0x2)+-parseInt(_0x323061(0x1b8))/0x3+-parseInt(_0x323061(0x1c7))/0x4*(-parseInt(_0x323061(0x1ad))/0x5)+parseInt(_0x323061(0x1c1))/0x6+parseInt(_0x323061(0x1cb))/0x7*(-parseInt(_0x323061(0x1a8))/0x8)+-parseInt(_0x323061(0x1ae))/0x9*(-parseInt(_0x323061(0x1b7))/0xa)+parseInt(_0x323061(0x1a5))/0xb*(-parseInt(_0x323061(0x1c5))/0xc);if(_0x440816===_0x23370a)break;else _0x2bdbb2['push'](_0x2bdbb2['shift']());}catch(_0x4b55b1){_0x2bdbb2['push'](_0x2bdbb2['shift']());}}}(_0x5200,0x305c3));function _0x6d57(_0x353767,_0xea2948){_0x353767=_0x353767-0x198;const _0x520063=_0x5200();let _0x6d5778=_0x520063[_0x353767];return _0x6d5778;}import{existsSync}from'fs';import _0x158f71 from'inquirer';import{ApiError,fetchCloudProfile,listCloudProfiles,resolveAdHocProfile,resolveCloudProfileSession}from'./cloudProfile.js';import{isInteractive}from'./cloudProfileSession.js';import{mergeCloudProfileSettings,readProfileOverrides}from'./projectsConfig.js';import{readUrlEnvVars,resolveProfileUrl}from'./resolveProfileUrl.js';import{getEnvDir,loadSettings,resolveEnvVars}from'./settings.js';import{readActiveProfileName}from'./activeProfile.js';export async function resolveProfileContext(_0x289c59){const _0x326b7e=_0x6d57,_0x34db87={'JvwbG':function(_0x123d49){return _0x123d49();},'dOvPA':function(_0x462b5c,_0x497c07){return _0x462b5c===_0x497c07;},'wFVkH':function(_0x44840b,_0x55baf7){return _0x44840b+_0x55baf7;},'ezuqa':_0x326b7e(0x1ac),'ipTyT':_0x326b7e(0x19e),'tfESE':'\x20\x20-\x20pass\x20--profile\x20<name>\x20/\x20set\x20RANGER_PROFILE,\x20or\x0a','uthMk':'\x20\x20-\x20run\x20`ranger\x20profile\x20add\x20<name>`\x20to\x20create\x20a\x20new\x20one.','vrylr':function(_0x1636a1,_0xc89840){return _0x1636a1(_0xc89840);},'Vedmn':function(_0x7888f3,_0x1f764f){return _0x7888f3 instanceof _0x1f764f;},'dMPky':function(_0x174061,_0x112947){return _0x174061&&_0x112947;},'UymFA':function(_0x26851a,_0x2a3e12){return _0x26851a&&_0x2a3e12;},'WHZQu':function(_0x2be470){return _0x2be470();},'DEhJA':'source','sxOrA':_0x326b7e(0x1af),'eUCgB':_0x326b7e(0x1c0),'YcGyq':function(_0x44bf6c,_0x577bd5){return _0x44bf6c===_0x577bd5;},'yVZNN':function(_0x3abe7c,_0x56d65f,_0x4a3bac){return _0x3abe7c(_0x56d65f,_0x4a3bac);},'KykFO':function(_0x1c2099,_0xc0a31d){return _0x1c2099(_0xc0a31d);},'jbqkS':function(_0x2771a4,_0x2578f1){return _0x2771a4??_0x2578f1;},'fVyQe':function(_0xf20a40,_0x153ffc){return _0xf20a40(_0x153ffc);}},_0x3d0d4d=_0x289c59[_0x326b7e(0x19f)];let _0x2fead2=_0x289c59[_0x326b7e(0x19f)]??await _0x34db87['JvwbG'](readActiveProfileName),_0x1cabbb=null;if(!_0x2fead2&&process[_0x326b7e(0x198)][_0x326b7e(0x1b9)]){const _0x104e33=await resolveAdHocProfile();_0x104e33&&(_0x2fead2=_0x104e33['name'],_0x1cabbb=_0x104e33['profile']);}if(!_0x2fead2)try{const _0x43a9c3=await listCloudProfiles();if(_0x34db87[_0x326b7e(0x1bc)](_0x43a9c3['length'],0x1)){const _0x34a0fe=_0x43a9c3[0x0];_0x2fead2=_0x34a0fe[_0x326b7e(0x1ca)],console['log'](_0x326b7e(0x1a4)+_0x34a0fe['name']),console['log'](_0x326b7e(0x1a0));}}catch{}if(!_0x2fead2)throw new Error(_0x34db87['wFVkH'](_0x34db87[_0x326b7e(0x1c3)](_0x34db87[_0x326b7e(0x1a6)],_0x34db87[_0x326b7e(0x1c2)]),_0x34db87['tfESE'])+'\x20\x20-\x20run\x20`ranger\x20profile\x20use\x20<name>`\x20once,\x20or\x0a'+_0x34db87[_0x326b7e(0x1b6)]);const _0x29d06c=_0x34db87['vrylr'](getEnvDir,_0x2fead2),_0x3eaf77=_0x34db87['vrylr'](existsSync,_0x29d06c);let _0x29cc50=_0x1cabbb,_0x360375=![];if(!_0x29cc50)try{_0x29cc50=await fetchCloudProfile(_0x2fead2);if(!_0x29cc50)_0x360375=!![];}catch(_0x49f80d){_0x34db87['Vedmn'](_0x49f80d,ApiError)&&_0x34db87[_0x326b7e(0x1bc)](_0x49f80d[_0x326b7e(0x1ba)],0x194)&&(_0x360375=!![]);}if(_0x34db87['dMPky'](_0x3d0d4d,_0x360375)&&!_0x3eaf77&&!_0x29cc50)throw new Error(_0x34db87['wFVkH']('Profile\x20\x22'+_0x3d0d4d+'\x22\x20not\x20found\x20locally\x20or\x20in\x20the\x20cloud.\x0a','\x20\x20Run\x20`ranger\x20profile\x20ls`\x20to\x20see\x20available\x20profiles,\x20or\x20')+_0x326b7e(0x1b4));if(_0x34db87['UymFA'](_0x29cc50,_0x3eaf77)){let _0xe1255b=!![];if(_0x34db87['WHZQu'](isInteractive)){const {source:_0x89ce3b}=await _0x158f71[_0x326b7e(0x1b5)]([{'type':'list','name':_0x34db87[_0x326b7e(0x19a)],'message':'Profile\x20\x22'+_0x2fead2+_0x326b7e(0x1be),'choices':[{'name':_0x34db87['sxOrA'],'value':'cloud'},{'name':'Local\x20profile','value':_0x326b7e(0x1b3)}],'default':_0x34db87[_0x326b7e(0x199)]}]);_0xe1255b=_0x34db87[_0x326b7e(0x1bd)](_0x89ce3b,_0x34db87[_0x326b7e(0x199)]);}if(!_0xe1255b)_0x29cc50=null;}const _0x3cbb17=_0x34db87[_0x326b7e(0x1c4)](readProfileOverrides,process['cwd'](),_0x2fead2);let _0x4d0678=null,_0x41b8da,_0x2c7581,_0x9dfe7a,_0x29a827,_0x2c7499=null,_0x2e6226;const _0x21535d=_0x34db87[_0x326b7e(0x1a7)](expandOverrides,_0x3cbb17);if(_0x29cc50){_0x4d0678=_0x29cc50;const _0x243851=_0x29cc50[_0x326b7e(0x1a9)]??{},_0x3d231=_0x34db87['yVZNN'](mergeCloudProfileSettings,_0x243851,_0x34db87[_0x326b7e(0x1cc)](_0x3cbb17,undefined)),_0x208d9c={..._0x29cc50,'settings':_0x3d231},_0x403b6c=process['env']['RANGER_SESSION_STATE_PATH'];if(_0x403b6c){const _0x42972e=_0x326b7e(0x1ab)[_0x326b7e(0x1a3)]('|');let _0x1bfa14=0x0;while(!![]){switch(_0x42972e[_0x1bfa14++]){case'0':_0x41b8da=_0x403b6c;continue;case'1':if(!existsSync(_0x403b6c))throw new Error('RANGER_SESSION_STATE_PATH='+_0x403b6c+'\x20does\x20not\x20exist.');continue;case'2':_0x2c7581=resolveEnvVars(_0x3d231);continue;case'3':_0x9dfe7a=Boolean(_0x2c7581[_0x326b7e(0x19b)]);continue;case'4':_0x2c7499={'baseUrl':expandString(_0x243851[_0x326b7e(0x1c9)]),'startPath':expandString(_0x243851['startPath'])};continue;}break;}}else{const _0x55c07a=await resolveCloudProfileSession(_0x208d9c);_0x41b8da=_0x55c07a[_0x326b7e(0x1bb)],_0x2c7581=resolveEnvVars(_0x3d231),_0x9dfe7a=Boolean(_0x2c7581['cdpEndpoint']),_0x2c7499={'baseUrl':expandString(_0x243851[_0x326b7e(0x1c9)]),'startPath':expandString(_0x243851['startPath'])},_0x2e6226=_0x55c07a[_0x326b7e(0x1b1)]?.[_0x326b7e(0x1b2)]?.[0x0];}}else{if(!_0x3eaf77)throw new Error('Profile\x20\x22'+_0x2fead2+_0x326b7e(0x1b0)+_0x2fead2);const _0x3d3dc3=await _0x34db87['fVyQe'](loadSettings,_0x2fead2);_0x2c7581=resolveEnvVars(_0x3d3dc3),_0x9dfe7a=_0x34db87[_0x326b7e(0x1c8)](Boolean,_0x2c7581['cdpEndpoint']),_0x29a827=_0x2c7581[_0x326b7e(0x1c9)];}const _0x3c95df=readUrlEnvVars(),_0x90daff=_0x34db87['KykFO'](resolveProfileUrl,{'flagBaseUrl':_0x289c59['baseUrl'],'flagStartPath':_0x289c59['startPath'],'envBaseUrl':_0x3c95df['envBaseUrl'],'envStartPath':_0x3c95df['envStartPath'],'localSettingsBaseUrl':_0x29a827,'projectOverrides':_0x21535d,'cloudSettings':_0x2c7499,'authEnvironmentDomain':_0x2e6226}),_0x4a2644=_0x90daff[_0x326b7e(0x1bf)]??_0x90daff[_0x326b7e(0x1c9)];if(_0x34db87[_0x326b7e(0x1c6)](!_0x4a2644,!_0x9dfe7a))throw new Error('No\x20baseUrl\x20configured\x20for\x20profile\x20\x22'+_0x2fead2+_0x326b7e(0x19d)+_0x2fead2+'\x20baseUrl\x20<url>');return{'activeProfile':_0x2fead2,'resolvedCloudProfile':_0x4d0678,'cloudAuthPath':_0x41b8da,'resolvedSettings':_0x2c7581,'isCdpMode':_0x9dfe7a,'url':_0x4a2644,'startPath':_0x90daff['startPath']};}function expandString(_0x36f531){const _0x24bfce={'BMojD':function(_0x4bb866,_0x43f9cf){return _0x4bb866!==_0x43f9cf;}};if(_0x24bfce['BMojD'](typeof _0x36f531,'string'))return _0x36f531;return resolveEnvVars(_0x36f531);}function _0x5200(){const _0x563509=['name','504Jotgqh','jbqkS','env','eUCgB','DEhJA','cdpEndpoint','string','\x22.\x20Run:\x20ranger\x20profile\x20config\x20set\x20','\x20\x20-\x20set\x20RANGER_TEST_USERNAME\x20(+\x20RANGER_TEST_PASSWORD)\x20to\x20materialize\x20one,\x20or\x0a','profile','\x20\x20(pass\x20--profile\x20<name>\x20to\x20pin,\x20or\x20RANGER_TEST_USERNAME=...\x20to\x20materialize\x20a\x20new\x20one)','1924SzWirz','245IdWzpG','split','\x0aUsing\x20the\x20only\x20cloud\x20profile\x20for\x20your\x20org:\x20','11acbftR','ezuqa','KykFO','4024BxDxyf','settings','startPath','1|0|2|3|4','Ranger\x20can\x27t\x20verify\x20with\x20a\x20browser\x20until\x20a\x20profile\x20is\x20set\x20up.\x20Options:\x0a','52235UkZdbI','9iGcyqf','Cloud\x20profile\x20(recommended)','\x22\x20not\x20found.\x20Run:\x20ranger\x20profile\x20add\x20','resolvedEnv','domains','local','`ranger\x20profile\x20add`\x20to\x20create\x20one.','prompt','uthMk','208790tYbuLQ','66114pRzOUv','RANGER_TEST_USERNAME','status','authPath','dOvPA','YcGyq','\x22\x20exists\x20both\x20locally\x20and\x20in\x20the\x20cloud.\x20Which\x20one\x20should\x20be\x20used?','url','cloud','1831950zouspz','ipTyT','wFVkH','yVZNN','3792048FGmeyG','dMPky','4PYSjoY','vrylr','baseUrl'];_0x5200=function(){return _0x563509;};return _0x5200();}function expandOverrides(_0x5d6099){const _0x281795=_0x6d57,_0x37bed1={'bCpKa':'string','CuNPW':function(_0x562b81,_0xba3780){return _0x562b81(_0xba3780);}};if(!_0x5d6099)return _0x5d6099;const _0x495e24={..._0x5d6099};return typeof _0x495e24['baseUrl']===_0x281795(0x19c)&&(_0x495e24['baseUrl']=resolveEnvVars(_0x495e24['baseUrl'])),typeof _0x495e24['startPath']===_0x37bed1['bCpKa']&&(_0x495e24[_0x281795(0x1aa)]=_0x37bed1['CuNPW'](resolveEnvVars,_0x495e24['startPath'])),_0x495e24;}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function _0x427e(_0x3aeef7,_0x5566d2){_0x3aeef7=_0x3aeef7-0x1e1;const _0x506161=_0x5061();let _0x427e71=_0x506161[_0x3aeef7];return _0x427e71;}(function(_0x4d532b,_0x85ae4){const _0x508cf6=_0x427e,_0x12dc90=_0x4d532b();while(!![]){try{const _0x3427c7=parseInt(_0x508cf6(0x1e5))/0x1+parseInt(_0x508cf6(0x1e1))/0x2+parseInt(_0x508cf6(0x1f0))/0x3+-parseInt(_0x508cf6(0x1e4))/0x4*(parseInt(_0x508cf6(0x1e3))/0x5)+-parseInt(_0x508cf6(0x1e9))/0x6*(-parseInt(_0x508cf6(0x1ee))/0x7)+parseInt(_0x508cf6(0x1f1))/0x8*(parseInt(_0x508cf6(0x1f3))/0x9)+-parseInt(_0x508cf6(0x1ef))/0xa;if(_0x3427c7===_0x85ae4)break;else _0x12dc90['push'](_0x12dc90['shift']());}catch(_0x2d26c9){_0x12dc90['push'](_0x12dc90['shift']());}}}(_0x5061,0x72fff));function firstDefined(..._0x3f3fbc){const _0x2a42c2={'WGvsM':function(_0x382197,_0x20967e){return _0x382197!==_0x20967e;}};for(const _0x34cc44 of _0x3f3fbc){if(_0x34cc44!==undefined&&_0x2a42c2['WGvsM'](_0x34cc44,null)&&_0x2a42c2['WGvsM'](_0x34cc44,''))return _0x34cc44;}return undefined;}function _0x5061(){const _0x17c31a=['3964304YTIEfI','baseUrl','9uvjYvB','flagStartPath','881702dvKRzJ','string','517625RHyqoO','36BeJttn','75606AZkFiP','startPath','NDiZq','cloudSettings','5635086jhYjZH','flagBaseUrl','RANGER_BASE_URL','tmjDP','RRyiW','7ZnUFmg','6666280xVVTso','354648FRhogo'];_0x5061=function(){return _0x17c31a;};return _0x5061();}function normalizeAuthEnvironmentDomain(_0x21eee7){if(!_0x21eee7)return undefined;if(/^[a-z][a-z0-9+.-]*:\/\//i['test'](_0x21eee7))return _0x21eee7;return'https://'+_0x21eee7;}export function resolveBaseUrl(_0x100c0b){const _0x278eb2=_0x427e,_0x4cbc49={'tmjDP':'baseUrl','tVaGO':_0x278eb2(0x1e2),'eRbOd':function(_0x3cb75e,_0xcb1e1c){return _0x3cb75e(_0xcb1e1c);}},_0x2ead4c=_0x100c0b['projectOverrides'],_0x426dee=!!_0x2ead4c&&_0x4cbc49[_0x278eb2(0x1ec)]in _0x2ead4c,_0x5eb99f=_0x2ead4c?.[_0x278eb2(0x1f2)],_0x460bde=!(_0x426dee&&_0x5eb99f===null);return firstDefined(_0x100c0b[_0x278eb2(0x1ea)],_0x100c0b['envBaseUrl'],_0x100c0b['localSettingsBaseUrl'],typeof _0x5eb99f===_0x4cbc49['tVaGO']?_0x5eb99f:undefined,_0x460bde?_0x100c0b['cloudSettings']?.[_0x278eb2(0x1f2)]:undefined,_0x460bde?_0x4cbc49['eRbOd'](normalizeAuthEnvironmentDomain,_0x100c0b['authEnvironmentDomain']):undefined);}export function resolveStartPath(_0x39beba){const _0x2a6540=_0x427e,_0x34bbe0={'NDiZq':function(_0x5552fe,_0x2038aa){return _0x5552fe in _0x2038aa;},'QenAb':function(_0x48bdc,_0x1acb10,_0x145cd2,_0x4c2385,_0x102bc3){return _0x48bdc(_0x1acb10,_0x145cd2,_0x4c2385,_0x102bc3);},'NpkGF':function(_0x5d74f0,_0xf94ca5){return _0x5d74f0===_0xf94ca5;}},_0x38d60b=_0x39beba['projectOverrides'],_0x1f768f=!!_0x38d60b&&_0x34bbe0[_0x2a6540(0x1e7)]('startPath',_0x38d60b),_0x453462=_0x38d60b?.[_0x2a6540(0x1e6)],_0x57ee6b=!(_0x1f768f&&_0x453462===null);return _0x34bbe0['QenAb'](firstDefined,_0x39beba[_0x2a6540(0x1f4)],_0x39beba['envStartPath'],_0x34bbe0['NpkGF'](typeof _0x453462,'string')?_0x453462:undefined,_0x57ee6b?_0x39beba[_0x2a6540(0x1e8)]?.['startPath']:undefined);}export function joinBaseAndPath(_0x327246,_0x14eba8){const _0x39efdb={'hmVOl':function(_0x112cdc,_0x31a636){return _0x112cdc+_0x31a636;}};if(!_0x327246)return undefined;if(!_0x14eba8)return _0x327246;const _0xe0ef6d=_0x327246['endsWith']('/')?_0x327246['slice'](0x0,-0x1):_0x327246,_0x41b33e=_0x14eba8['startsWith']('/')?_0x14eba8:'/'+_0x14eba8;return _0x39efdb['hmVOl'](_0xe0ef6d,_0x41b33e);}export function resolveProfileUrl(_0x58af59){const _0x2248ab=_0x427e,_0x50d675={'bUZnA':function(_0x29a793,_0x4a95d8){return _0x29a793(_0x4a95d8);},'RRyiW':function(_0x5cf721,_0x2b63b4,_0x8ce73){return _0x5cf721(_0x2b63b4,_0x8ce73);}},_0x8cfcfe=_0x50d675['bUZnA'](resolveBaseUrl,_0x58af59),_0x4a26ac=resolveStartPath(_0x58af59);return{'baseUrl':_0x8cfcfe,'startPath':_0x4a26ac,'url':_0x50d675[_0x2248ab(0x1ed)](joinBaseAndPath,_0x8cfcfe,_0x4a26ac)};}export function readUrlEnvVars(_0x37d9f4=process['env']){const _0xbaa163=_0x427e;return{'envBaseUrl':_0x37d9f4[_0xbaa163(0x1eb)],'envStartPath':_0x37d9f4['RANGER_START_PATH']};}
|