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 2.0.0-beta.25 to 2.0.0-beta.26

dist/src/AllureCommandStep.d.ts

5

dist/index.d.ts

@@ -10,3 +10,4 @@ export { AllureRuntime } from "./src/AllureRuntime";

export { Allure, StepInterface } from "./src/Allure";
export { AttachmentOptions, AttachmentMetadata, Attachment, Category, ExecutableItem, StepResult, Parameter, StatusDetails, Link, Label, ExecutorInfo, TestResultContainer, FixtureResult, TestResult, ContentType, LabelName, Severity, Stage, Status, LinkType, ParameterOptions } from "./src/model";
export { md5 } from "./src/utils";
export { StepBodyFunction, AllureCommandStep, AllureCommandStepExecutable } from "./src/AllureCommandStep";
export { AttachmentOptions, MetadataMessage, Attachment, Category, ExecutableItem, StepResult, Parameter, StatusDetails, Link, Label, ExecutorInfo, TestResultContainer, FixtureResult, TestResult, ContentType, LabelName, Severity, Stage, Status, LinkType, ParameterOptions, StepMetadata, AttachmentMetadata } from "./src/model";
export { md5, isAnyStepFailed } from "./src/utils";
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.md5 = exports.LinkType = exports.Status = exports.Stage = exports.Severity = exports.LabelName = exports.ContentType = exports.Allure = exports.isPromise = exports.AllureStep = exports.AllureTest = exports.ExecutableItemWrapper = exports.AllureGroup = exports.FileSystemAllureWriter = exports.InMemoryAllureWriter = exports.AllureRuntime = void 0;
exports.isAnyStepFailed = exports.md5 = exports.LinkType = exports.Status = exports.Stage = exports.Severity = exports.LabelName = exports.ContentType = exports.AllureCommandStepExecutable = exports.Allure = exports.isPromise = exports.AllureStep = exports.AllureTest = exports.ExecutableItemWrapper = exports.AllureGroup = exports.FileSystemAllureWriter = exports.InMemoryAllureWriter = exports.AllureRuntime = void 0;
var AllureRuntime_1 = require("./src/AllureRuntime");

@@ -21,2 +21,4 @@ Object.defineProperty(exports, "AllureRuntime", { enumerable: true, get: function () { return AllureRuntime_1.AllureRuntime; } });

Object.defineProperty(exports, "Allure", { enumerable: true, get: function () { return Allure_1.Allure; } });
var AllureCommandStep_1 = require("./src/AllureCommandStep");
Object.defineProperty(exports, "AllureCommandStepExecutable", { enumerable: true, get: function () { return AllureCommandStep_1.AllureCommandStepExecutable; } });
var model_1 = require("./src/model");

@@ -31,2 +33,3 @@ Object.defineProperty(exports, "ContentType", { enumerable: true, get: function () { return model_1.ContentType; } });

Object.defineProperty(exports, "md5", { enumerable: true, get: function () { return utils_1.md5; } });
Object.defineProperty(exports, "isAnyStepFailed", { enumerable: true, get: function () { return utils_1.isAnyStepFailed; } });
//# sourceMappingURL=index.js.map

4

dist/src/Allure.d.ts

@@ -27,2 +27,4 @@ /// <reference types="node" />

severity(severity: string): void;
layer(layer: string): void;
id(allureId: string): void;
tag(tag: string): void;

@@ -34,4 +36,2 @@ writeEnvironmentInfo(info: Record<string, string>): void;

abstract step<T>(name: string, body: (step: StepInterface) => T): T;
createStep(name: string, stepFunction: Function): (...args: any[]) => any;
createAttachment(name: string, content: Buffer | string | Function, type: ContentType): ((...args: any[]) => void) | undefined;
}

@@ -38,0 +38,0 @@ export interface StepInterface {

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

}
layer(layer) {
this.label(model_2.LabelName.LAYER, layer);
}
id(allureId) {
this.label(model_2.LabelName.AS_ID, allureId);
}
tag(tag) {

@@ -65,17 +71,4 @@ this.label(model_2.LabelName.TAG, tag);

}
createStep(name, stepFunction) {
return (...args) => this.step(name, () => stepFunction.apply(this, args));
}
createAttachment(name, content, type) {
if (typeof content === "function") {
return (...args) => {
this.attachment(name, content.apply(this, args), type);
};
}
else {
this.attachment(name, content, type);
}
}
}
exports.Allure = Allure;
//# sourceMappingURL=Allure.js.map

@@ -15,2 +15,3 @@ import { AttachmentOptions, ContentType, ExecutableItem, FixtureResult, ParameterOptions, Stage, Status, StatusDetails, StepResult, TestResult } from "./model";

set stage(stage: Stage);
get isAnyStepFailed(): boolean;
addParameter(name: string, value: string, options?: ParameterOptions): void;

@@ -17,0 +18,0 @@ addAttachment(name: string, options: ContentType | string | AttachmentOptions, fileName: string): void;

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

const model_1 = require("./model");
const utils_1 = require("./utils");
class ExecutableItemWrapper {

@@ -42,2 +43,5 @@ constructor(info) {

}
get isAnyStepFailed() {
return (0, utils_1.isAnyStepFailed)(this.info);
}
addParameter(name, value, options) {

@@ -44,0 +48,0 @@ this.info.parameters.push(Object.assign({ name, value }, options));

@@ -0,13 +1,27 @@

/// <reference types="node" />
export declare const ALLURE_METADATA_CONTENT_TYPE = "application/vnd.allure.metadata+json";
export interface Attachment {
export interface AttachmentMetadata {
name: string;
type: string;
source: string;
content: string;
encoding: BufferEncoding;
}
export interface AttachmentMetadata {
export interface StepMetadata extends Omit<ExecutableItem, "attachments" | "steps"> {
steps: StepMetadata[];
attachments: AttachmentMetadata[];
}
export interface MetadataMessage {
attachments?: AttachmentMetadata[];
labels?: Label[];
links?: Link[];
parameter?: Parameter[];
description?: string;
parameter?: Parameter[];
descriptionHtml?: string;
steps?: StepMetadata[];
}
export interface Attachment {
name: string;
type: string;
source: string;
}
export interface AttachmentOptions {

@@ -14,0 +28,0 @@ contentType: ContentType | string;

@@ -1,3 +0,4 @@

import { Label } from "./model";
import { ExecutableItem, Label } from "./model";
export declare const md5: (data: string) => string;
export declare const getLabelsFromEnv: () => Label[];
export declare const isAnyStepFailed: (item: ExecutableItem) => boolean;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getLabelsFromEnv = exports.md5 = void 0;
exports.isAnyStepFailed = exports.getLabelsFromEnv = exports.md5 = void 0;
const crypto_1 = require("crypto");
const process_1 = require("process");
const model_1 = require("./model");
const md5 = (data) => (0, crypto_1.createHash)("md5").update(data).digest("hex");

@@ -26,2 +27,10 @@ exports.md5 = md5;

exports.getLabelsFromEnv = getLabelsFromEnv;
const isAnyStepFailed = (item) => {
const isFailed = item.status === model_1.Status.FAILED;
if (isFailed || item.steps.length === 0) {
return isFailed;
}
return !!item.steps.find((step) => (0, exports.isAnyStepFailed)(step));
};
exports.isAnyStepFailed = isAnyStepFailed;
//# sourceMappingURL=utils.js.map
{
"name": "allure-js-commons",
"version": "2.0.0-beta.25",
"version": "2.0.0-beta.26",
"description": "Allure JS Commons",

@@ -39,3 +39,3 @@ "license": "Apache-2.0",

"@types/uuid": "^8.3.0",
"allure-mocha": "2.0.0-beta.25",
"allure-mocha": "2.0.0-beta.26",
"chai": "^4.3.4",

@@ -42,0 +42,0 @@ "glob": "^8.0.0",

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