@helia/http 1.0.5 → 1.0.6
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/dist/index.min.js +15 -4
- package/dist/src/index.d.ts +0 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +3 -3
- package/dist/src/index.js.map +1 -1
- package/package.json +5 -5
- package/src/index.ts +3 -3
package/dist/src/index.d.ts
CHANGED
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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
|
|
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"}
|
package/dist/src/index.js
CHANGED
|
@@ -43,14 +43,13 @@
|
|
|
43
43
|
* ```
|
|
44
44
|
*/
|
|
45
45
|
import { trustlessGateway } from '@helia/block-brokers';
|
|
46
|
-
import { delegatedHTTPRouting } from '@helia/routers';
|
|
46
|
+
import { delegatedHTTPRouting, httpGatewayRouting } from '@helia/routers';
|
|
47
47
|
import { Helia as HeliaClass } from '@helia/utils';
|
|
48
48
|
import { MemoryBlockstore } from 'blockstore-core';
|
|
49
49
|
import { MemoryDatastore } from 'datastore-core';
|
|
50
50
|
// re-export interface types so people don't have to depend on @helia/interface
|
|
51
51
|
// if they don't want to
|
|
52
52
|
export * from '@helia/interface';
|
|
53
|
-
/**
|
|
54
53
|
/**
|
|
55
54
|
* Create and return a Helia node
|
|
56
55
|
*/
|
|
@@ -65,7 +64,8 @@ export async function createHeliaHTTP(init = {}) {
|
|
|
65
64
|
trustlessGateway()
|
|
66
65
|
],
|
|
67
66
|
routers: init.routers ?? [
|
|
68
|
-
delegatedHTTPRouting('https://delegated-ipfs.dev')
|
|
67
|
+
delegatedHTTPRouting('https://delegated-ipfs.dev'),
|
|
68
|
+
httpGatewayRouting()
|
|
69
69
|
]
|
|
70
70
|
});
|
|
71
71
|
if (init.start !== false) {
|
package/dist/src/index.js.map
CHANGED
|
@@ -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,MAAM,gBAAgB,CAAA;
|
|
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,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.
|
|
3
|
+
"version": "1.0.6",
|
|
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",
|
|
@@ -53,10 +53,10 @@
|
|
|
53
53
|
"test:electron-main": "aegir test -t electron-main"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@helia/block-brokers": "^2.1.
|
|
57
|
-
"@helia/interface": "^4.
|
|
58
|
-
"@helia/routers": "^1.0
|
|
59
|
-
"@helia/utils": "^0.
|
|
56
|
+
"@helia/block-brokers": "^2.1.2",
|
|
57
|
+
"@helia/interface": "^4.3.0",
|
|
58
|
+
"@helia/routers": "^1.1.0",
|
|
59
|
+
"@helia/utils": "^0.3.0",
|
|
60
60
|
"blockstore-core": "^4.4.0",
|
|
61
61
|
"datastore-core": "^9.2.9"
|
|
62
62
|
},
|
package/src/index.ts
CHANGED
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
*/
|
|
45
45
|
|
|
46
46
|
import { trustlessGateway } from '@helia/block-brokers'
|
|
47
|
-
import { delegatedHTTPRouting } from '@helia/routers'
|
|
47
|
+
import { delegatedHTTPRouting, httpGatewayRouting } from '@helia/routers'
|
|
48
48
|
import { Helia as HeliaClass, type HeliaInit } from '@helia/utils'
|
|
49
49
|
import { MemoryBlockstore } from 'blockstore-core'
|
|
50
50
|
import { MemoryDatastore } from 'datastore-core'
|
|
@@ -61,7 +61,6 @@ export interface HeliaHTTPInit extends HeliaInit {
|
|
|
61
61
|
start?: boolean
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
/**
|
|
65
64
|
/**
|
|
66
65
|
* Create and return a Helia node
|
|
67
66
|
*/
|
|
@@ -77,7 +76,8 @@ export async function createHeliaHTTP (init: Partial<HeliaHTTPInit> = {}): Promi
|
|
|
77
76
|
trustlessGateway()
|
|
78
77
|
],
|
|
79
78
|
routers: init.routers ?? [
|
|
80
|
-
delegatedHTTPRouting('https://delegated-ipfs.dev')
|
|
79
|
+
delegatedHTTPRouting('https://delegated-ipfs.dev'),
|
|
80
|
+
httpGatewayRouting()
|
|
81
81
|
]
|
|
82
82
|
})
|
|
83
83
|
|