ipfs-http-client
Advanced tools
Comparing version 58.0.0 to 58.0.1-2a830bf5.0
@@ -5,4 +5,4 @@ /** | ||
*/ | ||
export const createAdd: import("../lib/configure.js").Factory<(addr: Multiaddr, options?: (import("ipfs-core-types").AbortOptions & import("../types").HTTPClientExtraOptions) | undefined) => Promise<{ | ||
Peers: Multiaddr[]; | ||
export const createAdd: import("../lib/configure.js").Factory<(addr: import("@multiformats/multiaddr").Multiaddr, options?: (import("ipfs-core-types").AbortOptions & import("../types").HTTPClientExtraOptions) | undefined) => Promise<{ | ||
Peers: import("@multiformats/multiaddr").Multiaddr[]; | ||
}>>; | ||
@@ -9,0 +9,0 @@ export type HTTPClientExtraOptions = import('../types').HTTPClientExtraOptions; |
@@ -6,3 +6,3 @@ /** | ||
export const createClear: import("../lib/configure.js").Factory<(options?: (import("ipfs-core-types").AbortOptions & import("../types").HTTPClientExtraOptions) | undefined) => Promise<{ | ||
Peers: Multiaddr[]; | ||
Peers: import("@multiformats/multiaddr").Multiaddr[]; | ||
}>>; | ||
@@ -9,0 +9,0 @@ export type HTTPClientExtraOptions = import('../types').HTTPClientExtraOptions; |
@@ -6,3 +6,3 @@ /** | ||
export const createList: import("../lib/configure.js").Factory<(options?: (import("ipfs-core-types").AbortOptions & import("../types").HTTPClientExtraOptions) | undefined) => Promise<{ | ||
Peers: Multiaddr[]; | ||
Peers: import("@multiformats/multiaddr").Multiaddr[]; | ||
}>>; | ||
@@ -9,0 +9,0 @@ export type HTTPClientExtraOptions = import('../types').HTTPClientExtraOptions; |
@@ -6,3 +6,3 @@ /** | ||
export const createReset: import("../lib/configure.js").Factory<(options?: (import("ipfs-core-types").AbortOptions & import("../types").HTTPClientExtraOptions) | undefined) => Promise<{ | ||
Peers: Multiaddr[]; | ||
Peers: import("@multiformats/multiaddr").Multiaddr[]; | ||
}>>; | ||
@@ -9,0 +9,0 @@ export type HTTPClientExtraOptions = import('../types').HTTPClientExtraOptions; |
@@ -5,4 +5,4 @@ /** | ||
*/ | ||
export const createRm: import("../lib/configure.js").Factory<(addr: Multiaddr, options?: (import("ipfs-core-types").AbortOptions & import("../types").HTTPClientExtraOptions) | undefined) => Promise<{ | ||
Peers: Multiaddr[]; | ||
export const createRm: import("../lib/configure.js").Factory<(addr: import("@multiformats/multiaddr").Multiaddr, options?: (import("ipfs-core-types").AbortOptions & import("../types").HTTPClientExtraOptions) | undefined) => Promise<{ | ||
Peers: import("@multiformats/multiaddr").Multiaddr[]; | ||
}>>; | ||
@@ -9,0 +9,0 @@ export type HTTPClientExtraOptions = import('../types').HTTPClientExtraOptions; |
@@ -11,2 +11,3 @@ export function mapEvent(event: { | ||
export type PeerId = import('@libp2p/interface-peer-id').PeerId; | ||
export type Multiaddr = import('@multiformats/multiaddr').Multiaddr; | ||
//# sourceMappingURL=map-event.d.ts.map |
@@ -19,3 +19,3 @@ /** | ||
export { CID } from "multiformats/cid"; | ||
export { Multiaddr as multiaddr } from "@multiformats/multiaddr"; | ||
export { multiaddr } from "@multiformats/multiaddr"; | ||
export { default as urlSource } from "ipfs-utils/src/files/url-source.js"; | ||
@@ -22,0 +22,0 @@ export const globSource: typeof globSourceImport; |
@@ -6,3 +6,3 @@ export function errorHandler(response: Response): Promise<never>; | ||
*/ | ||
constructor(options?: string | import("../types").Options | URL | Multiaddr | undefined); | ||
constructor(options?: string | import("../types").Options | URL | import("@multiformats/multiaddr").Multiaddr | undefined); | ||
} | ||
@@ -12,4 +12,4 @@ export const HTTPError: typeof HTTP.HTTPError; | ||
export type Options = import('../types').Options; | ||
export type Multiaddr = import('@multiformats/multiaddr').Multiaddr; | ||
import HTTP from "ipfs-utils/src/http.js"; | ||
import { Multiaddr } from "@multiformats/multiaddr"; | ||
//# sourceMappingURL=core.d.ts.map |
@@ -5,5 +5,5 @@ /** | ||
*/ | ||
export const createLocalAddrs: import("../lib/configure.js").Factory<(options?: (import("ipfs-core-types").AbortOptions & import("../types").HTTPClientExtraOptions) | undefined) => Promise<Multiaddr[]>>; | ||
export const createLocalAddrs: import("../lib/configure.js").Factory<(options?: (import("ipfs-core-types").AbortOptions & import("../types").HTTPClientExtraOptions) | undefined) => Promise<import("@multiformats/multiaddr").Multiaddr[]>>; | ||
export type HTTPClientExtraOptions = import('../types').HTTPClientExtraOptions; | ||
export type SwarmAPI = import('ipfs-core-types/src/swarm').API<HTTPClientExtraOptions>; | ||
//# sourceMappingURL=local-addrs.d.ts.map |
{ | ||
"name": "ipfs-http-client", | ||
"version": "58.0.0", | ||
"version": "58.0.1-2a830bf5.0", | ||
"description": "A client library for the IPFS HTTP API", | ||
@@ -75,8 +75,8 @@ "license": "Apache-2.0 OR MIT", | ||
"@libp2p/peer-id": "^1.1.10", | ||
"@multiformats/multiaddr": "^10.4.0", | ||
"@multiformats/multiaddr": "^11.0.0", | ||
"any-signal": "^3.0.0", | ||
"dag-jose": "^2.0.1", | ||
"err-code": "^3.0.1", | ||
"ipfs-core-types": "^0.12.0", | ||
"ipfs-core-utils": "^0.16.0", | ||
"ipfs-core-types": "^0.12.1-2a830bf5.0", | ||
"ipfs-core-utils": "^0.16.1-2a830bf5.0", | ||
"ipfs-utils": "^9.0.6", | ||
@@ -95,3 +95,3 @@ "it-first": "^1.0.6", | ||
"go-ipfs": "^0.12.1", | ||
"ipfsd-ctl": "^12.0.0", | ||
"ipfsd-ctl": "^12.0.3", | ||
"it-all": "^1.0.4", | ||
@@ -109,3 +109,3 @@ "it-first": "^1.0.4", | ||
}, | ||
"gitHead": "89aeaf8e25320276391653104981e37a73f29de9" | ||
"gitHead": "ec3e046a48458e999e557f7adea92e304bd7b0e8" | ||
} |
import { configure } from '../lib/configure.js' | ||
import { toUrlSearchParams } from '../lib/to-url-search-params.js' | ||
import { Multiaddr } from '@multiformats/multiaddr' | ||
import { multiaddr } from '@multiformats/multiaddr' | ||
@@ -26,3 +26,3 @@ /** | ||
return { Peers: Peers.map((/** @type {string} */ ma) => new Multiaddr(ma)) } | ||
return { Peers: Peers.map((/** @type {string} */ ma) => multiaddr(ma)) } | ||
} | ||
@@ -29,0 +29,0 @@ |
import { configure } from '../lib/configure.js' | ||
import { toUrlSearchParams } from '../lib/to-url-search-params.js' | ||
import { Multiaddr } from '@multiformats/multiaddr' | ||
import { multiaddr } from '@multiformats/multiaddr' | ||
@@ -26,3 +26,3 @@ /** | ||
return { Peers: Peers.map((/** @type {string} */ ma) => new Multiaddr(ma)) } | ||
return { Peers: Peers.map((/** @type {string} */ ma) => multiaddr(ma)) } | ||
} | ||
@@ -29,0 +29,0 @@ |
import { configure } from '../lib/configure.js' | ||
import { toUrlSearchParams } from '../lib/to-url-search-params.js' | ||
import { Multiaddr } from '@multiformats/multiaddr' | ||
import { multiaddr } from '@multiformats/multiaddr' | ||
@@ -23,3 +23,3 @@ /** | ||
return { Peers: Peers.map((/** @type {string} */ ma) => new Multiaddr(ma)) } | ||
return { Peers: Peers.map((/** @type {string} */ ma) => multiaddr(ma)) } | ||
} | ||
@@ -26,0 +26,0 @@ |
import { configure } from '../lib/configure.js' | ||
import { toUrlSearchParams } from '../lib/to-url-search-params.js' | ||
import { Multiaddr } from '@multiformats/multiaddr' | ||
import { multiaddr } from '@multiformats/multiaddr' | ||
@@ -26,3 +26,3 @@ /** | ||
return { Peers: Peers.map((/** @type {string} */ ma) => new Multiaddr(ma)) } | ||
return { Peers: Peers.map((/** @type {string} */ ma) => multiaddr(ma)) } | ||
} | ||
@@ -29,0 +29,0 @@ |
import { configure } from '../lib/configure.js' | ||
import { toUrlSearchParams } from '../lib/to-url-search-params.js' | ||
import { Multiaddr } from '@multiformats/multiaddr' | ||
import { multiaddr } from '@multiformats/multiaddr' | ||
@@ -26,3 +26,3 @@ /** | ||
return { Peers: Peers.map((/** @type {string} */ ma) => new Multiaddr(ma)) } | ||
return { Peers: Peers.map((/** @type {string} */ ma) => multiaddr(ma)) } | ||
} | ||
@@ -29,0 +29,0 @@ |
@@ -12,3 +12,3 @@ import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string' | ||
} from './response-types.js' | ||
import { Multiaddr } from '@multiformats/multiaddr' | ||
import { multiaddr } from '@multiformats/multiaddr' | ||
import { peerIdFromString } from '@libp2p/peer-id' | ||
@@ -18,2 +18,3 @@ | ||
* @typedef {import('@libp2p/interface-peer-id').PeerId} PeerId | ||
* @typedef {import('@multiformats/multiaddr').Multiaddr} Multiaddr | ||
*/ | ||
@@ -42,4 +43,4 @@ | ||
messageName: 'PUT_VALUE', | ||
closer: (event.Responses || []).map(({ ID, Addrs }) => ({ id: peerIdFromString(ID), multiaddrs: Addrs.map(addr => new Multiaddr(addr)), protocols: [] })), | ||
providers: (event.Responses || []).map(({ ID, Addrs }) => ({ id: peerIdFromString(ID), multiaddrs: Addrs.map(addr => new Multiaddr(addr)), protocols: [] })) | ||
closer: (event.Responses || []).map(({ ID, Addrs }) => ({ id: peerIdFromString(ID), multiaddrs: Addrs.map(addr => multiaddr(addr)), protocols: [] })), | ||
providers: (event.Responses || []).map(({ ID, Addrs }) => ({ id: peerIdFromString(ID), multiaddrs: Addrs.map(addr => multiaddr(addr)), protocols: [] })) | ||
// TODO: how to infer this from the go-ipfs response | ||
@@ -65,3 +66,3 @@ // record: ??? | ||
id: peerIdFromString(event.Responses[0].ID), | ||
multiaddrs: event.Responses[0].Addrs.map(addr => new Multiaddr(addr)), | ||
multiaddrs: event.Responses[0].Addrs.map(addr => multiaddr(addr)), | ||
protocols: [] | ||
@@ -90,3 +91,3 @@ } | ||
type: event.Type, | ||
providers: event.Responses.map(({ ID, Addrs }) => ({ id: peerIdFromString(ID), multiaddrs: Addrs.map(addr => new Multiaddr(addr)), protocols: [] })) | ||
providers: event.Responses.map(({ ID, Addrs }) => ({ id: peerIdFromString(ID), multiaddrs: Addrs.map(addr => multiaddr(addr)), protocols: [] })) | ||
} | ||
@@ -93,0 +94,0 @@ } |
import { objectToCamel } from './lib/object-to-camel.js' | ||
import { Multiaddr } from '@multiformats/multiaddr' | ||
import { multiaddr } from '@multiformats/multiaddr' | ||
import { configure } from './lib/configure.js' | ||
@@ -34,3 +34,3 @@ import { toUrlSearchParams } from './lib/to-url-search-params.js' | ||
if (output.addresses) { | ||
output.addresses = output.addresses.map((/** @type {string} */ ma) => new Multiaddr(ma)) | ||
output.addresses = output.addresses.map((/** @type {string} */ ma) => multiaddr(ma)) | ||
} | ||
@@ -37,0 +37,0 @@ |
@@ -151,4 +151,4 @@ /* eslint-env browser */ | ||
export { CID } from 'multiformats/cid' | ||
export { Multiaddr as multiaddr } from '@multiformats/multiaddr' | ||
export { multiaddr } from '@multiformats/multiaddr' | ||
export { default as urlSource } from 'ipfs-utils/src/files/url-source.js' | ||
export const globSource = globSourceImport |
/* eslint-env browser */ | ||
import { Multiaddr } from '@multiformats/multiaddr' | ||
import { isMultiaddr } from '@multiformats/multiaddr' | ||
import { isBrowser, isWebWorker, isNode } from 'ipfs-utils/src/env.js' | ||
@@ -23,2 +23,3 @@ import parseDuration from 'parse-duration' | ||
* @typedef {import('../types').Options} Options | ||
* @typedef {import('@multiformats/multiaddr').Multiaddr} Multiaddr | ||
*/ | ||
@@ -36,7 +37,7 @@ | ||
if (typeof options === 'string' || Multiaddr.isMultiaddr(options)) { | ||
if (typeof options === 'string' || isMultiaddr(options)) { | ||
url = new URL(toUrlString(options)) | ||
} else if (options instanceof URL) { | ||
url = options | ||
} else if (typeof options.url === 'string' || Multiaddr.isMultiaddr(options.url)) { | ||
} else if (typeof options.url === 'string' || isMultiaddr(options.url)) { | ||
url = new URL(toUrlString(options.url)) | ||
@@ -43,0 +44,0 @@ opts = options |
@@ -1,2 +0,2 @@ | ||
import { Multiaddr } from '@multiformats/multiaddr' | ||
import { multiaddr } from '@multiformats/multiaddr' | ||
import { configure } from '../lib/configure.js' | ||
@@ -27,3 +27,3 @@ import { toUrlSearchParams } from '../lib/to-url-search-params.js' | ||
id: peerIdFromString(id), | ||
addrs: (Addrs[id] || []).map(a => new Multiaddr(a)) | ||
addrs: (Addrs[id] || []).map(a => multiaddr(a)) | ||
})) | ||
@@ -30,0 +30,0 @@ } |
@@ -1,2 +0,2 @@ | ||
import { Multiaddr } from '@multiformats/multiaddr' | ||
import { multiaddr } from '@multiformats/multiaddr' | ||
import { configure } from '../lib/configure.js' | ||
@@ -24,5 +24,5 @@ import { toUrlSearchParams } from '../lib/to-url-search-params.js' | ||
return (Strings || []).map(a => new Multiaddr(a)) | ||
return (Strings || []).map(a => multiaddr(a)) | ||
} | ||
return localAddrs | ||
}) |
@@ -1,2 +0,2 @@ | ||
import { Multiaddr } from '@multiformats/multiaddr' | ||
import { multiaddr } from '@multiformats/multiaddr' | ||
import { configure } from '../lib/configure.js' | ||
@@ -27,3 +27,3 @@ import { toUrlSearchParams } from '../lib/to-url-search-params.js' | ||
return { | ||
addr: new Multiaddr(peer.Addr), | ||
addr: multiaddr(peer.Addr), | ||
peer: peerIdFromString(peer.Peer), | ||
@@ -30,0 +30,0 @@ muxer: peer.Muxer, |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
490543
6707
2
- Removed@multiformats/multiaddr@10.5.0(transitive)
- Removedclone-regexp@3.0.0(transitive)
- Removedconvert-hrtime@5.0.0(transitive)
- Removedfunction-timeout@0.1.1(transitive)
- Removedip-regex@5.0.0(transitive)
- Removedis-ip@5.0.1(transitive)
- Removedis-regexp@3.1.0(transitive)
- Removedsuper-regex@0.2.0(transitive)
- Removedtime-span@5.1.0(transitive)