@mks2508/better-logger 0.14.0-alpha.2 → 1.0.0
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/chunks/{Logger-Crw1woqR.js → Logger-CTAaDeZi.js} +49 -16
- package/dist/chunks/{Logger-Crw1woqR.js.map → Logger-CTAaDeZi.js.map} +1 -1
- package/dist/chunks/{Logger-D_p3xnbq.js → Logger-D8pK7XXt.js} +2 -2
- package/dist/chunks/{Logger-D_p3xnbq.js.map → Logger-D8pK7XXt.js.map} +1 -1
- package/dist/chunks/ScopedLogger-D-7q8uVP.js +2 -0
- package/dist/chunks/ScopedLogger-D-7q8uVP.js.map +1 -0
- package/dist/chunks/ScopedLogger-hS0qSkZD.js +361 -0
- package/dist/chunks/ScopedLogger-hS0qSkZD.js.map +1 -0
- package/dist/core.js +280 -307
- package/dist/exports.cjs +1 -1
- package/dist/exports.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +226 -159
- package/dist/index.js.map +1 -1
- package/dist/styling.cjs +1 -1
- package/dist/styling.js +2 -2
- package/dist/types/Logger.d.ts +11 -7
- package/dist/types/Logger.d.ts.map +1 -1
- package/dist/types/core.d.ts +122 -216
- package/dist/types/core.d.ts.map +1 -1
- package/dist/types/index.d.ts +119 -4
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +2 -1
- package/src/Logger.ts +99 -58
- package/src/index.ts +32 -25
- package/dist/.tsbuildinfo +0 -1
- package/dist/Logger.d.ts +0 -708
- package/dist/Logger.d.ts.map +0 -1
- package/dist/Logger.js +0 -1124
- package/dist/ScopedLogger.d.ts +0 -318
- package/dist/ScopedLogger.d.ts.map +0 -1
- package/dist/ScopedLogger.js +0 -426
- package/dist/cli/CommandProcessor.d.ts +0 -103
- package/dist/cli/CommandProcessor.d.ts.map +0 -1
- package/dist/cli/CommandProcessor.js +0 -184
- package/dist/cli/commands/ConfigCommand.d.ts +0 -17
- package/dist/cli/commands/ConfigCommand.d.ts.map +0 -1
- package/dist/cli/commands/ConfigCommand.js +0 -88
- package/dist/cli/commands/ExportCommand.d.ts +0 -51
- package/dist/cli/commands/ExportCommand.d.ts.map +0 -1
- package/dist/cli/commands/ExportCommand.js +0 -243
- package/dist/cli/commands/HistoryCommand.d.ts +0 -50
- package/dist/cli/commands/HistoryCommand.d.ts.map +0 -1
- package/dist/cli/commands/HistoryCommand.js +0 -96
- package/dist/cli/commands/StatusCommand.d.ts +0 -33
- package/dist/cli/commands/StatusCommand.d.ts.map +0 -1
- package/dist/cli/commands/StatusCommand.js +0 -93
- package/dist/cli/commands/ThemeCommand.d.ts +0 -33
- package/dist/cli/commands/ThemeCommand.d.ts.map +0 -1
- package/dist/cli/commands/ThemeCommand.js +0 -79
- package/dist/cli/help.d.ts +0 -15
- package/dist/cli/help.d.ts.map +0 -1
- package/dist/cli/help.js +0 -118
- package/dist/cli/index.d.ts +0 -15
- package/dist/cli/index.d.ts.map +0 -1
- package/dist/cli/index.js +0 -46
- package/dist/constants.d.ts +0 -122
- package/dist/constants.d.ts.map +0 -1
- package/dist/constants.js +0 -159
- package/dist/core.d.ts +0 -134
- package/dist/core.d.ts.map +0 -1
- package/dist/example.d.ts +0 -18
- package/dist/example.d.ts.map +0 -1
- package/dist/example.js +0 -154
- package/dist/exports-module.d.ts +0 -203
- package/dist/exports-module.d.ts.map +0 -1
- package/dist/exports-module.js +0 -260
- package/dist/handlers/AnalyticsLogHandler.d.ts +0 -11
- package/dist/handlers/AnalyticsLogHandler.d.ts.map +0 -1
- package/dist/handlers/AnalyticsLogHandler.js +0 -19
- package/dist/handlers/ExportLogHandler.d.ts +0 -103
- package/dist/handlers/ExportLogHandler.d.ts.map +0 -1
- package/dist/handlers/ExportLogHandler.js +0 -516
- package/dist/handlers/FileLogHandler.d.ts +0 -36
- package/dist/handlers/FileLogHandler.d.ts.map +0 -1
- package/dist/handlers/FileLogHandler.js +0 -156
- package/dist/handlers/RemoteLogHandler.d.ts +0 -14
- package/dist/handlers/RemoteLogHandler.d.ts.map +0 -1
- package/dist/handlers/RemoteLogHandler.js +0 -37
- package/dist/handlers/index.d.ts +0 -8
- package/dist/handlers/index.d.ts.map +0 -1
- package/dist/handlers/index.js +0 -7
- package/dist/index.d.ts +0 -157
- package/dist/index.d.ts.map +0 -1
- package/dist/main.d.ts +0 -2
- package/dist/main.d.ts.map +0 -1
- package/dist/main.js +0 -139
- package/dist/styling/LogStyleBuilder.d.ts +0 -149
- package/dist/styling/LogStyleBuilder.d.ts.map +0 -1
- package/dist/styling/LogStyleBuilder.js +0 -289
- package/dist/styling/SemanticStyles.d.ts +0 -181
- package/dist/styling/SemanticStyles.d.ts.map +0 -1
- package/dist/styling/SemanticStyles.js +0 -339
- package/dist/styling/SmartPresets.d.ts +0 -25
- package/dist/styling/SmartPresets.d.ts.map +0 -1
- package/dist/styling/SmartPresets.js +0 -276
- package/dist/styling/StyleBuilder.d.ts +0 -140
- package/dist/styling/StyleBuilder.d.ts.map +0 -1
- package/dist/styling/StyleBuilder.js +0 -280
- package/dist/styling/banners.d.ts +0 -45
- package/dist/styling/banners.d.ts.map +0 -1
- package/dist/styling/banners.js +0 -155
- package/dist/styling/index.d.ts +0 -10
- package/dist/styling/index.d.ts.map +0 -1
- package/dist/styling/index.js +0 -9
- package/dist/styling/themes.d.ts +0 -10
- package/dist/styling/themes.d.ts.map +0 -1
- package/dist/styling/themes.js +0 -231
- package/dist/styling-module.d.ts +0 -185
- package/dist/styling-module.d.ts.map +0 -1
- package/dist/styling-module.js +0 -199
- package/dist/types/core.js +0 -28
- package/dist/types/handlers.d.ts +0 -88
- package/dist/types/handlers.d.ts.map +0 -1
- package/dist/types/handlers.js +0 -4
- package/dist/types/index.js +0 -4
- package/dist/utils/environment.d.ts +0 -47
- package/dist/utils/environment.d.ts.map +0 -1
- package/dist/utils/environment.js +0 -85
- package/dist/utils/formatting.d.ts +0 -40
- package/dist/utils/formatting.d.ts.map +0 -1
- package/dist/utils/formatting.js +0 -117
- package/dist/utils/index.d.ts +0 -7
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/index.js +0 -6
- package/dist/utils/opentui-detection.d.ts +0 -34
- package/dist/utils/opentui-detection.d.ts.map +0 -1
- package/dist/utils/opentui-detection.js +0 -116
- package/dist/utils/output.d.ts +0 -44
- package/dist/utils/output.d.ts.map +0 -1
- package/dist/utils/output.js +0 -150
- package/dist/utils/stackTrace.d.ts +0 -9
- package/dist/utils/stackTrace.d.ts.map +0 -1
- package/dist/utils/stackTrace.js +0 -81
- package/dist/utils/timestamps.d.ts +0 -20
- package/dist/utils/timestamps.d.ts.map +0 -1
- package/dist/utils/timestamps.js +0 -71
package/dist/styling/themes.js
DELETED
|
@@ -1,231 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview Theme presets for Advanced Logger
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Theme configurations for different visual styles
|
|
6
|
-
*/
|
|
7
|
-
export const THEME_PRESETS = {
|
|
8
|
-
default: {
|
|
9
|
-
debug: {
|
|
10
|
-
emoji: '🐞', label: 'DEBUG',
|
|
11
|
-
background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
|
|
12
|
-
color: '#ffffff', border: '1px solid #667eea',
|
|
13
|
-
shadow: '0 2px 4px rgba(102, 126, 234, 0.3)',
|
|
14
|
-
},
|
|
15
|
-
info: {
|
|
16
|
-
emoji: 'ℹ️', label: 'INFO',
|
|
17
|
-
background: 'linear-gradient(135deg, #74b9ff 0%, #0984e3 100%)',
|
|
18
|
-
color: '#ffffff', border: '1px solid #74b9ff',
|
|
19
|
-
shadow: '0 2px 4px rgba(116, 185, 255, 0.3)',
|
|
20
|
-
},
|
|
21
|
-
warn: {
|
|
22
|
-
emoji: '⚠️', label: 'WARN',
|
|
23
|
-
background: 'linear-gradient(135deg, #fdcb6e 0%, #e17055 100%)',
|
|
24
|
-
color: '#2d3436', border: '1px solid #fdcb6e',
|
|
25
|
-
shadow: '0 2px 4px rgba(253, 203, 110, 0.3)',
|
|
26
|
-
},
|
|
27
|
-
error: {
|
|
28
|
-
emoji: '❌', label: 'ERROR',
|
|
29
|
-
background: 'linear-gradient(135deg, #e84393 0%, #d63031 100%)',
|
|
30
|
-
color: '#ffffff', border: '1px solid #e84393',
|
|
31
|
-
shadow: '0 2px 4px rgba(232, 67, 147, 0.3)',
|
|
32
|
-
},
|
|
33
|
-
success: {
|
|
34
|
-
emoji: '✅', label: 'SUCCESS',
|
|
35
|
-
background: 'linear-gradient(135deg, #00b894 0%, #00a085 100%)',
|
|
36
|
-
color: '#ffffff', border: '1px solid #00b894',
|
|
37
|
-
shadow: '0 2px 4px rgba(0, 184, 148, 0.3)',
|
|
38
|
-
},
|
|
39
|
-
critical: {
|
|
40
|
-
emoji: '🔥', label: 'CRITICAL',
|
|
41
|
-
background: 'linear-gradient(135deg, #ff3838 0%, #ff1744 100%)',
|
|
42
|
-
color: '#ffffff', border: '2px solid #ff3838',
|
|
43
|
-
shadow: '0 4px 8px rgba(255, 56, 56, 0.5)',
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
dark: {
|
|
47
|
-
debug: {
|
|
48
|
-
emoji: '🌙', label: 'DEBUG',
|
|
49
|
-
background: 'linear-gradient(135deg, #2d3748 0%, #4a5568 100%)',
|
|
50
|
-
color: '#e2e8f0', border: '1px solid #4a5568',
|
|
51
|
-
shadow: '0 2px 4px rgba(45, 55, 72, 0.8)',
|
|
52
|
-
},
|
|
53
|
-
info: {
|
|
54
|
-
emoji: '💡', label: 'INFO',
|
|
55
|
-
background: 'linear-gradient(135deg, #1a202c 0%, #2d3748 100%)',
|
|
56
|
-
color: '#90cdf4', border: '1px solid #3182ce',
|
|
57
|
-
shadow: '0 2px 4px rgba(26, 32, 44, 0.8)',
|
|
58
|
-
},
|
|
59
|
-
warn: {
|
|
60
|
-
emoji: '⚡', label: 'WARN',
|
|
61
|
-
background: 'linear-gradient(135deg, #744210 0%, #975a16 100%)',
|
|
62
|
-
color: '#faf089', border: '1px solid #d69e2e',
|
|
63
|
-
shadow: '0 2px 4px rgba(116, 66, 16, 0.8)',
|
|
64
|
-
},
|
|
65
|
-
error: {
|
|
66
|
-
emoji: '💀', label: 'ERROR',
|
|
67
|
-
background: 'linear-gradient(135deg, #742a2a 0%, #9b2c2c 100%)',
|
|
68
|
-
color: '#feb2b2', border: '1px solid #e53e3e',
|
|
69
|
-
shadow: '0 2px 4px rgba(116, 42, 42, 0.8)',
|
|
70
|
-
},
|
|
71
|
-
success: {
|
|
72
|
-
emoji: '🎯', label: 'SUCCESS',
|
|
73
|
-
background: 'linear-gradient(135deg, #276749 0%, #2f855a 100%)',
|
|
74
|
-
color: '#9ae6b4', border: '1px solid #38a169',
|
|
75
|
-
shadow: '0 2px 4px rgba(39, 103, 73, 0.8)',
|
|
76
|
-
},
|
|
77
|
-
critical: {
|
|
78
|
-
emoji: '💥', label: 'CRITICAL',
|
|
79
|
-
background: 'linear-gradient(135deg, #1a1a1a 0%, #ff0000 100%)',
|
|
80
|
-
color: '#ffffff', border: '2px solid #ff0000',
|
|
81
|
-
shadow: '0 4px 8px rgba(255, 0, 0, 0.9)',
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
neon: {
|
|
85
|
-
debug: {
|
|
86
|
-
emoji: '⚡', label: 'DEBUG',
|
|
87
|
-
background: 'linear-gradient(135deg, #0f3460 0%, #e94560 100%)',
|
|
88
|
-
color: '#00ffff', border: '1px solid #00ffff',
|
|
89
|
-
shadow: '0 0 10px rgba(0, 255, 255, 0.5)',
|
|
90
|
-
},
|
|
91
|
-
info: {
|
|
92
|
-
emoji: '🔮', label: 'INFO',
|
|
93
|
-
background: 'linear-gradient(135deg, #16213e 0%, #0f3460 100%)',
|
|
94
|
-
color: '#00ff41', border: '1px solid #00ff41',
|
|
95
|
-
shadow: '0 0 10px rgba(0, 255, 65, 0.5)',
|
|
96
|
-
},
|
|
97
|
-
warn: {
|
|
98
|
-
emoji: '⚠️', label: 'WARN',
|
|
99
|
-
background: 'linear-gradient(135deg, #533a03 0%, #e94560 100%)',
|
|
100
|
-
color: '#ffff00', border: '1px solid #ffff00',
|
|
101
|
-
shadow: '0 0 10px rgba(255, 255, 0, 0.5)',
|
|
102
|
-
},
|
|
103
|
-
error: {
|
|
104
|
-
emoji: '💥', label: 'ERROR',
|
|
105
|
-
background: 'linear-gradient(135deg, #5c0a0a 0%, #ff073a 100%)',
|
|
106
|
-
color: '#ff073a', border: '1px solid #ff073a',
|
|
107
|
-
shadow: '0 0 10px rgba(255, 7, 58, 0.8)',
|
|
108
|
-
},
|
|
109
|
-
success: {
|
|
110
|
-
emoji: '✨', label: 'SUCCESS',
|
|
111
|
-
background: 'linear-gradient(135deg, #0a5c0a 0%, #39ff14 100%)',
|
|
112
|
-
color: '#39ff14', border: '1px solid #39ff14',
|
|
113
|
-
shadow: '0 0 10px rgba(57, 255, 20, 0.8)',
|
|
114
|
-
},
|
|
115
|
-
critical: {
|
|
116
|
-
emoji: '🌟', label: 'CRITICAL',
|
|
117
|
-
background: 'linear-gradient(135deg, #000000 0%, #ff0080 100%)',
|
|
118
|
-
color: '#ff0080', border: '2px solid #ff0080',
|
|
119
|
-
shadow: '0 0 20px rgba(255, 0, 128, 1)',
|
|
120
|
-
},
|
|
121
|
-
},
|
|
122
|
-
minimal: {
|
|
123
|
-
debug: {
|
|
124
|
-
emoji: '', label: 'DEBUG',
|
|
125
|
-
background: '#f7fafc', color: '#4a5568',
|
|
126
|
-
border: '1px solid #e2e8f0', shadow: 'none',
|
|
127
|
-
},
|
|
128
|
-
info: {
|
|
129
|
-
emoji: '', label: 'INFO',
|
|
130
|
-
background: '#ebf8ff', color: '#2b6cb0',
|
|
131
|
-
border: '1px solid #bee3f8', shadow: 'none',
|
|
132
|
-
},
|
|
133
|
-
warn: {
|
|
134
|
-
emoji: '', label: 'WARN',
|
|
135
|
-
background: '#fffbf0', color: '#c05621',
|
|
136
|
-
border: '1px solid #fed7aa', shadow: 'none',
|
|
137
|
-
},
|
|
138
|
-
error: {
|
|
139
|
-
emoji: '', label: 'ERROR',
|
|
140
|
-
background: '#fef5f5', color: '#c53030',
|
|
141
|
-
border: '1px solid #fca5a5', shadow: 'none',
|
|
142
|
-
},
|
|
143
|
-
success: {
|
|
144
|
-
emoji: '', label: 'SUCCESS',
|
|
145
|
-
background: '#f0fff4', color: '#2f855a',
|
|
146
|
-
border: '1px solid #9ae6b4', shadow: 'none',
|
|
147
|
-
},
|
|
148
|
-
critical: {
|
|
149
|
-
emoji: '', label: 'CRITICAL',
|
|
150
|
-
background: '#fef5f5', color: '#e53e3e',
|
|
151
|
-
border: '2px solid #f56565', shadow: 'none',
|
|
152
|
-
},
|
|
153
|
-
},
|
|
154
|
-
// Additional theme variants can be added here
|
|
155
|
-
light: {
|
|
156
|
-
debug: {
|
|
157
|
-
emoji: '🔍', label: 'DEBUG',
|
|
158
|
-
background: 'linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%)',
|
|
159
|
-
color: '#1565c0', border: '1px solid #90caf9',
|
|
160
|
-
shadow: '0 1px 3px rgba(33, 150, 243, 0.2)',
|
|
161
|
-
},
|
|
162
|
-
info: {
|
|
163
|
-
emoji: 'ℹ️', label: 'INFO',
|
|
164
|
-
background: 'linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%)',
|
|
165
|
-
color: '#7b1fa2', border: '1px solid #ce93d8',
|
|
166
|
-
shadow: '0 1px 3px rgba(156, 39, 176, 0.2)',
|
|
167
|
-
},
|
|
168
|
-
warn: {
|
|
169
|
-
emoji: '⚠️', label: 'WARN',
|
|
170
|
-
background: 'linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%)',
|
|
171
|
-
color: '#f57c00', border: '1px solid #ffcc02',
|
|
172
|
-
shadow: '0 1px 3px rgba(255, 152, 0, 0.2)',
|
|
173
|
-
},
|
|
174
|
-
error: {
|
|
175
|
-
emoji: '❌', label: 'ERROR',
|
|
176
|
-
background: 'linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%)',
|
|
177
|
-
color: '#d32f2f', border: '1px solid #f44336',
|
|
178
|
-
shadow: '0 1px 3px rgba(244, 67, 54, 0.2)',
|
|
179
|
-
},
|
|
180
|
-
success: {
|
|
181
|
-
emoji: '✅', label: 'SUCCESS',
|
|
182
|
-
background: 'linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%)',
|
|
183
|
-
color: '#388e3c', border: '1px solid #4caf50',
|
|
184
|
-
shadow: '0 1px 3px rgba(76, 175, 80, 0.2)',
|
|
185
|
-
},
|
|
186
|
-
critical: {
|
|
187
|
-
emoji: '🚨', label: 'CRITICAL',
|
|
188
|
-
background: 'linear-gradient(135deg, #fce4ec 0%, #f8bbd9 100%)',
|
|
189
|
-
color: '#c2185b', border: '2px solid #e91e63',
|
|
190
|
-
shadow: '0 2px 6px rgba(233, 30, 99, 0.3)',
|
|
191
|
-
},
|
|
192
|
-
},
|
|
193
|
-
cyberpunk: {
|
|
194
|
-
debug: {
|
|
195
|
-
emoji: '🤖', label: 'DEBUG',
|
|
196
|
-
background: 'linear-gradient(135deg, #0d1b2a 0%, #415a77 100%)',
|
|
197
|
-
color: '#00d4aa', border: '1px solid #00d4aa',
|
|
198
|
-
shadow: '0 0 15px rgba(0, 212, 170, 0.4)',
|
|
199
|
-
},
|
|
200
|
-
info: {
|
|
201
|
-
emoji: '🔗', label: 'INFO',
|
|
202
|
-
background: 'linear-gradient(135deg, #1b263b 0%, #0d1b2a 100%)',
|
|
203
|
-
color: '#00b4d8', border: '1px solid #00b4d8',
|
|
204
|
-
shadow: '0 0 15px rgba(0, 180, 216, 0.4)',
|
|
205
|
-
},
|
|
206
|
-
warn: {
|
|
207
|
-
emoji: '⚡', label: 'WARN',
|
|
208
|
-
background: 'linear-gradient(135deg, #f72585 0%, #b5179e 100%)',
|
|
209
|
-
color: '#ffff3f', border: '1px solid #ffff3f',
|
|
210
|
-
shadow: '0 0 15px rgba(255, 255, 63, 0.4)',
|
|
211
|
-
},
|
|
212
|
-
error: {
|
|
213
|
-
emoji: '💀', label: 'ERROR',
|
|
214
|
-
background: 'linear-gradient(135deg, #7209b7 0%, #480ca8 100%)',
|
|
215
|
-
color: '#ff006e', border: '1px solid #ff006e',
|
|
216
|
-
shadow: '0 0 15px rgba(255, 0, 110, 0.6)',
|
|
217
|
-
},
|
|
218
|
-
success: {
|
|
219
|
-
emoji: '⚡', label: 'SUCCESS',
|
|
220
|
-
background: 'linear-gradient(135deg, #003566 0%, #001d3d 100%)',
|
|
221
|
-
color: '#00f5ff', border: '1px solid #00f5ff',
|
|
222
|
-
shadow: '0 0 15px rgba(0, 245, 255, 0.4)',
|
|
223
|
-
},
|
|
224
|
-
critical: {
|
|
225
|
-
emoji: '💥', label: 'CRITICAL',
|
|
226
|
-
background: 'linear-gradient(135deg, #000000 0%, #ff0040 100%)',
|
|
227
|
-
color: '#ff0040', border: '2px solid #ff0040',
|
|
228
|
-
shadow: '0 0 25px rgba(255, 0, 64, 0.8)',
|
|
229
|
-
},
|
|
230
|
-
},
|
|
231
|
-
};
|
package/dist/styling-module.d.ts
DELETED
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview Styling Module - Advanced visual features for Better Logger
|
|
3
|
-
* @version 0.0.1
|
|
4
|
-
*
|
|
5
|
-
* This module provides advanced styling features including SVG support, CSS animations,
|
|
6
|
-
* themed banners, and visual enhancements for console logging.
|
|
7
|
-
*/
|
|
8
|
-
import { Logger } from './Logger.js';
|
|
9
|
-
import { StyleBuilder } from './styling/index.js';
|
|
10
|
-
import type { ThemeVariant, BannerType, StyleOptions } from './types/index.js';
|
|
11
|
-
/**
|
|
12
|
-
* Enhanced Logger with advanced styling capabilities
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```typescript
|
|
16
|
-
* import { StyledLogger } from '@mks2508/better-logger/styling';
|
|
17
|
-
*
|
|
18
|
-
* const logger = new StyledLogger();
|
|
19
|
-
* logger.setTheme('neon');
|
|
20
|
-
* logger.logAnimated('🌟 Animated message!');
|
|
21
|
-
* logger.logWithSVG('Custom SVG Logo', svgContent);
|
|
22
|
-
* ```
|
|
23
|
-
*/
|
|
24
|
-
export declare class StyledLogger extends Logger {
|
|
25
|
-
/**
|
|
26
|
-
* Log with SVG background image
|
|
27
|
-
*
|
|
28
|
-
* @param message - The message to log
|
|
29
|
-
* @param svgContent - SVG content as string (optional)
|
|
30
|
-
* @param options - Styling options
|
|
31
|
-
*
|
|
32
|
-
* @example
|
|
33
|
-
* ```typescript
|
|
34
|
-
* logger.logWithSVG('My App', '<svg>...</svg>', {
|
|
35
|
-
* width: 400,
|
|
36
|
-
* height: 80,
|
|
37
|
-
* padding: '40px 200px'
|
|
38
|
-
* });
|
|
39
|
-
* ```
|
|
40
|
-
*/
|
|
41
|
-
logWithSVG(message: string, svgContent?: string, options?: StyleOptions): void;
|
|
42
|
-
/**
|
|
43
|
-
* Log with animated background gradient
|
|
44
|
-
*
|
|
45
|
-
* @param message - The message to log
|
|
46
|
-
* @param duration - Animation duration in seconds
|
|
47
|
-
*
|
|
48
|
-
* @example
|
|
49
|
-
* ```typescript
|
|
50
|
-
* logger.logAnimated('🚀 Loading...', 2);
|
|
51
|
-
* ```
|
|
52
|
-
*/
|
|
53
|
-
logAnimated(message: string, duration?: number): void;
|
|
54
|
-
/**
|
|
55
|
-
* Display banner with specified type
|
|
56
|
-
*
|
|
57
|
-
* @param bannerType - Type of banner to display
|
|
58
|
-
*
|
|
59
|
-
* @example
|
|
60
|
-
* ```typescript
|
|
61
|
-
* logger.showBanner('animated');
|
|
62
|
-
* ```
|
|
63
|
-
*/
|
|
64
|
-
showBanner(bannerType?: BannerType): void;
|
|
65
|
-
/**
|
|
66
|
-
* Set banner type for initialization display
|
|
67
|
-
*
|
|
68
|
-
* @param bannerType - Type of banner to display
|
|
69
|
-
*
|
|
70
|
-
* @example
|
|
71
|
-
* ```typescript
|
|
72
|
-
* logger.setBannerType('svg');
|
|
73
|
-
* ```
|
|
74
|
-
*/
|
|
75
|
-
setBannerType(bannerType: BannerType): void;
|
|
76
|
-
/**
|
|
77
|
-
* Sets the logger theme with visual banner
|
|
78
|
-
*
|
|
79
|
-
* @param theme - Theme variant to apply
|
|
80
|
-
*
|
|
81
|
-
* @example
|
|
82
|
-
* ```typescript
|
|
83
|
-
* logger.setTheme('cyberpunk'); // Shows themed banner
|
|
84
|
-
* ```
|
|
85
|
-
*/
|
|
86
|
-
setTheme(theme: ThemeVariant): void;
|
|
87
|
-
}
|
|
88
|
-
declare const styledLogger: StyledLogger;
|
|
89
|
-
/**
|
|
90
|
-
* Utility functions for creating custom styles
|
|
91
|
-
*
|
|
92
|
-
* @example
|
|
93
|
-
* ```typescript
|
|
94
|
-
* import { createStyle, StyleBuilder } from '@mks2508/better-logger/styling';
|
|
95
|
-
*
|
|
96
|
-
* const myStyle = createStyle()
|
|
97
|
-
* .bg('linear-gradient(45deg, #ff6b6b, #feca57)')
|
|
98
|
-
* .color('white')
|
|
99
|
-
* .padding('10px')
|
|
100
|
-
* .build();
|
|
101
|
-
*
|
|
102
|
-
* console.log('%cCustom Message', myStyle);
|
|
103
|
-
* ```
|
|
104
|
-
*/
|
|
105
|
-
export declare const createStyle: () => StyleBuilder;
|
|
106
|
-
/**
|
|
107
|
-
* Pre-built style presets
|
|
108
|
-
*
|
|
109
|
-
* @example
|
|
110
|
-
* ```typescript
|
|
111
|
-
* import { stylePresets } from '@mks2508/better-logger/styling';
|
|
112
|
-
*
|
|
113
|
-
* console.log('%cSuccess!', stylePresets.success);
|
|
114
|
-
* console.log('%cError!', stylePresets.error);
|
|
115
|
-
* ```
|
|
116
|
-
*/
|
|
117
|
-
export declare const stylePresets: {
|
|
118
|
-
success: string;
|
|
119
|
-
error: string;
|
|
120
|
-
warning: string;
|
|
121
|
-
info: string;
|
|
122
|
-
accent: string;
|
|
123
|
-
};
|
|
124
|
-
/**
|
|
125
|
-
* Available themes for the logger
|
|
126
|
-
*
|
|
127
|
-
* @example
|
|
128
|
-
* ```typescript
|
|
129
|
-
* import { themes } from '@mks2508/better-logger/styling';
|
|
130
|
-
*
|
|
131
|
-
* console.log('Available themes:', Object.keys(themes));
|
|
132
|
-
* ```
|
|
133
|
-
*/
|
|
134
|
-
export declare const themes: string[];
|
|
135
|
-
/**
|
|
136
|
-
* Available banner types
|
|
137
|
-
*
|
|
138
|
-
* @example
|
|
139
|
-
* ```typescript
|
|
140
|
-
* import { bannerTypes } from '@mks2508/better-logger/styling';
|
|
141
|
-
*
|
|
142
|
-
* console.log('Available banners:', bannerTypes);
|
|
143
|
-
* ```
|
|
144
|
-
*/
|
|
145
|
-
export declare const bannerTypes: string[];
|
|
146
|
-
/**
|
|
147
|
-
* Display initialization banner
|
|
148
|
-
*
|
|
149
|
-
* @param bannerType - Type of banner to display
|
|
150
|
-
*
|
|
151
|
-
* @example
|
|
152
|
-
* ```typescript
|
|
153
|
-
* import { showInitBanner } from '@mks2508/better-logger/styling';
|
|
154
|
-
*
|
|
155
|
-
* showInitBanner('animated');
|
|
156
|
-
* ```
|
|
157
|
-
*/
|
|
158
|
-
export declare const showInitBanner: (bannerType?: BannerType) => void;
|
|
159
|
-
/**
|
|
160
|
-
* Export individual styled logging methods
|
|
161
|
-
*/
|
|
162
|
-
export declare const debug: (...args: any[]) => void;
|
|
163
|
-
export declare const info: (...args: any[]) => void;
|
|
164
|
-
export declare const warn: (...args: any[]) => void;
|
|
165
|
-
export declare const error: (...args: any[]) => void;
|
|
166
|
-
export declare const success: (...args: any[]) => void;
|
|
167
|
-
export declare const critical: (...args: any[]) => void;
|
|
168
|
-
export declare const trace: (...args: any[]) => void;
|
|
169
|
-
export declare const table: (data: any, columns?: string[]) => void;
|
|
170
|
-
export declare const group: (label: string, collapsed?: boolean) => void;
|
|
171
|
-
export declare const groupEnd: () => void;
|
|
172
|
-
export declare const time: (label: string) => void;
|
|
173
|
-
export declare const timeEnd: (label: string) => void;
|
|
174
|
-
export declare const setGlobalPrefix: (prefix: string) => void;
|
|
175
|
-
export declare const scope: (prefix: string) => any;
|
|
176
|
-
export declare const setVerbosity: (level: any) => void;
|
|
177
|
-
export declare const setTheme: (theme: ThemeVariant) => void;
|
|
178
|
-
export declare const setBannerType: (bannerType: BannerType) => void;
|
|
179
|
-
export declare const showBanner: (bannerType?: BannerType) => void;
|
|
180
|
-
export declare const logWithSVG: (message: string, svgContent?: string, options?: StyleOptions) => void;
|
|
181
|
-
export declare const logAnimated: (message: string, duration?: number) => void;
|
|
182
|
-
export default styledLogger;
|
|
183
|
-
export { StyleBuilder, StylePresets, THEME_PRESETS, THEME_BANNERS, BANNER_VARIANTS } from './styling/index.js';
|
|
184
|
-
export type { ThemeVariant, BannerType, StyleOptions } from './types/index.js';
|
|
185
|
-
//# sourceMappingURL=styling-module.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styling-module.d.ts","sourceRoot":"","sources":["../src/styling-module.ts"],"names":[],"mappings":"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"}
|
package/dist/styling-module.js
DELETED
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview Styling Module - Advanced visual features for Better Logger
|
|
3
|
-
* @version 0.0.1
|
|
4
|
-
*
|
|
5
|
-
* This module provides advanced styling features including SVG support, CSS animations,
|
|
6
|
-
* themed banners, and visual enhancements for console logging.
|
|
7
|
-
*/
|
|
8
|
-
// Import core logger
|
|
9
|
-
import { Logger } from './Logger.js';
|
|
10
|
-
// Styling imports
|
|
11
|
-
import { StyleBuilder, StylePresets, THEME_PRESETS, displayInitBanner, BANNER_VARIANTS } from './styling/index.js';
|
|
12
|
-
/**
|
|
13
|
-
* Enhanced Logger with advanced styling capabilities
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* ```typescript
|
|
17
|
-
* import { StyledLogger } from '@mks2508/better-logger/styling';
|
|
18
|
-
*
|
|
19
|
-
* const logger = new StyledLogger();
|
|
20
|
-
* logger.setTheme('neon');
|
|
21
|
-
* logger.logAnimated('🌟 Animated message!');
|
|
22
|
-
* logger.logWithSVG('Custom SVG Logo', svgContent);
|
|
23
|
-
* ```
|
|
24
|
-
*/
|
|
25
|
-
export class StyledLogger extends Logger {
|
|
26
|
-
/**
|
|
27
|
-
* Log with SVG background image
|
|
28
|
-
*
|
|
29
|
-
* @param message - The message to log
|
|
30
|
-
* @param svgContent - SVG content as string (optional)
|
|
31
|
-
* @param options - Styling options
|
|
32
|
-
*
|
|
33
|
-
* @example
|
|
34
|
-
* ```typescript
|
|
35
|
-
* logger.logWithSVG('My App', '<svg>...</svg>', {
|
|
36
|
-
* width: 400,
|
|
37
|
-
* height: 80,
|
|
38
|
-
* padding: '40px 200px'
|
|
39
|
-
* });
|
|
40
|
-
* ```
|
|
41
|
-
*/
|
|
42
|
-
logWithSVG(message, svgContent, options = {}) {
|
|
43
|
-
super.logWithSVG(message, svgContent, options);
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Log with animated background gradient
|
|
47
|
-
*
|
|
48
|
-
* @param message - The message to log
|
|
49
|
-
* @param duration - Animation duration in seconds
|
|
50
|
-
*
|
|
51
|
-
* @example
|
|
52
|
-
* ```typescript
|
|
53
|
-
* logger.logAnimated('🚀 Loading...', 2);
|
|
54
|
-
* ```
|
|
55
|
-
*/
|
|
56
|
-
logAnimated(message, duration = 3) {
|
|
57
|
-
super.logAnimated(message, duration);
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Display banner with specified type
|
|
61
|
-
*
|
|
62
|
-
* @param bannerType - Type of banner to display
|
|
63
|
-
*
|
|
64
|
-
* @example
|
|
65
|
-
* ```typescript
|
|
66
|
-
* logger.showBanner('animated');
|
|
67
|
-
* ```
|
|
68
|
-
*/
|
|
69
|
-
showBanner(bannerType) {
|
|
70
|
-
super.showBanner(bannerType);
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Set banner type for initialization display
|
|
74
|
-
*
|
|
75
|
-
* @param bannerType - Type of banner to display
|
|
76
|
-
*
|
|
77
|
-
* @example
|
|
78
|
-
* ```typescript
|
|
79
|
-
* logger.setBannerType('svg');
|
|
80
|
-
* ```
|
|
81
|
-
*/
|
|
82
|
-
setBannerType(bannerType) {
|
|
83
|
-
super.setBannerType(bannerType);
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Sets the logger theme with visual banner
|
|
87
|
-
*
|
|
88
|
-
* @param theme - Theme variant to apply
|
|
89
|
-
*
|
|
90
|
-
* @example
|
|
91
|
-
* ```typescript
|
|
92
|
-
* logger.setTheme('cyberpunk'); // Shows themed banner
|
|
93
|
-
* ```
|
|
94
|
-
*/
|
|
95
|
-
setTheme(theme) {
|
|
96
|
-
super.setTheme(theme);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
// Create singleton instance
|
|
100
|
-
const styledLogger = new StyledLogger();
|
|
101
|
-
/**
|
|
102
|
-
* Utility functions for creating custom styles
|
|
103
|
-
*
|
|
104
|
-
* @example
|
|
105
|
-
* ```typescript
|
|
106
|
-
* import { createStyle, StyleBuilder } from '@mks2508/better-logger/styling';
|
|
107
|
-
*
|
|
108
|
-
* const myStyle = createStyle()
|
|
109
|
-
* .bg('linear-gradient(45deg, #ff6b6b, #feca57)')
|
|
110
|
-
* .color('white')
|
|
111
|
-
* .padding('10px')
|
|
112
|
-
* .build();
|
|
113
|
-
*
|
|
114
|
-
* console.log('%cCustom Message', myStyle);
|
|
115
|
-
* ```
|
|
116
|
-
*/
|
|
117
|
-
export const createStyle = () => new StyleBuilder();
|
|
118
|
-
/**
|
|
119
|
-
* Pre-built style presets
|
|
120
|
-
*
|
|
121
|
-
* @example
|
|
122
|
-
* ```typescript
|
|
123
|
-
* import { stylePresets } from '@mks2508/better-logger/styling';
|
|
124
|
-
*
|
|
125
|
-
* console.log('%cSuccess!', stylePresets.success);
|
|
126
|
-
* console.log('%cError!', stylePresets.error);
|
|
127
|
-
* ```
|
|
128
|
-
*/
|
|
129
|
-
export const stylePresets = {
|
|
130
|
-
success: StylePresets.success().build(),
|
|
131
|
-
error: StylePresets.error().build(),
|
|
132
|
-
warning: StylePresets.warning().build(),
|
|
133
|
-
info: StylePresets.info().build(),
|
|
134
|
-
accent: StylePresets.accent().build(),
|
|
135
|
-
};
|
|
136
|
-
/**
|
|
137
|
-
* Available themes for the logger
|
|
138
|
-
*
|
|
139
|
-
* @example
|
|
140
|
-
* ```typescript
|
|
141
|
-
* import { themes } from '@mks2508/better-logger/styling';
|
|
142
|
-
*
|
|
143
|
-
* console.log('Available themes:', Object.keys(themes));
|
|
144
|
-
* ```
|
|
145
|
-
*/
|
|
146
|
-
export const themes = Object.keys(THEME_PRESETS);
|
|
147
|
-
/**
|
|
148
|
-
* Available banner types
|
|
149
|
-
*
|
|
150
|
-
* @example
|
|
151
|
-
* ```typescript
|
|
152
|
-
* import { bannerTypes } from '@mks2508/better-logger/styling';
|
|
153
|
-
*
|
|
154
|
-
* console.log('Available banners:', bannerTypes);
|
|
155
|
-
* ```
|
|
156
|
-
*/
|
|
157
|
-
export const bannerTypes = Object.keys(BANNER_VARIANTS);
|
|
158
|
-
/**
|
|
159
|
-
* Display initialization banner
|
|
160
|
-
*
|
|
161
|
-
* @param bannerType - Type of banner to display
|
|
162
|
-
*
|
|
163
|
-
* @example
|
|
164
|
-
* ```typescript
|
|
165
|
-
* import { showInitBanner } from '@mks2508/better-logger/styling';
|
|
166
|
-
*
|
|
167
|
-
* showInitBanner('animated');
|
|
168
|
-
* ```
|
|
169
|
-
*/
|
|
170
|
-
export const showInitBanner = (bannerType) => {
|
|
171
|
-
displayInitBanner(bannerType);
|
|
172
|
-
};
|
|
173
|
-
/**
|
|
174
|
-
* Export individual styled logging methods
|
|
175
|
-
*/
|
|
176
|
-
export const debug = (...args) => styledLogger.debug(...args);
|
|
177
|
-
export const info = (...args) => styledLogger.info(...args);
|
|
178
|
-
export const warn = (...args) => styledLogger.warn(...args);
|
|
179
|
-
export const error = (...args) => styledLogger.error(...args);
|
|
180
|
-
export const success = (...args) => styledLogger.success(...args);
|
|
181
|
-
export const critical = (...args) => styledLogger.critical(...args);
|
|
182
|
-
export const trace = (...args) => styledLogger.trace(...args);
|
|
183
|
-
export const table = (data, columns) => styledLogger.table(data, columns);
|
|
184
|
-
export const group = (label, collapsed) => styledLogger.group(label, collapsed);
|
|
185
|
-
export const groupEnd = () => styledLogger.groupEnd();
|
|
186
|
-
export const time = (label) => styledLogger.time(label);
|
|
187
|
-
export const timeEnd = (label) => styledLogger.timeEnd(label);
|
|
188
|
-
export const setGlobalPrefix = (prefix) => styledLogger.setGlobalPrefix(prefix);
|
|
189
|
-
export const scope = (prefix) => styledLogger.scope(prefix);
|
|
190
|
-
export const setVerbosity = (level) => styledLogger.setVerbosity(level);
|
|
191
|
-
export const setTheme = (theme) => styledLogger.setTheme(theme);
|
|
192
|
-
export const setBannerType = (bannerType) => styledLogger.setBannerType(bannerType);
|
|
193
|
-
export const showBanner = (bannerType) => styledLogger.showBanner(bannerType);
|
|
194
|
-
export const logWithSVG = (message, svgContent, options) => styledLogger.logWithSVG(message, svgContent, options);
|
|
195
|
-
export const logAnimated = (message, duration) => styledLogger.logAnimated(message, duration);
|
|
196
|
-
// Export the singleton as default
|
|
197
|
-
export default styledLogger;
|
|
198
|
-
// Re-export styling utilities
|
|
199
|
-
export { StyleBuilder, StylePresets, THEME_PRESETS, THEME_BANNERS, BANNER_VARIANTS } from './styling/index.js';
|
package/dist/types/core.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview Definiciones de tipos principales para Better Logger
|
|
3
|
-
* @version 0.3.0
|
|
4
|
-
* @since 2024
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Niveles de log soportados en orden jerárquico (debug < info < warn < error < critical)
|
|
8
|
-
*
|
|
9
|
-
* @constant {Object} LOG_LEVELS
|
|
10
|
-
* @property {number} debug - Nivel 0: Información de depuración detallada
|
|
11
|
-
* @property {number} info - Nivel 1: Mensajes informativos generales
|
|
12
|
-
* @property {number} warn - Nivel 2: Advertencias que no detienen la ejecución
|
|
13
|
-
* @property {number} error - Nivel 3: Errores que pueden afectar funcionalidad
|
|
14
|
-
* @property {number} critical - Nivel 4: Errores críticos que requieren atención inmediata
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* // Verificar si un nivel debe mostrarse
|
|
18
|
-
* if (LOG_LEVELS[currentLevel] >= LOG_LEVELS.warn) {
|
|
19
|
-
* // Mostrar solo warn, error y critical
|
|
20
|
-
* }
|
|
21
|
-
*/
|
|
22
|
-
export const LOG_LEVELS = {
|
|
23
|
-
debug: 0,
|
|
24
|
-
info: 1,
|
|
25
|
-
warn: 2,
|
|
26
|
-
error: 3,
|
|
27
|
-
critical: 4,
|
|
28
|
-
};
|