@mantiq/realtime 0.1.2 → 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/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  WebSocket server, SSE, and channel system for MantiqJS — public, private, and presence channels.
4
4
 
5
- Part of [MantiqJS](https://github.com/abdullahkhan/mantiq) — a batteries-included TypeScript web framework for Bun.
5
+ Part of [MantiqJS](https://github.com/mantiqjs/mantiq) — a batteries-included TypeScript web framework for Bun.
6
6
 
7
7
  ## Installation
8
8
 
@@ -12,7 +12,7 @@ bun add @mantiq/realtime
12
12
 
13
13
  ## Documentation
14
14
 
15
- See the [MantiqJS repository](https://github.com/abdullahkhan/mantiq) for full documentation.
15
+ See the [MantiqJS repository](https://github.com/mantiqjs/mantiq) for full documentation.
16
16
 
17
17
  ## License
18
18
 
package/package.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "@mantiq/realtime",
3
- "version": "0.1.2",
3
+ "version": "0.2.0-rc.2",
4
4
  "description": "WebSocket, SSE, channels, broadcasting",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "author": "Abdullah Khan",
8
- "homepage": "https://github.com/abdullahkhan/mantiq/tree/main/packages/realtime",
8
+ "homepage": "https://github.com/mantiqjs/mantiq/tree/main/packages/realtime",
9
9
  "repository": {
10
10
  "type": "git",
11
- "url": "https://github.com/abdullahkhan/mantiq.git",
11
+ "url": "https://github.com/mantiqjs/mantiq.git",
12
12
  "directory": "packages/realtime"
13
13
  },
14
14
  "bugs": {
15
- "url": "https://github.com/abdullahkhan/mantiq/issues"
15
+ "url": "https://github.com/mantiqjs/mantiq/issues"
16
16
  },
17
17
  "keywords": [
18
18
  "mantiq",
@@ -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 {