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 +39 -0
- package/lib/api/webSockets.js +4 -0
- package/lib/constants/lang.js +5 -0
- package/lib/texts.js +2 -0
- package/package.json +3 -4
- package/typeDefinition/constants/Langs.d.ts +5 -0
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';
|
package/lib/api/webSockets.js
CHANGED
|
@@ -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());
|
package/lib/constants/lang.js
CHANGED
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
|
|
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.
|
|
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.
|
|
111
|
+
"js-yaml": "^4.1.1",
|
|
113
112
|
"json5": "^2.2.3",
|
|
114
113
|
"keypress": "^0.2.1",
|
|
115
114
|
"moment": "^2.29.4",
|