Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@syncot/connection

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@syncot/connection - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

## [0.2.1](https://github.com/SyncOT/SyncOT/compare/@syncot/connection@0.2.0...@syncot/connection@0.2.1) (2020-11-03)
**Note:** Version bump only for package @syncot/connection
# [0.2.0](https://github.com/SyncOT/SyncOT/compare/@syncot/connection@0.1.4...@syncot/connection@0.2.0) (2020-04-24)

@@ -8,0 +16,0 @@

16

lib/connection.js

@@ -26,6 +26,6 @@ import { createDisconnectedError, createDuplicateIdError, createInvalidEntityError, createInvalidStreamError, createNoServiceError, } from '@syncot/error';

const validateMessage = validate([
message => typeof message === 'object' && message !== null
(message) => typeof message === 'object' && message !== null
? undefined
: createInvalidEntityError('Message', message, null),
message => Number.isSafeInteger(message.type) &&
(message) => Number.isSafeInteger(message.type) &&
message.type >= 0 /* EVENT */ &&

@@ -35,6 +35,6 @@ message.type <= 10 /* STREAM_OUTPUT_DESTROY */

: createInvalidEntityError('Message', message, 'type'),
message => typeof message.service === 'string'
(message) => typeof message.service === 'string'
? undefined
: createInvalidEntityError('Message', message, 'service'),
message => (message.type === 0 /* EVENT */ ||
(message) => (message.type === 0 /* EVENT */ ||
message.type === 1 /* REQUEST */

@@ -45,6 +45,6 @@ ? typeof message.name === 'string'

: createInvalidEntityError('Message', message, 'name'),
message => Number.isSafeInteger(message.id)
(message) => Number.isSafeInteger(message.id)
? undefined
: createInvalidEntityError('Message', message, 'id'),
message => {
(message) => {
if (message.type === 1 /* REQUEST */) {

@@ -180,3 +180,3 @@ return Array.isArray(message.data)

assert(eventNames.size === 0, 'Connection events not implemented');
requestNames.forEach(requestName => {
requestNames.forEach((requestName) => {
assert(typeof instance[requestName] === 'function', `Service.${requestName} must be a function.`);

@@ -207,3 +207,3 @@ });

const proxyStreams = new Map();
requestNames.forEach(requestName => {
requestNames.forEach((requestName) => {
assert(!(requestName in instance), `Proxy.${requestName} already exists.`);

@@ -210,0 +210,0 @@ instance[requestName] = (...args) => {

@@ -65,3 +65,3 @@ import { SyncOtEmitter } from '@syncot/events';

const stream = await this.createStream();
stream.on('error', error => this.emitAsync('error', error));
stream.on('error', (error) => this.emitAsync('error', error));
if (!this.shouldConnect()) {

@@ -88,3 +88,3 @@ stream.destroy();

this.scheduledConnect = undefined;
this.connect().catch(error => {
this.connect().catch((error) => {
this.emitAsync('error', error);

@@ -91,0 +91,0 @@ this.scheduleConnect();

{
"name": "@syncot/connection",
"version": "0.2.0",
"version": "0.2.1",
"description": "An RPC library for communication over Duplex object streams.",

@@ -30,10 +30,10 @@ "keywords": [

"dependencies": {
"@syncot/error": "^0.2.0",
"@syncot/events": "^0.1.1",
"@syncot/stream": "^0.1.0",
"@syncot/util": "^1.0.1",
"@types/node": "^12.0.4",
"@syncot/error": "^0.2.1",
"@syncot/events": "^0.1.2",
"@syncot/stream": "^0.1.1",
"@syncot/util": "^1.0.2",
"@types/node": "^14.14.6",
"@types/readable-stream": "^2.3.1",
"readable-stream": "^3.3.0",
"tslib": "^1.9.3"
"tslib": "^2.0.3"
},

@@ -43,3 +43,3 @@ "peerDependencies": {

},
"gitHead": "52d9f18d2fa330979af433745ff92d2bc0d4c8f8"
"gitHead": "2399fa565e50dcfc2f4d37afd567c6cbcfdccb15"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc