@applitools/ec-client 1.2.32 → 1.2.34
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 +33 -0
- package/dist/cli/cli.js +0 -0
- package/dist/commands/end-session.js +1 -1
- package/dist/commands/execute-script.js +7 -5
- package/dist/req-proxy.js +1 -1
- package/package.json +19 -28
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [1.2.34](https://github.com/applitools/eyes.sdk.javascript1/compare/js/ec-client@1.2.33...js/ec-client@1.2.34) (2023-06-15)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* solve mismatch between content type and body in some commands ([#1660](https://github.com/applitools/eyes.sdk.javascript1/issues/1660)) ([8d1d486](https://github.com/applitools/eyes.sdk.javascript1/commit/8d1d4863d09af8266e93c59f99fa9f5a497652a9))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* dependencies
|
|
15
|
+
* @applitools/core-base bumped from 1.1.57 to 1.1.58
|
|
16
|
+
* @applitools/req bumped from 1.3.1 to 1.3.2
|
|
17
|
+
* @applitools/socket bumped from 1.1.2 to 1.1.3
|
|
18
|
+
|
|
19
|
+
## [1.2.33](https://github.com/applitools/eyes.sdk.javascript1/compare/js/ec-client-v1.2.32...js/ec-client@1.2.33) (2023-06-13)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Dependencies
|
|
23
|
+
|
|
24
|
+
* update some dependencies
|
|
25
|
+
* The following workspace dependencies were updated
|
|
26
|
+
* dependencies
|
|
27
|
+
* @applitools/core-base bumped from 1.1.56 to 1.1.57
|
|
28
|
+
* @applitools/driver bumped from 1.12.1 to 1.12.2
|
|
29
|
+
* @applitools/logger bumped from 2.0.2 to 2.0.3
|
|
30
|
+
* @applitools/req bumped from 1.3.0 to 1.3.1
|
|
31
|
+
* @applitools/socket bumped from 1.1.1 to 1.1.2
|
|
32
|
+
* @applitools/spec-driver-webdriver bumped from 1.0.33 to 1.0.34
|
|
33
|
+
* @applitools/utils bumped from 1.3.37 to 1.4.0
|
package/dist/cli/cli.js
CHANGED
|
File without changes
|
|
@@ -6,7 +6,7 @@ function makeEndSession({ req, tunnels }) {
|
|
|
6
6
|
var _a, _b;
|
|
7
7
|
var _c;
|
|
8
8
|
logger.log(`Request was intercepted with sessionId:`, session.sessionId);
|
|
9
|
-
await req(request.url, { io: { request, response }, logger });
|
|
9
|
+
await req(request.url, { body: null, io: { request, response }, logger });
|
|
10
10
|
if ((_a = session.tests) === null || _a === void 0 ? void 0 : _a.current) {
|
|
11
11
|
await session.tests.current.abort({ settings: { testMetadata: session.metadata }, logger });
|
|
12
12
|
(_b = (_c = session.tests).ended) !== null && _b !== void 0 ? _b : (_c.ended = []);
|
|
@@ -72,7 +72,7 @@ function makeExecuteScript({ req, core }) {
|
|
|
72
72
|
},
|
|
73
73
|
logger,
|
|
74
74
|
});
|
|
75
|
-
response.writeHead(200).end(JSON.stringify({ value: null }));
|
|
75
|
+
response.writeHead(200, { 'content-type': 'application/json' }).end(JSON.stringify({ value: null }));
|
|
76
76
|
return;
|
|
77
77
|
}
|
|
78
78
|
else if (requestBody.script === 'applitools:endTest') {
|
|
@@ -85,22 +85,24 @@ function makeExecuteScript({ req, core }) {
|
|
|
85
85
|
session.tests.ended.push(session.tests.current);
|
|
86
86
|
session.tests.current = undefined;
|
|
87
87
|
}
|
|
88
|
-
response.writeHead(200).end(JSON.stringify({ value: null }));
|
|
88
|
+
response.writeHead(200, { 'content-type': 'application/json' }).end(JSON.stringify({ value: null }));
|
|
89
89
|
return;
|
|
90
90
|
}
|
|
91
91
|
else if (requestBody.script === 'applitools:getResults') {
|
|
92
92
|
if ((_q = session.tests) === null || _q === void 0 ? void 0 : _q.ended) {
|
|
93
93
|
const results = await Promise.all(session.tests.ended.map(test => test.getResults({ logger })));
|
|
94
|
-
response.writeHead(200).end(JSON.stringify({ value: results.flat() }));
|
|
94
|
+
response.writeHead(200, { 'content-type': 'application/json' }).end(JSON.stringify({ value: results.flat() }));
|
|
95
95
|
}
|
|
96
96
|
else {
|
|
97
|
-
response.writeHead(200).end(JSON.stringify({ value: [] }));
|
|
97
|
+
response.writeHead(200, { 'content-type': 'application/json' }).end(JSON.stringify({ value: [] }));
|
|
98
98
|
}
|
|
99
99
|
return;
|
|
100
100
|
}
|
|
101
101
|
else if (requestBody.script === 'applitools:metadata') {
|
|
102
102
|
logger.log('Session metadata requested, returning', session.metadata);
|
|
103
|
-
response
|
|
103
|
+
response
|
|
104
|
+
.writeHead(200, { 'content-type': 'application/json' })
|
|
105
|
+
.end(JSON.stringify({ value: (_r = session.metadata) !== null && _r !== void 0 ? _r : [] }));
|
|
104
106
|
session.metadata = [];
|
|
105
107
|
return;
|
|
106
108
|
}
|
package/dist/req-proxy.js
CHANGED
|
@@ -44,7 +44,7 @@ function makeReqProxy(config) {
|
|
|
44
44
|
(_d = options.body) !== null && _d !== void 0 ? _d : (options.body = utils.streams.persist(options.io.request));
|
|
45
45
|
}
|
|
46
46
|
if (options.body && !utils.types.isFunction(options.body, 'pipe')) {
|
|
47
|
-
options.headers['content-length'] = Buffer.byteLength(utils.types.isArray(options.body) || utils.types.isPlainObject(options.body)
|
|
47
|
+
options.headers['content-length'] = Buffer.byteLength(utils.types.isArray(options.body) || utils.types.isPlainObject(options.body) || options.body === null
|
|
48
48
|
? JSON.stringify(options.body)
|
|
49
49
|
: options.body).toString();
|
|
50
50
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/ec-client",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.34",
|
|
4
4
|
"homepage": "https://applitools.com",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/applitools/eyes.sdk.javascript1/issues"
|
|
@@ -15,12 +15,6 @@
|
|
|
15
15
|
"name": "Applitools Team",
|
|
16
16
|
"email": "team@applitools.com"
|
|
17
17
|
},
|
|
18
|
-
"aliases": [
|
|
19
|
-
"ec-client",
|
|
20
|
-
"ecc",
|
|
21
|
-
"eg-client",
|
|
22
|
-
"egc"
|
|
23
|
-
],
|
|
24
18
|
"exports": {
|
|
25
19
|
".": {
|
|
26
20
|
"types": "./types/index.d.ts",
|
|
@@ -51,32 +45,26 @@
|
|
|
51
45
|
"types"
|
|
52
46
|
],
|
|
53
47
|
"scripts": {
|
|
54
|
-
"lint": "
|
|
55
|
-
"build": "
|
|
56
|
-
"test": "
|
|
57
|
-
"test:e2e": "MOCHA_GROUP=e2e
|
|
58
|
-
"test:it": "MOCHA_GROUP=it
|
|
59
|
-
"test:sanity": "yarn test",
|
|
60
|
-
"deps": "bongo deps",
|
|
61
|
-
"preversion": "bongo preversion",
|
|
62
|
-
"version": "bongo version",
|
|
63
|
-
"postversion": "bongo postversion"
|
|
48
|
+
"lint": "run --top-level eslint '**/*.ts'",
|
|
49
|
+
"build": "run --top-level tsc --project ./tsconfig.build.json",
|
|
50
|
+
"test": "run --top-level mocha './test/**/*.spec.ts' --parallel --jobs ${MOCHA_JOBS:-15}",
|
|
51
|
+
"test:e2e": "MOCHA_GROUP=e2e run --top-level mocha './test/e2e/*.spec.ts'",
|
|
52
|
+
"test:it": "MOCHA_GROUP=it run --top-level mocha './test/it/*.spec.ts'"
|
|
64
53
|
},
|
|
65
54
|
"dependencies": {
|
|
66
|
-
"@applitools/core-base": "1.1.
|
|
67
|
-
"@applitools/driver": "1.12.
|
|
55
|
+
"@applitools/core-base": "1.1.58",
|
|
56
|
+
"@applitools/driver": "1.12.2",
|
|
68
57
|
"@applitools/execution-grid-tunnel": "2.1.0",
|
|
69
|
-
"@applitools/logger": "2.0.
|
|
70
|
-
"@applitools/req": "1.3.
|
|
71
|
-
"@applitools/socket": "1.1.
|
|
72
|
-
"@applitools/spec-driver-webdriver": "1.0.
|
|
73
|
-
"@applitools/utils": "1.
|
|
58
|
+
"@applitools/logger": "2.0.3",
|
|
59
|
+
"@applitools/req": "1.3.2",
|
|
60
|
+
"@applitools/socket": "1.1.3",
|
|
61
|
+
"@applitools/spec-driver-webdriver": "1.0.34",
|
|
62
|
+
"@applitools/utils": "1.4.0",
|
|
74
63
|
"abort-controller": "3.0.0",
|
|
75
64
|
"webdriver": "7",
|
|
76
|
-
"yargs": "17.
|
|
65
|
+
"yargs": "^17.7.2"
|
|
77
66
|
},
|
|
78
67
|
"devDependencies": {
|
|
79
|
-
"@applitools/bongo": "^4.0.0",
|
|
80
68
|
"@applitools/test-server": "^1.2.2",
|
|
81
69
|
"@applitools/test-utils": "^1.5.17",
|
|
82
70
|
"@types/node": "^12.20.55",
|
|
@@ -84,9 +72,12 @@
|
|
|
84
72
|
"@types/selenium-webdriver": "^4.0.19",
|
|
85
73
|
"@types/yargs": "^17.0.19",
|
|
86
74
|
"nock": "^13.2.4",
|
|
87
|
-
"selenium-webdriver": "^4.
|
|
75
|
+
"selenium-webdriver": "^4.10.0"
|
|
88
76
|
},
|
|
89
77
|
"engines": {
|
|
90
78
|
"node": ">=12.13.0"
|
|
79
|
+
},
|
|
80
|
+
"publishConfig": {
|
|
81
|
+
"access": "public"
|
|
91
82
|
}
|
|
92
|
-
}
|
|
83
|
+
}
|