@xyo-network/bridge-http-express 4.1.7 → 4.2.1
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/bridge-http-express",
|
|
3
|
-
"version": "4.1
|
|
3
|
+
"version": "4.2.1",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -36,36 +36,36 @@
|
|
|
36
36
|
"package.json"
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@xylabs/assert": "^4.
|
|
40
|
-
"@xylabs/exists": "^4.
|
|
41
|
-
"@xylabs/express": "^4.
|
|
42
|
-
"@xylabs/hex": "^4.
|
|
43
|
-
"@xylabs/object": "^4.
|
|
44
|
-
"@xyo-network/boundwitness-model": "^4.1
|
|
45
|
-
"@xyo-network/bridge-http": "^4.1
|
|
46
|
-
"@xyo-network/bridge-model": "^4.1
|
|
47
|
-
"@xyo-network/module-model": "^4.1
|
|
48
|
-
"@xyo-network/payload-model": "^4.1
|
|
39
|
+
"@xylabs/assert": "^4.14.1",
|
|
40
|
+
"@xylabs/exists": "^4.14.1",
|
|
41
|
+
"@xylabs/express": "^4.14.1",
|
|
42
|
+
"@xylabs/hex": "^4.14.1",
|
|
43
|
+
"@xylabs/object": "^4.14.1",
|
|
44
|
+
"@xyo-network/boundwitness-model": "^4.2.1",
|
|
45
|
+
"@xyo-network/bridge-http": "^4.2.1",
|
|
46
|
+
"@xyo-network/bridge-model": "^4.2.1",
|
|
47
|
+
"@xyo-network/module-model": "^4.2.1",
|
|
48
|
+
"@xyo-network/payload-model": "^4.2.1",
|
|
49
49
|
"express": "^5.1.0",
|
|
50
50
|
"http-status-codes": "^2.3.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/express": "^5.0.3",
|
|
54
54
|
"@types/node": "^24.1.0",
|
|
55
|
-
"@xylabs/ts-scripts-yarn3": "^7.0.
|
|
56
|
-
"@xylabs/tsconfig": "^7.0.
|
|
57
|
-
"@xylabs/vitest-extended": "^4.
|
|
58
|
-
"@xyo-network/api-models": "^4.1
|
|
59
|
-
"@xyo-network/archivist-model": "^4.1
|
|
60
|
-
"@xyo-network/bridge-abstract": "^4.1
|
|
61
|
-
"@xyo-network/bridge-pub-sub": "^4.1
|
|
62
|
-
"@xyo-network/diviner-model": "^4.1
|
|
63
|
-
"@xyo-network/module-resolver": "^4.1
|
|
64
|
-
"@xyo-network/node-memory": "^4.1
|
|
65
|
-
"@xyo-network/node-model": "^4.1
|
|
66
|
-
"@xyo-network/payload-builder": "^4.1
|
|
67
|
-
"@xyo-network/payload-wrapper": "^4.1
|
|
68
|
-
"@xyo-network/wallet": "^4.1
|
|
55
|
+
"@xylabs/ts-scripts-yarn3": "^7.0.1",
|
|
56
|
+
"@xylabs/tsconfig": "^7.0.1",
|
|
57
|
+
"@xylabs/vitest-extended": "^4.14.1",
|
|
58
|
+
"@xyo-network/api-models": "^4.2.1",
|
|
59
|
+
"@xyo-network/archivist-model": "^4.2.1",
|
|
60
|
+
"@xyo-network/bridge-abstract": "^4.2.1",
|
|
61
|
+
"@xyo-network/bridge-pub-sub": "^4.2.1",
|
|
62
|
+
"@xyo-network/diviner-model": "^4.2.1",
|
|
63
|
+
"@xyo-network/module-resolver": "^4.2.1",
|
|
64
|
+
"@xyo-network/node-memory": "^4.2.1",
|
|
65
|
+
"@xyo-network/node-model": "^4.2.1",
|
|
66
|
+
"@xyo-network/payload-builder": "^4.2.1",
|
|
67
|
+
"@xyo-network/payload-wrapper": "^4.2.1",
|
|
68
|
+
"@xyo-network/wallet": "^4.2.1",
|
|
69
69
|
"get-port-please": "^3.2.0",
|
|
70
70
|
"typescript": "^5.8.3",
|
|
71
71
|
"vitest": "^3.2.4"
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import '@xylabs/vitest-extended'
|
|
2
2
|
|
|
3
|
+
import type { Address } from '@xylabs/hex'
|
|
3
4
|
import {
|
|
4
5
|
beforeEach,
|
|
5
6
|
describe, expect, it,
|
|
@@ -37,13 +38,13 @@ describe('HttpBridgeExpress', () => {
|
|
|
37
38
|
})
|
|
38
39
|
|
|
39
40
|
it('should return correct moduleUrl', () => {
|
|
40
|
-
const address = '0x1234'
|
|
41
|
+
const address = '0x1234' as Address
|
|
41
42
|
expect(httpBridge.moduleUrl(address).toString()).toBe('http://localhost:8080/0x1234')
|
|
42
43
|
})
|
|
43
44
|
|
|
44
45
|
it('should throw error on call to exposeHandler', async () => {
|
|
45
46
|
try {
|
|
46
|
-
await httpBridge.exposeHandler('test')
|
|
47
|
+
await httpBridge.exposeHandler('test' as Address)
|
|
47
48
|
expect('').toBe('exposeHandler should have thrown an error')
|
|
48
49
|
} catch (error) {
|
|
49
50
|
expect(error).toBeInstanceOf(Error)
|
|
@@ -52,7 +53,7 @@ describe('HttpBridgeExpress', () => {
|
|
|
52
53
|
|
|
53
54
|
it('should throw error on call to unexposeHandler', async () => {
|
|
54
55
|
try {
|
|
55
|
-
await httpBridge.unexposeHandler('test')
|
|
56
|
+
await httpBridge.unexposeHandler('test' as Address)
|
|
56
57
|
expect('').toBe('unexposeHandler should have thrown an error')
|
|
57
58
|
} catch (error) {
|
|
58
59
|
expect(error).toBeInstanceOf(Error)
|