allure 3.2.0 → 3.3.1

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.
@@ -3,5 +3,5 @@ export declare const generate: (params: {
3
3
  cwd: string;
4
4
  config: FullConfig;
5
5
  resultsDir: string;
6
- stage?: string[];
6
+ dump?: string[];
7
7
  }) => Promise<void>;
@@ -5,21 +5,21 @@ import { exit } from "node:process";
5
5
  import { red } from "yoctocolors";
6
6
  import { logError } from "../../utils/logs.js";
7
7
  export const generate = async (params) => {
8
- const stageDumpFiles = [];
8
+ const dumpFiles = [];
9
9
  const resultsDirectories = [];
10
- if (params?.stage?.length) {
11
- for (const stage of params.stage) {
12
- const matchedFiles = await glob(stage, {
10
+ if (params?.dump?.length) {
11
+ for (const dump of params.dump) {
12
+ const matchedFiles = await glob(dump, {
13
13
  nodir: true,
14
14
  dot: true,
15
15
  absolute: true,
16
16
  windowsPathsNoEscape: true,
17
17
  cwd: params.cwd,
18
18
  });
19
- stageDumpFiles.push(...matchedFiles);
19
+ dumpFiles.push(...matchedFiles);
20
20
  }
21
21
  }
22
- if (!!params?.resultsDir || stageDumpFiles.length === 0) {
22
+ if (!!params?.resultsDir || dumpFiles.length === 0) {
23
23
  const matchedDirs = (await glob(params.resultsDir, {
24
24
  mark: true,
25
25
  nodir: false,
@@ -30,14 +30,14 @@ export const generate = async (params) => {
30
30
  })).filter((p) => /(\/|\\)$/.test(p));
31
31
  resultsDirectories.push(...matchedDirs);
32
32
  }
33
- if (resultsDirectories.length === 0 && stageDumpFiles.length === 0) {
33
+ if (resultsDirectories.length === 0 && dumpFiles.length === 0) {
34
34
  console.error(red(`No test results directories found matching pattern: ${params.resultsDir}`));
35
35
  exit(1);
36
36
  return;
37
37
  }
38
38
  try {
39
39
  const allureReport = new AllureReport(params.config);
40
- await allureReport.restoreState(Array.from(stageDumpFiles));
40
+ await allureReport.restoreState(Array.from(dumpFiles));
41
41
  await allureReport.start();
42
42
  for (const dir of resultsDirectories) {
43
43
  await allureReport.readDirectory(dir);
@@ -7,7 +7,7 @@ export declare class GenerateCommand extends Command {
7
7
  output: string | undefined;
8
8
  cwd: string | undefined;
9
9
  reportName: string | undefined;
10
- stage: string[] | undefined;
10
+ dump: string[] | undefined;
11
11
  open: boolean | undefined;
12
12
  port: string | undefined;
13
13
  historyLimit: string | undefined;
@@ -22,8 +22,8 @@ export class GenerateCommand extends Command {
22
22
  this.reportName = Option.String("--report-name,--name", {
23
23
  description: "The report name (default: Allure Report)",
24
24
  });
25
- this.stage = Option.Array("--stage", {
26
- description: "Stages archives to restore state from (default: empty string)",
25
+ this.dump = Option.Array("--dump", {
26
+ description: "Dump archives to restore state from (default: empty string)",
27
27
  });
28
28
  this.open = Option.Boolean("--open", {
29
29
  description: "Open the report in the default browser after generation (default: false)",
@@ -45,7 +45,7 @@ export class GenerateCommand extends Command {
45
45
  historyLimit: this.historyLimit ? parseInt(this.historyLimit, 10) : undefined,
46
46
  });
47
47
  await generate({
48
- stage: this.stage,
48
+ dump: this.dump,
49
49
  resultsDir: this.resultsDir ?? "./**/allure-results",
50
50
  cwd,
51
51
  config,
@@ -70,12 +70,12 @@ GenerateCommand.usage = Command.Usage({
70
70
  "Generate a report from the ./allure-results directory to the custom-report directory",
71
71
  ],
72
72
  [
73
- "generate --stage=windows.zip --stage=macos.zip ./allure-results",
73
+ "generate --dump=windows.zip --dump=macos.zip ./allure-results",
74
74
  "Generate a report using data from windows.zip and macos.zip archives and using results from the ./allure-results directory",
75
75
  ],
76
76
  [
77
- "generate --stage=allure-*.zip",
78
- "Generate a report using data from any stage archive that matches the given pattern and results directory if it exists",
77
+ "generate --dump=allure-*.zip",
78
+ "Generate a report using data from any dump archive that matches the given pattern and results directory if it exists",
79
79
  ],
80
80
  ],
81
81
  });
@@ -18,7 +18,7 @@ export declare class RunCommand extends Command {
18
18
  rerun: string | undefined;
19
19
  silent: boolean | undefined;
20
20
  ignoreLogs: boolean | undefined;
21
- stage: string | undefined;
21
+ dump: string | undefined;
22
22
  environment: string | undefined;
23
23
  historyLimit: string | undefined;
24
24
  commandToRun: string[];
@@ -160,8 +160,8 @@ export class RunCommand extends Command {
160
160
  this.ignoreLogs = Option.Boolean("--ignore-logs", {
161
161
  description: "Prevent logs attaching to the report (default: false)",
162
162
  });
163
- this.stage = Option.String("--stage", {
164
- description: "Runs tests in stage mode to collect results to a stage archive with the provided name (default: empty string)",
163
+ this.dump = Option.String("--dump", {
164
+ description: "Runs tests in dump mode to collect results to a dump archive with the provided name (default: empty string)",
165
165
  });
166
166
  this.environment = Option.String("--environment,--env", {
167
167
  description: "Force specific environment to all tests in the run. Given environment has higher priority than the one defined in the config file (default: empty string)",
@@ -217,7 +217,7 @@ export class RunCommand extends Command {
217
217
  const allureReport = new AllureReport({
218
218
  ...config,
219
219
  environment: this.environment,
220
- stage: this.stage,
220
+ dump: this.dump,
221
221
  realTime: false,
222
222
  plugins: [
223
223
  ...(config.plugins?.length
@@ -362,8 +362,8 @@ RunCommand.usage = Command.Usage({
362
362
  ["run -- npm run test", "Run npm run test and collect Allure results"],
363
363
  ["run --rerun 3 -- npm run test", "Run npm run test and rerun failed tests up to 3 times"],
364
364
  [
365
- "run --stage=my-stage -- npm run test",
366
- "Run npm run test and pack inner report state into my-stage.zip archive to restore the state in the next run",
365
+ "run --dump=my-dump -- npm run test",
366
+ "Run npm run test and pack inner report state into my-dump.zip archive to restore the state in the next run",
367
367
  ],
368
368
  ],
369
369
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allure",
3
- "version": "3.2.0",
3
+ "version": "3.3.1",
4
4
  "description": "Allure Commandline Tool",
5
5
  "keywords": [
6
6
  "allure",
@@ -32,25 +32,25 @@
32
32
  "test": "vitest run"
33
33
  },
34
34
  "dependencies": {
35
- "@allurereport/charts-api": "3.2.0",
36
- "@allurereport/ci": "3.2.0",
37
- "@allurereport/core": "3.2.0",
38
- "@allurereport/core-api": "3.2.0",
39
- "@allurereport/directory-watcher": "3.2.0",
40
- "@allurereport/plugin-allure2": "3.2.0",
41
- "@allurereport/plugin-api": "3.2.0",
42
- "@allurereport/plugin-awesome": "3.2.0",
43
- "@allurereport/plugin-classic": "3.2.0",
44
- "@allurereport/plugin-csv": "3.2.0",
45
- "@allurereport/plugin-dashboard": "3.2.0",
46
- "@allurereport/plugin-jira": "3.2.0",
47
- "@allurereport/plugin-log": "3.2.0",
48
- "@allurereport/plugin-progress": "3.2.0",
49
- "@allurereport/plugin-server-reload": "3.2.0",
50
- "@allurereport/plugin-slack": "3.2.0",
51
- "@allurereport/reader-api": "3.2.0",
52
- "@allurereport/service": "3.2.0",
53
- "@allurereport/static-server": "3.2.0",
35
+ "@allurereport/charts-api": "3.3.1",
36
+ "@allurereport/ci": "3.3.1",
37
+ "@allurereport/core": "3.3.1",
38
+ "@allurereport/core-api": "3.3.1",
39
+ "@allurereport/directory-watcher": "3.3.1",
40
+ "@allurereport/plugin-allure2": "3.3.1",
41
+ "@allurereport/plugin-api": "3.3.1",
42
+ "@allurereport/plugin-awesome": "3.3.1",
43
+ "@allurereport/plugin-classic": "3.3.1",
44
+ "@allurereport/plugin-csv": "3.3.1",
45
+ "@allurereport/plugin-dashboard": "3.3.1",
46
+ "@allurereport/plugin-jira": "3.3.1",
47
+ "@allurereport/plugin-log": "3.3.1",
48
+ "@allurereport/plugin-progress": "3.3.1",
49
+ "@allurereport/plugin-server-reload": "3.3.1",
50
+ "@allurereport/plugin-slack": "3.3.1",
51
+ "@allurereport/reader-api": "3.3.1",
52
+ "@allurereport/service": "3.3.1",
53
+ "@allurereport/static-server": "3.3.1",
54
54
  "adm-zip": "^0.5.16",
55
55
  "clipanion": "^4.0.0-rc.4",
56
56
  "glob": "^11.1.0",