File tree 4 files changed +11
-10
lines changed
4 files changed +11
-10
lines changed Original file line number Diff line number Diff line change 41
41
"lint" : " aegir lint" ,
42
42
"coverage" : " npx nyc -r html npm run test:node -- --bail" ,
43
43
"clean" : " rimraf ./dist" ,
44
- "dep-check" : " aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller"
44
+ "dep-check" : " aegir dep-check -i ipfs-core -i rimraf -i ipfs-core-types -i abort-controller -i ipld "
45
45
},
46
46
"dependencies" : {
47
47
"abort-controller" : " ^3.0.0" ,
48
48
"any-signal" : " ^2.1.2" ,
49
- "cids" : " ^1.1.5 " ,
49
+ "cids" : " ^1.1.6 " ,
50
50
"debug" : " ^4.1.1" ,
51
51
"form-data" : " ^4.0.0" ,
52
52
"ipfs-core-types" : " ^0.3.1" ,
53
53
"ipfs-core-utils" : " ^0.7.2" ,
54
54
"ipfs-unixfs" : " ^4.0.1" ,
55
55
"ipfs-utils" : " ^6.0.4" ,
56
+ "ipld" : " ^0.29.0" ,
56
57
"ipld-block" : " ^0.11.0" ,
57
58
"ipld-dag-cbor" : " ^0.18.0" ,
58
- "ipld-dag-pb" : " ^0.22.0 " ,
59
+ "ipld-dag-pb" : " ^0.22.1 " ,
59
60
"ipld-raw" : " ^7.0.0" ,
60
61
"it-last" : " ^1.0.4" ,
61
62
"it-map" : " ^1.0.4" ,
Original file line number Diff line number Diff line change @@ -15,8 +15,8 @@ const DEFAULT_HOST = isBrowser || isWebWorker ? location.hostname : 'localhost'
15
15
const DEFAULT_PORT = isBrowser || isWebWorker ? location . port : '5001'
16
16
17
17
/**
18
- * @typedef {import('electron -fetch').Response } Response
19
- * @typedef {import('ipfs-utils/dist/types/electron -fetch').Request } Request
18
+ * @typedef {import('ipfs-utils/dist/types/native -fetch').Response } Response
19
+ * @typedef {import('ipfs-utils/dist/types/native -fetch').Request } Request
20
20
* @typedef {import('ipfs-utils/src/types').HTTPOptions } HTTPOptions
21
21
* @typedef {import('../types').Options } Options
22
22
*/
@@ -188,7 +188,6 @@ class Client extends HTTP {
188
188
/**
189
189
* @param {string | Request } resource
190
190
* @param {HTTPOptions } options
191
- * @returns {Promise<import('ipfs-utils/dist/types/electron-fetch').Response> }
192
191
*/
193
192
this . fetch = ( resource , options = { } ) => {
194
193
if ( typeof resource === 'string' && ! resource . startsWith ( '/' ) ) {
Original file line number Diff line number Diff line change @@ -45,8 +45,8 @@ module.exports = ({ formats = [], loadFormat = noop } = {}) => {
45
45
* @param {import('multicodec').CodecName } codec - The code to load the format for
46
46
*/
47
47
const loadResolver = async ( codec ) => {
48
- // @ts -ignore - codec is a string and not a CodecName
49
- const number = multicodec . getNumber ( codec )
48
+ const number = multicodec . getCodeFromName ( codec )
49
+ // @ts -ignore wat
50
50
const format = configuredFormats [ number ] || await loadFormat ( codec )
51
51
52
52
if ( ! format ) {
Original file line number Diff line number Diff line change @@ -2,21 +2,22 @@ import { Format as IPLDFormat } from 'interface-ipld-format'
2
2
import { LoadFormatFn } from 'ipld'
3
3
import { Agent as HttpAgent } from 'http'
4
4
import { Agent as HttpsAgent } from 'https'
5
+ import Multiaddr from 'multiaddr'
5
6
6
7
export interface Options {
7
8
host ?: string
8
9
port ?: number
9
10
protocol ?: string
10
11
headers ?: Headers | Record < string , string >
11
- timeout ?: number | sttring
12
+ timeout ?: number | string
12
13
apiPath ?: string
13
14
url ?: URL | string | Multiaddr
14
15
ipld ?: IPLDOptions
15
16
agent ?: HttpAgent | HttpsAgent
16
17
}
17
18
18
19
export interface IPLDOptions {
19
- formats ?: IPLDFormat [ ]
20
+ formats ?: IPLDFormat < any > [ ]
20
21
loadFormat ?: LoadFormatFn
21
22
}
22
23
You can’t perform that action at this time.
0 commit comments