@applitools/core 4.58.2 → 4.59.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,185 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.59.2](https://github.com/Applitools-Dev/sdk/compare/js/core@4.59.1...js/core@4.59.2) (2026-04-13)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * protect page render target from pointing to html instead of cdt | FLD-4313 ([#3758](https://github.com/Applitools-Dev/sdk/issues/3758)) ([fd8008a](https://github.com/Applitools-Dev/sdk/commit/fd8008af0f6b491d3a3a9dce648bef1c18118b9b))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * @applitools/dom-snapshot bumped to 4.16.3
14
+ #### Bug Fixes
15
+
16
+ * protect page render target from pointing to html instead of cdt | FLD-4313 ([#3758](https://github.com/Applitools-Dev/sdk/issues/3758)) ([fd8008a](https://github.com/Applitools-Dev/sdk/commit/fd8008af0f6b491d3a3a9dce648bef1c18118b9b))
17
+ * @applitools/nml-client bumped to 1.11.23
18
+ #### Bug Fixes
19
+
20
+ * log nml responses | FLD-4433 ([#3757](https://github.com/Applitools-Dev/sdk/issues/3757)) ([70f0bcd](https://github.com/Applitools-Dev/sdk/commit/70f0bcdaa00b60f6fe8f2177b1713b92c8232c27))
21
+ * @applitools/ufg-client bumped to 1.20.2
22
+ #### Bug Fixes
23
+
24
+ * protect page render target from pointing to html instead of cdt | FLD-4313 ([#3758](https://github.com/Applitools-Dev/sdk/issues/3758)) ([fd8008a](https://github.com/Applitools-Dev/sdk/commit/fd8008af0f6b491d3a3a9dce648bef1c18118b9b))
25
+
26
+ ## [4.59.1](https://github.com/Applitools-Dev/sdk/compare/js/core@4.59.0...js/core@4.59.1) (2026-04-06)
27
+
28
+
29
+ ### Dependencies
30
+
31
+ * @applitools/dom-capture bumped to 11.7.0
32
+ #### Features
33
+
34
+ * add elementFromPointCheckStatus to DOM capture output | AD-13066 ([#3690](https://github.com/Applitools-Dev/sdk/issues/3690)) ([4fbb117](https://github.com/Applitools-Dev/sdk/commit/4fbb117d53a9a44248772100947ed68133f5b5db))
35
+
36
+ ## [4.59.0](https://github.com/Applitools-Dev/sdk/compare/js/core@4.58.2...js/core@4.59.0) (2026-03-29)
37
+
38
+
39
+ ### Features
40
+
41
+ * use branch name env vars for CI ([#3687](https://github.com/Applitools-Dev/sdk/issues/3687)) ([229609e](https://github.com/Applitools-Dev/sdk/commit/229609e83b2b2c55fdb26657085aa94f84e4af73))
42
+
43
+
44
+ ### Bug Fixes
45
+
46
+ * exclude CHANGELOG.md from all published npm packages | AD-10793 ([#3682](https://github.com/Applitools-Dev/sdk/issues/3682)) ([95a0a80](https://github.com/Applitools-Dev/sdk/commit/95a0a8063fc2e1809c1bef1fc651d6deceda6e7e))
47
+ * remove NMG takeSnapshots functionality and all related dead code ([2e74475](https://github.com/Applitools-Dev/sdk/commit/2e74475934b1c94723f7381df0047f5dbddd2246)), closes [#3654](https://github.com/Applitools-Dev/sdk/issues/3654)
48
+ * remove spec parameter from makeTakeSnapshots calls to match function signature ([e47fb33](https://github.com/Applitools-Dev/sdk/commit/e47fb338d1e387c3b2a5898f008f1298f8118388))
49
+
50
+
51
+ ### Dependencies
52
+
53
+ * @applitools/utils bumped to 1.14.3
54
+ #### Bug Fixes
55
+
56
+ * exclude CHANGELOG.md from all published npm packages | AD-10793 ([#3682](https://github.com/Applitools-Dev/sdk/issues/3682)) ([95a0a80](https://github.com/Applitools-Dev/sdk/commit/95a0a8063fc2e1809c1bef1fc651d6deceda6e7e))
57
+ * @applitools/logger bumped to 2.2.10
58
+ #### Bug Fixes
59
+
60
+ * exclude CHANGELOG.md from all published npm packages | AD-10793 ([#3682](https://github.com/Applitools-Dev/sdk/issues/3682)) ([95a0a80](https://github.com/Applitools-Dev/sdk/commit/95a0a8063fc2e1809c1bef1fc651d6deceda6e7e))
61
+
62
+
63
+
64
+ * @applitools/dom-snapshot bumped to 4.16.2
65
+ #### Bug Fixes
66
+
67
+ * exclude CHANGELOG.md from all published npm packages | AD-10793 ([#3682](https://github.com/Applitools-Dev/sdk/issues/3682)) ([95a0a80](https://github.com/Applitools-Dev/sdk/commit/95a0a8063fc2e1809c1bef1fc651d6deceda6e7e))
68
+
69
+
70
+
71
+ * @applitools/socket bumped to 1.3.11
72
+ #### Bug Fixes
73
+
74
+ * exclude CHANGELOG.md from all published npm packages | AD-10793 ([#3682](https://github.com/Applitools-Dev/sdk/issues/3682)) ([95a0a80](https://github.com/Applitools-Dev/sdk/commit/95a0a8063fc2e1809c1bef1fc651d6deceda6e7e))
75
+
76
+
77
+
78
+ * @applitools/req bumped to 1.9.2
79
+ #### Bug Fixes
80
+
81
+ * exclude CHANGELOG.md from all published npm packages | AD-10793 ([#3682](https://github.com/Applitools-Dev/sdk/issues/3682)) ([95a0a80](https://github.com/Applitools-Dev/sdk/commit/95a0a8063fc2e1809c1bef1fc651d6deceda6e7e))
82
+
83
+
84
+
85
+ * @applitools/image bumped to 1.2.9
86
+ #### Bug Fixes
87
+
88
+ * exclude CHANGELOG.md from all published npm packages | AD-10793 ([#3682](https://github.com/Applitools-Dev/sdk/issues/3682)) ([95a0a80](https://github.com/Applitools-Dev/sdk/commit/95a0a8063fc2e1809c1bef1fc651d6deceda6e7e))
89
+
90
+
91
+
92
+ * @applitools/snippets bumped to 2.8.1
93
+ #### Bug Fixes
94
+
95
+ * exclude CHANGELOG.md from all published npm packages | AD-10793 ([#3682](https://github.com/Applitools-Dev/sdk/issues/3682)) ([95a0a80](https://github.com/Applitools-Dev/sdk/commit/95a0a8063fc2e1809c1bef1fc651d6deceda6e7e))
96
+ * @applitools/dom-capture bumped to 11.6.13
97
+ #### Bug Fixes
98
+
99
+ * exclude CHANGELOG.md from all published npm packages | AD-10793 ([#3682](https://github.com/Applitools-Dev/sdk/issues/3682)) ([95a0a80](https://github.com/Applitools-Dev/sdk/commit/95a0a8063fc2e1809c1bef1fc651d6deceda6e7e))
100
+
101
+
102
+
103
+ * @applitools/driver bumped to 1.25.4
104
+ #### Bug Fixes
105
+
106
+ * exclude CHANGELOG.md from all published npm packages | AD-10793 ([#3682](https://github.com/Applitools-Dev/sdk/issues/3682)) ([95a0a80](https://github.com/Applitools-Dev/sdk/commit/95a0a8063fc2e1809c1bef1fc651d6deceda6e7e))
107
+
108
+
109
+
110
+ * @applitools/spec-driver-webdriver bumped to 1.5.9
111
+ #### Bug Fixes
112
+
113
+ * exclude CHANGELOG.md from all published npm packages | AD-10793 ([#3682](https://github.com/Applitools-Dev/sdk/issues/3682)) ([95a0a80](https://github.com/Applitools-Dev/sdk/commit/95a0a8063fc2e1809c1bef1fc651d6deceda6e7e))
114
+
115
+
116
+
117
+ * @applitools/spec-driver-selenium bumped to 1.7.15
118
+ #### Bug Fixes
119
+
120
+ * exclude CHANGELOG.md from all published npm packages | AD-10793 ([#3682](https://github.com/Applitools-Dev/sdk/issues/3682)) ([95a0a80](https://github.com/Applitools-Dev/sdk/commit/95a0a8063fc2e1809c1bef1fc651d6deceda6e7e))
121
+
122
+
123
+
124
+ * @applitools/spec-driver-puppeteer bumped to 1.7.4
125
+ #### Bug Fixes
126
+
127
+ * exclude CHANGELOG.md from all published npm packages | AD-10793 ([#3682](https://github.com/Applitools-Dev/sdk/issues/3682)) ([95a0a80](https://github.com/Applitools-Dev/sdk/commit/95a0a8063fc2e1809c1bef1fc651d6deceda6e7e))
128
+
129
+
130
+
131
+ * @applitools/screenshoter bumped to 3.12.17
132
+ #### Bug Fixes
133
+
134
+ * exclude CHANGELOG.md from all published npm packages | AD-10793 ([#3682](https://github.com/Applitools-Dev/sdk/issues/3682)) ([95a0a80](https://github.com/Applitools-Dev/sdk/commit/95a0a8063fc2e1809c1bef1fc651d6deceda6e7e))
135
+
136
+
137
+
138
+ * @applitools/nml-client bumped to 1.11.22
139
+ #### Bug Fixes
140
+
141
+ * exclude CHANGELOG.md from all published npm packages | AD-10793 ([#3682](https://github.com/Applitools-Dev/sdk/issues/3682)) ([95a0a80](https://github.com/Applitools-Dev/sdk/commit/95a0a8063fc2e1809c1bef1fc651d6deceda6e7e))
142
+
143
+
144
+
145
+ * @applitools/tunnel-client bumped to 1.11.9
146
+ #### Bug Fixes
147
+
148
+ * exclude CHANGELOG.md from all published npm packages | AD-10793 ([#3682](https://github.com/Applitools-Dev/sdk/issues/3682)) ([95a0a80](https://github.com/Applitools-Dev/sdk/commit/95a0a8063fc2e1809c1bef1fc651d6deceda6e7e))
149
+ * tunnel client network test | AD-12582 ([#3699](https://github.com/Applitools-Dev/sdk/issues/3699)) ([f0b01f9](https://github.com/Applitools-Dev/sdk/commit/f0b01f9d7614a3e14d77a77dd76cb58b712d3a0a))
150
+
151
+
152
+
153
+ * @applitools/ufg-client bumped to 1.20.1
154
+ #### Bug Fixes
155
+
156
+ * exclude CHANGELOG.md from all published npm packages | AD-10793 ([#3682](https://github.com/Applitools-Dev/sdk/issues/3682)) ([95a0a80](https://github.com/Applitools-Dev/sdk/commit/95a0a8063fc2e1809c1bef1fc651d6deceda6e7e))
157
+ * strip logger from resources before passing to checkResources ([#3638](https://github.com/Applitools-Dev/sdk/issues/3638)) ([5491e9f](https://github.com/Applitools-Dev/sdk/commit/5491e9f0b2cf5eb1ca0e5c5a381407d3f5c24f3f))
158
+
159
+
160
+
161
+ * @applitools/core-base bumped to 1.32.4
162
+ #### Bug Fixes
163
+
164
+ * exclude CHANGELOG.md from all published npm packages | AD-10793 ([#3682](https://github.com/Applitools-Dev/sdk/issues/3682)) ([95a0a80](https://github.com/Applitools-Dev/sdk/commit/95a0a8063fc2e1809c1bef1fc651d6deceda6e7e))
165
+
166
+
167
+
168
+ * @applitools/ec-client bumped to 1.12.24
169
+ #### Bug Fixes
170
+
171
+ * exclude CHANGELOG.md from all published npm packages | AD-10793 ([#3682](https://github.com/Applitools-Dev/sdk/issues/3682)) ([95a0a80](https://github.com/Applitools-Dev/sdk/commit/95a0a8063fc2e1809c1bef1fc651d6deceda6e7e))
172
+
173
+
174
+
175
+ * @applitools/test-server bumped to 1.4.2
176
+ #### Bug Fixes
177
+
178
+ * exclude CHANGELOG.md from all published npm packages | AD-10793 ([#3682](https://github.com/Applitools-Dev/sdk/issues/3682)) ([95a0a80](https://github.com/Applitools-Dev/sdk/commit/95a0a8063fc2e1809c1bef1fc651d6deceda6e7e))
179
+
180
+
181
+
182
+
3
183
  ## [4.58.2](https://github.com/Applitools-Dev/sdk/compare/js/core@4.58.1...js/core@4.58.2) (2026-03-16)
4
184
 
5
185
 
@@ -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;
package/dist/core.js CHANGED
@@ -88,7 +88,7 @@ function makeCore({ spec, clients, base: defaultBase, concurrency = utils.genera
88
88
  openEyes: (0, open_eyes_1.makeOpenEyes)({ spec, clients, core, cores, environment, asyncCache, cwd, concurrency, logger }),
89
89
  closeBatch: (0, close_batch_1.makeCloseBatch)({ core, logger }),
90
90
  deleteTest: (0, delete_test_1.makeDeleteTest)({ core, logger }),
91
- takeSnapshots: spec && (0, take_snapshots_1.makeTakeSnapshots)({ spec, core: cores.ufg, logger }),
91
+ takeSnapshots: spec && (0, take_snapshots_1.makeTakeSnapshots)({ core: cores.ufg, logger }),
92
92
  };
93
93
  });
94
94
  }
@@ -58,7 +58,7 @@ function makeCheckAndClose({ eyes, target: defaultTarget, environments: defaultE
58
58
  let snapshots;
59
59
  let driver;
60
60
  if (spec && (0, driver_1.isDriver)(target, spec)) {
61
- const takeSnapshots = (0, take_snapshots_1.makeTakeSnapshots)({ core: eyes.core, spec, signal, logger });
61
+ const takeSnapshots = (0, take_snapshots_1.makeTakeSnapshots)({ core: eyes.core, signal, logger });
62
62
  driver = await (0, driver_1.makeDriver)({ spec, driver: target, logger });
63
63
  snapshots = await takeSnapshots({
64
64
  driver,
package/dist/ufg/check.js CHANGED
@@ -58,7 +58,7 @@ function makeCheck({ eyes, target: defaultTarget, environments: defaultEnvironme
58
58
  let snapshots;
59
59
  let driver;
60
60
  if (spec && (0, driver_1.isDriver)(target, spec)) {
61
- const takeSnapshots = (0, take_snapshots_1.makeTakeSnapshots)({ core: eyes.core, spec, signal, logger });
61
+ const takeSnapshots = (0, take_snapshots_1.makeTakeSnapshots)({ core: eyes.core, signal, logger });
62
62
  driver = await (0, driver_1.makeDriver)({ spec, driver: target, logger });
63
63
  snapshots = await takeSnapshots({
64
64
  driver,
package/dist/ufg/core.js CHANGED
@@ -47,7 +47,7 @@ function makeCore({ spec, clients, base: defaultBase, asyncCache, offlineLocatio
47
47
  base: base,
48
48
  getViewportSize: spec && (0, get_viewport_size_1.makeGetViewportSize)({ spec, logger }),
49
49
  setViewportSize: spec && (0, set_viewport_size_1.makeSetViewportSize)({ spec, logger }),
50
- takeSnapshots: spec && (0, take_snapshots_1.makeTakeSnapshots)({ spec, core, fetchConcurrency, logger }),
50
+ takeSnapshots: spec && (0, take_snapshots_1.makeTakeSnapshots)({ core, fetchConcurrency, logger }),
51
51
  locate: (0, locate_1.makeLocate)({ spec, core, logger }),
52
52
  locateText: (0, locate_text_1.makeLocateText)({ spec, core, logger }),
53
53
  extractText: (0, extract_text_1.makeExtractText)({ spec, core, logger }),
@@ -15,6 +15,7 @@ async function createRenderTargetFromSnapshot({ ufgClient, snapshot, logger, url
15
15
  },
16
16
  proxy: snapshot.account.eyesServer.proxy,
17
17
  autProxy: snapshot.settings.autProxy,
18
+ skipRootHtmlResource: snapshot.settings.skipRootHtmlResource,
18
19
  },
19
20
  logger,
20
21
  });
@@ -1,13 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.makeTakeSnapshots = void 0;
4
- const driver_1 = require("@applitools/driver");
5
4
  const take_dom_snapshots_1 = require("./utils/take-dom-snapshots");
6
5
  const to_safe_check_settings_1 = require("./utils/to-safe-check-settings");
7
6
  const to_generated_selectors_1 = require("./utils/to-generated-selectors");
8
7
  const abort_error_1 = require("../errors/abort-error");
9
8
  const filterStaleElements_1 = require("./utils/filterStaleElements");
10
- function makeTakeSnapshots({ core, spec, fetchConcurrency, signal, logger: mainLogger, }) {
9
+ function makeTakeSnapshots({ core, fetchConcurrency, signal, logger: mainLogger, }) {
11
10
  const MAX_LOGGED_ERRORS_PER_SNAPSHOT = 10;
12
11
  return async function takeSnapshots({ driver, settings = {}, account, logger = mainLogger, }) {
13
12
  var _a, _b;
@@ -28,8 +27,6 @@ function makeTakeSnapshots({ core, spec, fetchConcurrency, signal, logger: mainL
28
27
  elementReferences,
29
28
  logger,
30
29
  logDeprecations,
31
- // dead code - `transformElementReference` was used for NMG but it's not longer used anywhere
32
- transformElementReference: elementReference => { var _a; return ((0, driver_1.isSelector)(elementReference) && ((_a = spec === null || spec === void 0 ? void 0 : spec.toSimpleCommonSelector) === null || _a === void 0 ? void 0 : _a.call(spec, elementReference))) || undefined; },
33
30
  });
34
31
  let snapshots;
35
32
  if (environment.isWeb) {
@@ -50,6 +47,7 @@ function makeTakeSnapshots({ core, spec, fetchConcurrency, signal, logger: mainL
50
47
  layoutBreakpoints: settings.layoutBreakpoints,
51
48
  environments: uniqueEnvironments,
52
49
  skipResources: ufgClient.getCachedResourceUrls(),
50
+ skipRootHtmlResource: settings.skipRootHtmlResource,
53
51
  lazyLoad: settings.lazyLoad,
54
52
  elementReferences: elementReferencesToMark,
55
53
  },
@@ -79,21 +77,8 @@ function makeTakeSnapshots({ core, spec, fetchConcurrency, signal, logger: mainL
79
77
  }
80
78
  }
81
79
  else {
82
- // dead code - used for NMG
83
80
  logDeprecations('takeSnapshots: taking native snapshots is no longer supported. How did you reach this message? (dead code)');
84
- const nmlClient = await core.getNMLClient({
85
- driver,
86
- settings: { ...account.eyesServer, supportedEnvironmentsUrl: account.supportedEnvironmentsUrl },
87
- logger,
88
- });
89
- snapshots = await nmlClient.takeSnapshots({
90
- settings: {
91
- ...account.eyesServer,
92
- waitBeforeCapture: settings.waitBeforeCapture,
93
- environments: uniqueEnvironments,
94
- },
95
- logger,
96
- });
81
+ throw new Error('Taking native (non-web) snapshots via VisualGridRunner is no longer supported. Please use ClassicRunner for native apps.');
97
82
  }
98
83
  await currentContext.focus();
99
84
  const url = await driver.getUrl();
@@ -47,6 +47,7 @@ async function takeDomSnapshot({ context, settings, logger, }) {
47
47
  const arg = {
48
48
  dontFetchResources: settings === null || settings === void 0 ? void 0 : settings.disableBrowserFetching,
49
49
  skipResources: settings === null || settings === void 0 ? void 0 : settings.skipResources,
50
+ skipRootHtmlResource: settings === null || settings === void 0 ? void 0 : settings.skipRootHtmlResource,
50
51
  fetchConcurrency: settings === null || settings === void 0 ? void 0 : settings.fetchConcurrency,
51
52
  removeReverseProxyURLPrefixes: Boolean(process.env.APPLITOOLS_SCRIPT_REMOVE_REVERSE_PROXY_URL_PREFIXES),
52
53
  chunkByteLength: (_a = settings === null || settings === void 0 ? void 0 : settings.chunkByteLength) !== null && _a !== void 0 ? _a : (Number(process.env.APPLITOOLS_SCRIPT_RESULT_MAX_BYTE_LENGTH) ||
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.toGeneratedSelectors = void 0;
4
- function toGeneratedSelectors({ elementReferences, logger, transformElementReference, logDeprecations, }) {
4
+ function toGeneratedSelectors({ elementReferences, logger, logDeprecations, }) {
5
5
  var _a, _b, _c;
6
6
  const elementReferencesToMark = [
7
7
  (_a = elementReferences.target) !== null && _a !== void 0 ? _a : [],
@@ -10,7 +10,7 @@ function toGeneratedSelectors({ elementReferences, logger, transformElementRefer
10
10
  ].flat();
11
11
  return { elementReferencesToMark, getGeneratedSelectors };
12
12
  function getGeneratedSelectors(generatedSelectors) {
13
- var _a, _b, _c;
13
+ var _a, _b;
14
14
  let target = undefined;
15
15
  let scrolling = undefined;
16
16
  let calculate = [];
@@ -54,13 +54,7 @@ function toGeneratedSelectors({ elementReferences, logger, transformElementRefer
54
54
  else if (target || scrolling || calculate.length) {
55
55
  // the entire else statement should be a dead code that was used for NMG, will be removed later
56
56
  logDeprecations('toGeneratedSelectors: `transformElementReference` was unexpectedly called.');
57
- target = elementReferences.target && transformElementReference(elementReferences.target);
58
- scrolling = elementReferences.scrolling && transformElementReference(elementReferences.scrolling);
59
- calculate = ((_c = elementReferences.calculate) !== null && _c !== void 0 ? _c : []).map(elementReference => {
60
- var _a;
61
- const selector = (_a = transformElementReference(elementReference)) !== null && _a !== void 0 ? _a : null;
62
- return { originalSelector: selector, safeSelector: selector };
63
- });
57
+ throw new Error('toGeneratedSelectors: `transformElementReference` was unexpectedly called.');
64
58
  }
65
59
  return { target, scrolling, calculate };
66
60
  }
@@ -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;