Compare commits

...

5 Commits

2 changed files with 41 additions and 2 deletions

View File

@ -25,6 +25,7 @@
"@libp2p/mplex": "^7.1.3", "@libp2p/mplex": "^7.1.3",
"@libp2p/tcp": "^6.1.5", "@libp2p/tcp": "^6.1.5",
"@libp2p/utils": "^3.0.7", "@libp2p/utils": "^3.0.7",
"@lumeweb/kernel-protomux-client": "git+https://git.lumeweb.com/LumeWeb/kernel-protomux-client.git",
"@lumeweb/kernel-swarm-client": "git+https://git.lumeweb.com/LumeWeb/kernel-swarm-client.git", "@lumeweb/kernel-swarm-client": "git+https://git.lumeweb.com/LumeWeb/kernel-swarm-client.git",
"@multiformats/mafmt": "^11.1.2", "@multiformats/mafmt": "^11.1.2",
"@peculiar/webcrypto": "git+https://git.lumeweb.com/LumeWeb/webcrypto.git", "@peculiar/webcrypto": "git+https://git.lumeweb.com/LumeWeb/webcrypto.git",
@ -59,8 +60,6 @@
"@libp2p/peer-id": "^2.0.3", "@libp2p/peer-id": "^2.0.3",
"@libp2p/peer-id-factory": "^2.0.3", "@libp2p/peer-id-factory": "^2.0.3",
"@libp2p/websockets": "^5.0.8", "@libp2p/websockets": "^5.0.8",
"@lumeweb/kernel-dht-client": "git+https://git.lumeweb.com/LumeWeb/kernel-swarm-client.git",
"@lumeweb/kernel-rpc-client": "git+https://git.lumeweb.com/LumeWeb/kernel-rpc-client.git",
"@lumeweb/libhyperproxy": "git+https://git.lumeweb.com/LumeWeb/libhyperproxy.git", "@lumeweb/libhyperproxy": "git+https://git.lumeweb.com/LumeWeb/libhyperproxy.git",
"@multiformats/multiaddr": "^11.6.1", "@multiformats/multiaddr": "^11.6.1",
"@scure/bip39": "^1.2.0", "@scure/bip39": "^1.2.0",
@ -103,5 +102,13 @@
"net": "./src/net.ts", "net": "./src/net.ts",
"crypto": "crypto-browserify", "crypto": "crypto-browserify",
"stream": "stream-browserify" "stream": "stream-browserify"
},
"pnpm": {
"overrides": {
"protomux": "git+https://git.lumeweb.com/LumeWeb/kernel-protomux-client.git"
},
"patchedDependencies": {
"@libp2p/tcp@6.1.5": "patches/@libp2p__tcp@6.1.5.patch"
}
} }
} }

View File

@ -0,0 +1,32 @@
diff --git a/dist/src/index.js b/dist/src/index.js
index dab2ad35e64981f00c59a48ccbcbe407eb7749e6..7179d4ad8137be05e5f080ca67ea433c9dfaeeb0 100644
--- a/dist/src/index.js
+++ b/dist/src/index.js
@@ -8,7 +8,7 @@ import { AbortError, CodeError } from '@libp2p/interfaces/errors';
import { CODE_CIRCUIT, CODE_P2P, CODE_UNIX } from './constants.js';
import { symbol } from '@libp2p/interface-transport';
const log = logger('libp2p:tcp');
-class TCP {
+export class TCP {
constructor(components, options = {}) {
this.opts = options;
this.components = components;
diff --git a/package.json b/package.json
index 2e38ab0bdeef25a898770aedd0459e8c0cd79a9b..9ec4c16e10347e5f9717998725387b30d5b59907 100644
--- a/package.json
+++ b/package.json
@@ -36,6 +36,14 @@
".": {
"types": "./dist/src/index.d.ts",
"import": "./dist/src/index.js"
+ },
+ "./socket-to-conn": {
+ "types": "./dist/src/socket-to-conn.d.ts",
+ "import": "./dist/src/socket-to-conn.js"
+ },
+ "./utils": {
+ "types": "./dist/src/utils.d.ts",
+ "import": "./dist/src/utils.js"
}
},
"eslintConfig": {