@mantiq/realtime 0.1.3 → 0.2.0-rc.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mantiq/realtime",
3
- "version": "0.1.3",
3
+ "version": "0.2.0-rc.2",
4
4
  "description": "WebSocket, SSE, channels, broadcasting",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -40,17 +40,22 @@
40
40
  "LICENSE"
41
41
  ],
42
42
  "scripts": {
43
- "build": "bun build ./src/index.ts --outdir ./dist --target bun",
43
+ "build": "bun build ./src/index.ts --outdir ./dist --target bun --packages=external",
44
44
  "test": "bun test",
45
45
  "typecheck": "tsc --noEmit",
46
46
  "clean": "rm -rf dist"
47
47
  },
48
48
  "devDependencies": {
49
49
  "bun-types": "latest",
50
- "typescript": "^5.7.0"
50
+ "typescript": "^5.7.0",
51
+ "@mantiq/core": "workspace:*",
52
+ "@mantiq/events": "workspace:*"
51
53
  },
52
54
  "peerDependencies": {
53
55
  "@mantiq/core": "^0.1.0",
54
56
  "@mantiq/events": "^0.1.0"
57
+ },
58
+ "mantiq": {
59
+ "provider": "RealtimeServiceProvider"
55
60
  }
56
61
  }
@@ -41,7 +41,7 @@ export interface RealtimeConfig {
41
41
  redis: {
42
42
  host: string
43
43
  port: number
44
- password?: string
44
+ password?: string | undefined
45
45
  prefix: string
46
46
  }
47
47
  }
@@ -5,7 +5,7 @@ import type { RealtimeConfig } from '../contracts/RealtimeConfig.ts'
5
5
  */
6
6
  export interface SSEConnection {
7
7
  id: string
8
- userId?: string | number
8
+ userId?: string | number | undefined
9
9
  channels: Set<string>
10
10
  controller: ReadableStreamDefaultController
11
11
  lastEventId: number
@@ -24,7 +24,7 @@ interface BroadcastRecord {
24
24
 
25
25
  interface SubscriptionRecord {
26
26
  channel: string
27
- userId?: string | number
27
+ userId?: string | number | undefined
28
28
  }
29
29
 
30
30
  export class RealtimeFake {