askui 0.1.6 → 0.2.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 (223) hide show
  1. package/README.md +6 -0
  2. package/bin/askui-postinstall +35 -0
  3. package/dist/cjs/core/model/test-case-dto/custom-element.d.ts +2 -2
  4. package/dist/cjs/core/model/test-case-dto/custom-element.js +2 -2
  5. package/dist/cjs/core/model/test-case-dto/custom-element.spec.js +7 -6
  6. package/dist/cjs/core/model/test-case-dto/index.js +1 -3
  7. package/dist/cjs/core/model/test-case-dto/test-step.d.ts +3 -7
  8. package/dist/cjs/core/model/test-case-dto/test-step.js +0 -12
  9. package/dist/cjs/core/ui-control-commands/control-command.d.ts +1 -0
  10. package/dist/cjs/core/ui-control-commands/control-command.js +5 -0
  11. package/dist/cjs/core/ui-control-commands/input-event.d.ts +1 -2
  12. package/dist/cjs/core/ui-control-commands/input-event.js +0 -1
  13. package/dist/cjs/execution/dsl.d.ts +6 -17
  14. package/dist/cjs/execution/dsl.js +4 -21
  15. package/dist/cjs/execution/execution-runtime.d.ts +7 -5
  16. package/dist/cjs/execution/execution-runtime.js +35 -23
  17. package/dist/cjs/execution/index.d.ts +2 -1
  18. package/dist/cjs/execution/index.js +5 -3
  19. package/dist/cjs/execution/{control-your-ui-api.d.ts → inference-client.d.ts} +4 -4
  20. package/dist/cjs/execution/{control-your-ui-api.js → inference-client.js} +9 -9
  21. package/dist/cjs/execution/ui-control-client-error.d.ts +2 -0
  22. package/dist/cjs/execution/ui-control-client-error.js +6 -0
  23. package/dist/cjs/execution/ui-control-client.d.ts +79 -0
  24. package/dist/cjs/execution/ui-control-client.js +185 -0
  25. package/dist/cjs/execution/{client-connection-state.d.ts → ui-controller-client-connection-state.d.ts} +1 -1
  26. package/dist/cjs/execution/ui-controller-client-connection-state.js +10 -0
  27. package/dist/cjs/execution/ui-controller-client-interface.d.ts +27 -0
  28. package/dist/cjs/execution/{client-interface.js → ui-controller-client-interface.js} +0 -0
  29. package/dist/cjs/execution/{control-your-ui-client.d.ts → ui-controller-client.d.ts} +6 -6
  30. package/dist/cjs/execution/{control-your-ui-client.js → ui-controller-client.js} +28 -28
  31. package/dist/cjs/lib/copy-example-project.js +2 -1
  32. package/dist/cjs/lib/download-binaries.js +10 -9
  33. package/dist/cjs/lib/index.d.ts +1 -1
  34. package/dist/cjs/lib/index.js +3 -3
  35. package/dist/cjs/lib/libfuse-error.d.ts +2 -0
  36. package/dist/cjs/lib/libfuse-error.js +6 -0
  37. package/dist/cjs/lib/logger.js +1 -1
  38. package/dist/cjs/lib/timeout-error.d.ts +0 -2
  39. package/dist/cjs/lib/timeout-error.js +0 -5
  40. package/dist/cjs/lib/ui-controller-args.d.ts +47 -0
  41. package/dist/cjs/lib/{control-ui-server-args.js → ui-controller-args.js} +0 -0
  42. package/dist/cjs/lib/{control-ui-server-args.spec.d.ts → ui-controller-args.spec.d.ts} +0 -0
  43. package/dist/cjs/lib/{control-ui-server-args.spec.js → ui-controller-args.spec.js} +7 -7
  44. package/dist/cjs/lib/ui-controller-darwin.d.ts +6 -0
  45. package/dist/cjs/lib/{control-ui-server-darwin.js → ui-controller-darwin.js} +8 -8
  46. package/dist/cjs/lib/ui-controller-facade.d.ts +17 -0
  47. package/dist/cjs/lib/{control-ui-server-facade.js → ui-controller-facade.js} +22 -16
  48. package/dist/cjs/lib/ui-controller-linux.d.ts +5 -0
  49. package/dist/cjs/lib/ui-controller-linux.js +52 -0
  50. package/dist/cjs/lib/ui-controller-win32.d.ts +3 -0
  51. package/dist/cjs/lib/ui-controller-win32.js +7 -0
  52. package/dist/cjs/lib/ui-controller.d.ts +8 -0
  53. package/dist/cjs/lib/{askui-control-server.js → ui-controller.js} +9 -9
  54. package/dist/cjs/lib/unkown-error.d.ts +0 -2
  55. package/dist/cjs/lib/unkown-error.js +0 -5
  56. package/dist/cjs/lib/wayland-error.d.ts +2 -0
  57. package/dist/cjs/lib/wayland-error.js +6 -0
  58. package/dist/cjs/main.d.ts +3 -2
  59. package/dist/cjs/main.js +6 -3
  60. package/dist/cjs/shared/index.d.ts +1 -0
  61. package/dist/cjs/shared/index.js +5 -0
  62. package/dist/cjs/utils/analytics/analytics-interface.d.ts +3 -0
  63. package/dist/cjs/utils/analytics/analytics-interface.js +2 -0
  64. package/dist/cjs/utils/analytics/analytics.d.ts +5 -0
  65. package/dist/cjs/utils/analytics/analytics.js +38 -0
  66. package/dist/cjs/utils/analytics/index.d.ts +1 -0
  67. package/dist/cjs/utils/analytics/index.js +5 -0
  68. package/dist/cjs/utils/analytics/installation-timestamp-create-error.d.ts +4 -0
  69. package/dist/cjs/utils/analytics/installation-timestamp-create-error.js +9 -0
  70. package/dist/cjs/utils/analytics/installation-timestamp-get-error.d.ts +4 -0
  71. package/dist/cjs/utils/analytics/installation-timestamp-get-error.js +9 -0
  72. package/dist/cjs/utils/analytics/installation-timestamp.d.ts +7 -0
  73. package/dist/cjs/utils/analytics/installation-timestamp.js +68 -0
  74. package/dist/cjs/utils/analytics/user-identifier-interface.d.ts +3 -0
  75. package/dist/cjs/utils/analytics/user-identifier-interface.js +2 -0
  76. package/dist/cjs/utils/analytics/user-identifier.d.ts +4 -0
  77. package/dist/cjs/utils/analytics/user-identifier.js +22 -0
  78. package/dist/cjs/utils/base_64_image/base-64-image-error.d.ts +2 -0
  79. package/dist/cjs/utils/base_64_image/base-64-image-error.js +6 -0
  80. package/dist/cjs/utils/base_64_image/base-64-image-string-error.d.ts +4 -0
  81. package/dist/cjs/utils/base_64_image/base-64-image-string-error.js +11 -0
  82. package/dist/cjs/utils/base_64_image/base-64-image.d.ts +18 -0
  83. package/dist/cjs/utils/base_64_image/base-64-image.js +86 -0
  84. package/dist/cjs/utils/http/custom-errors/http-client-error.d.ts +0 -2
  85. package/dist/cjs/utils/http/custom-errors/http-client-error.js +0 -5
  86. package/dist/cjs/utils/http/http-client-got.d.ts +6 -5
  87. package/dist/cjs/utils/http/http-client-got.js +11 -11
  88. package/dist/cjs/utils/image-resize-errors/image-resizing-base-error.d.ts +0 -2
  89. package/dist/cjs/utils/image-resize-errors/image-resizing-base-error.js +0 -5
  90. package/dist/cjs/utils/image-resize-errors/index.d.ts +0 -1
  91. package/dist/cjs/utils/image-resize-errors/index.js +1 -3
  92. package/dist/cjs/utils/path.d.ts +1 -0
  93. package/dist/cjs/utils/path.js +11 -0
  94. package/dist/cjs/utils/transformations.d.ts +0 -2
  95. package/dist/cjs/utils/transformations.js +11 -44
  96. package/dist/esm/core/model/test-case-dto/custom-element.d.ts +2 -2
  97. package/dist/esm/core/model/test-case-dto/custom-element.js +2 -2
  98. package/dist/esm/core/model/test-case-dto/custom-element.spec.js +7 -6
  99. package/dist/esm/core/model/test-case-dto/index.js +0 -1
  100. package/dist/esm/core/model/test-case-dto/test-step.d.ts +3 -7
  101. package/dist/esm/core/model/test-case-dto/test-step.js +1 -10
  102. package/dist/esm/core/ui-control-commands/control-command.d.ts +1 -0
  103. package/dist/esm/core/ui-control-commands/control-command.js +5 -0
  104. package/dist/esm/core/ui-control-commands/input-event.d.ts +1 -2
  105. package/dist/esm/core/ui-control-commands/input-event.js +0 -1
  106. package/dist/esm/execution/dsl.d.ts +6 -17
  107. package/dist/esm/execution/dsl.js +3 -21
  108. package/dist/esm/execution/execution-runtime.d.ts +7 -5
  109. package/dist/esm/execution/execution-runtime.js +35 -23
  110. package/dist/esm/execution/index.d.ts +2 -1
  111. package/dist/esm/execution/index.js +2 -1
  112. package/dist/esm/execution/{control-your-ui-api.d.ts → inference-client.d.ts} +4 -4
  113. package/dist/esm/execution/{control-your-ui-api.js → inference-client.js} +7 -7
  114. package/dist/esm/execution/ui-control-client-error.d.ts +2 -0
  115. package/dist/esm/execution/ui-control-client-error.js +2 -0
  116. package/dist/esm/execution/ui-control-client.d.ts +79 -0
  117. package/dist/esm/execution/ui-control-client.js +181 -0
  118. package/dist/esm/execution/{client-connection-state.d.ts → ui-controller-client-connection-state.d.ts} +1 -1
  119. package/dist/esm/execution/ui-controller-client-connection-state.js +7 -0
  120. package/dist/esm/execution/ui-controller-client-interface.d.ts +27 -0
  121. package/dist/esm/execution/{client-interface.js → ui-controller-client-interface.js} +0 -0
  122. package/dist/esm/execution/{control-your-ui-client.d.ts → ui-controller-client.d.ts} +6 -6
  123. package/dist/esm/execution/{control-your-ui-client.js → ui-controller-client.js} +26 -26
  124. package/dist/esm/lib/copy-example-project.js +2 -1
  125. package/dist/esm/lib/download-binaries.js +10 -9
  126. package/dist/esm/lib/index.d.ts +1 -1
  127. package/dist/esm/lib/index.js +1 -1
  128. package/dist/esm/lib/libfuse-error.d.ts +2 -0
  129. package/dist/esm/lib/libfuse-error.js +2 -0
  130. package/dist/esm/lib/logger.js +1 -1
  131. package/dist/esm/lib/timeout-error.d.ts +0 -2
  132. package/dist/esm/lib/timeout-error.js +0 -5
  133. package/dist/esm/lib/ui-controller-args.d.ts +47 -0
  134. package/dist/esm/lib/{control-ui-server-args.js → ui-controller-args.js} +0 -0
  135. package/dist/esm/lib/{control-ui-server-args.spec.d.ts → ui-controller-args.spec.d.ts} +0 -0
  136. package/dist/esm/lib/{control-ui-server-args.spec.js → ui-controller-args.spec.js} +1 -1
  137. package/dist/esm/lib/ui-controller-darwin.d.ts +6 -0
  138. package/dist/esm/lib/{control-ui-server-darwin.js → ui-controller-darwin.js} +6 -6
  139. package/dist/esm/lib/ui-controller-facade.d.ts +17 -0
  140. package/dist/esm/lib/{control-ui-server-facade.js → ui-controller-facade.js} +17 -11
  141. package/dist/esm/lib/ui-controller-linux.d.ts +5 -0
  142. package/dist/esm/lib/ui-controller-linux.js +48 -0
  143. package/dist/esm/lib/ui-controller-win32.d.ts +3 -0
  144. package/dist/esm/lib/ui-controller-win32.js +3 -0
  145. package/dist/esm/lib/ui-controller.d.ts +8 -0
  146. package/dist/esm/lib/{askui-control-server.js → ui-controller.js} +7 -7
  147. package/dist/esm/lib/unkown-error.d.ts +0 -2
  148. package/dist/esm/lib/unkown-error.js +0 -5
  149. package/dist/esm/lib/wayland-error.d.ts +2 -0
  150. package/dist/esm/lib/wayland-error.js +2 -0
  151. package/dist/esm/main.d.ts +3 -2
  152. package/dist/esm/main.js +3 -2
  153. package/dist/esm/shared/index.d.ts +1 -0
  154. package/dist/esm/shared/index.js +1 -0
  155. package/dist/esm/utils/analytics/analytics-interface.d.ts +3 -0
  156. package/dist/esm/utils/analytics/analytics-interface.js +1 -0
  157. package/dist/esm/utils/analytics/analytics.d.ts +5 -0
  158. package/dist/esm/utils/analytics/analytics.js +31 -0
  159. package/dist/esm/utils/analytics/index.d.ts +1 -0
  160. package/dist/esm/utils/analytics/index.js +1 -0
  161. package/dist/esm/utils/analytics/installation-timestamp-create-error.d.ts +4 -0
  162. package/dist/esm/utils/analytics/installation-timestamp-create-error.js +5 -0
  163. package/dist/esm/utils/analytics/installation-timestamp-get-error.d.ts +4 -0
  164. package/dist/esm/utils/analytics/installation-timestamp-get-error.js +5 -0
  165. package/dist/esm/utils/analytics/installation-timestamp.d.ts +7 -0
  166. package/dist/esm/utils/analytics/installation-timestamp.js +61 -0
  167. package/dist/esm/utils/analytics/user-identifier-interface.d.ts +3 -0
  168. package/dist/esm/utils/analytics/user-identifier-interface.js +1 -0
  169. package/dist/esm/utils/analytics/user-identifier.d.ts +4 -0
  170. package/dist/esm/utils/analytics/user-identifier.js +18 -0
  171. package/dist/esm/utils/base_64_image/base-64-image-error.d.ts +2 -0
  172. package/dist/esm/utils/base_64_image/base-64-image-error.js +2 -0
  173. package/dist/esm/utils/base_64_image/base-64-image-string-error.d.ts +4 -0
  174. package/dist/esm/utils/base_64_image/base-64-image-string-error.js +7 -0
  175. package/dist/esm/utils/base_64_image/base-64-image.d.ts +18 -0
  176. package/dist/esm/utils/base_64_image/base-64-image.js +79 -0
  177. package/dist/esm/utils/http/custom-errors/http-client-error.d.ts +0 -2
  178. package/dist/esm/utils/http/custom-errors/http-client-error.js +0 -5
  179. package/dist/esm/utils/http/http-client-got.d.ts +6 -5
  180. package/dist/esm/utils/http/http-client-got.js +11 -11
  181. package/dist/esm/utils/image-resize-errors/image-resizing-base-error.d.ts +0 -2
  182. package/dist/esm/utils/image-resize-errors/image-resizing-base-error.js +0 -5
  183. package/dist/esm/utils/image-resize-errors/index.d.ts +0 -1
  184. package/dist/esm/utils/image-resize-errors/index.js +0 -1
  185. package/dist/esm/utils/path.d.ts +1 -0
  186. package/dist/esm/utils/path.js +4 -0
  187. package/dist/esm/utils/transformations.d.ts +0 -2
  188. package/dist/esm/utils/transformations.js +11 -39
  189. package/dist/example_projects_templates/typescript_jest/test/helper/jest.setup.ts +7 -7
  190. package/dist/example_projects_templates/typescript_jest/test/jest.config.ts +3 -0
  191. package/package.json +15 -8
  192. package/dist/cjs/execution/client-connection-state.js +0 -10
  193. package/dist/cjs/execution/client-error.d.ts +0 -2
  194. package/dist/cjs/execution/client-error.js +0 -6
  195. package/dist/cjs/execution/client-interface.d.ts +0 -13
  196. package/dist/cjs/execution/client.d.ts +0 -25
  197. package/dist/cjs/execution/client.js +0 -116
  198. package/dist/cjs/lib/askui-control-server.d.ts +0 -8
  199. package/dist/cjs/lib/control-ui-server-args.d.ts +0 -21
  200. package/dist/cjs/lib/control-ui-server-darwin.d.ts +0 -6
  201. package/dist/cjs/lib/control-ui-server-facade.d.ts +0 -16
  202. package/dist/cjs/lib/control-ui-server-linux.d.ts +0 -4
  203. package/dist/cjs/lib/control-ui-server-linux.js +0 -13
  204. package/dist/cjs/lib/control-ui-server-win32.d.ts +0 -3
  205. package/dist/cjs/lib/control-ui-server-win32.js +0 -7
  206. package/dist/cjs/utils/image-resize-errors/invalid-base64-image-error.d.ts +0 -3
  207. package/dist/cjs/utils/image-resize-errors/invalid-base64-image-error.js +0 -7
  208. package/dist/esm/execution/client-connection-state.js +0 -7
  209. package/dist/esm/execution/client-error.d.ts +0 -2
  210. package/dist/esm/execution/client-error.js +0 -2
  211. package/dist/esm/execution/client-interface.d.ts +0 -13
  212. package/dist/esm/execution/client.d.ts +0 -25
  213. package/dist/esm/execution/client.js +0 -112
  214. package/dist/esm/lib/askui-control-server.d.ts +0 -8
  215. package/dist/esm/lib/control-ui-server-args.d.ts +0 -21
  216. package/dist/esm/lib/control-ui-server-darwin.d.ts +0 -6
  217. package/dist/esm/lib/control-ui-server-facade.d.ts +0 -16
  218. package/dist/esm/lib/control-ui-server-linux.d.ts +0 -4
  219. package/dist/esm/lib/control-ui-server-linux.js +0 -9
  220. package/dist/esm/lib/control-ui-server-win32.d.ts +0 -3
  221. package/dist/esm/lib/control-ui-server-win32.js +0 -3
  222. package/dist/esm/utils/image-resize-errors/invalid-base64-image-error.d.ts +0 -3
  223. package/dist/esm/utils/image-resize-errors/invalid-base64-image-error.js +0 -3
@@ -1,19 +1,19 @@
1
1
  import WebSocket from 'ws';
2
2
  import { CaptureScreenshotRequest, ControlRequest, StartRecordingRequest, StopRecordingRequest, ReadRecordingRequest, InteractiveAnnotationRequest, GetProcessPidRequest, } from '../core/runner-protocol';
3
3
  import { logger } from '../lib/logger';
4
- import { ClientConnectionState } from './client-connection-state';
4
+ import { UiControllerClientConnectionState } from './ui-controller-client-connection-state';
5
5
  import { ReadRecordingResponseStreamHandler } from './read-recording-response-stream-handler';
6
- import { ControlUiClientError } from './client-error';
7
- export class ControlYourUiClient {
8
- constructor(controlServerUrl) {
9
- this.controlServerUrl = controlServerUrl;
10
- this.connectionState = ClientConnectionState.NOT_CONNECTED;
11
- this.currentReject = ControlYourUiClient.EMPTY_REJECT;
12
- this.currentResolve = ControlYourUiClient.EMPTY_RESOLVE;
6
+ import { UiControlClientError } from './ui-control-client-error';
7
+ export class UiControllerClient {
8
+ constructor(url) {
9
+ this.url = url;
10
+ this.connectionState = UiControllerClientConnectionState.NOT_CONNECTED;
11
+ this.currentReject = UiControllerClient.EMPTY_REJECT;
12
+ this.currentResolve = UiControllerClient.EMPTY_RESOLVE;
13
13
  }
14
14
  clearResponse() {
15
- this.currentReject = ControlYourUiClient.EMPTY_REJECT;
16
- this.currentResolve = ControlYourUiClient.EMPTY_RESOLVE;
15
+ this.currentReject = UiControllerClient.EMPTY_REJECT;
16
+ this.currentResolve = UiControllerClient.EMPTY_RESOLVE;
17
17
  }
18
18
  onMessage(data) {
19
19
  clearTimeout(this.timeout);
@@ -30,24 +30,24 @@ export class ControlYourUiClient {
30
30
  this.clearResponse();
31
31
  }
32
32
  connect() {
33
- this.connectionState = ClientConnectionState.CONNECTING;
33
+ this.connectionState = UiControllerClientConnectionState.CONNECTING;
34
34
  return new Promise((resolve, reject) => {
35
35
  try {
36
- this.ws = new WebSocket(this.controlServerUrl);
36
+ this.ws = new WebSocket(this.url);
37
37
  this.ws.on('message', (data) => { this.onMessage(data); });
38
38
  this.ws.on('open', () => {
39
- this.connectionState = ClientConnectionState.CONNECTED;
39
+ this.connectionState = UiControllerClientConnectionState.CONNECTED;
40
40
  resolve(this.connectionState);
41
41
  });
42
42
  this.ws.on('error', (error) => {
43
- this.connectionState = ClientConnectionState.ERROR;
44
- reject(new ControlUiClientError(`Connection to Control UI Server cannot be established,
45
- Probably it was not started. Makse sure you started the server with this
46
- Url ${this.controlServerUrl}. Error message ${error.message}`));
43
+ this.connectionState = UiControllerClientConnectionState.ERROR;
44
+ reject(new UiControlClientError(`Connection to UI Controller cannot be established,
45
+ Probably it was not started. Makse sure you started UI Controller with this
46
+ Url ${this.url}. Error message ${error.message}`));
47
47
  });
48
48
  }
49
49
  catch (error) {
50
- reject(new ControlUiClientError(`Connection to Control UI Server cannot be established. Reason: ${error}`));
50
+ reject(new UiControlClientError(`Connection to UI Controller cannot be established. Reason: ${error}`));
51
51
  }
52
52
  });
53
53
  }
@@ -55,21 +55,21 @@ export class ControlYourUiClient {
55
55
  var _a;
56
56
  (_a = this.ws) === null || _a === void 0 ? void 0 : _a.close();
57
57
  }
58
- sendAndReceive(msg, requestTimeout = ControlYourUiClient.REQUEST_TIMEOUT_IN_MS) {
58
+ sendAndReceive(msg, requestTimeout = UiControllerClient.REQUEST_TIMEOUT_IN_MS) {
59
59
  return new Promise((resolve, reject) => {
60
60
  this.currentResolve = resolve;
61
61
  this.currentReject = reject;
62
62
  try {
63
63
  this.send(msg, requestTimeout);
64
- this.timeout = setTimeout(() => this.currentReject(`Request to Control UI Server timed out.
65
- it seems that the server is down, Please make sure the server is up`), ControlYourUiClient.REQUEST_TIMEOUT_IN_MS);
64
+ this.timeout = setTimeout(() => this.currentReject(`Request to UI Controller timed out.
65
+ It seems that the UI Controller is not running. Please, make sure that it is running when executing tests.`), UiControllerClient.REQUEST_TIMEOUT_IN_MS);
66
66
  }
67
67
  catch (error) {
68
- this.currentReject(`The communication to the ControlUI Server is broken. Reason: ${error}`);
68
+ this.currentReject(`The communication to the UI Controller is broken. Reason: ${error}`);
69
69
  }
70
70
  });
71
71
  }
72
- send(msg, _requestTimeout = ControlYourUiClient.REQUEST_TIMEOUT_IN_MS) {
72
+ send(msg, _requestTimeout = UiControllerClient.REQUEST_TIMEOUT_IN_MS) {
73
73
  if (!this.currentReject || !this.currentResolve) {
74
74
  throw Error('Request is not finished! It is not possible to have multiple requests at the same time.');
75
75
  }
@@ -107,6 +107,6 @@ export class ControlYourUiClient {
107
107
  return this.sendAndReceive(new ControlRequest(controlCommand));
108
108
  }
109
109
  }
110
- ControlYourUiClient.EMPTY_REJECT = (_reason) => { };
111
- ControlYourUiClient.EMPTY_RESOLVE = (_value) => { };
112
- ControlYourUiClient.REQUEST_TIMEOUT_IN_MS = 30000;
110
+ UiControllerClient.EMPTY_REJECT = (_reason) => { };
111
+ UiControllerClient.EMPTY_RESOLVE = (_value) => { };
112
+ UiControllerClient.REQUEST_TIMEOUT_IN_MS = 30000;
@@ -1,6 +1,7 @@
1
1
  import { Command } from 'commander';
2
2
  import path from 'path';
3
3
  import fs from 'fs-extra';
4
+ import { getPathToNodeModulesRoot } from '../utils/path';
4
5
  const createProgram = () => {
5
6
  const program = new Command('askui');
6
7
  program.usage('<command> [options]');
@@ -8,7 +9,7 @@ const createProgram = () => {
8
9
  };
9
10
  function copyExampleProject() {
10
11
  const exampleProjectPath = path.join('example_projects_templates', 'typescript_jest');
11
- fs.copySync(path.join(__dirname, '..', '..', exampleProjectPath), '.');
12
+ fs.copySync(path.join(getPathToNodeModulesRoot(), exampleProjectPath), '.');
12
13
  }
13
14
  export function init(argv) {
14
15
  const args = argv || process.argv;
@@ -2,6 +2,7 @@ import fs from 'fs';
2
2
  import got from 'got';
3
3
  import os from 'os';
4
4
  import path from 'path';
5
+ import { getPathToNodeModulesRoot } from '../utils/path';
5
6
  import { logger } from './logger';
6
7
  var SupportedPlatform;
7
8
  (function (SupportedPlatform) {
@@ -10,9 +11,9 @@ var SupportedPlatform;
10
11
  SupportedPlatform["WIN32"] = "win32";
11
12
  })(SupportedPlatform || (SupportedPlatform = {}));
12
13
  const binarySubPathsByPlatform = {
13
- linux: ['linux', 'controlui-server.AppImage'],
14
- darwin: ['darwin', 'controlui-server.dmg'],
15
- win32: ['windows', 'controlui-server.exe'],
14
+ linux: ['linux', 'askui-ui-controller.AppImage'],
15
+ darwin: ['darwin', 'askui-ui-controller.dmg'],
16
+ win32: ['windows', 'askui-ui-controller.exe'],
16
17
  };
17
18
  function isSupportedPlatform(value) {
18
19
  return Object.values(SupportedPlatform).includes(value);
@@ -25,13 +26,13 @@ export function platform() {
25
26
  throw new Error(`Platform "${pf}" is not supported.`);
26
27
  }
27
28
  function buildBinaryNotAvailbleError(binaryVersion) {
28
- return new Error(`It seems that the askui server binary version "${binaryVersion}" for your system "${platform()} ${os.arch}" is not availble, Please contact as at info@askui.com for more information`);
29
+ return new Error(`It seems that the UI Controller version "${binaryVersion}" for your system "${platform()} ${os.arch}" is not availble, Please contact as at info@askui.com for more information`);
29
30
  }
30
31
  export function getBinaryPath(version) {
31
- return path.join(__dirname, '..', '..', 'release', version, ...binarySubPathsByPlatform[platform()]);
32
+ return path.join(getPathToNodeModulesRoot(), 'release', version, ...binarySubPathsByPlatform[platform()]);
32
33
  }
33
34
  function getBinaryDownloadUrl(binaryVersion) {
34
- const baseUrl = `https://askui-public.s3.eu-central-1.amazonaws.com/releases/controlui-server/${binaryVersion}`;
35
+ const baseUrl = `https://askui-public.s3.eu-central-1.amazonaws.com/releases/askui-ui-controller/${binaryVersion}`;
35
36
  const arch = os.arch();
36
37
  return `${baseUrl}/${platform()}/${arch}/${binarySubPathsByPlatform[platform()][1]}`;
37
38
  }
@@ -40,7 +41,7 @@ export function downloadServerBinaries(binaryVersion) {
40
41
  const url = getBinaryDownloadUrl(binaryVersion);
41
42
  const binaryOutputPath = getBinaryPath(binaryVersion);
42
43
  const binaryFolder = path.dirname(binaryOutputPath);
43
- logger.info(`Start downloading askui server binary version "${binaryVersion}"`);
44
+ logger.info(`Start downloading UI Controller version "${binaryVersion}"`);
44
45
  if (!(fs.existsSync(binaryFolder))) {
45
46
  fs.mkdirSync(binaryFolder, { recursive: true });
46
47
  }
@@ -57,8 +58,8 @@ export function downloadServerBinaries(binaryVersion) {
57
58
  reject(new Error('oops, an error during the downloaded occurred, try again with fresh install'));
58
59
  })
59
60
  .on('finish', () => {
60
- logger.info(`askui server binary version ${binaryVersion} for your system "${platform()} ${os.arch}" was downloaded`);
61
- logger.debug(`Binary of Control UI Server is located at "${binaryOutputPath}".`);
61
+ logger.info(`UI Controller version ${binaryVersion} for your system "${platform()} ${os.arch}" was downloaded`);
62
+ logger.debug(`Binary of UI Controller is located at "${binaryOutputPath}".`);
62
63
  resolve();
63
64
  });
64
65
  downloadStream.pipe(fileWriterStream);
@@ -1,4 +1,4 @@
1
1
  export { UnkownError } from './unkown-error';
2
2
  export { TimeoutError } from './timeout-error';
3
- export { AskuiControlServer } from './askui-control-server';
3
+ export { UiController } from './ui-controller';
4
4
  export { logger } from './logger';
@@ -1,4 +1,4 @@
1
1
  export { UnkownError } from './unkown-error';
2
2
  export { TimeoutError } from './timeout-error';
3
- export { AskuiControlServer } from './askui-control-server';
3
+ export { UiController } from './ui-controller';
4
4
  export { logger } from './logger';
@@ -0,0 +1,2 @@
1
+ export declare class LibfuseError extends Error {
2
+ }
@@ -0,0 +1,2 @@
1
+ export class LibfuseError extends Error {
2
+ }
@@ -17,7 +17,7 @@ const stream = pretty({
17
17
  const defaultLogLevel = 'info';
18
18
  const pinoLevel = isProcessEnvLogLevelValid() ? process.env['LOG_LEVEL'] : defaultLogLevel;
19
19
  const logger = pino({
20
- name: 'askuiClient',
20
+ name: 'askuiUiControlClient',
21
21
  level: pinoLevel,
22
22
  customLevels: {
23
23
  verbose: 5,
@@ -1,4 +1,2 @@
1
1
  export declare class TimeoutError extends Error {
2
- contructorName: string;
3
- constructor(message: string);
4
2
  }
@@ -1,7 +1,2 @@
1
1
  export class TimeoutError extends Error {
2
- constructor(message) {
3
- super(message);
4
- this.contructorName = this.constructor.name;
5
- this.name = this.contructorName;
6
- }
7
2
  }
@@ -0,0 +1,47 @@
1
+ import { LogLevels } from '../shared/log-levels';
2
+ /**
3
+ * Configuration options for the askui UI Controller
4
+ *
5
+ * @param {number} display - Default: `0`
6
+ * You can choose on which display you want to excecute all tests.
7
+ * 0 is your main monitor.
8
+ * If you want to use your second monitor you can change
9
+ * the value to `1` (`2` for your third monitor etc.).
10
+ * @param {string} binaryVersion - Default: `'latest'`
11
+ * Choose the version of the askui UI Controller Server.
12
+ * @param {number} port - Default: `6769`
13
+ * The port the askui UI Controller is running on.
14
+ * @param {string} host - Default: `'127.0.0.1'`
15
+ * The host the askui UI Controller is running on.
16
+ * @param {boolean} minimize - Default: `true`
17
+ * askui UI Controller will be started as minimized window.
18
+ * @param {boolean} overWriteBinary - Default: `false`
19
+ * Download the provided Version of askui UI Controller.
20
+ * If a version is already downloaded. This version will be overwritten
21
+ * @param {LogLevels} logLevel - Default: `'debug'`
22
+ * You can use different types of Log Level.
23
+ * Options: "fatal", "error", "warn", "info", "debug", "trace", "silent", "verbose".
24
+ * @param {string} logFilePath - Default: `'<temp-dir>/askui/askui-server.log'`
25
+ * It is possible to specify a path for your log files.
26
+ * Per default we create the askui-server.log file and askui folder in your temp folder.
27
+ */
28
+ export interface UiControllerArgs {
29
+ readonly display?: number;
30
+ readonly binaryVersion?: string;
31
+ readonly port?: number;
32
+ readonly host?: string;
33
+ readonly minimize?: boolean;
34
+ readonly overWriteBinary?: boolean;
35
+ readonly logLevel?: LogLevels;
36
+ readonly logFilePath?: string;
37
+ }
38
+ export interface UiControllerArgsWithDefaults extends UiControllerArgs {
39
+ readonly display: number;
40
+ readonly binaryVersion: string;
41
+ readonly overWriteBinary: boolean;
42
+ readonly port: number;
43
+ readonly host: string;
44
+ readonly logLevel?: LogLevels;
45
+ }
46
+ export declare function createArgsWithDefaults(args?: UiControllerArgs): UiControllerArgsWithDefaults;
47
+ export declare function createCliFlagsFromArgs(args: UiControllerArgsWithDefaults): string[];
@@ -1,4 +1,4 @@
1
- import { createArgsWithDefaults, createCliFlagsFromArgs } from './control-ui-server-args';
1
+ import { createArgsWithDefaults, createCliFlagsFromArgs } from './ui-controller-args';
2
2
  describe('createCliFlagsFromArgs()', () => {
3
3
  test('test createCliFlagsFromArgs should return -d 0 as default output', () => {
4
4
  const expected = ['-d 0', '-p 6769', '--host 127.0.0.1', '-m ', '--log-level debug'];
@@ -0,0 +1,6 @@
1
+ import { UiControllerFacade } from './ui-controller-facade';
2
+ export declare class UiControllerDarwin extends UiControllerFacade {
3
+ protected makeBinaryExecutable(): void;
4
+ protected getStartingCommand(): string;
5
+ private makeDiskImageExecutable;
6
+ }
@@ -1,14 +1,14 @@
1
1
  import { exec, execSync } from 'child_process';
2
2
  import fs from 'fs-extra';
3
3
  import path from 'path';
4
- import { ControlUiServerFacade } from './control-ui-server-facade';
4
+ import { UiControllerFacade } from './ui-controller-facade';
5
5
  import { logger } from './logger';
6
- export class ControlUiServerDarwin extends ControlUiServerFacade {
6
+ export class UiControllerDarwin extends UiControllerFacade {
7
7
  makeBinaryExecutable() {
8
8
  this.makeDiskImageExecutable();
9
9
  }
10
10
  getStartingCommand() {
11
- return `${path.dirname(this.binaryPath)}/controlui-server.app/Contents/MacOS/controlui-server`;
11
+ return `"${path.dirname(this.binaryPath)}/controlui-server.app/Contents/MacOS/controlui-server"`;
12
12
  }
13
13
  makeDiskImageExecutable() {
14
14
  const mountPoint = '/Volumes/controlui-server.dmg';
@@ -18,14 +18,14 @@ export class ControlUiServerDarwin extends ControlUiServerFacade {
18
18
  '-quiet',
19
19
  '-noautofsck',
20
20
  '-noautoopen',
21
- `-mountpoint ${mountPoint}`,
22
- this.binaryPath,
21
+ `-mountpoint "${mountPoint}"`,
22
+ `"${this.binaryPath}"`,
23
23
  ].join(' '));
24
24
  const appBaseName = 'controlui-server.app';
25
25
  const appSrcPath = `${mountPoint}/${appBaseName}`;
26
26
  const appDestPath = `${path.dirname(this.binaryPath)}/${appBaseName}`;
27
27
  fs.removeSync(appDestPath);
28
28
  fs.copySync(appSrcPath, appDestPath);
29
- exec(`hdiutil detach ${mountPoint}`, (_exception, stdout) => logger.debug(stdout));
29
+ exec(`hdiutil detach "${mountPoint}"`, (_exception, stdout) => logger.debug(stdout));
30
30
  }
31
31
  }
@@ -0,0 +1,17 @@
1
+ import { UiControllerArgs, UiControllerArgsWithDefaults } from './ui-controller-args';
2
+ export declare abstract class UiControllerFacade {
3
+ protected binaryPath: string;
4
+ protected serverLogFile: string;
5
+ protected readonly DefaultmaxWaitingForStartingInMs: number;
6
+ start(args?: UiControllerArgs, maxWaitingForStartingInSeconds?: number): Promise<void>;
7
+ stop(args?: UiControllerArgs, forceStop?: boolean): Promise<void>;
8
+ protected serverLogFilePath(args?: UiControllerArgsWithDefaults): UiControllerArgsWithDefaults;
9
+ protected killPort(port: number, forceStop?: boolean): Promise<void>;
10
+ protected getStartingCommand(): string;
11
+ protected makeBinaryExecutable(): void;
12
+ protected runPreStartChecks(): Promise<void>;
13
+ protected waitUntilStarted(args: UiControllerArgsWithDefaults, maxWaitingForStartingInSeconds?: number): Promise<void>;
14
+ private isBinaryValid;
15
+ private getBinary;
16
+ private startWithDefaults;
17
+ }
@@ -13,24 +13,25 @@ import waitPort from 'wait-port';
13
13
  import fkill from 'fkill';
14
14
  import os from 'os';
15
15
  import path from 'path';
16
- import { createArgsWithDefaults, createCliFlagsFromArgs, } from './control-ui-server-args';
16
+ import { createArgsWithDefaults, createCliFlagsFromArgs, } from './ui-controller-args';
17
17
  import { downloadServerBinaries, getBinaryPath } from './download-binaries';
18
18
  import { logger } from './logger';
19
19
  import { TimeoutError } from './timeout-error';
20
20
  import { UnkownError } from './unkown-error';
21
- export class ControlUiServerFacade {
21
+ export class UiControllerFacade {
22
22
  constructor() {
23
23
  this.binaryPath = getBinaryPath('latest');
24
24
  this.DefaultmaxWaitingForStartingInMs = 30 * 1000;
25
25
  }
26
26
  start(args, maxWaitingForStartingInSeconds) {
27
27
  return __awaiter(this, void 0, void 0, function* () {
28
+ yield this.runPreStartChecks();
28
29
  const argsWithDefaults = createArgsWithDefaults(args);
29
30
  const argsWithLogPath = this.serverLogFilePath(argsWithDefaults);
30
31
  this.binaryPath = getBinaryPath(argsWithLogPath.binaryVersion);
31
32
  yield this.getBinary(argsWithLogPath.binaryVersion, argsWithLogPath.overWriteBinary);
32
33
  this.makeBinaryExecutable();
33
- logger.debug(`AskuiServer log path "${this.serverLogFile}"`);
34
+ logger.debug(`UI Controller log path "${this.serverLogFile}"`);
34
35
  yield this.startWithDefaults(argsWithLogPath, maxWaitingForStartingInSeconds);
35
36
  });
36
37
  }
@@ -41,7 +42,7 @@ export class ControlUiServerFacade {
41
42
  yield this.killPort(argsWithDefaults.port, forceStop);
42
43
  }
43
44
  catch (err) {
44
- throw new Error(`An unknown error occured while closing of the askui server. Log file: "${this.serverLogFile}". ErrorReason: ${err}`);
45
+ throw new Error(`An unknown error occured while closing of the UI Controller. Log file: "${this.serverLogFile}". ErrorReason: ${err}`);
45
46
  }
46
47
  });
47
48
  }
@@ -51,7 +52,7 @@ export class ControlUiServerFacade {
51
52
  return args;
52
53
  }
53
54
  const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'askui'));
54
- this.serverLogFile = path.join(tmpDir, 'askui-server.log');
55
+ this.serverLogFile = path.join(tmpDir, 'askui-ui-controller.log');
55
56
  const argPath = { logFilePath: this.serverLogFile };
56
57
  return Object.assign(argPath, args);
57
58
  }
@@ -63,13 +64,17 @@ export class ControlUiServerFacade {
63
64
  });
64
65
  }
65
66
  getStartingCommand() {
66
- return this.binaryPath;
67
+ return `"${this.binaryPath}"`;
67
68
  }
68
69
  // eslint-disable-next-line class-methods-use-this
69
70
  makeBinaryExecutable() {
70
71
  /* Executable out of the box */
71
72
  }
72
73
  // eslint-disable-next-line class-methods-use-this
74
+ runPreStartChecks() {
75
+ return Promise.resolve();
76
+ }
77
+ // eslint-disable-next-line class-methods-use-this
73
78
  waitUntilStarted(args, maxWaitingForStartingInSeconds) {
74
79
  return new Promise((resolve, reject) => {
75
80
  try {
@@ -89,7 +94,7 @@ export class ControlUiServerFacade {
89
94
  });
90
95
  }
91
96
  catch (err) {
92
- reject(new UnkownError(`An unknown error occured while waiting for the askui server: ${err}`));
97
+ reject(new UnkownError(`An unknown error occured while waiting for the UI Controller: ${err}`));
93
98
  }
94
99
  });
95
100
  }
@@ -101,23 +106,24 @@ export class ControlUiServerFacade {
101
106
  getBinary(binaryVersion, overWriteBinary = false) {
102
107
  return __awaiter(this, void 0, void 0, function* () {
103
108
  if (!fs.existsSync(this.binaryPath) || overWriteBinary || !this.isBinaryValid()) {
104
- logger.debug(`Currently, no binary of the Control UI Server is available at "${this.binaryPath}"`);
109
+ logger.debug(`Currently, no binary of the UI Controller is available at "${this.binaryPath}"`);
105
110
  yield downloadServerBinaries(binaryVersion);
106
111
  }
107
112
  else {
108
- logger.debug(`Binary of Control UI Server is already present at "${this.binaryPath}".`);
113
+ logger.debug(`Binary of UI Controller is already present at "${this.binaryPath}".`);
109
114
  }
110
115
  });
111
116
  }
112
117
  startWithDefaults(args, maxWaitingForStartingInSeconds) {
113
118
  return __awaiter(this, void 0, void 0, function* () {
114
119
  try {
115
- logger.debug('Starting the Control UI Server...');
120
+ logger.debug('Starting the UI Controller...');
116
121
  spawn(this.getStartingCommand(), createCliFlagsFromArgs(args), { shell: true });
117
122
  yield this.waitUntilStarted(args, maxWaitingForStartingInSeconds);
118
123
  }
119
124
  catch (err) {
120
- throw new Error(`The Control UI Server could not be started. Log file : ${this.serverLogFile}. ErrorReason: ${err}`);
125
+ throw new Error(`The UI Controller could not be started. Log file : ${this.serverLogFile}. ErrorReason: ${err}
126
+ Check this website for more information: https://docs.askui.com/docs/general/Troubleshooting/askui-ui-controller-starting-problems`);
121
127
  }
122
128
  });
123
129
  }
@@ -0,0 +1,5 @@
1
+ import { UiControllerFacade } from './ui-controller-facade';
2
+ export declare class UiControllerLinux extends UiControllerFacade {
3
+ protected makeBinaryExecutable(): void;
4
+ protected runPreStartChecks(): Promise<void>;
5
+ }
@@ -0,0 +1,48 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { exec } from 'child_process';
11
+ import { promisify } from 'util';
12
+ import { UiControllerFacade } from './ui-controller-facade';
13
+ import { logger } from './logger';
14
+ import { WaylandError } from './wayland-error';
15
+ import { LibfuseError } from './libfuse-error';
16
+ export class UiControllerLinux extends UiControllerFacade {
17
+ // eslint-disable-next-line class-methods-use-this
18
+ makeBinaryExecutable() {
19
+ exec(`chmod +x "${this.binaryPath}"`, (_exception, stdout) => logger.debug(stdout));
20
+ }
21
+ // eslint-disable-next-line class-methods-use-this
22
+ runPreStartChecks() {
23
+ return __awaiter(this, void 0, void 0, function* () {
24
+ const runCommand = promisify(exec);
25
+ const waylandStatus = yield runCommand('echo $WAYLAND_DISPLAY');
26
+ if (waylandStatus.stdout.trim().includes('wayland')) {
27
+ throw new WaylandError('Wayland is not supported: https://docs.askui.com/docs/general/Troubleshooting/askui-ui-controller#wayland');
28
+ }
29
+ /* First we want to check if the user is using a debian distribution.
30
+ * and in the following if libfuse2 is installed.
31
+ * With Ubunutu 22.04 libfuse2 is not installed per default.
32
+ * For more information: https://discourse.joplinapp.org/t/appimage-incompatibility-in-ubuntu-22-04/25173
33
+ */
34
+ try {
35
+ yield runCommand('dpkg --version');
36
+ }
37
+ catch (err) {
38
+ return;
39
+ }
40
+ try {
41
+ yield runCommand('dpkg -s libfuse2 | grep Status');
42
+ }
43
+ catch (_a) {
44
+ throw new LibfuseError('Libfuse2 package is missing: https://docs.askui.com/docs/general/Troubleshooting/askui-ui-controller#libfuse2');
45
+ }
46
+ });
47
+ }
48
+ }
@@ -0,0 +1,3 @@
1
+ import { UiControllerFacade } from './ui-controller-facade';
2
+ export declare class UiControllerWin32 extends UiControllerFacade {
3
+ }
@@ -0,0 +1,3 @@
1
+ import { UiControllerFacade } from './ui-controller-facade';
2
+ export class UiControllerWin32 extends UiControllerFacade {
3
+ }
@@ -0,0 +1,8 @@
1
+ import { UiControllerArgs } from './ui-controller-args';
2
+ export declare class UiController {
3
+ private args?;
4
+ private server;
5
+ constructor(args?: UiControllerArgs | undefined);
6
+ start(timeoutInSeconds?: number): Promise<void>;
7
+ stop(forceStop?: boolean): Promise<void>;
8
+ }
@@ -7,22 +7,22 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import { ControlUiServerDarwin } from './control-ui-server-darwin';
11
- import { ControlUiServerLinux } from './control-ui-server-linux';
12
- import { ControlUiServerWin32 } from './control-ui-server-win32';
10
+ import { UiControllerDarwin } from './ui-controller-darwin';
11
+ import { UiControllerLinux } from './ui-controller-linux';
12
+ import { UiControllerWin32 } from './ui-controller-win32';
13
13
  import { platform } from './download-binaries';
14
- export class AskuiControlServer {
14
+ export class UiController {
15
15
  constructor(args) {
16
16
  this.args = args;
17
17
  switch (platform()) {
18
18
  case 'darwin':
19
- this.server = new ControlUiServerDarwin();
19
+ this.server = new UiControllerDarwin();
20
20
  break;
21
21
  case 'linux':
22
- this.server = new ControlUiServerLinux();
22
+ this.server = new UiControllerLinux();
23
23
  break;
24
24
  case 'win32':
25
- this.server = new ControlUiServerWin32();
25
+ this.server = new UiControllerWin32();
26
26
  break;
27
27
  default:
28
28
  throw new Error(`Platform "${platform()}" not supported.`);
@@ -1,4 +1,2 @@
1
1
  export declare class UnkownError extends Error {
2
- contructorName: string;
3
- constructor(message: string);
4
2
  }
@@ -1,7 +1,2 @@
1
1
  export class UnkownError extends Error {
2
- constructor(message) {
3
- super(message);
4
- this.contructorName = this.constructor.name;
5
- this.name = this.contructorName;
6
- }
7
2
  }
@@ -0,0 +1,2 @@
1
+ export declare class WaylandError extends Error {
2
+ }
@@ -0,0 +1,2 @@
1
+ export class WaylandError extends Error {
2
+ }
@@ -1,2 +1,3 @@
1
- export { AskuiControlServer } from './lib';
2
- export { AskuiClient } from './execution';
1
+ export { UiController } from './lib';
2
+ export { UiControlClient, AnnotationLevel } from './execution';
3
+ export { LogLevels } from './shared';
package/dist/esm/main.js CHANGED
@@ -1,2 +1,3 @@
1
- export { AskuiControlServer } from './lib';
2
- export { AskuiClient } from './execution';
1
+ export { UiController } from './lib';
2
+ export { UiControlClient, AnnotationLevel } from './execution';
3
+ export { LogLevels } from './shared';
@@ -0,0 +1 @@
1
+ export { LogLevels } from './log-levels';
@@ -0,0 +1 @@
1
+ export { LogLevels } from './log-levels';
@@ -0,0 +1,3 @@
1
+ export interface AnalyticsInterface {
2
+ getAnalyticsHeaders(): Promise<Record<string, string>>;
3
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ import { AnalyticsInterface } from './analytics-interface';
2
+ export declare class Analytics implements AnalyticsInterface {
3
+ private userIdentifier;
4
+ getAnalyticsHeaders(): Promise<Record<string, string>>;
5
+ }