@clairejs/server 3.22.4 → 3.22.5

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ## Change Log
2
2
 
3
- #### 3.22.4:
3
+ #### 3.22.5:
4
4
 
5
5
  - add log to debug aws cron
6
6
 
@@ -12,10 +12,9 @@ export declare class LambdaWrapper {
12
12
  protected readonly serverFactory: () => Promise<ClaireServer>;
13
13
  protected readonly requestMapper: (event: any) => RequestOptions | undefined;
14
14
  protected readonly config?: LambdaWrapperConfig | undefined;
15
- private readonly injector;
16
- private readonly httpRequestHandler?;
17
- private readonly socketManager?;
18
- private readonly jobScheduler?;
15
+ private httpRequestHandler?;
16
+ private socketManager?;
17
+ private jobScheduler?;
19
18
  private _server?;
20
19
  constructor(serverFactory: () => Promise<ClaireServer>, requestMapper: (event: any) => RequestOptions | undefined, config?: LambdaWrapperConfig | undefined);
21
20
  private bootServer;
@@ -66,7 +66,6 @@ export class LambdaWrapper {
66
66
  serverFactory;
67
67
  requestMapper;
68
68
  config;
69
- injector = getServiceProvider().getInjector();
70
69
  httpRequestHandler;
71
70
  socketManager;
72
71
  jobScheduler;
@@ -76,14 +75,15 @@ export class LambdaWrapper {
76
75
  this.requestMapper = requestMapper;
77
76
  this.config = config;
78
77
  this.handler = this.handler.bind(this);
79
- this.socketManager = this.injector.resolveOptional(AbstractServerSocketManager);
80
- this.httpRequestHandler = this.injector.resolveOptional(AbstractHttpRequestHandler);
81
- this.jobScheduler = this.injector.resolveOptional(AwsJobScheduler);
82
78
  }
83
79
  async bootServer() {
84
80
  if (!this._server) {
81
+ const injector = getServiceProvider().getInjector();
85
82
  this._server = await this.serverFactory();
86
- await this.injector.initInstances();
83
+ this.socketManager = injector.resolveOptional(AbstractServerSocketManager);
84
+ this.httpRequestHandler = injector.resolveOptional(AbstractHttpRequestHandler);
85
+ this.jobScheduler = injector.resolveOptional(AwsJobScheduler);
86
+ await injector.initInstances();
87
87
  this.socketManager?.configure();
88
88
  await this._server.init();
89
89
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clairejs/server",
3
- "version": "3.22.4",
3
+ "version": "3.22.5",
4
4
  "description": "Claire server NodeJs framework written in Typescript.",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",