@applitools/eyes 1.30.0 → 1.31.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,105 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.31.1](https://github.com/Applitools-Dev/sdk/compare/js/eyes@1.31.0...js/eyes@1.31.1) (2025-01-19)
4
+
5
+
6
+ ### Dependencies
7
+
8
+ * @applitools/socket bumped to 1.2.1
9
+ #### Bug Fixes
10
+
11
+ * mask from config property ([#2739](https://github.com/Applitools-Dev/sdk/issues/2739)) ([6840624](https://github.com/Applitools-Dev/sdk/commit/6840624f5f3f56512dce96547815904adec94704))
12
+ * @applitools/req bumped to 1.7.7
13
+ #### Bug Fixes
14
+
15
+ * memory usage going high when resource is uint8array ([#2743](https://github.com/Applitools-Dev/sdk/issues/2743)) ([d06deeb](https://github.com/Applitools-Dev/sdk/commit/d06deeb845de62e96ec623efefa90ae65a703736))
16
+ * @applitools/spec-driver-webdriver bumped to 1.1.24
17
+ #### Bug Fixes
18
+
19
+ * universal core on windows ([#2736](https://github.com/Applitools-Dev/sdk/issues/2736)) ([9bd0744](https://github.com/Applitools-Dev/sdk/commit/9bd0744ca816a020973f20645aeb2460af76f44c))
20
+ * @applitools/tunnel-client bumped to 1.6.1
21
+ #### Bug Fixes
22
+
23
+ * memory usage going high when resource is uint8array ([#2743](https://github.com/Applitools-Dev/sdk/issues/2743)) ([d06deeb](https://github.com/Applitools-Dev/sdk/commit/d06deeb845de62e96ec623efefa90ae65a703736))
24
+
25
+
26
+
27
+ * @applitools/screenshoter bumped to 3.10.4
28
+
29
+ * @applitools/nml-client bumped to 1.8.23
30
+
31
+ * @applitools/ufg-client bumped to 1.16.1
32
+ #### Bug Fixes
33
+
34
+ * memory usage going high when resource is uint8array ([#2743](https://github.com/Applitools-Dev/sdk/issues/2743)) ([d06deeb](https://github.com/Applitools-Dev/sdk/commit/d06deeb845de62e96ec623efefa90ae65a703736))
35
+
36
+
37
+
38
+ * @applitools/core-base bumped to 1.22.1
39
+
40
+ * @applitools/ec-client bumped to 1.10.2
41
+
42
+ * @applitools/core bumped to 4.29.1
43
+ #### Bug Fixes
44
+
45
+ * mask from config property ([#2739](https://github.com/Applitools-Dev/sdk/issues/2739)) ([6840624](https://github.com/Applitools-Dev/sdk/commit/6840624f5f3f56512dce96547815904adec94704))
46
+ * universal core on windows ([#2736](https://github.com/Applitools-Dev/sdk/issues/2736)) ([9bd0744](https://github.com/Applitools-Dev/sdk/commit/9bd0744ca816a020973f20645aeb2460af76f44c))
47
+
48
+
49
+
50
+
51
+ ## [1.31.0](https://github.com/Applitools-Dev/sdk/compare/js/eyes@1.30.0...js/eyes@1.31.0) (2025-01-13)
52
+
53
+
54
+ ### Features
55
+
56
+ * jsonFilePath in offline mode ([#2734](https://github.com/Applitools-Dev/sdk/issues/2734)) ([2f9fbe8](https://github.com/Applitools-Dev/sdk/commit/2f9fbe8fc3c5212db6b7cc58a98b041c3ffd5572))
57
+
58
+
59
+ ### Dependencies
60
+
61
+ * @applitools/dom-snapshot bumped to 4.11.14
62
+ #### Bug Fixes
63
+
64
+ * remove side-eyes and fix code scanning issues ([#2712](https://github.com/Applitools-Dev/sdk/issues/2712)) ([cda98e4](https://github.com/Applitools-Dev/sdk/commit/cda98e4748c73cd97c11f646a2b5e26ff9416892))
65
+
66
+
67
+
68
+ * @applitools/snippets bumped to 2.6.4
69
+ #### Bug Fixes
70
+
71
+ * remove side-eyes and fix code scanning issues ([#2712](https://github.com/Applitools-Dev/sdk/issues/2712)) ([cda98e4](https://github.com/Applitools-Dev/sdk/commit/cda98e4748c73cd97c11f646a2b5e26ff9416892))
72
+ * @applitools/dom-capture bumped to 11.5.4
73
+ #### Bug Fixes
74
+
75
+ * remove side-eyes and fix code scanning issues ([#2712](https://github.com/Applitools-Dev/sdk/issues/2712)) ([cda98e4](https://github.com/Applitools-Dev/sdk/commit/cda98e4748c73cd97c11f646a2b5e26ff9416892))
76
+ * @applitools/driver bumped to 1.20.3
77
+
78
+ * @applitools/spec-driver-webdriver bumped to 1.1.23
79
+
80
+ * @applitools/spec-driver-selenium bumped to 1.5.94
81
+
82
+ * @applitools/spec-driver-puppeteer bumped to 1.4.23
83
+
84
+ * @applitools/screenshoter bumped to 3.10.3
85
+
86
+ * @applitools/nml-client bumped to 1.8.22
87
+
88
+ * @applitools/ec-client bumped to 1.10.1
89
+
90
+ * @applitools/core bumped to 4.29.0
91
+ #### Features
92
+
93
+ * jsonFilePath in offline mode ([#2734](https://github.com/Applitools-Dev/sdk/issues/2734)) ([2f9fbe8](https://github.com/Applitools-Dev/sdk/commit/2f9fbe8fc3c5212db6b7cc58a98b041c3ffd5572))
94
+
95
+
96
+ #### Bug Fixes
97
+
98
+ * support batching tests in distributed env - close batch only when required ([#2733](https://github.com/Applitools-Dev/sdk/issues/2733)) ([2e59e4a](https://github.com/Applitools-Dev/sdk/commit/2e59e4a76edcc02b8888dfc78a42749bae76f79c))
99
+
100
+
101
+
102
+
3
103
  ## [1.30.0](https://github.com/Applitools-Dev/sdk/compare/js/eyes-v1.29.4...js/eyes@1.30.0) (2024-12-31)
4
104
 
5
105
 
package/dist/Eyes.js CHANGED
@@ -58,7 +58,7 @@ class Eyes {
58
58
  }
59
59
  static async setViewportSize(driver, size) {
60
60
  var _a;
61
- const { core } = (0, SDK_1.initSDK)(this._sdk);
61
+ const { core } = (0, SDK_1.initSDK)(this._sdk, true);
62
62
  await ((_a = core.setViewportSize) === null || _a === void 0 ? void 0 : _a.call(core, { target: driver, size: { width: size.width, height: size.height } }));
63
63
  }
64
64
  static setMobileCapabilities(capabilities, config) {
@@ -92,7 +92,7 @@ class Eyes {
92
92
  this._state = {};
93
93
  this._events = new Map();
94
94
  this._handlers = new SessionEventHandlers_1.SessionEventHandlers();
95
- const maskLog = utils.types.instanceOf(runnerOrConfig, Runners_1.EyesRunner) ? runnerOrConfig._maskLog : false;
95
+ const maskLog = utils.types.instanceOf(runnerOrConfig, Runners_1.EyesRunner) ? runnerOrConfig._maskLog : undefined;
96
96
  const sdk = (0, SDK_1.initSDK)(this._sdk, maskLog);
97
97
  this._spec = sdk.spec;
98
98
  this._core = sdk.core;
package/dist/SDK.js CHANGED
@@ -23,19 +23,19 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.initSDK = void 0;
26
+ exports.getCoreWithCache = exports.initSDK = void 0;
27
27
  const core_1 = require("@applitools/core");
28
28
  const utils = __importStar(require("@applitools/utils"));
29
29
  function initSDK(options, maskLog) {
30
30
  if (options)
31
31
  options.maskLog = maskLog;
32
32
  return {
33
- core: getCoreWithCache(options),
33
+ core: (0, exports.getCoreWithCache)(options),
34
34
  spec: options === null || options === void 0 ? void 0 : options.spec,
35
35
  };
36
36
  }
37
37
  exports.initSDK = initSDK;
38
- const getCoreWithCache = utils.general.cachify(getCore);
38
+ exports.getCoreWithCache = utils.general.cachify(getCore);
39
39
  function getCore({ makeCore = core_1.makeCore, ...options } = {}) {
40
40
  var _a;
41
41
  (_a = options.agentId) !== null && _a !== void 0 ? _a : (options.agentId = `js/eyes/${require('../package.json').version}`);
package/dist/cli/cli.js CHANGED
@@ -29,6 +29,10 @@ void yargs_1.default
29
29
  description: 'path to configuration file (applitools.config.js / applitools.config.ts)',
30
30
  type: 'string',
31
31
  },
32
+ jsonFilePath: {
33
+ description: 'path to json file with the test results',
34
+ type: 'string',
35
+ },
32
36
  })
33
37
  .fail((_msg, err, _yargs) => {
34
38
  if (err) {
@@ -483,6 +483,26 @@ class ConfigurationData {
483
483
  this.gitMergeBaseTimestamp = gitMergeBaseTimestamp;
484
484
  return this;
485
485
  }
486
+ get latestCommitInfo() {
487
+ return this._config.latestCommitInfo;
488
+ }
489
+ set latestCommitInfo(latestCommitInfo) {
490
+ if (latestCommitInfo) {
491
+ utils.guard.isString(latestCommitInfo.sha, { name: 'latestCommitInfo.sha' });
492
+ // TODO implement utils.guard.isISODate (didn't do it to avoid releasing utils and then all packages for this small thing)
493
+ utils.guard.custom(latestCommitInfo.timestamp, (timestamp) => isISODate(timestamp), {
494
+ name: 'latestCommitInfo.timestamp',
495
+ });
496
+ }
497
+ this._config.latestCommitInfo = latestCommitInfo;
498
+ }
499
+ getLatestCommitInfo() {
500
+ return this.latestCommitInfo;
501
+ }
502
+ setLatestCommitInfo(latestCommitInfo) {
503
+ this.latestCommitInfo = latestCommitInfo;
504
+ return this;
505
+ }
486
506
  get hideCaret() {
487
507
  return this._config.hideCaret;
488
508
  }
@@ -1062,6 +1082,7 @@ class ConfigurationData {
1062
1082
  ignoreBaseline: this.ignoreBaseline,
1063
1083
  gitBranchingTimestamp: this.gitMergeBaseTimestamp,
1064
1084
  ignoreGitBranching: this.ignoreGitMergeBase,
1085
+ latestCommitInfo: this.latestCommitInfo,
1065
1086
  saveDiffs: this.saveDiffs,
1066
1087
  keepBatchOpen: this.dontCloseBatches,
1067
1088
  disableBrokerUrlCache: this.disableNMLUrlCache,
@@ -1133,3 +1154,7 @@ class ConfigurationData {
1133
1154
  }
1134
1155
  }
1135
1156
  exports.ConfigurationData = ConfigurationData;
1157
+ // TODO: should be in utils
1158
+ function isISODate(str) {
1159
+ return /\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\+\d{2}:\d{2})?/.test(str);
1160
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applitools/eyes",
3
- "version": "1.30.0",
3
+ "version": "1.31.1",
4
4
  "keywords": [
5
5
  "applitools",
6
6
  "eyes",
@@ -46,13 +46,13 @@
46
46
  "test": "run --top-level mocha './test/**/*.spec.ts'"
47
47
  },
48
48
  "dependencies": {
49
- "@applitools/core": "4.28.0",
49
+ "@applitools/core": "4.29.1",
50
50
  "@applitools/logger": "2.1.0",
51
51
  "@applitools/utils": "1.7.7",
52
52
  "chalk": "4.1.2"
53
53
  },
54
54
  "devDependencies": {
55
- "@applitools/req": "^1.7.6",
55
+ "@applitools/req": "^1.7.7",
56
56
  "@types/node": "^12.20.55"
57
57
  },
58
58
  "engines": {
package/types/SDK.d.ts CHANGED
@@ -10,3 +10,10 @@ export declare function initSDK<TSpec extends SpecType = SpecType>(options?: SDK
10
10
  core: Core<TSpec, 'classic' | 'ufg'>;
11
11
  spec?: SpecDriver<TSpec>;
12
12
  };
13
+ export declare const getCoreWithCache: typeof getCore & {
14
+ getCachedValues(): Core<SpecType, "classic" | "ufg">[];
15
+ setCachedValue(key: any, value: Core<SpecType, "classic" | "ufg">): void;
16
+ clearCache(): void;
17
+ };
18
+ declare function getCore<TSpec extends SpecType = SpecType>({ makeCore, ...options }?: SDK<TSpec>): Core<TSpec, 'classic' | 'ufg'>;
19
+ export {};
@@ -18,6 +18,7 @@ import { AUTProxySettings } from './AUTProxySettings';
18
18
  import { BatchInfo, BatchInfoData } from './BatchInfo';
19
19
  import { PropertyData, PropertyDataData } from './PropertyData';
20
20
  import { ImageMatchSettings } from './ImageMatchSettings';
21
+ import { LatestCommitInfo } from './LatestCommitInfo';
21
22
  export type Configuration<TSpec extends Core.SpecType = Core.SpecType> = {
22
23
  accessibilityValidation?: AccessibilitySettings;
23
24
  agentId?: string;
@@ -49,6 +50,7 @@ export type Configuration<TSpec extends Core.SpecType = Core.SpecType> = {
49
50
  environmentName?: string;
50
51
  forceFullPageScreenshot?: boolean;
51
52
  gitMergeBaseTimestamp?: string;
53
+ latestCommitInfo?: LatestCommitInfo;
52
54
  hideCaret?: boolean;
53
55
  hideScrollbars?: boolean;
54
56
  hostApp?: string;
@@ -234,6 +236,10 @@ export declare class ConfigurationData<TSpec extends Core.SpecType = Core.SpecTy
234
236
  set gitMergeBaseTimestamp(gitMergeBaseTimestamp: string);
235
237
  getGitMergeBaseTimestamp(): string;
236
238
  setGitMergeBaseTimestamp(gitMergeBaseTimestamp: string): this;
239
+ get latestCommitInfo(): LatestCommitInfo;
240
+ set latestCommitInfo(latestCommitInfo: LatestCommitInfo);
241
+ getLatestCommitInfo(): LatestCommitInfo;
242
+ setLatestCommitInfo(latestCommitInfo: LatestCommitInfo): this;
237
243
  get hideCaret(): boolean;
238
244
  set hideCaret(hideCaret: boolean);
239
245
  getHideCaret(): boolean;
@@ -0,0 +1,4 @@
1
+ export type LatestCommitInfo = {
2
+ timestamp: string;
3
+ sha: string;
4
+ };