@tsed/event-emitter 6.100.2 → 6.102.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/.mocharc.js +2 -2
- package/package.json +4 -4
- package/readme.md +5 -10
- package/tsconfig.compile.esm.json +1 -12
package/.mocharc.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/event-emitter",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.102.1",
|
|
4
4
|
"description": "EventEmitter package for Ts.ED framework",
|
|
5
5
|
"source": "./src/index.ts",
|
|
6
6
|
"main": "./lib/cjs/index.js",
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
},
|
|
23
23
|
"private": false,
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@tsed/common": "6.
|
|
26
|
-
"@tsed/core": "6.
|
|
27
|
-
"@tsed/di": "6.
|
|
25
|
+
"@tsed/common": "6.102.1",
|
|
26
|
+
"@tsed/core": "6.102.1",
|
|
27
|
+
"@tsed/di": "6.102.1",
|
|
28
28
|
"eventemitter2": "^6.4.4"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
package/readme.md
CHANGED
|
@@ -64,14 +64,12 @@ import "@tsed/event-emitter"; // import event emitter ts.ed module
|
|
|
64
64
|
|
|
65
65
|
@Configuration({
|
|
66
66
|
eventEmitter: {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
enabled: true, // Enable events for this instance.
|
|
68
|
+
// pass any options that you would normally pass to new EventEmitter2(), e.g.
|
|
69
|
+
wildcard: true
|
|
70
70
|
}
|
|
71
71
|
})
|
|
72
|
-
export class Server {
|
|
73
|
-
|
|
74
|
-
}
|
|
72
|
+
export class Server {}
|
|
75
73
|
```
|
|
76
74
|
|
|
77
75
|
## Setup event listener
|
|
@@ -109,7 +107,6 @@ import {EventEmitterService} from "@tsed/event-emitter";
|
|
|
109
107
|
|
|
110
108
|
@Service()
|
|
111
109
|
export class OrderService {
|
|
112
|
-
|
|
113
110
|
@Inject()
|
|
114
111
|
private eventEmitter: EventEmitterService;
|
|
115
112
|
|
|
@@ -118,23 +115,21 @@ export class OrderService {
|
|
|
118
115
|
// then send an event
|
|
119
116
|
this.eventEmitter.emit("order.shipped", {orderId});
|
|
120
117
|
}
|
|
121
|
-
|
|
122
118
|
}
|
|
123
119
|
```
|
|
124
120
|
|
|
125
121
|
## Contributors
|
|
122
|
+
|
|
126
123
|
Please read [contributing guidelines here](https://tsed.io/CONTRIBUTING.html)
|
|
127
124
|
|
|
128
125
|
<a href="https://github.com/tsedio/tsed/graphs/contributors"><img src="https://opencollective.com/tsed/contributors.svg?width=890" /></a>
|
|
129
126
|
|
|
130
|
-
|
|
131
127
|
## Backers
|
|
132
128
|
|
|
133
129
|
Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/tsed#backer)]
|
|
134
130
|
|
|
135
131
|
<a href="https://opencollective.com/tsed#backers" target="_blank"><img src="https://opencollective.com/tsed/backers.svg?width=890"></a>
|
|
136
132
|
|
|
137
|
-
|
|
138
133
|
## Sponsors
|
|
139
134
|
|
|
140
135
|
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/tsed#sponsor)]
|
|
@@ -8,16 +8,5 @@
|
|
|
8
8
|
"declaration": true,
|
|
9
9
|
"declarationDir": "./lib/types"
|
|
10
10
|
},
|
|
11
|
-
"exclude": [
|
|
12
|
-
"node_modules",
|
|
13
|
-
"test",
|
|
14
|
-
"lib",
|
|
15
|
-
"benchmark",
|
|
16
|
-
"coverage",
|
|
17
|
-
"spec",
|
|
18
|
-
"**/*.benchmark.ts",
|
|
19
|
-
"**/*.spec.ts",
|
|
20
|
-
"keys",
|
|
21
|
-
"jest.config.js"
|
|
22
|
-
]
|
|
11
|
+
"exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"]
|
|
23
12
|
}
|