browserstack-node-sdk 1.52.1 → 1.52.3
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/ats/src/cloudproviders/AWS.js +1 -1
- package/ats/src/cloudproviders/Azure.js +1 -1
- package/ats/src/cloudproviders/CloudProvider.js +1 -1
- package/ats/src/cloudproviders/GoogleCloudProvider.js +1 -1
- package/ats/src/cloudproviders/utils.js +1 -1
- package/ats/src/commands/configure.js +1 -1
- package/ats/src/commands/connect.js +1 -1
- package/ats/src/commands/connect_commands/grid.js +1 -1
- package/ats/src/commands/create.js +1 -1
- package/ats/src/commands/create_commands/grid.js +1 -1
- package/ats/src/commands/delete.js +1 -1
- package/ats/src/commands/delete_commands/grid.js +1 -1
- package/ats/src/commands/init.js +1 -1
- package/ats/src/commands/list.js +1 -1
- package/ats/src/commands/list_commands/grid_profiles.js +1 -1
- package/ats/src/commands/list_commands/grids.js +1 -1
- package/ats/src/commands/precheck.js +1 -1
- package/ats/src/commands/precheck_commands/setup_precheck.js +1 -1
- package/ats/src/commands/start.js +1 -1
- package/ats/src/commands/start_commands/grid.js +1 -1
- package/ats/src/commands/stop.js +1 -1
- package/ats/src/commands/stop_commands/grid.js +1 -1
- package/ats/src/config/constants.js +1 -1
- package/ats/src/config/logger.js +1 -1
- package/ats/src/index.js +1 -1
- package/ats/src/utils/AWSUtils.js +1 -1
- package/ats/src/utils/createAutoscalerStack.js +1 -1
- package/ats/src/utils/createClusterStack.js +1 -1
- package/ats/src/utils/createHubHaStack.js +1 -1
- package/ats/src/utils/createk8sClient.js +1 -1
- package/ats/src/utils/deleteEFSMountTargets.js +1 -1
- package/ats/src/utils/deleteStack.js +1 -1
- package/ats/src/utils/describeStack.js +1 -1
- package/ats/src/utils/gridComponents.js +1 -1
- package/ats/src/utils/hstUtils.js +1 -1
- package/ats/src/utils/instrumentationUtils.js +1 -1
- package/ats/src/utils/userInput.js +1 -1
- package/ats/src/utils/utilityMethods.js +1 -1
- package/ats/src/utils/webSocketUtils.js +1 -1
- package/package.json +5 -5
- package/src/ai-sdk-node/bundle.js +1 -1
- package/src/bin/codeceptjs/BrowserStackPlugin.js +1 -1
- package/src/bin/codeceptjs/command.js +1 -1
- package/src/bin/codeceptjs/helper.js +1 -1
- package/src/bin/codeceptjs/o11yHelper.js +1 -1
- package/src/bin/cucumber-js/command.js +1 -1
- package/src/bin/cucumber-js/formatter/custom_formatter.js +1 -1
- package/src/bin/cucumber-js/formatter/custom_formatter_old_versions.js +1 -1
- package/src/bin/cucumber-js/test-observability.js +1 -1
- package/src/bin/cucumber-js/test.setup.js +1 -1
- package/src/bin/cucumber-js/test_old.setup.js +1 -1
- package/src/bin/cucumber-js/timeout.setup.js +1 -1
- package/src/bin/integrations/command.js +1 -1
- package/src/bin/integrations/constants.js +1 -1
- package/src/bin/jest/command.js +1 -1
- package/src/bin/jest/customImplements/customCircus.js +1 -1
- package/src/bin/jest/customImplements/customEnvironment.js +1 -1
- package/src/bin/jest/customImplements/customJestAdapterInit.js +1 -1
- package/src/bin/jest/customImplements/customSequencer.js +1 -1
- package/src/bin/jest/customImplements/customTestRunnerTemplate.js +1 -1
- package/src/bin/jest/jest.setup.js +1 -1
- package/src/bin/jest/test-observability/data-hooks.js +1 -1
- package/src/bin/jest/test-observability/helper.js +1 -1
- package/src/bin/jest/test-observability/obsReporter.js +1 -1
- package/src/bin/jest/test-observability/test-details.js +1 -1
- package/src/bin/jest/test.setup.js +1 -1
- package/src/bin/jest/test_before.setup.js +1 -1
- package/src/bin/launcher/launcher.js +1 -1
- package/src/bin/load/index.js +1 -1
- package/src/bin/load/loadUtils.js +1 -1
- package/src/bin/mocha/accessibility-automation/helper.js +1 -1
- package/src/bin/mocha/bstack-reporter/customReporter.js +1 -1
- package/src/bin/mocha/command.js +1 -1
- package/src/bin/mocha/test-observability/builderPatch.js +1 -1
- package/src/bin/mocha/test-observability/data-hooks.js +1 -1
- package/src/bin/mocha/test-observability/mochaUtils.js +1 -1
- package/src/bin/mocha/test.setup.js +1 -1
- package/src/bin/nightwatch/command.js +1 -1
- package/src/bin/playwright/accessibility-helper.js +1 -1
- package/src/bin/playwright/command.js +1 -1
- package/src/bin/playwright/globalSetup.js +1 -1
- package/src/bin/playwright/mock-process.js +1 -1
- package/src/bin/playwright/modifyPlaywrightConf.js +1 -1
- package/src/bin/playwright/patches.js +1 -1
- package/src/bin/playwright/reporter/pwUtils.js +1 -1
- package/src/bin/playwright/reporter/reporter.js +1 -1
- package/src/bin/playwright/reporter/test-details.js +1 -1
- package/src/bin/playwright/sessionDetails.js +1 -1
- package/src/bin/puppeteer/patches.js +1 -1
- package/src/bin/puppeteer/sessionDetails.js +1 -1
- package/src/bin/puppeteer/test.setup.js +1 -1
- package/src/bin/runner.js +1 -1
- package/src/bin/setup.js +1 -1
- package/src/bin/test-runner/index.js +1 -1
- package/src/bin/test-runner/runTest.js +1 -1
- package/src/bin/test-runner/testWorker.js +1 -1
- package/src/bin/utils/apiUtilityMethods.js +1 -1
- package/src/bin/utils/clientTroubleshootingService.js +1 -1
- package/src/bin/utils/constants.js +1 -1
- package/src/bin/utils/log4jsAppender.js +1 -1
- package/src/bin/utils/logPatcher.js +1 -1
- package/src/bin/utils/logReportingAPI.js +1 -1
- package/src/bin/utils/playwright-patcher.js +1 -1
- package/src/bin/utils/puppeteer-patcher.js +1 -1
- package/src/bin/utils/sharedPlaywrightSessionDetails.js +1 -1
- package/src/bin/utils/sharedUtils.js +1 -1
- package/src/bin/v2/TestInfo.js +1 -1
- package/src/bin/v2/browserstackCLI.js +1 -1
- package/src/bin/v2/cliUtils.js +1 -1
- package/src/bin/v2/customTagManager.js +1 -1
- package/src/bin/v2/eventDispatcher.js +1 -1
- package/src/bin/v2/framework/automationFramework.js +1 -1
- package/src/bin/v2/framework/constants/automationFrameworkConstants.js +1 -1
- package/src/bin/v2/framework/constants/testFrameworkConstants.js +1 -1
- package/src/bin/v2/framework/cucumberTestFramework.js +1 -1
- package/src/bin/v2/framework/jestTestFramework.js +1 -1
- package/src/bin/v2/framework/playwrightAutomationFramework.js +1 -1
- package/src/bin/v2/framework/playwrightTestFramework.js +1 -1
- package/src/bin/v2/framework/puppeteerAutomationFramework.js +1 -1
- package/src/bin/v2/framework/testFramework.js +1 -1
- package/src/bin/v2/grpcClient.js +1 -1
- package/src/bin/v2/instances/automationFrameworkInstance.js +1 -1
- package/src/bin/v2/instances/testFrameworkInstance.js +1 -1
- package/src/bin/v2/instances/trackedContext.js +1 -1
- package/src/bin/v2/instances/trackedInstance.js +1 -1
- package/src/bin/v2/modules/accessibilityModule.js +1 -1
- package/src/bin/v2/modules/baseModule.js +1 -1
- package/src/bin/v2/modules/loadTestModule.js +1 -1
- package/src/bin/v2/modules/observabilityModule.js +1 -1
- package/src/bin/v2/modules/playwrightDriverModule.js +1 -1
- package/src/bin/v2/modules/puppeteerDriverModule.js +1 -1
- package/src/bin/v2/modules/testhubModule.js +1 -1
- package/src/bin/v2/state/automationFrameworkState.js +1 -1
- package/src/bin/v2/state/hookState.js +1 -1
- package/src/bin/v2/state/testFrameworkState.js +1 -1
- package/src/bin/v2/uploadAttachmentsManager.js +1 -1
- package/src/bin/v2/utils/cucumber-utils.js +1 -1
- package/src/bin/v2/utils/jest-utils.js +1 -1
- package/src/bin/vanilla-js/command.js +1 -1
- package/src/browserStackSdk.js +1 -1
- package/src/helpers/BrowserStackSetup.js +1 -1
- package/src/helpers/accessibility-automation/accessibilityRetryHelper.js +1 -1
- package/src/helpers/accessibility-automation/constants.js +1 -1
- package/src/helpers/accessibility-automation/helper.js +1 -1
- package/src/helpers/accessibility-automation/scripts.js +1 -1
- package/src/helpers/ai-sdk/aiSdkWrapper.js +1 -1
- package/src/helpers/ai-sdk/autoHealHelper.js +1 -1
- package/src/helpers/ats/constants.js +1 -1
- package/src/helpers/ats/helper.js +1 -1
- package/src/helpers/capsMapping.js +1 -1
- package/src/helpers/central-scanner/constants.js +1 -1
- package/src/helpers/central-scanner/helpers.js +1 -1
- package/src/helpers/classLogger.js +1 -1
- package/src/helpers/globals.js +1 -1
- package/src/helpers/helper.js +1 -1
- package/src/helpers/logger.js +1 -1
- package/src/helpers/metadata.js +1 -1
- package/src/helpers/patchHelper.js +1 -1
- package/src/helpers/patchHelpers.js +1 -1
- package/src/helpers/percy/Percy.js +1 -1
- package/src/helpers/percy/PercyBinary.js +1 -1
- package/src/helpers/percy/PercyCaptureMap.js +1 -1
- package/src/helpers/percy/PercyCaptureModes.js +1 -1
- package/src/helpers/percy/PercySDK.js +1 -1
- package/src/helpers/percy/index.js +1 -1
- package/src/helpers/percy/utils.js +1 -1
- package/src/helpers/performance/constants.js +1 -1
- package/src/helpers/performance/performance-tester.js +1 -1
- package/src/helpers/playwright-helper.js +1 -1
- package/src/helpers/processHelper.js +1 -1
- package/src/helpers/puppeteer-helper.js +1 -1
- package/src/helpers/request-spy.js +1 -1
- package/src/helpers/setKeepAlive.js +1 -1
- package/src/helpers/test-observability/constants.js +1 -1
- package/src/helpers/test-observability/error-handler.js +1 -1
- package/src/helpers/test-observability/requestQueueHandler.js +1 -1
- package/src/helpers/test-observability/sessionHandler.js +1 -1
- package/src/helpers/test-observability/utils.js +1 -1
- package/src/helpers/test-orchestration/constants.js +1 -1
- package/src/helpers/test-orchestration/failfastManager.js +1 -1
- package/src/helpers/test-orchestration/fileHelper.js +1 -1
- package/src/helpers/test-orchestration/orchestrationUtils.js +1 -1
- package/src/helpers/test-orchestration/requestUtils.js +1 -1
- package/src/helpers/test-orchestration/testOrchestrationHandler.js +1 -1
- package/src/helpers/test-orchestration/testOrderingServerHandler.js +1 -1
- package/src/helpers/testhub/constants.js +1 -1
- package/src/helpers/testhub/testhubHandler.js +1 -1
- package/src/helpers/testhub/utils.js +1 -1
- package/src/helpers/timeoutPromise.js +1 -1
- package/src/helpers/utilities.js +1 -1
- package/src/helpers/w3cMapping.js +1 -1
- package/src/hubAllocationMethods.js +1 -1
- package/src/index.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const a64_0x3d0ed0=a64_0x3518;function a64_0x3518(_0x253df0,_0x206207){const _0x279445=a64_0x2794();return a64_0x3518=function(_0x351853,_0x1137c5){_0x351853=_0x351853-0x155;let _0x45c5bb=_0x279445[_0x351853];return _0x45c5bb;},a64_0x3518(_0x253df0,_0x206207);}(function(_0xa4b91b,_0xfe46ef){const _0x14ee15=a64_0x3518,_0x456420=_0xa4b91b();while(!![]){try{const _0x577617=-parseInt(_0x14ee15(0x1bf))/0x1*(-parseInt(_0x14ee15(0x1d2))/0x2)+parseInt(_0x14ee15(0x16d))/0x3+-parseInt(_0x14ee15(0x1a4))/0x4*(-parseInt(_0x14ee15(0x1a3))/0x5)+-parseInt(_0x14ee15(0x1ed))/0x6+-parseInt(_0x14ee15(0x1a5))/0x7+parseInt(_0x14ee15(0x169))/0x8+-parseInt(_0x14ee15(0x1b7))/0x9;if(_0x577617===_0xfe46ef)break;else _0x456420['push'](_0x456420['shift']());}catch(_0x455f3c){_0x456420['push'](_0x456420['shift']());}}}(a64_0x2794,0xe5e15));const path=require('path'),url=require(a64_0x3d0ed0(0x168)),util=require(a64_0x3d0ed0(0x164)),{nestedKeyValue,isFalse,importFileFromPWCore,requireModule,isBrowserstackInfra}=require('../../helpers/helper'),{o11yErrorHandler}=require(a64_0x3d0ed0(0x1a2)),{debug,getPlatformDetails}=require(a64_0x3d0ed0(0x16a)),logger=require(a64_0x3d0ed0(0x19c))[a64_0x3d0ed0(0x1ae)],constants=require(a64_0x3d0ed0(0x1be)),AutomationFramework=require('../v2/framework/automationFramework'),BrowserstackCLI=require(a64_0x3d0ed0(0x16f)),AutomationFrameworkState=require(a64_0x3d0ed0(0x179)),HookState=require(a64_0x3d0ed0(0x172)),{platform}=require('os'),getBrowserNameFromChannel=_0x1286e3=>{const _0x1845ae=a64_0x3d0ed0,_0x4aee26={};_0x4aee26[_0x1845ae(0x1f5)]=_0x1845ae(0x1b4),_0x4aee26[_0x1845ae(0x204)]=_0x1845ae(0x1ef),_0x4aee26[_0x1845ae(0x1d1)]='edge',_0x4aee26['Qtafg']='chrome',_0x4aee26[_0x1845ae(0x224)]=function(_0x1d6264,_0x5d7885){return _0x1d6264===_0x5d7885;},_0x4aee26[_0x1845ae(0x1b1)]='webkit',_0x4aee26['gBewW']=_0x1845ae(0x211),_0x4aee26[_0x1845ae(0x170)]=_0x1845ae(0x156);const _0x6a47f4=_0x4aee26,_0x4b245c=_0x6a47f4[_0x1845ae(0x1f5)][_0x1845ae(0x206)]('|');let _0x262942=0x0;while(!![]){switch(_0x4b245c[_0x262942++]){case'0':if(_0x1286e3[_0x1845ae(0x17f)](_0x6a47f4[_0x1845ae(0x204)]))return _0x6a47f4[_0x1845ae(0x204)];continue;case'1':if(_0x1286e3[_0x1845ae(0x17f)](_0x6a47f4[_0x1845ae(0x1d1)]))return _0x6a47f4[_0x1845ae(0x1d1)];continue;case'2':if(_0x1286e3[_0x1845ae(0x17f)](_0x6a47f4['Qtafg']))return _0x6a47f4['Qtafg'];continue;case'3':if(_0x6a47f4['XiXkU'](_0x1286e3,_0x6a47f4[_0x1845ae(0x1b1)]))return _0x6a47f4[_0x1845ae(0x1b1)];continue;case'4':if(_0x1286e3[_0x1845ae(0x17f)](_0x6a47f4[_0x1845ae(0x1c7)]))return _0x6a47f4[_0x1845ae(0x1c7)];continue;case'5':if(_0x1286e3[_0x1845ae(0x17f)](_0x6a47f4[_0x1845ae(0x170)]))return _0x6a47f4[_0x1845ae(0x170)];continue;}break;}},getBrowserFromWSEndpoint=_0x52fef1=>{const _0x4fbdf2=a64_0x3d0ed0,_0x49916a={'EaKpd':_0x4fbdf2(0x155),'kwkDp':function(_0x22224e,_0x298262){return _0x22224e(_0x298262);},'yDSFY':_0x4fbdf2(0x1ff),'VosYM':_0x4fbdf2(0x1ba),'dfvGR':'firefox','kJGhW':_0x4fbdf2(0x163),'eiYVZ':_0x4fbdf2(0x1ef),'PziQZ':_0x4fbdf2(0x1b6),'issUY':_0x4fbdf2(0x1f4)};try{const _0x58c2ad=url['parse'](_0x52fef1),_0xdacab0=new URLSearchParams(_0x58c2ad[_0x4fbdf2(0x18d)]),_0x11064f=Object[_0x4fbdf2(0x20a)](_0xdacab0[_0x4fbdf2(0x1cd)]()),_0x1b8b20=[_0x11064f[_0x4fbdf2(0x199)],_0x11064f[_0x4fbdf2(0x1d3)],_0x11064f[_0x4fbdf2(0x1c5)],_0x11064f['browserstack_capabilities']];for(const _0x1be676 of _0x1b8b20){if(_0x1be676)try{const _0x5214ec=JSON['parse'](_0x1be676),_0x5d7c41=_0x5214ec['browserName']||_0x5214ec[_0x4fbdf2(0x1b8)]||_0x5214ec[_0x49916a[_0x4fbdf2(0x1fc)]]?.[_0x4fbdf2(0x190)];if(_0x5d7c41)return _0x49916a['kwkDp'](debug,'Browser\x20found\x20in\x20WebSocket\x20caps:\x20'+_0x5d7c41),_0x5d7c41[_0x4fbdf2(0x1dc)]();}catch(_0x5c73df){_0x49916a['kwkDp'](debug,_0x4fbdf2(0x1d7)+_0x5c73df[_0x4fbdf2(0x1c6)]);}}if(_0x52fef1[_0x4fbdf2(0x17f)](_0x49916a[_0x4fbdf2(0x16c)])||_0x52fef1[_0x4fbdf2(0x17f)](_0x49916a['VosYM']))return _0x49916a[_0x4fbdf2(0x16c)];if(_0x52fef1[_0x4fbdf2(0x17f)](_0x49916a[_0x4fbdf2(0x205)])||_0x52fef1[_0x4fbdf2(0x17f)](_0x49916a[_0x4fbdf2(0x165)]))return _0x49916a['dfvGR'];if(_0x52fef1[_0x4fbdf2(0x17f)](_0x49916a[_0x4fbdf2(0x19a)])||_0x52fef1[_0x4fbdf2(0x17f)](_0x49916a[_0x4fbdf2(0x1c8)]))return _0x49916a[_0x4fbdf2(0x19a)];return _0x49916a[_0x4fbdf2(0x193)];}catch(_0x5aaa22){return _0x49916a[_0x4fbdf2(0x160)](debug,_0x4fbdf2(0x198)+_0x5aaa22[_0x4fbdf2(0x1a1)]()),_0x49916a[_0x4fbdf2(0x193)];}},getCloudProviderFromWsEndpoint=_0x172faa=>{const _0x14ffe2=a64_0x3d0ed0,_0x25fd07={};_0x25fd07[_0x14ffe2(0x1de)]=_0x14ffe2(0x183),_0x25fd07['CyHVr']=_0x14ffe2(0x19d);const _0x5679c5=_0x25fd07;if(_0x172faa['includes'](constants[_0x14ffe2(0x1f3)])||_0x172faa['includes'](constants[_0x14ffe2(0x1c4)]))return _0x5679c5[_0x14ffe2(0x1de)];return _0x5679c5[_0x14ffe2(0x222)];},a64_0x4d5da1={};a64_0x4d5da1[a64_0x3d0ed0(0x180)]=undefined,a64_0x4d5da1['bsSessionId']=undefined,a64_0x4d5da1['browser']=undefined,a64_0x4d5da1[a64_0x3d0ed0(0x208)]=undefined,a64_0x4d5da1[a64_0x3d0ed0(0x188)]=undefined,a64_0x4d5da1['platform_version']=undefined,a64_0x4d5da1[a64_0x3d0ed0(0x186)]=undefined,a64_0x4d5da1[a64_0x3d0ed0(0x1d3)]={};class SharedPlaywrightSessionDetails{static ['currentSessionDetails']=a64_0x4d5da1;constructor(){const _0x47e28f=a64_0x3d0ed0,_0x3abfdc={};_0x3abfdc[_0x47e28f(0x16b)]='Invalid\x20constructor,\x20please\x20use\x20static\x20methods';const _0x5572dd=_0x3abfdc;throw new Error(_0x5572dd[_0x47e28f(0x16b)]);}static [a64_0x3d0ed0(0x1f8)]=null;static[a64_0x3d0ed0(0x1cf)](_0xc2504e,_0x17866b,_0x5eb51e=null){const _0x204d01=a64_0x3d0ed0,_0x218c88={'XxTdr':function(_0x8be32f,_0x29b888){return _0x8be32f===_0x29b888;},'AsVMB':_0x204d01(0x1a0),'eALwn':'Browser\x20is\x20not\x20defined\x20or\x20not\x20available','DETic':_0x204d01(0x1d8),'MAEuj':_0x204d01(0x1f2),'kafbt':function(_0x21380d,_0x153fbe,_0x1cb975){return _0x21380d(_0x153fbe,_0x1cb975);},'ZUTdO':_0x204d01(0x1db),'mkFwN':_0x204d01(0x1c1),'vQOiX':function(_0x49f7f5,_0x839168,_0x6560e2){return _0x49f7f5(_0x839168,_0x6560e2);},'GPCcG':_0x204d01(0x1ee),'YzDPu':_0x204d01(0x189),'WqPWn':'connectOptions','hCpCz':function(_0x28feb2,_0x22fd79){return _0x28feb2(_0x22fd79);},'Wtsko':_0x204d01(0x183),'PFUgK':_0x204d01(0x1b3),'CJdoJ':_0x204d01(0x1c2),'hnJKE':function(_0x576e5a,_0x3c67c4){return _0x576e5a(_0x3c67c4);},'wnkIx':'chromium','pXtZn':function(_0x1150d2){return _0x1150d2();},'IyBiV':function(_0x929364,_0x47481e){return _0x929364&&_0x47481e;},'TyRAt':function(_0x542efa){return _0x542efa();},'iZrbE':function(_0x1524c2,_0x1b1ed8){return _0x1524c2(_0x1b1ed8);},'zltVv':function(_0x468e5e,_0x1609e3){return _0x468e5e+_0x1609e3;},'ZpHuU':'playwright-','SeXQf':function(_0xe98c3f){return _0xe98c3f();},'VstNe':function(_0x1e1096,_0x21981f,_0x49aa74){return _0x1e1096(_0x21981f,_0x49aa74);},'Bizjj':_0x204d01(0x1cf)},_0x43c59b=this;return _0x218c88['VstNe'](o11yErrorHandler,async function _0x3a437b(_0x3cd795,_0x465a27,_0x1ceaa2=null){const _0x17cb00=_0x204d01;let _0x2b20ff=_0x3cd795[_0x17cb00(0x20c)],_0x200387=null;_0x3cd795&&_0x218c88[_0x17cb00(0x219)](typeof _0x3cd795[_0x17cb00(0x202)],_0x218c88['AsVMB'])?_0x200387=_0x3cd795['version']():logger['debug'](_0x218c88[_0x17cb00(0x207)]);let _0x482cd3=null;_0x3cd795&&_0x218c88[_0x17cb00(0x219)](typeof _0x3cd795[_0x17cb00(0x21b)],_0x218c88[_0x17cb00(0x1e9)])?_0x482cd3=_0x3cd795[_0x17cb00(0x21b)]():logger['debug'](_0x218c88[_0x17cb00(0x1b2)]);let _0x138c5f=null,_0x4f8370=null,_0x427491=null,_0x46f8d7=_0x218c88[_0x17cb00(0x18c)];if(_0x3cd795[_0x17cb00(0x1a7)][_0x17cb00(0x1e2)]()||global['accessibilityPlatform']){let _0x271aa2=null;_0x218c88['kafbt'](nestedKeyValue,_0x3cd795,[_0x218c88['ZUTdO'],_0x218c88[_0x17cb00(0x1f9)]])?_0x271aa2=_0x3cd795[_0x17cb00(0x1db)]['_defaultConnectOptions']:_0x271aa2=_0x218c88[_0x17cb00(0x19b)](nestedKeyValue,_0x465a27,[_0x218c88[_0x17cb00(0x176)],_0x218c88[_0x17cb00(0x196)],_0x218c88[_0x17cb00(0x1fd)]]);const _0x336757=_0x1ceaa2||_0x271aa2&&_0x271aa2[_0x17cb00(0x1b0)];if(_0x336757){_0x46f8d7=_0x218c88['hCpCz'](getCloudProviderFromWsEndpoint,_0x336757);if(_0x218c88[_0x17cb00(0x219)](_0x46f8d7,_0x218c88[_0x17cb00(0x19e)])){_0x427491=constants[_0x17cb00(0x1ca)]['test'](_0x336757)?_0x218c88[_0x17cb00(0x1e4)]:_0x218c88[_0x17cb00(0x1bd)];const _0x1986f6=_0x218c88[_0x17cb00(0x15a)](getBrowserFromWSEndpoint,_0x336757);if(_0x1986f6&&(!_0x2b20ff||_0x218c88['XxTdr'](_0x2b20ff,_0x218c88[_0x17cb00(0x223)])))_0x2b20ff=_0x1986f6,logger['debug'](_0x17cb00(0x1fb)+_0x2b20ff);else _0x2b20ff&&logger[_0x17cb00(0x1fe)](_0x17cb00(0x1c9)+_0x2b20ff);_0x138c5f=_0x43c59b[_0x17cb00(0x18f)][_0x17cb00(0x188)],_0x4f8370=_0x43c59b[_0x17cb00(0x18f)][_0x17cb00(0x15d)];}else{const _0x41d2a2=await _0x218c88[_0x17cb00(0x1c0)](getPlatformDetails);_0x138c5f=_0x41d2a2['platformName'],_0x4f8370=_0x41d2a2[_0x17cb00(0x1cc)];}}if(_0x218c88['IyBiV'](!_0x138c5f,!_0x4f8370)&&!_0x218c88['TyRAt'](isBrowserstackInfra)){const _0x2417e2=await _0x218c88['pXtZn'](getPlatformDetails);_0x138c5f=_0x2417e2[_0x17cb00(0x1da)],_0x4f8370=_0x2417e2['platformVersion'];}}else{_0x465a27&&_0x465a27['project']&&_0x465a27[_0x17cb00(0x1ee)]['use']&&_0x465a27[_0x17cb00(0x1ee)][_0x17cb00(0x189)][_0x17cb00(0x1d6)]?_0x2b20ff=_0x218c88['iZrbE'](getBrowserNameFromChannel,_0x465a27[_0x17cb00(0x1ee)][_0x17cb00(0x189)][_0x17cb00(0x1d6)]):_0x2b20ff=_0x218c88[_0x17cb00(0x1bc)](_0x218c88['ZpHuU'],_0x2b20ff[_0x17cb00(0x1dc)]());const _0x192280=await _0x218c88[_0x17cb00(0x217)](getPlatformDetails);_0x138c5f=_0x192280[_0x17cb00(0x1da)],_0x4f8370=_0x192280[_0x17cb00(0x1cc)];}const _0x22c0d3={};_0x22c0d3[_0x17cb00(0x1b8)]=_0x2b20ff,_0x22c0d3[_0x17cb00(0x208)]=_0x200387,_0x22c0d3['capabilities']={},_0x22c0d3[_0x17cb00(0x188)]=_0x138c5f,_0x22c0d3['platform_version']=_0x4f8370,_0x22c0d3[_0x17cb00(0x186)]=_0x427491;const _0x453e7c=_0x22c0d3;_0x482cd3&&(_0x453e7c['capabilities']['deviceModel']=_0x482cd3);const _0x515962={};_0x515962[_0x17cb00(0x180)]=_0x46f8d7,_0x43c59b[_0x17cb00(0x18f)]=Object[_0x17cb00(0x1f6)]({},_0x43c59b['currentSessionDetails'],_0x515962,_0x453e7c);const _0x424daa={};_0x424daa['browser']=_0x43c59b[_0x17cb00(0x18f)][_0x17cb00(0x1b8)],_0x424daa[_0x17cb00(0x158)]=_0x43c59b[_0x17cb00(0x18f)][_0x17cb00(0x208)],_0x424daa[_0x17cb00(0x188)]=_0x43c59b[_0x17cb00(0x18f)][_0x17cb00(0x188)],_0x424daa['platformVersion']=_0x43c59b['currentSessionDetails'][_0x17cb00(0x15d)],_0x424daa[_0x17cb00(0x180)]=_0x43c59b['currentSessionDetails']['cloudProvider'],_0x424daa['product']=_0x43c59b[_0x17cb00(0x18f)]['product'],logger['debug']('Session\x20details\x20setup\x20complete:\x20'+JSON['stringify'](_0x424daa));},_0x218c88[_0x204d01(0x201)])(_0xc2504e,_0x17866b,_0x5eb51e);}static[a64_0x3d0ed0(0x191)](){const _0x4a5c15=a64_0x3d0ed0;this['patchConnection'](),this[_0x4a5c15(0x215)]();}static['patchConnection'](){const _0x1d0031=a64_0x3d0ed0,_0x51a087={'eFxNX':function(_0x5a1962,_0x44bcd2){return _0x5a1962(_0x44bcd2);},'iAtJx':'lib','MEkmI':_0x1d0031(0x1e6),'uGxwU':_0x1d0031(0x1e7),'XnHYZ':function(_0x26765a,_0x3a0662){return _0x26765a(_0x3a0662);},'hTrvv':function(_0xb7b2d3,_0x599e51){return _0xb7b2d3(_0x599e51);},'ZKbhA':function(_0x521ff6,_0x593a9a){return _0x521ff6(_0x593a9a);},'IJoYX':'Not\x20able\x20to\x20import\x20Connection\x20class\x20from\x20any\x20path','dWiuj':function(_0x32a026,_0x132cb6){return _0x32a026(_0x132cb6);},'npfVM':function(_0x4d4c26,_0xa9d68a){return _0x4d4c26!=_0xa9d68a;},'Tqmjg':'Connection\x20dispatch\x20already\x20patched','BhuxT':_0x1d0031(0x1d4),'LGBuv':'Successfully\x20patched\x20Connection.dispatch','WjGDE':function(_0xf1e63f,_0x1a100b){return _0xf1e63f(_0x1a100b);}},_0x5550d8=this;if(!this[_0x1d0031(0x166)])try{const _0x1b98e4=[path[_0x1d0031(0x17a)](_0x51a087[_0x1d0031(0x203)],_0x51a087[_0x1d0031(0x171)],_0x51a087[_0x1d0031(0x159)]),path['join'](_0x51a087[_0x1d0031(0x203)],_0x51a087[_0x1d0031(0x159)]),path[_0x1d0031(0x17a)](_0x51a087[_0x1d0031(0x171)],_0x51a087['uGxwU'])];for(const _0x37bc61 of _0x1b98e4){try{const _0x402e49=_0x51a087[_0x1d0031(0x20f)](importFileFromPWCore,_0x37bc61);if(_0x402e49&&_0x402e49[_0x1d0031(0x166)]){this[_0x1d0031(0x166)]=_0x402e49[_0x1d0031(0x166)],logger[_0x1d0031(0x1fe)](_0x1d0031(0x1f0)+_0x37bc61);break;}}catch(_0x5826be){_0x51a087['hTrvv'](debug,'Failed\x20to\x20import\x20connection\x20from\x20'+_0x37bc61+':\x20'+_0x5826be[_0x1d0031(0x1a1)]());}}if(!this['Connection']){_0x51a087[_0x1d0031(0x1bb)](debug,_0x51a087[_0x1d0031(0x192)]);return;}}catch(_0x4b8bc1){_0x51a087[_0x1d0031(0x16e)](debug,_0x1d0031(0x200)+_0x4b8bc1[_0x1d0031(0x1a1)]());return;}const _0x1c59bd=this[_0x1d0031(0x166)];try{if(_0x51a087[_0x1d0031(0x17b)](_0x1c59bd,null)){const _0x9679fc=_0x1c59bd[_0x1d0031(0x184)]['dispatch'];if(!_0x51a087['hTrvv'](isFalse,process[_0x1d0031(0x1f1)][_0x1d0031(0x210)])){if(_0x1c59bd['prototype'][_0x1d0031(0x1c3)]){logger[_0x1d0031(0x1fe)](_0x51a087[_0x1d0031(0x1ad)]);return;}Object[_0x1d0031(0x21e)](_0x1c59bd['prototype'],_0x51a087[_0x1d0031(0x1ec)],{'get':function(){const _0xbdd6ed={'TMuHI':function(_0x1d9bbe,_0x48f4b2){const _0x2ea01c=a64_0x3518;return _0x51a087[_0x2ea01c(0x162)](_0x1d9bbe,_0x48f4b2);},'WAivx':function(_0x49a488,_0x53e2d8){const _0xd8a89b=a64_0x3518;return _0x51a087[_0xd8a89b(0x162)](_0x49a488,_0x53e2d8);}};return async function _0xe6931a(_0x3f556b){const _0x5da421=a64_0x3518;if(BrowserstackCLI['getInstance']()['isRunning']()){const _0x564d40={};_0x564d40[_0x5da421(0x1c6)]=_0x3f556b,await BrowserstackCLI['getInstance']()[_0x5da421(0x21c)]()[_0x5da421(0x21d)](AutomationFrameworkState[_0x5da421(0x18e)],HookState['POST'],_0x564d40);}else{const _0x321d8a=_0x3f556b&&_0x3f556b[_0x5da421(0x167)]&&_0x3f556b[_0x5da421(0x167)][_0x5da421(0x1cb)];if(_0x321d8a){const _0x539583=_0x321d8a[_0x5da421(0x157)],_0x3a2dc4=_0x321d8a[_0x5da421(0x20b)];_0x3a2dc4&&(_0xbdd6ed[_0x5da421(0x18a)](debug,_0x5da421(0x1af)+_0x3a2dc4[_0x5da421(0x1a1)]()),_0x5550d8[_0x5da421(0x18f)]['platform']=_0x3a2dc4[_0x5da421(0x1da)],_0x5550d8[_0x5da421(0x18f)][_0x5da421(0x15d)]=_0x3a2dc4[_0x5da421(0x1cc)]),_0x539583&&(_0xbdd6ed[_0x5da421(0x1ea)](debug,_0x5da421(0x182)+_0x539583),_0x5550d8[_0x5da421(0x18f)][_0x5da421(0x212)]=_0x539583);}}return _0x9679fc[_0x5da421(0x226)](this,arguments);};}}),_0x1c59bd[_0x1d0031(0x184)][_0x1d0031(0x1c3)]=!![],logger[_0x1d0031(0x1fe)](_0x51a087[_0x1d0031(0x174)]);}}}catch(_0x1f4c83){_0x51a087[_0x1d0031(0x1b5)](debug,_0x1d0031(0x177)+_0x1f4c83),_0x5550d8[_0x1d0031(0x1f8)]=_0x1f4c83['toString']();}}static[a64_0x3d0ed0(0x215)](){const _0x3ab49b=a64_0x3d0ed0,_0x2e588a={'WsSjR':function(_0x49eff4,_0x558103){return _0x49eff4(_0x558103);},'dWHjt':'lib','fSFcp':_0x3ab49b(0x15f),'iIjVw':_0x3ab49b(0x211),'VtVUI':_0x3ab49b(0x1d9),'zeDRf':function(_0x504f21,_0x4741cc){return _0x504f21(_0x4741cc);},'bVXKm':_0x3ab49b(0x1f7),'rOymv':_0x3ab49b(0x17e),'gTpNh':function(_0x5a4400,_0xfa5842){return _0x5a4400!=_0xfa5842;},'rymyO':_0x3ab49b(0x1e0),'FAggP':_0x3ab49b(0x1b9),'qqdca':_0x3ab49b(0x161)},_0x5e67bc=this;let _0x1bc2c3=null;try{const _0x23cbd8=path[_0x3ab49b(0x17a)](_0x2e588a[_0x3ab49b(0x18b)],_0x2e588a['fSFcp'],_0x2e588a[_0x3ab49b(0x1aa)],_0x2e588a[_0x3ab49b(0x194)]),_0x27d95a=_0x2e588a['zeDRf'](importFileFromPWCore,_0x23cbd8);!_0x27d95a?_0x2e588a[_0x3ab49b(0x213)](debug,_0x2e588a[_0x3ab49b(0x181)]):_0x1bc2c3=_0x27d95a[_0x3ab49b(0x1ac)];}catch(_0x514acb){_0x2e588a[_0x3ab49b(0x213)](debug,_0x2e588a[_0x3ab49b(0x209)]);}try{if(_0x2e588a['gTpNh'](_0x1bc2c3,null)){const _0x8cc368=_0x1bc2c3[_0x3ab49b(0x184)][_0x3ab49b(0x1b9)];if(_0x1bc2c3[_0x3ab49b(0x184)][_0x3ab49b(0x197)]){logger[_0x3ab49b(0x1fe)](_0x2e588a[_0x3ab49b(0x1eb)]);return;}Object[_0x3ab49b(0x21e)](_0x1bc2c3[_0x3ab49b(0x184)],_0x2e588a[_0x3ab49b(0x1ab)],{'get':function(){return async function _0x448cff(_0x5b44aa){const _0x48d278=a64_0x3518;try{if(BrowserstackCLI[_0x48d278(0x17d)]()[_0x48d278(0x1dd)]()){const _0x396df8={};_0x396df8[_0x48d278(0x1c6)]=_0x5b44aa,await BrowserstackCLI[_0x48d278(0x17d)]()[_0x48d278(0x21c)]()[_0x48d278(0x21d)](AutomationFrameworkState[_0x48d278(0x18e)],HookState['POST'],_0x396df8),delete _0x5b44aa[_0x48d278(0x1e8)];}else{const _0x4ffe46=_0x5b44aa[_0x48d278(0x1e8)];if(_0x4ffe46){delete _0x5b44aa[_0x48d278(0x1e8)];const _0x3b820c=_0x4ffe46[_0x48d278(0x157)],_0x3b8c1b=_0x4ffe46[_0x48d278(0x20b)];_0x3b8c1b&&(_0x2e588a[_0x48d278(0x17c)](debug,_0x48d278(0x1ce)+_0x3b8c1b[_0x48d278(0x1a1)]()),_0x5e67bc['currentSessionDetails'][_0x48d278(0x188)]=_0x3b8c1b[_0x48d278(0x1da)],_0x5e67bc[_0x48d278(0x18f)][_0x48d278(0x15d)]=_0x3b8c1b[_0x48d278(0x1cc)]),_0x3b820c&&(_0x2e588a[_0x48d278(0x17c)](debug,_0x48d278(0x15c)+_0x3b820c),_0x5e67bc[_0x48d278(0x18f)][_0x48d278(0x212)]=_0x3b820c);}}}catch(_0x237938){_0x2e588a[_0x48d278(0x17c)](debug,_0x48d278(0x187)+_0x237938['toString']());}return _0x8cc368['apply'](this,arguments);};}}),_0x1bc2c3[_0x3ab49b(0x184)][_0x3ab49b(0x197)]=!![],logger['debug'](_0x2e588a['qqdca']);}}catch(_0x2aec5e){_0x2e588a[_0x3ab49b(0x213)](debug,_0x3ab49b(0x1d0)+_0x2aec5e),_0x5e67bc['sessionError']=_0x2aec5e[_0x3ab49b(0x1a1)]();}}static[a64_0x3d0ed0(0x1fa)](_0x35021b,_0x2c725c){const _0xd72a9=a64_0x3d0ed0,_0x143b81={'SmhXy':_0xd72a9(0x155),'MIsSk':function(_0x3fe9b8,_0x383df4){return _0x3fe9b8||_0x383df4;},'MXesG':function(_0x45402d,_0x1a3843){return _0x45402d===_0x1a3843;},'SWYen':_0xd72a9(0x20e),'AlRXP':_0xd72a9(0x221),'xzqkm':function(_0x17b86c,_0x316f3f){return _0x17b86c(_0x316f3f);}};let _0x2a29ff=null,_0x30019b=null;try{const _0x554a0b=[_0x2c725c,global['__platformCaps'],global[_0xd72a9(0x185)]];for(const _0x4d54fc of _0x554a0b){if(_0x4d54fc&&(!_0x30019b||!_0x30019b[_0xd72a9(0x157)])){const _0x372039=_0x4d54fc[_0xd72a9(0x157)]||_0x4d54fc[_0x143b81[_0xd72a9(0x20d)]]?.['sessionId'],_0x1cbd5a=_0x4d54fc[_0xd72a9(0x190)]||_0x4d54fc['browser']||_0x4d54fc[_0x143b81[_0xd72a9(0x20d)]]?.[_0xd72a9(0x190)],_0x575306=_0x4d54fc[_0xd72a9(0x158)]||_0x4d54fc[_0xd72a9(0x208)]||_0x4d54fc[_0x143b81['SmhXy']]?.[_0xd72a9(0x158)],_0x1bc89c=_0x4d54fc['os']||_0x4d54fc[_0xd72a9(0x188)]||_0x4d54fc[_0x143b81['SmhXy']]?.['os'],_0x2b73ef=_0x4d54fc[_0xd72a9(0x1a8)]||_0x4d54fc[_0xd72a9(0x214)]||_0x4d54fc[_0x143b81[_0xd72a9(0x20d)]]?.[_0xd72a9(0x1a8)];if(_0x143b81[_0xd72a9(0x15b)](_0x372039,_0x1cbd5a)||_0x1bc89c){const _0x84993b={};_0x84993b['browserName']=_0x1cbd5a,_0x84993b[_0xd72a9(0x158)]=_0x575306,_0x84993b['os']=_0x1bc89c,_0x84993b[_0xd72a9(0x1a8)]=_0x2b73ef,_0x84993b[_0xd72a9(0x1da)]=_0x4d54fc['platformName']||_0x1bc89c,_0x84993b[_0xd72a9(0x1cc)]=_0x4d54fc['platformVersion']||_0x2b73ef;const _0x31caf5={};_0x31caf5['sessionId']=_0x372039,_0x31caf5[_0xd72a9(0x20b)]=_0x84993b,_0x30019b=_0x31caf5;if(_0x143b81[_0xd72a9(0x15b)](_0x372039,_0x1cbd5a)){logger[_0xd72a9(0x1fe)](_0xd72a9(0x1e5)+_0x1cbd5a+_0xd72a9(0x1a6)+_0x1bc89c);break;}}}}if(_0x35021b&&_0x143b81[_0xd72a9(0x1a9)](typeof _0x35021b,_0x143b81[_0xd72a9(0x216)]))try{const _0x3a8836=url[_0xd72a9(0x21a)](_0x35021b),_0x442c44=new URLSearchParams(_0x3a8836[_0xd72a9(0x18d)]),_0x28fc3c=Object['fromEntries'](_0x442c44['entries']()),_0x5c5eb2=[_0x28fc3c['caps'],_0x28fc3c['capabilities'],_0x28fc3c[_0xd72a9(0x1c5)]];for(const _0xe9cb05 of _0x5c5eb2){if(_0xe9cb05&&(!_0x2a29ff||!_0x2a29ff[_0xd72a9(0x157)]))try{const _0x402356=JSON['parse'](_0xe9cb05),_0x23bf99={};_0x23bf99[_0xd72a9(0x157)]=_0x402356[_0xd72a9(0x157)]||_0x402356[_0x143b81['SmhXy']]?.[_0xd72a9(0x157)],_0x23bf99[_0xd72a9(0x20b)]={},_0x23bf99[_0xd72a9(0x20b)][_0xd72a9(0x190)]=_0x402356[_0xd72a9(0x190)]||_0x402356[_0xd72a9(0x1b8)],_0x23bf99[_0xd72a9(0x20b)][_0xd72a9(0x158)]=_0x402356['browserVersion']||_0x402356[_0xd72a9(0x208)],_0x23bf99[_0xd72a9(0x20b)]['os']=_0x402356['os']||_0x402356[_0xd72a9(0x188)],_0x23bf99[_0xd72a9(0x20b)][_0xd72a9(0x1a8)]=_0x402356['osVersion']||_0x402356[_0xd72a9(0x214)],_0x23bf99[_0xd72a9(0x20b)][_0xd72a9(0x1da)]=_0x402356['platformName']||_0x402356['os']||_0x402356[_0xd72a9(0x188)],_0x23bf99[_0xd72a9(0x20b)][_0xd72a9(0x1cc)]=_0x402356[_0xd72a9(0x1cc)]||_0x402356[_0xd72a9(0x1a8)]||_0x402356[_0xd72a9(0x214)],_0x2a29ff=_0x23bf99;if(_0x2a29ff[_0xd72a9(0x157)]||_0x2a29ff[_0xd72a9(0x20b)][_0xd72a9(0x190)]){logger['debug'](_0x143b81[_0xd72a9(0x173)]);break;}}catch(_0x4c9c4){_0x143b81[_0xd72a9(0x175)](debug,_0xd72a9(0x220)+_0x4c9c4[_0xd72a9(0x1a1)]());}}}catch(_0x2554c9){_0x143b81['xzqkm'](debug,_0xd72a9(0x218)+_0x2554c9['toString']());}}catch(_0x5ea417){_0x143b81['xzqkm'](debug,'Error\x20extracting\x20BrowserStack\x20parameters:\x20'+util[_0xd72a9(0x178)](_0x5ea417));}const _0x187a5b={};return _0x187a5b['bsParams']=_0x2a29ff,_0x187a5b[_0xd72a9(0x1e8)]=_0x30019b,_0x187a5b;}static async[a64_0x3d0ed0(0x225)](_0x326d69,_0x95d90d){const _0xcf307=a64_0x3d0ed0,_0x5a9281={'JyjhY':function(_0x559354,_0x35223a){return _0x559354||_0x35223a;},'bKgwg':'Triggering\x20PLAYWRIGHT_DISPATCH\x20event','TpquS':function(_0x45a8c4,_0x47aeea){return _0x45a8c4||_0x47aeea;},'pZuss':function(_0x3a6fff,_0x536dcb){return _0x3a6fff(_0x536dcb);}};try{if(!BrowserstackCLI['getInstance']()[_0xcf307(0x1dd)]())return;if(_0x5a9281['JyjhY'](_0x326d69,_0x95d90d)){logger[_0xcf307(0x1fe)](_0x5a9281[_0xcf307(0x195)]);const _0x2d68c2={'params':_0x326d69?{'bsParams':_0x326d69}:null,'bStackParams':_0x5a9281[_0xcf307(0x1d5)](_0x95d90d,null)},_0x17a9d4=AutomationFramework['getTrackedInstance'](),_0x11beb0={};_0x11beb0[_0xcf307(0x1c6)]=_0x2d68c2,_0x11beb0[_0xcf307(0x1e3)]=_0x17a9d4,await BrowserstackCLI['getInstance']()[_0xcf307(0x21c)]()['trackEvent'](AutomationFrameworkState[_0xcf307(0x18e)],HookState[_0xcf307(0x21f)],_0x11beb0);}}catch(_0xeaf104){_0x5a9281[_0xcf307(0x15e)](debug,_0xcf307(0x1e1)+util['format'](_0xeaf104));}}static[a64_0x3d0ed0(0x19f)](){return this['currentSessionDetails'];}}module[a64_0x3d0ed0(0x1df)]=SharedPlaywrightSessionDetails;function a64_0x2794(){const _0x4b6e84=['trackEvent','defineProperty','POST','Failed\x20to\x20parse\x20capabilities\x20from\x20WebSocket:\x20','BrowserStack\x20params\x20extracted\x20from\x20WebSocket\x20endpoint','CyHVr','wnkIx','XiXkU','triggerPlaywrightDispatchEvent','apply','bstack:options','firefox','sessionId','browserVersion','uGxwU','hnJKE','MIsSk','Setting\x20session\x20id\x20received\x20from\x20browserstack\x20','platform_version','pZuss','server','kwkDp','Successfully\x20patched\x20CRConnection._onMessage','eFxNX','gecko','util','kJGhW','Connection','params','url','10150272ppmJns','../../helpers/test-observability/utils','WnNjZ','yDSFY','4669770ZkhAUe','dWiuj','../v2/browserstackCLI','lUYHe','MEkmI','../v2/state/hookState.js','AlRXP','LGBuv','xzqkm','GPCcG','Error\x20in\x20applying\x20Connection\x20patch\x20','format','../v2/state/automationFrameworkState.js','join','npfVM','WsSjR','getInstance','Error\x20in\x20importing\x20crConnection','includes','cloudProvider','bVXKm','Setting\x20session\x20id\x20received\x20from\x20BS\x20','browserstack','prototype','capabilties','product','Error\x20in\x20finding\x20platform\x20details\x20','platform','use','TMuHI','dWHjt','MAEuj','query','PLAYWRIGHT_DISPATCH','currentSessionDetails','browserName','patch','IJoYX','issUY','VtVUI','bKgwg','YzDPu','_bstackCRPatched','Error\x20in\x20getting\x20browser\x20from\x20WebSocket\x20endpoint:\x20','caps','eiYVZ','vQOiX','../../helpers/logger','unknown_grid','Wtsko','getDetails','function','toString','../../helpers/test-observability/error-handler','135KevdPy','270240IwGsGe','5460252vCsxsI',',\x20os=','_connection','osVersion','MXesG','iIjVw','FAggP','CRConnection','Tqmjg','winstonLogger','Setting\x20platform\x20details\x20received\x20from\x20BS:\x20','wsEndpoint','NPhFS','DETic','turboscale','4|2|1|5|0|3','WjGDE','webkit','13039092iBszhq','browser','_onMessage','msedge','ZKbhA','zltVv','CJdoJ','./constants','13BfElgl','pXtZn','_defaultConnectOptions','automate','_bstackDispatchPatched','BSTACK_ATS_URL','desiredCapabilities','message','gBewW','PziQZ','Using\x20browser\x20name\x20from\x20browser\x20object:\x20','ATS_WSS_URL_REGEX','bsParams','platformVersion','entries','Setting\x20platform\x20details\x20received\x20from\x20browserstack:\x20','setupBrowserDetails','Error\x20in\x20getting\x20applying\x20CRConnection\x20patch\x20','bfRqs','60082ioqDQz','capabilities','dispatch','TpquS','channel','Failed\x20to\x20parse\x20caps\x20from\x20WebSocket:\x20','Device\x20Model\x20is\x20not\x20available','crConnection.js','platformName','_browserType','toLowerCase','isRunning','EgGbI','exports','CRConnection\x20already\x20patched','Error\x20triggering\x20PLAYWRIGHT_DISPATCH\x20event:\x20','isRemote','instance','PFUgK','BrowserStack\x20params\x20extracted\x20from\x20capabilities:\x20browser=','client','connection.js','bStackParams','AsVMB','WAivx','rymyO','BhuxT','11217684NFWWte','project','safari','Found\x20Connection\x20class\x20at:\x20','env','local_grid','BSTACK_URL','chrome','AGuAV','assign','Not\x20able\x20to\x20import\x20crConnection','sessionError','mkFwN','extractBrowserStackParams','Browser\x20name\x20overridden\x20from\x20WebSocket\x20endpoint:\x20','EaKpd','WqPWn','debug','edge','Error\x20in\x20importing\x20connection\x20','Bizjj','version','iAtJx','kKbBA','dfvGR','split','eALwn','browser_version','rOymv','fromEntries','platformDetails','_name','SmhXy','string','XnHYZ','BROWSERSTACK_TEST_OBSERVABILITY','chromium','bsSessionId','zeDRf','os_version','patchCRConnection','SWYen','SeXQf','Error\x20parsing\x20WebSocket\x20endpoint:\x20','XxTdr','parse','model','getAutomationFramework'];a64_0x2794=function(){return _0x4b6e84;};return a64_0x2794();}
|
|
1
|
+
function a64_0x4682(){const _0x25c36f=['1058856evkljC','vOKVV','1002430EmLGuq',',\x20os=','Device\x20Model\x20is\x20not\x20available','oHTTK','winstonLogger','grieh','prototype','getTrackedInstance','platformName','platformDetails','browserstack_capabilities','capabilities','WlIjH','Not\x20able\x20to\x20import\x20crConnection','version','_onMessage','lZARU','Error\x20parsing\x20WebSocket\x20endpoint:\x20','channel','desiredCapabilities','apply','aivqD','AYfIZ','chromium','../v2/state/hookState.js','YVFpK','dispatch','string','turboscale','ApEOH','bStackParams','project','fromEntries','../../helpers/logger','XbRhf','zqbYL','../../helpers/test-observability/error-handler','lVjAk','Setting\x20session\x20id\x20received\x20from\x20BS\x20','24kUgSQr','KcNyf','instance','firefox','osVersion','RKwNW','HAEJA','Failed\x20to\x20import\x20connection\x20from\x20','YuhZY','query','Error\x20in\x20applying\x20Connection\x20patch\x20','webkit','toString','automate','qilHd','Error\x20in\x20finding\x20platform\x20details\x20','bstack:options','util','BrowserStack\x20params\x20extracted\x20from\x20capabilities:\x20browser=','VyBZG','crConnection.js','1480199CvNAqn','354072KWWsCF','parse','Qamhz','sessionError','JBlRR','gecko','entries','Error\x20in\x20importing\x20connection\x20','lmTAF','currentSessionDetails','sfiyU','RxuDg','CRConnection\x20already\x20patched','assign','msedge','QBQZs','RvDEI','PLAYWRIGHT_DISPATCH','PiExW','lib','_connection','NOLzX','hzqtX','stringify','fcEJv','message','includes','hANiq','connection.js','connectOptions','dpzIe','join','platform_version','_defaultConnectOptions','Error\x20triggering\x20PLAYWRIGHT_DISPATCH\x20event:\x20','gMXRw','RRYLp','browserVersion','sMzHv','AFOvV','edge','StFup','wsEndpoint','mSZzW','10hvdRSf','qwuTK','Invalid\x20constructor,\x20please\x20use\x20static\x20methods','debug','function','Triggering\x20PLAYWRIGHT_DISPATCH\x20event','../v2/state/automationFrameworkState.js','Failed\x20to\x20parse\x20caps\x20from\x20WebSocket:\x20','flHbh','browser_version','os_version','product','isRunning','browserName','baKsQ','lMWJa','0|5|4|2|3|1','23104260SXhPIx','15RpVmql','ZXUqd','Connection\x20dispatch\x20already\x20patched','5903946jILhbO','dHPzZ','toLowerCase','ERBCc','patchCRConnection','cIpXS','AJBhQ','WzyeO','Setting\x20platform\x20details\x20received\x20from\x20BS:\x20','getInstance','sessionId','Mxrte','BSTACK_ATS_URL','Browser\x20name\x20overridden\x20from\x20WebSocket\x20endpoint:\x20','playwright-','bsParams','KDoMz','KYyiu','client','SrwLa','__platformCaps','params','caps','rjOoU','wdQwl','POST','IpMdV','1215922oiComw','browserstack','safari','FiynU','Connection','platform','KuviN','LqyXs','_bstackCRPatched','local_grid','trackEvent','Session\x20details\x20setup\x20complete:\x20','../../helpers/test-observability/utils','sScEE','format','../v2/framework/automationFramework','BROWSERSTACK_TEST_OBSERVABILITY','deviceModel','oifdx','model','Error\x20in\x20importing\x20crConnection','server','use','pCLHj','cloudProvider','bsSessionId','Not\x20able\x20to\x20import\x20Connection\x20class\x20from\x20any\x20path','fofvX','iYCKo','ysdLt','ATS_WSS_URL_REGEX','Successfully\x20patched\x20CRConnection._onMessage','Setting\x20session\x20id\x20received\x20from\x20browserstack\x20','aptgU','WulBr','JGIrw','gOlhk','FZLEP','rgEmY','accessibilityPlatform','getDetails','ATSmO','browser','platformVersion','vvvKa','KSzPG','unnIV','_bstackDispatchPatched','chQis','_browserType','defineProperty'];a64_0x4682=function(){return _0x25c36f;};return a64_0x4682();}const a64_0x1585ac=a64_0x2ec7;(function(_0x3c30f6,_0x27ca64){const _0x427169=a64_0x2ec7,_0x5af83f=_0x3c30f6();while(!![]){try{const _0x53552e=-parseInt(_0x427169(0x278))/0x1+-parseInt(_0x427169(0x243))/0x2+-parseInt(_0x427169(0x225))/0x3*(parseInt(_0x427169(0x1e7))/0x4)+-parseInt(_0x427169(0x213))/0x5*(-parseInt(_0x427169(0x276))/0x6)+parseInt(_0x427169(0x1e6))/0x7*(-parseInt(_0x427169(0x29f))/0x8)+parseInt(_0x427169(0x228))/0x9+parseInt(_0x427169(0x224))/0xa;if(_0x53552e===_0x27ca64)break;else _0x5af83f['push'](_0x5af83f['shift']());}catch(_0x583fda){_0x5af83f['push'](_0x5af83f['shift']());}}}(a64_0x4682,0x9a4d4));const path=require('path'),url=require('url'),util=require(a64_0x1585ac(0x1e2)),{nestedKeyValue,isFalse,importFileFromPWCore,requireModule,isBrowserstackInfra}=require('../../helpers/helper'),{o11yErrorHandler}=require(a64_0x1585ac(0x29c)),{debug,getPlatformDetails}=require(a64_0x1585ac(0x24f)),logger=require(a64_0x1585ac(0x299))[a64_0x1585ac(0x27c)],constants=require('./constants'),AutomationFramework=require(a64_0x1585ac(0x252)),BrowserstackCLI=require('../v2/browserstackCLI'),AutomationFrameworkState=require(a64_0x1585ac(0x219)),HookState=require(a64_0x1585ac(0x290)),{platform}=require('os'),getBrowserNameFromChannel=_0x44ef42=>{const _0x7c3ce8=a64_0x1585ac,_0x48a956={};_0x48a956[_0x7c3ce8(0x1f2)]=_0x7c3ce8(0x223),_0x48a956[_0x7c3ce8(0x1fc)]='chromium',_0x48a956[_0x7c3ce8(0x1f1)]=function(_0x8c0d0b,_0x4db8b6){return _0x8c0d0b===_0x4db8b6;},_0x48a956[_0x7c3ce8(0x20b)]=_0x7c3ce8(0x1dc),_0x48a956[_0x7c3ce8(0x222)]='firefox',_0x48a956[_0x7c3ce8(0x202)]='safari',_0x48a956[_0x7c3ce8(0x277)]=_0x7c3ce8(0x20f),_0x48a956['ATSmO']='chrome';const _0x2ae51c=_0x48a956,_0x322dc4=_0x2ae51c[_0x7c3ce8(0x1f2)]['split']('|');let _0x37915a=0x0;while(!![]){switch(_0x322dc4[_0x37915a++]){case'0':if(_0x44ef42[_0x7c3ce8(0x201)](_0x2ae51c['NOLzX']))return _0x2ae51c[_0x7c3ce8(0x1fc)];continue;case'1':if(_0x2ae51c[_0x7c3ce8(0x1f1)](_0x44ef42,_0x2ae51c[_0x7c3ce8(0x20b)]))return _0x2ae51c[_0x7c3ce8(0x20b)];continue;case'2':if(_0x44ef42[_0x7c3ce8(0x201)](_0x2ae51c[_0x7c3ce8(0x222)]))return _0x2ae51c[_0x7c3ce8(0x222)];continue;case'3':if(_0x44ef42[_0x7c3ce8(0x201)](_0x2ae51c[_0x7c3ce8(0x202)]))return _0x2ae51c[_0x7c3ce8(0x202)];continue;case'4':if(_0x44ef42[_0x7c3ce8(0x201)](_0x2ae51c[_0x7c3ce8(0x277)]))return _0x2ae51c[_0x7c3ce8(0x277)];continue;case'5':if(_0x44ef42[_0x7c3ce8(0x201)](_0x2ae51c[_0x7c3ce8(0x26c)]))return _0x2ae51c[_0x7c3ce8(0x26c)];continue;}break;}},getBrowserFromWSEndpoint=_0x3416fb=>{const _0x3aa641=a64_0x1585ac,_0x31420d={'gjMss':_0x3aa641(0x1e1),'hzqtX':function(_0x53a2a0,_0x53cdce){return _0x53a2a0(_0x53cdce);},'JBlRR':_0x3aa641(0x20f),'sJiLh':_0x3aa641(0x1f5),'IpMdV':_0x3aa641(0x2a2),'otXHY':_0x3aa641(0x1ec),'gMXRw':_0x3aa641(0x245),'KYyiu':_0x3aa641(0x1dc),'WzyeO':'chrome','JGIrw':function(_0x4fbe1b,_0x15f135){return _0x4fbe1b(_0x15f135);}};try{const _0x37b3ec=url[_0x3aa641(0x1e8)](_0x3416fb),_0x156ef9=new URLSearchParams(_0x37b3ec[_0x3aa641(0x1da)]),_0x3ce107=Object['fromEntries'](_0x156ef9['entries']()),_0x3da548=[_0x3ce107['caps'],_0x3ce107[_0x3aa641(0x283)],_0x3ce107[_0x3aa641(0x28b)],_0x3ce107[_0x3aa641(0x282)]];for(const _0x4cf4bb of _0x3da548){if(_0x4cf4bb)try{const _0x45ad60=JSON[_0x3aa641(0x1e8)](_0x4cf4bb),_0x2666f1=_0x45ad60[_0x3aa641(0x220)]||_0x45ad60[_0x3aa641(0x26d)]||_0x45ad60[_0x31420d['gjMss']]?.[_0x3aa641(0x220)];if(_0x2666f1)return _0x31420d['hzqtX'](debug,'Browser\x20found\x20in\x20WebSocket\x20caps:\x20'+_0x2666f1),_0x2666f1[_0x3aa641(0x22a)]();}catch(_0x2f3e63){_0x31420d[_0x3aa641(0x1fd)](debug,_0x3aa641(0x21a)+_0x2f3e63[_0x3aa641(0x200)]);}}if(_0x3416fb[_0x3aa641(0x201)](_0x31420d['JBlRR'])||_0x3416fb[_0x3aa641(0x201)](_0x31420d['sJiLh']))return _0x31420d[_0x3aa641(0x1eb)];if(_0x3416fb['includes'](_0x31420d[_0x3aa641(0x242)])||_0x3416fb[_0x3aa641(0x201)](_0x31420d['otXHY']))return _0x31420d['IpMdV'];if(_0x3416fb['includes'](_0x31420d['gMXRw'])||_0x3416fb[_0x3aa641(0x201)](_0x31420d[_0x3aa641(0x239)]))return _0x31420d[_0x3aa641(0x20a)];return _0x31420d[_0x3aa641(0x22f)];}catch(_0x36ecd2){return _0x31420d[_0x3aa641(0x266)](debug,'Error\x20in\x20getting\x20browser\x20from\x20WebSocket\x20endpoint:\x20'+_0x36ecd2[_0x3aa641(0x1dd)]()),_0x31420d[_0x3aa641(0x22f)];}},getCloudProviderFromWsEndpoint=_0x407975=>{const _0x1f0e8e=a64_0x1585ac,_0x3b731a={};_0x3b731a[_0x1f0e8e(0x238)]=_0x1f0e8e(0x244),_0x3b731a[_0x1f0e8e(0x295)]='unknown_grid';const _0x510f53=_0x3b731a;if(_0x407975[_0x1f0e8e(0x201)](constants['BSTACK_URL'])||_0x407975[_0x1f0e8e(0x201)](constants[_0x1f0e8e(0x234)]))return _0x510f53[_0x1f0e8e(0x238)];return _0x510f53[_0x1f0e8e(0x295)];},a64_0x362a72={};a64_0x362a72[a64_0x1585ac(0x25b)]=undefined,a64_0x362a72[a64_0x1585ac(0x25c)]=undefined,a64_0x362a72[a64_0x1585ac(0x26d)]=undefined,a64_0x362a72[a64_0x1585ac(0x21c)]=undefined,a64_0x362a72['platform']=undefined,a64_0x362a72[a64_0x1585ac(0x207)]=undefined,a64_0x362a72[a64_0x1585ac(0x21e)]=undefined,a64_0x362a72[a64_0x1585ac(0x283)]={};class SharedPlaywrightSessionDetails{static ['currentSessionDetails']=a64_0x362a72;constructor(){const _0x50e6a2=a64_0x1585ac,_0x417d60={};_0x417d60['XbRhf']=_0x50e6a2(0x215);const _0x258fbe=_0x417d60;throw new Error(_0x258fbe[_0x50e6a2(0x29a)]);}static [a64_0x1585ac(0x1ea)]=null;static['setupBrowserDetails'](_0x3d5b77,_0x604432,_0x57cf9f=null){const _0x318ff3=a64_0x1585ac,_0x20815c={'eddmG':function(_0x59c888,_0x56a31d){return _0x59c888===_0x56a31d;},'SrwLa':_0x318ff3(0x217),'QJMGE':'Browser\x20is\x20not\x20defined\x20or\x20not\x20available','Qamhz':function(_0x306dcd,_0x3438f5){return _0x306dcd===_0x3438f5;},'zqbYL':_0x318ff3(0x27a),'KSzPG':_0x318ff3(0x24c),'WlIjH':function(_0xb48f0f,_0x5942de,_0x1ab31f){return _0xb48f0f(_0x5942de,_0x1ab31f);},'HAEJA':_0x318ff3(0x274),'ytrEL':_0x318ff3(0x208),'vvvKa':function(_0x2c3249,_0x3ae2cd,_0x2bf1ca){return _0x2c3249(_0x3ae2cd,_0x2bf1ca);},'grieh':_0x318ff3(0x297),'eijcg':_0x318ff3(0x259),'KuviN':_0x318ff3(0x204),'oHTTK':function(_0x36a397,_0x3de127){return _0x36a397(_0x3de127);},'gOlhk':function(_0x369417,_0x3a317f){return _0x369417===_0x3a317f;},'gYrtc':_0x318ff3(0x244),'mSZzW':_0x318ff3(0x294),'baKsQ':_0x318ff3(0x1de),'YVFpK':function(_0x4694ad,_0x2a06bc){return _0x4694ad===_0x2a06bc;},'lZARU':'chromium','dpzIe':function(_0x5869ab){return _0x5869ab();},'Mxrte':function(_0x494a2c,_0x53de14){return _0x494a2c&&_0x53de14;},'UmjLL':function(_0xf6832e){return _0xf6832e();},'qwuTK':function(_0x272aae){return _0x272aae();},'RvDEI':function(_0x3cccd6,_0x5bb898){return _0x3cccd6(_0x5bb898);},'iYCKo':function(_0xf9287e,_0x1b2a93){return _0xf9287e+_0x1b2a93;},'dHPzZ':_0x318ff3(0x236),'MPyid':function(_0x88cfda){return _0x88cfda();},'WulBr':'setupBrowserDetails'},_0x3a6b27=this;return _0x20815c[_0x318ff3(0x26f)](o11yErrorHandler,async function _0xa364aa(_0x1d48ad,_0x54a252,_0xed5336=null){const _0x10b51c=_0x318ff3;let _0x2676c7=_0x1d48ad['_name'],_0x23d2db=null;_0x1d48ad&&_0x20815c['eddmG'](typeof _0x1d48ad[_0x10b51c(0x286)],_0x20815c['SrwLa'])?_0x23d2db=_0x1d48ad['version']():logger['debug'](_0x20815c['QJMGE']);let _0x318706=null;_0x1d48ad&&_0x20815c[_0x10b51c(0x1e9)](typeof _0x1d48ad[_0x10b51c(0x256)],_0x20815c[_0x10b51c(0x23b)])?_0x318706=_0x1d48ad[_0x10b51c(0x256)]():logger[_0x10b51c(0x216)](_0x20815c[_0x10b51c(0x29b)]);let _0x2c8311=null,_0x885772=null,_0x5c08f7=null,_0x36e0a7=_0x20815c[_0x10b51c(0x270)];if(_0x1d48ad[_0x10b51c(0x1fb)]['isRemote']()||global[_0x10b51c(0x26a)]){let _0x1cf4cc=null;_0x20815c[_0x10b51c(0x284)](nestedKeyValue,_0x1d48ad,[_0x20815c[_0x10b51c(0x2a5)],_0x20815c['ytrEL']])?_0x1cf4cc=_0x1d48ad[_0x10b51c(0x274)][_0x10b51c(0x208)]:_0x1cf4cc=_0x20815c[_0x10b51c(0x26f)](nestedKeyValue,_0x54a252,[_0x20815c[_0x10b51c(0x27d)],_0x20815c['eijcg'],_0x20815c[_0x10b51c(0x249)]]);const _0x78f786=_0xed5336||_0x1cf4cc&&_0x1cf4cc[_0x10b51c(0x211)];if(_0x78f786){_0x36e0a7=_0x20815c[_0x10b51c(0x27b)](getCloudProviderFromWsEndpoint,_0x78f786);if(_0x20815c[_0x10b51c(0x267)](_0x36e0a7,_0x20815c['gYrtc'])){_0x5c08f7=constants[_0x10b51c(0x261)]['test'](_0x78f786)?_0x20815c[_0x10b51c(0x212)]:_0x20815c[_0x10b51c(0x221)];const _0x195cb0=_0x20815c[_0x10b51c(0x27b)](getBrowserFromWSEndpoint,_0x78f786);if(_0x195cb0&&(!_0x2676c7||_0x20815c[_0x10b51c(0x291)](_0x2676c7,_0x20815c[_0x10b51c(0x288)])))_0x2676c7=_0x195cb0,logger['debug'](_0x10b51c(0x235)+_0x2676c7);else _0x2676c7&&logger['debug']('Using\x20browser\x20name\x20from\x20browser\x20object:\x20'+_0x2676c7);_0x2c8311=_0x3a6b27[_0x10b51c(0x1f0)]['platform'],_0x885772=_0x3a6b27[_0x10b51c(0x1f0)][_0x10b51c(0x207)];}else{const _0x1b8248=await _0x20815c[_0x10b51c(0x205)](getPlatformDetails);_0x2c8311=_0x1b8248[_0x10b51c(0x280)],_0x885772=_0x1b8248[_0x10b51c(0x26e)];}}if(_0x20815c[_0x10b51c(0x233)](!_0x2c8311,!_0x885772)&&!_0x20815c['UmjLL'](isBrowserstackInfra)){const _0x20678f=await _0x20815c[_0x10b51c(0x214)](getPlatformDetails);_0x2c8311=_0x20678f[_0x10b51c(0x280)],_0x885772=_0x20678f[_0x10b51c(0x26e)];}}else{_0x54a252&&_0x54a252['project']&&_0x54a252[_0x10b51c(0x297)][_0x10b51c(0x259)]&&_0x54a252[_0x10b51c(0x297)][_0x10b51c(0x259)][_0x10b51c(0x28a)]?_0x2676c7=_0x20815c[_0x10b51c(0x1f7)](getBrowserNameFromChannel,_0x54a252[_0x10b51c(0x297)][_0x10b51c(0x259)][_0x10b51c(0x28a)]):_0x2676c7=_0x20815c[_0x10b51c(0x25f)](_0x20815c[_0x10b51c(0x229)],_0x2676c7[_0x10b51c(0x22a)]());const _0x7dbb39=await _0x20815c['MPyid'](getPlatformDetails);_0x2c8311=_0x7dbb39['platformName'],_0x885772=_0x7dbb39[_0x10b51c(0x26e)];}const _0x2796d3={};_0x2796d3['browser']=_0x2676c7,_0x2796d3[_0x10b51c(0x21c)]=_0x23d2db,_0x2796d3['capabilities']={},_0x2796d3['platform']=_0x2c8311,_0x2796d3['platform_version']=_0x885772,_0x2796d3['product']=_0x5c08f7;const _0x5a02ad=_0x2796d3;_0x318706&&(_0x5a02ad['capabilities'][_0x10b51c(0x254)]=_0x318706);const _0x5e6c5e={};_0x5e6c5e['cloudProvider']=_0x36e0a7,_0x3a6b27[_0x10b51c(0x1f0)]=Object[_0x10b51c(0x1f4)]({},_0x3a6b27[_0x10b51c(0x1f0)],_0x5e6c5e,_0x5a02ad);const _0x15413d={};_0x15413d[_0x10b51c(0x26d)]=_0x3a6b27[_0x10b51c(0x1f0)][_0x10b51c(0x26d)],_0x15413d[_0x10b51c(0x20c)]=_0x3a6b27['currentSessionDetails'][_0x10b51c(0x21c)],_0x15413d[_0x10b51c(0x248)]=_0x3a6b27[_0x10b51c(0x1f0)]['platform'],_0x15413d['platformVersion']=_0x3a6b27[_0x10b51c(0x1f0)][_0x10b51c(0x207)],_0x15413d[_0x10b51c(0x25b)]=_0x3a6b27['currentSessionDetails']['cloudProvider'],_0x15413d[_0x10b51c(0x21e)]=_0x3a6b27[_0x10b51c(0x1f0)][_0x10b51c(0x21e)],logger[_0x10b51c(0x216)](_0x10b51c(0x24e)+JSON[_0x10b51c(0x1fe)](_0x15413d));},_0x20815c[_0x318ff3(0x265)])(_0x3d5b77,_0x604432,_0x57cf9f);}static['patch'](){const _0x356aec=a64_0x1585ac;this['patchConnection'](),this[_0x356aec(0x22c)]();}static['patchConnection'](){const _0x11f6a0=a64_0x1585ac,_0x4f723f={'ERBCc':function(_0x415933,_0x5a9ade){return _0x415933(_0x5a9ade);},'ZXUqd':function(_0x307269,_0x25b67a){return _0x307269(_0x25b67a);},'wdQwl':_0x11f6a0(0x1fa),'RKwNW':_0x11f6a0(0x23a),'VyBZG':_0x11f6a0(0x203),'aptgU':function(_0x273ff5,_0x12b8a6){return _0x273ff5(_0x12b8a6);},'KcNyf':function(_0x274f6f,_0x4434f9){return _0x274f6f(_0x4434f9);},'flHbh':_0x11f6a0(0x25d),'StFup':function(_0x10d9a9,_0x37cd07){return _0x10d9a9!=_0x37cd07;},'OATLh':function(_0x3cf943,_0x541f57){return _0x3cf943(_0x541f57);},'FiynU':_0x11f6a0(0x227),'chQis':_0x11f6a0(0x292),'ewrGs':'Successfully\x20patched\x20Connection.dispatch','lVjAk':function(_0x6b80,_0x11199f){return _0x6b80(_0x11199f);}},_0x36ee19=this;if(!this[_0x11f6a0(0x247)])try{const _0x2f4bad=[path[_0x11f6a0(0x206)](_0x4f723f[_0x11f6a0(0x240)],_0x4f723f[_0x11f6a0(0x2a4)],_0x4f723f[_0x11f6a0(0x1e4)]),path[_0x11f6a0(0x206)](_0x4f723f[_0x11f6a0(0x240)],_0x4f723f[_0x11f6a0(0x1e4)]),path[_0x11f6a0(0x206)](_0x4f723f[_0x11f6a0(0x2a4)],_0x4f723f[_0x11f6a0(0x1e4)])];for(const _0x5d10bb of _0x2f4bad){try{const _0x4d70fe=_0x4f723f[_0x11f6a0(0x264)](importFileFromPWCore,_0x5d10bb);if(_0x4d70fe&&_0x4d70fe[_0x11f6a0(0x247)]){this['Connection']=_0x4d70fe[_0x11f6a0(0x247)],logger[_0x11f6a0(0x216)]('Found\x20Connection\x20class\x20at:\x20'+_0x5d10bb);break;}}catch(_0x2777ff){_0x4f723f[_0x11f6a0(0x2a0)](debug,_0x11f6a0(0x2a6)+_0x5d10bb+':\x20'+_0x2777ff[_0x11f6a0(0x1dd)]());}}if(!this[_0x11f6a0(0x247)]){_0x4f723f[_0x11f6a0(0x226)](debug,_0x4f723f[_0x11f6a0(0x21b)]);return;}}catch(_0x374048){_0x4f723f['KcNyf'](debug,_0x11f6a0(0x1ee)+_0x374048['toString']());return;}const _0x261536=this[_0x11f6a0(0x247)];try{if(_0x4f723f[_0x11f6a0(0x210)](_0x261536,null)){const _0x5c4246=_0x261536[_0x11f6a0(0x27e)][_0x11f6a0(0x292)];if(!_0x4f723f['OATLh'](isFalse,process['env'][_0x11f6a0(0x253)])){if(_0x261536[_0x11f6a0(0x27e)][_0x11f6a0(0x272)]){logger[_0x11f6a0(0x216)](_0x4f723f[_0x11f6a0(0x246)]);return;}Object[_0x11f6a0(0x275)](_0x261536['prototype'],_0x4f723f[_0x11f6a0(0x273)],{'get':function(){const _0x4937f0={'AYfIZ':function(_0x4bfe22,_0x4ed4f6){const _0x15683a=a64_0x2ec7;return _0x4f723f[_0x15683a(0x22b)](_0x4bfe22,_0x4ed4f6);},'fcEJv':function(_0x303e40,_0x23baad){return _0x4f723f['ZXUqd'](_0x303e40,_0x23baad);}};return async function _0x57799e(_0x570d69){const _0x595758=a64_0x2ec7;if(BrowserstackCLI[_0x595758(0x231)]()[_0x595758(0x21f)]()){const _0x539180={};_0x539180['message']=_0x570d69,await BrowserstackCLI['getInstance']()['getAutomationFramework']()['trackEvent'](AutomationFrameworkState['PLAYWRIGHT_DISPATCH'],HookState[_0x595758(0x241)],_0x539180);}else{const _0x34e06d=_0x570d69&&_0x570d69[_0x595758(0x23d)]&&_0x570d69[_0x595758(0x23d)]['bsParams'];if(_0x34e06d){const _0x14fa20=_0x34e06d['sessionId'],_0x1a96e4=_0x34e06d[_0x595758(0x281)];_0x1a96e4&&(_0x4937f0[_0x595758(0x28e)](debug,_0x595758(0x230)+_0x1a96e4[_0x595758(0x1dd)]()),_0x36ee19[_0x595758(0x1f0)][_0x595758(0x248)]=_0x1a96e4['platformName'],_0x36ee19[_0x595758(0x1f0)][_0x595758(0x207)]=_0x1a96e4['platformVersion']),_0x14fa20&&(_0x4937f0[_0x595758(0x1ff)](debug,_0x595758(0x29e)+_0x14fa20),_0x36ee19[_0x595758(0x1f0)][_0x595758(0x25c)]=_0x14fa20);}}return _0x5c4246[_0x595758(0x28c)](this,arguments);};}}),_0x261536['prototype'][_0x11f6a0(0x272)]=!![],logger[_0x11f6a0(0x216)](_0x4f723f['ewrGs']);}}}catch(_0x4aed99){_0x4f723f[_0x11f6a0(0x29d)](debug,_0x11f6a0(0x1db)+_0x4aed99),_0x36ee19[_0x11f6a0(0x1ea)]=_0x4aed99['toString']();}}static[a64_0x1585ac(0x22c)](){const _0x5b0a35=a64_0x1585ac,_0x2f2edd={'QBQZs':function(_0x26d291,_0x522b71){return _0x26d291(_0x522b71);},'PiExW':'lib','pCLHj':_0x5b0a35(0x258),'qilHd':_0x5b0a35(0x28f),'AFlze':_0x5b0a35(0x1e5),'qttMH':_0x5b0a35(0x285),'sMzHv':_0x5b0a35(0x257),'sScEE':function(_0x2e7c89,_0x9d138b){return _0x2e7c89!=_0x9d138b;},'YuhZY':_0x5b0a35(0x1f3),'FZLEP':_0x5b0a35(0x287),'AJBhQ':_0x5b0a35(0x262),'ysdLt':function(_0x3967a5,_0x2ab9b3){return _0x3967a5(_0x2ab9b3);}},_0x52bdad=this;let _0x3c8d2a=null;try{const _0x2dc948=path[_0x5b0a35(0x206)](_0x2f2edd[_0x5b0a35(0x1f9)],_0x2f2edd[_0x5b0a35(0x25a)],_0x2f2edd[_0x5b0a35(0x1df)],_0x2f2edd['AFlze']),_0x5839be=_0x2f2edd[_0x5b0a35(0x1f6)](importFileFromPWCore,_0x2dc948);!_0x5839be?_0x2f2edd[_0x5b0a35(0x1f6)](debug,_0x2f2edd['qttMH']):_0x3c8d2a=_0x5839be['CRConnection'];}catch(_0x109a04){_0x2f2edd[_0x5b0a35(0x1f6)](debug,_0x2f2edd[_0x5b0a35(0x20d)]);}try{if(_0x2f2edd[_0x5b0a35(0x250)](_0x3c8d2a,null)){const _0x462d05=_0x3c8d2a[_0x5b0a35(0x27e)]['_onMessage'];if(_0x3c8d2a[_0x5b0a35(0x27e)][_0x5b0a35(0x24b)]){logger['debug'](_0x2f2edd[_0x5b0a35(0x2a7)]);return;}Object['defineProperty'](_0x3c8d2a['prototype'],_0x2f2edd[_0x5b0a35(0x268)],{'get':function(){const _0x34a4ae={'lmTAF':function(_0x3c36a5,_0xb70fd2){return _0x2f2edd['QBQZs'](_0x3c36a5,_0xb70fd2);}};return async function _0x23c993(_0xbbd93d){const _0x1c2fb7=a64_0x2ec7;try{if(BrowserstackCLI['getInstance']()['isRunning']()){const _0x346c74={};_0x346c74[_0x1c2fb7(0x200)]=_0xbbd93d,await BrowserstackCLI[_0x1c2fb7(0x231)]()['getAutomationFramework']()[_0x1c2fb7(0x24d)](AutomationFrameworkState[_0x1c2fb7(0x1f8)],HookState[_0x1c2fb7(0x241)],_0x346c74),delete _0xbbd93d['bStackParams'];}else{const _0x1b71c5=_0xbbd93d[_0x1c2fb7(0x296)];if(_0x1b71c5){delete _0xbbd93d[_0x1c2fb7(0x296)];const _0x38b8b5=_0x1b71c5[_0x1c2fb7(0x232)],_0x41bb14=_0x1b71c5[_0x1c2fb7(0x281)];_0x41bb14&&(_0x34a4ae[_0x1c2fb7(0x1ef)](debug,'Setting\x20platform\x20details\x20received\x20from\x20browserstack:\x20'+_0x41bb14[_0x1c2fb7(0x1dd)]()),_0x52bdad[_0x1c2fb7(0x1f0)][_0x1c2fb7(0x248)]=_0x41bb14[_0x1c2fb7(0x280)],_0x52bdad['currentSessionDetails']['platform_version']=_0x41bb14[_0x1c2fb7(0x26e)]),_0x38b8b5&&(_0x34a4ae[_0x1c2fb7(0x1ef)](debug,_0x1c2fb7(0x263)+_0x38b8b5),_0x52bdad[_0x1c2fb7(0x1f0)][_0x1c2fb7(0x25c)]=_0x38b8b5);}}}catch(_0x1d0d6f){_0x34a4ae['lmTAF'](debug,_0x1c2fb7(0x1e0)+_0x1d0d6f[_0x1c2fb7(0x1dd)]());}return _0x462d05['apply'](this,arguments);};}}),_0x3c8d2a[_0x5b0a35(0x27e)]['_bstackCRPatched']=!![],logger[_0x5b0a35(0x216)](_0x2f2edd[_0x5b0a35(0x22e)]);}}catch(_0x5bada4){_0x2f2edd[_0x5b0a35(0x260)](debug,'Error\x20in\x20getting\x20applying\x20CRConnection\x20patch\x20'+_0x5bada4),_0x52bdad[_0x5b0a35(0x1ea)]=_0x5bada4[_0x5b0a35(0x1dd)]();}}static['extractBrowserStackParams'](_0x5f5b8b,_0x555d15){const _0x43d333=a64_0x1585ac,_0x411c1f={'fofvX':'bstack:options','unnIV':function(_0x4cbf93,_0x1e547c){return _0x4cbf93||_0x1e547c;},'rjOoU':function(_0x80d54f,_0x25ccbc){return _0x80d54f===_0x25ccbc;},'ERSQR':_0x43d333(0x293),'rgEmY':'BrowserStack\x20params\x20extracted\x20from\x20WebSocket\x20endpoint','oifdx':function(_0x523bea,_0x5397d2){return _0x523bea(_0x5397d2);},'AFOvV':function(_0x8976b5,_0x345c5a){return _0x8976b5(_0x345c5a);},'PPxRC':function(_0x150b8c,_0x427270){return _0x150b8c(_0x427270);}};let _0x16ee1e=null,_0x33af32=null;try{const _0x2757a8=[_0x555d15,global[_0x43d333(0x23c)],global['capabilties']];for(const _0x49315a of _0x2757a8){if(_0x49315a&&(!_0x33af32||!_0x33af32[_0x43d333(0x232)])){const _0xfa42f5=_0x49315a[_0x43d333(0x232)]||_0x49315a[_0x411c1f[_0x43d333(0x25e)]]?.[_0x43d333(0x232)],_0xd6377b=_0x49315a[_0x43d333(0x220)]||_0x49315a[_0x43d333(0x26d)]||_0x49315a[_0x411c1f[_0x43d333(0x25e)]]?.['browserName'],_0x9ec4a1=_0x49315a[_0x43d333(0x20c)]||_0x49315a[_0x43d333(0x21c)]||_0x49315a[_0x411c1f[_0x43d333(0x25e)]]?.['browserVersion'],_0x5b4fe4=_0x49315a['os']||_0x49315a[_0x43d333(0x248)]||_0x49315a[_0x411c1f[_0x43d333(0x25e)]]?.['os'],_0x3750fc=_0x49315a[_0x43d333(0x2a3)]||_0x49315a[_0x43d333(0x21d)]||_0x49315a[_0x411c1f[_0x43d333(0x25e)]]?.['osVersion'];if(_0x411c1f[_0x43d333(0x271)](_0xfa42f5,_0xd6377b)||_0x5b4fe4){const _0x4d920d={};_0x4d920d[_0x43d333(0x220)]=_0xd6377b,_0x4d920d[_0x43d333(0x20c)]=_0x9ec4a1,_0x4d920d['os']=_0x5b4fe4,_0x4d920d['osVersion']=_0x3750fc,_0x4d920d[_0x43d333(0x280)]=_0x49315a[_0x43d333(0x280)]||_0x5b4fe4,_0x4d920d[_0x43d333(0x26e)]=_0x49315a[_0x43d333(0x26e)]||_0x3750fc;const _0x535e6e={};_0x535e6e[_0x43d333(0x232)]=_0xfa42f5,_0x535e6e[_0x43d333(0x281)]=_0x4d920d,_0x33af32=_0x535e6e;if(_0x411c1f[_0x43d333(0x271)](_0xfa42f5,_0xd6377b)){logger[_0x43d333(0x216)](_0x43d333(0x1e3)+_0xd6377b+_0x43d333(0x279)+_0x5b4fe4);break;}}}}if(_0x5f5b8b&&_0x411c1f[_0x43d333(0x23f)](typeof _0x5f5b8b,_0x411c1f['ERSQR']))try{const _0x183b28=url['parse'](_0x5f5b8b),_0x2c90cc=new URLSearchParams(_0x183b28[_0x43d333(0x1da)]),_0x3d7c7b=Object[_0x43d333(0x298)](_0x2c90cc[_0x43d333(0x1ed)]()),_0xdcae7c=[_0x3d7c7b[_0x43d333(0x23e)],_0x3d7c7b[_0x43d333(0x283)],_0x3d7c7b['desiredCapabilities']];for(const _0x4d254a of _0xdcae7c){if(_0x4d254a&&(!_0x16ee1e||!_0x16ee1e[_0x43d333(0x232)]))try{const _0x4064fa=JSON[_0x43d333(0x1e8)](_0x4d254a),_0x32b0ab={};_0x32b0ab[_0x43d333(0x232)]=_0x4064fa['sessionId']||_0x4064fa[_0x411c1f['fofvX']]?.[_0x43d333(0x232)],_0x32b0ab[_0x43d333(0x281)]={},_0x32b0ab[_0x43d333(0x281)][_0x43d333(0x220)]=_0x4064fa[_0x43d333(0x220)]||_0x4064fa['browser'],_0x32b0ab[_0x43d333(0x281)]['browserVersion']=_0x4064fa['browserVersion']||_0x4064fa[_0x43d333(0x21c)],_0x32b0ab[_0x43d333(0x281)]['os']=_0x4064fa['os']||_0x4064fa[_0x43d333(0x248)],_0x32b0ab[_0x43d333(0x281)][_0x43d333(0x2a3)]=_0x4064fa[_0x43d333(0x2a3)]||_0x4064fa['os_version'],_0x32b0ab[_0x43d333(0x281)][_0x43d333(0x280)]=_0x4064fa[_0x43d333(0x280)]||_0x4064fa['os']||_0x4064fa['platform'],_0x32b0ab[_0x43d333(0x281)][_0x43d333(0x26e)]=_0x4064fa[_0x43d333(0x26e)]||_0x4064fa['osVersion']||_0x4064fa[_0x43d333(0x21d)],_0x16ee1e=_0x32b0ab;if(_0x16ee1e[_0x43d333(0x232)]||_0x16ee1e[_0x43d333(0x281)]['browserName']){logger['debug'](_0x411c1f[_0x43d333(0x269)]);break;}}catch(_0xedac32){_0x411c1f[_0x43d333(0x255)](debug,'Failed\x20to\x20parse\x20capabilities\x20from\x20WebSocket:\x20'+_0xedac32[_0x43d333(0x1dd)]());}}}catch(_0x531a97){_0x411c1f[_0x43d333(0x20e)](debug,_0x43d333(0x289)+_0x531a97[_0x43d333(0x1dd)]());}}catch(_0x2ac85b){_0x411c1f['PPxRC'](debug,'Error\x20extracting\x20BrowserStack\x20parameters:\x20'+util[_0x43d333(0x251)](_0x2ac85b));}const _0x2e0162={};return _0x2e0162[_0x43d333(0x237)]=_0x16ee1e,_0x2e0162[_0x43d333(0x296)]=_0x33af32,_0x2e0162;}static async['triggerPlaywrightDispatchEvent'](_0x246e49,_0x40665f){const _0x3174f7=a64_0x1585ac,_0x7cc562={'LqyXs':function(_0x333f81,_0x924fb9){return _0x333f81||_0x924fb9;},'aivqD':_0x3174f7(0x218),'vabzq':function(_0x34d16e,_0x3575d4){return _0x34d16e||_0x3575d4;},'cIpXS':function(_0x35b3be,_0x42ad63){return _0x35b3be(_0x42ad63);}};try{if(!BrowserstackCLI['getInstance']()['isRunning']())return;if(_0x7cc562[_0x3174f7(0x24a)](_0x246e49,_0x40665f)){logger['debug'](_0x7cc562[_0x3174f7(0x28d)]);const _0x1d4340={'params':_0x246e49?{'bsParams':_0x246e49}:null,'bStackParams':_0x7cc562['vabzq'](_0x40665f,null)},_0x7cc7ce=AutomationFramework[_0x3174f7(0x27f)](),_0x4917f3={};_0x4917f3[_0x3174f7(0x200)]=_0x1d4340,_0x4917f3[_0x3174f7(0x2a1)]=_0x7cc7ce,await BrowserstackCLI['getInstance']()['getAutomationFramework']()[_0x3174f7(0x24d)](AutomationFrameworkState[_0x3174f7(0x1f8)],HookState[_0x3174f7(0x241)],_0x4917f3);}}catch(_0x315d26){_0x7cc562[_0x3174f7(0x22d)](debug,_0x3174f7(0x209)+util['format'](_0x315d26));}}static[a64_0x1585ac(0x26b)](){return this['currentSessionDetails'];}}function a64_0x2ec7(_0x44b281,_0x59a0f7){const _0x468247=a64_0x4682();return a64_0x2ec7=function(_0x2ec7f3,_0x504cff){_0x2ec7f3=_0x2ec7f3-0x1da;let _0x52c491=_0x468247[_0x2ec7f3];return _0x52c491;},a64_0x2ec7(_0x44b281,_0x59a0f7);}module['exports']=SharedPlaywrightSessionDetails;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a65_0x19f42b=a65_0x5ee6;function a65_0x5ee6(_0x202cf3,_0x354a20){const _0x3eff39=a65_0x3eff();return a65_0x5ee6=function(_0x5ee6d5,_0x8247d9){_0x5ee6d5=_0x5ee6d5-0x17c;let _0x1ed788=_0x3eff39[_0x5ee6d5];return _0x1ed788;},a65_0x5ee6(_0x202cf3,_0x354a20);}(function(_0x24adb1,_0x51b34e){const _0x9d586c=a65_0x5ee6,_0x2cc2a9=_0x24adb1();while(!![]){try{const _0x57eb22=parseInt(_0x9d586c(0x17f))/0x1+parseInt(_0x9d586c(0x17e))/0x2*(-parseInt(_0x9d586c(0x186))/0x3)+parseInt(_0x9d586c(0x18a))/0x4+parseInt(_0x9d586c(0x17d))/0x5*(parseInt(_0x9d586c(0x18f))/0x6)+-parseInt(_0x9d586c(0x180))/0x7+parseInt(_0x9d586c(0x184))/0x8*(-parseInt(_0x9d586c(0x189))/0x9)+parseInt(_0x9d586c(0x188))/0xa*(parseInt(_0x9d586c(0x18c))/0xb);if(_0x57eb22===_0x51b34e)break;else _0x2cc2a9['push'](_0x2cc2a9['shift']());}catch(_0x1b6c05){_0x2cc2a9['push'](_0x2cc2a9['shift']());}}}(a65_0x3eff,0xe81ba));const isHash=_0x495961=>Boolean(_0x495961&&typeof _0x495961===a65_0x19f42b(0x181)&&!Array[a65_0x19f42b(0x18b)](_0x495961)),nestedKeyValue=(_0x4d7729,_0x3aac82)=>{const _0x24a38a=a65_0x19f42b,_0x2cd3ef={'Nuqcb':function(_0x5656be,_0x5950ba){return _0x5656be===_0x5950ba;},'NgRRZ':function(_0x44e26f,_0x291ba0){return _0x44e26f===_0x291ba0;},'EEcuE':_0x24a38a(0x187),'yPmYz':function(_0x521660,_0x35ec6b){return _0x521660(_0x35ec6b);}};return _0x3aac82[_0x24a38a(0x18d)]((_0x3b5c09,_0x1f2e2b)=>{const _0x3c314b=_0x24a38a;if(_0x2cd3ef[_0x3c314b(0x17c)](_0x3b5c09,undefined)||_0x2cd3ef[_0x3c314b(0x17c)](_0x3b5c09,null))return undefined;if(_0x3b5c09&&_0x2cd3ef['NgRRZ'](typeof _0x3b5c09['get'],_0x2cd3ef[_0x3c314b(0x183)]))return _0x3b5c09['get'](_0x1f2e2b);if(_0x2cd3ef[_0x3c314b(0x182)](isHash,_0x3b5c09))return _0x3b5c09[_0x1f2e2b];return undefined;},_0x4d7729);},a65_0x36318b={};a65_0x36318b[a65_0x19f42b(0x185)]=isHash,a65_0x36318b['nestedKeyValue']=nestedKeyValue,module[a65_0x19f42b(0x18e)]=a65_0x36318b;function a65_0x3eff(){const _0x4c843d=['22281YhAJMN','function','84160toWwmT','7152309OvsrNe','6379952XKGeUb','isArray','1177XVWdfy','reduce','exports','12AYngvH','Nuqcb','4475345RfJsJu','442kgWhht','651580IfYkKs','10853052WTSaSH','object','yPmYz','EEcuE','8gGkBhw','isHash'];a65_0x3eff=function(){return _0x4c843d;};return a65_0x3eff();}
|
package/src/bin/v2/TestInfo.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a66_0x5713af=a66_0x1836;(function(_0x57fd52,_0x2c5f49){const _0x596264=a66_0x1836,_0x32423d=_0x57fd52();while(!![]){try{const _0x123f40=parseInt(_0x596264(0x97))/0x1+parseInt(_0x596264(0xad))/0x2*(-parseInt(_0x596264(0xb1))/0x3)+-parseInt(_0x596264(0xd4))/0x4*(parseInt(_0x596264(0x101))/0x5)+-parseInt(_0x596264(0x9c))/0x6*(parseInt(_0x596264(0xea))/0x7)+-parseInt(_0x596264(0xa6))/0x8*(parseInt(_0x596264(0x95))/0x9)+-parseInt(_0x596264(0xe9))/0xa*(parseInt(_0x596264(0xb5))/0xb)+parseInt(_0x596264(0x98))/0xc;if(_0x123f40===_0x2c5f49)break;else _0x32423d['push'](_0x32423d['shift']());}catch(_0x52edf9){_0x32423d['push'](_0x32423d['shift']());}}}(a66_0x2ba5,0x6b040));const fs=require('fs'),path=require('path'),{TEMP_STORE_DIR_NAME}=require(a66_0x5713af(0xde)),{nestedKeyValue}=require(a66_0x5713af(0x9e)),logger=require('../../helpers/logger')[a66_0x5713af(0x89)],util=require('util'),helper=require('../../helpers/helper'),{createClassLogger}=require(a66_0x5713af(0xfc)),lockfile=require(a66_0x5713af(0xa4)),{v4:uuidv4}=require('uuid');function a66_0x1836(_0x135ea3,_0x1eb648){const _0x2ba5f7=a66_0x2ba5();return a66_0x1836=function(_0x1836a1,_0x5cfb40){_0x1836a1=_0x1836a1-0x84;let _0x5ab95c=_0x2ba5f7[_0x1836a1];return _0x5ab95c;},a66_0x1836(_0x135ea3,_0x1eb648);}function a66_0x2ba5(){const _0x3c7d83=['48xLgTeu','some','length','[setTestDetails]\x20processId:\x20','4324507zBounQ','testFramework','LxzXF','PGFzg','readLogObjects','readFileSync','NBhwL','writeFileSync','Error\x20writing\x20trace\x20file:\x20%O','_traceZipPaths.json','Failed\x20to\x20acquire\x20lock\x20for\x20','TEPNS','readLogObjects:\x20processId:\x20','join','format','.browserstack','getTestIdFromTestInfo','logObjects','pjKss','shutdown','_test','existsSync','parse','push','poSkG','setup','filePath','getFilePath','TestInfo','grWcv','FShMo','28jNoOOa','Error\x20writing\x20test\x20details\x20to\x20file\x20for\x20','mkdirSync','NfmBg','eGSar','storeLogObjects:\x20processId:\x20','traceZipPaths','xpZGB','forEach','_platformDetails.json','../../helpers/test-observability/constants','getTestUUID','debug','\x20log\x20objects\x20for\x20testId:\x20','SHFWA','getTraceZipDir','readLogObjects:\x20No\x20file\x20found\x20for\x20testId:\x20','kZZIV','uuid','appendToTracePaths','getStoreDirName','10iyndbf','329uOMeiD','hkRfF','4|6|2|3|5|0|1','setTestDetails','KQMUz','iHIVb','yytBN','\x20with\x20details:\x20','readLogObjects:\x20Retrieved\x20','readLogObjects:\x20No\x20log\x20objects\x20found\x20for\x20testId:\x20','wmIlx','cabPn','WvbIz','Sfpaw','\x20Adding\x20console\x20log\x20for\x20','toString','stringify','getAccessibilityPlatformValidation','../../helpers/classLogger.js','_projectId','dirPath','endsWith','jHhNA','315595YmaQqY','niKSn','recursive','NLNeT','error','logger','Setting\x20up\x20TestInfo\x20directory\x20at\x20','UOKHv','Error\x20reading\x20trace\x20file\x20paths:\x20%O','string','Ueici','\x20Setting\x20test\x20details\x20for\x20','\x20Retrieving\x20logs\x20for\x20','setAccessibilityPlatformValidation','env','winstonLogger','resolve','appendFileSync','dVmAP','.json','split','fYOmd','isArray','object','getStoreDirPath','rmSync','traceZipDir','864rHZigx','getTestDetails','736585hmjuFi','22926804UPubQi','pid','qjcuw','message','108348Qedsxe','storeLogObjects','../../helpers/helper','ejeuq','getProjectIdFromTestInfo','addTraceFilePath','tests','getTestRunIdFromTestInfo','proper-lockfile','lockSync','30928rdheIj','UMOSk','testId','Error\x20while\x20getting\x20test\x20UUID\x20for\x20','nPySb','CAtSJ','.\x20Unable\x20to\x20set\x20test\x20details.','19248FYdSap','ADRJr','.\x20Returning\x20empty\x20test\x20details.','project'];a66_0x2ba5=function(){return _0x3c7d83;};return a66_0x2ba5();}class TestInfo{static [a66_0x5713af(0xa2)]={};static [a66_0x5713af(0xfe)]=TestInfo[a66_0x5713af(0xe8)]();static [a66_0x5713af(0x94)]=path[a66_0x5713af(0xc2)](TestInfo[a66_0x5713af(0xfe)],a66_0x5713af(0xda));static [a66_0x5713af(0xb6)]=null;[a66_0x5713af(0x106)]=createClassLogger(a66_0x5713af(0xd1));static[a66_0x5713af(0xce)](_0x1b789d){const _0x11f824=a66_0x5713af,_0x52af7e={};_0x52af7e['hkRfF']=_0x11f824(0xec),_0x52af7e[_0x11f824(0xae)]='traceZipPaths';const _0x9d9e7e=_0x52af7e,_0x1a2975=_0x9d9e7e[_0x11f824(0xeb)][_0x11f824(0x8e)]('|');let _0x4b2d7d=0x0;while(!![]){switch(_0x1a2975[_0x4b2d7d++]){case'0':const _0x411df2={};_0x411df2['recursive']=!![],fs[_0x11f824(0xd6)](this[_0x11f824(0x94)],_0x411df2);continue;case'1':logger['info'](_0x11f824(0x107)+this['dirPath']);continue;case'2':this[_0x11f824(0xb6)]=_0x1b789d;continue;case'3':this['shutdown']();continue;case'4':this['dirPath']=TestInfo[_0x11f824(0xe8)]();continue;case'5':const _0x180790={};_0x180790[_0x11f824(0x103)]=!![],fs[_0x11f824(0xd6)](this[_0x11f824(0xfe)],_0x180790);continue;case'6':this[_0x11f824(0x94)]=path['join'](this[_0x11f824(0xfe)],_0x9d9e7e[_0x11f824(0xae)]);continue;}break;}}static[a66_0x5713af(0xe8)](){const _0x4c51e0=a66_0x5713af,_0x9266a={};_0x9266a['KQMUz']=function(_0x1bfbdf,_0x472ffe){return _0x1bfbdf+_0x472ffe;},_0x9266a[_0x4c51e0(0xe2)]=function(_0x16a97d,_0x316618){return _0x16a97d+_0x316618;},_0x9266a[_0x4c51e0(0xef)]='default';const _0x536923=_0x9266a;return _0x536923[_0x4c51e0(0xee)](_0x536923['SHFWA'](TEMP_STORE_DIR_NAME,'-'),process[_0x4c51e0(0x88)]['BS_TESTOPS_BUILD_HASHED_ID']||_0x536923[_0x4c51e0(0xef)]);}static[a66_0x5713af(0x92)](){const _0x4c362f=a66_0x5713af,_0x1764ba={};_0x1764ba[_0x4c362f(0xc0)]=function(_0x2a23e5,_0x39b07b){return _0x2a23e5+_0x39b07b;},_0x1764ba['xpZGB']=function(_0x44eed3,_0x645746){return _0x44eed3+_0x645746;},_0x1764ba[_0x4c362f(0x9f)]='default';const _0x5b843c=_0x1764ba;return path[_0x4c362f(0xc2)](_0x5b843c[_0x4c362f(0xc0)](_0x5b843c[_0x4c362f(0xdb)](TEMP_STORE_DIR_NAME,'-'),process[_0x4c362f(0x88)]['BS_TESTOPS_BUILD_HASHED_ID']||_0x5b843c[_0x4c362f(0x9f)]));}static[a66_0x5713af(0xe3)](){const _0x2eaf50=a66_0x5713af,_0x39fdbf={};_0x39fdbf['vmWJu']=_0x2eaf50(0xda);const _0x52d0e9=_0x39fdbf;return path['join'](this[_0x2eaf50(0x92)](),_0x52d0e9['vmWJu']);}static[a66_0x5713af(0xd0)](_0x1ab7ee){const _0x2f28af=a66_0x5713af,_0x162263={};_0x162263[_0x2f28af(0xd3)]=function(_0x305fc4,_0x51d1ff){return _0x305fc4+_0x51d1ff;},_0x162263[_0x2f28af(0x8c)]=_0x2f28af(0x8d);const _0x8a6fb8=_0x162263;return path[_0x2f28af(0xc2)](this[_0x2f28af(0xfe)],_0x8a6fb8[_0x2f28af(0xd3)](_0x1ab7ee,_0x8a6fb8['dVmAP']));}static[a66_0x5713af(0xa3)](_0x3b509d){const _0x365959=a66_0x5713af,_0x45c001={};_0x45c001['NfmBg']=function(_0x118b92,_0x53b2c2){return _0x118b92+_0x53b2c2;};const _0x495ad0=_0x45c001;return _0x495ad0['NfmBg'](_0x495ad0[_0x365959(0xd7)](_0x495ad0['NfmBg'](_0x495ad0[_0x365959(0xd7)](this[_0x365959(0xa0)](_0x3b509d),'-'),this[_0x365959(0xc5)](_0x3b509d)),'-'),_0x3b509d['retry']);}static['getProjectIdFromTestInfo'](_0x16eca0){const _0x4ffe54=a66_0x5713af,_0x3dbc99={'jHhNA':function(_0x5beead,_0x124418,_0x136770){return _0x5beead(_0x124418,_0x136770);},'cabPn':'_test','LxzXF':_0x4ffe54(0xfd),'LCsBW':function(_0x36ce81,_0x3a0db1,_0x222739){return _0x36ce81(_0x3a0db1,_0x222739);},'UMOSk':_0x4ffe54(0xb0),'kZZIV':'__projectId'};return _0x3dbc99[_0x4ffe54(0x100)](nestedKeyValue,_0x16eca0,[_0x3dbc99[_0x4ffe54(0xf5)],_0x3dbc99[_0x4ffe54(0xb7)]])||_0x3dbc99['LCsBW'](nestedKeyValue,_0x16eca0,[_0x3dbc99[_0x4ffe54(0xa7)],_0x3dbc99[_0x4ffe54(0xe5)]]);}static[a66_0x5713af(0xc5)](_0x183fbb){const _0x32501b=a66_0x5713af,_0x2ea788={'mbLyo':function(_0xf0cd87,_0x240d1e,_0x545d4a){return _0xf0cd87(_0x240d1e,_0x545d4a);},'wmIlx':_0x32501b(0xc9)};return _0x2ea788['mbLyo'](nestedKeyValue,_0x183fbb,[_0x2ea788[_0x32501b(0xf4)],'id'])||_0x183fbb[_0x32501b(0xa8)];}static['getTestIdentifierFromTestInfo'](_0xe7eab7,_0x3d1498){const _0x59cec3=a66_0x5713af,_0x2f554c={};_0x2f554c[_0x59cec3(0x8f)]=function(_0xa0ddc3,_0x2ee221){return _0xa0ddc3+_0x2ee221;},_0x2f554c[_0x59cec3(0xaa)]=function(_0x27cb14,_0x26f1b5){return _0x27cb14+_0x26f1b5;};const _0x477254=_0x2f554c;return _0x477254[_0x59cec3(0x8f)](_0x477254['nPySb'](this[_0x59cec3(0xc5)](_0xe7eab7),'-'),_0x3d1498);}static[a66_0x5713af(0xdf)](_0x518152){const _0x1b4e70=a66_0x5713af,_0xef1612={'wsfPG':function(_0x4079c4,_0x10b909){return _0x4079c4===_0x10b909;},'qjcuw':_0x1b4e70(0x10a),'poSkG':function(_0x8324){return _0x8324();}};try{if(this[_0x1b4e70(0xa2)][_0x518152]&&_0xef1612['wsfPG'](typeof this['tests'][_0x518152][_0x1b4e70(0xe6)],_0xef1612[_0x1b4e70(0x9a)]))return this[_0x1b4e70(0xa2)][_0x518152][_0x1b4e70(0xe6)];const _0x43f20d=this[_0x1b4e70(0xd0)](_0x518152),_0x174aa1=path[_0x1b4e70(0x8a)](_0x43f20d);if(fs[_0x1b4e70(0xca)](_0x174aa1)){const _0x57760e=JSON[_0x1b4e70(0xcb)](fs[_0x1b4e70(0xba)](_0x43f20d)['toString']());return this[_0x1b4e70(0xa2)][_0x518152]=_0x57760e,this[_0x1b4e70(0xa2)][_0x518152]['uuid'];}this[_0x1b4e70(0xa2)][_0x518152]={'uuid':_0xef1612[_0x1b4e70(0xcd)](uuidv4)};try{fs[_0x1b4e70(0xbc)](_0x43f20d,JSON['stringify'](this[_0x1b4e70(0xa2)][_0x518152]));}catch(_0xa97b68){logger['error'](_0x1b4e70(0xd5)+_0x518152+':\x20'+_0xa97b68[_0x1b4e70(0x9b)]);}return this[_0x1b4e70(0xa2)][_0x518152][_0x1b4e70(0xe6)];}catch(_0x54b1cf){return logger[_0x1b4e70(0x105)](_0x1b4e70(0xa9)+_0x518152+':\x20'+_0x54b1cf[_0x1b4e70(0x9b)]),null;}}static[a66_0x5713af(0xfb)](_0x28516e){const _0x4b8b90=a66_0x5713af,_0x5a0337=path['join'](this['dirPath'],_0x28516e+'_platformDetails.json');if(fs[_0x4b8b90(0xca)](_0x5a0337))return fs[_0x4b8b90(0xba)](_0x5a0337)['toString']();}static[a66_0x5713af(0x87)](_0x1645d7,_0x43cec4){const _0x41bb76=a66_0x5713af,_0x657512=path['join'](this[_0x41bb76(0xfe)],_0x43cec4+_0x41bb76(0xdd));fs[_0x41bb76(0xbc)](_0x657512,_0x1645d7[_0x41bb76(0xf9)]());}static[a66_0x5713af(0xc8)](){const _0xfea4d7=a66_0x5713af,_0x4823bc={};_0x4823bc[_0xfea4d7(0x103)]=!![],_0x4823bc['force']=!![],fs[_0xfea4d7(0x93)](this[_0xfea4d7(0xfe)],_0x4823bc);}static[a66_0x5713af(0x96)](_0x16372b){const _0x4f1cef=a66_0x5713af,_0x321125=this[_0x4f1cef(0xd0)](_0x16372b);if(fs[_0x4f1cef(0xca)](_0x321125))try{const _0x53c49e=JSON[_0x4f1cef(0xcb)](fs[_0x4f1cef(0xba)](_0x321125)['toString']());return this[_0x4f1cef(0xa2)][_0x16372b]=_0x53c49e,_0x53c49e;}catch(_0xc5fe8e){return logger[_0x4f1cef(0xe0)]('Failed\x20to\x20acquire\x20lock\x20for\x20'+_0x321125+':\x20'+util[_0x4f1cef(0xc3)](_0xc5fe8e)+_0x4f1cef(0xaf)),{};}return{};}static[a66_0x5713af(0xed)](_0x541486,_0x14109f,_0x497ec9=![]){const _0x5c1de6=a66_0x5713af,_0x46359c={'Ueici':function(_0x28b0b5){return _0x28b0b5();}};logger[_0x5c1de6(0xe0)](_0x5c1de6(0xb4)+process[_0x5c1de6(0x99)]+_0x5c1de6(0x85)+_0x541486+_0x5c1de6(0xf1)+JSON[_0x5c1de6(0xfa)](_0x14109f));const _0x57695a=this[_0x5c1de6(0xd0)](_0x541486);if(fs[_0x5c1de6(0xca)](_0x57695a))try{const _0x1fc178=lockfile[_0x5c1de6(0xa5)](_0x57695a),_0x353c8f=JSON[_0x5c1de6(0xcb)](fs[_0x5c1de6(0xba)](_0x57695a)['toString']());if(_0x497ec9)this[_0x5c1de6(0xa2)][_0x541486]=helper['mergeDeep'](_0x353c8f,_0x14109f);else{const _0x1de2a3={..._0x353c8f,..._0x14109f};this[_0x5c1de6(0xa2)][_0x541486]=_0x1de2a3;}fs[_0x5c1de6(0xbc)](_0x57695a,JSON[_0x5c1de6(0xfa)](this[_0x5c1de6(0xa2)][_0x541486])),_0x46359c[_0x5c1de6(0x84)](_0x1fc178);}catch(_0x48e730){logger[_0x5c1de6(0xe0)](_0x5c1de6(0xbf)+_0x57695a+':\x20'+util[_0x5c1de6(0xc3)](_0x48e730)+_0x5c1de6(0xac));}}static[a66_0x5713af(0x9d)](_0x5752da,_0x42367c){const _0x4726cd=a66_0x5713af,_0x36ce24={'VUtRX':function(_0x562c77,_0x2d706e){return _0x562c77!==_0x2d706e;},'CAtSJ':_0x4726cd(0x91),'pjKss':function(_0x3f2964){return _0x3f2964();}};logger[_0x4726cd(0xe0)](_0x4726cd(0xd9)+process[_0x4726cd(0x99)]+_0x4726cd(0xf8)+_0x5752da+'}');const _0x3b2259=this['getFilePath'](_0x5752da);try{let _0x1e3f9a={};if(fs[_0x4726cd(0xca)](_0x3b2259)){const _0x1ac1ed=lockfile[_0x4726cd(0xa5)](_0x3b2259);_0x1e3f9a=JSON[_0x4726cd(0xcb)](fs[_0x4726cd(0xba)](_0x3b2259)[_0x4726cd(0xf9)]()),(!_0x1e3f9a['logObjects']||_0x36ce24['VUtRX'](typeof _0x1e3f9a[_0x4726cd(0xc6)],_0x36ce24[_0x4726cd(0xab)]))&&(_0x1e3f9a['logObjects']={}),(!_0x1e3f9a[_0x4726cd(0xc6)][_0x5752da]||!Array[_0x4726cd(0x90)](_0x1e3f9a[_0x4726cd(0xc6)][_0x5752da]))&&(_0x1e3f9a[_0x4726cd(0xc6)][_0x5752da]=[]),_0x1e3f9a[_0x4726cd(0xc6)][_0x5752da][_0x4726cd(0xcc)](_0x42367c),this['tests'][_0x5752da]=_0x1e3f9a,fs[_0x4726cd(0xbc)](_0x3b2259,JSON['stringify'](this[_0x4726cd(0xa2)][_0x5752da])),_0x36ce24[_0x4726cd(0xc7)](_0x1ac1ed);}else{const _0x482c64={};_0x482c64[_0x4726cd(0xe6)]=_0x5752da,_0x482c64[_0x4726cd(0xc6)]={},_0x482c64[_0x4726cd(0xc6)][_0x5752da]=[_0x42367c],_0x1e3f9a=_0x482c64,this[_0x4726cd(0xa2)][_0x5752da]=_0x1e3f9a,fs[_0x4726cd(0xbc)](_0x3b2259,JSON[_0x4726cd(0xfa)](this[_0x4726cd(0xa2)][_0x5752da]));}}catch(_0x5b1ca8){logger[_0x4726cd(0xe0)]('Failed\x20to\x20acquire\x20lock\x20for\x20'+_0x3b2259+':\x20'+util[_0x4726cd(0xc3)](_0x5b1ca8)+'.\x20Unable\x20to\x20add\x20console\x20log.');}}static[a66_0x5713af(0xb9)](_0x463248){const _0xe964ba=a66_0x5713af,_0x2a858b={'NLNeT':function(_0x393202,_0x4dfb94){return _0x393202!==_0x4dfb94;},'AejPf':_0xe964ba(0x91),'NBhwL':function(_0x157a7f){return _0x157a7f();},'yytBN':function(_0x1dc5c2,_0x4c5c9b){return _0x1dc5c2===_0x4c5c9b;},'WvbIz':function(_0x18cd46){return _0x18cd46();}};logger[_0xe964ba(0xe0)](_0xe964ba(0xc1)+process['pid']+_0xe964ba(0x86)+_0x463248);const _0x50f571=this[_0xe964ba(0xd0)](_0x463248);try{if(!fs['existsSync'](_0x50f571))return logger[_0xe964ba(0xe0)](_0xe964ba(0xe4)+_0x463248),[];const _0x3075c4=lockfile[_0xe964ba(0xa5)](_0x50f571),_0xbe00ff=JSON[_0xe964ba(0xcb)](fs[_0xe964ba(0xba)](_0x50f571)[_0xe964ba(0xf9)]());if(!_0xbe00ff[_0xe964ba(0xc6)]||_0x2a858b[_0xe964ba(0x104)](typeof _0xbe00ff[_0xe964ba(0xc6)],_0x2a858b['AejPf']))return logger[_0xe964ba(0xe0)]('readLogObjects:\x20No\x20logObjects\x20object\x20found\x20for\x20testId:\x20'+_0x463248),_0x2a858b[_0xe964ba(0xbb)](_0x3075c4),[];if(!_0xbe00ff[_0xe964ba(0xc6)][_0x463248]||!Array[_0xe964ba(0x90)](_0xbe00ff[_0xe964ba(0xc6)][_0x463248])||_0x2a858b[_0xe964ba(0xf0)](_0xbe00ff[_0xe964ba(0xc6)][_0x463248]['length'],0x0))return logger[_0xe964ba(0xe0)](_0xe964ba(0xf3)+_0x463248),_0x2a858b[_0xe964ba(0xf6)](_0x3075c4),[];const _0x3cde90=[..._0xbe00ff[_0xe964ba(0xc6)][_0x463248]];return logger[_0xe964ba(0xe0)](_0xe964ba(0xf2)+_0x3cde90[_0xe964ba(0xb3)]+_0xe964ba(0xe1)+_0x463248),_0xbe00ff[_0xe964ba(0xc6)][_0x463248]=[],this[_0xe964ba(0xa2)][_0x463248]=_0xbe00ff,fs[_0xe964ba(0xbc)](_0x50f571,JSON[_0xe964ba(0xfa)](this[_0xe964ba(0xa2)][_0x463248])),_0x2a858b[_0xe964ba(0xf6)](_0x3075c4),_0x3cde90;}catch(_0x242f7c){return logger[_0xe964ba(0xe0)](_0xe964ba(0xbf)+_0x50f571+':\x20'+util['format'](_0x242f7c)+'.\x20Unable\x20to\x20retrieve\x20log\x20objects.'),[];}}static[a66_0x5713af(0xa1)](_0x1c7149){const _0x1add30=a66_0x5713af,_0x272867={};_0x272867[_0x1add30(0x102)]='Error\x20handling\x20trace\x20file\x20paths:\x20%O';const _0x31bfca=_0x272867;try{const _0x3dacc8=process['pid'],_0x1da96d=path['join'](TestInfo[_0x1add30(0xe3)](),_0x3dacc8+_0x1add30(0xbe));let _0x38ee90=[];fs[_0x1add30(0xca)](_0x1da96d)&&(_0x38ee90=JSON[_0x1add30(0xcb)](fs['readFileSync'](_0x1da96d)[_0x1add30(0xf9)]()));if(!_0x38ee90[_0x1add30(0xb2)](_0xed9321=>_0xed9321[_0x1add30(0xcf)]===_0x1c7149['filePath'])){_0x38ee90['push'](_0x1c7149);const _0x22b888=path['dirname'](_0x1da96d);if(!fs[_0x1add30(0xca)](_0x22b888)){const _0x5813b5={};_0x5813b5[_0x1add30(0x103)]=!![],fs[_0x1add30(0xd6)](_0x22b888,_0x5813b5);}fs['writeFileSync'](_0x1da96d,JSON[_0x1add30(0xfa)](_0x38ee90));}}catch(_0x2797ed){logger[_0x1add30(0x105)](util[_0x1add30(0xc3)](_0x31bfca[_0x1add30(0x102)],_0x2797ed));}}static['getTraceFilePaths'](){const _0x56cb30=a66_0x5713af,_0x251a75={};_0x251a75[_0x56cb30(0xd8)]=_0x56cb30(0xbe),_0x251a75['Sfpaw']=_0x56cb30(0x109);const _0xfe1257=_0x251a75,_0x5cfdb7=[];try{const _0x4885ad=TestInfo['getTraceZipDir']();if(!fs['existsSync'](_0x4885ad))return _0x5cfdb7;const _0xa859f9=fs['readdirSync'](_0x4885ad);_0xa859f9[_0x56cb30(0xdc)](_0x1077e9=>{const _0x5664d0=_0x56cb30;if(_0x1077e9[_0x5664d0(0xff)](_0xfe1257['eGSar'])){const _0x5ea5be=JSON[_0x5664d0(0xcb)](fs[_0x5664d0(0xba)](path['join'](_0x4885ad,_0x1077e9))[_0x5664d0(0xf9)]());_0x5cfdb7['push'](..._0x5ea5be);}});}catch(_0x56fa0f){logger['error'](util[_0x56cb30(0xc3)](_0xfe1257[_0x56cb30(0xf7)],_0x56fa0f));}const _0x4e2e7f={};return _0x5cfdb7[_0x56cb30(0xdc)](_0x54c7a6=>{const _0x10a6b1=_0x56cb30;_0x4e2e7f[_0x54c7a6[_0x10a6b1(0xcf)]]=_0x54c7a6;}),Object['values'](_0x4e2e7f);}static[a66_0x5713af(0xe7)](_0x5a389c,_0x2d830d){const _0x13992b=a66_0x5713af,_0x5217f5={};_0x5217f5[_0x13992b(0xb8)]=_0x13992b(0xc4),_0x5217f5['UOKHv']='utf8',_0x5217f5['grWcv']=_0x13992b(0xbd);const _0x218d57=_0x5217f5;try{const _0x55ea67=path['join'](helper['homedir'](),_0x218d57[_0x13992b(0xb8)]);if(!fs[_0x13992b(0xca)](_0x55ea67)){const _0x2081dc={};_0x2081dc['recursive']=!![],fs['mkdirSync'](_0x55ea67,_0x2081dc);}fs[_0x13992b(0x8b)](path[_0x13992b(0xc2)](_0x55ea67,'trace_'+_0x2d830d+'.txt'),_0x5a389c+'\x0a',_0x218d57[_0x13992b(0x108)]);}catch(_0x3672df){logger[_0x13992b(0x105)](util['format'](_0x218d57[_0x13992b(0xd2)],_0x3672df));}}}module['exports']=TestInfo;
|
|
1
|
+
function a66_0x3f65(_0x53dbfd,_0x2bd0b5){const _0x1a8e54=a66_0x1a8e();return a66_0x3f65=function(_0x3f655e,_0x506c67){_0x3f655e=_0x3f655e-0x16e;let _0x234091=_0x1a8e54[_0x3f655e];return _0x234091;},a66_0x3f65(_0x53dbfd,_0x2bd0b5);}const a66_0x92f5c7=a66_0x3f65;(function(_0x1ffa4d,_0x2b8aea){const _0x276bc9=a66_0x3f65,_0x471a07=_0x1ffa4d();while(!![]){try{const _0x16d82a=-parseInt(_0x276bc9(0x1aa))/0x1+-parseInt(_0x276bc9(0x1ef))/0x2+parseInt(_0x276bc9(0x183))/0x3+-parseInt(_0x276bc9(0x1f9))/0x4*(parseInt(_0x276bc9(0x190))/0x5)+parseInt(_0x276bc9(0x1a8))/0x6+-parseInt(_0x276bc9(0x1bd))/0x7*(parseInt(_0x276bc9(0x1b1))/0x8)+parseInt(_0x276bc9(0x170))/0x9*(parseInt(_0x276bc9(0x1d6))/0xa);if(_0x16d82a===_0x2b8aea)break;else _0x471a07['push'](_0x471a07['shift']());}catch(_0x4454d1){_0x471a07['push'](_0x471a07['shift']());}}}(a66_0x1a8e,0x5367b));const fs=require('fs'),path=require(a66_0x92f5c7(0x1c2)),{TEMP_STORE_DIR_NAME}=require(a66_0x92f5c7(0x1f7)),{nestedKeyValue}=require(a66_0x92f5c7(0x1b8)),logger=require(a66_0x92f5c7(0x1dc))[a66_0x92f5c7(0x1d1)],util=require(a66_0x92f5c7(0x194)),helper=require('../../helpers/helper'),{createClassLogger}=require(a66_0x92f5c7(0x1b6)),lockfile=require(a66_0x92f5c7(0x1e2)),{v4:uuidv4}=require(a66_0x92f5c7(0x1e5));function a66_0x1a8e(){const _0x289b1b=['readdirSync','getStoreDirName','\x20Setting\x20test\x20details\x20for\x20','GYEQr','.browserstack','push','homedir','Failed\x20to\x20acquire\x20lock\x20for\x20','readLogObjects:\x20No\x20logObjects\x20object\x20found\x20for\x20testId:\x20','parse','dPGfn','UsfpI','shutdown','720732QUTrZM','getStoreDirPath','isArray','.\x20Unable\x20to\x20retrieve\x20log\x20objects.','.\x20Unable\x20to\x20set\x20test\x20details.','setTestDetails','mkdirSync','writeFileSync','NKexw','EkauQ','qbdpf','JggoP','debug','5gVqmdO','getFilePath','readLogObjects:\x20No\x20file\x20found\x20for\x20testId:\x20','appendFileSync','util','pid','forEach','dtwqd','\x20Adding\x20console\x20log\x20for\x20','split','join','_projectId','setup','Error\x20while\x20getting\x20test\x20UUID\x20for\x20','NVpPJ','logger','readFileSync','getTestDetails','.\x20Returning\x20empty\x20test\x20details.','DRAae','some','NmLtt','ZuPLm','qaJuC','3288864Xjiqpq','traceZipPaths','398179dnvFRg','getTraceFilePaths','testFramework','YBBDM','lockSync','_traceZipPaths.json','fhDno','116936HCGJUV','toString','Error\x20writing\x20test\x20details\x20to\x20file\x20for\x20','SMYoa','env','../../helpers/classLogger.js','ptrwi','../../helpers/helper','CUlbX','AmCXx','default','getProjectIdFromTestInfo','7KIfVbk','error','.json','_platformDetails.json','Setting\x20up\x20TestInfo\x20directory\x20at\x20','path','getTestIdFromTestInfo','tests','.txt','HWPVz','tEzAD','mergeDeep','recursive','setAccessibilityPlatformValidation','addTraceFilePath','exports','iAwpi','traceZipDir','PGPfn','force','winstonLogger','readLogObjects:\x20No\x20log\x20objects\x20found\x20for\x20testId:\x20','TestInfo','getTestIdentifierFromTestInfo','resolve','10xvzqPe','hiMsX','dirname','VkuDZ','storeLogObjects','dirPath','../../helpers/logger','values','message','getTraceZipDir','getTestRunIdFromTestInfo','mOUdj','proper-lockfile','existsSync','eyWnt','uuid','mSXkD','logObjects','string','\x20with\x20details:\x20','object','readLogObjects','__projectId','stringify','5|6|0|3|1|2|4','241998xZpxpn','_test','testId','BS_TESTOPS_BUILD_HASHED_ID','Error\x20writing\x20trace\x20file:\x20%O','readLogObjects:\x20processId:\x20','wfSRw','project','../../helpers/test-observability/constants','filePath','396068XJWvSk','frYAR','utf8','length','wUiFZ','1674459vmPTLg','format','PuCNt','\x20Retrieving\x20logs\x20for\x20','info','\x20log\x20objects\x20for\x20testId:\x20'];a66_0x1a8e=function(){return _0x289b1b;};return a66_0x1a8e();}class TestInfo{static [a66_0x92f5c7(0x1c4)]={};static [a66_0x92f5c7(0x1db)]=TestInfo[a66_0x92f5c7(0x177)]();static [a66_0x92f5c7(0x1ce)]=path['join'](TestInfo[a66_0x92f5c7(0x1db)],a66_0x92f5c7(0x1a9));static [a66_0x92f5c7(0x1ac)]=null;[a66_0x92f5c7(0x19f)]=createClassLogger(a66_0x92f5c7(0x1d3));static[a66_0x92f5c7(0x19c)](_0x34a718){const _0x2144bc=a66_0x92f5c7,_0x4bd4fd={};_0x4bd4fd[_0x2144bc(0x1a5)]=_0x2144bc(0x1ee),_0x4bd4fd[_0x2144bc(0x1cf)]=_0x2144bc(0x1a9);const _0x5a9b92=_0x4bd4fd,_0x142879=_0x5a9b92[_0x2144bc(0x1a5)][_0x2144bc(0x199)]('|');let _0x2e4f4e=0x0;while(!![]){switch(_0x142879[_0x2e4f4e++]){case'0':this['testFramework']=_0x34a718;continue;case'1':const _0x4060be={};_0x4060be[_0x2144bc(0x1c9)]=!![],fs[_0x2144bc(0x189)](this['dirPath'],_0x4060be);continue;case'2':const _0x5e47c3={};_0x5e47c3[_0x2144bc(0x1c9)]=!![],fs[_0x2144bc(0x189)](this[_0x2144bc(0x1ce)],_0x5e47c3);continue;case'3':this[_0x2144bc(0x182)]();continue;case'4':logger[_0x2144bc(0x174)](_0x2144bc(0x1c1)+this[_0x2144bc(0x1db)]);continue;case'5':this[_0x2144bc(0x1db)]=TestInfo[_0x2144bc(0x177)]();continue;case'6':this[_0x2144bc(0x1ce)]=path[_0x2144bc(0x19a)](this[_0x2144bc(0x1db)],_0x5a9b92[_0x2144bc(0x1cf)]);continue;}break;}}static[a66_0x92f5c7(0x177)](){const _0x3d19b1=a66_0x92f5c7,_0x3b666c={};_0x3b666c[_0x3d19b1(0x1a7)]=function(_0xef39fb,_0x1cfe84){return _0xef39fb+_0x1cfe84;},_0x3b666c[_0x3d19b1(0x172)]=_0x3d19b1(0x1bb);const _0x11a196=_0x3b666c;return _0x11a196[_0x3d19b1(0x1a7)](_0x11a196[_0x3d19b1(0x1a7)](TEMP_STORE_DIR_NAME,'-'),process[_0x3d19b1(0x1b5)][_0x3d19b1(0x1f2)]||_0x11a196['PuCNt']);}static[a66_0x92f5c7(0x184)](){const _0x34f0b9=a66_0x92f5c7,_0x5040d1={};_0x5040d1[_0x34f0b9(0x181)]=function(_0x2de8f6,_0x5c098a){return _0x2de8f6+_0x5c098a;},_0x5040d1['AmCXx']=_0x34f0b9(0x1bb);const _0x2bfeea=_0x5040d1;return path[_0x34f0b9(0x19a)](_0x2bfeea[_0x34f0b9(0x181)](_0x2bfeea[_0x34f0b9(0x181)](TEMP_STORE_DIR_NAME,'-'),process[_0x34f0b9(0x1b5)][_0x34f0b9(0x1f2)]||_0x2bfeea[_0x34f0b9(0x1ba)]));}static[a66_0x92f5c7(0x1df)](){const _0x239abe=a66_0x92f5c7,_0x1c6587={};_0x1c6587[_0x239abe(0x1d7)]=_0x239abe(0x1a9);const _0x2c4ff4=_0x1c6587;return path[_0x239abe(0x19a)](this[_0x239abe(0x184)](),_0x2c4ff4[_0x239abe(0x1d7)]);}static['getFilePath'](_0x319ae3){const _0x282f52=a66_0x92f5c7,_0x564a43={};_0x564a43[_0x282f52(0x1b9)]=function(_0x2b4503,_0x5ed215){return _0x2b4503+_0x5ed215;},_0x564a43['YBBDM']=_0x282f52(0x1bf);const _0x3dd8e0=_0x564a43;return path[_0x282f52(0x19a)](this[_0x282f52(0x1db)],_0x3dd8e0[_0x282f52(0x1b9)](_0x319ae3,_0x3dd8e0[_0x282f52(0x1ad)]));}static[a66_0x92f5c7(0x1e0)](_0x3b58e3){const _0x135425=a66_0x92f5c7,_0x83d3a2={};_0x83d3a2[_0x135425(0x1f5)]=function(_0x599775,_0x55f6ab){return _0x599775+_0x55f6ab;},_0x83d3a2['ptrwi']=function(_0x4a66c7,_0x59c2b1){return _0x4a66c7+_0x59c2b1;};const _0x21c98c=_0x83d3a2;return _0x21c98c[_0x135425(0x1f5)](_0x21c98c[_0x135425(0x1f5)](_0x21c98c[_0x135425(0x1b7)](_0x21c98c[_0x135425(0x1f5)](this[_0x135425(0x1bc)](_0x3b58e3),'-'),this['getTestIdFromTestInfo'](_0x3b58e3)),'-'),_0x3b58e3['retry']);}static[a66_0x92f5c7(0x1bc)](_0x4b2752){const _0x10ffc0=a66_0x92f5c7,_0x2025d6={'mOUdj':function(_0x11cab3,_0x2d00f2,_0x351f9e){return _0x11cab3(_0x2d00f2,_0x351f9e);},'VkuDZ':_0x10ffc0(0x1f0),'mjZtY':_0x10ffc0(0x19b),'dPGfn':function(_0x181eeb,_0x147db5,_0xea1261){return _0x181eeb(_0x147db5,_0xea1261);},'FYORJ':_0x10ffc0(0x1f6),'qbdpf':_0x10ffc0(0x1ec)};return _0x2025d6[_0x10ffc0(0x1e1)](nestedKeyValue,_0x4b2752,[_0x2025d6[_0x10ffc0(0x1d9)],_0x2025d6['mjZtY']])||_0x2025d6[_0x10ffc0(0x180)](nestedKeyValue,_0x4b2752,[_0x2025d6['FYORJ'],_0x2025d6[_0x10ffc0(0x18d)]]);}static[a66_0x92f5c7(0x1c3)](_0x4bbc48){const _0x554b7d=a66_0x92f5c7,_0x236f69={'dRufK':function(_0x48c034,_0x570ea8,_0x3ccd07){return _0x48c034(_0x570ea8,_0x3ccd07);},'GYEQr':'_test'};return _0x236f69['dRufK'](nestedKeyValue,_0x4bbc48,[_0x236f69[_0x554b7d(0x179)],'id'])||_0x4bbc48[_0x554b7d(0x1f1)];}static[a66_0x92f5c7(0x1d4)](_0x6e0a57,_0x547dad){const _0x101c37=a66_0x92f5c7,_0x5c2123={};_0x5c2123[_0x101c37(0x1fa)]=function(_0x1e45eb,_0x39abdf){return _0x1e45eb+_0x39abdf;};const _0x53ee83=_0x5c2123;return _0x53ee83[_0x101c37(0x1fa)](_0x53ee83[_0x101c37(0x1fa)](this[_0x101c37(0x1c3)](_0x6e0a57),'-'),_0x547dad);}static['getTestUUID'](_0x5bcd6a){const _0xd81f4c=a66_0x92f5c7,_0x1dd83d={'DRAae':function(_0x1f0f2b,_0x2e0275){return _0x1f0f2b===_0x2e0275;},'VJbDR':_0xd81f4c(0x1e8),'bEuiW':function(_0x2cee00){return _0x2cee00();}};try{if(this['tests'][_0x5bcd6a]&&_0x1dd83d[_0xd81f4c(0x1a3)](typeof this[_0xd81f4c(0x1c4)][_0x5bcd6a][_0xd81f4c(0x1e5)],_0x1dd83d['VJbDR']))return this[_0xd81f4c(0x1c4)][_0x5bcd6a][_0xd81f4c(0x1e5)];const _0x54dab5=this[_0xd81f4c(0x191)](_0x5bcd6a),_0x244b5e=path[_0xd81f4c(0x1d5)](_0x54dab5);if(fs[_0xd81f4c(0x1e3)](_0x244b5e)){const _0x458e78=JSON[_0xd81f4c(0x17f)](fs[_0xd81f4c(0x1a0)](_0x54dab5)[_0xd81f4c(0x1b2)]());return this['tests'][_0x5bcd6a]=_0x458e78,this[_0xd81f4c(0x1c4)][_0x5bcd6a][_0xd81f4c(0x1e5)];}this[_0xd81f4c(0x1c4)][_0x5bcd6a]={'uuid':_0x1dd83d['bEuiW'](uuidv4)};try{fs['writeFileSync'](_0x54dab5,JSON[_0xd81f4c(0x1ed)](this['tests'][_0x5bcd6a]));}catch(_0xd499ca){logger[_0xd81f4c(0x1be)](_0xd81f4c(0x1b3)+_0x5bcd6a+':\x20'+_0xd499ca['message']);}return this['tests'][_0x5bcd6a]['uuid'];}catch(_0x42426d){return logger[_0xd81f4c(0x1be)](_0xd81f4c(0x19d)+_0x5bcd6a+':\x20'+_0x42426d[_0xd81f4c(0x1de)]),null;}}static['getAccessibilityPlatformValidation'](_0x1caa82){const _0x565be8=a66_0x92f5c7,_0x52105f=path[_0x565be8(0x19a)](this['dirPath'],_0x1caa82+_0x565be8(0x1c0));if(fs[_0x565be8(0x1e3)](_0x52105f))return fs[_0x565be8(0x1a0)](_0x52105f)[_0x565be8(0x1b2)]();}static[a66_0x92f5c7(0x1ca)](_0xe9485d,_0x541b5f){const _0x12344e=a66_0x92f5c7,_0x3ef0e8=path[_0x12344e(0x19a)](this[_0x12344e(0x1db)],_0x541b5f+_0x12344e(0x1c0));fs['writeFileSync'](_0x3ef0e8,_0xe9485d['toString']());}static[a66_0x92f5c7(0x182)](){const _0x4c3e3e=a66_0x92f5c7,_0x1fef43={};_0x1fef43[_0x4c3e3e(0x1c9)]=!![],_0x1fef43[_0x4c3e3e(0x1d0)]=!![],fs['rmSync'](this[_0x4c3e3e(0x1db)],_0x1fef43);}static[a66_0x92f5c7(0x1a1)](_0x1641e9){const _0x9525e1=a66_0x92f5c7,_0x30db4a=this[_0x9525e1(0x191)](_0x1641e9);if(fs[_0x9525e1(0x1e3)](_0x30db4a))try{const _0x2b4b37=JSON[_0x9525e1(0x17f)](fs['readFileSync'](_0x30db4a)['toString']());return this[_0x9525e1(0x1c4)][_0x1641e9]=_0x2b4b37,_0x2b4b37;}catch(_0x5da2ec){return logger[_0x9525e1(0x18f)](_0x9525e1(0x17d)+_0x30db4a+':\x20'+util[_0x9525e1(0x171)](_0x5da2ec)+_0x9525e1(0x1a2)),{};}return{};}static[a66_0x92f5c7(0x188)](_0x37c74f,_0x657df2,_0xf67bca=![]){const _0x16b077=a66_0x92f5c7,_0x3fc0d0={'NVpPJ':function(_0x2aa425){return _0x2aa425();}};logger[_0x16b077(0x18f)]('[setTestDetails]\x20processId:\x20'+process[_0x16b077(0x195)]+_0x16b077(0x178)+_0x37c74f+_0x16b077(0x1e9)+JSON[_0x16b077(0x1ed)](_0x657df2));const _0x510b30=this[_0x16b077(0x191)](_0x37c74f);if(fs['existsSync'](_0x510b30))try{const _0x9e030b=lockfile['lockSync'](_0x510b30),_0x3d54ba=JSON[_0x16b077(0x17f)](fs[_0x16b077(0x1a0)](_0x510b30)[_0x16b077(0x1b2)]());if(_0xf67bca)this[_0x16b077(0x1c4)][_0x37c74f]=helper[_0x16b077(0x1c8)](_0x3d54ba,_0x657df2);else{const _0x3c58f6={..._0x3d54ba,..._0x657df2};this['tests'][_0x37c74f]=_0x3c58f6;}fs[_0x16b077(0x18a)](_0x510b30,JSON[_0x16b077(0x1ed)](this[_0x16b077(0x1c4)][_0x37c74f])),_0x3fc0d0[_0x16b077(0x19e)](_0x9e030b);}catch(_0x17cd9d){logger[_0x16b077(0x18f)](_0x16b077(0x17d)+_0x510b30+':\x20'+util[_0x16b077(0x171)](_0x17cd9d)+_0x16b077(0x187));}}static[a66_0x92f5c7(0x1da)](_0x50d25b,_0x1beb17){const _0x2315d1=a66_0x92f5c7,_0x57fbd3={'mSXkD':function(_0x498456,_0x4b5291){return _0x498456!==_0x4b5291;},'tEzAD':_0x2315d1(0x1ea),'mYqnW':function(_0x4e28cd){return _0x4e28cd();}};logger[_0x2315d1(0x18f)]('storeLogObjects:\x20processId:\x20'+process[_0x2315d1(0x195)]+_0x2315d1(0x198)+_0x50d25b+'}');const _0x195b59=this[_0x2315d1(0x191)](_0x50d25b);try{let _0x2dc741={};if(fs['existsSync'](_0x195b59)){const _0x4af7b1=lockfile[_0x2315d1(0x1ae)](_0x195b59);_0x2dc741=JSON['parse'](fs[_0x2315d1(0x1a0)](_0x195b59)['toString']()),(!_0x2dc741[_0x2315d1(0x1e7)]||_0x57fbd3[_0x2315d1(0x1e6)](typeof _0x2dc741[_0x2315d1(0x1e7)],_0x57fbd3[_0x2315d1(0x1c7)]))&&(_0x2dc741['logObjects']={}),(!_0x2dc741[_0x2315d1(0x1e7)][_0x50d25b]||!Array[_0x2315d1(0x185)](_0x2dc741[_0x2315d1(0x1e7)][_0x50d25b]))&&(_0x2dc741['logObjects'][_0x50d25b]=[]),_0x2dc741[_0x2315d1(0x1e7)][_0x50d25b][_0x2315d1(0x17b)](_0x1beb17),this[_0x2315d1(0x1c4)][_0x50d25b]=_0x2dc741,fs['writeFileSync'](_0x195b59,JSON['stringify'](this['tests'][_0x50d25b])),_0x57fbd3['mYqnW'](_0x4af7b1);}else{const _0x3ffdf1={};_0x3ffdf1[_0x2315d1(0x1e5)]=_0x50d25b,_0x3ffdf1[_0x2315d1(0x1e7)]={},_0x3ffdf1[_0x2315d1(0x1e7)][_0x50d25b]=[_0x1beb17],_0x2dc741=_0x3ffdf1,this[_0x2315d1(0x1c4)][_0x50d25b]=_0x2dc741,fs[_0x2315d1(0x18a)](_0x195b59,JSON[_0x2315d1(0x1ed)](this['tests'][_0x50d25b]));}}catch(_0x2345bf){logger[_0x2315d1(0x18f)](_0x2315d1(0x17d)+_0x195b59+':\x20'+util['format'](_0x2345bf)+'.\x20Unable\x20to\x20add\x20console\x20log.');}}static[a66_0x92f5c7(0x1eb)](_0x53ae91){const _0x3b527f=a66_0x92f5c7,_0x1bf594={'HWPVz':function(_0x5842ca,_0x1d5a1c){return _0x5842ca!==_0x1d5a1c;},'SMYoa':_0x3b527f(0x1ea),'wUiFZ':function(_0x2bfd50){return _0x2bfd50();},'EkauQ':function(_0x3fc7ee,_0x39c42c){return _0x3fc7ee===_0x39c42c;},'eyWnt':function(_0x5c86da){return _0x5c86da();}};logger[_0x3b527f(0x18f)](_0x3b527f(0x1f4)+process[_0x3b527f(0x195)]+_0x3b527f(0x173)+_0x53ae91);const _0x5960d8=this[_0x3b527f(0x191)](_0x53ae91);try{if(!fs[_0x3b527f(0x1e3)](_0x5960d8))return logger[_0x3b527f(0x18f)](_0x3b527f(0x192)+_0x53ae91),[];const _0x2cacb5=lockfile['lockSync'](_0x5960d8),_0x123a08=JSON[_0x3b527f(0x17f)](fs[_0x3b527f(0x1a0)](_0x5960d8)['toString']());if(!_0x123a08[_0x3b527f(0x1e7)]||_0x1bf594[_0x3b527f(0x1c6)](typeof _0x123a08[_0x3b527f(0x1e7)],_0x1bf594[_0x3b527f(0x1b4)]))return logger[_0x3b527f(0x18f)](_0x3b527f(0x17e)+_0x53ae91),_0x1bf594[_0x3b527f(0x16f)](_0x2cacb5),[];if(!_0x123a08[_0x3b527f(0x1e7)][_0x53ae91]||!Array[_0x3b527f(0x185)](_0x123a08[_0x3b527f(0x1e7)][_0x53ae91])||_0x1bf594[_0x3b527f(0x18c)](_0x123a08[_0x3b527f(0x1e7)][_0x53ae91]['length'],0x0))return logger[_0x3b527f(0x18f)](_0x3b527f(0x1d2)+_0x53ae91),_0x1bf594[_0x3b527f(0x16f)](_0x2cacb5),[];const _0x45b8b7=[..._0x123a08[_0x3b527f(0x1e7)][_0x53ae91]];return logger[_0x3b527f(0x18f)]('readLogObjects:\x20Retrieved\x20'+_0x45b8b7[_0x3b527f(0x16e)]+_0x3b527f(0x175)+_0x53ae91),_0x123a08[_0x3b527f(0x1e7)][_0x53ae91]=[],this[_0x3b527f(0x1c4)][_0x53ae91]=_0x123a08,fs[_0x3b527f(0x18a)](_0x5960d8,JSON[_0x3b527f(0x1ed)](this[_0x3b527f(0x1c4)][_0x53ae91])),_0x1bf594[_0x3b527f(0x1e4)](_0x2cacb5),_0x45b8b7;}catch(_0x30c2ee){return logger[_0x3b527f(0x18f)](_0x3b527f(0x17d)+_0x5960d8+':\x20'+util[_0x3b527f(0x171)](_0x30c2ee)+_0x3b527f(0x186)),[];}}static[a66_0x92f5c7(0x1cb)](_0x140c0c){const _0x2df117=a66_0x92f5c7,_0x4785e5={};_0x4785e5[_0x2df117(0x1a6)]='Error\x20handling\x20trace\x20file\x20paths:\x20%O';const _0x31e1e1=_0x4785e5;try{const _0x67fdf3=process[_0x2df117(0x195)],_0x3a1b37=path[_0x2df117(0x19a)](TestInfo[_0x2df117(0x1df)](),_0x67fdf3+_0x2df117(0x1af));let _0x258192=[];fs['existsSync'](_0x3a1b37)&&(_0x258192=JSON['parse'](fs[_0x2df117(0x1a0)](_0x3a1b37)['toString']()));if(!_0x258192[_0x2df117(0x1a4)](_0x37f476=>_0x37f476[_0x2df117(0x1f8)]===_0x140c0c[_0x2df117(0x1f8)])){_0x258192[_0x2df117(0x17b)](_0x140c0c);const _0x41514e=path[_0x2df117(0x1d8)](_0x3a1b37);if(!fs[_0x2df117(0x1e3)](_0x41514e)){const _0x387549={};_0x387549['recursive']=!![],fs[_0x2df117(0x189)](_0x41514e,_0x387549);}fs['writeFileSync'](_0x3a1b37,JSON[_0x2df117(0x1ed)](_0x258192));}}catch(_0x500821){logger[_0x2df117(0x1be)](util[_0x2df117(0x171)](_0x31e1e1['ZuPLm'],_0x500821));}}static[a66_0x92f5c7(0x1ab)](){const _0x4b50a1=a66_0x92f5c7,_0x43801c={};_0x43801c[_0x4b50a1(0x1b0)]=_0x4b50a1(0x1af),_0x43801c[_0x4b50a1(0x18b)]='Error\x20reading\x20trace\x20file\x20paths:\x20%O';const _0x44c0be=_0x43801c,_0x3bb86b=[];try{const _0x41f555=TestInfo[_0x4b50a1(0x1df)]();if(!fs['existsSync'](_0x41f555))return _0x3bb86b;const _0x250944=fs[_0x4b50a1(0x176)](_0x41f555);_0x250944[_0x4b50a1(0x196)](_0x3e1507=>{const _0x18129f=_0x4b50a1;if(_0x3e1507['endsWith'](_0x44c0be[_0x18129f(0x1b0)])){const _0x4212fd=JSON[_0x18129f(0x17f)](fs[_0x18129f(0x1a0)](path[_0x18129f(0x19a)](_0x41f555,_0x3e1507))[_0x18129f(0x1b2)]());_0x3bb86b[_0x18129f(0x17b)](..._0x4212fd);}});}catch(_0x6da006){logger['error'](util[_0x4b50a1(0x171)](_0x44c0be['NKexw'],_0x6da006));}const _0x2e4241={};return _0x3bb86b[_0x4b50a1(0x196)](_0x3970cc=>{const _0x5cce0a=_0x4b50a1;_0x2e4241[_0x3970cc[_0x5cce0a(0x1f8)]]=_0x3970cc;}),Object[_0x4b50a1(0x1dd)](_0x2e4241);}static['appendToTracePaths'](_0x402cc2,_0x25bc7d){const _0x2c7e4f=a66_0x92f5c7,_0x23ced3={};_0x23ced3[_0x2c7e4f(0x18e)]=_0x2c7e4f(0x17a),_0x23ced3['iAwpi']=_0x2c7e4f(0x1fb),_0x23ced3['dtwqd']=_0x2c7e4f(0x1f3);const _0x2ce1c4=_0x23ced3;try{const _0x4ca26d=path['join'](helper[_0x2c7e4f(0x17c)](),_0x2ce1c4[_0x2c7e4f(0x18e)]);if(!fs[_0x2c7e4f(0x1e3)](_0x4ca26d)){const _0x4c8e74={};_0x4c8e74[_0x2c7e4f(0x1c9)]=!![],fs[_0x2c7e4f(0x189)](_0x4ca26d,_0x4c8e74);}fs[_0x2c7e4f(0x193)](path[_0x2c7e4f(0x19a)](_0x4ca26d,'trace_'+_0x25bc7d+_0x2c7e4f(0x1c5)),_0x402cc2+'\x0a',_0x2ce1c4[_0x2c7e4f(0x1cd)]);}catch(_0x5b28a5){logger[_0x2c7e4f(0x1be)](util[_0x2c7e4f(0x171)](_0x2ce1c4[_0x2c7e4f(0x197)],_0x5b28a5));}}}module[a66_0x92f5c7(0x1cc)]=TestInfo;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a67_0x39ef0c=a67_0x5cd2;(function(_0x597dbd,_0x4446b5){const _0xc7eea8=a67_0x5cd2,_0x226f94=_0x597dbd();while(!![]){try{const _0x248bdb=parseInt(_0xc7eea8(0x1bc))/0x1*(-parseInt(_0xc7eea8(0x1ee))/0x2)+parseInt(_0xc7eea8(0x26d))/0x3+parseInt(_0xc7eea8(0x1cf))/0x4+-parseInt(_0xc7eea8(0x1ba))/0x5+-parseInt(_0xc7eea8(0x1c5))/0x6*(-parseInt(_0xc7eea8(0x195))/0x7)+-parseInt(_0xc7eea8(0x1aa))/0x8+parseInt(_0xc7eea8(0x18f))/0x9*(parseInt(_0xc7eea8(0x24f))/0xa);if(_0x248bdb===_0x4446b5)break;else _0x226f94['push'](_0x226f94['shift']());}catch(_0x1d3036){_0x226f94['push'](_0x226f94['shift']());}}}(a67_0x52b7,0x42588));function a67_0x52b7(){const _0x5b8822=['test','./grpcClient.js','setCliArgs','syncAccessibilityConfig:\x20Updated\x20browserstackConfig.accessibility\x20from\x20CLI\x20response:\x20','./modules/loadTestModule.js','syncAccessibilityConfig:\x20CLI\x20config\x20not\x20available,\x20skipping\x20sync','isTrue','873wrMDKV','CUCUMBER','resolve','getBrowserstackConfig','../../helpers/helper.js','dGOTd','938826FymvAc','end','getChannel','stop:\x20process\x20exit\x20timeout,\x20forcing\x20kill','sdk','aMtev','getAutomationFramework','getInstance','HluzO','stack','Error\x20in\x20setupCliPath:\x20','includes','QLpJo','isClosed','Accessibility\x20success=','name','./modules/playwrightDriverModule.js','Disabling\x20CLI.','trim','setupTestFramework','SWNBY','2110192rSGivq','pzKtP','stderr','accessibilityOptions','getAutomateBuildlink','BrowserstackCLI','BROWSERSTACK_CLI_ENABLED','getSuccess','IkzPA','stringify','stop','isCLIEnabled','errorTraceId','stop:\x20stopBinSession\x20build_link=','./framework/cucumberTestFramework.js','RTpXb','2222295JeWmGA','SDK_CLI_ON_STOP','23757nEJOVq','stdout','bootstrap:\x20failed\x20to\x20bootstrap=','start','spawning\x20command=\x27','clearAttachments','UgRpl','xTpUp','pid','12yQpLLl','../../helpers/performance/performance-tester.js','shutdown','CLI\x20params\x20loaded:\x20','CLI\x20stderr:\x20','buildHashedId','Error\x20Code:\x20','xkWhe','browserstackCliConfig','CLI\x20process\x20exited\x20with\x20code\x20','1167228iXvgqs','Error\x20Trace\x20ID:\x20','./modules/observabilityModule.js','debug','exitCode','./framework/playwrightAutomationFramework.js','./framework/jestTestFramework.js','code','XjXph','arMnS','syncAccessibilityConfig','cliArgs','testFramework','getObservability','isLTSSession','./uploadAttachmentsManager.js','getAccessibility','error','getCLIParamsForDevEnv','mmMom','cliParams','Error\x20in\x20start:\x20','SiMbL','getTestFrameworkDetail','process','configureModules','Setting\x20up\x20CLI\x20binary\x20path...','errorsList','close','isMainConnected','stop:\x20channel\x20closed','4JzMUni','EBqhI','SDK_CLI_ON_BOOTSTRAP','unConfigureModules','setLTSSessionId','BdhAt','KJwxF','PJxlo','Agsjj','info','client','startBinSession','SDK_CLI_START','stop:\x20error\x20in\x20stop\x20session\x20exception=','failed\x20to\x20start\x20CLI,\x20no\x20PID\x20found','CLI\x20binary\x20path\x20resolved\x20to:\x20','AJBPY','./modules/testhubModule.js','key','HashedID','./modules/puppeteerDriverModule.js','connected','Failed\x20to\x20start\x20CLI\x20process:\x20','stop:\x20error\x20in\x20closing\x20channel:\x20%s','ohBsP','testhubConfig','SDK_CLI_BIN_PATH','stopBinSession','setupCliPath','logger','syncAccessibilityConfig:\x20Updated\x20browserstackConfig.accessibilityOptions\x20from\x20CLI\x20response','RRicU','xItqG','exports','length','YswrP','Starting\x20as\x20child\x20process\x20with\x20session\x20ID:\x20','util','sHfGE','bootstrap','Accessibility\x20initialization\x20failed\x20with\x20','dNaYD','wiIws','getAccessibilityModule','setBrowserstackConfig','MODULE_NAME','qBtfB','data','kill','startMain:\x20Starting\x20main\x20process','BROWSERSTACK_TEST_FRAMEWORK_DETAIL','stop:\x20CLI\x20stop\x20triggered','configure','MjLFt','MQSaW','wbyFb','ready','ecnZh','getConfig','\x20errors:','startChild:\x20client\x20and\x20channel\x20already\x20exist,\x20stopping\x20here','zSEwI','cZMoE','getBinSessionId','getTesthub','btUvr','\x20hashed_id=','stop:\x20CLI\x20is\x20not\x20running,\x20skipping\x20stop','loadModules','JTRQz','O11yHashedID','getAutomationFrameworkDetail','BuildLink','loading\x20Modules.','buildLogger','syncAccessibilityConfig:\x20error=','initialized','ohdiv','./cliUtils.js','isChildConnected','TlLbd','loadModules:\x20binSessionId=','isBootstrapped','VbMCX','KEY_CUSTOM_TAGS','env','./TestInfo.js','Error\x20reading\x20accessibility\x20success\x20value:\x20','KBnpn','getTestDetails','function','Unconfiguring\x20modules','../utils/constants.js','_modulesLoaded','isDevelopmentEnv','KXQLk','jHpXp','18790noFavO','getHashedId','connect','startChild','toString','stop:\x20shutting\x20down\x20CLI','../../helpers/classLogger.js','isArray','FxzBb','BROWSERSTACK_CLI_BIN_SESSION_ID','split','getCliBinPath','nhYgE','isCliEnabled','binSessionId','CLIUtils.setupCliPath\x20returned\x20null','oFSlT','SDK_CONNECT_BIN_SESSION','format','browserstackConfigPath','setConfig','config','IcmVU','PUPPETEER','getBrowserstackCliConfig','exit','forEach','automationFramework','stop:\x20CLI\x20process\x20exited','./framework/puppeteerAutomationFramework.js','855579BgFRRa','message','tpQDH','toObject','GelVh','BROWSERSTACK_TURBOSCALE','browserstackConfig','init','VUzEQ','turboScale','TJNxo','./framework/constants/testFrameworkConstants.js','toLowerCase','wbrMT','isRunning','loadCliParams','version','setupAutomationFramework','accessibility','modules'];a67_0x52b7=function(){return _0x5b8822;};return a67_0x52b7();}const {spawn}=require('child_process'),GrpcClient=require(a67_0x39ef0c(0x189)),util=require(a67_0x39ef0c(0x213)),CLIUtils=require(a67_0x39ef0c(0x23c)),PlaywrightAutomationFramework=require(a67_0x39ef0c(0x1d4)),PuppeteerAutomationFramework=require(a67_0x39ef0c(0x26c)),PlaywrightTestFramework=require('./framework/playwrightTestFramework.js'),CucumberTestFramework=require(a67_0x39ef0c(0x1b8)),JestTestFramework=require(a67_0x39ef0c(0x1d5)),{createClassLogger}=require(a67_0x39ef0c(0x255)),PerformanceTester=require(a67_0x39ef0c(0x1c6)),{EVENTS:PerformanceEvents}=require('../../helpers/performance/constants'),AccessibilityModule=require('./modules/accessibilityModule.js'),{CLI_SUPPORTED_FRAMEWORKS,FRAMEWORKS}=require(a67_0x39ef0c(0x24a)),helper=require(a67_0x39ef0c(0x193)),TestFrameworkConstants=require(a67_0x39ef0c(0x278)),buildLogger=require('../../helpers/logger.js')[a67_0x39ef0c(0x238)],LoadTestModule=require(a67_0x39ef0c(0x18c)),TestInfo=require(a67_0x39ef0c(0x244));class BrowserstackCLI{static #instance=null;static [a67_0x39ef0c(0x236)]=null;static ['HashedID']=null;static [a67_0x39ef0c(0x234)]=null;[a67_0x39ef0c(0x1e7)]=null;[a67_0x39ef0c(0x1ec)]=![];[a67_0x39ef0c(0x23d)]=![];[a67_0x39ef0c(0x24b)]=![];[a67_0x39ef0c(0x25d)]=null;[a67_0x39ef0c(0x187)]={};[a67_0x39ef0c(0x1db)]=null;[a67_0x39ef0c(0x26a)]=null;[a67_0x39ef0c(0x20b)]=createClassLogger(a67_0x39ef0c(0x1af));constructor(){const _0x502eb5=a67_0x39ef0c;this[_0x502eb5(0x23a)]=![],this['config']={},this[_0x502eb5(0x1da)]={},this['browserstackConfig']={};}static['getInstance'](){return!BrowserstackCLI.#instance&&(BrowserstackCLI.#instance=new BrowserstackCLI()),BrowserstackCLI.#instance;}async[a67_0x39ef0c(0x215)](){const _0x12386f=a67_0x39ef0c,_0x123ad4={};_0x123ad4[_0x12386f(0x217)]=_0x12386f(0x1a6);const _0x1f07d8=_0x123ad4;if(helper['isFalse'](process[_0x12386f(0x243)][_0x12386f(0x1b0)])){this[_0x12386f(0x20b)][_0x12386f(0x1f7)](_0x1f07d8[_0x12386f(0x217)]);return;}PerformanceTester[_0x12386f(0x1bf)](PerformanceEvents[_0x12386f(0x1f0)]);try{const _0x2adda9=process[_0x12386f(0x243)][_0x12386f(0x258)]||null;this[_0x12386f(0x185)](),this[_0x12386f(0x1a8)]();if(_0x2adda9){await this['startChild'](_0x2adda9),PerformanceTester[_0x12386f(0x196)](PerformanceEvents[_0x12386f(0x1f0)]);return;}await this['startMain']();}catch(_0x577af2){this[_0x12386f(0x20b)][_0x12386f(0x1e0)](_0x12386f(0x1be)+(_0x577af2[_0x12386f(0x19e)]||_0x577af2)),await this[_0x12386f(0x1b4)](),PerformanceTester[_0x12386f(0x196)](PerformanceEvents[_0x12386f(0x1f0)],![],util[_0x12386f(0x261)](_0x577af2));}}async['startMain'](){const _0x67fa85=a67_0x39ef0c,_0x27d423={};_0x27d423[_0x67fa85(0x233)]=_0x67fa85(0x21f),_0x27d423['KIJsk']='startMain:\x20main-process\x20started';const _0x2eea57=_0x27d423;this['logger']['info'](_0x2eea57[_0x67fa85(0x233)]),await this[_0x67fa85(0x1bf)](),this[_0x67fa85(0x20b)][_0x67fa85(0x1d2)](_0x2eea57['KIJsk']);const _0x2003a9=await GrpcClient['getInstance']()[_0x67fa85(0x1f9)]();this[_0x67fa85(0x1ec)]=!![],this['loadModules'](_0x2003a9);}[a67_0x39ef0c(0x232)](_0xa0cc08){const _0x2313af=a67_0x39ef0c,_0x2e046f={'qBtfB':function(_0x45ae10,_0x34a17f){return _0x45ae10(_0x34a17f);},'xTpUp':_0x2313af(0x1a5),'VbMCX':function(_0x4198ed,_0x17a0a0){return _0x4198ed(_0x17a0a0);},'zSEwI':_0x2313af(0x1ff),'ohdiv':function(_0x496f48,_0x41aaf7){return _0x496f48(_0x41aaf7);},'arMnS':_0x2313af(0x1d1),'xkWhe':'loadModules:\x20Loading\x20modules','GTOMz':_0x2313af(0x1dc),'PGLXK':_0x2313af(0x1df),'MQSaW':_0x2313af(0x1b1),'PJxlo':function(_0x5063d1,_0x1d55d5){return _0x5063d1||_0x1d55d5;},'LPPUu':function(_0x515cb2,_0x2ab3c0){return _0x515cb2===_0x2ab3c0;},'sHfGE':_0x2313af(0x248),'wbyFb':function(_0x569217,_0x41aa86){return _0x569217&&_0x41aa86;},'mmMom':function(_0xacc3f3,_0x663c69){return _0xacc3f3===_0x663c69;},'XjXph':function(_0x203443,_0x376db5){return _0x203443(_0x376db5);},'GACiz':_0x2313af(0x202)},_0x10b935=_0x2e046f[_0x2313af(0x21c)](require,_0x2e046f[_0x2313af(0x1c3)]),_0x1fd87a=_0x2e046f[_0x2313af(0x241)](require,_0x2e046f[_0x2313af(0x22b)]),_0x372194=_0x2e046f[_0x2313af(0x23b)](require,_0x2e046f[_0x2313af(0x1d8)]);this[_0x2313af(0x20b)][_0x2313af(0x1f7)](_0x2e046f[_0x2313af(0x1cc)]),this['binSessionId']=_0xa0cc08[_0x2313af(0x22d)](),this[_0x2313af(0x20b)][_0x2313af(0x1f7)](_0x2313af(0x23f)+this[_0x2313af(0x25d)]),this['setConfig'](_0xa0cc08),this[_0x2313af(0x1d9)]();!this[_0x2313af(0x23d)]&&this[_0x2313af(0x18a)](_0xa0cc08);const _0x27145f=_0x2e046f['GTOMz'],_0xecb08b=_0x2e046f['PGLXK'],_0x4aa564=_0x2e046f[_0x2313af(0x224)],_0x5d7e63=_0xa0cc08[_0x27145f]()&&_0xa0cc08[_0x27145f]()[_0x4aa564](),_0xae9a00=_0xa0cc08[_0xecb08b]()&&_0xa0cc08[_0xecb08b]()[_0x4aa564](),_0x4b9f30=process['env'][_0x2313af(0x220)]&&JSON['parse'](process[_0x2313af(0x243)][_0x2313af(0x220)]);_0x2e046f[_0x2313af(0x1f5)](_0x5d7e63,_0xae9a00)&&(this[_0x2313af(0x187)][_0x1fd87a[_0x2313af(0x21b)]]=new _0x1fd87a(_0xa0cc08[_0x2313af(0x22e)](),_0x4b9f30));_0x5d7e63&&(this[_0x2313af(0x187)][_0x372194[_0x2313af(0x21b)]]=new _0x372194(_0xa0cc08[_0x27145f]()));if(_0xae9a00)this[_0x2313af(0x187)][AccessibilityModule[_0x2313af(0x21b)]]=new AccessibilityModule(_0xa0cc08[_0xecb08b]());else try{const _0x1638e8=_0xa0cc08[_0xecb08b](),_0x463960=_0x1638e8&&_0x2e046f['LPPUu'](typeof _0x1638e8[_0x4aa564],_0x2e046f[_0x2313af(0x214)])?!!_0x1638e8[_0x4aa564]():![];this['logger'][_0x2313af(0x1f7)](_0x2313af(0x1a3)+_0x463960);if(_0x2e046f[_0x2313af(0x225)](!_0x463960,_0x1638e8)){const _0x2bf98e=_0x1638e8[_0x2313af(0x270)]?_0x1638e8['toObject']():_0x1638e8;_0x2bf98e[_0x2313af(0x1ea)]&&Array[_0x2313af(0x256)](_0x2bf98e[_0x2313af(0x1ea)])&&(this[_0x2313af(0x20b)][_0x2313af(0x1e0)](_0x2313af(0x216)+_0x2bf98e[_0x2313af(0x1ea)][_0x2313af(0x210)]+_0x2313af(0x229)),_0x2bf98e[_0x2313af(0x1ea)][_0x2313af(0x269)]((_0x48c2bd,_0x4b67ea)=>{const _0x4ac3b2=_0x2313af;this[_0x4ac3b2(0x20b)][_0x4ac3b2(0x1e0)]('Error:\x20['+_0x48c2bd[_0x4ac3b2(0x200)]+']\x20'+_0x48c2bd[_0x4ac3b2(0x26e)]);}),_0x2bf98e[_0x2313af(0x1b6)]&&this[_0x2313af(0x20b)]['error'](_0x2313af(0x1d0)+_0x2bf98e[_0x2313af(0x1b6)]),_0x2bf98e[_0x2313af(0x1d6)]&&this[_0x2313af(0x20b)][_0x2313af(0x1e0)](_0x2313af(0x1cb)+_0x2bf98e[_0x2313af(0x1d6)]));}}catch(_0x45911a){this[_0x2313af(0x20b)][_0x2313af(0x1e0)](_0x2313af(0x245)+_0x45911a);}const _0x17c91b=CLIUtils[_0x2313af(0x235)]();if(_0x2e046f[_0x2313af(0x1e2)](_0x17c91b[_0x2313af(0x1a4)][_0x2313af(0x279)](),FRAMEWORKS[_0x2313af(0x266)]['toLowerCase']())){const _0x488bb9=_0x2e046f[_0x2313af(0x1d7)](require,_0x2e046f['GACiz']);this[_0x2313af(0x187)][_0x488bb9['MODULE_NAME']]=new _0x488bb9(_0x4b9f30);}else this['modules'][_0x10b935['MODULE_NAME']]=new _0x10b935(_0x4b9f30);this['_modulesLoaded']=!![],this[_0x2313af(0x1e8)]();}[a67_0x39ef0c(0x219)](){const _0xb49c04=a67_0x39ef0c;return this['modules'][AccessibilityModule[_0xb49c04(0x21b)]];}async[a67_0x39ef0c(0x1e8)](){const _0x11fc2c=a67_0x39ef0c;for(const _0x4f6ebf in this[_0x11fc2c(0x187)]){const _0xd76b50=this[_0x11fc2c(0x187)][_0x4f6ebf];await _0xd76b50[_0x11fc2c(0x222)](this[_0x11fc2c(0x25d)],0x0,GrpcClient[_0x11fc2c(0x19c)]()[_0x11fc2c(0x1f8)],this['config']);}}async[a67_0x39ef0c(0x1bf)](){const _0x177299=a67_0x39ef0c,_0x5375e5={'HluzO':function(_0x5db345,_0x523827){return _0x5db345!==_0x523827;},'dGOTd':_0x177299(0x226),'cZMoE':function(_0x2259a7){return _0x2259a7();},'KBnpn':function(_0x2c2b2b,_0x4a3084){return _0x2c2b2b(_0x4a3084);},'tpQDH':function(_0x26d54e,_0x1c7931){return _0x26d54e(_0x1c7931);},'IcmVU':_0x177299(0x21d),'btUvr':_0x177299(0x1e0),'QLpJo':_0x177299(0x1eb),'pzKtP':'Failed\x20to\x20get\x20CLI\x20binary\x20path.\x20CLI\x20setup\x20failed.','TJNxo':_0x177299(0x199),'SWNBY':function(_0x12a812,_0xd9d93,_0x1477e2,_0x275266){return _0x12a812(_0xd9d93,_0x1477e2,_0x275266);},'tzgly':_0x177299(0x1fc)};PerformanceTester[_0x177299(0x1bf)](PerformanceEvents[_0x177299(0x1fa)]);if(CLIUtils[_0x177299(0x24c)]())return this[_0x177299(0x183)](CLIUtils[_0x177299(0x1e1)]()),PerformanceTester['end'](PerformanceEvents[_0x177299(0x1fa)]),Promise[_0x177299(0x191)]();if(this[_0x177299(0x1e7)]&&this[_0x177299(0x1e7)][_0x177299(0x203)])return PerformanceTester[_0x177299(0x196)](PerformanceEvents['SDK_CLI_START']),Promise[_0x177299(0x191)]();const _0x45df9e=await this[_0x177299(0x25a)]();if(!_0x45df9e)throw new Error(_0x5375e5[_0x177299(0x1ab)]);const _0x4b7446=[_0x45df9e,_0x5375e5[_0x177299(0x277)]];this[_0x177299(0x20b)][_0x177299(0x1f7)](_0x177299(0x1c0)+_0x4b7446+'\x27');const _0x298e56={};_0x298e56[_0x177299(0x243)]=process[_0x177299(0x243)],this[_0x177299(0x1e7)]=_0x5375e5[_0x177299(0x1a9)](spawn,_0x4b7446[0x0],_0x4b7446['slice'](0x1),_0x298e56);if(!this[_0x177299(0x1e7)][_0x177299(0x1c4)])throw new Error(_0x5375e5['tzgly']);return new Promise((_0x374887,_0x3c07c7)=>{const _0x11eb2d=_0x177299,_0x1b53b2={'WMkGl':function(_0x1970f1,_0x31b55b){const _0x398301=a67_0x5cd2;return _0x5375e5[_0x398301(0x246)](_0x1970f1,_0x31b55b);},'PCcZb':function(_0x4ffc38,_0x120693){const _0x4fea0a=a67_0x5cd2;return _0x5375e5[_0x4fea0a(0x19d)](_0x4ffc38,_0x120693);},'SrFAL':function(_0x4bac92,_0x11e8d2){const _0x5785af=a67_0x5cd2;return _0x5375e5[_0x5785af(0x26f)](_0x4bac92,_0x11e8d2);}},_0x35cff0={};this[_0x11eb2d(0x1e7)][_0x11eb2d(0x1bd)]['on'](_0x5375e5['IcmVU'],_0x29f687=>{const _0x357d53=_0x11eb2d,_0x3e8b74=_0x29f687['toString']()[_0x357d53(0x1a7)]()[_0x357d53(0x259)]('\x0a');for(const _0x2e2220 of _0x3e8b74){if(/^(id|listen|port)=.*$/[_0x357d53(0x188)](_0x2e2220)){const [_0x5ae39d,_0x50237b]=_0x2e2220[_0x357d53(0x259)]('=',0x2);_0x5375e5['HluzO'](_0x50237b,undefined)&&(_0x35cff0[_0x5ae39d]=_0x50237b);}if(_0x2e2220[_0x357d53(0x279)]()[_0x357d53(0x1a0)](_0x5375e5[_0x357d53(0x194)])){this[_0x357d53(0x183)](_0x35cff0),PerformanceTester['end'](PerformanceEvents[_0x357d53(0x1fa)]),_0x5375e5[_0x357d53(0x22c)](_0x374887);return;}}}),this[_0x11eb2d(0x1e7)][_0x11eb2d(0x1ac)]['on'](_0x5375e5[_0x11eb2d(0x265)],_0x4c6a5a=>{const _0x5bedf1=_0x11eb2d;this[_0x5bedf1(0x20b)]['error'](_0x5bedf1(0x1c9)+_0x4c6a5a[_0x5bedf1(0x253)]()['trim']());}),this[_0x11eb2d(0x1e7)]['on'](_0x5375e5[_0x11eb2d(0x22f)],_0x3883a5=>{const _0x22715f=_0x11eb2d;_0x35cff0[_0x22715f(0x1e0)]=_0x22715f(0x1e4)+_0x3883a5[_0x22715f(0x26e)],PerformanceTester[_0x22715f(0x196)](PerformanceEvents['SDK_CLI_START'],![],_0x3883a5),_0x1b53b2['WMkGl'](_0x3c07c7,new Error(_0x22715f(0x204)+_0x3883a5[_0x22715f(0x26e)]));}),this[_0x11eb2d(0x1e7)]['on'](_0x5375e5[_0x11eb2d(0x1a1)],_0x5e5883=>{const _0x316f73=_0x11eb2d;_0x1b53b2['PCcZb'](_0x5e5883,0x0)&&_0x1b53b2['SrFAL'](_0x3c07c7,new Error(_0x316f73(0x1ce)+_0x5e5883));});});}async[a67_0x39ef0c(0x1b4)](_0x2881e9=null){const _0x1e0bee=a67_0x39ef0c,_0x3414bb={'RTpXb':_0x1e0bee(0x26b),'GelVh':function(_0x3f0866){return _0x3f0866();},'ALOGO':_0x1e0bee(0x198),'rcjPo':'SIGKILL','FxzBb':function(_0x5b62df){return _0x5b62df();},'KXQLk':_0x1e0bee(0x268),'mqQbM':function(_0x3f410c,_0x898f1a,_0x394efb){return _0x3f410c(_0x898f1a,_0x394efb);},'KJwxF':_0x1e0bee(0x231),'Agsjj':_0x1e0bee(0x221),'IkzPA':function(_0x303913,_0x2ad621){return _0x303913(_0x2ad621);},'RRicU':_0x1e0bee(0x1de),'zKEoW':_0x1e0bee(0x1ed),'MjLFt':_0x1e0bee(0x205),'nhYgE':_0x1e0bee(0x254)};if(!this[_0x1e0bee(0x182)]()){this['logger'][_0x1e0bee(0x1f7)](_0x3414bb[_0x1e0bee(0x1f4)]);return;}PerformanceTester[_0x1e0bee(0x1bf)](PerformanceEvents[_0x1e0bee(0x1bb)]),this['logger']['info'](_0x3414bb[_0x1e0bee(0x1f6)]);try{if(this['isMainConnected']){const _0x5b719f=_0x3414bb[_0x1e0bee(0x1b2)](require,_0x3414bb[_0x1e0bee(0x20d)]),_0x3c3ee5=this[_0x1e0bee(0x187)]['TestHubModule']?.[_0x1e0bee(0x207)]?.[_0x1e0bee(0x270)]()?.[_0x1e0bee(0x1ca)],_0x4711d8=TestInfo[_0x1e0bee(0x247)](_0x3c3ee5),_0x54b9b7=_0x4711d8[TestFrameworkConstants[_0x1e0bee(0x242)]]||{},_0x3a43f5=await GrpcClient[_0x1e0bee(0x19c)]()[_0x1e0bee(0x209)](JSON[_0x1e0bee(0x1b3)](_0x54b9b7),_0x2881e9);_0x3a43f5&&_0x3a43f5[_0x1e0bee(0x1b1)]()&&_0x3a43f5[_0x1e0bee(0x1ae)]()&&(BrowserstackCLI['BuildLink']=_0x3a43f5['getAutomateBuildlink'](),BrowserstackCLI[_0x1e0bee(0x201)]=_0x3a43f5[_0x1e0bee(0x250)]()),await _0x5b719f[_0x1e0bee(0x1c1)](),TestInfo[_0x1e0bee(0x1c7)](),buildLogger[_0x1e0bee(0x1f7)](_0x1e0bee(0x1b7)+BrowserstackCLI['BuildLink']+_0x1e0bee(0x230)+BrowserstackCLI[_0x1e0bee(0x201)]+'\x20o11y_uuid='+BrowserstackCLI[_0x1e0bee(0x234)]);}await this[_0x1e0bee(0x1f1)]();const _0x10d6ea=GrpcClient['getInstance']()[_0x1e0bee(0x197)]();if(_0x10d6ea){try{_0x10d6ea[_0x1e0bee(0x1eb)](),this[_0x1e0bee(0x20b)][_0x1e0bee(0x1f7)](_0x3414bb['zKEoW']);}catch(_0x2c3372){this[_0x1e0bee(0x20b)]['error'](util[_0x1e0bee(0x261)](_0x3414bb[_0x1e0bee(0x223)],_0x2c3372));}await new Promise(_0x5daaac=>setTimeout(_0x5daaac,0x1388));}this[_0x1e0bee(0x1e7)]&&this[_0x1e0bee(0x1e7)][_0x1e0bee(0x1c4)]&&(this['logger'][_0x1e0bee(0x1f7)](_0x3414bb[_0x1e0bee(0x25b)]),this['process'][_0x1e0bee(0x21e)](),await new Promise(_0xa7f8ec=>{const _0x3d1d36=_0x1e0bee,_0x189d60={'jvcHU':_0x3414bb['ALOGO'],'aMtev':_0x3414bb['rcjPo'],'muvRc':function(_0x224719){const _0x4d7f2c=a67_0x5cd2;return _0x3414bb[_0x4d7f2c(0x257)](_0x224719);}};let _0x24d496=![];this[_0x3d1d36(0x1e7)]['on'](_0x3414bb[_0x3d1d36(0x24d)],()=>{const _0x550e13=_0x3d1d36;this[_0x550e13(0x20b)]['info'](_0x3414bb[_0x550e13(0x1b9)]),_0x24d496=!![],PerformanceTester['end'](PerformanceEvents[_0x550e13(0x1bb)]),_0x3414bb[_0x550e13(0x271)](_0xa7f8ec);}),_0x3414bb['mqQbM'](setTimeout,()=>{const _0x3b0937=_0x3d1d36;!_0x24d496&&(this[_0x3b0937(0x20b)]['warn'](_0x189d60['jvcHU']),this[_0x3b0937(0x1e7)]['kill'](_0x189d60[_0x3b0937(0x19a)]),PerformanceTester['end'](PerformanceEvents[_0x3b0937(0x1bb)]),_0x189d60['muvRc'](_0xa7f8ec));},0xbb8);}));}catch(_0x4cea1c){PerformanceTester[_0x1e0bee(0x196)](PerformanceEvents[_0x1e0bee(0x1bb)],![],util[_0x1e0bee(0x261)](_0x4cea1c)),this[_0x1e0bee(0x20b)]['error'](_0x1e0bee(0x1fb)+(_0x4cea1c['stack']||_0x4cea1c));}_0x2881e9?this[_0x1e0bee(0x1e7)][_0x1e0bee(0x1d3)]=0x1:this[_0x1e0bee(0x1e7)][_0x1e0bee(0x1d3)]=0x0,this[_0x1e0bee(0x23d)]=![],this[_0x1e0bee(0x1ec)]=![],process[_0x1e0bee(0x243)]['BROWSERSTACK_CLI_ENV']=null;}async[a67_0x39ef0c(0x1f1)](){const _0x237455=a67_0x39ef0c,_0x1be9d5={};_0x1be9d5[_0x237455(0x25f)]=_0x237455(0x249);const _0x54ff1e=_0x1be9d5;this[_0x237455(0x20b)][_0x237455(0x1f7)](_0x54ff1e['oFSlT']);}[a67_0x39ef0c(0x183)](_0x3aec1c){const _0xe5e917=a67_0x39ef0c;this['logger']['info'](_0xe5e917(0x1c8)+JSON[_0xe5e917(0x1b3)](_0x3aec1c)),this[_0xe5e917(0x1e3)]=_0x3aec1c,GrpcClient[_0xe5e917(0x19c)]()[_0xe5e917(0x274)](_0x3aec1c);}async[a67_0x39ef0c(0x252)](_0x5f5310){const _0x450fb0=a67_0x39ef0c,_0x102109={};_0x102109[_0x450fb0(0x218)]=_0x450fb0(0x22a);const _0x152b4c=_0x102109;PerformanceTester[_0x450fb0(0x1bf)](PerformanceEvents[_0x450fb0(0x260)]);try{this['logger'][_0x450fb0(0x1f7)](_0x450fb0(0x212)+_0x5f5310);const _0x22b35b=GrpcClient[_0x450fb0(0x19c)]();if(_0x22b35b&&_0x22b35b['getClient']()&&_0x22b35b[_0x450fb0(0x197)]()){this[_0x450fb0(0x20b)][_0x450fb0(0x1f7)](_0x152b4c['wiIws']);return;}GrpcClient[_0x450fb0(0x19c)]()[_0x450fb0(0x251)]();const _0x237162=await GrpcClient[_0x450fb0(0x19c)]()['connectBinSession']();this['isChildConnected']=!![],this[_0x450fb0(0x232)](_0x237162),PerformanceTester[_0x450fb0(0x196)](PerformanceEvents['SDK_CONNECT_BIN_SESSION']);}catch(_0x13a6ae){PerformanceTester['end'](PerformanceEvents[_0x450fb0(0x260)],![],util[_0x450fb0(0x261)](_0x13a6ae)),this[_0x450fb0(0x20b)]['error']('Failed\x20to\x20start\x20as\x20child\x20process:\x20'+util[_0x450fb0(0x261)](_0x13a6ae));}}static[a67_0x39ef0c(0x1b5)](){const _0x4737d0=a67_0x39ef0c;try{return BrowserstackCLI[_0x4737d0(0x19c)]()['isRunning']();}catch(_0x47e5d2){return![];}}[a67_0x39ef0c(0x182)](){const _0x29b7fb=a67_0x39ef0c,_0x164dfe={};_0x164dfe[_0x29b7fb(0x275)]=function(_0x2282d5,_0x3abd38){return _0x2282d5!==_0x3abd38;},_0x164dfe[_0x29b7fb(0x206)]=function(_0x5f2220,_0x279a25){return _0x5f2220===_0x279a25;},_0x164dfe[_0x29b7fb(0x24e)]=function(_0x4054eb,_0x20156b){return _0x4054eb!==_0x20156b;};const _0x1174a0=_0x164dfe;return CLIUtils[_0x29b7fb(0x24c)]()||this[_0x29b7fb(0x1ec)]&&_0x1174a0['VUzEQ'](this[_0x29b7fb(0x1e7)],null)&&_0x1174a0[_0x29b7fb(0x206)](this['process'][_0x29b7fb(0x1d3)],null)&&_0x1174a0[_0x29b7fb(0x275)](GrpcClient['getInstance']()['getClient'](),null)&&!GrpcClient[_0x29b7fb(0x19c)]()['getChannel']()[_0x29b7fb(0x1a2)]||this[_0x29b7fb(0x23d)]&&_0x1174a0['jHpXp'](GrpcClient[_0x29b7fb(0x19c)]()[_0x29b7fb(0x197)](),null)&&!GrpcClient['getInstance']()['getChannel']()[_0x29b7fb(0x1a2)];}[a67_0x39ef0c(0x240)](){const _0x4643fd=a67_0x39ef0c;return this[_0x4643fd(0x182)]()&&this['_modulesLoaded'];}[a67_0x39ef0c(0x192)](){const _0x17b95a=a67_0x39ef0c;return this[_0x17b95a(0x273)];}[a67_0x39ef0c(0x21a)](_0x2286a9,_0x3e06d9,_0x13fa97=null){const _0xbe7654=a67_0x39ef0c,_0x2b0983={};_0x2b0983[_0xbe7654(0x1fe)]=function(_0x40f7b2,_0x5ea338){return _0x40f7b2||_0x5ea338;};const _0x5e3db0=_0x2b0983;this[_0xbe7654(0x273)]=_0x5e3db0[_0xbe7654(0x1fe)](_0x2286a9,{}),this[_0xbe7654(0x262)]=_0x3e06d9,this[_0xbe7654(0x1cd)]=_0x13fa97,process['env'][_0xbe7654(0x272)]=this['browserstackConfig']?.[_0xbe7654(0x276)]||![];const _0x99d40e=CLIUtils[_0xbe7654(0x1e6)](),_0x243c30=CLIUtils[_0xbe7654(0x235)]();LoadTestModule[_0xbe7654(0x1dd)](this[_0xbe7654(0x273)])&&LoadTestModule[_0xbe7654(0x1f2)](this[_0xbe7654(0x273)]||{}),helper[_0xbe7654(0x18e)](process['env'][_0xbe7654(0x272)])||!(CLI_SUPPORTED_FRAMEWORKS[_0xbe7654(0x1a0)](_0x99d40e[_0xbe7654(0x1a4)][_0xbe7654(0x279)]())&&CLI_SUPPORTED_FRAMEWORKS[_0xbe7654(0x1a0)](_0x243c30['name'][_0xbe7654(0x279)]()))?process[_0xbe7654(0x243)][_0xbe7654(0x1b0)]=![]:process[_0xbe7654(0x243)][_0xbe7654(0x1b0)]=!![];}async['getCliBinPath'](){const _0x3a6ffb=a67_0x39ef0c,_0x28dd91={};_0x28dd91[_0x3a6ffb(0x27a)]=_0x3a6ffb(0x1e9),_0x28dd91[_0x3a6ffb(0x211)]=_0x3a6ffb(0x25e);const _0x505ea9=_0x28dd91;if(!this['SDK_CLI_BIN_PATH'])try{this[_0x3a6ffb(0x20b)][_0x3a6ffb(0x1d2)](_0x505ea9['wbrMT']),this[_0x3a6ffb(0x208)]=await CLIUtils[_0x3a6ffb(0x20a)](this[_0x3a6ffb(0x273)]),!this['SDK_CLI_BIN_PATH']?this['logger'][_0x3a6ffb(0x1e0)](_0x505ea9[_0x3a6ffb(0x211)]):this[_0x3a6ffb(0x20b)][_0x3a6ffb(0x1d2)](_0x3a6ffb(0x1fd)+this[_0x3a6ffb(0x208)]);}catch(_0x1ef94f){this[_0x3a6ffb(0x20b)][_0x3a6ffb(0x1e0)](_0x3a6ffb(0x19f)+_0x1ef94f[_0x3a6ffb(0x26e)]),this['SDK_CLI_BIN_PATH']=null;}return this['SDK_CLI_BIN_PATH'];}[a67_0x39ef0c(0x25c)](){const _0x561476=a67_0x39ef0c;return helper[_0x561476(0x18e)](process[_0x561476(0x243)]['BROWSERSTACK_CLI_ENABLED']);}[a67_0x39ef0c(0x228)](){const _0x3cfb08=a67_0x39ef0c;return this[_0x3cfb08(0x264)];}[a67_0x39ef0c(0x263)](_0x365400){const _0x4f215c=a67_0x39ef0c,_0x1984dc={};_0x1984dc[_0x4f215c(0x20e)]=_0x4f215c(0x237);const _0x5126bc=_0x1984dc;try{this[_0x4f215c(0x264)]=JSON['parse'](_0x365400['getConfig']()),this[_0x4f215c(0x20b)][_0x4f215c(0x1f7)](_0x5126bc[_0x4f215c(0x20e)]);}catch(_0x4d58cc){this['logger']['error']('setConfig:\x20error='+util[_0x4f215c(0x261)](_0x4d58cc));}}['syncAccessibilityConfig'](){const _0x10c0f1=a67_0x39ef0c,_0x23c6e5={};_0x23c6e5['ecnZh']='syncAccessibilityConfig:\x20browserstackConfig\x20not\x20set,\x20skipping\x20sync',_0x23c6e5['UgRpl']=_0x10c0f1(0x18d),_0x23c6e5['BdhAt']=_0x10c0f1(0x20c);const _0x41f179=_0x23c6e5;try{if(!this[_0x10c0f1(0x273)]){this['logger'][_0x10c0f1(0x1d2)](_0x41f179[_0x10c0f1(0x227)]);return;}const _0x382ba=this[_0x10c0f1(0x228)]();if(!_0x382ba){this[_0x10c0f1(0x20b)][_0x10c0f1(0x1d2)](_0x41f179[_0x10c0f1(0x1c2)]);return;}!helper['isUndefined'](_0x382ba[_0x10c0f1(0x186)])&&(this[_0x10c0f1(0x273)][_0x10c0f1(0x186)]=_0x382ba[_0x10c0f1(0x186)],this['logger']['debug'](_0x10c0f1(0x18b)+_0x382ba[_0x10c0f1(0x186)])),!helper['isUndefined'](_0x382ba[_0x10c0f1(0x1ad)])&&(this[_0x10c0f1(0x273)]['accessibilityOptions']=_0x382ba[_0x10c0f1(0x1ad)],this[_0x10c0f1(0x20b)][_0x10c0f1(0x1d2)](_0x41f179[_0x10c0f1(0x1f3)]));}catch(_0x2b2e73){this[_0x10c0f1(0x20b)][_0x10c0f1(0x1e0)](_0x10c0f1(0x239)+util[_0x10c0f1(0x261)](_0x2b2e73));}}[a67_0x39ef0c(0x18a)](_0x4e0aba){const _0x5b0b34=a67_0x39ef0c;try{this[_0x5b0b34(0x1da)]=_0x4e0aba['getCliArgs']()['split'](','),this[_0x5b0b34(0x20b)][_0x5b0b34(0x1f7)]('setCliArgs:\x20cliArgs='+JSON[_0x5b0b34(0x1b3)](this['cliArgs']));}catch(_0x588b71){this[_0x5b0b34(0x20b)][_0x5b0b34(0x1e0)]('setCliArgs:\x20error='+util['format'](_0x588b71));}}['getCliArgs'](){const _0x489960=a67_0x39ef0c;return this[_0x489960(0x1da)];}[a67_0x39ef0c(0x1a8)](){const _0x34041a=a67_0x39ef0c,_0x40a9a5={};_0x40a9a5[_0x34041a(0x1ef)]=function(_0x511cc7,_0x37f411){return _0x511cc7===_0x37f411;},_0x40a9a5[_0x34041a(0x23e)]=function(_0x464073,_0x131c8c){return _0x464073===_0x131c8c;};const _0x56e469=_0x40a9a5,_0x1fee87=CLIUtils[_0x34041a(0x1e6)]();if(_0x56e469[_0x34041a(0x1ef)](_0x1fee87[_0x34041a(0x1a4)][_0x34041a(0x279)](),FRAMEWORKS['PLAYWRIGHT'][_0x34041a(0x279)]()))this['testFramework']=new PlaywrightTestFramework([_0x1fee87['name']],_0x1fee87['version']);else{if(_0x56e469[_0x34041a(0x1ef)](_0x1fee87[_0x34041a(0x1a4)][_0x34041a(0x279)](),FRAMEWORKS[_0x34041a(0x190)][_0x34041a(0x279)]()))this[_0x34041a(0x1db)]=new CucumberTestFramework([_0x1fee87['name']],_0x1fee87[_0x34041a(0x184)]);else _0x56e469['TlLbd'](_0x1fee87['name'][_0x34041a(0x279)](),FRAMEWORKS['JEST'][_0x34041a(0x279)]())&&(this[_0x34041a(0x1db)]=new JestTestFramework([_0x1fee87[_0x34041a(0x1a4)]],_0x1fee87[_0x34041a(0x184)]));}}[a67_0x39ef0c(0x185)](){const _0x1f749a=a67_0x39ef0c,_0x250cdc={};_0x250cdc[_0x1f749a(0x1e5)]=function(_0xefda53,_0x305a85){return _0xefda53===_0x305a85;};const _0x2a457d=_0x250cdc,_0x1df41c=CLIUtils['getAutomationFrameworkDetail']();if(_0x2a457d[_0x1f749a(0x1e5)](_0x1df41c[_0x1f749a(0x1a4)][_0x1f749a(0x279)](),FRAMEWORKS['PLAYWRIGHT'][_0x1f749a(0x279)]()))this[_0x1f749a(0x26a)]=new PlaywrightAutomationFramework(_0x1df41c[_0x1f749a(0x1a4)],_0x1df41c[_0x1f749a(0x184)]);else _0x2a457d[_0x1f749a(0x1e5)](_0x1df41c[_0x1f749a(0x1a4)][_0x1f749a(0x279)](),FRAMEWORKS[_0x1f749a(0x266)][_0x1f749a(0x279)]())&&(this[_0x1f749a(0x26a)]=new PuppeteerAutomationFramework(_0x1df41c[_0x1f749a(0x1a4)],_0x1df41c[_0x1f749a(0x184)]));}['getTestFramework'](){const _0xfe279a=a67_0x39ef0c;return this[_0xfe279a(0x1db)];}[a67_0x39ef0c(0x19b)](){const _0x3a5e2e=a67_0x39ef0c;return this[_0x3a5e2e(0x26a)];}[a67_0x39ef0c(0x267)](){const _0x13015f=a67_0x39ef0c;return this[_0x13015f(0x1cd)];}['getBrowserstackConfigPath'](){const _0xd5bc87=a67_0x39ef0c;return this[_0xd5bc87(0x262)];}}function a67_0x5cd2(_0x2a47f3,_0x226954){const _0x52b78e=a67_0x52b7();return a67_0x5cd2=function(_0x5cd29f,_0x15be3b){_0x5cd29f=_0x5cd29f-0x182;let _0x14b1be=_0x52b78e[_0x5cd29f];return _0x14b1be;},a67_0x5cd2(_0x2a47f3,_0x226954);}module[a67_0x39ef0c(0x20f)]=BrowserstackCLI;
|
|
1
|
+
function a67_0x5c0d(_0x1ca9c1,_0x1eb26c){const _0x3068a3=a67_0x3068();return a67_0x5c0d=function(_0x5c0dd1,_0x43b7a9){_0x5c0dd1=_0x5c0dd1-0x13e;let _0x4e902d=_0x3068a3[_0x5c0dd1];return _0x4e902d;},a67_0x5c0d(_0x1ca9c1,_0x1eb26c);}const a67_0x101017=a67_0x5c0d;(function(_0x4f78d6,_0x49365f){const _0x230e9d=a67_0x5c0d,_0x43263b=_0x4f78d6();while(!![]){try{const _0x387735=-parseInt(_0x230e9d(0x193))/0x1*(-parseInt(_0x230e9d(0x243))/0x2)+parseInt(_0x230e9d(0x21f))/0x3+parseInt(_0x230e9d(0x141))/0x4+parseInt(_0x230e9d(0x167))/0x5*(-parseInt(_0x230e9d(0x1a1))/0x6)+parseInt(_0x230e9d(0x1d5))/0x7*(-parseInt(_0x230e9d(0x1c6))/0x8)+parseInt(_0x230e9d(0x163))/0x9*(parseInt(_0x230e9d(0x14c))/0xa)+parseInt(_0x230e9d(0x19e))/0xb;if(_0x387735===_0x49365f)break;else _0x43263b['push'](_0x43263b['shift']());}catch(_0x6921bc){_0x43263b['push'](_0x43263b['shift']());}}}(a67_0x3068,0x2cc9e));const {spawn}=require('child_process'),GrpcClient=require('./grpcClient.js'),util=require('util'),CLIUtils=require(a67_0x101017(0x1c3)),PlaywrightAutomationFramework=require(a67_0x101017(0x1de)),PuppeteerAutomationFramework=require(a67_0x101017(0x1bf)),PlaywrightTestFramework=require(a67_0x101017(0x245)),CucumberTestFramework=require(a67_0x101017(0x145)),JestTestFramework=require('./framework/jestTestFramework.js'),{createClassLogger}=require(a67_0x101017(0x22a)),PerformanceTester=require(a67_0x101017(0x211)),{EVENTS:PerformanceEvents}=require('../../helpers/performance/constants'),AccessibilityModule=require(a67_0x101017(0x208)),{CLI_SUPPORTED_FRAMEWORKS,FRAMEWORKS,BINARY_BUSY_ERROR_CODES,MAX_SPAWN_RETRIES,SPAWN_RETRY_DELAY_MS}=require(a67_0x101017(0x225)),helper=require(a67_0x101017(0x1e5)),TestFrameworkConstants=require(a67_0x101017(0x13e)),buildLogger=require(a67_0x101017(0x19c))[a67_0x101017(0x19b)],LoadTestModule=require(a67_0x101017(0x1e9)),TestInfo=require('./TestInfo.js');function a67_0x3068(){const _0x3962a2=['./framework/cucumberTestFramework.js','spawn\x20succeeded\x20on\x20attempt\x20','0|6|5|1|4|3|2|7','SDK_CLI_ON_BOOTSTRAP','client','failed\x20to\x20start\x20CLI,\x20no\x20PID\x20found','getBrowserstackConfig','65270XcDtLt','removeAllListeners',',\x20retrying\x20in\x20','klTDv','errorTraceId','PLAYWRIGHT','jUikn','ptoLI','format','rVVli','dXcKN','code','getClient','isUndefined','eoitO','warn','HashedID','getObservability','ykYSw','\x20o11y_uuid=','clearAttachments','_modulesLoaded','turboScale','36sSLCIC','version','exitCode','FssWU','145furGAW','ms...','KEY_CUSTOM_TAGS','ROfXF','getCLIParamsForDevEnv','DXJIi','keys','app','stop:\x20CLI\x20stop\x20triggered','getAutomateBuildlink','isBootstrapped','setCliArgs','stack','info','isCliEnabled','cjQsK','spawn\x20','MZrmp','key','clhUi','setCliArgs:\x20error=','TestHubModule','startBinSession','CLI\x20stderr:\x20','BkusW','toObject','startMain:\x20Starting\x20main\x20process','Glcti','CUCUMBER','getBinSessionId','message','loadModules','startChild:\x20client\x20and\x20channel\x20already\x20exist,\x20stopping\x20here','getAutomationFrameworkDetail','./uploadAttachmentsManager.js','exports','Accessibility\x20success=','LQLxE','fnOwk','startMain','hubUrl','Error\x20reading\x20accessibility\x20success\x20value:\x20','ZJKaH','init','5IJjPDB','cliParams','resolve','hXhBc','bjsPI','SDK_CONNECT_BIN_SESSION','cliArgs','process','buildLogger','../../helpers/logger.js','MBNHb','2584131EBQVRW','logger','QQjGW','16416dWUmvB','O11yHashedID','includes','automationFramework','Unconfiguring\x20modules','XQShJ','SDK_CLI_START','BROWSERSTACK_TEST_FRAMEWORK_DETAIL','end','name','./modules/testhubModule.js','Accessibility\x20initialization\x20failed\x20with\x20','trim','A11yEnabled','debug','syncAccessibilityConfig:\x20error=','loadModules:\x20Loading\x20modules','CLI\x20process\x20exited\x20with\x20code\x20','accessibilityOptions','toString','\x20hashed_id=','ntDtQ','getConfig','QgfHQ','getAccessibilityModule','kvFUd','syncAccessibilityConfig:\x20CLI\x20config\x20not\x20available,\x20skipping\x20sync','FQuyE','close','isRunning','./framework/puppeteerAutomationFramework.js','SDK_CLI_BIN_PATH','configureModules','YwuNz','./cliUtils.js','setConfig:\x20error=','rjveP','8dCKGha','Setting\x20up\x20CLI\x20binary\x20path...','loadModules:\x20binSessionId=','toLowerCase','browserstackConfig','split','stop:\x20channel\x20closed','./modules/observabilityModule.js','isClosed','getCliArgs','bootstrap','xlYCx','wlRJI','connect','startChild','949879hYEHrd','unConfigureModules','CLI\x20binary\x20path\x20resolved\x20to:\x20','testFramework','startMain:\x20main-process\x20started','Starting\x20as\x20child\x20process\x20with\x20session\x20ID:\x20','uuSOQ','connected','test','./framework/playwrightAutomationFramework.js','isTrue','oBPoe','errorsList','getTestDetails','hXlai','loadCliParams','../../helpers/helper.js','MODULE_NAME','stdout','CyVtN','./modules/loadTestModule.js','stop:\x20error\x20in\x20closing\x20channel:\x20%s','\x20after\x20ready\x20—\x20gRPC\x20calls\x20will\x20fail','binSessionId','stringify','BROWSERSTACK_CLI_ENABLED','\x20errors:','error','EEbzl','mvSLH','PspIB','tkXOp','owTiO','isArray','CHaEg','config','start','BROWSERSTACK_TURBOSCALE','getInstance','eraEd','getSuccess','ZoUFw','McMzS','CLI\x20params\x20loaded:\x20','uJtBL','hmqfU','uyItJ','modules','ready','isMainConnected','getHashedId','./modules/accessibilityModule.js','setConfig:\x20Empty\x20or\x20missing\x20config\x20string\x20from\x20response','Error\x20in\x20start\x20(code=','loading\x20Modules.','stop:\x20CLI\x20is\x20not\x20running,\x20skipping\x20stop','data','isChildConnected','spawning\x20command=\x27','):\x20','../../helpers/performance/performance-tester.js','length','\x20msg=','hikjq','ojLYB','kill','IrlGU','testhubConfig','accessibility','rBtKD','setConfig:\x20Using\x20browserstackConfig\x20after\x20parse\x20error','OzAuT','./modules/puppeteerDriverModule.js','exit','72297RyzDMo','tMtNi','_spawnAndAwaitReady','buildHashedId','Error\x20Trace\x20ID:\x20','shutdown','../utils/constants.js','Failed\x20to\x20get\x20CLI\x20binary\x20path.\x20CLI\x20setup\x20failed.','SDK_CLI_ON_STOP','uqjCM','dFNMg','../../helpers/classLogger.js','getChannel','stop','RewNk','env','syncAccessibilityConfig','getCliBinPath','browserstackConfigPath','JEST','BuildLink','stopBinSession','setCliArgs:\x20cliArgs=','mKOGB','sdk','isDevelopmentEnv','server','Failed\x20to\x20start\x20as\x20child\x20process:\x20','parse','bdFJq','BDacd','setConfig','NYotg','slice','isLTSSession','Error\x20Code:\x20','35198DlHgoA','wRFlK','./framework/playwrightTestFramework.js','./framework/constants/testFrameworkConstants.js','configure','stop:\x20process\x20exit\x20timeout,\x20forcing\x20kill','101488WnKlyT','aalkp','initialized','syncAccessibilityConfig:\x20Updated\x20browserstackConfig.accessibilityOptions\x20from\x20CLI\x20response'];a67_0x3068=function(){return _0x3962a2;};return a67_0x3068();}class BrowserstackCLI{static #instance=null;static [a67_0x101017(0x233)]=null;static [a67_0x101017(0x15c)]=null;static [a67_0x101017(0x1a2)]=null;static [a67_0x101017(0x1ae)]=![];[a67_0x101017(0x19a)]=null;[a67_0x101017(0x206)]=![];[a67_0x101017(0x20e)]=![];['_modulesLoaded']=![];['binSessionId']=null;[a67_0x101017(0x204)]={};[a67_0x101017(0x1d8)]=null;['automationFramework']=null;[a67_0x101017(0x19f)]=createClassLogger('BrowserstackCLI');constructor(){const _0x4b51c4=a67_0x101017;this[_0x4b51c4(0x143)]=![],this['config']={},this['cliArgs']={},this['browserstackConfig']={};}static['getInstance'](){return!BrowserstackCLI.#instance&&(BrowserstackCLI.#instance=new BrowserstackCLI()),BrowserstackCLI.#instance;}async[a67_0x101017(0x1d0)](){const _0x46db24=a67_0x101017,_0x5290bd={};_0x5290bd['vxOLY']='Disabling\x20CLI.';const _0x4a0203=_0x5290bd;if(helper['isFalse'](process['env']['BROWSERSTACK_CLI_ENABLED'])){this[_0x46db24(0x19f)][_0x46db24(0x174)](_0x4a0203['vxOLY']);return;}PerformanceTester[_0x46db24(0x1f9)](PerformanceEvents['SDK_CLI_ON_BOOTSTRAP']);try{const _0x19b619=process[_0x46db24(0x22e)]['BROWSERSTACK_CLI_BIN_SESSION_ID']||null;this['setupAutomationFramework'](),this['setupTestFramework']();if(_0x19b619){await this[_0x46db24(0x1d4)](_0x19b619),PerformanceTester['end'](PerformanceEvents['SDK_CLI_ON_BOOTSTRAP']);return;}await this[_0x46db24(0x18e)]();}catch(_0x14a587){this[_0x46db24(0x19f)][_0x46db24(0x1f0)]('bootstrap:\x20failed\x20to\x20bootstrap='+(_0x14a587[_0x46db24(0x173)]||_0x14a587)),await this['stop'](),PerformanceTester[_0x46db24(0x1a9)](PerformanceEvents[_0x46db24(0x148)],![],util[_0x46db24(0x154)](_0x14a587));}}async[a67_0x101017(0x18e)](){const _0x121298=a67_0x101017,_0x23177f={};_0x23177f[_0x121298(0x1e3)]=_0x121298(0x181),_0x23177f[_0x121298(0x1fe)]=_0x121298(0x1d9);const _0x1482ba=_0x23177f;this[_0x121298(0x19f)][_0x121298(0x174)](_0x1482ba[_0x121298(0x1e3)]),await this[_0x121298(0x1f9)](),this['logger'][_0x121298(0x1af)](_0x1482ba[_0x121298(0x1fe)]);const _0x1455ce=await GrpcClient[_0x121298(0x1fb)]()[_0x121298(0x17d)]();this[_0x121298(0x206)]=!![],this[_0x121298(0x186)](_0x1455ce);}[a67_0x101017(0x186)](_0x54d97b){const _0x474dc0=a67_0x101017,_0x1008d2={'CyVtN':function(_0x2c458f,_0x2d8e35){return _0x2c458f(_0x2d8e35);},'hIpLs':'./modules/playwrightDriverModule.js','BkusW':_0x474dc0(0x1ab),'TvSOA':function(_0x38bd57,_0x44016b){return _0x38bd57(_0x44016b);},'DZWqe':_0x474dc0(0x1cd),'JtUsJ':_0x474dc0(0x1b1),'dFNMg':_0x474dc0(0x15d),'pqgUY':'getAccessibility','WhGRK':_0x474dc0(0x1fd),'dWhCK':function(_0x186202,_0xb8a8a6){return _0x186202||_0xb8a8a6;},'FQuyE':function(_0x320338,_0x3d4dea){return _0x320338!==_0x3d4dea;},'kvFUd':function(_0x5184b0,_0x25c80a){return _0x5184b0===_0x25c80a;},'bjsPI':'function','VVtaV':function(_0x10d2a1,_0x3c1a64){return _0x10d2a1&&_0x3c1a64;},'ZJKaH':function(_0x2aa552,_0x4e62a2){return _0x2aa552===_0x4e62a2;},'FssWU':_0x474dc0(0x21d)},_0x2e206d=_0x1008d2[_0x474dc0(0x1e8)](require,_0x1008d2['hIpLs']),_0x5c40ce=_0x1008d2[_0x474dc0(0x1e8)](require,_0x1008d2[_0x474dc0(0x17f)]),_0x3c790d=_0x1008d2['TvSOA'](require,_0x1008d2['DZWqe']);this[_0x474dc0(0x19f)]['info'](_0x1008d2['JtUsJ']),this[_0x474dc0(0x1ec)]=_0x54d97b[_0x474dc0(0x184)](),this[_0x474dc0(0x19f)][_0x474dc0(0x174)](_0x474dc0(0x1c8)+this[_0x474dc0(0x1ec)]),this[_0x474dc0(0x23e)](_0x54d97b),this['syncAccessibilityConfig']();!this[_0x474dc0(0x20e)]&&this['setCliArgs'](_0x54d97b);const _0x588394=_0x1008d2[_0x474dc0(0x229)],_0x2249b3=_0x1008d2['pqgUY'],_0x23cbd0=_0x1008d2['WhGRK'],_0x479788=_0x54d97b[_0x588394]()&&_0x54d97b[_0x588394]()[_0x23cbd0](),_0x4b8df8=_0x54d97b[_0x2249b3]()&&_0x54d97b[_0x2249b3]()[_0x23cbd0](),_0x1fb17e=process[_0x474dc0(0x22e)][_0x474dc0(0x1a8)]&&JSON[_0x474dc0(0x23b)](process[_0x474dc0(0x22e)][_0x474dc0(0x1a8)]);_0x1008d2['dWhCK'](_0x479788,_0x4b8df8)&&(this[_0x474dc0(0x204)][_0x5c40ce[_0x474dc0(0x1e6)]]=new _0x5c40ce(_0x54d97b['getTesthub'](),_0x1fb17e));_0x479788&&(this[_0x474dc0(0x204)][_0x3c790d[_0x474dc0(0x1e6)]]=new _0x3c790d(_0x54d97b[_0x588394]()));if(_0x4b8df8){this[_0x474dc0(0x204)][AccessibilityModule[_0x474dc0(0x1e6)]]=new AccessibilityModule(_0x54d97b[_0x2249b3]());const _0x1e150f=this[_0x474dc0(0x1f8)]&&_0x1008d2[_0x474dc0(0x1bc)](this[_0x474dc0(0x1f8)][_0x474dc0(0x16e)],undefined)&&_0x1008d2[_0x474dc0(0x1bc)](this['config'][_0x474dc0(0x16e)],null);BrowserstackCLI[_0x474dc0(0x1ae)]=!_0x1e150f;}else try{const _0x1d3b47=_0x54d97b[_0x2249b3](),_0x13cb93=_0x1d3b47&&_0x1008d2[_0x474dc0(0x1ba)](typeof _0x1d3b47[_0x23cbd0],_0x1008d2[_0x474dc0(0x197)])?!!_0x1d3b47[_0x23cbd0]():![];this['logger'][_0x474dc0(0x174)](_0x474dc0(0x18b)+_0x13cb93);if(_0x1008d2['VVtaV'](!_0x13cb93,_0x1d3b47)){const _0x434d91=_0x1d3b47['toObject']?_0x1d3b47[_0x474dc0(0x180)]():_0x1d3b47;_0x434d91[_0x474dc0(0x1e1)]&&Array[_0x474dc0(0x1f6)](_0x434d91[_0x474dc0(0x1e1)])&&(this['logger'][_0x474dc0(0x1f0)](_0x474dc0(0x1ac)+_0x434d91[_0x474dc0(0x1e1)]['length']+_0x474dc0(0x1ef)),_0x434d91[_0x474dc0(0x1e1)]['forEach']((_0x511fac,_0x4d5333)=>{const _0x551f29=_0x474dc0;this[_0x551f29(0x19f)][_0x551f29(0x1f0)]('Error:\x20['+_0x511fac[_0x551f29(0x179)]+']\x20'+_0x511fac[_0x551f29(0x185)]);}),_0x434d91[_0x474dc0(0x150)]&&this[_0x474dc0(0x19f)][_0x474dc0(0x1f0)](_0x474dc0(0x223)+_0x434d91[_0x474dc0(0x150)]),_0x434d91['code']&&this[_0x474dc0(0x19f)]['error'](_0x474dc0(0x242)+_0x434d91[_0x474dc0(0x157)]));}}catch(_0x398094){this[_0x474dc0(0x19f)][_0x474dc0(0x1f0)](_0x474dc0(0x190)+_0x398094);}const _0x2307dc=CLIUtils[_0x474dc0(0x188)]();if(_0x1008d2[_0x474dc0(0x191)](_0x2307dc[_0x474dc0(0x1aa)][_0x474dc0(0x1c9)](),FRAMEWORKS['PUPPETEER'][_0x474dc0(0x1c9)]())){const _0x1ea16a=_0x1008d2[_0x474dc0(0x1e8)](require,_0x1008d2[_0x474dc0(0x166)]);this[_0x474dc0(0x204)][_0x1ea16a['MODULE_NAME']]=new _0x1ea16a(_0x1fb17e);}else this[_0x474dc0(0x204)][_0x2e206d[_0x474dc0(0x1e6)]]=new _0x2e206d(_0x1fb17e);this[_0x474dc0(0x161)]=!![],this[_0x474dc0(0x1c1)]();}[a67_0x101017(0x1b9)](){const _0x3de09c=a67_0x101017;return this[_0x3de09c(0x204)][AccessibilityModule[_0x3de09c(0x1e6)]];}async['configureModules'](){const _0x538d67=a67_0x101017;for(const _0x3d8b4b in this['modules']){const _0x1b9b35=this[_0x538d67(0x204)][_0x3d8b4b];await _0x1b9b35[_0x538d67(0x13f)](this[_0x538d67(0x1ec)],0x0,GrpcClient[_0x538d67(0x1fb)]()[_0x538d67(0x149)],this['config']);}}async['start'](){const _0x51f797=a67_0x101017,_0x33827f={};_0x33827f[_0x51f797(0x220)]=_0x51f797(0x226),_0x33827f[_0x51f797(0x21a)]=_0x51f797(0x237),_0x33827f['LQLxE']=function(_0x279d2a,_0xc06099){return _0x279d2a<=_0xc06099;},_0x33827f[_0x51f797(0x1db)]=function(_0xff3e9f,_0x5dd69b){return _0xff3e9f>_0x5dd69b;},_0x33827f[_0x51f797(0x156)]=function(_0x352d71,_0x5f0a34){return _0x352d71<_0x5f0a34;},_0x33827f[_0x51f797(0x236)]='SIGKILL';const _0x5d09ca=_0x33827f;PerformanceTester['start'](PerformanceEvents[_0x51f797(0x1a7)]);if(CLIUtils['isDevelopmentEnv']())return this[_0x51f797(0x1e4)](CLIUtils[_0x51f797(0x16b)]()),PerformanceTester['end'](PerformanceEvents[_0x51f797(0x1a7)]),Promise[_0x51f797(0x195)]();if(this['process']&&this['process'][_0x51f797(0x1dc)])return PerformanceTester[_0x51f797(0x1a9)](PerformanceEvents[_0x51f797(0x1a7)]),Promise['resolve']();const _0x1f184a=await this[_0x51f797(0x230)]();if(!_0x1f184a)throw new Error(_0x5d09ca[_0x51f797(0x220)]);const _0x14a44f=[_0x1f184a,_0x5d09ca[_0x51f797(0x21a)]];this[_0x51f797(0x19f)][_0x51f797(0x174)](_0x51f797(0x20f)+_0x14a44f+'\x27');for(let _0x598127=0x1;_0x5d09ca[_0x51f797(0x18c)](_0x598127,MAX_SPAWN_RETRIES);_0x598127++){try{await this['_spawnAndAwaitReady'](_0x14a44f);_0x5d09ca['uuSOQ'](_0x598127,0x1)&&this[_0x51f797(0x19f)][_0x51f797(0x174)](_0x51f797(0x146)+_0x598127+'/'+MAX_SPAWN_RETRIES);break;}catch(_0x22c415){if(BINARY_BUSY_ERROR_CODES['includes'](_0x22c415[_0x51f797(0x157)])&&_0x5d09ca[_0x51f797(0x156)](_0x598127,MAX_SPAWN_RETRIES))this['logger'][_0x51f797(0x15b)](_0x51f797(0x177)+_0x22c415[_0x51f797(0x157)]+'\x20on\x20attempt\x20'+_0x598127+'/'+MAX_SPAWN_RETRIES+_0x51f797(0x14e)+SPAWN_RETRY_DELAY_MS+_0x51f797(0x168)),this[_0x51f797(0x19a)]&&(this['process']['removeAllListeners'](),!this['process']['killed']&&this[_0x51f797(0x19a)]['kill'](_0x5d09ca[_0x51f797(0x236)]),this[_0x51f797(0x19a)]=null),await new Promise(_0x52d8aa=>setTimeout(_0x52d8aa,SPAWN_RETRY_DELAY_MS));else throw _0x22c415;}}}[a67_0x101017(0x221)](_0x2a6058){const _0x4225a3=a67_0x101017,_0xb1fe50={'dHMnK':function(_0x1fd525,_0x13cacb){return _0x1fd525(_0x13cacb);},'mqOEA':function(_0x10fee2,_0x135476){return _0x10fee2!==_0x135476;},'CHaEg':function(_0x23a702,_0x4e36bc){return _0x23a702!==_0x4e36bc;},'VzouM':function(_0x3d31b4,_0x5e085a){return _0x3d31b4!==_0x5e085a;},'RewNk':_0x4225a3(0x205),'MZrmp':_0x4225a3(0x147),'MBNHb':_0x4225a3(0x1bd),'aalkp':function(_0x10bb3c){return _0x10bb3c();},'eoitO':_0x4225a3(0x1f0),'oLMcr':function(_0xb0f355,_0x4c25c6,_0x4bd584,_0xa90a78){return _0xb0f355(_0x4c25c6,_0x4bd584,_0xa90a78);},'QQjGW':function(_0x2913da,_0x21fe4f){return _0x2913da(_0x21fe4f);},'ojLYB':_0x4225a3(0x14a),'mvSLH':_0x4225a3(0x20d)};return new Promise((_0x205f71,_0xa016bd)=>{const _0x1092ae=_0x4225a3,_0x53abf6={'eraEd':function(_0x175e8a,_0x2de5c9){const _0x522a67=a67_0x5c0d;return _0xb1fe50[_0x522a67(0x1f7)](_0x175e8a,_0x2de5c9);},'jUikn':function(_0x20bbad,_0x1fe3af){return _0xb1fe50['VzouM'](_0x20bbad,_0x1fe3af);},'tkXOp':_0xb1fe50[_0x1092ae(0x22d)],'QgfHQ':_0xb1fe50[_0x1092ae(0x178)],'bdFJq':_0xb1fe50[_0x1092ae(0x19d)],'SKlkz':function(_0x4dd865){const _0x5cdff5=_0x1092ae;return _0xb1fe50[_0x5cdff5(0x142)](_0x4dd865);},'hikjq':_0xb1fe50['eoitO']},_0x49d592={};_0x49d592[_0x1092ae(0x22e)]=process['env'],this[_0x1092ae(0x19a)]=_0xb1fe50['oLMcr'](spawn,_0x2a6058[0x0],_0x2a6058[_0x1092ae(0x240)](0x1),_0x49d592);if(!this[_0x1092ae(0x19a)]||!this[_0x1092ae(0x19a)]['pid']){_0xb1fe50[_0x1092ae(0x1a0)](_0xa016bd,new Error(_0xb1fe50[_0x1092ae(0x215)]));return;}const _0x14f813={};this[_0x1092ae(0x19a)][_0x1092ae(0x1e7)]['on'](_0xb1fe50[_0x1092ae(0x1f2)],_0x3c473d=>{const _0x2c30c3=_0x1092ae,_0x21f5e9={'opQRz':function(_0x34fe4b,_0x267a02){const _0x4e18fa=a67_0x5c0d;return _0x53abf6[_0x4e18fa(0x1fc)](_0x34fe4b,_0x267a02);}},_0x362aac=_0x3c473d[_0x2c30c3(0x1b4)]()['trim']()[_0x2c30c3(0x1cb)]('\x0a');for(const _0x1febde of _0x362aac){if(/^(id|listen|port)=.*$/[_0x2c30c3(0x1dd)](_0x1febde)){const [_0x442599,_0xfa5128]=_0x1febde['split']('=',0x2);_0x53abf6[_0x2c30c3(0x152)](_0xfa5128,undefined)&&(_0x14f813[_0x442599]=_0xfa5128);}if(_0x1febde[_0x2c30c3(0x1c9)]()[_0x2c30c3(0x1a3)](_0x53abf6[_0x2c30c3(0x1f4)])){const _0x4f3eee=_0x53abf6[_0x2c30c3(0x1b8)]['split']('|');let _0x3eb2c7=0x0;while(!![]){switch(_0x4f3eee[_0x3eb2c7++]){case'0':this[_0x2c30c3(0x1e4)](_0x14f813);continue;case'1':this[_0x2c30c3(0x19a)]['removeAllListeners'](_0x53abf6[_0x2c30c3(0x23c)]);continue;case'2':_0x53abf6['SKlkz'](_0x205f71);continue;case'3':this[_0x2c30c3(0x19a)]['on'](_0x53abf6['bdFJq'],_0x59198f=>{const _0x403336=_0x2c30c3;_0x21f5e9['opQRz'](_0x59198f,0x0)&&this[_0x403336(0x19f)][_0x403336(0x1f0)](_0x403336(0x1b2)+_0x59198f+_0x403336(0x1eb));});continue;case'4':this[_0x2c30c3(0x19a)]['on'](_0x53abf6['hikjq'],_0x355df5=>{const _0xf89d21=_0x2c30c3;this[_0xf89d21(0x19f)][_0xf89d21(0x1f0)]('CLI\x20runtime\x20error\x20after\x20ready:\x20code='+_0x355df5[_0xf89d21(0x157)]+_0xf89d21(0x213)+_0x355df5[_0xf89d21(0x185)]);});continue;case'5':this[_0x2c30c3(0x19a)][_0x2c30c3(0x14d)](_0x53abf6[_0x2c30c3(0x214)]);continue;case'6':PerformanceTester[_0x2c30c3(0x1a9)](PerformanceEvents[_0x2c30c3(0x1a7)]);continue;case'7':return;}break;}}}}),this['process']['stderr']['on'](_0xb1fe50['mvSLH'],_0x15f699=>{const _0x59ec15=_0x1092ae;this[_0x59ec15(0x19f)][_0x59ec15(0x1f0)](_0x59ec15(0x17e)+_0x15f699[_0x59ec15(0x1b4)]()[_0x59ec15(0x1ad)]());}),this[_0x1092ae(0x19a)]['on'](_0xb1fe50[_0x1092ae(0x15a)],_0x3d7e5e=>{const _0x286ccf=_0x1092ae;_0x14f813[_0x286ccf(0x1f0)]=_0x286ccf(0x20a)+_0x3d7e5e[_0x286ccf(0x157)]+_0x286ccf(0x210)+_0x3d7e5e['message'],PerformanceTester[_0x286ccf(0x1a9)](PerformanceEvents[_0x286ccf(0x1a7)],![],_0x3d7e5e),_0xb1fe50['dHMnK'](_0xa016bd,_0x3d7e5e);}),this[_0x1092ae(0x19a)]['on'](_0xb1fe50[_0x1092ae(0x19d)],_0x256091=>{const _0x1b5c02=_0x1092ae;_0xb1fe50['mqOEA'](_0x256091,0x0)&&_0xb1fe50['dHMnK'](_0xa016bd,new Error(_0x1b5c02(0x1b2)+_0x256091));});});}async[a67_0x101017(0x22c)](_0x86a928=null){const _0x4c8317=a67_0x101017,_0x2e028d={'WpTUM':'stop:\x20CLI\x20process\x20exited','ROfXF':function(_0x1c8806){return _0x1c8806();},'KNjkX':_0x4c8317(0x140),'wlRJI':'SIGKILL','Glcti':function(_0x18788a){return _0x18788a();},'klTDv':_0x4c8317(0x21e),'OzAuT':function(_0x388c8c,_0xb067e0,_0x557e99){return _0x388c8c(_0xb067e0,_0x557e99);},'rVVli':_0x4c8317(0x20c),'uyItJ':_0x4c8317(0x16f),'hXhBc':function(_0x269345,_0x43e932){return _0x269345(_0x43e932);},'cjQsK':_0x4c8317(0x189),'NYotg':_0x4c8317(0x1cc),'BDacd':_0x4c8317(0x1ea),'oBPoe':'stop:\x20shutting\x20down\x20CLI'};if(!this[_0x4c8317(0x1be)]()){this[_0x4c8317(0x19f)][_0x4c8317(0x174)](_0x2e028d[_0x4c8317(0x155)]);return;}PerformanceTester[_0x4c8317(0x1f9)](PerformanceEvents[_0x4c8317(0x227)]),this['logger'][_0x4c8317(0x174)](_0x2e028d[_0x4c8317(0x203)]);try{if(this['isMainConnected']){const _0x7377fd=_0x2e028d[_0x4c8317(0x196)](require,_0x2e028d[_0x4c8317(0x176)]),_0x34ebdc=this[_0x4c8317(0x204)][_0x4c8317(0x17c)]?.[_0x4c8317(0x218)]?.[_0x4c8317(0x180)]()?.[_0x4c8317(0x222)],_0x276160=TestInfo[_0x4c8317(0x1e2)](_0x34ebdc),_0xa1c76e=_0x276160[TestFrameworkConstants[_0x4c8317(0x169)]]||{},_0x2bda56=await GrpcClient[_0x4c8317(0x1fb)]()[_0x4c8317(0x234)](JSON[_0x4c8317(0x1ed)](_0xa1c76e),_0x86a928);_0x2bda56&&_0x2bda56['getSuccess']()&&_0x2bda56[_0x4c8317(0x170)]()&&(BrowserstackCLI[_0x4c8317(0x233)]=_0x2bda56[_0x4c8317(0x170)](),BrowserstackCLI[_0x4c8317(0x15c)]=_0x2bda56[_0x4c8317(0x207)]()),await _0x7377fd[_0x4c8317(0x160)](),TestInfo[_0x4c8317(0x224)](),buildLogger[_0x4c8317(0x174)]('stop:\x20stopBinSession\x20build_link='+BrowserstackCLI[_0x4c8317(0x233)]+_0x4c8317(0x1b5)+BrowserstackCLI['HashedID']+_0x4c8317(0x15f)+BrowserstackCLI[_0x4c8317(0x1a2)]);}await this['unConfigureModules']();const _0x40f1b3=GrpcClient['getInstance']()[_0x4c8317(0x22b)]();if(_0x40f1b3){try{_0x40f1b3[_0x4c8317(0x1bd)](),this[_0x4c8317(0x19f)][_0x4c8317(0x174)](_0x2e028d[_0x4c8317(0x23f)]);}catch(_0x56ee5c){this[_0x4c8317(0x19f)]['error'](util[_0x4c8317(0x154)](_0x2e028d[_0x4c8317(0x23d)],_0x56ee5c));}await new Promise(_0x2fd55d=>setTimeout(_0x2fd55d,0x1388));}this[_0x4c8317(0x19a)]&&this['process']['pid']&&(this[_0x4c8317(0x19f)][_0x4c8317(0x174)](_0x2e028d[_0x4c8317(0x1e0)]),this[_0x4c8317(0x19a)]['kill'](),await new Promise(_0x525a4a=>{const _0x31aff2=_0x4c8317;let _0x49b82e=![];this['process']['on'](_0x2e028d[_0x31aff2(0x14f)],()=>{const _0x2077dd=_0x31aff2;this[_0x2077dd(0x19f)][_0x2077dd(0x174)](_0x2e028d['WpTUM']),_0x49b82e=!![],PerformanceTester['end'](PerformanceEvents[_0x2077dd(0x227)]),_0x2e028d[_0x2077dd(0x16a)](_0x525a4a);}),_0x2e028d[_0x31aff2(0x21c)](setTimeout,()=>{const _0x297493=_0x31aff2;!_0x49b82e&&(this['logger'][_0x297493(0x15b)](_0x2e028d['KNjkX']),this['process'][_0x297493(0x216)](_0x2e028d[_0x297493(0x1d2)]),PerformanceTester[_0x297493(0x1a9)](PerformanceEvents[_0x297493(0x227)]),_0x2e028d[_0x297493(0x182)](_0x525a4a));},0xbb8);}));}catch(_0x4d0778){PerformanceTester[_0x4c8317(0x1a9)](PerformanceEvents['SDK_CLI_ON_STOP'],![],util['format'](_0x4d0778)),this[_0x4c8317(0x19f)]['error']('stop:\x20error\x20in\x20stop\x20session\x20exception='+(_0x4d0778[_0x4c8317(0x173)]||_0x4d0778));}_0x86a928?this['process'][_0x4c8317(0x165)]=0x1:this[_0x4c8317(0x19a)][_0x4c8317(0x165)]=0x0,this[_0x4c8317(0x20e)]=![],this['isMainConnected']=![],process['env']['BROWSERSTACK_CLI_ENV']=null;}async[a67_0x101017(0x1d6)](){const _0x3ccefc=a67_0x101017,_0x56791f={};_0x56791f[_0x3ccefc(0x1c2)]=_0x3ccefc(0x1a5);const _0x188216=_0x56791f;this[_0x3ccefc(0x19f)]['info'](_0x188216[_0x3ccefc(0x1c2)]);}['loadCliParams'](_0x5884d4){const _0x30ff73=a67_0x101017;this[_0x30ff73(0x19f)][_0x30ff73(0x174)](_0x30ff73(0x200)+JSON['stringify'](_0x5884d4)),this[_0x30ff73(0x194)]=_0x5884d4,GrpcClient[_0x30ff73(0x1fb)]()[_0x30ff73(0x192)](_0x5884d4);}async['startChild'](_0x41c26e){const _0x2320bd=a67_0x101017,_0x23646f={};_0x23646f['zwrQR']=_0x2320bd(0x187);const _0x3414e2=_0x23646f;PerformanceTester[_0x2320bd(0x1f9)](PerformanceEvents[_0x2320bd(0x198)]);try{this['logger'][_0x2320bd(0x174)](_0x2320bd(0x1da)+_0x41c26e);const _0x1d541c=GrpcClient['getInstance']();if(_0x1d541c&&_0x1d541c['getClient']()&&_0x1d541c['getChannel']()){this[_0x2320bd(0x19f)][_0x2320bd(0x174)](_0x3414e2['zwrQR']);return;}GrpcClient[_0x2320bd(0x1fb)]()[_0x2320bd(0x1d3)]();const _0x5f5118=await GrpcClient[_0x2320bd(0x1fb)]()['connectBinSession']();this[_0x2320bd(0x20e)]=!![],this[_0x2320bd(0x186)](_0x5f5118),PerformanceTester['end'](PerformanceEvents[_0x2320bd(0x198)]);}catch(_0x37b0e4){PerformanceTester[_0x2320bd(0x1a9)](PerformanceEvents['SDK_CONNECT_BIN_SESSION'],![],util[_0x2320bd(0x154)](_0x37b0e4)),this['logger'][_0x2320bd(0x1f0)](_0x2320bd(0x23a)+util['format'](_0x37b0e4));}}static['isCLIEnabled'](){const _0x355907=a67_0x101017;try{return BrowserstackCLI['getInstance']()[_0x355907(0x1be)]();}catch(_0x13e181){return![];}}[a67_0x101017(0x1be)](){const _0x1cb857=a67_0x101017,_0x4120de={};_0x4120de[_0x1cb857(0x1ff)]=function(_0x26f43b,_0x1b85b9){return _0x26f43b!==_0x1b85b9;},_0x4120de[_0x1cb857(0x18d)]=function(_0x11e0b9,_0x27631a){return _0x11e0b9===_0x27631a;};const _0x59b077=_0x4120de;return CLIUtils[_0x1cb857(0x238)]()||this[_0x1cb857(0x206)]&&_0x59b077[_0x1cb857(0x1ff)](this[_0x1cb857(0x19a)],null)&&_0x59b077[_0x1cb857(0x18d)](this[_0x1cb857(0x19a)][_0x1cb857(0x165)],null)&&_0x59b077[_0x1cb857(0x1ff)](GrpcClient[_0x1cb857(0x1fb)]()[_0x1cb857(0x158)](),null)&&!GrpcClient['getInstance']()[_0x1cb857(0x22b)]()['isClosed']||this[_0x1cb857(0x20e)]&&_0x59b077[_0x1cb857(0x1ff)](GrpcClient['getInstance']()[_0x1cb857(0x22b)](),null)&&!GrpcClient[_0x1cb857(0x1fb)]()[_0x1cb857(0x22b)]()[_0x1cb857(0x1ce)];}[a67_0x101017(0x171)](){const _0x50f940=a67_0x101017;return this[_0x50f940(0x1be)]()&&this['_modulesLoaded'];}[a67_0x101017(0x14b)](){const _0x1be01c=a67_0x101017;return this[_0x1be01c(0x1ca)];}['setBrowserstackConfig'](_0x54be3d,_0x53c0fe,_0x2589fd=null){const _0x307c3f=a67_0x101017,_0x5c6d9e={};_0x5c6d9e[_0x307c3f(0x15e)]=function(_0x53c28b,_0x1a89bb){return _0x53c28b||_0x1a89bb;};const _0x1dc1a4=_0x5c6d9e;this[_0x307c3f(0x1ca)]=_0x1dc1a4['ykYSw'](_0x54be3d,{}),this[_0x307c3f(0x231)]=_0x53c0fe,this['browserstackCliConfig']=_0x2589fd,process[_0x307c3f(0x22e)][_0x307c3f(0x1fa)]=this['browserstackConfig']?.[_0x307c3f(0x162)]||![];const _0x245dcc=CLIUtils['getTestFrameworkDetail'](),_0x3100cb=CLIUtils[_0x307c3f(0x188)]();LoadTestModule[_0x307c3f(0x241)](this[_0x307c3f(0x1ca)])&&LoadTestModule['setLTSSessionId'](this['browserstackConfig']||{}),helper[_0x307c3f(0x1df)](process['env']['BROWSERSTACK_TURBOSCALE'])||!(CLI_SUPPORTED_FRAMEWORKS[_0x307c3f(0x1a3)](_0x245dcc['name'][_0x307c3f(0x1c9)]())&&CLI_SUPPORTED_FRAMEWORKS[_0x307c3f(0x1a3)](_0x3100cb[_0x307c3f(0x1aa)][_0x307c3f(0x1c9)]()))?process['env'][_0x307c3f(0x1ee)]=![]:process[_0x307c3f(0x22e)][_0x307c3f(0x1ee)]=!![];}async[a67_0x101017(0x230)](){const _0x4503ca=a67_0x101017,_0x3034c8={};_0x3034c8['GdaOR']=_0x4503ca(0x1c7),_0x3034c8[_0x4503ca(0x244)]='CLIUtils.setupCliPath\x20returned\x20null';const _0x450bb0=_0x3034c8;if(!this[_0x4503ca(0x1c0)])try{this[_0x4503ca(0x19f)][_0x4503ca(0x1af)](_0x450bb0['GdaOR']),this['SDK_CLI_BIN_PATH']=await CLIUtils['setupCliPath'](this[_0x4503ca(0x1ca)]),!this[_0x4503ca(0x1c0)]?this[_0x4503ca(0x19f)]['error'](_0x450bb0[_0x4503ca(0x244)]):this[_0x4503ca(0x19f)]['debug'](_0x4503ca(0x1d7)+this['SDK_CLI_BIN_PATH']);}catch(_0x566908){this[_0x4503ca(0x19f)][_0x4503ca(0x1f0)]('Error\x20in\x20setupCliPath:\x20'+_0x566908['message']),this['SDK_CLI_BIN_PATH']=null;}return this[_0x4503ca(0x1c0)];}[a67_0x101017(0x175)](){const _0x2b3121=a67_0x101017;return helper[_0x2b3121(0x1df)](process[_0x2b3121(0x22e)]['BROWSERSTACK_CLI_ENABLED']);}[a67_0x101017(0x1b7)](){return this['config'];}[a67_0x101017(0x23e)](_0x32c538){const _0x47d87c=a67_0x101017,_0x324b56={};_0x324b56[_0x47d87c(0x153)]=function(_0x3c8fc6,_0x2ed0f5){return _0x3c8fc6===_0x2ed0f5;},_0x324b56[_0x47d87c(0x1a6)]=_0x47d87c(0x209),_0x324b56[_0x47d87c(0x1f3)]=function(_0x177598,_0x53d3b4){return _0x177598>_0x53d3b4;},_0x324b56[_0x47d87c(0x201)]='setConfig:\x20Using\x20browserstackConfig\x20as\x20fallback',_0x324b56[_0x47d87c(0x17a)]='setConfig:\x20No\x20fallback\x20config\x20available,\x20using\x20empty\x20object',_0x324b56[_0x47d87c(0x1f5)]=_0x47d87c(0x20b),_0x324b56[_0x47d87c(0x217)]=_0x47d87c(0x21b);const _0x2a4650=_0x324b56;try{const _0xf823a9=_0x32c538['getConfig']?_0x32c538[_0x47d87c(0x1b7)]():'';if(!_0xf823a9||_0x2a4650[_0x47d87c(0x153)](_0xf823a9[_0x47d87c(0x1ad)](),'')){this['logger'][_0x47d87c(0x1af)](_0x2a4650[_0x47d87c(0x1a6)]);this[_0x47d87c(0x1ca)]&&_0x2a4650[_0x47d87c(0x1f3)](Object[_0x47d87c(0x16d)](this[_0x47d87c(0x1ca)])[_0x47d87c(0x212)],0x0)?(this['logger'][_0x47d87c(0x1af)](_0x2a4650[_0x47d87c(0x201)]),this[_0x47d87c(0x1f8)]={'server':this['browserstackConfig'][_0x47d87c(0x239)],'hubUrl':this[_0x47d87c(0x1ca)][_0x47d87c(0x18f)],'accessibility':this[_0x47d87c(0x1ca)][_0x47d87c(0x219)]||![]}):(this[_0x47d87c(0x19f)][_0x47d87c(0x1af)](_0x2a4650['clhUi']),this[_0x47d87c(0x1f8)]={});return;}this[_0x47d87c(0x1f8)]=JSON['parse'](_0xf823a9),this['logger'][_0x47d87c(0x174)](_0x2a4650[_0x47d87c(0x1f5)]);}catch(_0xe2bca4){this[_0x47d87c(0x19f)][_0x47d87c(0x1f0)](_0x47d87c(0x1c4)+util[_0x47d87c(0x154)](_0xe2bca4)),this[_0x47d87c(0x1ca)]&&_0x2a4650['PspIB'](Object[_0x47d87c(0x16d)](this[_0x47d87c(0x1ca)])[_0x47d87c(0x212)],0x0)?(this['logger']['debug'](_0x2a4650[_0x47d87c(0x217)]),this[_0x47d87c(0x1f8)]={'server':this[_0x47d87c(0x1ca)][_0x47d87c(0x239)],'hubUrl':this[_0x47d87c(0x1ca)][_0x47d87c(0x18f)],'accessibility':this[_0x47d87c(0x1ca)][_0x47d87c(0x219)]||![]}):this[_0x47d87c(0x1f8)]={};}}[a67_0x101017(0x22f)](){const _0x89eba=a67_0x101017,_0x5d0b86={};_0x5d0b86[_0x89eba(0x1c5)]='syncAccessibilityConfig:\x20browserstackConfig\x20not\x20set,\x20skipping\x20sync',_0x5d0b86[_0x89eba(0x202)]=_0x89eba(0x1bb),_0x5d0b86[_0x89eba(0x16c)]=_0x89eba(0x144);const _0xe2b73d=_0x5d0b86;try{if(!this[_0x89eba(0x1ca)]){this['logger'][_0x89eba(0x1af)](_0xe2b73d['rjveP']);return;}const _0x43beea=this[_0x89eba(0x1b7)]();if(!_0x43beea){this[_0x89eba(0x19f)][_0x89eba(0x1af)](_0xe2b73d[_0x89eba(0x202)]);return;}!helper[_0x89eba(0x159)](_0x43beea[_0x89eba(0x219)])&&(this[_0x89eba(0x1ca)]['accessibility']=_0x43beea['accessibility'],this[_0x89eba(0x19f)]['debug']('syncAccessibilityConfig:\x20Updated\x20browserstackConfig.accessibility\x20from\x20CLI\x20response:\x20'+_0x43beea[_0x89eba(0x219)])),!helper[_0x89eba(0x159)](_0x43beea[_0x89eba(0x1b3)])&&(this['browserstackConfig'][_0x89eba(0x1b3)]=_0x43beea[_0x89eba(0x1b3)],this[_0x89eba(0x19f)][_0x89eba(0x1af)](_0xe2b73d[_0x89eba(0x16c)]));}catch(_0x3b641e){this[_0x89eba(0x19f)][_0x89eba(0x1f0)](_0x89eba(0x1b0)+util['format'](_0x3b641e));}}[a67_0x101017(0x172)](_0x168b2a){const _0x315f63=a67_0x101017;try{this[_0x315f63(0x199)]=_0x168b2a[_0x315f63(0x1cf)]()['split'](','),this['logger'][_0x315f63(0x174)](_0x315f63(0x235)+JSON[_0x315f63(0x1ed)](this['cliArgs']));}catch(_0x3c6b57){this[_0x315f63(0x19f)][_0x315f63(0x1f0)](_0x315f63(0x17b)+util[_0x315f63(0x154)](_0x3c6b57));}}[a67_0x101017(0x1cf)](){const _0x9e3146=a67_0x101017;return this[_0x9e3146(0x199)];}['setupTestFramework'](){const _0x35677a=a67_0x101017,_0x21fd70={};_0x21fd70[_0x35677a(0x228)]=function(_0x106e4,_0x3a6d49){return _0x106e4===_0x3a6d49;},_0x21fd70[_0x35677a(0x1d1)]=function(_0x356fc5,_0x188ff0){return _0x356fc5===_0x188ff0;},_0x21fd70[_0x35677a(0x1f1)]=function(_0xa72a13,_0x12a450){return _0xa72a13===_0x12a450;};const _0x3f06f0=_0x21fd70,_0x449a1f=CLIUtils['getTestFrameworkDetail']();if(_0x3f06f0['uqjCM'](_0x449a1f[_0x35677a(0x1aa)][_0x35677a(0x1c9)](),FRAMEWORKS[_0x35677a(0x151)][_0x35677a(0x1c9)]()))this[_0x35677a(0x1d8)]=new PlaywrightTestFramework([_0x449a1f[_0x35677a(0x1aa)]],_0x449a1f['version']);else{if(_0x3f06f0[_0x35677a(0x1d1)](_0x449a1f[_0x35677a(0x1aa)][_0x35677a(0x1c9)](),FRAMEWORKS[_0x35677a(0x183)][_0x35677a(0x1c9)]()))this[_0x35677a(0x1d8)]=new CucumberTestFramework([_0x449a1f['name']],_0x449a1f[_0x35677a(0x164)]);else _0x3f06f0[_0x35677a(0x1f1)](_0x449a1f[_0x35677a(0x1aa)][_0x35677a(0x1c9)](),FRAMEWORKS[_0x35677a(0x232)][_0x35677a(0x1c9)]())&&(this['testFramework']=new JestTestFramework([_0x449a1f[_0x35677a(0x1aa)]],_0x449a1f[_0x35677a(0x164)]));}}['setupAutomationFramework'](){const _0xa93650=a67_0x101017,_0x4e8437={};_0x4e8437[_0xa93650(0x1b6)]=function(_0x2fcee7,_0xd6fce){return _0x2fcee7===_0xd6fce;};const _0x4691c3=_0x4e8437,_0x52d87f=CLIUtils[_0xa93650(0x188)]();if(_0x4691c3[_0xa93650(0x1b6)](_0x52d87f[_0xa93650(0x1aa)]['toLowerCase'](),FRAMEWORKS[_0xa93650(0x151)][_0xa93650(0x1c9)]()))this['automationFramework']=new PlaywrightAutomationFramework(_0x52d87f[_0xa93650(0x1aa)],_0x52d87f[_0xa93650(0x164)]);else _0x4691c3[_0xa93650(0x1b6)](_0x52d87f['name'][_0xa93650(0x1c9)](),FRAMEWORKS['PUPPETEER'][_0xa93650(0x1c9)]())&&(this[_0xa93650(0x1a4)]=new PuppeteerAutomationFramework(_0x52d87f[_0xa93650(0x1aa)],_0x52d87f[_0xa93650(0x164)]));}['getTestFramework'](){const _0x195fcd=a67_0x101017;return this[_0x195fcd(0x1d8)];}['getAutomationFramework'](){const _0x2fdc00=a67_0x101017;return this[_0x2fdc00(0x1a4)];}['getBrowserstackCliConfig'](){return this['browserstackCliConfig'];}['getBrowserstackConfigPath'](){const _0x510b21=a67_0x101017;return this[_0x510b21(0x231)];}}module[a67_0x101017(0x18a)]=BrowserstackCLI;
|
package/src/bin/v2/cliUtils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function a68_0xf7b8(){const _0x53f895=['Configuring\x20Cli\x20path.','QlOWZ','Setting\x20required\x20permissions\x20to\x20','\x20version','skipSessionStatus','Error\x20in\x20getting\x20writable\x20directory,\x20writableDir=','env','existsSync','iwUnN','iMqgb','BROWSERSTACK_AUTOMATION_FRAMEWORK_DETAIL','rJsqG','timeout','stringify','fileName','BROWSERSTACK_CLI_ENV','jQFqB','Bzceo','shouldSkipSessionName','trim','downloaded_file.zip','closeSync','includes','getCurrentInstanceName','wHbaY','eEiCv','No\x20writable\x20directory\x20available\x20for\x20the\x20CLI','Folder\x20does\x20not\x20exist:\x20','yauzl','.sock','92719UXpvev','get','matchHookRegex','hPRUK','format','getSdkVersion','child_process','development','LVAKW','Error\x20checking\x20if\x20binary\x20is\x20busy:\x20','split','parse','vxfqD','AZPWT','otJgW','kKDHS','pipe','2|1|0|4|3','chmod','NGtMG','\x20already\x20exists','CLI\x20version\x20found\x20despite\x20error:\x20\x22','getWritableDir','DTdUa','isFile','WMJZd','./state/testFrameworkState.js','getCliDir','Resolved\x20binary\x20path:\x20','downloadFileStream','checkAndUpdateCli','rBFPA',',\x20automationFramework=','Error\x20while\x20reading\x20CLI\x20path:\x20','nVcDd','mtime','end','../../helpers/performance/performance-tester.js','getCLIParamsForDevEnv','1253064zOdbcp','12186117DONZDR','cli','BROWSERSTACK_FILES_DIR','Unable\x20to\x20get\x20writable\x20directory,\x20exception\x20','uEmcz','reduce','tmpdir','cwd','Error\x20in\x20setting\x20up\x20cli\x20path\x20directory,\x20Exception:\x20','length','openSync','./framework/constants/testFrameworkConstants.js','txLKU','ZpCnJ','xYCZb','xixrT','LlXMx','shouldSkipSessionStatus','GET','8gWmJTM','BROWSERSTACK_BINARY_URL','readEntry','sVBck','BROWSERSTACK_TEST_FRAMEWORK_DETAIL','Test\x20or\x20Automation\x20framework\x20not\x20provided\x20testFramework=','0755','testContextOptions','Downloading\x20SDK\x20binary\x20from:\x20','SDK_CLI_BIN_PATH','downloadLatestBinary','./instances/testFrameworkInstance.js','isBinaryBusy','SZzQV','object','vnQTx','SHELL_EXECUTE_ERROR','Need\x20to\x20update\x20binary,\x20current\x20binary\x20version:\x20','openReadStream','BuafO','url','setFrameworkDetail','26534ZeSQIQ','skipSessionName','startsWith','statSync','Resolving\x20with\x20stdout:\x20\x22','bTtfq','UUAYf','getExistingCliPath','eLqLB','lazyEntries','cHBXz','ZLtpD','node','EgboF','FPnrv','aRUly','93240hVDROd','version','UGcdW','isDirectory','warn','message','yIuKG','worker_threads','join','start','iBPOJ','cli_version','OILcd','../../../package.json','debug','4052050rRLWCW','gkpBU','6hZzWau','Unable\x20to\x20set\x20required\x20permissions\x20to\x20','zQvkr','homedir','path','runShellCommand','arch','120WuGUyI','SDK_CLI_DOWNLOAD','mRDep','Failed\x20to\x20delete\x20zip\x20file:\x20','Got\x20Error\x20in\x20SDK\x20binary\x20download\x20response\x20%s','unlink','mergeObject','testFrameworkDetail','gNQWb','WOncK','basename','close','filter','lAQYs','entry','binary-','HOOK_REGEX','aNCgV','mFjwS','isDevelopmentEnv','6Jshigt','HJDqu','SDK_CLI_CHECK_UPDATE','Xfqab','nppKj','test','ycMJF','Using\x20BROWSERSTACK_BINARY_URL\x20from\x20env\x20variable:\x20','error','code','../../helpers/helper','automationFrameworkDetail','Development\x20Cli\x20Path:\x20','../../helpers/performance/constants','getAutomationFrameworkDetail','unix:/tmp/sdk-platform-','yvFkz','info','requestToUpdateCLI','wjBJB','YeLcV','fMjrm','11GEQldG','Binary\x20file\x20became\x20busy\x20during\x20write,\x20continuing\x20with\x20existing\x20binary:\x20','2483SDtMcc','biiOX','5454673uQrTqY','readdirSync','map','util','wtYPp','Failed\x20to\x20download\x20SDK\x20binary,\x20Exception:\x20','setupCliPath','../../helpers/classLogger.js','createWriteStream','DggVH','open','QHQno','hKQJb','data','hAduZ','.browserstack','YXHyk','./state/hookState.js'];a68_0xf7b8=function(){return _0x53f895;};return a68_0xf7b8();}const a68_0x432445=a68_0x3756;function a68_0x3756(_0x42eded,_0x45fc52){const _0xf7b802=a68_0xf7b8();return a68_0x3756=function(_0x37564e,_0x5666f0){_0x37564e=_0x37564e-0x1a1;let _0x3d3f9a=_0xf7b802[_0x37564e];return _0x3d3f9a;},a68_0x3756(_0x42eded,_0x45fc52);}(function(_0xad74ac,_0x3e37b3){const _0x140c10=a68_0x3756,_0x17955a=_0xad74ac();while(!![]){try{const _0x4fed3c=-parseInt(_0x140c10(0x1ce))/0x1*(parseInt(_0x140c10(0x253))/0x2)+parseInt(_0x140c10(0x1b8))/0x3*(parseInt(_0x140c10(0x229))/0x4)+parseInt(_0x140c10(0x272))/0x5*(-parseInt(_0x140c10(0x274))/0x6)+parseInt(_0x140c10(0x1d2))/0x7+parseInt(_0x140c10(0x23d))/0x8*(-parseInt(_0x140c10(0x22a))/0x9)+parseInt(_0x140c10(0x1a4))/0xa*(parseInt(_0x140c10(0x202))/0xb)+-parseInt(_0x140c10(0x263))/0xc*(-parseInt(_0x140c10(0x1d0))/0xd);if(_0x4fed3c===_0x3e37b3)break;else _0x17955a['push'](_0x17955a['shift']());}catch(_0x39b1e){_0x17955a['push'](_0x17955a['shift']());}}}(a68_0xf7b8,0xa62b5));const fs=require('fs'),os=require('os'),url=require('url'),path=require(a68_0x432445(0x1a1)),{exec}=require(a68_0x432445(0x208)),{https}=require('follow-redirects'),yauzl=require(a68_0x432445(0x200)),util=require(a68_0x432445(0x1d5)),{getFrameworkVersion}=require('../../helpers/test-observability/utils.js'),{threadId}=require(a68_0x432445(0x26a)),PerformanceTester=require(a68_0x432445(0x227)),{EVENTS:PerformanceEvents}=require(a68_0x432445(0x1c5)),{isNullOrEmpty,isModifiable,setReadWriteExecuteAccess}=require('../../helpers/utilities'),{isTrue,createDir,getHostInfo,nodeRequest,nestedKeyValue}=require(a68_0x432445(0x1c2)),{UPDATED_CLI_ENDPOINT,BINARY_BUSY_ERROR_CODES}=require('../utils/constants'),{createClassLogger}=require(a68_0x432445(0x1d9)),TestFrameworkInstance=require(a68_0x432445(0x248)),HookState=require(a68_0x432445(0x1e3)),TestFrameworkState=require(a68_0x432445(0x21c)),AutomationFrameworkState=require('./state/automationFrameworkState.js'),TestFrameworkConstants=require(a68_0x432445(0x235)),logger=createClassLogger('CLIUtils'),{getBStackAPIUrl}=require('../utils/apiUtilityMethods.js');class CLIUtils{[a68_0x432445(0x1c3)]={};[a68_0x432445(0x1ab)]={};static[a68_0x432445(0x1b7)](){const _0x2cd3f6=a68_0x432445,_0x530cc3={};_0x530cc3['nVcDd']=function(_0x2d216a,_0x3580e9){return _0x2d216a===_0x3580e9;},_0x530cc3['gkpBU']=_0x2cd3f6(0x209);const _0x286597=_0x530cc3;return _0x286597[_0x2cd3f6(0x224)](process[_0x2cd3f6(0x1ea)][_0x2cd3f6(0x1f3)],_0x286597[_0x2cd3f6(0x273)]);}static[a68_0x432445(0x228)](){const _0x2889cd=a68_0x432445,_0x3a4f28={};return _0x3a4f28['id']=process[_0x2889cd(0x1ea)]['BROWSERSTACK_CLI_ENV'],_0x3a4f28['listen']=_0x2889cd(0x1c7)+process[_0x2889cd(0x1ea)][_0x2889cd(0x1f3)]+_0x2889cd(0x201),_0x3a4f28;}static[a68_0x432445(0x207)](){const _0x18a85d=a68_0x432445,_0x5da9b6={'OILcd':function(_0x44cee5,_0x1bae3c){return _0x44cee5(_0x1bae3c);},'WMJZd':_0x18a85d(0x270)};return _0x5da9b6[_0x18a85d(0x26f)](require,_0x5da9b6[_0x18a85d(0x21b)])[_0x18a85d(0x264)];}static['getSdkLanguage'](){const _0xdfa23c=a68_0x432445,_0x1a4766={};_0x1a4766[_0xdfa23c(0x23a)]=_0xdfa23c(0x25f);const _0x56a861=_0x1a4766;return _0x56a861['LlXMx'];}static async[a68_0x432445(0x1d8)](_0x40474e){const _0x3a29bc=a68_0x432445,_0x44b56a={'vnQTx':_0x3a29bc(0x1e4),'QlOWZ':function(_0x8608e,_0x125419){return _0x8608e(_0x125419);},'hAduZ':_0x3a29bc(0x1fe)};logger['debug'](_0x44b56a[_0x3a29bc(0x24c)]);const _0x1f7bed=process[_0x3a29bc(0x1ea)][_0x3a29bc(0x246)];if(!_0x44b56a[_0x3a29bc(0x1e5)](isNullOrEmpty,_0x1f7bed))return logger['debug'](_0x3a29bc(0x1c4)+_0x1f7bed),_0x1f7bed;try{const _0x2997ac=this[_0x3a29bc(0x21d)]();if(_0x44b56a['QlOWZ'](isNullOrEmpty,_0x2997ac))throw new Error(_0x44b56a[_0x3a29bc(0x1e0)]);const _0x538448=this[_0x3a29bc(0x25a)](_0x2997ac),_0x20028e=await this[_0x3a29bc(0x220)](_0x538448,_0x2997ac,_0x40474e);return logger['debug'](_0x3a29bc(0x21e)+_0x20028e),_0x20028e;}catch(_0x5e122e){logger[_0x3a29bc(0x271)](_0x3a29bc(0x232)+util[_0x3a29bc(0x206)](_0x5e122e));}return null;}static async[a68_0x432445(0x220)](_0x2bd7ad,_0x464722,_0x1d1bc8){const _0x2a4632=a68_0x432445,_0x309494={'wjBJB':function(_0x3778ee){return _0x3778ee();},'aNCgV':function(_0x357c6c,_0x5e38eb){return _0x357c6c(_0x5e38eb);},'fMjrm':function(_0x221563,_0x105907,_0x39c2ce){return _0x221563(_0x105907,_0x39c2ce);},'iBPOJ':_0x2a4632(0x1df),'jQFqB':_0x2a4632(0x251),'EgboF':function(_0xad15e8,_0x507db1){return _0xad15e8(_0x507db1);}};PerformanceTester[_0x2a4632(0x26c)](PerformanceEvents[_0x2a4632(0x1ba)]),logger[_0x2a4632(0x1c9)]('Current\x20CLI\x20Path\x20Found:\x20'+_0x2bd7ad);const _0x1b02e3=_0x309494[_0x2a4632(0x1cb)](getHostInfo),_0x203fa5={'sdk_version':CLIUtils['getSdkVersion'](),'os':_0x1b02e3['platform'],'os_arch':_0x1b02e3[_0x2a4632(0x1a3)],'cli_version':'0','sdk_language':this['getSdkLanguage']()};!_0x309494[_0x2a4632(0x1b5)](isNullOrEmpty,_0x2bd7ad)&&(_0x203fa5[_0x2a4632(0x26e)]=await this[_0x2a4632(0x1a2)](_0x2bd7ad+_0x2a4632(0x1e7)));const _0x21eb56=await this[_0x2a4632(0x1ca)](_0x203fa5,_0x1d1bc8);process[_0x2a4632(0x1ea)][_0x2a4632(0x23e)]&&(logger[_0x2a4632(0x1c9)](_0x2a4632(0x1bf)+process['env'][_0x2a4632(0x23e)]),_0x21eb56[_0x2a4632(0x1df)]['url']=process[_0x2a4632(0x1ea)][_0x2a4632(0x23e)]);if(_0x309494[_0x2a4632(0x1cd)](nestedKeyValue,_0x21eb56,[_0x309494['iBPOJ'],_0x309494[_0x2a4632(0x1f4)]])){logger[_0x2a4632(0x271)](_0x2a4632(0x24e)+_0x203fa5[_0x2a4632(0x26e)]);if(!_0x309494[_0x2a4632(0x260)](isNullOrEmpty,_0x2bd7ad)&&this[_0x2a4632(0x249)](_0x2bd7ad))return logger[_0x2a4632(0x267)]('Existing\x20binary\x20is\x20currently\x20in\x20use,\x20skipping\x20update\x20and\x20continuing\x20with\x20current\x20version:\x20'+_0x2bd7ad),PerformanceTester['end'](PerformanceEvents['SDK_CLI_CHECK_UPDATE']),_0x2bd7ad;const _0x468d08=await this[_0x2a4632(0x247)](_0x309494[_0x2a4632(0x1cd)](nestedKeyValue,_0x21eb56,[_0x309494[_0x2a4632(0x26d)],_0x309494[_0x2a4632(0x1f4)]]),_0x464722);return PerformanceTester['end'](PerformanceEvents['SDK_CLI_CHECK_UPDATE']),_0x468d08;}return PerformanceTester['end'](PerformanceEvents[_0x2a4632(0x1ba)]),_0x2bd7ad;}static[a68_0x432445(0x21d)](){const _0x1967f3=a68_0x432445,_0x117c16={'txLKU':function(_0x115354,_0x146378){return _0x115354(_0x146378);},'gJUBZ':_0x1967f3(0x1fe),'rJsqG':_0x1967f3(0x22b),'Xfqab':function(_0x422d6a,_0x3409b2){return _0x422d6a(_0x3409b2);}},_0x4f5975=this[_0x1967f3(0x218)]();try{if(_0x117c16[_0x1967f3(0x236)](isNullOrEmpty,_0x4f5975))throw new Error(_0x117c16['gJUBZ']);const _0x57351a=path[_0x1967f3(0x26b)](_0x4f5975,_0x117c16[_0x1967f3(0x1ef)]);return!fs['existsSync'](_0x57351a)&&_0x117c16[_0x1967f3(0x1bb)](createDir,_0x57351a),_0x57351a;}catch(_0x40b5b1){logger[_0x1967f3(0x271)](_0x1967f3(0x1e9)+util[_0x1967f3(0x206)](_0x40b5b1));}}static[a68_0x432445(0x218)](){const _0x2ea533=a68_0x432445,_0xa0fc05={'zQvkr':_0x2ea533(0x1e1),'DTdUa':function(_0x418a35,_0x2582d2){return _0x418a35(_0x2582d2);},'gNQWb':function(_0x572b84,_0x4be1bb){return _0x572b84(_0x4be1bb);},'cHBXz':function(_0x2b00ce,_0xf5535c){return _0x2b00ce(_0xf5535c);},'NGtMG':function(_0xb4aceb,_0x52dc1d){return _0xb4aceb(_0x52dc1d);}},_0xad73c5=[process[_0x2ea533(0x1ea)][_0x2ea533(0x22c)],path[_0x2ea533(0x26b)](os[_0x2ea533(0x277)](),_0xa0fc05['zQvkr']),path['join'](os[_0x2ea533(0x230)](),_0xa0fc05[_0x2ea533(0x276)])];for(const _0x143ced of _0xad73c5){if(_0xa0fc05[_0x2ea533(0x219)](isNullOrEmpty,_0x143ced))continue;try{if(fs[_0x2ea533(0x1eb)](_0x143ced)){logger['debug']('Folder\x20'+_0x143ced+_0x2ea533(0x216));if(!_0xa0fc05[_0x2ea533(0x1ac)](isModifiable,_0x143ced)){logger[_0x2ea533(0x271)](_0x2ea533(0x1e6)+_0x143ced);const _0xf15fcb=_0xa0fc05['cHBXz'](setReadWriteExecuteAccess,_0x143ced);if(!_0xa0fc05[_0x2ea533(0x25d)](isTrue,_0xf15fcb)){logger[_0x2ea533(0x267)](_0x2ea533(0x275)+_0x143ced);continue;}}}else{logger[_0x2ea533(0x271)](_0x2ea533(0x1ff)+_0x143ced),_0xa0fc05[_0x2ea533(0x215)](createDir,_0x143ced),logger[_0x2ea533(0x271)](_0x2ea533(0x1e6)+_0x143ced);const _0x2032a8=_0xa0fc05[_0x2ea533(0x1ac)](setReadWriteExecuteAccess,_0x143ced);!_0xa0fc05[_0x2ea533(0x215)](isTrue,_0x2032a8)&&logger['warn'](_0x2ea533(0x275)+_0x143ced);}return _0x143ced;}catch(_0x34e9bb){logger[_0x2ea533(0x1c0)](_0x2ea533(0x22d)+util['format'](_0x34e9bb));}}return null;}static[a68_0x432445(0x25a)](_0x209550){const _0x4095a4=a68_0x432445,_0x552763={};_0x552763[_0x4095a4(0x1ad)]=function(_0x73f0c5,_0x578d72){return _0x73f0c5>_0x578d72;},_0x552763['yIuKG']=function(_0x33283e,_0x51859f){return _0x33283e>_0x51859f;};const _0x588156=_0x552763;try{if(!fs[_0x4095a4(0x1eb)](_0x209550)||!fs[_0x4095a4(0x256)](_0x209550)[_0x4095a4(0x266)]())return'';const _0x361191=fs[_0x4095a4(0x1d3)](_0x209550)[_0x4095a4(0x1d4)](_0x197308=>path[_0x4095a4(0x26b)](_0x209550,_0x197308))[_0x4095a4(0x1b0)](_0x3f3869=>fs['statSync'](_0x3f3869)[_0x4095a4(0x21a)]()&&path[_0x4095a4(0x1ae)](_0x3f3869)[_0x4095a4(0x255)](_0x4095a4(0x1b3)));if(_0x588156[_0x4095a4(0x269)](_0x361191[_0x4095a4(0x233)],0x0)){const _0x57b392=_0x361191[_0x4095a4(0x1d4)](_0x407774=>({'filePath':_0x407774,'mtime':fs['statSync'](_0x407774)[_0x4095a4(0x225)]}))[_0x4095a4(0x22f)]((_0x2a897b,_0x55c7f9)=>{const _0x20704d=_0x4095a4;if(!_0x2a897b||!_0x2a897b[_0x20704d(0x225)])return _0x55c7f9;if(_0x588156[_0x20704d(0x1ad)](_0x55c7f9[_0x20704d(0x225)],_0x2a897b[_0x20704d(0x225)]))return _0x55c7f9;return _0x2a897b;},{});return _0x57b392?_0x57b392['filePath']:'';}return'';}catch(_0x3fa28e){return logger['error'](_0x4095a4(0x223)+util['format'](_0x3fa28e)),'';}}static ['requestToUpdateCLI']=async(_0x5c703d,_0x1ecafa)=>{const _0x3995df=a68_0x432445,_0x34a4d1={'wtYPp':function(_0x44ed37,_0xe96f92,_0x442461,_0x3bd787,_0x964563){return _0x44ed37(_0xe96f92,_0x442461,_0x3bd787,_0x964563);},'eLqLB':_0x3995df(0x23c)},_0x4766f2={};_0x4766f2['qs']=_0x5c703d;const _0xc13b32=await _0x34a4d1[_0x3995df(0x1d6)](nodeRequest,_0x34a4d1[_0x3995df(0x25b)],UPDATED_CLI_ENDPOINT,_0x4766f2,_0x1ecafa);return logger[_0x3995df(0x271)]('response\x20'+JSON[_0x3995df(0x1f1)](_0xc13b32)),_0xc13b32;};static[a68_0x432445(0x249)](_0xc02036){const _0x35e756=a68_0x432445;try{const _0x239731=fs[_0x35e756(0x234)](_0xc02036,'r+');return fs[_0x35e756(0x1f9)](_0x239731),![];}catch(_0x479177){if(BINARY_BUSY_ERROR_CODES['includes'](_0x479177[_0x35e756(0x1c1)]))return logger['debug']('Binary\x20is\x20busy:\x20'+_0xc02036),!![];return logger[_0x35e756(0x271)](_0x35e756(0x20b)+_0x479177[_0x35e756(0x268)]),![];}}static[a68_0x432445(0x1a2)](_0x4fffff,_0x2ee75f=''){const _0x397610=a68_0x432445,_0xd57408={'vxfqD':_0x397610(0x264),'Bzceo':function(_0x29000c,_0x13fcf1){return _0x29000c(_0x13fcf1);},'wHbaY':function(_0x451ed1,_0xf43071){return _0x451ed1(_0xf43071);},'mRDep':_0x397610(0x24d),'aRUly':function(_0x2866a4,_0x36abf4,_0x3c5c05,_0x5a88e0){return _0x2866a4(_0x36abf4,_0x3c5c05,_0x5a88e0);},'zESLX':_0x397610(0x1c0)};return new Promise((_0x55e533,_0x40d718)=>{const _0x5eba76=_0x397610,_0x45ddb4={'nWXaG':_0xd57408[_0x5eba76(0x20e)],'LVAKW':function(_0x473511,_0x235a5d){const _0x24a922=_0x5eba76;return _0xd57408[_0x24a922(0x1f5)](_0x473511,_0x235a5d);},'LSGHX':function(_0x819ed,_0x2df201){const _0x44e337=_0x5eba76;return _0xd57408[_0x44e337(0x1fc)](_0x819ed,_0x2df201);},'otJgW':_0xd57408[_0x5eba76(0x1a6)],'yvFkz':function(_0x21b986,_0x4e49e2){const _0x4adf20=_0x5eba76;return _0xd57408[_0x4adf20(0x1fc)](_0x21b986,_0x4e49e2);},'DuwhN':function(_0x34aa14,_0x2e1f84){return _0xd57408['Bzceo'](_0x34aa14,_0x2e1f84);}},_0x1885f0={};_0x1885f0[_0x5eba76(0x231)]=_0x2ee75f,_0x1885f0[_0x5eba76(0x1f0)]=0x1388;const _0x5cf7d6=_0xd57408[_0x5eba76(0x262)](exec,_0x4fffff,_0x1885f0,(_0x5d01d2,_0x2833d7,_0x2754d7)=>{const _0x3723f5=_0x5eba76;if(_0x5d01d2){if(_0x4fffff[_0x3723f5(0x1fa)](_0x45ddb4['nWXaG'])&&(_0x2833d7[_0x3723f5(0x1f7)]()||_0x2754d7['trim']())){const _0x24f4f1=_0x2833d7[_0x3723f5(0x1f7)]()||_0x2754d7[_0x3723f5(0x1f7)]();logger['debug'](_0x3723f5(0x217)+_0x24f4f1+'\x22'),_0x45ddb4[_0x3723f5(0x20a)](_0x55e533,_0x24f4f1);}else _0x45ddb4['LSGHX'](_0x55e533,_0x2754d7[_0x3723f5(0x1f7)]()||_0x45ddb4[_0x3723f5(0x210)]);}else logger[_0x3723f5(0x271)](_0x3723f5(0x257)+_0x2833d7[_0x3723f5(0x1f7)]()+'\x22'),_0x45ddb4[_0x3723f5(0x1c8)](_0x55e533,_0x2833d7[_0x3723f5(0x1f7)]());});_0x5cf7d6['on'](_0xd57408['zESLX'],()=>{const _0x52cf28=_0x5eba76;_0x45ddb4['DuwhN'](_0x55e533,_0x45ddb4[_0x52cf28(0x210)]);});});}static [a68_0x432445(0x247)]=async(_0x28fb57,_0xdc0759)=>{const _0x1a055d=a68_0x432445,_0x3bdc4a={'hKQJb':_0x1a055d(0x1c0),'kKDHS':_0x1a055d(0x1a8),'QHQno':function(_0x5013b0,_0x3c50a4){return _0x5013b0(_0x3c50a4);},'sBggI':'Got\x20Error\x20while\x20downloading\x20SDK\x20binary\x20file\x20%s','AZPWT':function(_0x38c58b,_0x5dfc55){return _0x38c58b(_0x5dfc55);},'eEiCv':_0x1a055d(0x1f8)};PerformanceTester[_0x1a055d(0x26c)](PerformanceEvents['SDK_CLI_DOWNLOAD']),logger[_0x1a055d(0x271)](_0x1a055d(0x245)+_0x28fb57);try{const _0x19c9d7=url[_0x1a055d(0x20d)](_0x28fb57),_0x14ad6b=path['join'](_0xdc0759,_0x3bdc4a[_0x1a055d(0x1fd)]),_0x528a98=fs[_0x1a055d(0x1da)](_0x14ad6b);return new Promise((_0x19ae14,_0x2d732b)=>{const _0x59b16c=_0x1a055d,_0x56f449={'SZzQV':_0x3bdc4a[_0x59b16c(0x211)],'YXHyk':function(_0x271a3c,_0x257261){const _0x2651f6=_0x59b16c;return _0x3bdc4a[_0x2651f6(0x1dd)](_0x271a3c,_0x257261);},'gwbZn':_0x3bdc4a['sBggI'],'ZpCnJ':function(_0x52b5c4,_0x395886){const _0x339233=_0x59b16c;return _0x3bdc4a[_0x339233(0x1dd)](_0x52b5c4,_0x395886);},'mFjwS':function(_0x4f13e8,_0x2298a6){const _0x4ca8ac=_0x59b16c;return _0x3bdc4a[_0x4ca8ac(0x20f)](_0x4f13e8,_0x2298a6);}};https[_0x59b16c(0x203)](_0x19c9d7,function(_0x574185){const _0x1a5a91=_0x59b16c,_0x4b291f=null;_0x574185[_0x1a5a91(0x212)](_0x528a98),_0x574185['on'](_0x3bdc4a['hKQJb'],function(_0x76d2e2){const _0x40e384=_0x1a5a91;logger['error'](util[_0x40e384(0x206)](_0x56f449[_0x40e384(0x24a)],_0x76d2e2)),PerformanceTester[_0x40e384(0x226)](PerformanceEvents['SDK_CLI_DOWNLOAD'],![],util[_0x40e384(0x206)](_0x76d2e2)),_0x56f449[_0x40e384(0x1e2)](_0x2d732b,_0x76d2e2);}),_0x528a98['on'](_0x3bdc4a[_0x1a5a91(0x1de)],function(_0x5d33ed){const _0x5e4b6a=_0x1a5a91;logger[_0x5e4b6a(0x1c0)](util[_0x5e4b6a(0x206)](_0x56f449['gwbZn'],_0x5d33ed)),PerformanceTester[_0x5e4b6a(0x226)](PerformanceEvents[_0x5e4b6a(0x1a5)],![],util['format'](_0x5d33ed)),_0x56f449[_0x5e4b6a(0x237)](_0x2d732b,_0x5d33ed);}),CLIUtils[_0x1a5a91(0x21f)](_0x528a98,_0x4b291f,_0x14ad6b,_0xdc0759,_0x19ae14,_0x2d732b),PerformanceTester['end'](PerformanceEvents['SDK_CLI_DOWNLOAD']);})['on'](_0x3bdc4a[_0x59b16c(0x1de)],function(_0x3e93d7){const _0x39a2c5=_0x59b16c;logger[_0x39a2c5(0x1c0)]('Got\x20Error\x20in\x20SDK\x20binary\x20downloading\x20request\x20'+util[_0x39a2c5(0x206)](_0x3e93d7)),PerformanceTester[_0x39a2c5(0x226)](PerformanceEvents[_0x39a2c5(0x1a5)],![],util['format'](_0x3e93d7)),_0x56f449[_0x39a2c5(0x1b6)](_0x2d732b,_0x3e93d7);});});}catch(_0x4c1ec6){PerformanceTester[_0x1a055d(0x226)](PerformanceEvents['SDK_CLI_DOWNLOAD'],![],util['format'](_0x4c1ec6)),logger[_0x1a055d(0x271)](_0x1a055d(0x1d7)+util['format'](_0x4c1ec6));}};static['downloadFileStream'](_0x505d39,_0x3b0fa8,_0x46018c,_0x84ee90,_0x2134b6,_0x14e535){const _0x40422c=a68_0x432445,_0x3a12d6={'nppKj':function(_0x275d3b,_0x415be8){return _0x275d3b(_0x415be8);},'rBFPA':_0x40422c(0x226),'SoYeY':_0x40422c(0x1c0),'FPnrv':function(_0x1063ef,_0x45655f){return _0x1063ef===_0x45655f;},'QKNzo':_0x40422c(0x243),'vDnvx':_0x40422c(0x1b2),'iwUnN':'close'};_0x505d39['on'](_0x3a12d6[_0x40422c(0x1ec)],function(){const _0x4a2504=_0x40422c,_0x1fae0d={'lAQYs':function(_0x4cf486,_0x31658a){return _0x3a12d6['nppKj'](_0x4cf486,_0x31658a);},'UXQwP':_0x3a12d6[_0x4a2504(0x221)],'xYCZb':function(_0x15eca1,_0x3d50d4){const _0x23c7d4=_0x4a2504;return _0x3a12d6[_0x23c7d4(0x1bc)](_0x15eca1,_0x3d50d4);},'BuafO':function(_0x4ff901,_0x114e36){const _0x8420b5=_0x4a2504;return _0x3a12d6[_0x8420b5(0x1bc)](_0x4ff901,_0x114e36);},'YeLcV':_0x3a12d6['SoYeY'],'DggVH':function(_0x3935bb,_0x15dc29){const _0x296bca=_0x4a2504;return _0x3a12d6[_0x296bca(0x261)](_0x3935bb,_0x15dc29);},'HJDqu':_0x3a12d6['QKNzo'],'UUAYf':_0x3a12d6['vDnvx']},_0x436e31={};_0x436e31[_0x4a2504(0x25c)]=!![],yauzl[_0x4a2504(0x1dc)](_0x46018c,_0x436e31,function(_0x52f30b,_0x1f2f98){const _0x51f815=_0x4a2504,_0x49ed6a={'SKmPH':function(_0x3763ad,_0x4a50bb){const _0x3dc134=a68_0x3756;return _0x1fae0d[_0x3dc134(0x1b1)](_0x3763ad,_0x4a50bb);},'hyHFj':_0x1fae0d['UXQwP'],'cFOOm':function(_0x208a74,_0x409598){const _0x2aca80=a68_0x3756;return _0x1fae0d[_0x2aca80(0x238)](_0x208a74,_0x409598);},'bTtfq':function(_0x2d2777,_0x597086){return _0x1fae0d['xYCZb'](_0x2d2777,_0x597086);},'sVBck':function(_0x489620,_0x25cf70){const _0x5f2dbb=a68_0x3756;return _0x1fae0d[_0x5f2dbb(0x250)](_0x489620,_0x25cf70);},'dKSee':_0x1fae0d['YeLcV'],'iMqgb':function(_0x4f15e6,_0x951ace){const _0xc3e857=a68_0x3756;return _0x1fae0d[_0xc3e857(0x1db)](_0x4f15e6,_0x951ace);},'biiOX':function(_0x2d3cd8,_0x253614){const _0x33ec88=a68_0x3756;return _0x1fae0d[_0x33ec88(0x1b1)](_0x2d3cd8,_0x253614);},'xNdce':_0x1fae0d[_0x51f815(0x1b9)]};_0x52f30b&&_0x1fae0d[_0x51f815(0x250)](_0x14e535,_0x52f30b),_0x1f2f98[_0x51f815(0x23f)](),_0x1f2f98['on'](_0x1fae0d[_0x51f815(0x259)],_0x17be08=>{const _0x5e0ddf=_0x51f815,_0x2dede5={'dolOW':function(_0x19d7bf,_0x137b4f){return _0x49ed6a['cFOOm'](_0x19d7bf,_0x137b4f);},'ZLtpD':function(_0x2ccd9b,_0x211988){const _0x23cd64=a68_0x3756;return _0x49ed6a[_0x23cd64(0x258)](_0x2ccd9b,_0x211988);}};!_0x3b0fa8&&(_0x3b0fa8=_0x17be08[_0x5e0ddf(0x1f2)]);if(/\/$/[_0x5e0ddf(0x1bd)](_0x17be08[_0x5e0ddf(0x1f2)]))_0x1f2f98['readEntry']();else{const _0x5208a6=_0x17be08[_0x5e0ddf(0x1f2)],_0x53dda6=path['join'](_0x84ee90,_0x5208a6);let _0x2bf6a5;try{_0x2bf6a5=fs[_0x5e0ddf(0x1da)](_0x53dda6);}catch(_0x1e193f){if(BINARY_BUSY_ERROR_CODES[_0x5e0ddf(0x1fa)](_0x1e193f[_0x5e0ddf(0x1c1)])){logger[_0x5e0ddf(0x267)]('Binary\x20file\x20is\x20currently\x20in\x20use,\x20skipping\x20download\x20and\x20continuing\x20with\x20existing\x20binary:\x20'+_0x5208a6),fs[_0x5e0ddf(0x1a9)](_0x46018c,_0x423e38=>{_0x423e38&&logger['warn']('Failed\x20to\x20delete\x20zip\x20file:\x20'+_0x46018c);}),_0x49ed6a[_0x5e0ddf(0x240)](_0x2134b6,_0x53dda6);return;}_0x49ed6a['sVBck'](_0x14e535,_0x1e193f);return;}_0x2bf6a5['on'](_0x49ed6a['dKSee'],_0x51913e=>{const _0x54e49e=_0x5e0ddf;BINARY_BUSY_ERROR_CODES[_0x54e49e(0x1fa)](_0x51913e['code'])?(logger[_0x54e49e(0x267)](_0x54e49e(0x1cf)+_0x51913e['message']),_0x2bf6a5[_0x54e49e(0x1af)](),fs[_0x54e49e(0x1a9)](_0x46018c,_0x433055=>{const _0x25b62d=_0x54e49e;_0x433055&&logger[_0x25b62d(0x267)](_0x25b62d(0x1a7)+_0x46018c);}),_0x2dede5['dolOW'](_0x2134b6,_0x53dda6)):_0x2dede5[_0x54e49e(0x25e)](_0x14e535,_0x51913e);}),_0x1f2f98[_0x5e0ddf(0x24f)](_0x17be08,function(_0x4d65fb,_0xed008b){_0x4d65fb&&_0x49ed6a['SKmPH'](_0x14e535,_0x4d65fb),_0xed008b['on'](_0x49ed6a['hyHFj'],function(){const _0x153d16=a68_0x3756;_0x2bf6a5[_0x153d16(0x1af)](),_0x1f2f98[_0x153d16(0x23f)]();}),_0xed008b['pipe'](_0x2bf6a5);}),_0x49ed6a[_0x5e0ddf(0x1ed)](_0x17be08[_0x5e0ddf(0x1f2)],_0x3b0fa8)&&_0x1f2f98[_0x5e0ddf(0x1af)]();}}),_0x1f2f98['on'](_0x1fae0d[_0x51f815(0x1cc)],_0x28e5b3=>{_0x1fae0d['lAQYs'](_0x14e535,_0x28e5b3);}),_0x1f2f98['once'](_0x1fae0d['UXQwP'],()=>{const _0x38bfc2=_0x51f815;fs['unlink'](_0x46018c,_0x292b5e=>{const _0x5b1a18=a68_0x3756;_0x292b5e&&logger[_0x5b1a18(0x267)](_0x5b1a18(0x1a7)+_0x46018c);}),fs[_0x38bfc2(0x214)](path[_0x38bfc2(0x26b)](_0x84ee90,_0x3b0fa8),_0x49ed6a['xNdce'],function(_0xbb5c10){const _0x52347e=_0x38bfc2;_0xbb5c10&&_0x49ed6a[_0x52347e(0x258)](_0x14e535,_0xbb5c10),_0x49ed6a[_0x52347e(0x1d1)](_0x2134b6,path[_0x52347e(0x26b)](_0x84ee90,_0x3b0fa8));}),_0x1f2f98[_0x38bfc2(0x1af)]();});});});}static['getTestFrameworkDetail'](){const _0x20d7b3=a68_0x432445;if(process[_0x20d7b3(0x1ea)]['BROWSERSTACK_TEST_FRAMEWORK_DETAIL'])return JSON[_0x20d7b3(0x20d)](process[_0x20d7b3(0x1ea)][_0x20d7b3(0x241)]);return this[_0x20d7b3(0x1ab)];}static[a68_0x432445(0x1c6)](){const _0x3c9810=a68_0x432445;if(process[_0x3c9810(0x1ea)]['BROWSERSTACK_AUTOMATION_FRAMEWORK_DETAIL'])return JSON[_0x3c9810(0x20d)](process[_0x3c9810(0x1ea)][_0x3c9810(0x1ee)]);return this['automationFrameworkDetail'];}static[a68_0x432445(0x252)](_0x144ea2,_0x1d0266){const _0x3dd094=a68_0x432445,_0xd89ab8={'jNvKc':_0x3dd094(0x213),'ycMJF':function(_0x27b165,_0x20f4ba){return _0x27b165(_0x20f4ba);},'uEmcz':function(_0x2e2f9a,_0x4b3940){return _0x2e2f9a||_0x4b3940;}},_0x3d3d30=_0xd89ab8['jNvKc'][_0x3dd094(0x20c)]('|');let _0xc85e43=0x0;while(!![]){switch(_0x3d3d30[_0xc85e43++]){case'0':this[_0x3dd094(0x1c3)]={'name':_0x1d0266,'version':_0xd89ab8[_0x3dd094(0x1be)](getFrameworkVersion,_0x1d0266)};continue;case'1':this['testFrameworkDetail']={'name':_0x144ea2,'version':{[_0x144ea2]:_0xd89ab8[_0x3dd094(0x1be)](getFrameworkVersion,_0x144ea2)}};continue;case'2':_0xd89ab8[_0x3dd094(0x22e)](!_0x144ea2,!_0x1d0266)&&logger[_0x3dd094(0x271)](_0x3dd094(0x242)+_0x144ea2+_0x3dd094(0x222)+_0x1d0266);continue;case'3':process[_0x3dd094(0x1ea)]['BROWSERSTACK_TEST_FRAMEWORK_DETAIL']=JSON[_0x3dd094(0x1f1)](this[_0x3dd094(0x1ab)]);continue;case'4':process['env'][_0x3dd094(0x1ee)]=JSON['stringify'](this[_0x3dd094(0x1c3)]);continue;}break;}}static['getHookRegistryKey'](_0x11de77,_0x381b30){return _0x11de77+':'+_0x381b30;}static[a68_0x432445(0x1fb)](){return process['pid']+':'+threadId;}static[a68_0x432445(0x1f6)](_0x1ece1e){const _0x3e4da9=a68_0x432445;if(_0x1ece1e[_0x3e4da9(0x244)]&&_0x1ece1e[_0x3e4da9(0x244)][_0x3e4da9(0x254)])return!![];return![];}static[a68_0x432445(0x23b)](_0x46d5db){const _0xba5eef=a68_0x432445;if(_0x46d5db['testContextOptions']&&_0x46d5db[_0xba5eef(0x244)][_0xba5eef(0x1e8)])return!![];return![];}static[a68_0x432445(0x204)](_0x50bdd9){const _0x4b0bce=a68_0x432445,_0x3ab69c=new RegExp(TestFrameworkConstants[_0x4b0bce(0x1b4)]);return _0x3ab69c[_0x4b0bce(0x1bd)](_0x50bdd9);}static[a68_0x432445(0x1aa)](_0x296faf,_0x1a4ef6){const _0x409f7e=a68_0x432445,_0x174f8f={};_0x174f8f[_0x409f7e(0x239)]=function(_0x333d1f,_0x43e126){return _0x333d1f!==_0x43e126;},_0x174f8f[_0x409f7e(0x265)]=function(_0x26141d,_0x58394d){return _0x26141d===_0x58394d;},_0x174f8f[_0x409f7e(0x205)]=_0x409f7e(0x24b);const _0x2a0ce6=_0x174f8f;for(const [_0x4fd919,_0x4fc99c]of Object['entries'](_0x1a4ef6)){if(_0x2a0ce6[_0x409f7e(0x239)](_0x4fc99c,null)&&_0x2a0ce6[_0x409f7e(0x265)](typeof _0x4fc99c,_0x2a0ce6['hPRUK'])&&!Array['isArray'](_0x4fc99c))_0x296faf[_0x4fd919]=this[_0x409f7e(0x1aa)](_0x296faf[_0x4fd919]||{},_0x4fc99c);else Array['isArray'](_0x4fc99c)?_0x296faf[_0x4fd919]=(_0x296faf[_0x4fd919]||[])['concat'](_0x4fc99c):_0x296faf[_0x4fd919]=_0x4fc99c;}return _0x296faf;}}module['exports']=CLIUtils;
|
|
1
|
+
const a68_0x2fa0f3=a68_0x1b32;(function(_0x5e470a,_0x1fa1bd){const _0x51dcf1=a68_0x1b32,_0x22fb30=_0x5e470a();while(!![]){try{const _0x442341=-parseInt(_0x51dcf1(0x1fa))/0x1+parseInt(_0x51dcf1(0x242))/0x2+parseInt(_0x51dcf1(0x1f4))/0x3*(parseInt(_0x51dcf1(0x26f))/0x4)+-parseInt(_0x51dcf1(0x266))/0x5+-parseInt(_0x51dcf1(0x238))/0x6*(parseInt(_0x51dcf1(0x286))/0x7)+parseInt(_0x51dcf1(0x245))/0x8*(parseInt(_0x51dcf1(0x1b6))/0x9)+parseInt(_0x51dcf1(0x1c8))/0xa;if(_0x442341===_0x1fa1bd)break;else _0x22fb30['push'](_0x22fb30['shift']());}catch(_0x52f4ed){_0x22fb30['push'](_0x22fb30['shift']());}}}(a68_0x5a09,0x8a07b));const fs=require('fs'),os=require('os'),url=require(a68_0x2fa0f3(0x229)),path=require(a68_0x2fa0f3(0x1d6)),{exec}=require(a68_0x2fa0f3(0x1f7)),{https}=require('follow-redirects'),yauzl=require('yauzl'),util=require(a68_0x2fa0f3(0x1e5)),{getFrameworkVersion}=require(a68_0x2fa0f3(0x1c9)),{threadId}=require('worker_threads'),PerformanceTester=require(a68_0x2fa0f3(0x1f5)),{EVENTS:PerformanceEvents}=require(a68_0x2fa0f3(0x1da)),{isNullOrEmpty,isModifiable,setReadWriteExecuteAccess}=require(a68_0x2fa0f3(0x24f)),{isTrue,createDir,getHostInfo,nodeRequest,nestedKeyValue}=require(a68_0x2fa0f3(0x1c6)),{UPDATED_CLI_ENDPOINT,BINARY_BUSY_ERROR_CODES}=require('../utils/constants'),{createClassLogger}=require(a68_0x2fa0f3(0x1ba)),TestFrameworkInstance=require('./instances/testFrameworkInstance.js'),HookState=require('./state/hookState.js'),TestFrameworkState=require(a68_0x2fa0f3(0x20d)),AutomationFrameworkState=require(a68_0x2fa0f3(0x263)),TestFrameworkConstants=require(a68_0x2fa0f3(0x1bf)),logger=createClassLogger(a68_0x2fa0f3(0x241)),{getBStackAPIUrl}=require(a68_0x2fa0f3(0x1d8));class CLIUtils{[a68_0x2fa0f3(0x252)]={};[a68_0x2fa0f3(0x1dc)]={};static[a68_0x2fa0f3(0x1d0)](){const _0x5d8dda=a68_0x2fa0f3,_0x2f295b={};_0x2f295b[_0x5d8dda(0x215)]=function(_0x524b1f,_0x3b0a21){return _0x524b1f===_0x3b0a21;},_0x2f295b['AfFBq']=_0x5d8dda(0x248);const _0x56ca80=_0x2f295b;return _0x56ca80['ofEuM'](process[_0x5d8dda(0x1bc)]['BROWSERSTACK_CLI_ENV'],_0x56ca80['AfFBq']);}static['getCLIParamsForDevEnv'](){const _0x56cde8=a68_0x2fa0f3,_0x597b5d={};return _0x597b5d['id']=process[_0x56cde8(0x1bc)]['BROWSERSTACK_CLI_ENV'],_0x597b5d['listen']=_0x56cde8(0x256)+process[_0x56cde8(0x1bc)]['BROWSERSTACK_CLI_ENV']+_0x56cde8(0x28e),_0x597b5d;}static[a68_0x2fa0f3(0x258)](){const _0x2aec29=a68_0x2fa0f3,_0x80dde8={'ItVYw':function(_0x53024a,_0x3b9c9c){return _0x53024a(_0x3b9c9c);},'JFAlr':'../../../package.json'};return _0x80dde8[_0x2aec29(0x1f0)](require,_0x80dde8[_0x2aec29(0x24c)])[_0x2aec29(0x254)];}static[a68_0x2fa0f3(0x1d4)](){const _0x141ecc=a68_0x2fa0f3,_0x277fb4={};_0x277fb4[_0x141ecc(0x23d)]='node';const _0x14817b=_0x277fb4;return _0x14817b[_0x141ecc(0x23d)];}static async['setupCliPath'](_0x4dfcea){const _0x2b738e=a68_0x2fa0f3,_0x515bd4={'MLkut':'Configuring\x20Cli\x20path.','OmlsI':function(_0x4ecfa6,_0x1e736a){return _0x4ecfa6(_0x1e736a);},'XmtCI':function(_0x70b887,_0x18e08f){return _0x70b887(_0x18e08f);},'CFqVd':_0x2b738e(0x1fc)};logger[_0x2b738e(0x1bd)](_0x515bd4[_0x2b738e(0x201)]);const _0x504a60=process[_0x2b738e(0x1bc)][_0x2b738e(0x1b5)];if(!_0x515bd4[_0x2b738e(0x211)](isNullOrEmpty,_0x504a60))return logger[_0x2b738e(0x1bd)](_0x2b738e(0x206)+_0x504a60),_0x504a60;try{const _0x132f67=this[_0x2b738e(0x272)]();if(_0x515bd4[_0x2b738e(0x26b)](isNullOrEmpty,_0x132f67))throw new Error(_0x515bd4[_0x2b738e(0x26a)]);const _0x26c253=this['getExistingCliPath'](_0x132f67),_0x498d1d=await this[_0x2b738e(0x21d)](_0x26c253,_0x132f67,_0x4dfcea);return logger[_0x2b738e(0x1bd)](_0x2b738e(0x1bb)+_0x498d1d),_0x498d1d;}catch(_0x1b0f3b){logger[_0x2b738e(0x1bd)](_0x2b738e(0x25c)+util[_0x2b738e(0x28c)](_0x1b0f3b));}return null;}static async[a68_0x2fa0f3(0x21d)](_0x151bc4,_0x28f216,_0x48818a){const _0x24e7d9=a68_0x2fa0f3,_0x4deaee={'rzAdT':function(_0x2fa250){return _0x2fa250();},'zqIQh':function(_0x54f93a,_0x23a39e){return _0x54f93a(_0x23a39e);},'YYfAF':function(_0x5bd480,_0x46f2b8,_0x28bea2){return _0x5bd480(_0x46f2b8,_0x28bea2);},'UQkmH':_0x24e7d9(0x228),'xGHgN':_0x24e7d9(0x229),'tpsBY':function(_0xa0e9f0,_0x104de8){return _0xa0e9f0(_0x104de8);},'GCioB':function(_0x557ae5,_0x5580e6,_0x22173f){return _0x557ae5(_0x5580e6,_0x22173f);}};PerformanceTester[_0x24e7d9(0x24a)](PerformanceEvents[_0x24e7d9(0x27b)]),logger[_0x24e7d9(0x222)](_0x24e7d9(0x202)+_0x151bc4);const _0x5108dd=_0x4deaee[_0x24e7d9(0x260)](getHostInfo),_0x17739a={'sdk_version':CLIUtils[_0x24e7d9(0x258)](),'os':_0x5108dd['platform'],'os_arch':_0x5108dd[_0x24e7d9(0x28f)],'cli_version':'0','sdk_language':this['getSdkLanguage']()};!_0x4deaee['zqIQh'](isNullOrEmpty,_0x151bc4)&&(_0x17739a['cli_version']=await this['runShellCommand'](_0x151bc4+'\x20version'));const _0x24b13a=await this[_0x24e7d9(0x1d9)](_0x17739a,_0x48818a);process[_0x24e7d9(0x1bc)][_0x24e7d9(0x1e2)]&&(logger[_0x24e7d9(0x222)](_0x24e7d9(0x235)+process[_0x24e7d9(0x1bc)]['BROWSERSTACK_BINARY_URL']),_0x24b13a['data'][_0x24e7d9(0x229)]=process[_0x24e7d9(0x1bc)]['BROWSERSTACK_BINARY_URL']);if(_0x4deaee[_0x24e7d9(0x233)](nestedKeyValue,_0x24b13a,[_0x4deaee[_0x24e7d9(0x280)],_0x4deaee['xGHgN']])){logger['debug']('Need\x20to\x20update\x20binary,\x20current\x20binary\x20version:\x20'+_0x17739a[_0x24e7d9(0x271)]);if(!_0x4deaee[_0x24e7d9(0x289)](isNullOrEmpty,_0x151bc4)&&this['isBinaryBusy'](_0x151bc4))return logger['warn'](_0x24e7d9(0x214)+_0x151bc4),PerformanceTester[_0x24e7d9(0x1d1)](PerformanceEvents[_0x24e7d9(0x27b)]),_0x151bc4;const _0x49e983=await this[_0x24e7d9(0x22a)](_0x4deaee['GCioB'](nestedKeyValue,_0x24b13a,[_0x4deaee[_0x24e7d9(0x280)],_0x4deaee[_0x24e7d9(0x1f1)]]),_0x28f216);return PerformanceTester[_0x24e7d9(0x1d1)](PerformanceEvents[_0x24e7d9(0x27b)]),_0x49e983;}return PerformanceTester[_0x24e7d9(0x1d1)](PerformanceEvents['SDK_CLI_CHECK_UPDATE']),_0x151bc4;}static[a68_0x2fa0f3(0x272)](){const _0x48699a=a68_0x2fa0f3,_0x451b15={'glVoJ':function(_0x2c88b0,_0x5a6e18){return _0x2c88b0(_0x5a6e18);},'eYIZG':_0x48699a(0x1fc),'kBYTG':_0x48699a(0x1e1)},_0x3c5e4e=this['getWritableDir']();try{if(_0x451b15[_0x48699a(0x24b)](isNullOrEmpty,_0x3c5e4e))throw new Error(_0x451b15['eYIZG']);const _0x522eb9=path['join'](_0x3c5e4e,_0x451b15[_0x48699a(0x1db)]);return!fs[_0x48699a(0x26c)](_0x522eb9)&&_0x451b15[_0x48699a(0x24b)](createDir,_0x522eb9),_0x522eb9;}catch(_0x4f8b04){logger[_0x48699a(0x1bd)](_0x48699a(0x1e3)+util[_0x48699a(0x28c)](_0x4f8b04));}}static['getWritableDir'](){const _0x287285=a68_0x2fa0f3,_0x1a5911={'psXdB':_0x287285(0x1f9),'MXlmM':function(_0x12fee9,_0x57ac14){return _0x12fee9(_0x57ac14);},'UnQOw':function(_0x577b05,_0x2df794){return _0x577b05(_0x2df794);},'iaroR':function(_0x1d101c,_0x4cedb1){return _0x1d101c(_0x4cedb1);},'PgBfR':function(_0x1df200,_0x47871b){return _0x1df200(_0x47871b);}},_0x287545=[process['env']['BROWSERSTACK_FILES_DIR'],path[_0x287285(0x22b)](os[_0x287285(0x212)](),_0x1a5911[_0x287285(0x265)]),path[_0x287285(0x22b)](os[_0x287285(0x1c7)](),_0x1a5911['psXdB'])];for(const _0x52f30f of _0x287545){if(_0x1a5911[_0x287285(0x28b)](isNullOrEmpty,_0x52f30f))continue;try{if(fs['existsSync'](_0x52f30f)){logger[_0x287285(0x1bd)]('Folder\x20'+_0x52f30f+'\x20already\x20exists');if(!_0x1a5911[_0x287285(0x285)](isModifiable,_0x52f30f)){logger['debug'](_0x287285(0x1c2)+_0x52f30f);const _0x50a357=_0x1a5911[_0x287285(0x28b)](setReadWriteExecuteAccess,_0x52f30f);if(!_0x1a5911[_0x287285(0x285)](isTrue,_0x50a357)){logger[_0x287285(0x1b0)](_0x287285(0x231)+_0x52f30f);continue;}}}else{logger[_0x287285(0x1bd)](_0x287285(0x278)+_0x52f30f),_0x1a5911['UnQOw'](createDir,_0x52f30f),logger[_0x287285(0x1bd)](_0x287285(0x1c2)+_0x52f30f);const _0x2fe14e=_0x1a5911[_0x287285(0x24e)](setReadWriteExecuteAccess,_0x52f30f);!_0x1a5911['PgBfR'](isTrue,_0x2fe14e)&&logger['warn'](_0x287285(0x231)+_0x52f30f);}return _0x52f30f;}catch(_0x2d40b7){logger[_0x287285(0x225)]('Unable\x20to\x20get\x20writable\x20directory,\x20exception\x20'+util[_0x287285(0x28c)](_0x2d40b7));}}return null;}static['getExistingCliPath'](_0x44597b){const _0x394314=a68_0x2fa0f3,_0x1098c9={};_0x1098c9[_0x394314(0x21b)]=function(_0x2589fb,_0x1c9f1c){return _0x2589fb>_0x1c9f1c;},_0x1098c9[_0x394314(0x1fe)]=function(_0x3e600c,_0x2e896b){return _0x3e600c>_0x2e896b;};const _0x477b01=_0x1098c9;try{if(!fs[_0x394314(0x26c)](_0x44597b)||!fs[_0x394314(0x279)](_0x44597b)[_0x394314(0x20b)]())return'';const _0x26048a=fs['readdirSync'](_0x44597b)[_0x394314(0x1c1)](_0x386840=>path[_0x394314(0x22b)](_0x44597b,_0x386840))[_0x394314(0x249)](_0x376574=>fs[_0x394314(0x279)](_0x376574)[_0x394314(0x284)]()&&path[_0x394314(0x230)](_0x376574)[_0x394314(0x1ea)]('binary-'));if(_0x477b01[_0x394314(0x1fe)](_0x26048a[_0x394314(0x22c)],0x0)){const _0x4c745d=_0x26048a[_0x394314(0x1c1)](_0x513882=>({'filePath':_0x513882,'mtime':fs[_0x394314(0x279)](_0x513882)['mtime']}))[_0x394314(0x255)]((_0x3acc2a,_0x227889)=>{const _0x1478d7=_0x394314;if(!_0x3acc2a||!_0x3acc2a[_0x1478d7(0x259)])return _0x227889;if(_0x477b01[_0x1478d7(0x21b)](_0x227889[_0x1478d7(0x259)],_0x3acc2a[_0x1478d7(0x259)]))return _0x227889;return _0x3acc2a;},{});return _0x4c745d?_0x4c745d['filePath']:'';}return'';}catch(_0x5d386b){return logger[_0x394314(0x225)]('Error\x20while\x20reading\x20CLI\x20path:\x20'+util[_0x394314(0x28c)](_0x5d386b)),'';}}static [a68_0x2fa0f3(0x1d9)]=async(_0x3c72d1,_0xe94863)=>{const _0x26755e=a68_0x2fa0f3,_0x5d582a={'RsKOw':function(_0x385713,_0x5996be,_0x1ce0f5,_0x1fc971,_0x7b17bc){return _0x385713(_0x5996be,_0x1ce0f5,_0x1fc971,_0x7b17bc);},'EskHX':_0x26755e(0x218)},_0x5332a7={};_0x5332a7['qs']=_0x3c72d1;const _0x29a055=await _0x5d582a[_0x26755e(0x1fd)](nodeRequest,_0x5d582a['EskHX'],UPDATED_CLI_ENDPOINT,_0x5332a7,_0xe94863);return logger[_0x26755e(0x1bd)](_0x26755e(0x207)+JSON['stringify'](_0x29a055)),_0x29a055;};static['isBinaryBusy'](_0x45126f){const _0x136cc6=a68_0x2fa0f3;try{const _0x5230b1=fs['openSync'](_0x45126f,'r+');return fs[_0x136cc6(0x1b2)](_0x5230b1),![];}catch(_0x3f142f){if(BINARY_BUSY_ERROR_CODES['includes'](_0x3f142f[_0x136cc6(0x277)]))return logger['debug'](_0x136cc6(0x275)+_0x45126f),!![];return logger[_0x136cc6(0x1bd)]('Error\x20checking\x20if\x20binary\x20is\x20busy:\x20'+_0x3f142f[_0x136cc6(0x1c5)]),![];}}static['runShellCommand'](_0x2e460f,_0x1df629=''){const _0x862f4c=a68_0x2fa0f3,_0xbdaf4e={'ZRIdc':'version','UJgav':function(_0x165fd3,_0x33a1de){return _0x165fd3(_0x33a1de);},'IprPz':function(_0x240aed,_0xb0086d){return _0x240aed(_0xb0086d);},'EQMmf':_0x862f4c(0x23a),'hBXJB':function(_0x53ae36,_0x5c4446,_0x294995,_0x127cca){return _0x53ae36(_0x5c4446,_0x294995,_0x127cca);},'SFltO':_0x862f4c(0x225)};return new Promise((_0x25911d,_0x2b1dca)=>{const _0x4b587f=_0x862f4c,_0x154346={'GMOLq':_0xbdaf4e['ZRIdc'],'tAeWL':function(_0x51d86c,_0x591065){return _0xbdaf4e['UJgav'](_0x51d86c,_0x591065);},'yIsRJ':function(_0x1054c0,_0x1897cd){const _0x476039=a68_0x1b32;return _0xbdaf4e[_0x476039(0x1e4)](_0x1054c0,_0x1897cd);},'YPjMp':_0xbdaf4e['EQMmf']},_0x453990={};_0x453990[_0x4b587f(0x264)]=_0x1df629,_0x453990[_0x4b587f(0x28a)]=0x1388;const _0x273ab3=_0xbdaf4e[_0x4b587f(0x21f)](exec,_0x2e460f,_0x453990,(_0x2aa8a4,_0x364395,_0x12177a)=>{const _0x5c435d=_0x4b587f;if(_0x2aa8a4){if(_0x2e460f['includes'](_0x154346['GMOLq'])&&(_0x364395[_0x5c435d(0x240)]()||_0x12177a[_0x5c435d(0x240)]())){const _0x5e2cb5=_0x364395[_0x5c435d(0x240)]()||_0x12177a[_0x5c435d(0x240)]();logger[_0x5c435d(0x1bd)](_0x5c435d(0x236)+_0x5e2cb5+'\x22'),_0x154346[_0x5c435d(0x1ad)](_0x25911d,_0x5e2cb5);}else _0x154346[_0x5c435d(0x208)](_0x25911d,_0x12177a[_0x5c435d(0x240)]()||_0x154346[_0x5c435d(0x1b9)]);}else logger['debug'](_0x5c435d(0x1ef)+_0x364395[_0x5c435d(0x240)]()+'\x22'),_0x154346[_0x5c435d(0x208)](_0x25911d,_0x364395['trim']());});_0x273ab3['on'](_0xbdaf4e[_0x4b587f(0x20e)],()=>{const _0x5d0465=_0x4b587f;_0x154346[_0x5d0465(0x1ad)](_0x25911d,_0x154346[_0x5d0465(0x1b9)]);});});}static [a68_0x2fa0f3(0x22a)]=async(_0x30d03e,_0x2f4a2c)=>{const _0x11baa2=a68_0x2fa0f3,_0x4b0d84={'SGcMq':function(_0x5edb79,_0x4abe04){return _0x5edb79(_0x4abe04);},'dUDJv':'Got\x20Error\x20in\x20SDK\x20binary\x20download\x20response\x20%s','uqnJu':function(_0x27e349,_0x1a2058){return _0x27e349(_0x1a2058);},'PpgGr':_0x11baa2(0x203),'bpEki':'error'};PerformanceTester[_0x11baa2(0x24a)](PerformanceEvents[_0x11baa2(0x20f)]),logger[_0x11baa2(0x1bd)](_0x11baa2(0x24d)+_0x30d03e);try{const _0x28cad8=url[_0x11baa2(0x213)](_0x30d03e),_0x42446c=path['join'](_0x2f4a2c,_0x11baa2(0x251)+process['pid']+'.zip'),_0x92d39c=fs[_0x11baa2(0x1d3)](_0x42446c);return new Promise((_0x4ff79e,_0x522b7f)=>{const _0x2e18b9=_0x11baa2,_0x26745b={'LmjAf':function(_0x566049,_0x3a121e){return _0x4b0d84['SGcMq'](_0x566049,_0x3a121e);},'KnMFW':_0x4b0d84['dUDJv'],'egAMl':function(_0x2e8ce4,_0x2bfe61){const _0x2d8984=a68_0x1b32;return _0x4b0d84[_0x2d8984(0x1eb)](_0x2e8ce4,_0x2bfe61);},'GuRRA':_0x4b0d84[_0x2e18b9(0x27d)],'YVGCn':function(_0xd14f96,_0x5ea35a){return _0x4b0d84['uqnJu'](_0xd14f96,_0x5ea35a);},'YwbIh':_0x4b0d84[_0x2e18b9(0x20a)],'zkWog':function(_0x4859d2,_0x16ab69){const _0x481131=_0x2e18b9;return _0x4b0d84[_0x481131(0x22f)](_0x4859d2,_0x16ab69);}};https[_0x2e18b9(0x1b8)](_0x28cad8,function(_0x48547b){const _0x137790=_0x2e18b9,_0x1ad319={'EkIDE':_0x26745b['KnMFW'],'WHzVi':function(_0x2440ac,_0x3529b3){return _0x26745b['egAMl'](_0x2440ac,_0x3529b3);},'vNCtr':_0x26745b[_0x137790(0x257)],'VnTXS':function(_0x12e122,_0x14486a){return _0x26745b['YVGCn'](_0x12e122,_0x14486a);}},_0x4e0e70=null;_0x48547b[_0x137790(0x1ee)](_0x92d39c),_0x48547b['on'](_0x26745b[_0x137790(0x1c4)],function(_0x4ccb9d){const _0x5876c8=_0x137790;logger[_0x5876c8(0x225)](util[_0x5876c8(0x28c)](_0x1ad319[_0x5876c8(0x234)],_0x4ccb9d)),PerformanceTester[_0x5876c8(0x1d1)](PerformanceEvents[_0x5876c8(0x20f)],![],util['format'](_0x4ccb9d)),_0x1ad319[_0x5876c8(0x1f6)](_0x522b7f,_0x4ccb9d);}),_0x92d39c['on'](_0x26745b[_0x137790(0x1c4)],function(_0x2a843d){const _0x533fbc=_0x137790;logger['error'](util['format'](_0x1ad319[_0x533fbc(0x23f)],_0x2a843d)),PerformanceTester['end'](PerformanceEvents[_0x533fbc(0x20f)],![],util['format'](_0x2a843d)),_0x1ad319[_0x533fbc(0x1f6)](_0x522b7f,_0x2a843d);}),CLIUtils['downloadFileStream'](_0x92d39c,_0x4e0e70,_0x42446c,_0x2f4a2c,_0x1e4f83=>{const _0x543df4=_0x137790;PerformanceTester[_0x543df4(0x1d1)](PerformanceEvents[_0x543df4(0x20f)]),_0x1ad319[_0x543df4(0x1c0)](_0x4ff79e,_0x1e4f83);},_0xc93cee=>{const _0x124b2b=_0x137790;PerformanceTester[_0x124b2b(0x1d1)](PerformanceEvents['SDK_CLI_DOWNLOAD'],![],util[_0x124b2b(0x28c)](_0xc93cee)),_0x26745b['LmjAf'](_0x522b7f,_0xc93cee);});})['on'](_0x4b0d84[_0x2e18b9(0x20a)],function(_0x3816ac){const _0x461c6d=_0x2e18b9;logger[_0x461c6d(0x225)](_0x461c6d(0x246)+util[_0x461c6d(0x28c)](_0x3816ac)),PerformanceTester[_0x461c6d(0x1d1)](PerformanceEvents[_0x461c6d(0x20f)],![],util[_0x461c6d(0x28c)](_0x3816ac)),_0x26745b[_0x461c6d(0x204)](_0x522b7f,_0x3816ac);});});}catch(_0x112765){PerformanceTester[_0x11baa2(0x1d1)](PerformanceEvents['SDK_CLI_DOWNLOAD'],![],util['format'](_0x112765)),logger[_0x11baa2(0x1bd)](_0x11baa2(0x227)+util['format'](_0x112765));}};static[a68_0x2fa0f3(0x23e)](_0x15d14e,_0x29e4c4,_0x51a5a0,_0x555a71,_0x9b7243,_0x48c960){const _0x313bb8=a68_0x2fa0f3,_0x13eedb={'fURee':function(_0x19a14b,_0x301279){return _0x19a14b(_0x301279);},'KouLf':_0x313bb8(0x269),'ihmFP':function(_0x42c0eb,_0x29cc23){return _0x42c0eb(_0x29cc23);},'LpqHf':_0x313bb8(0x1d1),'gtNub':function(_0x19e8aa,_0xcfdb49){return _0x19e8aa(_0xcfdb49);},'WNIDG':function(_0x4d4ae3,_0x13a5db){return _0x4d4ae3(_0x13a5db);},'wkyHx':function(_0x1d9a94,_0x489655){return _0x1d9a94!==_0x489655;},'dgHhF':_0x313bb8(0x225),'aQwoa':_0x313bb8(0x273),'ppgfT':function(_0x1c9235,_0x36fe33){return _0x1c9235(_0x36fe33);},'udpnK':function(_0x504b15,_0x1b02c1){return _0x504b15(_0x1b02c1);},'IDkso':_0x313bb8(0x232),'VOAsi':_0x313bb8(0x25b)};_0x15d14e['on'](_0x13eedb[_0x313bb8(0x26e)],function(){const _0x4f5525=_0x313bb8,_0x4ffb9e={'IAeqv':function(_0x364601,_0x2d9309){const _0x5e4fd4=a68_0x1b32;return _0x13eedb[_0x5e4fd4(0x267)](_0x364601,_0x2d9309);},'zCIip':_0x13eedb[_0x4f5525(0x26e)],'JJuns':function(_0x4b1c22,_0x3388b3){const _0x3ae76c=_0x4f5525;return _0x13eedb[_0x3ae76c(0x287)](_0x4b1c22,_0x3388b3);},'bfZlF':_0x13eedb[_0x4f5525(0x1e9)],'kVaip':function(_0x81404,_0x138604){const _0x31517c=_0x4f5525;return _0x13eedb[_0x31517c(0x23b)](_0x81404,_0x138604);},'vOXZs':function(_0xe93c67,_0x163367){const _0x6333c6=_0x4f5525;return _0x13eedb[_0x6333c6(0x20c)](_0xe93c67,_0x163367);},'zMmIR':function(_0x306dc5,_0x18c6f4){const _0x46cfe5=_0x4f5525;return _0x13eedb[_0x46cfe5(0x1e6)](_0x306dc5,_0x18c6f4);},'hwhqi':_0x13eedb[_0x4f5525(0x1ca)],'jpSDJ':_0x13eedb[_0x4f5525(0x23c)],'mJiEg':function(_0x4bb87d,_0x343fd2){const _0x428c5d=_0x4f5525;return _0x13eedb[_0x428c5d(0x1d7)](_0x4bb87d,_0x343fd2);},'nJiuQ':function(_0x53bebd,_0x3bbe89){const _0x457bbc=_0x4f5525;return _0x13eedb[_0x457bbc(0x1ff)](_0x53bebd,_0x3bbe89);},'cFTJP':_0x13eedb['IDkso'],'AYucp':_0x13eedb['VOAsi']},_0x41029e={};_0x41029e[_0x4f5525(0x1cb)]=!![],yauzl[_0x4f5525(0x221)](_0x51a5a0,_0x41029e,function(_0x29c477,_0x180a52){const _0x506426=_0x4f5525,_0x3ad790={'LmmVk':_0x4ffb9e[_0x506426(0x1cd)],'rLYwg':function(_0x30a57c,_0x579c0e){return _0x4ffb9e['JJuns'](_0x30a57c,_0x579c0e);},'hmKsJ':_0x4ffb9e[_0x506426(0x219)],'gPYJK':function(_0x123557,_0x1be8d3){const _0x2a657d=_0x506426;return _0x4ffb9e[_0x2a657d(0x1b4)](_0x123557,_0x1be8d3);},'sNAdW':function(_0x1adc79,_0x164d2e){const _0x2ed0f4=_0x506426;return _0x4ffb9e[_0x2ed0f4(0x25a)](_0x1adc79,_0x164d2e);},'RQGNl':function(_0x5a5c26,_0x5c8968){const _0x2ada8f=_0x506426;return _0x4ffb9e[_0x2ada8f(0x1e7)](_0x5a5c26,_0x5c8968);},'wbgNe':_0x4ffb9e[_0x506426(0x217)],'hMshP':function(_0x537fe7,_0xb1def5){const _0x15a551=_0x506426;return _0x4ffb9e[_0x15a551(0x1e7)](_0x537fe7,_0xb1def5);},'JAMMJ':_0x4ffb9e[_0x506426(0x239)],'mSTBk':function(_0x330045,_0x244f81){const _0xb312da=_0x506426;return _0x4ffb9e[_0xb312da(0x25a)](_0x330045,_0x244f81);},'MRXMH':function(_0x4729b2,_0x557c3d){const _0x5ac00c=_0x506426;return _0x4ffb9e[_0x5ac00c(0x282)](_0x4729b2,_0x557c3d);},'OOBgs':function(_0x5baf94,_0x3ef336){const _0x5f5636=_0x506426;return _0x4ffb9e[_0x5f5636(0x27a)](_0x5baf94,_0x3ef336);},'BxzcX':_0x4ffb9e[_0x506426(0x247)]};if(_0x29c477){_0x4ffb9e[_0x506426(0x27a)](_0x48c960,_0x29c477);return;}_0x180a52[_0x506426(0x224)](),_0x180a52['on'](_0x4ffb9e['AYucp'],_0x5242cc=>{const _0x59677e=_0x506426,_0x4f43fa={'EpuHo':function(_0x3e2113,_0x41e257){const _0x2e3f0c=a68_0x1b32;return _0x3ad790[_0x2e3f0c(0x216)](_0x3e2113,_0x41e257);},'YCBhv':function(_0x3c863c,_0x5a4b6b){return _0x3ad790['sNAdW'](_0x3c863c,_0x5a4b6b);}};if(/\/$/[_0x59677e(0x25d)](_0x5242cc['fileName'])){_0x180a52[_0x59677e(0x224)]();return;}!_0x29e4c4&&(_0x29e4c4=_0x5242cc[_0x59677e(0x223)]);if(_0x3ad790[_0x59677e(0x1ec)](_0x5242cc[_0x59677e(0x223)],_0x29e4c4))_0x180a52['readEntry']();else{const _0x76ad45=_0x5242cc[_0x59677e(0x223)],_0x5292a3=path[_0x59677e(0x22b)](_0x555a71,_0x76ad45+_0x59677e(0x261)+process[_0x59677e(0x210)]);let _0x4e974a;try{_0x4e974a=fs[_0x59677e(0x1d3)](_0x5292a3);}catch(_0x4603ff){if(BINARY_BUSY_ERROR_CODES['includes'](_0x4603ff['code'])){const _0x3b1b68=path['join'](_0x555a71,_0x76ad45);if(fs[_0x59677e(0x26c)](_0x3b1b68)){logger['warn'](_0x59677e(0x21a)+_0x76ad45),fs['unlink'](_0x51a5a0,_0x293aab=>{const _0xfc33d5=_0x59677e;_0x293aab&&logger[_0xfc33d5(0x1b0)](_0xfc33d5(0x243)+_0x51a5a0);}),_0x3ad790[_0x59677e(0x216)](_0x9b7243,_0x3b1b68);return;}logger[_0x59677e(0x1b0)]('Temp\x20file\x20is\x20busy\x20and\x20no\x20existing\x20binary\x20found:\x20'+_0x76ad45);}_0x3ad790[_0x59677e(0x22d)](_0x48c960,_0x4603ff);return;}_0x4e974a['on'](_0x3ad790[_0x59677e(0x25e)],_0x32da80=>{const _0x21b6ed=_0x59677e;if(BINARY_BUSY_ERROR_CODES[_0x21b6ed(0x283)](_0x32da80[_0x21b6ed(0x277)])){const _0x115913=path[_0x21b6ed(0x22b)](_0x555a71,_0x76ad45);_0x4e974a[_0x21b6ed(0x269)](),fs['existsSync'](_0x115913)?(logger[_0x21b6ed(0x1b0)]('Temp\x20file\x20became\x20busy\x20during\x20write,\x20falling\x20back\x20to\x20existing\x20binary:\x20'+_0x32da80[_0x21b6ed(0x1c5)]),_0x180a52[_0x21b6ed(0x269)](),fs[_0x21b6ed(0x1e0)](_0x51a5a0,_0x55d4b2=>{const _0x559c2c=_0x21b6ed;_0x55d4b2&&logger[_0x559c2c(0x1b0)]('Failed\x20to\x20delete\x20zip\x20file:\x20'+_0x51a5a0);}),_0x4f43fa[_0x21b6ed(0x250)](_0x9b7243,_0x115913)):(logger[_0x21b6ed(0x1b0)](_0x21b6ed(0x1f3)+_0x32da80[_0x21b6ed(0x1c5)]),fs['unlink'](_0x5292a3,()=>{}),_0x4f43fa['EpuHo'](_0x48c960,_0x32da80));}else fs[_0x21b6ed(0x1e0)](_0x5292a3,()=>{}),_0x4f43fa[_0x21b6ed(0x220)](_0x48c960,_0x32da80);}),_0x180a52['openReadStream'](_0x5242cc,function(_0x53b391,_0x5f3ac0){const _0x57715b=_0x59677e,_0x53a4a3={};_0x53a4a3['YAqyB']=_0x3ad790[_0x57715b(0x1d2)];const _0x3b729e=_0x53a4a3;if(_0x53b391){fs[_0x57715b(0x1e0)](_0x5292a3,()=>{}),_0x3ad790[_0x57715b(0x1f2)](_0x48c960,_0x53b391);return;}_0x5f3ac0['on'](_0x3ad790['hmKsJ'],function(){const _0x2810b1=_0x57715b;_0x4e974a[_0x2810b1(0x1d1)](),_0x4e974a['on'](_0x3b729e[_0x2810b1(0x1de)],function(){const _0x58605c=_0x2810b1;_0x180a52[_0x58605c(0x224)]();});}),_0x5f3ac0[_0x57715b(0x1ee)](_0x4e974a);});}}),_0x180a52['on'](_0x4ffb9e[_0x506426(0x217)],_0x289033=>{const _0xff414f=_0x506426;_0x4ffb9e[_0xff414f(0x1ae)](_0x48c960,_0x289033);}),_0x180a52[_0x506426(0x1c3)](_0x4ffb9e[_0x506426(0x219)],()=>{const _0x1d8ca7=_0x506426;fs[_0x1d8ca7(0x1e0)](_0x51a5a0,_0x5807f5=>{const _0x1cd8ed=_0x1d8ca7;_0x5807f5&&logger[_0x1cd8ed(0x1b0)](_0x1cd8ed(0x243)+_0x51a5a0);});const _0x444dc5=path[_0x1d8ca7(0x22b)](_0x555a71,_0x29e4c4+_0x1d8ca7(0x261)+process['pid']),_0x443ddd=path[_0x1d8ca7(0x22b)](_0x555a71,_0x29e4c4);fs['chmod'](_0x444dc5,_0x3ad790['BxzcX'],function(_0x421309){const _0x3036b9=_0x1d8ca7,_0x2b23b9={'ADIQC':function(_0x5a7b8b,_0x77b9d8){const _0x29809b=a68_0x1b32;return _0x3ad790[_0x29809b(0x276)](_0x5a7b8b,_0x77b9d8);},'SbhQU':_0x3ad790['JAMMJ'],'FmsXg':function(_0x40b234,_0x2bd247){const _0x38e65d=a68_0x1b32;return _0x3ad790[_0x38e65d(0x22d)](_0x40b234,_0x2bd247);},'BPCTD':function(_0x34cb8a,_0x43f8f4){const _0x533595=a68_0x1b32;return _0x3ad790[_0x533595(0x209)](_0x34cb8a,_0x43f8f4);},'mTQcU':function(_0x2113d3,_0x152beb){const _0x2a8fb8=a68_0x1b32;return _0x3ad790[_0x2a8fb8(0x1fb)](_0x2113d3,_0x152beb);}};if(_0x421309){_0x180a52[_0x3036b9(0x269)](),fs[_0x3036b9(0x1e0)](_0x444dc5,()=>{}),_0x3ad790[_0x3036b9(0x274)](_0x48c960,_0x421309);return;}fs[_0x3036b9(0x288)](_0x444dc5,_0x443ddd,function(_0x23137c){const _0x55858a=_0x3036b9;if(_0x23137c){if(_0x2b23b9[_0x55858a(0x1b7)](_0x23137c[_0x55858a(0x277)],_0x2b23b9[_0x55858a(0x1ce)])){_0x180a52['close'](),fs[_0x55858a(0x1e0)](_0x444dc5,()=>{}),_0x2b23b9[_0x55858a(0x27c)](_0x48c960,_0x23137c);return;}logger[_0x55858a(0x1b0)](_0x55858a(0x1df)+_0x23137c[_0x55858a(0x1c5)]);try{fs['copyFileSync'](_0x444dc5,_0x443ddd);}catch(_0xb6824c){_0x180a52[_0x55858a(0x269)](),fs[_0x55858a(0x1e0)](_0x444dc5,()=>{}),_0x2b23b9[_0x55858a(0x262)](_0x48c960,_0xb6824c);return;}fs['unlink'](_0x444dc5,_0x317442=>{const _0x59b2be=_0x55858a;_0x317442&&logger['warn'](_0x59b2be(0x21c)+_0x317442[_0x59b2be(0x1c5)]);});}_0x180a52[_0x55858a(0x269)](),_0x2b23b9['mTQcU'](_0x9b7243,_0x443ddd);});});});});});}static[a68_0x2fa0f3(0x1b3)](){const _0x4e7635=a68_0x2fa0f3;if(process['env'][_0x4e7635(0x1b1)])return JSON[_0x4e7635(0x213)](process[_0x4e7635(0x1bc)][_0x4e7635(0x1b1)]);return this[_0x4e7635(0x1dc)];}static['getAutomationFrameworkDetail'](){const _0x1834b8=a68_0x2fa0f3;if(process[_0x1834b8(0x1bc)][_0x1834b8(0x1f8)])return JSON[_0x1834b8(0x213)](process[_0x1834b8(0x1bc)]['BROWSERSTACK_AUTOMATION_FRAMEWORK_DETAIL']);return this[_0x1834b8(0x252)];}static[a68_0x2fa0f3(0x1e8)](_0x27ae7f,_0x233181){const _0x481db7=a68_0x2fa0f3,_0x5b2f31={'NTAjZ':_0x481db7(0x27e),'OgPlw':function(_0x2a8b6c,_0x5a1c4a){return _0x2a8b6c(_0x5a1c4a);},'CyOos':function(_0x5a97ac,_0x5620c9){return _0x5a97ac||_0x5620c9;}},_0x4dbd7c=_0x5b2f31[_0x481db7(0x26d)][_0x481db7(0x1ed)]('|');let _0xf3c966=0x0;while(!![]){switch(_0x4dbd7c[_0xf3c966++]){case'0':process[_0x481db7(0x1bc)][_0x481db7(0x1f8)]=JSON[_0x481db7(0x27f)](this[_0x481db7(0x252)]);continue;case'1':process['env']['BROWSERSTACK_TEST_FRAMEWORK_DETAIL']=JSON[_0x481db7(0x27f)](this[_0x481db7(0x1dc)]);continue;case'2':this['testFrameworkDetail']={'name':_0x27ae7f,'version':{[_0x27ae7f]:_0x5b2f31[_0x481db7(0x1cc)](getFrameworkVersion,_0x27ae7f)}};continue;case'3':_0x5b2f31[_0x481db7(0x281)](!_0x27ae7f,!_0x233181)&&logger[_0x481db7(0x1bd)](_0x481db7(0x1dd)+_0x27ae7f+',\x20automationFramework='+_0x233181);continue;case'4':this['automationFrameworkDetail']={'name':_0x233181,'version':_0x5b2f31[_0x481db7(0x1cc)](getFrameworkVersion,_0x233181)};continue;}break;}}static[a68_0x2fa0f3(0x268)](_0x510b38,_0x54b2f7){return _0x510b38+':'+_0x54b2f7;}static['getCurrentInstanceName'](){const _0x5537dd=a68_0x2fa0f3;return process[_0x5537dd(0x210)]+':'+threadId;}static[a68_0x2fa0f3(0x1d5)](_0x525486){const _0x3c70d3=a68_0x2fa0f3;if(_0x525486[_0x3c70d3(0x22e)]&&_0x525486['testContextOptions'][_0x3c70d3(0x270)])return!![];return![];}static[a68_0x2fa0f3(0x200)](_0x423842){if(_0x423842['testContextOptions']&&_0x423842['testContextOptions']['skipSessionStatus'])return!![];return![];}static[a68_0x2fa0f3(0x1be)](_0x5b5519){const _0x4b5eb4=a68_0x2fa0f3,_0x51975a=new RegExp(TestFrameworkConstants[_0x4b5eb4(0x244)]);return _0x51975a['test'](_0x5b5519);}static[a68_0x2fa0f3(0x237)](_0x39e911,_0x8bcb42){const _0xc74e2f=a68_0x2fa0f3,_0x1cf477={};_0x1cf477[_0xc74e2f(0x1af)]=function(_0x85eff9,_0x2fd7a5){return _0x85eff9!==_0x2fd7a5;},_0x1cf477[_0xc74e2f(0x226)]=function(_0x14e9eb,_0x599e43){return _0x14e9eb===_0x599e43;},_0x1cf477[_0xc74e2f(0x28d)]=_0xc74e2f(0x25f);const _0x24a064=_0x1cf477;for(const [_0x2d14e8,_0x4e574f]of Object[_0xc74e2f(0x253)](_0x8bcb42)){if(_0x24a064[_0xc74e2f(0x1af)](_0x4e574f,null)&&_0x24a064[_0xc74e2f(0x226)](typeof _0x4e574f,_0x24a064[_0xc74e2f(0x28d)])&&!Array[_0xc74e2f(0x205)](_0x4e574f))_0x39e911[_0x2d14e8]=this[_0xc74e2f(0x237)](_0x39e911[_0x2d14e8]||{},_0x4e574f);else Array['isArray'](_0x4e574f)?_0x39e911[_0x2d14e8]=(_0x39e911[_0x2d14e8]||[])[_0xc74e2f(0x1cf)](_0x4e574f):_0x39e911[_0x2d14e8]=_0x4e574f;}return _0x39e911;}}function a68_0x1b32(_0x251b2b,_0x5a58ee){const _0x5a091a=a68_0x5a09();return a68_0x1b32=function(_0x1b3216,_0x33c841){_0x1b3216=_0x1b3216-0x1ad;let _0x3ecbc2=_0x5a091a[_0x1b3216];return _0x3ecbc2;},a68_0x1b32(_0x251b2b,_0x5a58ee);}module[a68_0x2fa0f3(0x21e)]=CLIUtils;function a68_0x5a09(){const _0x153900=['unlink','cli','BROWSERSTACK_BINARY_URL','Error\x20in\x20getting\x20writable\x20directory,\x20writableDir=','IprPz','util','wkyHx','zMmIR','setFrameworkDetail','LpqHf','startsWith','uqnJu','RQGNl','split','pipe','Resolving\x20with\x20stdout:\x20\x22','ItVYw','xGHgN','rLYwg','Temp\x20file\x20became\x20busy\x20and\x20no\x20existing\x20binary\x20found:\x20','3PeXKLV','../../helpers/performance/performance-tester.js','WHzVi','child_process','BROWSERSTACK_AUTOMATION_FRAMEWORK_DETAIL','.browserstack','681451tmqXXn','MRXMH','No\x20writable\x20directory\x20available\x20for\x20the\x20CLI','RsKOw','vxZOk','udpnK','shouldSkipSessionStatus','MLkut','Current\x20CLI\x20Path\x20Found:\x20','Got\x20Error\x20while\x20downloading\x20SDK\x20binary\x20file\x20%s','zkWog','isArray','Development\x20Cli\x20Path:\x20','response\x20','yIsRJ','mSTBk','bpEki','isDirectory','WNIDG','./state/testFrameworkState.js','SFltO','SDK_CLI_DOWNLOAD','pid','OmlsI','homedir','parse','Existing\x20binary\x20is\x20currently\x20in\x20use,\x20skipping\x20update\x20and\x20continuing\x20with\x20current\x20version:\x20','ofEuM','gPYJK','hwhqi','GET','bfZlF','Temp\x20file\x20is\x20busy,\x20falling\x20back\x20to\x20existing\x20binary:\x20','YRksI','Failed\x20to\x20unlink\x20temp\x20file\x20after\x20cross-device\x20copy:\x20','checkAndUpdateCli','exports','hBXJB','YCBhv','open','info','fileName','readEntry','error','doYnj','Failed\x20to\x20download\x20SDK\x20binary,\x20Exception:\x20','data','url','downloadLatestBinary','join','length','sNAdW','testContextOptions','SGcMq','basename','Unable\x20to\x20set\x20required\x20permissions\x20to\x20','0755','YYfAF','EkIDE','Using\x20BROWSERSTACK_BINARY_URL\x20from\x20env\x20variable:\x20','CLI\x20version\x20found\x20despite\x20error:\x20\x22','mergeObject','1194iwiLDG','jpSDJ','SHELL_EXECUTE_ERROR','gtNub','aQwoa','Vnfjt','downloadFileStream','vNCtr','trim','CLIUtils','1420756RZpqjw','Failed\x20to\x20delete\x20zip\x20file:\x20','HOOK_REGEX','8uSVzTo','Got\x20Error\x20in\x20SDK\x20binary\x20downloading\x20request\x20','cFTJP','development','filter','start','glVoJ','JFAlr','Downloading\x20SDK\x20binary\x20from:\x20','iaroR','../../helpers/utilities','EpuHo','downloaded_file_','automationFrameworkDetail','entries','version','reduce','unix:/tmp/sdk-platform-','GuRRA','getSdkVersion','mtime','vOXZs','entry','Error\x20in\x20setting\x20up\x20cli\x20path\x20directory,\x20Exception:\x20','test','wbgNe','object','rzAdT','.tmp.','BPCTD','./state/automationFrameworkState.js','cwd','psXdB','1331220vzkaUR','fURee','getHookRegistryKey','close','CFqVd','XmtCI','existsSync','NTAjZ','KouLf','4481528zgwIIE','skipSessionName','cli_version','getCliDir','EXDEV','OOBgs','Binary\x20is\x20busy:\x20','hMshP','code','Folder\x20does\x20not\x20exist:\x20','statSync','nJiuQ','SDK_CLI_CHECK_UPDATE','FmsXg','PpgGr','3|2|4|0|1','stringify','UQkmH','CyOos','mJiEg','includes','isFile','UnQOw','29239yYigQr','ihmFP','rename','tpsBY','timeout','MXlmM','format','EPiyL','.sock','arch','tAeWL','IAeqv','DZsWQ','warn','BROWSERSTACK_TEST_FRAMEWORK_DETAIL','closeSync','getTestFrameworkDetail','kVaip','SDK_CLI_BIN_PATH','3688695OZyhsM','ADIQC','get','YPjMp','../../helpers/classLogger.js','Resolved\x20binary\x20path:\x20','env','debug','matchHookRegex','./framework/constants/testFrameworkConstants.js','VnTXS','map','Setting\x20required\x20permissions\x20to\x20','once','YwbIh','message','../../helpers/helper','tmpdir','1036740rbIsPE','../../helpers/test-observability/utils.js','dgHhF','lazyEntries','OgPlw','zCIip','SbhQU','concat','isDevelopmentEnv','end','LmmVk','createWriteStream','getSdkLanguage','shouldSkipSessionName','path','ppgfT','../utils/apiUtilityMethods.js','requestToUpdateCLI','../../helpers/performance/constants','kBYTG','testFrameworkDetail','Test\x20or\x20Automation\x20framework\x20not\x20provided\x20testFramework=','YAqyB','Cross-device\x20rename,\x20falling\x20back\x20to\x20copy:\x20'];a68_0x5a09=function(){return _0x153900;};return a68_0x5a09();}
|