teamplay 0.3.6 → 0.3.7
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/connect/test.js +1 -13
- package/package.json +13 -13
package/connect/test.js
CHANGED
|
@@ -1,24 +1,12 @@
|
|
|
1
1
|
// mock of client connection to sharedb to use inside tests.
|
|
2
2
|
// This just creates a sharedb server with in-memory database
|
|
3
3
|
// and creates a server connection to it.
|
|
4
|
+
import ShareDbMingo from '@startupjs/sharedb-mingo-memory'
|
|
4
5
|
import ShareBackend from 'sharedb'
|
|
5
|
-
import ShareDbMingo from 'sharedb-mingo-memory'
|
|
6
6
|
import { connection, setConnection } from '../orm/connection.js'
|
|
7
7
|
|
|
8
8
|
export default function connect () {
|
|
9
9
|
if (connection) return
|
|
10
|
-
patchSharedbMingoAggregations()
|
|
11
10
|
const backend = new ShareBackend({ db: new ShareDbMingo() })
|
|
12
11
|
setConnection(backend.connect())
|
|
13
12
|
}
|
|
14
|
-
|
|
15
|
-
let patched
|
|
16
|
-
function patchSharedbMingoAggregations () {
|
|
17
|
-
if (patched) return
|
|
18
|
-
patched = true
|
|
19
|
-
const oldCanPollDoc = ShareDbMingo.prototype.canPollDoc
|
|
20
|
-
ShareDbMingo.prototype.canPollDoc = function (collection, query) {
|
|
21
|
-
if (query.hasOwnProperty('$aggregate')) return false // eslint-disable-line no-prototype-builtins
|
|
22
|
-
return oldCanPollDoc.call(this, collection, query)
|
|
23
|
-
}
|
|
24
|
-
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "teamplay",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.7",
|
|
4
4
|
"description": "Full-stack signals ORM with multiplayer",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -23,12 +23,12 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@nx-js/observer-util": "^4.1.3",
|
|
26
|
-
"@teamplay/backend": "^0.3.
|
|
27
|
-
"@teamplay/cache": "^0.3.
|
|
28
|
-
"@teamplay/channel": "^0.3.
|
|
29
|
-
"@teamplay/debug": "^0.3.
|
|
30
|
-
"@teamplay/schema": "^0.3.
|
|
31
|
-
"@teamplay/utils": "^0.3.
|
|
26
|
+
"@teamplay/backend": "^0.3.7",
|
|
27
|
+
"@teamplay/cache": "^0.3.7",
|
|
28
|
+
"@teamplay/channel": "^0.3.7",
|
|
29
|
+
"@teamplay/debug": "^0.3.7",
|
|
30
|
+
"@teamplay/schema": "^0.3.7",
|
|
31
|
+
"@teamplay/utils": "^0.3.7",
|
|
32
32
|
"diff-match-patch": "^1.0.5",
|
|
33
33
|
"events": "^3.3.0",
|
|
34
34
|
"json0-ot-diff": "^1.1.2",
|
|
@@ -37,19 +37,19 @@
|
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@jest/globals": "^29.7.0",
|
|
40
|
+
"@startupjs/sharedb-mingo-memory": "^4.0.0-1",
|
|
40
41
|
"@testing-library/react": "^15.0.7",
|
|
41
42
|
"jest": "^29.7.0",
|
|
42
43
|
"jest-environment-jsdom": "^29.7.0",
|
|
43
44
|
"react": "^18.3.1",
|
|
44
|
-
"react-dom": "^18.3.1"
|
|
45
|
-
"sharedb-mingo-memory": "^3.0.1"
|
|
45
|
+
"react-dom": "^18.3.1"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"
|
|
49
|
-
"
|
|
48
|
+
"@startupjs/sharedb-mingo-memory": "*",
|
|
49
|
+
"react": "*"
|
|
50
50
|
},
|
|
51
51
|
"peerDependenciesMeta": {
|
|
52
|
-
"sharedb-mingo-memory": {
|
|
52
|
+
"@startupjs/sharedb-mingo-memory": {
|
|
53
53
|
"optional": true
|
|
54
54
|
}
|
|
55
55
|
},
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
]
|
|
64
64
|
},
|
|
65
65
|
"license": "MIT",
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "c5840863c3afd56432f923700f7cd04333168469"
|
|
67
67
|
}
|