@tsed/platform-fastify 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.
- package/lib/esm/components/PlatformFastify.js +6 -6
- package/lib/types/components/PlatformFastify.d.ts +4 -4
- package/lib/types/interfaces/interfaces.d.ts +1 -1
- package/lib/types/services/PlatformFastifyRequest.d.ts +1 -1
- package/lib/types/services/PlatformFastifyResponse.d.ts +1 -1
- package/package.json +34 -34
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import "@tsed/platform-multer/fastify";
|
|
2
2
|
import * as Http from "node:http";
|
|
3
3
|
import * as Https from "node:https";
|
|
4
|
-
import
|
|
5
|
-
import fastifyStatics from "@fastify/static";
|
|
4
|
+
import { $alter, $asyncEmit } from "@tsed/hooks";
|
|
6
5
|
import { isFunction, isString } from "@tsed/core";
|
|
6
|
+
import Fastify from "fastify";
|
|
7
|
+
import { PlatformAdapter, PlatformBuilder, PlatformRequest, PlatformResponse, adapter, createContext, createServer } from "@tsed/platform-http";
|
|
8
|
+
import { PlatformHandlerType } from "@tsed/platform-router";
|
|
7
9
|
import { constant, inject, logger, runInContext } from "@tsed/di";
|
|
10
|
+
import fastifyStatics from "@fastify/static";
|
|
8
11
|
import { NotFound } from "@tsed/exceptions";
|
|
9
|
-
import { $alter, $asyncEmit } from "@tsed/hooks";
|
|
10
12
|
import { PlatformExceptions } from "@tsed/platform-exceptions";
|
|
11
|
-
import { adapter, createContext, createServer, PlatformAdapter, PlatformBuilder, PlatformRequest, PlatformResponse } from "@tsed/platform-http";
|
|
12
|
-
import { PlatformHandlerType } from "@tsed/platform-router";
|
|
13
|
-
import Fastify from "fastify";
|
|
14
13
|
import { PlatformFastifyRequest } from "../services/PlatformFastifyRequest.js";
|
|
15
14
|
import { PlatformFastifyResponse } from "../services/PlatformFastifyResponse.js";
|
|
16
15
|
import { convertPath } from "../utils/convertPath.js";
|
|
16
|
+
import fastifyMiddie from "@fastify/middie";
|
|
17
17
|
import { toPrefix } from "../utils/toPrefix.js";
|
|
18
18
|
function callNext(next, metadata, $ctx) {
|
|
19
19
|
if (metadata.type !== PlatformHandlerType.RESPONSE_FN) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import "@tsed/platform-multer/fastify";
|
|
2
2
|
import * as Http from "node:http";
|
|
3
|
-
import { IncomingMessage, ServerResponse } from "node:http";
|
|
4
|
-
import { type FastifyStaticOptions } from "@fastify/static";
|
|
5
3
|
import { Type } from "@tsed/core";
|
|
6
|
-
import { PlatformAdapter, PlatformBuilder, PlatformStaticsOptions } from "@tsed/platform-http";
|
|
7
|
-
import { PlatformHandlerMetadata, PlatformLayer } from "@tsed/platform-router";
|
|
8
4
|
import Fastify, { FastifyInstance, FastifyReply, FastifyRequest } from "fastify";
|
|
5
|
+
import { IncomingMessage, ServerResponse } from "node:http";
|
|
6
|
+
import { PlatformAdapter, PlatformBuilder, PlatformStaticsOptions } from "@tsed/platform-http";
|
|
9
7
|
import type { PlatformFastifyPluginLoadingOptions } from "../interfaces/interfaces.js";
|
|
8
|
+
import { PlatformHandlerMetadata, PlatformLayer } from "@tsed/platform-router";
|
|
9
|
+
import { type FastifyStaticOptions } from "@fastify/static";
|
|
10
10
|
declare global {
|
|
11
11
|
namespace TsED {
|
|
12
12
|
interface Application extends FastifyInstance {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Env } from "@tsed/core";
|
|
2
1
|
import type { FastifyPluginOptions, FastifyRegisterOptions } from "fastify";
|
|
2
|
+
import type { Env } from "@tsed/core";
|
|
3
3
|
import type { PlatformFastifySettings } from "./PlatformFastifySettings.js";
|
|
4
4
|
export * from "./PlatformFastifySettings.js";
|
|
5
5
|
export type PlatformFastifyPluginTypes = ((opts?: any) => any) | /*Type<any> |*/ string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "@fastify/accepts";
|
|
2
|
-
import type { IncomingMessage } from "node:http";
|
|
3
2
|
import { type PlatformContext, PlatformRequest } from "@tsed/platform-http";
|
|
4
3
|
import type { FastifyRequest } from "fastify";
|
|
4
|
+
import type { IncomingMessage } from "node:http";
|
|
5
5
|
declare module "fastify" {
|
|
6
6
|
interface FastifyRequest {
|
|
7
7
|
$ctx: PlatformContext;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ServerResponse } from "node:http";
|
|
2
1
|
import { type PlatformContext, PlatformResponse } from "@tsed/platform-http";
|
|
3
2
|
import type { FastifyReply } from "fastify";
|
|
3
|
+
import type { ServerResponse } from "node:http";
|
|
4
4
|
declare global {
|
|
5
5
|
namespace TsED {
|
|
6
6
|
interface Response extends FastifyReply {
|
package/package.json
CHANGED
|
@@ -1,9 +1,36 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/platform-fastify",
|
|
3
|
-
"
|
|
4
|
-
"version": "8.33.0",
|
|
3
|
+
"version": "8.35.0",
|
|
5
4
|
"description": "Fastify package for Ts.ED framework",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"Controller",
|
|
7
|
+
"Decorator",
|
|
8
|
+
"ES6",
|
|
9
|
+
"ESM",
|
|
10
|
+
"Fastify",
|
|
11
|
+
"Inject",
|
|
12
|
+
"TypeScript",
|
|
13
|
+
"api",
|
|
14
|
+
"decorators",
|
|
15
|
+
"di",
|
|
16
|
+
"fastify",
|
|
17
|
+
"ioc",
|
|
18
|
+
"mvc",
|
|
19
|
+
"rest",
|
|
20
|
+
"server",
|
|
21
|
+
"swagger",
|
|
22
|
+
"swagger ui",
|
|
23
|
+
"validation"
|
|
24
|
+
],
|
|
25
|
+
"homepage": "https://github.com/tsedio/tsed/tree/production/packages/platform/platform-fastify",
|
|
26
|
+
"bugs": {
|
|
27
|
+
"url": "https://github.com/tsedio/tsed/issues"
|
|
28
|
+
},
|
|
29
|
+
"license": "MIT",
|
|
30
|
+
"author": "Romain Lenzotti",
|
|
31
|
+
"repository": "https://github.com/tsedio/tsed",
|
|
6
32
|
"source": "./src/index.ts",
|
|
33
|
+
"type": "module",
|
|
7
34
|
"main": "./lib/esm/index.js",
|
|
8
35
|
"module": "./lib/esm/index.js",
|
|
9
36
|
"typings": "./lib/types/index.d.ts",
|
|
@@ -23,33 +50,6 @@
|
|
|
23
50
|
"build:ts": "tsc --build tsconfig.esm.json",
|
|
24
51
|
"test:ci": "vitest run --coverage.thresholds.autoUpdate=true"
|
|
25
52
|
},
|
|
26
|
-
"keywords": [
|
|
27
|
-
"Fastify",
|
|
28
|
-
"TypeScript",
|
|
29
|
-
"Decorator",
|
|
30
|
-
"decorators",
|
|
31
|
-
"fastify",
|
|
32
|
-
"Controller",
|
|
33
|
-
"Inject",
|
|
34
|
-
"ioc",
|
|
35
|
-
"di",
|
|
36
|
-
"mvc",
|
|
37
|
-
"swagger",
|
|
38
|
-
"swagger ui",
|
|
39
|
-
"ESM",
|
|
40
|
-
"ES6",
|
|
41
|
-
"server",
|
|
42
|
-
"rest",
|
|
43
|
-
"api",
|
|
44
|
-
"validation"
|
|
45
|
-
],
|
|
46
|
-
"author": "Romain Lenzotti",
|
|
47
|
-
"license": "MIT",
|
|
48
|
-
"bugs": {
|
|
49
|
-
"url": "https://github.com/tsedio/tsed/issues"
|
|
50
|
-
},
|
|
51
|
-
"homepage": "https://github.com/tsedio/tsed/tree/production/packages/platform/platform-fastify",
|
|
52
|
-
"repository": "https://github.com/tsedio/tsed",
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"@fastify/accepts": ">=5.0.2",
|
|
55
55
|
"@fastify/middie": ">=9.0.2",
|
|
@@ -61,11 +61,11 @@
|
|
|
61
61
|
"@fastify/cookie": "11.0.1",
|
|
62
62
|
"@fastify/formbody": "8.0.1",
|
|
63
63
|
"@fastify/session": "11.0.1",
|
|
64
|
-
"@tsed/barrels": "8.
|
|
65
|
-
"@tsed/core": "8.
|
|
66
|
-
"@tsed/di": "8.
|
|
67
|
-
"@tsed/platform-http": "8.
|
|
68
|
-
"@tsed/platform-test-sdk": "8.
|
|
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
69
|
"@types/content-disposition": "^0.5.4",
|
|
70
70
|
"cross-env": "7.0.3",
|
|
71
71
|
"fastify": "5.8.3",
|