@allurereport/service 3.0.0-beta.22 → 3.0.0-beta.24
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/dist/history.d.ts +3 -2
- package/dist/history.js +7 -3
- package/dist/service.d.ts +4 -0
- package/dist/service.js +11 -0
- package/package.json +3 -3
package/dist/history.d.ts
CHANGED
|
@@ -2,7 +2,8 @@ import type { AllureHistory } from "@allurereport/core-api";
|
|
|
2
2
|
import type { AllureServiceClient } from "./service.js";
|
|
3
3
|
export declare class AllureRemoteHistory implements AllureHistory {
|
|
4
4
|
readonly allureServiceClient: AllureServiceClient;
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
readonly branch?: string | undefined;
|
|
6
|
+
constructor(allureServiceClient: AllureServiceClient, branch?: string | undefined);
|
|
7
|
+
readHistory(): Promise<import("@allurereport/core-api").HistoryDataPoint[]>;
|
|
7
8
|
appendHistory(): Promise<void>;
|
|
8
9
|
}
|
package/dist/history.js
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { KnownError } from "./utils/http.js";
|
|
2
2
|
export class AllureRemoteHistory {
|
|
3
|
-
constructor(allureServiceClient) {
|
|
3
|
+
constructor(allureServiceClient, branch) {
|
|
4
4
|
this.allureServiceClient = allureServiceClient;
|
|
5
|
+
this.branch = branch;
|
|
5
6
|
}
|
|
6
|
-
async readHistory(
|
|
7
|
+
async readHistory() {
|
|
8
|
+
if (!this.branch) {
|
|
9
|
+
return [];
|
|
10
|
+
}
|
|
7
11
|
try {
|
|
8
|
-
const res = await this.allureServiceClient.downloadHistory(branch);
|
|
12
|
+
const res = await this.allureServiceClient.downloadHistory(this.branch);
|
|
9
13
|
return res;
|
|
10
14
|
}
|
|
11
15
|
catch (err) {
|
package/dist/service.d.ts
CHANGED
|
@@ -48,6 +48,10 @@ export declare class AllureServiceClient {
|
|
|
48
48
|
reportUuid: string;
|
|
49
49
|
historyPoint: HistoryDataPoint;
|
|
50
50
|
}): Promise<unknown>;
|
|
51
|
+
deleteReport(payload: {
|
|
52
|
+
reportUuid: string;
|
|
53
|
+
pluginId?: string;
|
|
54
|
+
}): Promise<unknown>;
|
|
51
55
|
addReportAsset(payload: {
|
|
52
56
|
filename: string;
|
|
53
57
|
file?: Buffer;
|
package/dist/service.js
CHANGED
|
@@ -119,6 +119,17 @@ export class AllureServiceClient {
|
|
|
119
119
|
},
|
|
120
120
|
});
|
|
121
121
|
}
|
|
122
|
+
async deleteReport(payload) {
|
|
123
|
+
const { reportUuid, pluginId = "" } = payload;
|
|
124
|
+
if (!this.currentProjectUuid) {
|
|
125
|
+
throw new Error("Project is not set");
|
|
126
|
+
}
|
|
127
|
+
return __classPrivateFieldGet(this, _AllureServiceClient_client, "f").post(`/reports/${reportUuid}/delete`, {
|
|
128
|
+
body: {
|
|
129
|
+
pluginId,
|
|
130
|
+
},
|
|
131
|
+
});
|
|
132
|
+
}
|
|
122
133
|
async addReportAsset(payload) {
|
|
123
134
|
const { filename, file, filepath } = payload;
|
|
124
135
|
if (!file && !filepath) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allurereport/service",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.24",
|
|
4
4
|
"description": "Allure Service API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"allure",
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"test": "rimraf ./out && vitest run"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@allurereport/core-api": "3.0.0-beta.
|
|
34
|
-
"@allurereport/plugin-api": "3.0.0-beta.
|
|
33
|
+
"@allurereport/core-api": "3.0.0-beta.24",
|
|
34
|
+
"@allurereport/plugin-api": "3.0.0-beta.24",
|
|
35
35
|
"axios": "^1.13.1",
|
|
36
36
|
"open": "^10.1.0"
|
|
37
37
|
},
|