@lad-tech/nsc-toolkit 1.17.0 → 1.17.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.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
- # [1.17.0](https://github.com/lad-tech/nsc-toolkit/compare/v1.16.0...v1.17.0) (2023-11-09)
1
+ ## [1.17.2](https://github.com/lad-tech/nsc-toolkit/compare/v1.17.1...v1.17.2) (2023-11-13)
2
2
 
3
3
 
4
- ### Features
4
+ ### Bug Fixes
5
5
 
6
- * Передача и парсинг json в потоках ([8c40d92](https://github.com/lad-tech/nsc-toolkit/commit/8c40d9211055ea40668f33711f9cec5e4e0064d3)), closes [#85](https://github.com/lad-tech/nsc-toolkit/issues/85)
6
+ * JavaScript heap out of memory in BufferToJsonTransform.ts ([71ca579](https://github.com/lad-tech/nsc-toolkit/commit/71ca57990a2f25a1707cc43dbd7c10398de518e7))
@@ -13,6 +13,7 @@ class BufferToJsonTransform extends stream_1.Transform {
13
13
  tail = Buffer.concat([this.head, Buffer.from(tail)]);
14
14
  const jsonData = JSON.parse(tail.toString());
15
15
  cb(null, jsonData);
16
+ this.head = Buffer.from('');
16
17
  }
17
18
  catch (error) {
18
19
  if (error instanceof SyntaxError) {
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.JsonToBufferTransform = void 0;
4
4
  const stream_1 = require("stream");
5
5
  class JsonToBufferTransform extends stream_1.Transform {
6
- transform(chunk, encoding, cb) {
6
+ _transform(chunk, encoding, cb) {
7
7
  cb(null, Buffer.from(JSON.stringify(chunk)));
8
8
  }
9
9
  }
@@ -2,5 +2,5 @@
2
2
  /// <reference types="node" />
3
3
  import { Transform, TransformCallback } from 'stream';
4
4
  export declare class JsonToBufferTransform<T> extends Transform {
5
- transform(chunk: T, encoding: BufferEncoding, cb: TransformCallback): void;
5
+ _transform(chunk: T, encoding: BufferEncoding, cb: TransformCallback): void;
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lad-tech/nsc-toolkit",
3
- "version": "1.17.0",
3
+ "version": "1.17.2",
4
4
  "description": "Toolkit for create microservices around NATS",
5
5
  "main": "dist/index.js",
6
6
  "types": "./dist/types/index.d.ts",