@adaptivestone/framework 5.0.0-alpha.19 → 5.0.0-alpha.20

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,8 @@
1
+ ### 5.0.0-alpha.20
2
+
3
+ [UPDATE] update deps
4
+ [UPDATE] #realLogger do not throw error in a scecific cases (model toJSON({virtual:true}))
5
+
1
6
  ### 5.0.0-alpha.19
2
7
 
3
8
  [NEW] added modelSchemaOptions for models
package/modules/Base.js CHANGED
@@ -18,7 +18,17 @@ class Base {
18
18
  * Optimzation to lazy load logger. It will be inited only on request
19
19
  */
20
20
  get logger() {
21
- if (!this.#realLogger) {
21
+ let l;
22
+ try {
23
+ l = this.#realLogger;
24
+ } catch (e) {
25
+ console.warn(
26
+ `You try to accees logger not from class. that can be ok in case of models.`,
27
+ );
28
+ return null;
29
+ }
30
+
31
+ if (!l) {
22
32
  this.#realLogger = this.getLogger(
23
33
  this.constructor.loggerGroup + this.getConstructorName(),
24
34
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptivestone/framework",
3
- "version": "5.0.0-alpha.19",
3
+ "version": "5.0.0-alpha.20",
4
4
  "description": "Adaptive stone node js framework",
5
5
  "main": "index.js",
6
6
  "type": "module",