@mks2508/better-logger 5.0.0 → 5.0.2

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.
Files changed (162) hide show
  1. package/dist/chunks/{Logger-Cbi1f10o.js → Logger-CKqzXDh3.js} +2 -2
  2. package/dist/chunks/{Logger-Cbi1f10o.js.map → Logger-CKqzXDh3.js.map} +1 -1
  3. package/dist/chunks/{Logger-BZ7B7OXE.js → Logger-D_vuKP4l.js} +2 -2
  4. package/dist/chunks/{Logger-BZ7B7OXE.js.map → Logger-D_vuKP4l.js.map} +1 -1
  5. package/dist/chunks/cli-module-B-njrTWb.js +2 -0
  6. package/dist/chunks/cli-module-B-njrTWb.js.map +1 -0
  7. package/dist/chunks/{cli-module-ClIJmaT8.js → cli-module-Cx7qotPY.js} +16 -9
  8. package/dist/chunks/cli-module-Cx7qotPY.js.map +1 -0
  9. package/dist/cli.cjs +1 -1
  10. package/dist/cli.js +1 -1
  11. package/dist/exports.cjs +1 -1
  12. package/dist/exports.js +1 -1
  13. package/dist/index.cjs +1 -1
  14. package/dist/index.js +3 -3
  15. package/dist/styling.cjs +1 -1
  16. package/dist/styling.js +2 -2
  17. package/dist/terminal/formatter.d.ts.map +1 -1
  18. package/package.json +5 -1
  19. package/.claude/settings.local.json +0 -48
  20. package/.github/workflows/ci-quality.yml +0 -357
  21. package/.github/workflows/docs-demo.yml +0 -119
  22. package/.github/workflows/releases-core.yml +0 -512
  23. package/.github/workflows/releases-full.yml +0 -582
  24. package/.github/workflows-backup/ci.yml +0 -221
  25. package/.github/workflows-backup/nightly.yml +0 -196
  26. package/.github/workflows-backup/release-optimized.yml +0 -373
  27. package/.github/workflows-backup/release.yml +0 -269
  28. package/.release-notes-0.2.0.md +0 -129
  29. package/.yamllint +0 -28
  30. package/CHANGELOG.json +0 -1076
  31. package/CHANGELOG.md +0 -209
  32. package/CLAUDE.md +0 -217
  33. package/bun.lock +0 -333
  34. package/demo.html +0 -847
  35. package/dist/chunks/cli-module-CadqgZ1Z.js +0 -2
  36. package/dist/chunks/cli-module-CadqgZ1Z.js.map +0 -1
  37. package/dist/chunks/cli-module-ClIJmaT8.js.map +0 -1
  38. package/docs/API.md +0 -918
  39. package/docs/CORE.md +0 -264
  40. package/docs/DEVELOPMENT.md +0 -731
  41. package/docs/EXPORTS.md +0 -467
  42. package/docs/PACKAGES.md +0 -244
  43. package/docs/STYLING.md +0 -405
  44. package/docs/_config.yml +0 -36
  45. package/docs/index.md +0 -179
  46. package/examples/README.md +0 -208
  47. package/examples/basic-logging.js +0 -75
  48. package/examples/data-export.js +0 -234
  49. package/examples/package.json +0 -16
  50. package/examples/performance-timing.js +0 -170
  51. package/examples/simplified-api.js +0 -124
  52. package/examples/styling-themes.js +0 -207
  53. package/index.html +0 -358
  54. package/packages/core/package.json +0 -57
  55. package/packages/exports/package.json +0 -41
  56. package/packages/nodejs-opentui/README.md +0 -232
  57. package/packages/nodejs-opentui/package.json +0 -72
  58. package/packages/nodejs-opentui/src/LogRenderer.ts +0 -171
  59. package/packages/nodejs-opentui/src/OpenTUILogHandler.ts +0 -178
  60. package/packages/nodejs-opentui/src/components/LogBadge.tsx +0 -131
  61. package/packages/nodejs-opentui/src/index.ts +0 -133
  62. package/packages/nodejs-opentui/src/types.ts +0 -158
  63. package/packages/nodejs-opentui/tsconfig.json +0 -20
  64. package/packages/styling/package.json +0 -41
  65. package/playground/demo-all.ts +0 -95
  66. package/playground/demo-box.ts +0 -85
  67. package/playground/demo-levels.ts +0 -56
  68. package/playground/demo-real-world.ts +0 -98
  69. package/playground/demo-spinner.ts +0 -77
  70. package/playground/demo-steps.ts +0 -72
  71. package/playground/demo-table.ts +0 -83
  72. package/project-utils/README.md +0 -172
  73. package/project-utils/auto-release-gemini.ts +0 -1193
  74. package/project-utils/auto-release-ui.ts +0 -1329
  75. package/project-utils/commit-generator.ts +0 -1385
  76. package/project-utils/commit-ui.ts +0 -264
  77. package/project-utils/git-utils.ts +0 -199
  78. package/project-utils/github-release-manager.ts +0 -466
  79. package/project-utils/project-config.ts +0 -260
  80. package/project-utils/prompt-templates.js +0 -345
  81. package/project-utils/prompt-templates.ts +0 -422
  82. package/project-utils/version-manager.ts +0 -1078
  83. package/public/vite.svg +0 -1
  84. package/src/Logger.ts +0 -1858
  85. package/src/ScopedLogger.ts +0 -256
  86. package/src/cli/CommandProcessor.ts +0 -248
  87. package/src/cli/commands/ConfigCommand.ts +0 -93
  88. package/src/cli/commands/ExportCommand.ts +0 -276
  89. package/src/cli/commands/HistoryCommand.ts +0 -117
  90. package/src/cli/commands/StatusCommand.ts +0 -112
  91. package/src/cli/commands/ThemeCommand.ts +0 -88
  92. package/src/cli/help.ts +0 -127
  93. package/src/cli/index.ts +0 -71
  94. package/src/cli-module.ts +0 -21
  95. package/src/cli-primitives/box.ts +0 -86
  96. package/src/cli-primitives/cli-table.ts +0 -62
  97. package/src/cli-primitives/divider.ts +0 -17
  98. package/src/cli-primitives/header.ts +0 -18
  99. package/src/cli-primitives/index.ts +0 -13
  100. package/src/cli-primitives/server-fallback.ts +0 -54
  101. package/src/cli-primitives/spinner.ts +0 -133
  102. package/src/cli-primitives/step.ts +0 -22
  103. package/src/constants.ts +0 -313
  104. package/src/core.ts +0 -397
  105. package/src/example.ts +0 -210
  106. package/src/exports-module.ts +0 -311
  107. package/src/handlers/AnalyticsLogHandler.ts +0 -22
  108. package/src/handlers/ExportLogHandler.ts +0 -610
  109. package/src/handlers/FileLogHandler.ts +0 -169
  110. package/src/handlers/RemoteLogHandler.ts +0 -42
  111. package/src/handlers/index.ts +0 -8
  112. package/src/hooks/HookManager.ts +0 -177
  113. package/src/hooks/index.ts +0 -1
  114. package/src/index.ts +0 -395
  115. package/src/main.ts +0 -196
  116. package/src/serializers/SerializerRegistry.ts +0 -173
  117. package/src/serializers/index.ts +0 -1
  118. package/src/style.css +0 -96
  119. package/src/styling/LogStyleBuilder.ts +0 -355
  120. package/src/styling/SemanticStyles.ts +0 -380
  121. package/src/styling/SmartPresets.ts +0 -288
  122. package/src/styling/StyleBuilder.ts +0 -319
  123. package/src/styling/StyleCache.ts +0 -131
  124. package/src/styling/banners.ts +0 -168
  125. package/src/styling/index.ts +0 -27
  126. package/src/styling/themes.ts +0 -235
  127. package/src/styling-module.ts +0 -244
  128. package/src/terminal/color-converter.ts +0 -315
  129. package/src/terminal/formatter.ts +0 -236
  130. package/src/terminal/terminal-renderer.ts +0 -342
  131. package/src/transports/ConsoleTransport.ts +0 -28
  132. package/src/transports/FileTransport.ts +0 -53
  133. package/src/transports/HttpTransport.ts +0 -56
  134. package/src/transports/TransportManager.ts +0 -130
  135. package/src/transports/index.ts +0 -4
  136. package/src/types/core.ts +0 -417
  137. package/src/types/handlers.ts +0 -95
  138. package/src/types/hooks.ts +0 -45
  139. package/src/types/index.ts +0 -83
  140. package/src/types/serializers.ts +0 -30
  141. package/src/types/transports.ts +0 -52
  142. package/src/typescript.svg +0 -1
  143. package/src/utils/adapter.ts +0 -291
  144. package/src/utils/ansi-colors.ts +0 -333
  145. package/src/utils/environment-detector.ts +0 -170
  146. package/src/utils/environment.ts +0 -94
  147. package/src/utils/formatting.ts +0 -332
  148. package/src/utils/index.ts +0 -33
  149. package/src/utils/opentui-detection.ts +0 -138
  150. package/src/utils/output.ts +0 -227
  151. package/src/utils/stackTrace.ts +0 -144
  152. package/src/utils/timestamps.ts +0 -80
  153. package/src/vite-env.d.ts +0 -1
  154. package/src/writers/BufferWriter.ts +0 -157
  155. package/src/writers/index.ts +0 -6
  156. package/test-core-browser.html +0 -237
  157. package/test-core-node.js +0 -63
  158. package/tests/test-conflict-resolution.ts +0 -391
  159. package/tests/validate-workflows.sh +0 -131
  160. package/tests/yaml-autofix.sh +0 -146
  161. package/tsconfig.json +0 -50
  162. package/vite.config.ts +0 -256
@@ -1,178 +0,0 @@
1
- /**
2
- * @fileoverview OpenTUI Log Handler for integration with core logger
3
- */
4
-
5
- import type { ILogHandler, LogLevel, LogMetadata } from '@mks2508/better-logger-core';
6
- import { OpenTUILogRenderer } from './LogRenderer.js';
7
- import type { OpenTUILogEntry, OpenTUILogHandlerConfig } from './types.js';
8
-
9
- /**
10
- * Log handler that uses OpenTUI for rich terminal output
11
- */
12
- export class OpenTUILogHandler implements ILogHandler {
13
- private renderer: OpenTUILogRenderer;
14
- private config: OpenTUILogHandlerConfig;
15
- private logCounter = 0;
16
-
17
- constructor(config: OpenTUILogHandlerConfig = {}) {
18
- this.config = {
19
- renderer: {
20
- interactive: false,
21
- animated: true,
22
- theme: 'auto',
23
- dashboard: false,
24
- maxHistory: 100,
25
- components: {
26
- badges: true,
27
- progressBars: false,
28
- tables: false,
29
- charts: false
30
- }
31
- },
32
- ...config
33
- };
34
-
35
- this.renderer = new OpenTUILogRenderer(this.config.renderer);
36
- }
37
-
38
- /**
39
- * Handle log entry from core logger
40
- */
41
- async handle(level: LogLevel, message: string, args: any[], metadata: LogMetadata): Promise<void> {
42
- // Create OpenTUI log entry
43
- const entry: OpenTUILogEntry = {
44
- id: this.generateLogId(),
45
- timestamp: metadata.timestamp,
46
- level,
47
- message,
48
- args: args.slice(1), // Exclude first message argument
49
- prefix: metadata.prefix,
50
- stackInfo: metadata.stackInfo,
51
- metadata: {
52
- originalArgs: args,
53
- handlerType: 'opentui'
54
- }
55
- };
56
-
57
- try {
58
- await this.renderer.renderLog(entry);
59
- } catch (error) {
60
- // Fallback to console if OpenTUI fails
61
- console.error('OpenTUI rendering failed:', error);
62
- this.fallbackRender(entry);
63
- }
64
- }
65
-
66
- /**
67
- * Initialize the handler (call this early in application lifecycle)
68
- */
69
- async initialize(): Promise<boolean> {
70
- try {
71
- await this.renderer.initialize();
72
- return this.renderer.isAvailable();
73
- } catch (error) {
74
- console.warn('Failed to initialize OpenTUI:', error);
75
- return false;
76
- }
77
- }
78
-
79
- /**
80
- * Check if OpenTUI is available
81
- */
82
- isAvailable(): boolean {
83
- return this.renderer.isAvailable();
84
- }
85
-
86
- /**
87
- * Get rendering statistics
88
- */
89
- getStats() {
90
- return {
91
- available: this.isAvailable(),
92
- logsRendered: this.logCounter,
93
- historySize: this.renderer.getHistory().length,
94
- config: this.config
95
- };
96
- }
97
-
98
- /**
99
- * Update configuration
100
- */
101
- updateConfig(newConfig: Partial<OpenTUILogHandlerConfig>): void {
102
- Object.assign(this.config, newConfig);
103
- }
104
-
105
- /**
106
- * Get log history
107
- */
108
- getHistory(): OpenTUILogEntry[] {
109
- return this.renderer.getHistory();
110
- }
111
-
112
- /**
113
- * Clear log history
114
- */
115
- clearHistory(): void {
116
- this.renderer.clearHistory();
117
- }
118
-
119
- /**
120
- * Cleanup resources
121
- */
122
- destroy(): void {
123
- this.renderer.destroy();
124
- }
125
-
126
- /**
127
- * Generate unique log ID
128
- */
129
- private generateLogId(): string {
130
- return `opentui-log-${Date.now()}-${++this.logCounter}`;
131
- }
132
-
133
- /**
134
- * Fallback rendering when OpenTUI fails
135
- */
136
- private fallbackRender(entry: OpenTUILogEntry): void {
137
- const prefix = entry.prefix ? `[${entry.prefix}] ` : '';
138
- const timestamp = entry.timestamp.slice(11, 23);
139
-
140
- console.log(`[${timestamp}] [${entry.level.toUpperCase()}] ${prefix}${entry.message}`);
141
-
142
- // Log additional args if present
143
- if (entry.args && entry.args.length > 0) {
144
- entry.args.forEach(arg => {
145
- if (typeof arg === 'object') {
146
- console.log(JSON.stringify(arg, null, 2));
147
- } else {
148
- console.log(String(arg));
149
- }
150
- });
151
- }
152
-
153
- // Log stack trace if present and it's an error
154
- if (entry.stackInfo && (entry.level === 'error' || entry.level === 'critical')) {
155
- console.log(` at ${entry.stackInfo.file}:${entry.stackInfo.line}:${entry.stackInfo.column}`);
156
- }
157
- }
158
- }
159
-
160
- /**
161
- * Factory function to create OpenTUI log handler
162
- */
163
- export function createOpenTUILogHandler(config?: OpenTUILogHandlerConfig): OpenTUILogHandler {
164
- return new OpenTUILogHandler(config);
165
- }
166
-
167
- /**
168
- * Utility function to check if OpenTUI is available in the environment
169
- */
170
- export async function isOpenTUIAvailable(): Promise<boolean> {
171
- try {
172
- // Try to import OpenTUI core
173
- await import('@opentui/core');
174
- return true;
175
- } catch (error) {
176
- return false;
177
- }
178
- }
@@ -1,131 +0,0 @@
1
- /**
2
- * @fileoverview Log Badge component with animations and styling
3
- */
4
-
5
- import React from 'react';
6
- import type { LogLevel } from '@mks2508/better-logger-core';
7
- import type { LogComponentStyle } from '../types.js';
8
-
9
- interface LogBadgeProps {
10
- level: LogLevel;
11
- animated?: boolean;
12
- style?: LogComponentStyle;
13
- }
14
-
15
- /**
16
- * Get default styling for log level
17
- */
18
- function getDefaultLevelStyle(level: LogLevel): LogComponentStyle {
19
- const styles: Record<LogLevel, LogComponentStyle> = {
20
- debug: {
21
- backgroundColor: '#6c757d',
22
- color: '#ffffff',
23
- animation: 'none'
24
- },
25
- info: {
26
- backgroundColor: '#007bff',
27
- color: '#ffffff',
28
- animation: 'none'
29
- },
30
- warn: {
31
- backgroundColor: '#ffc107',
32
- color: '#000000',
33
- animation: 'pulse'
34
- },
35
- error: {
36
- backgroundColor: '#dc3545',
37
- color: '#ffffff',
38
- animation: 'shake'
39
- },
40
- critical: {
41
- backgroundColor: '#8B0000',
42
- color: '#ffffff',
43
- animation: 'pulse',
44
- duration: 1000
45
- }
46
- };
47
-
48
- return styles[level];
49
- }
50
-
51
- /**
52
- * Get emoji icon for log level
53
- */
54
- function getLevelIcon(level: LogLevel): string {
55
- const icons: Record<LogLevel, string> = {
56
- debug: '🔍',
57
- info: 'ℹ️',
58
- warn: '⚠️',
59
- error: '❌',
60
- critical: '🚨'
61
- };
62
-
63
- return icons[level];
64
- }
65
-
66
- /**
67
- * Log badge component with styling and animations
68
- */
69
- export function LogBadge({ level, animated = true, style = {} }: LogBadgeProps) {
70
- const defaultStyle = getDefaultLevelStyle(level);
71
- const finalStyle = { ...defaultStyle, ...style };
72
- const icon = getLevelIcon(level);
73
-
74
- // Convert our style to OpenTUI box style
75
- const boxStyle = {
76
- backgroundColor: finalStyle.backgroundColor,
77
- color: finalStyle.color,
78
- padding: finalStyle.padding || 1,
79
- margin: finalStyle.margin || 0,
80
- border: finalStyle.border || 'none',
81
- ...(animated && finalStyle.animation !== 'none' && {
82
- animation: `${finalStyle.animation} ${finalStyle.duration || 500}ms ease-in-out`
83
- })
84
- };
85
-
86
- return (
87
- <box style={boxStyle}>
88
- <text bold fg={finalStyle.color}>
89
- {icon} {level.toUpperCase()}
90
- </text>
91
- </box>
92
- );
93
- }
94
-
95
- /**
96
- * Compact log badge (icon only)
97
- */
98
- export function CompactLogBadge({ level, animated = true }: Omit<LogBadgeProps, 'style'>) {
99
- const style = getDefaultLevelStyle(level);
100
- const icon = getLevelIcon(level);
101
-
102
- return (
103
- <text
104
- fg={style.color}
105
- style={{
106
- ...(animated && style.animation !== 'none' && {
107
- animation: `${style.animation} ${style.duration || 500}ms ease-in-out`
108
- })
109
- }}
110
- >
111
- {icon}
112
- </text>
113
- );
114
- }
115
-
116
- /**
117
- * Inline log badge (for embedded use)
118
- */
119
- export function InlineLogBadge({ level }: Pick<LogBadgeProps, 'level'>) {
120
- const style = getDefaultLevelStyle(level);
121
- const icon = getLevelIcon(level);
122
-
123
- return (
124
- <text
125
- fg={style.color}
126
- bold
127
- >
128
- [{icon} {level.toUpperCase()}]
129
- </text>
130
- );
131
- }
@@ -1,133 +0,0 @@
1
- /**
2
- * @fileoverview OpenTUI Logger - Tier 2 Enhanced Terminal Logging
3
- */
4
-
5
- // Core exports
6
- export { OpenTUILogHandler, createOpenTUILogHandler, isOpenTUIAvailable } from './OpenTUILogHandler.js';
7
- export { OpenTUILogRenderer } from './LogRenderer.js';
8
-
9
- // Types
10
- export type {
11
- OpenTUILogEntry,
12
- LogAnimation,
13
- LogComponentStyle,
14
- InteractiveLogConfig,
15
- LogDashboardConfig,
16
- ProgressLogEntry,
17
- TableLogEntry,
18
- LogStatistics,
19
- LogFilter,
20
- OpenTUIRendererOptions,
21
- LogLevelStyling,
22
- OpenTUILogHandlerConfig
23
- } from './types.js';
24
-
25
- // Convenience function to create and initialize OpenTUI logger
26
- import { OpenTUILogHandler } from './OpenTUILogHandler.js';
27
- import type { OpenTUILogHandlerConfig } from './types.js';
28
-
29
- /**
30
- * Create and initialize OpenTUI log handler
31
- *
32
- * @example
33
- * ```typescript
34
- * import { createOpenTUILogger } from '@mks2508/better-logger-nodejs-opentui';
35
- * import logger from '@mks2508/better-logger-core';
36
- *
37
- * const openTUIHandler = await createOpenTUILogger({
38
- * animated: true,
39
- * components: { badges: true }
40
- * });
41
- *
42
- * if (openTUIHandler) {
43
- * logger.addHandler(openTUIHandler);
44
- * logger.info('Rich terminal logging enabled!');
45
- * }
46
- * ```
47
- */
48
- export async function createOpenTUILogger(
49
- config?: OpenTUILogHandlerConfig
50
- ): Promise<OpenTUILogHandler | null> {
51
- try {
52
- const handler = new OpenTUILogHandler(config);
53
- const initialized = await handler.initialize();
54
-
55
- if (initialized) {
56
- return handler;
57
- } else {
58
- console.warn('OpenTUI not available, using fallback logging');
59
- return null;
60
- }
61
- } catch (error) {
62
- console.error('Failed to create OpenTUI logger:', error);
63
- return null;
64
- }
65
- }
66
-
67
- /**
68
- * Utility to enhance existing logger with OpenTUI capabilities
69
- *
70
- * @example
71
- * ```typescript
72
- * import logger from '@mks2508/better-logger-core';
73
- * import { enhanceLoggerWithOpenTUI } from '@mks2508/better-logger-nodejs-opentui';
74
- *
75
- * await enhanceLoggerWithOpenTUI(logger, {
76
- * animated: true,
77
- * theme: 'dark'
78
- * });
79
- *
80
- * logger.info('Now with OpenTUI superpowers!');
81
- * ```
82
- */
83
- export async function enhanceLoggerWithOpenTUI(
84
- logger: any, // Accept any logger with addHandler method
85
- config?: OpenTUILogHandlerConfig
86
- ): Promise<boolean> {
87
- const handler = await createOpenTUILogger(config);
88
-
89
- if (handler && logger.addHandler) {
90
- logger.addHandler(handler);
91
- return true;
92
- }
93
-
94
- return false;
95
- }
96
-
97
- /**
98
- * Quick setup function for common use cases
99
- */
100
- export async function quickSetup() {
101
- try {
102
- // Try to import and enhance the default core logger
103
- const { default: logger } = await import('@mks2508/better-logger-core');
104
-
105
- const enhanced = await enhanceLoggerWithOpenTUI(logger, {
106
- renderer: {
107
- animated: true,
108
- theme: 'auto',
109
- components: {
110
- badges: true,
111
- progressBars: false,
112
- tables: false,
113
- charts: false
114
- }
115
- }
116
- });
117
-
118
- if (enhanced) {
119
- console.log('🚀 OpenTUI enhanced logging activated!');
120
- return logger;
121
- } else {
122
- console.warn('⚠️ OpenTUI not available, using standard logging');
123
- return logger;
124
- }
125
- } catch (error) {
126
- console.error('❌ Failed to setup OpenTUI logging:', error);
127
- return null;
128
- }
129
- }
130
-
131
- // Package info
132
- export const version = '0.1.0';
133
- export const name = '@mks2508/better-logger-nodejs-opentui';
@@ -1,158 +0,0 @@
1
- /**
2
- * @fileoverview Types for OpenTUI logger integration
3
- */
4
-
5
- import type { LogLevel } from '@mks2508/better-logger-core';
6
-
7
- /**
8
- * Enhanced log entry with OpenTUI capabilities
9
- */
10
- export interface OpenTUILogEntry {
11
- id: string;
12
- timestamp: string;
13
- level: LogLevel;
14
- message: string;
15
- args?: any[];
16
- prefix?: string;
17
- stackInfo?: {
18
- file: string;
19
- line: number;
20
- column: number;
21
- function?: string;
22
- };
23
- metadata?: Record<string, any>;
24
- }
25
-
26
- /**
27
- * Animation types for log entries
28
- */
29
- export type LogAnimation = 'none' | 'slideIn' | 'fadeIn' | 'shake' | 'pulse' | 'bounce';
30
-
31
- /**
32
- * Log component styling options
33
- */
34
- export interface LogComponentStyle {
35
- backgroundColor?: string;
36
- color?: string;
37
- border?: string;
38
- padding?: number;
39
- margin?: number;
40
- animation?: LogAnimation;
41
- duration?: number;
42
- delay?: number;
43
- }
44
-
45
- /**
46
- * Interactive log configuration
47
- */
48
- export interface InteractiveLogConfig {
49
- clickable?: boolean;
50
- expandable?: boolean;
51
- selectable?: boolean;
52
- filterable?: boolean;
53
- searchable?: boolean;
54
- }
55
-
56
- /**
57
- * Log dashboard configuration
58
- */
59
- export interface LogDashboardConfig {
60
- title?: string;
61
- maxLogs?: number;
62
- autoScroll?: boolean;
63
- showStats?: boolean;
64
- showFilters?: boolean;
65
- refreshInterval?: number;
66
- layout?: 'vertical' | 'horizontal' | 'grid';
67
- }
68
-
69
- /**
70
- * Progress log entry
71
- */
72
- export interface ProgressLogEntry extends OpenTUILogEntry {
73
- progress?: {
74
- current: number;
75
- total: number;
76
- unit?: string;
77
- showPercentage?: boolean;
78
- showBar?: boolean;
79
- };
80
- }
81
-
82
- /**
83
- * Table log entry
84
- */
85
- export interface TableLogEntry extends OpenTUILogEntry {
86
- table?: {
87
- data: Record<string, any>[];
88
- columns?: string[];
89
- title?: string;
90
- maxRows?: number;
91
- };
92
- }
93
-
94
- /**
95
- * Log statistics
96
- */
97
- export interface LogStatistics {
98
- total: number;
99
- byLevel: Record<LogLevel, number>;
100
- errors: number;
101
- warnings: number;
102
- recent: number; // Last hour
103
- rate: number; // Logs per second
104
- }
105
-
106
- /**
107
- * Filter options for logs
108
- */
109
- export interface LogFilter {
110
- levels?: LogLevel[];
111
- timeRange?: {
112
- start: Date;
113
- end: Date;
114
- };
115
- search?: string;
116
- prefix?: string;
117
- includeStackTrace?: boolean;
118
- }
119
-
120
- /**
121
- * OpenTUI renderer options
122
- */
123
- export interface OpenTUIRendererOptions {
124
- interactive?: boolean;
125
- animated?: boolean;
126
- theme?: 'light' | 'dark' | 'auto';
127
- dashboard?: boolean;
128
- maxHistory?: number;
129
- components?: {
130
- badges?: boolean;
131
- progressBars?: boolean;
132
- tables?: boolean;
133
- charts?: boolean;
134
- };
135
- }
136
-
137
- /**
138
- * Log level styling configuration
139
- */
140
- export interface LogLevelStyling {
141
- [K in LogLevel]: {
142
- color: string;
143
- backgroundColor?: string;
144
- icon?: string;
145
- animation?: LogAnimation;
146
- };
147
- }
148
-
149
- /**
150
- * OpenTUI log handler configuration
151
- */
152
- export interface OpenTUILogHandlerConfig {
153
- renderer?: OpenTUIRendererOptions;
154
- interactive?: InteractiveLogConfig;
155
- dashboard?: LogDashboardConfig;
156
- styling?: LogLevelStyling;
157
- filters?: LogFilter;
158
- }
@@ -1,20 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "./dist",
5
- "rootDir": "./src",
6
- "declarationDir": "./dist/types",
7
- "declaration": true,
8
- "jsx": "react-jsx",
9
- "jsxImportSource": "react"
10
- },
11
- "include": [
12
- "src/**/*"
13
- ],
14
- "exclude": [
15
- "dist",
16
- "node_modules",
17
- "**/*.test.ts",
18
- "**/*.spec.ts"
19
- ]
20
- }
@@ -1,41 +0,0 @@
1
- {
2
- "name": "@mks2508/better-logger-styling",
3
- "version": "0.16.0-alpha.1",
4
- "type": "module",
5
- "description": "Advanced CSS styling system for Better Logger - Console styling with gradients, animations and SVG support",
6
- "main": "dist/index.js",
7
- "types": "dist/types/styling-module.d.ts",
8
- "keywords": [
9
- "logger",
10
- "console",
11
- "styling",
12
- "css",
13
- "svg",
14
- "animation",
15
- "gradients",
16
- "typescript",
17
- "browser"
18
- ],
19
- "author": "MKS2508",
20
- "license": "MIT",
21
- "repository": {
22
- "type": "git",
23
- "url": "git+https://github.com/MKS2508/advanced-logger.git",
24
- "directory": "packages/styling"
25
- },
26
- "bugs": {
27
- "url": "https://github.com/MKS2508/advanced-logger/issues"
28
- },
29
- "homepage": "https://mks2508.github.io/advanced-logger/",
30
- "publishConfig": {
31
- "access": "public",
32
- "registry": "https://registry.npmjs.org/"
33
- },
34
- "files": [
35
- "dist",
36
- "README.md"
37
- ],
38
- "peerDependencies": {
39
- "@mks2508/better-logger-core": "^0.16.0-alpha.1"
40
- }
41
- }