@syncot/connection
Advanced tools
Comparing version
@@ -6,2 +6,26 @@ # Change Log | ||
# [0.4.0](https://github.com/SyncOT/SyncOT/compare/@syncot/connection@0.3.1...@syncot/connection@0.4.0) (2020-11-16) | ||
### Bug Fixes | ||
* replace SyncOt with SyncOT everywhere ([1643d98](https://github.com/SyncOT/SyncOT/commit/1643d98d22a811444a8992cbfb26598a583a5afd)) | ||
### Features | ||
* add DisconnectedError ([64a7ffd](https://github.com/SyncOT/SyncOT/commit/64a7ffd71f42b5ec198f4cd7d145fd9b7c084d06)) | ||
* add DuplicateIdError ([9f05d37](https://github.com/SyncOT/SyncOT/commit/9f05d37de7e015471a65fbce4e99438a137a7fd3)) | ||
* add InvalidStreamError ([59c0bac](https://github.com/SyncOT/SyncOT/commit/59c0bacb181cea4d07863b0e88c23aacb9b3baff)) | ||
* add NoServiceError ([98c7fec](https://github.com/SyncOT/SyncOT/commit/98c7fec27c05091cc5ef8d60761a019cfe96b6ec)) | ||
### BREAKING CHANGES | ||
* "SyncOt" replaced with "SyncOT" in the whole codebase | ||
## [0.3.1](https://github.com/SyncOT/SyncOT/compare/@syncot/connection@0.3.0...@syncot/connection@0.3.1) (2020-11-11) | ||
@@ -8,0 +32,0 @@ |
@@ -1,3 +0,2 @@ | ||
import { CustomError } from '@syncot/error'; | ||
import { EmitterInterface, SyncOtEmitter } from '@syncot/events'; | ||
import { CustomError, EmitterInterface, SyncOTEmitter } from '@syncot/util'; | ||
import { Duplex } from 'readable-stream'; | ||
@@ -103,3 +102,3 @@ declare type RequestId = number; | ||
} | ||
declare class ConnectionImpl extends SyncOtEmitter<Events> { | ||
declare class ConnectionImpl extends SyncOTEmitter<Events> { | ||
private stream; | ||
@@ -180,5 +179,5 @@ private services; | ||
* | ||
* - `SyncOtError InvalidEntity` - emitted when sending or receiving an invalid message. | ||
* - `SyncOTError InvalidEntity` - emitted when sending or receiving an invalid message. | ||
* It indicates presence of a bug in SyncOT or the client code. | ||
* - `SyncOtError InvalidStream` - emitted when a service returns a stream, or a promise which | ||
* - `SyncOTError InvalidStream` - emitted when a service returns a stream, or a promise which | ||
* resolves to a stream, and that stream is already destroyed, not readable, or not writable. | ||
@@ -185,0 +184,0 @@ * @event destroy Emitted when the Connection is destroyed. |
@@ -1,6 +0,4 @@ | ||
import { createDisconnectedError, createDuplicateIdError, createInvalidEntityError, createInvalidStreamError, createNoServiceError, fromJSON, isCustomError, toJSON, } from '@syncot/error'; | ||
import { SyncOtEmitter } from '@syncot/events'; | ||
import { isOpenDuplexStream, isStream } from '@syncot/stream'; | ||
import { assert, validate } from '@syncot/util'; | ||
import { assert, createInvalidEntityError, fromJSON, isCustomError, isOpenDuplexStream, isStream, SyncOTEmitter, toJSON, validate, } from '@syncot/util'; | ||
import { Duplex } from 'readable-stream'; | ||
import { createDisconnectedError, createDuplicateIdError, createInvalidStreamError, createNoServiceError, } from './error'; | ||
/** | ||
@@ -83,3 +81,3 @@ * The list of supported `Message` types. | ||
]); | ||
class ConnectionImpl extends SyncOtEmitter { | ||
class ConnectionImpl extends SyncOTEmitter { | ||
constructor() { | ||
@@ -86,0 +84,0 @@ super(...arguments); |
@@ -1,2 +0,2 @@ | ||
import { createCompositeError } from '@syncot/error'; | ||
import { createCompositeError } from '@syncot/util'; | ||
/** | ||
@@ -3,0 +3,0 @@ * Tries the specified stream `factories` in order until one succeeds, |
export * from './connection'; | ||
export * from './factory'; | ||
export * from './manager'; | ||
export * from './error'; |
export * from './connection'; | ||
export * from './factory'; | ||
export * from './manager'; | ||
export * from './error'; |
@@ -1,2 +0,2 @@ | ||
import { EmitterInterface, SyncOtEmitter } from '@syncot/events'; | ||
import { EmitterInterface, SyncOTEmitter } from '@syncot/util'; | ||
import { Connection } from './connection'; | ||
@@ -16,3 +16,3 @@ import { StreamFactory } from './factory'; | ||
*/ | ||
export interface StreamManager extends EmitterInterface<SyncOtEmitter<StreamManagerEvents>> { | ||
export interface StreamManager extends EmitterInterface<SyncOTEmitter<StreamManagerEvents>> { | ||
} | ||
@@ -19,0 +19,0 @@ /** |
@@ -1,3 +0,2 @@ | ||
import { SyncOtEmitter } from '@syncot/events'; | ||
import { assert, randomInteger } from '@syncot/util'; | ||
import { assert, randomInteger, SyncOTEmitter, } from '@syncot/util'; | ||
/** | ||
@@ -9,3 +8,3 @@ * Creates a new `StreamManager`. | ||
} | ||
class Manager extends SyncOtEmitter { | ||
class Manager extends SyncOTEmitter { | ||
constructor(connection, createStream, minDelay = 1000, maxDelay = 10000, delayFactor = 1.5, counterResetDelay = 0) { | ||
@@ -12,0 +11,0 @@ super(); |
{ | ||
"name": "@syncot/connection", | ||
"version": "0.3.1", | ||
"version": "0.4.0", | ||
"description": "An RPC library for communication over Duplex object streams.", | ||
@@ -30,6 +30,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@syncot/error": "^0.3.0", | ||
"@syncot/events": "^0.1.3", | ||
"@syncot/stream": "^0.1.1", | ||
"@syncot/util": "^1.0.3", | ||
"@syncot/util": "^2.0.0", | ||
"@types/node": "^14.14.6", | ||
@@ -40,3 +37,3 @@ "@types/readable-stream": "^2.3.1", | ||
}, | ||
"gitHead": "929463e7cd08d60f6ef983a5bce06209c82513d3" | ||
"gitHead": "d44ea483c2be41defaa32738e82ec3a9e1e58492" | ||
} |
44653
6.72%5
-37.5%13
18.18%1034
5.62%+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated