@tsed/platform-express 8.0.0-rc.4 → 8.0.0-rc.6
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.
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
var PlatformExpress_1;
|
|
2
|
-
import { __decorate, __metadata } from "tslib";
|
|
3
1
|
import { catchAsyncError, Env, isFunction } from "@tsed/core";
|
|
4
|
-
import {
|
|
2
|
+
import { constant, inject, logger, runInContext } from "@tsed/di";
|
|
5
3
|
import { PlatformExceptions } from "@tsed/platform-exceptions";
|
|
6
|
-
import { createContext, PlatformAdapter, PlatformBuilder, PlatformHandler
|
|
4
|
+
import { adapter, application, createContext, PlatformAdapter, PlatformBuilder, PlatformHandler } from "@tsed/platform-http";
|
|
7
5
|
import { PlatformHandlerType } from "@tsed/platform-router";
|
|
8
6
|
import Express from "express";
|
|
9
7
|
import { promisify } from "util";
|
|
@@ -18,12 +16,11 @@ function callNext(next, metadata, $ctx) {
|
|
|
18
16
|
* @platform
|
|
19
17
|
* @express
|
|
20
18
|
*/
|
|
21
|
-
|
|
22
|
-
static { PlatformExpress_1 = this; }
|
|
19
|
+
export class PlatformExpress extends PlatformAdapter {
|
|
23
20
|
static { this.NAME = "express"; }
|
|
24
21
|
#multer;
|
|
25
|
-
constructor(
|
|
26
|
-
super(
|
|
22
|
+
constructor() {
|
|
23
|
+
super();
|
|
27
24
|
this.providers = [
|
|
28
25
|
{
|
|
29
26
|
provide: PlatformHandler,
|
|
@@ -40,7 +37,7 @@ let PlatformExpress = class PlatformExpress extends PlatformAdapter {
|
|
|
40
37
|
static create(module, settings = {}) {
|
|
41
38
|
return PlatformBuilder.create(module, {
|
|
42
39
|
...settings,
|
|
43
|
-
adapter:
|
|
40
|
+
adapter: PlatformExpress
|
|
44
41
|
});
|
|
45
42
|
}
|
|
46
43
|
/**
|
|
@@ -51,19 +48,18 @@ let PlatformExpress = class PlatformExpress extends PlatformAdapter {
|
|
|
51
48
|
static bootstrap(module, settings = {}) {
|
|
52
49
|
return PlatformBuilder.bootstrap(module, {
|
|
53
50
|
...settings,
|
|
54
|
-
adapter:
|
|
51
|
+
adapter: PlatformExpress
|
|
55
52
|
});
|
|
56
53
|
}
|
|
57
54
|
async beforeLoadRoutes() {
|
|
58
|
-
const injector = this.injector;
|
|
59
55
|
const { app } = this;
|
|
60
56
|
// disable x-powered-by header
|
|
61
|
-
|
|
57
|
+
constant("env") === Env.PROD && app.getApp().disable("x-powered-by");
|
|
62
58
|
await this.configureViewsEngine();
|
|
63
59
|
}
|
|
64
60
|
afterLoadRoutes() {
|
|
65
61
|
const { app } = this;
|
|
66
|
-
const platformExceptions =
|
|
62
|
+
const platformExceptions = inject(PlatformExceptions);
|
|
67
63
|
// NOT FOUND
|
|
68
64
|
app.use((req, res, next) => {
|
|
69
65
|
const { $ctx } = req;
|
|
@@ -109,8 +105,8 @@ let PlatformExpress = class PlatformExpress extends PlatformAdapter {
|
|
|
109
105
|
};
|
|
110
106
|
}
|
|
111
107
|
useContext() {
|
|
112
|
-
const
|
|
113
|
-
const
|
|
108
|
+
const invoke = createContext();
|
|
109
|
+
const app = application();
|
|
114
110
|
app.use(async (request, response, next) => {
|
|
115
111
|
const $ctx = invoke({ request, response });
|
|
116
112
|
await $ctx.start();
|
|
@@ -120,7 +116,7 @@ let PlatformExpress = class PlatformExpress extends PlatformAdapter {
|
|
|
120
116
|
return this;
|
|
121
117
|
}
|
|
122
118
|
createApp() {
|
|
123
|
-
const app =
|
|
119
|
+
const app = constant("express.app") || Express();
|
|
124
120
|
return {
|
|
125
121
|
app,
|
|
126
122
|
callback: () => app
|
|
@@ -150,7 +146,7 @@ let PlatformExpress = class PlatformExpress extends PlatformAdapter {
|
|
|
150
146
|
return staticsMiddleware(root, props);
|
|
151
147
|
}
|
|
152
148
|
bodyParser(type, additionalOptions = {}) {
|
|
153
|
-
const opts =
|
|
149
|
+
const opts = constant(`express.bodyParser.${type}`);
|
|
154
150
|
let parser = Express[type];
|
|
155
151
|
let options = {};
|
|
156
152
|
if (isFunction(opts)) {
|
|
@@ -161,7 +157,7 @@ let PlatformExpress = class PlatformExpress extends PlatformAdapter {
|
|
|
161
157
|
options.extended = true;
|
|
162
158
|
}
|
|
163
159
|
options.verify = (req, _res, buffer) => {
|
|
164
|
-
const rawBody =
|
|
160
|
+
const rawBody = constant(`rawBody`);
|
|
165
161
|
if (rawBody) {
|
|
166
162
|
req.rawBody = buffer;
|
|
167
163
|
}
|
|
@@ -170,13 +166,12 @@ let PlatformExpress = class PlatformExpress extends PlatformAdapter {
|
|
|
170
166
|
return parser({ ...options, ...additionalOptions });
|
|
171
167
|
}
|
|
172
168
|
async configureViewsEngine() {
|
|
173
|
-
const injector = this.injector;
|
|
174
169
|
const { app } = this;
|
|
175
170
|
try {
|
|
176
|
-
const { exists, disabled } =
|
|
171
|
+
const { exists, disabled } = constant("views") || {};
|
|
177
172
|
if (exists && !disabled) {
|
|
178
173
|
const { PlatformViews } = await import("@tsed/platform-views");
|
|
179
|
-
const platformViews =
|
|
174
|
+
const platformViews = inject(PlatformViews);
|
|
180
175
|
const express = app.getApp();
|
|
181
176
|
platformViews.getEngines().forEach(({ extension, engine }) => {
|
|
182
177
|
express.engine(extension, engine.render);
|
|
@@ -187,17 +182,13 @@ let PlatformExpress = class PlatformExpress extends PlatformAdapter {
|
|
|
187
182
|
}
|
|
188
183
|
catch (error) {
|
|
189
184
|
// istanbul ignore next
|
|
190
|
-
|
|
185
|
+
logger().warn({
|
|
191
186
|
event: "PLATFORM_VIEWS_ERROR",
|
|
192
187
|
message: "Unable to configure the PlatformViews service on your environment.",
|
|
193
188
|
error
|
|
194
189
|
});
|
|
195
190
|
}
|
|
196
191
|
}
|
|
197
|
-
}
|
|
198
|
-
PlatformExpress
|
|
199
|
-
PlatformProvider(),
|
|
200
|
-
__metadata("design:paramtypes", [InjectorService])
|
|
201
|
-
], PlatformExpress);
|
|
202
|
-
export { PlatformExpress };
|
|
192
|
+
}
|
|
193
|
+
adapter(PlatformExpress);
|
|
203
194
|
//# sourceMappingURL=PlatformExpress.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlatformExpress.js","sourceRoot":"","sources":["../../../src/components/PlatformExpress.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PlatformExpress.js","sourceRoot":"","sources":["../../../src/components/PlatformExpress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAE,GAAG,EAAE,UAAU,EAAO,MAAM,YAAY,CAAC;AAClE,OAAO,EAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAC,MAAM,UAAU,CAAC;AAChE,OAAO,EAAC,kBAAkB,EAAC,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EACL,OAAO,EACP,WAAW,EACX,aAAa,EACb,eAAe,EACf,eAAe,EAEf,eAAe,EAIhB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAA0B,mBAAmB,EAAgB,MAAM,uBAAuB,CAAC;AAElG,OAAO,OAAO,MAAM,SAAS,CAAC;AAG9B,OAAO,EAAC,SAAS,EAAC,MAAM,MAAM,CAAC;AAG/B,OAAO,EAAC,iBAAiB,EAAC,MAAM,qCAAqC,CAAC;AACtE,OAAO,EAAC,sBAAsB,EAAC,MAAM,uCAAuC,CAAC;AAS7E,SAAS,QAAQ,CAAC,IAAS,EAAE,QAAiC,EAAE,IAAqB;IACnF,IAAI,QAAQ,CAAC,IAAI,KAAK,mBAAmB,CAAC,WAAW,EAAE,CAAC;QACtD,OAAO,IAAI,IAAI,IAAI,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC1E,CAAC;AACH,CAAC;AAiBD;;;GAGG;AACH,MAAM,OAAO,eAAgB,SAAQ,eAAoC;aACvD,SAAI,GAAG,SAAS,AAAZ,CAAa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;gBAC7C,MAAM,OAAO,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC;gBAE7B,aAAa,CAAC,UAAU,EAAE,CAAC,OAAO,CAAC,CAAC,EAAC,SAAS,EAAE,MAAM,EAAC,EAAE,EAAE;oBACzD,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,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;YACjE,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,uBAAuB;YACvB,MAAM,EAAE,CAAC,IAAI,CAAC;gBACZ,KAAK,EAAE,sBAAsB;gBAC7B,OAAO,EAAE,oEAAoE;gBAC7E,KAAK;aACN,CAAC,CAAC;QACL,CAAC;IACH,CAAC;;AAGH,OAAO,CAAC,eAAe,CAAC,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Type } from "@tsed/core";
|
|
2
|
-
import { InjectorService } from "@tsed/di";
|
|
3
2
|
import { PlatformAdapter, PlatformBuilder, PlatformContext, PlatformHandler, PlatformMulter, PlatformMulterSettings, PlatformStaticsOptions } from "@tsed/platform-http";
|
|
4
3
|
import { PlatformHandlerMetadata, PlatformLayer } from "@tsed/platform-router";
|
|
5
4
|
import Express from "express";
|
|
@@ -34,7 +33,7 @@ export declare class PlatformExpress extends PlatformAdapter<Express.Application
|
|
|
34
33
|
provide: typeof PlatformHandler;
|
|
35
34
|
useClass: typeof PlatformExpressHandler;
|
|
36
35
|
}[];
|
|
37
|
-
constructor(
|
|
36
|
+
constructor();
|
|
38
37
|
/**
|
|
39
38
|
* Create new serverless application. In this mode, the component scan are disabled.
|
|
40
39
|
* @param module
|
|
@@ -53,8 +52,8 @@ export declare class PlatformExpress extends PlatformAdapter<Express.Application
|
|
|
53
52
|
mapHandler(handler: Function, metadata: PlatformHandlerMetadata): (error: unknown, req: any, res: any, next: any) => Promise<Promise<any>>;
|
|
54
53
|
useContext(): this;
|
|
55
54
|
createApp(): {
|
|
56
|
-
app:
|
|
57
|
-
callback: () =>
|
|
55
|
+
app: Express.Express;
|
|
56
|
+
callback: () => Express.Express;
|
|
58
57
|
};
|
|
59
58
|
multipart(options: PlatformMulterSettings): PlatformMulter;
|
|
60
59
|
statics(endpoint: string, options: PlatformStaticsOptions): (request: any, response: any, next: any) => void;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@tsed/platform-express",
|
|
3
3
|
"description": "A TypeScript Framework on top of Express",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "8.0.0-rc.
|
|
5
|
+
"version": "8.0.0-rc.6",
|
|
6
6
|
"source": "./src/index.ts",
|
|
7
7
|
"main": "./lib/esm/index.js",
|
|
8
8
|
"module": "./lib/esm/index.js",
|
|
@@ -58,13 +58,13 @@
|
|
|
58
58
|
"tslib": "2.7.0"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@tsed/barrels": "8.0.0-rc.
|
|
62
|
-
"@tsed/core": "8.0.0-rc.
|
|
63
|
-
"@tsed/di": "8.0.0-rc.
|
|
64
|
-
"@tsed/platform-http": "8.0.0-rc.
|
|
65
|
-
"@tsed/platform-test-sdk": "8.0.0-rc.
|
|
66
|
-
"@tsed/platform-views": "8.0.0-rc.
|
|
67
|
-
"@tsed/typescript": "8.0.0-rc.
|
|
61
|
+
"@tsed/barrels": "8.0.0-rc.6",
|
|
62
|
+
"@tsed/core": "8.0.0-rc.6",
|
|
63
|
+
"@tsed/di": "8.0.0-rc.6",
|
|
64
|
+
"@tsed/platform-http": "8.0.0-rc.6",
|
|
65
|
+
"@tsed/platform-test-sdk": "8.0.0-rc.6",
|
|
66
|
+
"@tsed/platform-views": "8.0.0-rc.6",
|
|
67
|
+
"@tsed/typescript": "8.0.0-rc.6",
|
|
68
68
|
"@types/body-parser": "1.19.5",
|
|
69
69
|
"@types/compression": "1.7.5",
|
|
70
70
|
"@types/cookie-parser": "1.4.7",
|
|
@@ -84,14 +84,14 @@
|
|
|
84
84
|
"vitest": "2.1.2"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
|
-
"@tsed/core": "8.0.0-rc.
|
|
88
|
-
"@tsed/di": "8.0.0-rc.
|
|
89
|
-
"@tsed/json-mapper": "8.0.0-rc.
|
|
87
|
+
"@tsed/core": "8.0.0-rc.6",
|
|
88
|
+
"@tsed/di": "8.0.0-rc.6",
|
|
89
|
+
"@tsed/json-mapper": "8.0.0-rc.6",
|
|
90
90
|
"@tsed/logger": ">=6.7.5",
|
|
91
|
-
"@tsed/openspec": "8.0.0-rc.
|
|
92
|
-
"@tsed/platform-http": "8.0.0-rc.
|
|
93
|
-
"@tsed/platform-views": "8.0.0-rc.
|
|
94
|
-
"@tsed/schema": "8.0.0-rc.
|
|
91
|
+
"@tsed/openspec": "8.0.0-rc.6",
|
|
92
|
+
"@tsed/platform-http": "8.0.0-rc.6",
|
|
93
|
+
"@tsed/platform-views": "8.0.0-rc.6",
|
|
94
|
+
"@tsed/schema": "8.0.0-rc.6",
|
|
95
95
|
"@types/multer": "^1.4.5",
|
|
96
96
|
"body-parser": "^1.19.0",
|
|
97
97
|
"cross-env": "7.0.3",
|
package/vitest.config.mts
CHANGED