browserstack-node-sdk 1.21.1 → 1.23.0
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/CFTemplates/aws-eks-cluster-dep.yaml +202 -0
- package/ats/src/CFTemplates/s3-create.yaml +20 -0
- package/ats/src/CFTemplates/subnet-create.yaml +85 -0
- package/ats/src/CFTemplates/subnet-import.yaml +15 -0
- package/ats/src/CFTemplates/vpc-create.yaml +27 -0
- package/ats/src/CFTemplates/vpc-import.yaml +5 -0
- package/ats/src/commands/configure.js +1 -0
- package/ats/src/commands/connect.js +1 -0
- package/ats/src/commands/connect_commands/grid.js +1 -0
- package/ats/src/commands/create.js +1 -0
- package/ats/src/commands/create_commands/grid.js +1 -0
- package/ats/src/commands/delete.js +1 -0
- package/ats/src/commands/delete_commands/grid.js +1 -0
- package/ats/src/commands/init.js +1 -0
- package/ats/src/commands/list.js +1 -0
- package/ats/src/commands/list_commands/grid_profiles.js +1 -0
- package/ats/src/commands/list_commands/grids.js +1 -0
- package/ats/src/config/constants.js +1 -0
- package/ats/src/config/instanceTypes.json +554 -0
- package/ats/src/config/logger.js +1 -0
- package/ats/src/index.js +2 -0
- package/ats/src/templates/KubeConfigTemplate.yaml +33 -0
- package/ats/src/templates/autoscaler/cluster-role-binding.yaml +15 -0
- package/ats/src/templates/autoscaler/clusterrole.yaml +56 -0
- package/ats/src/templates/autoscaler/deployment.yaml +66 -0
- package/ats/src/templates/autoscaler/role-binding.yaml +16 -0
- package/ats/src/templates/autoscaler/role.yaml +17 -0
- package/ats/src/templates/autoscaler/sa.yaml +10 -0
- package/ats/src/templates/autoscaler-role-creation.yaml +185 -0
- package/ats/src/templates/aws-auth-cm.yaml +13 -0
- package/ats/src/templates/cluster-role-binding.yaml +12 -0
- package/ats/src/templates/hub-deployment.yaml +76 -0
- package/ats/src/templates/hub-service.yaml +26 -0
- package/ats/src/utils/AWSUtils.js +1 -0
- package/ats/src/utils/createAutoscalerStack.js +1 -0
- package/ats/src/utils/createClusterStack.js +1 -0
- package/ats/src/utils/createk8sClient.js +1 -0
- package/ats/src/utils/deleteStack.js +1 -0
- package/ats/src/utils/gridComponents.js +1 -0
- package/ats/src/utils/hstUtils.js +1 -0
- package/ats/src/utils/instrumentationUtils.js +1 -0
- package/ats/src/utils/userInput.js +1 -0
- package/ats/src/utils/utilityMethods.js +1 -0
- package/ats/src/utils/webSocketUtils.js +1 -0
- package/package.json +1 -1
- package/src/bin/codeceptjs/BrowserStackPlugin.js +1 -1
- package/src/bin/codeceptjs/command.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.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/jest/command.js +1 -1
- package/src/bin/jest/customEnvironment.js +1 -1
- package/src/bin/jest/customTestRunnerTemplate.js +1 -1
- package/src/bin/jest/jest.setup.js +1 -1
- package/src/bin/jest/test_before.setup.js +1 -1
- package/src/bin/launcher/launcher.js +1 -1
- package/src/bin/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/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/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/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/vanilla-js/command.js +1 -1
- package/src/helpers/BrowserStackSetup.js +1 -1
- package/src/helpers/capsMapping.js +1 -1
- package/src/helpers/helper.js +1 -1
- package/src/helpers/logger.js +1 -1
- package/src/helpers/patchHelpers.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/performance-tester.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/w3cMapping.js +1 -1
- package/src/hubAllocationMethods.js +1 -1
- package/src/index.js +1 -1
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
---
|
|
2
|
+
AWSTemplateFormatVersion: "2010-09-09"
|
|
3
|
+
Description: "Amazon EKS VPC"
|
|
4
|
+
|
|
5
|
+
Parameters:
|
|
6
|
+
VpcBlock:
|
|
7
|
+
Type: String
|
|
8
|
+
Default: 192.168.0.0/16 #Todo: Take this input from user
|
|
9
|
+
Description: The CIDR range for the VPC. This should be a valid private (RFC 1918) CIDR range.
|
|
10
|
+
|
|
11
|
+
Subnet01Block:
|
|
12
|
+
Type: String
|
|
13
|
+
Default: 192.168.64.0/18
|
|
14
|
+
Description: CidrBlock for subnet 01 within the VPC
|
|
15
|
+
|
|
16
|
+
Subnet02Block:
|
|
17
|
+
Type: String
|
|
18
|
+
Default: 192.168.128.0/18
|
|
19
|
+
Description: CidrBlock for subnet 02 within the VPC
|
|
20
|
+
|
|
21
|
+
Subnet03Block:
|
|
22
|
+
Type: String
|
|
23
|
+
Default: 192.168.192.0/18
|
|
24
|
+
Description: CidrBlock for subnet 03 within the VPC
|
|
25
|
+
|
|
26
|
+
ClusterName:
|
|
27
|
+
Type: String
|
|
28
|
+
Default: my-first-cluster
|
|
29
|
+
Description: "EKS cluster"
|
|
30
|
+
|
|
31
|
+
NodeImageId:
|
|
32
|
+
Type: AWS::EC2::Image::Id
|
|
33
|
+
Description: AMI id for the node instances.
|
|
34
|
+
|
|
35
|
+
S3BucketName:
|
|
36
|
+
Type: String
|
|
37
|
+
Description: "S3 bucket for storing session logs"
|
|
38
|
+
|
|
39
|
+
NodeInstanceType:
|
|
40
|
+
Description: EC2 instance type for the node instances
|
|
41
|
+
Type: String
|
|
42
|
+
Default: t3.large
|
|
43
|
+
ConstraintDescription: Must be a valid EC2 instance type
|
|
44
|
+
|
|
45
|
+
NodeAutoScalingGroupMinSize:
|
|
46
|
+
Type: Number
|
|
47
|
+
Description: Minimum size of Node Group ASG.
|
|
48
|
+
Default: 1
|
|
49
|
+
|
|
50
|
+
NodeAutoScalingGroupMaxSize:
|
|
51
|
+
Type: Number
|
|
52
|
+
Description: Maximum size of Node Group ASG.
|
|
53
|
+
Default: 3
|
|
54
|
+
|
|
55
|
+
NodeVolumeSize:
|
|
56
|
+
Type: Number
|
|
57
|
+
Description: Node volume size
|
|
58
|
+
Default: 10
|
|
59
|
+
|
|
60
|
+
BootstrapArguments:
|
|
61
|
+
Description: Arguments to pass to the bootstrap script. See files/bootstrap.sh in https://github.com/awslabs/amazon-eks-ami
|
|
62
|
+
Default: ""
|
|
63
|
+
Type: String
|
|
64
|
+
|
|
65
|
+
NodeGroupName:
|
|
66
|
+
Description: Unique identifier for the Node Group.
|
|
67
|
+
Type: String
|
|
68
|
+
|
|
69
|
+
Metadata:
|
|
70
|
+
AWS::CloudFormation::Interface:
|
|
71
|
+
ParameterGroups:
|
|
72
|
+
- Label:
|
|
73
|
+
default: "Worker Network Configuration"
|
|
74
|
+
Parameters:
|
|
75
|
+
- ClusterName
|
|
76
|
+
- Label:
|
|
77
|
+
default: "Cluster Configuration"
|
|
78
|
+
Parameters:
|
|
79
|
+
- ClusterName
|
|
80
|
+
- Label:
|
|
81
|
+
default: "Worker Node Configuration"
|
|
82
|
+
Parameters:
|
|
83
|
+
- NodeGroupName
|
|
84
|
+
- NodeAutoScalingGroupMinSize
|
|
85
|
+
- NodeAutoScalingGroupMaxSize
|
|
86
|
+
- NodeInstanceType
|
|
87
|
+
- NodeImageId
|
|
88
|
+
- NodeVolumeSize
|
|
89
|
+
- BootstrapArguments
|
|
90
|
+
|
|
91
|
+
Resources:
|
|
92
|
+
ControlPlaneSecurityGroup:
|
|
93
|
+
Type: AWS::EC2::SecurityGroup
|
|
94
|
+
Properties:
|
|
95
|
+
GroupDescription: Cluster communication with worker nodes
|
|
96
|
+
VpcId: !Ref VPC
|
|
97
|
+
Tags: []
|
|
98
|
+
|
|
99
|
+
ClusterRole:
|
|
100
|
+
Type: AWS::IAM::Role
|
|
101
|
+
Properties:
|
|
102
|
+
Description: "Allows EKS to manage clusters on your behalf"
|
|
103
|
+
AssumeRolePolicyDocument:
|
|
104
|
+
Version: "2012-10-17"
|
|
105
|
+
Statement:
|
|
106
|
+
- Effect: Allow
|
|
107
|
+
Principal:
|
|
108
|
+
Service:
|
|
109
|
+
- eks.amazonaws.com
|
|
110
|
+
Action:
|
|
111
|
+
- sts:AssumeRole
|
|
112
|
+
Path: "/"
|
|
113
|
+
ManagedPolicyArns:
|
|
114
|
+
- arn:aws:iam::aws:policy/AmazonEKSClusterPolicy
|
|
115
|
+
- arn:aws:iam::aws:policy/AmazonEKSServicePolicy
|
|
116
|
+
- arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly
|
|
117
|
+
Tags: []
|
|
118
|
+
|
|
119
|
+
EKSCluster:
|
|
120
|
+
Type: AWS::EKS::Cluster
|
|
121
|
+
DependsOn:
|
|
122
|
+
- ClusterRole
|
|
123
|
+
- ControlPlaneSecurityGroup
|
|
124
|
+
Properties:
|
|
125
|
+
Name: !Ref ClusterName
|
|
126
|
+
# Version: "1.10"
|
|
127
|
+
RoleArn: !GetAtt ClusterRole.Arn
|
|
128
|
+
ResourcesVpcConfig:
|
|
129
|
+
SecurityGroupIds:
|
|
130
|
+
- !Join [",", [!Ref ControlPlaneSecurityGroup]]
|
|
131
|
+
SubnetIds: []
|
|
132
|
+
Tags: []
|
|
133
|
+
|
|
134
|
+
NodeInstanceRole:
|
|
135
|
+
Type: AWS::IAM::Role
|
|
136
|
+
DependsOn:
|
|
137
|
+
- EKSCluster
|
|
138
|
+
Properties:
|
|
139
|
+
AssumeRolePolicyDocument:
|
|
140
|
+
Version: "2012-10-17"
|
|
141
|
+
Statement:
|
|
142
|
+
- Effect: Allow
|
|
143
|
+
Principal:
|
|
144
|
+
Service:
|
|
145
|
+
- ec2.amazonaws.com
|
|
146
|
+
Action:
|
|
147
|
+
- sts:AssumeRole
|
|
148
|
+
Path: "/"
|
|
149
|
+
ManagedPolicyArns:
|
|
150
|
+
- arn:aws:iam::aws:policy/AmazonEKSWorkerNodePolicy
|
|
151
|
+
- arn:aws:iam::aws:policy/AmazonEKS_CNI_Policy
|
|
152
|
+
- arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly
|
|
153
|
+
- arn:aws:iam::aws:policy/AmazonS3FullAccess
|
|
154
|
+
Tags: []
|
|
155
|
+
|
|
156
|
+
NodeGroup:
|
|
157
|
+
Type: AWS::EKS::Nodegroup
|
|
158
|
+
DependsOn:
|
|
159
|
+
- EKSCluster
|
|
160
|
+
Properties:
|
|
161
|
+
CapacityType: "ON_DEMAND"
|
|
162
|
+
ClusterName: !Ref ClusterName
|
|
163
|
+
InstanceTypes:
|
|
164
|
+
- !Ref NodeInstanceType
|
|
165
|
+
Labels:
|
|
166
|
+
createdBy: Browserstack
|
|
167
|
+
managedBy: Browserstack
|
|
168
|
+
NodegroupName: !Ref NodeGroupName
|
|
169
|
+
NodeRole: !GetAtt NodeInstanceRole.Arn
|
|
170
|
+
ScalingConfig:
|
|
171
|
+
{
|
|
172
|
+
DesiredSize: 1,
|
|
173
|
+
MinSize: !Ref NodeAutoScalingGroupMinSize,
|
|
174
|
+
MaxSize: !Ref NodeAutoScalingGroupMaxSize,
|
|
175
|
+
}
|
|
176
|
+
Subnets: []
|
|
177
|
+
Tags: []
|
|
178
|
+
|
|
179
|
+
Outputs:
|
|
180
|
+
VpcId:
|
|
181
|
+
Description: The VPC Id
|
|
182
|
+
Value: !Ref VPC
|
|
183
|
+
|
|
184
|
+
SubnetIds:
|
|
185
|
+
Description: All subnets in the VPC
|
|
186
|
+
Value: !Join [",", []]
|
|
187
|
+
|
|
188
|
+
SecurityGroups:
|
|
189
|
+
Description: Security group for the cluster control plane communication with worker nodes
|
|
190
|
+
Value: !Join [",", [!Ref ControlPlaneSecurityGroup]]
|
|
191
|
+
|
|
192
|
+
EKSClusterRole:
|
|
193
|
+
Description: Role to manage EKS cluster
|
|
194
|
+
Value: !GetAtt ClusterRole.Arn
|
|
195
|
+
|
|
196
|
+
EKSClusterName:
|
|
197
|
+
Description: EKS Cluster
|
|
198
|
+
Value: !Ref EKSCluster
|
|
199
|
+
|
|
200
|
+
NodeInstanceRole:
|
|
201
|
+
Description: The node instance role
|
|
202
|
+
Value: !GetAtt NodeInstanceRole.Arn
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
Resources:
|
|
2
|
+
S3Bucket:
|
|
3
|
+
Type: AWS::S3::Bucket
|
|
4
|
+
DeletionPolicy: Retain
|
|
5
|
+
Properties:
|
|
6
|
+
BucketName: !Ref S3BucketName
|
|
7
|
+
LifecycleConfiguration:
|
|
8
|
+
Rules:
|
|
9
|
+
- Id: 60 Days Expiration
|
|
10
|
+
Status: Enabled
|
|
11
|
+
ExpirationInDays: 60
|
|
12
|
+
CorsConfiguration:
|
|
13
|
+
CorsRules:
|
|
14
|
+
- AllowedHeaders:
|
|
15
|
+
- "*"
|
|
16
|
+
AllowedMethods:
|
|
17
|
+
- GET
|
|
18
|
+
AllowedOrigins:
|
|
19
|
+
- "*"
|
|
20
|
+
Tags: []
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
Resources:
|
|
2
|
+
RouteTable:
|
|
3
|
+
Type: AWS::EC2::RouteTable
|
|
4
|
+
Properties:
|
|
5
|
+
VpcId: !Ref VPC
|
|
6
|
+
Tags:
|
|
7
|
+
- Key: Name
|
|
8
|
+
Value: Public Subnets
|
|
9
|
+
- Key: Network
|
|
10
|
+
Value: Public
|
|
11
|
+
|
|
12
|
+
Subnet01:
|
|
13
|
+
Type: AWS::EC2::Subnet
|
|
14
|
+
Metadata:
|
|
15
|
+
Comment: Subnet 01
|
|
16
|
+
Properties:
|
|
17
|
+
AvailabilityZone:
|
|
18
|
+
Fn::Select:
|
|
19
|
+
- "0"
|
|
20
|
+
- Fn::GetAZs:
|
|
21
|
+
Ref: AWS::Region
|
|
22
|
+
CidrBlock:
|
|
23
|
+
Ref: Subnet01Block
|
|
24
|
+
VpcId:
|
|
25
|
+
Ref: VPC
|
|
26
|
+
MapPublicIpOnLaunch: true
|
|
27
|
+
Tags:
|
|
28
|
+
- Key: Name
|
|
29
|
+
Value: !Sub "${AWS::StackName}-Subnet01"
|
|
30
|
+
|
|
31
|
+
Subnet02:
|
|
32
|
+
Type: AWS::EC2::Subnet
|
|
33
|
+
Metadata:
|
|
34
|
+
Comment: Subnet 02
|
|
35
|
+
Properties:
|
|
36
|
+
AvailabilityZone:
|
|
37
|
+
Fn::Select:
|
|
38
|
+
- "1"
|
|
39
|
+
- Fn::GetAZs:
|
|
40
|
+
Ref: AWS::Region
|
|
41
|
+
CidrBlock:
|
|
42
|
+
Ref: Subnet02Block
|
|
43
|
+
VpcId:
|
|
44
|
+
Ref: VPC
|
|
45
|
+
MapPublicIpOnLaunch: true
|
|
46
|
+
Tags:
|
|
47
|
+
- Key: Name
|
|
48
|
+
Value: !Sub "${AWS::StackName}-Subnet02"
|
|
49
|
+
|
|
50
|
+
Subnet03:
|
|
51
|
+
Type: AWS::EC2::Subnet
|
|
52
|
+
Metadata:
|
|
53
|
+
Comment: Subnet 03
|
|
54
|
+
Properties:
|
|
55
|
+
AvailabilityZone:
|
|
56
|
+
Fn::Select:
|
|
57
|
+
- "2"
|
|
58
|
+
- Fn::GetAZs:
|
|
59
|
+
Ref: AWS::Region
|
|
60
|
+
CidrBlock:
|
|
61
|
+
Ref: Subnet03Block
|
|
62
|
+
VpcId:
|
|
63
|
+
Ref: VPC
|
|
64
|
+
MapPublicIpOnLaunch: true
|
|
65
|
+
Tags:
|
|
66
|
+
- Key: Name
|
|
67
|
+
Value: !Sub "${AWS::StackName}-Subnet03"
|
|
68
|
+
|
|
69
|
+
Subnet01RouteTableAssociation:
|
|
70
|
+
Type: AWS::EC2::SubnetRouteTableAssociation
|
|
71
|
+
Properties:
|
|
72
|
+
SubnetId: !Ref Subnet01
|
|
73
|
+
RouteTableId: !Ref RouteTable
|
|
74
|
+
|
|
75
|
+
Subnet02RouteTableAssociation:
|
|
76
|
+
Type: AWS::EC2::SubnetRouteTableAssociation
|
|
77
|
+
Properties:
|
|
78
|
+
SubnetId: !Ref Subnet02
|
|
79
|
+
RouteTableId: !Ref RouteTable
|
|
80
|
+
|
|
81
|
+
Subnet03RouteTableAssociation:
|
|
82
|
+
Type: AWS::EC2::SubnetRouteTableAssociation
|
|
83
|
+
Properties:
|
|
84
|
+
SubnetId: !Ref Subnet03
|
|
85
|
+
RouteTableId: !Ref RouteTable
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
Parameters:
|
|
2
|
+
Subnet01:
|
|
3
|
+
Type: String
|
|
4
|
+
Default: subnet-017242b7bcc0b97f8
|
|
5
|
+
Description: "Name of Subnet"
|
|
6
|
+
|
|
7
|
+
Subnet02:
|
|
8
|
+
Type: String
|
|
9
|
+
Default: subnet-0bd9b67cda2da7b28
|
|
10
|
+
Description: "Name of Subnet"
|
|
11
|
+
|
|
12
|
+
Subnet03:
|
|
13
|
+
Type: String
|
|
14
|
+
Default: subnet-06dcf55173ca136df
|
|
15
|
+
Description: "Name of Subnet"
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
Resources:
|
|
2
|
+
VPC:
|
|
3
|
+
Type: AWS::EC2::VPC
|
|
4
|
+
Properties:
|
|
5
|
+
CidrBlock: !Ref VpcBlock
|
|
6
|
+
EnableDnsSupport: true
|
|
7
|
+
EnableDnsHostnames: true
|
|
8
|
+
Tags:
|
|
9
|
+
- Key: Name
|
|
10
|
+
Value: !Sub "${AWS::StackName}-VPC"
|
|
11
|
+
|
|
12
|
+
InternetGateway:
|
|
13
|
+
Type: "AWS::EC2::InternetGateway"
|
|
14
|
+
|
|
15
|
+
VPCGatewayAttachment:
|
|
16
|
+
Type: "AWS::EC2::VPCGatewayAttachment"
|
|
17
|
+
Properties:
|
|
18
|
+
InternetGatewayId: !Ref InternetGateway
|
|
19
|
+
VpcId: !Ref VPC
|
|
20
|
+
|
|
21
|
+
Route:
|
|
22
|
+
DependsOn: VPCGatewayAttachment
|
|
23
|
+
Type: AWS::EC2::Route
|
|
24
|
+
Properties:
|
|
25
|
+
RouteTableId: !Ref RouteTable
|
|
26
|
+
DestinationCidrBlock: 0.0.0.0/0
|
|
27
|
+
GatewayId: !Ref InternetGateway
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a0_0x405c(){const _0x2661f4=['Credentials\x20not\x20found!\x20Ensure\x20init\x20command\x20is\x20run\x20before\x20running\x20this\x20command.','Failed\x20to\x20fetch\x20grid\x20profile\x20details\x20from\x20the\x20server.\x20Unauthorized\x20request!','strict','util','Updated\x20default\x20Grid\x20Profile\x20successfully','DuRhd','/packages/cli/configure','dgUrW','../config/constants','jGcaE','CxMTY','../utils/utilityMethods','8863519musZeR','INFO','uNEfP','175725PFvtwr','tBpAT','rgiZD','desc','body','init-not-called','core:','gwdEg','GfZZP','list','kzGHJ','error','2950PbtcUT','readFileSync','xVBvt','auth','Wrong\x20input!\x20Please\x20try\x20again\x20with\x20a\x20valid\x20input.','lpTRN','PUT','PmHck','exit','request','Browserstack','profileId','KhFEk','15rBgNwL','stringify','xqxZV','recommendCommands','Otxyf','Lgyvf','LuZdc','argv','epilogue','log','help','LOMCa','eyxpm','https://','username','\x20\x20grid-profile:\x20','requestId','unknown-error','usvTa','statusCode','url','4560012ObwXws','server-error','xpfNV','Please\x20enter\x20numeric\x20choice\x20(must\x20exactly\x20match\x20list\x20item)','dLbOZ','unauthorised','vwQrO','gtRJe','usage','ZCdFZ','15658408JgtWqF','uuid','existsSync','length','DMhQc','invalid-selection','\x0aCurrent\x20configured\x20automation\x20grid\x20settings\x20are:','stack','360088rOdAdQ','method','wnWAw','gZXXo','znmEg','../utils/instrumentationUtils','configure','password','FBgHj','GET','niBam','698253QUoeff','json','ERROR','Failed\x20to\x20configure\x20resources!\x20Error:\x20','2575066kNEUup','parse','toLowerCase','hQUro','invalid-input','1TfCege','fqolO','QbsHG'];a0_0x405c=function(){return _0x2661f4;};return a0_0x405c();}const a0_0x19021e=a0_0x1195;(function(_0x1749bf,_0xe3964d){const _0x503352=a0_0x1195,_0x431c62=_0x1749bf();while(!![]){try{const _0x17bba4=parseInt(_0x503352(0xae))/0x1*(-parseInt(_0x503352(0xa9))/0x2)+parseInt(_0x503352(0xa5))/0x3+parseInt(_0x503352(0x9a))/0x4*(parseInt(_0x503352(0x73))/0x5)+-parseInt(_0x503352(0x88))/0x6+-parseInt(_0x503352(0xbd))/0x7+-parseInt(_0x503352(0x92))/0x8+parseInt(_0x503352(0xc0))/0x9*(parseInt(_0x503352(0xcc))/0xa);if(_0x17bba4===_0xe3964d)break;else _0x431c62['push'](_0x431c62['shift']());}catch(_0x1fecd1){_0x431c62['push'](_0x431c62['shift']());}}}(a0_0x405c,0xf2197));function a0_0x1195(_0x2c8bc4,_0x9e93ee){const _0x405c46=a0_0x405c();return a0_0x1195=function(_0x119585,_0x2c0219){_0x119585=_0x119585-0x72;let _0x34d2ac=_0x405c46[_0x119585];return _0x34d2ac;},a0_0x1195(_0x2c8bc4,_0x9e93ee);}const fs=require('fs'),util=require(a0_0x19021e(0xb4)),request=require(a0_0x19021e(0xd5)),{v4:uuidv4}=require(a0_0x19021e(0x93)),{inputConfirmation,closeInput}=require('../utils/userInput'),{AG_API_URL,HELP_HEADER_MESSAGE,HELP_FOOTER_MESSAGE,global_registry,messageTypes}=require(a0_0x19021e(0xb9)),{getCredentialsPath}=require(a0_0x19021e(0xbc)),{sendInstrumentationEvent}=require(a0_0x19021e(0x9f)),promisifiedRequest=util['promisify'](request);exports['command']=a0_0x19021e(0xa0),exports[a0_0x19021e(0xc3)]='Configure\x20the\x20default\x20automation\x20grid\x20profiles\x20on\x20BrowserStack\x20CLI.',exports['builder']=function(_0x45eafe){const _0x3f8779=a0_0x19021e,_0x69edbb={};_0x69edbb[_0x3f8779(0x7f)]='help';const _0x1831f2=_0x69edbb;return _0x45eafe[_0x3f8779(0x90)](HELP_HEADER_MESSAGE['configure'])[_0x3f8779(0x7b)](HELP_FOOTER_MESSAGE)[_0x3f8779(0x7d)](_0x1831f2[_0x3f8779(0x7f)])[_0x3f8779(0x76)]()[_0x3f8779(0xb3)]()[_0x3f8779(0x7a)];},exports['handler']=async function(_0x2276cb){const _0x5f2b6f=a0_0x19021e,_0x4082ec={'xpfNV':function(_0x12b294){return _0x12b294();},'eJozR':_0x5f2b6f(0xb1),'znmEg':function(_0x5e07d9,_0x949fd1,_0x59dd15,_0x56b3d8,_0x142e1b,_0x4fffc8,_0xdb57bb){return _0x5e07d9(_0x949fd1,_0x59dd15,_0x56b3d8,_0x142e1b,_0x4fffc8,_0xdb57bb);},'PmHck':'configure-called','xVBvt':_0x5f2b6f(0xc5),'LOMCa':_0x5f2b6f(0xa3),'wnWAw':function(_0x4e106e,_0x916bab){return _0x4e106e(_0x916bab);},'clkYj':function(_0xf2c7bd,_0x1478ff){return _0xf2c7bd!==_0x1478ff;},'vwQrO':function(_0x443fa1,_0x1e78bc){return _0x443fa1!==_0x1e78bc;},'xqxZV':function(_0x282c60,_0x2004d3){return _0x282c60===_0x2004d3;},'dgUrW':_0x5f2b6f(0x98),'rgiZD':_0x5f2b6f(0xc6),'dLbOZ':function(_0x1ad577,_0x9fc4cc){return _0x1ad577(_0x9fc4cc);},'Otxyf':'Do\x20you\x20want\x20to\x20change\x20the\x20default\x20grid-profile\x20(y/n)?','jGcaE':function(_0x4e641c,_0x253a39){return _0x4e641c===_0x253a39;},'DMhQc':function(_0x53d9d2,_0x4ef431){return _0x53d9d2===_0x4ef431;},'fqolO':_0x5f2b6f(0xd0),'tBpAT':function(_0x3dcae3,_0x54560a,_0x4e9522,_0x6abff2,_0x5857a8,_0x488f0e,_0x1e0b49){return _0x3dcae3(_0x54560a,_0x4e9522,_0x6abff2,_0x5857a8,_0x488f0e,_0x1e0b49);},'CxMTY':_0x5f2b6f(0xad),'DuRhd':function(_0x127f54,_0x1bf795){return _0x127f54===_0x1bf795;},'ufGNL':'What\x20Grid\x20profile\x20will\x20you\x20make\x20as\x20default?','oDsiN':function(_0x586021,_0x843381){return _0x586021<_0x843381;},'kzGHJ':function(_0x344452,_0x142c9c){return _0x344452+_0x142c9c;},'gtRJe':_0x5f2b6f(0x8b),'gZXXo':function(_0x144683,_0x120003){return _0x144683(_0x120003);},'usvTa':function(_0x21afb3,_0x550dcb){return _0x21afb3>_0x550dcb;},'QvUuk':function(_0x4e4b20,_0x17c048,_0x549810,_0x30bc37,_0x32e7ea,_0x50d1da,_0x2ca2dd){return _0x4e4b20(_0x17c048,_0x549810,_0x30bc37,_0x32e7ea,_0x50d1da,_0x2ca2dd);},'FBgHj':_0x5f2b6f(0x97),'LuZdc':function(_0x2fd947,_0x162879){return _0x2fd947-_0x162879;},'DXVMI':_0x5f2b6f(0xd2),'QbsHG':function(_0x753cde,_0x4c15dd){return _0x753cde!==_0x4c15dd;},'uNEfP':function(_0x529494,_0x331ba3){return _0x529494!==_0x331ba3;},'khzwf':_0x5f2b6f(0xb5),'KhFEk':function(_0x3eabb8,_0x25059e,_0x42968f,_0x4e81d0,_0x36078f,_0x4ab0b5,_0x1ddeff){return _0x3eabb8(_0x25059e,_0x42968f,_0x4e81d0,_0x36078f,_0x4ab0b5,_0x1ddeff);},'lpTRN':_0x5f2b6f(0x8d),'ZCdFZ':function(_0xcce6ea,_0x26d653,_0x144de1,_0x2e9d9d,_0x4acb3d,_0x20fbda,_0xbce82b){return _0xcce6ea(_0x26d653,_0x144de1,_0x2e9d9d,_0x4acb3d,_0x20fbda,_0xbce82b);},'hQUro':_0x5f2b6f(0x89),'niBam':function(_0x2e40a1,_0x3f5b6b){return _0x2e40a1===_0x3f5b6b;},'Lgyvf':function(_0x1566b4,_0x53929f,_0x622e64,_0x3f090a,_0x36f990,_0x3125b0,_0x396d5c){return _0x1566b4(_0x53929f,_0x622e64,_0x3f090a,_0x36f990,_0x3125b0,_0x396d5c);},'GfZZP':function(_0x2c2f6b,_0x3ff697,_0x894886,_0x2c2062,_0x520931,_0x2f7a1f,_0x366b65){return _0x2c2f6b(_0x3ff697,_0x894886,_0x2c2062,_0x520931,_0x2f7a1f,_0x366b65);},'gwdEg':_0x5f2b6f(0x84)};try{global_registry[_0x5f2b6f(0x83)]=_0x4082ec[_0x5f2b6f(0x8a)](uuidv4);const _0x5368f7=_0x5f2b6f(0x80)+AG_API_URL+_0x5f2b6f(0xb7);!fs[_0x5f2b6f(0x94)](_0x4082ec[_0x5f2b6f(0x8a)](getCredentialsPath))&&(console[_0x5f2b6f(0xcb)](_0x4082ec['eJozR']),await _0x4082ec['znmEg'](sendInstrumentationEvent,_0x2276cb,_0x4082ec['PmHck'],messageTypes[_0x5f2b6f(0xa7)],_0x4082ec[_0x5f2b6f(0xce)],null,_0x2276cb),process[_0x5f2b6f(0xd4)](0x1));await _0x4082ec[_0x5f2b6f(0x9e)](sendInstrumentationEvent,_0x2276cb,_0x4082ec[_0x5f2b6f(0xd3)],messageTypes[_0x5f2b6f(0xbe)],null,null,_0x2276cb);const _0x3c1751=JSON['parse'](fs[_0x5f2b6f(0xcd)](_0x4082ec[_0x5f2b6f(0x8a)](getCredentialsPath))),_0x470e65={};_0x470e65[_0x5f2b6f(0x81)]=_0x3c1751[_0x5f2b6f(0xd6)][_0x5f2b6f(0x81)],_0x470e65[_0x5f2b6f(0xa1)]=_0x3c1751['Browserstack']['password'];const _0xc777da={};_0xc777da[_0x5f2b6f(0x87)]=_0x5368f7,_0xc777da[_0x5f2b6f(0x9b)]=_0x4082ec[_0x5f2b6f(0x7e)],_0xc777da['auth']=_0x470e65;const _0x5df402=_0xc777da,_0x175b82=await _0x4082ec[_0x5f2b6f(0x9c)](promisifiedRequest,_0x5df402);if(_0x4082ec['clkYj'](_0x175b82,null)&&_0x4082ec[_0x5f2b6f(0x8e)](_0x175b82,undefined)&&_0x4082ec[_0x5f2b6f(0x75)](_0x175b82['statusCode'],0xc8)){const _0x451696=JSON[_0x5f2b6f(0xaa)](_0x175b82[_0x5f2b6f(0xc4)]);console[_0x5f2b6f(0x7c)](_0x4082ec[_0x5f2b6f(0xb8)]),console['log'](_0x4082ec[_0x5f2b6f(0xc2)]),console[_0x5f2b6f(0x7c)]('\x20\x20username:\x20'+_0x3c1751['Browserstack']['username']),console[_0x5f2b6f(0x7c)](_0x5f2b6f(0x82)+_0x451696['active']['name']);const _0x39c9bc=await _0x4082ec[_0x5f2b6f(0x8c)](inputConfirmation,_0x4082ec[_0x5f2b6f(0x77)]);(_0x4082ec[_0x5f2b6f(0xba)](_0x39c9bc,undefined)||_0x4082ec[_0x5f2b6f(0xba)](_0x39c9bc,null)||!(_0x4082ec[_0x5f2b6f(0xba)](_0x39c9bc[_0x5f2b6f(0xab)](),'y')||_0x4082ec[_0x5f2b6f(0x96)](_0x39c9bc[_0x5f2b6f(0xab)](),'n')))&&(console[_0x5f2b6f(0xcb)](_0x4082ec[_0x5f2b6f(0xaf)]),await _0x4082ec[_0x5f2b6f(0xc1)](sendInstrumentationEvent,_0x2276cb,_0x4082ec[_0x5f2b6f(0xd3)],messageTypes['ERROR'],_0x4082ec[_0x5f2b6f(0xbb)],null,_0x2276cb),process[_0x5f2b6f(0xd4)](0x1));_0x4082ec[_0x5f2b6f(0xb6)](_0x39c9bc[_0x5f2b6f(0xab)](),'n')&&process[_0x5f2b6f(0xd4)](0x0);console[_0x5f2b6f(0x7c)](_0x4082ec['ufGNL']);const _0x373397=_0x451696['list'][_0x5f2b6f(0x95)];for(let _0x502833=0x0;_0x4082ec['oDsiN'](_0x502833,_0x373397);_0x502833+=0x1){console[_0x5f2b6f(0x7c)]('['+_0x4082ec[_0x5f2b6f(0xca)](_0x502833,0x1)+']\x20'+_0x451696[_0x5f2b6f(0xc9)][_0x502833]['name']);}const _0x18158a=await _0x4082ec[_0x5f2b6f(0x8c)](inputConfirmation,_0x4082ec[_0x5f2b6f(0x8f)]),_0x409e61=_0x4082ec[_0x5f2b6f(0x9d)](Number,_0x18158a);(_0x4082ec[_0x5f2b6f(0x9c)](isNaN,_0x409e61)||_0x4082ec['oDsiN'](_0x409e61,0x0)||_0x4082ec[_0x5f2b6f(0x85)](_0x409e61,_0x373397))&&(console['error'](_0x4082ec['fqolO']),await _0x4082ec['QvUuk'](sendInstrumentationEvent,_0x2276cb,_0x4082ec['PmHck'],messageTypes[_0x5f2b6f(0xa7)],_0x4082ec[_0x5f2b6f(0xa2)],null,_0x2276cb),process[_0x5f2b6f(0xd4)](0x1));_0x4082ec[_0x5f2b6f(0x8a)](closeInput);const _0x79c3b3=_0x451696[_0x5f2b6f(0xc9)][_0x4082ec[_0x5f2b6f(0x79)](_0x409e61,0x1)]['id'],_0x3f6d3a={};_0x3f6d3a[_0x5f2b6f(0x81)]=_0x3c1751[_0x5f2b6f(0xd6)][_0x5f2b6f(0x81)],_0x3f6d3a[_0x5f2b6f(0xa1)]=_0x3c1751[_0x5f2b6f(0xd6)][_0x5f2b6f(0xa1)];const _0x2e72de={};_0x2e72de[_0x5f2b6f(0xd7)]=_0x79c3b3;const _0x2d893f={};_0x2d893f[_0x5f2b6f(0x87)]=_0x5368f7,_0x2d893f[_0x5f2b6f(0x9b)]=_0x4082ec['DXVMI'],_0x2d893f[_0x5f2b6f(0xcf)]=_0x3f6d3a,_0x2d893f['body']=_0x2e72de,_0x2d893f[_0x5f2b6f(0xa6)]=!![];const _0x2c8fbc=_0x2d893f,_0x295bba=await _0x4082ec[_0x5f2b6f(0x9c)](promisifiedRequest,_0x2c8fbc);_0x4082ec[_0x5f2b6f(0xb0)](_0x295bba,null)&&_0x4082ec[_0x5f2b6f(0xbf)](_0x295bba,undefined)&&_0x4082ec[_0x5f2b6f(0x75)](_0x295bba[_0x5f2b6f(0x86)],0xc8)&&(console['log'](_0x4082ec['khzwf']),process[_0x5f2b6f(0xd4)](0x0)),_0x4082ec['DuRhd'](_0x295bba[_0x5f2b6f(0x86)],0x191)&&(console[_0x5f2b6f(0xcb)]('Failed\x20to\x20update\x20grid\x20profile.\x20Unauthorized\x20request!'),await _0x4082ec[_0x5f2b6f(0x72)](sendInstrumentationEvent,_0x2276cb,_0x4082ec[_0x5f2b6f(0xd3)],messageTypes[_0x5f2b6f(0xa7)],_0x4082ec[_0x5f2b6f(0xd1)],null,_0x2276cb),process[_0x5f2b6f(0xd4)](0x1)),console[_0x5f2b6f(0xcb)]('Failed\x20to\x20update\x20grid\x20profile.\x20Response\x20from\x20server:\x20'+JSON['stringify'](_0x295bba)),await _0x4082ec[_0x5f2b6f(0x91)](sendInstrumentationEvent,_0x2276cb,_0x4082ec[_0x5f2b6f(0xd3)],messageTypes[_0x5f2b6f(0xa7)],_0x4082ec[_0x5f2b6f(0xac)],_0x295bba,_0x2276cb),process['exit'](0x1);}_0x4082ec[_0x5f2b6f(0xa4)](_0x175b82['statusCode'],0x191)&&(console[_0x5f2b6f(0xcb)](_0x5f2b6f(0xb2)),await _0x4082ec[_0x5f2b6f(0x78)](sendInstrumentationEvent,_0x2276cb,_0x4082ec[_0x5f2b6f(0xd3)],messageTypes[_0x5f2b6f(0xa7)],_0x4082ec[_0x5f2b6f(0xd1)],null,_0x2276cb),process['exit'](0x1)),console[_0x5f2b6f(0xcb)]('Failed\x20to\x20fetch\x20grid\x20profile\x20details\x20from\x20the\x20server.\x20Response\x20from\x20server:\x20'+JSON[_0x5f2b6f(0x74)](_0x175b82)),await _0x4082ec[_0x5f2b6f(0xc8)](sendInstrumentationEvent,_0x2276cb,_0x4082ec[_0x5f2b6f(0xd3)],messageTypes[_0x5f2b6f(0xa7)],_0x4082ec[_0x5f2b6f(0xac)],_0x175b82,_0x2276cb),process[_0x5f2b6f(0xd4)](0x1);}catch(_0x962d05){console[_0x5f2b6f(0xcb)](_0x5f2b6f(0xa8)+_0x962d05[_0x5f2b6f(0x99)]),await _0x4082ec[_0x5f2b6f(0x72)](sendInstrumentationEvent,_0x2276cb,_0x4082ec[_0x5f2b6f(0xd3)],messageTypes[_0x5f2b6f(0xa7)],_0x4082ec[_0x5f2b6f(0xc7)],_0x962d05,_0x2276cb),process[_0x5f2b6f(0xd4)](0x1);}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a1_0x1532bc=a1_0x5478;(function(_0xca833d,_0x35e741){const _0x926129=a1_0x5478,_0x57e435=_0xca833d();while(!![]){try{const _0x4a1da8=-parseInt(_0x926129(0x90))/0x1*(parseInt(_0x926129(0x8c))/0x2)+parseInt(_0x926129(0x8d))/0x3*(-parseInt(_0x926129(0x92))/0x4)+-parseInt(_0x926129(0x86))/0x5*(-parseInt(_0x926129(0x8a))/0x6)+parseInt(_0x926129(0x8b))/0x7+-parseInt(_0x926129(0x8e))/0x8*(parseInt(_0x926129(0x81))/0x9)+-parseInt(_0x926129(0x96))/0xa+parseInt(_0x926129(0x91))/0xb*(parseInt(_0x926129(0x80))/0xc);if(_0x4a1da8===_0x35e741)break;else _0x57e435['push'](_0x57e435['shift']());}catch(_0x373efc){_0x57e435['push'](_0x57e435['shift']());}}}(a1_0x3151,0x42760));const {HELP_HEADER_MESSAGE,HELP_FOOTER_MESSAGE}=require(a1_0x1532bc(0x94));exports['command']=a1_0x1532bc(0x8f),exports[a1_0x1532bc(0x88)]='Create\x20a\x20private\x20connection\x20between\x20grid\x20and\x20your\x20staging\x20environment',exports[a1_0x1532bc(0x82)]=function(_0x4c63ef){const _0x281a19=a1_0x1532bc,_0x482780={};_0x482780['tbAjc']='connect_commands',_0x482780[_0x281a19(0x87)]=_0x281a19(0x83);const _0x75110f=_0x482780;return _0x4c63ef[_0x281a19(0x89)](HELP_HEADER_MESSAGE[_0x281a19(0x8f)])[_0x281a19(0x85)](HELP_FOOTER_MESSAGE)[_0x281a19(0x97)](_0x75110f[_0x281a19(0x84)])[_0x281a19(0x93)]()['recommendCommands']()[_0x281a19(0x95)]()['help'](_0x75110f[_0x281a19(0x87)]);},exports[a1_0x1532bc(0x7f)]=function(_0x276598){};function a1_0x5478(_0x121810,_0x4cd7af){const _0x31517d=a1_0x3151();return a1_0x5478=function(_0x54788a,_0x166332){_0x54788a=_0x54788a-0x7f;let _0x548e21=_0x31517d[_0x54788a];return _0x548e21;},a1_0x5478(_0x121810,_0x4cd7af);}function a1_0x3151(){const _0x236b69=['99vZLXGI','204572znLMdW','demandCommand','../config/constants','strict','4802570suMvVo','commandDir','handler','1465812ZPIdBr','99qxDVzP','builder','help','tbAjc','epilogue','970525vpGNsX','QSFDE','desc','usage','6IBwPEE','1623069RZDmKw','10VkQEbW','18XPmfYR','4936JoYFwB','connect','91841PPLRpo'];a1_0x3151=function(){return _0x236b69;};return a1_0x3151();}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a2_0x280523=a2_0x58a4;function a2_0x5009(){const _0x2f17fe=['EyAmb','GtXTH','TLWTN','etpkk','uAMad','grid-id','qiTyD','create','bstackUsername','JEjiS','210GPvkhB','Please\x20provide\x20a\x20valid\x20Grid\x20Identifier','vRKqC','argv','VJVAV','accessKey','builder','epceS','help','4tktVfk','FaihT','options','COpSr','../../config/logger','87861AnUTCM','This\x20command\x20will\x20connect\x20the\x20grid\x20with\x20existing\x20VPC','error','WKjQM','info','XoItR','Optional\x20boolean\x20argument\x20to\x20create\x20private\x20connection\x20between\x20grid\x20and\x20your\x20existing\x20staging\x20or\x20local\x20development\x20environment.','VlmNf','SoJCA','azoGc','HAdwU','type','beforeExit','6gxikRB','hHwou','usage','167235VkmAdp','otQJL','BZuVs','nLwGx','UByqk','1480608hzvCma','wabiX','tLCxN','lCcIZ','NwDdk','pYvpU','12LCWRNZ','1987286pJgcmG','XKnPf','isTrialGrid','VeHZw','exit','IEyWW','epilogue','description','144XZujTA','JLxXV','RistL','ZlRqU','fXZfE','IBPKB','bstack-accesskey','use-staging','nWOUZ','PFxhe','SIGINT','handler','BQDDT','eMfWZ','Advance\x20options\x20for\x20Browserstack\x20Local','QoYKF','advance-options','Couldn\x27t\x20find\x20username\x20/\x20accesskey,\x20please\x20use\x20--username\x20and\x20--accesskey','bstack-username','MotwX','gridId','3672hUwGmf','Pass\x20the\x20ID\x20of\x20the\x20Grid','Use\x20corresponding\x20access-key\x20to\x20configure\x20the\x20CLI\x20for\x20future\x20actions.','AOzPZ','string','isRunning','njdJD','demandOption','FnouE','96940ooejbF','bstackAccesskey','Mgjla','../../config/constants','3147683COZGAU','RUbPw','doOKn','ARMtX','SIGTERM','customRepeaters','huJer','grid','browserStackLocalOptions'];a2_0x5009=function(){return _0x2f17fe;};return a2_0x5009();}(function(_0x57bfd5,_0x71e824){const _0x5033af=a2_0x58a4,_0x14ebd6=_0x57bfd5();while(!![]){try{const _0x42f3a3=parseInt(_0x5033af(0x1b5))/0x1+-parseInt(_0x5033af(0x187))/0x2*(-parseInt(_0x5033af(0x1a7))/0x3)+-parseInt(_0x5033af(0x1b0))/0x4*(parseInt(_0x5033af(0x1c5))/0x5)+parseInt(_0x5033af(0x1c2))/0x6*(parseInt(_0x5033af(0x1d1))/0x7)+-parseInt(_0x5033af(0x1ca))/0x8+parseInt(_0x5033af(0x1d9))/0x9*(parseInt(_0x5033af(0x190))/0xa)+parseInt(_0x5033af(0x194))/0xb*(-parseInt(_0x5033af(0x1d0))/0xc);if(_0x42f3a3===_0x71e824)break;else _0x14ebd6['push'](_0x14ebd6['shift']());}catch(_0x20ee48){_0x14ebd6['push'](_0x14ebd6['shift']());}}}(a2_0x5009,0x24cb3));function a2_0x58a4(_0x48094b,_0x110688){const _0x5009b4=a2_0x5009();return a2_0x58a4=function(_0x58a4b6,_0x151ffa){_0x58a4b6=_0x58a4b6-0x17e;let _0x5252f1=_0x5009b4[_0x58a4b6];return _0x5252f1;},a2_0x58a4(_0x48094b,_0x110688);}const {HELP_HEADER_MESSAGE,HELP_FOOTER_MESSAGE}=require(a2_0x280523(0x193)),{logger}=require(a2_0x280523(0x1b4)),{fetchOrUpdateUserConfig,getGridDetails,startLocalBinarySync,stopLocalBinary}=require('../../utils/utilityMethods');exports['command']=a2_0x280523(0x19b),exports['desc']=a2_0x280523(0x1b6),exports[a2_0x280523(0x1ad)]=_0x3615a7=>{const _0x315e45=a2_0x280523,_0x4bdf92={};_0x4bdf92[_0x315e45(0x1b1)]='Use\x20username\x20to\x20configure\x20the\x20CLI\x20for\x20future\x20actions.',_0x4bdf92[_0x315e45(0x192)]=_0x315e45(0x18b),_0x4bdf92[_0x315e45(0x1db)]='Use\x20corresponding\x20access-key\x20to\x20configure\x20the\x20CLI\x20for\x20future\x20actions.',_0x4bdf92[_0x315e45(0x1c8)]='Pass\x20the\x20ID\x20of\x20the\x20Grid',_0x4bdf92[_0x315e45(0x19f)]=_0x315e45(0x1bb),_0x4bdf92[_0x315e45(0x1a3)]=_0x315e45(0x180),_0x4bdf92[_0x315e45(0x1cc)]=_0x315e45(0x1af);const _0x4913fb=_0x4bdf92,_0x506bd8={};_0x506bd8[_0x315e45(0x1d8)]=_0x4913fb['FaihT'],_0x506bd8['type']=_0x4913fb['Mgjla'];const _0x1df798={};_0x1df798[_0x315e45(0x1d8)]=_0x4913fb[_0x315e45(0x1db)],_0x1df798[_0x315e45(0x1c0)]=_0x4913fb[_0x315e45(0x192)];const _0x3ac426={};_0x3ac426[_0x315e45(0x18e)]=!![],_0x3ac426[_0x315e45(0x1d8)]=_0x4913fb[_0x315e45(0x1c8)],_0x3ac426[_0x315e45(0x1c0)]=_0x4913fb[_0x315e45(0x192)];const _0x401b55={};_0x401b55[_0x315e45(0x1d8)]=_0x4913fb[_0x315e45(0x19f)],_0x401b55[_0x315e45(0x1c0)]=_0x4913fb['Mgjla'];const _0xe1e97e={};_0xe1e97e[_0x315e45(0x1d8)]=_0x4913fb[_0x315e45(0x1a3)],_0xe1e97e[_0x315e45(0x1c0)]=_0x4913fb[_0x315e45(0x192)];const _0x12a7d1={};return _0x12a7d1['bstack-username']=_0x506bd8,_0x12a7d1[_0x315e45(0x1df)]=_0x1df798,_0x12a7d1[_0x315e45(0x1a2)]=_0x3ac426,_0x12a7d1[_0x315e45(0x1e0)]=_0x401b55,_0x12a7d1['advance-options']=_0xe1e97e,_0x3615a7[_0x315e45(0x1c4)](HELP_HEADER_MESSAGE['create'])['epilogue'](HELP_FOOTER_MESSAGE)[_0x315e45(0x1b2)](_0x12a7d1)['help'](_0x4913fb[_0x315e45(0x1cc)])[_0x315e45(0x1aa)];},exports[a2_0x280523(0x1e4)]=async _0x502123=>{const _0xb92f08=a2_0x280523,_0x311490={'pYvpU':function(_0x4b53c5,_0x1edb19){return _0x4b53c5(_0x1edb19);},'FnouE':function(_0x44f8ca,_0x41f86b){return _0x44f8ca===_0x41f86b;},'AGpzX':'zCNay','vRKqC':function(_0x5cf2b6,_0x20ae82){return _0x5cf2b6(_0x20ae82);},'IEyWW':function(_0x47a786,_0x1f2055){return _0x47a786==_0x1f2055;},'hHwou':function(_0x2400de,_0x536da9){return _0x2400de(_0x536da9);},'XoItR':_0xb92f08(0x1c1),'VeHZw':_0xb92f08(0x1e3),'huJer':_0xb92f08(0x198),'FRYNk':function(_0x1dd41d,_0x4a130c){return _0x1dd41d==_0x4a130c;},'eMfWZ':function(_0x51edd4,_0x5a1497){return _0x51edd4===_0x5a1497;},'SoJCA':_0xb92f08(0x1be),'YRjXC':function(_0x38fd8d,_0x3b0cea){return _0x38fd8d==_0x3b0cea;},'PFxhe':'Use\x20username\x20to\x20configure\x20the\x20CLI\x20for\x20future\x20actions.','wabiX':_0xb92f08(0x18b),'HHPBY':_0xb92f08(0x189),'JEjiS':_0xb92f08(0x188),'VlmNf':'Optional\x20boolean\x20argument\x20to\x20create\x20private\x20connection\x20between\x20grid\x20and\x20your\x20existing\x20staging\x20or\x20local\x20development\x20environment.','VJVAV':_0xb92f08(0x180),'lCcIZ':'help','BZuVs':function(_0x4adc4f,_0x4eab28,_0x4fa646){return _0x4adc4f(_0x4eab28,_0x4fa646);},'igpIh':function(_0x541b55,_0x43c1d3){return _0x541b55&&_0x43c1d3;},'njdJD':function(_0xce1403,_0x2cafec){return _0xce1403===_0x2cafec;},'COpSr':_0xb92f08(0x185),'NwDdk':_0xb92f08(0x196),'ytujJ':function(_0x342ab2,_0x4dd3aa){return _0x342ab2(_0x4dd3aa);},'ZlRqU':function(_0x5d2faa,_0x49d87b,_0x77d77c,_0x14ce93){return _0x5d2faa(_0x49d87b,_0x77d77c,_0x14ce93);},'uAMad':function(_0x44deaa,_0x121755){return _0x44deaa!==_0x121755;},'IBPKB':_0xb92f08(0x195),'epceS':_0xb92f08(0x197),'etpkk':function(_0x2cb811,_0x24c210){return _0x2cb811(_0x24c210);},'otQJL':function(_0x1fb464,_0x58ba27){return _0x1fb464===_0x58ba27;},'UByqk':'true','XKnPf':'kMOnG','sTZef':_0xb92f08(0x1dd),'lRnQx':function(_0x5408be,_0x271066){return _0x5408be===_0x271066;},'nWOUZ':'fZdtp','JLxXV':_0xb92f08(0x1bf),'GtXTH':function(_0x7732e4,_0x5b0c92){return _0x7732e4===_0x5b0c92;},'AOzPZ':_0xb92f08(0x1b8),'EyAmb':'yhoHF','BQDDT':function(_0x3d15a7,_0x765bc9){return _0x3d15a7(_0x765bc9);}};let _0x3bd3ce=_0x502123[_0xb92f08(0x1a5)],_0x3cf525=_0x502123[_0xb92f08(0x191)],_0x224a60=_0x502123['advanceOptions'];const _0x278c8b=_0x1df7e1=>{const _0x1803b0=_0xb92f08,_0x316fd7={'QoYKF':function(_0x411944,_0x19fd2f){const _0x330e2b=a2_0x58a4;return _0x311490[_0x330e2b(0x1cf)](_0x411944,_0x19fd2f);}};_0x311490[_0x1803b0(0x18f)](_0x311490['AGpzX'],_0x311490['AGpzX'])?(logger['error'](_0x1df7e1),process[_0x1803b0(0x1d5)](0x1)):_0x316fd7[_0x1803b0(0x181)](_0x480a36,'Please\x20provide\x20a\x20valid\x20Grid\x20Identifier');};[_0x3bd3ce,_0x3cf525]=_0x311490[_0xb92f08(0x1c7)](fetchOrUpdateUserConfig,_0x3bd3ce,_0x3cf525);!_0x311490['igpIh'](_0x3bd3ce,_0x3cf525)&&(_0x311490[_0xb92f08(0x18d)](_0x311490[_0xb92f08(0x1b3)],_0x311490[_0xb92f08(0x1ce)])?_0x311490[_0xb92f08(0x1a9)](_0x10042d,_0xb92f08(0x183)):_0x311490['ytujJ'](_0x278c8b,_0xb92f08(0x183)));let _0x384267=_0x502123[_0xb92f08(0x186)],_0x26c3f0=await _0x311490[_0xb92f08(0x1dc)](getGridDetails,_0x3bd3ce,_0x3cf525,_0x384267);if(!_0x26c3f0){if(_0x311490[_0xb92f08(0x1a1)](_0x311490[_0xb92f08(0x1de)],_0x311490[_0xb92f08(0x1ae)]))_0x311490[_0xb92f08(0x1a0)](_0x278c8b,_0xb92f08(0x1a8));else{const _0x5ccfe7={};_0x5ccfe7['accessKey']=_0x372eae,_0x5ccfe7[_0xb92f08(0x199)]=_0x4d486b['customRepeaters'],_0x5ccfe7[_0xb92f08(0x19c)]=_0x3b5c61;const _0x3acdb4=_0x5ccfe7,_0x39e97d=_0x311490['pYvpU'](_0x33a4e3,_0x3acdb4);let _0x431f4f=0x0;const _0x2dc5a8=async()=>{const _0x1514fb=_0xb92f08;_0x431f4f++,_0x311490[_0x1514fb(0x1d6)](_0x431f4f,0x1)&&_0x39e97d&&_0x39e97d[_0x1514fb(0x18c)]()&&_0x311490[_0x1514fb(0x1c3)](_0x24be22,_0x39e97d);};_0x45411c['on'](_0x311490[_0xb92f08(0x1ba)],_0x2dc5a8),_0x267c6f['on'](_0x311490['VeHZw'],_0x2dc5a8),_0x3e9ba7['on'](_0x311490[_0xb92f08(0x19a)],_0x2dc5a8),_0x3c3e04='We\x20have\x20successfully\x20established\x20a\x20connection\x20between\x20trial\x20grid\x20and\x20your\x20setup.\x20You\x20should\x20be\x20able\x20to\x20start\x20testing\x20your\x20internal\x20development\x20or\x20staging\x20websites.',_0x8f86ac[_0xb92f08(0x1b9)](_0x22f449);}}let _0x42ce03=_0x311490[_0xb92f08(0x1c6)](_0x502123['useStaging'],_0x311490[_0xb92f08(0x1c9)])?!![]:![];if(_0x26c3f0&&_0x26c3f0[_0xb92f08(0x1d3)]&&_0x42ce03){if(_0x311490[_0xb92f08(0x18f)](_0x311490[_0xb92f08(0x1d2)],_0x311490['sTZef']))_0x4c2306++,_0x311490['FRYNk'](_0x487cf4,0x1)&&_0x3aae23&&_0x41b3cd[_0xb92f08(0x18c)]()&&_0x311490[_0xb92f08(0x1c3)](_0x4695c4,_0x4fffd5);else{logMessage='Grid\x20type:\x20Trial',logger[_0xb92f08(0x1b9)](logMessage);try{if(_0x311490['lRnQx'](_0x311490[_0xb92f08(0x1e1)],_0x311490[_0xb92f08(0x1da)]))_0x311490[_0xb92f08(0x1cf)](_0x3fa252,'Couldn\x27t\x20establish\x20a\x20private\x20connection\x20with\x20the\x20grid');else{const _0x1e22c5={};_0x1e22c5[_0xb92f08(0x1ac)]=_0x3cf525,_0x1e22c5['customRepeaters']=_0x26c3f0[_0xb92f08(0x199)],_0x1e22c5['browserStackLocalOptions']=_0x224a60;const _0x7603a5=_0x1e22c5,_0x46cc6a=_0x311490['etpkk'](startLocalBinarySync,_0x7603a5);let _0x25891e=0x0;const _0x8e57d3=async()=>{const _0x3119b8=_0xb92f08;_0x311490[_0x3119b8(0x17f)](_0x311490[_0x3119b8(0x1bd)],_0x311490[_0x3119b8(0x1bd)])?(_0x25891e++,_0x311490['YRjXC'](_0x25891e,0x1)&&_0x46cc6a&&_0x46cc6a['isRunning']()&&_0x311490[_0x3119b8(0x1cf)](stopLocalBinary,_0x46cc6a)):(_0x929940[_0x3119b8(0x1b7)](_0x41d71a),_0x75590[_0x3119b8(0x1d5)](0x1));};process['on'](_0x311490[_0xb92f08(0x1ba)],_0x8e57d3),process['on'](_0x311490[_0xb92f08(0x1d4)],_0x8e57d3),process['on'](_0x311490[_0xb92f08(0x19a)],_0x8e57d3),logMessage='We\x20have\x20successfully\x20established\x20a\x20connection\x20between\x20trial\x20grid\x20and\x20your\x20setup.\x20You\x20should\x20be\x20able\x20to\x20start\x20testing\x20your\x20internal\x20development\x20or\x20staging\x20websites.',logger[_0xb92f08(0x1b9)](logMessage);}}catch(_0x318d19){if(_0x311490[_0xb92f08(0x19e)](_0x311490[_0xb92f08(0x18a)],_0x311490[_0xb92f08(0x19d)])){const _0x1452b7={};_0x1452b7['description']=_0x311490[_0xb92f08(0x1e2)],_0x1452b7[_0xb92f08(0x1c0)]=_0x311490['wabiX'];const _0x18bc89={};_0x18bc89[_0xb92f08(0x1d8)]=_0x311490['HHPBY'],_0x18bc89[_0xb92f08(0x1c0)]=_0x311490[_0xb92f08(0x1cb)];const _0xf2b796={};_0xf2b796[_0xb92f08(0x18e)]=!![],_0xf2b796[_0xb92f08(0x1d8)]=_0x311490[_0xb92f08(0x1a6)],_0xf2b796[_0xb92f08(0x1c0)]=_0x311490['wabiX'];const _0x3c3cf3={};_0x3c3cf3['description']=_0x311490[_0xb92f08(0x1bc)],_0x3c3cf3['type']=_0x311490[_0xb92f08(0x1cb)];const _0xe4bf8a={};_0xe4bf8a[_0xb92f08(0x1d8)]=_0x311490[_0xb92f08(0x1ab)],_0xe4bf8a[_0xb92f08(0x1c0)]=_0x311490['wabiX'];const _0x98da31={};return _0x98da31[_0xb92f08(0x184)]=_0x1452b7,_0x98da31['bstack-accesskey']=_0x18bc89,_0x98da31['grid-id']=_0xf2b796,_0x98da31[_0xb92f08(0x1e0)]=_0x3c3cf3,_0x98da31[_0xb92f08(0x182)]=_0xe4bf8a,_0x21ee8e['usage'](_0x21b2a1[_0xb92f08(0x1a4)])[_0xb92f08(0x1d7)](_0x309509)['options'](_0x98da31)[_0xb92f08(0x1af)](_0x311490[_0xb92f08(0x1cd)])[_0xb92f08(0x1aa)];}else _0x311490[_0xb92f08(0x17e)](_0x278c8b,'Couldn\x27t\x20establish\x20a\x20private\x20connection\x20with\x20the\x20grid');}}}process[_0xb92f08(0x1d5)](0x0);};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a3_0x174377=a3_0x5549;function a3_0x6cf1(){const _0x5c6de5=['11eBDgyy','1412PRZkQI','demandCommand','help','2586339LDCjfB','strict','6cQJZqJ','usage','3309Zdlflv','create','create_commands','qMLLR','3167690iOdMcF','754pQRioO','3560JEmnhH','SuAQJ','7479vXUqyl','430KFrNEz','50676boJyJU','epilogue','223515tpnEsh','726COMDZm'];a3_0x6cf1=function(){return _0x5c6de5;};return a3_0x6cf1();}(function(_0x2d73e4,_0x370600){const _0x5743ab=a3_0x5549,_0x5a4121=_0x2d73e4();while(!![]){try{const _0xdd7164=-parseInt(_0x5743ab(0x1dd))/0x1+parseInt(_0x5743ab(0x1de))/0x2*(-parseInt(_0x5743ab(0x1e7))/0x3)+-parseInt(_0x5743ab(0x1e0))/0x4*(-parseInt(_0x5743ab(0x1f0))/0x5)+parseInt(_0x5743ab(0x1e5))/0x6*(parseInt(_0x5743ab(0x1e3))/0x7)+parseInt(_0x5743ab(0x1ed))/0x8*(parseInt(_0x5743ab(0x1ef))/0x9)+-parseInt(_0x5743ab(0x1eb))/0xa*(-parseInt(_0x5743ab(0x1df))/0xb)+parseInt(_0x5743ab(0x1f1))/0xc*(-parseInt(_0x5743ab(0x1ec))/0xd);if(_0xdd7164===_0x370600)break;else _0x5a4121['push'](_0x5a4121['shift']());}catch(_0x4dc95a){_0x5a4121['push'](_0x5a4121['shift']());}}}(a3_0x6cf1,0x351d9));const {HELP_HEADER_MESSAGE,HELP_FOOTER_MESSAGE}=require('../config/constants');function a3_0x5549(_0x5ac6f0,_0x30f33d){const _0x6cf1d4=a3_0x6cf1();return a3_0x5549=function(_0x5549bb,_0x552c0d){_0x5549bb=_0x5549bb-0x1dc;let _0x4491dc=_0x6cf1d4[_0x5549bb];return _0x4491dc;},a3_0x5549(_0x5ac6f0,_0x30f33d);}exports['command']=a3_0x174377(0x1e8),exports['desc']='Create\x20a\x20new\x20Automation\x20grid.',exports['builder']=function(_0x529f33){const _0x43ee06=a3_0x174377,_0x50cb08={};_0x50cb08[_0x43ee06(0x1ee)]=_0x43ee06(0x1e9),_0x50cb08[_0x43ee06(0x1ea)]='help';const _0x32ce7f=_0x50cb08;return _0x529f33[_0x43ee06(0x1e6)](HELP_HEADER_MESSAGE['create'])[_0x43ee06(0x1dc)](HELP_FOOTER_MESSAGE)['commandDir'](_0x32ce7f[_0x43ee06(0x1ee)])[_0x43ee06(0x1e1)]()['recommendCommands']()[_0x43ee06(0x1e4)]()[_0x43ee06(0x1e2)](_0x32ce7f[_0x43ee06(0x1ea)]);},exports['handler']=function(_0x4ea972){};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a4_0x105b(){const _0x575d43=['create-grid-called','Configuring\x20AWS','WYrUx','305814KPZhqN','handler',',\x20NodeRole\x20=>\x20','152EVjbjF','Found\x20VPC:\x20','2137660utdTaS','qCRqP','Pass\x20the\x20name\x20to\x20setup\x20the\x20Automation\x20Grid\x20with\x20specific\x20name.\x20Name\x20this\x20grid\x20using\x20either\x20team\x27s\x20name,\x20pipeline\x20specific\x20or\x20generic.','4758428yhJQEX','non-aws-cluster','3mUBcFC','Use\x20an\x20existing\x20grid\x20profile\x20to\x20setup\x20the\x20Automation\x20Grid.\x20By\x20default,\x20configured\x20profile\x20is\x20used.','argv','Invalid\x20input.\x20Currently\x20Spawning\x20the\x20grid\x20in\x20only\x20AWS\x20cloud\x20provider\x20is\x20supported\x20using\x20CLI.','cloudProviderSecretKey','555543oDURVv','aws','MoZEB','AoCnE','gQCnY','plAsX','ICTFb','Ejxxr','KUpqW','hTxHL','iWEIN','createdBy','metadata','warning','Credentials\x20not\x20found!\x20Ensure\x20init\x20command\x20is\x20run\x20before\x20running\x20this\x20command.','password','NodeRole\x20=>\x20','bstackUsername','auth','vlUlA','then','0|3|6|5|4|2|1|7','fxnHK','accessKey','error','yRBlT','create-grid-checks-null-response','phUOu','foiyd','bstackAccesskey','cloudProviderAccessKey','dUooP','DjLvr','statusCode','0|4|1|2|6|3|5','TOMoz','\x20using\x20\x27','TNpba','delay','catch','IoqOl','rCNRb','PnChR','\x27\x20grid\x20profile','bzPVd','fCzDO','Autoscaler\x20Role\x20created.ARN:\x20','cAgec','endpoint','nTFOw','split','util','hkllR','MmjeC','.\x20Please\x20re\x20-\x20select\x20subnets\x20and\x20try\x20again','RsZFy','<PasswordPlaceholder>','defaultGridProfile','WUlBL','CLI_RUN_FINISHED','FltLJ','MyEca','Outputs','rLtBA','Cluster\x20=>\x20','4|1|0|3|5|2|6','../../utils/webSocketUtils','cloud-provider','\x20is\x20already\x20present.\x20Skipping\x20cluster\x20creation','kJBAG',',\x20SecurityGroups\x20=>\x20','CLI_RUN_STARTED','s3bucket','status','fIVcm','1|4|2|0|3','RYaAc','CDvOa','cloudProvider','JIFvP','reportToGalactusAndSendToEDS','https://','14iWEbGi','xUYgi','Unable\x20to\x20Spawn\x20the\x20Grid!\x20Error:\x20','dXMRj','Hub\x20url\x20to\x20run\x20selenium\x20sessions:\x20http://','../../utils/instrumentationUtils','OeSjK','securityGroups','subnets','annotations','promisify','username','LOG','InJOF','cpvRj','wfSdc','TpaXO','Namespace\x20created','gridName','pre-spawned-subnets-not-selected','Fetching\x20url\x20for\x20running\x20tests\x20on\x20the\x20grid','Zuxks','uXWcv','alreadyPresent','JZsbD','VtZwJ','Pass\x20the\x20region\x20for\x20existing\x20Kubernetes\x20Cluster.',',\x20ClusterRole\x20=>\x20','cluster','replace','user','wzxQi','mRAUb','nkKYO','nodeRole','reconnecting-websocket','OutputValue','cluster-name,\x20cloud-provider\x20&&\x20region\x20should\x20be\x20provided\x20when\x20spawning\x20a\x20grid\x20in\x20existing\x20(Non-BrowserStack\x20created)\x20K8s\x20cluster','wSvhT','MOcww','../../utils/gridComponents','LgXsz','cKyIs','gridProfiles','gridProfile','kJxEF','pre-spawned-invalid-vpc','Cluster\x20not\x20found.\x20Proceeding\x20with\x20creating\x20required\x20resources.','niSWF','AIchK','OnBhw','QEjpT','hSahj','hFXGn','builder','sendEventToBackend','string','bKWLn','parse','mvwxk','Yekbh','Failed\x20to\x20validate\x20grid\x20checks\x20from\x20the\x20server.\x20Non\x20200\x20response\x20from\x20server!\x20','Create\x20a\x20grid\x20in\x20existing\x20Kubernetes\x20Cluster\x20on\x20AWS/Azure/GCP.','EdeKm','Found\x20Subnets:\x20','UfLrS','YbSSM','DViFm','NNQiO','CLI\x20run\x20finished:\x20','BcIDB','instanceType','qLsBg','FilLj','ArWVs','Namespace\x20Created','Grid\x20profile\x20fetched\x20from\x20backend','../../utils/createClusterStack','LUvCP','KLbEa','yuiVZ','zZNre','Browserstack',':4444/wd/hub','UtXkX','grid-spawning-failed','managedBy','xYcTU','vpIer','Subnets\x20not\x20selected.\x20Please\x20select\x20subnets\x20and\x20try\x20again','concurrency','jpPJq','PnOSA','body','FTlIS','WekFY','Adding\x20Websocket\x20listeners','lhwOy','jOhVW','createNamespace','DtJJq','Failed\x20to\x20validate\x20grid\x20checks\x20from\x20the\x20server.\x20Unknown\x20error!','yHbSz','eEuIo','2|3|1|4|0','Spawning\x20Grid\x20on\x20the\x20Cluster','writeFileSync','create-grid-checks-non-200','LAKlG','warn','VPC\x20selected\x20does\x20not\x20exist.\x20Please\x20try\x20again','Grid\x20can\x20be\x20accessed\x20at:\x20','Checking\x20if\x20cluster\x20is\x20already\x20present\x20in\x20selected\x20region(','.\x20Deleting\x20all\x20the\x20stacks','message','SecurityGroups\x20=>\x20','haJPc','secret','description','kube-system','MLhjI','Creating\x20namespace','clusterName','requestId','request','Unable\x20to\x20spawn\x20Autoscaler\x20due\x20to:\x20','CBQVO','XpGSe','vHcto','stringify','AWjpC','create-grid-checks-auth-failed','IBlrA','mhueB','info','create-grid-checks-grid-already-exists','tfBTd','AxGvy','Creating\x20required\x20dependencies\x20-\x20EKS\x20Role(s),\x20VPC,\x20Subnets,\x20Security\x20Groups\x20and\x20Cluster\x20and\x20Node\x20Group(s)','type','options','Spawning\x20the\x20grid\x20','IoMqH','kbeVG','ERROR','Authmap\x20already\x20exists.\x20Not\x20updating','ClvVB','ASpEd','init-not-called','Following\x20resources\x20are\x20created:\x20Cluster\x20=>\x20','SruNL','EMoKM','match','OdiqH','loadBalancer','usage','Saving\x20credentials\x20for\x20cloud\x20provider\x20locally\x20for\x20later\x20runs','Found\x20credentials\x20for\x20cloud\x20provider\x20locally.\x20Using\x20them\x20to\x20create\x20resources','../../config/logger','rvqWA','../../utils/hstUtils','uuid','NxxLA','\x20in\x20existing\x20cluster\x20\x27','hostname','addListeners','method','Cluster\x20and\x20node\x20group\x20created\x20successfully','TgRnZ','oHkgD','epilogue','KhVcn','create','YVrhV','EhhYA','651450mvBXzj','name','default','Jsxvp','grid-name','16172211PdVxOs','../../utils/createk8sClient','<UsernamePlaceholder>','createNamespacedConfigMap','Invalid\x20Grid\x20Profile.Exiting\x20the\x20CLI.','../../utils/createAutoscalerStack','clusterRegion','Korlv','Gnchb',',\x20VPC\x20=>\x20','-NodeGroup','AFgNE','../../config/constants','help','ingress','2255230XAYvEO','mkHWp','jdfIS','Grid\x20spawned\x20on\x20the\x20cluster','DCaeK','debug','grid-profile','QYEBp','5JQWLJY','VPC\x20=>\x20','exit','region','url','ClusterRole\x20=>\x20','cluster-name','12KwvDsm','vsXbd','maBVF','GET','prsZM','Following\x20resources\x20are\x20created:','create-grid-checks-invalid-profile','HvnIL','3|4|1|2|0','iMTZE','The\x20grid\x20creation\x20is\x20in\x20progress.\x20It\x20could\x20take\x20as\x20long\x20as\x2015-20\x20minutes.\x20You\x20will\x20receive\x20an\x20email\x20notification\x20once\x20the\x20grid\x20is\x20ready.','zTuqs','YxDJF','Stacks','anZDf','pzqmg','../../utils/deleteStack','certificateAuthority','toLowerCase'];a4_0x105b=function(){return _0x575d43;};return a4_0x105b();}const a4_0x12bad5=a4_0x3aae;(function(_0x2eb212,_0x2555fd){const _0x2f6e95=a4_0x3aae,_0x554de1=_0x2eb212();while(!![]){try{const _0x1f82de=-parseInt(_0x2f6e95(0x243))/0x1*(parseInt(_0x2f6e95(0x260))/0x2)+-parseInt(_0x2f6e95(0x26a))/0x3*(-parseInt(_0x2f6e95(0x268))/0x4)+parseInt(_0x2f6e95(0x23b))/0x5+-parseInt(_0x2f6e95(0x227))/0x6*(parseInt(_0x2f6e95(0x2c1))/0x7)+-parseInt(_0x2f6e95(0x263))/0x8*(parseInt(_0x2f6e95(0x26f))/0x9)+-parseInt(_0x2f6e95(0x265))/0xa+-parseInt(_0x2f6e95(0x22c))/0xb*(-parseInt(_0x2f6e95(0x24a))/0xc);if(_0x1f82de===_0x2555fd)break;else _0x554de1['push'](_0x554de1['shift']());}catch(_0x190823){_0x554de1['push'](_0x554de1['shift']());}}}(a4_0x105b,0xb54be));function a4_0x3aae(_0x5f5c9d,_0x48ee0a){const _0x105b9c=a4_0x105b();return a4_0x3aae=function(_0x3aaeab,_0x1666e2){_0x3aaeab=_0x3aaeab-0x1a8;let _0x5b821f=_0x105b9c[_0x3aaeab];return _0x5b821f;},a4_0x3aae(_0x5f5c9d,_0x48ee0a);}const fs=require('fs'),ws=require('ws'),util=require(a4_0x12bad5(0x2a2)),ReconnectingWebSocket=require(a4_0x12bad5(0x2e4)),request=require(a4_0x12bad5(0x1f4)),{v4:uuidv4}=require(a4_0x12bad5(0x219)),webSocketUtils=require(a4_0x12bad5(0x2b1)),{logger}=require(a4_0x12bad5(0x216)),{inputCloudProviderKeys}=require('../../utils/userInput'),{getCredentialsPath,updateGlobalRegistryWithConfig,kebabCase,reportToGalactusAndSendToEDS}=require('../../utils/utilityMethods'),{sendAWSInfoToHST}=require(a4_0x12bad5(0x218)),{isClusterPresent,getClusterInfo,configureAWSIfNotConfigured,createAuthConfigMap,getNodeGroupInfo,isVPCPresent,isSubnetsValid}=require('../../utils/AWSUtils'),{addGridComponents,deleteClusterAndDependencies,removeGridComponents}=require(a4_0x12bad5(0x2e9)),{AWS,WS_EVENTS,global_registry,WS_ENDPOINT,DEFAULT_GRID_NAME,HELP_HEADER_MESSAGE,HELP_FOOTER_MESSAGE,messageTypes,AG_API_URL,CLUSTER_DEP_STACK_NAME}=require(a4_0x12bad5(0x238)),{createClusterStack}=require(a4_0x12bad5(0x1c5)),{createAutoscalerStack}=require(a4_0x12bad5(0x231)),{createK8sClient}=require(a4_0x12bad5(0x22d)),{sendInstrumentationEvent}=require(a4_0x12bad5(0x2c6)),{deleteClusterStack}=require(a4_0x12bad5(0x25a)),promisifiedRequest=util[a4_0x12bad5(0x2cb)](request);exports['command']='grid',exports['desc']='Create\x20a\x20new\x20Automation\x20grid.',exports[a4_0x12bad5(0x1ae)]=function(_0x146ce7){const _0x3c2aa9=a4_0x12bad5,_0xce0444={};_0xce0444['cpvRj']='Pass\x20the\x20name\x20to\x20setup\x20the\x20Automation\x20Grid\x20with\x20specific\x20name.\x20Name\x20this\x20grid\x20using\x20either\x20team\x27s\x20name,\x20pipeline\x20specific\x20or\x20generic.',_0xce0444[_0x3c2aa9(0x200)]=_0x3c2aa9(0x1b0),_0xce0444[_0x3c2aa9(0x24e)]=_0x3c2aa9(0x26b),_0xce0444[_0x3c2aa9(0x1ba)]='Create\x20a\x20grid\x20in\x20existing\x20Kubernetes\x20Cluster\x20on\x20AWS/Azure/GCP.',_0xce0444[_0x3c2aa9(0x2c4)]='Pass\x20the\x20name\x20of\x20cloud\x20provider\x20for\x20existing\x20Kubernetes\x20Cluster.',_0xce0444[_0x3c2aa9(0x1c2)]=_0x3c2aa9(0x2db),_0xce0444[_0x3c2aa9(0x28a)]=_0x3c2aa9(0x239);const _0x58f4d0=_0xce0444,_0x30cc26={};_0x30cc26[_0x3c2aa9(0x1ee)]=_0x58f4d0[_0x3c2aa9(0x2cf)],_0x30cc26[_0x3c2aa9(0x203)]=_0x58f4d0['tfBTd'];const _0x4fdedf={};_0x4fdedf[_0x3c2aa9(0x1ee)]=_0x58f4d0[_0x3c2aa9(0x24e)],_0x4fdedf[_0x3c2aa9(0x203)]=_0x58f4d0[_0x3c2aa9(0x200)];const _0xc80497={};_0xc80497['description']=_0x58f4d0[_0x3c2aa9(0x1ba)],_0xc80497[_0x3c2aa9(0x203)]=_0x58f4d0[_0x3c2aa9(0x200)];const _0x37636f={};_0x37636f['description']=_0x58f4d0[_0x3c2aa9(0x2c4)],_0x37636f[_0x3c2aa9(0x203)]=_0x58f4d0[_0x3c2aa9(0x200)];const _0x46c50d={};_0x46c50d[_0x3c2aa9(0x1ee)]=_0x58f4d0['ArWVs'],_0x46c50d[_0x3c2aa9(0x203)]=_0x58f4d0['tfBTd'];const _0x463a6d={};return _0x463a6d[_0x3c2aa9(0x22b)]=_0x30cc26,_0x463a6d[_0x3c2aa9(0x241)]=_0x4fdedf,_0x463a6d[_0x3c2aa9(0x249)]=_0xc80497,_0x463a6d[_0x3c2aa9(0x2b2)]=_0x37636f,_0x463a6d[_0x3c2aa9(0x246)]=_0x46c50d,_0x146ce7[_0x3c2aa9(0x213)](HELP_HEADER_MESSAGE[_0x3c2aa9(0x224)])[_0x3c2aa9(0x222)](HELP_FOOTER_MESSAGE)[_0x3c2aa9(0x204)](_0x463a6d)['help'](_0x58f4d0[_0x3c2aa9(0x28a)])[_0x3c2aa9(0x26c)];},exports[a4_0x12bad5(0x261)]=async function(_0x27ff49){const _0x35670e=a4_0x12bad5,_0x5ed4f5={'Jsxvp':_0x35670e(0x267),'nkKYO':'string','PnOSA':_0x35670e(0x26b),'DjLvr':_0x35670e(0x1b6),'QEjpT':'Pass\x20the\x20name\x20of\x20cloud\x20provider\x20for\x20existing\x20Kubernetes\x20Cluster.','bzPVd':_0x35670e(0x2db),'WekFY':_0x35670e(0x239),'gQCnY':_0x35670e(0x287),'PlIzE':_0x35670e(0x252),'FltLJ':_0x35670e(0x215),'AxGvy':_0x35670e(0x25e),'WUlBL':function(_0xec270e){return _0xec270e();},'cKyIs':_0x35670e(0x2b0),'MLhjI':_0x35670e(0x209),'DCaeK':_0x35670e(0x284),'wzxQi':'7|6|0|2|4|1|5|3','IoqOl':function(_0x532673){return _0x532673();},'wghuI':function(_0x1deeaf){return _0x1deeaf();},'Korlv':function(_0x530fd9,_0x3d8b0d){return _0x530fd9!==_0x3d8b0d;},'FilLj':_0x35670e(0x1dc),'yRBlT':_0x35670e(0x1d9),'YVrhV':_0x35670e(0x27d),'LAKlG':function(_0xa72907,_0x5d21e3,_0x4ed775,_0x3f49da,_0x2a7da0,_0x436856,_0x1110f1){return _0xa72907(_0x5d21e3,_0x4ed775,_0x3f49da,_0x2a7da0,_0x436856,_0x1110f1);},'fxnHK':_0x35670e(0x25d),'TOMoz':_0x35670e(0x20c),'nTFOw':function(_0x513446){return _0x513446();},'InJOF':_0x35670e(0x22e),'alkit':_0x35670e(0x2a7),'Yekbh':_0x35670e(0x1d8),'pzqmg':function(_0x5bf6e4,_0x2b01ec){return _0x5bf6e4===_0x2b01ec;},'KUpqW':_0x35670e(0x1bb),'wSvhT':'xJWIp','mvwxk':_0x35670e(0x2e6),'mhueB':function(_0x5e0316,_0x33b986,_0x4d6af5,_0x5e6141,_0x1f980f,_0x449121,_0x3fc841,_0xc27d0a){return _0x5e0316(_0x33b986,_0x4d6af5,_0x5e6141,_0x1f980f,_0x449121,_0x3fc841,_0xc27d0a);},'Gnchb':'prespawned-cluster-args-not-passed','WYrUx':_0x35670e(0x270),'RYaAc':_0x35670e(0x2d9),'plAsX':_0x35670e(0x23c),'eEuIo':_0x35670e(0x26d),'drWZX':_0x35670e(0x269),'OnBhw':function(_0x2698d6,_0x547dda){return _0x2698d6===_0x547dda;},'anZDf':_0x35670e(0x1c8),'NuNpN':_0x35670e(0x276),'hkllR':function(_0x2cc5c1,_0x3e7a85){return _0x2cc5c1===_0x3e7a85;},'vsXbd':function(_0x533201,_0x327b9c){return _0x533201===_0x327b9c;},'EMoKM':_0x35670e(0x223),'GHaCg':_0x35670e(0x1fc),'niSWF':_0x35670e(0x24d),'xUYgi':function(_0x1e648c,_0x11bac2){return _0x1e648c(_0x11bac2);},'kbeVG':function(_0x34220c,_0x2df22e){return _0x34220c==_0x2df22e;},'OdiqH':function(_0x4536f4,_0x4f166a){return _0x4536f4!==_0x4f166a;},'hSahj':_0x35670e(0x2c7),'HInFI':_0x35670e(0x1f7),'YUlOw':_0x35670e(0x1dd),'ClvVB':function(_0x5d682a,_0x1f75e1,_0x49b8fc,_0x1eac79,_0x18b955,_0x46dfc6,_0x122f75,_0x4c1a0e){return _0x5d682a(_0x1f75e1,_0x49b8fc,_0x1eac79,_0x18b955,_0x46dfc6,_0x122f75,_0x4c1a0e);},'BcIDB':_0x35670e(0x289),'SruNL':function(_0x384ac3,_0x178e34){return _0x384ac3===_0x178e34;},'sSibC':_0x35670e(0x2e8),'MyEca':'Failed\x20to\x20validate\x20grid\x20checks\x20from\x20the\x20server.\x20Unauthorized\x20request!','jOhVW':_0x35670e(0x1fb),'ASpEd':function(_0x5f232e,_0x28c4df){return _0x5f232e!==_0x28c4df;},'hTxHL':'piaZC','xYcTU':_0x35670e(0x206),'zTuqs':function(_0x2040a5,_0x208bd1,_0x5f7d07,_0x1276a5,_0x1d193b,_0xe03511,_0x1f7af0,_0x1e9b76){return _0x2040a5(_0x208bd1,_0x5f7d07,_0x1276a5,_0x1d193b,_0xe03511,_0x1f7af0,_0x1e9b76);},'FTlIS':_0x35670e(0x1e3),'QYEBp':_0x35670e(0x1c4),'RkiCU':function(_0x37781b,_0x37a063){return _0x37781b===_0x37a063;},'YxDJF':_0x35670e(0x1bc),'yTPBZ':'An\x20Automation\x20Grid\x20already\x20exists\x20with\x20grid\x20name\x20${gridName}.\x20Please\x20use--grid\x20-\x20name\x20option\x20to\x20provide\x20another\x20grid\x20name','TxxhQ':_0x35670e(0x1ff),'PnChR':function(_0x547c34,_0x2c1d66){return _0x547c34===_0x2c1d66;},'VphRb':_0x35670e(0x2d6),'JIFvP':_0x35670e(0x253),'uXWcv':function(_0x3a287d,_0x1980b6){return _0x3a287d===_0x1980b6;},'jdfIS':function(_0x5e17e3,_0x2de2ce){return _0x5e17e3===_0x2de2ce;},'HvnIL':_0x35670e(0x29c),'CBQVO':_0x35670e(0x2b4),'uhwEX':_0x35670e(0x230),'yHbSz':_0x35670e(0x250),'sWZhC':function(_0xf471fb,_0x396b6e,_0x63ff33,_0x1c3429,_0x2a298d,_0x505b45,_0x2d047e,_0x27ef28){return _0xf471fb(_0x396b6e,_0x63ff33,_0x1c3429,_0x2a298d,_0x505b45,_0x2d047e,_0x27ef28);},'JrQEh':_0x35670e(0x291),'TpaXO':function(_0x514719,_0x110908){return _0x514719===_0x110908;},'rCNRb':'Unable\x20to\x20fetch\x20credentials\x20for\x20cloud\x20provider\x20locally','fIVcm':function(_0x5686f0,_0x59a73d){return _0x5686f0(_0x59a73d);},'vHcto':function(_0x4c8df3){return _0x4c8df3();},'qLsBg':_0x35670e(0x214),'bKWLn':_0x35670e(0x1e0),'jfglZ':function(_0x2f3114,_0x1098a4){return _0x2f3114===_0x1098a4;},'QwXYN':function(_0x483a13,_0x50d416){return _0x483a13===_0x50d416;},'zZNre':function(_0x5463e8,_0x57d816,_0x429e83){return _0x5463e8(_0x57d816,_0x429e83);},'oHkgD':'warn','UtXkX':function(_0x4e1596,_0x9383d8){return _0x4e1596(_0x9383d8);},'VtZwJ':_0x35670e(0x2f0),'LUvCP':function(_0x2114ca,_0x5be383){return _0x2114ca!=_0x5be383;},'JVakA':function(_0x369d02,_0x297dcd){return _0x369d02!=_0x297dcd;},'NxxLA':function(_0x58e203,_0x5048bb){return _0x58e203!==_0x5048bb;},'vpIer':_0x35670e(0x1d1),'AIchK':function(_0x397eef,_0x4681cb,_0x2172cd,_0x54e94e,_0x1cd4b5,_0xe74998,_0x12870a,_0x14cacb){return _0x397eef(_0x4681cb,_0x2172cd,_0x54e94e,_0x1cd4b5,_0xe74998,_0x12870a,_0x14cacb);},'RdgNR':_0x35670e(0x2d4),'hFXGn':_0x35670e(0x1e6),'cTrmG':_0x35670e(0x2ef),'jpPJq':function(_0x3e20b4,_0x29161d,_0x41dcf9,_0x141a97){return _0x3e20b4(_0x29161d,_0x41dcf9,_0x141a97);},'LgXsz':'pre-spawned-invalid-subnets','ICTFb':_0x35670e(0x24f),'wfSdc':_0x35670e(0x254),'RsZFy':'Creating\x20required\x20resources\x20-\x20EKS\x20role(s),\x20VPC,\x20Subnets,\x20Security\x20Groups,\x20Cluster\x20and\x20Node\x20Group(s)','qCRqP':_0x35670e(0x202),'rvqWA':_0x35670e(0x21f),'iWEIN':function(_0x5a2bc9,_0x228ca1,_0x8e093c,_0x14ddc6,_0x492454){return _0x5a2bc9(_0x228ca1,_0x8e093c,_0x14ddc6,_0x492454);},'OaDSm':'Creating\x20Autoscaler\x20Role','TNpba':function(_0x4f039f,_0x2ab439){return _0x4f039f(_0x2ab439);},'lrfjF':function(_0x1d56e3,_0x4c6af2){return _0x1d56e3!==_0x4c6af2;},'EhhYA':function(_0x485ffe,_0x445301,_0x2fb3c2,_0x2b4127,_0x10c8b7,_0x31f14e,_0x4c2ba1,_0x4a56bd){return _0x485ffe(_0x445301,_0x2fb3c2,_0x2b4127,_0x10c8b7,_0x31f14e,_0x4c2ba1,_0x4a56bd);},'AWjpC':_0x35670e(0x2bf),'BbSDu':_0x35670e(0x27c),'AFgNE':_0x35670e(0x2ba),'haJPc':function(_0x4e5b0c,_0x5596d7){return _0x4e5b0c(_0x5596d7);},'UfLrS':'autoscaler-creation-failed','cAgec':_0x35670e(0x1ef),'kJxEF':_0x35670e(0x1f1),'CDvOa':_0x35670e(0x229),'KLbEa':'Browserstack','EdeKm':_0x35670e(0x1c3),'dUooP':_0x35670e(0x2d2),'AoCnE':'Spawning\x20grid\x20on\x20to\x20the\x20cluster','MoZEB':_0x35670e(0x1e1),'vlUlA':function(_0x2816ad,_0x2d8e0d,_0x249883,_0x4bb282,_0x42c55f,_0x49f854,_0x362cfd,_0x4c81fd){return _0x2816ad(_0x2d8e0d,_0x249883,_0x4bb282,_0x42c55f,_0x49f854,_0x362cfd,_0x4c81fd);},'maBVF':_0x35670e(0x23e),'MmjeC':_0x35670e(0x2d5),'foiyd':'browserstack-turboscale-grid-service','TgRnZ':function(_0x465f04,_0x57491d,_0x1f28ee,_0x1a7f80,_0x1b6876,_0x2e9841){return _0x465f04(_0x57491d,_0x1f28ee,_0x1a7f80,_0x1b6876,_0x2e9841);},'mRAUb':function(_0x555e0a,_0x7af903){return _0x555e0a(_0x7af903);},'rLtBA':_0x35670e(0x1cd)};let _0xb067a5=![],_0x2633d9,_0x1bb14a,_0x2a8128,_0x3c12e3,_0x43eeaa,_0x1dcba5,_0xc97265,_0x4122fb,_0x147038,_0x501ddc;try{global_registry[_0x35670e(0x1f3)]=_0x5ed4f5[_0x35670e(0x297)](uuidv4);if(!fs['existsSync'](_0x5ed4f5['wghuI'](getCredentialsPath))){if(_0x5ed4f5[_0x35670e(0x233)](_0x5ed4f5[_0x35670e(0x1c1)],_0x5ed4f5[_0x35670e(0x288)]))console['error'](_0x5ed4f5[_0x35670e(0x225)]),await _0x5ed4f5[_0x35670e(0x1e4)](sendInstrumentationEvent,_0x27ff49,_0x5ed4f5[_0x35670e(0x285)],messageTypes['ERROR'],_0x5ed4f5[_0x35670e(0x292)],null,_0x27ff49),process[_0x35670e(0x245)](0x1);else{const _0x18147c={};_0x18147c['description']=_0x5ed4f5[_0x35670e(0x22a)],_0x18147c[_0x35670e(0x203)]=_0x5ed4f5[_0x35670e(0x2e2)];const _0x349c51={};_0x349c51[_0x35670e(0x1ee)]=_0x5ed4f5[_0x35670e(0x1d4)],_0x349c51['type']=_0x5ed4f5[_0x35670e(0x2e2)];const _0x4c6243={};_0x4c6243[_0x35670e(0x1ee)]=_0x5ed4f5[_0x35670e(0x28f)],_0x4c6243[_0x35670e(0x203)]=_0x5ed4f5['nkKYO'];const _0x365540={};_0x365540[_0x35670e(0x1ee)]=_0x5ed4f5[_0x35670e(0x1ab)],_0x365540[_0x35670e(0x203)]=_0x5ed4f5[_0x35670e(0x2e2)];const _0x9b2951={};_0x9b2951[_0x35670e(0x1ee)]=_0x5ed4f5[_0x35670e(0x29b)],_0x9b2951['type']=_0x5ed4f5[_0x35670e(0x2e2)];const _0x4fc56e={};return _0x4fc56e[_0x35670e(0x22b)]=_0x18147c,_0x4fc56e[_0x35670e(0x241)]=_0x349c51,_0x4fc56e[_0x35670e(0x249)]=_0x4c6243,_0x4fc56e[_0x35670e(0x2b2)]=_0x365540,_0x4fc56e[_0x35670e(0x246)]=_0x9b2951,_0x3342d6[_0x35670e(0x213)](_0x480951[_0x35670e(0x224)])[_0x35670e(0x222)](_0x450def)['options'](_0x4fc56e)[_0x35670e(0x239)](_0x5ed4f5[_0x35670e(0x1d7)])[_0x35670e(0x26c)];}}await _0x5ed4f5[_0x35670e(0x1e4)](sendInstrumentationEvent,_0x27ff49,_0x5ed4f5[_0x35670e(0x285)],messageTypes[_0x35670e(0x208)],null,null,_0x27ff49);const _0x3578da=JSON[_0x35670e(0x1b2)](fs['readFileSync'](_0x5ed4f5[_0x35670e(0x2a0)](getCredentialsPath)));global_registry[_0x35670e(0x280)]=_0x3578da[_0x35670e(0x1ca)][_0x35670e(0x2cc)],global_registry[_0x35670e(0x28c)]=_0x3578da[_0x35670e(0x1ca)][_0x35670e(0x27e)];const _0x5c2749=WS_ENDPOINT[_0x35670e(0x2de)](_0x5ed4f5[_0x35670e(0x2ce)],_0x3578da['Browserstack']['username'])[_0x35670e(0x2de)](_0x5ed4f5['alkit'],_0x3578da[_0x35670e(0x1ca)][_0x35670e(0x27e)]),_0x14f32a={};_0x14f32a['WebSocket']=ws,_0x501ddc=new ReconnectingWebSocket(_0x5c2749,[],_0x14f32a),logger[_0x35670e(0x240)](_0x5ed4f5[_0x35670e(0x1b4)]),webSocketUtils[_0x35670e(0x21d)](_0x501ddc,_0x27ff49[_0x35670e(0x2df)],_0x27ff49[_0x35670e(0x27e)]);let _0x508dfd=DEFAULT_GRID_NAME;if(_0x27ff49[_0x35670e(0x1f2)]||_0x27ff49[_0x35670e(0x2bd)]||_0x27ff49[_0x35670e(0x246)]){if(_0x5ed4f5[_0x35670e(0x259)](_0x5ed4f5[_0x35670e(0x277)],_0x5ed4f5[_0x35670e(0x277)])){!(_0x27ff49[_0x35670e(0x1f2)]&&_0x27ff49['cloudProvider']&&_0x27ff49[_0x35670e(0x246)])&&(_0x5ed4f5[_0x35670e(0x259)](_0x5ed4f5['wSvhT'],_0x5ed4f5[_0x35670e(0x2e7)])?(_0x2633d9=_0x5ed4f5[_0x35670e(0x1b3)],await _0x5ed4f5[_0x35670e(0x1fd)](reportToGalactusAndSendToEDS,_0x27ff49,_0x501ddc,_0x2633d9,messageTypes[_0x35670e(0x208)],_0x5ed4f5[_0x35670e(0x285)],_0x5ed4f5[_0x35670e(0x234)],_0x5ed4f5[_0x35670e(0x273)]),logger[_0x35670e(0x287)](_0x2633d9),process[_0x35670e(0x245)](0x1)):_0x332266[_0x35670e(0x1fe)](_0x35670e(0x264)+_0x50a79a+'\x20'));if(_0x5ed4f5['Korlv'](_0x27ff49[_0x35670e(0x2bd)][_0x35670e(0x25c)](),_0x5ed4f5[_0x35670e(0x25f)])){if(_0x5ed4f5[_0x35670e(0x233)](_0x5ed4f5[_0x35670e(0x2bb)],_0x5ed4f5[_0x35670e(0x274)]))_0x2633d9=_0x5ed4f5[_0x35670e(0x1df)],await _0x5ed4f5[_0x35670e(0x1fd)](reportToGalactusAndSendToEDS,_0x27ff49,_0x501ddc,_0x2633d9,messageTypes[_0x35670e(0x208)],_0x5ed4f5[_0x35670e(0x285)],_0x5ed4f5['drWZX'],_0x5ed4f5['gQCnY']),logger['error'](_0x2633d9),process[_0x35670e(0x245)](0x1);else{const _0xbcaded={};_0xbcaded[_0x35670e(0x203)]=_0x57e8a0['LOG'],_0xbcaded[_0x35670e(0x1ea)]=_0x565352,_0x59ff38[_0x35670e(0x1af)](_0x33896d,_0xbcaded,_0x5ed4f5['gQCnY'],!![]);}}_0xb067a5=!![],_0x2a8128=_0x27ff49['clusterName'],_0x1bb14a=_0x27ff49[_0x35670e(0x2bd)],_0x3c12e3=_0x27ff49['region'];}else throw _0xdeac7b;}if(_0x27ff49[_0x35670e(0x2d3)]){if(_0x5ed4f5[_0x35670e(0x1aa)](_0x5ed4f5[_0x35670e(0x258)],_0x5ed4f5['NuNpN'])){const _0x4894fd=_0x5ed4f5['PlIzE'][_0x35670e(0x2a1)]('|');let _0x43f555=0x0;while(!![]){switch(_0x4894fd[_0x43f555++]){case'0':_0x411184[_0x35670e(0x26e)]=_0x113626[_0x45477b][_0x35670e(0x1ed)];continue;case'1':_0x1f0904[_0x35670e(0x1fe)](_0x55d6d0);continue;case'2':_0x2906c6[_0x35670e(0x28d)]=_0x7646a3[_0x131343][_0x35670e(0x286)];continue;case'3':_0x281733=_0x5ed4f5[_0x35670e(0x2ab)];continue;case'4':const _0x49057d={};_0x49057d['type']=_0x1cc521[_0x35670e(0x2cd)],_0x49057d[_0x35670e(0x1ea)]=_0x5c4244,_0xcd07ce[_0x35670e(0x1af)](_0x52f3d9,_0x49057d);continue;}break;}}else _0x508dfd=_0x27ff49[_0x35670e(0x2d3)];}global_registry[_0x35670e(0x2d3)]=_0x508dfd;if(_0x5ed4f5[_0x35670e(0x2a3)](_0xb067a5,![])){if(_0x5ed4f5[_0x35670e(0x24b)](_0x5ed4f5[_0x35670e(0x20f)],_0x5ed4f5['GHaCg']))_0x282ff9[_0x35670e(0x1fe)](_0x35670e(0x1b8)+_0x21fa2a[_0x35670e(0x1f9)](_0x3ccdf6)+'\x20');else{const _0xb89198=_0x35670e(0x2c0)+AG_API_URL+'/packages/cli/create-grid-checks?gridName='+_0x508dfd,_0x1a707b={};_0x1a707b[_0x35670e(0x2cc)]=_0x3578da['Browserstack'][_0x35670e(0x2cc)],_0x1a707b[_0x35670e(0x27e)]=_0x3578da['Browserstack'][_0x35670e(0x27e)];const _0x46e4c9={};_0x46e4c9[_0x35670e(0x247)]=_0xb89198,_0x46e4c9[_0x35670e(0x21e)]=_0x5ed4f5[_0x35670e(0x1a8)],_0x46e4c9[_0x35670e(0x281)]=_0x1a707b;const _0x534fa3=_0x46e4c9,_0x34d43f=await _0x5ed4f5[_0x35670e(0x2c2)](promisifiedRequest,_0x534fa3);(_0x5ed4f5[_0x35670e(0x207)](_0x34d43f,null)||_0x5ed4f5[_0x35670e(0x207)](_0x34d43f,undefined))&&(_0x5ed4f5[_0x35670e(0x211)](_0x5ed4f5[_0x35670e(0x1ac)],_0x5ed4f5['HInFI'])?(_0x2633d9=_0x5ed4f5['YUlOw'],await _0x5ed4f5[_0x35670e(0x20a)](reportToGalactusAndSendToEDS,_0x27ff49,_0x501ddc,_0x2633d9,messageTypes[_0x35670e(0x208)],_0x5ed4f5[_0x35670e(0x285)],_0x5ed4f5[_0x35670e(0x1be)],_0x5ed4f5[_0x35670e(0x273)]),logger['error'](_0x2633d9),process[_0x35670e(0x245)](0x1)):(_0x575636[_0x35670e(0x240)](_0x5ed4f5[_0x35670e(0x201)]),_0x5ed4f5[_0x35670e(0x2a9)](_0x5a44bc)));if(_0x5ed4f5['SruNL'](_0x34d43f['statusCode'],0x191)){if(_0x5ed4f5['OdiqH'](_0x5ed4f5['sSibC'],_0x5ed4f5['sSibC'])){const _0x3b3e18=_0x5ed4f5[_0x35670e(0x2eb)][_0x35670e(0x2a1)]('|');let _0x351b27=0x0;while(!![]){switch(_0x3b3e18[_0x351b27++]){case'0':_0x2e813d[_0x35670e(0x1fe)](_0x4318be);continue;case'1':_0x19cccb=_0x35670e(0x205)+_0x13f9e1+'\x20in\x20existing\x20cluster\x20\x27'+_0x5e8c14+'\x27';continue;case'2':_0x2b8a79[_0x35670e(0x232)]=_0x2f3078;continue;case'3':const _0x1b20b0={};_0x1b20b0[_0x35670e(0x203)]=_0x353f18[_0x35670e(0x2cd)],_0x1b20b0[_0x35670e(0x1ea)]=_0x4cccfb,_0x277225[_0x35670e(0x1af)](_0x1130ef,_0x1b20b0);continue;case'4':const _0x1c29bf={};_0x1c29bf[_0x35670e(0x203)]=_0x65b75e[_0x35670e(0x2b6)],_0x1c29bf[_0x35670e(0x1ea)]='CLI\x20run\x20started',_0x28f81b[_0x35670e(0x1af)](_0x37c90a,_0x1c29bf);continue;case'5':_0x1cd244[_0x35670e(0x2bd)]=_0xe82eb0;continue;case'6':_0xcf034b[_0x35670e(0x1f2)]=_0x188957;continue;}break;}}else _0x2633d9=_0x5ed4f5[_0x35670e(0x2ac)],await _0x5ed4f5[_0x35670e(0x20a)](reportToGalactusAndSendToEDS,_0x27ff49,_0x501ddc,_0x2633d9,messageTypes[_0x35670e(0x208)],_0x5ed4f5[_0x35670e(0x285)],_0x5ed4f5[_0x35670e(0x1da)],_0x5ed4f5[_0x35670e(0x273)]),logger[_0x35670e(0x287)](_0x2633d9),process['exit'](0x1);}_0x5ed4f5[_0x35670e(0x20b)](_0x34d43f[_0x35670e(0x290)],0xc8)&&(_0x5ed4f5[_0x35670e(0x20e)](_0x5ed4f5[_0x35670e(0x278)],_0x5ed4f5[_0x35670e(0x1cf)])?_0x561436=_0x39db83[_0x3c6011[_0x35670e(0x2ed)]]:(_0x2633d9=_0x35670e(0x1b5)+JSON['stringify'](_0x34d43f),await _0x5ed4f5[_0x35670e(0x255)](reportToGalactusAndSendToEDS,_0x27ff49,_0x501ddc,_0x2633d9,messageTypes[_0x35670e(0x208)],_0x5ed4f5[_0x35670e(0x285)],_0x5ed4f5[_0x35670e(0x1d6)],_0x5ed4f5[_0x35670e(0x273)]),logger[_0x35670e(0x287)](_0x2633d9),process['exit'](0x1)));const _0x54c757=JSON[_0x35670e(0x1b2)](_0x34d43f[_0x35670e(0x1d5)]),_0xf55bcc={};_0xf55bcc[_0x35670e(0x203)]=WS_EVENTS[_0x35670e(0x2b6)],_0xf55bcc['message']='CLI\x20run\x20started',webSocketUtils[_0x35670e(0x1af)](_0x501ddc,_0xf55bcc);const _0x1efc34={};_0x1efc34[_0x35670e(0x203)]=WS_EVENTS[_0x35670e(0x2cd)],_0x1efc34[_0x35670e(0x1ea)]=_0x5ed4f5[_0x35670e(0x242)],webSocketUtils[_0x35670e(0x1af)](_0x501ddc,_0x1efc34);_0x54c757[_0x35670e(0x2d8)]&&(_0x5ed4f5['RkiCU'](_0x5ed4f5['YxDJF'],_0x5ed4f5[_0x35670e(0x256)])?(_0x2633d9=_0x5ed4f5['yTPBZ'],await _0x5ed4f5[_0x35670e(0x20a)](reportToGalactusAndSendToEDS,_0x27ff49,_0x501ddc,_0x2633d9,messageTypes[_0x35670e(0x208)],_0x5ed4f5['fxnHK'],_0x5ed4f5['TxxhQ'],_0x5ed4f5[_0x35670e(0x273)]),logger[_0x35670e(0x287)](_0x2633d9),process[_0x35670e(0x245)](0x1)):_0x828fd2['info'](_0x5ed4f5['MLhjI']));const _0x5c6537=_0x54c757[_0x35670e(0x2ec)];let _0x454502=_0x5c6537[_0x54c757[_0x35670e(0x2a8)]];if(_0x27ff49[_0x35670e(0x2ed)]){if(_0x5ed4f5[_0x35670e(0x299)](_0x5ed4f5['VphRb'],_0x5ed4f5[_0x35670e(0x2be)])){const _0x2f3bc5=_0x5ed4f5[_0x35670e(0x23f)]['split']('|');let _0x12bf73=0x0;while(!![]){switch(_0x2f3bc5[_0x12bf73++]){case'0':_0x1092da=_0x3019ea[_0x35670e(0x1d5)]['status'][_0x35670e(0x212)]['ingress'][0x0]['hostname'];continue;case'1':const _0xd56a42={};_0xd56a42['type']=_0xc654b6[_0x35670e(0x2cd)],_0xd56a42['message']=_0xa600df,_0x33566e[_0x35670e(0x1af)](_0x1c1d87,_0xd56a42);continue;case'2':_0x1beb05[_0x35670e(0x1fe)](_0x41f2cf);continue;case'3':_0x29fa81=_0x35670e(0x1e7)+_0x520748+'\x20';continue;case'4':_0x373bee=_0x35670e(0x2c5)+_0x19ddf4+':4444/wd/hub';continue;case'5':const _0x27ed97={};_0x27ed97[_0x35670e(0x203)]=_0x4e4145[_0x35670e(0x2cd)],_0x27ed97['message']=_0x6e5a09,_0x511926[_0x35670e(0x1af)](_0xc89367,_0x27ed97);continue;case'6':_0x5bbc0c[_0x35670e(0x1fe)](_0x59c595);continue;case'7':const _0x1b444b={};_0x1b444b[_0x35670e(0x203)]=_0x4cb432['CLI_RUN_FINISHED'],_0x1b444b[_0x35670e(0x1ea)]=_0x35670e(0x1bd)+_0x5214ee,_0x21a1ac['sendEventToBackend'](_0x15fd90,_0x1b444b);continue;}break;}}else _0x454502=_0x5c6537[_0x27ff49[_0x35670e(0x2ed)]];}_0x5ed4f5[_0x35670e(0x2d7)](_0x454502,undefined)&&(_0x5ed4f5[_0x35670e(0x23d)](_0x5ed4f5[_0x35670e(0x251)],_0x5ed4f5[_0x35670e(0x1f6)])?_0x10cc63=_0xabdbda[_0x35670e(0x2d3)]:(_0x2633d9=_0x5ed4f5['uhwEX'],await _0x5ed4f5['ClvVB'](reportToGalactusAndSendToEDS,_0x27ff49,_0x501ddc,_0x2633d9,messageTypes[_0x35670e(0x208)],_0x5ed4f5[_0x35670e(0x285)],_0x5ed4f5[_0x35670e(0x1de)],_0x5ed4f5['gQCnY']),logger[_0x35670e(0x287)](_0x2633d9),process[_0x35670e(0x245)](0x1)));global_registry['gridProfileId']=_0x454502['id'],_0x2633d9='Will\x20be\x20spawning\x20the\x20grid\x20'+_0x508dfd+_0x35670e(0x293)+_0x454502[_0x35670e(0x228)]+_0x35670e(0x29a),logger[_0x35670e(0x1fe)](_0x2633d9);const _0x14db70={};_0x14db70['type']=WS_EVENTS[_0x35670e(0x2cd)],_0x14db70['message']=_0x2633d9,webSocketUtils[_0x35670e(0x1af)](_0x501ddc,_0x14db70),_0x1bb14a=_0x454502[_0x35670e(0x2bd)],_0x2a8128=_0x454502['clusterName'],_0x3c12e3=_0x454502['region'],_0x43eeaa=_0x454502[_0x35670e(0x1d2)],_0x1dcba5=_0x454502[_0x35670e(0x1bf)],_0xc97265=_0x454502['vpc'],securityGroups=_0x454502[_0x35670e(0x2c8)],subnets=_0x454502[_0x35670e(0x2c9)],_0x4122fb=_0x454502[_0x35670e(0x2b7)],_0x5ed4f5['sWZhC'](updateGlobalRegistryWithConfig,_0x1bb14a,_0x2a8128,_0x3c12e3,_0x43eeaa,_0x1dcba5,_0x4122fb,_0x454502);}}else{const _0x9ef4a4=_0x5ed4f5['JrQEh'][_0x35670e(0x2a1)]('|');let _0x449e96=0x0;while(!![]){switch(_0x9ef4a4[_0x449e96++]){case'0':const _0x27e72e={};_0x27e72e[_0x35670e(0x203)]=WS_EVENTS[_0x35670e(0x2b6)],_0x27e72e['message']='CLI\x20run\x20started',webSocketUtils['sendEventToBackend'](_0x501ddc,_0x27e72e);continue;case'1':logger['info'](_0x2633d9);continue;case'2':const _0x187d60={};_0x187d60[_0x35670e(0x203)]=WS_EVENTS[_0x35670e(0x2cd)],_0x187d60[_0x35670e(0x1ea)]=_0x2633d9,webSocketUtils[_0x35670e(0x1af)](_0x501ddc,_0x187d60);continue;case'3':global_registry[_0x35670e(0x232)]=_0x3c12e3;continue;case'4':_0x2633d9=_0x35670e(0x205)+_0x508dfd+_0x35670e(0x21b)+_0x2a8128+'\x27';continue;case'5':global_registry[_0x35670e(0x1f2)]=_0x2a8128;continue;case'6':global_registry[_0x35670e(0x2bd)]=_0x1bb14a;continue;}break;}}const _0x216e6b=_0x3578da[_0x35670e(0x2bd)]||{};if(_0x5ed4f5[_0x35670e(0x2d1)](_0x216e6b[_0x1bb14a],undefined)){logger['info'](_0x5ed4f5[_0x35670e(0x298)]);const [_0x1d3496,_0x1f992b]=await _0x5ed4f5[_0x35670e(0x2b9)](inputCloudProviderKeys,_0x1bb14a);_0x3578da[_0x35670e(0x2bd)]={};const _0x18dfe3={};_0x18dfe3[_0x35670e(0x286)]=_0x1d3496,_0x18dfe3['secret']=_0x1f992b,_0x3578da[_0x35670e(0x2bd)][_0x1bb14a]=_0x18dfe3,fs[_0x35670e(0x1e2)](_0x5ed4f5[_0x35670e(0x1f8)](getCredentialsPath),JSON[_0x35670e(0x1f9)](_0x3578da)),logger[_0x35670e(0x240)](_0x5ed4f5[_0x35670e(0x1c0)]),global_registry[_0x35670e(0x28d)]=_0x1d3496,global_registry['cloudProviderSecretKey']=_0x1f992b;}else{const _0x9825ff=_0x5ed4f5[_0x35670e(0x1b1)][_0x35670e(0x2a1)]('|');let _0x53b455=0x0;while(!![]){switch(_0x9825ff[_0x53b455++]){case'0':global_registry[_0x35670e(0x26e)]=_0x216e6b[_0x1bb14a]['secret'];continue;case'1':logger['info'](_0x2633d9);continue;case'2':_0x2633d9=_0x5ed4f5[_0x35670e(0x2ab)];continue;case'3':const _0x3ba281={};_0x3ba281[_0x35670e(0x203)]=WS_EVENTS['LOG'],_0x3ba281[_0x35670e(0x1ea)]=_0x2633d9,webSocketUtils[_0x35670e(0x1af)](_0x501ddc,_0x3ba281);continue;case'4':global_registry['cloudProviderAccessKey']=_0x216e6b[_0x1bb14a][_0x35670e(0x286)];continue;}break;}}_0x5ed4f5['jfglZ'](_0x1bb14a,AWS)&&(logger['debug'](_0x5ed4f5[_0x35670e(0x201)]),_0x5ed4f5[_0x35670e(0x297)](configureAWSIfNotConfigured));let _0xcb9ae7,_0x987e39;if(_0x5ed4f5['QwXYN'](_0xb067a5,![])){_0x2633d9=_0x35670e(0x1e8)+_0x3c12e3+').';const _0x4f0788={};_0x4f0788[_0x35670e(0x203)]=WS_EVENTS['LOG'],_0x4f0788['message']=_0x2633d9,webSocketUtils[_0x35670e(0x1af)](_0x501ddc,_0x4f0788),logger[_0x35670e(0x1fe)](_0x2633d9);const _0x5ce4dc=await _0x5ed4f5['zZNre'](isClusterPresent,_0x1bb14a,_0x2a8128);let _0x443553;if(_0x5ce4dc){const _0x4dfd51={};_0x4dfd51[_0x35670e(0x203)]=WS_EVENTS['LOG'],_0x4dfd51[_0x35670e(0x1ea)]='Cluster\x20'+_0x2a8128+_0x35670e(0x2b3),webSocketUtils[_0x35670e(0x1af)](_0x501ddc,_0x4dfd51,_0x5ed4f5[_0x35670e(0x221)]),logger[_0x35670e(0x1e5)]('Cluster\x20'+_0x2a8128+'\x20is\x20already\x20present.\x20Skipping\x20cluster\x20creation'),_0xcb9ae7=await _0x5ed4f5[_0x35670e(0x1cc)](getClusterInfo,_0x2a8128),_0xb067a5=!![];}else{const _0x37326a={};_0x37326a[_0x35670e(0x203)]=WS_EVENTS[_0x35670e(0x2cd)],_0x37326a['message']=_0x5ed4f5[_0x35670e(0x2da)],webSocketUtils[_0x35670e(0x1af)](_0x501ddc,_0x37326a),logger[_0x35670e(0x1fe)](_0x5ed4f5[_0x35670e(0x2da)]);const _0x18f664=_0x5ed4f5[_0x35670e(0x1c6)](_0xc97265,null)&&_0x5ed4f5[_0x35670e(0x233)](_0xc97265,undefined),_0x2a529c=_0x5ed4f5['JVakA'](subnets,null)&&_0x5ed4f5[_0x35670e(0x21a)](subnets,undefined);let _0x4d6331;if(_0x18f664){_0x5ed4f5[_0x35670e(0x24b)](_0x2a529c,![])&&(_0x2633d9=_0x5ed4f5[_0x35670e(0x1d0)],await _0x5ed4f5[_0x35670e(0x1a9)](reportToGalactusAndSendToEDS,_0x27ff49,_0x501ddc,_0x2633d9,messageTypes[_0x35670e(0x208)],_0x5ed4f5[_0x35670e(0x285)],_0x5ed4f5['RdgNR'],_0x5ed4f5[_0x35670e(0x273)]),logger[_0x35670e(0x287)](_0x2633d9),process[_0x35670e(0x245)](0x1));const _0x24f67d=await _0x5ed4f5[_0x35670e(0x1c9)](isVPCPresent,_0xc97265,_0x3c12e3);_0x5ed4f5[_0x35670e(0x259)](_0x24f67d,![])?(_0x2633d9=_0x5ed4f5[_0x35670e(0x1ad)],await _0x5ed4f5[_0x35670e(0x1fd)](reportToGalactusAndSendToEDS,_0x27ff49,_0x501ddc,_0x2633d9,messageTypes[_0x35670e(0x208)],_0x5ed4f5[_0x35670e(0x285)],_0x5ed4f5['cTrmG'],_0x5ed4f5[_0x35670e(0x273)]),logger[_0x35670e(0x287)](_0x2633d9),process[_0x35670e(0x245)](0x1)):logger[_0x35670e(0x1fe)](_0x35670e(0x264)+_0xc97265+'\x20');const _0x4799ee=await _0x5ed4f5[_0x35670e(0x1d3)](isSubnetsValid,subnets,_0xc97265,_0x3c12e3);_0x5ed4f5['SruNL'](_0x4799ee[0x0],![])?(_0x2633d9='Subnets:\x20'+_0x4799ee[0x1]+'\x20are\x20not\x20present\x20in\x20VPC:\x20'+_0xc97265+_0x35670e(0x2a5),await _0x5ed4f5[_0x35670e(0x1a9)](reportToGalactusAndSendToEDS,_0x27ff49,_0x501ddc,_0x2633d9,messageTypes[_0x35670e(0x208)],_0x5ed4f5['fxnHK'],_0x5ed4f5[_0x35670e(0x2ea)],_0x5ed4f5[_0x35670e(0x273)]),logger[_0x35670e(0x287)](_0x2633d9),process[_0x35670e(0x245)](0x1)):logger['info'](_0x35670e(0x1b8)+JSON[_0x35670e(0x1f9)](subnets)+'\x20');const _0x31c6a7=await _0x5ed4f5[_0x35670e(0x1d3)](createClusterStack,_0x2a8128,_0xc97265,subnets);logger['info'](_0x5ed4f5[_0x35670e(0x275)]),logger[_0x35670e(0x1fe)](_0x35670e(0x2af)+_0x31c6a7[_0x35670e(0x257)][0x0][_0x35670e(0x2ad)][0x3][_0x35670e(0x2e5)]+'\x20'),logger[_0x35670e(0x1fe)](_0x35670e(0x248)+_0x31c6a7[_0x35670e(0x257)][0x0]['Outputs'][0x1][_0x35670e(0x2e5)]+'\x20'),logger['info'](_0x35670e(0x1eb)+_0x31c6a7['Stacks'][0x0][_0x35670e(0x2ad)][0x0]['OutputValue'][_0x35670e(0x2a1)](',')+'\x20'),logger['info'](_0x35670e(0x27f)+_0x31c6a7[_0x35670e(0x257)][0x0][_0x35670e(0x2ad)][0x4][_0x35670e(0x2e5)]+'\x20');}else{const _0x4bf5dd={};_0x4bf5dd[_0x35670e(0x203)]=WS_EVENTS[_0x35670e(0x2cd)],_0x4bf5dd[_0x35670e(0x1ea)]=_0x5ed4f5['wfSdc'],webSocketUtils[_0x35670e(0x1af)](_0x501ddc,_0x4bf5dd),logger['info'](_0x5ed4f5[_0x35670e(0x2d0)]),_0x5ed4f5[_0x35670e(0x2c2)](sendAWSInfoToHST,_0x501ddc);const _0x51e898={};_0x51e898[_0x35670e(0x203)]=WS_EVENTS[_0x35670e(0x2cd)],_0x51e898[_0x35670e(0x1ea)]=_0x5ed4f5[_0x35670e(0x2a6)],webSocketUtils[_0x35670e(0x1af)](_0x501ddc,_0x51e898),logger['info'](_0x5ed4f5[_0x35670e(0x266)]);const _0x5e65e0=await _0x5ed4f5[_0x35670e(0x2b9)](createClusterStack,_0x2a8128),_0x18d4b1=_0x5e65e0['Stacks'][0x0][_0x35670e(0x2ad)][0x0][_0x35670e(0x2e5)][_0x35670e(0x2a1)](',');_0x4d6331=_0x5e65e0[_0x35670e(0x257)][0x0][_0x35670e(0x2ad)][0x1]['OutputValue'];const _0x3602cf=_0x5e65e0[_0x35670e(0x257)][0x0]['Outputs'][0x2][_0x35670e(0x2e5)],_0x18b04c=_0x5e65e0[_0x35670e(0x257)][0x0][_0x35670e(0x2ad)][0x3][_0x35670e(0x2e5)];_0x443553=_0x5e65e0[_0x35670e(0x257)][0x0][_0x35670e(0x2ad)][0x4][_0x35670e(0x2e5)];const _0x4c8a6c=_0x5e65e0[_0x35670e(0x257)][0x0][_0x35670e(0x2ad)][0x5][_0x35670e(0x2e5)][_0x35670e(0x2a1)](','),_0x5f4051={};_0x5f4051[_0x35670e(0x203)]=WS_EVENTS['LOG'],_0x5f4051[_0x35670e(0x1ea)]=_0x35670e(0x20d)+_0x18b04c+_0x35670e(0x2dc)+_0x4d6331+_0x35670e(0x235)+_0x3602cf+',\x20Subnets\x20=>\x20'+_0x4c8a6c+_0x35670e(0x2b5)+_0x18d4b1+_0x35670e(0x262)+_0x443553+'\x20',webSocketUtils[_0x35670e(0x1af)](_0x501ddc,_0x5f4051),logger['info'](_0x5ed4f5[_0x35670e(0x275)]),logger[_0x35670e(0x1fe)]('Cluster\x20=>\x20'+_0x18b04c+'\x20'),logger[_0x35670e(0x1fe)]('ClusterRole\x20=>\x20'+_0x4d6331+'\x20'),logger[_0x35670e(0x1fe)](_0x35670e(0x244)+_0x3602cf+'\x20'),logger[_0x35670e(0x1fe)]('Subnets\x20=>\x20'+_0x4c8a6c+'\x20'),logger['info'](_0x35670e(0x1eb)+_0x18d4b1+'\x20'),logger[_0x35670e(0x1fe)](_0x35670e(0x27f)+_0x443553+'\x20');const _0x49ab6b={};_0x49ab6b[_0x35670e(0x203)]=WS_EVENTS[_0x35670e(0x2cd)],_0x49ab6b[_0x35670e(0x1ea)]=_0x35670e(0x21f),webSocketUtils[_0x35670e(0x1af)](_0x501ddc,_0x49ab6b),logger[_0x35670e(0x1fe)](_0x5ed4f5[_0x35670e(0x217)]);}}}_0xcb9ae7=await _0x5ed4f5['fIVcm'](getClusterInfo,_0x2a8128);const [_0x3533b6,_0x321f46,_0x864966,_0x2e70bc]=await _0x5ed4f5[_0x35670e(0x279)](createK8sClient,_0xcb9ae7[_0x35670e(0x2dd)][_0x35670e(0x228)],_0xcb9ae7[_0x35670e(0x2dd)][_0x35670e(0x29f)],_0xcb9ae7['cluster'][_0x35670e(0x25b)]['data'],global_registry[_0x35670e(0x232)]);if(_0x5ed4f5['jdfIS'](_0xb067a5,![])){const _0x2206e2={};_0x2206e2[_0x35670e(0x203)]=WS_EVENTS[_0x35670e(0x2cd)],_0x2206e2[_0x35670e(0x1ea)]=_0x5ed4f5['OaDSm'],webSocketUtils[_0x35670e(0x1af)](_0x501ddc,_0x2206e2),logger['info'](_0x5ed4f5['OaDSm']);try{const _0x340bcd=await _0x5ed4f5[_0x35670e(0x294)](createAutoscalerStack,_0x2a8128);_0x987e39=_0x340bcd[_0x35670e(0x257)][0x0][_0x35670e(0x2ad)][0x2][_0x35670e(0x2e5)];const _0x5fe250={};_0x5fe250[_0x35670e(0x203)]=WS_EVENTS[_0x35670e(0x2cd)],_0x5fe250[_0x35670e(0x1ea)]=_0x35670e(0x29d)+_0x987e39+'\x20',webSocketUtils[_0x35670e(0x1af)](_0x501ddc,_0x5fe250),logger[_0x35670e(0x1fe)](_0x35670e(0x29d)+_0x987e39+'\x20');}catch(_0x5807fe){if(_0x5ed4f5[_0x35670e(0x20b)](_0x5807fe[_0x35670e(0x1ea)]['match'](/already exists/),null)||_0x5ed4f5['lrfjF'](_0x5807fe[_0x35670e(0x1ea)][_0x35670e(0x210)](/already exists/),undefined))_0x2633d9='Skipping\x20Autoscaler\x20due\x20to:\x20'+_0x5807fe[_0x35670e(0x1ea)],await _0x5ed4f5[_0x35670e(0x226)](reportToGalactusAndSendToEDS,_0x27ff49,_0x501ddc,_0x2633d9,messageTypes['WARNING'],_0x5ed4f5[_0x35670e(0x285)],_0x5ed4f5[_0x35670e(0x1fa)],_0x5ed4f5['BbSDu']),logger[_0x35670e(0x1e5)](_0x2633d9);else{const _0x14d9bf=_0x5ed4f5[_0x35670e(0x237)][_0x35670e(0x2a1)]('|');let _0x4a48b4=0x0;while(!![]){switch(_0x14d9bf[_0x4a48b4++]){case'0':await _0x5ed4f5[_0x35670e(0x1ec)](deleteClusterStack,CLUSTER_DEP_STACK_NAME);continue;case'1':_0x2633d9=_0x35670e(0x1f5)+_0x5807fe[_0x35670e(0x1ea)]+_0x35670e(0x1e9);continue;case'2':logger[_0x35670e(0x287)](_0x2633d9);continue;case'3':process[_0x35670e(0x245)](0x1);continue;case'4':await _0x5ed4f5[_0x35670e(0x255)](reportToGalactusAndSendToEDS,_0x27ff49,_0x501ddc,_0x2633d9,messageTypes[_0x35670e(0x208)],_0x5ed4f5['fxnHK'],_0x5ed4f5[_0x35670e(0x1b9)],_0x5ed4f5[_0x35670e(0x273)]);continue;}break;}}}let _0x229a7f=await _0x5ed4f5[_0x35670e(0x1c9)](getNodeGroupInfo,_0x2a8128,_0x2a8128+_0x35670e(0x236));nodeRole=_0x229a7f['nodegroup'][_0x35670e(0x2e3)];const _0x225999=await _0x5ed4f5['UtXkX'](createAuthConfigMap,nodeRole);await _0x3533b6[_0x35670e(0x22f)](_0x5ed4f5[_0x35670e(0x29e)],_0x225999)[_0x35670e(0x296)](_0x1cd7f8=>{const _0x3e0128=_0x35670e;logger[_0x3e0128(0x1fe)](_0x5ed4f5[_0x3e0128(0x1f0)]);});}try{_0x147038=_0x5ed4f5[_0x35670e(0x2c2)](kebabCase,_0x508dfd),logger[_0x35670e(0x1fe)](_0x5ed4f5[_0x35670e(0x2ee)]);const _0x1582e5={};_0x1582e5[_0x35670e(0x203)]=WS_EVENTS[_0x35670e(0x2cd)],_0x1582e5[_0x35670e(0x1ea)]=_0x5ed4f5['kJxEF'],webSocketUtils['sendEventToBackend'](_0x501ddc,_0x1582e5);if(_0x5ed4f5[_0x35670e(0x20b)](_0x147038,_0x5ed4f5[_0x35670e(0x2bc)])){const _0x354f8d={};_0x354f8d[_0x35670e(0x27a)]=_0x5ed4f5[_0x35670e(0x1c7)],_0x354f8d[_0x35670e(0x1ce)]=_0x5ed4f5[_0x35670e(0x1c7)];const _0x596fb9={};_0x596fb9[_0x35670e(0x228)]=_0x147038,_0x596fb9[_0x35670e(0x2ca)]=_0x354f8d;const _0x39351d={};_0x39351d[_0x35670e(0x27b)]=_0x596fb9;let _0x52daf2=_0x39351d;await _0x3533b6[_0x35670e(0x1db)](_0x52daf2),logger[_0x35670e(0x1fe)](_0x5ed4f5[_0x35670e(0x1b7)]);}const _0x3ef4d0={};_0x3ef4d0['type']=WS_EVENTS[_0x35670e(0x2cd)],_0x3ef4d0[_0x35670e(0x1ea)]=_0x5ed4f5[_0x35670e(0x28e)],webSocketUtils['sendEventToBackend'](_0x501ddc,_0x3ef4d0);const _0x419e04={};_0x419e04[_0x35670e(0x203)]=WS_EVENTS[_0x35670e(0x2cd)],_0x419e04[_0x35670e(0x1ea)]=_0x5ed4f5[_0x35670e(0x272)],webSocketUtils[_0x35670e(0x1af)](_0x501ddc,_0x419e04),logger[_0x35670e(0x1fe)](_0x5ed4f5[_0x35670e(0x271)]),await _0x5ed4f5[_0x35670e(0x282)](addGridComponents,_0x3533b6,_0x321f46,_0x864966,_0x2e70bc,_0x147038,_0x2a8128,_0x987e39),_0x2633d9=_0x5ed4f5[_0x35670e(0x24c)],logger[_0x35670e(0x1fe)](_0x2633d9);const _0x420f2c={};_0x420f2c['type']=WS_EVENTS[_0x35670e(0x2cd)],_0x420f2c['message']=_0x2633d9,webSocketUtils[_0x35670e(0x1af)](_0x501ddc,_0x420f2c),_0x2633d9=_0x5ed4f5[_0x35670e(0x2a4)],logger['info'](_0x2633d9);const _0x5313d4={};_0x5313d4[_0x35670e(0x203)]=WS_EVENTS[_0x35670e(0x2cd)],_0x5313d4[_0x35670e(0x1ea)]=_0x2633d9,webSocketUtils['sendEventToBackend'](_0x501ddc,_0x5313d4),await webSocketUtils[_0x35670e(0x295)](0x1388);let _0x2b168f;await _0x3533b6['readNamespacedService'](_0x5ed4f5[_0x35670e(0x28b)],_0x147038)[_0x35670e(0x283)](_0x5a7c30=>{const _0x385d2b=_0x35670e,_0x3a3a35=_0x5ed4f5[_0x385d2b(0x2e0)][_0x385d2b(0x2a1)]('|');let _0x3968a6=0x0;while(!![]){switch(_0x3a3a35[_0x3968a6++]){case'0':logger['info'](_0x2633d9);continue;case'1':logger[_0x385d2b(0x1fe)](_0x2633d9);continue;case'2':const _0x56988a={};_0x56988a['type']=WS_EVENTS[_0x385d2b(0x2cd)],_0x56988a[_0x385d2b(0x1ea)]=_0x2633d9,webSocketUtils['sendEventToBackend'](_0x501ddc,_0x56988a);continue;case'3':const _0xf77a9a={};_0xf77a9a[_0x385d2b(0x203)]=WS_EVENTS[_0x385d2b(0x2aa)],_0xf77a9a['message']='CLI\x20run\x20finished:\x20'+_0x2b168f,webSocketUtils[_0x385d2b(0x1af)](_0x501ddc,_0xf77a9a);continue;case'4':_0x2633d9='Hub\x20url\x20to\x20run\x20selenium\x20sessions:\x20http://'+_0x2b168f+_0x385d2b(0x1cb);continue;case'5':const _0x1ace65={};_0x1ace65[_0x385d2b(0x203)]=WS_EVENTS[_0x385d2b(0x2cd)],_0x1ace65[_0x385d2b(0x1ea)]=_0x2633d9,webSocketUtils[_0x385d2b(0x1af)](_0x501ddc,_0x1ace65);continue;case'6':_0x2633d9=_0x385d2b(0x1e7)+_0x2b168f+'\x20';continue;case'7':_0x2b168f=_0x5a7c30['body'][_0x385d2b(0x2b8)][_0x385d2b(0x212)][_0x385d2b(0x23a)][0x0][_0x385d2b(0x21c)];continue;}break;}}),await webSocketUtils[_0x35670e(0x295)](0x1f4);}catch(_0x73ef9b){if(_0x5ed4f5['OnBhw'](_0xb067a5,![]))try{logger[_0x35670e(0x1fe)]('Deleting\x20the\x20CloudFormation\x20Stacks'),await _0x5ed4f5[_0x35670e(0x220)](removeGridComponents,_0x3533b6,_0x321f46,_0x864966,_0x2e70bc,_0x147038),await _0x5ed4f5[_0x35670e(0x2e1)](deleteClusterAndDependencies,global_registry[_0x35670e(0x232)]);}catch(_0x500472){throw _0x500472;}throw _0x73ef9b;}}catch(_0x10e773){const _0x141e45=_0x35670e(0x2c3)+_0x10e773+'\x20\x0a'+JSON[_0x35670e(0x1f9)](_0x10e773)+'\x20';if(_0x501ddc){const _0x5f09c0={};_0x5f09c0['type']=WS_EVENTS[_0x35670e(0x2cd)],_0x5f09c0['message']=_0x141e45,webSocketUtils[_0x35670e(0x1af)](_0x501ddc,_0x5f09c0,_0x5ed4f5[_0x35670e(0x273)],!![]);}const _0x5859e1={};_0x5859e1['error']=_0x141e45,await _0x5ed4f5['LAKlG'](sendInstrumentationEvent,_0x27ff49,_0x5ed4f5[_0x35670e(0x285)],messageTypes['ERROR'],_0x5ed4f5[_0x35670e(0x2ae)],_0x5859e1,_0x27ff49),logger['error'](_0x141e45);}process['exit'](0x0);};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a5_0x17b68d=a5_0x3207;(function(_0x26fc72,_0x1c4128){const _0x535eff=a5_0x3207,_0x2a841d=_0x26fc72();while(!![]){try{const _0x41ee4f=parseInt(_0x535eff(0xb8))/0x1*(-parseInt(_0x535eff(0xb9))/0x2)+-parseInt(_0x535eff(0xba))/0x3*(-parseInt(_0x535eff(0xb4))/0x4)+parseInt(_0x535eff(0xbc))/0x5+parseInt(_0x535eff(0xb0))/0x6+parseInt(_0x535eff(0xbb))/0x7*(parseInt(_0x535eff(0xac))/0x8)+parseInt(_0x535eff(0xb5))/0x9*(parseInt(_0x535eff(0xae))/0xa)+-parseInt(_0x535eff(0xbf))/0xb;if(_0x41ee4f===_0x1c4128)break;else _0x2a841d['push'](_0x2a841d['shift']());}catch(_0x3b4b41){_0x2a841d['push'](_0x2a841d['shift']());}}}(a5_0x466b,0x4df74));const {HELP_HEADER_MESSAGE,HELP_FOOTER_MESSAGE}=require('../config/constants');exports['command']=a5_0x17b68d(0xbe),exports['desc']=a5_0x17b68d(0xb6),exports['builder']=function(_0x3ba540){const _0x3e8269=a5_0x17b68d,_0xf4c08e={};_0xf4c08e[_0x3e8269(0xb1)]=_0x3e8269(0xad),_0xf4c08e[_0x3e8269(0xb2)]=_0x3e8269(0xb7);const _0x1ca7ed=_0xf4c08e;return _0x3ba540['usage'](HELP_HEADER_MESSAGE[_0x3e8269(0xbe)])[_0x3e8269(0xbd)](HELP_FOOTER_MESSAGE)['commandDir'](_0x1ca7ed[_0x3e8269(0xb1)])[_0x3e8269(0xc0)]()[_0x3e8269(0xb3)]()['strict']()[_0x3e8269(0xb7)](_0x1ca7ed['Xtszp']);},exports[a5_0x17b68d(0xaf)]=function(_0x434fc6){};function a5_0x3207(_0x5dd13f,_0x1aedb6){const _0x466b6c=a5_0x466b();return a5_0x3207=function(_0x3207db,_0x5a27e2){_0x3207db=_0x3207db-0xac;let _0x36c685=_0x466b6c[_0x3207db];return _0x36c685;},a5_0x3207(_0x5dd13f,_0x1aedb6);}function a5_0x466b(){const _0x168b87=['MgVho','Xtszp','recommendCommands','1108KSLykz','1290663niPgkz','List\x20Grid\x20resources.','help','25ZiwpMn','44018SIEnKY','3480ZBKKta','539IHxtEC','2433885UsGtAv','epilogue','delete','14042281YatlGq','demandCommand','59992hzEueb','delete_commands','40BhZURV','handler','1121976pncZNa'];a5_0x466b=function(){return _0x168b87;};return a5_0x466b();}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a6_0x2ca50b=a6_0x10f8;(function(_0x25cbe2,_0x3217c8){const _0x8cbf1=a6_0x10f8,_0x35c44d=_0x25cbe2();while(!![]){try{const _0x59ac79=parseInt(_0x8cbf1(0xab))/0x1+-parseInt(_0x8cbf1(0x11d))/0x2*(parseInt(_0x8cbf1(0x124))/0x3)+-parseInt(_0x8cbf1(0xb8))/0x4+parseInt(_0x8cbf1(0xfb))/0x5+parseInt(_0x8cbf1(0x9f))/0x6*(-parseInt(_0x8cbf1(0xa5))/0x7)+parseInt(_0x8cbf1(0x108))/0x8*(parseInt(_0x8cbf1(0xae))/0x9)+-parseInt(_0x8cbf1(0xc7))/0xa*(parseInt(_0x8cbf1(0xf6))/0xb);if(_0x59ac79===_0x3217c8)break;else _0x35c44d['push'](_0x35c44d['shift']());}catch(_0x4b64c9){_0x35c44d['push'](_0x35c44d['shift']());}}}(a6_0x2f94,0xf139a));const fs=require('fs'),util=require('util'),request=require('request'),{v4:uuidv4}=require(a6_0x2ca50b(0xeb)),{HELP_HEADER_MESSAGE,HELP_FOOTER_MESSAGE,global_registry,messageTypes,AG_API_URL}=require(a6_0x2ca50b(0x9d)),{logger}=require(a6_0x2ca50b(0x119)),{getClusterInfo,configureAWSIfNotConfigured}=require(a6_0x2ca50b(0xe4)),{removeGridComponents,deleteClusterAndDependencies}=require(a6_0x2ca50b(0xc8)),{sendInstrumentationEvent}=require(a6_0x2ca50b(0xb9)),{inputConfirmation,closeInput}=require(a6_0x2ca50b(0xa1)),{createK8sClient}=require(a6_0x2ca50b(0x123)),{kebabCase,getCredentialsPath,getGridDetails}=require(a6_0x2ca50b(0xbd)),promisifiedRequest=util[a6_0x2ca50b(0xd7)](request);function a6_0x10f8(_0x550bc6,_0x94df1a){const _0x2f94d8=a6_0x2f94();return a6_0x10f8=function(_0x10f803,_0x1c8ad6){_0x10f803=_0x10f803-0x90;let _0x2d7b39=_0x2f94d8[_0x10f803];return _0x2d7b39;},a6_0x10f8(_0x550bc6,_0x94df1a);}function a6_0x2f94(){const _0x356705=['certificateAuthority','nqxbX','pbNbq','username','string','fTQsb','Succesfully\x20deleted\x20the\x20grid','https://','../../config/constants','unknown-error','868638HvjwSP','jppZL','../../utils/userInput','accessKey','existsSync','usage','28dLvMVS','stringify','SFlSw','gridId','options','yRSZG','1708178OFxCKh','warn','ApZTP','12358287HRYSqO','ajQhG','Grid\x20is\x20deleted\x20but\x20failed\x20to\x20update\x20server\x20for\x20grid\x20deletion.\x20Response\x20from\x20server:\x20','zcPAt','rAVjZ','Failed\x20to\x20delete\x20resources!\x20Error:\x20','region','TccIF','aRDfF','This\x20will\x20delete\x20the\x20Grid\x20with\x20name\x20\x22','5503992AHzqZr','../../utils/instrumentationUtils','Unable\x20to\x20fetch\x20credentials\x20for\x20cloud\x20provider\x20locally','JmNAV','help','../../utils/utilityMethods','Wrong\x20input!\x20Please\x20try\x20again\x20with\x20a\x20valid\x20input.','Grid\x20ID\x20not\x20passed.\x20Please\x20provide\x20a\x20Grid\x20ID\x20to\x20delete\x20using\x20--grid-id\x20option','epilogue','tags','secret','PiYTF','AcFhU','body','IYFCF','10uOrmSV','../../utils/gridComponents','ITzUY','VhMHf','VbYxw','invalid-grid-id','BgwNd','uQFvH','tufBq','builder','.\x20Do\x20you\x20want\x20to\x20proceed\x20with\x20deletion?\x20(y/n)','Pass\x20the\x20ID\x20of\x20the\x20Grid','toLowerCase','\x20along\x20with\x20Kubernetes\x20Cluster\x20with\x20name\x20\x22','argv','cloudProviderAccessKey','promisify','tAqER','statusCode','MAqCc','endpoint','requestId','zubZB','cloudProvider','Saving\x20credentials\x20for\x20cloud\x20provider\x20locally\x20for\x20later\x20runs','grid','clusterName','INFO','iveLK','../../utils/AWSUtils','SKIIz','JuIyS','init-not-called','HHhVg','uIjdr','name','uuid','cloudProviderSecretKey','desc','auth','\x22\x20and\x20ID\x20','YDQsc','error','xOzuK','qtXpX','dohOO','sxMDs','4979458zCQmwo','YUHiI','writeFileSync','clusterId','kSbQT','4508885EGxkrd','\x20is\x20not\x20created\x20by\x20Browserstack.\x20Skipping\x20deletion\x20of\x20this\x20cluster','data','rOoSu','edIxI','delete','HUGKn','hiYEY','command','wbmVs','onlyGridInCluster','description','mFFEZ','8yNmahw','exit','IztLr','password','rBbKe','xOPHI','RlGME','eRijU','url','method','readFileSync','CtAJd','\x22\x20with\x20ID\x20','gHueM','xMViE','unauthorised','NRkjI','../../config/logger','grid-id','clusterRegion','DELETE','1174544KqkqtQ','parse','kpMtg','izaSs','Browserstack','FJoZC','../../utils/createk8sClient','3uZBaRN','WPfEY','ERROR','PoBVY','Cluster:\x20','KGycQ','BVhVU','qsUYc','pYALV','PFHHk','info','cluster','browserstack:managedBy','Failed\x20to\x20fetch\x20grid\x20details\x20from\x20the\x20server.\x20Unauthorized\x20request!','message','Found\x20credentials\x20for\x20cloud\x20provider\x20locally.\x20Using\x20them\x20for\x20performing\x20actions'];a6_0x2f94=function(){return _0x356705;};return a6_0x2f94();}exports[a6_0x2ca50b(0x103)]=a6_0x2ca50b(0xe0),exports[a6_0x2ca50b(0xed)]='Delete\x20an\x20Automation\x20grid.',exports[a6_0x2ca50b(0xd0)]=function(_0x20ab7e){const _0xe40fda=a6_0x2ca50b,_0x43649a={};_0x43649a[_0xe40fda(0x127)]=_0xe40fda(0xd2),_0x43649a['xOzuK']=_0xe40fda(0x99),_0x43649a['edIxI']=_0xe40fda(0xbc);const _0x8a8333=_0x43649a,_0xd4fd2={};_0xd4fd2['description']=_0x8a8333[_0xe40fda(0x127)],_0xd4fd2['type']=_0x8a8333[_0xe40fda(0xf2)];const _0x38b3e0={};return _0x38b3e0[_0xe40fda(0x11a)]=_0xd4fd2,_0x20ab7e[_0xe40fda(0xa4)](HELP_HEADER_MESSAGE[_0xe40fda(0x100)])[_0xe40fda(0xc0)](HELP_FOOTER_MESSAGE)[_0xe40fda(0xa9)](_0x38b3e0)[_0xe40fda(0xbc)](_0x8a8333[_0xe40fda(0xff)])[_0xe40fda(0xd5)];},exports['handler']=async function(_0x442ddd){const _0x1c43cb=a6_0x2ca50b,_0x542207={'sxMDs':_0x1c43cb(0x94),'gHueM':_0x1c43cb(0xd2),'IztLr':_0x1c43cb(0x99),'jppZL':_0x1c43cb(0xbc),'qsUYc':_0x1c43cb(0xbf),'AcFhU':function(_0x5c6f8c){return _0x5c6f8c();},'kpMtg':function(_0x9103b4){return _0x9103b4();},'JmNAV':function(_0x474e59,_0x2185d6){return _0x474e59===_0x2185d6;},'izaSs':_0x1c43cb(0x118),'pBlMu':_0x1c43cb(0x10d),'PFHHk':'Credentials\x20not\x20found!\x20Ensure\x20init\x20command\x20is\x20run\x20before\x20running\x20this\x20command.','pbNbq':function(_0x5a7355,_0x194029,_0x2bd0a8,_0x184479,_0x13ad04,_0x18874b,_0x27ab44){return _0x5a7355(_0x194029,_0x2bd0a8,_0x184479,_0x13ad04,_0x18874b,_0x27ab44);},'iveLK':'delete-grid-called','fTQsb':_0x1c43cb(0xe7),'hiYEY':function(_0x3d28e6,_0x18b193){return _0x3d28e6===_0x18b193;},'WSIZF':_0x1c43cb(0xe5),'aRDfF':_0x1c43cb(0xdd),'CbqyY':function(_0x220b4f){return _0x220b4f();},'HUGKn':function(_0x3de113,_0xf7ab9,_0x85d406,_0x3e6c46){return _0x3de113(_0xf7ab9,_0x85d406,_0x3e6c46);},'yRSZG':function(_0x24fadd,_0x57d5c7){return _0x24fadd!==_0x57d5c7;},'DUGXL':_0x1c43cb(0x12a),'PiYTF':function(_0xbd831,_0x2e9cca){return _0xbd831(_0x2e9cca);},'schcT':function(_0xf0ca85,_0x54a0ab){return _0xf0ca85===_0x54a0ab;},'rBbKe':function(_0x29a428,_0x1984f6){return _0x29a428===_0x1984f6;},'zcPAt':_0x1c43cb(0xd8),'BgwNd':_0x1c43cb(0xca),'vurFV':_0x1c43cb(0xbe),'SFlSw':function(_0xe7331b,_0x549ef5,_0x72ce89,_0x3ed5a7,_0x5e7424,_0x33688e,_0x9ec4c6){return _0xe7331b(_0x549ef5,_0x72ce89,_0x3ed5a7,_0x5e7424,_0x33688e,_0x9ec4c6);},'jfUXu':'invalid-input','uQFvH':function(_0xf22de9,_0x257fa0){return _0xf22de9===_0x257fa0;},'kSbQT':_0x1c43cb(0x10e),'pYALV':'qayUh','FJoZC':function(_0x37e079){return _0x37e079();},'uIjdr':'RQSFd','xMViE':'FkqRG','rAVjZ':_0x1c43cb(0xba),'wbmVs':function(_0x2744d3,_0x99d421){return _0x2744d3(_0x99d421);},'CtAJd':function(_0x5150d1){return _0x5150d1();},'IYFCF':_0x1c43cb(0xdf),'YDQsc':_0x1c43cb(0xf4),'KGycQ':_0x1c43cb(0x96),'qtXpX':function(_0x256428,_0x4d0b01){return _0x256428(_0x4d0b01);},'tufBq':function(_0x2222f8,_0x443367,_0x52012c,_0x37e638,_0x57da43){return _0x2222f8(_0x443367,_0x52012c,_0x37e638,_0x57da43);},'rOoSu':function(_0x21e9e5,_0x1e57aa,_0x26e915,_0x18d3a5,_0x24f523,_0x520b43){return _0x21e9e5(_0x1e57aa,_0x26e915,_0x18d3a5,_0x24f523,_0x520b43);},'ITzUY':function(_0x51725d,_0x14cdbe){return _0x51725d===_0x14cdbe;},'VbYxw':_0x1c43cb(0xe6),'MAqCc':function(_0x194e67,_0x4eedeb){return _0x194e67===_0x4eedeb;},'kKaFz':_0x1c43cb(0x91),'ApZTP':'BrowserStack','WPfEY':function(_0x12682d,_0x513a82){return _0x12682d(_0x513a82);},'DYrpo':_0x1c43cb(0x11c),'HHhVg':function(_0x118ce9,_0x461ffe){return _0x118ce9!==_0x461ffe;},'YUHiI':function(_0x543ce3,_0x42dea4){return _0x543ce3===_0x42dea4;},'eRijU':'server-error','sLoFF':function(_0x3141c3,_0x6a1feb){return _0x3141c3===_0x6a1feb;},'fqsFI':_0x1c43cb(0x117),'mFFEZ':function(_0x3b3039,_0x158960,_0x54b985,_0x4e68d6,_0x5cd116,_0x5504b0,_0x14dbbe){return _0x3b3039(_0x158960,_0x54b985,_0x4e68d6,_0x5cd116,_0x5504b0,_0x14dbbe);},'TccIF':_0x1c43cb(0xcc),'NASHB':function(_0x3ee025,_0x5813ad,_0x5e83e0,_0x56b472,_0x2f8f7d,_0x1c6258,_0x18a964){return _0x3ee025(_0x5813ad,_0x5e83e0,_0x56b472,_0x2f8f7d,_0x1c6258,_0x18a964);},'fqnEu':function(_0xf9aa25,_0x5dbb54,_0x12da77,_0x4eab55,_0x31cba,_0x3734ad,_0x506824){return _0xf9aa25(_0x5dbb54,_0x12da77,_0x4eab55,_0x31cba,_0x3734ad,_0x506824);},'ajQhG':_0x1c43cb(0x9e)};try{global_registry[_0x1c43cb(0xdc)]=_0x542207[_0x1c43cb(0xc4)](uuidv4);!fs[_0x1c43cb(0xa3)](_0x542207[_0x1c43cb(0x11f)](getCredentialsPath))&&(_0x542207[_0x1c43cb(0xbb)](_0x542207[_0x1c43cb(0x120)],_0x542207['pBlMu'])?(_0x19a1b2[_0x1c43cb(0x12e)](_0x1c43cb(0x9b)),_0x237c25[_0x1c43cb(0x109)](0x0)):(console['error'](_0x542207[_0x1c43cb(0x12d)]),await _0x542207[_0x1c43cb(0x97)](sendInstrumentationEvent,_0x442ddd,_0x542207[_0x1c43cb(0xe3)],messageTypes[_0x1c43cb(0x126)],_0x542207[_0x1c43cb(0x9a)],null,_0x442ddd),process['exit'](0x1)));_0x542207[_0x1c43cb(0x97)](sendInstrumentationEvent,_0x442ddd,_0x542207[_0x1c43cb(0xe3)],messageTypes[_0x1c43cb(0xe2)],null,null,_0x442ddd);!_0x442ddd[_0x1c43cb(0xa8)]&&(_0x542207[_0x1c43cb(0x102)](_0x542207['WSIZF'],_0x542207[_0x1c43cb(0xb6)])?_0x14c06a=_0x478254[_0x1c43cb(0x90)][_0x1c43cb(0xc1)]:(console['error'](_0x542207[_0x1c43cb(0x12b)]),process[_0x1c43cb(0x109)](0x1)));const _0x51992a=JSON[_0x1c43cb(0x11e)](fs[_0x1c43cb(0x112)](_0x542207['CbqyY'](getCredentialsPath))),_0x1b0eca=await _0x542207[_0x1c43cb(0x101)](getGridDetails,_0x51992a[_0x1c43cb(0x121)]['username'],_0x51992a[_0x1c43cb(0x121)][_0x1c43cb(0x10b)],_0x442ddd[_0x1c43cb(0xa8)]);if(_0x1b0eca){const _0x49fba1=_0x1b0eca[_0x1c43cb(0x12e)];let _0x361a4d=_0x1c43cb(0xb7)+_0x49fba1[_0x1c43cb(0xea)]+_0x1c43cb(0xef)+_0x49fba1['id']+_0x1c43cb(0xd1),_0x1862ba;_0x1b0eca['onlyGridInCluster']&&(_0x542207[_0x1c43cb(0xaa)](_0x542207['DUGXL'],_0x542207['DUGXL'])?(_0xbf07c6[_0x1c43cb(0x12e)](_0x542207[_0x1c43cb(0xf5)]),_0x456d9b[_0x1c43cb(0xd6)]=_0xe313f1[_0x52c744][_0x1c43cb(0xa2)],_0x48cd32[_0x1c43cb(0xec)]=_0x106f1a[_0x239aad][_0x1c43cb(0xc2)]):_0x361a4d=_0x1c43cb(0xb7)+_0x49fba1['name']+_0x1c43cb(0xef)+_0x49fba1['id']+_0x1c43cb(0xd4)+_0x49fba1[_0x1c43cb(0xe1)]+_0x1c43cb(0x114)+_0x49fba1['clusterId']+'.\x20Do\x20you\x20want\x20to\x20proceed\x20with\x20deletion?\x20(y/n)');_0x1862ba=await _0x542207[_0x1c43cb(0xc3)](inputConfirmation,_0x361a4d);(_0x542207[_0x1c43cb(0xbb)](_0x1862ba,undefined)||_0x542207[_0x1c43cb(0x102)](_0x1862ba,null)||!(_0x542207['schcT'](_0x1862ba[_0x1c43cb(0xd3)](),'y')||_0x542207[_0x1c43cb(0x10c)](_0x1862ba[_0x1c43cb(0xd3)](),'n')))&&(_0x542207['yRSZG'](_0x542207[_0x1c43cb(0xb1)],_0x542207[_0x1c43cb(0xcd)])?(console[_0x1c43cb(0xf1)](_0x542207['vurFV']),await _0x542207[_0x1c43cb(0xa7)](sendInstrumentationEvent,_0x442ddd,_0x542207[_0x1c43cb(0xe3)],messageTypes[_0x1c43cb(0x126)],_0x542207['jfUXu'],null,_0x442ddd),process[_0x1c43cb(0x109)](0x1)):_0x26ccb5=_0x1c43cb(0xb7)+_0x417c7d['name']+_0x1c43cb(0xef)+_0x1c3ae3['id']+_0x1c43cb(0xd4)+_0x5aab05[_0x1c43cb(0xe1)]+_0x1c43cb(0x114)+_0x17778f[_0x1c43cb(0xf9)]+_0x1c43cb(0xd1));if(_0x542207[_0x1c43cb(0xce)](_0x1862ba[_0x1c43cb(0xd3)](),'n')){if(_0x542207[_0x1c43cb(0xaa)](_0x542207[_0x1c43cb(0xfa)],_0x542207[_0x1c43cb(0x12c)]))process[_0x1c43cb(0x109)](0x0);else{const _0x25ffb2={};_0x25ffb2[_0x1c43cb(0x106)]=_0x542207[_0x1c43cb(0x115)],_0x25ffb2['type']=_0x542207[_0x1c43cb(0x10a)];const _0x46342a={};return _0x46342a[_0x1c43cb(0x11a)]=_0x25ffb2,_0x372020['usage'](_0x2a5a84[_0x1c43cb(0x100)])[_0x1c43cb(0xc0)](_0x2cf309)[_0x1c43cb(0xa9)](_0x46342a)[_0x1c43cb(0xbc)](_0x542207[_0x1c43cb(0xa0)])[_0x1c43cb(0xd5)];}}_0x542207[_0x1c43cb(0x122)](closeInput),global_registry[_0x1c43cb(0x11b)]=_0x49fba1[_0x1c43cb(0xb4)];const _0x1299d9=_0x49fba1[_0x1c43cb(0xde)],_0x304610=_0x51992a[_0x1c43cb(0xde)]||{};if(_0x542207[_0x1c43cb(0x102)](_0x304610[_0x1299d9],undefined)){if(_0x542207['yRSZG'](_0x542207[_0x1c43cb(0xe9)],_0x542207[_0x1c43cb(0x116)])){logger[_0x1c43cb(0x12e)](_0x542207[_0x1c43cb(0xb2)]);const [_0xa86d53,_0x19ac16]=await _0x542207[_0x1c43cb(0x104)](inputCloudProviderKeys,_0x1299d9);_0x51992a[_0x1c43cb(0xde)]={};const _0x4672b4={};_0x4672b4['accessKey']=_0xa86d53,_0x4672b4[_0x1c43cb(0xc2)]=_0x19ac16,_0x51992a['cloudProvider'][_0x1299d9]=_0x4672b4,fs[_0x1c43cb(0xf8)](_0x542207[_0x1c43cb(0x113)](getCredentialsPath),JSON[_0x1c43cb(0xa6)](_0x51992a)),logger['debug'](_0x542207[_0x1c43cb(0xc6)]),global_registry[_0x1c43cb(0xd6)]=_0xa86d53,global_registry[_0x1c43cb(0xec)]=_0x19ac16;}else _0x504f9c['warn'](_0x1c43cb(0x128)+_0x11efb1[_0x1c43cb(0xe1)]+_0x1c43cb(0xfc));}else _0x542207[_0x1c43cb(0xaa)](_0x542207[_0x1c43cb(0xf0)],_0x542207[_0x1c43cb(0x129)])?(logger[_0x1c43cb(0x12e)](_0x542207['sxMDs']),global_registry['cloudProviderAccessKey']=_0x304610[_0x1299d9]['accessKey'],global_registry['cloudProviderSecretKey']=_0x304610[_0x1299d9][_0x1c43cb(0xc2)]):(_0x46f745[_0x1c43cb(0xf1)](_0x542207[_0x1c43cb(0x12b)]),_0x1c659d[_0x1c43cb(0x109)](0x1));_0x542207[_0x1c43cb(0xc4)](configureAWSIfNotConfigured);const _0x29ffda=_0x542207[_0x1c43cb(0xf3)](kebabCase,_0x49fba1[_0x1c43cb(0xea)]),_0x593e04=await _0x542207[_0x1c43cb(0xf3)](getClusterInfo,_0x49fba1[_0x1c43cb(0xe1)]),[_0x292880,_0x4f4501,_0x917e81,_0x3b5010]=await _0x542207[_0x1c43cb(0xcf)](createK8sClient,_0x593e04[_0x1c43cb(0x90)][_0x1c43cb(0xea)],_0x593e04[_0x1c43cb(0x90)][_0x1c43cb(0xdb)],_0x593e04[_0x1c43cb(0x90)][_0x1c43cb(0x95)][_0x1c43cb(0xfd)],_0x49fba1['region']);await _0x542207[_0x1c43cb(0xfe)](removeGridComponents,_0x292880,_0x4f4501,_0x917e81,_0x3b5010,_0x29ffda);let _0x5bb7da;_0x593e04[_0x1c43cb(0x90)]&&(_0x542207[_0x1c43cb(0xc9)](_0x542207[_0x1c43cb(0xcb)],_0x542207[_0x1c43cb(0xcb)])?_0x5bb7da=_0x593e04[_0x1c43cb(0x90)][_0x1c43cb(0xc1)]:_0x5a1d64[_0x1c43cb(0x109)](0x0));_0x1b0eca[_0x1c43cb(0x105)]&&(_0x5bb7da&&_0x542207[_0x1c43cb(0xda)](_0x5bb7da[_0x542207['kKaFz']],_0x542207[_0x1c43cb(0xad)])?await _0x542207[_0x1c43cb(0x125)](deleteClusterAndDependencies,_0x49fba1['region']):logger[_0x1c43cb(0xac)](_0x1c43cb(0x128)+_0x49fba1[_0x1c43cb(0xe1)]+_0x1c43cb(0xfc)));const _0x4f91c3=_0x1c43cb(0x9c)+AG_API_URL+'/packages/cli/grid/'+_0x442ddd[_0x1c43cb(0xa8)],_0x68f0f8={};_0x68f0f8[_0x1c43cb(0x98)]=_0x51992a[_0x1c43cb(0x121)]['username'],_0x68f0f8['password']=_0x51992a['Browserstack'][_0x1c43cb(0x10b)];const _0x126b17={};_0x126b17[_0x1c43cb(0x110)]=_0x4f91c3,_0x126b17[_0x1c43cb(0x111)]=_0x542207['DYrpo'],_0x126b17[_0x1c43cb(0xee)]=_0x68f0f8;const _0x3b20f6=_0x126b17,_0xa77be4=await _0x542207['PiYTF'](promisifiedRequest,_0x3b20f6);_0x542207[_0x1c43cb(0xaa)](_0xa77be4,null)&&_0x542207[_0x1c43cb(0xe8)](_0xa77be4,undefined)&&_0x542207['YUHiI'](_0xa77be4[_0x1c43cb(0xd9)],0xc8)&&(logger['info'](_0x1c43cb(0x9b)),process[_0x1c43cb(0x109)](0x0)),logger[_0x1c43cb(0xf1)](_0x1c43cb(0xb0)+JSON[_0x1c43cb(0xa6)](_0xa77be4)),await _0x542207[_0x1c43cb(0xa7)](sendInstrumentationEvent,_0x442ddd,_0x542207[_0x1c43cb(0xe3)],messageTypes['ERROR'],_0x542207[_0x1c43cb(0x10f)],res,_0x442ddd),process['exit'](0x1);}_0x542207['sLoFF'](res['statusCode'],0x191)&&(logger[_0x1c43cb(0xf1)](_0x1c43cb(0x92)),await _0x542207['SFlSw'](sendInstrumentationEvent,_0x442ddd,_0x542207[_0x1c43cb(0xe3)],messageTypes[_0x1c43cb(0x126)],_0x542207['fqsFI'],null,_0x442ddd),process[_0x1c43cb(0x109)](0x1)),_0x542207[_0x1c43cb(0xf7)](res[_0x1c43cb(0xd9)],0x190)&&(logger['error'](JSON[_0x1c43cb(0x11e)](res[_0x1c43cb(0xc5)])[_0x1c43cb(0x93)]),await _0x542207[_0x1c43cb(0x107)](sendInstrumentationEvent,_0x442ddd,_0x542207['iveLK'],messageTypes[_0x1c43cb(0x126)],_0x542207[_0x1c43cb(0xb5)],null,_0x442ddd),process['exit'](0x1)),logger[_0x1c43cb(0xf1)]('Failed\x20to\x20fetch\x20grid\x20details\x20from\x20the\x20server.\x20Response\x20from\x20server:\x20'+JSON[_0x1c43cb(0xa6)](res)),await _0x542207['NASHB'](sendInstrumentationEvent,_0x442ddd,_0x542207[_0x1c43cb(0xe3)],messageTypes[_0x1c43cb(0x126)],_0x542207['eRijU'],res,_0x442ddd),process[_0x1c43cb(0x109)](0x1);}catch(_0x23e441){logger[_0x1c43cb(0xf1)](_0x1c43cb(0xb3)+_0x23e441['stack']),await _0x542207['fqnEu'](sendInstrumentationEvent,_0x442ddd,_0x542207[_0x1c43cb(0xe3)],messageTypes[_0x1c43cb(0x126)],_0x542207[_0x1c43cb(0xaf)],_0x23e441,_0x442ddd),process[_0x1c43cb(0x109)](0x1);}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a7_0x5b0f(){const _0x28f2e2=['RwvRK','XrBRr','2564380mTYPrU','statusCode','mkdirSync','init','options','QHZEp','KfAVU','sHlAA','requestId','promisify','wdEkS','utf-8','bstack-username','BROWSERSTACK_ACCESS_KEY','bstackAccesskey','cTYLl','xYvtG','8kSiubu','strict','xbqPt','error','exit','usage','rNSlH','FFdJf','HeROq','writeFileSync','vyXIm','bNmfr','../config/logger','NslTj','odBMl','142341noUsAf','EEuYs','gzQJB','parse','mZIaW','https://','uuid','stack','readFileSync','eBrIM','1217313fYiitu','builder','Use\x20corresponding\x20access-key\x20to\x20configure\x20the\x20CLI\x20for\x20future\x20actions.','Wwxny','string','QwFVZ','VZpbf','rxWcY','bstackUsername','username','lmtlY','FgnfH','vGQKG','1547104EpZRfd','YVbCo','desc','jegAz','2XQEzNv','FSmvn','qpizA','Use\x20username\x20to\x20configure\x20the\x20CLI\x20for\x20future\x20actions.','existsSync','CfJMX','dLHFK','../utils/userInput','ICYDQ','3117720xgGKnM','tJOLK','oROTh','../utils/utilityMethods','120gUBBQX','ERROR','init-called','util','YknUU','debug','env','url','zviGg','bstack-accesskey','4947030hFMVZL','../config/constants','qtNKe','Socki','GET','2275044ITXctU','wrong-creds','password','unknown-error','epilogue','dJapx','BrowserStack\x20username\x20and\x20password\x20neither\x20passed\x20in\x20command\x20line\x20arguments\x20nor\x20set\x20as\x20environment\x20variables.\x20Raising\x20a\x20prompt\x20to\x20get\x20the\x20details.','OsxYn','help','recommendCommands','description','eNoIp','type','VWfmN','BROWSERSTACK_USERNAME','INFO','nzzAI'];a7_0x5b0f=function(){return _0x28f2e2;};return a7_0x5b0f();}const a7_0xe392c4=a7_0x553a;function a7_0x553a(_0x352020,_0x242c55){const _0x5b0fe6=a7_0x5b0f();return a7_0x553a=function(_0x553aff,_0x4fc543){_0x553aff=_0x553aff-0x14b;let _0x4eb157=_0x5b0fe6[_0x553aff];return _0x4eb157;},a7_0x553a(_0x352020,_0x242c55);}(function(_0x4bf8e2,_0x1f08c6){const _0x1d7753=a7_0x553a,_0x3322be=_0x4bf8e2();while(!![]){try{const _0x4fda62=parseInt(_0x1d7753(0x167))/0x1+-parseInt(_0x1d7753(0x182))/0x2*(parseInt(_0x1d7753(0x19e))/0x3)+-parseInt(_0x1d7753(0x158))/0x4*(parseInt(_0x1d7753(0x18b))/0x5)+parseInt(_0x1d7753(0x199))/0x6+parseInt(_0x1d7753(0x1b1))/0x7+-parseInt(_0x1d7753(0x17e))/0x8+parseInt(_0x1d7753(0x171))/0x9*(parseInt(_0x1d7753(0x18f))/0xa);if(_0x4fda62===_0x1f08c6)break;else _0x3322be['push'](_0x3322be['shift']());}catch(_0x59a541){_0x3322be['push'](_0x3322be['shift']());}}}(a7_0x5b0f,0xb8ec6));const fs=require('fs'),util=require(a7_0xe392c4(0x192)),request=require('request'),{v4:uuidv4}=require(a7_0xe392c4(0x16d)),{logger}=require(a7_0xe392c4(0x164)),{inputBstackKeys}=require(a7_0xe392c4(0x189)),{BS_API_URL,HELP_HEADER_MESSAGE,HELP_FOOTER_MESSAGE,global_registry,messageTypes}=require(a7_0xe392c4(0x19a)),{getDirForConfig,getCredentialsPath}=require(a7_0xe392c4(0x18e)),{sendInstrumentationEvent}=require('../utils/instrumentationUtils'),promisifiedRequest=util[a7_0xe392c4(0x150)](request);exports['command']='init',exports[a7_0xe392c4(0x180)]='Initialise\x20the\x20BrowserStack\x20CLI\x20with\x20appropriate\x20credentials.',exports[a7_0xe392c4(0x172)]=function(_0x1f0008){const _0x2d6f7a=a7_0xe392c4,_0x59f53f={};_0x59f53f[_0x2d6f7a(0x1af)]=_0x2d6f7a(0x185),_0x59f53f[_0x2d6f7a(0x17b)]=_0x2d6f7a(0x175),_0x59f53f[_0x2d6f7a(0x16b)]=_0x2d6f7a(0x173),_0x59f53f[_0x2d6f7a(0x18a)]=_0x2d6f7a(0x1a6);const _0x228252=_0x59f53f,_0x4387f7={};_0x4387f7[_0x2d6f7a(0x1a8)]=_0x228252[_0x2d6f7a(0x1af)],_0x4387f7[_0x2d6f7a(0x1aa)]=_0x228252[_0x2d6f7a(0x17b)];const _0x463261={};_0x463261[_0x2d6f7a(0x1a8)]=_0x228252[_0x2d6f7a(0x16b)],_0x463261[_0x2d6f7a(0x1aa)]=_0x228252[_0x2d6f7a(0x17b)];const _0x3fbdb7={};return _0x3fbdb7[_0x2d6f7a(0x153)]=_0x4387f7,_0x3fbdb7[_0x2d6f7a(0x198)]=_0x463261,_0x1f0008[_0x2d6f7a(0x15d)](HELP_HEADER_MESSAGE['init'])['epilogue'](HELP_FOOTER_MESSAGE)['options'](_0x3fbdb7)[_0x2d6f7a(0x1a7)]()['strict']()[_0x2d6f7a(0x1a6)](_0x228252[_0x2d6f7a(0x18a)])['argv'];},exports['handler']=async function(_0x5b172a){const _0x5a1e21=a7_0xe392c4,_0x373b84={'YVbCo':_0x5a1e21(0x152),'xOLnL':_0x5a1e21(0x185),'odBMl':_0x5a1e21(0x175),'nfrUV':_0x5a1e21(0x173),'KTzpk':_0x5a1e21(0x1a6),'FgnfH':function(_0x2ae76e){return _0x2ae76e();},'VWfmN':function(_0x4811f7,_0x1e8aa3,_0x366e69,_0x375636,_0xc6c0c8,_0x369c95,_0x443128){return _0x4811f7(_0x1e8aa3,_0x366e69,_0x375636,_0xc6c0c8,_0x369c95,_0x443128);},'QHZEp':_0x5a1e21(0x191),'cTYLl':function(_0x22bfab,_0x5eac96){return _0x22bfab!==_0x5eac96;},'jegAz':'gRzra','dLHFK':_0x5a1e21(0x176),'EEuYs':function(_0x4ab772,_0x4a3a2b){return _0x4ab772!==_0x4a3a2b;},'nzzAI':_0x5a1e21(0x183),'zviGg':_0x5a1e21(0x15f),'eNoIp':function(_0x1e2a60,_0x1618db){return _0x1e2a60===_0x1618db;},'rxWcY':_0x5a1e21(0x184),'eBrIM':_0x5a1e21(0x1a5),'vitbc':function(_0x1bf504,_0x275dc2){return _0x1bf504===_0x275dc2;},'VZpbf':_0x5a1e21(0x151),'Wwxny':_0x5a1e21(0x19c),'UojmD':function(_0x362906,_0x1afbc1){return _0x362906===_0x1afbc1;},'xYvtG':function(_0x3f0213,_0x5088cf){return _0x3f0213===_0x5088cf;},'sHlAA':function(_0x239400,_0x37f4c1){return _0x239400===_0x37f4c1;},'gzQJB':'sVRdB','bNmfr':_0x5a1e21(0x1a4),'qZeEa':_0x5a1e21(0x19d),'vyXIm':function(_0x2de837,_0x4a9e41){return _0x2de837(_0x4a9e41);},'oROTh':function(_0xc05391,_0x2cdf94){return _0xc05391!==_0x2cdf94;},'KfAVU':_0x5a1e21(0x1a3),'YknUU':_0x5a1e21(0x15a),'HeROq':_0x5a1e21(0x17d),'CfJMX':_0x5a1e21(0x19b),'NslTj':_0x5a1e21(0x1b0),'tJOLK':'Wrong\x20credentials\x20passed.\x20Please\x20try\x20again\x20with\x20correct\x20credentials!','Qcslq':_0x5a1e21(0x19f),'rNSlH':_0x5a1e21(0x1a1)};try{global_registry[_0x5a1e21(0x14f)]=_0x373b84[_0x5a1e21(0x17c)](uuidv4),_0x373b84[_0x5a1e21(0x1ab)](sendInstrumentationEvent,_0x5b172a,_0x373b84[_0x5a1e21(0x14c)],messageTypes[_0x5a1e21(0x1ad)],null,null,_0x5b172a);const _0x4e1a59=_0x373b84[_0x5a1e21(0x17c)](getDirForConfig);!fs[_0x5a1e21(0x186)](_0x4e1a59)&&(_0x373b84[_0x5a1e21(0x156)](_0x373b84[_0x5a1e21(0x181)],_0x373b84[_0x5a1e21(0x181)])?_0x2e0026=_0x1d06ce['env'][_0x5a1e21(0x154)]:fs[_0x5a1e21(0x1b3)](_0x4e1a59));let _0x4a8694,_0x19d1f3;_0x5b172a[_0x5a1e21(0x179)]&&(_0x373b84['cTYLl'](_0x373b84[_0x5a1e21(0x188)],_0x373b84[_0x5a1e21(0x188)])?_0x2ba082=_0x26d354[_0x5a1e21(0x195)][_0x5a1e21(0x1ac)]:_0x4a8694=_0x5b172a['bstackUsername']);process[_0x5a1e21(0x195)]['BROWSERSTACK_USERNAME']&&(_0x373b84[_0x5a1e21(0x168)](_0x373b84[_0x5a1e21(0x1ae)],_0x373b84[_0x5a1e21(0x197)])?_0x4a8694=process[_0x5a1e21(0x195)][_0x5a1e21(0x1ac)]:_0x5d911c=_0x5cddb5[_0x5a1e21(0x16a)](_0x5489ea[_0x5a1e21(0x16f)](_0x193100,_0x373b84[_0x5a1e21(0x17f)])));_0x5b172a[_0x5a1e21(0x155)]&&(_0x373b84[_0x5a1e21(0x1a9)](_0x373b84[_0x5a1e21(0x178)],_0x373b84[_0x5a1e21(0x170)])?_0x27504b=_0x287f5b[_0x5a1e21(0x179)]:_0x19d1f3=_0x5b172a['bstackAccesskey']);if(process[_0x5a1e21(0x195)][_0x5a1e21(0x154)]){if(_0x373b84['vitbc'](_0x373b84[_0x5a1e21(0x177)],_0x373b84[_0x5a1e21(0x174)])){const _0x2e35d9={};_0x2e35d9[_0x5a1e21(0x1a8)]=_0x373b84['xOLnL'],_0x2e35d9['type']=_0x373b84[_0x5a1e21(0x166)];const _0x20c17b={};_0x20c17b[_0x5a1e21(0x1a8)]=_0x373b84['nfrUV'],_0x20c17b[_0x5a1e21(0x1aa)]=_0x373b84[_0x5a1e21(0x166)];const _0x3b3b78={};return _0x3b3b78['bstack-username']=_0x2e35d9,_0x3b3b78['bstack-accesskey']=_0x20c17b,_0x2640ac[_0x5a1e21(0x15d)](_0x4606af[_0x5a1e21(0x1b4)])[_0x5a1e21(0x1a2)](_0x2ff59e)[_0x5a1e21(0x14b)](_0x3b3b78)[_0x5a1e21(0x1a7)]()[_0x5a1e21(0x159)]()[_0x5a1e21(0x1a6)](_0x373b84['KTzpk'])['argv'];}else _0x19d1f3=process[_0x5a1e21(0x195)]['BROWSERSTACK_ACCESS_KEY'];}if(_0x373b84['UojmD'](_0x4a8694,undefined)||_0x373b84[_0x5a1e21(0x157)](_0x19d1f3,undefined)){if(_0x373b84['sHlAA'](_0x373b84[_0x5a1e21(0x169)],_0x373b84[_0x5a1e21(0x169)])){logger[_0x5a1e21(0x194)](_0x373b84[_0x5a1e21(0x163)]);const [_0x3f4fcb,_0x5acd42]=await _0x373b84[_0x5a1e21(0x17c)](inputBstackKeys);_0x4a8694=_0x3f4fcb,_0x19d1f3=_0x5acd42;}else _0x2b5950=!![];}let _0x50882a=![];const _0x5000f5={};_0x5000f5[_0x5a1e21(0x196)]=_0x5a1e21(0x16c)+_0x4a8694+':'+_0x19d1f3+'@'+BS_API_URL+'/automate/plan.json',_0x5000f5['method']=_0x373b84['qZeEa'];const _0x3166f4=_0x5000f5,_0x40b31e=await _0x373b84[_0x5a1e21(0x162)](promisifiedRequest,_0x3166f4);_0x373b84[_0x5a1e21(0x18d)](_0x40b31e,null)&&_0x373b84['oROTh'](_0x40b31e,undefined)&&_0x373b84['xYvtG'](_0x40b31e[_0x5a1e21(0x1b2)],0xc8)&&(_0x373b84[_0x5a1e21(0x156)](_0x373b84[_0x5a1e21(0x14d)],_0x373b84['KfAVU'])?_0x55e80f[_0x5a1e21(0x1b3)](_0x163c0e):_0x50882a=!![]);if(_0x50882a){if(_0x373b84[_0x5a1e21(0x1a9)](_0x373b84[_0x5a1e21(0x193)],_0x373b84[_0x5a1e21(0x160)])){let _0x2d02a6={};const _0xb53d2f=_0x373b84['FgnfH'](_0x3cdbcc);_0x1386be['existsSync'](_0xb53d2f)&&(_0x2d02a6=_0x311023[_0x5a1e21(0x16a)](_0x4fe3f8['readFileSync'](_0xb53d2f,_0x373b84[_0x5a1e21(0x17f)])));const _0x35faed={};_0x35faed[_0x5a1e21(0x17a)]=_0x4799f7,_0x35faed[_0x5a1e21(0x1a0)]=_0x114308,_0x2d02a6['Browserstack']=_0x35faed,_0x1d407e[_0x5a1e21(0x161)](_0xb53d2f,_0x53f195['stringify'](_0x2d02a6)),_0x5cdc46[_0x5a1e21(0x15c)](0x0);}else{let _0x1554d9={};const _0x3b01d8=_0x373b84[_0x5a1e21(0x17c)](getCredentialsPath);fs['existsSync'](_0x3b01d8)&&(_0x373b84[_0x5a1e21(0x14e)](_0x373b84[_0x5a1e21(0x187)],_0x373b84[_0x5a1e21(0x165)])?_0x1c44aa=_0x3d6a7c[_0x5a1e21(0x155)]:_0x1554d9=JSON['parse'](fs['readFileSync'](_0x3b01d8,_0x373b84['YVbCo'])));const _0x50dff5={};_0x50dff5[_0x5a1e21(0x17a)]=_0x4a8694,_0x50dff5[_0x5a1e21(0x1a0)]=_0x19d1f3,_0x1554d9['Browserstack']=_0x50dff5,fs[_0x5a1e21(0x161)](_0x3b01d8,JSON['stringify'](_0x1554d9)),process[_0x5a1e21(0x15c)](0x0);}}else logger[_0x5a1e21(0x15b)](_0x373b84[_0x5a1e21(0x18c)]),await _0x373b84[_0x5a1e21(0x1ab)](sendInstrumentationEvent,_0x5b172a,_0x373b84[_0x5a1e21(0x14c)],messageTypes[_0x5a1e21(0x190)],_0x373b84['Qcslq'],null,_0x5b172a),process['exit'](0x1);}catch(_0x5e2518){logger[_0x5a1e21(0x15b)](_0x5e2518[_0x5a1e21(0x16e)]),await _0x373b84[_0x5a1e21(0x1ab)](sendInstrumentationEvent,_0x5b172a,_0x373b84[_0x5a1e21(0x14c)],messageTypes[_0x5a1e21(0x190)],_0x373b84[_0x5a1e21(0x15e)],_0x5e2518,_0x5b172a),process['exit'](0x1);}};
|