@mablhq/mabl-cli 1.16.32 → 1.17.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.
Files changed (124) hide show
  1. package/api/basicApiClient.js +9 -4
  2. package/api/mablApiClient.js +14 -7
  3. package/browserLauncher/browserLauncherFactory.js +2 -1
  4. package/browserLauncher/elementHandle.js +2 -1
  5. package/browserLauncher/playwrightBrowserLauncher/playwrightBrowser.js +5 -1
  6. package/browserLauncher/playwrightBrowserLauncher/playwrightDom.js +22 -18
  7. package/browserLauncher/playwrightBrowserLauncher/playwrightFrame.js +10 -6
  8. package/browserLauncher/playwrightBrowserLauncher/playwrightHttpRequest.js +5 -1
  9. package/browserLauncher/playwrightBrowserLauncher/playwrightPage.js +13 -9
  10. package/browserLauncher/puppeteerBrowserLauncher/puppeteerBrowser.js +1 -1
  11. package/browserLauncher/puppeteerBrowserLauncher/puppeteerElementHandle.js +10 -10
  12. package/browserLauncher/puppeteerBrowserLauncher/puppeteerFrame.js +6 -6
  13. package/browserLauncher/puppeteerBrowserLauncher/puppeteerHttpRequest.js +1 -1
  14. package/browserLauncher/puppeteerBrowserLauncher/puppeteerHttpResponse.js +1 -1
  15. package/browserLauncher/puppeteerBrowserLauncher/puppeteerJsHandle.js +3 -3
  16. package/browserLauncher/puppeteerBrowserLauncher/puppeteerPage.js +12 -11
  17. package/cli.js +12 -8
  18. package/commands/applications/applications_cmds/describe.js +4 -4
  19. package/commands/applications/applications_cmds/list.js +4 -4
  20. package/commands/auth/auth_cmds/activate-key.js +1 -1
  21. package/commands/branches/branches_cmds/create.js +4 -4
  22. package/commands/branches/branches_cmds/describe.js +3 -3
  23. package/commands/branches/branches_cmds/list.js +3 -3
  24. package/commands/branches/branches_cmds/merge.js +4 -4
  25. package/commands/commandUtil/codeInsights.js +4 -2
  26. package/commands/commandUtil/describe.js +1 -1
  27. package/commands/commandUtil/fileUtil.js +5 -1
  28. package/commands/commandUtil/util.js +2 -2
  29. package/commands/config/config_cmds/delete.js +1 -1
  30. package/commands/config/config_cmds/set.js +1 -1
  31. package/commands/constants.js +2 -1
  32. package/commands/credentials/credentials_cmds/list.js +4 -4
  33. package/commands/deploy/deploy_cmds/create.js +18 -13
  34. package/commands/deploy/deploy_cmds/describe.js +5 -5
  35. package/commands/deploy/deploy_cmds/executionResultPresenter.js +1 -1
  36. package/commands/deploy/deploy_cmds/list.js +4 -4
  37. package/commands/deploy/deploy_cmds/watch.js +2 -2
  38. package/commands/environments/environments_cmds/create.js +7 -7
  39. package/commands/environments/environments_cmds/delete.js +1 -1
  40. package/commands/environments/environments_cmds/describe.js +4 -4
  41. package/commands/environments/environments_cmds/list.js +4 -4
  42. package/commands/environments/environments_cmds/update.js +2 -2
  43. package/commands/environments/environments_cmds/urls_cmds/add.js +3 -3
  44. package/commands/environments/environments_cmds/urls_cmds/list.js +2 -2
  45. package/commands/flows/flows_cmds/export.js +5 -5
  46. package/commands/flows/flows_cmds/list.js +2 -2
  47. package/commands/link-agents/link-agents_cmds/delete.js +1 -1
  48. package/commands/plans/plans_cmds/describe.js +4 -4
  49. package/commands/plans/plans_cmds/list.js +2 -2
  50. package/commands/test-runs/test-runs_cmds/export.js +2 -2
  51. package/commands/tests/executionUtil.js +5 -5
  52. package/commands/tests/testsUtil.js +19 -12
  53. package/commands/tests/tests_cmds/create.js +3 -3
  54. package/commands/tests/tests_cmds/edit.js +3 -3
  55. package/commands/tests/tests_cmds/export.js +7 -7
  56. package/commands/tests/tests_cmds/import.js +35 -14
  57. package/commands/tests/tests_cmds/list.js +3 -3
  58. package/commands/tests/tests_cmds/run-alpha.js +3 -3
  59. package/commands/tests/tests_cmds/run-cloud.js +4 -4
  60. package/commands/tests/tests_cmds/run-legacy.js +8 -8
  61. package/commands/tests/tests_cmds/run.js +8 -8
  62. package/commands/tests/tests_cmds/trainer_cmds/trainerUtil.js +2 -2
  63. package/commands/tests/tests_cmds/trainer_cmds/update.js +1 -1
  64. package/commands/tests/tests_cmds/trainer_cmds/version.js +2 -2
  65. package/commands/workspaces/workspace_cmds/copy.js +2 -2
  66. package/commands/workspaces/workspace_cmds/describe.js +4 -4
  67. package/commands/workspaces/workspace_cmds/list.js +2 -2
  68. package/configGenerators/flowConfigGenerator.js +1 -1
  69. package/configGenerators/selIdeGenerator.js +6 -6
  70. package/core/messaging/actions/runnerActions.js +2 -2
  71. package/core/trainer/openUtils.js +2 -2
  72. package/core/trainer/trainingSessions.js +26 -26
  73. package/domUtil/index.js +1 -1
  74. package/env/env.js +5 -1
  75. package/execution/index.js +1 -1
  76. package/mablApi/index.js +1 -1
  77. package/mablscript/AttributesConstants.js +2 -1
  78. package/mablscript/MablStep.js +6 -12
  79. package/mablscript/actions/ConditionAction.js +1 -1
  80. package/mablscript/actions/FindAction.js +25 -32
  81. package/mablscript/actions/GetUrlAction.js +1 -1
  82. package/mablscript/actions/GetVariableValue.js +1 -1
  83. package/mablscript/actions/JavaScriptAction.js +16 -16
  84. package/mablscript/importer.js +7 -7
  85. package/mablscript/steps/AccessibilityCheck.js +4 -2
  86. package/mablscript/steps/AssertStep.js +16 -16
  87. package/mablscript/steps/AssertStepOld.js +2 -2
  88. package/mablscript/steps/ClickStep.js +1 -1
  89. package/mablscript/steps/CreateVariableStep.js +6 -6
  90. package/mablscript/steps/DoubleClickStep.js +1 -1
  91. package/mablscript/steps/EchoStep.js +2 -2
  92. package/mablscript/steps/EnterTextStep.js +3 -3
  93. package/mablscript/steps/HoverStep.js +1 -1
  94. package/mablscript/steps/IfConditionStep.js +2 -1
  95. package/mablscript/steps/NavigateStep.js +1 -1
  96. package/mablscript/steps/SendHttpRequestStep.js +1 -1
  97. package/mablscript/steps/SendKeyStep.js +2 -2
  98. package/mablscript/steps/SetViewportStep.js +1 -1
  99. package/mablscript/steps/SwitchContextStep.js +9 -9
  100. package/mablscript/steps/VisitUrlStep.js +1 -1
  101. package/mablscript/steps/WaitStep.js +1 -1
  102. package/mablscript/steps/WaitUntilStep.js +1 -1
  103. package/mablscript/types/OperatingSystemDescriptor.js +5 -1
  104. package/mablscript/types/VariableNamespace.js +1 -1
  105. package/mablscriptFind/index.js +1 -1
  106. package/observers/mockObserver.js +4 -2
  107. package/package.json +55 -56
  108. package/popupDismissal/index.js +3 -3
  109. package/providers/authenticationProvider.js +3 -3
  110. package/providers/logging/loggingProvider.js +5 -1
  111. package/proxy/index.js +2 -1
  112. package/proxy/index.js.LICENSE.txt +5 -0
  113. package/reporters/mochAwesome/mochAwesomeReporter.js +11 -7
  114. package/reporters/reporter.js +1 -1
  115. package/resources/mablFind.js +1 -1
  116. package/resources/popupDismissal.js +1 -1
  117. package/util/RichPromise.js +1 -0
  118. package/util/actionabilityUtil.js +18 -14
  119. package/util/analytics.js +7 -3
  120. package/util/downloadUtil.js +6 -2
  121. package/util/httpUtil.js +6 -2
  122. package/util/markdownUtil.js +1 -1
  123. package/util/pureUtil.js +5 -1
  124. package/util/resourceUtil.js +5 -1
@@ -17,7 +17,7 @@ class NavigateStep extends MablStep_1.MablStep {
17
17
  };
18
18
  }
19
19
  produceSelIdeFormattedSteps(_stepIndex) {
20
- const seleniumStep = SeleniumIdeStep_1.buildSeleniumIdeStep('executeScript', this);
20
+ const seleniumStep = (0, SeleniumIdeStep_1.buildSeleniumIdeStep)('executeScript', this);
21
21
  seleniumStep.target = 'window.location.reload()';
22
22
  return [seleniumStep];
23
23
  }
@@ -36,7 +36,7 @@ class SendHttpRequestStep extends MablStep_1.MablStep {
36
36
  return new SendHttpRequestStep('send_http_request', [formatted], []);
37
37
  }
38
38
  toMablscript() {
39
- const stepAsSource = MablStep_1.buildSourceRepresentationOfObject(this.sendRequest);
39
+ const stepAsSource = (0, MablStep_1.buildSourceRepresentationOfObject)(this.sendRequest);
40
40
  return `send_http_request(${stepAsSource})`;
41
41
  }
42
42
  }
@@ -35,7 +35,7 @@ class SendKeyStep extends MablStep_1.MablStep {
35
35
  if (this.actions.length !== 1 && !(this.actions[0] instanceof FindAction_1.FindAction)) {
36
36
  throw new Error(`${name} step should have one sub-action and it should be a find`);
37
37
  }
38
- if (mablscriptFind_1.isFindElementType(this.actions[0].getActionName())) {
38
+ if ((0, mablscriptFind_1.isFindElementType)(this.actions[0].getActionName())) {
39
39
  this.findAction = this.actions[0];
40
40
  }
41
41
  else {
@@ -81,7 +81,7 @@ class SendKeyStep extends MablStep_1.MablStep {
81
81
  };
82
82
  }
83
83
  produceSelIdeFormattedSteps() {
84
- const seleniumStep = SeleniumIdeStep_1.buildSeleniumIdeStep('sendKeys', this);
84
+ const seleniumStep = (0, SeleniumIdeStep_1.buildSeleniumIdeStep)('sendKeys', this);
85
85
  seleniumStep.target = this.findAction.getSelIdeTarget();
86
86
  seleniumStep.value = this.keys
87
87
  .map((keyPress) => {
@@ -16,7 +16,7 @@ class SetViewportStep extends MablStep_1.MablStep {
16
16
  return { size: this.size };
17
17
  }
18
18
  produceSelIdeFormattedSteps(_stepIndex) {
19
- const seleniumStep = SeleniumIdeStep_1.buildSeleniumIdeStep('setWindowSize', this);
19
+ const seleniumStep = (0, SeleniumIdeStep_1.buildSeleniumIdeStep)('setWindowSize', this);
20
20
  const width = this.size.width || 1920;
21
21
  const height = this.size.height || 1080;
22
22
  seleniumStep.target = this.substituteSeleniumVariable(`${width}x${height}`);
@@ -73,37 +73,37 @@ class SwitchContextStep extends MablStep_1.MablStep {
73
73
  if (this.description) {
74
74
  formatted[stepName].description = this.description;
75
75
  }
76
- if (SwitchContextStepDescriptor_1.isSwitchTab(step)) {
76
+ if ((0, SwitchContextStepDescriptor_1.isSwitchTab)(step)) {
77
77
  formatted[stepName].findType = 'FindTab';
78
78
  formatted[stepName].selector = step.tab.findTarget;
79
79
  }
80
- if (SwitchContextStepDescriptor_1.isSwitchFrame(step)) {
80
+ if ((0, SwitchContextStepDescriptor_1.isSwitchFrame)(step)) {
81
81
  formatted[stepName].selector = step.frame.findTarget.selector;
82
82
  if ((_a = step.frame.findTarget.auxiliaryDescriptors) === null || _a === void 0 ? void 0 : _a.length) {
83
83
  formatted[stepName].selectorAncestors =
84
84
  step.frame.findTarget.auxiliaryDescriptors.map((descriptor) => descriptor.selector);
85
85
  }
86
86
  }
87
- if (SwitchContextStepDescriptor_1.isSwitchRoot(step) && step.frame === 'root') {
87
+ if ((0, SwitchContextStepDescriptor_1.isSwitchRoot)(step) && step.frame === 'root') {
88
88
  formatted[stepName].switch = 'root';
89
89
  }
90
90
  return formatted;
91
91
  }
92
92
  produceSelIdeFormattedSteps(_stepIndex) {
93
- if (SwitchContextStepDescriptor_1.isSwitchRoot(this.switch) && this.switch.frame === 'root') {
94
- const seleniumStep = SeleniumIdeStep_1.buildSeleniumIdeStep('selectWindow', this);
93
+ if ((0, SwitchContextStepDescriptor_1.isSwitchRoot)(this.switch) && this.switch.frame === 'root') {
94
+ const seleniumStep = (0, SeleniumIdeStep_1.buildSeleniumIdeStep)('selectWindow', this);
95
95
  seleniumStep.target = 'window=0';
96
96
  return [seleniumStep];
97
97
  }
98
- else if (SwitchContextStepDescriptor_1.isSwitchTab(this.switch)) {
99
- const seleniumStep = SeleniumIdeStep_1.buildSeleniumIdeStep('selectWindow', this);
98
+ else if ((0, SwitchContextStepDescriptor_1.isSwitchTab)(this.switch)) {
99
+ const seleniumStep = (0, SeleniumIdeStep_1.buildSeleniumIdeStep)('selectWindow', this);
100
100
  seleniumStep.target =
101
101
  this.switch.tab.findTarget === 'initial'
102
102
  ? 'tab=0'
103
103
  : `title="${this.switch.tab.findTarget.title}"`;
104
104
  return [seleniumStep];
105
105
  }
106
- const seleniumStep = SeleniumIdeStep_1.buildSeleniumIdeStep('selectFrame', this);
106
+ const seleniumStep = (0, SeleniumIdeStep_1.buildSeleniumIdeStep)('selectFrame', this);
107
107
  if (this.findAction) {
108
108
  seleniumStep.target = this.findAction.getSelIdeTarget();
109
109
  }
@@ -117,7 +117,7 @@ class SwitchContextStep extends MablStep_1.MablStep {
117
117
  }
118
118
  toMablscript() {
119
119
  var _a;
120
- if (SwitchContextStepDescriptor_1.isSwitchRoot(this.switch) && this.switch.frame === 'root') {
120
+ if ((0, SwitchContextStepDescriptor_1.isSwitchRoot)(this.switch) && this.switch.frame === 'root') {
121
121
  return 'switch_context_to("root")';
122
122
  }
123
123
  return `${(_a = this.findAction) === null || _a === void 0 ? void 0 : _a.toMablscript()}.switch_context_to()`;
@@ -20,7 +20,7 @@ class VisitUrlStep extends MablStep_1.MablStep {
20
20
  };
21
21
  }
22
22
  produceSelIdeFormattedSteps(_stepIndex) {
23
- const seleniumStep = SeleniumIdeStep_1.buildSeleniumIdeStep('open', this);
23
+ const seleniumStep = (0, SeleniumIdeStep_1.buildSeleniumIdeStep)('open', this);
24
24
  seleniumStep.target = this.substituteSeleniumVariable(this.url);
25
25
  return [seleniumStep];
26
26
  }
@@ -17,7 +17,7 @@ class WaitStep extends MablStep_1.MablStep {
17
17
  };
18
18
  }
19
19
  produceSelIdeFormattedSteps(_stepIndex) {
20
- const seleniumStep = SeleniumIdeStep_1.buildSeleniumIdeStep('pause', this);
20
+ const seleniumStep = (0, SeleniumIdeStep_1.buildSeleniumIdeStep)('pause', this);
21
21
  seleniumStep.target = `${this.milliseconds}`;
22
22
  return [seleniumStep];
23
23
  }
@@ -6,7 +6,7 @@ const mablscriptFind_1 = require("../../mablscriptFind");
6
6
  class WaitUntilStep extends MablStep_1.MablStep {
7
7
  constructor(name, args, actions) {
8
8
  super(name, args, actions);
9
- if (mablscriptFind_1.isFindElementType(this.actions[0].getActionName())) {
9
+ if ((0, mablscriptFind_1.isFindElementType)(this.actions[0].getActionName())) {
10
10
  this.findAction = this.actions[0];
11
11
  }
12
12
  else {
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -6,7 +6,7 @@ function isVariableNamespace(value) {
6
6
  return (value &&
7
7
  typeof value === 'object' &&
8
8
  !Array.isArray(value) &&
9
- VariableDataType_1.isSimpleObject(value) &&
9
+ (0, VariableDataType_1.isSimpleObject)(value) &&
10
10
  Object.keys(value).every((key) => key) &&
11
11
  Object.values(value).every(VariableDataType_1.isVariableDataType));
12
12
  }