@tsed/platform-express 6.102.5 → 6.102.8-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/components/PlatformExpress.js +10 -6
- package/lib/cjs/components/PlatformExpress.js.map +1 -1
- package/lib/cjs/exports.js +7 -0
- package/lib/cjs/exports.js.map +1 -0
- package/lib/cjs/index.js +18 -11
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/interfaces/interfaces.js +3 -0
- package/lib/cjs/interfaces/interfaces.js.map +1 -0
- package/lib/cjs/package.json +3 -0
- package/lib/esm/components/PlatformExpress.js +6 -2
- package/lib/esm/components/PlatformExpress.js.map +1 -1
- package/lib/esm/decorators/caseSensitive.js +1 -1
- package/lib/esm/decorators/mergeParams.js +1 -1
- package/lib/esm/decorators/strict.js +1 -1
- package/lib/esm/exports.js +5 -0
- package/lib/esm/exports.js.map +1 -0
- package/lib/esm/index.js +19 -12
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/interfaces/interfaces.js +2 -0
- package/lib/esm/interfaces/interfaces.js.map +1 -0
- package/lib/esm/package.json +3 -0
- package/lib/esm/services/PlatformExpressApplication.js +1 -1
- package/lib/esm/services/PlatformExpressRouter.js +1 -1
- package/lib/types/components/PlatformExpress.d.ts +4 -1
- package/lib/types/exports.d.ts +1 -0
- package/lib/types/index.d.ts +18 -3
- package/lib/types/interfaces/{index.d.ts → interfaces.d.ts} +0 -2
- package/package.json +20 -15
- package/lib/cjs/decorators/index.js +0 -8
- package/lib/cjs/decorators/index.js.map +0 -1
- package/lib/cjs/interfaces/index.js +0 -6
- package/lib/cjs/interfaces/index.js.map +0 -1
- package/lib/cjs/services/index.js +0 -9
- package/lib/cjs/services/index.js.map +0 -1
- package/lib/esm/decorators/index.js +0 -5
- package/lib/esm/decorators/index.js.map +0 -1
- package/lib/esm/interfaces/index.js +0 -3
- package/lib/esm/interfaces/index.js.map +0 -1
- package/lib/esm/services/index.js +0 -6
- package/lib/esm/services/index.js.map +0 -1
- package/lib/types/decorators/index.d.ts +0 -4
- package/lib/types/services/index.d.ts +0 -5
|
@@ -23,7 +23,11 @@ exports.PlatformExpress = void 0;
|
|
|
23
23
|
const common_1 = require("@tsed/common");
|
|
24
24
|
const core_1 = require("@tsed/core");
|
|
25
25
|
const rawBodyMiddleware_1 = require("../middlewares/rawBodyMiddleware");
|
|
26
|
-
const
|
|
26
|
+
const PlatformExpressApplication_1 = require("../services/PlatformExpressApplication");
|
|
27
|
+
const PlatformExpressRouter_1 = require("../services/PlatformExpressRouter");
|
|
28
|
+
const PlatformExpressHandler_1 = require("../services/PlatformExpressHandler");
|
|
29
|
+
const PlatformExpressResponse_1 = require("../services/PlatformExpressResponse");
|
|
30
|
+
const PlatformExpressRequest_1 = require("../services/PlatformExpressRequest");
|
|
27
31
|
/**
|
|
28
32
|
* @platform
|
|
29
33
|
* @express
|
|
@@ -34,23 +38,23 @@ class PlatformExpress {
|
|
|
34
38
|
this.providers = [
|
|
35
39
|
{
|
|
36
40
|
provide: common_1.PlatformApplication,
|
|
37
|
-
useClass:
|
|
41
|
+
useClass: PlatformExpressApplication_1.PlatformExpressApplication
|
|
38
42
|
},
|
|
39
43
|
{
|
|
40
44
|
provide: common_1.PlatformRouter,
|
|
41
|
-
useClass:
|
|
45
|
+
useClass: PlatformExpressRouter_1.PlatformExpressRouter
|
|
42
46
|
},
|
|
43
47
|
{
|
|
44
48
|
provide: common_1.PlatformHandler,
|
|
45
|
-
useClass:
|
|
49
|
+
useClass: PlatformExpressHandler_1.PlatformExpressHandler
|
|
46
50
|
},
|
|
47
51
|
{
|
|
48
52
|
provide: common_1.PlatformResponse,
|
|
49
|
-
useClass:
|
|
53
|
+
useClass: PlatformExpressResponse_1.PlatformExpressResponse
|
|
50
54
|
},
|
|
51
55
|
{
|
|
52
56
|
provide: common_1.PlatformRequest,
|
|
53
|
-
useClass:
|
|
57
|
+
useClass: PlatformExpressRequest_1.PlatformExpressRequest
|
|
54
58
|
}
|
|
55
59
|
];
|
|
56
60
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlatformExpress.js","sourceRoot":"","sources":["../../../src/components/PlatformExpress.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAEA,yCAUsB;AACtB,qCAAqC;AACrC,wEAAmE;AACnE,
|
|
1
|
+
{"version":3,"file":"PlatformExpress.js","sourceRoot":"","sources":["../../../src/components/PlatformExpress.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAEA,yCAUsB;AACtB,qCAAqC;AACrC,wEAAmE;AACnE,uFAAkF;AAClF,6EAAwE;AACxE,+EAA0E;AAC1E,iFAA4E;AAC5E,+EAA0E;AAE1E;;;GAGG;AACH,MAAa,eAAe;IAwB1B,YAAoB,QAA8D;QAA9D,aAAQ,GAAR,QAAQ,CAAsD;QAvBzE,cAAS,GAAG;YACnB;gBACE,OAAO,EAAE,4BAAmB;gBAC5B,QAAQ,EAAE,uDAA0B;aACrC;YACD;gBACE,OAAO,EAAE,uBAAc;gBACvB,QAAQ,EAAE,6CAAqB;aAChC;YACD;gBACE,OAAO,EAAE,wBAAe;gBACxB,QAAQ,EAAE,+CAAsB;aACjC;YACD;gBACE,OAAO,EAAE,yBAAgB;gBACzB,QAAQ,EAAE,iDAAuB;aAClC;YACD;gBACE,OAAO,EAAE,wBAAe;gBACxB,QAAQ,EAAE,+CAAsB;aACjC;SACF,CAAC;IAEmF,CAAC;IAEtF;;;;OAIG;IACH,MAAM,CAAC,MAAM,CAAC,MAAiB,EAAE,WAAwC,EAAE;QACzE,OAAO,wBAAe,CAAC,MAAM,CAAsC,MAAM,EAAE;YACzE,GAAG,QAAQ;YACX,OAAO,EAAE,eAAe;SACzB,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,MAAiB,EAAE,WAAwC,EAAE;QAClF,OAAO,wBAAe,CAAC,SAAS,CAAsC,MAA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AAM,CAAC,CAAC;gBAC3C,CAAC,CAAC,CAAC;gBAEH,aAAa,CAAC,UAAU,IAAI,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;gBACjF,aAAa,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC;aAChE;SACF;QAAC,OAAO,KAAK,EAAE;YACd,uBAAuB;YACvB,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC;gBACnB,KAAK,EAAE,sBAAsB;gBAC7B,OAAO,EAAE,oEAAoE;gBAC7E,KAAK;aACN,CAAC,CAAC;SACJ;IACH,CAAC;CACF;AA3HD,0CA2HC","sourcesContent":["import Express from \"express\";\nimport type {PlatformViews} from \"@tsed/platform-views\";\nimport {\n createContext,\n PlatformAdapter,\n PlatformApplication,\n PlatformBuilder,\n PlatformExceptions,\n PlatformHandler,\n PlatformRequest,\n PlatformResponse,\n PlatformRouter\n} from \"@tsed/common\";\nimport {Env, Type} from \"@tsed/core\";\nimport {rawBodyMiddleware} from \"../middlewares/rawBodyMiddleware\";\nimport {PlatformExpressApplication} from \"../services/PlatformExpressApplication\";\nimport {PlatformExpressRouter} from \"../services/PlatformExpressRouter\";\nimport {PlatformExpressHandler} from \"../services/PlatformExpressHandler\";\nimport {PlatformExpressResponse} from \"../services/PlatformExpressResponse\";\nimport {PlatformExpressRequest} from \"../services/PlatformExpressRequest\";\n\n/**\n * @platform\n * @express\n */\nexport class PlatformExpress implements PlatformAdapter<Express.Application, Express.Router> {\n readonly providers = [\n {\n provide: PlatformApplication,\n useClass: PlatformExpressApplication\n },\n {\n provide: PlatformRouter,\n useClass: PlatformExpressRouter\n },\n {\n provide: PlatformHandler,\n useClass: PlatformExpressHandler\n },\n {\n provide: PlatformResponse,\n useClass: PlatformExpressResponse\n },\n {\n provide: PlatformRequest,\n useClass: PlatformExpressRequest\n }\n ];\n\n constructor(private platform: PlatformBuilder<Express.Application, Express.Router>) {}\n\n /**\n * Create new serverless application. In this mode, the component scan are disabled.\n * @param module\n * @param settings\n */\n static create(module: Type<any>, settings: Partial<TsED.Configuration> = {}) {\n return PlatformBuilder.create<Express.Application, Express.Router>(module, {\n ...settings,\n adapter: PlatformExpress\n });\n }\n\n /**\n * Bootstrap a server application\n * @param module\n * @param settings\n */\n static async bootstrap(module: Type<any>, settings: Partial<TsED.Configuration> = {}) {\n return PlatformBuilder.bootstrap<Express.Application, Express.Router>(module, {\n ...settings,\n adapter: PlatformExpress\n });\n }\n\n useRouter(): this {\n const {logger, app} = this.platform;\n\n logger.debug(\"Mount app router\");\n app.getApp().use(rawBodyMiddleware);\n app.getApp().use(app.getRouter());\n\n return this;\n }\n\n async beforeLoadRoutes() {\n const {injector, app} = this.platform;\n // disable x-powered-by header\n injector.settings.get(\"env\") === Env.PROD && app.getApp().disable(\"x-powered-by\");\n\n await this.configureViewsEngine();\n }\n\n async afterLoadRoutes() {\n const {injector, app} = this.platform;\n // NOT FOUND\n app.use((req: any, res: any, next: any) => {\n !res.headersSent && injector.get<PlatformExceptions>(PlatformExceptions)?.resourceNotFound(req.$ctx);\n });\n\n // EXCEPTION FILTERS\n app.use((err: any, req: any, res: any, next: any) => {\n !res.headersSent && injector.get<PlatformExceptions>(PlatformExceptions)?.catch(err, req.$ctx);\n });\n }\n\n useContext(): this {\n const {logger, app, injector} = this.platform;\n\n logger.debug(\"Mount app context\");\n\n const invoke = createContext(injector);\n\n app.getApp().use(async (request: any, response: any, next: any) => {\n await invoke({request, response});\n\n return next();\n });\n\n return this;\n }\n\n private async configureViewsEngine() {\n const {settings, injector, app} = this.platform;\n try {\n const {exists, disabled} = settings.get(\"views\") || {};\n\n if (exists && !disabled) {\n const {PlatformViews} = await import(\"@tsed/platform-views\");\n const platformViews = injector.get<PlatformViews>(PlatformViews)!;\n const express = app.getApp();\n\n platformViews.getEngines().forEach(({extension, engine}) => {\n express.engine(extension, engine.render);\n });\n\n platformViews.viewEngine && express.set(\"view engine\", platformViews.viewEngine);\n platformViews.root && express.set(\"views\", platformViews.root);\n }\n } catch (error) {\n // istanbul ignore next\n injector.logger.warn({\n event: \"PLATFORM_VIEWS_ERROR\",\n message: \"Unable to configure the PlatformViews service on your environment.\",\n error\n });\n }\n }\n}\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const common_1 = require("@tsed/common");
|
|
4
|
+
const PlatformExpress_1 = require("./components/PlatformExpress");
|
|
5
|
+
common_1.PlatformTest.adapter = PlatformExpress_1.PlatformExpress;
|
|
6
|
+
common_1.PlatformBuilder.adapter = PlatformExpress_1.PlatformExpress;
|
|
7
|
+
//# sourceMappingURL=exports.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exports.js","sourceRoot":"","sources":["../../src/exports.ts"],"names":[],"mappings":";;AAAA,yCAA2D;AAC3D,kEAA6D;AAE7D,qBAAY,CAAC,OAAO,GAAG,iCAAsB,CAAC;AAC9C,wBAAe,CAAC,OAAO,GAAG,iCAAsB,CAAC","sourcesContent":["import {PlatformBuilder, PlatformTest} from \"@tsed/common\";\nimport {PlatformExpress} from \"./components/PlatformExpress\";\n\nPlatformTest.adapter = PlatformExpress as any;\nPlatformBuilder.adapter = PlatformExpress as any;\n"]}
|
package/lib/cjs/index.js
CHANGED
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @file Automatically generated by barrelsby.
|
|
4
|
+
*/
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
const tslib_1 = require("tslib");
|
|
4
|
-
|
|
5
|
-
const PlatformExpress_1 = require("./components/PlatformExpress");
|
|
6
|
-
common_1.PlatformTest.adapter = PlatformExpress_1.PlatformExpress;
|
|
7
|
-
common_1.PlatformBuilder.adapter = PlatformExpress_1.PlatformExpress;
|
|
8
|
-
// interfaces
|
|
9
|
-
(0, tslib_1.__exportStar)(require("./interfaces"), exports);
|
|
10
|
-
// decorators
|
|
11
|
-
(0, tslib_1.__exportStar)(require("./decorators"), exports);
|
|
12
|
-
// services
|
|
13
|
-
(0, tslib_1.__exportStar)(require("./services"), exports);
|
|
14
|
-
// components
|
|
7
|
+
(0, tslib_1.__exportStar)(require("./exports"), exports);
|
|
15
8
|
(0, tslib_1.__exportStar)(require("./components/PlatformExpress"), exports);
|
|
9
|
+
(0, tslib_1.__exportStar)(require("./decorators/caseSensitive"), exports);
|
|
10
|
+
(0, tslib_1.__exportStar)(require("./decorators/mergeParams"), exports);
|
|
11
|
+
(0, tslib_1.__exportStar)(require("./decorators/routerSettings"), exports);
|
|
12
|
+
(0, tslib_1.__exportStar)(require("./decorators/strict"), exports);
|
|
13
|
+
(0, tslib_1.__exportStar)(require("./interfaces/PlatformExpressSettings"), exports);
|
|
14
|
+
(0, tslib_1.__exportStar)(require("./interfaces/PlatformExpressStaticsOptions"), exports);
|
|
15
|
+
(0, tslib_1.__exportStar)(require("./interfaces/interfaces"), exports);
|
|
16
|
+
(0, tslib_1.__exportStar)(require("./middlewares/rawBodyMiddleware"), exports);
|
|
17
|
+
(0, tslib_1.__exportStar)(require("./middlewares/staticsMiddleware"), exports);
|
|
18
|
+
(0, tslib_1.__exportStar)(require("./services/PlatformExpressApplication"), exports);
|
|
19
|
+
(0, tslib_1.__exportStar)(require("./services/PlatformExpressHandler"), exports);
|
|
20
|
+
(0, tslib_1.__exportStar)(require("./services/PlatformExpressRequest"), exports);
|
|
21
|
+
(0, tslib_1.__exportStar)(require("./services/PlatformExpressResponse"), exports);
|
|
22
|
+
(0, tslib_1.__exportStar)(require("./services/PlatformExpressRouter"), exports);
|
|
16
23
|
//# sourceMappingURL=index.js.map
|
package/lib/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,yDAA0B;AAC1B,4EAA6C;AAC7C,0EAA2C;AAC3C,wEAAyC;AACzC,2EAA4C;AAC5C,mEAAoC;AACpC,oFAAqD;AACrD,0FAA2D;AAC3D,uEAAwC;AACxC,+EAAgD;AAChD,+EAAgD;AAChD,qFAAsD;AACtD,iFAAkD;AAClD,iFAAkD;AAClD,kFAAmD;AACnD,gFAAiD","sourcesContent":["/**\n * @file Automatically generated by barrelsby.\n */\n\nexport * from \"./exports\";\nexport * from \"./components/PlatformExpress\";\nexport * from \"./decorators/caseSensitive\";\nexport * from \"./decorators/mergeParams\";\nexport * from \"./decorators/routerSettings\";\nexport * from \"./decorators/strict\";\nexport * from \"./interfaces/PlatformExpressSettings\";\nexport * from \"./interfaces/PlatformExpressStaticsOptions\";\nexport * from \"./interfaces/interfaces\";\nexport * from \"./middlewares/rawBodyMiddleware\";\nexport * from \"./middlewares/staticsMiddleware\";\nexport * from \"./services/PlatformExpressApplication\";\nexport * from \"./services/PlatformExpressHandler\";\nexport * from \"./services/PlatformExpressRequest\";\nexport * from \"./services/PlatformExpressResponse\";\nexport * from \"./services/PlatformExpressRouter\";\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/interfaces/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["import Express from \"express\";\nimport {PlatformExpressSettings} from \"./PlatformExpressSettings\";\n\ndeclare global {\n namespace TsED {\n export interface Configuration {\n /**\n * Configuration related to Express platform application.\n */\n express: PlatformExpressSettings;\n }\n\n export interface NextFunction extends Express.NextFunction {}\n }\n}\n"]}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { createContext, PlatformApplication, PlatformBuilder, PlatformExceptions, PlatformHandler, PlatformRequest, PlatformResponse, PlatformRouter } from "@tsed/common";
|
|
2
2
|
import { Env } from "@tsed/core";
|
|
3
|
-
import { rawBodyMiddleware } from "../middlewares/rawBodyMiddleware";
|
|
4
|
-
import { PlatformExpressApplication
|
|
3
|
+
import { rawBodyMiddleware } from "../middlewares/rawBodyMiddleware.js";
|
|
4
|
+
import { PlatformExpressApplication } from "../services/PlatformExpressApplication.js";
|
|
5
|
+
import { PlatformExpressRouter } from "../services/PlatformExpressRouter.js";
|
|
6
|
+
import { PlatformExpressHandler } from "../services/PlatformExpressHandler.js";
|
|
7
|
+
import { PlatformExpressResponse } from "../services/PlatformExpressResponse.js";
|
|
8
|
+
import { PlatformExpressRequest } from "../services/PlatformExpressRequest.js";
|
|
5
9
|
/**
|
|
6
10
|
* @platform
|
|
7
11
|
* @express
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlatformExpress.js","sourceRoot":"","sources":["../../../src/components/PlatformExpress.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,aAAa,EAEb,mBAAmB,EACnB,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,cAAc,EACf,MAAM,cAAc,CAAC;AACtB,OAAO,EAAC,GAAG,EAAO,MAAM,YAAY,CAAC;AACrC,OAAO,EAAC,iBAAiB,EAAC,MAAM,kCAAkC,CAAC;AACnE,OAAO,
|
|
1
|
+
{"version":3,"file":"PlatformExpress.js","sourceRoot":"","sources":["../../../src/components/PlatformExpress.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,aAAa,EAEb,mBAAmB,EACnB,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,cAAc,EACf,MAAM,cAAc,CAAC;AACtB,OAAO,EAAC,GAAG,EAAO,MAAM,YAAY,CAAC;AACrC,OAAO,EAAC,iBAAiB,EAAC,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAC,0BAA0B,EAAC,MAAM,wCAAwC,CAAC;AAClF,OAAO,EAAC,qBAAqB,EAAC,MAAM,mCAAmC,C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AAuB;YACvB,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC;gBACnB,KAAK,EAAE,sBAAsB;gBAC7B,OAAO,EAAE,oEAAoE;gBAC7E,KAAK;aACN,CAAC,CAAC;SACJ;IACH,CAAC;CACF","sourcesContent":["import Express from \"express\";\nimport type {PlatformViews} from \"@tsed/platform-views\";\nimport {\n createContext,\n PlatformAdapter,\n PlatformApplication,\n PlatformBuilder,\n PlatformExceptions,\n PlatformHandler,\n PlatformRequest,\n PlatformResponse,\n PlatformRouter\n} from \"@tsed/common\";\nimport {Env, Type} from \"@tsed/core\";\nimport {rawBodyMiddleware} from \"../middlewares/rawBodyMiddleware\";\nimport {PlatformExpressApplication} from \"../services/PlatformExpressApplication\";\nimport {PlatformExpressRouter} from \"../services/PlatformExpressRouter\";\nimport {PlatformExpressHandler} from \"../services/PlatformExpressHandler\";\nimport {PlatformExpressResponse} from \"../services/PlatformExpressResponse\";\nimport {PlatformExpressRequest} from \"../services/PlatformExpressRequest\";\n\n/**\n * @platform\n * @express\n */\nexport class PlatformExpress implements PlatformAdapter<Express.Application, Express.Router> {\n readonly providers = [\n {\n provide: PlatformApplication,\n useClass: PlatformExpressApplication\n },\n {\n provide: PlatformRouter,\n useClass: PlatformExpressRouter\n },\n {\n provide: PlatformHandler,\n useClass: PlatformExpressHandler\n },\n {\n provide: PlatformResponse,\n useClass: PlatformExpressResponse\n },\n {\n provide: PlatformRequest,\n useClass: PlatformExpressRequest\n }\n ];\n\n constructor(private platform: PlatformBuilder<Express.Application, Express.Router>) {}\n\n /**\n * Create new serverless application. In this mode, the component scan are disabled.\n * @param module\n * @param settings\n */\n static create(module: Type<any>, settings: Partial<TsED.Configuration> = {}) {\n return PlatformBuilder.create<Express.Application, Express.Router>(module, {\n ...settings,\n adapter: PlatformExpress\n });\n }\n\n /**\n * Bootstrap a server application\n * @param module\n * @param settings\n */\n static async bootstrap(module: Type<any>, settings: Partial<TsED.Configuration> = {}) {\n return PlatformBuilder.bootstrap<Express.Application, Express.Router>(module, {\n ...settings,\n adapter: PlatformExpress\n });\n }\n\n useRouter(): this {\n const {logger, app} = this.platform;\n\n logger.debug(\"Mount app router\");\n app.getApp().use(rawBodyMiddleware);\n app.getApp().use(app.getRouter());\n\n return this;\n }\n\n async beforeLoadRoutes() {\n const {injector, app} = this.platform;\n // disable x-powered-by header\n injector.settings.get(\"env\") === Env.PROD && app.getApp().disable(\"x-powered-by\");\n\n await this.configureViewsEngine();\n }\n\n async afterLoadRoutes() {\n const {injector, app} = this.platform;\n // NOT FOUND\n app.use((req: any, res: any, next: any) => {\n !res.headersSent && injector.get<PlatformExceptions>(PlatformExceptions)?.resourceNotFound(req.$ctx);\n });\n\n // EXCEPTION FILTERS\n app.use((err: any, req: any, res: any, next: any) => {\n !res.headersSent && injector.get<PlatformExceptions>(PlatformExceptions)?.catch(err, req.$ctx);\n });\n }\n\n useContext(): this {\n const {logger, app, injector} = this.platform;\n\n logger.debug(\"Mount app context\");\n\n const invoke = createContext(injector);\n\n app.getApp().use(async (request: any, response: any, next: any) => {\n await invoke({request, response});\n\n return next();\n });\n\n return this;\n }\n\n private async configureViewsEngine() {\n const {settings, injector, app} = this.platform;\n try {\n const {exists, disabled} = settings.get(\"views\") || {};\n\n if (exists && !disabled) {\n const {PlatformViews} = await import(\"@tsed/platform-views\");\n const platformViews = injector.get<PlatformViews>(PlatformViews)!;\n const express = app.getApp();\n\n platformViews.getEngines().forEach(({extension, engine}) => {\n express.engine(extension, engine.render);\n });\n\n platformViews.viewEngine && express.set(\"view engine\", platformViews.viewEngine);\n platformViews.root && express.set(\"views\", platformViews.root);\n }\n } catch (error) {\n // istanbul ignore next\n injector.logger.warn({\n event: \"PLATFORM_VIEWS_ERROR\",\n message: \"Unable to configure the PlatformViews service on your environment.\",\n error\n });\n }\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exports.js","sourceRoot":"","sources":["../../src/exports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAE,YAAY,EAAC,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAE7D,YAAY,CAAC,OAAO,GAAG,eAAsB,CAAC;AAC9C,eAAe,CAAC,OAAO,GAAG,eAAsB,CAAC","sourcesContent":["import {PlatformBuilder, PlatformTest} from \"@tsed/common\";\nimport {PlatformExpress} from \"./components/PlatformExpress\";\n\nPlatformTest.adapter = PlatformExpress as any;\nPlatformBuilder.adapter = PlatformExpress as any;\n"]}
|
package/lib/esm/index.js
CHANGED
|
@@ -1,13 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export * from "./
|
|
7
|
-
|
|
8
|
-
export * from "./decorators";
|
|
9
|
-
|
|
10
|
-
export * from "./
|
|
11
|
-
|
|
12
|
-
export * from "./
|
|
1
|
+
/**
|
|
2
|
+
* @file Automatically generated by barrelsby.
|
|
3
|
+
*/
|
|
4
|
+
export * from "./exports.js";
|
|
5
|
+
export * from "./components/PlatformExpress.js";
|
|
6
|
+
export * from "./decorators/caseSensitive.js";
|
|
7
|
+
export * from "./decorators/mergeParams.js";
|
|
8
|
+
export * from "./decorators/routerSettings.js";
|
|
9
|
+
export * from "./decorators/strict.js";
|
|
10
|
+
export * from "./interfaces/PlatformExpressSettings.js";
|
|
11
|
+
export * from "./interfaces/PlatformExpressStaticsOptions.js";
|
|
12
|
+
export * from "./interfaces/interfaces.js";
|
|
13
|
+
export * from "./middlewares/rawBodyMiddleware.js";
|
|
14
|
+
export * from "./middlewares/staticsMiddleware.js";
|
|
15
|
+
export * from "./services/PlatformExpressApplication.js";
|
|
16
|
+
export * from "./services/PlatformExpressHandler.js";
|
|
17
|
+
export * from "./services/PlatformExpressRequest.js";
|
|
18
|
+
export * from "./services/PlatformExpressResponse.js";
|
|
19
|
+
export * from "./services/PlatformExpressRouter.js";
|
|
13
20
|
//# sourceMappingURL=index.js.map
|
package/lib/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,WAAW,CAAC;AAC1B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,sCAAsC,CAAC;AACrD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,yBAAyB,CAAC;AACxC,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,uCAAuC,CAAC;AACtD,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC","sourcesContent":["/**\n * @file Automatically generated by barrelsby.\n */\n\nexport * from \"./exports\";\nexport * from \"./components/PlatformExpress\";\nexport * from \"./decorators/caseSensitive\";\nexport * from \"./decorators/mergeParams\";\nexport * from \"./decorators/routerSettings\";\nexport * from \"./decorators/strict\";\nexport * from \"./interfaces/PlatformExpressSettings\";\nexport * from \"./interfaces/PlatformExpressStaticsOptions\";\nexport * from \"./interfaces/interfaces\";\nexport * from \"./middlewares/rawBodyMiddleware\";\nexport * from \"./middlewares/staticsMiddleware\";\nexport * from \"./services/PlatformExpressApplication\";\nexport * from \"./services/PlatformExpressHandler\";\nexport * from \"./services/PlatformExpressRequest\";\nexport * from \"./services/PlatformExpressResponse\";\nexport * from \"./services/PlatformExpressRouter\";\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/interfaces/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["import Express from \"express\";\nimport {PlatformExpressSettings} from \"./PlatformExpressSettings\";\n\ndeclare global {\n namespace TsED {\n export interface Configuration {\n /**\n * Configuration related to Express platform application.\n */\n express: PlatformExpressSettings;\n }\n\n export interface NextFunction extends Express.NextFunction {}\n }\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate, __metadata, __param } from "tslib";
|
|
2
2
|
import { Configuration, Inject, PlatformHandler } from "@tsed/common";
|
|
3
3
|
import Express from "express";
|
|
4
|
-
import { PlatformExpressRouter } from "./PlatformExpressRouter";
|
|
4
|
+
import { PlatformExpressRouter } from "./PlatformExpressRouter.js";
|
|
5
5
|
/**
|
|
6
6
|
* @platform
|
|
7
7
|
* @express
|
|
@@ -2,7 +2,7 @@ import { __decorate, __metadata, __param } from "tslib";
|
|
|
2
2
|
import { PLATFORM_ROUTER_OPTIONS, PlatformHandler, PlatformRouter } from "@tsed/common";
|
|
3
3
|
import { Configuration, Inject } from "@tsed/di";
|
|
4
4
|
import Express from "express";
|
|
5
|
-
import { staticsMiddleware } from "../middlewares/staticsMiddleware";
|
|
5
|
+
import { staticsMiddleware } from "../middlewares/staticsMiddleware.js";
|
|
6
6
|
/**
|
|
7
7
|
* @platform
|
|
8
8
|
* @express
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import Express from "express";
|
|
2
2
|
import { PlatformAdapter, PlatformBuilder, PlatformHandler, PlatformRequest, PlatformResponse, PlatformRouter } from "@tsed/common";
|
|
3
3
|
import { Type } from "@tsed/core";
|
|
4
|
-
import {
|
|
4
|
+
import { PlatformExpressRouter } from "../services/PlatformExpressRouter";
|
|
5
|
+
import { PlatformExpressHandler } from "../services/PlatformExpressHandler";
|
|
6
|
+
import { PlatformExpressResponse } from "../services/PlatformExpressResponse";
|
|
7
|
+
import { PlatformExpressRequest } from "../services/PlatformExpressRequest";
|
|
5
8
|
/**
|
|
6
9
|
* @platform
|
|
7
10
|
* @express
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,4 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @file Automatically generated by barrelsby.
|
|
3
|
+
*/
|
|
4
|
+
export * from "./exports";
|
|
4
5
|
export * from "./components/PlatformExpress";
|
|
6
|
+
export * from "./decorators/caseSensitive";
|
|
7
|
+
export * from "./decorators/mergeParams";
|
|
8
|
+
export * from "./decorators/routerSettings";
|
|
9
|
+
export * from "./decorators/strict";
|
|
10
|
+
export * from "./interfaces/PlatformExpressSettings";
|
|
11
|
+
export * from "./interfaces/PlatformExpressStaticsOptions";
|
|
12
|
+
export * from "./interfaces/interfaces";
|
|
13
|
+
export * from "./middlewares/rawBodyMiddleware";
|
|
14
|
+
export * from "./middlewares/staticsMiddleware";
|
|
15
|
+
export * from "./services/PlatformExpressApplication";
|
|
16
|
+
export * from "./services/PlatformExpressHandler";
|
|
17
|
+
export * from "./services/PlatformExpressRequest";
|
|
18
|
+
export * from "./services/PlatformExpressResponse";
|
|
19
|
+
export * from "./services/PlatformExpressRouter";
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/platform-express",
|
|
3
|
-
"version": "6.102.
|
|
3
|
+
"version": "6.102.8-rc.2",
|
|
4
4
|
"description": "A TypeScript Framework on top of Express",
|
|
5
5
|
"private": false,
|
|
6
6
|
"source": "./src/index.ts",
|
|
7
7
|
"main": "./lib/cjs/index.js",
|
|
8
|
+
"module": "./lib/esm/index.js",
|
|
8
9
|
"typings": "./lib/types/index.d.ts",
|
|
9
10
|
"exports": {
|
|
10
11
|
"types": "./lib/types/index.d.ts",
|
|
@@ -13,9 +14,10 @@
|
|
|
13
14
|
"default": "./lib/esm/index.js"
|
|
14
15
|
},
|
|
15
16
|
"scripts": {
|
|
16
|
-
"build": "yarn run build:esm && yarn run build:cjs",
|
|
17
|
+
"build": "yarn barrels && yarn run build:esm && yarn run build:cjs",
|
|
17
18
|
"build:cjs": "tsc --build tsconfig.compile.json",
|
|
18
19
|
"build:esm": "tsc --build tsconfig.compile.esm.json",
|
|
20
|
+
"barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"",
|
|
19
21
|
"start": "ts-node -r tsconfig-paths/register test/app/index.ts",
|
|
20
22
|
"start:emulate": "ts-node -r tsconfig-paths/register test/app/emulate.ts"
|
|
21
23
|
},
|
|
@@ -46,7 +48,7 @@
|
|
|
46
48
|
"bugs": {
|
|
47
49
|
"url": "https://github.com/tsedio/tsed/issues"
|
|
48
50
|
},
|
|
49
|
-
"homepage": "https://github.com/tsedio/tsed/tree/
|
|
51
|
+
"homepage": "https://github.com/tsedio/tsed/tree/rc/packages/platform/platform-express",
|
|
50
52
|
"repository": "https://github.com/tsedio/tsed",
|
|
51
53
|
"dependencies": {
|
|
52
54
|
"express": "^4.17.1",
|
|
@@ -54,11 +56,11 @@
|
|
|
54
56
|
"tslib": "2.2.0"
|
|
55
57
|
},
|
|
56
58
|
"devDependencies": {
|
|
57
|
-
"@tsed/common": "6.102.
|
|
58
|
-
"@tsed/core": "6.102.
|
|
59
|
-
"@tsed/di": "6.102.
|
|
60
|
-
"@tsed/platform-test-utils": "6.102.
|
|
61
|
-
"@tsed/platform-views": "6.102.
|
|
59
|
+
"@tsed/common": "6.102.8-rc.2",
|
|
60
|
+
"@tsed/core": "6.102.8-rc.2",
|
|
61
|
+
"@tsed/di": "6.102.8-rc.2",
|
|
62
|
+
"@tsed/platform-test-utils": "6.102.8-rc.2",
|
|
63
|
+
"@tsed/platform-views": "6.102.8-rc.2",
|
|
62
64
|
"@types/body-parser": "1.19.0",
|
|
63
65
|
"@types/compression": "1.7.0",
|
|
64
66
|
"@types/cookie-parser": "1.4.2",
|
|
@@ -74,14 +76,14 @@
|
|
|
74
76
|
"method-override": "3.0.0"
|
|
75
77
|
},
|
|
76
78
|
"peerDependencies": {
|
|
77
|
-
"@tsed/common": "^6.102.
|
|
78
|
-
"@tsed/core": "^6.102.
|
|
79
|
-
"@tsed/di": "^6.102.
|
|
80
|
-
"@tsed/json-mapper": "^6.102.
|
|
79
|
+
"@tsed/common": "^6.102.8-rc.2",
|
|
80
|
+
"@tsed/core": "^6.102.8-rc.2",
|
|
81
|
+
"@tsed/di": "^6.102.8-rc.2",
|
|
82
|
+
"@tsed/json-mapper": "^6.102.8-rc.2",
|
|
81
83
|
"@tsed/logger": ">=6.0.2",
|
|
82
|
-
"@tsed/openspec": "^6.102.
|
|
83
|
-
"@tsed/platform-views": "^6.102.
|
|
84
|
-
"@tsed/schema": "^6.102.
|
|
84
|
+
"@tsed/openspec": "^6.102.8-rc.2",
|
|
85
|
+
"@tsed/platform-views": "^6.102.8-rc.2",
|
|
86
|
+
"@tsed/schema": "^6.102.8-rc.2",
|
|
85
87
|
"@types/multer": "^1.4.5",
|
|
86
88
|
"body-parser": "1.19.0"
|
|
87
89
|
},
|
|
@@ -89,5 +91,8 @@
|
|
|
89
91
|
"@tsed/platform-views": {
|
|
90
92
|
"optional": true
|
|
91
93
|
}
|
|
94
|
+
},
|
|
95
|
+
"publishConfig": {
|
|
96
|
+
"tag": "rc"
|
|
92
97
|
}
|
|
93
98
|
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
(0, tslib_1.__exportStar)(require("./routerSettings"), exports);
|
|
5
|
-
(0, tslib_1.__exportStar)(require("./caseSensitive"), exports);
|
|
6
|
-
(0, tslib_1.__exportStar)(require("./mergeParams"), exports);
|
|
7
|
-
(0, tslib_1.__exportStar)(require("./strict"), exports);
|
|
8
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/decorators/index.ts"],"names":[],"mappings":";;;AAAA,gEAAiC;AACjC,+DAAgC;AAChC,6DAA8B;AAC9B,wDAAyB","sourcesContent":["export * from \"./routerSettings\";\nexport * from \"./caseSensitive\";\nexport * from \"./mergeParams\";\nexport * from \"./strict\";\n"]}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
(0, tslib_1.__exportStar)(require("./PlatformExpressSettings"), exports);
|
|
5
|
-
(0, tslib_1.__exportStar)(require("./PlatformExpressStaticsOptions"), exports);
|
|
6
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interfaces/index.ts"],"names":[],"mappings":";;;AAGA,yEAA0C;AAC1C,+EAAgD","sourcesContent":["import Express from \"express\";\nimport {PlatformExpressSettings} from \"./PlatformExpressSettings\";\n\nexport * from \"./PlatformExpressSettings\";\nexport * from \"./PlatformExpressStaticsOptions\";\n\ndeclare global {\n namespace TsED {\n export interface Configuration {\n /**\n * Configuration related to Express platform application.\n */\n express: PlatformExpressSettings;\n }\n\n export interface NextFunction extends Express.NextFunction {}\n }\n}\n"]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
(0, tslib_1.__exportStar)(require("./PlatformExpressApplication"), exports);
|
|
5
|
-
(0, tslib_1.__exportStar)(require("./PlatformExpressHandler"), exports);
|
|
6
|
-
(0, tslib_1.__exportStar)(require("./PlatformExpressResponse"), exports);
|
|
7
|
-
(0, tslib_1.__exportStar)(require("./PlatformExpressRequest"), exports);
|
|
8
|
-
(0, tslib_1.__exportStar)(require("./PlatformExpressRouter"), exports);
|
|
9
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/services/index.ts"],"names":[],"mappings":";;;AAAA,4EAA6C;AAC7C,wEAAyC;AACzC,yEAA0C;AAC1C,wEAAyC;AACzC,uEAAwC","sourcesContent":["export * from \"./PlatformExpressApplication\";\nexport * from \"./PlatformExpressHandler\";\nexport * from \"./PlatformExpressResponse\";\nexport * from \"./PlatformExpressRequest\";\nexport * from \"./PlatformExpressRouter\";\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/decorators/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC","sourcesContent":["export * from \"./routerSettings\";\nexport * from \"./caseSensitive\";\nexport * from \"./mergeParams\";\nexport * from \"./strict\";\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interfaces/index.ts"],"names":[],"mappings":"AAGA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iCAAiC,CAAC","sourcesContent":["import Express from \"express\";\nimport {PlatformExpressSettings} from \"./PlatformExpressSettings\";\n\nexport * from \"./PlatformExpressSettings\";\nexport * from \"./PlatformExpressStaticsOptions\";\n\ndeclare global {\n namespace TsED {\n export interface Configuration {\n /**\n * Configuration related to Express platform application.\n */\n express: PlatformExpressSettings;\n }\n\n export interface NextFunction extends Express.NextFunction {}\n }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC","sourcesContent":["export * from \"./PlatformExpressApplication\";\nexport * from \"./PlatformExpressHandler\";\nexport * from \"./PlatformExpressResponse\";\nexport * from \"./PlatformExpressRequest\";\nexport * from \"./PlatformExpressRouter\";\n"]}
|