@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.
@@ -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,OA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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": "1.0.11",
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": "^3.0.4",
57
- "@helia/interface": "^4.3.1",
58
- "@helia/routers": "^1.1.1",
59
- "@helia/utils": "^0.3.3",
60
- "blockstore-core": "^4.4.0",
61
- "datastore-core": "^9.2.9"
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": "^1.1.4",
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": "^18.0.0",
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
  *