@blocklet/sdk 1.8.17 → 1.8.20
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/lib/database/index.js +7 -2
- package/package.json +9 -6
package/lib/database/index.js
CHANGED
|
@@ -30,7 +30,12 @@ module.exports = class DataStore extends BaseStore {
|
|
|
30
30
|
return !!doc;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
async paginate({
|
|
34
|
-
return this.cursor(
|
|
33
|
+
async paginate({ condition = {}, sort = {}, page = 1, size = 100, projection = {} }) {
|
|
34
|
+
return this.cursor(condition)
|
|
35
|
+
.sort(sort)
|
|
36
|
+
.skip(Math.max(page * size - size, 0))
|
|
37
|
+
.limit(Math.max(size, 1))
|
|
38
|
+
.projection(projection)
|
|
39
|
+
.exec();
|
|
35
40
|
}
|
|
36
41
|
};
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.8.
|
|
6
|
+
"version": "1.8.20",
|
|
7
7
|
"description": "graphql client to read/write data on abt node",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"files": [
|
|
@@ -19,15 +19,15 @@
|
|
|
19
19
|
"author": "linchen1987 <linchen.1987@foxmail.com> (http://github.com/linchen1987)",
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@abtnode/client": "1.8.
|
|
23
|
-
"@abtnode/constant": "1.8.
|
|
22
|
+
"@abtnode/client": "1.8.20",
|
|
23
|
+
"@abtnode/constant": "1.8.20",
|
|
24
24
|
"@arcblock/did-auth": "1.17.19",
|
|
25
25
|
"@arcblock/jwt": "1.17.19",
|
|
26
26
|
"@arcblock/ws": "1.17.19",
|
|
27
|
-
"@blocklet/meta": "1.8.
|
|
27
|
+
"@blocklet/meta": "1.8.20",
|
|
28
28
|
"@did-connect/authenticator": "^2.1.13",
|
|
29
29
|
"@did-connect/handler": "^2.1.13",
|
|
30
|
-
"@nedb/core": "^2.0.
|
|
30
|
+
"@nedb/core": "^2.0.4",
|
|
31
31
|
"@ocap/mcrypto": "1.17.19",
|
|
32
32
|
"@ocap/wallet": "1.17.19",
|
|
33
33
|
"axios": "^0.27.2",
|
|
@@ -38,9 +38,12 @@
|
|
|
38
38
|
"lru-cache": "^6.0.0",
|
|
39
39
|
"url-join": "^4.0.1"
|
|
40
40
|
},
|
|
41
|
+
"resolutions": {
|
|
42
|
+
"@nedb/core": "^2.0.4"
|
|
43
|
+
},
|
|
41
44
|
"devDependencies": {
|
|
42
45
|
"detect-port": "^1.3.0",
|
|
43
46
|
"jest": "^27.5.1"
|
|
44
47
|
},
|
|
45
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "abe47e26c9583bfe5c4969e19cd36574f436a515"
|
|
46
49
|
}
|