<commit_before>import { Injectable, Inject } from '@ts-stack/di';
import { parse } from 'get-body';

import { ObjectAny } from '../types/types';
import { BodyParserConfig } from '../types/types';
import { NodeReqToken } from '../types/injection-tokens';
import { NodeRequest } from '../types/server-options';
import { Logger } from '../types/logger';

@Injectable()
export class BodyParser {
  protected rawBody: Buffer;
  protected body: ObjectAny;

  constructor(
    @Inject(NodeReqToken) protected readonly nodeReq: NodeRequest,
    protected config: BodyParserConfig,
    protected log: Logger
  ) {}

  getRawBody(): Promise<Buffer> {
    return;
  }

  getJsonBody(): Promise<any> {
    return parse(this.nodeReq, this.nodeReq.headers);
  }
}<commit_msg>refactor(core): removed some properties for BodyParser<commit_after>import { Injectable, Inject } from '@ts-stack/di';
import { parse } from 'get-body';

import { BodyParserConfig } from '../types/types';
import { NodeReqToken } from '../types/injection-tokens';
import { NodeRequest } from '../types/server-options';
import { Logger } from '../types/logger';

@Injectable()
export class BodyParser {
  constructor(
    @Inject(NodeReqToken) protected readonly nodeReq: NodeRequest,
    protected config: BodyParserConfig,
    protected log: Logger
  ) {}

  getRawBody(): Promise<Buffer> {
    return;
  }

  getJsonBody(): Promise<any> {
    return parse(this.nodeReq, this.nodeReq.headers);
  }
}
{'fraction_non_alphanumeric': 0.1410958904109589, 'fraction_numerical': 0.0, 'mean_word_length': 4.162544169611308, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6172520', 'n_tokens_mistral': 432, 'n_tokens_neox': 427, 'n_words': 113}