@helia/http 1.0.11 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -5
- package/dist/index.min.js +12 -13
- package/dist/src/index.d.ts +6 -5
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +6 -5
- package/dist/src/index.js.map +1 -1
- package/package.json +10 -9
- package/src/index.ts +6 -5
package/dist/src/index.d.ts
CHANGED
|
@@ -23,18 +23,19 @@
|
|
|
23
23
|
* ```typescript
|
|
24
24
|
* import { createHeliaHTTP } from '@helia/http'
|
|
25
25
|
* import { trustlessGateway } from '@helia/block-brokers'
|
|
26
|
-
* import { delegatedHTTPRouting } from '@helia/routers'
|
|
26
|
+
* import { delegatedHTTPRouting, httpGatewayRouting } from '@helia/routers'
|
|
27
27
|
* import { unixfs } from '@helia/unixfs'
|
|
28
28
|
* import { CID } from 'multiformats/cid'
|
|
29
29
|
*
|
|
30
30
|
* const helia = await createHeliaHTTP({
|
|
31
31
|
* blockBrokers: [
|
|
32
|
-
* trustlessGateway(
|
|
33
|
-
* gateways: ['https://cloudflare-ipfs.com', 'https://ipfs.io'],
|
|
34
|
-
* }),
|
|
32
|
+
* trustlessGateway()
|
|
35
33
|
* ],
|
|
36
34
|
* routers: [
|
|
37
|
-
* delegatedHTTPRouting('https://delegated-ipfs.dev')
|
|
35
|
+
* delegatedHTTPRouting('https://delegated-ipfs.dev'),
|
|
36
|
+
* httpGatewayRouting({
|
|
37
|
+
* gateways: ['https://cloudflare-ipfs.com', 'https://ipfs.io']
|
|
38
|
+
* })
|
|
38
39
|
* ]
|
|
39
40
|
* })
|
|
40
41
|
*
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAIH,OAAO,EAAuB,KAAK,SAAS,EAAE,MAAM,cAAc,CAAA;AAGlE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAI7C,cAAc,kBAAkB,CAAA;AAEhC,MAAM,WAAW,aAAc,SAAQ,SAAS;IAC9C;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED;;GAEG;AACH,wBAAsB,eAAe,CAAE,IAAI,GAAE,OAAO,CAAC,aAAa,CAAM,GAAG,OAAO,CAAC,KAAK,CAAC,CAsBxF"}
|
package/dist/src/index.js
CHANGED
|
@@ -23,18 +23,19 @@
|
|
|
23
23
|
* ```typescript
|
|
24
24
|
* import { createHeliaHTTP } from '@helia/http'
|
|
25
25
|
* import { trustlessGateway } from '@helia/block-brokers'
|
|
26
|
-
* import { delegatedHTTPRouting } from '@helia/routers'
|
|
26
|
+
* import { delegatedHTTPRouting, httpGatewayRouting } from '@helia/routers'
|
|
27
27
|
* import { unixfs } from '@helia/unixfs'
|
|
28
28
|
* import { CID } from 'multiformats/cid'
|
|
29
29
|
*
|
|
30
30
|
* const helia = await createHeliaHTTP({
|
|
31
31
|
* blockBrokers: [
|
|
32
|
-
* trustlessGateway(
|
|
33
|
-
* gateways: ['https://cloudflare-ipfs.com', 'https://ipfs.io'],
|
|
34
|
-
* }),
|
|
32
|
+
* trustlessGateway()
|
|
35
33
|
* ],
|
|
36
34
|
* routers: [
|
|
37
|
-
* delegatedHTTPRouting('https://delegated-ipfs.dev')
|
|
35
|
+
* delegatedHTTPRouting('https://delegated-ipfs.dev'),
|
|
36
|
+
* httpGatewayRouting({
|
|
37
|
+
* gateways: ['https://cloudflare-ipfs.com', 'https://ipfs.io']
|
|
38
|
+
* })
|
|
38
39
|
* ]
|
|
39
40
|
* })
|
|
40
41
|
*
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AACvD,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AACzE,OAAO,EAAE,KAAK,IAAI,UAAU,EAAkB,MAAM,cAAc,CAAA;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAGhD,+EAA+E;AAC/E,wBAAwB;AACxB,cAAc,kBAAkB,CAAA;AAShC;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CAAE,OAA+B,EAAE;IACtE,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,IAAI,IAAI,eAAe,EAAE,CAAA;IACzD,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,IAAI,IAAI,gBAAgB,EAAE,CAAA;IAE5D,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC;QAC3B,GAAG,IAAI;QACP,SAAS;QACT,UAAU;QACV,YAAY,EAAE,IAAI,CAAC,YAAY,IAAI;YACjC,gBAAgB,EAAE;SACnB;QACD,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI;YACvB,oBAAoB,CAAC,4BAA4B,CAAC;YAClD,kBAAkB,EAAE;SACrB;KACF,CAAC,CAAA;IAEF,IAAI,IAAI,CAAC,KAAK,KAAK,KAAK,EAAE,CAAC;QACzB,MAAM,KAAK,CAAC,KAAK,EAAE,CAAA;IACrB,CAAC;IAED,OAAO,KAAK,CAAA;AACd,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@helia/http",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "A lightweight implementation of IPFS over HTTP in JavaScript",
|
|
5
5
|
"license": "Apache-2.0 OR MIT",
|
|
6
6
|
"homepage": "https://github.com/ipfs/helia/tree/main/packages/http#readme",
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
"clean": "aegir clean",
|
|
44
44
|
"lint": "aegir lint",
|
|
45
45
|
"dep-check": "aegir dep-check",
|
|
46
|
+
"doc-check": "aegir doc-check",
|
|
46
47
|
"build": "aegir build",
|
|
47
48
|
"test": "aegir test",
|
|
48
49
|
"test:chrome": "aegir test -t browser --cov",
|
|
@@ -53,19 +54,19 @@
|
|
|
53
54
|
"test:electron-main": "aegir test -t electron-main"
|
|
54
55
|
},
|
|
55
56
|
"dependencies": {
|
|
56
|
-
"@helia/block-brokers": "^
|
|
57
|
-
"@helia/interface": "^
|
|
58
|
-
"@helia/routers": "^
|
|
59
|
-
"@helia/utils": "^0.
|
|
60
|
-
"blockstore-core": "^
|
|
61
|
-
"datastore-core": "^
|
|
57
|
+
"@helia/block-brokers": "^4.0.0",
|
|
58
|
+
"@helia/interface": "^5.0.0",
|
|
59
|
+
"@helia/routers": "^2.0.0",
|
|
60
|
+
"@helia/utils": "^1.0.0",
|
|
61
|
+
"blockstore-core": "^5.0.0",
|
|
62
|
+
"datastore-core": "^10.0.0"
|
|
62
63
|
},
|
|
63
64
|
"devDependencies": {
|
|
64
|
-
"@libp2p/interface": "^
|
|
65
|
+
"@libp2p/interface": "^2.0.0",
|
|
65
66
|
"aegir": "^44.0.1",
|
|
66
67
|
"interface-datastore": "^8.2.11",
|
|
67
68
|
"multiformats": "^13.1.0",
|
|
68
|
-
"sinon": "^
|
|
69
|
+
"sinon": "^19.0.2",
|
|
69
70
|
"sinon-ts": "^2.0.0"
|
|
70
71
|
},
|
|
71
72
|
"sideEffects": false
|
package/src/index.ts
CHANGED
|
@@ -23,18 +23,19 @@
|
|
|
23
23
|
* ```typescript
|
|
24
24
|
* import { createHeliaHTTP } from '@helia/http'
|
|
25
25
|
* import { trustlessGateway } from '@helia/block-brokers'
|
|
26
|
-
* import { delegatedHTTPRouting } from '@helia/routers'
|
|
26
|
+
* import { delegatedHTTPRouting, httpGatewayRouting } from '@helia/routers'
|
|
27
27
|
* import { unixfs } from '@helia/unixfs'
|
|
28
28
|
* import { CID } from 'multiformats/cid'
|
|
29
29
|
*
|
|
30
30
|
* const helia = await createHeliaHTTP({
|
|
31
31
|
* blockBrokers: [
|
|
32
|
-
* trustlessGateway(
|
|
33
|
-
* gateways: ['https://cloudflare-ipfs.com', 'https://ipfs.io'],
|
|
34
|
-
* }),
|
|
32
|
+
* trustlessGateway()
|
|
35
33
|
* ],
|
|
36
34
|
* routers: [
|
|
37
|
-
* delegatedHTTPRouting('https://delegated-ipfs.dev')
|
|
35
|
+
* delegatedHTTPRouting('https://delegated-ipfs.dev'),
|
|
36
|
+
* httpGatewayRouting({
|
|
37
|
+
* gateways: ['https://cloudflare-ipfs.com', 'https://ipfs.io']
|
|
38
|
+
* })
|
|
38
39
|
* ]
|
|
39
40
|
* })
|
|
40
41
|
*
|