@foal/core
Advanced tools
Comparing version 1.5.0 to 1.6.0
@@ -235,2 +235,3 @@ /** | ||
* saving the file to the disk. | ||
* @deprecated | ||
* @returns {Promise<HttpResponseOK>} | ||
@@ -237,0 +238,0 @@ */ |
@@ -239,2 +239,3 @@ "use strict"; | ||
* saving the file to the disk. | ||
* @deprecated | ||
* @returns {Promise<HttpResponseOK>} | ||
@@ -241,0 +242,0 @@ */ |
import * as express from 'express'; | ||
import { Class } from '../core'; | ||
import { Class, ServiceManager } from '../core'; | ||
export interface ExpressApplication extends express.Express { | ||
@@ -11,2 +11,3 @@ [name: string]: any; | ||
}; | ||
serviceManager?: ServiceManager; | ||
preMiddlewares?: (express.RequestHandler | express.ErrorRequestHandler)[]; | ||
@@ -26,2 +27,4 @@ postMiddlewares?: (express.RequestHandler | express.ErrorRequestHandler)[]; | ||
* used to handle errors. | ||
* @param {ServiceManager} [expressInstanceOrOptions.serviceManager] - Prebuilt and configured Service Manager for | ||
* optionally overriding the mapped identities. | ||
* @param {(express.RequestHandler | express.ErrorRequestHandler)[]} [expressInstanceOrOptions.preMiddlewares] Express | ||
@@ -45,2 +48,4 @@ * middlewares to be executed before the controllers and hooks. | ||
* used to handle errors. | ||
* @param {ServiceManager} [expressInstanceOrOptions.serviceManager] - Prebuilt and configured Service Manager for | ||
* optionally overriding the mapped identities. | ||
* @param {(express.RequestHandler | express.ErrorRequestHandler)[]} [expressInstanceOrOptions.preMiddlewares] Express | ||
@@ -47,0 +52,0 @@ * middlewares to be executed before the controllers and hooks. |
@@ -52,2 +52,4 @@ "use strict"; | ||
* used to handle errors. | ||
* @param {ServiceManager} [expressInstanceOrOptions.serviceManager] - Prebuilt and configured Service Manager for | ||
* optionally overriding the mapped identities. | ||
* @param {(express.RequestHandler | express.ErrorRequestHandler)[]} [expressInstanceOrOptions.preMiddlewares] Express | ||
@@ -83,3 +85,3 @@ * middlewares to be executed before the controllers and hooks. | ||
// Create the service and controller manager. | ||
const services = new core_1.ServiceManager(); | ||
const services = options.serviceManager || new core_1.ServiceManager(); | ||
app.foal = { services }; | ||
@@ -113,2 +115,4 @@ // Resolve the controllers and hooks and add them to the express instance. | ||
* used to handle errors. | ||
* @param {ServiceManager} [expressInstanceOrOptions.serviceManager] - Prebuilt and configured Service Manager for | ||
* optionally overriding the mapped identities. | ||
* @param {(express.RequestHandler | express.ErrorRequestHandler)[]} [expressInstanceOrOptions.preMiddlewares] Express | ||
@@ -115,0 +119,0 @@ * middlewares to be executed before the controllers and hooks. |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const pump = require("pump"); | ||
// FoalTS | ||
@@ -34,3 +35,3 @@ const core_1 = require("../core"); | ||
if (response.stream === true) { | ||
response.body.pipe(res); | ||
pump(response.body, res); | ||
return; | ||
@@ -37,0 +38,0 @@ } |
{ | ||
"name": "@foal/core", | ||
"version": "1.5.0", | ||
"version": "1.6.0", | ||
"description": "A Node.js and TypeScript framework, all-inclusive.", | ||
@@ -80,3 +80,3 @@ "main": "./lib/index.js", | ||
"@types/express": "~4.17.2", | ||
"ajv": "~6.10.2", | ||
"ajv": "~6.11.0", | ||
"cookie-parser": "~1.4.4", | ||
@@ -86,6 +86,7 @@ "express": "~4.17.1", | ||
"morgan": "~1.9.1", | ||
"pump": "~3.0.0", | ||
"reflect-metadata": "~0.1.13" | ||
}, | ||
"devDependencies": { | ||
"@foal/ejs": "^1.5.0", | ||
"@foal/ejs": "^1.6.0", | ||
"@types/mocha": "~2.2.43", | ||
@@ -111,3 +112,3 @@ "@types/node": "~10.1.2", | ||
}, | ||
"gitHead": "686e16a63d3417f05afbdf7feab9462aa5dde777" | ||
"gitHead": "5691b5d649e6104b3f46da7394fee6aa850918f6" | ||
} |
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
336096
8493
8
+ Addedpump@~3.0.0
+ Addedajv@6.11.0(transitive)
+ Addedend-of-stream@1.4.4(transitive)
+ Addedfast-deep-equal@3.1.3(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedpump@3.0.2(transitive)
+ Addedwrappy@1.0.2(transitive)
- Removedajv@6.10.2(transitive)
- Removedfast-deep-equal@2.0.1(transitive)
Updatedajv@~6.11.0