@applitools/core 3.0.2 → 3.0.3
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
CHANGED
package/dist/automation/types.js
CHANGED
|
@@ -1,17 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("@applitools/core-base/types"), exports);
|
package/dist/cli/cli.js
CHANGED
|
@@ -103,12 +103,12 @@ yargs_1.default
|
|
|
103
103
|
}),
|
|
104
104
|
handler: async (args) => {
|
|
105
105
|
if (args.fork) {
|
|
106
|
-
const { port } = await (0, core_server_process_1.makeCoreServerProcess)({ ...args, fork: false });
|
|
106
|
+
const { port } = await (0, core_server_process_1.makeCoreServerProcess)({ ...args, fork: false, isProcess: true });
|
|
107
107
|
// eslint-disable-next-line no-console
|
|
108
108
|
console.log(port); // NOTE: this is a part of the generic protocol
|
|
109
109
|
}
|
|
110
110
|
else {
|
|
111
|
-
(0, core_server_1.makeCoreServer)({ ...args, ...args.config });
|
|
111
|
+
(0, core_server_1.makeCoreServer)({ ...args, ...args.config, isProcess: true });
|
|
112
112
|
}
|
|
113
113
|
},
|
|
114
114
|
})
|
|
@@ -15,7 +15,7 @@ const history_1 = require("./history");
|
|
|
15
15
|
const os_1 = __importDefault(require("os"));
|
|
16
16
|
const path_1 = __importDefault(require("path"));
|
|
17
17
|
async function makeCoreServer({ debug = false, shutdownMode = 'lazy', idleTimeout = 900000, // 15min
|
|
18
|
-
printStdout = false, ...handlerOptions } = {}) {
|
|
18
|
+
printStdout = false, isProcess = 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)({
|
|
@@ -31,9 +31,11 @@ printStdout = false, ...handlerOptions } = {}) {
|
|
|
31
31
|
...handlerOptions,
|
|
32
32
|
});
|
|
33
33
|
const { server, port } = await (0, ws_server_1.makeServer)({ ...handlerOptions, debug });
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
if (isProcess) {
|
|
35
|
+
// eslint-disable-next-line no-console
|
|
36
|
+
console.log(port); // NOTE: this is a part of the generic protocol
|
|
37
|
+
(_b = process.send) === null || _b === void 0 ? void 0 : _b.call(process, { name: 'port', payload: { port } }); // NOTE: this is a part of the js specific protocol
|
|
38
|
+
}
|
|
37
39
|
if (!server) {
|
|
38
40
|
baseLogger.console.log(`You are trying to spawn a duplicated server, use the server on port ${port} instead`);
|
|
39
41
|
return { port };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/core",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.3",
|
|
4
4
|
"homepage": "https://applitools.com",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/applitools/eyes.sdk.javascript1/issues"
|
|
@@ -36,6 +36,9 @@
|
|
|
36
36
|
},
|
|
37
37
|
"main": "./dist/index.js",
|
|
38
38
|
"types": "./types/index.d.ts",
|
|
39
|
+
"browser": {
|
|
40
|
+
"@applitools/ec-client": false
|
|
41
|
+
},
|
|
39
42
|
"files": [
|
|
40
43
|
"dist",
|
|
41
44
|
"types"
|
|
@@ -87,7 +90,7 @@
|
|
|
87
90
|
"@applitools/snippets": "2.4.21",
|
|
88
91
|
"@applitools/socket": "1.1.0",
|
|
89
92
|
"@applitools/spec-driver-webdriver": "1.0.32",
|
|
90
|
-
"@applitools/ufg-client": "1.2.
|
|
93
|
+
"@applitools/ufg-client": "1.2.16",
|
|
91
94
|
"@applitools/utils": "1.3.37",
|
|
92
95
|
"@types/ws": "8.5.4",
|
|
93
96
|
"abort-controller": "3.0.0",
|
|
@@ -2,7 +2,7 @@ import type { MaybeArray, Size, Region } from '@applitools/utils';
|
|
|
2
2
|
import type * as BaseCore from '@applitools/core-base/types';
|
|
3
3
|
import { type SpecType, type Driver, type ElementReference, type ContextReference } from '@applitools/driver';
|
|
4
4
|
import { type Logger } from '@applitools/logger';
|
|
5
|
-
export * from '@applitools/core-base/types';
|
|
5
|
+
export type * from '@applitools/core-base/types';
|
|
6
6
|
export type DriverTarget<TSpec extends SpecType> = TSpec['driver'] | Driver<TSpec>;
|
|
7
7
|
export type Target<TSpec extends SpecType> = DriverTarget<TSpec> | BaseCore.Target;
|
|
8
8
|
export interface Core<TSpec extends SpecType> extends BaseCore.Core {
|
|
@@ -4,9 +4,10 @@ export type Options = ServerOptions & {
|
|
|
4
4
|
shutdownMode?: 'lazy' | 'stdin';
|
|
5
5
|
idleTimeout?: number;
|
|
6
6
|
printStdout?: boolean;
|
|
7
|
+
isProcess?: boolean;
|
|
7
8
|
};
|
|
8
9
|
export declare function makeCoreServer({ debug, shutdownMode, idleTimeout, // 15min
|
|
9
|
-
printStdout, ...handlerOptions }?: Options): Promise<{
|
|
10
|
+
printStdout, isProcess, ...handlerOptions }?: Options): Promise<{
|
|
10
11
|
port: number;
|
|
11
12
|
close?: () => void;
|
|
12
13
|
}>;
|