@applitools/ec-client 1.2.5 → 1.2.7
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/dist/proxy-server.js +3 -3
- package/dist/tunnels/manager-client.js +5 -5
- package/package.json +11 -30
package/dist/proxy-server.js
CHANGED
|
@@ -61,7 +61,7 @@ async function makeServer({ settings, logger }) {
|
|
|
61
61
|
const sessions = new Map();
|
|
62
62
|
const queues = new Map();
|
|
63
63
|
const server = (0, http_1.createServer)(async (request, response) => {
|
|
64
|
-
var _a, _b, _c;
|
|
64
|
+
var _a, _b, _c, _d;
|
|
65
65
|
const url = request.url;
|
|
66
66
|
const requestLogger = serverLogger.extend({
|
|
67
67
|
tags: { request: `[${request.method}] ${request.url}`, requestId: utils.general.guid() },
|
|
@@ -93,8 +93,8 @@ async function makeServer({ settings, logger }) {
|
|
|
93
93
|
else if (request.method === 'GET' && /^\/session\/[^\/]+\/applitools\/metadata?$/.test(url)) {
|
|
94
94
|
const session = sessions.get(getSessionId(url));
|
|
95
95
|
requestLogger.log('Session metadata requested, returning', session.metadata);
|
|
96
|
-
response.writeHead(200).end(JSON.stringify({ value: session.metadata }));
|
|
97
|
-
session.metadata =
|
|
96
|
+
response.writeHead(200).end(JSON.stringify({ value: (_d = session.metadata) !== null && _d !== void 0 ? _d : [] }));
|
|
97
|
+
session.metadata = [];
|
|
98
98
|
}
|
|
99
99
|
else {
|
|
100
100
|
requestLogger.log('Passthrough request');
|
|
@@ -3,18 +3,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.makeTunnelManagerClient = void 0;
|
|
4
4
|
const manager_server_1 = require("./manager-server");
|
|
5
5
|
const socket_1 = require("@applitools/socket");
|
|
6
|
+
const net_1 = require("net");
|
|
6
7
|
async function makeTunnelManagerClient({ settings, } = {}) {
|
|
7
8
|
const path = process.env.APPLITOOLS_TUNNEL_MANAGER_SOCK ||
|
|
8
9
|
(process.platform === 'win32' ? '\\\\.\\pipe\\applitools-tunnel-manager' : '/tmp/applitools-tunnel-manager.sock');
|
|
9
|
-
const socket = (0, socket_1.makeSocket)(
|
|
10
|
-
socket.
|
|
11
|
-
socket.on('error', async (error) => {
|
|
10
|
+
const socket = (0, socket_1.makeSocket)((0, net_1.createConnection)({ path }), { transport: 'ipc' });
|
|
11
|
+
socket.once('error', async (error) => {
|
|
12
12
|
if (['ECONNREFUSED', 'ENOENT'].includes(error.code)) {
|
|
13
13
|
await (0, manager_server_1.makeTunnelManagerServerProcess)({ settings, path, unlink: error.code === 'ECONNREFUSED' });
|
|
14
|
-
socket.
|
|
14
|
+
socket.use((0, net_1.createConnection)({ path }));
|
|
15
15
|
}
|
|
16
16
|
});
|
|
17
|
-
socket.unref();
|
|
17
|
+
socket.once('ready', () => socket.target.unref());
|
|
18
18
|
return {
|
|
19
19
|
create: (options) => socket.request('Tunnel.create', options),
|
|
20
20
|
destroy: (options) => socket.request('Tunnel.destroy', options),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/ec-client",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.7",
|
|
4
4
|
"homepage": "https://applitools.com",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/applitools/eyes.sdk.javascript1/issues"
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
"types"
|
|
52
52
|
],
|
|
53
53
|
"scripts": {
|
|
54
|
-
"lint": "eslint '**/*.ts'",
|
|
55
|
-
"build": "tsc --project ./tsconfig.build.json",
|
|
54
|
+
"lint": "node ../../node_modules/.bin/eslint '**/*.ts'",
|
|
55
|
+
"build": "node ../../node_modules/.bin/tsc --project ./tsconfig.build.json",
|
|
56
56
|
"test": "mocha --no-timeouts -r ts-node/register ./test/**/*.spec.ts",
|
|
57
57
|
"test:sanity": "yarn test:it && yarn test:e2e",
|
|
58
58
|
"test:it": "mocha --no-timeouts -r ts-node/register ./test/it/*.spec.ts",
|
|
@@ -62,45 +62,26 @@
|
|
|
62
62
|
"version": "bongo version",
|
|
63
63
|
"postversion": "bongo postversion --skip-release-notification"
|
|
64
64
|
},
|
|
65
|
-
"husky": {
|
|
66
|
-
"hooks": {
|
|
67
|
-
"pre-push": "yarn bongo lint"
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
65
|
"dependencies": {
|
|
71
|
-
"@applitools/execution-grid-tunnel": "1.0.
|
|
72
|
-
"@applitools/logger": "1.1.
|
|
73
|
-
"@applitools/req": "1.1.
|
|
74
|
-
"@applitools/socket": "1.0.
|
|
75
|
-
"@applitools/utils": "1.3.
|
|
66
|
+
"@applitools/execution-grid-tunnel": "1.0.8",
|
|
67
|
+
"@applitools/logger": "1.1.45",
|
|
68
|
+
"@applitools/req": "1.1.30",
|
|
69
|
+
"@applitools/socket": "1.0.6",
|
|
70
|
+
"@applitools/utils": "1.3.30",
|
|
76
71
|
"abort-controller": "3.0.0",
|
|
77
|
-
"proxy-agent": "5.0.0",
|
|
78
|
-
"raw-body": "2.5.1",
|
|
79
72
|
"yargs": "17.6.2"
|
|
80
73
|
},
|
|
81
74
|
"devDependencies": {
|
|
82
|
-
"@applitools/bongo": "^2.2.
|
|
83
|
-
"@applitools/
|
|
84
|
-
"@applitools/test-server": "^1.1.22",
|
|
75
|
+
"@applitools/bongo": "^2.2.5",
|
|
76
|
+
"@applitools/test-server": "^1.1.25",
|
|
85
77
|
"@types/mocha": "^9.1.1",
|
|
86
78
|
"@types/node": "12",
|
|
87
79
|
"@types/node-fetch": "^2.6.1",
|
|
88
80
|
"@types/selenium-webdriver": "^4.0.19",
|
|
89
81
|
"@types/yargs": "^17.0.19",
|
|
90
|
-
"@typescript-eslint/eslint-plugin": "^5.22.0",
|
|
91
|
-
"@typescript-eslint/parser": "^5.22.0",
|
|
92
|
-
"eslint": "^8.14.0",
|
|
93
|
-
"eslint-config-prettier": "^8.5.0",
|
|
94
|
-
"eslint-plugin-mocha-no-only": "^1.1.1",
|
|
95
|
-
"eslint-plugin-node": "^11.1.0",
|
|
96
|
-
"eslint-plugin-prettier": "^4.0.0",
|
|
97
|
-
"husky": "^7.0.4",
|
|
98
82
|
"mocha": "^9.2.2",
|
|
99
83
|
"nock": "^13.2.4",
|
|
100
|
-
"
|
|
101
|
-
"selenium-webdriver": "^4.1.2",
|
|
102
|
-
"ts-node": "^10.7.0",
|
|
103
|
-
"typescript": "^4.9.4"
|
|
84
|
+
"selenium-webdriver": "^4.1.2"
|
|
104
85
|
},
|
|
105
86
|
"engines": {
|
|
106
87
|
"node": ">=12.13.0"
|