@tmlmobilidade/utils 20250901.2033.7 → 20250901.2038.51
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/dist/src/logs/logs.d.ts +3 -3
- package/dist/src/logs/logs.js +3 -3
- package/package.json +1 -1
package/dist/src/logs/logs.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ interface LogColumn {
|
|
|
10
10
|
/**
|
|
11
11
|
* Column text.
|
|
12
12
|
*/
|
|
13
|
-
txt: string;
|
|
13
|
+
txt: number | string;
|
|
14
14
|
}
|
|
15
15
|
declare class LogsClass {
|
|
16
16
|
/**
|
|
@@ -26,7 +26,7 @@ declare class LogsClass {
|
|
|
26
26
|
* @param spacesAfter Optional number of blank lines to add after the message.
|
|
27
27
|
* @param spacesBefore Optional number of blank lines to add before the message.
|
|
28
28
|
*/
|
|
29
|
-
error(message: string, error?: Error, spacesAfter?: number, spacesBefore?: number): void;
|
|
29
|
+
error(message: LogColumn[] | string, error?: Error, spacesAfter?: number, spacesBefore?: number): void;
|
|
30
30
|
/**
|
|
31
31
|
* Logs an informational message in the console.
|
|
32
32
|
* @param message Informational message to display.
|
|
@@ -56,7 +56,7 @@ declare class LogsClass {
|
|
|
56
56
|
* @param spacesAfter Optional number of blank lines to add after the message.
|
|
57
57
|
* @param spacesBefore Optional number of blank lines to add before the message.
|
|
58
58
|
*/
|
|
59
|
-
success(message: string, spacesAfter?: number, spacesBefore?: number): void;
|
|
59
|
+
success(message: LogColumn[] | string, spacesAfter?: number, spacesBefore?: number): void;
|
|
60
60
|
/**
|
|
61
61
|
* Logs a termination message in the console.
|
|
62
62
|
* @param message Termination message to display.
|
package/dist/src/logs/logs.js
CHANGED
|
@@ -131,10 +131,10 @@ class LogsClass {
|
|
|
131
131
|
if (typeof item === 'string')
|
|
132
132
|
return item;
|
|
133
133
|
if (!item.cols)
|
|
134
|
-
return item.txt;
|
|
134
|
+
return String(item.txt);
|
|
135
135
|
if (item.align === 'right')
|
|
136
|
-
return item.txt.padStart(item.cols);
|
|
137
|
-
return item.txt.padEnd(item.cols);
|
|
136
|
+
return String(item.txt).padStart(item.cols);
|
|
137
|
+
return String(item.txt).padEnd(item.cols);
|
|
138
138
|
})
|
|
139
139
|
.join(' ');
|
|
140
140
|
}
|
package/package.json
CHANGED