@applitools/core 4.60.0 → 4.61.1-debug.0

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
@@ -1,5 +1,114 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.62.0](https://github.com/Applitools-Dev/sdk/compare/js/core@4.61.1...js/core@4.62.0) (2026-05-05)
4
+
5
+
6
+ ### Features
7
+
8
+ * add bypassCSP support for UFG snapshot capture ([#3783](https://github.com/Applitools-Dev/sdk/issues/3783)) ([9e98933](https://github.com/Applitools-Dev/sdk/commit/9e98933b8ffba2ad1928aa2b2110e9a25209a599))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * @applitools/dom-shared bumped to 1.2.0
14
+ #### Features
15
+
16
+ * add bypassCSP support for UFG snapshot capture ([#3783](https://github.com/Applitools-Dev/sdk/issues/3783)) ([9e98933](https://github.com/Applitools-Dev/sdk/commit/9e98933b8ffba2ad1928aa2b2110e9a25209a599))
17
+ * @applitools/dom-snapshot bumped to 4.17.0
18
+ #### Features
19
+
20
+ * add bypassCSP support for UFG snapshot capture ([#3783](https://github.com/Applitools-Dev/sdk/issues/3783)) ([9e98933](https://github.com/Applitools-Dev/sdk/commit/9e98933b8ffba2ad1928aa2b2110e9a25209a599))
21
+
22
+
23
+ #### Bug Fixes
24
+
25
+ * re-trigger release for dom-snapshot (FLD-4452) and mcp (AD-13206) ([#3800](https://github.com/Applitools-Dev/sdk/issues/3800)) ([105dd42](https://github.com/Applitools-Dev/sdk/commit/105dd42010a56c454752eaca69380aaba085073e))
26
+
27
+
28
+
29
+ * @applitools/snippets bumped to 2.9.0
30
+ #### Features
31
+
32
+ * add bypassCSP support for UFG snapshot capture ([#3783](https://github.com/Applitools-Dev/sdk/issues/3783)) ([9e98933](https://github.com/Applitools-Dev/sdk/commit/9e98933b8ffba2ad1928aa2b2110e9a25209a599))
33
+
34
+
35
+
36
+ * @applitools/dom-capture bumped to 11.8.0
37
+ #### Features
38
+
39
+ * add bypassCSP support for UFG snapshot capture ([#3783](https://github.com/Applitools-Dev/sdk/issues/3783)) ([9e98933](https://github.com/Applitools-Dev/sdk/commit/9e98933b8ffba2ad1928aa2b2110e9a25209a599))
40
+
41
+
42
+
43
+ * @applitools/driver bumped to 1.26.0
44
+ #### Features
45
+
46
+ * add bypassCSP support for UFG snapshot capture ([#3783](https://github.com/Applitools-Dev/sdk/issues/3783)) ([9e98933](https://github.com/Applitools-Dev/sdk/commit/9e98933b8ffba2ad1928aa2b2110e9a25209a599))
47
+
48
+
49
+
50
+ * @applitools/spec-driver-webdriver bumped to 1.6.0
51
+ #### Features
52
+
53
+ * add bypassCSP support for UFG snapshot capture ([#3783](https://github.com/Applitools-Dev/sdk/issues/3783)) ([9e98933](https://github.com/Applitools-Dev/sdk/commit/9e98933b8ffba2ad1928aa2b2110e9a25209a599))
54
+
55
+
56
+
57
+ * @applitools/spec-driver-selenium bumped to 1.8.0
58
+ #### Features
59
+
60
+ * add bypassCSP support for UFG snapshot capture ([#3783](https://github.com/Applitools-Dev/sdk/issues/3783)) ([9e98933](https://github.com/Applitools-Dev/sdk/commit/9e98933b8ffba2ad1928aa2b2110e9a25209a599))
61
+
62
+
63
+
64
+ * @applitools/spec-driver-playwright bumped to 1.9.0
65
+ #### Features
66
+
67
+ * add bypassCSP support for UFG snapshot capture ([#3783](https://github.com/Applitools-Dev/sdk/issues/3783)) ([9e98933](https://github.com/Applitools-Dev/sdk/commit/9e98933b8ffba2ad1928aa2b2110e9a25209a599))
68
+
69
+
70
+
71
+ * @applitools/spec-driver-puppeteer bumped to 1.8.0
72
+ #### Features
73
+
74
+ * add bypassCSP support for UFG snapshot capture ([#3783](https://github.com/Applitools-Dev/sdk/issues/3783)) ([9e98933](https://github.com/Applitools-Dev/sdk/commit/9e98933b8ffba2ad1928aa2b2110e9a25209a599))
75
+
76
+
77
+
78
+ * @applitools/screenshoter bumped to 3.12.19
79
+
80
+ * @applitools/nml-client bumped to 1.11.26
81
+
82
+ * @applitools/ec-client bumped to 1.12.28
83
+
84
+
85
+ ## [4.61.1](https://github.com/Applitools-Dev/sdk/compare/js/core@4.61.0...js/core@4.61.1) (2026-05-04)
86
+
87
+
88
+ ### Dependencies
89
+
90
+ * @applitools/tunnel-client bumped to 1.11.12
91
+ #### Bug Fixes
92
+
93
+ * remove deprecated uuid dependency | FLD-4179 ([#3796](https://github.com/Applitools-Dev/sdk/issues/3796)) ([b3511f0](https://github.com/Applitools-Dev/sdk/commit/b3511f070645d356aa8edf43dd57332b5917c41e))
94
+ * @applitools/ec-client bumped to 1.12.27
95
+
96
+
97
+ ## [4.61.0](https://github.com/Applitools-Dev/sdk/compare/js/core@4.60.0...js/core@4.61.0) (2026-04-29)
98
+
99
+
100
+ ### Features
101
+
102
+ * new render target entities | AD 13251 ([#3775](https://github.com/Applitools-Dev/sdk/issues/3775)) ([18b6107](https://github.com/Applitools-Dev/sdk/commit/18b6107937ff0f18ba0a256fec1adc6d423f03dc))
103
+
104
+
105
+ ### Dependencies
106
+
107
+ * @applitools/ufg-client bumped to 1.22.0
108
+ #### Features
109
+
110
+ * new render target entities | AD 13251 ([#3775](https://github.com/Applitools-Dev/sdk/issues/3775)) ([18b6107](https://github.com/Applitools-Dev/sdk/commit/18b6107937ff0f18ba0a256fec1adc6d423f03dc))
111
+
3
112
  ## [4.60.0](https://github.com/Applitools-Dev/sdk/compare/js/core@4.59.3...js/core@4.60.0) (2026-04-23)
4
113
 
5
114
 
@@ -34,8 +34,8 @@ async function extractDefaultEnvironments({ driver, settings, }) {
34
34
  try {
35
35
  const driverEnvironment = await driver.getEnvironment();
36
36
  const viewport = await driver.getViewport();
37
- const size = await driver.getViewportSize();
38
- environment.viewportSize = utils.geometry.scale(size, viewport.viewportScale);
37
+ // scale layout viewport by visualViewport.scale to get visible CSS viewport (avoids double-scaling spec drivers that already return CSS pixels)
38
+ environment.viewportSize = utils.geometry.scale(viewport.viewportSize, viewport.viewportScale);
39
39
  environment.environmentId = utils.general.guid();
40
40
  if (driverEnvironment.isEC)
41
41
  environment.ecSessionId = (_a = (await driver.getSessionId())) !== null && _a !== void 0 ? _a : undefined;
@@ -0,0 +1,160 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || function (mod) {
20
+ if (mod && mod.__esModule) return mod;
21
+ var result = {};
22
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
23
+ __setModuleDefault(result, mod);
24
+ return result;
25
+ };
26
+ var __importDefault = (this && this.__importDefault) || function (mod) {
27
+ return (mod && mod.__esModule) ? mod : { "default": mod };
28
+ };
29
+ Object.defineProperty(exports, "__esModule", { value: true });
30
+ /* eslint no-console: off */
31
+ const core_server_1 = require("../universal/core-server");
32
+ const core_server_process_1 = require("../universal/core-server-process");
33
+ const logs_1 = require("../troubleshoot/logs");
34
+ const check_network_1 = require("../troubleshoot/check-network");
35
+ const yargs_1 = __importDefault(require("yargs"));
36
+ const utils = __importStar(require("@applitools/utils"));
37
+ const fs_1 = __importDefault(require("fs"));
38
+ void yargs_1.default
39
+ .example([
40
+ ['eyes universal', 'Run Eyes Universal server on default port (21077)'],
41
+ ['eyes universal --fork', 'Run Eyes Universal server in a forked process'],
42
+ ['eyes universal --port 8080', 'Run Eyes Universal server on port 8080'],
43
+ ['eyes universal --no-singleton', 'Run Eyes Universal server on a non-singleton mode'],
44
+ ['eyes universal --shutdown-mode stdin', 'Run Eyes Universal server which will close once stdin stream will end'],
45
+ ['eyes check-network', ''],
46
+ ])
47
+ .version(JSON.parse(fs_1.default.readFileSync(require.resolve('../../package.json'), 'utf-8')).version)
48
+ .command({
49
+ command: 'universal',
50
+ builder: yargs => yargs.options({
51
+ port: {
52
+ description: 'run server on a specific port.',
53
+ type: 'number',
54
+ default: 21077,
55
+ },
56
+ singleton: {
57
+ description: 'runs server on a singleton mode. It will prevent the server to start in case the same server is already started.',
58
+ type: 'boolean',
59
+ default: true,
60
+ },
61
+ fork: {
62
+ description: 'runs server in a forked process.',
63
+ type: 'boolean',
64
+ default: false,
65
+ },
66
+ debug: {
67
+ description: 'runs server in a debug mode.',
68
+ type: 'boolean',
69
+ default: false,
70
+ },
71
+ 'port-resolution-mode': {
72
+ describe: 'preferred algorithm to solve port collisions.\n"lazy" mode will not try find free port.\n"random" mode will run on a random port.\n"next" mode will run on next free port after the given one.',
73
+ alias: 'port-resolution',
74
+ type: 'string',
75
+ default: 'next',
76
+ },
77
+ 'shutdown-mode': {
78
+ describe: 'preferred algorithm to automatically kill the process.\n"lazy" mode will end the process once the idle timeout ran out after the last client is disconnected from the server.\n"stdin" mode will end the process once its stdin stream got to its end.',
79
+ alias: 'shutdown',
80
+ type: 'string',
81
+ default: 'lazy',
82
+ },
83
+ 'idle-timeout': {
84
+ description: 'time in minutes for server to stay responsible in case of idle.',
85
+ type: 'number',
86
+ default: 15,
87
+ coerce: value => value * 60 * 1000,
88
+ },
89
+ cert: {
90
+ description: 'path to the certificate file.',
91
+ alias: 'cert-path',
92
+ type: 'string',
93
+ implies: 'key',
94
+ },
95
+ key: {
96
+ description: 'path to the key file.',
97
+ alias: 'key-path',
98
+ type: 'string',
99
+ implies: 'cert',
100
+ },
101
+ config: {
102
+ description: 'json string to use instead of cli arguments',
103
+ type: 'string',
104
+ coerce: JSON.parse,
105
+ },
106
+ maskLog: {
107
+ description: 'mask sensitive information in the log',
108
+ type: 'boolean',
109
+ default: false,
110
+ },
111
+ }),
112
+ handler: async (args) => {
113
+ if (args.fork) {
114
+ const { port } = await (0, core_server_process_1.makeCoreServerProcess)({ ...args, fork: false, isProcess: true });
115
+ // eslint-disable-next-line no-console
116
+ console.log(port); // NOTE: this is a part of the generic protocol
117
+ }
118
+ else {
119
+ void (0, core_server_1.makeCoreServer)({ ...args, ...args.config, isProcess: true });
120
+ }
121
+ },
122
+ })
123
+ .command({
124
+ command: 'logs [input]',
125
+ builder: yargs => yargs.options({
126
+ input: {
127
+ description: 'log input to process',
128
+ type: 'string',
129
+ },
130
+ structure: {
131
+ description: 'group logs by tag names',
132
+ type: 'boolean',
133
+ },
134
+ analyze: {
135
+ description: 'group logs by tag names',
136
+ type: 'boolean',
137
+ },
138
+ }),
139
+ handler: async (args) => {
140
+ var _a;
141
+ const input = (_a = args.input) !== null && _a !== void 0 ? _a : (await utils.streams.toBuffer(process.stdin)).toString('utf8');
142
+ const logs = (0, logs_1.parseLogs)(input);
143
+ if (args.analyze) {
144
+ console.log(JSON.stringify((0, logs_1.analyzeLogs)((0, logs_1.structureLogs)(logs)), null, 2));
145
+ }
146
+ else if (args.structure) {
147
+ console.log(JSON.stringify((0, logs_1.structureLogs)(logs), null, 2));
148
+ }
149
+ else {
150
+ console.log(JSON.stringify(logs, null, 2));
151
+ }
152
+ },
153
+ })
154
+ .command({
155
+ command: 'check-network',
156
+ handler: async () => {
157
+ await (0, check_network_1.checkNetwork)();
158
+ },
159
+ })
160
+ .wrap(yargs_1.default.terminalWidth()).argv;
@@ -255,46 +255,29 @@ async function runOfflineSnapshots(options) {
255
255
  async function uploadResources(targets, logger) {
256
256
  const uploadLogger = logger.extend({ tags: ['upload-resources'] });
257
257
  const promises = targets.map(async ({ target }) => {
258
- const resourcePromises = Object.values(target.resources)
259
- .filter(isHashedResource)
260
- .map(async (resource) => {
258
+ const resourcePromises = target.resources.entries
259
+ .filter((entry) => 'hash' in entry)
260
+ .map(async (entry) => {
261
+ const hashedResource = { hash: entry.hash, hashFormat: 'sha256', contentType: entry.contentType };
261
262
  return ufgClient.uploadResource({
262
263
  resource: {
263
- hash: resource,
264
+ hash: hashedResource,
264
265
  async getter() {
265
266
  return {
266
267
  id: '',
267
- url: '',
268
- value: await throttledReadFile(path_1.default.join(offlineLocationPath, 'resources', resource.hash)),
269
- contentType: resource.contentType,
270
- hash: resource,
268
+ url: entry.url,
269
+ value: await throttledReadFile(path_1.default.join(offlineLocationPath, 'resources', entry.hash)),
270
+ contentType: entry.contentType,
271
+ hash: hashedResource,
271
272
  };
272
273
  },
273
274
  },
274
275
  logger: uploadLogger,
275
276
  });
276
277
  });
277
- resourcePromises.push(ufgClient.uploadResource({
278
- resource: {
279
- hash: target.snapshot,
280
- async getter() {
281
- return {
282
- id: '',
283
- url: '',
284
- value: await throttledReadFile(path_1.default.join(offlineLocationPath, 'resources', target.snapshot.hash)),
285
- contentType: target.snapshot.contentType,
286
- hash: target.snapshot,
287
- };
288
- },
289
- },
290
- logger: uploadLogger,
291
- }));
292
278
  return Promise.all(resourcePromises);
293
279
  });
294
280
  await Promise.all(promises);
295
- function isHashedResource(resource) {
296
- return 'hash' in resource;
297
- }
298
281
  }
299
282
  async function runCheck(eyes, target, index, logger) {
300
283
  var _a;
package/dist/open-eyes.js CHANGED
@@ -41,8 +41,8 @@ const types_1 = require("./types");
41
41
  function makeOpenEyes({ type: defaultType = 'classic', clients, batch, removeDuplicateTests, core, cores, spec, environment, logger: mainLogger, asyncCache, concurrency, useServerConcurrency = false, cwd = process.cwd(), }) {
42
42
  let shouldPrintConcurrencyWarning = true;
43
43
  return async function openEyes({ type = defaultType, settings: openSettings, config, target, logger = mainLogger, }) {
44
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
45
- var _1, _2, _3, _4, _5;
44
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1;
45
+ var _2, _3, _4, _5, _6;
46
46
  logger = logger.extend(mainLogger, { tags: [`eyes-${type}-${utils.general.shortid()}`] });
47
47
  logger.log(`Opening Eyes in directory "${cwd}"`);
48
48
  const settings = { environments: config === null || config === void 0 ? void 0 : config.check.environments, ...config === null || config === void 0 ? void 0 : config.open, ...openSettings };
@@ -51,11 +51,11 @@ function makeOpenEyes({ type: defaultType = 'classic', clients, batch, removeDup
51
51
  logger.mask(eyesServerSettings.eyesServerUrl);
52
52
  (_a = settings.userTestId) !== null && _a !== void 0 ? _a : (settings.userTestId = `${settings.testName}--${utils.general.guid()}`);
53
53
  settings.batch = { ...batch, ...settings.batch };
54
- (_b = (_1 = settings.batch).id) !== null && _b !== void 0 ? _b : (_1.id = (_c = utils.general.getEnvValue('BATCH_ID')) !== null && _c !== void 0 ? _c : `generated-${utils.general.guid()}`);
55
- (_d = (_2 = settings.batch).buildId) !== null && _d !== void 0 ? _d : (_2.buildId = utils.general.getEnvValue('BATCH_BUILD_ID'));
56
- (_e = (_3 = settings.batch).name) !== null && _e !== void 0 ? _e : (_3.name = utils.general.getEnvValue('BATCH_NAME'));
57
- (_f = (_4 = settings.batch).sequenceName) !== null && _f !== void 0 ? _f : (_4.sequenceName = utils.general.getEnvValue('BATCH_SEQUENCE'));
58
- (_g = (_5 = settings.batch).notifyOnCompletion) !== null && _g !== void 0 ? _g : (_5.notifyOnCompletion = utils.general.getEnvValue('BATCH_NOTIFY', 'boolean'));
54
+ (_b = (_2 = settings.batch).id) !== null && _b !== void 0 ? _b : (_2.id = (_c = utils.general.getEnvValue('BATCH_ID')) !== null && _c !== void 0 ? _c : `generated-${utils.general.guid()}`);
55
+ (_d = (_3 = settings.batch).buildId) !== null && _d !== void 0 ? _d : (_3.buildId = utils.general.getEnvValue('BATCH_BUILD_ID'));
56
+ (_e = (_4 = settings.batch).name) !== null && _e !== void 0 ? _e : (_4.name = utils.general.getEnvValue('BATCH_NAME'));
57
+ (_f = (_5 = settings.batch).sequenceName) !== null && _f !== void 0 ? _f : (_5.sequenceName = utils.general.getEnvValue('BATCH_SEQUENCE'));
58
+ (_g = (_6 = settings.batch).notifyOnCompletion) !== null && _g !== void 0 ? _g : (_6.notifyOnCompletion = utils.general.getEnvValue('BATCH_NOTIFY', 'boolean'));
59
59
  (_h = settings.keepBatchOpen) !== null && _h !== void 0 ? _h : (settings.keepBatchOpen = utils.general.getEnvValue('DONT_CLOSE_BATCHES', 'boolean'));
60
60
  (_j = settings.branchName) !== null && _j !== void 0 ? _j : (settings.branchName = (_k = utils.general.getEnvValue('BRANCH')) !== null && _k !== void 0 ? _k : utils.general.getEnvValue('BRANCH_NAME'));
61
61
  (_l = settings.parentBranchName) !== null && _l !== void 0 ? _l : (settings.parentBranchName = (_m = utils.general.getEnvValue('PARENT_BRANCH')) !== null && _m !== void 0 ? _m : utils.general.getEnvValue('PARENT_BRANCH_NAME'));
@@ -92,15 +92,20 @@ function makeOpenEyes({ type: defaultType = 'classic', clients, batch, removeDup
92
92
  logger.warn(`gitBranchingTimestamp is an invalid ISO date string: ${settings.gitBranchingTimestamp}`);
93
93
  settings.gitBranchingTimestamp = undefined;
94
94
  }
95
+ (_x = settings.bypassCSP) !== null && _x !== void 0 ? _x : (settings.bypassCSP = utils.general.getEnvValue('BYPASS_CSP', 'boolean') === true || undefined);
95
96
  const driver = target && (await (0, driver_1.makeDriver)({ spec, driver: target, logger, customConfig: settings }));
97
+ if (settings.bypassCSP) {
98
+ logger.warn('CSP bypass is enabled.');
99
+ await (driver === null || driver === void 0 ? void 0 : driver.setBypassCSP(true));
100
+ }
96
101
  const driverEnvironment = await (driver === null || driver === void 0 ? void 0 : driver.getEnvironment());
97
102
  const driverUrl = await (driver === null || driver === void 0 ? void 0 : driver.getDriverUrl());
98
103
  const multiDeviceTargets = [];
99
- for (const checkEnv of (_x = settings.environments) !== null && _x !== void 0 ? _x : []) {
100
- if (utils.types.has(checkEnv, 'iosDeviceInfo') && ((_y = driverEnvironment === null || driverEnvironment === void 0 ? void 0 : driverEnvironment.applitoolsLib) === null || _y === void 0 ? void 0 : _y.instrumented)) {
104
+ for (const checkEnv of (_y = settings.environments) !== null && _y !== void 0 ? _y : []) {
105
+ if (utils.types.has(checkEnv, 'iosDeviceInfo') && ((_z = driverEnvironment === null || driverEnvironment === void 0 ? void 0 : driverEnvironment.applitoolsLib) === null || _z === void 0 ? void 0 : _z.instrumented)) {
101
106
  multiDeviceTargets.push({
102
107
  deviceInfo: checkEnv.iosDeviceInfo.deviceName,
103
- orientation: (_z = checkEnv.iosDeviceInfo.screenOrientation) !== null && _z !== void 0 ? _z : 'portrait',
108
+ orientation: (_0 = checkEnv.iosDeviceInfo.screenOrientation) !== null && _0 !== void 0 ? _0 : 'portrait',
104
109
  });
105
110
  }
106
111
  }
@@ -130,7 +135,7 @@ function makeOpenEyes({ type: defaultType = 'classic', clients, batch, removeDup
130
135
  browserVersion: driverEnvironment === null || driverEnvironment === void 0 ? void 0 : driverEnvironment.browserVersion,
131
136
  platformName: driverEnvironment === null || driverEnvironment === void 0 ? void 0 : driverEnvironment.platformName,
132
137
  platformVersion: driverEnvironment === null || driverEnvironment === void 0 ? void 0 : driverEnvironment.platformVersion,
133
- isApplitoolsLib: (_0 = driverEnvironment === null || driverEnvironment === void 0 ? void 0 : driverEnvironment.applitoolsLib) === null || _0 === void 0 ? void 0 : _0.instrumented,
138
+ isApplitoolsLib: (_1 = driverEnvironment === null || driverEnvironment === void 0 ? void 0 : driverEnvironment.applitoolsLib) === null || _1 === void 0 ? void 0 : _1.instrumented,
134
139
  isEC: driverEnvironment === null || driverEnvironment === void 0 ? void 0 : driverEnvironment.isEC,
135
140
  },
136
141
  driverUrl,
package/dist/ufg/check.js CHANGED
@@ -52,6 +52,7 @@ function makeCheck({ eyes, target: defaultTarget, environments: defaultEnvironme
52
52
  ...eyes.test.ufgServer,
53
53
  eyesServerUrl: eyes.test.eyesServer.eyesServerUrl,
54
54
  apiKey: eyes.test.eyesServer.apiKey,
55
+ httpVersion: eyes.test.eyesServer.httpVersion,
55
56
  },
56
57
  logger,
57
58
  });
@@ -16,6 +16,7 @@ async function createRenderTargetFromSnapshot({ ufgClient, snapshot, logger, url
16
16
  proxy: snapshot.account.eyesServer.proxy,
17
17
  autProxy: snapshot.settings.autProxy,
18
18
  skipRootHtmlResource: snapshot.settings.skipRootHtmlResource,
19
+ httpVersion: snapshot.settings.httpVersion,
19
20
  },
20
21
  logger,
21
22
  });
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.makeCoreServerProcess = void 0;
7
+ const child_process_1 = require("child_process");
8
+ const path_1 = __importDefault(require("path"));
9
+ function makeCoreServerProcess(options) {
10
+ return new Promise((resolve, reject) => {
11
+ const server = (0, child_process_1.fork)(path_1.default.resolve(__dirname, '../../dist/cli/cli.js'), ['universal', `--config=${JSON.stringify(options)}`], {
12
+ stdio: [options.shutdownMode === 'stdin' ? 'inherit' : 'ignore', 'ignore', 'ignore', 'ipc'],
13
+ ...options.forkOptions,
14
+ });
15
+ const timeout = setTimeout(() => {
16
+ reject(new Error(`Server didn't respond for 10s after being started`));
17
+ server.kill();
18
+ }, 60000);
19
+ server.on('error', reject);
20
+ server.once('message', ({ name, payload }) => {
21
+ var _a;
22
+ if (name === 'port') {
23
+ resolve({ port: payload.port, close: () => server.kill() });
24
+ clearTimeout(timeout);
25
+ (_a = server.channel) === null || _a === void 0 ? void 0 : _a.unref();
26
+ }
27
+ });
28
+ server.unref();
29
+ });
30
+ }
31
+ exports.makeCoreServerProcess = makeCoreServerProcess;