@teamplay/backend 0.3.3 → 0.3.5

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.
@@ -15,10 +15,10 @@ export default function serverAggregate (backend, { models = {}, ...options } =
15
15
  collection,
16
16
  aggregationName,
17
17
  (queryParams, shareRequest) => {
18
- const session = shareRequest.agent.connectSession
19
- // TODO: rewrite to use $ here, or create a separate root $ for each user
20
- // const model = global.__clients[userId].model
21
- const context = { session, collection }
18
+ const session = shareRequest.agent.connectSession || {}
19
+ const isServer = shareRequest.agent.stream?.isServer
20
+ // should match the context in teamplay/orm/sub.js
21
+ const context = { session, collection, isServer }
22
22
  return aggregation(queryParams, context)
23
23
  }
24
24
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamplay/backend",
3
- "version": "0.3.3",
3
+ "version": "0.3.5",
4
4
  "description": "Create new ShareDB backend instance",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -12,11 +12,11 @@
12
12
  ".": "./index.js"
13
13
  },
14
14
  "dependencies": {
15
- "@teamplay/schema": "^0.3.3",
16
- "@teamplay/server-aggregate": "^0.3.3",
17
- "@teamplay/sharedb-access": "^0.3.3",
18
- "@teamplay/sharedb-schema": "^0.3.3",
19
- "@teamplay/utils": "^0.3.3",
15
+ "@teamplay/schema": "^0.3.5",
16
+ "@teamplay/server-aggregate": "^0.3.5",
17
+ "@teamplay/sharedb-access": "^0.3.5",
18
+ "@teamplay/sharedb-schema": "^0.3.5",
19
+ "@teamplay/utils": "^0.3.5",
20
20
  "@types/ioredis-mock": "^8.2.5",
21
21
  "ioredis": "^5.3.2",
22
22
  "ioredis-mock": "^8.9.0",
@@ -29,5 +29,5 @@
29
29
  "sharedb-redis-pubsub": "^2.0.1",
30
30
  "sqlite3": "^5.1.6"
31
31
  },
32
- "gitHead": "3cb65f144eafd59cbb646328e503f4747df98279"
32
+ "gitHead": "71a44c6607f54297e8eb37b0361fbbfc27b3a14b"
33
33
  }