@vulkano/core 1.5.4 → 1.5.5

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/libs/Paginate.js CHANGED
@@ -2,6 +2,39 @@ const _ = require('underscore');
2
2
 
3
3
  module.exports = {
4
4
 
5
+ accentToRegex(_text) {
6
+
7
+ const ACCENT_STRINGS = 'ŠŒŽšœžŸ¥µÀÁÂÃÄÅÆÇÈÉÊËẼÌÍÎÏĨÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëẽìíîïĩðñòóôõöøùúûüýÿ';
8
+ const NO_ACCENT_STRINGS = 'SOZsozYYuAAAAAAACEEEEEIIIIIDNOOOOOOUUUUYsaaaaaaaceeeeeiiiiionoooooouuuuyy';
9
+
10
+ const from = ACCENT_STRINGS.split('');
11
+ const to = NO_ACCENT_STRINGS.split('');
12
+ const result = [];
13
+ let text = _text;
14
+
15
+ to.forEach( (letter, key) => {
16
+ const exist = result.indexOf(letter);
17
+ if (exist >= 0) {
18
+ result[exist] += from[key];
19
+ } else {
20
+ result.push(letter);
21
+ }
22
+ });
23
+
24
+ result.forEach( (rg, key) => {
25
+ const regex = new RegExp(`[${rg}]`);
26
+ text = text.replace(regex, `_${key}_`);
27
+ });
28
+
29
+ result.forEach( (rg, key) => {
30
+ const regex = new RegExp(`_${key}_`);
31
+ text = text.replace(regex, `[${rg}]`);
32
+ });
33
+
34
+ return text;
35
+
36
+ },
37
+
5
38
  serializeQuery(_props, _query) {
6
39
 
7
40
  const props = typeof _props === 'object'
@@ -45,11 +78,11 @@ module.exports = {
45
78
  if (type === String) {
46
79
 
47
80
  if (searchType === 'startwith' || searchType === 'start') {
48
- row[item] = new RegExp(['^', Utils.accentToRegex(search), '*.'].join(''), 'i');
81
+ row[item] = new RegExp(['^', this.accentToRegex(search), '*.'].join(''), 'i');
49
82
  } else if (searchType === 'endwith' || searchType === 'end') {
50
- row[item] = new RegExp(['.*', Utils.accentToRegex(search)].join(''), 'i');
83
+ row[item] = new RegExp(['.*', this.accentToRegex(search)].join(''), 'i');
51
84
  } else {
52
- row[item] = new RegExp(['.*', Utils.accentToRegex(search), '*.'].join(''), 'i');
85
+ row[item] = new RegExp(['.*', this.accentToRegex(search), '*.'].join(''), 'i');
53
86
  }
54
87
 
55
88
  } else if (type === Number) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vulkano/core",
3
- "version": "1.5.4",
3
+ "version": "1.5.5",
4
4
  "description": "A MVC framework using Express 4",
5
5
  "license": "MIT",
6
6
  "author": "Vulkano Team",
@@ -36,7 +36,7 @@
36
36
  "compression": "^1.7.4",
37
37
  "connect-timeout": "^1.9.0",
38
38
  "cookie-parser": "^1.4.6",
39
- "cron": "^3.1.6",
39
+ "cron": "^3.1.7",
40
40
  "deepmerge": "^4.3.1",
41
41
  "dotenv": "^16.4.5",
42
42
  "express": "^4.19.2",
@@ -46,7 +46,7 @@
46
46
  "fs": "^0.0.1-security",
47
47
  "fs-extra": "^11.2.0",
48
48
  "helmet": "^7.1.0",
49
- "i18next": "^23.10.1",
49
+ "i18next": "^23.11.4",
50
50
  "include-all": "^4.0.3",
51
51
  "jwt-simple": "^0.5.6",
52
52
  "moment": "^2.30.1",
@@ -67,11 +67,11 @@
67
67
  "yargs": "^17.7.2"
68
68
  },
69
69
  "devDependencies": {
70
- "@babel/core": "^7.24.4",
71
- "@babel/eslint-parser": "^7.24.1",
70
+ "@babel/core": "^7.24.5",
71
+ "@babel/eslint-parser": "^7.24.5",
72
72
  "@babel/plugin-syntax-dynamic-import": "^7.8.3",
73
73
  "@babel/plugin-syntax-jsx": "^7.24.1",
74
- "@babel/preset-env": "^7.24.4",
74
+ "@babel/preset-env": "^7.24.5",
75
75
  "@babel/preset-react": "^7.24.1",
76
76
  "@babel/preset-stage-1": "^7.8.3",
77
77
  "eslint": "^8.57.0",
@@ -79,6 +79,6 @@
79
79
  "eslint-plugin-import": "^2.29.1",
80
80
  "eslint-plugin-jsx-a11y": "^6.8.0",
81
81
  "eslint-plugin-react": "^7.34.1",
82
- "eslint-plugin-react-hooks": "^4.6.0"
82
+ "eslint-plugin-react-hooks": "^4.6.2"
83
83
  }
84
84
  }
package/responses/vsr.js CHANGED
@@ -16,7 +16,7 @@ module.exports = function VSRPromise(promiseToRun, httpStatusCode) {
16
16
  } = req;
17
17
 
18
18
  let code = httpStatusCode || 200;
19
- let output = {
19
+ const output = {
20
20
  success: true,
21
21
  statusCode: code
22
22
  };