@applitools/core 4.69.0 → 4.69.1

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,45 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.69.1](https://github.com/Applitools-Dev/sdk/compare/js/core@4.69.0...js/core@4.69.1) (2026-08-23)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * keep the figma access token out of logs when masking is enabled | AD-15515 ([#4062](https://github.com/Applitools-Dev/sdk/issues/4062)) ([17bc177](https://github.com/Applitools-Dev/sdk/commit/17bc17789d88e2d92f32c66c3a43acb14eec4a70))
9
+
10
+
11
+ ### Performance Improvements
12
+
13
+ * CDT node dedup pass | AD-15243 ([baeab05](https://github.com/Applitools-Dev/sdk/commit/baeab05507e12d4d499050cd770191ef3cd9d0df))
14
+
15
+
16
+ ### Dependencies
17
+
18
+ * @applitools/dom-snapshot bumped to 4.18.1
19
+ #### Performance Improvements
20
+
21
+ * CDT node dedup pass | AD-15243 ([baeab05](https://github.com/Applitools-Dev/sdk/commit/baeab05507e12d4d499050cd770191ef3cd9d0df))
22
+ * @applitools/socket bumped to 1.3.17
23
+ #### Bug Fixes
24
+
25
+ * keep the figma access token out of logs when masking is enabled | AD-15515 ([#4062](https://github.com/Applitools-Dev/sdk/issues/4062)) ([17bc177](https://github.com/Applitools-Dev/sdk/commit/17bc17789d88e2d92f32c66c3a43acb14eec4a70))
26
+ * @applitools/image bumped to 1.3.2
27
+ #### Bug Fixes
28
+
29
+ * bump sharp to ^0.35.3 to clear libvips advisories | FLD-4829 ([#4113](https://github.com/Applitools-Dev/sdk/issues/4113)) ([90c2d08](https://github.com/Applitools-Dev/sdk/commit/90c2d0824cf3dfe56a074800907da6eb940ba350))
30
+ * @applitools/screenshoter bumped to 3.12.30
31
+
32
+ * @applitools/nml-client bumped to 1.12.1
33
+
34
+ * @applitools/tunnel-client bumped to 1.12.4
35
+
36
+ * @applitools/ufg-client bumped to 1.23.2
37
+
38
+ * @applitools/core-base bumped to 1.38.2
39
+
40
+ * @applitools/ec-client bumped to 1.12.44
41
+
42
+
3
43
  ## [4.69.0](https://github.com/Applitools-Dev/sdk/compare/js/core@4.68.1...js/core@4.69.0) (2026-08-19)
4
44
 
5
45
 
@@ -59,8 +59,10 @@ async function applyFigmaBaselines(settings, logger, resolve = figma_1.setFigmaB
59
59
  // A long TTL lets a pre-warmed cache (committed fixtures) serve through the normal cache-hit path
60
60
  // instead of the all-or-nothing skipApi bypass. Number.isFinite also rejects a non-numeric env value.
61
61
  const nodesCacheTtlSeconds = (_d = figmaOptions.nodesCacheTtlSeconds) !== null && _d !== void 0 ? _d : envTtl;
62
- // Registered with the logger the way apiKey/secretToken are elsewhere, so a token supplied through
63
- // figmaOptions is redacted wherever settings are logged downstream.
62
+ // Registered with the logger the way apiKey/secretToken are elsewhere. Masking is process-wide but
63
+ // takes effect only from this point on, and only when it is enabled (`maskLog` /
64
+ // APPLITOOLS_MASK_LOG). Log lines written before open reaches this seam — the universal socket's
65
+ // payload logs, for one — register the token themselves.
64
66
  const accessToken = (_e = figmaOptions.accessToken) !== null && _e !== void 0 ? _e : process.env.FIGMA_ACCESS_TOKEN;
65
67
  if (accessToken)
66
68
  logger.mask(accessToken);
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
26
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.runOfflineSnapshots = void 0;
29
+ exports.runOfflineSnapshots = exports.toEyesServerSettings = void 0;
30
30
  const fs_1 = __importDefault(require("fs"));
31
31
  const path_1 = __importDefault(require("path"));
32
32
  const core_1 = require("../core");
@@ -43,6 +43,22 @@ const os_1 = __importDefault(require("os"));
43
43
  const extract_git_info_1 = require("../utils/extract-git-info");
44
44
  const open_eyes_1 = require("../open-eyes");
45
45
  const throttledReadFile = (0, throat_1.default)(Number(process.env.APPLITOOLS_FILE_READING_CONCURRENCY) || 1000, fs_1.default.promises.readFile);
46
+ /**
47
+ * @internal
48
+ * The settings a replay run hands to `getAccountInfo`, which logs them, and the sanitized config the
49
+ * run works with afterwards. `figmaBaselines`/`figmaOptions` are off-the-wire open config and
50
+ * `figmaOptions.accessToken` is a Figma credential; the open-eyes seam that strips them is bypassed by
51
+ * replay, and no mask is registered on this path, so both the flattened open config and the nested
52
+ * `config` are stripped here — spreading `options` re-introduces `config.open` in full otherwise.
53
+ */
54
+ function toEyesServerSettings(options) {
55
+ const open = { ...options.config.open };
56
+ delete open.figmaBaselines;
57
+ delete open.figmaOptions;
58
+ const config = { ...options.config, open };
59
+ return { ...open, ...options, config };
60
+ }
61
+ exports.toEyesServerSettings = toEyesServerSettings;
46
62
  function getConsoleLogLimit() {
47
63
  var _a;
48
64
  return (_a = utils.general.getEnvValue('OFFLINE_LOG_LIMIT', 'number')) !== null && _a !== void 0 ? _a : 20;
@@ -64,13 +80,8 @@ async function runOfflineSnapshots(options) {
64
80
  const offlineLocationPath = path_1.default.resolve(options.offlineLocationPath);
65
81
  const startTime = Date.now();
66
82
  const logger = (_a = options.logger) !== null && _a !== void 0 ? _a : (0, logger_1.makeLogger)({ format: { label: 'offline-exec' } });
67
- // figmaBaselines/figmaOptions are off-the-wire open config that the open seam resolves and then strips.
68
- // This replay path bypasses the seam, so strip them once here — figmaOptions carries a Figma access
69
- // token, and getAccountInfo logs the settings it is called with.
70
- const openConfig = { ...options.config.open };
71
- delete openConfig.figmaBaselines;
72
- delete openConfig.figmaOptions;
73
- const eyesServerSettings = { ...openConfig, ...options };
83
+ const eyesServerSettings = toEyesServerSettings(options);
84
+ const config = eyesServerSettings.config;
74
85
  const core = (0, core_1.makeCore)({ agentId: `js/core-offline/${version()}`, logger });
75
86
  const account = await core.getAccountInfo({ settings: eyesServerSettings });
76
87
  const ufgClient = await (0, get_ufg_client_1.makeGetUFGClient)({ logger })({
@@ -97,7 +108,7 @@ async function runOfflineSnapshots(options) {
97
108
  testResults: allTestResults,
98
109
  totalTime: Date.now() - startTime,
99
110
  jsonFilePath: options.jsonFilePath,
100
- saveNewTests: options.config.close.updateBaselineIfNew,
111
+ saveNewTests: config.close.updateBaselineIfNew,
101
112
  });
102
113
  if (!isSuccess.onErrors && options.failOnError) {
103
114
  throw new Error(outputStr);
@@ -118,7 +129,7 @@ async function runOfflineSnapshots(options) {
118
129
  const fileOpenSettings = await fs_1.default.promises
119
130
  .readFile(path_1.default.join(testPath, 'settings.json'), 'utf-8')
120
131
  .then(JSON.parse);
121
- const openSettings = (0, merge_configs_1.mergeConfigs)(fileOpenSettings, openConfig);
132
+ const openSettings = (0, merge_configs_1.mergeConfigs)(fileOpenSettings, config.open);
122
133
  messages.push(`Running test: ${openSettings.testName} (${formatEnvironment(openSettings.environment)})`);
123
134
  return { testPath, openSettings, testLogger };
124
135
  });
@@ -138,7 +149,7 @@ async function runOfflineSnapshots(options) {
138
149
  const batchIds = [...new Set(results.map(t => t.batchId))];
139
150
  const allTestResults = results.map(t => t.results);
140
151
  logger.log('done running all tests', allTestResults);
141
- const keepBatchOpen = utils.general.getEnvValue('DONT_CLOSE_BATCHES', 'boolean') || options.config.open.keepBatchOpen;
152
+ const keepBatchOpen = utils.general.getEnvValue('DONT_CLOSE_BATCHES', 'boolean') || config.open.keepBatchOpen;
142
153
  if (!keepBatchOpen) {
143
154
  await core.closeBatch({ settings: batchIds.map(batchId => ({ batchId, ...account.eyesServer })) });
144
155
  logger.log('done closing batches');
@@ -218,7 +229,7 @@ async function runOfflineSnapshots(options) {
218
229
  const closeSettingsPath = path_1.default.resolve(testPath, 'close.json');
219
230
  if (fs_1.default.existsSync(closeSettingsPath)) {
220
231
  const fileCloseSettings = await throttledReadFile(closeSettingsPath, 'utf-8').then(JSON.parse);
221
- const closeSettings = (0, merge_configs_1.mergeConfigs)(fileCloseSettings, options.config.close);
232
+ const closeSettings = (0, merge_configs_1.mergeConfigs)(fileCloseSettings, config.close);
222
233
  return closeSettings;
223
234
  }
224
235
  return undefined;
@@ -381,7 +392,7 @@ async function runOfflineSnapshots(options) {
381
392
  if (accessibilityReportOptions === null || accessibilityReportOptions === void 0 ? void 0 : accessibilityReportOptions.uploadUrl)
382
393
  (_b = baseTarget.accessibilityReportLocation) !== null && _b !== void 0 ? _b : (baseTarget.accessibilityReportLocation = accessibilityReportOptions.uploadUrl);
383
394
  // baseTarget.name = snapshot.title // TODO figure out
384
- const mergedCheckSettings = (0, merge_configs_1.mergeConfigs)(baseSettings, options.config.check);
395
+ const mergedCheckSettings = (0, merge_configs_1.mergeConfigs)(baseSettings, config.check);
385
396
  return { mergedCheckSettings, baseTarget };
386
397
  }
387
398
  async function logStartupInfo() {
@@ -398,7 +409,7 @@ async function runOfflineSnapshots(options) {
398
409
  testCount: testFolders.length,
399
410
  ufgServerUrl: account.ufgServer.ufgServerUrl,
400
411
  CI: process.env.CI,
401
- config: options.config,
412
+ config,
402
413
  driver: {
403
414
  platform: os_1.default.platform(),
404
415
  version: os_1.default.release(),
@@ -50,6 +50,7 @@ async function takeDomSnapshot({ context, settings, logger, }) {
50
50
  skipRootHtmlResource: settings === null || settings === void 0 ? void 0 : settings.skipRootHtmlResource,
51
51
  fetchConcurrency: settings === null || settings === void 0 ? void 0 : settings.fetchConcurrency,
52
52
  removeReverseProxyURLPrefixes: Boolean(process.env.APPLITOOLS_SCRIPT_REMOVE_REVERSE_PROXY_URL_PREFIXES),
53
+ skipCDTDedup: utils.general.getEnvValue('SKIP_CDT_DEDUP', 'boolean'),
53
54
  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) ||
54
55
  (environment.isIOS ? 100000 : 250 * 1024 * 1024)),
55
56
  serializeResources: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applitools/core",
3
- "version": "4.69.0",
3
+ "version": "4.69.1",
4
4
  "homepage": "https://applitools.com",
5
5
  "bugs": {
6
6
  "url": "https://github.com/applitools/eyes.sdk.javascript1/issues"
@@ -61,19 +61,19 @@
61
61
  "setup:standalone": "sh -c 'yarn chromedriver --port=4444 --verbose &'"
62
62
  },
63
63
  "dependencies": {
64
- "@applitools/core-base": "1.38.1",
64
+ "@applitools/core-base": "1.38.2",
65
65
  "@applitools/dom-capture": "11.8.5",
66
- "@applitools/dom-snapshot": "4.18.0",
66
+ "@applitools/dom-snapshot": "4.18.1",
67
67
  "@applitools/driver": "1.26.9",
68
- "@applitools/ec-client": "1.12.43",
69
- "@applitools/image": "1.3.1",
68
+ "@applitools/ec-client": "1.12.44",
69
+ "@applitools/image": "1.3.2",
70
70
  "@applitools/logger": "2.3.1",
71
- "@applitools/nml-client": "1.12.0",
71
+ "@applitools/nml-client": "1.12.1",
72
72
  "@applitools/req": "1.11.3",
73
- "@applitools/screenshoter": "3.12.29",
73
+ "@applitools/screenshoter": "3.12.30",
74
74
  "@applitools/snippets": "2.9.7",
75
- "@applitools/socket": "1.3.16",
76
- "@applitools/ufg-client": "1.23.1",
75
+ "@applitools/socket": "1.3.17",
76
+ "@applitools/ufg-client": "1.23.2",
77
77
  "@applitools/utils": "1.15.2",
78
78
  "abort-controller": "3.0.0",
79
79
  "chalk": "4.1.2",
@@ -90,7 +90,7 @@
90
90
  "@applitools/spec-driver-webdriver": "^1.6.9",
91
91
  "@applitools/test-server": "^1.4.7",
92
92
  "@applitools/test-utils": "^1.5.17",
93
- "@applitools/tunnel-client": "^1.12.3",
93
+ "@applitools/tunnel-client": "^1.12.4",
94
94
  "@swc-node/register": "^1.6.8",
95
95
  "@types/mocha": "^10.0.7",
96
96
  "@types/node": "^12.20.55",
@@ -10,4 +10,15 @@ export type OfflineSnapshotsSettings = EyesServerSettings & {
10
10
  logger?: Logger;
11
11
  jsonFilePath?: string;
12
12
  };
13
+ /**
14
+ * @internal
15
+ * The settings a replay run hands to `getAccountInfo`, which logs them, and the sanitized config the
16
+ * run works with afterwards. `figmaBaselines`/`figmaOptions` are off-the-wire open config and
17
+ * `figmaOptions.accessToken` is a Figma credential; the open-eyes seam that strips them is bypassed by
18
+ * replay, and no mask is registered on this path, so both the flattened open config and the nested
19
+ * `config` are stripped here — spreading `options` re-introduces `config.open` in full otherwise.
20
+ */
21
+ export declare function toEyesServerSettings(options: OfflineSnapshotsSettings): EyesServerSettings & {
22
+ config: Config<SpecType, 'ufg'>;
23
+ };
13
24
  export declare function runOfflineSnapshots(options: OfflineSnapshotsSettings): Promise<TestResult[]>;