@applitools/core 2.5.2 → 2.5.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 +7 -0
- package/dist/make-manager.js +4 -1
- package/dist/open-eyes.js +1 -1
- package/dist/ufg/core.js +2 -2
- package/dist/ufg/get-ufg-client.js +5 -3
- package/package.json +2 -2
- package/types/types.d.ts +1 -0
- package/types/ufg/core.d.ts +2 -1
- package/types/ufg/get-ufg-client.d.ts +4 -3
package/CHANGELOG.md
CHANGED
package/dist/make-manager.js
CHANGED
|
@@ -40,7 +40,10 @@ function makeMakeManager({ spec, concurrency: defaultConcurrency = utils.general
|
|
|
40
40
|
(_c = (_f = settings.batch).id) !== null && _c !== void 0 ? _c : (_f.id = (_d = utils.general.getEnvValue('BATCH_ID')) !== null && _d !== void 0 ? _d : `generated-${utils.general.guid()}`);
|
|
41
41
|
(_e = settings.agentId) !== null && _e !== void 0 ? _e : (settings.agentId = type === 'ufg' ? defaultAgentId === null || defaultAgentId === void 0 ? void 0 : defaultAgentId.replace(/(\/\d)/, '.visualgrid$1') : defaultAgentId);
|
|
42
42
|
base !== null && base !== void 0 ? base : (base = (0, core_base_1.makeCore)({ agentId: settings.agentId, concurrency: settings.concurrency, cwd, logger }));
|
|
43
|
-
const cores = {
|
|
43
|
+
const cores = {
|
|
44
|
+
ufg: (0, core_2.makeCore)({ spec, base, fetchConcurrency: settings.fetchConcurrency, logger }),
|
|
45
|
+
classic: (0, core_1.makeCore)({ spec, base, logger }),
|
|
46
|
+
};
|
|
44
47
|
const storage = [];
|
|
45
48
|
return {
|
|
46
49
|
openEyes: utils.general.wrap((0, open_eyes_1.makeOpenEyes)({ type, batch: settings.batch, spec, core, cores, logger }), async (openEyes, options) => {
|
package/dist/open-eyes.js
CHANGED
|
@@ -61,7 +61,7 @@ function makeOpenEyes({ type: defaultType = 'classic', concurrency, batch, core,
|
|
|
61
61
|
if (account.ecEnabled) {
|
|
62
62
|
const environment = await (driver === null || driver === void 0 ? void 0 : driver.getEnvironment());
|
|
63
63
|
(_r = settings.properties) !== null && _r !== void 0 ? _r : (settings.properties = []);
|
|
64
|
-
settings.properties.push({ name: 'Execution
|
|
64
|
+
settings.properties.push({ name: 'Execution Cloud', value: (environment === null || environment === void 0 ? void 0 : environment.isEC) ? 'Yes' : 'No' });
|
|
65
65
|
}
|
|
66
66
|
core.logEvent({
|
|
67
67
|
settings: {
|
package/dist/ufg/core.js
CHANGED
|
@@ -35,7 +35,7 @@ const get_ufg_client_1 = require("./get-ufg-client");
|
|
|
35
35
|
const get_nml_client_1 = require("./get-nml-client");
|
|
36
36
|
const open_eyes_1 = require("./open-eyes");
|
|
37
37
|
const utils = __importStar(require("@applitools/utils"));
|
|
38
|
-
function makeCore({ concurrency, spec, clients, base, agentId = 'core-ufg', cwd = process.cwd(), logger: defaultLogger, }) {
|
|
38
|
+
function makeCore({ concurrency, spec, clients, base, fetchConcurrency, agentId = 'core-ufg', cwd = process.cwd(), logger: defaultLogger, }) {
|
|
39
39
|
var _a;
|
|
40
40
|
const logger = (_a = defaultLogger === null || defaultLogger === void 0 ? void 0 : defaultLogger.extend({ label: 'core-ufg' })) !== null && _a !== void 0 ? _a : (0, logger_1.makeLogger)({ label: 'core-ufg' });
|
|
41
41
|
logger.log(`Core ufg is initialized ${base ? 'with' : 'without'} custom base core`);
|
|
@@ -49,7 +49,7 @@ function makeCore({ concurrency, spec, clients, base, agentId = 'core-ufg', cwd
|
|
|
49
49
|
locate: (0, locate_1.makeLocate)({ spec, core, logger }),
|
|
50
50
|
locateText: (0, locate_text_1.makeLocateText)({ spec, core, logger }),
|
|
51
51
|
extractText: (0, extract_text_1.makeExtractText)({ spec, core, logger }),
|
|
52
|
-
getUFGClient: (0, get_ufg_client_1.makeGetUFGClient)({ client: clients === null || clients === void 0 ? void 0 : clients.ufg, logger }),
|
|
52
|
+
getUFGClient: (0, get_ufg_client_1.makeGetUFGClient)({ client: clients === null || clients === void 0 ? void 0 : clients.ufg, fetchConcurrency, logger }),
|
|
53
53
|
getNMLClient: (0, get_nml_client_1.makeGetNMLClient)({ client: clients === null || clients === void 0 ? void 0 : clients.nml, logger }),
|
|
54
54
|
openEyes: (0, open_eyes_1.makeOpenEyes)({ spec, core, logger }),
|
|
55
55
|
};
|
|
@@ -26,13 +26,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26
26
|
exports.makeGetUFGClient = void 0;
|
|
27
27
|
const ufg_client_1 = require("@applitools/ufg-client");
|
|
28
28
|
const utils = __importStar(require("@applitools/utils"));
|
|
29
|
-
function makeGetUFGClient({ client, logger: defaultLogger }) {
|
|
30
|
-
|
|
29
|
+
function makeGetUFGClient({ client, fetchConcurrency, logger: defaultLogger }) {
|
|
30
|
+
// we are caching by the server config, therefor if the user creates another Runner / manager with the same server config but different
|
|
31
|
+
// fetchConcurrency, it will not take any affect.
|
|
32
|
+
const getUFGClientWithCache = utils.general.cachify(getUFGClient, ([options]) => client ? 'default' : [{ ...options.config, fetchConcurrency: undefined }]);
|
|
31
33
|
if (client)
|
|
32
34
|
getUFGClientWithCache.setCachedValue('default', Promise.resolve(client));
|
|
33
35
|
return getUFGClientWithCache;
|
|
34
36
|
async function getUFGClient({ config, logger = defaultLogger }) {
|
|
35
|
-
return (0, ufg_client_1.makeUFGClient)({ config, logger });
|
|
37
|
+
return (0, ufg_client_1.makeUFGClient)({ config: { ...config, fetchConcurrency }, logger });
|
|
36
38
|
}
|
|
37
39
|
}
|
|
38
40
|
exports.makeGetUFGClient = makeGetUFGClient;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/core",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.3",
|
|
4
4
|
"homepage": "https://applitools.com",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/applitools/eyes.sdk.javascript1/issues"
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"@applitools/snippets": "2.4.19",
|
|
88
88
|
"@applitools/socket": "1.0.10",
|
|
89
89
|
"@applitools/spec-driver-webdriver": "1.0.24",
|
|
90
|
-
"@applitools/ufg-client": "1.2.
|
|
90
|
+
"@applitools/ufg-client": "1.2.10",
|
|
91
91
|
"@applitools/utils": "1.3.32",
|
|
92
92
|
"@types/ws": "8.5.4",
|
|
93
93
|
"abort-controller": "3.0.0",
|
package/types/types.d.ts
CHANGED
|
@@ -99,6 +99,7 @@ export interface Eyes<TSpec extends SpecType, TDefaultType extends 'classic' | '
|
|
|
99
99
|
}
|
|
100
100
|
export interface ManagerSettings {
|
|
101
101
|
concurrency?: number;
|
|
102
|
+
fetchConcurrency?: number;
|
|
102
103
|
/** @deprecated */
|
|
103
104
|
legacyConcurrency?: number;
|
|
104
105
|
agentId?: string;
|
package/types/ufg/core.d.ts
CHANGED
|
@@ -13,8 +13,9 @@ type Options<TSpec extends SpecType> = {
|
|
|
13
13
|
base?: BaseCore;
|
|
14
14
|
agentId?: string;
|
|
15
15
|
concurrency?: number;
|
|
16
|
+
fetchConcurrency?: number;
|
|
16
17
|
cwd?: string;
|
|
17
18
|
logger?: Logger;
|
|
18
19
|
};
|
|
19
|
-
export declare function makeCore<TSpec extends SpecType>({ concurrency, spec, clients, base, agentId, cwd, logger: defaultLogger, }: Options<TSpec>): Core<TSpec>;
|
|
20
|
+
export declare function makeCore<TSpec extends SpecType>({ concurrency, spec, clients, base, fetchConcurrency, agentId, cwd, logger: defaultLogger, }: Options<TSpec>): Core<TSpec>;
|
|
20
21
|
export {};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { type Logger } from '@applitools/logger';
|
|
2
|
-
import { type UFGClient, type
|
|
2
|
+
import { type UFGClient, type UFGClientConfig } from '@applitools/ufg-client';
|
|
3
3
|
type Options = {
|
|
4
4
|
client?: UFGClient;
|
|
5
5
|
logger: Logger;
|
|
6
|
+
fetchConcurrency?: number;
|
|
6
7
|
};
|
|
7
|
-
export declare function makeGetUFGClient({ client, logger: defaultLogger }: Options): (({ config, logger }: {
|
|
8
|
-
config:
|
|
8
|
+
export declare function makeGetUFGClient({ client, fetchConcurrency, logger: defaultLogger }: Options): (({ config, logger }: {
|
|
9
|
+
config: UFGClientConfig;
|
|
9
10
|
logger?: Logger | undefined;
|
|
10
11
|
}) => Promise<UFGClient>) & {
|
|
11
12
|
getCachedValues(): Promise<UFGClient>[];
|