nodefony 7.0.0-beta.21 → 7.0.0-beta.22

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/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [7.0.0-beta.21](https://github.com/nodefony/nodefony/compare/v7.0.0-beta.22...v7.0.0-beta.21) (2023-11-06)
2
+
3
+ ## [7.0.0-beta.22](https://github.com/nodefony/nodefony/compare/v7.0.0-beta.21...v7.0.0-beta.22) (2023-11-06)
4
+
5
+
6
+ ### Features
7
+
8
+ * upgrade mongoose 8 ([931dd18](https://github.com/nodefony/nodefony/commit/931dd183fa35f1e9ba9b224285b85140f973b7bc))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * debug monitoring session dataTable ([8f71504](https://github.com/nodefony/nodefony/commit/8f71504f8517d50b81b5c77c06e7262011024fa2))
14
+
1
15
  ## [7.0.0-beta.21](https://github.com/nodefony/nodefony/compare/v7.0.0-beta.20...v7.0.0-beta.21) (2023-10-17)
2
16
 
3
17
 
@@ -12,12 +12,6 @@ const validator = require("validator");
12
12
 
13
13
  class userEntity extends nodefony.Entity {
14
14
  constructor (bundle) {
15
- /*
16
- * @param bundle instance
17
- * @param Entity name
18
- * @param orm name
19
- * @param connection name
20
- */
21
15
  super(bundle, "user", "mongoose", "nodefony");
22
16
  }
23
17
 
@@ -73,7 +67,7 @@ class userEntity extends nodefony.Entity {
73
67
  if (value === "") {
74
68
  return true;
75
69
  }
76
- return validator.matches(value, /[^\w]|_|-|.|'/g);
70
+ return validator.matches(value, /[^\w]|_|-|.|'/gu);
77
71
  },
78
72
  message: "name allow alphanumeric characters {VALUE}"
79
73
  }
@@ -86,7 +80,7 @@ class userEntity extends nodefony.Entity {
86
80
  if (value === "") {
87
81
  return true;
88
82
  }
89
- return validator.matches(value, /[^\w]|_|-|.|'/g);
83
+ return validator.matches(value, /[^\w]|_|-|.|'/gu);
90
84
  },
91
85
  message: "surname allow alphanumeric characters {VALUE}"
92
86
  }
@@ -14,7 +14,7 @@
14
14
 
15
15
  // const crypto = require('crypto');
16
16
  const path = require("path");
17
- const readFile = function (Path) {
17
+ const readFile = function readFile (Path) {
18
18
  try {
19
19
  return fs.readFileSync(Path, {
20
20
  encoding: "utf8"
@@ -24,7 +24,7 @@ const readFile = function (Path) {
24
24
  throw e;
25
25
  }
26
26
  };
27
- const randomSecret = function () {
27
+ const randomSecret = function randomSecret () {
28
28
  const sercretPath = path.resolve("config", "certificates", "ca", "private", "ca.key.pem");
29
29
  return readFile(sercretPath);
30
30
  };
@@ -47,7 +47,7 @@ module.exports = {
47
47
  }
48
48
  },
49
49
 
50
- async updateUser (obj, field, context, info) {
50
+ updateUser (obj, field, context, info) {
51
51
  const user = context.getUser();
52
52
  const usersService = context.get("users");
53
53
  const orm = context.kernel.getORM();
@@ -102,7 +102,7 @@ module.exports = {
102
102
  });
103
103
  },
104
104
 
105
- async deleteUser (obj, field, context, info) {
105
+ deleteUser (obj, field, context, info) {
106
106
  const {
107
107
  username
108
108
  } = field;
@@ -111,7 +111,7 @@ module.exports = {
111
111
  return usersService.delete(username, user);
112
112
  },
113
113
 
114
- async deleteUsers (obj, field, context, info) {
114
+ deleteUsers (obj, field, context, info) {
115
115
  const {
116
116
  users
117
117
  } = field;
@@ -17,7 +17,7 @@
17
17
  "repository": {},
18
18
  "dependencies": {
19
19
  "@withshepherd/faker": "5.5.5",
20
- "mongoose-paginate-v2": "1.7.31",
20
+ "mongoose-paginate-v2": "1.7.4",
21
21
  "validator": "13.11.0"
22
22
  },
23
23
  "devDependencies": {
@@ -41,10 +41,10 @@
41
41
  "imports-loader": "4.0.1",
42
42
  "jquery": "3.7.1",
43
43
  "mini-css-extract-plugin": "2.7.6",
44
- "node-gyp": "9.4.0",
45
- "sass": "1.69.3",
44
+ "node-gyp": "10.0.1",
45
+ "sass": "1.69.5",
46
46
  "sass-loader": "13.3.2",
47
- "sequelize-cli": "6.6.1",
47
+ "sequelize-cli": "6.6.2",
48
48
  "stream": "0.0.2",
49
49
  "style-loader": "3.3.3",
50
50
  "svg-inline-loader": "^0.8.2",
@@ -1,3 +1,6 @@
1
+ /* eslint-disable consistent-return */
2
+ /* eslint-disable default-case */
3
+ /* eslint-disable max-lines-per-function */
1
4
  module.exports = class users extends nodefony.Service {
2
5
  constructor (container) {
3
6
  super("users", container);
@@ -91,13 +94,9 @@ module.exports = class users extends nodefony.Service {
91
94
  case "search":
92
95
  case "list":
93
96
  if (!obj.isAdmin) {
94
- if (obj.isUser) {
95
-
96
- } else {
97
+ if (!obj.isUser) {
97
98
  throw new nodefony.authorizationError("User not authorized", 403);
98
99
  }
99
- } else {
100
-
101
100
  }
102
101
  break;
103
102
  case "find":
@@ -284,8 +283,7 @@ module.exports = class users extends nodefony.Service {
284
283
  });
285
284
  } catch (e) {
286
285
  throw await this.sanitizeError(e, transaction);
287
- } finally {}
288
- break;
286
+ } finally { }
289
287
  case "sequelize":
290
288
  try {
291
289
  const {
@@ -331,7 +329,6 @@ module.exports = class users extends nodefony.Service {
331
329
  } catch (e) {
332
330
  throw await this.sanitizeError(e, transaction);
333
331
  }
334
- break;
335
332
  case "mongoose":
336
333
  try {
337
334
  return this.entity.create([query], {
@@ -364,13 +361,13 @@ module.exports = class users extends nodefony.Service {
364
361
  if (!user) {
365
362
  throw new nodefony.Error(`User ${username} not found`);
366
363
  }
367
- return user.remove({
364
+ return user.deleteOne({
368
365
  force: true
369
366
  // session: transaction
370
367
  })
371
- .then(async (user) =>
368
+ .then(async (state) =>
372
369
  // await transaction.commitTransaction();
373
- user)
370
+ ({username}))
374
371
  .catch(async (e) => {
375
372
  throw await this.sanitizeError(e, transaction);
376
373
  });
@@ -381,7 +378,6 @@ module.exports = class users extends nodefony.Service {
381
378
  } catch (e) {
382
379
  throw await this.sanitizeError(e, transaction);
383
380
  }
384
- break;
385
381
  case "sequelize":
386
382
  try {
387
383
  return this.entity.findOne({
@@ -1,3 +1,4 @@
1
+ /* eslint-disable max-lines-per-function */
1
2
  /*
2
3
  * MODEFONY FRAMEWORK UNIT TEST
3
4
  *
@@ -46,8 +47,8 @@ describe("BUNDLE users", () => {
46
47
  });
47
48
 
48
49
  describe("API LOGIN", () => {
49
- beforeEach(() => {});
50
- before(() => {});
50
+ beforeEach(() => { });
51
+ before(() => { });
51
52
 
52
53
  it("LOGIN JWT", async () => {
53
54
  // const formData = new global.FormData()
@@ -42,33 +42,33 @@
42
42
  "ejs": "3.1.9",
43
43
  "env-cmd": "^10.1.0",
44
44
  "hello_world": "./src/n-api",
45
- "markdown-it": "13.0.1",
45
+ "markdown-it": "13.0.2",
46
46
  "nodefony": "^{{version}}",
47
47
  "nodefony-client": "6.0.2",
48
48
  "pm2": "5.3.0",
49
49
  "pm2-logrotate": "^2.7.0",
50
50
  "serve-static": "1.15.0",
51
- "socket.io": "4.7.1",
52
- "socket.io-client": "4.7.1"
51
+ "socket.io": "4.7.2",
52
+ "socket.io-client": "4.7.2"
53
53
  },
54
54
  "devDependencies": {
55
- "@babel/cli": "7.22.9",
56
- "@babel/core": "7.22.9",
57
- "@babel/preset-env": "7.22.9",
58
- "@babel/register": "7.22.5",
55
+ "@babel/cli": "7.23.0",
56
+ "@babel/core": "7.23.2",
57
+ "@babel/preset-env": "7.23.2",
58
+ "@babel/register": "7.22.15",
59
59
  "@mapbox/node-pre-gyp": "1.0.11",
60
60
  "babel-loader": "9.1.3",
61
- "chai": "4.3.7",
61
+ "chai": "4.3.10",
62
62
  "html-loader": "4.2.0",
63
63
  "html-webpack-plugin": "^5.5.0",
64
64
  "mini-css-extract-plugin": "2.7.6",
65
65
  "mocha": "10.2.0",
66
- "node-gyp": "9.4.0",
66
+ "node-gyp": "10.0.0",
67
67
  "open": "9.1.0",
68
- "sass": "1.64.2",
68
+ "sass": "1.69.5",
69
69
  "sass-loader": "13.3.2",
70
70
  "terser-webpack-plugin": "5.3.9",
71
- "webpack": "5.88.2",
71
+ "webpack": "5.89.0",
72
72
  "webpack-cli": "5.1.4",
73
73
  "webpack-merge": "^5.8.0"
74
74
  },
@@ -14,6 +14,7 @@
14
14
  "prod": "nodefony prod",
15
15
  "kill": "nodefony kill",
16
16
  "test": "nodefony test",
17
+ "compile": "nodefony webpack:dump",
17
18
  "help": "nodefony -h",
18
19
  "changelog": "conventional-changelog -p conventionalcommits -i CHANGELOG.md -s -r 0",
19
20
  "dev-deploy": "bash bin/dev-deploy.sh",
@@ -39,29 +40,29 @@
39
40
  },
40
41
  "dependencies": {
41
42
  "graphql": "16.8.1",
42
- "mongoose": "7.6.1",
43
+ "mongoose": "7.6.3",
43
44
  "nodefony": "{{version}}",
44
45
  "pm2": "5.3.0",
45
- "pm2-logrotate": "^2.7.0",
46
+ "pm2-logrotate": "2.7.0",
46
47
  "sequelize": "6.33.0",
47
- "webpack": "5.88.2",
48
+ "webpack": "5.89.0",
48
49
  "webpack-dev-server": "4.15.1"
49
50
  },
50
51
  "devDependencies": {
51
- "@babel/core": "7.23.0",
52
+ "@babel/core": "7.23.2",
52
53
  "@babel/eslint-parser": "7.22.15",
53
54
  "@mapbox/node-pre-gyp": "1.0.11",
54
55
  "conventional-changelog-cli": "4.1.0",
55
- "eslint": "8.51.0",
56
+ "eslint": "8.52.0",
56
57
  "eslint-config-standard": "17.1.0",
57
58
  "eslint-plugin-html": "7.1.0",
58
- "eslint-plugin-import": "2.28.1",
59
+ "eslint-plugin-import": "2.29.0",
59
60
  "eslint-plugin-markdown": "3.0.1",
60
61
  "eslint-plugin-node": "11.1.0",
61
62
  "eslint-plugin-promise": "^6.0.0",
62
- "eslint-plugin-vue": "9.17.0",
63
+ "eslint-plugin-vue": "9.18.1",
63
64
  "markdown-eslint-parser": "1.2.1",
64
- "node-gyp": "9.4.0",
65
+ "node-gyp": "10.0.0",
65
66
  "vue-eslint-parser": "9.3.2"
66
67
  },
67
68
  "author": "{{authorFullName}} <{{authorMail}}>",
@@ -13,8 +13,8 @@ let connectors = {}
13
13
  const vault = async () => {
14
14
  const serviceVault = kernel.get("vault");
15
15
  return await serviceVault.getSecret({
16
- path: "nodefony/data/database/mongo/connector/nodefony"
17
- })
16
+ path: "nodefony/data/database/mongo/connector/nodefony"
17
+ })
18
18
  .then((secret) => {
19
19
  return secret.data.data
20
20
  })
@@ -36,7 +36,6 @@ switch (kernel.appEnvironment.environment) {
36
36
  user: "nodefony",
37
37
  pass: "nodefony",
38
38
  maxPoolSize: 50,
39
- useNewUrlParser: true,
40
39
  serverSelectionTimeoutMS: 5000,
41
40
  socketTimeoutMS: 5000,
42
41
  connectTimeoutMS: 5000
@@ -28,11 +28,11 @@
28
28
  "font-awesome": "^4.7.0",
29
29
  {% endif %}
30
30
  {% if addons.webpack %}
31
- "@babel/core": "7.23.0",
32
- "@babel/preset-env": "7.22.20",
31
+ "@babel/core": "7.23.2",
32
+ "@babel/preset-env": "7.23.2",
33
33
  "babel-loader": "9.1.3",
34
- "clean-webpack-plugin": "^4.0.0",
35
- "css-hot-loader": "^1.4.4",
34
+ "clean-webpack-plugin": "4.0.0",
35
+ "css-hot-loader": "1.4.4",
36
36
  "css-loader": "6.8.1",
37
37
  "expose-loader": "4.1.0",
38
38
  "favicons": "7.1.4",
@@ -40,17 +40,17 @@
40
40
  "html-webpack-plugin": "5.5.3",
41
41
  "imports-loader": "4.0.1",
42
42
  "mini-css-extract-plugin": "2.7.6",
43
- "sass": "1.69.2",
43
+ "sass": "1.69.5",
44
44
  "sass-loader": "13.3.2",
45
- "sitemap-webpack-plugin": "^1.1.1",
45
+ "sitemap-webpack-plugin": "1.1.1",
46
46
  "style-loader": "3.3.3",
47
47
  "terser-webpack-plugin": "5.3.9",
48
- "webpack": "5.88.2",
48
+ "webpack": "5.89.0",
49
49
  "webpack-dev-server": "4.15.1",
50
- "webpack-merge": "5.9.0",
50
+ "webpack-merge": "5.10.0",
51
51
  {% endif %}
52
52
  "@mapbox/node-pre-gyp": "1.0.11",
53
- "node-gyp": "9.4.0"
53
+ "node-gyp": "10.0.0"
54
54
  },
55
55
  "license": "",
56
56
  "readmeFilename": "README.md"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodefony",
3
- "version": "7.0.0-beta.21",
3
+ "version": "7.0.0-beta.22",
4
4
  "main": "autoloader.es6",
5
5
  "description": "Nodefony Framework Core",
6
6
  "contributors": [],
@@ -36,50 +36,50 @@
36
36
  "@babel/parser": "7.23.0",
37
37
  "@graphql-tools/merge": "9.0.0",
38
38
  "@graphql-tools/schema": "10.0.0",
39
- "@graphql-tools/utils": "10.0.7",
40
- "@nodefony/elastic-bundle": "7.0.0-beta.21",
41
- "@nodefony/framework-bundle": "7.0.0-beta.21",
42
- "@nodefony/http-bundle": "7.0.0-beta.21",
43
- "@nodefony/mail-bundle": "7.0.0-beta.21",
44
- "@nodefony/mongoose-bundle": "7.0.0-beta.21",
45
- "@nodefony/monitoring-bundle": "7.0.0-beta.21",
46
- "@nodefony/realtime-bundle": "7.0.0-beta.21",
47
- "@nodefony/redis-bundle": "7.0.0-beta.21",
48
- "@nodefony/security-bundle": "7.0.0-beta.21",
49
- "@nodefony/sequelize-bundle": "7.0.0-beta.21",
50
- "@nodefony/unittests-bundle": "7.0.0-beta.21",
39
+ "@graphql-tools/utils": "10.0.8",
40
+ "@nodefony/elastic-bundle": "7.0.0-beta.22",
41
+ "@nodefony/framework-bundle": "7.0.0-beta.22",
42
+ "@nodefony/http-bundle": "7.0.0-beta.22",
43
+ "@nodefony/mail-bundle": "7.0.0-beta.22",
44
+ "@nodefony/mongoose-bundle": "7.0.0-beta.22",
45
+ "@nodefony/monitoring-bundle": "7.0.0-beta.22",
46
+ "@nodefony/realtime-bundle": "7.0.0-beta.22",
47
+ "@nodefony/redis-bundle": "7.0.0-beta.22",
48
+ "@nodefony/security-bundle": "7.0.0-beta.22",
49
+ "@nodefony/sequelize-bundle": "7.0.0-beta.22",
50
+ "@nodefony/unittests-bundle": "7.0.0-beta.22",
51
51
  "@vue/cli": "5.0.8",
52
52
  "@vue/cli-service": "5.0.8",
53
53
  "@vue/cli-service-global": "4.5.19",
54
- "asciify": "^1.3.5",
55
- "bluebird": "^3.7.2",
54
+ "asciify": "1.3.5",
55
+ "bluebird": "3.7.2",
56
56
  "chai": "4.3.10",
57
57
  "chokidar": "^3.5.3",
58
58
  "cli-color": "2.0.3",
59
59
  "cli-table3": "0.6.3",
60
- "clui": "^0.3.6",
60
+ "clui": "0.3.6",
61
61
  "commander": "11.1.0",
62
- "core-js": "3.33.0",
62
+ "core-js": "3.33.2",
63
63
  "create-react-app": "5.0.1",
64
64
  "graphql": "16.8.1",
65
65
  "inquirer": "9.2.11",
66
- "js-yaml": "^4.1.0",
67
- "lodash": "^4.17.21",
68
- "lodash.isregexp": "^4.0.1",
66
+ "js-yaml": "4.1.0",
67
+ "lodash": "4.17.21",
68
+ "lodash.isregexp": "4.0.1",
69
69
  "markdown-it": "13.0.2",
70
- "mime": "^3.0.0",
70
+ "mime": "3.0.0",
71
71
  "moment": "2.29.4",
72
72
  "node-cron": "3.0.2",
73
73
  "node-emoji": "2.1.0",
74
- "npm": "10.2.0",
74
+ "npm": "10.2.3",
75
75
  "pm2": "5.3.0",
76
- "promise": "^8.3.0",
77
- "request": "^2.88.2",
76
+ "promise": "8.3.0",
77
+ "request": "2.88.2",
78
78
  "semver": "7.5.4",
79
- "shelljs": "^0.8.5",
80
- "shortid": "^2.2.16",
79
+ "shelljs": "0.8.5",
80
+ "shortid": "2.2.16",
81
81
  "simple-git": "3.20.0",
82
- "spdx": "^0.5.2",
82
+ "spdx": "0.5.2",
83
83
  "twig": "1.16.0",
84
84
  "uuid": "9.0.1",
85
85
  "webpack": "5.89.0",
@@ -88,8 +88,8 @@
88
88
  },
89
89
  "devDependencies": {
90
90
  "babel-loader": "9.1.3",
91
- "babel-polyfill": "^6.26.0",
92
- "eslint": "8.51.0",
91
+ "babel-polyfill": "6.26.0",
92
+ "eslint": "8.53.0",
93
93
  "webpack-cli": "5.1.4",
94
94
  "webpack-merge": "5.10.0"
95
95
  },