@applitools/nml-client 1.9.7 → 1.11.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.
- package/CHANGELOG.md +76 -0
- package/dist/client.js +2 -0
- package/dist/pre-rescale-activity.js +9 -0
- package/dist/server/requests.js +22 -0
- package/package.json +7 -7
- package/types/pre-rescale-activity.d.ts +10 -0
- package/types/server/requests.d.ts +3 -0
- package/types/types.d.ts +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,81 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.11.0](https://github.com/Applitools-Dev/sdk/compare/js/nml-client@1.10.0...js/nml-client@1.11.0) (2025-07-30)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* release java ([7bc39e6](https://github.com/Applitools-Dev/sdk/commit/7bc39e679eab27a19322ca4b121177da7437c106))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* @applitools/utils bumped to 1.10.0
|
|
14
|
+
#### Features
|
|
15
|
+
|
|
16
|
+
* release java ([7bc39e6](https://github.com/Applitools-Dev/sdk/commit/7bc39e679eab27a19322ca4b121177da7437c106))
|
|
17
|
+
* @applitools/logger bumped to 2.2.0
|
|
18
|
+
#### Features
|
|
19
|
+
|
|
20
|
+
* release java ([7bc39e6](https://github.com/Applitools-Dev/sdk/commit/7bc39e679eab27a19322ca4b121177da7437c106))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
* @applitools/req bumped to 1.8.0
|
|
25
|
+
#### Features
|
|
26
|
+
|
|
27
|
+
* release java ([7bc39e6](https://github.com/Applitools-Dev/sdk/commit/7bc39e679eab27a19322ca4b121177da7437c106))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
* @applitools/image bumped to 1.2.0
|
|
32
|
+
#### Features
|
|
33
|
+
|
|
34
|
+
* release java ([7bc39e6](https://github.com/Applitools-Dev/sdk/commit/7bc39e679eab27a19322ca4b121177da7437c106))
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
* @applitools/snippets bumped to 2.7.0
|
|
39
|
+
#### Features
|
|
40
|
+
|
|
41
|
+
* release java ([7bc39e6](https://github.com/Applitools-Dev/sdk/commit/7bc39e679eab27a19322ca4b121177da7437c106))
|
|
42
|
+
* @applitools/driver bumped to 1.23.0
|
|
43
|
+
#### Features
|
|
44
|
+
|
|
45
|
+
* release java ([7bc39e6](https://github.com/Applitools-Dev/sdk/commit/7bc39e679eab27a19322ca4b121177da7437c106))
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
* @applitools/spec-driver-webdriver bumped to 1.4.0
|
|
50
|
+
#### Features
|
|
51
|
+
|
|
52
|
+
* release java ([7bc39e6](https://github.com/Applitools-Dev/sdk/commit/7bc39e679eab27a19322ca4b121177da7437c106))
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
* @applitools/core-base bumped to 1.27.0
|
|
57
|
+
#### Features
|
|
58
|
+
|
|
59
|
+
* release java ([7bc39e6](https://github.com/Applitools-Dev/sdk/commit/7bc39e679eab27a19322ca4b121177da7437c106))
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
## [1.10.0](https://github.com/Applitools-Dev/sdk/compare/js/nml-client@1.9.7...js/nml-client@1.10.0) (2025-07-23)
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
### Features
|
|
68
|
+
|
|
69
|
+
* android multi target | AD-9868 ([#2943](https://github.com/Applitools-Dev/sdk/issues/2943)) ([808aa21](https://github.com/Applitools-Dev/sdk/commit/808aa21e489c3562b93006e2e26ff7ffbb743dd6))
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
### Dependencies
|
|
73
|
+
|
|
74
|
+
* @applitools/core-base bumped to 1.26.0
|
|
75
|
+
#### Features
|
|
76
|
+
|
|
77
|
+
* batch properties limit | FLD-3174 ([#3080](https://github.com/Applitools-Dev/sdk/issues/3080)) ([feb9e79](https://github.com/Applitools-Dev/sdk/commit/feb9e79d79f5eab3c58eac2b4ef3c15a562f079c))
|
|
78
|
+
|
|
3
79
|
## [1.9.7](https://github.com/Applitools-Dev/sdk/compare/js/nml-client@1.9.6...js/nml-client@1.9.7) (2025-07-15)
|
|
4
80
|
|
|
5
81
|
|
package/dist/client.js
CHANGED
|
@@ -6,10 +6,12 @@ const requests_1 = require("./server/requests");
|
|
|
6
6
|
const take_snapshots_1 = require("./take-snapshots");
|
|
7
7
|
const take_screenshots_1 = require("./take-screenshots");
|
|
8
8
|
const pre_take_screenshot_1 = require("./pre-take-screenshot");
|
|
9
|
+
const pre_rescale_activity_1 = require("./pre-rescale-activity");
|
|
9
10
|
function makeNMLClient({ settings, logger: defaultLogger, }) {
|
|
10
11
|
const logger = (0, logger_1.makeLogger)({ logger: defaultLogger, format: { label: 'nml-client' } });
|
|
11
12
|
const requests = (0, requests_1.makeNMLRequests)({ settings, logger });
|
|
12
13
|
return {
|
|
14
|
+
preRescaleActivity: (0, pre_rescale_activity_1.makePreRescaleActivity)({ requests, logger }),
|
|
13
15
|
preTakeScreenshot: (0, pre_take_screenshot_1.makePreTakeScreenshot)({ requests, logger }),
|
|
14
16
|
takeScreenshots: (0, take_screenshots_1.makeTakeScreenshots)({ requests, logger }),
|
|
15
17
|
takeSnapshots: (0, take_snapshots_1.makeTakeSnapshots)({ requests, logger }),
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makePreRescaleActivity = void 0;
|
|
4
|
+
function makePreRescaleActivity({ requests, logger: defaultLogger }) {
|
|
5
|
+
return async function preRescaleActivity({ logger = defaultLogger }) {
|
|
6
|
+
return requests.preRescaleActivity({ logger });
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
exports.makePreRescaleActivity = makePreRescaleActivity;
|
package/dist/server/requests.js
CHANGED
|
@@ -33,10 +33,32 @@ function makeNMLRequests({ settings, logger: mainLogger, }) {
|
|
|
33
33
|
const proxy = settings.proxy;
|
|
34
34
|
const req = (0, req_broker_1.makeReqBroker)({ settings, logger: mainLogger });
|
|
35
35
|
return {
|
|
36
|
+
preRescaleActivity,
|
|
36
37
|
preTakeScreenshot,
|
|
37
38
|
takeScreenshots,
|
|
38
39
|
takeSnapshots,
|
|
39
40
|
};
|
|
41
|
+
async function preRescaleActivity({ logger = mainLogger } = {}) {
|
|
42
|
+
var _a;
|
|
43
|
+
logger = logger.extend(mainLogger, { tags: [`nml-request-${utils.general.shortid()}`] });
|
|
44
|
+
logger.log('Request "preRescaleActivity" called');
|
|
45
|
+
const response = await req(brokerUrl, {
|
|
46
|
+
name: 'PRE_RESCALE_ACTIVITY',
|
|
47
|
+
body: {
|
|
48
|
+
protocolVersion: '1.0',
|
|
49
|
+
name: 'PRE_RESCALE_ACTIVITY',
|
|
50
|
+
key: utils.general.guid(),
|
|
51
|
+
payload: {},
|
|
52
|
+
},
|
|
53
|
+
logger,
|
|
54
|
+
});
|
|
55
|
+
const result = await response.json();
|
|
56
|
+
if (((_a = result === null || result === void 0 ? void 0 : result.payload) === null || _a === void 0 ? void 0 : _a.result) === 'success')
|
|
57
|
+
logger.log('Request "preRescaleActivity" finished successfully with body', result.payload);
|
|
58
|
+
else
|
|
59
|
+
throw new Error(`There was a problem in preRescaleActivity. The provided error message was "${result}"`);
|
|
60
|
+
brokerUrl = result.nextPath;
|
|
61
|
+
}
|
|
40
62
|
async function preTakeScreenshot({ logger = mainLogger } = {}) {
|
|
41
63
|
var _a;
|
|
42
64
|
logger = logger.extend(mainLogger, { tags: [`nml-request-${utils.general.shortid()}`] });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/nml-client",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.0",
|
|
4
4
|
"description": "Client to integrate the SDKs to the Native Mobile Library (NML)",
|
|
5
5
|
"homepage": "https://applitools.com",
|
|
6
6
|
"bugs": {
|
|
@@ -36,13 +36,13 @@
|
|
|
36
36
|
"test": "run --top-level mocha './test/**/*.spec.ts' --parallel --jobs ${MOCHA_JOBS:-15}"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@applitools/logger": "2.
|
|
40
|
-
"@applitools/req": "1.
|
|
41
|
-
"@applitools/utils": "1.
|
|
39
|
+
"@applitools/logger": "2.2.0",
|
|
40
|
+
"@applitools/req": "1.8.0",
|
|
41
|
+
"@applitools/utils": "1.10.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@applitools/core-base": "1.
|
|
45
|
-
"@applitools/spec-driver-webdriver": "^1.
|
|
44
|
+
"@applitools/core-base": "1.27.0",
|
|
45
|
+
"@applitools/spec-driver-webdriver": "^1.4.0",
|
|
46
46
|
"@applitools/test-server": "^1.2.3",
|
|
47
47
|
"@applitools/test-utils": "^1.5.17",
|
|
48
48
|
"@types/node": "^12.20.55",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"webdriver": "^7.31.1"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
|
-
"@applitools/core-base": "1.
|
|
53
|
+
"@applitools/core-base": "1.27.0"
|
|
54
54
|
},
|
|
55
55
|
"engines": {
|
|
56
56
|
"node": ">=12.13.0"
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type Logger } from '@applitools/logger';
|
|
2
|
+
import { type NMLRequests } from './server/requests';
|
|
3
|
+
type Options = {
|
|
4
|
+
requests: NMLRequests;
|
|
5
|
+
logger: Logger;
|
|
6
|
+
};
|
|
7
|
+
export declare function makePreRescaleActivity({ requests, logger: defaultLogger }: Options): ({ logger }: {
|
|
8
|
+
logger?: Logger | undefined;
|
|
9
|
+
}) => Promise<void>;
|
|
10
|
+
export {};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import type { BrokerServerSettings, ScreenshotSettings, Screenshot, SnapshotSettings, IOSSnapshot, AndroidSnapshot } from '../types';
|
|
2
2
|
import { type Logger } from '@applitools/logger';
|
|
3
3
|
export interface NMLRequests {
|
|
4
|
+
preRescaleActivity(options: {
|
|
5
|
+
logger?: Logger;
|
|
6
|
+
}): Promise<void>;
|
|
4
7
|
preTakeScreenshot(options: {
|
|
5
8
|
logger?: Logger;
|
|
6
9
|
}): Promise<void>;
|
package/types/types.d.ts
CHANGED
|
@@ -3,6 +3,9 @@ import type { TestError } from '@applitools/core-base';
|
|
|
3
3
|
import { type Logger } from '@applitools/logger';
|
|
4
4
|
import { type Proxy } from '@applitools/req';
|
|
5
5
|
export interface NMLClient {
|
|
6
|
+
preRescaleActivity(options: {
|
|
7
|
+
logger?: Logger;
|
|
8
|
+
}): Promise<void>;
|
|
6
9
|
preTakeScreenshot(options: {
|
|
7
10
|
logger?: Logger;
|
|
8
11
|
}): Promise<void>;
|