@tsed/common 7.54.0 → 7.56.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.
@@ -90,7 +90,6 @@ export declare class PlatformBuilder<App = TsED.Application> {
90
90
  loadStatics(hook: string): void;
91
91
  useProvider(token: Type<any>, settings?: Partial<ProviderOpts>): this;
92
92
  bootstrap(): Promise<this>;
93
- protected loadRoutes(): Promise<void>;
94
93
  protected mapRouters(): Promise<void>;
95
94
  protected diff(): string;
96
95
  /**
@@ -17,12 +17,10 @@ export declare abstract class PlatformAdapter<App = TsED.Application> {
17
17
  providers: ProviderOpts[];
18
18
  constructor(injector: InjectorService);
19
19
  get app(): PlatformApplication<App>;
20
- /**
21
- * Called after the injector instantiation
22
- */
23
- onInit(): any;
24
- beforeLoadRoutes(): Promise<any>;
25
- afterLoadRoutes(): Promise<any>;
20
+ getServers(): CreateServerReturn[];
21
+ onInit(): Promise<void> | void;
22
+ beforeLoadRoutes(): Promise<void> | void;
23
+ afterLoadRoutes(): Promise<void> | void;
26
24
  /**
27
25
  * create initial context
28
26
  */
@@ -35,7 +33,6 @@ export declare abstract class PlatformAdapter<App = TsED.Application> {
35
33
  * Map handler to the targeted framework
36
34
  */
37
35
  abstract mapHandler(handler: Function, layer: PlatformHandlerMetadata): Function;
38
- getServers(): CreateServerReturn[];
39
36
  /**
40
37
  * Return the app instance
41
38
  */
@@ -66,6 +63,7 @@ export interface PlatformBuilderSettings<App = TsED.Application> extends Partial
66
63
  }
67
64
  export declare class FakeAdapter extends PlatformAdapter<any> {
68
65
  providers: ProviderOpts[];
66
+ static readonly NAME: string;
69
67
  static createFakeRawDriver(): {
70
68
  (): void;
71
69
  use: () => any;
@@ -1,6 +1,7 @@
1
1
  /// <reference types="node" />
2
2
  /// <reference types="node" />
3
3
  /// <reference types="node" />
4
+ import { ReturnHostInfoFromPort } from "@tsed/core";
4
5
  import { InjectorService, TokenProvider } from "@tsed/di";
5
6
  import Http from "http";
6
7
  import Http2 from "http2";
@@ -9,7 +10,8 @@ export interface CreateServerOptions {
9
10
  token: TokenProvider;
10
11
  type: "http" | "https";
11
12
  port: string | false;
13
+ listen?: (hostInfo: ReturnHostInfoFromPort) => Promise<any>;
12
14
  server: () => Http.Server | Https.Server | Http2.Http2Server;
13
15
  }
14
16
  export type CreateServerReturn = () => Promise<Http.Server | Https.Server | Http2.Http2Server>;
15
- export declare function createServer(injector: InjectorService, { token, type, port, server: get }: CreateServerOptions): undefined | CreateServerReturn;
17
+ export declare function createServer(injector: InjectorService, { token, type, port, server: get, listen }: CreateServerOptions): undefined | CreateServerReturn;
@@ -1,9 +1,8 @@
1
1
  /// <reference types="node" />
2
2
  /// <reference types="node" />
3
3
  /// <reference types="node" />
4
+ import { getHostInfoFromPort } from "@tsed/core";
4
5
  import type Http from "http";
5
- import type Https from "https";
6
6
  import type Http2 from "http2";
7
- import { InjectorService } from "@tsed/di";
8
- import { getHostInfoFromPort } from "@tsed/core";
9
- export declare function listenServer(injector: InjectorService, server: Http.Server | Https.Server | Http2.Http2Server, hostInfo: ReturnType<typeof getHostInfoFromPort>): Promise<ReturnType<typeof getHostInfoFromPort>>;
7
+ import type Https from "https";
8
+ export declare function listenServer(server: Http.Server | Https.Server | Http2.Http2Server, hostInfo: ReturnType<typeof getHostInfoFromPort>): Promise<unknown>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsed/common",
3
- "version": "7.54.0",
3
+ "version": "7.56.0",
4
4
  "description": "A TypeScript Framework on top of Express",
5
5
  "private": false,
6
6
  "source": "./src/index.ts",
@@ -63,27 +63,27 @@
63
63
  }
64
64
  ],
65
65
  "dependencies": {
66
- "@tsed/core": "7.54.0",
67
- "@tsed/di": "7.54.0",
68
- "@tsed/exceptions": "7.54.0",
69
- "@tsed/json-mapper": "7.54.0",
66
+ "@tsed/core": "7.56.0",
67
+ "@tsed/di": "7.56.0",
68
+ "@tsed/exceptions": "7.56.0",
69
+ "@tsed/json-mapper": "7.56.0",
70
70
  "@tsed/logger": ">=6.2.2",
71
71
  "@tsed/logger-file": ">=6.2.2",
72
- "@tsed/platform-exceptions": "7.54.0",
73
- "@tsed/platform-log-middleware": "7.54.0",
74
- "@tsed/platform-middlewares": "7.54.0",
75
- "@tsed/platform-params": "7.54.0",
76
- "@tsed/platform-response-filter": "7.54.0",
77
- "@tsed/platform-router": "7.54.0",
78
- "@tsed/platform-views": "7.54.0",
79
- "@tsed/schema": "7.54.0",
72
+ "@tsed/platform-exceptions": "7.56.0",
73
+ "@tsed/platform-log-middleware": "7.56.0",
74
+ "@tsed/platform-middlewares": "7.56.0",
75
+ "@tsed/platform-params": "7.56.0",
76
+ "@tsed/platform-response-filter": "7.56.0",
77
+ "@tsed/platform-router": "7.56.0",
78
+ "@tsed/platform-views": "7.56.0",
79
+ "@tsed/schema": "7.56.0",
80
80
  "@types/json-schema": "7.0.11",
81
81
  "accepts": "^1.3.8",
82
82
  "tslib": "2.5.0",
83
83
  "uuid": "8.3.2"
84
84
  },
85
85
  "devDependencies": {
86
- "@tsed/components-scan": "7.54.0",
86
+ "@tsed/components-scan": "7.56.0",
87
87
  "@tsed/eslint": "7.44.1",
88
88
  "@tsed/typescript": "7.44.1",
89
89
  "eslint": "^8.12.0"