@allurereport/core 3.12.0 → 3.13.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.
- package/dist/config.d.ts +4 -2
- package/dist/config.js +7 -2
- package/package.json +20 -20
package/dist/config.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { Config, PluginDescriptor } from "@allurereport/plugin-api";
|
|
1
|
+
import type { Config, Plugin, PluginConstructorContext, PluginDescriptor } from "@allurereport/plugin-api";
|
|
2
2
|
import type { FullConfig, PluginInstance } from "./api.js";
|
|
3
|
+
type PluginConstructor = new (options?: Record<string, any>, context?: PluginConstructorContext) => Plugin;
|
|
3
4
|
export interface ConfigOverride {
|
|
4
5
|
name?: Config["name"];
|
|
5
6
|
output?: Config["output"];
|
|
@@ -28,4 +29,5 @@ export declare const resolveConfig: (config: Config, override?: ConfigOverride)
|
|
|
28
29
|
export declare const readConfig: (cwd?: string, configPath?: string, override?: ConfigOverride) => Promise<FullConfig>;
|
|
29
30
|
export declare const readRawConfig: (cwd?: string, configPath?: string) => Promise<Config>;
|
|
30
31
|
export declare const getPluginInstance: (config: FullConfig, predicate: (plugin: PluginInstance) => boolean) => PluginInstance | undefined;
|
|
31
|
-
export declare const resolvePlugin: (path: string) => Promise<
|
|
32
|
+
export declare const resolvePlugin: (path: string) => Promise<PluginConstructor>;
|
|
33
|
+
export {};
|
package/dist/config.js
CHANGED
|
@@ -319,11 +319,16 @@ const resolvePlugins = async (plugins) => {
|
|
|
319
319
|
const pluginConfig = plugins[id];
|
|
320
320
|
const pluginId = getPluginId(id);
|
|
321
321
|
const Plugin = await resolvePlugin(pluginConfig.import ?? id);
|
|
322
|
+
const enabled = pluginConfig.enabled ?? true;
|
|
323
|
+
const constructorContext = {};
|
|
324
|
+
if ("enabled" in pluginConfig) {
|
|
325
|
+
constructorContext.enabled = pluginConfig.enabled;
|
|
326
|
+
}
|
|
322
327
|
pluginInstances.push({
|
|
323
328
|
id: pluginId,
|
|
324
|
-
enabled
|
|
329
|
+
enabled,
|
|
325
330
|
options: pluginConfig.options ?? {},
|
|
326
|
-
plugin: new Plugin(pluginConfig.options),
|
|
331
|
+
plugin: new Plugin(pluginConfig.options, constructorContext),
|
|
327
332
|
});
|
|
328
333
|
}
|
|
329
334
|
return pluginInstances;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allurereport/core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.13.0",
|
|
4
4
|
"description": "Collection of generic Allure utilities used across the entire project",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"allure"
|
|
@@ -25,25 +25,25 @@
|
|
|
25
25
|
"lint:fix": "oxlint --import-plugin --fix src test features stories"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@allurereport/ci": "3.
|
|
29
|
-
"@allurereport/core-api": "3.
|
|
30
|
-
"@allurereport/plugin-agent": "3.
|
|
31
|
-
"@allurereport/plugin-allure2": "3.
|
|
32
|
-
"@allurereport/plugin-api": "3.
|
|
33
|
-
"@allurereport/plugin-awesome": "3.
|
|
34
|
-
"@allurereport/plugin-classic": "3.
|
|
35
|
-
"@allurereport/plugin-csv": "3.
|
|
36
|
-
"@allurereport/plugin-dashboard": "3.
|
|
37
|
-
"@allurereport/plugin-jira": "3.
|
|
38
|
-
"@allurereport/plugin-log": "3.
|
|
39
|
-
"@allurereport/plugin-progress": "3.
|
|
40
|
-
"@allurereport/plugin-slack": "3.
|
|
41
|
-
"@allurereport/plugin-testops": "3.
|
|
42
|
-
"@allurereport/plugin-testplan": "3.
|
|
43
|
-
"@allurereport/reader": "3.
|
|
44
|
-
"@allurereport/reader-api": "3.
|
|
45
|
-
"@allurereport/service": "3.
|
|
46
|
-
"@allurereport/summary": "3.
|
|
28
|
+
"@allurereport/ci": "3.13.0",
|
|
29
|
+
"@allurereport/core-api": "3.13.0",
|
|
30
|
+
"@allurereport/plugin-agent": "3.13.0",
|
|
31
|
+
"@allurereport/plugin-allure2": "3.13.0",
|
|
32
|
+
"@allurereport/plugin-api": "3.13.0",
|
|
33
|
+
"@allurereport/plugin-awesome": "3.13.0",
|
|
34
|
+
"@allurereport/plugin-classic": "3.13.0",
|
|
35
|
+
"@allurereport/plugin-csv": "3.13.0",
|
|
36
|
+
"@allurereport/plugin-dashboard": "3.13.0",
|
|
37
|
+
"@allurereport/plugin-jira": "3.13.0",
|
|
38
|
+
"@allurereport/plugin-log": "3.13.0",
|
|
39
|
+
"@allurereport/plugin-progress": "3.13.0",
|
|
40
|
+
"@allurereport/plugin-slack": "3.13.0",
|
|
41
|
+
"@allurereport/plugin-testops": "3.13.0",
|
|
42
|
+
"@allurereport/plugin-testplan": "3.13.0",
|
|
43
|
+
"@allurereport/reader": "3.13.0",
|
|
44
|
+
"@allurereport/reader-api": "3.13.0",
|
|
45
|
+
"@allurereport/service": "3.13.0",
|
|
46
|
+
"@allurereport/summary": "3.13.0",
|
|
47
47
|
"glob": "^13.0.6",
|
|
48
48
|
"handlebars": "^4.7.9",
|
|
49
49
|
"node-stream-zip": "^1.15.0",
|