askui 0.10.0 → 0.10.2

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 (102) hide show
  1. package/dist/cjs/core/annotation/template.html +1 -11390
  2. package/dist/cjs/core/model/annotation-result/annotation-interface.d.ts +1 -1
  3. package/dist/cjs/core/model/custom-element-json.d.ts +75 -0
  4. package/dist/cjs/core/model/custom-element-json.js +2 -0
  5. package/dist/cjs/core/model/custom-element.d.ts +21 -0
  6. package/dist/cjs/core/model/custom-element.js +54 -0
  7. package/dist/cjs/core/reporting/default-reporter.d.ts +10 -0
  8. package/dist/cjs/core/reporting/default-reporter.js +12 -0
  9. package/dist/cjs/core/reporting/default-step.d.ts +24 -0
  10. package/dist/cjs/core/reporting/default-step.js +75 -0
  11. package/dist/cjs/core/reporting/index.d.ts +11 -0
  12. package/dist/cjs/core/reporting/index.js +23 -0
  13. package/dist/cjs/core/reporting/instruction.d.ts +7 -0
  14. package/dist/cjs/core/reporting/instruction.js +2 -0
  15. package/dist/cjs/core/reporting/reporter-config.d.ts +13 -0
  16. package/dist/cjs/core/reporting/reporter-config.js +2 -0
  17. package/dist/cjs/core/reporting/reporter.d.ts +14 -0
  18. package/dist/cjs/core/reporting/reporter.js +2 -0
  19. package/dist/cjs/core/reporting/snapshot-detail-level.d.ts +21 -0
  20. package/dist/cjs/core/reporting/snapshot-detail-level.js +2 -0
  21. package/dist/cjs/core/reporting/snapshot.d.ts +6 -0
  22. package/dist/cjs/core/reporting/snapshot.js +2 -0
  23. package/dist/cjs/core/reporting/step-reporter.d.ts +17 -0
  24. package/dist/cjs/core/reporting/step-reporter.js +64 -0
  25. package/dist/cjs/core/reporting/step-run.d.ts +9 -0
  26. package/dist/cjs/core/reporting/step-run.js +2 -0
  27. package/dist/cjs/core/reporting/step-status-end.d.ts +1 -0
  28. package/dist/cjs/core/reporting/step-status-end.js +2 -0
  29. package/dist/cjs/core/reporting/step-status.d.ts +13 -0
  30. package/dist/cjs/core/reporting/step-status.js +2 -0
  31. package/dist/cjs/core/reporting/step.d.ts +36 -0
  32. package/dist/cjs/core/reporting/step.js +2 -0
  33. package/dist/cjs/execution/dsl.d.ts +1 -1
  34. package/dist/cjs/execution/execution-runtime.d.ts +16 -9
  35. package/dist/cjs/execution/execution-runtime.js +79 -33
  36. package/dist/cjs/execution/inference-client.d.ts +1 -1
  37. package/dist/cjs/execution/reporter.d.ts +132 -0
  38. package/dist/cjs/execution/reporter.js +146 -0
  39. package/dist/cjs/execution/ui-control-client-dependency-builder.d.ts +14 -0
  40. package/dist/cjs/execution/ui-control-client-dependency-builder.js +72 -0
  41. package/dist/cjs/execution/ui-control-client.d.ts +27 -15
  42. package/dist/cjs/execution/ui-control-client.js +97 -67
  43. package/dist/cjs/execution/ui-controller-client-interface.d.ts +11 -2
  44. package/dist/cjs/execution/ui-controller-client.d.ts +4 -4
  45. package/dist/cjs/execution/ui-controller-client.js +6 -6
  46. package/dist/cjs/lib/ui-controller-facade.js +1 -1
  47. package/dist/cjs/main.d.ts +2 -1
  48. package/dist/cjs/main.js +2 -2
  49. package/dist/cjs/utils/proxy/proxy-builder.d.ts +1 -1
  50. package/dist/cjs/utils/proxy/proxy-builder.js +3 -3
  51. package/dist/esm/core/annotation/template.html +1 -11390
  52. package/dist/esm/core/model/annotation-result/annotation-interface.d.ts +1 -1
  53. package/dist/esm/core/model/custom-element-json.d.ts +75 -0
  54. package/dist/esm/core/model/custom-element-json.js +1 -0
  55. package/dist/esm/core/model/custom-element.d.ts +21 -0
  56. package/dist/esm/core/model/custom-element.js +50 -0
  57. package/dist/esm/core/reporting/default-reporter.d.ts +10 -0
  58. package/dist/esm/core/reporting/default-reporter.js +9 -0
  59. package/dist/esm/core/reporting/default-step.d.ts +24 -0
  60. package/dist/esm/core/reporting/default-step.js +71 -0
  61. package/dist/esm/core/reporting/index.d.ts +11 -0
  62. package/dist/esm/core/reporting/index.js +11 -0
  63. package/dist/esm/core/reporting/instruction.d.ts +7 -0
  64. package/dist/esm/core/reporting/instruction.js +1 -0
  65. package/dist/esm/core/reporting/reporter-config.d.ts +13 -0
  66. package/dist/esm/core/reporting/reporter-config.js +1 -0
  67. package/dist/esm/core/reporting/reporter.d.ts +14 -0
  68. package/dist/esm/core/reporting/reporter.js +1 -0
  69. package/dist/esm/core/reporting/snapshot-detail-level.d.ts +21 -0
  70. package/dist/esm/core/reporting/snapshot-detail-level.js +1 -0
  71. package/dist/esm/core/reporting/snapshot.d.ts +6 -0
  72. package/dist/esm/core/reporting/snapshot.js +1 -0
  73. package/dist/esm/core/reporting/step-reporter.d.ts +17 -0
  74. package/dist/esm/core/reporting/step-reporter.js +60 -0
  75. package/dist/esm/core/reporting/step-run.d.ts +9 -0
  76. package/dist/esm/core/reporting/step-run.js +1 -0
  77. package/dist/esm/core/reporting/step-status-end.d.ts +1 -0
  78. package/dist/esm/core/reporting/step-status-end.js +1 -0
  79. package/dist/esm/core/reporting/step-status.d.ts +13 -0
  80. package/dist/esm/core/reporting/step-status.js +1 -0
  81. package/dist/esm/core/reporting/step.d.ts +36 -0
  82. package/dist/esm/core/reporting/step.js +1 -0
  83. package/dist/esm/execution/dsl.d.ts +1 -1
  84. package/dist/esm/execution/execution-runtime.d.ts +16 -9
  85. package/dist/esm/execution/execution-runtime.js +77 -31
  86. package/dist/esm/execution/inference-client.d.ts +1 -1
  87. package/dist/esm/execution/reporter.d.ts +132 -0
  88. package/dist/esm/execution/reporter.js +142 -0
  89. package/dist/esm/execution/ui-control-client-dependency-builder.d.ts +14 -0
  90. package/dist/esm/execution/ui-control-client-dependency-builder.js +68 -0
  91. package/dist/esm/execution/ui-control-client.d.ts +27 -15
  92. package/dist/esm/execution/ui-control-client.js +96 -66
  93. package/dist/esm/execution/ui-controller-client-interface.d.ts +11 -2
  94. package/dist/esm/execution/ui-controller-client.d.ts +4 -4
  95. package/dist/esm/execution/ui-controller-client.js +6 -6
  96. package/dist/esm/lib/ui-controller-facade.js +2 -2
  97. package/dist/esm/main.d.ts +2 -1
  98. package/dist/esm/main.js +1 -1
  99. package/dist/esm/utils/proxy/proxy-builder.d.ts +1 -1
  100. package/dist/esm/utils/proxy/proxy-builder.js +1 -1
  101. package/dist/example_projects_templates/typescript_jest/test/my-first-askui-test-suite.test.ts +9 -2
  102. package/package.json +1 -1
@@ -10,71 +10,98 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.UiControlClient = void 0;
13
- const test_case_dto_1 = require("../core/model/test-case-dto");
13
+ const custom_element_1 = require("../core/model/custom-element");
14
14
  const dsl_1 = require("./dsl");
15
- const http_client_got_1 = require("../utils/http/http-client-got");
16
- const ui_controller_client_1 = require("./ui-controller-client");
17
- const execution_runtime_1 = require("./execution-runtime");
18
- const inference_client_1 = require("./inference-client");
19
15
  const annotation_writer_1 = require("../core/annotation/annotation-writer");
20
16
  const logger_1 = require("../lib/logger");
21
- const test_case_result_dto_1 = require("../core/model/test-case-result-dto");
22
17
  const annotation_level_1 = require("./annotation-level");
23
18
  const ui_control_client_error_1 = require("./ui-control-client-error");
24
- const read_environment_credentials_1 = require("./read-environment-credentials");
25
- const analytics_1 = require("../utils/analytics");
26
- const proxy_builder_1 = require("../utils/proxy/proxy-builder");
27
- const getClientArgsWithDefaults = (clientArgs = {}) => (Object.assign({ uiControllerUrl: 'http://127.0.0.1:6769', inferenceServerUrl: 'https://inference.askui.com', annotationLevel: annotation_level_1.AnnotationLevel.DISABLED }, clientArgs));
19
+ const ui_control_client_dependency_builder_1 = require("./ui-control-client-dependency-builder");
28
20
  class UiControlClient extends dsl_1.ApiCommands {
29
- constructor(httpClient, clientArgs, workspaceId) {
21
+ constructor(config, executionRuntime, stepReporter) {
30
22
  super();
31
- this.httpClient = httpClient;
32
- this.clientArgs = clientArgs;
33
- this.workspaceId = workspaceId;
23
+ this.config = config;
24
+ this.executionRuntime = executionRuntime;
25
+ this.stepReporter = stepReporter;
34
26
  this.secretText = undefined;
35
27
  }
36
- static build(clientArgs) {
28
+ static build(clientArgs = {}) {
37
29
  return __awaiter(this, void 0, void 0, function* () {
38
- const analytics = new analytics_1.Analytics();
39
- const analyticsHeaders = yield analytics.getAnalyticsHeaders();
40
- const analyticsCookies = yield analytics.getAnalyticsCookies();
41
- const cas = getClientArgsWithDefaults(clientArgs);
42
- const credentialArgs = cas.credentials || (0, read_environment_credentials_1.envCredentials)();
43
- const proxyAgentArgs = cas.proxyAgents || (yield (0, proxy_builder_1.buildProxyAgentArgsFromEnvironment)());
44
- const httpClient = new http_client_got_1.HttpClientGot(credentialArgs === null || credentialArgs === void 0 ? void 0 : credentialArgs.token, analyticsHeaders, analyticsCookies, proxyAgentArgs);
45
- return new UiControlClient(httpClient, cas, credentialArgs === null || credentialArgs === void 0 ? void 0 : credentialArgs.workspaceId);
30
+ const builder = ui_control_client_dependency_builder_1.UiControlClientDependencyBuilder;
31
+ const clientArgsWithDefaults = yield builder.getClientArgsWithDefaults(clientArgs);
32
+ const { executionRuntime, stepReporter } = yield builder.build(clientArgsWithDefaults);
33
+ return new UiControlClient({
34
+ annotationLevel: clientArgsWithDefaults.annotationLevel,
35
+ }, executionRuntime, stepReporter);
46
36
  });
47
37
  }
48
- get uiControllerClient() {
49
- if (!this._uiControllerClient) {
50
- this._uiControllerClient = new ui_controller_client_1.UiControllerClient(this.clientArgs.uiControllerUrl);
51
- }
52
- return this._uiControllerClient;
38
+ /**
39
+ * Connects to the askui UI Controller.
40
+ */
41
+ connect() {
42
+ return __awaiter(this, void 0, void 0, function* () {
43
+ return this.executionRuntime.connect();
44
+ });
45
+ }
46
+ /**
47
+ * Disconnects from the askui UI Controller.
48
+ */
49
+ disconnect() {
50
+ this.executionRuntime.disconnect();
53
51
  }
54
- get inferenceClient() {
55
- return new inference_client_1.InferenceClient(this.clientArgs.inferenceServerUrl, this.httpClient, this.clientArgs.resize, this.workspaceId, this.clientArgs.modelComposition);
52
+ /**
53
+ * Disconnects from the askui UI Controller.
54
+ *
55
+ * @deprecated Use {@link disconnect} instead.
56
+ */
57
+ close() {
58
+ this.disconnect();
56
59
  }
57
- get executionRuntime() {
58
- return new execution_runtime_1.ExecutionRuntime(this.uiControllerClient, this.inferenceClient);
60
+ startVideoRecording() {
61
+ return __awaiter(this, void 0, void 0, function* () {
62
+ yield this.executionRuntime.startVideoRecording();
63
+ });
59
64
  }
60
- annotateByDefault(testStepState, customElements = []) {
65
+ stopVideoRecording() {
61
66
  return __awaiter(this, void 0, void 0, function* () {
62
- if ((testStepState === test_case_result_dto_1.TestStepState.FAILED
63
- && this.clientArgs.annotationLevel === annotation_level_1.AnnotationLevel.DISABLED)
64
- || (testStepState === test_case_result_dto_1.TestStepState.PASSED
65
- && this.clientArgs.annotationLevel !== annotation_level_1.AnnotationLevel.ALL)) {
66
- return;
67
- }
68
- yield this.annotate({
69
- customElements,
70
- fileNamePrefix: `${testStepState.toLowerCase()}_testStep_annotation`,
71
- });
67
+ yield this.executionRuntime.stopVideoRecording();
72
68
  });
73
69
  }
74
- connect() {
70
+ readVideoRecording() {
75
71
  return __awaiter(this, void 0, void 0, function* () {
76
- const connectionState = yield this.uiControllerClient.connect();
77
- return connectionState;
72
+ return this.executionRuntime.readVideoRecording();
73
+ });
74
+ }
75
+ shouldWriteAnntotationAfterCommandExecution(error) {
76
+ const { annotationLevel } = this.config;
77
+ return annotationLevel === annotation_level_1.AnnotationLevel.ALL
78
+ || (annotationLevel === annotation_level_1.AnnotationLevel.ON_FAILURE && error !== undefined);
79
+ }
80
+ shouldAnnotateAfterCommandExecution(error) {
81
+ return this.shouldWriteAnntotationAfterCommandExecution(error)
82
+ || (this.stepReporter.config.withDetectedElements === 'onFailure' && error !== undefined)
83
+ || (this.stepReporter.config.withDetectedElements === 'always');
84
+ }
85
+ afterCommandExecution(instruction, error) {
86
+ var _a;
87
+ return __awaiter(this, void 0, void 0, function* () {
88
+ const createdAt = new Date();
89
+ let annotation;
90
+ let screenshot;
91
+ if (this.shouldAnnotateAfterCommandExecution(error)) {
92
+ annotation = yield this.executionRuntime.annotateImage(undefined, instruction.customElements);
93
+ }
94
+ if (annotation !== undefined && this.shouldWriteAnntotationAfterCommandExecution(error)) {
95
+ annotation_writer_1.AnnotationWriter.write(annotation.toHtml(), undefined, `${error !== undefined ? 'failed' : 'passed'}_testStep_annotation`);
96
+ }
97
+ if (annotation !== undefined || this.stepReporter.config.withScreenshots === 'always') {
98
+ screenshot = (_a = annotation === null || annotation === void 0 ? void 0 : annotation.image) !== null && _a !== void 0 ? _a : yield this.executionRuntime.getScreenshot();
99
+ }
100
+ yield this.stepReporter.onStepEnd({
101
+ createdAt,
102
+ detectedElements: annotation === null || annotation === void 0 ? void 0 : annotation.detected_elements,
103
+ screenshot,
104
+ }, error);
78
105
  });
79
106
  }
80
107
  annotate(annotationRequest = {}) {
@@ -98,36 +125,45 @@ class UiControlClient extends dsl_1.ApiCommands {
98
125
  escapeSeparatorString(instruction) {
99
126
  return instruction.split(dsl_1.Separators.STRING).join('"');
100
127
  }
101
- fluentCommandExecutor(instruction, customElementJson = []) {
128
+ buildInstruction(instructionString, customElementJson = []) {
102
129
  return __awaiter(this, void 0, void 0, function* () {
103
- const { secretText } = this;
104
- const customElements = yield test_case_dto_1.CustomElement.fromJsonListWithImagePathOrImage(customElementJson);
105
- const stringWithoutSeparators = this.escapeSeparatorString(instruction);
106
- logger_1.logger.debug(stringWithoutSeparators);
130
+ return {
131
+ customElements: yield custom_element_1.CustomElement.fromJsonListWithImagePathOrImage(customElementJson),
132
+ value: instructionString,
133
+ secretText: this.getAndResetSecretText(),
134
+ valueHumanReadable: this.escapeSeparatorString(instructionString),
135
+ };
136
+ });
137
+ }
138
+ fluentCommandExecutor(instructionString, customElementJson = []) {
139
+ return __awaiter(this, void 0, void 0, function* () {
140
+ const instruction = yield this.buildInstruction(instructionString, customElementJson);
141
+ logger_1.logger.debug(instruction);
107
142
  try {
108
- yield this.executionRuntime.executeTestStep({
109
- instruction,
110
- customElements,
111
- secretText,
112
- });
113
- this.secretText = undefined;
114
- yield this.annotateByDefault(test_case_result_dto_1.TestStepState.PASSED, customElements);
143
+ yield this.stepReporter.resetStep(instruction);
144
+ yield this.executionRuntime.executeInstruction(instruction);
145
+ yield this.afterCommandExecution(instruction);
115
146
  return yield Promise.resolve();
116
147
  }
117
148
  catch (error) {
118
- yield this.annotateByDefault(test_case_result_dto_1.TestStepState.FAILED, customElements);
119
- return Promise.reject(new ui_control_client_error_1.UiControlClientError(`A problem occurred while executing the instruction: ${stringWithoutSeparators}. Reason ${error}`));
149
+ yield this.afterCommandExecution(instruction, error instanceof Error ? error : new Error(String(error)));
150
+ return Promise.reject(new ui_control_client_error_1.UiControlClientError(`A problem occurred while executing the instruction: ${instruction.valueHumanReadable}. Reason ${error}`));
120
151
  }
121
152
  });
122
153
  }
123
154
  getterExecutor(instruction, customElementJson = []) {
124
155
  return __awaiter(this, void 0, void 0, function* () {
125
- const customElements = yield test_case_dto_1.CustomElement.fromJsonListWithImagePathOrImage(customElementJson);
156
+ const customElements = yield custom_element_1.CustomElement.fromJsonListWithImagePathOrImage(customElementJson);
126
157
  const stringWithoutSeparators = this.escapeSeparatorString(instruction);
127
158
  logger_1.logger.debug(stringWithoutSeparators);
128
159
  return this.executionRuntime.getDetectedElements(instruction, customElements);
129
160
  });
130
161
  }
162
+ getAndResetSecretText() {
163
+ const { secretText } = this;
164
+ this.secretText = undefined;
165
+ return secretText;
166
+ }
131
167
  /**
132
168
  * Types a text inside the filtered element.
133
169
  *
@@ -195,11 +231,5 @@ class UiControlClient extends dsl_1.ApiCommands {
195
231
  },
196
232
  };
197
233
  }
198
- /**
199
- * Closes the connection to the askui UI Controller
200
- */
201
- close() {
202
- this.uiControllerClient.close();
203
- }
204
234
  }
205
235
  exports.UiControlClient = UiControlClient;
@@ -2,6 +2,7 @@ import { AnnotationLevel } from './annotation-level';
2
2
  import { CredentialArgs } from './credentials-args';
3
3
  import { ProxyAgentArgs } from '../shared/proxy-agent-args';
4
4
  import { ModelCompositionBranch } from './model-composition-branch';
5
+ import { Reporter, ReporterConfig } from '@/core/reporting';
5
6
  /**
6
7
  * Configuration options for the askui UI Control Client
7
8
  *
@@ -25,18 +26,26 @@ import { ModelCompositionBranch } from './model-composition-branch';
25
26
  * the authentication of the askui Inference Server.
26
27
  * You have three options: `DISABLED`, `ON_FAILURE`, `ALL`.
27
28
  * @param {ProxyAgentArgs} proxyAgents - To configure the proxy agents for http(s) requests.
29
+ * @param {Reporter} reporter - To configure the reporter to report on step runs.
28
30
  */
29
31
  export interface ClientArgs {
30
32
  readonly uiControllerUrl?: string;
31
33
  readonly inferenceServerUrl?: string;
32
34
  readonly annotationLevel?: AnnotationLevel;
33
- readonly credentials?: CredentialArgs;
34
- readonly proxyAgents?: ProxyAgentArgs;
35
+ readonly credentials?: CredentialArgs | undefined;
36
+ readonly proxyAgents?: ProxyAgentArgs | undefined;
35
37
  readonly resize?: number;
36
38
  readonly modelComposition?: ModelCompositionBranch[];
39
+ readonly reporter?: Reporter | undefined;
37
40
  }
38
41
  export interface ClientArgsWithDefaults extends ClientArgs {
39
42
  readonly uiControllerUrl: string;
40
43
  readonly inferenceServerUrl: string;
41
44
  readonly annotationLevel: AnnotationLevel;
45
+ readonly reporter: Required<Reporter> & {
46
+ config: Required<ReporterConfig>;
47
+ };
48
+ }
49
+ export interface UiControlClientConfig {
50
+ annotationLevel: AnnotationLevel;
42
51
  }
@@ -17,14 +17,14 @@ export declare class UiControllerClient {
17
17
  private clearResponse;
18
18
  private onMessage;
19
19
  connect(): Promise<UiControllerClientConnectionState>;
20
- close(): void;
20
+ disconnect(): void;
21
21
  private sendAndReceive;
22
22
  private send;
23
23
  requestScreenshot(): Promise<CaptureScreenshotResponse>;
24
24
  getServerPid(): Promise<GetProcessPidResponse>;
25
- startRecording(): Promise<StartRecordingResponse>;
26
- stopRecording(): Promise<StopRecordingResponse>;
27
- readRecording(): Promise<ReadRecordingPartResponse>;
25
+ startVideoRecording(): Promise<StartRecordingResponse>;
26
+ stopVideoRecording(): Promise<StopRecordingResponse>;
27
+ readVideoRecording(): Promise<ReadRecordingPartResponse>;
28
28
  annotateInteractively(boundingBoxes: DetectedElement[], imageString: string): Promise<InteractiveAnnotationResponse>;
29
29
  requestControl(controlCommand: ControlCommand): Promise<ControlResponse>;
30
30
  }
@@ -57,7 +57,7 @@ class UiControllerClient {
57
57
  }
58
58
  });
59
59
  }
60
- close() {
60
+ disconnect() {
61
61
  var _a;
62
62
  (_a = this.ws) === null || _a === void 0 ? void 0 : _a.close();
63
63
  }
@@ -88,17 +88,17 @@ class UiControllerClient {
88
88
  getServerPid() {
89
89
  return this.sendAndReceive(new runner_protocol_1.GetProcessPidRequest());
90
90
  }
91
- startRecording() {
91
+ startVideoRecording() {
92
92
  return this.sendAndReceive(new runner_protocol_1.StartRecordingRequest());
93
93
  }
94
- stopRecording() {
94
+ stopVideoRecording() {
95
95
  return this.sendAndReceive(new runner_protocol_1.StopRecordingRequest());
96
96
  }
97
- readRecording() {
97
+ readVideoRecording() {
98
98
  return new Promise((resolve, reject) => {
99
99
  const readRecordingStreamHandler = new read_recording_response_stream_handler_1.ReadRecordingResponseStreamHandler(resolve, reject);
100
- this.currentResolve = readRecordingStreamHandler.onMessage;
101
- this.currentReject = readRecordingStreamHandler.onError;
100
+ this.currentResolve = readRecordingStreamHandler.onMessage.bind(readRecordingStreamHandler);
101
+ this.currentReject = readRecordingStreamHandler.onError.bind(readRecordingStreamHandler);
102
102
  this.send(new runner_protocol_1.ReadRecordingRequest(), 60 * 15 * 1000);
103
103
  });
104
104
  }
@@ -36,7 +36,7 @@ class UiControllerFacade {
36
36
  const argsWithDefaults = (0, ui_controller_args_1.createArgsWithDefaults)(args);
37
37
  const argsWithLogPath = this.serverLogFilePath(argsWithDefaults);
38
38
  this.binaryFilePath = (0, download_binaries_1.getBinaryFilePath)(argsWithLogPath.binaryVersion);
39
- yield this.getBinary(argsWithLogPath.binaryVersion, argsWithLogPath.overWriteBinary, argsWithLogPath.proxyAgents || (yield (0, proxy_builder_1.buildProxyAgentArgsFromEnvironment)()));
39
+ yield this.getBinary(argsWithLogPath.binaryVersion, argsWithLogPath.overWriteBinary, argsWithLogPath.proxyAgents || (yield (0, proxy_builder_1.envProxyAgents)()));
40
40
  this.makeBinaryExecutable();
41
41
  logger_1.logger.debug(`UI Controller log path "${this.serverLogFile}"`);
42
42
  yield this.startWithDefaults(argsWithLogPath, maxWaitingForStartingInSeconds);
@@ -1,3 +1,4 @@
1
1
  export { UiController } from './lib';
2
- export { UiControlClient, AnnotationLevel } from './execution';
2
+ export { AnnotationLevel, UiControlClient } from './execution';
3
+ export { Instruction, Reporter, ReporterConfig, Snapshot, SnapshotDetailLevel, Step, StepStatus, StepStatusEnd, } from './core/reporting';
3
4
  export { LogLevels } from './shared';
package/dist/cjs/main.js CHANGED
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LogLevels = exports.AnnotationLevel = exports.UiControlClient = exports.UiController = void 0;
3
+ exports.LogLevels = exports.UiControlClient = exports.AnnotationLevel = exports.UiController = void 0;
4
4
  var lib_1 = require("./lib");
5
5
  Object.defineProperty(exports, "UiController", { enumerable: true, get: function () { return lib_1.UiController; } });
6
6
  var execution_1 = require("./execution");
7
- Object.defineProperty(exports, "UiControlClient", { enumerable: true, get: function () { return execution_1.UiControlClient; } });
8
7
  Object.defineProperty(exports, "AnnotationLevel", { enumerable: true, get: function () { return execution_1.AnnotationLevel; } });
8
+ Object.defineProperty(exports, "UiControlClient", { enumerable: true, get: function () { return execution_1.UiControlClient; } });
9
9
  var shared_1 = require("./shared");
10
10
  Object.defineProperty(exports, "LogLevels", { enumerable: true, get: function () { return shared_1.LogLevels; } });
@@ -1,4 +1,4 @@
1
1
  import { ProxyAgentArgs } from '../../shared/proxy-agent-args';
2
2
  export declare class ProxyImportError extends Error {
3
3
  }
4
- export declare function buildProxyAgentArgsFromEnvironment(): Promise<ProxyAgentArgs | undefined>;
4
+ export declare function envProxyAgents(): Promise<ProxyAgentArgs | undefined>;
@@ -28,7 +28,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
28
28
  });
29
29
  };
30
30
  Object.defineProperty(exports, "__esModule", { value: true });
31
- exports.buildProxyAgentArgsFromEnvironment = exports.ProxyImportError = void 0;
31
+ exports.envProxyAgents = exports.ProxyImportError = void 0;
32
32
  const logger_1 = require("../../lib/logger");
33
33
  class ProxyImportError extends Error {
34
34
  }
@@ -44,7 +44,7 @@ function dynmicImportHpagent() {
44
44
  }
45
45
  });
46
46
  }
47
- function buildProxyAgentArgsFromEnvironment() {
47
+ function envProxyAgents() {
48
48
  return __awaiter(this, void 0, void 0, function* () {
49
49
  const httpProxyUrl = process.env['HTTP_PROXY'];
50
50
  const httpsProxyUrl = process.env['HTTPS_PROXY'];
@@ -64,4 +64,4 @@ function buildProxyAgentArgsFromEnvironment() {
64
64
  };
65
65
  });
66
66
  }
67
- exports.buildProxyAgentArgsFromEnvironment = buildProxyAgentArgsFromEnvironment;
67
+ exports.envProxyAgents = envProxyAgents;