Comparing version 2.0.46 to 2.0.47
@@ -14,2 +14,3 @@ /// <reference types="node" /> | ||
formidable?: any; | ||
logs?: boolean; | ||
}); | ||
@@ -19,8 +20,9 @@ expressMiddleware: () => express.Handler; | ||
} | ||
export declare const initBridge: <Routes extends BridgeRoutes<{}>>({ routes, errorHandler, formidable, }: { | ||
export declare const initBridge: <Routes extends BridgeRoutes<{}>>({ routes, errorHandler, formidable, logs, }: { | ||
routes: Routes; | ||
formidable?: any; | ||
errorHandler?: ErrorHandler | undefined; | ||
logs?: boolean | undefined; | ||
}) => Bridge<Routes>; | ||
export {}; | ||
//# sourceMappingURL=bridge.d.ts.map |
@@ -20,4 +20,4 @@ "use strict"; | ||
} | ||
const initBridge = ({ routes, errorHandler, formidable, }) => new Bridge(routes, { formidable, errorHandler }); | ||
const initBridge = ({ routes, errorHandler, formidable, logs, }) => new Bridge(routes, { formidable, errorHandler, logs }); | ||
exports.initBridge = initBridge; | ||
//# sourceMappingURL=bridge.js.map |
@@ -20,5 +20,4 @@ "use strict"; | ||
__exportStar(require("./file-validator"), exports); | ||
// export * from './methodValidator'; | ||
__exportStar(require("./middleware"), exports); | ||
__exportStar(require("./resolver"), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -27,3 +27,2 @@ "use strict"; | ||
middlewares: routeParams.middlewares, | ||
// documentation: routeParams.documentation, | ||
resolve: routeParams.resolve, | ||
@@ -30,0 +29,0 @@ }); |
@@ -10,7 +10,2 @@ interface Error { | ||
}; | ||
/** | ||
* | ||
* TO_COMPLETE | ||
* | ||
*/ | ||
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) => { | ||
@@ -17,0 +12,0 @@ error: { |
@@ -25,7 +25,2 @@ "use strict"; | ||
exports.isError = isError; | ||
/** | ||
* | ||
* TO_COMPLETE | ||
* | ||
*/ | ||
const httpError = (status, name, data) => { | ||
@@ -32,0 +27,0 @@ return { error: { status, name, data } }; |
@@ -7,3 +7,4 @@ import { BridgeRoutes } from '../../routes'; | ||
formidable?: any; | ||
logs?: boolean; | ||
}) => express.Handler; | ||
//# sourceMappingURL=express.d.ts.map |
@@ -8,3 +8,4 @@ /// <reference types="node" /> | ||
formidable?: any; | ||
logs?: boolean; | ||
}) => (req: IncomingMessage, res: ServerResponse) => Promise<ServerResponse<IncomingMessage>>; | ||
//# sourceMappingURL=node-http.d.ts.map |
@@ -33,2 +33,11 @@ "use strict"; | ||
}); | ||
if (config?.logs) | ||
console.log(JSON.stringify({ | ||
path, | ||
body, | ||
files, | ||
query, | ||
headers: req.headers, | ||
result, | ||
})); | ||
if (!result) | ||
@@ -35,0 +44,0 @@ return res.writeHead(200, { 'Content-Type': 'application/json' }).end(JSON.stringify({})); |
"use strict"; | ||
// Coming soon | ||
//# sourceMappingURL=serverless.js.map |
{ | ||
"name": "bridge", | ||
"version": "2.0.46", | ||
"version": "2.0.47", | ||
"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
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
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
111165
1214