not-node 6.2.11 → 6.2.13
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "not-node",
|
|
3
|
-
"version": "6.2.
|
|
3
|
+
"version": "6.2.13",
|
|
4
4
|
"description": "node complimentary part for client side notFramework.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
"url": "https://github.com/interrupter/not-node/issues"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
+
"xss": "*",
|
|
38
39
|
"body-parser": "^1.20.1",
|
|
39
40
|
"commander": "^9.5.0",
|
|
40
41
|
"compression": "^1.7.4",
|
|
@@ -59,15 +60,14 @@
|
|
|
59
60
|
"mongoose": "*",
|
|
60
61
|
"mongoose-validator": "*",
|
|
61
62
|
"nconf": "*",
|
|
62
|
-
"not-config": "
|
|
63
|
-
"not-error": "
|
|
63
|
+
"not-config": "*",
|
|
64
|
+
"not-error": "*",
|
|
64
65
|
"not-filter": "*",
|
|
65
|
-
"not-inform": "^0.0.28",
|
|
66
66
|
"not-locale": "*",
|
|
67
|
-
"not-log": "
|
|
68
|
-
"not-monitor": "
|
|
69
|
-
"not-path": "
|
|
70
|
-
"not-validation": "
|
|
67
|
+
"not-log": "*",
|
|
68
|
+
"not-monitor": "*",
|
|
69
|
+
"not-path": "*",
|
|
70
|
+
"not-validation": "*",
|
|
71
71
|
"rate-limiter-flexible": "^2.4.1",
|
|
72
72
|
"redis": "^4.5.1",
|
|
73
73
|
"redlock": "^5.0.0-beta.2",
|
package/src/form/form.js
CHANGED
|
@@ -327,9 +327,10 @@ class Form {
|
|
|
327
327
|
}
|
|
328
328
|
|
|
329
329
|
#extractByInstructionPipe({ results, instructions, fieldName, req }) {
|
|
330
|
-
if (instructions.length === 0) {
|
|
330
|
+
if (!instructions || instructions.length === 0) {
|
|
331
331
|
throw new FormExceptionExtractorForFieldIsUndefined(fieldName);
|
|
332
332
|
}
|
|
333
|
+
//
|
|
333
334
|
this.#extractByInstruction({
|
|
334
335
|
results,
|
|
335
336
|
instruction: instructions[0],
|
|
@@ -380,7 +381,7 @@ class Form {
|
|
|
380
381
|
|
|
381
382
|
createInstructionFromRouteActionFields(
|
|
382
383
|
req,
|
|
383
|
-
mainInstruction = "fromBody",
|
|
384
|
+
mainInstruction = ["fromBody", "xss"],
|
|
384
385
|
exceptions = {}
|
|
385
386
|
) {
|
|
386
387
|
const result = {};
|
|
@@ -397,7 +398,7 @@ class Form {
|
|
|
397
398
|
|
|
398
399
|
extractByInstructionsFromRouteActionFields(
|
|
399
400
|
req,
|
|
400
|
-
mainInstruction = "fromBody",
|
|
401
|
+
mainInstruction = ["fromBody", "xss"],
|
|
401
402
|
exceptions = {}
|
|
402
403
|
) {
|
|
403
404
|
const instructions = this.createInstructionFromRouteActionFields(
|
package/src/init/lib/db/redis.js
CHANGED
|
@@ -6,8 +6,15 @@ module.exports = class InitDBRedis {
|
|
|
6
6
|
log.info("Setting up redis connection...");
|
|
7
7
|
const redis = require("redis");
|
|
8
8
|
const redisClient = redis.createClient(conf);
|
|
9
|
+
await redisClient.connect();
|
|
9
10
|
InitDBRedis.bindClientEvents({ master, redisClient });
|
|
10
11
|
master.setEnv(`db.${alias}`, redisClient);
|
|
12
|
+
const status = redisClient.isOpen;
|
|
13
|
+
if (status) {
|
|
14
|
+
log.info(`Redis connection is opened`);
|
|
15
|
+
} else {
|
|
16
|
+
log.error(`Redis connection isn't opened`);
|
|
17
|
+
}
|
|
11
18
|
}
|
|
12
19
|
|
|
13
20
|
async run({ config, options, master, conf, alias, emit }) {
|