@helia/http 1.0.11-23e62e1 → 1.0.11-4f14996

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 CHANGED
@@ -54,18 +54,19 @@ fs.cat(CID.parse('bafyFoo'))
54
54
  ```typescript
55
55
  import { createHeliaHTTP } from '@helia/http'
56
56
  import { trustlessGateway } from '@helia/block-brokers'
57
- import { delegatedHTTPRouting } from '@helia/routers'
57
+ import { delegatedHTTPRouting, httpGatewayRouting } from '@helia/routers'
58
58
  import { unixfs } from '@helia/unixfs'
59
59
  import { CID } from 'multiformats/cid'
60
60
 
61
61
  const helia = await createHeliaHTTP({
62
62
  blockBrokers: [
63
- trustlessGateway({
64
- gateways: ['https://cloudflare-ipfs.com', 'https://ipfs.io'],
65
- }),
63
+ trustlessGateway()
66
64
  ],
67
65
  routers: [
68
- delegatedHTTPRouting('https://delegated-ipfs.dev')
66
+ delegatedHTTPRouting('https://delegated-ipfs.dev'),
67
+ httpGatewayRouting({
68
+ gateways: ['https://cloudflare-ipfs.com', 'https://ipfs.io']
69
+ })
69
70
  ]
70
71
  })
71
72
 
@@ -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
  *
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;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"}
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
  *
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;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,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,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": "1.0.11-23e62e1",
3
+ "version": "1.0.11-4f14996",
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,10 +54,10 @@
53
54
  "test:electron-main": "aegir test -t electron-main"
54
55
  },
55
56
  "dependencies": {
56
- "@helia/block-brokers": "3.0.4-23e62e1",
57
- "@helia/interface": "4.3.1-23e62e1",
58
- "@helia/routers": "1.1.1-23e62e1",
59
- "@helia/utils": "0.3.3-23e62e1",
57
+ "@helia/block-brokers": "3.0.4-4f14996",
58
+ "@helia/interface": "4.3.1-4f14996",
59
+ "@helia/routers": "1.1.1-4f14996",
60
+ "@helia/utils": "0.3.3-4f14996",
60
61
  "blockstore-core": "^5.0.0",
61
62
  "datastore-core": "^10.0.0"
62
63
  },
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
  *