Comparing version 3.2.1 to 3.2.3
@@ -5,2 +5,11 @@ # Changelog | ||
## [3.2.3][] - 2024-04-27 | ||
- Fixed ping packets | ||
- Update dependencies | ||
## [3.2.2][] - 2024-03-26 | ||
- Fixed MetaReadable and MetaWritable | ||
## [3.2.1][] - 2024-02-12 | ||
@@ -273,3 +282,5 @@ | ||
[unreleased]: https://github.com/metarhia/metacom/compare/v3.2.1...HEAD | ||
[unreleased]: https://github.com/metarhia/metacom/compare/v3.2.3...HEAD | ||
[3.2.3]: https://github.com/metarhia/metacom/compare/v3.2.2...v3.2.3 | ||
[3.2.2]: https://github.com/metarhia/metacom/compare/v3.2.1...v3.2.2 | ||
[3.2.1]: https://github.com/metarhia/metacom/compare/v3.2.0...v3.2.1 | ||
@@ -276,0 +287,0 @@ [3.2.0]: https://github.com/metarhia/metacom/compare/v3.1.2...v3.2.0 |
@@ -67,5 +67,4 @@ import { EventEmitter } from 'metautil'; | ||
const id = ++this.streamId; | ||
const initData = { type: 'stream', id, name, size }; | ||
const transport = this; | ||
return new MetaWritable(transport, initData); | ||
return new MetaWritable(id, name, size, transport); | ||
} | ||
@@ -127,4 +126,3 @@ | ||
} else { | ||
const streamData = { id, name, size }; | ||
const stream = new MetaReadable(streamData); | ||
const stream = new MetaReadable(id, name, size); | ||
this.streams.set(id, stream); | ||
@@ -131,0 +129,0 @@ } |
@@ -135,8 +135,8 @@ import { EventEmitter } from 'metautil'; | ||
class MetaWritable extends EventEmitter { | ||
constructor(transport, options = {}) { | ||
constructor(id, name, size, transport) { | ||
super(); | ||
this.id = id; | ||
this.name = name; | ||
this.size = size; | ||
this.transport = transport; | ||
this.id = options.id; | ||
this.name = options.name; | ||
this.size = options.size; | ||
this.init(); | ||
@@ -143,0 +143,0 @@ } |
@@ -66,3 +66,3 @@ 'use strict'; | ||
const id = ++this.streamId; | ||
return new MetaWritable(this, { id, name, size }); | ||
return new MetaWritable(id, name, size, this); | ||
} | ||
@@ -69,0 +69,0 @@ |
@@ -109,4 +109,3 @@ 'use strict'; | ||
const id = --this.#streamId; | ||
const packet = { id, name, size }; | ||
const stream = new MetaWritable(this.#transport, packet); | ||
const stream = new MetaWritable(id, name, size, this.#transport); | ||
this.streams.set(id, stream); | ||
@@ -241,3 +240,3 @@ return stream; | ||
if (Buffer.compare(EMPTY_PACKET, data) === 0) { | ||
return void client.send('{}'); | ||
return void client.send({}); | ||
} | ||
@@ -301,3 +300,3 @@ const packet = metautil.jsonParse(data) || {}; | ||
{ | ||
const stream = new MetaReadable({ id, name, size }); | ||
const stream = new MetaReadable(id, name, size); | ||
client.streams.set(id, stream); | ||
@@ -304,0 +303,0 @@ this.console.log(`${client.ip}\tstream ${tag} init`); |
@@ -135,8 +135,8 @@ 'use strict'; | ||
class MetaWritable extends EventEmitter { | ||
constructor(transport, options = {}) { | ||
constructor(id, name, size, transport) { | ||
super(); | ||
this.id = id; | ||
this.name = name; | ||
this.size = size; | ||
this.transport = transport; | ||
this.id = options.id; | ||
this.name = options.name; | ||
this.size = options.size; | ||
this.init(); | ||
@@ -143,0 +143,0 @@ } |
{ | ||
"name": "metacom", | ||
"version": "3.2.1", | ||
"version": "3.2.3", | ||
"author": "Timur Shemsedinov <timur.shemsedinov@gmail.com>", | ||
@@ -58,3 +58,3 @@ "description": "Communication protocol for Metarhia stack with rpc, events, binary streams, memory and db access", | ||
"dependencies": { | ||
"metautil": "5.2.1", | ||
"metautil": "5.2.2", | ||
"ws": "^8.16.0" | ||
@@ -61,0 +61,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
66705
1627
+ Addedmetautil@5.2.2(transitive)
- Removedmetautil@5.2.1(transitive)
Updatedmetautil@5.2.2