Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

allure-js-commons

Package Overview
Dependencies
Maintainers
4
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

allure-js-commons - npm Package Compare versions

Comparing version 3.0.0-beta.9 to 3.0.0-beta.10

6

dist/cjs/sdk/index.js

@@ -54,2 +54,8 @@ "use strict";

});
Object.defineProperty(exports, "isMetadataTag", {
enumerable: true,
get: function get() {
return _utils.isMetadataTag;
}
});
Object.defineProperty(exports, "isPromise", {

@@ -56,0 +62,0 @@ enumerable: true,

10

dist/cjs/sdk/reporter/utils.js

@@ -6,3 +6,3 @@ "use strict";

});
exports.stringifyProperties = exports.serialize = exports.readImageAsBase64 = exports.randomUuid = exports.parseProperties = exports.md5 = exports.getWorstStepResultStatusPriority = exports.getWorstStepResultStatus = exports.getTestResultTestCaseId = exports.getTestResultHistoryId = exports.getSuiteLabels = exports.getRelativePath = exports.getPackageLabelFromPath = exports.formatLinks = exports.formatLink = exports.escapeRegExp = exports.ensureSuiteLabels = exports.deepClone = exports.applyLinkTemplate = void 0;
exports.stringifyProperties = exports.serialize = exports.readImageAsBase64 = exports.randomUuid = exports.parseProperties = exports.md5 = exports.getWorstStepResultStatusPriority = exports.getWorstStepResultStatus = exports.getTestResultTestCaseId = exports.getTestResultHistoryId = exports.getSuiteLabels = exports.getRelativePath = exports.getPackageLabelFromPath = exports.formatLinks = exports.formatLink = exports.escapeRegExp = exports.ensureSuiteLabels = exports.deepClone = exports.createDefaultWriter = exports.applyLinkTemplate = void 0;
var _promises = require("fs/promises");

@@ -15,2 +15,4 @@ var _nodeCrypto = require("node:crypto");

var _model = require("../../model.js");
var _FileSystemWriter = require("./writer/FileSystemWriter.js");
var _MessageWriter = require("./writer/MessageWriter.js");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }

@@ -249,2 +251,8 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }

exports.formatLinks = formatLinks;
var createDefaultWriter = config => {
return _nodeProcess.default.env.ALLURE_TEST_MODE ? new _MessageWriter.MessageWriter(config.emitter) : new _FileSystemWriter.FileSystemWriter({
resultsDir: config.resultsDir || "./allure-results"
});
};
exports.createDefaultWriter = createDefaultWriter;
//# sourceMappingURL=utils.js.map

5

dist/cjs/sdk/reporter/utils/labels.js

@@ -9,2 +9,3 @@ "use strict";

var _nodeProcess = require("node:process");
var _nodeWorker_threads = require("node:worker_threads");
var _model = require("../../../model.js");

@@ -40,7 +41,7 @@ var ENV_LABEL_PREFIX = "ALLURE_LABEL_";

exports.getHostLabel = getHostLabel;
var getThreadLabel = threadId => {
var getThreadLabel = userProvidedThreadId => {
var _ref, _env$ALLURE_THREAD_NA;
return {
name: _model.LabelName.THREAD,
value: (_ref = (_env$ALLURE_THREAD_NA = _nodeProcess.env.ALLURE_THREAD_NAME) !== null && _env$ALLURE_THREAD_NA !== void 0 ? _env$ALLURE_THREAD_NA : threadId) !== null && _ref !== void 0 ? _ref : _nodeProcess.pid.toString()
value: (_ref = (_env$ALLURE_THREAD_NA = _nodeProcess.env.ALLURE_THREAD_NAME) !== null && _env$ALLURE_THREAD_NA !== void 0 ? _env$ALLURE_THREAD_NA : userProvidedThreadId) !== null && _ref !== void 0 ? _ref : "pid-".concat(_nodeProcess.pid.toString(), "-worker-").concat(_nodeWorker_threads.isMainThread ? "main" : _nodeWorker_threads.threadId)
};

@@ -47,0 +48,0 @@ };

@@ -54,5 +54,8 @@ "use strict";

default:
this.handleCustomMessage(type, data, path);
return;
}
});
// eslint-disable-next-line @typescript-eslint/no-unused-vars
_defineProperty(this, "handleCustomMessage", (type, data, path) => {});
_defineProperty(this, "attachResults", /*#__PURE__*/_asyncToGenerator(function* () {

@@ -59,0 +62,0 @@ yield (0, _facade.step)("allure-results", /*#__PURE__*/_asyncToGenerator(function* () {

@@ -6,3 +6,3 @@ "use strict";

});
exports.stripAnsi = exports.isPromise = exports.isAnyStepFailed = exports.isAllStepsEnded = exports.hasStepMessage = exports.hasLabel = exports.getUnfinishedStepsMessages = exports.getStepsMessagesPair = exports.getStatusFromError = exports.getMessageAndTraceFromError = exports.extractMetadataFromString = exports.allureLabelRegexpGlobal = exports.allureLabelRegexp = exports.allureIdRegexpGlobal = exports.allureIdRegexp = void 0;
exports.stripAnsi = exports.isPromise = exports.isMetadataTag = exports.isAnyStepFailed = exports.isAllStepsEnded = exports.hasStepMessage = exports.hasLabel = exports.getUnfinishedStepsMessages = exports.getStepsMessagesPair = exports.getStatusFromError = exports.getMessageAndTraceFromError = exports.extractMetadataFromString = exports.allureLabelRegexpGlobal = exports.allureLabelRegexp = exports.allureIdRegexpGlobal = exports.allureIdRegexp = void 0;
var _model = require("../model.js");

@@ -69,2 +69,6 @@ function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(e, r) { return new BabelRegExp(e, void 0, r); }; var e = RegExp.prototype, r = new WeakMap(); function BabelRegExp(e, t, p) { var o = RegExp(e, t); return r.set(o, p || r.get(e)), _setPrototypeOf(o, BabelRegExp.prototype); } function buildGroups(e, t) { var p = r.get(t); return Object.keys(p).reduce(function (r, t) { var o = p[t]; if ("number" == typeof o) r[t] = e[o];else { for (var i = 0; void 0 === e[o[i]] && i + 1 < o.length;) i++; r[t] = e[o[i]]; } return r; }, Object.create(null)); } return _inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (r) { var t = e.exec.call(this, r); if (t) { t.groups = buildGroups(t, this); var p = t.indices; p && (p.groups = buildGroups(p, this)); } return t; }, BabelRegExp.prototype[Symbol.replace] = function (t, p) { if ("string" == typeof p) { var o = r.get(this); return e[Symbol.replace].call(this, t, p.replace(/\$<([^>]+)>/g, function (e, r) { var t = o[r]; return "$" + (Array.isArray(t) ? t.join("$") : t); })); } if ("function" == typeof p) { var i = this; return e[Symbol.replace].call(this, t, function () { var e = arguments; return "object" != typeof e[e.length - 1] && (e = [].slice.call(e)).push(buildGroups(e, i)), p.apply(this, e); }); } return e[Symbol.replace].call(this, t, p); }, _wrapRegExp.apply(this, arguments); }

var allureLabelRegexpGlobal = exports.allureLabelRegexpGlobal = new RegExp(allureLabelRegexp, "g");
var isMetadataTag = tag => {
return allureIdRegexp.test(tag) || allureLabelRegexp.test(tag);
};
exports.isMetadataTag = isMetadataTag;
var extractMetadataFromString = title => {

@@ -71,0 +75,0 @@ var labels = [];

@@ -1,2 +0,2 @@

export { getStatusFromError, getMessageAndTraceFromError, extractMetadataFromString, isAllStepsEnded, isAnyStepFailed, getUnfinishedStepsMessages, hasStepMessage, isPromise, hasLabel, stripAnsi } from "./utils.js";
export { getStatusFromError, getMessageAndTraceFromError, isMetadataTag, extractMetadataFromString, isAllStepsEnded, isAnyStepFailed, getUnfinishedStepsMessages, hasStepMessage, isPromise, hasLabel, stripAnsi } from "./utils.js";
//# sourceMappingURL=index.js.map

@@ -15,2 +15,4 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }

import { LabelName, LinkType, StatusByPriority } from "../../model.js";
import { FileSystemWriter } from "./writer/FileSystemWriter.js";
import { MessageWriter } from "./writer/MessageWriter.js";
export var randomUuid = () => {

@@ -224,2 +226,7 @@ return randomUUID();

export var formatLinks = (templates, links) => links.map(link => formatLink(templates, link));
export var createDefaultWriter = config => {
return process.env.ALLURE_TEST_MODE ? new MessageWriter(config.emitter) : new FileSystemWriter({
resultsDir: config.resultsDir || "./allure-results"
});
};
//# sourceMappingURL=utils.js.map
import { hostname } from "node:os";
import { env, pid } from "node:process";
import { isMainThread, threadId } from "node:worker_threads";
import { LabelName } from "../../../model.js";

@@ -31,9 +32,9 @@ var ENV_LABEL_PREFIX = "ALLURE_LABEL_";

};
export var getThreadLabel = threadId => {
export var getThreadLabel = userProvidedThreadId => {
var _ref, _env$ALLURE_THREAD_NA;
return {
name: LabelName.THREAD,
value: (_ref = (_env$ALLURE_THREAD_NA = env.ALLURE_THREAD_NAME) !== null && _env$ALLURE_THREAD_NA !== void 0 ? _env$ALLURE_THREAD_NA : threadId) !== null && _ref !== void 0 ? _ref : pid.toString()
value: (_ref = (_env$ALLURE_THREAD_NA = env.ALLURE_THREAD_NAME) !== null && _env$ALLURE_THREAD_NA !== void 0 ? _env$ALLURE_THREAD_NA : userProvidedThreadId) !== null && _ref !== void 0 ? _ref : "pid-".concat(pid.toString(), "-worker-").concat(isMainThread ? "main" : threadId)
};
};
//# sourceMappingURL=labels.js.map

@@ -48,5 +48,8 @@ function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }

default:
this.handleCustomMessage(type, data, path);
return;
}
});
// eslint-disable-next-line @typescript-eslint/no-unused-vars
_defineProperty(this, "handleCustomMessage", (type, data, path) => {});
_defineProperty(this, "attachResults", /*#__PURE__*/_asyncToGenerator(function* () {

@@ -53,0 +56,0 @@ yield step("allure-results", /*#__PURE__*/_asyncToGenerator(function* () {

@@ -59,2 +59,5 @@ function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(e, r) { return new BabelRegExp(e, void 0, r); }; var e = RegExp.prototype, r = new WeakMap(); function BabelRegExp(e, t, p) { var o = RegExp(e, t); return r.set(o, p || r.get(e)), _setPrototypeOf(o, BabelRegExp.prototype); } function buildGroups(e, t) { var p = r.get(t); return Object.keys(p).reduce(function (r, t) { var o = p[t]; if ("number" == typeof o) r[t] = e[o];else { for (var i = 0; void 0 === e[o[i]] && i + 1 < o.length;) i++; r[t] = e[o[i]]; } return r; }, Object.create(null)); } return _inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (r) { var t = e.exec.call(this, r); if (t) { t.groups = buildGroups(t, this); var p = t.indices; p && (p.groups = buildGroups(p, this)); } return t; }, BabelRegExp.prototype[Symbol.replace] = function (t, p) { if ("string" == typeof p) { var o = r.get(this); return e[Symbol.replace].call(this, t, p.replace(/\$<([^>]+)>/g, function (e, r) { var t = o[r]; return "$" + (Array.isArray(t) ? t.join("$") : t); })); } if ("function" == typeof p) { var i = this; return e[Symbol.replace].call(this, t, function () { var e = arguments; return "object" != typeof e[e.length - 1] && (e = [].slice.call(e)).push(buildGroups(e, i)), p.apply(this, e); }); } return e[Symbol.replace].call(this, t, p); }, _wrapRegExp.apply(this, arguments); }

export var allureLabelRegexpGlobal = new RegExp(allureLabelRegexp, "g");
export var isMetadataTag = tag => {
return allureIdRegexp.test(tag) || allureLabelRegexp.test(tag);
};
export var extractMetadataFromString = title => {

@@ -61,0 +64,0 @@ var labels = [];

export type { AllureResults, Category, EnvironmentInfo, ExecutorInfo, RuntimeMessage, RuntimeMetadataMessage, RuntimeAttachmentContentMessage, RuntimeAttachmentPathMessage, RuntimeStartStepMessage, RuntimeStepMetadataMessage, RuntimeStopStepMessage, TestPlanV1Test, TestPlanV1, } from "./types.js";
export { getStatusFromError, getMessageAndTraceFromError, extractMetadataFromString, isAllStepsEnded, isAnyStepFailed, getUnfinishedStepsMessages, hasStepMessage, isPromise, hasLabel, stripAnsi, } from "./utils.js";
export { getStatusFromError, getMessageAndTraceFromError, isMetadataTag, extractMetadataFromString, isAllStepsEnded, isAnyStepFailed, getUnfinishedStepsMessages, hasStepMessage, isPromise, hasLabel, stripAnsi, } from "./utils.js";
/// <reference path="../../../../src/types/properties.d.ts" />
/// <reference types="node" />
import type { EventEmitter } from "node:events";
import properties from "properties";
import type { Label, Link, Status, StepResult, TestResult } from "../../model.js";
import type { LinkConfig, LinkTemplate } from "./types.js";
import { FileSystemWriter } from "./writer/FileSystemWriter.js";
import { MessageWriter } from "./writer/MessageWriter.js";
export declare const randomUuid: () => `${string}-${string}-${string}-${string}-${string}`;

@@ -24,1 +28,5 @@ export declare const md5: (str: string) => string;

export declare const formatLinks: (templates: LinkConfig, links: readonly Link[]) => Link[];
export declare const createDefaultWriter: (config: {
resultsDir?: string;
emitter?: EventEmitter;
}) => FileSystemWriter | MessageWriter;
import type { Label } from "../../../model.js";
export declare const getEnvironmentLabels: () => Label[];
export declare const getHostLabel: () => Label;
export declare const getThreadLabel: (threadId?: string) => Label;
export declare const getThreadLabel: (userProvidedThreadId?: string) => Label;

@@ -5,3 +5,4 @@ import type { AllureResults } from "../../types.js";

handleMessage: (jsonMessage: string) => void;
handleCustomMessage: (type: string, data: any, path: string) => void;
attachResults: () => Promise<void>;
}

@@ -17,2 +17,3 @@ import type { FixtureResult, Label, StatusDetails, StepResult, TestResult } from "../model.js";

export declare const allureLabelRegexpGlobal: RegExp;
export declare const isMetadataTag: (tag: string) => boolean;
export declare const extractMetadataFromString: (title: string) => {

@@ -19,0 +20,0 @@ labels: Label[];

{
"name": "allure-js-commons",
"version": "3.0.0-beta.9",
"version": "3.0.0-beta.10",
"description": "Allure JS Commons",

@@ -81,3 +81,3 @@ "homepage": "https://allurereport.org/",

"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsdoc": "^49.0.0",
"eslint-plugin-jsdoc": "^50.0.0",
"eslint-plugin-n": "^17.10.1",

@@ -92,3 +92,3 @@ "eslint-plugin-no-null": "^1.0.2",

"peerDependencies": {
"allure-playwright": "3.0.0-beta.9"
"allure-playwright": "3.0.0-beta.10"
},

@@ -95,0 +95,0 @@ "peerDependenciesMeta": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc