@tsed/platform-koa 8.33.0 → 8.35.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.
@@ -1,19 +1,19 @@
1
1
  import "@tsed/platform-multer/koa";
2
- import KoaRouter from "@koa/router";
2
+ import Koa from "koa";
3
+ import { PlatformAdapter, PlatformBuilder, PlatformHandler, PlatformRequest, PlatformResponse, adapter, application, createContext } from "@tsed/platform-http";
4
+ import { PlatformHandlerType } from "@tsed/platform-router";
3
5
  import { catchAsyncError, isFunction } from "@tsed/core";
4
6
  import { constant, inject, runInContext } from "@tsed/di";
5
- import { PlatformExceptions } from "@tsed/platform-exceptions";
6
- import { adapter, application, createContext, PlatformAdapter, PlatformBuilder, PlatformHandler, PlatformRequest, PlatformResponse } from "@tsed/platform-http";
7
- import { PlatformHandlerType } from "@tsed/platform-router";
8
- import Koa from "koa";
9
7
  import koaBodyParser from "koa-bodyparser";
10
- // @ts-ignore
11
- import koaQs from "koa-qs";
12
- import { staticsMiddleware } from "../middlewares/staticsMiddleware.js";
8
+ import KoaRouter from "@koa/router";
9
+ import { PlatformExceptions } from "@tsed/platform-exceptions";
13
10
  import { PlatformKoaHandler } from "../services/PlatformKoaHandler.js";
14
11
  import { PlatformKoaRequest } from "../services/PlatformKoaRequest.js";
15
12
  import { PlatformKoaResponse } from "../services/PlatformKoaResponse.js";
16
13
  import { convertPath } from "../utils/convertPath.js";
14
+ // @ts-ignore
15
+ import koaQs from "koa-qs";
16
+ import { staticsMiddleware } from "../middlewares/staticsMiddleware.js";
17
17
  const koaRouterProto = KoaRouter.prototype;
18
18
  koaRouterProto.$$match = koaRouterProto.match;
19
19
  koaRouterProto.match = function match(...args) {
@@ -1,8 +1,8 @@
1
1
  import "@tsed/platform-multer/koa";
2
- import { Type } from "@tsed/core";
2
+ import Koa from "koa";
3
3
  import { PlatformAdapter, PlatformBuilder, PlatformStaticsOptions } from "@tsed/platform-http";
4
4
  import { PlatformHandlerMetadata, PlatformLayer } from "@tsed/platform-router";
5
- import Koa from "koa";
5
+ import { Type } from "@tsed/core";
6
6
  import send from "koa-send";
7
7
  declare global {
8
8
  namespace TsED {
@@ -1,6 +1,6 @@
1
- import type { RouterOptions } from "@koa/router";
2
1
  import type { Middleware } from "koa";
3
2
  import type { Options } from "koa-bodyparser";
3
+ import type { RouterOptions } from "@koa/router";
4
4
  export interface PlatformKoaSettings {
5
5
  /**
6
6
  * Koa router options
@@ -1,6 +1,6 @@
1
- import { ServerResponse } from "node:http";
2
- import { PlatformResponse } from "@tsed/platform-http";
3
1
  import Koa from "koa";
2
+ import { PlatformResponse } from "@tsed/platform-http";
3
+ import { ServerResponse } from "node:http";
4
4
  declare global {
5
5
  namespace TsED {
6
6
  interface Response extends Koa.Response {
package/package.json CHANGED
@@ -1,9 +1,38 @@
1
1
  {
2
2
  "name": "@tsed/platform-koa",
3
+ "version": "8.35.0",
3
4
  "description": "Koa package for Ts.ED framework",
4
- "type": "module",
5
- "version": "8.33.0",
5
+ "keywords": [
6
+ "Controller",
7
+ "Decorator",
8
+ "ES2015",
9
+ "ES6",
10
+ "Inject",
11
+ "Koa",
12
+ "TypeScript",
13
+ "api",
14
+ "decorator",
15
+ "decorators",
16
+ "di",
17
+ "ioc",
18
+ "koa",
19
+ "mvc",
20
+ "rest",
21
+ "server",
22
+ "swagger",
23
+ "swagger ui",
24
+ "typescript",
25
+ "validation"
26
+ ],
27
+ "homepage": "https://github.com/tsedio/tsed/tree/production/packages/platform/platform-koa",
28
+ "bugs": {
29
+ "url": "https://github.com/tsedio/tsed/issues"
30
+ },
31
+ "license": "MIT",
32
+ "author": "Romain Lenzotti",
33
+ "repository": "https://github.com/tsedio/tsed",
6
34
  "source": "./src/index.ts",
35
+ "type": "module",
7
36
  "main": "./lib/esm/index.js",
8
37
  "module": "./lib/esm/index.js",
9
38
  "typings": "./lib/types/index.d.ts",
@@ -23,43 +52,21 @@
23
52
  "build:ts": "tsc --build tsconfig.esm.json",
24
53
  "test:ci": "vitest run --coverage.thresholds.autoUpdate=true"
25
54
  },
26
- "keywords": [
27
- "Koa",
28
- "TypeScript",
29
- "typescript",
30
- "Decorator",
31
- "decorators",
32
- "decorator",
33
- "koa",
34
- "Controller",
35
- "Inject",
36
- "ioc",
37
- "di",
38
- "mvc",
39
- "swagger",
40
- "swagger ui",
41
- "ES2015",
42
- "ES6",
43
- "server",
44
- "rest",
45
- "api",
46
- "validation"
47
- ],
48
- "author": "Romain Lenzotti",
49
- "license": "MIT",
50
- "bugs": {
51
- "url": "https://github.com/tsedio/tsed/issues"
55
+ "dependencies": {
56
+ "@koa/router": "^13.1.0",
57
+ "encodeurl": "^2.0.0",
58
+ "koa-send": "5.0.1",
59
+ "multer": "^2.0.0",
60
+ "tslib": ">=2.7.0"
52
61
  },
53
- "homepage": "https://github.com/tsedio/tsed/tree/production/packages/platform/platform-koa",
54
- "repository": "https://github.com/tsedio/tsed",
55
62
  "devDependencies": {
56
63
  "@koa/cors": "5.0.0",
57
- "@tsed/barrels": "8.33.0",
58
- "@tsed/core": "8.33.0",
59
- "@tsed/di": "8.33.0",
60
- "@tsed/platform-http": "8.33.0",
61
- "@tsed/platform-test-sdk": "8.33.0",
62
- "@tsed/typescript": "8.33.0",
64
+ "@tsed/barrels": "8.35.0",
65
+ "@tsed/core": "8.35.0",
66
+ "@tsed/di": "8.35.0",
67
+ "@tsed/platform-http": "8.35.0",
68
+ "@tsed/platform-test-sdk": "8.35.0",
69
+ "@tsed/typescript": "8.35.0",
63
70
  "@types/koa": "2.15.0",
64
71
  "@types/koa-bodyparser": "4.3.12",
65
72
  "@types/koa-compose": "3.2.8",
@@ -69,7 +76,6 @@
69
76
  "@types/koa-send": "4.1.6",
70
77
  "@types/koa-session": "6.4.5",
71
78
  "@types/koa__router": "12.0.4",
72
- "eslint": "9.12.0",
73
79
  "koa": "3.1.2",
74
80
  "koa-bodyparser": "4.4.1",
75
81
  "koa-compress": "5.1.1",
@@ -79,13 +85,6 @@
79
85
  "typescript": "6.0.2",
80
86
  "vitest": "4.1.4"
81
87
  },
82
- "dependencies": {
83
- "@koa/router": "^13.1.0",
84
- "encodeurl": "^2.0.0",
85
- "koa-send": "5.0.1",
86
- "multer": "^2.0.0",
87
- "tslib": ">=2.7.0"
88
- },
89
88
  "peerDependencies": {
90
89
  "@tsed/core": ">=8.0.0",
91
90
  "@tsed/di": ">=8.0.0",