browserstack-node-sdk 1.40.0 → 1.40.1
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 +1 -1
- 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_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/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/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/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/playwrightAutomationFramework.js +1 -1
- package/src/bin/v2/framework/playwrightTestFramework.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/observabilityModule.js +1 -1
- package/src/bin/v2/modules/playwrightDriverModule.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/vanilla-js/command.js +1 -1
- package/src/browserStackSdk.js +1 -1
- package/src/helpers/BrowserStackSetup.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/processHelper.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
|
|
1
|
+
const a15_0x378f76=a15_0x2b52;(function(_0x11d667,_0x8981bc){const _0x508ef4=a15_0x2b52,_0x5b86da=_0x11d667();while(!![]){try{const _0x22b8fe=-parseInt(_0x508ef4(0x111))/0x1+-parseInt(_0x508ef4(0xd3))/0x2*(parseInt(_0x508ef4(0xdd))/0x3)+parseInt(_0x508ef4(0xdf))/0x4+parseInt(_0x508ef4(0xf8))/0x5*(-parseInt(_0x508ef4(0xc6))/0x6)+parseInt(_0x508ef4(0x10f))/0x7+-parseInt(_0x508ef4(0xca))/0x8+-parseInt(_0x508ef4(0xe8))/0x9;if(_0x22b8fe===_0x8981bc)break;else _0x5b86da['push'](_0x5b86da['shift']());}catch(_0x591985){_0x5b86da['push'](_0x5b86da['shift']());}}}(a15_0x47ff,0x4581f));const fs=require('fs'),got=require(a15_0x378f76(0xec)),{table}=require('table'),{v4:uuidv4}=require(a15_0x378f76(0xe3)),{AG_API_URL,HELP_HEADER_MESSAGE,HELP_FOOTER_MESSAGE,messageTypes,global_registry}=require(a15_0x378f76(0xf5)),{getCredentialsPath,getAuthHeader}=require(a15_0x378f76(0x114)),{sendInstrumentationEvent}=require(a15_0x378f76(0xfb));function a15_0x47ff(){const _0x4630c4=['Browserstack','error','grid-name','RWmwa','parse','pUjvj','10534WYNENi','ceNhZ','ERROR','grids','description','running','body','\x0aFound\x20the\x20following\x20grids:\x0a','clusterName','init-not-called','3dMIRlu','List\x20down\x20grids\x20configured\x20by\x20a\x20particular\x20user','2255308iEBDcb','push','INFO','FDIpq','uuid','USShR','wdcZk','epilogue','ccUQU','5657202kZTSAC','name','exit','bstackUsername','got','/packages/cli/get-grids','handler','cluster-name','argv','HVoNI','sDJpc','status','grid-id','../../config/constants','xpeTj','RAGtw','13305lrGMqB','unknown-error','server-error','../../utils/instrumentationUtils','log','forEach','UVBIH','GCxfj','ODsrc','Failed\x20to\x20fetch\x20grid\x20details\x20from\x20the\x20server.\x20Response\x20from\x20server:\x20','options','Use\x20this\x20option\x20to\x20list\x20all\x20the\x20grids\x20for\x20your\x20group.','readFileSync','username','Dqqtj','requestId','builder','password','all-grids','command','PJNuV','/packages/cli/get-all-grids','statusCode','3816974XzQOlE','help','37752MQOlPl','boolean','desc','../../utils/utilityMethods','kNubT','JfEkr','90unKQiq','Failed\x20to\x20list\x20resources!\x20Error:\x20','aujyg','allGrids','903152LPhWWZ','queued','ucADM'];a15_0x47ff=function(){return _0x4630c4;};return a15_0x47ff();}function a15_0x2b52(_0x3c1bb2,_0x1ea74c){const _0x47ff87=a15_0x47ff();return a15_0x2b52=function(_0x2b5235,_0x159960){_0x2b5235=_0x2b5235-0xc4;let _0x2ce052=_0x47ff87[_0x2b5235];return _0x2ce052;},a15_0x2b52(_0x3c1bb2,_0x1ea74c);}exports[a15_0x378f76(0x10b)]=a15_0x378f76(0xd6),exports[a15_0x378f76(0x113)]=a15_0x378f76(0xde),exports[a15_0x378f76(0x108)]=function(_0x27d0b4){const _0x415bcb=a15_0x378f76,_0x4973a5={};_0x4973a5['UVBIH']=_0x415bcb(0x103),_0x4973a5[_0x415bcb(0xd4)]=_0x415bcb(0x112),_0x4973a5['sSqcV']=_0x415bcb(0x110);const _0x37c89d=_0x4973a5,_0x5250b7={};_0x5250b7[_0x415bcb(0xd7)]=_0x37c89d[_0x415bcb(0xfe)],_0x5250b7['type']=_0x37c89d[_0x415bcb(0xd4)];const _0x20dee6={};return _0x20dee6[_0x415bcb(0x10a)]=_0x5250b7,_0x27d0b4['usage'](HELP_HEADER_MESSAGE['list']['grid'])[_0x415bcb(0xe6)](HELP_FOOTER_MESSAGE)[_0x415bcb(0x102)](_0x20dee6)[_0x415bcb(0x110)](_0x37c89d['sSqcV'])[_0x415bcb(0xf0)];},exports[a15_0x378f76(0xee)]=async function(_0x55a95a){const _0x2714b3=a15_0x378f76,_0xad0908={'wdcZk':function(_0x5df291){return _0x5df291();},'ccUQU':function(_0x2b6c7a){return _0x2b6c7a();},'ODsrc':'Credentials\x20not\x20found!\x20Ensure\x20init\x20command\x20is\x20run\x20before\x20running\x20this\x20command.','JfEkr':function(_0x4d4c95,_0x48f2ed,_0x186812,_0x35aad2,_0x547523,_0x5762bd,_0x213fe1){return _0x4d4c95(_0x48f2ed,_0x186812,_0x35aad2,_0x547523,_0x5762bd,_0x213fe1);},'ucADM':'list-grids-called','PJNuV':_0x2714b3(0xdc),'CNRbw':'GET','Dqqtj':function(_0x4cf1c2,_0x556d6a,_0x3a1949){return _0x4cf1c2(_0x556d6a,_0x3a1949);},'pUjvj':function(_0x150c7d,_0x3aa730){return _0x150c7d!==_0x3aa730;},'QhAfd':function(_0x11385c,_0x18308a){return _0x11385c===_0x18308a;},'aujyg':_0x2714b3(0xda),'USShR':_0x2714b3(0xf4),'GCxfj':_0x2714b3(0xcf),'RAGtw':_0x2714b3(0xf3),'sDJpc':_0x2714b3(0xd8),'OTAos':_0x2714b3(0xcb),'xpeTj':_0x2714b3(0xef),'FDIpq':function(_0x5a62cd,_0x1a26cf){return _0x5a62cd(_0x1a26cf);},'HVoNI':'Failed\x20to\x20fetch\x20grid\x20details\x20from\x20the\x20server.\x20Unauthorized\x20request!','RWmwa':'unauthorised','HqorN':function(_0x117ed7,_0x1633bd,_0xff7a53,_0x581561,_0x584fac,_0x10fc75,_0x36111d){return _0x117ed7(_0x1633bd,_0xff7a53,_0x581561,_0x584fac,_0x10fc75,_0x36111d);},'riljm':_0x2714b3(0xfa),'kNubT':_0x2714b3(0xf9)};try{global_registry[_0x2714b3(0x107)]=_0xad0908['wdcZk'](uuidv4);!fs['existsSync'](_0xad0908[_0x2714b3(0xe7)](getCredentialsPath))&&(console[_0x2714b3(0xce)](_0xad0908[_0x2714b3(0x100)]),await _0xad0908['JfEkr'](sendInstrumentationEvent,_0x55a95a,_0xad0908['ucADM'],messageTypes[_0x2714b3(0xd5)],_0xad0908[_0x2714b3(0x10c)],null,_0x55a95a),process[_0x2714b3(0xea)](0x1));const _0x1c41b0=JSON[_0x2714b3(0xd1)](fs[_0x2714b3(0x104)](_0xad0908[_0x2714b3(0xe5)](getCredentialsPath)));let _0x31b39b='https://'+AG_API_URL+_0x2714b3(0xed);_0x55a95a[_0x2714b3(0xc9)]&&(_0x31b39b='https://'+AG_API_URL+_0x2714b3(0x10d));const _0x8fd4d6={'method':_0xad0908['CNRbw'],'headers':_0xad0908[_0x2714b3(0x106)](getAuthHeader,_0x1c41b0[_0x2714b3(0xcd)][_0x2714b3(0x105)],_0x1c41b0[_0x2714b3(0xcd)]['password']),'throwHttpErrors':![]};global_registry[_0x2714b3(0xeb)]=_0x1c41b0['Browserstack'][_0x2714b3(0x105)],global_registry['bstackAccesskey']=_0x1c41b0[_0x2714b3(0xcd)][_0x2714b3(0x109)],_0xad0908[_0x2714b3(0xc5)](sendInstrumentationEvent,_0x55a95a,_0xad0908[_0x2714b3(0xcc)],messageTypes[_0x2714b3(0xe1)],null,null,_0x55a95a);const _0x5953ae=await _0xad0908[_0x2714b3(0x106)](got,_0x31b39b,_0x8fd4d6);if(_0xad0908[_0x2714b3(0xd2)](_0x5953ae,null)&&_0xad0908['pUjvj'](_0x5953ae,undefined)&&_0xad0908['QhAfd'](_0x5953ae['statusCode'],0xc8)){const _0x3f4235=JSON['parse'](_0x5953ae[_0x2714b3(0xd9)]);console[_0x2714b3(0xfc)](_0xad0908[_0x2714b3(0xc8)]);const _0x477a36=[];_0x477a36[_0x2714b3(0xe0)]([_0xad0908[_0x2714b3(0xe4)],_0xad0908[_0x2714b3(0xff)],_0xad0908[_0x2714b3(0xf7)],_0xad0908[_0x2714b3(0xf2)],_0xad0908['OTAos'],_0xad0908[_0x2714b3(0xf6)]]),_0x3f4235[_0x2714b3(0xfd)](_0x40b2c3=>{const _0xac8023=_0x2714b3;_0x477a36[_0xac8023(0xe0)]([_0x40b2c3['id'],_0x40b2c3[_0xac8023(0xe9)],_0x40b2c3[_0xac8023(0xf3)],_0x40b2c3['running'],_0x40b2c3['queued'],_0x40b2c3[_0xac8023(0xdb)]]);}),console[_0x2714b3(0xfc)](_0xad0908[_0x2714b3(0xe2)](table,_0x477a36)),process[_0x2714b3(0xea)](0x0);}_0xad0908['QhAfd'](_0x5953ae[_0x2714b3(0x10e)],0x191)&&(console[_0x2714b3(0xce)](_0xad0908[_0x2714b3(0xf1)]),await _0xad0908[_0x2714b3(0xc5)](sendInstrumentationEvent,_0x55a95a,_0xad0908[_0x2714b3(0xcc)],messageTypes[_0x2714b3(0xd5)],_0xad0908[_0x2714b3(0xd0)],null,_0x55a95a),process['exit'](0x1)),console[_0x2714b3(0xce)](_0x2714b3(0x101)+JSON['stringify'](_0x5953ae)),await _0xad0908['HqorN'](sendInstrumentationEvent,_0x55a95a,_0xad0908[_0x2714b3(0xcc)],messageTypes[_0x2714b3(0xd5)],_0xad0908['riljm'],_0x5953ae,_0x55a95a),process[_0x2714b3(0xea)](0x1);}catch(_0x44deab){console[_0x2714b3(0xce)](_0x2714b3(0xc7)+_0x44deab['stack']),await _0xad0908[_0x2714b3(0xc5)](sendInstrumentationEvent,_0x55a95a,_0xad0908['ucADM'],messageTypes['ERROR'],_0xad0908[_0x2714b3(0xc4)],_0x44deab,_0x55a95a),process[_0x2714b3(0xea)](0x1);}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a16_0x249e(){const _0x15e8e0=['55203YFjSea','392319cNEDpk','2akQMQZ','935473vCUTZO','Check\x20the\x20pre-requisites\x20needed\x20for\x20Automation\x20grid\x20setup','../config/constants','pyxMc','recommendCommands','epilogue','1296240MmqZsk','command','5592LMSTty','6VjYPcA','36003DEYyNL','85632mVIuUC','464LjabJh','commandDir','precheck_commands','pre-check','5380cDIuqf','demandCommand','558WVQVcL','ROWev','builder'];a16_0x249e=function(){return _0x15e8e0;};return a16_0x249e();}const a16_0x58088c=a16_0xa89c;(function(_0x40bc59,_0x444315){const _0x41821a=a16_0xa89c,_0x55c6af=_0x40bc59();while(!![]){try{const _0xdad51f=-parseInt(_0x41821a(0x196))/0x1+parseInt(_0x41821a(0x197))/0x2*(parseInt(_0x41821a(0x195))/0x3)+parseInt(_0x41821a(0x1a4))/0x4*(parseInt(_0x41821a(0x1a8))/0x5)+-parseInt(_0x41821a(0x1a1))/0x6*(parseInt(_0x41821a(0x198))/0x7)+-parseInt(_0x41821a(0x1a3))/0x8*(parseInt(_0x41821a(0x192))/0x9)+-parseInt(_0x41821a(0x19e))/0xa+parseInt(_0x41821a(0x1a2))/0xb*(parseInt(_0x41821a(0x1a0))/0xc);if(_0xdad51f===_0x444315)break;else _0x55c6af['push'](_0x55c6af['shift']());}catch(_0x34db22){_0x55c6af['push'](_0x55c6af['shift']());}}}(a16_0x249e,0x55415));const {HELP_HEADER_MESSAGE,HELP_FOOTER_MESSAGE}=require(a16_0x58088c(0x19a));function a16_0xa89c(_0x4d01b1,_0x1a1fbf){const _0x249ea9=a16_0x249e();return a16_0xa89c=function(_0xa89cf7,_0x2c12d9){_0xa89cf7=_0xa89cf7-0x191;let _0x375bf0=_0x249ea9[_0xa89cf7];return _0x375bf0;},a16_0xa89c(_0x4d01b1,_0x1a1fbf);}exports[a16_0x58088c(0x19f)]=a16_0x58088c(0x1a7),exports['desc']=a16_0x58088c(0x199),exports[a16_0x58088c(0x194)]=function(_0x22adac){const _0x2314cc=a16_0x58088c,_0x2e7ac2={};_0x2e7ac2[_0x2314cc(0x19b)]=_0x2314cc(0x1a6),_0x2e7ac2[_0x2314cc(0x193)]='help';const _0x59a2a8=_0x2e7ac2;return _0x22adac['usage'](HELP_HEADER_MESSAGE['pre_check'])[_0x2314cc(0x19d)](HELP_FOOTER_MESSAGE)[_0x2314cc(0x1a5)](_0x59a2a8[_0x2314cc(0x19b)])[_0x2314cc(0x191)]()[_0x2314cc(0x19c)]()['strict']()['help'](_0x59a2a8[_0x2314cc(0x193)]);},exports['handler']=function(_0x358a04){};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a17_0x188c25=a17_0x32c7;(function(_0xda1cf2,_0x5eade4){const _0x4d416b=a17_0x32c7,_0x374b41=_0xda1cf2();while(!![]){try{const _0x2434a7=parseInt(_0x4d416b(0x1d9))/0x1+parseInt(_0x4d416b(0x10a))/0x2*(-parseInt(_0x4d416b(0x167))/0x3)+parseInt(_0x4d416b(0x1f1))/0x4+-parseInt(_0x4d416b(0x10e))/0x5+-parseInt(_0x4d416b(0x19d))/0x6*(-parseInt(_0x4d416b(0x144))/0x7)+-parseInt(_0x4d416b(0x13d))/0x8*(parseInt(_0x4d416b(0x1be))/0x9)+parseInt(_0x4d416b(0x152))/0xa;if(_0x2434a7===_0x5eade4)break;else _0x374b41['push'](_0x374b41['shift']());}catch(_0x50452d){_0x374b41['push'](_0x374b41['shift']());}}}(a17_0x5071,0x3f26c));function a17_0x32c7(_0x14e6c6,_0x119ef3){const _0x50715c=a17_0x5071();return a17_0x32c7=function(_0x32c77a,_0x24214e){_0x32c77a=_0x32c77a-0xff;let _0x309d5f=_0x50715c[_0x32c77a];return _0x309d5f;},a17_0x32c7(_0x14e6c6,_0x119ef3);}const fs=require('fs'),ws=require('ws'),got=require('got'),{v4:uuidv4}=require('uuid'),ReconnectingWebSocket=require('reconnecting-websocket'),{getCredentialsPath,reportToGalactusAndSendToEDS,getAuthHeader,responseValidation,isUndefined,curlRequest,isTlsSupported,getSystemMetaData}=require(a17_0x188c25(0x1f2)),{logger}=require(a17_0x188c25(0x1f8)),{HELP_HEADER_MESSAGE,HELP_FOOTER_MESSAGE,global_registry,messageTypes,WS_ENDPOINT,WS_EVENTS,ALL_SUPPORTED_CLOUD_PROVIDERS,AG_API_URL,DEFAULT_CLUSTER_DETAILS}=require(a17_0x188c25(0x106)),{getCloudProviderObjectWithOutInit}=require(a17_0x188c25(0x16c)),webSocketUtils=require(a17_0x188c25(0x148)),{sendInstrumentationEvent}=require('../../utils/instrumentationUtils');exports[a17_0x188c25(0x1de)]=a17_0x188c25(0x1e4),exports[a17_0x188c25(0x101)]='Check\x20the\x20pre-requisites\x20needed\x20for\x20Automation\x20grid\x20setup',exports[a17_0x188c25(0x183)]=function(_0x4a98f9){const _0x23c5ae=a17_0x188c25,_0x45a450={};_0x45a450['KsLEZ']=_0x23c5ae(0x1d4),_0x45a450[_0x23c5ae(0x107)]=_0x23c5ae(0x1eb),_0x45a450[_0x23c5ae(0x113)]=_0x23c5ae(0x178),_0x45a450[_0x23c5ae(0x1f3)]=_0x23c5ae(0x12f),_0x45a450[_0x23c5ae(0x147)]='Use\x20an\x20existing\x20grid\x20profile\x20to\x20setup\x20the\x20Automation\x20Grid.\x20By\x20default,\x20configured\x20profile\x20is\x20used.',_0x45a450[_0x23c5ae(0x146)]=_0x23c5ae(0x123);const _0x3ff9a4=_0x45a450,_0xfffb18={};_0xfffb18[_0x23c5ae(0x156)]=_0x3ff9a4['KsLEZ'],_0xfffb18[_0x23c5ae(0x17d)]=_0x3ff9a4[_0x23c5ae(0x107)];const _0x6d66c8={};_0x6d66c8['description']=_0x3ff9a4[_0x23c5ae(0x113)],_0x6d66c8[_0x23c5ae(0x17d)]=_0x3ff9a4[_0x23c5ae(0x107)];const _0x533df0={};_0x533df0[_0x23c5ae(0x156)]=_0x3ff9a4[_0x23c5ae(0x1f3)],_0x533df0[_0x23c5ae(0x17d)]=_0x3ff9a4[_0x23c5ae(0x107)];const _0x2e5f40={};_0x2e5f40[_0x23c5ae(0x156)]=_0x3ff9a4['jhooC'],_0x2e5f40[_0x23c5ae(0x17d)]=_0x3ff9a4[_0x23c5ae(0x107)];const _0x249e9a={};return _0x249e9a['cluster-name']=_0xfffb18,_0x249e9a[_0x23c5ae(0x114)]=_0x6d66c8,_0x249e9a[_0x23c5ae(0x111)]=_0x533df0,_0x249e9a[_0x23c5ae(0x141)]=_0x2e5f40,_0x4a98f9['usage'](HELP_HEADER_MESSAGE[_0x23c5ae(0x1cc)])[_0x23c5ae(0x1b2)](HELP_FOOTER_MESSAGE)[_0x23c5ae(0x1cb)](_0x249e9a)[_0x23c5ae(0x123)](_0x3ff9a4['ONcUh'])['argv'];};function a17_0x5071(){const _0x806620=['grid-profile','push','QUURh','2667077dMavdr','\x20error\x20:\x20','ONcUh','jhooC','../../utils/webSocketUtils','tunqm','bHVli','name','qnGqQ','neLdD','socZA','IuDth','xYUud','Ejigr','782730nscWfa','body','isTrialGridAccessible','ALaJK','description','headers','Hgxjt','cEoyb','unable\x20to\x20verify\x20if\x20cluster\x20`','/packages/cli/get-all-grid-profiles','init','Tool\x20Installed','yHEJe','credential-not-found','status','IAJVR','zXDAi','KPRSO','qsdih','Report\x20saved\x20in\x20','ArEqi','13026yfszpo','.\x20Please\x20provide\x20all\x20required\x20arguments.','code','sFPGW','existsSync','../../cloudproviders/utils','getUTCHours','username','find','info','data','YUlCM','utf-8','Failure','PexqQ','xRWwF','ajvDt','Pass\x20the\x20name\x20of\x20cloud\x20provider\x20for\x20existing\x20Kubernetes\x20Cluster.','password','cqawE','clusterName','Cluster\x20`','type','negVK','authHeader','hSOSn','requestId','qwHsd','builder','stack\x20trace\x20','ibnmy','error','is\x20already\x20present','Missing\x20required\x20arguments.\x20Please\x20provide\x20either\x20grid\x20profile\x20or\x20cluster\x20details\x20(cluser-name\x20,\x20cloud\x20provider\x20&\x20region','throwHttpErrors','NhXNf','bstackAccesskey','\x20\x20Message:\x20','lisXu','CNTle','pre-check','<UsernamePlaceholder>','cloud-provider-not-supported','yPgxU','Yfatl','oCHUT','dummy-grid','\x20region\x20-\x20','response','koOWa','dfrgo','Pblfj','PzxSw','lvjZf','6WbctMK','clusterRegion','VOLaM','User\x20Access','WebSocket','WDWkG','Use\x20an\x20existing\x20grid\x20profile\x20to\x20setup\x20the\x20Automation\x20Grid.\x20By\x20default,\x20configured\x20profile\x20is\x20used.','ERROR','gridProfile','gTdIR','\x20\x20Stack:\x20','cluster-name','NfnAS','iuuSs','N/A','DjpSU','includes','llPBU','bstackUsername','nuyGE','XtXiw','epilogue','toLowerCase','pre-check-grid-profile-empty','aBbmH','sGOVx','RQitg','<PasswordPlaceholder>','error\x20stack\x20:\x20','cloudProvider','SSL\x20Configured','GET','isCliToolInstalled','1197ZZPiao','debug','Error\x20in\x20input\x20validation\x20while\x20pre-check\x20-\x20','gOMiX','DQvRW','sendEventToBackend','\x20data\x20:\x20','veZTl','ayvOp','TDUAt','QmJkf','exit','CFRpy','options','pre_check','PMZJt','pre-check-failed','stack','AiZne','usage','AUKcP','delay','Create\x20a\x20grid\x20in\x20existing\x20Kubernetes\x20Cluster\x20on\x20AWS/Azure/GCP.','LTHNm','HAzHh','iFVXA','QoxPX','369961zEKLcY','checkAccess','cyZgN','MHIOa','NcABq','command','mwiBQ','xHJMW','heFRz','2|1|0|4|3','Invalid\x20input.\x20grid\x20profiles:\x20','grid','pfMtE','rHwVg','.\x20please\x20verify\x20the\x20grid\x20profile\x20name\x20and\x20try\x20again','xzgyc','KbyuW','skSii','string','yGgKR','Status:\x20','GOeqN','split','Credentials\x20not\x20found!\x20Ensure\x20init\x20command\x20is\x20run\x20before\x20running\x20this\x20command.','1379616IvBnyn','../../utils/utilityMethods','vpKjq','eWKzx','LOG',']\x20status\x20:\x20','Invalid\x20input.\x20Currently\x20the\x20automation\x20grid\x20in\x20AWS,\x20AZURE\x20&\x20GCP\x20cloud\x20provider\x20is\x20supported\x20using\x20CLI.','../../config/logger','writeFileSync','ZuBkD','.txt','ZqnDl','ooELt','https://','Niqvq','NUgcd','desc','log/report_','yDVff','connectionTimeout','CLOUD_PROVIDER','../../config/constants','jqoKD','sCYNG','DqxxH','196bMGsjP','message','toolInstalledResp','VEHHt','1298045eckGlz','evdEZ','BHDpY','region','pre-check-grid-called','ClhEC','cloud-provider','TxcMV','readFileSync','Cwgmj','header','HBDNw','TgXem','\x20\x20Code:\x20','ZbiNM','===\x20Precheck\x20Report\x20-\x20','WJHIT','Success','AsdyN','argv','isTls1_2_SUPPORTED','help','IxYBn','will\x20be\x20created','getUTCDate','method','stringify','handler','Browserstack','PNguI','AKjWP','grid\x20profile\x20flow\x20','getUTCMinutes','Pass\x20the\x20region\x20for\x20existing\x20Kubernetes\x20Cluster.','PVgKq','\x20details\x20cannot\x20be\x20fetched\x0a\x0a','xqNZA','beEOb','replace','Message:\x20','ZLIbq','ZMiGV','\x20===\x0a\x0a','cKxTa','length','parse','KRUjE','13856FyLJeJ','fbjYt','Cluster\x20','XbfpL'];a17_0x5071=function(){return _0x806620;};return a17_0x5071();}async function inputValidation(_0x2deffd,_0x5e3bc8){const _0x51c825=a17_0x188c25,_0x597d6f={'ArEqi':_0x51c825(0x188),'koOWa':'is\x20already\x20present','wtGBg':_0x51c825(0x125),'QoxPX':_0x51c825(0x1a8),'fbjYt':_0x51c825(0x186),'VOLaM':function(_0x435d66,_0x16c6d0){return _0x435d66+_0x16c6d0;},'GOeqN':_0x51c825(0x11f),'ZqnDl':_0x51c825(0x174),'ajvDt':function(_0x5ee49c,_0x3cb380){return _0x5ee49c||_0x3cb380;},'VEHHt':'N/A','IxYBn':'Error\x20Details:\x0a','cyZgN':'region','reimV':'Create\x20a\x20grid\x20in\x20existing\x20Kubernetes\x20Cluster\x20on\x20AWS/Azure/GCP.','NUgcd':'string','Xnuyu':_0x51c825(0x178),'PexqQ':_0x51c825(0x12f),'PMZJt':_0x51c825(0x1a3),'QUURh':_0x51c825(0x123),'yGgKR':'cloud-provider','socZA':function(_0x5e0bec,_0x461254){return _0x5e0bec!==_0x461254;},'oSAoy':_0x51c825(0x193),'QDRmd':'DlRsw','mwiBQ':function(_0x22affc,_0x2d98a1){return _0x22affc===_0x2d98a1;},'Niqvq':'GtpEX','lvjZf':_0x51c825(0x18a),'gTdIR':function(_0x3747a9,_0x16e064){return _0x3747a9!==_0x16e064;},'skSii':_0x51c825(0x1aa),'TgXem':_0x51c825(0x1e1),'xHJMW':_0x51c825(0x17a),'HbMkO':_0x51c825(0x14f),'aBbmH':function(_0xf57feb,_0x41b466){return _0xf57feb>_0x41b466;},'eWKzx':_0x51c825(0x1dd),'QmJkf':_0x51c825(0x1fa),'negVK':function(_0x2969b4,_0x386dbd,_0x48077d,_0x4140a6,_0x279123,_0x334b60,_0x358034,_0x2ff88d){return _0x2969b4(_0x386dbd,_0x48077d,_0x4140a6,_0x279123,_0x334b60,_0x358034,_0x2ff88d);},'ZMiGV':_0x51c825(0x112),'sGOVx':'pre-check-cluster-args-not-passed','qsdih':_0x51c825(0x1e6),'iFVXA':_0x51c825(0x1f7),'KRUjE':_0x51c825(0x191),'RQitg':function(_0x5870e9,_0x13e6f7){return _0x5870e9===_0x13e6f7;},'Cwgmj':_0x51c825(0x161),'CNTle':_0x51c825(0x1ac),'veZTl':_0x51c825(0x132),'oCHUT':_0x51c825(0x1bc),'MfPRH':function(_0x84442a,_0x3604fc,_0x1e5150){return _0x84442a(_0x3604fc,_0x1e5150);},'sFPGW':function(_0x428c39,_0x55b002,_0x4b58b2,_0xebcce8,_0x5f0f1a,_0x20a66b){return _0x428c39(_0x55b002,_0x4b58b2,_0xebcce8,_0x5f0f1a,_0x20a66b);},'cEoyb':_0x51c825(0x18f),'neLdD':_0x51c825(0x141),'NIiGY':function(_0x4944d5,_0x5ebec4){return _0x4944d5===_0x5ebec4;},'xYUud':_0x51c825(0x103),'iTlqb':function(_0x8c3012,_0x1f0f7d){return _0x8c3012(_0x1f0f7d);},'zXDAi':function(_0x301325,_0x5ad42f){return _0x301325!==_0x5ad42f;},'TxcMV':_0x51c825(0x1d5),'lisXu':_0x51c825(0x1b4),'ZLIbq':'kKOna','pfMtE':'iaRde','qnGqQ':function(_0x3a2ccc,_0x14ea0b){return _0x3a2ccc!==_0x14ea0b;},'bkrbE':_0x51c825(0x1d0),'NQyAG':_0x51c825(0x108),'llPBU':'Grid\x20profile\x20fetched\x20for\x20pre-check','DqxxH':_0x51c825(0x155),'xRWwF':_0x51c825(0x1c1),'MHIOa':function(_0x5453ea,_0x3a47bd,_0x3818fb,_0x1b33df,_0x1ff22e,_0x53b31f,_0x40e316,_0x1903e5){return _0x5453ea(_0x3a47bd,_0x3818fb,_0x1b33df,_0x1ff22e,_0x53b31f,_0x40e316,_0x1903e5);}};let _0x5a9a59;try{if(_0x597d6f[_0x51c825(0x14e)](_0x597d6f['oSAoy'],_0x597d6f['QDRmd'])){if(_0x2deffd[_0x51c825(0x17b)]||_0x2deffd['cloudProvider']||_0x2deffd[_0x51c825(0x111)]){if(_0x597d6f['mwiBQ'](_0x597d6f[_0x51c825(0xff)],_0x597d6f[_0x51c825(0x19c)]))_0x3ebab4[_0x51c825(0x186)](_0x597d6f[_0x51c825(0x166)]),_0x231466[_0x51c825(0x1c9)](0x1);else{const _0x12a251=[];!_0x2deffd[_0x51c825(0x17b)]&&(_0x597d6f[_0x51c825(0x1a6)](_0x597d6f[_0x51c825(0x1ea)],_0x597d6f[_0x51c825(0x1ea)])?_0x5ac0ea+=_0x51c825(0x13f)+_0x3915e2[_0x51c825(0x17b)]+'\x20'+(_0x5a4bd6?_0x597d6f[_0x51c825(0x198)]:_0x597d6f['wtGBg'])+'\x0a\x0a':_0x12a251[_0x51c825(0x142)](_0x597d6f[_0x51c825(0x1d8)]));;!_0x2deffd[_0x51c825(0x1ba)]&&(_0x597d6f[_0x51c825(0x1df)](_0x597d6f[_0x51c825(0x11a)],_0x597d6f[_0x51c825(0x11a)])?_0x12a251['push'](_0x597d6f[_0x51c825(0x1ec)]):_0x488efd[_0x51c825(0x186)]('error\x20stack\x20:\x20'+_0x31a96b[_0x51c825(0x186)]['stack']));;!_0x2deffd['region']&&(_0x597d6f[_0x51c825(0x1df)](_0x597d6f[_0x51c825(0x1e0)],_0x597d6f['HbMkO'])?_0x3eca2d[_0x51c825(0x1c9)](0x1):_0x12a251[_0x51c825(0x142)](_0x597d6f[_0x51c825(0x1db)]));;_0x597d6f[_0x51c825(0x1b5)](_0x12a251[_0x51c825(0x13a)],0x0)&&(_0x597d6f[_0x51c825(0x14e)](_0x597d6f[_0x51c825(0x1f4)],_0x597d6f[_0x51c825(0x1c8)])?(_0x5a9a59='Missing\x20required\x20arguments:\x20'+_0x12a251['join'](',\x20')+_0x51c825(0x168),await _0x597d6f['negVK'](reportToGalactusAndSendToEDS,_0x2deffd,_0x5e3bc8,_0x5a9a59,messageTypes[_0x51c825(0x1a4)],_0x597d6f[_0x51c825(0x137)],_0x597d6f[_0x51c825(0x1b6)],_0x597d6f[_0x51c825(0x13e)]),logger[_0x51c825(0x186)](_0x5a9a59),process[_0x51c825(0x1c9)](0x1)):_0x36ba54[_0x51c825(0x142)](_0x597d6f['QoxPX']));if(!ALL_SUPPORTED_CLOUD_PROVIDERS[_0x51c825(0x1ad)](_0x2deffd[_0x51c825(0x1ba)][_0x51c825(0x1b3)]())){if(_0x597d6f[_0x51c825(0x1df)](_0x597d6f[_0x51c825(0x164)],_0x597d6f[_0x51c825(0x164)])){_0x5a9a59=_0x597d6f[_0x51c825(0x1d7)],await _0x597d6f[_0x51c825(0x17e)](reportToGalactusAndSendToEDS,_0x2deffd,_0x5e3bc8,_0x5a9a59,messageTypes['ERROR'],_0x597d6f[_0x51c825(0x137)],_0x597d6f[_0x51c825(0x13c)],_0x597d6f[_0x51c825(0x13e)]),logger[_0x51c825(0x186)](_0x5a9a59);if(!_0x2deffd[_0x51c825(0x1ba)]){if(_0x597d6f[_0x51c825(0x1b7)](_0x597d6f[_0x51c825(0x117)],_0x597d6f[_0x51c825(0x18e)])){const _0xdd5588={};_0xdd5588[_0x51c825(0x17d)]=_0xee32a8['LOG'],_0xdd5588[_0x51c825(0x10b)]=_0x232b70,_0x3aeb35[_0x51c825(0x1c3)](_0x48daba,_0xdd5588,_0x597d6f[_0x51c825(0x13e)],!![]);}else logger[_0x51c825(0x170)]('Setting\x20cloud\x20provider\x20as\x20'+DEFAULT_CLUSTER_DETAILS[_0x51c825(0x105)]+'\x20'),_0x2deffd['cloudProvider']=DEFAULT_CLUSTER_DETAILS['CLOUD_PROVIDER'];}}else _0x32600c[_0x51c825(0x170)]('Setting\x20cloud\x20provider\x20as\x20'+_0x38e524[_0x51c825(0x105)]+'\x20'),_0x20bd75['cloudProvider']=_0x34745d[_0x51c825(0x105)];}global_registry[_0x51c825(0x17b)]=_0x2deffd[_0x51c825(0x17b)],global_registry[_0x51c825(0x1ba)]=_0x2deffd['cloudProvider'],global_registry['clusterRegion']=_0x2deffd[_0x51c825(0x111)];}}else{if(_0x2deffd[_0x51c825(0x1a5)]){if(_0x597d6f['gTdIR'](_0x597d6f[_0x51c825(0x1c5)],_0x597d6f[_0x51c825(0x1c5)]))_0x3c6ba4['info']('['+_0x36578b+_0x51c825(0x1f6)+_0x33e15c['status']+_0x51c825(0x1c4)+_0x417db9['data']+_0x51c825(0x145)+_0xf5a45c['error']),_0x5767d6[_0x51c825(0x186)]&&_0x165d0a[_0x51c825(0x186)](_0x51c825(0x1b9)+_0x46f159['error'][_0x51c825(0x1cf)]);else{global_registry[_0x51c825(0x1a5)]=_0x2deffd[_0x51c825(0x1a5)],logger[_0x51c825(0x1bf)](_0x51c825(0x12d)+_0x2deffd['gridProfile']);const _0x500ee9=_0x51c825(0x1fe)+AG_API_URL+_0x51c825(0x15b),_0x56f886={};_0x56f886[_0x51c825(0x127)]=_0x597d6f[_0x51c825(0x194)],_0x56f886[_0x51c825(0x157)]=global_registry[_0x51c825(0x17f)],_0x56f886[_0x51c825(0x189)]=![];const _0x108d39=_0x56f886,_0x1ff6ac=await _0x597d6f['MfPRH'](got,_0x500ee9,_0x108d39),_0x4b8819=await _0x597d6f[_0x51c825(0x16a)](responseValidation,_0x1ff6ac,_0x597d6f[_0x51c825(0x159)],_0x597d6f[_0x51c825(0x14d)],_0x2deffd,_0x5e3bc8);let _0x5884f1={};if(_0x597d6f['NIiGY'](_0x4b8819,0xc8)){if(_0x597d6f['gTdIR'](_0x597d6f[_0x51c825(0x150)],_0x597d6f[_0x51c825(0x150)])){const {header:_0x24ae79,response:_0x250de4}=_0x1a75c6,{status:_0x527b29,data:_0x38aa1d,error:_0x1f2a96}=_0x250de4;_0x4c5344+=_0x24ae79+'\x20#'+_0x597d6f[_0x51c825(0x19f)](_0x23d6cd,0x1)+'\x0a',_0x459fd8+=_0x51c825(0x1ed)+(_0x527b29?_0x597d6f[_0x51c825(0x1ee)]:_0x597d6f[_0x51c825(0x1fc)])+'\x0a',_0x292155+=_0x51c825(0x135)+_0x597d6f[_0x51c825(0x177)](_0x38aa1d,_0x597d6f[_0x51c825(0x10d)])+'\x0a',_0x1f2a96&&(_0x351562+=_0x597d6f['IxYBn'],_0x11499f+=_0x51c825(0x18c)+(_0x1f2a96[_0x51c825(0x10b)]||_0x597d6f[_0x51c825(0x10d)])+'\x0a',_0x14704a+='\x20\x20Code:\x20'+(_0x1f2a96['code']||_0x597d6f[_0x51c825(0x10d)])+'\x0a',_0x29e194+=_0x51c825(0x1a7)+(_0x1f2a96[_0x51c825(0x1cf)]||_0x597d6f[_0x51c825(0x10d)])+'\x0a'),_0x2a7080+='\x0a\x0a';}else{const _0x17ad45=JSON[_0x51c825(0x13b)](_0x1ff6ac[_0x51c825(0x153)]),_0x576e1f=_0x17ad45[_0x51c825(0x16f)](_0x2749d0=>_0x2749d0[_0x51c825(0x14b)]===_0x2deffd[_0x51c825(0x1a5)])||null;if(_0x597d6f['iTlqb'](isUndefined,_0x576e1f))_0x597d6f[_0x51c825(0x162)](_0x597d6f[_0x51c825(0x115)],_0x597d6f[_0x51c825(0x115)])?_0x5b6877[_0x51c825(0x142)](_0x597d6f['cyZgN']):(_0x5a9a59=_0x51c825(0x1e3)+_0x2deffd[_0x51c825(0x1a5)]+_0x51c825(0x1e7),await _0x597d6f['negVK'](reportToGalactusAndSendToEDS,_0x2deffd,_0x5e3bc8,_0x5a9a59,messageTypes['ERROR'],_0x597d6f['ZMiGV'],_0x597d6f[_0x51c825(0x18d)],_0x597d6f[_0x51c825(0x13e)]),logger[_0x51c825(0x186)](_0x5a9a59),process[_0x51c825(0x1c9)](0x1));else{if(_0x597d6f['zXDAi'](_0x597d6f[_0x51c825(0x136)],_0x597d6f[_0x51c825(0x1e5)]))_0x5884f1=_0x576e1f;else{const _0x31addb={};_0x31addb[_0x51c825(0x156)]=_0x597d6f['reimV'],_0x31addb[_0x51c825(0x17d)]=_0x597d6f[_0x51c825(0x100)];const _0x11b362={};_0x11b362[_0x51c825(0x156)]=_0x597d6f['Xnuyu'],_0x11b362[_0x51c825(0x17d)]=_0x597d6f['NUgcd'];const _0x33195d={};_0x33195d[_0x51c825(0x156)]=_0x597d6f[_0x51c825(0x175)],_0x33195d[_0x51c825(0x17d)]=_0x597d6f['NUgcd'];const _0x1ebc29={};_0x1ebc29['description']=_0x597d6f[_0x51c825(0x1cd)],_0x1ebc29[_0x51c825(0x17d)]=_0x597d6f[_0x51c825(0x100)];const _0x124c08={};return _0x124c08[_0x51c825(0x1a8)]=_0x31addb,_0x124c08[_0x51c825(0x114)]=_0x11b362,_0x124c08['region']=_0x33195d,_0x124c08[_0x51c825(0x141)]=_0x1ebc29,_0x7f3b23[_0x51c825(0x1d1)](_0x2f850f['pre_check'])[_0x51c825(0x1b2)](_0x3d2f94)[_0x51c825(0x1cb)](_0x124c08)[_0x51c825(0x123)](_0x597d6f[_0x51c825(0x143)])[_0x51c825(0x121)];}}}}else _0x597d6f[_0x51c825(0x14c)](_0x597d6f['bkrbE'],_0x597d6f['NQyAG'])?process['exit'](0x1):_0x88cbcf=_0x306575;const _0x181fe9={};_0x181fe9[_0x51c825(0x17d)]=WS_EVENTS[_0x51c825(0x1f5)],_0x181fe9[_0x51c825(0x10b)]=_0x597d6f[_0x51c825(0x1ae)],webSocketUtils[_0x51c825(0x1c3)](_0x5e3bc8,_0x181fe9),global_registry[_0x51c825(0x1ba)]=_0x5884f1[_0x51c825(0x1ba)],global_registry[_0x51c825(0x19e)]=_0x5884f1[_0x51c825(0x111)],global_registry[_0x51c825(0x17b)]=_0x5884f1[_0x51c825(0x17b)];}}else _0x597d6f[_0x51c825(0x1df)](_0x597d6f[_0x51c825(0x109)],_0x597d6f['DqxxH'])?(logger[_0x51c825(0x186)](_0x597d6f[_0x51c825(0x166)]),process[_0x51c825(0x1c9)](0x1)):_0x53f0d9+='Cluster\x20'+_0x551818[_0x51c825(0x17b)]+_0x51c825(0x131);}}else _0x5a3537+=_0x597d6f[_0x51c825(0x124)],_0x50bfb9+='\x20\x20Message:\x20'+(_0x504fee['message']||_0x597d6f[_0x51c825(0x10d)])+'\x0a',_0x1039b2+=_0x51c825(0x11b)+(_0xd51d50[_0x51c825(0x169)]||_0x597d6f[_0x51c825(0x10d)])+'\x0a',_0x5b7594+=_0x51c825(0x1a7)+(_0x5651bb[_0x51c825(0x1cf)]||_0x597d6f[_0x51c825(0x10d)])+'\x0a';}catch(_0x3cdaf6){_0x597d6f['RQitg'](_0x597d6f[_0x51c825(0x176)],_0x597d6f['xRWwF'])?(_0x5a9a59=_0x51c825(0x1c0)+_0x3cdaf6+':\x20'+_0x3cdaf6[_0x51c825(0x1cf)],logger[_0x51c825(0x186)](_0x5a9a59),await _0x597d6f[_0x51c825(0x1dc)](reportToGalactusAndSendToEDS,_0x2deffd,_0x5e3bc8,_0x5a9a59,messageTypes[_0x51c825(0x1a4)],_0x597d6f[_0x51c825(0x137)],_0x597d6f[_0x51c825(0x13c)],_0x597d6f[_0x51c825(0x13e)]),process[_0x51c825(0x1c9)](0x1)):_0x5df2cb[_0x51c825(0x142)](_0x597d6f[_0x51c825(0x1ec)]);}}function printResponse(_0x4e4742,_0x29dd9f){const _0x214dbb=a17_0x188c25,_0x14f03b={};_0x14f03b[_0x214dbb(0x15e)]=function(_0x4f935f,_0x54779c){return _0x4f935f!==_0x54779c;},_0x14f03b[_0x214dbb(0x149)]=_0x214dbb(0x119);const _0x178a79=_0x14f03b;logger[_0x214dbb(0x170)]('['+_0x4e4742+_0x214dbb(0x1f6)+_0x29dd9f[_0x214dbb(0x160)]+'\x20data\x20:\x20'+_0x29dd9f[_0x214dbb(0x171)]+_0x214dbb(0x145)+_0x29dd9f[_0x214dbb(0x186)]),_0x29dd9f[_0x214dbb(0x186)]&&(_0x178a79[_0x214dbb(0x15e)](_0x178a79[_0x214dbb(0x149)],_0x178a79[_0x214dbb(0x149)])?_0x33d9c0[_0x214dbb(0x170)]('Cluster\x20`'+_0x5c5e41[_0x214dbb(0x17b)]+'`\x20already\x20exists'):logger[_0x214dbb(0x186)](_0x214dbb(0x1b9)+_0x29dd9f['error']['stack']));}async function generateReport(_0xbc1cad,_0x34afee){const _0x1125b4=a17_0x188c25,_0x55e2d8={'beEOb':function(_0x4adac0,_0x5e91c2){return _0x4adac0+_0x5e91c2;},'KPRSO':_0x1125b4(0x11f),'WDWkG':_0x1125b4(0x174),'aXAwi':function(_0x38dce0,_0x63bd59){return _0x38dce0||_0x63bd59;},'bHVli':_0x1125b4(0x1ab),'WJHIT':'Error\x20Details:\x0a','xzgyc':'Cluster\x20details\x0a-----------------------\x0a','AUKcP':function(_0x2cd85e,_0x90d03e){return _0x2cd85e!=_0x90d03e;},'HMJGJ':_0x1125b4(0x187),'AKjWP':_0x1125b4(0x125),'hSOSn':function(_0x36a8cd){return _0x36a8cd();}};let _0x19994c=_0x1125b4(0x11d)+global_registry[_0x1125b4(0x1ba)]+_0x1125b4(0x138);return _0xbc1cad['forEach']((_0x531d5d,_0x19d58c)=>{const _0x2c1b76=_0x1125b4,{header:_0x423222,response:_0x4e11fd}=_0x531d5d,{status:_0x3817ea,data:_0x15eef5,error:_0x14e595}=_0x4e11fd;_0x19994c+=_0x423222+'\x20#'+_0x55e2d8[_0x2c1b76(0x133)](_0x19d58c,0x1)+'\x0a',_0x19994c+=_0x2c1b76(0x1ed)+(_0x3817ea?_0x55e2d8[_0x2c1b76(0x163)]:_0x55e2d8[_0x2c1b76(0x1a2)])+'\x0a',_0x19994c+=_0x2c1b76(0x135)+_0x55e2d8['aXAwi'](_0x15eef5,_0x55e2d8[_0x2c1b76(0x14a)])+'\x0a',_0x14e595&&(_0x19994c+=_0x55e2d8[_0x2c1b76(0x11e)],_0x19994c+=_0x2c1b76(0x18c)+(_0x14e595[_0x2c1b76(0x10b)]||_0x55e2d8['bHVli'])+'\x0a',_0x19994c+=_0x2c1b76(0x11b)+(_0x14e595[_0x2c1b76(0x169)]||_0x55e2d8[_0x2c1b76(0x14a)])+'\x0a',_0x19994c+=_0x2c1b76(0x1a7)+(_0x14e595[_0x2c1b76(0x1cf)]||_0x55e2d8[_0x2c1b76(0x14a)])+'\x0a'),_0x19994c+='\x0a\x0a';}),_0x19994c+=_0x55e2d8[_0x1125b4(0x1e8)],_0x55e2d8[_0x1125b4(0x1d2)](_0x34afee,null)?_0x19994c+='Cluster\x20'+global_registry[_0x1125b4(0x17b)]+'\x20'+(_0x34afee?_0x55e2d8['HMJGJ']:_0x55e2d8[_0x1125b4(0x12c)])+'\x0a\x0a':_0x19994c+='Cluster\x20'+global_registry[_0x1125b4(0x17b)]+_0x1125b4(0x131),_0x19994c+=_0x55e2d8[_0x1125b4(0x180)](getSystemMetaData),_0x19994c;};exports[a17_0x188c25(0x129)]=async function(_0x4d37ab){const _0x462707=a17_0x188c25,_0x57fb60={'ayvOp':function(_0x5e9ae5){return _0x5e9ae5();},'KbyuW':function(_0x5f2c1b){return _0x5f2c1b();},'RjXGh':_0x462707(0x1f0),'Hgxjt':function(_0x235928,_0x17057e,_0x5aa3ae,_0x378e9c,_0x140657,_0x275654,_0x4e6ba9,_0x4aed8d){return _0x235928(_0x17057e,_0x5aa3ae,_0x378e9c,_0x140657,_0x275654,_0x4e6ba9,_0x4aed8d);},'evdEZ':'pre-check-grid-called','PNguI':_0x462707(0x15f),'nuyGE':_0x462707(0x186),'HAzHh':function(_0x3b6aea,_0x13f505,_0xbc3971,_0x137df2,_0x410930,_0x109825,_0x6203ee){return _0x3b6aea(_0x13f505,_0xbc3971,_0x137df2,_0x410930,_0x109825,_0x6203ee);},'NfnAS':_0x462707(0x190),'XtXiw':_0x462707(0x1b8),'CFRpy':function(_0x47c9cc,_0x3e147e,_0x50db3b){return _0x47c9cc(_0x3e147e,_0x50db3b);},'DQvRW':function(_0x4b5cc5,_0x140670,_0x45de75,_0x5a5f2c,_0x5e8766,_0x2f4788,_0x34db48){return _0x4b5cc5(_0x140670,_0x45de75,_0x5a5f2c,_0x5e8766,_0x2f4788,_0x34db48);},'cKxTa':_0x462707(0x195),'yPgxU':function(_0x50e014,_0x34a3dc,_0x9fb695){return _0x50e014(_0x34a3dc,_0x9fb695);},'fMupQ':_0x462707(0x10c),'ibnmy':_0x462707(0x1e2),'qwHsd':function(_0x3ffafa,_0x4fe24c,_0x3b7725){return _0x3ffafa(_0x4fe24c,_0x3b7725);},'ZbiNM':'accessResp','qGFEM':function(_0x26897a,_0x56ae30,_0x301c5e){return _0x26897a(_0x56ae30,_0x301c5e);},'PVgKq':_0x462707(0x154),'dfrgo':function(_0x47205f,_0x44b5c8){return _0x47205f(_0x44b5c8);},'AsdyN':'TLSv1_2_client_method','Pblfj':function(_0x18fd48,_0x55d00c,_0x1ff609){return _0x18fd48(_0x55d00c,_0x1ff609);},'znIzU':_0x462707(0x122),'Rpseq':_0x462707(0x15d),'BHDpY':_0x462707(0x1a0),'QojrK':'Whitelisted\x20browserstack','ooELt':_0x462707(0x1bb),'YUlCM':function(_0x157f74,_0x3fa133,_0x404991){return _0x157f74(_0x3fa133,_0x404991);},'Ejigr':function(_0x29db91,_0x2ec9d6){return _0x29db91+_0x2ec9d6;},'PzxSw':_0x462707(0x173),'TDUAt':function(_0x2ad5f4,_0xc937a9,_0x560455,_0x5eb36f,_0x41e7d9,_0x4742e1,_0x1d3ce3){return _0x2ad5f4(_0xc937a9,_0x560455,_0x5eb36f,_0x41e7d9,_0x4742e1,_0x1d3ce3);},'XbfpL':_0x462707(0x1ce)};let _0x494bf8,_0x18e4fa;try{global_registry[_0x462707(0x181)]=_0x57fb60[_0x462707(0x1c6)](uuidv4);!fs[_0x462707(0x16b)](_0x57fb60[_0x462707(0x1e9)](getCredentialsPath))&&(_0x18e4fa=_0x57fb60['RjXGh'],logger[_0x462707(0x186)](_0x18e4fa),await _0x57fb60['Hgxjt'](reportToGalactusAndSendToEDS,_0x4d37ab,_0x494bf8,_0x18e4fa,messageTypes[_0x462707(0x1a4)],_0x57fb60['evdEZ'],_0x57fb60[_0x462707(0x12b)],_0x57fb60[_0x462707(0x1b0)]),process['exit'](0x1));_0x57fb60[_0x462707(0x1d6)](sendInstrumentationEvent,_0x4d37ab,_0x57fb60[_0x462707(0x10f)],messageTypes['INFO'],null,null,_0x4d37ab);const _0x37fb96=JSON[_0x462707(0x13b)](fs[_0x462707(0x116)](_0x57fb60[_0x462707(0x1e9)](getCredentialsPath)));global_registry['bstackUsername']=_0x37fb96[_0x462707(0x12a)][_0x462707(0x16e)],global_registry[_0x462707(0x18b)]=_0x37fb96[_0x462707(0x12a)][_0x462707(0x179)];const _0x22ca46=WS_ENDPOINT[_0x462707(0x134)](_0x57fb60[_0x462707(0x1a9)],_0x37fb96[_0x462707(0x12a)][_0x462707(0x16e)])[_0x462707(0x134)](_0x57fb60[_0x462707(0x1b1)],_0x37fb96[_0x462707(0x12a)][_0x462707(0x179)]),_0x4bfd80={};_0x4bfd80[_0x462707(0x1a1)]=ws,_0x4bfd80[_0x462707(0x104)]=0x36ee80,_0x494bf8=new ReconnectingWebSocket(_0x22ca46,[],_0x4bfd80),global_registry[_0x462707(0x17f)]=_0x57fb60[_0x462707(0x1ca)](getAuthHeader,global_registry[_0x462707(0x1af)],global_registry['bstackAccesskey']),await _0x57fb60['CFRpy'](inputValidation,_0x4d37ab,_0x494bf8),logger[_0x462707(0x170)]('Pre-check\x20running\x20for\x20Cloud\x20-\x20'+global_registry['cloudProvider']+_0x462707(0x196)+global_registry[_0x462707(0x19e)]);let _0x47a688=await _0x57fb60[_0x462707(0x1c2)](getCloudProviderObjectWithOutInit,global_registry[_0x462707(0x1ba)],global_registry[_0x462707(0x17b)],_0x57fb60[_0x462707(0x139)],_0x494bf8,webSocketUtils,_0x4d37ab);const _0x3443be=await _0x47a688[_0x462707(0x1bd)]();_0x57fb60[_0x462707(0x192)](printResponse,_0x57fb60['fMupQ'],_0x3443be),_0x47a688=await _0x47a688[_0x462707(0x15c)]();let _0x1df9f5=![];try{_0x1df9f5=await _0x47a688['isClusterPresent']();}catch(_0x996b4e){const _0x4f2cf5=_0x57fb60[_0x462707(0x185)][_0x462707(0x1ef)]('|');let _0x210023=0x0;while(!![]){switch(_0x4f2cf5[_0x210023++]){case'0':logger[_0x462707(0x186)](_0x18e4fa);continue;case'1':_0x1df9f5=null;continue;case'2':_0x18e4fa=_0x462707(0x15a)+global_registry['clusterName']+'`\x20is\x20present\x20in\x20region\x20`'+global_registry['clusterRegion']+'`\x20,error\x20:\x20'+_0x996b4e;continue;case'3':await _0x57fb60[_0x462707(0x158)](reportToGalactusAndSendToEDS,_0x4d37ab,_0x494bf8,_0x18e4fa,messageTypes[_0x462707(0x1a4)],_0x57fb60[_0x462707(0x10f)],'cluster-check-failed-'+global_registry[_0x462707(0x1ba)],_0x57fb60[_0x462707(0x1b0)]);continue;case'4':_0x18e4fa+='\x0a'+JSON[_0x462707(0x128)](_0x996b4e[_0x462707(0x1cf)]);continue;}break;}}_0x1df9f5&&logger[_0x462707(0x170)](_0x462707(0x17c)+global_registry[_0x462707(0x17b)]+'`\x20already\x20exists');const _0x245efe=await _0x47a688[_0x462707(0x1da)]();_0x57fb60[_0x462707(0x182)](printResponse,_0x57fb60[_0x462707(0x11c)],_0x245efe);const _0x1e30b2=await _0x57fb60[_0x462707(0x1c6)](curlRequest);_0x57fb60['qGFEM'](printResponse,_0x57fb60[_0x462707(0x130)],_0x1e30b2);const _0x544ea8=await _0x57fb60[_0x462707(0x199)](isTlsSupported,_0x57fb60[_0x462707(0x120)]);_0x57fb60[_0x462707(0x19a)](printResponse,_0x57fb60['znIzU'],_0x544ea8);const _0x40f096={};_0x40f096[_0x462707(0x118)]=_0x57fb60['Rpseq'],_0x40f096['response']=_0x3443be;const _0x4b136b={};_0x4b136b[_0x462707(0x118)]=_0x57fb60[_0x462707(0x110)],_0x4b136b[_0x462707(0x197)]=_0x245efe;const _0x5cc740={};_0x5cc740['header']=_0x57fb60['QojrK'],_0x5cc740[_0x462707(0x197)]=_0x1e30b2;const _0x40ea71={};_0x40ea71[_0x462707(0x118)]=_0x57fb60[_0x462707(0x1fd)],_0x40ea71[_0x462707(0x197)]=_0x544ea8;const _0x53df8d=[_0x40f096,_0x4b136b,_0x5cc740,_0x40ea71],_0x1b8992=await _0x57fb60[_0x462707(0x172)](generateReport,_0x53df8d,_0x1df9f5),_0x495d9e=new Date(),_0x44533e=_0x495d9e['getUTCFullYear']()+'_'+_0x57fb60[_0x462707(0x151)](_0x495d9e['getUTCMonth'](),0x1)+'_'+_0x495d9e[_0x462707(0x126)]()+'_'+_0x495d9e[_0x462707(0x16d)]()+'_'+_0x495d9e[_0x462707(0x12e)](),_0x44cb9c=_0x462707(0x102)+_0x44533e+_0x462707(0x1fb);fs[_0x462707(0x1f9)](_0x44cb9c,_0x1b8992,_0x57fb60[_0x462707(0x19b)]),logger[_0x462707(0x170)](_0x462707(0x165)+_0x44cb9c),process[_0x462707(0x1c9)](0x0);}catch(_0x30f7f7){let _0x2ad2f9='Failed\x20in\x20pre-check!\x20Error:\x20'+_0x30f7f7+'\x20';logger['error'](_0x2ad2f9),_0x2ad2f9+='\x0a'+JSON['stringify'](_0x30f7f7[_0x462707(0x1cf)]),logger['debug'](_0x462707(0x184)+_0x30f7f7[_0x462707(0x1cf)]);if(_0x494bf8){const _0x2551c1={};_0x2551c1[_0x462707(0x17d)]=WS_EVENTS[_0x462707(0x1f5)],_0x2551c1[_0x462707(0x10b)]=_0x2ad2f9,webSocketUtils['sendEventToBackend'](_0x494bf8,_0x2551c1,_0x57fb60['nuyGE'],!![]);}await webSocketUtils[_0x462707(0x1d3)](0x7d0);const _0x46bed1={};_0x46bed1['error']=_0x2ad2f9,await _0x57fb60[_0x462707(0x1c7)](sendInstrumentationEvent,_0x4d37ab,_0x57fb60['evdEZ'],messageTypes['ERROR'],_0x57fb60[_0x462707(0x140)],_0x46bed1,_0x4d37ab),process[_0x462707(0x1c9)](0x1);}};
|
|
1
|
+
const a17_0x4d6df3=a17_0x3fdd;(function(_0x15f132,_0x46d99b){const _0x46f14d=a17_0x3fdd,_0x3d12b9=_0x15f132();while(!![]){try{const _0xb05938=parseInt(_0x46f14d(0x23c))/0x1*(parseInt(_0x46f14d(0x25a))/0x2)+-parseInt(_0x46f14d(0x1d1))/0x3+-parseInt(_0x46f14d(0x261))/0x4*(parseInt(_0x46f14d(0x1fd))/0x5)+parseInt(_0x46f14d(0x228))/0x6*(-parseInt(_0x46f14d(0x23b))/0x7)+-parseInt(_0x46f14d(0x273))/0x8*(-parseInt(_0x46f14d(0x290))/0x9)+-parseInt(_0x46f14d(0x244))/0xa*(-parseInt(_0x46f14d(0x2a3))/0xb)+parseInt(_0x46f14d(0x2aa))/0xc*(parseInt(_0x46f14d(0x1fa))/0xd);if(_0xb05938===_0x46d99b)break;else _0x3d12b9['push'](_0x3d12b9['shift']());}catch(_0x26dc7f){_0x3d12b9['push'](_0x3d12b9['shift']());}}}(a17_0x364d,0xe012b));const fs=require('fs'),ws=require('ws'),got=require(a17_0x4d6df3(0x238)),{v4:uuidv4}=require('uuid'),ReconnectingWebSocket=require(a17_0x4d6df3(0x294)),{getCredentialsPath,reportToGalactusAndSendToEDS,getAuthHeader,responseValidation,isUndefined,curlRequest,isTlsSupported,getSystemMetaData}=require(a17_0x4d6df3(0x219)),{logger}=require('../../config/logger'),{HELP_HEADER_MESSAGE,HELP_FOOTER_MESSAGE,global_registry,messageTypes,WS_ENDPOINT,WS_EVENTS,ALL_SUPPORTED_CLOUD_PROVIDERS,AG_API_URL,DEFAULT_CLUSTER_DETAILS}=require(a17_0x4d6df3(0x275)),{getCloudProviderObjectWithOutInit}=require(a17_0x4d6df3(0x270)),webSocketUtils=require(a17_0x4d6df3(0x1de)),{sendInstrumentationEvent}=require(a17_0x4d6df3(0x2b9));exports['command']=a17_0x4d6df3(0x1f0),exports[a17_0x4d6df3(0x279)]='Check\x20the\x20pre-requisites\x20needed\x20for\x20Automation\x20grid\x20setup',exports[a17_0x4d6df3(0x1fb)]=function(_0x5e9b16){const _0x1bcafa=a17_0x4d6df3,_0x59e248={};_0x59e248['UkJEA']=_0x1bcafa(0x24e),_0x59e248[_0x1bcafa(0x204)]=_0x1bcafa(0x1fe),_0x59e248['mlRwR']=_0x1bcafa(0x24d),_0x59e248[_0x1bcafa(0x2a6)]=_0x1bcafa(0x232),_0x59e248[_0x1bcafa(0x1f5)]=_0x1bcafa(0x1ed),_0x59e248[_0x1bcafa(0x285)]='help';const _0x547f2f=_0x59e248,_0x38dbeb={};_0x38dbeb[_0x1bcafa(0x281)]=_0x547f2f[_0x1bcafa(0x236)],_0x38dbeb[_0x1bcafa(0x200)]=_0x547f2f[_0x1bcafa(0x204)];const _0x43cb46={};_0x43cb46[_0x1bcafa(0x281)]=_0x547f2f[_0x1bcafa(0x222)],_0x43cb46[_0x1bcafa(0x200)]=_0x547f2f['yxVis'];const _0x173a31={};_0x173a31[_0x1bcafa(0x281)]=_0x547f2f[_0x1bcafa(0x2a6)],_0x173a31[_0x1bcafa(0x200)]=_0x547f2f[_0x1bcafa(0x204)];const _0x689bda={};_0x689bda[_0x1bcafa(0x281)]=_0x547f2f[_0x1bcafa(0x1f5)],_0x689bda['type']=_0x547f2f[_0x1bcafa(0x204)];const _0x1dd168={};return _0x1dd168['cluster-name']=_0x38dbeb,_0x1dd168['cloud-provider']=_0x43cb46,_0x1dd168[_0x1bcafa(0x2b2)]=_0x173a31,_0x1dd168[_0x1bcafa(0x20f)]=_0x689bda,_0x5e9b16['usage'](HELP_HEADER_MESSAGE['pre_check'])[_0x1bcafa(0x21d)](HELP_FOOTER_MESSAGE)['options'](_0x1dd168)['help'](_0x547f2f['MoRHl'])[_0x1bcafa(0x29b)];};function a17_0x3fdd(_0x406177,_0x319f1e){const _0x364dd5=a17_0x364d();return a17_0x3fdd=function(_0x3fddb9,_0x550af8){_0x3fddb9=_0x3fddb9-0x1cf;let _0x552530=_0x364dd5[_0x3fddb9];return _0x552530;},a17_0x3fdd(_0x406177,_0x319f1e);}async function inputValidation(_0x3b6867,_0x57765b){const _0x2a14b9=a17_0x4d6df3,_0x1a08af={'APeQN':'Create\x20a\x20grid\x20in\x20existing\x20Kubernetes\x20Cluster\x20on\x20AWS/Azure/GCP.','SKnBh':'string','vNoGX':_0x2a14b9(0x24d),'wHZba':'Pass\x20the\x20region\x20for\x20existing\x20Kubernetes\x20Cluster.','KIvJx':'Use\x20an\x20existing\x20grid\x20profile\x20to\x20setup\x20the\x20Automation\x20Grid.\x20By\x20default,\x20configured\x20profile\x20is\x20used.','bdfoN':_0x2a14b9(0x28c),'ZKfPC':_0x2a14b9(0x2b2),'HUGxW':function(_0x25fea7,_0x43bd43){return _0x25fea7+_0x43bd43;},'suRIz':'Success','yUCCy':'Failure','xwOLl':function(_0x2e10f2,_0x252441){return _0x2e10f2||_0x252441;},'pPVgu':'N/A','cazCM':'Error\x20Details:\x0a','LnXUQ':_0x2a14b9(0x1e4),'LPmsC':_0x2a14b9(0x1dd),'YXNzK':'will\x20be\x20created','Duzul':_0x2a14b9(0x1ef),'pNdQa':_0x2a14b9(0x2c0),'wRhkY':_0x2a14b9(0x26a),'mtnlj':function(_0x2351a8,_0x22eb14){return _0x2351a8!==_0x22eb14;},'ZwYMr':'nGqfN','fQprI':function(_0x57c49d,_0x1c4c18){return _0x57c49d!==_0x1c4c18;},'FGdEe':_0x2a14b9(0x1d3),'TYVGb':function(_0x520cd6,_0xa254a0){return _0x520cd6!==_0xa254a0;},'QUFyX':_0x2a14b9(0x234),'aGBmC':function(_0x3b92b0,_0x2ef9c8){return _0x3b92b0===_0x2ef9c8;},'mLBPk':_0x2a14b9(0x20b),'ZEAuf':_0x2a14b9(0x2b4),'CWyKy':_0x2a14b9(0x283),'HxMsO':function(_0x49abdb,_0x231ba3){return _0x49abdb>_0x231ba3;},'CIAea':_0x2a14b9(0x27d),'EXArD':'qFgQR','huWvO':function(_0x379f82,_0x4d5de0,_0x502df1,_0xbe7a89,_0x56ab1c,_0x192457,_0x56afee,_0x23cd27){return _0x379f82(_0x4d5de0,_0x502df1,_0xbe7a89,_0x56ab1c,_0x192457,_0x56afee,_0x23cd27);},'dROKC':_0x2a14b9(0x257),'fYoQh':'pre-check-cluster-args-not-passed','fIxlN':function(_0x18c409,_0x2f1f71){return _0x18c409!==_0x2f1f71;},'Rsxjx':_0x2a14b9(0x1f3),'Pkwld':_0x2a14b9(0x272),'SKzpr':function(_0x2682de,_0x1ee2c4,_0x5d4cc5,_0x19b6c7,_0x518d6d,_0x33a71b,_0x392ff9,_0x59596a){return _0x2682de(_0x1ee2c4,_0x5d4cc5,_0x19b6c7,_0x518d6d,_0x33a71b,_0x392ff9,_0x59596a);},'sedev':_0x2a14b9(0x2a0),'dxAEs':'aNsgx','vujzH':function(_0x454bfc,_0x28d8a3){return _0x454bfc===_0x28d8a3;},'vHgog':_0x2a14b9(0x1e6),'HhpIf':_0x2a14b9(0x231),'fOeoD':function(_0x3b157b,_0x43eb5e,_0x438211){return _0x3b157b(_0x43eb5e,_0x438211);},'eGSNu':function(_0x4cb2c3,_0xef1a82,_0x4ff17c,_0x34c035,_0x294399,_0x503148){return _0x4cb2c3(_0xef1a82,_0x4ff17c,_0x34c035,_0x294399,_0x503148);},'twZdc':'pre-check','KhHpg':_0x2a14b9(0x20f),'TuXia':function(_0x131493,_0x441218){return _0x131493!==_0x441218;},'MiMfz':'ZYGXc','muuUr':function(_0x331f80,_0x155585){return _0x331f80(_0x155585);},'OaYlA':_0x2a14b9(0x21a),'eEdwH':function(_0x1b5f2e,_0x47d967,_0x489ac9,_0x59c375,_0x312d28,_0x4667c1,_0x4df4ad,_0x1634e9){return _0x1b5f2e(_0x47d967,_0x489ac9,_0x59c375,_0x312d28,_0x4667c1,_0x4df4ad,_0x1634e9);},'BoQAX':_0x2a14b9(0x288),'fwgon':_0x2a14b9(0x2b8),'ccfUA':function(_0x47d77a,_0x19e634){return _0x47d77a!==_0x19e634;},'sjPRP':_0x2a14b9(0x27c),'NuVgG':_0x2a14b9(0x28f),'pTKHH':_0x2a14b9(0x252),'gDvjv':_0x2a14b9(0x245),'ZobGi':_0x2a14b9(0x28d),'NSpNl':_0x2a14b9(0x276),'LcqAx':function(_0x2daa8a,_0x3bfee6,_0x581b84,_0x541ea8,_0x170cc4,_0xe8968a,_0x5a3d47,_0x4817f2){return _0x2daa8a(_0x3bfee6,_0x581b84,_0x541ea8,_0x170cc4,_0xe8968a,_0x5a3d47,_0x4817f2);}};let _0x3c09ea;try{if(_0x1a08af[_0x2a14b9(0x202)](_0x1a08af[_0x2a14b9(0x2a8)],_0x1a08af[_0x2a14b9(0x2a8)]))_0xa25d0f=_0x458c4f;else{if(_0x3b6867[_0x2a14b9(0x2b7)]||_0x3b6867[_0x2a14b9(0x2c1)]||_0x3b6867[_0x2a14b9(0x2b2)]){if(_0x1a08af['fQprI'](_0x1a08af[_0x2a14b9(0x23f)],_0x1a08af[_0x2a14b9(0x23f)]))_0x213b4[_0x2a14b9(0x26a)]('error\x20stack\x20:\x20'+_0x52e497[_0x2a14b9(0x26a)][_0x2a14b9(0x229)]);else{const _0x229224=[];if(!_0x3b6867['clusterName']){if(_0x1a08af[_0x2a14b9(0x1fc)](_0x1a08af[_0x2a14b9(0x250)],_0x1a08af[_0x2a14b9(0x250)])){const _0x4d5ecc={};_0x4d5ecc[_0x2a14b9(0x281)]=_0x1a08af[_0x2a14b9(0x227)],_0x4d5ecc[_0x2a14b9(0x200)]=_0x1a08af[_0x2a14b9(0x258)];const _0x46dd97={};_0x46dd97[_0x2a14b9(0x281)]=_0x1a08af[_0x2a14b9(0x20a)],_0x46dd97['type']=_0x1a08af[_0x2a14b9(0x258)];const _0x3baed9={};_0x3baed9[_0x2a14b9(0x281)]=_0x1a08af['wHZba'],_0x3baed9[_0x2a14b9(0x200)]=_0x1a08af[_0x2a14b9(0x258)];const _0x509be0={};_0x509be0[_0x2a14b9(0x281)]=_0x1a08af[_0x2a14b9(0x237)],_0x509be0['type']=_0x1a08af['SKnBh'];const _0x31ff01={};return _0x31ff01[_0x2a14b9(0x2c0)]=_0x4d5ecc,_0x31ff01['cloud-provider']=_0x46dd97,_0x31ff01[_0x2a14b9(0x2b2)]=_0x3baed9,_0x31ff01[_0x2a14b9(0x20f)]=_0x509be0,_0x2381bd[_0x2a14b9(0x24c)](_0x3cbd5e['pre_check'])[_0x2a14b9(0x21d)](_0x5c4064)[_0x2a14b9(0x2c5)](_0x31ff01)[_0x2a14b9(0x28c)](_0x1a08af[_0x2a14b9(0x247)])[_0x2a14b9(0x29b)];}else _0x229224[_0x2a14b9(0x280)](_0x1a08af[_0x2a14b9(0x1d6)]);};!_0x3b6867['cloudProvider']&&(_0x1a08af[_0x2a14b9(0x211)](_0x1a08af[_0x2a14b9(0x25c)],_0x1a08af[_0x2a14b9(0x25c)])?_0x229224[_0x2a14b9(0x280)](_0x1a08af[_0x2a14b9(0x292)]):_0x22b796[_0x2a14b9(0x280)](_0x1a08af[_0x2a14b9(0x1e3)]));;if(!_0x3b6867[_0x2a14b9(0x2b2)]){if(_0x1a08af[_0x2a14b9(0x211)](_0x1a08af['ZEAuf'],_0x1a08af[_0x2a14b9(0x262)])){const {header:_0x36fa24,response:_0xeddc0a}=_0xcec3e3,{status:_0x5c812a,data:_0x17f55d,error:_0x362e7f}=_0xeddc0a;_0x49150f+=_0x36fa24+'\x20#'+_0x1a08af[_0x2a14b9(0x23d)](_0x5e908d,0x1)+'\x0a',_0x49231a+=_0x2a14b9(0x241)+(_0x5c812a?_0x1a08af['suRIz']:_0x1a08af[_0x2a14b9(0x259)])+'\x0a',_0x385d90+=_0x2a14b9(0x21f)+_0x1a08af[_0x2a14b9(0x214)](_0x17f55d,_0x1a08af[_0x2a14b9(0x1d7)])+'\x0a',_0x362e7f&&(_0x520cc1+=_0x1a08af[_0x2a14b9(0x249)],_0x51406c+=_0x2a14b9(0x2bd)+(_0x362e7f[_0x2a14b9(0x1ea)]||_0x1a08af[_0x2a14b9(0x1d7)])+'\x0a',_0x412f23+=_0x2a14b9(0x2b5)+(_0x362e7f[_0x2a14b9(0x2be)]||_0x1a08af[_0x2a14b9(0x1d7)])+'\x0a',_0xba085f+=_0x2a14b9(0x2b6)+(_0x362e7f[_0x2a14b9(0x229)]||_0x1a08af['pPVgu'])+'\x0a'),_0x22b236+='\x0a\x0a';}else _0x229224[_0x2a14b9(0x280)](_0x1a08af[_0x2a14b9(0x1e3)]);};_0x1a08af[_0x2a14b9(0x299)](_0x229224['length'],0x0)&&(_0x1a08af[_0x2a14b9(0x1e5)](_0x1a08af[_0x2a14b9(0x201)],_0x1a08af[_0x2a14b9(0x2c6)])?(_0x3c09ea=_0x2a14b9(0x26d)+_0x229224[_0x2a14b9(0x1dc)](',\x20')+'.\x20Please\x20provide\x20all\x20required\x20arguments.',await _0x1a08af['huWvO'](reportToGalactusAndSendToEDS,_0x3b6867,_0x57765b,_0x3c09ea,messageTypes[_0x2a14b9(0x278)],_0x1a08af[_0x2a14b9(0x254)],_0x1a08af['fYoQh'],_0x1a08af[_0x2a14b9(0x216)]),logger[_0x2a14b9(0x26a)](_0x3c09ea),process['exit'](0x1)):_0x47715d[_0x2a14b9(0x280)](_0x1a08af[_0x2a14b9(0x292)])),!ALL_SUPPORTED_CLOUD_PROVIDERS[_0x2a14b9(0x2ac)](_0x3b6867[_0x2a14b9(0x2c1)][_0x2a14b9(0x1db)]())&&(_0x1a08af[_0x2a14b9(0x274)](_0x1a08af['Rsxjx'],_0x1a08af[_0x2a14b9(0x2a9)])?_0x23a087+=_0x2a14b9(0x2a5)+_0x3238af[_0x2a14b9(0x2b7)]+'\x20'+(_0x3a4ad2?_0x1a08af[_0x2a14b9(0x284)]:_0x1a08af[_0x2a14b9(0x253)])+'\x0a\x0a':(_0x3c09ea=_0x1a08af[_0x2a14b9(0x265)],await _0x1a08af[_0x2a14b9(0x1f4)](reportToGalactusAndSendToEDS,_0x3b6867,_0x57765b,_0x3c09ea,messageTypes['ERROR'],_0x1a08af['dROKC'],_0x1a08af['sedev'],_0x1a08af['wRhkY']),logger['error'](_0x3c09ea),!_0x3b6867[_0x2a14b9(0x2c1)]&&(_0x1a08af[_0x2a14b9(0x211)](_0x1a08af[_0x2a14b9(0x1d2)],_0x1a08af[_0x2a14b9(0x1d2)])?(logger['info'](_0x2a14b9(0x1d0)+DEFAULT_CLUSTER_DETAILS[_0x2a14b9(0x225)]+'\x20'),_0x3b6867[_0x2a14b9(0x2c1)]=DEFAULT_CLUSTER_DETAILS['CLOUD_PROVIDER']):(_0x28f793['error'](_0x1a08af['Duzul']),_0xf1a2f9[_0x2a14b9(0x29d)](0x1))))),global_registry[_0x2a14b9(0x2b7)]=_0x3b6867[_0x2a14b9(0x2b7)],global_registry['cloudProvider']=_0x3b6867[_0x2a14b9(0x2c1)],global_registry[_0x2a14b9(0x1e9)]=_0x3b6867[_0x2a14b9(0x2b2)];}}else{if(_0x3b6867[_0x2a14b9(0x2a1)]){if(_0x1a08af[_0x2a14b9(0x282)](_0x1a08af[_0x2a14b9(0x2ad)],_0x1a08af[_0x2a14b9(0x2ad)])){global_registry[_0x2a14b9(0x2a1)]=_0x3b6867[_0x2a14b9(0x2a1)],logger[_0x2a14b9(0x2b3)]('grid\x20profile\x20flow\x20'+_0x3b6867[_0x2a14b9(0x2a1)]);const _0x18d8df=_0x2a14b9(0x26b)+AG_API_URL+_0x2a14b9(0x295),_0x433329={};_0x433329[_0x2a14b9(0x263)]=_0x1a08af['HhpIf'],_0x433329[_0x2a14b9(0x29a)]=global_registry[_0x2a14b9(0x1e7)],_0x433329[_0x2a14b9(0x230)]=![];const _0x5039de=_0x433329,_0x3c248f=await _0x1a08af[_0x2a14b9(0x26e)](got,_0x18d8df,_0x5039de),_0x43e436=await _0x1a08af[_0x2a14b9(0x2c4)](responseValidation,_0x3c248f,_0x1a08af['twZdc'],_0x1a08af['KhHpg'],_0x3b6867,_0x57765b);let _0x241ef2={};if(_0x1a08af['vujzH'](_0x43e436,0xc8)){if(_0x1a08af['TuXia'](_0x1a08af['MiMfz'],_0x1a08af[_0x2a14b9(0x29c)]))_0x2c1bc8['push'](_0x1a08af[_0x2a14b9(0x1d6)]);else{const _0x2d76ff=JSON['parse'](_0x3c248f[_0x2a14b9(0x23e)]),_0x57a7e7=_0x2d76ff['find'](_0x535ec5=>_0x535ec5[_0x2a14b9(0x26f)]===_0x3b6867[_0x2a14b9(0x2a1)])||null;_0x1a08af[_0x2a14b9(0x25e)](isUndefined,_0x57a7e7)?_0x1a08af[_0x2a14b9(0x282)](_0x1a08af['OaYlA'],_0x1a08af[_0x2a14b9(0x242)])?(_0x3c09ea=_0x2a14b9(0x21e)+_0x3b6867[_0x2a14b9(0x2a1)]+'.\x20please\x20verify\x20the\x20grid\x20profile\x20name\x20and\x20try\x20again',await _0x1a08af[_0x2a14b9(0x286)](reportToGalactusAndSendToEDS,_0x3b6867,_0x57765b,_0x3c09ea,messageTypes[_0x2a14b9(0x278)],_0x1a08af['dROKC'],_0x1a08af[_0x2a14b9(0x205)],_0x1a08af[_0x2a14b9(0x216)]),logger[_0x2a14b9(0x26a)](_0x3c09ea),process[_0x2a14b9(0x29d)](0x1)):(_0x3d93df[_0x2a14b9(0x26c)](_0x2a14b9(0x1d0)+_0x32b07d[_0x2a14b9(0x225)]+'\x20'),_0x4f2d84[_0x2a14b9(0x2c1)]=_0x5bd71f[_0x2a14b9(0x225)]):_0x1a08af[_0x2a14b9(0x1fc)](_0x1a08af[_0x2a14b9(0x2c9)],_0x1a08af[_0x2a14b9(0x2c9)])?(_0xa721b0['info']('['+_0x3580ad+']\x20status\x20:\x20'+_0x320b74[_0x2a14b9(0x1cf)]+_0x2a14b9(0x27a)+_0x59b8a8['data']+_0x2a14b9(0x267)+_0x3b9aca['error']),_0x3bfeb2['error']&&_0x1ab45b[_0x2a14b9(0x26a)]('error\x20stack\x20:\x20'+_0x345165[_0x2a14b9(0x26a)][_0x2a14b9(0x229)])):_0x241ef2=_0x57a7e7;}}else _0x1a08af[_0x2a14b9(0x25b)](_0x1a08af['sjPRP'],_0x1a08af[_0x2a14b9(0x264)])?(_0x1ca978+=_0x1a08af[_0x2a14b9(0x249)],_0x373b15+=_0x2a14b9(0x2bd)+(_0x3c80d4[_0x2a14b9(0x1ea)]||_0x1a08af[_0x2a14b9(0x1d7)])+'\x0a',_0x414f84+='\x20\x20Code:\x20'+(_0x31144a['code']||_0x1a08af[_0x2a14b9(0x1d7)])+'\x0a',_0x2dea12+=_0x2a14b9(0x2b6)+(_0x4abcc2[_0x2a14b9(0x229)]||_0x1a08af[_0x2a14b9(0x1d7)])+'\x0a'):process[_0x2a14b9(0x29d)](0x1);const _0x40342a={};_0x40342a[_0x2a14b9(0x200)]=WS_EVENTS[_0x2a14b9(0x21b)],_0x40342a[_0x2a14b9(0x1ea)]=_0x1a08af[_0x2a14b9(0x240)],webSocketUtils[_0x2a14b9(0x20c)](_0x57765b,_0x40342a),global_registry[_0x2a14b9(0x2c1)]=_0x241ef2[_0x2a14b9(0x2c1)],global_registry[_0x2a14b9(0x1e9)]=_0x241ef2['region'],global_registry[_0x2a14b9(0x2b7)]=_0x241ef2[_0x2a14b9(0x2b7)];}else{const _0x2fc54a={};_0x2fc54a['type']=_0x51d96b[_0x2a14b9(0x21b)],_0x2fc54a[_0x2a14b9(0x1ea)]=_0x2dc081,_0x477924[_0x2a14b9(0x20c)](_0x5b10e1,_0x2fc54a,_0x1a08af[_0x2a14b9(0x216)],!![]);}}else _0x1a08af[_0x2a14b9(0x202)](_0x1a08af[_0x2a14b9(0x218)],_0x1a08af[_0x2a14b9(0x2ae)])?(logger[_0x2a14b9(0x26a)](_0x1a08af[_0x2a14b9(0x224)]),process[_0x2a14b9(0x29d)](0x1)):_0x1e67e3+=_0x2a14b9(0x2a5)+_0x290148['clusterName']+'\x20details\x20cannot\x20be\x20fetched\x0a\x0a';}}}catch(_0x35f2be){_0x1a08af[_0x2a14b9(0x1fc)](_0x1a08af[_0x2a14b9(0x1ec)],_0x1a08af[_0x2a14b9(0x2ab)])?(_0x3c09ea=_0x2a14b9(0x2bf)+_0x35f2be+':\x20'+_0x35f2be[_0x2a14b9(0x229)],logger['error'](_0x3c09ea),await _0x1a08af[_0x2a14b9(0x1d9)](reportToGalactusAndSendToEDS,_0x3b6867,_0x57765b,_0x3c09ea,messageTypes['ERROR'],_0x1a08af[_0x2a14b9(0x254)],_0x1a08af['sedev'],_0x1a08af[_0x2a14b9(0x216)]),process['exit'](0x1)):_0x18947a['exit'](0x1);}}function printResponse(_0x1e5db1,_0x83dbe2){const _0x537c8e=a17_0x4d6df3,_0x16a829={};_0x16a829[_0x537c8e(0x243)]=function(_0x193631,_0x4892be){return _0x193631!==_0x4892be;},_0x16a829[_0x537c8e(0x266)]=_0x537c8e(0x2b1);const _0x4d9779=_0x16a829;logger[_0x537c8e(0x26c)]('['+_0x1e5db1+_0x537c8e(0x221)+_0x83dbe2[_0x537c8e(0x1cf)]+'\x20data\x20:\x20'+_0x83dbe2['data']+_0x537c8e(0x267)+_0x83dbe2[_0x537c8e(0x26a)]),_0x83dbe2[_0x537c8e(0x26a)]&&(_0x4d9779[_0x537c8e(0x243)](_0x4d9779['FTYRu'],_0x4d9779[_0x537c8e(0x266)])?_0x3966eb[_0x537c8e(0x26c)]('Cluster\x20`'+_0x154679[_0x537c8e(0x2b7)]+_0x537c8e(0x235)):logger[_0x537c8e(0x26a)](_0x537c8e(0x251)+_0x83dbe2[_0x537c8e(0x26a)][_0x537c8e(0x229)]));}async function generateReport(_0x19b5ac,_0x5d22e2){const _0x26aebe=a17_0x4d6df3,_0x55676c={'vpyPd':function(_0x33aae0,_0xfe317){return _0x33aae0+_0xfe317;},'CnGaF':_0x26aebe(0x1eb),'CmudR':'Failure','gQdtZ':function(_0x109b02,_0x596243){return _0x109b02||_0x596243;},'wlVKC':_0x26aebe(0x203),'StLEi':_0x26aebe(0x291),'JORSb':_0x26aebe(0x2a2),'DLShW':function(_0x8e1ce6,_0x525966){return _0x8e1ce6!=_0x525966;},'DCFIa':_0x26aebe(0x1dd),'XroFh':_0x26aebe(0x2ca),'mWJDH':function(_0x57959a){return _0x57959a();}};let _0x3956b4=_0x26aebe(0x1e0)+global_registry[_0x26aebe(0x2c1)]+_0x26aebe(0x1e1);return _0x19b5ac[_0x26aebe(0x213)]((_0x36bfc8,_0xf64a61)=>{const _0x27d67e=_0x26aebe,{header:_0x31423b,response:_0x357d08}=_0x36bfc8,{status:_0x7b9ab7,data:_0x15eadf,error:_0x43f327}=_0x357d08;_0x3956b4+=_0x31423b+'\x20#'+_0x55676c[_0x27d67e(0x2a7)](_0xf64a61,0x1)+'\x0a',_0x3956b4+=_0x27d67e(0x241)+(_0x7b9ab7?_0x55676c[_0x27d67e(0x28a)]:_0x55676c[_0x27d67e(0x1d5)])+'\x0a',_0x3956b4+=_0x27d67e(0x21f)+_0x55676c[_0x27d67e(0x298)](_0x15eadf,_0x55676c[_0x27d67e(0x206)])+'\x0a',_0x43f327&&(_0x3956b4+=_0x55676c['StLEi'],_0x3956b4+=_0x27d67e(0x2bd)+(_0x43f327[_0x27d67e(0x1ea)]||_0x55676c[_0x27d67e(0x206)])+'\x0a',_0x3956b4+='\x20\x20Code:\x20'+(_0x43f327[_0x27d67e(0x2be)]||_0x55676c[_0x27d67e(0x206)])+'\x0a',_0x3956b4+=_0x27d67e(0x2b6)+(_0x43f327[_0x27d67e(0x229)]||_0x55676c['wlVKC'])+'\x0a'),_0x3956b4+='\x0a\x0a';}),_0x3956b4+=_0x55676c[_0x26aebe(0x28e)],_0x55676c[_0x26aebe(0x297)](_0x5d22e2,null)?_0x3956b4+='Cluster\x20'+global_registry[_0x26aebe(0x2b7)]+'\x20'+(_0x5d22e2?_0x55676c[_0x26aebe(0x1e2)]:_0x55676c['XroFh'])+'\x0a\x0a':_0x3956b4+=_0x26aebe(0x2a5)+global_registry['clusterName']+_0x26aebe(0x29e),_0x3956b4+=_0x55676c['mWJDH'](getSystemMetaData),_0x3956b4;};exports[a17_0x4d6df3(0x20e)]=async function(_0x2e9872){const _0xb54a63=a17_0x4d6df3,_0x19a3db={'lzvXv':function(_0xd0d7f6){return _0xd0d7f6();},'atWVT':_0xb54a63(0x1d8),'AHHOC':function(_0x5ca483,_0x3d0e9e,_0x4c61b1,_0x2590b4,_0xe52a0b,_0x138813,_0x2e662c,_0x293f15){return _0x5ca483(_0x3d0e9e,_0x4c61b1,_0x2590b4,_0xe52a0b,_0x138813,_0x2e662c,_0x293f15);},'BOnTR':'pre-check-grid-called','RoumY':_0xb54a63(0x209),'IHpbU':'error','XEngu':function(_0x16944f,_0x1e8508,_0x54211c,_0x421dba,_0x489dec,_0x20120d,_0x517ec8){return _0x16944f(_0x1e8508,_0x54211c,_0x421dba,_0x489dec,_0x20120d,_0x517ec8);},'lXjeO':_0xb54a63(0x23a),'XQmAX':_0xb54a63(0x22f),'hIcBH':function(_0x54c30c,_0x5c7295,_0x351393){return _0x54c30c(_0x5c7295,_0x351393);},'maIAg':'dummy-grid','zceQA':_0xb54a63(0x1f1),'jVzov':_0xb54a63(0x248),'MMUvF':function(_0x54874c,_0x1c6a7e,_0x47223a,_0x4b36d0,_0x301075,_0x3e1125,_0x2beeaa,_0x41583a){return _0x54874c(_0x1c6a7e,_0x47223a,_0x4b36d0,_0x301075,_0x3e1125,_0x2beeaa,_0x41583a);},'yVWZA':'accessResp','ZZnTf':function(_0x56d800){return _0x56d800();},'vGOhu':_0xb54a63(0x1f2),'MhDhI':function(_0x4675d5,_0x21a0e6){return _0x4675d5(_0x21a0e6);},'JWYaj':_0xb54a63(0x22c),'rkEXa':function(_0x112513,_0x53562d,_0x210737){return _0x112513(_0x53562d,_0x210737);},'TPPLu':_0xb54a63(0x2bb),'Ztfyb':_0xb54a63(0x27e),'wuDyv':'User\x20Access','SgsFw':_0xb54a63(0x1f7),'HwuWa':_0xb54a63(0x24b),'nkDVI':function(_0x5a0835,_0x3fbef8,_0x1eed5a){return _0x5a0835(_0x3fbef8,_0x1eed5a);},'tlaKC':function(_0x1b52a2,_0x13fb79){return _0x1b52a2+_0x13fb79;},'GmEBK':'utf-8','WFSgp':_0xb54a63(0x1d4)};let _0x507988,_0x269a69;try{global_registry[_0xb54a63(0x1da)]=_0x19a3db[_0xb54a63(0x212)](uuidv4);!fs[_0xb54a63(0x287)](_0x19a3db['lzvXv'](getCredentialsPath))&&(_0x269a69=_0x19a3db[_0xb54a63(0x27b)],logger[_0xb54a63(0x26a)](_0x269a69),await _0x19a3db[_0xb54a63(0x1f8)](reportToGalactusAndSendToEDS,_0x2e9872,_0x507988,_0x269a69,messageTypes[_0xb54a63(0x278)],_0x19a3db['BOnTR'],_0x19a3db[_0xb54a63(0x29f)],_0x19a3db[_0xb54a63(0x223)]),process[_0xb54a63(0x29d)](0x1));_0x19a3db['XEngu'](sendInstrumentationEvent,_0x2e9872,_0x19a3db[_0xb54a63(0x24a)],messageTypes['INFO'],null,null,_0x2e9872);const _0x1af972=JSON['parse'](fs[_0xb54a63(0x22a)](_0x19a3db[_0xb54a63(0x212)](getCredentialsPath)));global_registry[_0xb54a63(0x210)]=_0x1af972[_0xb54a63(0x289)][_0xb54a63(0x246)],global_registry['bstackAccesskey']=_0x1af972[_0xb54a63(0x289)][_0xb54a63(0x1ee)];const _0x137067=WS_ENDPOINT['replace'](_0x19a3db['lXjeO'],_0x1af972[_0xb54a63(0x289)][_0xb54a63(0x246)])[_0xb54a63(0x27f)](_0x19a3db[_0xb54a63(0x2ba)],_0x1af972['Browserstack']['password']),_0x459130={};_0x459130[_0xb54a63(0x217)]=ws,_0x459130[_0xb54a63(0x2c3)]=0x36ee80,_0x507988=new ReconnectingWebSocket(_0x137067,[],_0x459130),global_registry[_0xb54a63(0x1e7)]=_0x19a3db['hIcBH'](getAuthHeader,global_registry[_0xb54a63(0x210)],global_registry[_0xb54a63(0x255)]),await _0x19a3db[_0xb54a63(0x226)](inputValidation,_0x2e9872,_0x507988),logger[_0xb54a63(0x26c)](_0xb54a63(0x277)+global_registry[_0xb54a63(0x2c1)]+'\x20region\x20-\x20'+global_registry[_0xb54a63(0x1e9)]);let _0x4a8531=await _0x19a3db[_0xb54a63(0x2c2)](getCloudProviderObjectWithOutInit,global_registry['cloudProvider'],global_registry['clusterName'],_0x19a3db['maIAg'],_0x507988,webSocketUtils,_0x2e9872);const _0x4b21c8=await _0x4a8531[_0xb54a63(0x2bc)]();_0x19a3db['hIcBH'](printResponse,_0x19a3db[_0xb54a63(0x260)],_0x4b21c8),_0x4a8531=await _0x4a8531[_0xb54a63(0x21c)]();let _0x20189a=![];try{_0x20189a=await _0x4a8531[_0xb54a63(0x269)]();}catch(_0x339e97){const _0xb27ef4=_0x19a3db[_0xb54a63(0x256)][_0xb54a63(0x20d)]('|');let _0x3ebd0a=0x0;while(!![]){switch(_0xb27ef4[_0x3ebd0a++]){case'0':_0x269a69=_0xb54a63(0x296)+global_registry[_0xb54a63(0x2b7)]+_0xb54a63(0x293)+global_registry[_0xb54a63(0x1e9)]+_0xb54a63(0x28b)+_0x339e97;continue;case'1':await _0x19a3db[_0xb54a63(0x2c8)](reportToGalactusAndSendToEDS,_0x2e9872,_0x507988,_0x269a69,messageTypes[_0xb54a63(0x278)],_0x19a3db[_0xb54a63(0x24a)],_0xb54a63(0x239)+global_registry[_0xb54a63(0x2c1)],_0x19a3db[_0xb54a63(0x223)]);continue;case'2':logger['error'](_0x269a69);continue;case'3':_0x269a69+='\x0a'+JSON[_0xb54a63(0x2a4)](_0x339e97['stack']);continue;case'4':_0x20189a=null;continue;}break;}}_0x20189a&&logger[_0xb54a63(0x26c)](_0xb54a63(0x2af)+global_registry[_0xb54a63(0x2b7)]+_0xb54a63(0x235));const _0x5fe091=await _0x4a8531[_0xb54a63(0x208)]();_0x19a3db[_0xb54a63(0x226)](printResponse,_0x19a3db[_0xb54a63(0x271)],_0x5fe091);const _0x45fd0d=await _0x19a3db[_0xb54a63(0x207)](curlRequest);_0x19a3db[_0xb54a63(0x226)](printResponse,_0x19a3db[_0xb54a63(0x220)],_0x45fd0d);const _0x8155b1=await _0x19a3db[_0xb54a63(0x1ff)](isTlsSupported,_0x19a3db['JWYaj']);_0x19a3db[_0xb54a63(0x1e8)](printResponse,_0x19a3db['TPPLu'],_0x8155b1);const _0x46d97b={};_0x46d97b['header']=_0x19a3db[_0xb54a63(0x215)],_0x46d97b[_0xb54a63(0x22e)]=_0x4b21c8;const _0x5143c1={};_0x5143c1['header']=_0x19a3db[_0xb54a63(0x1f6)],_0x5143c1[_0xb54a63(0x22e)]=_0x5fe091;const _0x24263d={};_0x24263d[_0xb54a63(0x233)]=_0x19a3db[_0xb54a63(0x2c7)],_0x24263d[_0xb54a63(0x22e)]=_0x45fd0d;const _0x1043e6={};_0x1043e6['header']=_0x19a3db[_0xb54a63(0x24f)],_0x1043e6[_0xb54a63(0x22e)]=_0x8155b1;const _0x14e7e2=[_0x46d97b,_0x5143c1,_0x24263d,_0x1043e6],_0x26a62f=await _0x19a3db['nkDVI'](generateReport,_0x14e7e2,_0x20189a),_0x597133=new Date(),_0x3b5e32=_0x597133['getUTCFullYear']()+'_'+_0x19a3db[_0xb54a63(0x25d)](_0x597133['getUTCMonth'](),0x1)+'_'+_0x597133[_0xb54a63(0x1f9)]()+'_'+_0x597133['getUTCHours']()+'_'+_0x597133['getUTCMinutes'](),_0x4a41c2=_0xb54a63(0x1df)+_0x3b5e32+'.txt';fs[_0xb54a63(0x268)](_0x4a41c2,_0x26a62f,_0x19a3db[_0xb54a63(0x22d)]),logger[_0xb54a63(0x26c)]('Report\x20saved\x20in\x20'+_0x4a41c2),process[_0xb54a63(0x29d)](0x0);}catch(_0x33dc8b){let _0x4b50b3=_0xb54a63(0x22b)+_0x33dc8b+'\x20';logger['error'](_0x4b50b3),_0x4b50b3+='\x0a'+JSON[_0xb54a63(0x2a4)](_0x33dc8b[_0xb54a63(0x229)]),logger[_0xb54a63(0x2b3)]('stack\x20trace\x20'+_0x33dc8b[_0xb54a63(0x229)]);if(_0x507988){const _0x188a0b={};_0x188a0b[_0xb54a63(0x200)]=WS_EVENTS['LOG'],_0x188a0b['message']=_0x4b50b3,webSocketUtils[_0xb54a63(0x20c)](_0x507988,_0x188a0b,_0x19a3db['IHpbU'],!![]);}await webSocketUtils[_0xb54a63(0x2b0)](0x7d0);const _0x26b355={};_0x26b355['error']=_0x4b50b3,await _0x19a3db[_0xb54a63(0x2c2)](sendInstrumentationEvent,_0x2e9872,_0x19a3db[_0xb54a63(0x24a)],messageTypes[_0xb54a63(0x278)],_0x19a3db[_0xb54a63(0x25f)],_0x26b355,_0x2e9872),process[_0xb54a63(0x29d)](0x1);}};function a17_0x364d(){const _0x2b2097=['aGBmC','lzvXv','forEach','xwOLl','Ztfyb','wRhkY','WebSocket','pTKHH','../../utils/utilityMethods','ZQnEw','LOG','init','epilogue','Invalid\x20input.\x20grid\x20profiles:\x20','Message:\x20','vGOhu',']\x20status\x20:\x20','mlRwR','IHpbU','Duzul','CLOUD_PROVIDER','hIcBH','APeQN','6tqNPZU','stack','readFileSync','Failed\x20in\x20pre-check!\x20Error:\x20','TLSv1_2_client_method','GmEBK','response','<PasswordPlaceholder>','throwHttpErrors','GET','Pass\x20the\x20region\x20for\x20existing\x20Kubernetes\x20Cluster.','header','AYvUy','`\x20already\x20exists','UkJEA','KIvJx','got','cluster-check-failed-','<UsernamePlaceholder>','9989357EcXKzx','1wIHlMs','HUGxW','body','FGdEe','NuVgG','Status:\x20','OaYlA','WYktm','290JJBfuC','BJOSt','username','bdfoN','0|4|2|3|1','cazCM','BOnTR','SSL\x20Configured','usage','Pass\x20the\x20name\x20of\x20cloud\x20provider\x20for\x20existing\x20Kubernetes\x20Cluster.','Create\x20a\x20grid\x20in\x20existing\x20Kubernetes\x20Cluster\x20on\x20AWS/Azure/GCP.','HwuWa','QUFyX','error\x20stack\x20:\x20','ceOlh','YXNzK','dROKC','bstackAccesskey','jVzov','pre-check-grid-called','SKnBh','yUCCy','2627356qXVNUu','ccfUA','mLBPk','tlaKC','muuUr','WFSgp','zceQA','4yfwQwq','CWyKy','method','sjPRP','Pkwld','FTYRu','\x20error\x20:\x20','writeFileSync','isClusterPresent','error','https://','info','Missing\x20required\x20arguments:\x20','fOeoD','name','../../cloudproviders/utils','yVWZA','Invalid\x20input.\x20Currently\x20the\x20automation\x20grid\x20in\x20AWS,\x20AZURE\x20&\x20GCP\x20cloud\x20provider\x20is\x20supported\x20using\x20CLI.','1708456pwGCFX','fIxlN','../../config/constants','GaAoS','Pre-check\x20running\x20for\x20Cloud\x20-\x20','ERROR','desc','\x20data\x20:\x20','atWVT','cwmue','moUtD','Tool\x20Installed','replace','push','description','vujzH','vgCnM','LPmsC','MoRHl','eEdwH','existsSync','pre-check-grid-profile-empty','Browserstack','CnGaF','`\x20,error\x20:\x20','help','jaogq','JORSb','Grid\x20profile\x20fetched\x20for\x20pre-check','72aeBFpE','Error\x20Details:\x0a','LnXUQ','`\x20is\x20present\x20in\x20region\x20`','reconnecting-websocket','/packages/cli/get-all-grid-profiles','unable\x20to\x20verify\x20if\x20cluster\x20`','DLShW','gQdtZ','HxMsO','headers','argv','MiMfz','exit','\x20details\x20cannot\x20be\x20fetched\x0a\x0a','RoumY','cloud-provider-not-supported','gridProfile','Cluster\x20details\x0a-----------------------\x0a','247346TDySDT','stringify','Cluster\x20','TFhbi','vpyPd','ZwYMr','Rsxjx','6626784CVQswV','NSpNl','includes','vHgog','gDvjv','Cluster\x20`','delay','atNsv','region','debug','hZnaJ','\x20\x20Code:\x20','\x20\x20Stack:\x20','clusterName','xNXBy','../../utils/instrumentationUtils','XQmAX','isTls1_2_SUPPORTED','isCliToolInstalled','\x20\x20Message:\x20','code','Error\x20in\x20input\x20validation\x20while\x20pre-check\x20-\x20','cluster-name','cloudProvider','XEngu','connectionTimeout','eGSNu','options','EXArD','SgsFw','MMUvF','fwgon','will\x20be\x20created','status','Setting\x20cloud\x20provider\x20as\x20','1832025EFhDhn','dxAEs','fXdaM','pre-check-failed','CmudR','pNdQa','pPVgu','Credentials\x20not\x20found!\x20Ensure\x20init\x20command\x20is\x20run\x20before\x20running\x20this\x20command.','LcqAx','requestId','toLowerCase','join','is\x20already\x20present','../../utils/webSocketUtils','log/report_','===\x20Precheck\x20Report\x20-\x20','\x20===\x0a\x0a','DCFIa','ZKfPC','cloud-provider','fQprI','PqVrR','authHeader','rkEXa','clusterRegion','message','Success','ZobGi','Use\x20an\x20existing\x20grid\x20profile\x20to\x20setup\x20the\x20Automation\x20Grid.\x20By\x20default,\x20configured\x20profile\x20is\x20used.','password','Missing\x20required\x20arguments.\x20Please\x20provide\x20either\x20grid\x20profile\x20or\x20cluster\x20details\x20(cluser-name\x20,\x20cloud\x20provider\x20&\x20region','grid','toolInstalledResp','isTrialGridAccessible','mOAEF','SKzpr','INVFL','wuDyv','Whitelisted\x20browserstack','AHHOC','getUTCDate','13ZSSaQC','builder','TYVGb','6354655LsHuVZ','string','MhDhI','type','CIAea','mtnlj','N/A','yxVis','BoQAX','wlVKC','ZZnTf','checkAccess','credential-not-found','vNoGX','UCjvn','sendEventToBackend','split','handler','grid-profile','bstackUsername'];a17_0x364d=function(){return _0x2b2097;};return a17_0x364d();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a18_0x68d7(){const _0x2e971e=['11043613mMfywo','2828775TCOfIA','start','dKxEK','xrTyT','3xyyUNQ','epilogue','19405242SLxGQK','strict','desc','2423416JiauFH','builder','2874135nfIybQ','6880072yhqdlI','830476zMjYQo','help','handler','demandCommand','command','20wpRDxL','start_commands','usage','recommendCommands','6hcnJlb','../config/constants'];a18_0x68d7=function(){return _0x2e971e;};return a18_0x68d7();}const a18_0x5c1da4=a18_0x1168;function a18_0x1168(_0x47ec07,_0x5bc2ec){const _0x68d748=a18_0x68d7();return a18_0x1168=function(_0x1168a2,_0x28ab4e){_0x1168a2=_0x1168a2-0xf1;let _0x7454c9=_0x68d748[_0x1168a2];return _0x7454c9;},a18_0x1168(_0x47ec07,_0x5bc2ec);}(function(_0x453324,_0x2b5f20){const _0x556d02=a18_0x1168,_0x139549=_0x453324();while(!![]){try{const _0x33a831=parseInt(_0x556d02(0xf7))/0x1*(-parseInt(_0x556d02(0x100))/0x2)+-parseInt(_0x556d02(0xf3))/0x3+parseInt(_0x556d02(0xfc))/0x4+parseInt(_0x556d02(0xfe))/0x5+parseInt(_0x556d02(0x109))/0x6*(-parseInt(_0x556d02(0xf2))/0x7)+-parseInt(_0x556d02(0xff))/0x8+-parseInt(_0x556d02(0xf9))/0x9*(-parseInt(_0x556d02(0x105))/0xa);if(_0x33a831===_0x2b5f20)break;else _0x139549['push'](_0x139549['shift']());}catch(_0x661de){_0x139549['push'](_0x139549['shift']());}}}(a18_0x68d7,0xd395a));const {HELP_HEADER_MESSAGE,HELP_FOOTER_MESSAGE}=require(a18_0x5c1da4(0xf1));exports[a18_0x5c1da4(0x104)]=a18_0x5c1da4(0xf4),exports[a18_0x5c1da4(0xfb)]='Start\x20an\x20existing\x20Automation\x20grid.',exports[a18_0x5c1da4(0xfd)]=function(_0x592ac6){const _0x247c04=a18_0x5c1da4,_0x62dcbe={};_0x62dcbe[_0x247c04(0xf6)]=_0x247c04(0x106),_0x62dcbe['dKxEK']=_0x247c04(0x101);const _0x4fecc0=_0x62dcbe;return _0x592ac6[_0x247c04(0x107)](HELP_HEADER_MESSAGE[_0x247c04(0xf4)])[_0x247c04(0xf8)](HELP_FOOTER_MESSAGE)['commandDir'](_0x4fecc0[_0x247c04(0xf6)])[_0x247c04(0x103)]()[_0x247c04(0x108)]()[_0x247c04(0xfa)]()['help'](_0x4fecc0[_0x247c04(0xf5)]);},exports[a18_0x5c1da4(0x102)]=function(_0x47fe01){};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a19_0x3c27(){const _0x21e614=['readFileSync','info','Adding\x20Websocket\x20listeners','Failed\x20to\x20fetch\x20grid\x20details\x20from\x20the\x20server.\x20Unauthorized\x20request!','Browserstack','../../config/constants','string','aDUys','help','19110RSMpzg','Starting\x20grid\x20','parse','name','nYofh','epilogue','Skip\x20insecure\x20cert\x20verification.','Unable\x20to\x20start\x20the\x20Grid!\x20Error:\x20','Bwrvu','command','message','Start\x20an\x20existing\x20Automation\x20grid.','username','uPaaq','clusterRegion','erjqK','../../utils/gridComponents','addListeners','nPaNL','1388049vQvVLr','cjIMQ','dchLw','INFO','1106170JFHHmR','GZfPU','desc','unauthorised','Grid\x20started','grid','error','ERROR','existsSync','../../cloudproviders/utils','server-error','FArVO','Please\x20provide\x20ID\x20of\x20the\x20grid\x20to\x20start','SziqH','../../utils/utilityMethods','description','default','Credentials\x20not\x20found!\x20Ensure\x20init\x20command\x20is\x20run\x20before\x20running\x20this\x20command.','gridId','25fvlnuY','Failed\x20to\x20fetch\x20grid\x20details\x20from\x20the\x20server.\x20Response\x20from\x20server:\x20','replace','<PasswordPlaceholder>','cloudProvider','stack','pLzHm','statusCode','CIhjl','connectionTimeout','debug','jPtzZ','WebSocket','type','KHfPt','password','clusterName','../../utils/createk8sClient','exit','TazqC','boolean','stringify','dfQcB','iJBeP','PAdGr','start','570462JLdHUW','skipTlsCertVerify','options','yzMLL','920776pzcSmI','bstackAccesskey','../../utils/webSocketUtils','cYNYI','argv','region','<UsernamePlaceholder>','../../config/logger','user','4725077tVxqcf','NORrm','qyBIE','3435032wywooc'];a19_0x3c27=function(){return _0x21e614;};return a19_0x3c27();}const a19_0x233cde=a19_0x2b3a;(function(_0x4ef388,_0x1da613){const _0x43a6b3=a19_0x2b3a,_0x1eaf05=_0x4ef388();while(!![]){try{const _0x4c4433=parseInt(_0x43a6b3(0x155))/0x1*(parseInt(_0x43a6b3(0x12b))/0x2)+parseInt(_0x43a6b3(0x13e))/0x3+parseInt(_0x43a6b3(0x121))/0x4+-parseInt(_0x43a6b3(0x142))/0x5+-parseInt(_0x43a6b3(0x16f))/0x6+-parseInt(_0x43a6b3(0x11e))/0x7+-parseInt(_0x43a6b3(0x115))/0x8;if(_0x4c4433===_0x1da613)break;else _0x1eaf05['push'](_0x1eaf05['shift']());}catch(_0x5697f7){_0x1eaf05['push'](_0x1eaf05['shift']());}}}(a19_0x3c27,0x6ed09));function a19_0x2b3a(_0x2916f1,_0x362a86){const _0x3c272d=a19_0x3c27();return a19_0x2b3a=function(_0x2b3a2a,_0x59a003){_0x2b3a2a=_0x2b3a2a-0x115;let _0x360203=_0x3c272d[_0x2b3a2a];return _0x360203;},a19_0x2b3a(_0x2916f1,_0x362a86);}const fs=require('fs'),ws=require('ws'),ReconnectingWebSocket=require('reconnecting-websocket'),{global_registry,HELP_HEADER_MESSAGE,HELP_FOOTER_MESSAGE,WS_ENDPOINT,messageTypes}=require(a19_0x233cde(0x127)),{logger}=require(a19_0x233cde(0x11c)),{getCredentialsPath,getGridDetails}=require(a19_0x233cde(0x150)),{scaleUpHubDeployment}=require(a19_0x233cde(0x13b)),{sendInstrumentationEvent}=require('../../utils/instrumentationUtils'),webSocketUtils=require(a19_0x233cde(0x117)),{createK8sClient}=require(a19_0x233cde(0x166)),{getCloudProviderObject}=require(a19_0x233cde(0x14b));exports[a19_0x233cde(0x134)]=a19_0x233cde(0x147),exports[a19_0x233cde(0x144)]=a19_0x233cde(0x136),exports['builder']=function(_0x13949e){const _0x21165f=a19_0x233cde,_0x19bf24={};_0x19bf24[_0x21165f(0x15b)]='Pass\x20the\x20ID\x20of\x20the\x20existing\x20Automation\x20grid\x20you\x20want\x20to\x20start.',_0x19bf24[_0x21165f(0x160)]=_0x21165f(0x128),_0x19bf24[_0x21165f(0x118)]=_0x21165f(0x131),_0x19bf24[_0x21165f(0x129)]=_0x21165f(0x169),_0x19bf24[_0x21165f(0x143)]=_0x21165f(0x12a);const _0x3878f3=_0x19bf24,_0x417373={};_0x417373['description']=_0x3878f3[_0x21165f(0x15b)],_0x417373[_0x21165f(0x162)]=_0x3878f3[_0x21165f(0x160)];const _0x1f132c={};_0x1f132c[_0x21165f(0x151)]=_0x3878f3['cYNYI'],_0x1f132c[_0x21165f(0x162)]=_0x3878f3[_0x21165f(0x129)],_0x1f132c[_0x21165f(0x152)]=![];const _0x7445c0={};return _0x7445c0['grid-id']=_0x417373,_0x7445c0['skip-tls-cert-verify']=_0x1f132c,_0x13949e['usage'](HELP_HEADER_MESSAGE[_0x21165f(0x16e)])[_0x21165f(0x130)](HELP_FOOTER_MESSAGE)[_0x21165f(0x171)](_0x7445c0)[_0x21165f(0x12a)](_0x3878f3[_0x21165f(0x143)])[_0x21165f(0x119)];},exports['handler']=async function(_0x3c962f){const _0x56665c=a19_0x233cde,_0x2bcd9f={'tELsk':_0x56665c(0x14e),'qyBIE':function(_0x3ccc7c){return _0x3ccc7c();},'SziqH':_0x56665c(0x153),'erjqK':function(_0x92ca00,_0x1c7e38,_0xbca453,_0x80e8cd,_0x4a5d31,_0x392e7d,_0x59c95f){return _0x92ca00(_0x1c7e38,_0xbca453,_0x80e8cd,_0x4a5d31,_0x392e7d,_0x59c95f);},'cjIMQ':'start-grid-called','EljVo':'init-not-called','NORrm':function(_0x1ad603){return _0x1ad603();},'Bwrvu':_0x56665c(0x11b),'TazqC':_0x56665c(0x158),'dfQcB':_0x56665c(0x124),'uPaaq':function(_0x32ecef,_0x7010db,_0x43a766,_0x11ff45){return _0x32ecef(_0x7010db,_0x43a766,_0x11ff45);},'yzMLL':function(_0x51b16e,_0x62da6f,_0x269b88){return _0x51b16e(_0x62da6f,_0x269b88);},'ubLca':function(_0x45e67e,_0x42f6b6,_0x344767){return _0x45e67e(_0x42f6b6,_0x344767);},'PAdGr':_0x56665c(0x146),'KHfPt':function(_0x4fa90e,_0x5e7e6c){return _0x4fa90e===_0x5e7e6c;},'OtaIR':_0x56665c(0x125),'uOQMS':function(_0x1325c0,_0x19c553,_0x2a265d,_0xeec972,_0x175595,_0xa6cf5,_0x5ceac7){return _0x1325c0(_0x19c553,_0x2a265d,_0xeec972,_0x175595,_0xa6cf5,_0x5ceac7);},'CIhjl':_0x56665c(0x145),'iJBeP':function(_0x3a78e1,_0x53c691){return _0x3a78e1===_0x53c691;},'FArVO':function(_0x14df5e,_0x15d915,_0x44bff9,_0x3c7df6,_0x484bc3,_0x38e282,_0x10b510){return _0x14df5e(_0x15d915,_0x44bff9,_0x3c7df6,_0x484bc3,_0x38e282,_0x10b510);},'nYofh':'invalid-grid-id','dchLw':function(_0x37cdf0,_0x104734,_0x47486e,_0x441843,_0x528b28,_0x5cedd0,_0xa2931b){return _0x37cdf0(_0x104734,_0x47486e,_0x441843,_0x528b28,_0x5cedd0,_0xa2931b);},'nPaNL':_0x56665c(0x14c)};let _0x56d2ad;try{!_0x3c962f[_0x56665c(0x154)]&&(logger[_0x56665c(0x148)](_0x2bcd9f['tELsk']),process[_0x56665c(0x167)](0x1));!fs[_0x56665c(0x14a)](_0x2bcd9f[_0x56665c(0x120)](getCredentialsPath))&&(logger[_0x56665c(0x148)](_0x2bcd9f[_0x56665c(0x14f)]),await _0x2bcd9f[_0x56665c(0x13a)](sendInstrumentationEvent,_0x3c962f,_0x2bcd9f[_0x56665c(0x13f)],messageTypes[_0x56665c(0x149)],_0x2bcd9f['EljVo'],null,_0x3c962f),process[_0x56665c(0x167)](0x1));logger[_0x56665c(0x123)](_0x56665c(0x12c)+_0x3c962f['gridId']),await _0x2bcd9f[_0x56665c(0x13a)](sendInstrumentationEvent,_0x3c962f,_0x2bcd9f[_0x56665c(0x13f)],messageTypes[_0x56665c(0x141)],null,null,_0x3c962f);const _0x2b73f8=JSON[_0x56665c(0x12d)](fs[_0x56665c(0x122)](_0x2bcd9f[_0x56665c(0x11f)](getCredentialsPath)));global_registry['bstackUsername']=_0x2b73f8[_0x56665c(0x126)]['username'],global_registry[_0x56665c(0x116)]=_0x2b73f8[_0x56665c(0x126)][_0x56665c(0x164)];const _0x59a327=WS_ENDPOINT[_0x56665c(0x157)](_0x2bcd9f[_0x56665c(0x133)],_0x2b73f8['Browserstack']['username'])[_0x56665c(0x157)](_0x2bcd9f[_0x56665c(0x168)],_0x2b73f8[_0x56665c(0x126)][_0x56665c(0x164)]),_0x1926f1={};_0x1926f1[_0x56665c(0x161)]=ws,_0x1926f1[_0x56665c(0x15e)]=0x36ee80,_0x56d2ad=new ReconnectingWebSocket(_0x59a327,[],_0x1926f1),logger[_0x56665c(0x15f)](_0x2bcd9f[_0x56665c(0x16b)]),webSocketUtils[_0x56665c(0x13c)](_0x56d2ad,_0x3c962f[_0x56665c(0x11d)],_0x3c962f[_0x56665c(0x164)]);const [_0x44e9bb,_0x5605dc]=await _0x2bcd9f[_0x56665c(0x138)](getGridDetails,_0x2b73f8[_0x56665c(0x126)][_0x56665c(0x137)],_0x2b73f8['Browserstack'][_0x56665c(0x164)],_0x3c962f['gridId']);if(_0x5605dc){const _0x2add38=_0x5605dc['info'];global_registry[_0x56665c(0x159)]=_0x2add38[_0x56665c(0x159)],global_registry[_0x56665c(0x139)]=_0x2add38[_0x56665c(0x11a)],global_registry[_0x56665c(0x165)]=_0x2add38[_0x56665c(0x165)];const _0x13d3b7=await _0x2bcd9f[_0x56665c(0x13a)](getCloudProviderObject,_0x2add38['cloudProvider'],_0x2add38[_0x56665c(0x165)],_0x2add38[_0x56665c(0x12e)],_0x56d2ad,webSocketUtils,_0x3c962f),[_0x518dd6,_0x22d241,_0x55c383,_0x2810d0,_0x3431f7,_0x77e8c6]=await _0x2bcd9f[_0x56665c(0x172)](createK8sClient,_0x13d3b7,_0x3c962f[_0x56665c(0x170)]);await _0x2bcd9f['ubLca'](scaleUpHubDeployment,_0x22d241,_0x2add38['name']),logger[_0x56665c(0x123)](_0x2bcd9f[_0x56665c(0x16d)]),process[_0x56665c(0x167)](0x0);}_0x2bcd9f[_0x56665c(0x163)](_0x44e9bb[_0x56665c(0x15c)],0x191)&&(logger[_0x56665c(0x148)](_0x2bcd9f['OtaIR']),await _0x2bcd9f['uOQMS'](sendInstrumentationEvent,_0x3c962f,_0x2bcd9f[_0x56665c(0x13f)],messageTypes[_0x56665c(0x149)],_0x2bcd9f[_0x56665c(0x15d)],null,_0x3c962f),process[_0x56665c(0x167)](0x1)),_0x2bcd9f[_0x56665c(0x16c)](_0x44e9bb[_0x56665c(0x15c)],0x190)&&(logger[_0x56665c(0x148)](JSON[_0x56665c(0x12d)](_0x44e9bb['body'])[_0x56665c(0x135)]),await _0x2bcd9f[_0x56665c(0x14d)](sendInstrumentationEvent,_0x3c962f,_0x2bcd9f[_0x56665c(0x13f)],messageTypes[_0x56665c(0x149)],_0x2bcd9f[_0x56665c(0x12f)],null,_0x3c962f),process[_0x56665c(0x167)](0x1)),logger['error'](_0x56665c(0x156)+JSON['stringify'](_0x44e9bb)),await _0x2bcd9f[_0x56665c(0x140)](sendInstrumentationEvent,_0x3c962f,_0x2bcd9f['cjIMQ'],messageTypes[_0x56665c(0x149)],_0x2bcd9f[_0x56665c(0x13d)],_0x44e9bb,_0x3c962f),process['exit'](0x1);}catch(_0x2e0b1a){const _0x368d21=_0x56665c(0x132)+_0x2e0b1a+'\x20\x0a'+JSON[_0x56665c(0x16a)](_0x2e0b1a[_0x56665c(0x15a)])+'\x20';logger[_0x56665c(0x148)](_0x368d21),process[_0x56665c(0x167)](0x1);}};
|
package/ats/src/commands/stop.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a20_0x3f947b=a20_0x5cea;function a20_0x5cea(_0x439b09,_0x518e98){const _0x5434db=a20_0x5434();return a20_0x5cea=function(_0x5cea6f,_0x3c1c77){_0x5cea6f=_0x5cea6f-0xfc;let _0x47e8b1=_0x5434db[_0x5cea6f];return _0x47e8b1;},a20_0x5cea(_0x439b09,_0x518e98);}(function(_0x2cb9fa,_0x325762){const _0x4e3bb8=a20_0x5cea,_0x551309=_0x2cb9fa();while(!![]){try{const _0xcb2ad3=parseInt(_0x4e3bb8(0x108))/0x1+-parseInt(_0x4e3bb8(0xfc))/0x2*(parseInt(_0x4e3bb8(0x10a))/0x3)+-parseInt(_0x4e3bb8(0x106))/0x4*(parseInt(_0x4e3bb8(0xfd))/0x5)+-parseInt(_0x4e3bb8(0x103))/0x6*(-parseInt(_0x4e3bb8(0xff))/0x7)+-parseInt(_0x4e3bb8(0x101))/0x8+parseInt(_0x4e3bb8(0x113))/0x9*(parseInt(_0x4e3bb8(0x10c))/0xa)+-parseInt(_0x4e3bb8(0x102))/0xb*(-parseInt(_0x4e3bb8(0x110))/0xc);if(_0xcb2ad3===_0x325762)break;else _0x551309['push'](_0x551309['shift']());}catch(_0x3df226){_0x551309['push'](_0x551309['shift']());}}}(a20_0x5434,0x57b5c));function a20_0x5434(){const _0x1c9a7f=['help','417301AarUUE','strict','12UxTaqZ','command','1490JtHMqd','../config/constants','builder','stop','228AWOBmD','commandDir','hPWrG','30879xaXoss','usage','260198NSsaVs','13560TCWXOc','demandCommand','233513kjvIrL','epilogue','3861440pvSoOY','64306TBNQrR','60EDBNlG','hBXJK','recommendCommands','16TEAMli'];a20_0x5434=function(){return _0x1c9a7f;};return a20_0x5434();}const {HELP_HEADER_MESSAGE,HELP_FOOTER_MESSAGE}=require(a20_0x3f947b(0x10d));exports[a20_0x3f947b(0x10b)]=a20_0x3f947b(0x10f),exports['desc']='Stop\x20a\x20running\x20Automation\x20grid.',exports[a20_0x3f947b(0x10e)]=function(_0x44dddc){const _0x2e9fae=a20_0x3f947b,_0x25903e={};_0x25903e[_0x2e9fae(0x104)]='stop_commands',_0x25903e['hPWrG']=_0x2e9fae(0x107);const _0x1007e5=_0x25903e;return _0x44dddc[_0x2e9fae(0x114)](HELP_HEADER_MESSAGE[_0x2e9fae(0x10f)])[_0x2e9fae(0x100)](HELP_FOOTER_MESSAGE)[_0x2e9fae(0x111)](_0x1007e5[_0x2e9fae(0x104)])[_0x2e9fae(0xfe)]()[_0x2e9fae(0x105)]()[_0x2e9fae(0x109)]()['help'](_0x1007e5[_0x2e9fae(0x112)]);},exports['handler']=function(_0x452905){};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a21_0x5b33(_0x41a57d,_0x3d66bb){const _0x30c6a0=a21_0x30c6();return a21_0x5b33=function(_0x5b33e2,_0x5371ef){_0x5b33e2=_0x5b33e2-0x1dc;let _0x42dca9=_0x30c6a0[_0x5b33e2];return _0x42dca9;},a21_0x5b33(_0x41a57d,_0x3d66bb);}const a21_0x3c7dd9=a21_0x5b33;function a21_0x30c6(){const _0x3fe094=['default','XEuDl','4041744pIMmAn','hOaQa','3123116OorkEc','tPUtE','string','type','password','qetbp','EGMcn','description','debug','3WGdMnJ','../../cloudproviders/utils','dlert','YzXFG','../../utils/gridComponents','Credentials\x20not\x20found!\x20Ensure\x20init\x20command\x20is\x20run\x20before\x20running\x20this\x20command.','connectionTimeout','grid-id','command','cloudProvider','iOvFm','readFileSync','WebSocket','parse','invalid-grid-id','replace','name','84604CYSbTo','../../utils/webSocketUtils','username','skip-tls-cert-verify','desc','Unable\x20to\x20stop\x20the\x20Grid!\x20Error:\x20','Skip\x20insecure\x20cert\x20verification.','addListeners','stringify','139465bAscSa','Grid\x20stoppped.','hjeAf','../../config/constants','<PasswordPlaceholder>','info','jvotm','<UsernamePlaceholder>','../../utils/createk8sClient','region','clusterRegion','clusterName','exit','kYtNO','mQKzm','builder','lszNp','16925211pcxHKF','ERROR','statusCode','../../utils/instrumentationUtils','DKkFf','skipTlsCertVerify','bstackAccesskey','bstackUsername','unauthorised','QEsmY','error','1644366MVlAiU','Please\x20provide\x20ID\x20of\x20the\x20grid\x20to\x20stop','OLkDt','grid','boolean','48TVprxy','epilogue','NyXtm','AKJup','server-error','gridId','argv','eQUjh','wkqQM','Browserstack','INFO','653828GgAMni','Failed\x20to\x20fetch\x20grid\x20details\x20from\x20the\x20server.\x20Response\x20from\x20server:\x20'];a21_0x30c6=function(){return _0x3fe094;};return a21_0x30c6();}(function(_0x4639b9,_0x3a6b7e){const _0x3cf742=a21_0x5b33,_0x2c66f8=_0x4639b9();while(!![]){try{const _0x3c347b=-parseInt(_0x3cf742(0x1ed))/0x1+parseInt(_0x3cf742(0x212))/0x2+parseInt(_0x3cf742(0x1dc))/0x3*(parseInt(_0x3cf742(0x228))/0x4)+-parseInt(_0x3cf742(0x1f6))/0x5*(-parseInt(_0x3cf742(0x217))/0x6)+parseInt(_0x3cf742(0x222))/0x7+parseInt(_0x3cf742(0x226))/0x8+-parseInt(_0x3cf742(0x207))/0x9;if(_0x3c347b===_0x3a6b7e)break;else _0x2c66f8['push'](_0x2c66f8['shift']());}catch(_0x51c5dc){_0x2c66f8['push'](_0x2c66f8['shift']());}}}(a21_0x30c6,0x70319));const fs=require('fs'),ws=require('ws'),ReconnectingWebSocket=require('reconnecting-websocket'),{global_registry,HELP_HEADER_MESSAGE,HELP_FOOTER_MESSAGE,WS_ENDPOINT,messageTypes}=require(a21_0x3c7dd9(0x1f9)),{logger}=require('../../config/logger'),{getCredentialsPath,getGridDetails}=require('../../utils/utilityMethods'),{scaleDownHubDeployment}=require(a21_0x3c7dd9(0x1e0)),{sendInstrumentationEvent}=require(a21_0x3c7dd9(0x20a)),webSocketUtils=require(a21_0x3c7dd9(0x1ee)),{createK8sClient}=require(a21_0x3c7dd9(0x1fe)),{getCloudProviderObject}=require(a21_0x3c7dd9(0x1dd));exports[a21_0x3c7dd9(0x1e4)]=a21_0x3c7dd9(0x215),exports[a21_0x3c7dd9(0x1f1)]='Stop\x20a\x20running\x20Automation\x20grid.',exports[a21_0x3c7dd9(0x205)]=function(_0x43fc8b){const _0x1fedca=a21_0x3c7dd9,_0x14580c={};_0x14580c[_0x1fedca(0x21f)]='Pass\x20the\x20ID\x20of\x20the\x20running\x20Automation\x20grid\x20you\x20want\x20to\x20stop.',_0x14580c[_0x1fedca(0x210)]=_0x1fedca(0x22a),_0x14580c[_0x1fedca(0x22e)]=_0x1fedca(0x1f3),_0x14580c[_0x1fedca(0x227)]=_0x1fedca(0x216),_0x14580c[_0x1fedca(0x219)]='help';const _0x15f665=_0x14580c,_0x13cbbc={};_0x13cbbc['description']=_0x15f665[_0x1fedca(0x21f)],_0x13cbbc[_0x1fedca(0x22b)]=_0x15f665[_0x1fedca(0x210)];const _0x47dd77={};_0x47dd77[_0x1fedca(0x22f)]=_0x15f665[_0x1fedca(0x22e)],_0x47dd77[_0x1fedca(0x22b)]=_0x15f665[_0x1fedca(0x227)],_0x47dd77[_0x1fedca(0x224)]=![];const _0x598731={};return _0x598731[_0x1fedca(0x1e3)]=_0x13cbbc,_0x598731[_0x1fedca(0x1f0)]=_0x47dd77,_0x43fc8b['usage'](HELP_HEADER_MESSAGE['stop'])[_0x1fedca(0x218)](HELP_FOOTER_MESSAGE)['options'](_0x598731)['help'](_0x15f665['NyXtm'])[_0x1fedca(0x21d)];},exports['handler']=async function(_0x493702){const _0x3e0e63=a21_0x3c7dd9,_0x3f2185={'AKJup':_0x3e0e63(0x213),'dlert':function(_0x147d72){return _0x147d72();},'OLkDt':_0x3e0e63(0x1e1),'hjeAf':function(_0xee23af,_0x272161,_0x2e38b9,_0x5e0921,_0x12dc58,_0x2a1978,_0x185b86){return _0xee23af(_0x272161,_0x2e38b9,_0x5e0921,_0x12dc58,_0x2a1978,_0x185b86);},'jvotm':'stop-grid-called','eQUjh':'init-not-called','mQKzm':_0x3e0e63(0x1fd),'iOvFm':_0x3e0e63(0x1fa),'mqwPv':'Adding\x20Websocket\x20listeners','lZLpI':function(_0x579f4a,_0x2dcad8,_0x11d329,_0x13d14c){return _0x579f4a(_0x2dcad8,_0x11d329,_0x13d14c);},'kYtNO':function(_0x4cc89b,_0x458fcc,_0x41473d,_0x2bcde3,_0x143fe4,_0x115cb9,_0x5b7444){return _0x4cc89b(_0x458fcc,_0x41473d,_0x2bcde3,_0x143fe4,_0x115cb9,_0x5b7444);},'SBiYj':function(_0x42fd8d,_0x452891,_0x5c8ca2){return _0x42fd8d(_0x452891,_0x5c8ca2);},'tPUtE':_0x3e0e63(0x1f7),'XEuDl':function(_0x5a7ab1,_0x52b56c){return _0x5a7ab1===_0x52b56c;},'kumsP':'Failed\x20to\x20fetch\x20grid\x20details\x20from\x20the\x20server.\x20Unauthorized\x20request!','YzXFG':function(_0x20c9fa,_0x409152,_0x39fe5b,_0x2ecc1d,_0x4ef501,_0x51c0bc,_0x24dfc0){return _0x20c9fa(_0x409152,_0x39fe5b,_0x2ecc1d,_0x4ef501,_0x51c0bc,_0x24dfc0);},'DKkFf':_0x3e0e63(0x20f),'qetbp':_0x3e0e63(0x1ea),'lszNp':_0x3e0e63(0x21b)};let _0x424b42;try{!_0x493702[_0x3e0e63(0x21c)]&&(logger[_0x3e0e63(0x211)](_0x3f2185[_0x3e0e63(0x21a)]),process[_0x3e0e63(0x202)](0x1));!fs['existsSync'](_0x3f2185['dlert'](getCredentialsPath))&&(logger['error'](_0x3f2185[_0x3e0e63(0x214)]),await _0x3f2185[_0x3e0e63(0x1f8)](sendInstrumentationEvent,_0x493702,_0x3f2185[_0x3e0e63(0x1fc)],messageTypes[_0x3e0e63(0x208)],_0x3f2185[_0x3e0e63(0x21e)],null,_0x493702),process[_0x3e0e63(0x202)](0x1));logger[_0x3e0e63(0x1fb)]('Stopping\x20grid\x20'+_0x493702[_0x3e0e63(0x21c)]),await _0x3f2185[_0x3e0e63(0x1f8)](sendInstrumentationEvent,_0x493702,_0x3f2185[_0x3e0e63(0x1fc)],messageTypes[_0x3e0e63(0x221)],null,null,_0x493702);const _0x3f7dff=JSON[_0x3e0e63(0x1e9)](fs[_0x3e0e63(0x1e7)](_0x3f2185[_0x3e0e63(0x1de)](getCredentialsPath)));global_registry[_0x3e0e63(0x20e)]=_0x3f7dff[_0x3e0e63(0x220)]['username'],global_registry[_0x3e0e63(0x20d)]=_0x3f7dff[_0x3e0e63(0x220)][_0x3e0e63(0x22c)];const _0x2bb5a8=WS_ENDPOINT[_0x3e0e63(0x1eb)](_0x3f2185[_0x3e0e63(0x204)],_0x3f7dff[_0x3e0e63(0x220)][_0x3e0e63(0x1ef)])[_0x3e0e63(0x1eb)](_0x3f2185[_0x3e0e63(0x1e6)],_0x3f7dff['Browserstack'][_0x3e0e63(0x22c)]),_0xe9a9e8={};_0xe9a9e8[_0x3e0e63(0x1e8)]=ws,_0xe9a9e8[_0x3e0e63(0x1e2)]=0x36ee80,_0x424b42=new ReconnectingWebSocket(_0x2bb5a8,[],_0xe9a9e8),logger[_0x3e0e63(0x230)](_0x3f2185['mqwPv']),webSocketUtils[_0x3e0e63(0x1f4)](_0x424b42,_0x493702['user'],_0x493702[_0x3e0e63(0x22c)]);const [_0x257341,_0x84abb9]=await _0x3f2185['lZLpI'](getGridDetails,_0x3f7dff[_0x3e0e63(0x220)][_0x3e0e63(0x1ef)],_0x3f7dff['Browserstack'][_0x3e0e63(0x22c)],_0x493702[_0x3e0e63(0x21c)]);if(_0x84abb9){const _0x1b4437=_0x84abb9[_0x3e0e63(0x1fb)];global_registry['cloudProvider']=_0x1b4437[_0x3e0e63(0x1e5)],global_registry[_0x3e0e63(0x200)]=_0x1b4437[_0x3e0e63(0x1ff)],global_registry[_0x3e0e63(0x201)]=_0x1b4437[_0x3e0e63(0x201)];const _0x50d6b8=await _0x3f2185[_0x3e0e63(0x203)](getCloudProviderObject,_0x1b4437[_0x3e0e63(0x1e5)],_0x1b4437[_0x3e0e63(0x201)],_0x1b4437[_0x3e0e63(0x1ec)],_0x424b42,webSocketUtils,_0x493702),[_0xeaeb82,_0x2cc553,_0x2d9537,_0x273798,_0x1b3e8a,_0x18e915]=await _0x3f2185['SBiYj'](createK8sClient,_0x50d6b8,_0x493702[_0x3e0e63(0x20c)]);await _0x3f2185['SBiYj'](scaleDownHubDeployment,_0x2cc553,_0x1b4437[_0x3e0e63(0x1ec)]),logger['info'](_0x3f2185[_0x3e0e63(0x229)]),process[_0x3e0e63(0x202)](0x0);}_0x3f2185[_0x3e0e63(0x225)](_0x257341[_0x3e0e63(0x209)],0x191)&&(logger[_0x3e0e63(0x211)](_0x3f2185['kumsP']),await _0x3f2185[_0x3e0e63(0x1df)](sendInstrumentationEvent,_0x493702,_0x3f2185[_0x3e0e63(0x1fc)],messageTypes[_0x3e0e63(0x208)],_0x3f2185[_0x3e0e63(0x20b)],null,_0x493702),process[_0x3e0e63(0x202)](0x1)),_0x3f2185[_0x3e0e63(0x225)](_0x257341[_0x3e0e63(0x209)],0x190)&&(logger[_0x3e0e63(0x211)](JSON[_0x3e0e63(0x1e9)](_0x257341['body'])['message']),await _0x3f2185[_0x3e0e63(0x1f8)](sendInstrumentationEvent,_0x493702,_0x3f2185[_0x3e0e63(0x1fc)],messageTypes[_0x3e0e63(0x208)],_0x3f2185[_0x3e0e63(0x22d)],null,_0x493702),process[_0x3e0e63(0x202)](0x1)),logger[_0x3e0e63(0x211)](_0x3e0e63(0x223)+JSON[_0x3e0e63(0x1f5)](_0x257341)),await _0x3f2185[_0x3e0e63(0x203)](sendInstrumentationEvent,_0x493702,_0x3f2185['jvotm'],messageTypes[_0x3e0e63(0x208)],_0x3f2185[_0x3e0e63(0x206)],_0x257341,_0x493702),process['exit'](0x1);}catch(_0x4c8437){const _0x341f47=_0x3e0e63(0x1f2)+_0x4c8437+'\x20\x0a'+JSON[_0x3e0e63(0x1f5)](_0x4c8437['stack'])+'\x20';logger[_0x3e0e63(0x211)](_0x341f47),process['exit'](0x1);}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a22_0x55a165=a22_0x1221;(function(_0xf2d4e0,_0x341765){const _0x4c2fdc=a22_0x1221,_0x47fff6=_0xf2d4e0();while(!![]){try{const _0x232ccb=-parseInt(_0x4c2fdc(0x1f2))/0x1*(-parseInt(_0x4c2fdc(0x216))/0x2)+-parseInt(_0x4c2fdc(0x20e))/0x3*(-parseInt(_0x4c2fdc(0x205))/0x4)+-parseInt(_0x4c2fdc(0x1d8))/0x5+parseInt(_0x4c2fdc(0x1eb))/0x6+parseInt(_0x4c2fdc(0x204))/0x7+parseInt(_0x4c2fdc(0x1fa))/0x8+-parseInt(_0x4c2fdc(0x217))/0x9*(parseInt(_0x4c2fdc(0x22c))/0xa);if(_0x232ccb===_0x341765)break;else _0x47fff6['push'](_0x47fff6['shift']());}catch(_0x2241b6){_0x47fff6['push'](_0x47fff6['shift']());}}}(a22_0x35b3,0xe1d10),require(a22_0x55a165(0x1dd))[a22_0x55a165(0x1e2)]());let gridURL=a22_0x55a165(0x215),bsApiUrl=a22_0x55a165(0x241),agApiUrl=a22_0x55a165(0x1d9);function a22_0x1221(_0x47a151,_0x414527){const _0x35b330=a22_0x35b3();return a22_0x1221=function(_0x122112,_0x5604a4){_0x122112=_0x122112-0x1d6;let _0xf3fd83=_0x35b330[_0x122112];return _0xf3fd83;},a22_0x1221(_0x47a151,_0x414527);}const _env=(process[a22_0x55a165(0x1e6)]['BROWSERSTACK_ENV']||a22_0x55a165(0x1f8))[a22_0x55a165(0x1da)]();if(_env===a22_0x55a165(0x20a)||_env===a22_0x55a165(0x1f7))gridURL=a22_0x55a165(0x219),bsApiUrl=a22_0x55a165(0x208),agApiUrl='grid-api-devhst.bsstag.com';else(_env==='preprod'||_env===a22_0x55a165(0x23d))&&(gridURL=a22_0x55a165(0x220),bsApiUrl=a22_0x55a165(0x1e0),agApiUrl=a22_0x55a165(0x22e));exports['DASHBOARD_ENDPOINT']=process[a22_0x55a165(0x1e6)][a22_0x55a165(0x1fe)]||gridURL,exports['BS_API_URL']=process[a22_0x55a165(0x1e6)][a22_0x55a165(0x20d)]||bsApiUrl,exports[a22_0x55a165(0x237)]=process[a22_0x55a165(0x1e6)][a22_0x55a165(0x237)]||agApiUrl,exports[a22_0x55a165(0x232)]=a22_0x55a165(0x242)+this['AG_API_URL']+'/ws?username=<UsernamePlaceholder>&password=<PasswordPlaceholder>',exports[a22_0x55a165(0x201)]=a22_0x55a165(0x235),exports[a22_0x55a165(0x222)]='BrowserStackIAMUser',exports[a22_0x55a165(0x1de)]=a22_0x55a165(0x1f9),exports['AWS']='aws',exports[a22_0x55a165(0x213)]=a22_0x55a165(0x1e4),exports[a22_0x55a165(0x1d7)]='BSTACK-ATS-CLUSTER-AUTOSCALER',exports[a22_0x55a165(0x1ea)]=a22_0x55a165(0x22a),exports[a22_0x55a165(0x20c)]=a22_0x55a165(0x231),exports['AZURE']=a22_0x55a165(0x1e8),exports['GCP']=a22_0x55a165(0x206),exports['ALL_SUPPORTED_CLOUD_PROVIDERS']=[this[a22_0x55a165(0x240)],this[a22_0x55a165(0x1ee)],this[a22_0x55a165(0x244)]];const a22_0x652b5c={};a22_0x652b5c[a22_0x55a165(0x229)]='browserstack:managedBy',a22_0x652b5c[a22_0x55a165(0x1fb)]='BrowserStack';const a22_0x1b5eff={};a22_0x1b5eff[a22_0x55a165(0x229)]='browserstack:service',a22_0x1b5eff[a22_0x55a165(0x1fb)]=a22_0x55a165(0x210);const common_hst_tags_list=[a22_0x652b5c,a22_0x1b5eff];if(process[a22_0x55a165(0x1e6)][a22_0x55a165(0x1e5)]){const parsedTags=process[a22_0x55a165(0x1e6)][a22_0x55a165(0x1e5)]['split'](',');parsedTags['forEach'](_0x59ce52=>{const _0x221c79=a22_0x55a165,_0x4a54ee=_0x59ce52['split'](':'),_0x4b63a2={};_0x4b63a2[_0x221c79(0x229)]=_0x4a54ee[0x0],_0x4b63a2[_0x221c79(0x1fb)]=_0x4a54ee[0x1],common_hst_tags_list['push'](_0x4b63a2);});}exports['COMMON_HST_TAGS']=common_hst_tags_list;const a22_0x48e5de={};a22_0x48e5de[a22_0x55a165(0x23b)]=a22_0x55a165(0x21e),a22_0x48e5de[a22_0x55a165(0x239)]=a22_0x55a165(0x210),exports[a22_0x55a165(0x22d)]=a22_0x48e5de,exports[a22_0x55a165(0x1ff)]=[this[a22_0x55a165(0x240)]];const a22_0x13ec2e={};a22_0x13ec2e['LOG']=a22_0x55a165(0x20b),a22_0x13ec2e[a22_0x55a165(0x1f0)]=a22_0x55a165(0x22f),a22_0x13ec2e[a22_0x55a165(0x1f6)]=a22_0x55a165(0x236),a22_0x13ec2e[a22_0x55a165(0x211)]=a22_0x55a165(0x23c),a22_0x13ec2e[a22_0x55a165(0x20f)]=a22_0x55a165(0x207),exports[a22_0x55a165(0x1ed)]=a22_0x13ec2e,exports[a22_0x55a165(0x1f1)]={},exports[a22_0x55a165(0x21d)]=a22_0x55a165(0x225);const a22_0x1f455f={};a22_0x1f455f[a22_0x55a165(0x212)]=a22_0x55a165(0x21b)+this[a22_0x55a165(0x21d)],a22_0x1f455f['init']=a22_0x55a165(0x21a)+this['LINK_MESSAGE'],a22_0x1f455f[a22_0x55a165(0x1e9)]='\x0aThis\x20command\x20will\x20take\x20you\x20through\x20the\x20configuration\x20of\x20BrowserStack\x20CLI.'+this['LINK_MESSAGE'],a22_0x1f455f['create']=a22_0x55a165(0x230)+this[a22_0x55a165(0x21d)],a22_0x1f455f[a22_0x55a165(0x1e3)]={},a22_0x1f455f[a22_0x55a165(0x200)]=a22_0x55a165(0x1e1)+this[a22_0x55a165(0x21d)],a22_0x1f455f[a22_0x55a165(0x209)]=a22_0x55a165(0x234)+this[a22_0x55a165(0x21d)],a22_0x1f455f[a22_0x55a165(0x1f5)]='\x0aThis\x20will\x20start\x20an\x20existing\x20Automation\x20grid.'+this[a22_0x55a165(0x21d)],a22_0x1f455f[a22_0x55a165(0x23a)]=a22_0x55a165(0x243)+this[a22_0x55a165(0x21d)],a22_0x1f455f[a22_0x55a165(0x227)]=a22_0x55a165(0x202)+this[a22_0x55a165(0x21d)],a22_0x1f455f[a22_0x55a165(0x1e3)][a22_0x55a165(0x212)]=a22_0x55a165(0x214)+this['LINK_MESSAGE'],a22_0x1f455f[a22_0x55a165(0x1e3)]['grid']=a22_0x55a165(0x22b)+this[a22_0x55a165(0x21d)],a22_0x1f455f[a22_0x55a165(0x1e3)]['gridProfile']=a22_0x55a165(0x1f4)+this[a22_0x55a165(0x21d)],exports['HELP_HEADER_MESSAGE']=a22_0x1f455f,exports['HELP_FOOTER_MESSAGE']=a22_0x55a165(0x218);const a22_0x15667d={};a22_0x15667d[a22_0x55a165(0x1f3)]=a22_0x55a165(0x203),a22_0x15667d[a22_0x55a165(0x1e7)]=a22_0x55a165(0x21f),a22_0x15667d['INFO']=a22_0x55a165(0x21c),a22_0x15667d[a22_0x55a165(0x1fc)]='warning',a22_0x15667d[a22_0x55a165(0x233)]=a22_0x55a165(0x1d6),a22_0x15667d[a22_0x55a165(0x221)]=null,exports['messageTypes']=a22_0x15667d,exports[a22_0x55a165(0x224)]=/(?<=("u"|"username"|"k"|"key") *: *)"[^,}]*/g,exports['RAW_ARGS_REGEX']=/(?<=("-u"|"-username"|"-k"|"-key") *, *)"[^,\]]*/g,exports[a22_0x55a165(0x1ec)]=a22_0x55a165(0x1db);const a22_0x338ec2={};a22_0x338ec2[a22_0x55a165(0x23e)]=a22_0x55a165(0x23f);function a22_0x35b3(){const _0x346233=['AZURE','CLOUD_PROVIDER','RESOURCES','global_registry','17577hAqJVI','SUCCESS','\x0aThis\x20command\x20will\x20list\x20down\x20the\x20grid\x20profiles\x20created.','start','GRID_URL','stag','prod','high-scale-grid','12616600XiWzzX','Value','WARNING','CLUSTER','DASHBOARD_ENDPOINT','SUPPORTED_CLOUD_PROVIDERS','delete','CP_CONFIG_FILE','\x0aThis\x20will\x20check\x20the\x20pre-requisites\x20for\x20setting\x20up\x20Automation\x20grid.','success','6631849RJkKVJ','6064drUIjw','gcp','cliRunFinished','api-devhst.bsstag.com','connect','staging','log','TURBOSCALE_DEPLOYMENT','BS_API_URL','1089MwUlRH','CLI_RUN_FINISHED','BrowserStack-Automate-TurboScale','CLI_RUN_STARTED','root','CLUSTER_DEP_STACK_NAME','\x0aThis\x20command\x20will\x20list\x20down\x20the\x20resources\x20created\x20on\x20Automate\x20TurboScale.','grid.browserstack.com','6VyUQkr','14346477qcZLDY','Use\x20\x22browserstack-cli\x20ats\x20<command_group>\x20-h/--help\x22\x20for\x20more\x20options\x20available\x20about\x20Automate\x20TurboScale.','grid-devhst.bsstag.com','\x0aThis\x20command\x20will\x20take\x20you\x20through\x20the\x20initialisation\x20of\x20BrowserStack\x20CLI.','\x0aCreate\x20and\x20Manage\x20scalable\x20browser\x20automation\x20grids\x20for\x20Functional\x20Testing.','info','LINK_MESSAGE','BrowserStack','error','grid-preprod.bsstag.com','NULL','IAM_USER_NAME','high-scale-grid-cluster','CLI_ARGS_REGEX','\x0a\x0aFind\x20more\x20information\x20at:\x20https://browserstack.com/docs/automate-turboscale/references/browserstack-cli','REGION','pre_check','TRIAL_GRID_URL','Key','BSTACK-ATS-CLUSTER-HUB-HA','\x0aThis\x20command\x20will\x20list\x20down\x20the\x20grids\x20created.','10WSOylD','HST_CLUSTER_TAGS','grid-api-preprod.bsstag.com','resourceInfo','\x0aThis\x20will\x20help\x20create\x20a\x20new\x20Automation\x20grid.','browserstack-turboscale-grid','WS_ENDPOINT','UNKNOWN','\x0aThis\x20will\x20connect\x20the\x20grid\x20with\x20existing\x20VPC.','credentials','gridUrl','AG_API_URL','https://nroujxly-hub.browserstack-ats.com/wd/hub/status','browserstack:service','stop','browserstack:managedBy','cliRunStarted','pre-prod','grid-profile','Failed\x20to\x20fetch\x20grid\x20profile\x20from\x20the\x20server','AWS','api.browserstack.com','wss://','\x0aThis\x20will\x20stop\x20a\x20running\x20Automation\x20grid.','GCP','unknown','CLUSTER_AUTOSCALER_STACK_NAME','7905490VRmdbH','grid-api.browserstack.com','toLowerCase','[REDACTED]','pre-check','dotenv','DEFAULT_GRID_NAME','aws','api-preprod.bsstag.com','\x0aThis\x20will\x20help\x20delete\x20the\x20Automation\x20grid.','config','list','BSTACK-ATS-CLUSTER','TURBOSCALE_CUSTOM_TAGS','env','ERROR','azure','configure','CLUSTER_HUB_HA_STACK_NAME','5835444xnkMXt','REDACTED','WS_EVENTS'];a22_0x35b3=function(){return _0x346233;};return a22_0x35b3();}const a22_0x15f312={};a22_0x15f312[a22_0x55a165(0x1dc)]=a22_0x338ec2,exports['MessageDescription']=a22_0x15f312,exports[a22_0x55a165(0x228)]=a22_0x55a165(0x238);const a22_0x1b1505={};a22_0x1b1505[a22_0x55a165(0x1fd)]=a22_0x55a165(0x223),a22_0x1b1505[a22_0x55a165(0x1ef)]=a22_0x55a165(0x1df),a22_0x1b1505[a22_0x55a165(0x226)]='us-east-1',exports['DEFAULT_CLUSTER_DETAILS']=a22_0x1b1505;
|
package/ats/src/config/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a23_0x48ac47=a23_0x4d14;(function(_0x1cf2ed,_0x318f2e){const _0x327550=a23_0x4d14,_0x36e0f6=_0x1cf2ed();while(!![]){try{const _0xe64fb5=-parseInt(_0x327550(0x6f))/0x1*(-parseInt(_0x327550(0x83))/0x2)+parseInt(_0x327550(0x82))/0x3*(parseInt(_0x327550(0x7b))/0x4)+parseInt(_0x327550(0x85))/0x5+-parseInt(_0x327550(0x73))/0x6*(parseInt(_0x327550(0x7d))/0x7)+parseInt(_0x327550(0x72))/0x8*(-parseInt(_0x327550(0x74))/0x9)+-parseInt(_0x327550(0x75))/0xa+-parseInt(_0x327550(0x76))/0xb*(-parseInt(_0x327550(0x6a))/0xc);if(_0xe64fb5===_0x318f2e)break;else _0x36e0f6['push'](_0x36e0f6['shift']());}catch(_0x4e603a){_0x36e0f6['push'](_0x36e0f6['shift']());}}}(a23_0x2411,0x633ed));const winston=require(a23_0x48ac47(0x77)),fs=require('fs'),path=require(a23_0x48ac47(0x7a)),logDir='log';!fs['existsSync'](logDir)&&fs[a23_0x48ac47(0x80)](logDir);const a23_0x7e738e={};a23_0x7e738e[a23_0x48ac47(0x84)]=a23_0x48ac47(0x70);function a23_0x4d14(_0x2fad95,_0x2c7874){const _0x241176=a23_0x2411();return a23_0x4d14=function(_0x4d14a7,_0x3759c3){_0x4d14a7=_0x4d14a7-0x67;let _0x5c1b19=_0x241176[_0x4d14a7];return _0x5c1b19;},a23_0x4d14(_0x2fad95,_0x2c7874);}const a23_0x33c151={};a23_0x33c151['level']=!![];function a23_0x2411(){const _0x3806dc=['usage.log','\x20-\x20','mkdirSync','level','6JYxooo','15866SRUOLU','format','2990670IzpDhB','createLogger','colorize','transports','File','12eYngUr','timestamp','fileLogger','console.info','logger','69xTLRAt','YYYY-MM-DD\x20HH:mm:ss','message','88hlBxGs','12678mnTeOB','256473OuEawR','6357190aVGQjs','2019787ZmLpks','winston','name','debug','path','513768tkebyh','combine','763uSrqkH'];a23_0x2411=function(){return _0x3806dc;};return a23_0x2411();}const a23_0x279880={};a23_0x279880[a23_0x48ac47(0x78)]=a23_0x48ac47(0x6d),exports[a23_0x48ac47(0x6e)]=new winston[(a23_0x48ac47(0x86))]({'format':winston['format'][a23_0x48ac47(0x7c)](winston[a23_0x48ac47(0x84)]['timestamp'](a23_0x7e738e),winston[a23_0x48ac47(0x84)][a23_0x48ac47(0x67)](a23_0x33c151),winston['format']['printf'](_0x47ede0=>_0x47ede0[a23_0x48ac47(0x6b)]+a23_0x48ac47(0x7f)+_0x47ede0[a23_0x48ac47(0x81)]+':\x20'+_0x47ede0[a23_0x48ac47(0x71)])),'transports':[new winston[(a23_0x48ac47(0x68))]['Console'](a23_0x279880),new winston[(a23_0x48ac47(0x68))][(a23_0x48ac47(0x69))]({'filename':path['join'](logDir,'events.log'),'level':a23_0x48ac47(0x79)})]});const winstonFileLoggerParams={'transports':[new winston[(a23_0x48ac47(0x68))][(a23_0x48ac47(0x69))]({'filename':path['join'](logDir,a23_0x48ac47(0x7e)),'level':'debug'})]};exports[a23_0x48ac47(0x6c)]=new winston[(a23_0x48ac47(0x86))](winstonFileLoggerParams);
|
package/ats/src/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
'use strict';
|
|
2
|
+
'use strict';const a24_0x441bd8=a24_0x1983;(function(_0x56e586,_0x44900a){const _0x4a77e3=a24_0x1983,_0x4e2c00=_0x56e586();while(!![]){try{const _0x4081b8=-parseInt(_0x4a77e3(0x1d5))/0x1+-parseInt(_0x4a77e3(0x1d2))/0x2*(parseInt(_0x4a77e3(0x1e1))/0x3)+parseInt(_0x4a77e3(0x1d6))/0x4+parseInt(_0x4a77e3(0x1dc))/0x5*(parseInt(_0x4a77e3(0x1e4))/0x6)+-parseInt(_0x4a77e3(0x1df))/0x7*(-parseInt(_0x4a77e3(0x1da))/0x8)+parseInt(_0x4a77e3(0x1e0))/0x9*(-parseInt(_0x4a77e3(0x1de))/0xa)+parseInt(_0x4a77e3(0x1d1))/0xb;if(_0x4081b8===_0x44900a)break;else _0x4e2c00['push'](_0x4e2c00['shift']());}catch(_0x5cc91b){_0x4e2c00['push'](_0x4e2c00['shift']());}}}(a24_0x19f5,0xea59d));const {HELP_FOOTER_MESSAGE,HELP_HEADER_MESSAGE}=require('./config/constants');function a24_0x1983(_0x8f984b,_0x355a9f){const _0x19f529=a24_0x19f5();return a24_0x1983=function(_0x19835e,_0x5a1364){_0x19835e=_0x19835e-0x1d0;let _0x35c6bf=_0x19f529[_0x19835e];return _0x35c6bf;},a24_0x1983(_0x8f984b,_0x355a9f);}function a24_0x19f5(){const _0x5813c4=['2674anXBIn','9odAeMw','3USOocd','demandCommand','commandDir','4525224SgPtwk','tesRb','35378860iQMhiL','2681086YiFLGL','env','epilogue','1716154cvzPfV','4192804rfgqsJ','IPGhm','exports','AWS_SDK_JS_SUPPRESS_MAINTENANCE_MODE_MESSAGE','3272DXGODI','help','5TWOQvQ','root','11583050XUpwnM'];a24_0x19f5=function(){return _0x5813c4;};return a24_0x19f5();}process[a24_0x441bd8(0x1d3)][a24_0x441bd8(0x1d9)]=0x1;function run(_0x2c097f){const _0x2ed51e=a24_0x441bd8,_0x27ca09={};_0x27ca09['IPGhm']='commands',_0x27ca09[_0x2ed51e(0x1d0)]=_0x2ed51e(0x1db);const _0x2ff276=_0x27ca09;_0x2c097f['usage'](HELP_HEADER_MESSAGE[_0x2ed51e(0x1dd)])[_0x2ed51e(0x1e3)](_0x2ff276[_0x2ed51e(0x1d7)])[_0x2ed51e(0x1e2)]()[_0x2ed51e(0x1db)](_0x2ff276['tesRb'])[_0x2ed51e(0x1d4)](HELP_FOOTER_MESSAGE);}module[a24_0x441bd8(0x1d8)]=run;
|