nodefony 7.0.0-beta.20 → 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 +64 -34
- package/cli/builder/bundles/users-bundle/Entity/mongoose/userEntity.js +2 -8
- package/cli/builder/bundles/users-bundle/Resources/config/config.js +2 -2
- package/cli/builder/bundles/users-bundle/controller/api/graphql/userResolver.js +3 -3
- package/cli/builder/bundles/users-bundle/package.json +21 -21
- package/cli/builder/bundles/users-bundle/services/usersService.js +8 -12
- package/cli/builder/bundles/users-bundle/tests/loginTest.js +3 -2
- package/cli/builder/microService/skeletons/package.json +23 -22
- package/cli/builder/project/skeletons/package.json.twig +18 -17
- package/cli/builder/skeletons/config/nodefony/mongoose-bundle.js +2 -3
- package/cli/builder/skeletons/package.json.twig +24 -24
- package/cli.es6 +13 -1
- package/package.json +47 -47
- package/cli/builder/bundles/users-bundle/pnpm-lock.yaml +0 -4262
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,33 @@
|
|
|
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
|
+
|
|
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)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* ia flow dev ([0cf61b0](https://github.com/nodefony/nodefony/commit/0cf61b0c925d845a9e874e7e624be8474b8ea08d))
|
|
21
|
+
* upgrade ia bundle add demo cam ([8b505e6](https://github.com/nodefony/nodefony/commit/8b505e6d493039a3a40afc89c33075d8f662c2d7))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Bug Fixes
|
|
25
|
+
|
|
26
|
+
* debug images debugbar ([2f8116d](https://github.com/nodefony/nodefony/commit/2f8116d6c18224653ffa48772333f6cedb5c37aa))
|
|
27
|
+
* monitoring sessions datatable ([d2666f7](https://github.com/nodefony/nodefony/commit/d2666f7edb86d8fe01f7e56037b9d6237911130d))
|
|
28
|
+
* **sequelize:** debug mariadb create database ([b451d2c](https://github.com/nodefony/nodefony/commit/b451d2c7e4e2b2d8d68ca275a51de2afb903272d))
|
|
29
|
+
* vuepress ([2797bf9](https://github.com/nodefony/nodefony/commit/2797bf954a18e5b185f1e4895a0e98c9f9bee877))
|
|
30
|
+
|
|
1
31
|
## [7.0.0-beta.20](https://github.com/nodefony/nodefony/compare/v7.0.0-beta.19...v7.0.0-beta.20) (2023-04-17)
|
|
2
32
|
|
|
3
33
|
|
|
@@ -334,33 +364,33 @@
|
|
|
334
364
|
|
|
335
365
|
## [6.10.0](https://github.com/nodefony/nodefony/compare/v6.9.1...v6.10.0) (2021-12-31)
|
|
336
366
|
|
|
337
|
-
|
|
367
|
+
## [6.9.1](https://github.com/nodefony/nodefony/compare/v6.9.0...v6.9.1) (2021-10-13)
|
|
338
368
|
|
|
339
369
|
## [6.9.0](https://github.com/nodefony/nodefony/compare/v6.6.0...v6.9.0) (2021-10-12)
|
|
340
370
|
|
|
341
371
|
## [6.6.0](https://github.com/nodefony/nodefony/compare/v6.5.7...v6.6.0) (2021-09-09)
|
|
342
372
|
|
|
343
|
-
|
|
373
|
+
## [6.5.7](https://github.com/nodefony/nodefony/compare/v6.5.6...v6.5.7) (2021-07-21)
|
|
344
374
|
|
|
345
|
-
|
|
375
|
+
## [6.5.6](https://github.com/nodefony/nodefony/compare/v6.5.5...v6.5.6) (2021-07-01)
|
|
346
376
|
|
|
347
|
-
|
|
377
|
+
## [6.5.5](https://github.com/nodefony/nodefony/compare/v6.5.4...v6.5.5) (2021-06-16)
|
|
348
378
|
|
|
349
|
-
|
|
379
|
+
## [6.5.4](https://github.com/nodefony/nodefony/compare/v6.5.3...v6.5.4) (2021-04-30)
|
|
350
380
|
|
|
351
|
-
|
|
381
|
+
## [6.5.3](https://github.com/nodefony/nodefony/compare/v6.5.2...v6.5.3) (2021-04-27)
|
|
352
382
|
|
|
353
|
-
|
|
383
|
+
## [6.5.2](https://github.com/nodefony/nodefony/compare/v6.5.1...v6.5.2) (2021-04-23)
|
|
354
384
|
|
|
355
|
-
|
|
385
|
+
## [6.5.1](https://github.com/nodefony/nodefony/compare/v6.5.0...v6.5.1) (2021-03-29)
|
|
356
386
|
|
|
357
387
|
## [6.5.0](https://github.com/nodefony/nodefony/compare/v6.4.3...v6.5.0) (2021-03-19)
|
|
358
388
|
|
|
359
|
-
|
|
389
|
+
## [6.4.3](https://github.com/nodefony/nodefony/compare/v6.4.2...v6.4.3) (2021-03-09)
|
|
360
390
|
|
|
361
|
-
|
|
391
|
+
## [6.4.2](https://github.com/nodefony/nodefony/compare/v6.4.1...v6.4.2) (2021-02-26)
|
|
362
392
|
|
|
363
|
-
|
|
393
|
+
## [6.4.1](https://github.com/nodefony/nodefony/compare/v6.4.0...v6.4.1) (2021-02-20)
|
|
364
394
|
|
|
365
395
|
## [6.4.0](https://github.com/nodefony/nodefony/compare/v6.3.0...v6.4.0) (2021-02-19)
|
|
366
396
|
|
|
@@ -370,7 +400,7 @@
|
|
|
370
400
|
|
|
371
401
|
## [6.1.0](https://github.com/nodefony/nodefony/compare/v6.0.1...v6.1.0) (2020-11-16)
|
|
372
402
|
|
|
373
|
-
|
|
403
|
+
## [6.0.1](https://github.com/nodefony/nodefony/compare/v6.0.0...v6.0.1) (2020-10-12)
|
|
374
404
|
|
|
375
405
|
## [6.0.0](https://github.com/nodefony/nodefony/compare/v6.0.0-beta.16...v6.0.0) (2020-10-12)
|
|
376
406
|
|
|
@@ -406,35 +436,35 @@
|
|
|
406
436
|
|
|
407
437
|
## [6.0.0-beta.1](https://github.com/nodefony/nodefony/compare/v5.1.1...v6.0.0-beta.1) (2020-02-13)
|
|
408
438
|
|
|
409
|
-
|
|
439
|
+
## [5.1.1](https://github.com/nodefony/nodefony/compare/v5.1.0...v5.1.1) (2019-11-04)
|
|
410
440
|
|
|
411
441
|
## [5.1.0](https://github.com/nodefony/nodefony/compare/v5.0.9...v5.1.0) (2019-10-30)
|
|
412
442
|
|
|
413
|
-
|
|
443
|
+
## [5.0.9](https://github.com/nodefony/nodefony/compare/v5.0.8...v5.0.9) (2019-10-03)
|
|
414
444
|
|
|
415
|
-
|
|
445
|
+
## [5.0.8](https://github.com/nodefony/nodefony/compare/v5.0.7...v5.0.8) (2019-09-26)
|
|
416
446
|
|
|
417
|
-
|
|
447
|
+
## [5.0.7](https://github.com/nodefony/nodefony/compare/v5.0.6...v5.0.7) (2019-09-17)
|
|
418
448
|
|
|
419
|
-
|
|
449
|
+
## [5.0.6](https://github.com/nodefony/nodefony/compare/v5.0.5...v5.0.6) (2019-09-17)
|
|
420
450
|
|
|
421
|
-
|
|
451
|
+
## [5.0.5](https://github.com/nodefony/nodefony/compare/v5.0.4...v5.0.5) (2019-09-11)
|
|
422
452
|
|
|
423
|
-
|
|
453
|
+
## [5.0.4](https://github.com/nodefony/nodefony/compare/v5.0.3...v5.0.4) (2019-08-26)
|
|
424
454
|
|
|
425
|
-
|
|
455
|
+
## [5.0.3](https://github.com/nodefony/nodefony/compare/v5.0.2...v5.0.3) (2019-08-14)
|
|
426
456
|
|
|
427
|
-
|
|
457
|
+
## [5.0.2](https://github.com/nodefony/nodefony/compare/v5.0.1...v5.0.2) (2019-08-05)
|
|
428
458
|
|
|
429
|
-
|
|
459
|
+
## [5.0.1](https://github.com/nodefony/nodefony/compare/v5.0.0...v5.0.1) (2019-08-01)
|
|
430
460
|
|
|
431
461
|
## [5.0.0](https://github.com/nodefony/nodefony/compare/v4.3.3...v5.0.0) (2019-07-29)
|
|
432
462
|
|
|
433
|
-
|
|
463
|
+
## [4.3.3](https://github.com/nodefony/nodefony/compare/v4.3.2...v4.3.3) (2019-04-10)
|
|
434
464
|
|
|
435
|
-
|
|
465
|
+
## [4.3.2](https://github.com/nodefony/nodefony/compare/v4.3.1...v4.3.2) (2019-04-10)
|
|
436
466
|
|
|
437
|
-
|
|
467
|
+
## [4.3.1](https://github.com/nodefony/nodefony/compare/v4.3.0...v4.3.1) (2019-03-23)
|
|
438
468
|
|
|
439
469
|
## [4.3.0](https://github.com/nodefony/nodefony/compare/v4.2.0-beta.2...v4.3.0) (2019-03-22)
|
|
440
470
|
|
|
@@ -494,25 +524,25 @@
|
|
|
494
524
|
|
|
495
525
|
## [4.0.0-beta.0](https://github.com/nodefony/nodefony/compare/v3.2.2...v4.0.0-beta.0) (2018-06-15)
|
|
496
526
|
|
|
497
|
-
|
|
527
|
+
## [3.2.2](https://github.com/nodefony/nodefony/compare/v3.2.1...v3.2.2) (2018-01-12)
|
|
498
528
|
|
|
499
|
-
|
|
529
|
+
## [3.2.1](https://github.com/nodefony/nodefony/compare/v3.2.0...v3.2.1) (2018-01-12)
|
|
500
530
|
|
|
501
531
|
## [3.2.0](https://github.com/nodefony/nodefony/compare/v3.1.4...v3.2.0) (2018-01-08)
|
|
502
532
|
|
|
503
|
-
|
|
533
|
+
## [3.1.4](https://github.com/nodefony/nodefony/compare/v3.1.3...v3.1.4) (2017-12-20)
|
|
504
534
|
|
|
505
|
-
|
|
535
|
+
## [3.1.3](https://github.com/nodefony/nodefony/compare/v3.1.2...v3.1.3) (2017-11-22)
|
|
506
536
|
|
|
507
537
|
## [3.1.0](https://github.com/nodefony/nodefony/compare/v3.0.3...v3.1.0) (2017-11-20)
|
|
508
538
|
|
|
509
|
-
|
|
539
|
+
## [3.0.3](https://github.com/nodefony/nodefony/compare/v3.0.2...v3.0.3) (2017-10-09)
|
|
510
540
|
|
|
511
|
-
|
|
541
|
+
## [3.0.2](https://github.com/nodefony/nodefony/compare/v3.0.1...v3.0.2) (2017-09-18)
|
|
512
542
|
|
|
513
|
-
|
|
543
|
+
## [3.0.1](https://github.com/nodefony/nodefony/compare/v3.0.0...v3.0.1) (2017-09-14)
|
|
514
544
|
|
|
515
|
-
|
|
545
|
+
## [2.1.4](https://github.com/nodefony/nodefony/compare/v2.1.3...v2.1.4) (2017-05-08)
|
|
516
546
|
|
|
517
|
-
|
|
547
|
+
## [2.1.3](https://github.com/nodefony/nodefony/compare/v2.1.2...v2.1.3) (2017-04-29)
|
|
518
548
|
|
|
@@ -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]|_|-|.|'/
|
|
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]|_|-|.|'/
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
114
|
+
deleteUsers (obj, field, context, info) {
|
|
115
115
|
const {
|
|
116
116
|
users
|
|
117
117
|
} = field;
|
|
@@ -17,40 +17,40 @@
|
|
|
17
17
|
"repository": {},
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@withshepherd/faker": "5.5.5",
|
|
20
|
-
"mongoose-paginate-v2": "1.7.
|
|
21
|
-
"validator": "13.
|
|
20
|
+
"mongoose-paginate-v2": "1.7.4",
|
|
21
|
+
"validator": "13.11.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@babel/core": "7.
|
|
24
|
+
"@babel/core": "7.23.2",
|
|
25
25
|
"@babel/plugin-proposal-class-properties": "7.18.6",
|
|
26
26
|
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
27
|
-
"@babel/preset-env": "7.
|
|
28
|
-
"@babel/preset-react": "7.
|
|
29
|
-
"@mapbox/node-pre-gyp": "1.0.
|
|
30
|
-
"@popperjs/core": "2.11.
|
|
31
|
-
"babel-loader": "9.1.
|
|
27
|
+
"@babel/preset-env": "7.23.2",
|
|
28
|
+
"@babel/preset-react": "7.22.15",
|
|
29
|
+
"@mapbox/node-pre-gyp": "1.0.11",
|
|
30
|
+
"@popperjs/core": "2.11.8",
|
|
31
|
+
"babel-loader": "9.1.3",
|
|
32
32
|
"babel-register": "^6.26.0",
|
|
33
|
-
"bootstrap": "
|
|
33
|
+
"bootstrap": "5.3.2",
|
|
34
34
|
"buffer": "6.0.3",
|
|
35
35
|
"clean-webpack-plugin": "^4.0.0",
|
|
36
36
|
"css-hot-loader": "^1.4.4",
|
|
37
|
-
"css-loader": "6.
|
|
37
|
+
"css-loader": "6.8.1",
|
|
38
38
|
"expose-loader": "4.1.0",
|
|
39
39
|
"font-awesome": "^4.7.0",
|
|
40
|
-
"html-webpack-plugin": "5.5.
|
|
40
|
+
"html-webpack-plugin": "5.5.3",
|
|
41
41
|
"imports-loader": "4.0.1",
|
|
42
|
-
"jquery": "3.
|
|
43
|
-
"mini-css-extract-plugin": "2.7.
|
|
44
|
-
"node-gyp": "
|
|
45
|
-
"sass": "1.
|
|
46
|
-
"sass-loader": "13.
|
|
47
|
-
"sequelize-cli": "6.6.
|
|
42
|
+
"jquery": "3.7.1",
|
|
43
|
+
"mini-css-extract-plugin": "2.7.6",
|
|
44
|
+
"node-gyp": "10.0.1",
|
|
45
|
+
"sass": "1.69.5",
|
|
46
|
+
"sass-loader": "13.3.2",
|
|
47
|
+
"sequelize-cli": "6.6.2",
|
|
48
48
|
"stream": "0.0.2",
|
|
49
|
-
"style-loader": "3.3.
|
|
49
|
+
"style-loader": "3.3.3",
|
|
50
50
|
"svg-inline-loader": "^0.8.2",
|
|
51
|
-
"terser-webpack-plugin": "5.3.
|
|
52
|
-
"webpack": "5.
|
|
53
|
-
"webpack-merge": "
|
|
51
|
+
"terser-webpack-plugin": "5.3.9",
|
|
52
|
+
"webpack": "5.89.0",
|
|
53
|
+
"webpack-merge": "5.10.0"
|
|
54
54
|
},
|
|
55
55
|
"license": "CECILL-B",
|
|
56
56
|
"readmeFilename": "README.md",
|
|
@@ -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.
|
|
364
|
+
return user.deleteOne({
|
|
368
365
|
force: true
|
|
369
366
|
// session: transaction
|
|
370
367
|
})
|
|
371
|
-
.then(async (
|
|
368
|
+
.then(async (state) =>
|
|
372
369
|
// await transaction.commitTransaction();
|
|
373
|
-
|
|
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()
|
|
@@ -39,37 +39,38 @@
|
|
|
39
39
|
"microservice"
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"ejs": "3.1.
|
|
42
|
+
"ejs": "3.1.9",
|
|
43
43
|
"env-cmd": "^10.1.0",
|
|
44
44
|
"hello_world": "./src/n-api",
|
|
45
|
-
"markdown-it": "13.0.
|
|
45
|
+
"markdown-it": "13.0.2",
|
|
46
46
|
"nodefony": "^{{version}}",
|
|
47
47
|
"nodefony-client": "6.0.2",
|
|
48
|
-
"pm2": "5.
|
|
48
|
+
"pm2": "5.3.0",
|
|
49
49
|
"pm2-logrotate": "^2.7.0",
|
|
50
50
|
"serve-static": "1.15.0",
|
|
51
|
-
"socket.io": "4.
|
|
52
|
-
"socket.io-client": "4.
|
|
51
|
+
"socket.io": "4.7.2",
|
|
52
|
+
"socket.io-client": "4.7.2"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@babel/cli": "7.
|
|
56
|
-
"@babel/core": "7.
|
|
57
|
-
"@babel/preset-env": "7.
|
|
58
|
-
"@babel/register": "7.
|
|
59
|
-
"@mapbox/node-pre-gyp": "1.0.
|
|
60
|
-
"babel-loader": "
|
|
61
|
-
"chai": "4.3.
|
|
62
|
-
"html-loader": "4.
|
|
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
|
+
"@mapbox/node-pre-gyp": "1.0.11",
|
|
60
|
+
"babel-loader": "9.1.3",
|
|
61
|
+
"chai": "4.3.10",
|
|
62
|
+
"html-loader": "4.2.0",
|
|
63
63
|
"html-webpack-plugin": "^5.5.0",
|
|
64
|
-
"mini-css-extract-plugin": "2.6
|
|
65
|
-
"mocha": "10.
|
|
66
|
-
"node-gyp": "
|
|
67
|
-
"open": "
|
|
68
|
-
"sass
|
|
69
|
-
"
|
|
70
|
-
"webpack": "5.
|
|
71
|
-
"webpack
|
|
64
|
+
"mini-css-extract-plugin": "2.7.6",
|
|
65
|
+
"mocha": "10.2.0",
|
|
66
|
+
"node-gyp": "10.0.0",
|
|
67
|
+
"open": "9.1.0",
|
|
68
|
+
"sass": "1.69.5",
|
|
69
|
+
"sass-loader": "13.3.2",
|
|
70
|
+
"terser-webpack-plugin": "5.3.9",
|
|
71
|
+
"webpack": "5.89.0",
|
|
72
|
+
"webpack-cli": "5.1.4",
|
|
72
73
|
"webpack-merge": "^5.8.0"
|
|
73
74
|
},
|
|
74
75
|
"license": "ISC"
|
|
75
|
-
}
|
|
76
|
+
}
|
|
@@ -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",
|
|
@@ -38,31 +39,31 @@
|
|
|
38
39
|
"node": ">=12"
|
|
39
40
|
},
|
|
40
41
|
"dependencies": {
|
|
41
|
-
"graphql": "16.
|
|
42
|
-
"mongoose": "7.
|
|
42
|
+
"graphql": "16.8.1",
|
|
43
|
+
"mongoose": "7.6.3",
|
|
43
44
|
"nodefony": "{{version}}",
|
|
44
45
|
"pm2": "5.3.0",
|
|
45
|
-
"pm2-logrotate": "
|
|
46
|
-
"sequelize": "6.
|
|
47
|
-
"webpack": "5.
|
|
48
|
-
"webpack-dev-server": "4.
|
|
46
|
+
"pm2-logrotate": "2.7.0",
|
|
47
|
+
"sequelize": "6.33.0",
|
|
48
|
+
"webpack": "5.89.0",
|
|
49
|
+
"webpack-dev-server": "4.15.1"
|
|
49
50
|
},
|
|
50
51
|
"devDependencies": {
|
|
51
|
-
"@babel/core": "7.
|
|
52
|
-
"@babel/eslint-parser": "7.
|
|
53
|
-
"@mapbox/node-pre-gyp": "1.0.
|
|
54
|
-
"conventional-changelog-cli": "
|
|
55
|
-
"eslint": "8.
|
|
56
|
-
"eslint-config-standard": "17.
|
|
52
|
+
"@babel/core": "7.23.2",
|
|
53
|
+
"@babel/eslint-parser": "7.22.15",
|
|
54
|
+
"@mapbox/node-pre-gyp": "1.0.11",
|
|
55
|
+
"conventional-changelog-cli": "4.1.0",
|
|
56
|
+
"eslint": "8.52.0",
|
|
57
|
+
"eslint-config-standard": "17.1.0",
|
|
57
58
|
"eslint-plugin-html": "7.1.0",
|
|
58
|
-
"eslint-plugin-import": "2.
|
|
59
|
-
"eslint-plugin-markdown": "3.0.
|
|
59
|
+
"eslint-plugin-import": "2.29.0",
|
|
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.
|
|
63
|
+
"eslint-plugin-vue": "9.18.1",
|
|
63
64
|
"markdown-eslint-parser": "1.2.1",
|
|
64
|
-
"node-gyp": "
|
|
65
|
-
"vue-eslint-parser": "9.
|
|
65
|
+
"node-gyp": "10.0.0",
|
|
66
|
+
"vue-eslint-parser": "9.3.2"
|
|
66
67
|
},
|
|
67
68
|
"author": "{{authorFullName}} <{{authorMail}}>",
|
|
68
69
|
"readmeFilename": "README.md",
|
|
@@ -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
|
-
|
|
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
|
|
@@ -19,38 +19,38 @@
|
|
|
19
19
|
"dependencies": {},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
{% if addons.workbox %}
|
|
22
|
-
"workbox-webpack-plugin": "
|
|
22
|
+
"workbox-webpack-plugin": "7.0.0",
|
|
23
23
|
{% endif %}
|
|
24
24
|
{% if addons.bootstrap %}
|
|
25
|
-
"@popperjs/core": "2.11.
|
|
26
|
-
"bootstrap": "
|
|
27
|
-
"jquery": "3.
|
|
25
|
+
"@popperjs/core": "2.11.8",
|
|
26
|
+
"bootstrap": "5.3.2",
|
|
27
|
+
"jquery": "3.7.1",
|
|
28
28
|
"font-awesome": "^4.7.0",
|
|
29
29
|
{% endif %}
|
|
30
30
|
{% if addons.webpack %}
|
|
31
|
-
"@babel/core": "7.
|
|
32
|
-
"@babel/preset-env": "7.
|
|
33
|
-
"babel-loader": "9.1.
|
|
34
|
-
"clean-webpack-plugin": "
|
|
35
|
-
"css-hot-loader": "
|
|
36
|
-
"css-loader": "6.
|
|
31
|
+
"@babel/core": "7.23.2",
|
|
32
|
+
"@babel/preset-env": "7.23.2",
|
|
33
|
+
"babel-loader": "9.1.3",
|
|
34
|
+
"clean-webpack-plugin": "4.0.0",
|
|
35
|
+
"css-hot-loader": "1.4.4",
|
|
36
|
+
"css-loader": "6.8.1",
|
|
37
37
|
"expose-loader": "4.1.0",
|
|
38
|
-
"favicons": "7.1.
|
|
39
|
-
"favicons-webpack-plugin": "6.0.
|
|
40
|
-
"html-webpack-plugin": "
|
|
38
|
+
"favicons": "7.1.4",
|
|
39
|
+
"favicons-webpack-plugin": "6.0.1",
|
|
40
|
+
"html-webpack-plugin": "5.5.3",
|
|
41
41
|
"imports-loader": "4.0.1",
|
|
42
|
-
"mini-css-extract-plugin": "2.7.
|
|
43
|
-
"sass": "1.
|
|
44
|
-
"sass-loader": "13.
|
|
45
|
-
"sitemap-webpack-plugin": "
|
|
46
|
-
"style-loader": "3.3.
|
|
47
|
-
"terser-webpack-plugin": "5.3.
|
|
48
|
-
"webpack": "5.
|
|
49
|
-
"webpack-dev-server": "4.
|
|
50
|
-
"webpack-merge": "
|
|
42
|
+
"mini-css-extract-plugin": "2.7.6",
|
|
43
|
+
"sass": "1.69.5",
|
|
44
|
+
"sass-loader": "13.3.2",
|
|
45
|
+
"sitemap-webpack-plugin": "1.1.1",
|
|
46
|
+
"style-loader": "3.3.3",
|
|
47
|
+
"terser-webpack-plugin": "5.3.9",
|
|
48
|
+
"webpack": "5.89.0",
|
|
49
|
+
"webpack-dev-server": "4.15.1",
|
|
50
|
+
"webpack-merge": "5.10.0",
|
|
51
51
|
{% endif %}
|
|
52
|
-
"@mapbox/node-pre-gyp": "1.0.
|
|
53
|
-
"node-gyp": "
|
|
52
|
+
"@mapbox/node-pre-gyp": "1.0.11",
|
|
53
|
+
"node-gyp": "10.0.0"
|
|
54
54
|
},
|
|
55
55
|
"license": "",
|
|
56
56
|
"readmeFilename": "README.md"
|
package/cli.es6
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable max-lines-per-function */
|
|
1
2
|
// const Table = require('cli-table3');
|
|
2
3
|
const asciify = require("asciify");
|
|
3
4
|
let inquirer = null;
|
|
@@ -17,6 +18,13 @@ const cliTableImport = async () => {
|
|
|
17
18
|
throw e;
|
|
18
19
|
});
|
|
19
20
|
};
|
|
21
|
+
|
|
22
|
+
const nodeEmojiImport = async () => await import("node-emoji")
|
|
23
|
+
.then((esmFS) => esmFS)
|
|
24
|
+
.catch((e) => {
|
|
25
|
+
throw e;
|
|
26
|
+
});
|
|
27
|
+
|
|
20
28
|
const {
|
|
21
29
|
program,
|
|
22
30
|
command
|
|
@@ -66,6 +74,7 @@ const defaultOptions = {
|
|
|
66
74
|
};
|
|
67
75
|
|
|
68
76
|
class CLI extends nodefony.Service {
|
|
77
|
+
// eslint-disable-next-line complexity
|
|
69
78
|
constructor (name, container, notificationsCenter, options) {
|
|
70
79
|
switch (arguments.length) {
|
|
71
80
|
case 0:
|
|
@@ -130,6 +139,10 @@ class CLI extends nodefony.Service {
|
|
|
130
139
|
this.log(e, "WARNING");
|
|
131
140
|
// Table = require("cli-table3")
|
|
132
141
|
});
|
|
142
|
+
this.emoji = await nodeEmojiImport()
|
|
143
|
+
.catch((e) => {
|
|
144
|
+
this.log(e, "WARNING");
|
|
145
|
+
});
|
|
133
146
|
this.initPrompt();
|
|
134
147
|
});
|
|
135
148
|
this.commander = null;
|
|
@@ -360,7 +373,6 @@ class CLI extends nodefony.Service {
|
|
|
360
373
|
initUi () {
|
|
361
374
|
this.clc = clc;
|
|
362
375
|
this.clui = require("clui");
|
|
363
|
-
this.emoji = require("node-emoji");
|
|
364
376
|
this.spinner = null;
|
|
365
377
|
this.blankLine = function () {
|
|
366
378
|
const myLine = new this.clui.Line().fill();
|