Comparing version 2.0.64 to 2.0.65
@@ -7,5 +7,2 @@ interface Error { | ||
export declare const isBridgeError: (object: any) => object is Error; | ||
export declare const isError: (object: any) => object is { | ||
error: Error; | ||
}; | ||
export declare const httpError: <Status extends 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 422 | 423 | 424 | 425 | 426 | 428 | 431 | 451 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511, Name extends string, Data>(status: Status, name: Name, data?: Data | undefined) => { | ||
@@ -12,0 +9,0 @@ error: { |
@@ -17,3 +17,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.httpError = exports.isError = exports.isBridgeError = void 0; | ||
exports.httpError = exports.isBridgeError = void 0; | ||
const isBridgeError = (object) => typeof object === 'object' && | ||
@@ -24,4 +24,2 @@ typeof object.error === 'object' && | ||
exports.isBridgeError = isBridgeError; | ||
const isError = (object) => typeof object === 'object' && (0, exports.isBridgeError)(object.error); | ||
exports.isError = isError; | ||
const httpError = (status, name, data) => { | ||
@@ -28,0 +26,0 @@ return { error: { status, name, data } }; |
export { handler } from './core'; | ||
export { httpError, onError, StatusCode, isError } from './error'; | ||
export { httpError, onError, StatusCode, isBridgeError as isError } from './error'; | ||
export { apply } from './utilities'; | ||
@@ -4,0 +4,0 @@ export { initBridge } from './bridge'; |
@@ -10,3 +10,3 @@ "use strict"; | ||
Object.defineProperty(exports, "StatusCode", { enumerable: true, get: function () { return error_1.StatusCode; } }); | ||
Object.defineProperty(exports, "isError", { enumerable: true, get: function () { return error_1.isError; } }); | ||
Object.defineProperty(exports, "isError", { enumerable: true, get: function () { return error_1.isBridgeError; } }); | ||
var utilities_1 = require("./utilities"); | ||
@@ -13,0 +13,0 @@ Object.defineProperty(exports, "apply", { enumerable: true, get: function () { return utilities_1.apply; } }); |
{ | ||
"name": "bridge", | ||
"version": "2.0.64", | ||
"version": "2.0.65", | ||
"description": "Bridge is a Typescript Node.js framework that provides an easy and scalable way to create REST APIs while generating the client code.", | ||
@@ -5,0 +5,0 @@ "author": "Bridge Team <support@bridge.codes>", |
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
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
115694
1311