Skip to content

Commit c06ef2a

Browse files
mod35adenhertogedward
authored
Remove inversify (#2)
* remove inversify * add jest * tests now pass * adding jest types adding tests to cover retry logic which uncovered a bug * removing unecessary imports * cleaned up comments and checked that the queuePushSpy was called exactly 3 times Co-authored-by: Andrew den Hertog <[email protected]> Co-authored-by: edward <[email protected]>
1 parent 4ed1e03 commit c06ef2a

9 files changed

+914
-910
lines changed

docker-compose.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: '3'
2+
3+
services:
4+
redis:
5+
image: bitnami/redis
6+
container_name: redis
7+
environment:
8+
- ALLOW_EMPTY_PASSWORD=yes
9+
ports:
10+
- "6379:6379"

package.json

Lines changed: 27 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -5,49 +5,60 @@
55
"license": "MIT",
66
"main": "./dist/index.js",
77
"types": "./dist/index.d.ts",
8-
"repository": "github:node-ts/bus.git",
8+
"repository": "github:node-ts/bus-redis.git",
99
"scripts": {
1010
"clean": "rm -rf dist",
1111
"build": "tsc --project tsconfig.json --declaration",
12+
"build:watch": "yarn run build --incremental --watch --preserveWatchOutput",
1213
"lint": "tslint --project tsconfig.json 'src/**/*.ts'",
1314
"lint:fix": "yarn lint --fix",
14-
"test": "jest --collect-coverage",
15-
"test:unit": "jest \"(src\\/.+\\.|/)spec\\.ts$\"",
16-
"test:integration": "jest --runInBand \"(src\\/.+\\.|/)integration\\.ts$\"",
17-
"test:watch": "jest --watch"
15+
"test": "jest --collect-coverage"
1816
},
1917
"publishConfig": {
2018
"access": "public"
2119
},
2220
"dependencies": {
2321
"@node-ts/bus-messages": "^0.3.2",
22+
"esbuild": "^0.13.12",
23+
"esbuild-jest": "^0.5.0",
2424
"ioredis": "^4.27.7",
25+
"jest": "^27.3.1",
2526
"modest-queue": "^0.4.1",
2627
"tslib": "^1.9.3",
2728
"uuid": "^3.3.2"
2829
},
2930
"devDependencies": {
30-
"@node-ts/bus-core": "^0.6.7",
31+
"@node-ts/bus-core": "^1.0.0",
32+
"@node-ts/bus-test": "^0.0.10",
3133
"@node-ts/code-standards": "^0.0.10",
32-
"@node-ts/logger-core": "^0.0.13",
3334
"@types/faker": "^4.1.5",
3435
"@types/ioredis": "^4.26.6",
3536
"@types/uuid": "^3.4.4",
36-
"esbuild": "^0.13.4",
37-
"esbuild-jest": "^0.5.0",
37+
"@types/jest": "^27.0.2",
3838
"faker": "^4.1.0",
39-
"inversify": "^5.0.1",
40-
"jest": "^27.2.4",
4139
"reflect-metadata": "^0.1.13",
4240
"typemoq": "^2.1.0",
4341
"typescript": "^4.3.5"
4442
},
4543
"peerDependencies": {
46-
"@node-ts/bus-core": "^0.6.6",
47-
"@node-ts/logger-core": "^0.0.13",
48-
"inversify": "^5.0.1",
49-
"reflect-metadata": "^0.1.13"
44+
"@node-ts/bus-core": "^1.0.0"
5045
},
46+
"keywords": [
47+
"esb",
48+
"redis",
49+
"typescript",
50+
"enterprise integration patterns",
51+
"bus",
52+
"messaging",
53+
"microservices",
54+
"distributed systems",
55+
"framework",
56+
"enterprise framework",
57+
"CQRS",
58+
"ES",
59+
"NServiceBus",
60+
"Mule ESB"
61+
],
5162
"jest": {
5263
"testTimeout": 5000,
5364
"setupFilesAfterEnv": [
@@ -80,21 +91,5 @@
8091
"dist/",
8192
"bus-test/"
8293
]
83-
},
84-
"keywords": [
85-
"esb",
86-
"redis",
87-
"typescript",
88-
"enterprise integration patterns",
89-
"bus",
90-
"messaging",
91-
"microservices",
92-
"distributed systems",
93-
"framework",
94-
"enterprise framework",
95-
"CQRS",
96-
"ES",
97-
"NServiceBus",
98-
"Mule ESB"
99-
]
94+
}
10095
}

src/bus-redis-module.ts

Lines changed: 0 additions & 20 deletions
This file was deleted.

src/bus-redis-symbols.ts

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
export * from './bus-redis-module'
21
export * from './redis-transport-configuration'
3-
export * from './bus-redis-symbols'
2+
export * from './redis-transport'

src/redis-transport-configuration.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
export interface RedisTransportConfiguration {
2-
/**
3-
* Name of the queue that the bus will receive messages from, and bind exchanges to
4-
*/
5-
queueName: string
1+
import { TransportConfiguration } from '@node-ts/bus-core'
62

3+
export interface RedisTransportConfiguration extends TransportConfiguration {
74
/**
85
* The redis connection string to use to connect to the redis instance
96
* The following is the equivalent of:

0 commit comments

Comments
 (0)