@veloxts/events 0.8.3 → 0.9.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.
- package/dist/plugin.js +4 -1
- package/package.json +3 -3
package/dist/plugin.js
CHANGED
|
@@ -159,9 +159,12 @@ export function eventsPlugin(options = {}) {
|
|
|
159
159
|
});
|
|
160
160
|
// Decorate request with events accessor (matching cache/mail/queue/storage pattern)
|
|
161
161
|
fastify.decorateRequest('events', undefined);
|
|
162
|
-
// Add events to request
|
|
162
|
+
// Add events to request and procedure ctx
|
|
163
163
|
fastify.addHook('onRequest', async (request) => {
|
|
164
164
|
request.events = events;
|
|
165
|
+
if (request.context) {
|
|
166
|
+
request.context.events = events;
|
|
167
|
+
}
|
|
165
168
|
});
|
|
166
169
|
// Register cleanup hook
|
|
167
170
|
fastify.addHook('onClose', async () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veloxts/events",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Real-time event broadcasting for VeloxTS framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"superjson": "2.2.6",
|
|
31
31
|
"ws": "8.20.0",
|
|
32
32
|
"zod": "4.3.6",
|
|
33
|
-
"@veloxts/core": "0.
|
|
33
|
+
"@veloxts/core": "0.9.0"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"fastify": "^5.7.4",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"ioredis": "5.10.1",
|
|
50
50
|
"typescript": "5.9.3",
|
|
51
51
|
"vitest": "4.1.5",
|
|
52
|
-
"@veloxts/testing": "0.
|
|
52
|
+
"@veloxts/testing": "0.9.0"
|
|
53
53
|
},
|
|
54
54
|
"publishConfig": {
|
|
55
55
|
"access": "public"
|