@equinor/fusion-framework-module
Advanced tools
Comparing version 4.3.4 to 4.3.5-alpha-1691ce366ff2e68db5722686eda883710ca88dea
# Change Log | ||
## 4.3.5-alpha-1691ce366ff2e68db5722686eda883710ca88dea | ||
### Patch Changes | ||
- [#2451](https://github.com/equinor/fusion-framework/pull/2451) [`2644b3d`](https://github.com/equinor/fusion-framework/commit/2644b3d63939aede736a3b1950db32dbd487877d) Thanks [@odinr](https://github.com/odinr)! - fixed issue where post handlers where empty | ||
## 4.3.4 | ||
@@ -4,0 +10,0 @@ |
@@ -12,3 +12,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
import { BehaviorSubject, EMPTY, firstValueFrom, from, lastValueFrom, throwError } from 'rxjs'; | ||
import { catchError, filter, map, mergeMap, scan, tap, timeout } from 'rxjs/operators'; | ||
import { catchError, filter, map, mergeMap, reduce, tap, timeout } from 'rxjs/operators'; | ||
import { ModuleConsoleLogger } from './logger'; | ||
@@ -143,3 +143,3 @@ import { SemanticVersion } from './lib/semantic-version'; | ||
} | ||
})), scan((acc, module) => Object.assign(acc, module), { | ||
})), reduce((acc, module) => Object.assign(acc, module), { | ||
onAfterConfiguration(cb) { | ||
@@ -291,3 +291,8 @@ _afterConfiguration.push(cb); | ||
/** call all added post config hooks */ | ||
yield lastValueFrom(postInitialize$); | ||
yield new Promise((resolve, reject) => { | ||
postInitialize$.subscribe({ | ||
complete: () => resolve(true), | ||
error: reject, | ||
}); | ||
}); | ||
if (afterInit.length) { | ||
@@ -294,0 +299,0 @@ try { |
@@ -0,1 +1,4 @@ | ||
/** | ||
* @todo replace with proper logger | ||
*/ | ||
export class ConsoleLogger { | ||
@@ -5,3 +8,3 @@ constructor(domain) { | ||
/** - 0-1-2-3 (error-warning-info-debug) if not provided only errors are logged */ | ||
this.level = process.env.NODE_ENV === 'development' ? 3 : 1; | ||
this.level = Number(process.env.FUSION_LOG_LEVEL) || 1; | ||
} | ||
@@ -8,0 +11,0 @@ /** @inheritdoc */ |
@@ -9,2 +9,5 @@ import { AnyModule } from './types'; | ||
} | ||
/** | ||
* @todo replace with proper logger | ||
*/ | ||
export declare class ConsoleLogger implements IConsoleLogger { | ||
@@ -11,0 +14,0 @@ protected domain: string; |
{ | ||
"name": "@equinor/fusion-framework-module", | ||
"version": "4.3.4", | ||
"version": "4.3.5-alpha-1691ce366ff2e68db5722686eda883710ca88dea", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/esm/index.js", |
/* eslint-disable @typescript-eslint/no-explicit-any */ | ||
import { BehaviorSubject, EMPTY, firstValueFrom, from, lastValueFrom, throwError } from 'rxjs'; | ||
import { catchError, filter, map, mergeMap, scan, tap, timeout } from 'rxjs/operators'; | ||
import { catchError, filter, map, mergeMap, reduce, tap, timeout } from 'rxjs/operators'; | ||
@@ -263,3 +263,3 @@ import { IModuleConsoleLogger, ModuleConsoleLogger } from './logger'; | ||
}), | ||
scan((acc, module) => Object.assign(acc, module), { | ||
reduce((acc, module) => Object.assign(acc, module), { | ||
onAfterConfiguration(cb) { | ||
@@ -488,3 +488,8 @@ _afterConfiguration.push(cb); | ||
/** call all added post config hooks */ | ||
await lastValueFrom(postInitialize$); | ||
await new Promise((resolve, reject) => { | ||
postInitialize$.subscribe({ | ||
complete: () => resolve(true), | ||
error: reject, | ||
}); | ||
}); | ||
@@ -491,0 +496,0 @@ if (afterInit.length) { |
@@ -10,6 +10,9 @@ import { AnyModule } from './types'; | ||
} | ||
/** | ||
* @todo replace with proper logger | ||
*/ | ||
export class ConsoleLogger implements IConsoleLogger { | ||
/** - 0-1-2-3 (error-warning-info-debug) if not provided only errors are logged */ | ||
public level: 0 | 1 | 2 | 3 | 4 = process.env.NODE_ENV === 'development' ? 3 : 1; | ||
public level: 0 | 1 | 2 | 3 | 4 = | ||
(Number(process.env.FUSION_LOG_LEVEL) as 0 | 1 | 2 | 3 | 4) || 1; | ||
constructor(protected domain: string) {} | ||
@@ -16,0 +19,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
238207
2621
2