@jskit-ai/realtime 0.2.20 → 0.2.22
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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
- Since 0.2.20, an event a background job publishes (an action run with no request, so no request workspace) no longer reads its audience's `audienceUsers` in the `workspaceId` its payload names: with no workspace or user in its scope it reads with no context, so an audience over an owned table reaches nobody. Run the job's action with the workspace in its context (`context.workspace`, or a visibility scope naming it) so its audience reads there.
|
|
6
|
+
- Since 0.2.20, `all_workspace_users` on an event written on a customer's or a public surface reaches the users of the workspace the request resolved; before, such an event reached no workspace's users. An audience meant for the writer alone names the user instead.
|
|
5
7
|
- **Security.** An event written on a customer's or a public surface (scoped globally) reads its audience's `audienceUsers` in the workspace the request resolved, which the kernel adds to its global scope as `workspaceId` (`forWorkspace` of `realtime.audience-scope`), and `all_workspace_users` reaches that workspace. The payload never chooses the scope: an app's payload may copy an input id, and reading in a workspace the payload named let one event read in, and reach, another workspace. Before, such an event read with no context, so an audience over an owned table reached no customer. A scope that names a workspace or a user keeps it, and an event with neither reads with no context.
|
|
6
8
|
- **Breaking.** An audience given as a function of the execution, which the boot check cannot see, is checked when its event is published: without `realtime.audience-scope`, an entry that reads in the event's scope (an `audienceUsers` without `publicTablesOnly: true`) is logged as an error naming the socket event and entity, and skipped; the event still reaches the audience's other rooms. Before, it read with no context and silently missed the users of an owned table.
|
|
7
9
|
- An audience entry whose `audienceUsers` fails no longer loses the whole event: the failure is logged as an error naming the socket event and entity, the entry is skipped, and the event still reaches the audience's presets, rooms, users and other entries. Before, one failing read dropped the event for everybody, logged only as a warning.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jskit-ai/realtime",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.22",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "jskit test"
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"socket.io-client": "^4.8.3"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
|
-
"@jskit-ai/kernel": "0.2.
|
|
27
|
+
"@jskit-ai/kernel": "0.2.15",
|
|
28
28
|
"vue": "^3.5.13"
|
|
29
29
|
},
|
|
30
30
|
"description": "Thin, generic realtime runtime wrappers for socket.io server and client.",
|