@applitools/core 2.3.3 → 2.3.5
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 +14 -0
- package/dist/universal/core-server.js +25 -4
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 2.3.5 - 2023/2/17
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
- Improve logging in core server
|
|
9
|
+
### Bug fixes
|
|
10
|
+
- Fixed issue when core server was hanging if any command was called immediately after `Core.makeCore` command
|
|
11
|
+
- Fixed issue when `StaticDriver` and `StaticElement` were not recognized as a valid driver or element objects
|
|
12
|
+
|
|
13
|
+
## 2.3.4 - 2023/2/16
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
### Bug fixes
|
|
17
|
+
- Fixed ws types
|
|
18
|
+
|
|
5
19
|
## 2.3.3 - 2023/2/16
|
|
6
20
|
|
|
7
21
|
### Features
|
|
@@ -19,11 +19,18 @@ printStdout = false, ...handlerOptions } = {}) {
|
|
|
19
19
|
var _a, _b;
|
|
20
20
|
const logDirname = (_a = process.env.APPLITOOLS_LOG_DIR) !== null && _a !== void 0 ? _a : path_1.default.resolve(os_1.default.tmpdir(), `applitools-logs`);
|
|
21
21
|
const baseLogger = (0, logger_1.makeLogger)({
|
|
22
|
-
handler: { type: 'rolling file', name: '
|
|
23
|
-
label: '
|
|
22
|
+
handler: { type: 'rolling file', name: 'universal', dirname: logDirname },
|
|
23
|
+
label: 'core-universal',
|
|
24
24
|
level: 'info',
|
|
25
25
|
colors: false,
|
|
26
26
|
});
|
|
27
|
+
baseLogger.log('Core universal is going to be initialized with options', {
|
|
28
|
+
debug,
|
|
29
|
+
shutdownMode,
|
|
30
|
+
idleTimeout,
|
|
31
|
+
printStdout,
|
|
32
|
+
...handlerOptions,
|
|
33
|
+
});
|
|
27
34
|
const { server, port } = await (0, ws_server_1.makeServer)({ ...handlerOptions, debug });
|
|
28
35
|
// eslint-disable-next-line no-console
|
|
29
36
|
console.log(port); // NOTE: this is a part of the generic protocol
|
|
@@ -34,7 +41,7 @@ printStdout = false, ...handlerOptions } = {}) {
|
|
|
34
41
|
}
|
|
35
42
|
if (!printStdout)
|
|
36
43
|
process.stdout.write = () => true; // NOTE: prevent any write to stdout
|
|
37
|
-
baseLogger.log('
|
|
44
|
+
baseLogger.log('Core universal is started on port', port);
|
|
38
45
|
let idle;
|
|
39
46
|
let serverClosed = false;
|
|
40
47
|
if (shutdownMode === 'stdin') {
|
|
@@ -76,7 +83,7 @@ printStdout = false, ...handlerOptions } = {}) {
|
|
|
76
83
|
},
|
|
77
84
|
});
|
|
78
85
|
logger.console.log(`Logs saved in: ${logDirname}`);
|
|
79
|
-
const
|
|
86
|
+
const corePromise = socket.wait('Core.makeCore', ({ agentId, cwd, spec }) => {
|
|
80
87
|
return (0, core_1.makeCore)({
|
|
81
88
|
agentId: `eyes-universal/${require('../../package.json').version}/${agentId}`,
|
|
82
89
|
spec: spec === 'webdriver' ? spec_driver_webdriver_1.default : (0, spec_driver_1.makeSpec)({ socket, spec }),
|
|
@@ -85,36 +92,46 @@ printStdout = false, ...handlerOptions } = {}) {
|
|
|
85
92
|
});
|
|
86
93
|
});
|
|
87
94
|
socket.command('Core.getAccountInfo', async (options) => {
|
|
95
|
+
const core = await corePromise;
|
|
88
96
|
return core.getAccountInfo(options);
|
|
89
97
|
});
|
|
90
98
|
socket.command('Core.getViewportSize', async (options) => {
|
|
91
99
|
var _a;
|
|
100
|
+
const core = await corePromise;
|
|
92
101
|
return (_a = core.getViewportSize) === null || _a === void 0 ? void 0 : _a.call(core, options);
|
|
93
102
|
});
|
|
94
103
|
socket.command('Core.setViewportSize', async (options) => {
|
|
95
104
|
var _a;
|
|
105
|
+
const core = await corePromise;
|
|
96
106
|
return (_a = core.setViewportSize) === null || _a === void 0 ? void 0 : _a.call(core, options);
|
|
97
107
|
});
|
|
98
108
|
socket.command('Core.closeBatch', async (options) => {
|
|
109
|
+
const core = await corePromise;
|
|
99
110
|
return core.closeBatch(options);
|
|
100
111
|
});
|
|
101
112
|
socket.command('Core.deleteTest', async (options) => {
|
|
113
|
+
const core = await corePromise;
|
|
102
114
|
return core.deleteTest(options);
|
|
103
115
|
});
|
|
104
116
|
socket.command('Core.locate', async (options) => {
|
|
117
|
+
const core = await corePromise;
|
|
105
118
|
return core.locate(options);
|
|
106
119
|
});
|
|
107
120
|
socket.command('Core.locateText', async (options) => {
|
|
121
|
+
const core = await corePromise;
|
|
108
122
|
return core.locateText(options);
|
|
109
123
|
});
|
|
110
124
|
socket.command('Core.extractText', async (options) => {
|
|
125
|
+
const core = await corePromise;
|
|
111
126
|
return core.extractText(options);
|
|
112
127
|
});
|
|
113
128
|
socket.command('Core.makeECClient', async (options) => {
|
|
129
|
+
const core = await corePromise;
|
|
114
130
|
const client = await core.makeECClient(options);
|
|
115
131
|
return { url: client.url };
|
|
116
132
|
});
|
|
117
133
|
socket.command('Core.makeManager', async (options) => {
|
|
134
|
+
const core = await corePromise;
|
|
118
135
|
return refer.ref(await core.makeManager(options));
|
|
119
136
|
});
|
|
120
137
|
socket.command('EyesManager.openEyes', async ({ manager, ...options }) => {
|
|
@@ -133,6 +150,10 @@ printStdout = false, ...handlerOptions } = {}) {
|
|
|
133
150
|
var _a;
|
|
134
151
|
return (_a = refer.deref(eyes)) === null || _a === void 0 ? void 0 : _a.check(options);
|
|
135
152
|
});
|
|
153
|
+
socket.command('Eyes.checkAndClose', async ({ eyes, ...options }) => {
|
|
154
|
+
var _a;
|
|
155
|
+
return (_a = refer.deref(eyes)) === null || _a === void 0 ? void 0 : _a.checkAndClose(options);
|
|
156
|
+
});
|
|
136
157
|
socket.command('Eyes.close', async ({ eyes, ...options }) => {
|
|
137
158
|
var _a;
|
|
138
159
|
return (_a = refer.deref(eyes)) === null || _a === void 0 ? void 0 : _a.close(options);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/core",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.5",
|
|
4
4
|
"homepage": "https://applitools.com",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/applitools/eyes.sdk.javascript1/issues"
|
|
@@ -77,16 +77,17 @@
|
|
|
77
77
|
"@applitools/dom-capture": "11.2.1",
|
|
78
78
|
"@applitools/dom-snapshot": "4.7.3",
|
|
79
79
|
"@applitools/driver": "1.11.31",
|
|
80
|
-
"@applitools/ec-client": "1.2.
|
|
80
|
+
"@applitools/ec-client": "1.2.10",
|
|
81
81
|
"@applitools/logger": "1.1.46",
|
|
82
82
|
"@applitools/nml-client": "1.3.35",
|
|
83
83
|
"@applitools/req": "1.1.30",
|
|
84
84
|
"@applitools/screenshoter": "3.7.27",
|
|
85
85
|
"@applitools/snippets": "2.4.15",
|
|
86
|
-
"@applitools/socket": "1.0.
|
|
87
|
-
"@applitools/spec-driver-webdriver": "1.0.
|
|
86
|
+
"@applitools/socket": "1.0.8",
|
|
87
|
+
"@applitools/spec-driver-webdriver": "1.0.11",
|
|
88
88
|
"@applitools/ufg-client": "1.1.26",
|
|
89
89
|
"@applitools/utils": "1.3.30",
|
|
90
|
+
"@types/ws": "8.5.4",
|
|
90
91
|
"abort-controller": "3.0.0",
|
|
91
92
|
"chalk": "4.1.2",
|
|
92
93
|
"node-fetch": "2.6.7",
|
|
@@ -105,7 +106,6 @@
|
|
|
105
106
|
"@types/mocha": "^9.1.1",
|
|
106
107
|
"@types/node": "12",
|
|
107
108
|
"@types/selenium-webdriver": "^4.1.2",
|
|
108
|
-
"@types/ws": "^8.5.4",
|
|
109
109
|
"@types/yargs": "^17.0.22",
|
|
110
110
|
"chromedriver": "^106.0.0",
|
|
111
111
|
"mocha": "^10.0.0",
|