@veloxts/events 0.8.2 → 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.
Files changed (2) hide show
  1. package/dist/plugin.js +4 -1
  2. package/package.json +9 -9
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 context
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.8.2",
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",
@@ -28,9 +28,9 @@
28
28
  "dependencies": {
29
29
  "fastify-plugin": "5.1.0",
30
30
  "superjson": "2.2.6",
31
- "ws": "8.19.0",
31
+ "ws": "8.20.0",
32
32
  "zod": "4.3.6",
33
- "@veloxts/core": "0.8.2"
33
+ "@veloxts/core": "0.9.0"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "fastify": "^5.7.4",
@@ -42,14 +42,14 @@
42
42
  }
43
43
  },
44
44
  "devDependencies": {
45
- "@types/node": "25.5.0",
45
+ "@types/node": "25.6.0",
46
46
  "@types/ws": "8.18.1",
47
- "@vitest/coverage-v8": "4.1.0",
48
- "fastify": "5.8.2",
49
- "ioredis": "5.10.0",
47
+ "@vitest/coverage-v8": "4.1.5",
48
+ "fastify": "5.8.5",
49
+ "ioredis": "5.10.1",
50
50
  "typescript": "5.9.3",
51
- "vitest": "4.1.0",
52
- "@veloxts/testing": "0.8.2"
51
+ "vitest": "4.1.5",
52
+ "@veloxts/testing": "0.9.0"
53
53
  },
54
54
  "publishConfig": {
55
55
  "access": "public"