@xrystal/core 3.10.6 → 3.11.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "author": "Yusuf Yasir KAYGUSUZ",
3
3
  "name": "@xrystal/core",
4
- "version": "3.10.6",
4
+ "version": "3.11.0",
5
5
  "description": "Project core for xrystal",
6
6
  "publishConfig": {
7
7
  "access": "public",
@@ -1,4 +1,3 @@
1
- import { LoggerService } from '../../../loader';
2
1
  import { ProtocolEnum } from '../../index';
3
2
  export interface CustomRequest {
4
3
  accounts?: any;
@@ -17,16 +16,15 @@ export interface CustomResponse {
17
16
  locals: Record<string, any>;
18
17
  }
19
18
  declare abstract class Controller {
20
- protected loggerService: LoggerService;
19
+ protected loggerService: any;
21
20
  protected protocol: ProtocolEnum | null;
22
21
  protected req: CustomRequest | null;
23
22
  protected res: CustomResponse | null;
24
- constructor({ protocol, req, res, ctx, loggerService }: {
23
+ constructor({ protocol, req, res, ctx, }: {
25
24
  protocol: ProtocolEnum;
26
25
  req?: any;
27
26
  res?: any;
28
27
  ctx?: any;
29
- loggerService: LoggerService;
30
28
  });
31
29
  protected responseProtocolSwitch: ({ res, resStatus, context, req }: any) => Promise<any>;
32
30
  protected parsedQuerys: (url: string) => Record<string, any>;
@@ -1,13 +1,13 @@
1
1
  import qs from 'qs';
2
- import { ProtocolEnum, responseMessageHelper, ResponseSchema } from '../../index';
2
+ import { LoggerService } from '../../../loader';
3
+ import { ProtocolEnum, responseMessageHelper, ResponseSchema, x } from '../../index';
3
4
  class Controller {
4
- loggerService;
5
+ loggerService = x.get(LoggerService);
5
6
  protocol = null;
6
7
  req = null;
7
8
  res = null;
8
- constructor({ protocol, req, res, ctx, loggerService }) {
9
+ constructor({ protocol, req, res, ctx, }) {
9
10
  this.protocol = protocol;
10
- this.loggerService = loggerService;
11
11
  if (ctx) {
12
12
  this.req = {
13
13
  url: ctx.request?.url || '',