create-wirejs-app 2.0.86-realtime → 2.0.88-realtime
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
|
@@ -24,7 +24,10 @@ const userTodos = new DistributedTable('app', 'userTodos', {
|
|
|
24
24
|
const wikiPages = new FileService('app', 'wikiPages');
|
|
25
25
|
const authService = new AuthenticationService('app', 'core-users');
|
|
26
26
|
|
|
27
|
-
const realtimeService = new RealtimeService
|
|
27
|
+
const realtimeService = new RealtimeService<{
|
|
28
|
+
username: string;
|
|
29
|
+
message: string;
|
|
30
|
+
}>('app', 'realtime');
|
|
28
31
|
|
|
29
32
|
export const auth = authService.buildApi();
|
|
30
33
|
|
|
@@ -37,7 +40,11 @@ export type Todo = {
|
|
|
37
40
|
|
|
38
41
|
export const messaging = withContext(context => ({
|
|
39
42
|
async publish(room: string, message: string) {
|
|
40
|
-
|
|
43
|
+
const user = await auth.requireCurrentUser(context);
|
|
44
|
+
return realtimeService.publish(room, [{
|
|
45
|
+
username: user.username,
|
|
46
|
+
message
|
|
47
|
+
}]);
|
|
41
48
|
},
|
|
42
49
|
async getRoom(room: string) {
|
|
43
50
|
return realtimeService.getStream(room);
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
"dompurify": "^3.2.3",
|
|
12
12
|
"marked": "^15.0.6",
|
|
13
13
|
"wirejs-dom": "^1.0.41",
|
|
14
|
-
"wirejs-resources": "^0.1.
|
|
15
|
-
"wirejs-components": "^0.1.
|
|
14
|
+
"wirejs-resources": "^0.1.83-realtime",
|
|
15
|
+
"wirejs-components": "^0.1.26-realtime"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
|
-
"wirejs-scripts": "^3.0.
|
|
18
|
+
"wirejs-scripts": "^3.0.81-realtime",
|
|
19
19
|
"typescript": "^5.7.3"
|
|
20
20
|
},
|
|
21
21
|
"scripts": {
|