@visual-regression-tracker/sdk-js 5.7.1 → 5.7.2

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.
@@ -36,7 +36,7 @@ const processTestRun = (testRunResponse, enableSoftAssert) => {
36
36
  exports.processTestRun = processTestRun;
37
37
  const shouldStopRetry = (result) => result.status !== types_1.TestStatus.unresolved;
38
38
  exports.shouldStopRetry = shouldStopRetry;
39
- const trackWithRetry = (trackFn, retryLimit = 2, enableSoftAssert) => __awaiter(void 0, void 0, void 0, function* () {
39
+ const trackWithRetry = (trackFn_1, ...args_1) => __awaiter(void 0, [trackFn_1, ...args_1], void 0, function* (trackFn, retryLimit = 2, enableSoftAssert) {
40
40
  const result = yield trackFn();
41
41
  if (retryLimit <= 0 || (0, exports.shouldStopRetry)(result)) {
42
42
  (0, exports.processTestRun)(result, enableSoftAssert);
@@ -1,15 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.instanceOfTestRunMultipart = exports.instanceOfTestRunBuffer = exports.instanceOfTestRunBase64 = void 0;
3
+ exports.instanceOfTestRunBase64 = instanceOfTestRunBase64;
4
+ exports.instanceOfTestRunBuffer = instanceOfTestRunBuffer;
5
+ exports.instanceOfTestRunMultipart = instanceOfTestRunMultipart;
4
6
  function instanceOfTestRunBase64(object) {
5
7
  return "imageBase64" in object;
6
8
  }
7
- exports.instanceOfTestRunBase64 = instanceOfTestRunBase64;
8
9
  function instanceOfTestRunBuffer(object) {
9
10
  return "imageBuffer" in object;
10
11
  }
11
- exports.instanceOfTestRunBuffer = instanceOfTestRunBuffer;
12
12
  function instanceOfTestRunMultipart(object) {
13
13
  return "imagePath" in object;
14
14
  }
15
- exports.instanceOfTestRunMultipart = instanceOfTestRunMultipart;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { TestRunDto } from "./testRun.dto";
3
2
  export interface TestRunBufferDto extends TestRunDto {
4
3
  imageBuffer: Buffer;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { IgnoreArea } from "./ignoreArea";
3
2
  interface TestRun {
4
3
  name: string;
@@ -69,7 +69,7 @@ class VisualRegressionTracker {
69
69
  throw new Error("Visual Regression Tracker has not been started");
70
70
  }
71
71
  yield axios_1.default
72
- .patch(`${this.config.apiUrl}/builds/${this.buildId}`, {}, this.axiosConfig)
72
+ .patch(`${this.config.apiUrl}/builds/${this.buildId}`, { isRunning: false }, this.axiosConfig)
73
73
  .then(this.handleResponse)
74
74
  .catch(this.handleException);
75
75
  });
@@ -133,8 +133,8 @@ class VisualRegressionTracker {
133
133
  * @param retryCount Retry count, default is 2
134
134
  * @returns
135
135
  */
136
- track(test, retryCount = 2) {
137
- return __awaiter(this, void 0, void 0, function* () {
136
+ track(test_1) {
137
+ return __awaiter(this, arguments, void 0, function* (test, retryCount = 2) {
138
138
  if (!this.isStarted()) {
139
139
  throw new Error("Visual Regression Tracker has not been started");
140
140
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visual-regression-tracker/sdk-js",
3
- "version": "5.7.1",
3
+ "version": "5.7.2",
4
4
  "description": "JavaScript SDK for Visual Regression Tracker",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -23,16 +23,16 @@
23
23
  },
24
24
  "homepage": "https://github.com/Visual-Regression-Tracker/Visual-Regression-Tracker",
25
25
  "dependencies": {
26
- "axios": "^1.6.2",
27
- "form-data": "^4.0.0"
26
+ "axios": "^1.20.0",
27
+ "form-data": "^4.0.6"
28
28
  },
29
29
  "devDependencies": {
30
- "@types/jest": "^29.5.3",
31
- "@types/node": "^20.6.2",
32
- "jest": "^29.6.2",
33
- "semantic-release": "^22.0.0",
34
- "ts-jest": "^29.1.1",
35
- "typescript": "^5.3.3"
30
+ "@types/jest": "^30.0.0",
31
+ "@types/node": "^22.20.5",
32
+ "jest": "^30.5.2",
33
+ "semantic-release": "^25.0.9",
34
+ "ts-jest": "^29.4.15",
35
+ "typescript": "^6.0.3"
36
36
  },
37
37
  "publishConfig": {
38
38
  "access": "public"