askui 0.1.6 → 0.2.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 (188) hide show
  1. package/README.md +6 -0
  2. package/dist/cjs/core/model/test-case-dto/custom-element.d.ts +2 -2
  3. package/dist/cjs/core/model/test-case-dto/custom-element.js +2 -2
  4. package/dist/cjs/core/model/test-case-dto/custom-element.spec.js +7 -6
  5. package/dist/cjs/execution/dsl.d.ts +6 -17
  6. package/dist/cjs/execution/dsl.js +4 -21
  7. package/dist/cjs/execution/execution-runtime.d.ts +5 -5
  8. package/dist/cjs/execution/execution-runtime.js +14 -14
  9. package/dist/cjs/execution/index.d.ts +2 -1
  10. package/dist/cjs/execution/index.js +5 -3
  11. package/dist/cjs/execution/{control-your-ui-api.d.ts → inference-client.d.ts} +3 -3
  12. package/dist/cjs/execution/{control-your-ui-api.js → inference-client.js} +8 -8
  13. package/dist/cjs/execution/ui-control-client-error.d.ts +2 -0
  14. package/dist/cjs/execution/ui-control-client-error.js +6 -0
  15. package/dist/cjs/execution/ui-control-client.d.ts +34 -0
  16. package/dist/cjs/execution/{client.js → ui-control-client.js} +48 -29
  17. package/dist/cjs/execution/{client-connection-state.d.ts → ui-controller-client-connection-state.d.ts} +1 -1
  18. package/dist/cjs/execution/ui-controller-client-connection-state.js +10 -0
  19. package/dist/cjs/execution/ui-controller-client-interface.d.ts +27 -0
  20. package/dist/cjs/execution/{client-interface.js → ui-controller-client-interface.js} +0 -0
  21. package/dist/cjs/execution/{control-your-ui-client.d.ts → ui-controller-client.d.ts} +6 -6
  22. package/dist/cjs/execution/{control-your-ui-client.js → ui-controller-client.js} +28 -28
  23. package/dist/cjs/lib/download-binaries.js +8 -8
  24. package/dist/cjs/lib/index.d.ts +1 -1
  25. package/dist/cjs/lib/index.js +3 -3
  26. package/dist/cjs/lib/libfuse-error.d.ts +2 -0
  27. package/dist/cjs/lib/libfuse-error.js +6 -0
  28. package/dist/cjs/lib/logger.js +1 -1
  29. package/dist/cjs/lib/timeout-error.d.ts +0 -2
  30. package/dist/cjs/lib/timeout-error.js +0 -5
  31. package/dist/cjs/lib/ui-controller-args.d.ts +47 -0
  32. package/dist/cjs/lib/{control-ui-server-args.js → ui-controller-args.js} +0 -0
  33. package/dist/cjs/lib/{control-ui-server-args.spec.d.ts → ui-controller-args.spec.d.ts} +0 -0
  34. package/dist/cjs/lib/{control-ui-server-args.spec.js → ui-controller-args.spec.js} +7 -7
  35. package/dist/cjs/lib/ui-controller-darwin.d.ts +6 -0
  36. package/dist/cjs/lib/{control-ui-server-darwin.js → ui-controller-darwin.js} +8 -8
  37. package/dist/cjs/lib/ui-controller-facade.d.ts +17 -0
  38. package/dist/cjs/lib/{control-ui-server-facade.js → ui-controller-facade.js} +22 -16
  39. package/dist/cjs/lib/ui-controller-linux.d.ts +5 -0
  40. package/dist/cjs/lib/ui-controller-linux.js +52 -0
  41. package/dist/cjs/lib/ui-controller-win32.d.ts +3 -0
  42. package/dist/cjs/lib/ui-controller-win32.js +7 -0
  43. package/dist/cjs/lib/ui-controller.d.ts +8 -0
  44. package/dist/cjs/lib/{askui-control-server.js → ui-controller.js} +9 -9
  45. package/dist/cjs/lib/unkown-error.d.ts +0 -2
  46. package/dist/cjs/lib/unkown-error.js +0 -5
  47. package/dist/cjs/lib/wayland-error.d.ts +2 -0
  48. package/dist/cjs/lib/wayland-error.js +6 -0
  49. package/dist/cjs/main.d.ts +3 -2
  50. package/dist/cjs/main.js +6 -3
  51. package/dist/cjs/shared/index.d.ts +1 -0
  52. package/dist/cjs/shared/index.js +5 -0
  53. package/dist/cjs/utils/analytics/analytics-interface.d.ts +3 -0
  54. package/dist/cjs/utils/analytics/analytics-interface.js +2 -0
  55. package/dist/cjs/utils/analytics/analytics.d.ts +5 -0
  56. package/dist/cjs/utils/analytics/analytics.js +32 -0
  57. package/dist/cjs/utils/analytics/index.d.ts +1 -0
  58. package/dist/cjs/utils/analytics/index.js +5 -0
  59. package/dist/cjs/utils/analytics/user-identifier-interface.d.ts +3 -0
  60. package/dist/cjs/utils/analytics/user-identifier-interface.js +2 -0
  61. package/dist/cjs/utils/analytics/user-identifier.d.ts +4 -0
  62. package/dist/cjs/utils/analytics/user-identifier.js +22 -0
  63. package/dist/cjs/utils/base_64_image/base-64-image-error.d.ts +2 -0
  64. package/dist/cjs/utils/base_64_image/base-64-image-error.js +6 -0
  65. package/dist/cjs/utils/base_64_image/base-64-image-path-error.d.ts +4 -0
  66. package/dist/cjs/utils/base_64_image/base-64-image-path-error.js +11 -0
  67. package/dist/cjs/utils/base_64_image/base-64-image-string-error.d.ts +4 -0
  68. package/dist/cjs/utils/base_64_image/base-64-image-string-error.js +11 -0
  69. package/dist/cjs/utils/base_64_image/base-64-image.d.ts +18 -0
  70. package/dist/cjs/utils/base_64_image/base-64-image.js +86 -0
  71. package/dist/cjs/utils/http/custom-errors/http-client-error.d.ts +0 -2
  72. package/dist/cjs/utils/http/custom-errors/http-client-error.js +0 -5
  73. package/dist/cjs/utils/http/http-client-got.d.ts +6 -5
  74. package/dist/cjs/utils/http/http-client-got.js +11 -11
  75. package/dist/cjs/utils/image-resize-errors/image-resizing-base-error.d.ts +0 -2
  76. package/dist/cjs/utils/image-resize-errors/image-resizing-base-error.js +0 -5
  77. package/dist/cjs/utils/image-resize-errors/index.d.ts +0 -1
  78. package/dist/cjs/utils/image-resize-errors/index.js +1 -3
  79. package/dist/cjs/utils/transformations.d.ts +0 -2
  80. package/dist/cjs/utils/transformations.js +11 -44
  81. package/dist/esm/core/model/test-case-dto/custom-element.d.ts +2 -2
  82. package/dist/esm/core/model/test-case-dto/custom-element.js +2 -2
  83. package/dist/esm/core/model/test-case-dto/custom-element.spec.js +7 -6
  84. package/dist/esm/execution/dsl.d.ts +6 -17
  85. package/dist/esm/execution/dsl.js +3 -21
  86. package/dist/esm/execution/execution-runtime.d.ts +5 -5
  87. package/dist/esm/execution/execution-runtime.js +14 -14
  88. package/dist/esm/execution/index.d.ts +2 -1
  89. package/dist/esm/execution/index.js +2 -1
  90. package/dist/esm/execution/{control-your-ui-api.d.ts → inference-client.d.ts} +3 -3
  91. package/dist/esm/execution/{control-your-ui-api.js → inference-client.js} +6 -6
  92. package/dist/esm/execution/ui-control-client-error.d.ts +2 -0
  93. package/dist/esm/execution/ui-control-client-error.js +2 -0
  94. package/dist/esm/execution/ui-control-client.d.ts +34 -0
  95. package/dist/esm/execution/{client.js → ui-control-client.js} +46 -27
  96. package/dist/esm/execution/{client-connection-state.d.ts → ui-controller-client-connection-state.d.ts} +1 -1
  97. package/dist/esm/execution/ui-controller-client-connection-state.js +7 -0
  98. package/dist/esm/execution/ui-controller-client-interface.d.ts +27 -0
  99. package/dist/esm/execution/{client-interface.js → ui-controller-client-interface.js} +0 -0
  100. package/dist/esm/execution/{control-your-ui-client.d.ts → ui-controller-client.d.ts} +6 -6
  101. package/dist/esm/execution/{control-your-ui-client.js → ui-controller-client.js} +26 -26
  102. package/dist/esm/lib/download-binaries.js +8 -8
  103. package/dist/esm/lib/index.d.ts +1 -1
  104. package/dist/esm/lib/index.js +1 -1
  105. package/dist/esm/lib/libfuse-error.d.ts +2 -0
  106. package/dist/esm/lib/libfuse-error.js +2 -0
  107. package/dist/esm/lib/logger.js +1 -1
  108. package/dist/esm/lib/timeout-error.d.ts +0 -2
  109. package/dist/esm/lib/timeout-error.js +0 -5
  110. package/dist/esm/lib/ui-controller-args.d.ts +47 -0
  111. package/dist/esm/lib/{control-ui-server-args.js → ui-controller-args.js} +0 -0
  112. package/dist/esm/lib/{control-ui-server-args.spec.d.ts → ui-controller-args.spec.d.ts} +0 -0
  113. package/dist/esm/lib/{control-ui-server-args.spec.js → ui-controller-args.spec.js} +1 -1
  114. package/dist/esm/lib/ui-controller-darwin.d.ts +6 -0
  115. package/dist/esm/lib/{control-ui-server-darwin.js → ui-controller-darwin.js} +6 -6
  116. package/dist/esm/lib/ui-controller-facade.d.ts +17 -0
  117. package/dist/esm/lib/{control-ui-server-facade.js → ui-controller-facade.js} +17 -11
  118. package/dist/esm/lib/ui-controller-linux.d.ts +5 -0
  119. package/dist/esm/lib/ui-controller-linux.js +48 -0
  120. package/dist/esm/lib/ui-controller-win32.d.ts +3 -0
  121. package/dist/esm/lib/ui-controller-win32.js +3 -0
  122. package/dist/esm/lib/ui-controller.d.ts +8 -0
  123. package/dist/esm/lib/{askui-control-server.js → ui-controller.js} +7 -7
  124. package/dist/esm/lib/unkown-error.d.ts +0 -2
  125. package/dist/esm/lib/unkown-error.js +0 -5
  126. package/dist/esm/lib/wayland-error.d.ts +2 -0
  127. package/dist/esm/lib/wayland-error.js +2 -0
  128. package/dist/esm/main.d.ts +3 -2
  129. package/dist/esm/main.js +3 -2
  130. package/dist/esm/shared/index.d.ts +1 -0
  131. package/dist/esm/shared/index.js +1 -0
  132. package/dist/esm/utils/analytics/analytics-interface.d.ts +3 -0
  133. package/dist/esm/utils/analytics/analytics-interface.js +1 -0
  134. package/dist/esm/utils/analytics/analytics.d.ts +5 -0
  135. package/dist/esm/utils/analytics/analytics.js +25 -0
  136. package/dist/esm/utils/analytics/index.d.ts +1 -0
  137. package/dist/esm/utils/analytics/index.js +1 -0
  138. package/dist/esm/utils/analytics/user-identifier-interface.d.ts +3 -0
  139. package/dist/esm/utils/analytics/user-identifier-interface.js +1 -0
  140. package/dist/esm/utils/analytics/user-identifier.d.ts +4 -0
  141. package/dist/esm/utils/analytics/user-identifier.js +18 -0
  142. package/dist/esm/utils/base_64_image/base-64-image-error.d.ts +2 -0
  143. package/dist/esm/utils/base_64_image/base-64-image-error.js +2 -0
  144. package/dist/esm/utils/base_64_image/base-64-image-path-error.d.ts +4 -0
  145. package/dist/esm/utils/base_64_image/base-64-image-path-error.js +7 -0
  146. package/dist/esm/utils/base_64_image/base-64-image-string-error.d.ts +4 -0
  147. package/dist/esm/utils/base_64_image/base-64-image-string-error.js +7 -0
  148. package/dist/esm/utils/base_64_image/base-64-image.d.ts +18 -0
  149. package/dist/esm/utils/base_64_image/base-64-image.js +79 -0
  150. package/dist/esm/utils/http/custom-errors/http-client-error.d.ts +0 -2
  151. package/dist/esm/utils/http/custom-errors/http-client-error.js +0 -5
  152. package/dist/esm/utils/http/http-client-got.d.ts +6 -5
  153. package/dist/esm/utils/http/http-client-got.js +11 -11
  154. package/dist/esm/utils/image-resize-errors/image-resizing-base-error.d.ts +0 -2
  155. package/dist/esm/utils/image-resize-errors/image-resizing-base-error.js +0 -5
  156. package/dist/esm/utils/image-resize-errors/index.d.ts +0 -1
  157. package/dist/esm/utils/image-resize-errors/index.js +0 -1
  158. package/dist/esm/utils/transformations.d.ts +0 -2
  159. package/dist/esm/utils/transformations.js +11 -39
  160. package/dist/example_projects_templates/typescript_jest/test/helper/jest.setup.ts +7 -7
  161. package/dist/example_projects_templates/typescript_jest/test/jest.config.ts +3 -0
  162. package/package.json +9 -6
  163. package/dist/cjs/execution/client-connection-state.js +0 -10
  164. package/dist/cjs/execution/client-error.d.ts +0 -2
  165. package/dist/cjs/execution/client-error.js +0 -6
  166. package/dist/cjs/execution/client-interface.d.ts +0 -13
  167. package/dist/cjs/execution/client.d.ts +0 -25
  168. package/dist/cjs/lib/askui-control-server.d.ts +0 -8
  169. package/dist/cjs/lib/control-ui-server-args.d.ts +0 -21
  170. package/dist/cjs/lib/control-ui-server-darwin.d.ts +0 -6
  171. package/dist/cjs/lib/control-ui-server-facade.d.ts +0 -16
  172. package/dist/cjs/lib/control-ui-server-linux.d.ts +0 -4
  173. package/dist/cjs/lib/control-ui-server-linux.js +0 -13
  174. package/dist/cjs/lib/control-ui-server-win32.d.ts +0 -3
  175. package/dist/cjs/lib/control-ui-server-win32.js +0 -7
  176. package/dist/esm/execution/client-connection-state.js +0 -7
  177. package/dist/esm/execution/client-error.d.ts +0 -2
  178. package/dist/esm/execution/client-error.js +0 -2
  179. package/dist/esm/execution/client-interface.d.ts +0 -13
  180. package/dist/esm/execution/client.d.ts +0 -25
  181. package/dist/esm/lib/askui-control-server.d.ts +0 -8
  182. package/dist/esm/lib/control-ui-server-args.d.ts +0 -21
  183. package/dist/esm/lib/control-ui-server-darwin.d.ts +0 -6
  184. package/dist/esm/lib/control-ui-server-facade.d.ts +0 -16
  185. package/dist/esm/lib/control-ui-server-linux.d.ts +0 -4
  186. package/dist/esm/lib/control-ui-server-linux.js +0 -9
  187. package/dist/esm/lib/control-ui-server-win32.d.ts +0 -3
  188. package/dist/esm/lib/control-ui-server-win32.js +0 -3
@@ -2,21 +2,21 @@ import WebSocket from 'ws';
2
2
  import { DetectedElement } from '../core/model/annotation-result/detected-element';
3
3
  import { CaptureScreenshotResponse, ControlResponse, StartRecordingResponse, StopRecordingResponse, ReadRecordingPartResponse, InteractiveAnnotationResponse, GetProcessPidResponse } from '../core/runner-protocol';
4
4
  import { ControlCommand } from '../core/ui-control-commands';
5
- import { ClientConnectionState } from './client-connection-state';
6
- export declare class ControlYourUiClient {
7
- controlServerUrl: string;
5
+ import { UiControllerClientConnectionState } from './ui-controller-client-connection-state';
6
+ export declare class UiControllerClient {
7
+ url: string;
8
8
  private static readonly EMPTY_REJECT;
9
9
  private static readonly EMPTY_RESOLVE;
10
10
  private static readonly REQUEST_TIMEOUT_IN_MS;
11
11
  ws: WebSocket;
12
- connectionState: ClientConnectionState;
12
+ connectionState: UiControllerClientConnectionState;
13
13
  private timeout?;
14
14
  private currentReject;
15
15
  private currentResolve;
16
- constructor(controlServerUrl: string);
16
+ constructor(url: string);
17
17
  private clearResponse;
18
18
  private onMessage;
19
- connect(): Promise<ClientConnectionState>;
19
+ connect(): Promise<UiControllerClientConnectionState>;
20
20
  close(): void;
21
21
  private sendAndReceive;
22
22
  private send;
@@ -3,23 +3,23 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.ControlYourUiClient = void 0;
6
+ exports.UiControllerClient = void 0;
7
7
  const ws_1 = __importDefault(require("ws"));
8
8
  const runner_protocol_1 = require("../core/runner-protocol");
9
9
  const logger_1 = require("../lib/logger");
10
- const client_connection_state_1 = require("./client-connection-state");
10
+ const ui_controller_client_connection_state_1 = require("./ui-controller-client-connection-state");
11
11
  const read_recording_response_stream_handler_1 = require("./read-recording-response-stream-handler");
12
- const client_error_1 = require("./client-error");
13
- class ControlYourUiClient {
14
- constructor(controlServerUrl) {
15
- this.controlServerUrl = controlServerUrl;
16
- this.connectionState = client_connection_state_1.ClientConnectionState.NOT_CONNECTED;
17
- this.currentReject = ControlYourUiClient.EMPTY_REJECT;
18
- this.currentResolve = ControlYourUiClient.EMPTY_RESOLVE;
12
+ const ui_control_client_error_1 = require("./ui-control-client-error");
13
+ class UiControllerClient {
14
+ constructor(url) {
15
+ this.url = url;
16
+ this.connectionState = ui_controller_client_connection_state_1.UiControllerClientConnectionState.NOT_CONNECTED;
17
+ this.currentReject = UiControllerClient.EMPTY_REJECT;
18
+ this.currentResolve = UiControllerClient.EMPTY_RESOLVE;
19
19
  }
20
20
  clearResponse() {
21
- this.currentReject = ControlYourUiClient.EMPTY_REJECT;
22
- this.currentResolve = ControlYourUiClient.EMPTY_RESOLVE;
21
+ this.currentReject = UiControllerClient.EMPTY_REJECT;
22
+ this.currentResolve = UiControllerClient.EMPTY_RESOLVE;
23
23
  }
24
24
  onMessage(data) {
25
25
  clearTimeout(this.timeout);
@@ -36,24 +36,24 @@ class ControlYourUiClient {
36
36
  this.clearResponse();
37
37
  }
38
38
  connect() {
39
- this.connectionState = client_connection_state_1.ClientConnectionState.CONNECTING;
39
+ this.connectionState = ui_controller_client_connection_state_1.UiControllerClientConnectionState.CONNECTING;
40
40
  return new Promise((resolve, reject) => {
41
41
  try {
42
- this.ws = new ws_1.default(this.controlServerUrl);
42
+ this.ws = new ws_1.default(this.url);
43
43
  this.ws.on('message', (data) => { this.onMessage(data); });
44
44
  this.ws.on('open', () => {
45
- this.connectionState = client_connection_state_1.ClientConnectionState.CONNECTED;
45
+ this.connectionState = ui_controller_client_connection_state_1.UiControllerClientConnectionState.CONNECTED;
46
46
  resolve(this.connectionState);
47
47
  });
48
48
  this.ws.on('error', (error) => {
49
- this.connectionState = client_connection_state_1.ClientConnectionState.ERROR;
50
- reject(new client_error_1.ControlUiClientError(`Connection to Control UI Server cannot be established,
51
- Probably it was not started. Makse sure you started the server with this
52
- Url ${this.controlServerUrl}. Error message ${error.message}`));
49
+ this.connectionState = ui_controller_client_connection_state_1.UiControllerClientConnectionState.ERROR;
50
+ reject(new ui_control_client_error_1.UiControlClientError(`Connection to UI Controller cannot be established,
51
+ Probably it was not started. Makse sure you started UI Controller with this
52
+ Url ${this.url}. Error message ${error.message}`));
53
53
  });
54
54
  }
55
55
  catch (error) {
56
- reject(new client_error_1.ControlUiClientError(`Connection to Control UI Server cannot be established. Reason: ${error}`));
56
+ reject(new ui_control_client_error_1.UiControlClientError(`Connection to UI Controller cannot be established. Reason: ${error}`));
57
57
  }
58
58
  });
59
59
  }
@@ -61,21 +61,21 @@ class ControlYourUiClient {
61
61
  var _a;
62
62
  (_a = this.ws) === null || _a === void 0 ? void 0 : _a.close();
63
63
  }
64
- sendAndReceive(msg, requestTimeout = ControlYourUiClient.REQUEST_TIMEOUT_IN_MS) {
64
+ sendAndReceive(msg, requestTimeout = UiControllerClient.REQUEST_TIMEOUT_IN_MS) {
65
65
  return new Promise((resolve, reject) => {
66
66
  this.currentResolve = resolve;
67
67
  this.currentReject = reject;
68
68
  try {
69
69
  this.send(msg, requestTimeout);
70
- this.timeout = setTimeout(() => this.currentReject(`Request to Control UI Server timed out.
71
- it seems that the server is down, Please make sure the server is up`), ControlYourUiClient.REQUEST_TIMEOUT_IN_MS);
70
+ this.timeout = setTimeout(() => this.currentReject(`Request to UI Controller timed out.
71
+ It seems that the UI Controller is not running. Please, make sure that it is running when executing tests.`), UiControllerClient.REQUEST_TIMEOUT_IN_MS);
72
72
  }
73
73
  catch (error) {
74
- this.currentReject(`The communication to the ControlUI Server is broken. Reason: ${error}`);
74
+ this.currentReject(`The communication to the UI Controller is broken. Reason: ${error}`);
75
75
  }
76
76
  });
77
77
  }
78
- send(msg, _requestTimeout = ControlYourUiClient.REQUEST_TIMEOUT_IN_MS) {
78
+ send(msg, _requestTimeout = UiControllerClient.REQUEST_TIMEOUT_IN_MS) {
79
79
  if (!this.currentReject || !this.currentResolve) {
80
80
  throw Error('Request is not finished! It is not possible to have multiple requests at the same time.');
81
81
  }
@@ -113,7 +113,7 @@ class ControlYourUiClient {
113
113
  return this.sendAndReceive(new runner_protocol_1.ControlRequest(controlCommand));
114
114
  }
115
115
  }
116
- exports.ControlYourUiClient = ControlYourUiClient;
117
- ControlYourUiClient.EMPTY_REJECT = (_reason) => { };
118
- ControlYourUiClient.EMPTY_RESOLVE = (_value) => { };
119
- ControlYourUiClient.REQUEST_TIMEOUT_IN_MS = 30000;
116
+ exports.UiControllerClient = UiControllerClient;
117
+ UiControllerClient.EMPTY_REJECT = (_reason) => { };
118
+ UiControllerClient.EMPTY_RESOLVE = (_value) => { };
119
+ UiControllerClient.REQUEST_TIMEOUT_IN_MS = 30000;
@@ -16,9 +16,9 @@ var SupportedPlatform;
16
16
  SupportedPlatform["WIN32"] = "win32";
17
17
  })(SupportedPlatform || (SupportedPlatform = {}));
18
18
  const binarySubPathsByPlatform = {
19
- linux: ['linux', 'controlui-server.AppImage'],
20
- darwin: ['darwin', 'controlui-server.dmg'],
21
- win32: ['windows', 'controlui-server.exe'],
19
+ linux: ['linux', 'askui-ui-controller.AppImage'],
20
+ darwin: ['darwin', 'askui-ui-controller.dmg'],
21
+ win32: ['windows', 'askui-ui-controller.exe'],
22
22
  };
23
23
  function isSupportedPlatform(value) {
24
24
  return Object.values(SupportedPlatform).includes(value);
@@ -32,14 +32,14 @@ function platform() {
32
32
  }
33
33
  exports.platform = platform;
34
34
  function buildBinaryNotAvailbleError(binaryVersion) {
35
- return new Error(`It seems that the askui server binary version "${binaryVersion}" for your system "${platform()} ${os_1.default.arch}" is not availble, Please contact as at info@askui.com for more information`);
35
+ return new Error(`It seems that the UI Controller version "${binaryVersion}" for your system "${platform()} ${os_1.default.arch}" is not availble, Please contact as at info@askui.com for more information`);
36
36
  }
37
37
  function getBinaryPath(version) {
38
38
  return path_1.default.join(__dirname, '..', '..', 'release', version, ...binarySubPathsByPlatform[platform()]);
39
39
  }
40
40
  exports.getBinaryPath = getBinaryPath;
41
41
  function getBinaryDownloadUrl(binaryVersion) {
42
- const baseUrl = `https://askui-public.s3.eu-central-1.amazonaws.com/releases/controlui-server/${binaryVersion}`;
42
+ const baseUrl = `https://askui-public.s3.eu-central-1.amazonaws.com/releases/askui-ui-controller/${binaryVersion}`;
43
43
  const arch = os_1.default.arch();
44
44
  return `${baseUrl}/${platform()}/${arch}/${binarySubPathsByPlatform[platform()][1]}`;
45
45
  }
@@ -48,7 +48,7 @@ function downloadServerBinaries(binaryVersion) {
48
48
  const url = getBinaryDownloadUrl(binaryVersion);
49
49
  const binaryOutputPath = getBinaryPath(binaryVersion);
50
50
  const binaryFolder = path_1.default.dirname(binaryOutputPath);
51
- logger_1.logger.info(`Start downloading askui server binary version "${binaryVersion}"`);
51
+ logger_1.logger.info(`Start downloading UI Controller version "${binaryVersion}"`);
52
52
  if (!(fs_1.default.existsSync(binaryFolder))) {
53
53
  fs_1.default.mkdirSync(binaryFolder, { recursive: true });
54
54
  }
@@ -65,8 +65,8 @@ function downloadServerBinaries(binaryVersion) {
65
65
  reject(new Error('oops, an error during the downloaded occurred, try again with fresh install'));
66
66
  })
67
67
  .on('finish', () => {
68
- logger_1.logger.info(`askui server binary version ${binaryVersion} for your system "${platform()} ${os_1.default.arch}" was downloaded`);
69
- logger_1.logger.debug(`Binary of Control UI Server is located at "${binaryOutputPath}".`);
68
+ logger_1.logger.info(`UI Controller version ${binaryVersion} for your system "${platform()} ${os_1.default.arch}" was downloaded`);
69
+ logger_1.logger.debug(`Binary of UI Controller is located at "${binaryOutputPath}".`);
70
70
  resolve();
71
71
  });
72
72
  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,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.logger = exports.AskuiControlServer = exports.TimeoutError = exports.UnkownError = void 0;
3
+ exports.logger = exports.UiController = exports.TimeoutError = exports.UnkownError = void 0;
4
4
  var unkown_error_1 = require("./unkown-error");
5
5
  Object.defineProperty(exports, "UnkownError", { enumerable: true, get: function () { return unkown_error_1.UnkownError; } });
6
6
  var timeout_error_1 = require("./timeout-error");
7
7
  Object.defineProperty(exports, "TimeoutError", { enumerable: true, get: function () { return timeout_error_1.TimeoutError; } });
8
- var askui_control_server_1 = require("./askui-control-server");
9
- Object.defineProperty(exports, "AskuiControlServer", { enumerable: true, get: function () { return askui_control_server_1.AskuiControlServer; } });
8
+ var ui_controller_1 = require("./ui-controller");
9
+ Object.defineProperty(exports, "UiController", { enumerable: true, get: function () { return ui_controller_1.UiController; } });
10
10
  var logger_1 = require("./logger");
11
11
  Object.defineProperty(exports, "logger", { enumerable: true, get: function () { return logger_1.logger; } });
@@ -0,0 +1,2 @@
1
+ export declare class LibfuseError extends Error {
2
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LibfuseError = void 0;
4
+ class LibfuseError extends Error {
5
+ }
6
+ exports.LibfuseError = LibfuseError;
@@ -23,7 +23,7 @@ const stream = (0, pino_pretty_1.default)({
23
23
  const defaultLogLevel = 'info';
24
24
  const pinoLevel = isProcessEnvLogLevelValid() ? process.env['LOG_LEVEL'] : defaultLogLevel;
25
25
  const logger = (0, pino_1.default)({
26
- name: 'askuiClient',
26
+ name: 'askuiUiControlClient',
27
27
  level: pinoLevel,
28
28
  customLevels: {
29
29
  verbose: 5,
@@ -1,4 +1,2 @@
1
1
  export declare class TimeoutError extends Error {
2
- contructorName: string;
3
- constructor(message: string);
4
2
  }
@@ -2,10 +2,5 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TimeoutError = void 0;
4
4
  class TimeoutError extends Error {
5
- constructor(message) {
6
- super(message);
7
- this.contructorName = this.constructor.name;
8
- this.name = this.contructorName;
9
- }
10
5
  }
11
6
  exports.TimeoutError = TimeoutError;
@@ -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,23 +1,23 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const control_ui_server_args_1 = require("./control-ui-server-args");
3
+ const ui_controller_args_1 = require("./ui-controller-args");
4
4
  describe('createCliFlagsFromArgs()', () => {
5
5
  test('test createCliFlagsFromArgs should return -d 0 as default output', () => {
6
6
  const expected = ['-d 0', '-p 6769', '--host 127.0.0.1', '-m ', '--log-level debug'];
7
- const argsWithDefaults = (0, control_ui_server_args_1.createArgsWithDefaults)();
8
- const actual = (0, control_ui_server_args_1.createCliFlagsFromArgs)(argsWithDefaults);
7
+ const argsWithDefaults = (0, ui_controller_args_1.createArgsWithDefaults)();
8
+ const actual = (0, ui_controller_args_1.createCliFlagsFromArgs)(argsWithDefaults);
9
9
  expect(actual).toStrictEqual(expected);
10
10
  });
11
11
  test('test createCliFlagsFromArgs output should include -d 0 when no display was selected', () => {
12
12
  const expected = ['-d 0', '-p 6777', '--host 0.0.0.0', '-m ', '--log-level debug'];
13
- const argsWithDefaults = (0, control_ui_server_args_1.createArgsWithDefaults)({ port: 6777, host: '0.0.0.0' });
14
- const actual = (0, control_ui_server_args_1.createCliFlagsFromArgs)(argsWithDefaults);
13
+ const argsWithDefaults = (0, ui_controller_args_1.createArgsWithDefaults)({ port: 6777, host: '0.0.0.0' });
14
+ const actual = (0, ui_controller_args_1.createCliFlagsFromArgs)(argsWithDefaults);
15
15
  expect(actual).toStrictEqual(expected);
16
16
  });
17
17
  test('test createCliFlagsFromArgs output should include the display that was selected ', () => {
18
18
  const expected = ['-d 99', '-p 6777', '--host 0.0.0.0', '-m ', '--log-level debug'];
19
- const argsWithDefaults = (0, control_ui_server_args_1.createArgsWithDefaults)({ port: 6777, host: '0.0.0.0', display: 99 });
20
- const actual = (0, control_ui_server_args_1.createCliFlagsFromArgs)(argsWithDefaults);
19
+ const argsWithDefaults = (0, ui_controller_args_1.createArgsWithDefaults)({ port: 6777, host: '0.0.0.0', display: 99 });
20
+ const actual = (0, ui_controller_args_1.createCliFlagsFromArgs)(argsWithDefaults);
21
21
  expect(actual).toStrictEqual(expected);
22
22
  });
23
23
  });
@@ -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
+ }
@@ -3,18 +3,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.ControlUiServerDarwin = void 0;
6
+ exports.UiControllerDarwin = void 0;
7
7
  const child_process_1 = require("child_process");
8
8
  const fs_extra_1 = __importDefault(require("fs-extra"));
9
9
  const path_1 = __importDefault(require("path"));
10
- const control_ui_server_facade_1 = require("./control-ui-server-facade");
10
+ const ui_controller_facade_1 = require("./ui-controller-facade");
11
11
  const logger_1 = require("./logger");
12
- class ControlUiServerDarwin extends control_ui_server_facade_1.ControlUiServerFacade {
12
+ class UiControllerDarwin extends ui_controller_facade_1.UiControllerFacade {
13
13
  makeBinaryExecutable() {
14
14
  this.makeDiskImageExecutable();
15
15
  }
16
16
  getStartingCommand() {
17
- return `${path_1.default.dirname(this.binaryPath)}/controlui-server.app/Contents/MacOS/controlui-server`;
17
+ return `"${path_1.default.dirname(this.binaryPath)}/controlui-server.app/Contents/MacOS/controlui-server"`;
18
18
  }
19
19
  makeDiskImageExecutable() {
20
20
  const mountPoint = '/Volumes/controlui-server.dmg';
@@ -24,15 +24,15 @@ class ControlUiServerDarwin extends control_ui_server_facade_1.ControlUiServerFa
24
24
  '-quiet',
25
25
  '-noautofsck',
26
26
  '-noautoopen',
27
- `-mountpoint ${mountPoint}`,
28
- this.binaryPath,
27
+ `-mountpoint "${mountPoint}"`,
28
+ `"${this.binaryPath}"`,
29
29
  ].join(' '));
30
30
  const appBaseName = 'controlui-server.app';
31
31
  const appSrcPath = `${mountPoint}/${appBaseName}`;
32
32
  const appDestPath = `${path_1.default.dirname(this.binaryPath)}/${appBaseName}`;
33
33
  fs_extra_1.default.removeSync(appDestPath);
34
34
  fs_extra_1.default.copySync(appSrcPath, appDestPath);
35
- (0, child_process_1.exec)(`hdiutil detach ${mountPoint}`, (_exception, stdout) => logger_1.logger.debug(stdout));
35
+ (0, child_process_1.exec)(`hdiutil detach "${mountPoint}"`, (_exception, stdout) => logger_1.logger.debug(stdout));
36
36
  }
37
37
  }
38
- exports.ControlUiServerDarwin = ControlUiServerDarwin;
38
+ exports.UiControllerDarwin = UiControllerDarwin;
@@ -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
+ }
@@ -12,42 +12,43 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
12
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.ControlUiServerFacade = void 0;
15
+ exports.UiControllerFacade = void 0;
16
16
  const child_process_1 = require("child_process");
17
17
  const fs_extra_1 = __importDefault(require("fs-extra"));
18
18
  const wait_port_1 = __importDefault(require("wait-port"));
19
19
  const fkill_1 = __importDefault(require("fkill"));
20
20
  const os_1 = __importDefault(require("os"));
21
21
  const path_1 = __importDefault(require("path"));
22
- const control_ui_server_args_1 = require("./control-ui-server-args");
22
+ const ui_controller_args_1 = require("./ui-controller-args");
23
23
  const download_binaries_1 = require("./download-binaries");
24
24
  const logger_1 = require("./logger");
25
25
  const timeout_error_1 = require("./timeout-error");
26
26
  const unkown_error_1 = require("./unkown-error");
27
- class ControlUiServerFacade {
27
+ class UiControllerFacade {
28
28
  constructor() {
29
29
  this.binaryPath = (0, download_binaries_1.getBinaryPath)('latest');
30
30
  this.DefaultmaxWaitingForStartingInMs = 30 * 1000;
31
31
  }
32
32
  start(args, maxWaitingForStartingInSeconds) {
33
33
  return __awaiter(this, void 0, void 0, function* () {
34
- const argsWithDefaults = (0, control_ui_server_args_1.createArgsWithDefaults)(args);
34
+ yield this.runPreStartChecks();
35
+ const argsWithDefaults = (0, ui_controller_args_1.createArgsWithDefaults)(args);
35
36
  const argsWithLogPath = this.serverLogFilePath(argsWithDefaults);
36
37
  this.binaryPath = (0, download_binaries_1.getBinaryPath)(argsWithLogPath.binaryVersion);
37
38
  yield this.getBinary(argsWithLogPath.binaryVersion, argsWithLogPath.overWriteBinary);
38
39
  this.makeBinaryExecutable();
39
- logger_1.logger.debug(`AskuiServer log path "${this.serverLogFile}"`);
40
+ logger_1.logger.debug(`UI Controller log path "${this.serverLogFile}"`);
40
41
  yield this.startWithDefaults(argsWithLogPath, maxWaitingForStartingInSeconds);
41
42
  });
42
43
  }
43
44
  stop(args, forceStop) {
44
45
  return __awaiter(this, void 0, void 0, function* () {
45
46
  try {
46
- const argsWithDefaults = (0, control_ui_server_args_1.createArgsWithDefaults)(args);
47
+ const argsWithDefaults = (0, ui_controller_args_1.createArgsWithDefaults)(args);
47
48
  yield this.killPort(argsWithDefaults.port, forceStop);
48
49
  }
49
50
  catch (err) {
50
- throw new Error(`An unknown error occured while closing of the askui server. Log file: "${this.serverLogFile}". ErrorReason: ${err}`);
51
+ throw new Error(`An unknown error occured while closing of the UI Controller. Log file: "${this.serverLogFile}". ErrorReason: ${err}`);
51
52
  }
52
53
  });
53
54
  }
@@ -57,7 +58,7 @@ class ControlUiServerFacade {
57
58
  return args;
58
59
  }
59
60
  const tmpDir = fs_extra_1.default.mkdtempSync(path_1.default.join(os_1.default.tmpdir(), 'askui'));
60
- this.serverLogFile = path_1.default.join(tmpDir, 'askui-server.log');
61
+ this.serverLogFile = path_1.default.join(tmpDir, 'askui-ui-controller.log');
61
62
  const argPath = { logFilePath: this.serverLogFile };
62
63
  return Object.assign(argPath, args);
63
64
  }
@@ -69,13 +70,17 @@ class ControlUiServerFacade {
69
70
  });
70
71
  }
71
72
  getStartingCommand() {
72
- return this.binaryPath;
73
+ return `"${this.binaryPath}"`;
73
74
  }
74
75
  // eslint-disable-next-line class-methods-use-this
75
76
  makeBinaryExecutable() {
76
77
  /* Executable out of the box */
77
78
  }
78
79
  // eslint-disable-next-line class-methods-use-this
80
+ runPreStartChecks() {
81
+ return Promise.resolve();
82
+ }
83
+ // eslint-disable-next-line class-methods-use-this
79
84
  waitUntilStarted(args, maxWaitingForStartingInSeconds) {
80
85
  return new Promise((resolve, reject) => {
81
86
  try {
@@ -95,7 +100,7 @@ class ControlUiServerFacade {
95
100
  });
96
101
  }
97
102
  catch (err) {
98
- reject(new unkown_error_1.UnkownError(`An unknown error occured while waiting for the askui server: ${err}`));
103
+ reject(new unkown_error_1.UnkownError(`An unknown error occured while waiting for the UI Controller: ${err}`));
99
104
  }
100
105
  });
101
106
  }
@@ -107,25 +112,26 @@ class ControlUiServerFacade {
107
112
  getBinary(binaryVersion, overWriteBinary = false) {
108
113
  return __awaiter(this, void 0, void 0, function* () {
109
114
  if (!fs_extra_1.default.existsSync(this.binaryPath) || overWriteBinary || !this.isBinaryValid()) {
110
- logger_1.logger.debug(`Currently, no binary of the Control UI Server is available at "${this.binaryPath}"`);
115
+ logger_1.logger.debug(`Currently, no binary of the UI Controller is available at "${this.binaryPath}"`);
111
116
  yield (0, download_binaries_1.downloadServerBinaries)(binaryVersion);
112
117
  }
113
118
  else {
114
- logger_1.logger.debug(`Binary of Control UI Server is already present at "${this.binaryPath}".`);
119
+ logger_1.logger.debug(`Binary of UI Controller is already present at "${this.binaryPath}".`);
115
120
  }
116
121
  });
117
122
  }
118
123
  startWithDefaults(args, maxWaitingForStartingInSeconds) {
119
124
  return __awaiter(this, void 0, void 0, function* () {
120
125
  try {
121
- logger_1.logger.debug('Starting the Control UI Server...');
122
- (0, child_process_1.spawn)(this.getStartingCommand(), (0, control_ui_server_args_1.createCliFlagsFromArgs)(args), { shell: true });
126
+ logger_1.logger.debug('Starting the UI Controller...');
127
+ (0, child_process_1.spawn)(this.getStartingCommand(), (0, ui_controller_args_1.createCliFlagsFromArgs)(args), { shell: true });
123
128
  yield this.waitUntilStarted(args, maxWaitingForStartingInSeconds);
124
129
  }
125
130
  catch (err) {
126
- throw new Error(`The Control UI Server could not be started. Log file : ${this.serverLogFile}. ErrorReason: ${err}`);
131
+ throw new Error(`The UI Controller could not be started. Log file : ${this.serverLogFile}. ErrorReason: ${err}
132
+ Check this website for more information: https://docs.askui.com/docs/general/Troubleshooting/askui-ui-controller-starting-problems`);
127
133
  }
128
134
  });
129
135
  }
130
136
  }
131
- exports.ControlUiServerFacade = ControlUiServerFacade;
137
+ exports.UiControllerFacade = UiControllerFacade;
@@ -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,52 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.UiControllerLinux = void 0;
13
+ const child_process_1 = require("child_process");
14
+ const util_1 = require("util");
15
+ const ui_controller_facade_1 = require("./ui-controller-facade");
16
+ const logger_1 = require("./logger");
17
+ const wayland_error_1 = require("./wayland-error");
18
+ const libfuse_error_1 = require("./libfuse-error");
19
+ class UiControllerLinux extends ui_controller_facade_1.UiControllerFacade {
20
+ // eslint-disable-next-line class-methods-use-this
21
+ makeBinaryExecutable() {
22
+ (0, child_process_1.exec)(`chmod +x "${this.binaryPath}"`, (_exception, stdout) => logger_1.logger.debug(stdout));
23
+ }
24
+ // eslint-disable-next-line class-methods-use-this
25
+ runPreStartChecks() {
26
+ return __awaiter(this, void 0, void 0, function* () {
27
+ const runCommand = (0, util_1.promisify)(child_process_1.exec);
28
+ const waylandStatus = yield runCommand('echo $WAYLAND_DISPLAY');
29
+ if (waylandStatus.stdout.trim().includes('wayland')) {
30
+ throw new wayland_error_1.WaylandError('Wayland is not supported: https://docs.askui.com/docs/general/Troubleshooting/askui-ui-controller-starting-problems#wayland');
31
+ }
32
+ /* First we want to check if the user is using a debian distribution.
33
+ * and in the following if libfuse2 is installed.
34
+ * With Ubunutu 22.04 libfuse2 is not installed per default.
35
+ * For more information: https://discourse.joplinapp.org/t/appimage-incompatibility-in-ubuntu-22-04/25173
36
+ */
37
+ try {
38
+ yield runCommand('dpkg --version');
39
+ }
40
+ catch (err) {
41
+ return;
42
+ }
43
+ try {
44
+ yield runCommand('dpkg -s libfuse2 | grep Status');
45
+ }
46
+ catch (_a) {
47
+ throw new libfuse_error_1.LibfuseError('Libfuse2 package is missing: https://docs.askui.com/docs/general/Troubleshooting/askui-ui-controller-starting-problems#libfuse2');
48
+ }
49
+ });
50
+ }
51
+ }
52
+ exports.UiControllerLinux = UiControllerLinux;
@@ -0,0 +1,3 @@
1
+ import { UiControllerFacade } from './ui-controller-facade';
2
+ export declare class UiControllerWin32 extends UiControllerFacade {
3
+ }
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UiControllerWin32 = void 0;
4
+ const ui_controller_facade_1 = require("./ui-controller-facade");
5
+ class UiControllerWin32 extends ui_controller_facade_1.UiControllerFacade {
6
+ }
7
+ exports.UiControllerWin32 = UiControllerWin32;
@@ -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
+ }