@teamplay/backend 0.3.6 → 0.3.8
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/db/mingo-memory.js +1 -1
- package/db/mingo-sqlite.js +1 -1
- package/package.json +8 -8
- package/db/sharedbMingo.js +0 -17
package/db/mingo-memory.js
CHANGED
package/db/mingo-sqlite.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import ShareDbMingoMemory from '@startupjs/sharedb-mingo-memory'
|
|
1
2
|
import { resolve } from 'path'
|
|
2
3
|
import sqlite3 from 'sqlite3'
|
|
3
4
|
import uuid from '@teamplay/utils/uuid'
|
|
4
|
-
import ShareDbMingoMemory from './sharedbMingo.js'
|
|
5
5
|
import { loadSqliteDbToMingo, getExistingSqliteDb } from './utils.js'
|
|
6
6
|
|
|
7
7
|
const DEFAULT_DB_PATH = './local.db'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teamplay/backend",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.8",
|
|
4
4
|
"description": "Create new ShareDB backend instance",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -12,11 +12,12 @@
|
|
|
12
12
|
".": "./index.js"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@
|
|
16
|
-
"@teamplay/
|
|
17
|
-
"@teamplay/
|
|
18
|
-
"@teamplay/sharedb-
|
|
19
|
-
"@teamplay/
|
|
15
|
+
"@startupjs/sharedb-mingo-memory": "^4.0.0-1",
|
|
16
|
+
"@teamplay/schema": "^0.3.8",
|
|
17
|
+
"@teamplay/server-aggregate": "^0.3.8",
|
|
18
|
+
"@teamplay/sharedb-access": "^0.3.8",
|
|
19
|
+
"@teamplay/sharedb-schema": "^0.3.8",
|
|
20
|
+
"@teamplay/utils": "^0.3.8",
|
|
20
21
|
"@types/ioredis-mock": "^8.2.5",
|
|
21
22
|
"ioredis": "^5.3.2",
|
|
22
23
|
"ioredis-mock": "^8.9.0",
|
|
@@ -24,10 +25,9 @@
|
|
|
24
25
|
"redlock": "^3.0.0",
|
|
25
26
|
"sharedb": "^5.0.0",
|
|
26
27
|
"sharedb-hooks": "~4.0.0",
|
|
27
|
-
"sharedb-mingo-memory": "^3.0.0",
|
|
28
28
|
"sharedb-mongo": "^4.1.2",
|
|
29
29
|
"sharedb-redis-pubsub": "^2.0.1",
|
|
30
30
|
"sqlite3": "^5.1.6"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "627be4811f622fe0202480b0c6f1bd2fead83e19"
|
|
33
33
|
}
|
package/db/sharedbMingo.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import ShareDbMingo from 'sharedb-mingo-memory'
|
|
2
|
-
|
|
3
|
-
// patch ShareDbMingo to properly support aggregations
|
|
4
|
-
let patched
|
|
5
|
-
function patchSharedbMingoAggregations () {
|
|
6
|
-
if (patched) return
|
|
7
|
-
patched = true
|
|
8
|
-
const oldCanPollDoc = ShareDbMingo.prototype.canPollDoc
|
|
9
|
-
ShareDbMingo.prototype.canPollDoc = function (collection, query) {
|
|
10
|
-
if (query.hasOwnProperty('$aggregate')) return false // eslint-disable-line no-prototype-builtins
|
|
11
|
-
return oldCanPollDoc.call(this, collection, query)
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
patchSharedbMingoAggregations()
|
|
16
|
-
|
|
17
|
-
export default ShareDbMingo
|