allure 3.6.1 → 3.7.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.
@@ -18,4 +18,3 @@ export * from "./generate.js";
18
18
  export * from "./dashboard.js";
19
19
  export * from "./results/index.js";
20
20
  export * from "./jira/index.js";
21
- export * from "./whoami.js";
@@ -18,4 +18,3 @@ export * from "./generate.js";
18
18
  export * from "./dashboard.js";
19
19
  export * from "./results/index.js";
20
20
  export * from "./jira/index.js";
21
- export * from "./whoami.js";
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { readFileSync } from "node:fs";
2
2
  import { argv } from "node:process";
3
3
  import { Builtins, Cli } from "clipanion";
4
- import { AgentCommand, AgentLatestCommand, AgentSelectCommand, AgentStateDirCommand, Allure2Command, AwesomeCommand, ClassicCommand, CsvCommand, DashboardCommand, GenerateCommand, HistoryCommand, JiraClearCommand, KnownIssueCommand, LogCommand, OpenCommand, QualityGateCommand, ResultsPackCommand, ResultsUnpackCommand, RunCommand, SlackCommand, TestPlanCommand, WatchCommand, WhoamiCommand, } from "./commands/index.js";
4
+ import { AgentCommand, AgentLatestCommand, AgentSelectCommand, AgentStateDirCommand, Allure2Command, AwesomeCommand, ClassicCommand, CsvCommand, DashboardCommand, GenerateCommand, HistoryCommand, JiraClearCommand, KnownIssueCommand, LogCommand, OpenCommand, QualityGateCommand, ResultsPackCommand, ResultsUnpackCommand, RunCommand, SlackCommand, TestPlanCommand, WatchCommand, } from "./commands/index.js";
5
5
  const [node, app, ...args] = argv;
6
6
  const pkg = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"));
7
7
  const cli = new Cli({
@@ -31,7 +31,6 @@ cli.register(TestPlanCommand);
31
31
  cli.register(WatchCommand);
32
32
  cli.register(ResultsPackCommand);
33
33
  cli.register(ResultsUnpackCommand);
34
- cli.register(WhoamiCommand);
35
34
  cli.register(Builtins.HelpCommand);
36
35
  cli.register(Builtins.VersionCommand);
37
36
  cli.runExit(args);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allure",
3
- "version": "3.6.1",
3
+ "version": "3.7.0",
4
4
  "description": "Allure Commandline Tool",
5
5
  "keywords": [
6
6
  "allure",
@@ -32,26 +32,26 @@
32
32
  "lint:fix": "oxlint --import-plugin --fix src test features stories"
33
33
  },
34
34
  "dependencies": {
35
- "@allurereport/charts-api": "3.6.1",
36
- "@allurereport/ci": "3.6.1",
37
- "@allurereport/core": "3.6.1",
38
- "@allurereport/core-api": "3.6.1",
39
- "@allurereport/directory-watcher": "3.6.1",
40
- "@allurereport/plugin-agent": "3.6.1",
41
- "@allurereport/plugin-allure2": "3.6.1",
42
- "@allurereport/plugin-api": "3.6.1",
43
- "@allurereport/plugin-awesome": "3.6.1",
44
- "@allurereport/plugin-classic": "3.6.1",
45
- "@allurereport/plugin-csv": "3.6.1",
46
- "@allurereport/plugin-dashboard": "3.6.1",
47
- "@allurereport/plugin-jira": "3.6.1",
48
- "@allurereport/plugin-log": "3.6.1",
49
- "@allurereport/plugin-progress": "3.6.1",
50
- "@allurereport/plugin-server-reload": "3.6.1",
51
- "@allurereport/plugin-slack": "3.6.1",
52
- "@allurereport/reader-api": "3.6.1",
53
- "@allurereport/service": "3.6.1",
54
- "@allurereport/static-server": "3.6.1",
35
+ "@allurereport/charts-api": "3.7.0",
36
+ "@allurereport/ci": "3.7.0",
37
+ "@allurereport/core": "3.7.0",
38
+ "@allurereport/core-api": "3.7.0",
39
+ "@allurereport/directory-watcher": "3.7.0",
40
+ "@allurereport/plugin-agent": "3.7.0",
41
+ "@allurereport/plugin-allure2": "3.7.0",
42
+ "@allurereport/plugin-api": "3.7.0",
43
+ "@allurereport/plugin-awesome": "3.7.0",
44
+ "@allurereport/plugin-classic": "3.7.0",
45
+ "@allurereport/plugin-csv": "3.7.0",
46
+ "@allurereport/plugin-dashboard": "3.7.0",
47
+ "@allurereport/plugin-jira": "3.7.0",
48
+ "@allurereport/plugin-log": "3.7.0",
49
+ "@allurereport/plugin-progress": "3.7.0",
50
+ "@allurereport/plugin-server-reload": "3.7.0",
51
+ "@allurereport/plugin-slack": "3.7.0",
52
+ "@allurereport/reader-api": "3.7.0",
53
+ "@allurereport/service": "3.7.0",
54
+ "@allurereport/static-server": "3.7.0",
55
55
  "adm-zip": "^0.5.16",
56
56
  "clipanion": "^4.0.0-rc.4",
57
57
  "glob": "^11.1.0",
@@ -1,8 +0,0 @@
1
- import { Command } from "clipanion";
2
- export declare class WhoamiCommand extends Command {
3
- static paths: string[][];
4
- static usage: import("clipanion").Usage;
5
- config: string | undefined;
6
- cwd: string | undefined;
7
- execute(): Promise<void>;
8
- }
@@ -1,50 +0,0 @@
1
- import * as console from "node:console";
2
- import { exit } from "node:process";
3
- import { readConfig } from "@allurereport/core";
4
- import { AllureServiceClient, KnownError } from "@allurereport/service";
5
- import { Command, Option } from "clipanion";
6
- import { green, red } from "yoctocolors";
7
- import { logError } from "../utils/logs.js";
8
- export class WhoamiCommand extends Command {
9
- constructor() {
10
- super(...arguments);
11
- this.config = Option.String("--config,-c", {
12
- description: "The path Allure config file",
13
- });
14
- this.cwd = Option.String("--cwd", {
15
- description: "The working directory for the command to run (default: current working directory)",
16
- });
17
- }
18
- async execute() {
19
- const config = await readConfig(this.cwd, this.config);
20
- if (!config?.allureService?.accessToken) {
21
- console.error(red("No Allure Service access token is provided. Please provide it in the `allureService.accessToken` field in the `allure.config.js` file"));
22
- exit(1);
23
- return;
24
- }
25
- const serviceClient = new AllureServiceClient(config.allureService);
26
- const outputLines = [];
27
- try {
28
- const { user, project } = await serviceClient.profile();
29
- outputLines.push(`You are logged in as "${user.email}"`);
30
- outputLines.push(`Current project is "${project.name}"`);
31
- }
32
- catch (error) {
33
- if (error instanceof KnownError) {
34
- console.error(red(error.message));
35
- exit(1);
36
- return;
37
- }
38
- await logError("Failed to get profile due to unexpected error", error);
39
- exit(1);
40
- }
41
- console.info(green(outputLines.join("\n")));
42
- }
43
- }
44
- WhoamiCommand.paths = [["whoami"]];
45
- WhoamiCommand.usage = Command.Usage({
46
- category: "Allure Service",
47
- description: "Prints information about current project",
48
- details: "This command prints information about the current project based on the Allure Service provided access token.",
49
- examples: [["whoami", "Print information about the current project using the default configuration"]],
50
- });