@tsed/platform-fastify 8.38.0 → 8.38.2

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.
@@ -4,7 +4,7 @@ import * as Https from "node:https";
4
4
  import { $alter, $asyncEmit } from "@tsed/hooks";
5
5
  import { isFunction, isString } from "@tsed/core";
6
6
  import Fastify from "fastify";
7
- import { PlatformAdapter, PlatformBuilder, PlatformRequest, PlatformResponse, adapter, createContext, createServer } from "@tsed/platform-http";
7
+ import { adapter, createContext, createServer, PlatformAdapter, PlatformBuilder, PlatformRequest, PlatformResponse } from "@tsed/platform-http";
8
8
  import { PlatformHandlerType } from "@tsed/platform-router";
9
9
  import { constant, inject, logger, runInContext } from "@tsed/di";
10
10
  import fastifyStatics from "@fastify/static";
@@ -28,19 +28,13 @@ export class PlatformFastify extends PlatformAdapter {
28
28
  }
29
29
  static create(module, settings) {
30
30
  return new PlatformBuilder({
31
- rootModule: settings ? module : undefined,
32
31
  httpsPort: false,
33
32
  httpPort: false,
34
- ...(settings || module),
35
- adapter: PlatformFastify
33
+ ...PlatformBuilder.options(PlatformFastify, module, settings)
36
34
  });
37
35
  }
38
36
  static bootstrap(module, settings) {
39
- return new PlatformBuilder({
40
- rootModule: settings ? module : undefined,
41
- ...(settings || module),
42
- adapter: PlatformFastify
43
- }).bootstrap();
37
+ return new PlatformBuilder(PlatformBuilder.options(PlatformFastify, module, settings)).bootstrap();
44
38
  }
45
39
  async mapLayers(layers) {
46
40
  const { app } = this;
@@ -1,8 +1,8 @@
1
1
  import "@tsed/platform-multer/fastify";
2
2
  import * as Http from "node:http";
3
+ import { IncomingMessage, ServerResponse } from "node:http";
3
4
  import { Type } from "@tsed/core";
4
5
  import Fastify, { FastifyInstance, FastifyReply, FastifyRequest } from "fastify";
5
- import { IncomingMessage, ServerResponse } from "node:http";
6
6
  import { PlatformAdapter, PlatformBuilder, PlatformStaticsOptions } from "@tsed/platform-http";
7
7
  import type { PlatformFastifyPluginLoadingOptions } from "../interfaces/interfaces.js";
8
8
  import { PlatformHandlerMetadata, PlatformLayer } from "@tsed/platform-router";
@@ -30,7 +30,7 @@ export declare class PlatformFastify extends PlatformAdapter<FastifyInstance> {
30
30
  * @param settings
31
31
  */
32
32
  static bootstrap(settings: Partial<TsED.Configuration>): Promise<PlatformBuilder<FastifyInstance>>;
33
- static bootstrap(module: Type<any>, settings: Partial<TsED.Configuration>): Promise<PlatformBuilder<FastifyInstance>>;
33
+ static bootstrap(module: Type<any>, settings?: Partial<TsED.Configuration>): Promise<PlatformBuilder<FastifyInstance>>;
34
34
  mapLayers(layers: PlatformLayer[]): Promise<void>;
35
35
  mapHandler(handler: (...args: any[]) => any, metadata: PlatformHandlerMetadata): (...args: any[]) => any;
36
36
  useContext(): Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsed/platform-fastify",
3
- "version": "8.38.0",
3
+ "version": "8.38.2",
4
4
  "description": "Fastify package for Ts.ED framework",
5
5
  "keywords": [
6
6
  "Controller",
@@ -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.38.0",
65
- "@tsed/core": "8.38.0",
66
- "@tsed/di": "8.38.0",
67
- "@tsed/platform-http": "8.38.0",
68
- "@tsed/platform-test-sdk": "8.38.0",
64
+ "@tsed/barrels": "8.38.2",
65
+ "@tsed/core": "8.38.2",
66
+ "@tsed/di": "8.38.2",
67
+ "@tsed/platform-http": "8.38.2",
68
+ "@tsed/platform-test-sdk": "8.38.2",
69
69
  "@types/content-disposition": "^0.5.4",
70
70
  "cross-env": "7.0.3",
71
71
  "fastify": "5.8.3",