allure 3.0.0-beta.3 → 3.0.0-beta.4

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.
@@ -1,4 +1,5 @@
1
1
  import { AllureReport, resolveConfig } from "@allurereport/core";
2
+ import * as console from "node:console";
2
3
  import { createCommand } from "../utils/commands.js";
3
4
  export const AwesomeCommandAction = async (resultsDir, options) => {
4
5
  const before = new Date().getTime();
@@ -1,4 +1,5 @@
1
1
  import { AllureReport, resolveConfig } from "@allurereport/core";
2
+ import * as console from "node:console";
2
3
  import { createCommand } from "../utils/commands.js";
3
4
  export const ClassicCommandAction = async (resultsDir, options) => {
4
5
  const before = new Date().getTime();
@@ -1,4 +1,5 @@
1
1
  import { AllureReport, resolveConfig } from "@allurereport/core";
2
+ import * as console from "node:console";
2
3
  import { createCommand } from "../utils/commands.js";
3
4
  export const CsvCommandAction = async (resultsDir, options) => {
4
5
  const before = new Date().getTime();
@@ -1,5 +1,6 @@
1
1
  import { AllureReport, resolveConfig } from "@allurereport/core";
2
2
  import { createCommand } from "../utils/commands.js";
3
+ import * as console from "node:console";
3
4
  export const LogCommandAction = async (resultsDir, options) => {
4
5
  const before = new Date().getTime();
5
6
  const config = await resolveConfig({
@@ -28,7 +28,7 @@ export const QualityGateCommandAction = async (resultsDir, options) => {
28
28
  }
29
29
  console.error(red(`⨯ ${bold(`${result.rule}${scope}`)}: expected ${result.expected}, actual ${result.actual}`));
30
30
  }
31
- console.error(red(`\nThe process has been exited with code 1`));
31
+ console.error(red("\nThe process has been exited with code 1"));
32
32
  process.exit(allureReport.exitCode);
33
33
  };
34
34
  export const QualityGateCommand = createCommand({
@@ -1,4 +1,5 @@
1
1
  import { AllureReport, resolveConfig } from "@allurereport/core";
2
+ import * as console from "node:console";
2
3
  import { createCommand } from "../utils/commands.js";
3
4
  export const SlackCommandAction = async (resultsDir, options) => {
4
5
  const before = new Date().getTime();
@@ -1,4 +1,5 @@
1
1
  import { AllureReport, resolveConfig } from "@allurereport/core";
2
+ import * as console from "node:console";
2
3
  import { basename, dirname, resolve } from "node:path";
3
4
  import { createCommand } from "../utils/commands.js";
4
5
  export const TestPlanCommandAction = async (resultsDir, options) => {
@@ -28,7 +28,7 @@ export const WatchCommandAction = async (resultsDir, options) => {
28
28
  }
29
29
  const server = await serve({
30
30
  servePath: config.output,
31
- port: options.port ? parseInt(options.port) : undefined,
31
+ port: options.port ? parseInt(options.port, 10) : undefined,
32
32
  live: false,
33
33
  open: false,
34
34
  });
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import { cac } from "cac";
3
3
  import console from "node:console";
4
4
  import { readFileSync } from "node:fs";
5
5
  import { cwd } from "node:process";
6
- import { ClassicCommand, AwesomeCommand, CsvCommand, GenerateCommand, HistoryCommand, KnownIssueCommand, LogCommand, OpenCommand, QualityGateCommand, RunCommand, SlackCommand, TestPlanCommand, WatchCommand, } from "./commands/index.js";
6
+ import { AwesomeCommand, ClassicCommand, CsvCommand, GenerateCommand, HistoryCommand, KnownIssueCommand, LogCommand, OpenCommand, QualityGateCommand, RunCommand, SlackCommand, TestPlanCommand, WatchCommand, } from "./commands/index.js";
7
7
  const pkg = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"));
8
8
  const cli = cac(pkg.name).usage(pkg.description).help().version(pkg.version);
9
9
  const commands = [
@@ -1,4 +1,4 @@
1
- import { CAC } from "cac";
1
+ import type { CAC } from "cac";
2
2
  export type OptionDescription = [string] | [
3
3
  string,
4
4
  {
@@ -1,8 +1,10 @@
1
1
  export const createCommand = (payload) => {
2
- if (!payload.name)
2
+ if (!payload.name) {
3
3
  throw new Error("Command name is not provided!");
4
- if (!payload.action)
4
+ }
5
+ if (!payload.action) {
5
6
  throw new Error("Command action is not provided!");
7
+ }
6
8
  return (cli) => {
7
9
  const command = cli.command(payload.name, payload.description);
8
10
  payload?.options?.forEach(([name, parameters]) => {
@@ -1,3 +1,3 @@
1
- import { ChildProcess } from "node:child_process";
1
+ import type { ChildProcess } from "node:child_process";
2
2
  export declare const runProcess: (command: string, commandArgs: string[], cwd: string | undefined, environment: Record<string, string>, silent?: boolean) => ChildProcess;
3
3
  export declare const terminationOf: (testProcess: ChildProcess) => Promise<number | null>;
@@ -1,3 +1,3 @@
1
- import { TestResult, TestStatus } from "@allurereport/core-api";
1
+ import type { TestResult, TestStatus } from "@allurereport/core-api";
2
2
  export declare const status2color: (status: TestStatus) => import("yoctocolors").Format;
3
3
  export declare const logTests: (testResults: TestResult[]) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allure",
3
- "version": "3.0.0-beta.3",
3
+ "version": "3.0.0-beta.4",
4
4
  "description": "Allure Commandline Tool",
5
5
  "keywords": [
6
6
  "allure",
@@ -24,19 +24,21 @@
24
24
  "scripts": {
25
25
  "build": "run clean && tsc --project ./tsconfig.json",
26
26
  "clean": "rimraf ./dist",
27
+ "eslint": "eslint ./src/**/*.{js,jsx,ts,tsx}",
28
+ "eslint:format": "eslint --fix ./src/**/*.{js,jsx,ts,tsx}",
27
29
  "start": "node ./cli.js",
28
30
  "test": "vitest run"
29
31
  },
30
32
  "dependencies": {
31
- "@allurereport/core": "3.0.0-beta.3",
32
- "@allurereport/core-api": "3.0.0-beta.3",
33
- "@allurereport/directory-watcher": "3.0.0-beta.3",
34
- "@allurereport/plugin-awesome": "3.0.0-beta.3",
35
- "@allurereport/plugin-progress": "3.0.0-beta.3",
36
- "@allurereport/plugin-server-reload": "3.0.0-beta.3",
37
- "@allurereport/plugin-slack": "3.0.0-beta.3",
38
- "@allurereport/reader-api": "3.0.0-beta.3",
39
- "@allurereport/static-server": "3.0.0-beta.3",
33
+ "@allurereport/core": "3.0.0-beta.4",
34
+ "@allurereport/core-api": "3.0.0-beta.4",
35
+ "@allurereport/directory-watcher": "3.0.0-beta.4",
36
+ "@allurereport/plugin-awesome": "3.0.0-beta.4",
37
+ "@allurereport/plugin-progress": "3.0.0-beta.4",
38
+ "@allurereport/plugin-server-reload": "3.0.0-beta.4",
39
+ "@allurereport/plugin-slack": "3.0.0-beta.4",
40
+ "@allurereport/reader-api": "3.0.0-beta.4",
41
+ "@allurereport/static-server": "3.0.0-beta.4",
40
42
  "cac": "^6.7.14",
41
43
  "lodash.omit": "^4.5.0",
42
44
  "yoctocolors": "^2.1.1"