@kamalyb/errors
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -0,1 +1,2 @@ | ||
import ExtendableError from 'extendable-error'; | ||
import { ValidationErrorItem } from 'joi'; | ||
@@ -20,3 +21,3 @@ | ||
declare abstract class CustomError extends Error { | ||
declare abstract class CustomError extends ExtendableError { | ||
abstract status: number; | ||
@@ -23,0 +24,0 @@ protected constructor(message: string); |
@@ -0,4 +1,6 @@ | ||
var __create = Object.create; | ||
var __defProp = Object.defineProperty; | ||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | ||
var __getOwnPropNames = Object.getOwnPropertyNames; | ||
var __getProtoOf = Object.getPrototypeOf; | ||
var __hasOwnProp = Object.prototype.hasOwnProperty; | ||
@@ -17,2 +19,3 @@ var __export = (target, all) => { | ||
}; | ||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod)); | ||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | ||
@@ -56,6 +59,6 @@ | ||
// src/errors/Custom.ts | ||
var CustomError = class extends Error { | ||
var import_extendable_error = __toESM(require("extendable-error")); | ||
var CustomError = class extends import_extendable_error.default { | ||
constructor(message) { | ||
super(message); | ||
Object.setPrototypeOf(this, CustomError.prototype); | ||
} | ||
@@ -62,0 +65,0 @@ parse(param, location) { |
{ | ||
"name": "@kamalyb/errors", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "errors", | ||
@@ -34,18 +34,19 @@ "publishConfig": { | ||
"devDependencies": { | ||
"@typescript-eslint/eslint-plugin": "^5.17.0", | ||
"@typescript-eslint/parser": "^5.17.0", | ||
"eslint": "^8.12.0", | ||
"@typescript-eslint/eslint-plugin": "^5.30.6", | ||
"@typescript-eslint/parser": "^5.30.6", | ||
"eslint": "^8.19.0", | ||
"eslint-config-airbnb-base": "^15.0.0", | ||
"eslint-config-airbnb-typescript": "^16.2.0", | ||
"eslint-config-airbnb-typescript": "^17.0.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-plugin-import": "^2.25.4", | ||
"eslint-plugin-prettier": "^4.0.0", | ||
"prettier": "2.6.1", | ||
"tsup": "5.12.2", | ||
"typescript": "4.6.3", | ||
"vitest": "0.8.1" | ||
"eslint-plugin-prettier": "^4.2.1", | ||
"prettier": "2.7.1", | ||
"tsup": "6.1.3", | ||
"typescript": "4.7.4", | ||
"vitest": "0.18.0" | ||
}, | ||
"dependencies": { | ||
"extendable-error": "^0.1.7", | ||
"joi": "^17.6.0" | ||
} | ||
} |
@@ -0,0 +0,0 @@ import { CustomErrorParam, Location, ErrorProps } from "../types"; |
@@ -0,4 +1,5 @@ | ||
import ExtendableError from "extendable-error"; | ||
import { CustomErrorParam, ErrorProps, Location } from "../types"; | ||
export abstract class CustomError extends Error { | ||
export abstract class CustomError extends ExtendableError { | ||
abstract status: number; | ||
@@ -8,4 +9,2 @@ | ||
super(message); | ||
Object.setPrototypeOf(this, CustomError.prototype); | ||
} | ||
@@ -12,0 +11,0 @@ |
@@ -0,0 +0,0 @@ import { msgs } from "../utils"; |
@@ -0,0 +0,0 @@ export * from "./BadRequest"; |
@@ -0,0 +0,0 @@ import { msgs } from "../utils"; |
@@ -0,0 +0,0 @@ import { ValidationErrorItem } from "joi"; |
@@ -0,0 +0,0 @@ import { CustomErrorParam, ErrorProps } from "../types"; |
@@ -0,0 +0,0 @@ import { CustomError } from "./Custom"; |
@@ -0,0 +0,0 @@ import { msgs } from "../utils"; |
@@ -0,0 +0,0 @@ import { CustomError } from "./Custom"; |
export { setGlobalMessage } from "./utils"; | ||
export * from "./errors"; |
@@ -0,0 +0,0 @@ export interface ErrorProps { |
@@ -0,0 +0,0 @@ import { ValidationErrorItem } from "joi"; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20209
647
2
+ Addedextendable-error@^0.1.7
+ Addedextendable-error@0.1.7(transitive)