@tsed/platform-http 8.0.0-beta.10 → 8.0.0-beta.11
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/esm/common/decorators/multer/multerFileSize.js +1 -1
- package/lib/esm/common/decorators/multer/multerOptions.js +1 -1
- package/lib/esm/common/decorators/multer/multipartFile.js +1 -1
- package/lib/esm/common/domain/PlatformContext.js +3 -3
- package/lib/esm/common/domain/PlatformContext.js.map +1 -1
- package/lib/esm/common/utils/ensureContext.js +2 -2
- package/lib/esm/common/utils/ensureContext.js.map +1 -1
- package/lib/types/common/decorators/multer/multerFileSize.d.ts +1 -1
- package/lib/types/common/decorators/multer/multerOptions.d.ts +1 -1
- package/lib/types/common/decorators/multer/multipartFile.d.ts +1 -1
- package/package.json +14 -14
|
@@ -20,7 +20,7 @@ import { MulterOptions } from "./multerOptions.js";
|
|
|
20
20
|
* }
|
|
21
21
|
* ```
|
|
22
22
|
*
|
|
23
|
-
* > See the tutorial on the [multer configuration](/
|
|
23
|
+
* > See the tutorial on the [multer configuration](/docs/upload-files.md).
|
|
24
24
|
* @param fileSize
|
|
25
25
|
* @returns {(target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor}
|
|
26
26
|
* @decorator
|
|
@@ -34,7 +34,7 @@ import { PlatformMulterMiddleware } from "../../middlewares/PlatformMulterMiddle
|
|
|
34
34
|
* }
|
|
35
35
|
* ```
|
|
36
36
|
*
|
|
37
|
-
* See the tutorial on the [multer configuration](/
|
|
37
|
+
* See the tutorial on the [multer configuration](/docs/upload-files.md).
|
|
38
38
|
*
|
|
39
39
|
* @param {multer.Options} options
|
|
40
40
|
* @returns {(target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DIContext } from "@tsed/di";
|
|
1
|
+
import { $emit, DIContext } from "@tsed/di";
|
|
2
2
|
import { PlatformApplication } from "../services/PlatformApplication.js";
|
|
3
3
|
import { PlatformRequest } from "../services/PlatformRequest.js";
|
|
4
4
|
import { PlatformResponse } from "../services/PlatformResponse.js";
|
|
@@ -23,10 +23,10 @@ export class PlatformContext extends DIContext {
|
|
|
23
23
|
return this.injector.get(PlatformApplication);
|
|
24
24
|
}
|
|
25
25
|
start() {
|
|
26
|
-
return
|
|
26
|
+
return $emit("$onRequest", this);
|
|
27
27
|
}
|
|
28
28
|
async finish() {
|
|
29
|
-
await Promise.all([
|
|
29
|
+
await Promise.all([$emit("$onResponse", this), this.destroy()]);
|
|
30
30
|
this.#isFinished = true;
|
|
31
31
|
}
|
|
32
32
|
isFinished() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlatformContext.js","sourceRoot":"","sources":["../../../../src/common/domain/PlatformContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAmB,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"PlatformContext.js","sourceRoot":"","sources":["../../../../src/common/domain/PlatformContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAE,SAAS,EAAmB,MAAM,UAAU,CAAC;AAM5D,OAAO,EAAC,mBAAmB,EAAC,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAC,eAAe,EAAC,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAC,gBAAgB,EAAC,MAAM,iCAAiC,CAAC;AAcjE,MAAM,OAAO,eAGX,SAAQ,SAAS;IAgCjB,WAAW,CAAkB;IAE7B,YAAY,OAA+B;QACzC,KAAK,CAAC,OAAO,CAAC,CAAC;QAlCR,aAAQ,GAAW,KAAK,CAAC;QA+BlC,gBAAW,GAAY,KAAK,CAAC;QAK3B,OAAO,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;QAEvD,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;QAC3B,IAAI,CAAC,Q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AQ,CAAC,WAAW,EAAO,CAAC;IAC1C,CAAC;IAED;;OAEG;IACH,MAAM;QACJ,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;IAC/B,CAAC;IAED;;OAEG;IACH,MAAM;QACJ,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;IAChC,CAAC;IAED;;OAEG;IACH,MAAM;QACJ,OAAO,IAAI,CAAC,GAAG,CAAC,MAAM,EAAS,CAAC;IAClC,CAAC;CACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getContext } from "@tsed/di";
|
|
1
|
+
import { getContext, runInContext } from "@tsed/di";
|
|
2
2
|
export function ensureContext(request, cb, fallback) {
|
|
3
3
|
const $ctx = getContext();
|
|
4
4
|
if ($ctx) {
|
|
@@ -7,6 +7,6 @@ export function ensureContext(request, cb, fallback) {
|
|
|
7
7
|
if (!request?.$ctx && fallback) {
|
|
8
8
|
return fallback();
|
|
9
9
|
}
|
|
10
|
-
return request.$ctx
|
|
10
|
+
return runInContext(request.$ctx, () => cb(request.$ctx));
|
|
11
11
|
}
|
|
12
12
|
//# sourceMappingURL=ensureContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ensureContext.js","sourceRoot":"","sources":["../../../../src/common/utils/ensureContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"ensureContext.js","sourceRoot":"","sources":["../../../../src/common/utils/ensureContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,YAAY,EAAC,MAAM,UAAU,CAAC;AAIlD,MAAM,UAAU,aAAa,CAAC,OAAY,EAAE,EAAkC,EAAE,QAAqB;IACnG,MAAM,IAAI,GAAG,UAAU,EAAmB,CAAC;IAE3C,IAAI,IAAI,EAAE,CAAC;QACT,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC;IAClB,CAAC;IAED,IAAI,CAAC,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,CAAC;QAC/B,OAAO,QAAQ,EAAE,CAAC;IACpB,CAAC;IAED,OAAO,YAAY,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;AAC5D,CAAC"}
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* }
|
|
20
20
|
* ```
|
|
21
21
|
*
|
|
22
|
-
* > See the tutorial on the [multer configuration](/
|
|
22
|
+
* > See the tutorial on the [multer configuration](/docs/upload-files.md).
|
|
23
23
|
* @param fileSize
|
|
24
24
|
* @returns {(target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor}
|
|
25
25
|
* @decorator
|
|
@@ -33,7 +33,7 @@ import { PlatformMulterSettings } from "../../config/interfaces/PlatformMulterSe
|
|
|
33
33
|
* }
|
|
34
34
|
* ```
|
|
35
35
|
*
|
|
36
|
-
* See the tutorial on the [multer configuration](/
|
|
36
|
+
* See the tutorial on the [multer configuration](/docs/upload-files.md).
|
|
37
37
|
*
|
|
38
38
|
* @param {multer.Options} options
|
|
39
39
|
* @returns {(target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor}
|
|
@@ -36,7 +36,7 @@ import { PlatformMulterFile } from "../../config/interfaces/PlatformMulterSettin
|
|
|
36
36
|
* }
|
|
37
37
|
* ```
|
|
38
38
|
*
|
|
39
|
-
* > See the tutorial on the [multer configuration](/
|
|
39
|
+
* > See the tutorial on the [multer configuration](/docs/upload-files.md).
|
|
40
40
|
*
|
|
41
41
|
* @param name
|
|
42
42
|
* @param maxCount
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@tsed/platform-http",
|
|
3
3
|
"description": "A TypeScript Framework on top of Express",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "8.0.0-beta.
|
|
5
|
+
"version": "8.0.0-beta.11",
|
|
6
6
|
"source": "./src/common/index.ts",
|
|
7
7
|
"main": "./lib/esm/common/index.js",
|
|
8
8
|
"module": "./lib/esm/common/index.js",
|
|
@@ -68,27 +68,27 @@
|
|
|
68
68
|
}
|
|
69
69
|
],
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"@tsed/core": "8.0.0-beta.
|
|
72
|
-
"@tsed/di": "8.0.0-beta.
|
|
73
|
-
"@tsed/exceptions": "8.0.0-beta.
|
|
74
|
-
"@tsed/json-mapper": "8.0.0-beta.
|
|
71
|
+
"@tsed/core": "8.0.0-beta.11",
|
|
72
|
+
"@tsed/di": "8.0.0-beta.11",
|
|
73
|
+
"@tsed/exceptions": "8.0.0-beta.11",
|
|
74
|
+
"@tsed/json-mapper": "8.0.0-beta.11",
|
|
75
75
|
"@tsed/logger": "^6.7.8",
|
|
76
76
|
"@tsed/logger-file": "^6.7.8",
|
|
77
|
-
"@tsed/platform-exceptions": "8.0.0-beta.
|
|
78
|
-
"@tsed/platform-params": "8.0.0-beta.
|
|
79
|
-
"@tsed/platform-response-filter": "8.0.0-beta.
|
|
80
|
-
"@tsed/platform-router": "8.0.0-beta.
|
|
81
|
-
"@tsed/platform-views": "8.0.0-beta.
|
|
82
|
-
"@tsed/schema": "8.0.0-beta.
|
|
77
|
+
"@tsed/platform-exceptions": "8.0.0-beta.11",
|
|
78
|
+
"@tsed/platform-params": "8.0.0-beta.11",
|
|
79
|
+
"@tsed/platform-response-filter": "8.0.0-beta.11",
|
|
80
|
+
"@tsed/platform-router": "8.0.0-beta.11",
|
|
81
|
+
"@tsed/platform-views": "8.0.0-beta.11",
|
|
82
|
+
"@tsed/schema": "8.0.0-beta.11",
|
|
83
83
|
"@types/json-schema": "7.0.15",
|
|
84
84
|
"accepts": "^1.3.8",
|
|
85
85
|
"tslib": "2.7.0",
|
|
86
86
|
"uuid": "10.0.0"
|
|
87
87
|
},
|
|
88
88
|
"devDependencies": {
|
|
89
|
-
"@tsed/barrels": "8.0.0-beta.
|
|
90
|
-
"@tsed/engines": "8.0.0-beta.
|
|
91
|
-
"@tsed/typescript": "8.0.0-beta.
|
|
89
|
+
"@tsed/barrels": "8.0.0-beta.11",
|
|
90
|
+
"@tsed/engines": "8.0.0-beta.11",
|
|
91
|
+
"@tsed/typescript": "8.0.0-beta.11",
|
|
92
92
|
"cross-env": "7.0.3",
|
|
93
93
|
"eslint": "9.12.0",
|
|
94
94
|
"typescript": "5.4.5",
|