@allurereport/core 3.6.2 → 3.8.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.js +22 -18
- package/dist/report.js +296 -188
- package/dist/store/convert.js +1 -0
- package/dist/store/store.d.ts +5 -1
- package/dist/store/store.js +91 -8
- package/dist/utils/event.d.ts +9 -10
- package/dist/utils/event.js +77 -65
- package/dist/utils/realtimeChannel.d.ts +8 -0
- package/dist/utils/realtimeChannel.js +29 -0
- package/dist/utils/realtimeUpdateScheduler.d.ts +10 -0
- package/dist/utils/realtimeUpdateScheduler.js +81 -0
- package/package.json +20 -20
package/dist/config.js
CHANGED
|
@@ -189,23 +189,27 @@ export const resolveConfig = async (config, override = {}) => {
|
|
|
189
189
|
const output = resolve(override.output ?? config.output ?? "./allure-report");
|
|
190
190
|
const known = await readKnownIssues(knownIssuesPath);
|
|
191
191
|
const variables = config.variables ?? {};
|
|
192
|
-
|
|
193
|
-
const
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
192
|
+
let pluginInstances = [];
|
|
193
|
+
const hasPluginsOverride = override.plugins !== undefined;
|
|
194
|
+
if (!hasPluginsOverride || Object.keys(override.plugins ?? {}).length > 0) {
|
|
195
|
+
const configuredPlugins = hasPluginsOverride ? override.plugins : config.plugins;
|
|
196
|
+
const basePlugins = !hasPluginsOverride && Object.keys(configuredPlugins ?? {}).length === 0
|
|
197
|
+
? {
|
|
198
|
+
awesome: {
|
|
199
|
+
options: {},
|
|
200
|
+
},
|
|
201
|
+
}
|
|
202
|
+
: configuredPlugins;
|
|
203
|
+
const plugins = hasConfiguredAgent(basePlugins)
|
|
204
|
+
? basePlugins
|
|
205
|
+
: {
|
|
206
|
+
...basePlugins,
|
|
207
|
+
agent: {
|
|
208
|
+
options: {},
|
|
209
|
+
},
|
|
210
|
+
};
|
|
211
|
+
pluginInstances = await resolvePlugins(plugins);
|
|
212
|
+
}
|
|
209
213
|
return {
|
|
210
214
|
name,
|
|
211
215
|
output,
|
|
@@ -256,7 +260,7 @@ export const getPluginInstance = (config, predicate) => {
|
|
|
256
260
|
return config?.plugins?.find(predicate);
|
|
257
261
|
};
|
|
258
262
|
const isModuleNotFoundError = (err) => {
|
|
259
|
-
return err instanceof Error && "code" in err && err.code === "ERR_MODULE_NOT_FOUND";
|
|
263
|
+
return (err instanceof Error && "code" in err && (err.code === "ERR_MODULE_NOT_FOUND" || err.code === "MODULE_NOT_FOUND"));
|
|
260
264
|
};
|
|
261
265
|
export const resolvePlugin = async (path) => {
|
|
262
266
|
if (!path.startsWith("@allurereport/plugin-")) {
|