@tsed/cli-core 7.0.0-alpha.6 → 7.0.0-alpha.7
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.
|
@@ -24,24 +24,26 @@ export function createInjector(settings = {}) {
|
|
|
24
24
|
}
|
|
25
25
|
else {
|
|
26
26
|
/* istanbul ignore next */
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
27
|
+
if (!settings.logger?.disableCliFormat) {
|
|
28
|
+
inj.logger.level = inj.settings.logger?.level || "warn";
|
|
29
|
+
inj.logger.appenders
|
|
30
|
+
.set("stdout", {
|
|
31
|
+
type: "stdout",
|
|
32
|
+
layout: {
|
|
33
|
+
type: "pattern",
|
|
34
|
+
pattern: "[%d{hh:mm:ss}] %m"
|
|
35
|
+
},
|
|
36
|
+
levels: ["info", "debug"]
|
|
37
|
+
})
|
|
38
|
+
.set("stderr", {
|
|
39
|
+
type: "stderr",
|
|
40
|
+
layout: {
|
|
41
|
+
type: "pattern",
|
|
42
|
+
pattern: "[%d{hh:mm:ss}][%p] %m"
|
|
43
|
+
},
|
|
44
|
+
levels: ["trace", "fatal", "error", "warn"]
|
|
45
|
+
});
|
|
46
|
+
}
|
|
45
47
|
}
|
|
46
48
|
return inj;
|
|
47
49
|
}
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import "@tsed/logger-std";
|
|
2
2
|
import "@tsed/logger-pattern-layout";
|
|
3
|
-
import {
|
|
3
|
+
import { InjectorService } from "@tsed/di";
|
|
4
4
|
import { Logger } from "@tsed/logger";
|
|
5
|
+
declare global {
|
|
6
|
+
namespace TsED {
|
|
7
|
+
interface Configuration {
|
|
8
|
+
logger?: LoggerConfiguration;
|
|
9
|
+
}
|
|
10
|
+
interface LoggerConfiguration {
|
|
11
|
+
disableCliFormat?: boolean;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
5
15
|
export declare function getLogger(): Logger;
|
|
6
|
-
export declare function createInjector(settings?: Partial<
|
|
16
|
+
export declare function createInjector(settings?: Partial<TsED.Configuration>): InjectorService;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/cli-core",
|
|
3
3
|
"description": "Build your CLI with TypeScript and Decorators",
|
|
4
|
-
"version": "7.0.0-alpha.
|
|
4
|
+
"version": "7.0.0-alpha.7",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/esm/index.js",
|
|
7
7
|
"source": "./src/index.ts",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"uuid": "^10.0.0"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@tsed/typescript": "7.0.0-alpha.
|
|
68
|
+
"@tsed/typescript": "7.0.0-alpha.7",
|
|
69
69
|
"@types/commander": "2.12.2",
|
|
70
70
|
"@types/figures": "3.0.1",
|
|
71
71
|
"@types/fs-extra": "^11.0.4",
|