suitest-js-api 4.1.0 → 4.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -348,6 +348,45 @@ declare namespace suitest {
348
348
  isHtmlBased: boolean;
349
349
  }
350
350
 
351
+ type DeviceId = string;
352
+ type PresetDevice = DeviceId | {
353
+ deviceId: DeviceId;
354
+ };
355
+
356
+ type ConfigId = string;
357
+ type PresetConfig = ConfigId | (ConfigOverride & {
358
+ configId: ConfigId;
359
+ });
360
+
361
+ type PresetsMap = Record<string, {
362
+ device: PresetDevice;
363
+ config: PresetConfig;
364
+ }>;
365
+
366
+ interface SuitestLauncherConfiguration {
367
+ extends?: string;
368
+ tokenId?: string;
369
+ tokenPassword?: string;
370
+ concurrency?: number;
371
+ preset?: string[];
372
+ presets?: PresetsMap;
373
+ deviceId?: string;
374
+ appConfigId?: string;
375
+ inspect?: number | boolean | string;
376
+ inspectBrk?: number | boolean | string;
377
+ logLevel?: ConfigureOptions['logLevel'];
378
+ logDir?: string;
379
+ timestamp?: string;
380
+ configFile?: string;
381
+ overrideConfigFile?: string;
382
+ disallowCrashReports?: boolean;
383
+ defaultTimeout?: number;
384
+ screenshotDir?: string;
385
+ includeChangelist?: boolean;
386
+ recordingOption?: ConfigureOptions['recordingOption'];
387
+ webhookUrl?: string;
388
+ }
389
+
351
390
  interface ConfigureOptions {
352
391
  logLevel: 'silent'|'normal'|'verbose'|'debug'|'silly';
353
392
  recordingOption: 'autostart'|'manualstart'|'none';
@@ -89,6 +89,10 @@ const webSocketsFactory = (self) => {
89
89
  throw new SuitestError(texts.testingMinutesExceededMessage());
90
90
  }
91
91
 
92
+ if (content.type === 'releasingDevice') {
93
+ throw new SuitestError(texts.releasingDeviceMessage());
94
+ }
95
+
92
96
  if (content.type === 'executorStopped') {
93
97
  // Notify user about executor being stopped
94
98
  throw new SuitestError(texts.executorStopped());
@@ -12,6 +12,11 @@ const LANG = {
12
12
  ARABIC: 'ara',
13
13
  HEBREW: 'heb',
14
14
  PORTUGUESE: 'por',
15
+ NORWEGIAN: 'nor',
16
+ SWEDISH: 'swe',
17
+ FINNISH: 'fin',
18
+ DANISH: 'dan',
19
+ HUNGARIAN: 'hun',
15
20
  };
16
21
 
17
22
  Object.freeze(LANG);
package/lib/texts.js CHANGED
@@ -164,6 +164,8 @@ ${leaves}`,
164
164
 
165
165
  testingMinutesExceededMessage: () => 'You reached the limit of testing minutes specified by your subscription plan. If you need more minutes, contact us at sales@suite.st or upgrade your subscription.',
166
166
 
167
+ releasingDeviceMessage: () => 'The device has been disconnected.',
168
+
167
169
  // ipc
168
170
  ipcFailedToCreateServer: template`Failed to create IPC server. Port ${0} is busy.`,
169
171
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "suitest-js-api",
3
- "version": "4.1.0",
3
+ "version": "4.2.1",
4
4
  "main": "index.js",
5
5
  "repository": "github:SuitestAutomation/suitest-js-api",
6
6
  "author": "Suitest <hello@suite.st>",
@@ -86,7 +86,6 @@
86
86
  "typings": "index.d.ts",
87
87
  "devDependencies": {
88
88
  "eslint": "^7.1.0",
89
- "express": "^4.17.1",
90
89
  "husky": "^4.2.5",
91
90
  "mocha": "^10.2.0",
92
91
  "mock-fs": "^5.1.0",
@@ -100,7 +99,7 @@
100
99
  },
101
100
  "dependencies": {
102
101
  "@suitest/smst-to-text": "^4.28.5",
103
- "@suitest/translate": "^4.30.0",
102
+ "@suitest/translate": "^4.31.0",
104
103
  "@types/node": "^14.0.10",
105
104
  "ajv": "^6.12.2",
106
105
  "ansi-regex": "^5.0.0",
@@ -109,7 +108,7 @@
109
108
  "compare-versions": "^3.6.0",
110
109
  "escape-string-regexp": "4.0.0",
111
110
  "ini": "^2.0.0",
112
- "js-yaml": "^4.1.0",
111
+ "js-yaml": "^4.1.1",
113
112
  "json5": "^2.2.3",
114
113
  "keypress": "^0.2.1",
115
114
  "moment": "^2.29.4",
@@ -12,4 +12,9 @@ export type Lang = {
12
12
  ARABIC: 'ara',
13
13
  HEBREW: 'heb',
14
14
  PORTUGUESE: 'por',
15
+ NORWEGIAN: 'nor',
16
+ SWEDISH: 'swe',
17
+ FINNISH: 'fin',
18
+ DANISH: 'dan',
19
+ HUNGARIAN: 'hun',
15
20
  };