beautify-console-log
Advanced tools
Comparing version 1.2.9 to 1.3.0
@@ -9,2 +9,3 @@ import { LogType, PadStartText } from "./model"; | ||
* ``` | ||
* | ||
* import BeautifyConsole from "beautify-console-log"; | ||
@@ -22,2 +23,20 @@ * const log = BeautifyConsole.getInstance(); | ||
* | ||
* ``` | ||
* { | ||
* info: (...args: any[]) => void; | ||
* error: (...args: any[]) => void; | ||
* warn: (...args: any[]) => void; | ||
* log: (...args: any[]) => void; | ||
* static getInstance(): BeautifyConsole; | ||
* config(config: { | ||
* type?: LogType[]; | ||
* title?: string; | ||
* }): void; | ||
* reset(): BeautifyConsole; | ||
* open(type?: LogType): BeautifyConsole; | ||
* close(type?: LogType): BeautifyConsole; | ||
* setPadStartText(config: PadStartText): BeautifyConsole; | ||
* } | ||
* ``` | ||
* | ||
* 可参考 https://developer.mozilla.org/en-US/docs/Web/API/Console | ||
@@ -24,0 +43,0 @@ */ |
@@ -50,2 +50,3 @@ "use strict"; | ||
* ``` | ||
* | ||
* import BeautifyConsole from "beautify-console-log"; | ||
@@ -63,2 +64,20 @@ * const log = BeautifyConsole.getInstance(); | ||
* | ||
* ``` | ||
* { | ||
* info: (...args: any[]) => void; | ||
* error: (...args: any[]) => void; | ||
* warn: (...args: any[]) => void; | ||
* log: (...args: any[]) => void; | ||
* static getInstance(): BeautifyConsole; | ||
* config(config: { | ||
* type?: LogType[]; | ||
* title?: string; | ||
* }): void; | ||
* reset(): BeautifyConsole; | ||
* open(type?: LogType): BeautifyConsole; | ||
* close(type?: LogType): BeautifyConsole; | ||
* setPadStartText(config: PadStartText): BeautifyConsole; | ||
* } | ||
* ``` | ||
* | ||
* 可参考 https://developer.mozilla.org/en-US/docs/Web/API/Console | ||
@@ -65,0 +84,0 @@ */ |
/** | ||
* 背景编号:40黑,41红,42绿,43黄,44蓝,45紫,46深绿,47白色 | ||
* 字色编号:30黑,31红,32绿,33黄,34蓝,35紫,36深绿,37白色 | ||
* 背景编号: | ||
* | ||
* ``` text | ||
* ColorType.black: 40黑, | ||
* ColorType.red: 41红, | ||
* ColorType.green: 42绿, | ||
* ColorType.yellow: 43黄, | ||
* ColorType.blue: 44蓝, | ||
* ColorType.purple: 45紫, | ||
* ColorType.cyan: 46深绿, | ||
* ColorType.white: 47白色 | ||
* ``` | ||
* 字色编号: | ||
* ``` text | ||
* ColorType.black: 30黑, | ||
* ColorType.red: 31红, | ||
* ColorType.green: 32绿, | ||
* ColorType.yellow: 33黄, | ||
* ColorType.blue: 34蓝, | ||
* ColorType.purple: 35紫, | ||
* ColorType.cyan: 36深绿, | ||
* ColorType.white: 37白色 | ||
* ``` | ||
* 30黑,31红,32绿,33黄,34蓝,35紫,36深绿,37白色 | ||
* 0 终端默认设置(黑底白字) | ||
@@ -19,2 +41,11 @@ * 1 高亮显示 | ||
} | ||
/** | ||
* 默认填充文本样式 | ||
* ```text | ||
* { | ||
* color?: ColorType; | ||
* bgColor?: ColorType; | ||
* } | ||
* ``` | ||
*/ | ||
export interface BaseColorType { | ||
@@ -24,2 +55,11 @@ color?: ColorType; | ||
} | ||
/** | ||
* 左侧填充文本样式 | ||
* ```text | ||
* { | ||
* color: ColorType; | ||
* bgColor: ColorType; | ||
* } | ||
* ``` | ||
*/ | ||
export interface PadStartStyle { | ||
@@ -31,2 +71,9 @@ color: ColorType; | ||
* 左侧填充文本接口 | ||
* ```text | ||
* { | ||
* title: string; | ||
* logType: LogType; | ||
* style?: PadStartStyle; | ||
* } | ||
* ``` | ||
*/ | ||
@@ -40,2 +87,8 @@ export interface PadStartText { | ||
* 日志类型 | ||
* ``` | ||
* LogType.info = "info" | ||
* LogType.warn = "warn" | ||
* LogType.error = "error" | ||
* LogType.log = "log" | ||
* ``` | ||
*/ | ||
@@ -42,0 +95,0 @@ export declare enum LogType { |
@@ -5,4 +5,26 @@ "use strict"; | ||
/** | ||
* 背景编号:40黑,41红,42绿,43黄,44蓝,45紫,46深绿,47白色 | ||
* 字色编号:30黑,31红,32绿,33黄,34蓝,35紫,36深绿,37白色 | ||
* 背景编号: | ||
* | ||
* ``` text | ||
* ColorType.black: 40黑, | ||
* ColorType.red: 41红, | ||
* ColorType.green: 42绿, | ||
* ColorType.yellow: 43黄, | ||
* ColorType.blue: 44蓝, | ||
* ColorType.purple: 45紫, | ||
* ColorType.cyan: 46深绿, | ||
* ColorType.white: 47白色 | ||
* ``` | ||
* 字色编号: | ||
* ``` text | ||
* ColorType.black: 30黑, | ||
* ColorType.red: 31红, | ||
* ColorType.green: 32绿, | ||
* ColorType.yellow: 33黄, | ||
* ColorType.blue: 34蓝, | ||
* ColorType.purple: 35紫, | ||
* ColorType.cyan: 36深绿, | ||
* ColorType.white: 37白色 | ||
* ``` | ||
* 30黑,31红,32绿,33黄,34蓝,35紫,36深绿,37白色 | ||
* 0 终端默认设置(黑底白字) | ||
@@ -34,2 +56,8 @@ * 1 高亮显示 | ||
* 日志类型 | ||
* ``` | ||
* LogType.info = "info" | ||
* LogType.warn = "warn" | ||
* LogType.error = "error" | ||
* LogType.log = "log" | ||
* ``` | ||
*/ | ||
@@ -36,0 +64,0 @@ var LogType; |
{ | ||
"name": "beautify-console-log", | ||
"version": "1.2.9", | ||
"version": "1.3.0", | ||
"description": "This is a further beautification and encapsulation of the 'console' object, including console. log, console. info, console. warn, and console. error. It can display the number of rows where the log is printed.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -54,9 +54,10 @@ # beautify-console-log | ||
|title |String |Custom log header | | ||
|type |Array<String> |The type of log displayed, set to only display the corresponding log type(`"info"`、`"log"`、`"warn"`、`"error"`)| | ||
|type |LogType[] |The type of log displayed, set to only display the corresponding log type(`LogType.info`、`LogType.log`、`LogType.warn`、`LogType.error`)| | ||
``` | ||
import BeautifyConsole from "beautify-console-log"; | ||
import { LogType } from 'beautify-console-log/lib/beautify-console/model'; | ||
const log = BeautifyConsole.getInstance(); | ||
log.config({ | ||
title: 'custom title', | ||
type: ['info', 'error'] | ||
type: [LogType.info, LogType.error] | ||
}) | ||
@@ -110,11 +111,12 @@ // The usage method is consistent with the normal console.info | ||
|-----------------------------|-----------------------------| | ||
|String? |`info`、`log`、`warn`、`error`, Or not transmitted| | ||
|LogType? |`LogType.info`、`LogType.log`、`LogType.warn`、`LogType.error`, Or not transmitted| | ||
``` | ||
import BeautifyConsole from "beautify-console-log"; | ||
import { LogType } from 'beautify-console-log/lib/beautify-console/model'; | ||
const log = BeautifyConsole.getInstance(); | ||
log.open() // Open all types of logs | ||
// OR | ||
log.open('info') // Open the info log | ||
log.open(LogType.info) // Open the info log | ||
// OR | ||
log.open('info').open('error') // Open the info log | ||
log.open(LogType.info).open(LogType.error) // Open the info log | ||
``` | ||
@@ -126,11 +128,12 @@ | ||
|-----------------------------|-----------------------------| | ||
|String? |`info`、`log`、`warn`、`error`, Or not transmitted| | ||
|LogType? |`LogType.info`、`LogType.log`、`LogType.warn`、`LogType.error`, Or not transmitted| | ||
``` | ||
import BeautifyConsole from "beautify-console-log"; | ||
import { LogType } from 'beautify-console-log/lib/beautify-console/model'; | ||
const log = BeautifyConsole.getInstance(); | ||
log.close() // Close all types of logs | ||
// OR | ||
log.close('info') // Close the info log | ||
log.close(LogType.info) // Close the info log | ||
// OR | ||
log.close('info').open('log') | ||
log.close(LogType.info).open(LogType.log) | ||
``` | ||
@@ -142,15 +145,22 @@ | ||
|-------------------------------|-----------------------------|-----------------------------| | ||
||PadStartText|| | ||
|title |String |Custom log header | | ||
|logType |String |`info`,`log`,`warn`,`error`| | ||
|style |Object |`info`,`log`,`warn`,`error`| | ||
| |├──color |`black`,`red`,`green`,`yellow`,`blue`,`purple`,`cyan`,`white`| | ||
| |└──bgColor |`black`,`red`,`green`,`yellow`,`blue`,`purple`,`cyan`,`white`| | ||
|logType |LogType |`LogType.info`,`LogType.log`,`LogType.warn`,`LogType.error`| | ||
|style |Object || | ||
| |├──color (ColorType) |`ColorType.black`,`ColorType.red`,`ColorType.green`,`ColorType.yellow`,`ColorType.blue`,`ColorType.purple`,`ColorType.cyan`,`ColorType.white`| | ||
| |└──bgColor (ColorType) |`ColorType.black`,`ColorType.red`,`ColorType.green`,`ColorType.yellow`,`ColorType.blue`,`ColorType.purple`,`ColorType.cyan`,`ColorType.white`| | ||
``` | ||
import BeautifyConsole from "beautify-console-log"; | ||
import { LogType, ColorType } from 'beautify-console-log/lib/beautify-console/model'; | ||
const log = BeautifyConsole.getInstance(); | ||
log.close() // Close all types of logs | ||
// OR | ||
log.close('info') // Close the info log | ||
log.close(LogType.info) // Close the info log | ||
// OR | ||
log.close('info').open('log') | ||
log.close(LogType.info).open(LogType.log) | ||
log.setPadStartText({ | ||
title: "hello world ->", | ||
logType: LogType.info, | ||
}).log(1234) | ||
``` | ||
@@ -162,2 +172,3 @@ | ||
import BeautifyConsole from "beautify-console-log"; | ||
import { LogType } from 'beautify-console-log/lib/beautify-console/model'; | ||
const log = BeautifyConsole.getInstance(); | ||
@@ -167,3 +178,3 @@ | ||
title: 'custom title', | ||
type: ['info', 'error'] | ||
type: [LogType.info, LogType.error] | ||
}) | ||
@@ -219,3 +230,6 @@ | ||
log.setPadStartText('log', 'hello world').log(1234) | ||
log.setPadStartText({ | ||
title: "hello world ->", | ||
logType: LogType.info, | ||
}).log(1234) | ||
``` | ||
@@ -226,5 +240,6 @@ | ||
const log = BeautifyConsole.getInstance(); | ||
import { LogType } from 'beautify-console-log/lib/beautify-console/model'; | ||
log.config({ | ||
title: 'example pad start text', // Log header content filled on the left | ||
type: ['info', 'error', 'warn', 'log'], // Display partial log types | ||
type: [LogType.info, LogType.error, LogType.warn, LogType.log], // Display partial log types | ||
}) | ||
@@ -259,3 +274,6 @@ log.info(1234, '4', [3, 5]); | ||
Log.setPadStartText('log ','hello world').info(1234,'4 ', [3, 5]); | ||
log.setPadStartText({ | ||
title: "hello world ->", | ||
logType: LogType.info, | ||
}).info(1234,'4 ', [3, 5]) | ||
@@ -267,20 +285,21 @@ ``` | ||
``` | ||
// ... | ||
const log = BeautifyConsole.getInstance(); | ||
log.close('info'); | ||
log.close('log'); | ||
log.close('warn'); | ||
log.close('error'); | ||
log.close(LogType.info); | ||
log.close(LogType.log); | ||
log.close(LogType.warn); | ||
log.close(LogType.error); | ||
log.close(); | ||
log.close().open('error'); | ||
log.close().open(LogType.error); | ||
// or | ||
log.open('error').open('log').open('warn').open('info'); | ||
log.open(LogType.error).open(LogType.log).open(LogType.warn).open(LogType.info); | ||
// or | ||
log.close('error').info('closed error'); | ||
log.close('error').error('closed error'); | ||
log.close(LogType.error).info('closed error'); | ||
log.close(LogType.error).error('closed error'); | ||
// or | ||
log.close('error').open('info'); | ||
log.close('error').open('info').info('info...'); | ||
log.close(LogType.error).open(LogType.info); | ||
log.close(LogType.error).open(LogType.info).info('info...'); | ||
@@ -294,19 +313,21 @@ ``` | ||
``` | ||
// ... | ||
const log = BeautifyConsole.getInstance(); | ||
log.open('info'); | ||
log.open('log'); | ||
log.open('warn'); | ||
log.open('error'); | ||
log.open().close('info'); | ||
log.open(LogType.info); | ||
log.open(LogType.log); | ||
log.open(LogType.warn); | ||
log.open(LogType.error); | ||
log.open(); | ||
log.open().close(LogType.info); | ||
//or | ||
log.open('error').open('log').open('warn').open('info'); | ||
log.open(LogType.error).open(LogType.log).open(LogType.warn).open(LogType.info); | ||
// or | ||
log.open().info('closed error'); | ||
log.open('error').error('closed error'); | ||
log.open(LogType.error).error('closed error'); | ||
// or | ||
log.close('error').open('info'); | ||
log.close('error').open('info').info('info...'); | ||
log.close(LogType.error).open(LogType.info); | ||
log.close(LogType.error).open(LogType.info).info('info...'); | ||
@@ -313,0 +334,0 @@ ``` |
102
README.zh.md
@@ -47,9 +47,10 @@ # beautify-console-log | ||
|title |String |自定义日志头 | | ||
|type |Array<String> |显示的日志类型,设置后只显示对应的日志类型(`"info"`、`"log"`、`"warn"`、`"error"`)| | ||
|type |LogType[] |显示的日志类型,设置后只显示对应的日志类型(`LogType.info`、`LogType.log`、`LogType.warn`、`LogType.error`)| | ||
``` | ||
import BeautifyConsole from "beautify-console-log"; | ||
import { LogType } from 'beautify-console-log/lib/beautify-console/model'; | ||
const log = BeautifyConsole.getInstance(); | ||
log.config({ | ||
title: 'custom title', | ||
type: ['info', 'error'] | ||
type: [LogType.info, LogType.error] | ||
}) | ||
@@ -103,11 +104,12 @@ // 使用方式与正常的console.info()一致 | ||
|-----------------------------|-----------------------------| | ||
|String? |`info`、`log`、`warn`、`error`,或者不传| | ||
|LogType? |`LogType.info`、`LogType.log`、`LogType.warn`、`LogType.error`,或者不传| | ||
``` | ||
import BeautifyConsole from "beautify-console-log"; | ||
import { LogType } from 'beautify-console-log/lib/beautify-console/model'; | ||
const log = BeautifyConsole.getInstance(); | ||
log.open() // 打开所有类型日志 | ||
// 或者 | ||
log.open('info') // 打开info日志 | ||
log.open(LogType.info) // 打开info日志 | ||
// 或者 | ||
log.open('info').open('error') // 打开info日志 | ||
log.open(LogType.info).open('error') // 打开info日志 | ||
``` | ||
@@ -119,11 +121,12 @@ | ||
|-----------------------------|-----------------------------| | ||
|String? |`info`、`log`、`warn`、`error`,或者不传| | ||
|LogType? |`LogType.info`、`LogType.log`、`LogType.warn`、`LogType.error`,或者不传| | ||
``` | ||
import BeautifyConsole from "beautify-console-log"; | ||
import { LogType } from 'beautify-console-log/lib/beautify-console/model'; | ||
const log = BeautifyConsole.getInstance(); | ||
log.close() // 关闭所有类型日志 | ||
// 或者 | ||
log.close('info') // 关闭info日志 | ||
log.close(LogType.info) // 关闭info日志 | ||
// 或者 | ||
log.close('info').open('log') | ||
log.close(LogType.info).open('log') | ||
``` | ||
@@ -135,15 +138,21 @@ | ||
|-------------------------------|-----------------------------|-----------------------------| | ||
||PadStartText|| | ||
|title |String |自定义日志头 | | ||
|logType |String |`info`,`log`,`warn`,`error`| | ||
|style |Object |`info`,`log`,`warn`,`error`| | ||
| |├──color |`black`,`red`,`green`,`yellow`,`blue`,`purple`,`cyan`,`white`| | ||
| |└──bgColor |`black`,`red`,`green`,`yellow`,`blue`,`purple`,`cyan`,`white`| | ||
|logType |String |`LogType.info`,`LogType.log`,`LogType.warn`,`LogType.error`| | ||
|style |Object || | ||
| |├──color |`ColorType.black`,`ColorType.red`,`ColorType.green`,`ColorType.yellow`,`ColorType.blue`,`ColorType.purple`,`ColorType.cyan`,`ColorType.white`,`cyan`,`white`| | ||
| |└──bgColor |`ColorType.black`,`ColorType.red`,`ColorType.green`,`ColorType.yellow`,`ColorType.blue`,`ColorType.purple`,`ColorType.cyan`,`ColorType.white`,`cyan`,`white`| | ||
``` | ||
import BeautifyConsole from "beautify-console-log"; | ||
import { LogType, ColorType } from 'beautify-console-log/lib/beautify-console/model'; | ||
const log = BeautifyConsole.getInstance(); | ||
log.close() // 关闭所有类型日志 | ||
// 或者 | ||
log.close('info') // 关闭info日志 | ||
log.close(LogType.info) // 关闭info日志 | ||
// 或者 | ||
log.close('info').open('log') | ||
log.close(LogType.info).open('log') | ||
log.setPadStartText({ | ||
title: "hello world ->", | ||
logType: LogType.info, | ||
}).log(1234) | ||
``` | ||
@@ -155,2 +164,3 @@ | ||
import BeautifyConsole from "beautify-console-log"; | ||
import { LogType } from 'beautify-console-log/lib/beautify-console/model'; | ||
const log = BeautifyConsole.getInstance(); | ||
@@ -160,3 +170,3 @@ | ||
title: 'custom title', | ||
type: ['info', 'error'] | ||
type: [LogType.info, LogType.error] | ||
}) | ||
@@ -197,5 +207,3 @@ | ||
log.log({ | ||
"name": "chengzan" | ||
}) | ||
log.log(1234) | ||
@@ -208,2 +216,6 @@ log.close().warn('no show') | ||
log.setPadStartText({ | ||
title: "hello world ->", | ||
logType: LogType.info, | ||
}).log(1234) | ||
@@ -245,5 +257,6 @@ console.log('------------------------------------------------') | ||
const log = BeautifyConsole.getInstance(); | ||
import { LogType } from 'beautify-console-log/lib/beautify-console/model'; | ||
log.config({ | ||
title: 'example pad start text', // 左侧填充的日志头内容 | ||
type: ['info', 'error', 'warn', 'log'], // 显示部分日志类型 | ||
type: [LogType.info, LogType.error, LogType.warn, LogType.log], // 显示部分日志类型 | ||
}) | ||
@@ -268,26 +281,33 @@ log.info(1234, '4', [3, 5]); | ||
const log = BeautifyConsole.getInstance(); | ||
log.setPadStartText('log', 'hello world') | ||
// or | ||
log.setPadStartText('log', 'hello world').info(1234, '4', [3, 5]); | ||
log.setPadStartText({ | ||
title: "hello world ->", | ||
logType: LogType.info, | ||
}).info(1234,'4 ', [3, 5]) | ||
// 也可以这样 | ||
log.setPadStartText({ | ||
title: "hello world ->", | ||
logType: LogType.info, | ||
}).info(1234,'4 ', [3, 5]).info(1234, '4', [3, 5]); | ||
``` | ||
5. 关闭日志,传入参数就关闭对应的console日志类型,不传就关闭所有的类型,支持链式调用 | ||
``` | ||
// ...省略 | ||
const log = BeautifyConsole.getInstance(); | ||
log.close('info'); | ||
log.close('log'); | ||
log.close('warn'); | ||
log.close('error'); | ||
log.close(LogType.info); | ||
log.close(LogType.log); | ||
log.close(LogType.warn); | ||
log.close(LogType.error); | ||
log.close(); | ||
log.close().open('error'); | ||
log.close().open(LogType.error); | ||
// or | ||
log.open('error').open('log').open('warn').open('info'); | ||
log.open(LogType.error).open(LogType.log).open(LogType.warn).open(LogType.info); | ||
// or | ||
log.close('error').info('closed error'); | ||
log.close('error').error('closed error'); | ||
log.close(LogType.error).info('closed error'); | ||
log.close(LogType.error).error('closed error'); | ||
// or | ||
log.close('error').open('info'); | ||
log.close('error').open('info').info('info...'); | ||
log.close(LogType.error).open(LogType.info); | ||
log.close(LogType.error).open(LogType.info).info('info...'); | ||
``` | ||
@@ -297,19 +317,19 @@ 6. 打开日志,传入参数就打开对应的console日志类型,不传就打开所有的类型,支持链式调用 | ||
const log = BeautifyConsole.getInstance(); | ||
log.open('info'); | ||
log.open('log'); | ||
log.open('warn'); | ||
log.open('error'); | ||
log.open(LogType.info); | ||
log.open(LogType.log); | ||
log.open(LogType.warn); | ||
log.open(LogType.error); | ||
log.open(); | ||
log.open().close('info'); | ||
log.open().close(LogType.info); | ||
//or | ||
log.open('error').open('log').open('warn').open('info'); | ||
log.open(LogType.error).open(LogType.log).open(LogType.warn).open(LogType.info); | ||
// or | ||
log.open().info('closed error'); | ||
log.open('error').error('closed error'); | ||
log.open(LogType.error).error('closed error'); | ||
// or | ||
log.close('error').open('info'); | ||
log.close('error').open('info').info('info...'); | ||
log.close(LogType.error).open(LogType.info); | ||
log.close(LogType.error).open(LogType.info).info('info...'); | ||
``` | ||
@@ -316,0 +336,0 @@ |
@@ -69,2 +69,3 @@ import { BaseColorType, ColorType, LogType, PadStartText } from "./model"; | ||
* ``` | ||
* | ||
* import BeautifyConsole from "beautify-console-log"; | ||
@@ -81,2 +82,20 @@ * const log = BeautifyConsole.getInstance(); | ||
* | ||
* | ||
* ``` | ||
* { | ||
* info: (...args: any[]) => void; | ||
* error: (...args: any[]) => void; | ||
* warn: (...args: any[]) => void; | ||
* log: (...args: any[]) => void; | ||
* static getInstance(): BeautifyConsole; | ||
* config(config: { | ||
* type?: LogType[]; | ||
* title?: string; | ||
* }): void; | ||
* reset(): BeautifyConsole; | ||
* open(type?: LogType): BeautifyConsole; | ||
* close(type?: LogType): BeautifyConsole; | ||
* setPadStartText(config: PadStartText): BeautifyConsole; | ||
* } | ||
* ``` | ||
* | ||
@@ -83,0 +102,0 @@ * 可参考 https://developer.mozilla.org/en-US/docs/Web/API/Console |
/** | ||
* 背景编号:40黑,41红,42绿,43黄,44蓝,45紫,46深绿,47白色 | ||
* 字色编号:30黑,31红,32绿,33黄,34蓝,35紫,36深绿,37白色 | ||
* 背景编号: | ||
* | ||
* ``` text | ||
* ColorType.black: 40黑, | ||
* ColorType.red: 41红, | ||
* ColorType.green: 42绿, | ||
* ColorType.yellow: 43黄, | ||
* ColorType.blue: 44蓝, | ||
* ColorType.purple: 45紫, | ||
* ColorType.cyan: 46深绿, | ||
* ColorType.white: 47白色 | ||
* ``` | ||
* 字色编号: | ||
* ``` text | ||
* ColorType.black: 30黑, | ||
* ColorType.red: 31红, | ||
* ColorType.green: 32绿, | ||
* ColorType.yellow: 33黄, | ||
* ColorType.blue: 34蓝, | ||
* ColorType.purple: 35紫, | ||
* ColorType.cyan: 36深绿, | ||
* ColorType.white: 37白色 | ||
* ``` | ||
* 30黑,31红,32绿,33黄,34蓝,35紫,36深绿,37白色 | ||
* 0 终端默认设置(黑底白字) | ||
@@ -28,2 +50,11 @@ * 1 高亮显示 | ||
/** | ||
* 默认填充文本样式 | ||
* ```text | ||
* { | ||
* color?: ColorType; | ||
* bgColor?: ColorType; | ||
* } | ||
* ``` | ||
*/ | ||
export interface BaseColorType { | ||
@@ -36,2 +67,11 @@ color?: ColorType; | ||
/** | ||
* 左侧填充文本样式 | ||
* ```text | ||
* { | ||
* color: ColorType; | ||
* bgColor: ColorType; | ||
* } | ||
* ``` | ||
*/ | ||
export interface PadStartStyle { | ||
@@ -44,2 +84,9 @@ color: ColorType; | ||
* 左侧填充文本接口 | ||
* ```text | ||
* { | ||
* title: string; | ||
* logType: LogType; | ||
* style?: PadStartStyle; | ||
* } | ||
* ``` | ||
*/ | ||
@@ -54,2 +101,8 @@ export interface PadStartText { | ||
* 日志类型 | ||
* ``` | ||
* LogType.info = "info" | ||
* LogType.warn = "warn" | ||
* LogType.error = "error" | ||
* LogType.log = "log" | ||
* ``` | ||
*/ | ||
@@ -56,0 +109,0 @@ export enum LogType { |
Sorry, the diff of this file is not supported yet
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
74572
914
0
336