@allurereport/core 3.15.0 → 3.16.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/api.d.ts CHANGED
@@ -8,7 +8,7 @@ export interface PluginInstance {
8
8
  options: Record<string, any>;
9
9
  }
10
10
  type FullConfigRequiredFromConfig = Required<Pick<Config, "name" | "output" | "open">>;
11
- export interface FullConfig extends Omit<Config, "name" | "output" | "open" | "allureService" | "knownIssuesPath" | "plugins" | "port">, FullConfigRequiredFromConfig {
11
+ export interface FullConfig extends Omit<Config, "name" | "output" | "open" | "allureService" | "knownIssuesPath" | "plugins" | "port" | "resultsDir">, FullConfigRequiredFromConfig {
12
12
  port: Config["port"] | undefined;
13
13
  allowedEnvironments?: Config["allowedEnvironments"];
14
14
  reportFiles: ReportFiles;
@@ -21,5 +21,6 @@ export interface FullConfig extends Omit<Config, "name" | "output" | "open" | "a
21
21
  allureService?: ResolvedAllureServiceConfig;
22
22
  categories?: CategoriesConfig;
23
23
  globalAttachments?: string[];
24
+ resultsDir?: string[];
24
25
  }
25
26
  export {};
package/dist/config.js CHANGED
@@ -9,6 +9,7 @@ import { FileSystemReportFiles } from "./plugin.js";
9
9
  import { environmentIdentityById, environmentIdentityByName, validateAllowedEnvironmentIds, normalizeEnvironmentDescriptorMap, validateAllowedEnvironmentId, } from "./utils/environment.js";
10
10
  import { importWrapper } from "./utils/module.js";
11
11
  import { normalizeImportPath } from "./utils/path.js";
12
+ import { normalizeResultsDir } from "./utils/resultsDir.js";
12
13
  import { assertValidPluginIdForWindows, isWindows } from "./utils/windows.js";
13
14
  const CONFIG_FILENAMES = [
14
15
  "allurerc.js",
@@ -110,6 +111,7 @@ export const validateConfig = (config) => {
110
111
  "allureService",
111
112
  "categories",
112
113
  "globalAttachments",
114
+ "resultsDir",
113
115
  ];
114
116
  const unsupportedFields = Object.keys(config).filter((key) => !supportedFields.includes(key));
115
117
  return {
@@ -207,6 +209,7 @@ export const resolveConfig = async (config, override = {}) => {
207
209
  const output = resolve(override.output ?? config.output ?? "./allure-report");
208
210
  const known = knownIssuesPath ? await readKnownIssues(knownIssuesPath) : undefined;
209
211
  const variables = config.variables ?? {};
212
+ const resultsDir = normalizeResultsDir(config.resultsDir);
210
213
  let pluginInstances = [];
211
214
  const hasPluginsOverride = override.plugins !== undefined;
212
215
  if (!hasPluginsOverride || Object.keys(override.plugins ?? {}).length > 0) {
@@ -259,6 +262,7 @@ export const resolveConfig = async (config, override = {}) => {
259
262
  : undefined,
260
263
  categories: config.categories,
261
264
  globalAttachments: config.globalAttachments,
265
+ ...(resultsDir.length ? { resultsDir } : {}),
262
266
  };
263
267
  };
264
268
  export const readConfig = async (cwd = process.cwd(), configPath, override) => {
package/dist/index.d.ts CHANGED
@@ -5,6 +5,7 @@ export * from "./utils/path.js";
5
5
  export * from "./utils/new.js";
6
6
  export * from "./utils/flaky.js";
7
7
  export * from "./utils/environment.js";
8
+ export * from "./utils/resultsDir.js";
8
9
  export * from "./history.js";
9
10
  export * from "./known.js";
10
11
  export { resolveConfig, readConfig, readRawConfig, getPluginInstance } from "./config.js";
package/dist/index.js CHANGED
@@ -4,6 +4,7 @@ export * from "./utils/path.js";
4
4
  export * from "./utils/new.js";
5
5
  export * from "./utils/flaky.js";
6
6
  export * from "./utils/environment.js";
7
+ export * from "./utils/resultsDir.js";
7
8
  export * from "./history.js";
8
9
  export * from "./known.js";
9
10
  export { resolveConfig, readConfig, readRawConfig, getPluginInstance } from "./config.js";
package/dist/report.js CHANGED
@@ -141,6 +141,7 @@ export class AllureReport {
141
141
  message: uploadProgressMessage,
142
142
  unitLabel: "files uploaded",
143
143
  prefix: "[AllureReport]",
144
+ silent: !!__classPrivateFieldGet(this, _AllureReport_realTime, "f"),
144
145
  });
145
146
  const endPublishPerfSpan = startPerfSpan(PERF_METRIC_NAMES.publishUploadTotal);
146
147
  const logUploadProgress = progressLogger.log;
@@ -0,0 +1 @@
1
+ export declare const normalizeResultsDir: (value?: string | string[]) => string[];
@@ -0,0 +1,7 @@
1
+ export const normalizeResultsDir = (value) => {
2
+ if (value === undefined) {
3
+ return [];
4
+ }
5
+ const values = Array.isArray(value) ? value : [value];
6
+ return values.filter((entry) => entry.length > 0);
7
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allurereport/core",
3
- "version": "3.15.0",
3
+ "version": "3.16.0",
4
4
  "description": "Collection of generic Allure utilities used across the entire project",
5
5
  "keywords": [
6
6
  "allure"
@@ -25,26 +25,26 @@
25
25
  "lint:fix": "oxlint --import-plugin --fix src test features stories"
26
26
  },
27
27
  "dependencies": {
28
- "@allurereport/ci": "3.15.0",
29
- "@allurereport/cli-commons": "3.15.0",
30
- "@allurereport/core-api": "3.15.0",
31
- "@allurereport/plugin-agent": "3.15.0",
32
- "@allurereport/plugin-allure2": "3.15.0",
33
- "@allurereport/plugin-api": "3.15.0",
34
- "@allurereport/plugin-awesome": "3.15.0",
35
- "@allurereport/plugin-classic": "3.15.0",
36
- "@allurereport/plugin-csv": "3.15.0",
37
- "@allurereport/plugin-dashboard": "3.15.0",
38
- "@allurereport/plugin-jira": "3.15.0",
39
- "@allurereport/plugin-log": "3.15.0",
40
- "@allurereport/plugin-progress": "3.15.0",
41
- "@allurereport/plugin-slack": "3.15.0",
42
- "@allurereport/plugin-testops": "3.15.0",
43
- "@allurereport/plugin-testplan": "3.15.0",
44
- "@allurereport/reader": "3.15.0",
45
- "@allurereport/reader-api": "3.15.0",
46
- "@allurereport/service": "3.15.0",
47
- "@allurereport/summary": "3.15.0",
28
+ "@allurereport/ci": "3.16.0",
29
+ "@allurereport/cli-commons": "3.16.0",
30
+ "@allurereport/core-api": "3.16.0",
31
+ "@allurereport/plugin-agent": "3.16.0",
32
+ "@allurereport/plugin-allure2": "3.16.0",
33
+ "@allurereport/plugin-api": "3.16.0",
34
+ "@allurereport/plugin-awesome": "3.16.0",
35
+ "@allurereport/plugin-classic": "3.16.0",
36
+ "@allurereport/plugin-csv": "3.16.0",
37
+ "@allurereport/plugin-dashboard": "3.16.0",
38
+ "@allurereport/plugin-jira": "3.16.0",
39
+ "@allurereport/plugin-log": "3.16.0",
40
+ "@allurereport/plugin-progress": "3.16.0",
41
+ "@allurereport/plugin-slack": "3.16.0",
42
+ "@allurereport/plugin-testops": "3.16.0",
43
+ "@allurereport/plugin-testplan": "3.16.0",
44
+ "@allurereport/reader": "3.16.0",
45
+ "@allurereport/reader-api": "3.16.0",
46
+ "@allurereport/service": "3.16.0",
47
+ "@allurereport/summary": "3.16.0",
48
48
  "glob": "^13.0.6",
49
49
  "handlebars": "^4.7.9",
50
50
  "jiti": "^2.5.1",