@blocklet/sdk 1.16.11-next-ca5f18b5 → 1.16.11-next-3e55bc95
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.d.ts
CHANGED
package/lib/database/index.js
CHANGED
|
@@ -34,7 +34,7 @@ class DataBase extends core_1.DataStore {
|
|
|
34
34
|
const doc = await this.findOne(query);
|
|
35
35
|
return !!doc;
|
|
36
36
|
}
|
|
37
|
-
|
|
37
|
+
paginate({ condition = {}, sort = {}, page = 1, size = 100, projection = {}, }) {
|
|
38
38
|
return this.cursor(condition)
|
|
39
39
|
.sort(sort)
|
|
40
40
|
.skip(Math.max(page * size - size, 0))
|
|
@@ -11,7 +11,7 @@ declare const _default: {
|
|
|
11
11
|
role: string;
|
|
12
12
|
fullName: string;
|
|
13
13
|
};
|
|
14
|
-
}, res: import("express").Response<any, Record<string, any>>, next: import("express").NextFunction) =>
|
|
14
|
+
}, res: import("express").Response<any, Record<string, any>>, next: import("express").NextFunction) => void;
|
|
15
15
|
auth: ({ roles, permissions, getClient }?: {
|
|
16
16
|
roles?: string[];
|
|
17
17
|
permissions?: string[];
|
package/lib/middlewares/user.js
CHANGED
|
@@ -53,11 +53,13 @@ const getSender = () => {
|
|
|
53
53
|
* }} options
|
|
54
54
|
* @returns
|
|
55
55
|
*/
|
|
56
|
+
// eslint-disable-next-line require-await
|
|
56
57
|
const doSendToUser = async (receiver, notification, options) => {
|
|
57
58
|
(0, check_blocklet_env_1.default)();
|
|
58
59
|
return (0, send_notification_1.sendToUser)(receiver, notification, getSender(), process.env.ABT_NODE_SERVICE_PORT, options);
|
|
59
60
|
};
|
|
60
61
|
exports.sendToUser = doSendToUser;
|
|
62
|
+
// eslint-disable-next-line require-await
|
|
61
63
|
const doSendToRelay = async (topic, event, data) => {
|
|
62
64
|
(0, check_blocklet_env_1.default)();
|
|
63
65
|
return (0, send_notification_1.sendToRelay)(topic, event, data, getSender(), process.env.ABT_NODE_SERVICE_PORT);
|
|
@@ -74,6 +76,7 @@ exports.sendToRelay = doSendToRelay;
|
|
|
74
76
|
* }} options
|
|
75
77
|
* @returns
|
|
76
78
|
*/
|
|
79
|
+
// eslint-disable-next-line require-await
|
|
77
80
|
const broadcast = async (notification, options = {}) => {
|
|
78
81
|
(0, check_blocklet_env_1.default)();
|
|
79
82
|
const sender = getSender();
|
package/lib/validators/email.js
CHANGED
|
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.emailConfigSchema = void 0;
|
|
7
|
+
/* eslint-disable import/prefer-default-export */
|
|
7
8
|
const joi_1 = __importDefault(require("joi"));
|
|
8
9
|
const emailConfigSchema = joi_1.default.object({
|
|
9
10
|
from: joi_1.default.string().email().required(),
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.11-next-
|
|
6
|
+
"version": "1.16.11-next-3e55bc95",
|
|
7
7
|
"description": "graphql client to read/write data on abt node",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"typings": "lib/index.d.ts",
|
|
@@ -26,15 +26,15 @@
|
|
|
26
26
|
"author": "linchen1987 <linchen.1987@foxmail.com> (http://github.com/linchen1987)",
|
|
27
27
|
"license": "Apache-2.0",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@abtnode/client": "1.16.11-next-
|
|
30
|
-
"@abtnode/constant": "1.16.11-next-
|
|
29
|
+
"@abtnode/client": "1.16.11-next-3e55bc95",
|
|
30
|
+
"@abtnode/constant": "1.16.11-next-3e55bc95",
|
|
31
31
|
"@arcblock/did": "1.18.80",
|
|
32
32
|
"@arcblock/did-auth": "1.18.80",
|
|
33
33
|
"@arcblock/jwt": "1.18.80",
|
|
34
34
|
"@arcblock/ws": "1.18.80",
|
|
35
|
-
"@blocklet/constant": "1.16.11-next-
|
|
36
|
-
"@blocklet/env": "1.16.11-next-
|
|
37
|
-
"@blocklet/meta": "1.16.11-next-
|
|
35
|
+
"@blocklet/constant": "1.16.11-next-3e55bc95",
|
|
36
|
+
"@blocklet/env": "1.16.11-next-3e55bc95",
|
|
37
|
+
"@blocklet/meta": "1.16.11-next-3e55bc95",
|
|
38
38
|
"@did-connect/authenticator": "^2.1.59",
|
|
39
39
|
"@did-connect/handler": "^2.1.59",
|
|
40
40
|
"@nedb/core": "^2.1.5",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@nedb/core": "^2.1.2"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@arcblock/eslint-config-ts": "^0.2.
|
|
58
|
+
"@arcblock/eslint-config-ts": "^0.2.4",
|
|
59
59
|
"@types/express": "^4.17.14",
|
|
60
60
|
"@types/jest": "^29.2.0",
|
|
61
61
|
"@types/json-stable-stringify": "^1.0.34",
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
"ts-node": "^10.9.1",
|
|
74
74
|
"typescript": "^5.0.4"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "cf0251c2d85c617b03151495b5944061ceb373e5"
|
|
77
77
|
}
|