mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-06-28 16:31:35 +00:00
chore: remove ipfs-utils dep (#953)
* chore: remove ipfs-utils dep We only use it for the env detection, so use [wherearewe](https://www.npmjs.com/package/wherearewe) instead which is that, but pulled out into a tiny module. The `TextDecoder` class is global everywhere we support so we don't need to pull it in from `ipfs-utils` and it's been removed from v8 anyway. * chore: update ipfs-http-client
This commit is contained in:
@ -105,7 +105,7 @@ describe('content-routing', () => {
|
||||
beforeEach(async () => {
|
||||
const [peerId] = await peerUtils.createPeerId({ fixture: true })
|
||||
|
||||
delegate = new DelegatedContentRouter(peerId, ipfsHttpClient({
|
||||
delegate = new DelegatedContentRouter(peerId, ipfsHttpClient.create({
|
||||
host: '0.0.0.0',
|
||||
protocol: 'http',
|
||||
port: 60197
|
||||
@ -253,7 +253,7 @@ describe('content-routing', () => {
|
||||
beforeEach(async () => {
|
||||
const [peerId] = await peerUtils.createPeerId({ fixture: true })
|
||||
|
||||
delegate = new DelegatedContentRouter(peerId, ipfsHttpClient({
|
||||
delegate = new DelegatedContentRouter(peerId, ipfsHttpClient.create({
|
||||
host: '0.0.0.0',
|
||||
protocol: 'http',
|
||||
port: 60197
|
||||
|
@ -113,7 +113,7 @@ describe('peer-routing', () => {
|
||||
let delegate
|
||||
|
||||
beforeEach(async () => {
|
||||
delegate = new DelegatedPeerRouter(ipfsHttpClient({
|
||||
delegate = new DelegatedPeerRouter(ipfsHttpClient.create({
|
||||
host: '0.0.0.0',
|
||||
protocol: 'http',
|
||||
port: 60197
|
||||
@ -288,7 +288,7 @@ describe('peer-routing', () => {
|
||||
let delegate
|
||||
|
||||
beforeEach(async () => {
|
||||
delegate = new DelegatedPeerRouter(ipfsHttpClient({
|
||||
delegate = new DelegatedPeerRouter(ipfsHttpClient.create({
|
||||
host: '0.0.0.0',
|
||||
protocol: 'http',
|
||||
port: 60197
|
||||
|
@ -515,7 +515,7 @@ describe('auto-relay', () => {
|
||||
|
||||
// Create 2 nodes, and turn HOP on for the relay
|
||||
;[local, remote, relayLibp2p] = peerIds.map((peerId, index) => {
|
||||
const delegate = new DelegatedContentRouter(peerId, ipfsHttpClient({
|
||||
const delegate = new DelegatedContentRouter(peerId, ipfsHttpClient.create({
|
||||
host: '0.0.0.0',
|
||||
protocol: 'http',
|
||||
port: 60197
|
||||
|
@ -35,13 +35,13 @@ async function main() {
|
||||
// create a peerId
|
||||
const peerId = await PeerId.create()
|
||||
|
||||
const delegatedPeerRouting = new DelegatedPeerRouter(ipfsHttpClient({
|
||||
const delegatedPeerRouting = new DelegatedPeerRouter(ipfsHttpClient.create({
|
||||
host: 'node0.delegate.ipfs.io', // In production you should setup your own delegates
|
||||
protocol: 'https',
|
||||
port: 443
|
||||
}))
|
||||
|
||||
const delegatedContentRouting = new DelegatedContentRouter(peerId, ipfsHttpClient({
|
||||
const delegatedContentRouting = new DelegatedContentRouter(peerId, ipfsHttpClient.create({
|
||||
host: 'node0.delegate.ipfs.io', // In production you should setup your own delegates
|
||||
protocol: 'https',
|
||||
port: 443
|
||||
|
Reference in New Issue
Block a user