@allurereport/core-api 3.0.0-beta.15 → 3.0.0-beta.17

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,4 +1,10 @@
1
- export type Statistic = {
1
+ export type DiffStatistic = {
2
+ regressed?: number;
3
+ fixed?: number;
4
+ malfunctioned?: number;
5
+ new?: number;
6
+ };
7
+ export type Statistic = DiffStatistic & {
2
8
  failed?: number;
3
9
  broken?: number;
4
10
  passed?: number;
package/dist/ci.d.ts ADDED
@@ -0,0 +1,23 @@
1
+ export declare enum CiType {
2
+ Amazon = "amazon",
3
+ Azure = "azure",
4
+ Bitbucket = "bitbucket",
5
+ Circle = "circle",
6
+ Drone = "drone",
7
+ Github = "github",
8
+ Gitlab = "gitlab",
9
+ Jenkins = "jenkins"
10
+ }
11
+ export interface CiDescriptor {
12
+ type: CiType;
13
+ detected: boolean;
14
+ jobUid: string;
15
+ jobUrl: string;
16
+ jobName: string;
17
+ jobRunUid: string;
18
+ jobRunUrl: string;
19
+ jobRunName: string;
20
+ jobRunBranch: string;
21
+ pullRequestName: string;
22
+ pullRequestUrl: string;
23
+ }
package/dist/ci.js ADDED
@@ -0,0 +1,11 @@
1
+ export var CiType;
2
+ (function (CiType) {
3
+ CiType["Amazon"] = "amazon";
4
+ CiType["Azure"] = "azure";
5
+ CiType["Bitbucket"] = "bitbucket";
6
+ CiType["Circle"] = "circle";
7
+ CiType["Drone"] = "drone";
8
+ CiType["Github"] = "github";
9
+ CiType["Gitlab"] = "gitlab";
10
+ CiType["Jenkins"] = "jenkins";
11
+ })(CiType || (CiType = {}));
package/dist/history.d.ts CHANGED
@@ -10,6 +10,7 @@ export interface HistoryTestResult {
10
10
  stop?: number;
11
11
  duration?: number;
12
12
  labels?: TestLabel[];
13
+ url: string;
13
14
  }
14
15
  export interface HistoryDataPoint {
15
16
  uuid: string;
@@ -18,4 +19,9 @@ export interface HistoryDataPoint {
18
19
  knownTestCaseIds: string[];
19
20
  testResults: Record<string, HistoryTestResult>;
20
21
  metrics: Record<string, number>;
22
+ url: string;
23
+ }
24
+ export interface AllureHistory {
25
+ readHistory(branch?: string): Promise<HistoryDataPoint[]>;
26
+ appendHistory(history: HistoryDataPoint, branch?: string): Promise<void>;
21
27
  }
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export type * from "./aggregate.js";
2
2
  export * from "./constants.js";
3
+ export * from "./ci.js";
3
4
  export type * from "./environment.js";
4
5
  export type * from "./history.js";
5
6
  export type * from "./known.js";
package/dist/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from "./constants.js";
2
+ export * from "./ci.js";
2
3
  export * from "./utils/step.js";
3
4
  export * from "./utils/time.js";
4
5
  export * from "./utils/comparator.js";
package/dist/model.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import type { TestLabel, TestLink, TestParameter } from "./metadata.js";
2
2
  import type { TestCase } from "./testCase.js";
3
3
  export type TestStatus = "failed" | "broken" | "passed" | "skipped" | "unknown";
4
+ export type TestStatusTransition = "regressed" | "fixed" | "malfunctioned" | "new";
4
5
  export type SeverityLevel = "blocker" | "critical" | "normal" | "minor" | "trivial";
5
6
  export interface SourceMetadata {
6
7
  readerId: string;
@@ -35,6 +36,7 @@ export interface TestResult {
35
36
  flaky: boolean;
36
37
  muted: boolean;
37
38
  known: boolean;
39
+ transition?: TestStatusTransition;
38
40
  hidden: boolean;
39
41
  hostId?: string;
40
42
  threadId?: string;
@@ -46,6 +48,7 @@ export interface TestResult {
46
48
  runSelector?: string;
47
49
  retries?: TestResult[];
48
50
  categories?: any;
51
+ titlePath?: string[];
49
52
  }
50
53
  export interface TestEnvGroup {
51
54
  id: string;
@@ -111,3 +114,7 @@ export interface AttachmentTestStepResult {
111
114
  link: AttachmentLinkExpected | AttachmentLinkLinked | AttachmentLinkInvalid;
112
115
  type: "attachment";
113
116
  }
117
+ export interface RepoData {
118
+ name: string;
119
+ branch: string;
120
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allurereport/core-api",
3
- "version": "3.0.0-beta.15",
3
+ "version": "3.0.0-beta.17",
4
4
  "description": "Allure Core API",
5
5
  "keywords": [
6
6
  "allure"
@@ -31,9 +31,9 @@
31
31
  "@types/node": "^20.17.9",
32
32
  "@typescript-eslint/eslint-plugin": "^8.0.0",
33
33
  "@typescript-eslint/parser": "^8.0.0",
34
- "@vitest/runner": "^2.1.8",
35
- "@vitest/snapshot": "^2.1.8",
36
- "allure-vitest": "^3.0.9",
34
+ "@vitest/runner": "^2.1.9",
35
+ "@vitest/snapshot": "^2.1.9",
36
+ "allure-vitest": "^3.3.0",
37
37
  "eslint": "^8.57.0",
38
38
  "eslint-config-prettier": "^9.1.0",
39
39
  "eslint-plugin-import": "^2.29.1",
@@ -43,6 +43,6 @@
43
43
  "eslint-plugin-prefer-arrow": "^1.2.3",
44
44
  "rimraf": "^6.0.1",
45
45
  "typescript": "^5.6.3",
46
- "vitest": "^2.1.8"
46
+ "vitest": "^2.1.9"
47
47
  }
48
48
  }