@allurereport/plugin-server-reload 3.0.0-beta.10

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/README.md ADDED
@@ -0,0 +1,43 @@
1
+ # Server Reload Plugin
2
+
3
+ [<img src="https://allurereport.org/public/img/allure-report.svg" height="85px" alt="Allure Report logo" align="right" />](https://allurereport.org "Allure Report")
4
+
5
+ - Learn more about Allure Report at https://allurereport.org
6
+ - 📚 [Documentation](https://allurereport.org/docs/) – discover official documentation for Allure Report
7
+ - ❓ [Questions and Support](https://github.com/orgs/allure-framework/discussions/categories/questions-support) – get help from the team and community
8
+ - 📢 [Official announcements](https://github.com/orgs/allure-framework/discussions/categories/announcements) – be in touch with the latest updates
9
+ - 💬 [General Discussion ](https://github.com/orgs/allure-framework/discussions/categories/general-discussion) – engage in casual conversations, share insights and ideas with the community
10
+
11
+ ---
12
+
13
+ ## Overview
14
+
15
+ The plugin reloads running Allure Static Server on Allure Report state change.
16
+
17
+ ## Install
18
+
19
+ Use your favorite package manager to install the package:
20
+
21
+ ```shell
22
+ npm add @allurereport/plugin-server-reload
23
+ yarn add @allurereport/plugin-server-reload
24
+ pnpm add @allurereport/plugin-server-reload
25
+ ```
26
+
27
+ Then, add the plugin to the Allure configuration file:
28
+
29
+ ```diff
30
+ import { defineConfig } from "allure";
31
+
32
+ export default defineConfig({
33
+ name: "Allure Report",
34
+ output: "./allure-report",
35
+ historyPath: "./history.jsonl",
36
+ plugins: {
37
+ + "server-reload": {
38
+ + options: {
39
+ + },
40
+ + },
41
+ },
42
+ });
43
+ ```
@@ -0,0 +1,2 @@
1
+ import { ServerReloadPlugin } from "./plugin.js";
2
+ export default ServerReloadPlugin;
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ import { ServerReloadPlugin } from "./plugin.js";
2
+ export default ServerReloadPlugin;
@@ -0,0 +1,13 @@
1
+ import type { Plugin } from "@allurereport/plugin-api";
2
+ import { type AllureStaticServer } from "@allurereport/static-server";
3
+ export declare class ServerReloadPlugin implements Plugin {
4
+ readonly options: {
5
+ server: AllureStaticServer;
6
+ timeout?: number;
7
+ };
8
+ constructor(options: {
9
+ server: AllureStaticServer;
10
+ timeout?: number;
11
+ });
12
+ update: () => Promise<void>;
13
+ }
package/dist/plugin.js ADDED
@@ -0,0 +1,8 @@
1
+ export class ServerReloadPlugin {
2
+ constructor(options) {
3
+ this.options = options;
4
+ this.update = async () => {
5
+ this.options.server.reload();
6
+ };
7
+ }
8
+ }
package/package.json ADDED
@@ -0,0 +1,55 @@
1
+ {
2
+ "name": "@allurereport/plugin-server-reload",
3
+ "version": "3.0.0-beta.10",
4
+ "description": "Allure Plugin to reload Allure Static Server on state change",
5
+ "keywords": [
6
+ "allure",
7
+ "testing",
8
+ "report",
9
+ "plugin"
10
+ ],
11
+ "repository": "https://github.com/allure-framework/allure3",
12
+ "license": "Apache-2.0",
13
+ "author": "Qameta Software",
14
+ "type": "module",
15
+ "exports": {
16
+ ".": "./dist/index.js"
17
+ },
18
+ "main": "./dist/index.js",
19
+ "module": "./dist/index.js",
20
+ "types": "./dist/index.d.ts",
21
+ "files": [
22
+ "./dist"
23
+ ],
24
+ "scripts": {
25
+ "build": "run clean && tsc --project ./tsconfig.json",
26
+ "clean": "rimraf ./dist",
27
+ "eslint": "eslint ./src/**/*.{js,jsx,ts,tsx}",
28
+ "eslint:format": "eslint --fix ./src/**/*.{js,jsx,ts,tsx}",
29
+ "test": "rimraf ./out && vitest run"
30
+ },
31
+ "dependencies": {
32
+ "@allurereport/plugin-api": "3.0.0-beta.10",
33
+ "@allurereport/static-server": "3.0.0-beta.10"
34
+ },
35
+ "devDependencies": {
36
+ "@stylistic/eslint-plugin": "^2.6.1",
37
+ "@types/eslint": "^8.56.11",
38
+ "@types/node": "^20.17.9",
39
+ "@typescript-eslint/eslint-plugin": "^8.0.0",
40
+ "@typescript-eslint/parser": "^8.0.0",
41
+ "@vitest/runner": "^2.1.8",
42
+ "@vitest/snapshot": "^2.1.8",
43
+ "allure-vitest": "^3.0.9",
44
+ "eslint": "^8.57.0",
45
+ "eslint-config-prettier": "^9.1.0",
46
+ "eslint-plugin-import": "^2.29.1",
47
+ "eslint-plugin-jsdoc": "^50.0.0",
48
+ "eslint-plugin-n": "^17.10.1",
49
+ "eslint-plugin-no-null": "^1.0.2",
50
+ "eslint-plugin-prefer-arrow": "^1.2.3",
51
+ "rimraf": "^6.0.1",
52
+ "typescript": "^5.6.3",
53
+ "vitest": "^2.1.8"
54
+ }
55
+ }