@allurereport/service 3.14.3 → 3.16.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.
@@ -1,5 +1,6 @@
1
1
  export const isReportDataFile = (filename) => filename === "index.html" ||
2
2
  filename === "summary.json" ||
3
+ filename === "test-results.json" ||
3
4
  filename.startsWith("data/") ||
4
5
  filename.startsWith("widgets/") ||
5
6
  filename.startsWith("history/");
@@ -2,11 +2,11 @@ import { type AxiosRequestConfig } from "axios";
2
2
  import type { UploadReportConfig, UploadReportFilePayload, UploadReportFilesPayload, UploadReportPayload, UploadReportResult } from "../model.js";
3
3
  export declare class KnownError extends Error {
4
4
  status?: number;
5
- constructor(message: string, status?: number);
5
+ constructor(message: string, status?: number, options?: ErrorOptions);
6
6
  }
7
7
  export declare class UnknownError extends Error {
8
8
  stack?: string;
9
- constructor(message: string, stack?: string);
9
+ constructor(message: string, stack?: string, options?: ErrorOptions);
10
10
  }
11
11
  export declare const formatResponseErrorData: (data: unknown) => string | undefined;
12
12
  export declare const formatServiceHttpErrorMessage: (payload: {
@@ -2,15 +2,15 @@ import { stat } from "node:fs/promises";
2
2
  import axios, { isAxiosError } from "axios";
3
3
  import { isReportDataFile } from "./files.js";
4
4
  export class KnownError extends Error {
5
- constructor(message, status) {
6
- super(message);
5
+ constructor(message, status, options) {
6
+ super(message, options);
7
7
  this.name = "KnownError";
8
8
  this.status = status;
9
9
  }
10
10
  }
11
11
  export class UnknownError extends Error {
12
- constructor(message, stack) {
13
- super(message);
12
+ constructor(message, stack, options) {
13
+ super(message, options);
14
14
  this.name = "UnknownError";
15
15
  this.stack = stack;
16
16
  }
@@ -156,9 +156,9 @@ export const createServiceHttpClient = (serviceUrl, params) => {
156
156
  fallbackMessage: err.message,
157
157
  });
158
158
  if (responseStatus < 500) {
159
- throw new KnownError(errorMessage, responseStatus);
159
+ throw new KnownError(errorMessage, responseStatus, { cause: err });
160
160
  }
161
- throw new UnknownError(errorMessage, err.stack);
161
+ throw new UnknownError(errorMessage, err.stack, { cause: err });
162
162
  }
163
163
  };
164
164
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allurereport/service",
3
- "version": "3.14.3",
3
+ "version": "3.16.0",
4
4
  "description": "Allure Service API",
5
5
  "keywords": [
6
6
  "allure",
@@ -30,8 +30,8 @@
30
30
  "lint:fix": "oxlint --import-plugin --fix src test features stories"
31
31
  },
32
32
  "dependencies": {
33
- "@allurereport/core-api": "3.14.3",
34
- "@allurereport/plugin-api": "3.14.3",
33
+ "@allurereport/core-api": "3.16.0",
34
+ "@allurereport/plugin-api": "3.16.0",
35
35
  "axios": "^1.18.1",
36
36
  "open": "^11.0.0"
37
37
  },