Compare commits
5 Commits
v0.1.0-dev
...
v0.1.0-dev
Author | SHA1 | Date |
---|---|---|
semantic-release-bot | a53c3784e4 | |
Derrick Hammer | 13b2ebe0b5 | |
Derrick Hammer | 0c10129cd0 | |
Derrick Hammer | 2c8d3a2716 | |
Derrick Hammer | d22c757c52 |
|
@ -1,3 +1,10 @@
|
|||
# [0.1.0-develop.5](https://git.lumeweb.com/LumeWeb/libs5-transport-hyper/compare/v0.1.0-develop.4...v0.1.0-develop.5) (2023-08-31)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* change approach to make socket optional ([d22c757](https://git.lumeweb.com/LumeWeb/libs5-transport-hyper/commit/d22c757c520e38f71ef0a303a3e116013555d01b))
|
||||
|
||||
# [0.1.0-develop.4](https://git.lumeweb.com/LumeWeb/libs5-transport-hyper/compare/v0.1.0-develop.3...v0.1.0-develop.4) (2023-08-31)
|
||||
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
{
|
||||
"name": "@lumeweb/libs5-transport-hyper",
|
||||
"version": "0.1.0-develop.2",
|
||||
"version": "0.1.0-develop.4",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@lumeweb/libs5-transport-hyper",
|
||||
"version": "0.1.0-develop.2",
|
||||
"version": "0.1.0-develop.4",
|
||||
"dependencies": {
|
||||
"@lumeweb/libs5": "^0.1.0-develop.11",
|
||||
"@lumeweb/libs5": "^0.1.0-develop.13",
|
||||
"streamx": "^2.15.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@ -1828,9 +1828,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@lumeweb/libs5": {
|
||||
"version": "0.1.0-develop.11",
|
||||
"resolved": "https://registry.npmjs.org/@lumeweb/libs5/-/libs5-0.1.0-develop.11.tgz",
|
||||
"integrity": "sha512-xcajSNdXx19IYFzArXdGb9yQBexlzuXw0r2SGpdTUivkPRQN8xzaJ3IhqJifpjYMKWmIMKRocbrjIP7F/OGd+Q==",
|
||||
"version": "0.1.0-develop.13",
|
||||
"resolved": "https://registry.npmjs.org/@lumeweb/libs5/-/libs5-0.1.0-develop.13.tgz",
|
||||
"integrity": "sha512-iZfXlTF6MtHqgBoUOGj1d90LlMBXjiGzXjqlueKvhusMxKzMwgvhOZLQmp1klNx/BGbG02eYRswCsYXhcQDp7w==",
|
||||
"dependencies": {
|
||||
"@noble/curves": "^1.1.0",
|
||||
"@noble/hashes": "^1.3.1",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@lumeweb/libs5-transport-hyper",
|
||||
"version": "0.1.0-develop.4",
|
||||
"version": "0.1.0-develop.5",
|
||||
"type": "module",
|
||||
"main": "lib/index.js",
|
||||
"repository": {
|
||||
|
@ -24,7 +24,7 @@
|
|||
"lib"
|
||||
],
|
||||
"dependencies": {
|
||||
"@lumeweb/libs5": "^0.1.0-develop.11",
|
||||
"@lumeweb/libs5": "^0.1.0-develop.13",
|
||||
"streamx": "^2.15.1"
|
||||
}
|
||||
}
|
||||
|
|
10
src/index.ts
10
src/index.ts
|
@ -3,6 +3,8 @@ import { URL } from "url";
|
|||
import { Buffer } from "buffer";
|
||||
import { Readable } from "streamx";
|
||||
|
||||
type OmitSocket<T> = Omit<T, "socket">;
|
||||
|
||||
export default class HyperTransportPeer extends BasePeer {
|
||||
private _peer: any;
|
||||
private _muxer: any;
|
||||
|
@ -11,14 +13,16 @@ export default class HyperTransportPeer extends BasePeer {
|
|||
private _pipe?: any;
|
||||
|
||||
constructor(
|
||||
options: PeerConstructorOptions & {
|
||||
options: OmitSocket<PeerConstructorOptions> & {
|
||||
peer: any;
|
||||
muxer: any;
|
||||
protocol: string;
|
||||
socket?: any;
|
||||
},
|
||||
) {
|
||||
super(options);
|
||||
super({
|
||||
...options,
|
||||
socket: undefined,
|
||||
});
|
||||
const { peer, muxer, protocol } = options;
|
||||
this._peer = peer;
|
||||
this._muxer = muxer;
|
||||
|
|
Loading…
Reference in New Issue