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

@stoplight/prism-core

Package Overview
Dependencies
Maintainers
26
Versions
195
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stoplight/prism-core - npm Package Compare versions

Comparing version 3.2.6 to 3.2.7

1

dist/index.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("./types"), exports);
tslib_1.__exportStar(require("./factory"), exports);
tslib_1.__exportStar(require("./logger"), exports);

@@ -56,19 +56,1 @@ import { IDiagnostic } from '@stoplight/types';

}
export declare type ProblemJson = {
type: string;
title: string;
status: number;
detail: string;
};
export declare class ProblemJsonError extends Error {
readonly name: string;
readonly message: string;
readonly status: number;
readonly detail: string;
static fromTemplate(template: Omit<ProblemJson, 'detail'>, detail?: string): ProblemJsonError;
static fromPlainError(error: Error & {
detail?: string;
status?: number;
}): ProblemJson;
constructor(name: string, message: string, status: number, detail: string);
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
class ProblemJsonError extends Error {
constructor(name, message, status, detail) {
super(message);
this.name = name;
this.message = message;
this.status = status;
this.detail = detail;
}
static fromTemplate(template, detail) {
const error = new ProblemJsonError(`https://stoplight.io/prism/errors#${template.type}`, template.title, template.status, detail || '');
return error;
}
static fromPlainError(error) {
return {
type: error.name && error.name !== 'Error' ? error.name : 'https://stoplight.io/prism/errors#UNKNOWN',
title: error.message,
status: error.status || 500,
detail: error.detail || '',
};
}
}
exports.ProblemJsonError = ProblemJsonError;

4

package.json
{
"name": "@stoplight/prism-core",
"version": "3.2.6",
"version": "3.2.7",
"main": "dist/index.js",

@@ -26,3 +26,3 @@ "types": "dist/index.d.ts",

},
"gitHead": "0d6b0b31aca7a77cfa584c8e2cc9f313a079666a"
"gitHead": "cc77775c9c684ab02d0d5d1036c92aacd77e24c8"
}
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