@adaptivestone/framework 3.0.14 → 3.0.15
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 +5 -0
- package/commands/migration/Create.js +0 -1
- package/commands/migration/Migrate.js +0 -1
- package/models/User.js +2 -2
- package/modules/Base.d.ts +1 -1
- package/modules/Base.js +5 -5
- package/package.json +6 -3
package/CHANGELOG.md
CHANGED
package/models/User.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable no-param-reassign */
|
|
1
2
|
const bcrypt = require('bcrypt');
|
|
2
3
|
|
|
3
4
|
const AbstractModel = require('../modules/AbstractModel');
|
|
@@ -99,8 +100,7 @@ class User extends AbstractModel {
|
|
|
99
100
|
avatar: this.avatar,
|
|
100
101
|
name: this.name,
|
|
101
102
|
email: this.email,
|
|
102
|
-
|
|
103
|
-
_id: this._id,
|
|
103
|
+
id: this.id,
|
|
104
104
|
isVerified: this.isVerified,
|
|
105
105
|
permissions: this.permissions,
|
|
106
106
|
locale: this.locale,
|
package/modules/Base.d.ts
CHANGED
package/modules/Base.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/* eslint-disable no-underscore-dangle */
|
|
2
1
|
const fs = require('fs').promises;
|
|
3
2
|
const { join } = require('path');
|
|
4
3
|
|
|
5
4
|
class Base {
|
|
5
|
+
#realLogger = null;
|
|
6
|
+
|
|
6
7
|
constructor(app) {
|
|
7
8
|
this.app = app;
|
|
8
|
-
this._realLogger = null;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
/**
|
|
@@ -19,12 +19,12 @@ class Base {
|
|
|
19
19
|
* Optimzation to lazy load logger. It will be inited only on request
|
|
20
20
|
*/
|
|
21
21
|
get logger() {
|
|
22
|
-
if (!this
|
|
23
|
-
this
|
|
22
|
+
if (!this.#realLogger) {
|
|
23
|
+
this.#realLogger = this.getLogger(
|
|
24
24
|
this.constructor.loggerGroup + this.getConstructorName(),
|
|
25
25
|
);
|
|
26
26
|
}
|
|
27
|
-
return this
|
|
27
|
+
return this.#realLogger;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
/**
|
package/package.json
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptivestone/framework",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.15",
|
|
4
4
|
"description": "Adaptive stone node js framework",
|
|
5
|
-
"main": "index.js",
|
|
5
|
+
"main": "src/index.js",
|
|
6
|
+
"engines": {
|
|
7
|
+
"node": ">=16.0.0"
|
|
8
|
+
},
|
|
6
9
|
"repository": {
|
|
7
10
|
"type": "git",
|
|
8
11
|
"url": "https://gitlab.com/adaptivestone/framework"
|
|
@@ -55,7 +58,7 @@
|
|
|
55
58
|
"eslint-plugin-import": "^2.23.4",
|
|
56
59
|
"eslint-plugin-jest": "^26.0.0",
|
|
57
60
|
"husky": "^7.0.0",
|
|
58
|
-
"jest": "^
|
|
61
|
+
"jest": "^28.0.0",
|
|
59
62
|
"lint-staged": "^12.0.0",
|
|
60
63
|
"mongodb-memory-server": "^8.0.2",
|
|
61
64
|
"nodemon": "^2.0.12",
|