@tsed/common 6.87.2 → 6.88.0
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/decorators/index.d.ts +1 -0
- package/lib/decorators/method/view.d.ts +25 -0
- package/lib/index.d.ts +0 -1
- package/lib/index.js +54 -23
- package/lib/index.js.map +1 -1
- package/lib/index.modern.js +54 -17
- package/lib/index.modern.js.map +1 -1
- package/lib/services/PlatformRequest.d.ts +2 -1
- package/lib/services/PlatformResponse.d.ts +4 -4
- package/package.json +15 -15
|
@@ -18,12 +18,13 @@ declare global {
|
|
|
18
18
|
export declare class PlatformRequest<T extends {
|
|
19
19
|
[key: string]: any;
|
|
20
20
|
} = any> {
|
|
21
|
+
protected $ctx: PlatformContext;
|
|
21
22
|
raw: T;
|
|
22
23
|
/**
|
|
23
24
|
* The current @@PlatformResponse@@.
|
|
24
25
|
*/
|
|
25
26
|
response: PlatformResponse;
|
|
26
|
-
constructor({ request }: IncomingEvent);
|
|
27
|
+
constructor({ request }: IncomingEvent, $ctx: PlatformContext);
|
|
27
28
|
get secure(): boolean;
|
|
28
29
|
get host(): string;
|
|
29
30
|
get protocol(): string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import { PlatformViews } from "@tsed/platform-views";
|
|
3
2
|
import { ServerResponse } from "http";
|
|
4
3
|
import { IncomingEvent } from "../interfaces/IncomingEvent";
|
|
5
4
|
import type { PlatformRequest } from "./PlatformRequest";
|
|
5
|
+
import type { PlatformContext } from "../domain/PlatformContext";
|
|
6
6
|
declare global {
|
|
7
7
|
namespace TsED {
|
|
8
8
|
interface Response {
|
|
@@ -15,14 +15,14 @@ export declare type HeaderValue = Array<boolean | number | string> | boolean | n
|
|
|
15
15
|
* @platform
|
|
16
16
|
*/
|
|
17
17
|
export declare class PlatformResponse<T extends Record<string, any> = any> {
|
|
18
|
-
|
|
18
|
+
protected $ctx: PlatformContext;
|
|
19
19
|
/**
|
|
20
20
|
* The current @@PlatformRequest@@.
|
|
21
21
|
*/
|
|
22
22
|
request: PlatformRequest;
|
|
23
23
|
data: any;
|
|
24
24
|
raw: T;
|
|
25
|
-
constructor({ response }: IncomingEvent);
|
|
25
|
+
constructor({ response }: IncomingEvent, $ctx: PlatformContext);
|
|
26
26
|
/**
|
|
27
27
|
* Get the current statusCode
|
|
28
28
|
*/
|
|
@@ -139,7 +139,7 @@ export declare class PlatformResponse<T extends Record<string, any> = any> {
|
|
|
139
139
|
* @param path
|
|
140
140
|
* @param options
|
|
141
141
|
*/
|
|
142
|
-
render(path: string, options?: any): Promise<
|
|
142
|
+
render(path: string, options?: any): Promise<any>;
|
|
143
143
|
/**
|
|
144
144
|
* Send any data to your consumer.
|
|
145
145
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/common",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.88.0",
|
|
4
4
|
"description": "A TypeScript Framework on top of Express",
|
|
5
5
|
"private": false,
|
|
6
6
|
"source": "./src/index.ts",
|
|
@@ -55,22 +55,22 @@
|
|
|
55
55
|
"build": "microbundle --target node --no-compress --format modern,cjs --tsconfig ./tsconfig.compile.json"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@tsed/components-scan": "6.
|
|
59
|
-
"@tsed/core": "6.
|
|
60
|
-
"@tsed/di": "6.
|
|
61
|
-
"@tsed/exceptions": "6.
|
|
62
|
-
"@tsed/json-mapper": "6.
|
|
58
|
+
"@tsed/components-scan": "6.88.0",
|
|
59
|
+
"@tsed/core": "6.88.0",
|
|
60
|
+
"@tsed/di": "6.88.0",
|
|
61
|
+
"@tsed/exceptions": "6.88.0",
|
|
62
|
+
"@tsed/json-mapper": "6.88.0",
|
|
63
63
|
"@tsed/logger": "^6.0.0",
|
|
64
64
|
"@tsed/logger-file": "^6.0.0",
|
|
65
|
-
"@tsed/perf": "6.
|
|
66
|
-
"@tsed/platform-cache": "6.
|
|
67
|
-
"@tsed/platform-exceptions": "6.
|
|
68
|
-
"@tsed/platform-log-middleware": "6.
|
|
69
|
-
"@tsed/platform-middlewares": "6.
|
|
70
|
-
"@tsed/platform-params": "6.
|
|
71
|
-
"@tsed/platform-response-filter": "6.
|
|
72
|
-
"@tsed/platform-views": "6.
|
|
73
|
-
"@tsed/schema": "6.
|
|
65
|
+
"@tsed/perf": "6.88.0",
|
|
66
|
+
"@tsed/platform-cache": "6.88.0",
|
|
67
|
+
"@tsed/platform-exceptions": "6.88.0",
|
|
68
|
+
"@tsed/platform-log-middleware": "6.88.0",
|
|
69
|
+
"@tsed/platform-middlewares": "6.88.0",
|
|
70
|
+
"@tsed/platform-params": "6.88.0",
|
|
71
|
+
"@tsed/platform-response-filter": "6.88.0",
|
|
72
|
+
"@tsed/platform-views": "6.88.0",
|
|
73
|
+
"@tsed/schema": "6.88.0",
|
|
74
74
|
"@types/json-schema": "7.0.7",
|
|
75
75
|
"json-schema": "^0.2.3",
|
|
76
76
|
"on-finished": "2.3.0",
|