@veloxts/events 0.6.90 → 0.6.91

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/index.d.ts CHANGED
@@ -43,22 +43,3 @@ export { createEventsManager, createManagerFromDriver, type EventsManager, event
43
43
  export { _resetStandaloneEvents, closeEvents, eventsPlugin, getEvents, getEventsFromInstance, } from './plugin.js';
44
44
  export { ClientMessageSchema, formatValidationErrors, PresenceMemberSchema, SseSubscribeBodySchema, SseUnsubscribeBodySchema, type ValidationResult, validateBody, WsAuthBodySchema, } from './schemas.js';
45
45
  export type { BroadcastDriver, BroadcastEvent, Channel, ChannelAuthorizer, ChannelAuthResult, ChannelType, ClientConnection, ClientMessage, EventsBaseOptions, EventsDefaultOptions, EventsManagerOptions, EventsPluginOptions, EventsSseOptions, EventsWsOptions, PresenceMember, ServerMessage, Subscription, } from './types.js';
46
- /**
47
- * DI tokens and providers for @veloxts/events
48
- *
49
- * Use these to integrate events services with the @veloxts/core DI container.
50
- *
51
- * @example
52
- * ```typescript
53
- * import { Container } from '@veloxts/core';
54
- * import { registerEventsProviders, EVENTS_MANAGER } from '@veloxts/events';
55
- *
56
- * const container = new Container();
57
- * await registerEventsProviders(container, { driver: 'ws' });
58
- *
59
- * const events = container.resolve(EVENTS_MANAGER);
60
- * await events.broadcast('orders', 'order.created', { id: '123' });
61
- * ```
62
- */
63
- export { registerEventsProviders } from './providers.js';
64
- export { EVENTS_CONFIG, EVENTS_DRIVER, EVENTS_MANAGER } from './tokens.js';
package/dist/index.js CHANGED
@@ -47,27 +47,3 @@ export { createEventsManager, createManagerFromDriver, events, } from './manager
47
47
  export { _resetStandaloneEvents, closeEvents, eventsPlugin, getEvents, getEventsFromInstance, } from './plugin.js';
48
48
  // Schemas (for validation)
49
49
  export { ClientMessageSchema, formatValidationErrors, PresenceMemberSchema, SseSubscribeBodySchema, SseUnsubscribeBodySchema, validateBody, WsAuthBodySchema, } from './schemas.js';
50
- // ============================================================================
51
- // Dependency Injection
52
- // ============================================================================
53
- /**
54
- * DI tokens and providers for @veloxts/events
55
- *
56
- * Use these to integrate events services with the @veloxts/core DI container.
57
- *
58
- * @example
59
- * ```typescript
60
- * import { Container } from '@veloxts/core';
61
- * import { registerEventsProviders, EVENTS_MANAGER } from '@veloxts/events';
62
- *
63
- * const container = new Container();
64
- * await registerEventsProviders(container, { driver: 'ws' });
65
- *
66
- * const events = container.resolve(EVENTS_MANAGER);
67
- * await events.broadcast('orders', 'order.created', { id: '123' });
68
- * ```
69
- */
70
- // Provider exports - factory functions for registering services
71
- export { registerEventsProviders } from './providers.js';
72
- // Token exports - unique identifiers for DI resolution
73
- export { EVENTS_CONFIG, EVENTS_DRIVER, EVENTS_MANAGER } from './tokens.js';
package/dist/schemas.d.ts CHANGED
@@ -35,15 +35,15 @@ export declare const SseSubscribeBodySchema: z.ZodObject<{
35
35
  info?: Record<string, unknown> | undefined;
36
36
  }>>;
37
37
  }, "strip", z.ZodTypeAny, {
38
- channel: string;
39
38
  connectionId: string;
39
+ channel: string;
40
40
  member?: {
41
41
  id: string;
42
42
  info?: Record<string, unknown> | undefined;
43
43
  } | undefined;
44
44
  }, {
45
- channel: string;
46
45
  connectionId: string;
46
+ channel: string;
47
47
  member?: {
48
48
  id: string;
49
49
  info?: Record<string, unknown> | undefined;
@@ -58,11 +58,11 @@ export declare const SseUnsubscribeBodySchema: z.ZodObject<{
58
58
  connectionId: z.ZodString;
59
59
  channel: z.ZodString;
60
60
  }, "strip", z.ZodTypeAny, {
61
- channel: string;
62
61
  connectionId: string;
63
- }, {
64
62
  channel: string;
63
+ }, {
65
64
  connectionId: string;
65
+ channel: string;
66
66
  }>;
67
67
  export type SseUnsubscribeBody = z.infer<typeof SseUnsubscribeBodySchema>;
68
68
  /**
@@ -100,32 +100,32 @@ export declare const ClientMessageSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
100
100
  info?: Record<string, unknown> | undefined;
101
101
  }>>;
102
102
  }, "strip", z.ZodTypeAny, {
103
- type: "subscribe";
104
103
  channel: string;
104
+ type: "subscribe";
105
+ auth?: string | undefined;
105
106
  data?: {
106
107
  id: string;
107
108
  info?: Record<string, unknown> | undefined;
108
109
  } | undefined;
109
- auth?: string | undefined;
110
110
  channelData?: string | undefined;
111
111
  }, {
112
- type: "subscribe";
113
112
  channel: string;
113
+ type: "subscribe";
114
+ auth?: string | undefined;
114
115
  data?: {
115
116
  id: string;
116
117
  info?: Record<string, unknown> | undefined;
117
118
  } | undefined;
118
- auth?: string | undefined;
119
119
  channelData?: string | undefined;
120
120
  }>, z.ZodObject<{
121
121
  type: z.ZodLiteral<"unsubscribe">;
122
122
  channel: z.ZodString;
123
123
  }, "strip", z.ZodTypeAny, {
124
- type: "unsubscribe";
125
124
  channel: string;
126
- }, {
127
125
  type: "unsubscribe";
126
+ }, {
128
127
  channel: string;
128
+ type: "unsubscribe";
129
129
  }>, z.ZodObject<{
130
130
  type: z.ZodLiteral<"ping">;
131
131
  }, "strip", z.ZodTypeAny, {
@@ -138,14 +138,14 @@ export declare const ClientMessageSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
138
138
  event: z.ZodString;
139
139
  data: z.ZodOptional<z.ZodUnknown>;
140
140
  }, "strip", z.ZodTypeAny, {
141
- event: string;
142
- type: "message";
143
141
  channel: string;
142
+ type: "message";
143
+ event: string;
144
144
  data?: unknown;
145
145
  }, {
146
- event: string;
147
- type: "message";
148
146
  channel: string;
147
+ type: "message";
148
+ event: string;
149
149
  data?: unknown;
150
150
  }>]>;
151
151
  export type ValidatedClientMessage = z.infer<typeof ClientMessageSchema>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veloxts/events",
3
- "version": "0.6.90",
3
+ "version": "0.6.91",
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.19.0",
32
32
  "zod": "3.24.4",
33
- "@veloxts/core": "0.6.90"
33
+ "@veloxts/core": "0.6.91"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "fastify": "^5.0.0",
@@ -49,7 +49,7 @@
49
49
  "ioredis": "5.9.2",
50
50
  "typescript": "5.9.3",
51
51
  "vitest": "4.0.18",
52
- "@veloxts/testing": "0.6.90"
52
+ "@veloxts/testing": "0.6.91"
53
53
  },
54
54
  "publishConfig": {
55
55
  "access": "public"