@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.
Files changed (138) hide show
  1. package/dist/chunks/{Logger-Crw1woqR.js → Logger-CTAaDeZi.js} +49 -16
  2. package/dist/chunks/{Logger-Crw1woqR.js.map → Logger-CTAaDeZi.js.map} +1 -1
  3. package/dist/chunks/{Logger-D_p3xnbq.js → Logger-D8pK7XXt.js} +2 -2
  4. package/dist/chunks/{Logger-D_p3xnbq.js.map → Logger-D8pK7XXt.js.map} +1 -1
  5. package/dist/chunks/ScopedLogger-D-7q8uVP.js +2 -0
  6. package/dist/chunks/ScopedLogger-D-7q8uVP.js.map +1 -0
  7. package/dist/chunks/ScopedLogger-hS0qSkZD.js +361 -0
  8. package/dist/chunks/ScopedLogger-hS0qSkZD.js.map +1 -0
  9. package/dist/core.js +280 -307
  10. package/dist/exports.cjs +1 -1
  11. package/dist/exports.js +1 -1
  12. package/dist/index.cjs +1 -1
  13. package/dist/index.cjs.map +1 -1
  14. package/dist/index.js +226 -159
  15. package/dist/index.js.map +1 -1
  16. package/dist/styling.cjs +1 -1
  17. package/dist/styling.js +2 -2
  18. package/dist/types/Logger.d.ts +11 -7
  19. package/dist/types/Logger.d.ts.map +1 -1
  20. package/dist/types/core.d.ts +122 -216
  21. package/dist/types/core.d.ts.map +1 -1
  22. package/dist/types/index.d.ts +119 -4
  23. package/dist/types/index.d.ts.map +1 -1
  24. package/package.json +2 -1
  25. package/src/Logger.ts +99 -58
  26. package/src/index.ts +32 -25
  27. package/dist/.tsbuildinfo +0 -1
  28. package/dist/Logger.d.ts +0 -708
  29. package/dist/Logger.d.ts.map +0 -1
  30. package/dist/Logger.js +0 -1124
  31. package/dist/ScopedLogger.d.ts +0 -318
  32. package/dist/ScopedLogger.d.ts.map +0 -1
  33. package/dist/ScopedLogger.js +0 -426
  34. package/dist/cli/CommandProcessor.d.ts +0 -103
  35. package/dist/cli/CommandProcessor.d.ts.map +0 -1
  36. package/dist/cli/CommandProcessor.js +0 -184
  37. package/dist/cli/commands/ConfigCommand.d.ts +0 -17
  38. package/dist/cli/commands/ConfigCommand.d.ts.map +0 -1
  39. package/dist/cli/commands/ConfigCommand.js +0 -88
  40. package/dist/cli/commands/ExportCommand.d.ts +0 -51
  41. package/dist/cli/commands/ExportCommand.d.ts.map +0 -1
  42. package/dist/cli/commands/ExportCommand.js +0 -243
  43. package/dist/cli/commands/HistoryCommand.d.ts +0 -50
  44. package/dist/cli/commands/HistoryCommand.d.ts.map +0 -1
  45. package/dist/cli/commands/HistoryCommand.js +0 -96
  46. package/dist/cli/commands/StatusCommand.d.ts +0 -33
  47. package/dist/cli/commands/StatusCommand.d.ts.map +0 -1
  48. package/dist/cli/commands/StatusCommand.js +0 -93
  49. package/dist/cli/commands/ThemeCommand.d.ts +0 -33
  50. package/dist/cli/commands/ThemeCommand.d.ts.map +0 -1
  51. package/dist/cli/commands/ThemeCommand.js +0 -79
  52. package/dist/cli/help.d.ts +0 -15
  53. package/dist/cli/help.d.ts.map +0 -1
  54. package/dist/cli/help.js +0 -118
  55. package/dist/cli/index.d.ts +0 -15
  56. package/dist/cli/index.d.ts.map +0 -1
  57. package/dist/cli/index.js +0 -46
  58. package/dist/constants.d.ts +0 -122
  59. package/dist/constants.d.ts.map +0 -1
  60. package/dist/constants.js +0 -159
  61. package/dist/core.d.ts +0 -134
  62. package/dist/core.d.ts.map +0 -1
  63. package/dist/example.d.ts +0 -18
  64. package/dist/example.d.ts.map +0 -1
  65. package/dist/example.js +0 -154
  66. package/dist/exports-module.d.ts +0 -203
  67. package/dist/exports-module.d.ts.map +0 -1
  68. package/dist/exports-module.js +0 -260
  69. package/dist/handlers/AnalyticsLogHandler.d.ts +0 -11
  70. package/dist/handlers/AnalyticsLogHandler.d.ts.map +0 -1
  71. package/dist/handlers/AnalyticsLogHandler.js +0 -19
  72. package/dist/handlers/ExportLogHandler.d.ts +0 -103
  73. package/dist/handlers/ExportLogHandler.d.ts.map +0 -1
  74. package/dist/handlers/ExportLogHandler.js +0 -516
  75. package/dist/handlers/FileLogHandler.d.ts +0 -36
  76. package/dist/handlers/FileLogHandler.d.ts.map +0 -1
  77. package/dist/handlers/FileLogHandler.js +0 -156
  78. package/dist/handlers/RemoteLogHandler.d.ts +0 -14
  79. package/dist/handlers/RemoteLogHandler.d.ts.map +0 -1
  80. package/dist/handlers/RemoteLogHandler.js +0 -37
  81. package/dist/handlers/index.d.ts +0 -8
  82. package/dist/handlers/index.d.ts.map +0 -1
  83. package/dist/handlers/index.js +0 -7
  84. package/dist/index.d.ts +0 -157
  85. package/dist/index.d.ts.map +0 -1
  86. package/dist/main.d.ts +0 -2
  87. package/dist/main.d.ts.map +0 -1
  88. package/dist/main.js +0 -139
  89. package/dist/styling/LogStyleBuilder.d.ts +0 -149
  90. package/dist/styling/LogStyleBuilder.d.ts.map +0 -1
  91. package/dist/styling/LogStyleBuilder.js +0 -289
  92. package/dist/styling/SemanticStyles.d.ts +0 -181
  93. package/dist/styling/SemanticStyles.d.ts.map +0 -1
  94. package/dist/styling/SemanticStyles.js +0 -339
  95. package/dist/styling/SmartPresets.d.ts +0 -25
  96. package/dist/styling/SmartPresets.d.ts.map +0 -1
  97. package/dist/styling/SmartPresets.js +0 -276
  98. package/dist/styling/StyleBuilder.d.ts +0 -140
  99. package/dist/styling/StyleBuilder.d.ts.map +0 -1
  100. package/dist/styling/StyleBuilder.js +0 -280
  101. package/dist/styling/banners.d.ts +0 -45
  102. package/dist/styling/banners.d.ts.map +0 -1
  103. package/dist/styling/banners.js +0 -155
  104. package/dist/styling/index.d.ts +0 -10
  105. package/dist/styling/index.d.ts.map +0 -1
  106. package/dist/styling/index.js +0 -9
  107. package/dist/styling/themes.d.ts +0 -10
  108. package/dist/styling/themes.d.ts.map +0 -1
  109. package/dist/styling/themes.js +0 -231
  110. package/dist/styling-module.d.ts +0 -185
  111. package/dist/styling-module.d.ts.map +0 -1
  112. package/dist/styling-module.js +0 -199
  113. package/dist/types/core.js +0 -28
  114. package/dist/types/handlers.d.ts +0 -88
  115. package/dist/types/handlers.d.ts.map +0 -1
  116. package/dist/types/handlers.js +0 -4
  117. package/dist/types/index.js +0 -4
  118. package/dist/utils/environment.d.ts +0 -47
  119. package/dist/utils/environment.d.ts.map +0 -1
  120. package/dist/utils/environment.js +0 -85
  121. package/dist/utils/formatting.d.ts +0 -40
  122. package/dist/utils/formatting.d.ts.map +0 -1
  123. package/dist/utils/formatting.js +0 -117
  124. package/dist/utils/index.d.ts +0 -7
  125. package/dist/utils/index.d.ts.map +0 -1
  126. package/dist/utils/index.js +0 -6
  127. package/dist/utils/opentui-detection.d.ts +0 -34
  128. package/dist/utils/opentui-detection.d.ts.map +0 -1
  129. package/dist/utils/opentui-detection.js +0 -116
  130. package/dist/utils/output.d.ts +0 -44
  131. package/dist/utils/output.d.ts.map +0 -1
  132. package/dist/utils/output.js +0 -150
  133. package/dist/utils/stackTrace.d.ts +0 -9
  134. package/dist/utils/stackTrace.d.ts.map +0 -1
  135. package/dist/utils/stackTrace.js +0 -81
  136. package/dist/utils/timestamps.d.ts +0 -20
  137. package/dist/utils/timestamps.d.ts.map +0 -1
  138. package/dist/utils/timestamps.js +0 -71
@@ -1,93 +0,0 @@
1
- /**
2
- * @fileoverview Status and demo commands for Advanced Logger CLI
3
- */
4
- /**
5
- * Status command - show logger configuration and statistics
6
- */
7
- export class StatusCommand {
8
- name = 'status';
9
- description = 'Show current logger status and configuration';
10
- usage = '/status';
11
- execute(_args, logger) {
12
- const config = logger.getConfig();
13
- const statusData = {
14
- theme: config.theme ? config.theme : 'default',
15
- verbosity: config.verbosity,
16
- colors: config.enableColors,
17
- timestamps: config.enableTimestamps,
18
- stackTrace: config.enableStackTrace,
19
- globalPrefix: config.globalPrefix ? config.globalPrefix : 'none',
20
- bannerType: config.bannerType ? config.bannerType : 'simple',
21
- handlers: logger.getHandlers().length,
22
- bufferSize: config.bufferSize ? config.bufferSize : 1000
23
- };
24
- logger.group('⚙️ Logger Configuration');
25
- logger.table(statusData);
26
- logger.groupEnd();
27
- // Show buffer stats if ExportLogHandler is present
28
- const exportHandler = logger.getExportHandler();
29
- if (exportHandler) {
30
- const bufferStats = exportHandler.getBufferStats();
31
- logger.group('📊 Buffer Statistics');
32
- logger.table({
33
- size: `${bufferStats.size}/${bufferStats.maxSize}`,
34
- usage: `${bufferStats.usage.toFixed(1)}%`,
35
- oldestLog: bufferStats.oldestLog ? bufferStats.oldestLog.toISOString() : 'None',
36
- newestLog: bufferStats.newestLog ? bufferStats.newestLog.toISOString() : 'None',
37
- errorCount: bufferStats.levelCounts.error + bufferStats.levelCounts.critical,
38
- warningCount: bufferStats.levelCounts.warn
39
- });
40
- logger.groupEnd();
41
- }
42
- }
43
- }
44
- /**
45
- * Reset command - reset logger to defaults
46
- */
47
- export class ResetCommand {
48
- name = 'reset';
49
- description = 'Reset logger configuration to defaults';
50
- usage = '/reset';
51
- execute(_args, logger) {
52
- logger.resetConfig();
53
- }
54
- }
55
- /**
56
- * Demo command - show logger feature demonstration
57
- */
58
- export class DemoCommand {
59
- name = 'demo';
60
- description = 'Show comprehensive feature demonstration';
61
- usage = '/demo';
62
- execute(_args, logger) {
63
- logger.group('🎪 Advanced Logger Demo');
64
- // Basic logging demo
65
- logger.debug('Debug message with detailed information');
66
- logger.info('Informational message about system state');
67
- logger.warn('Warning about deprecated feature');
68
- logger.error('Error processing user request');
69
- logger.success('Operation completed successfully');
70
- logger.critical('Critical system failure detected');
71
- // Advanced features demo
72
- logger.group('📊 Advanced Features Demo');
73
- // Table demo
74
- logger.table([
75
- { feature: 'Styled Console', status: '✅ Active', performance: 'Excellent' },
76
- { feature: 'Theme System', status: '✅ Active', performance: 'Great' },
77
- { feature: 'CLI Interface', status: '✅ Active', performance: 'Good' },
78
- { feature: 'Export System', status: '✅ Active', performance: 'Excellent' }
79
- ]);
80
- // Timer demo
81
- logger.time('demo-operation');
82
- setTimeout(() => {
83
- logger.timeEnd('demo-operation');
84
- }, 100);
85
- // SVG demo
86
- logger.logWithSVG('SVG Demo');
87
- // Animated demo
88
- logger.logAnimated('🌟 Animated Logger Demo 🌟', 2);
89
- logger.groupEnd();
90
- logger.groupEnd();
91
- logger.info('Demo completed! Check the console for styled output.');
92
- }
93
- }
@@ -1,33 +0,0 @@
1
- /**
2
- * @fileoverview Theme and banner commands for Advanced Logger CLI
3
- */
4
- import type { ICommand } from '../CommandProcessor.js';
5
- import type { Logger } from '../../Logger.js';
6
- /**
7
- * Themes command - show available themes
8
- */
9
- export declare class ThemesCommand implements ICommand {
10
- name: string;
11
- description: string;
12
- usage: string;
13
- execute(_args: string, logger: Logger): void;
14
- }
15
- /**
16
- * Banners command - show available banner types
17
- */
18
- export declare class BannersCommand implements ICommand {
19
- name: string;
20
- description: string;
21
- usage: string;
22
- execute(_args: string, logger: Logger): void;
23
- }
24
- /**
25
- * Banner command - change/show banner type
26
- */
27
- export declare class BannerCommand implements ICommand {
28
- name: string;
29
- description: string;
30
- usage: string;
31
- execute(args: string, logger: Logger): void;
32
- }
33
- //# sourceMappingURL=ThemeCommand.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ThemeCommand.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/ThemeCommand.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAK9C;;GAEG;AACH,qBAAa,aAAc,YAAW,QAAQ;IAC1C,IAAI,SAAY;IAChB,WAAW,SAAkC;IAC7C,KAAK,SAAa;IAElB,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;CAgB/C;AAED;;GAEG;AACH,qBAAa,cAAe,YAAW,QAAQ;IAC3C,IAAI,SAAa;IACjB,WAAW,SAAiC;IAC5C,KAAK,SAAc;IAEnB,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;CAoB/C;AAED;;GAEG;AACH,qBAAa,aAAc,YAAW,QAAQ;IAC1C,IAAI,SAAY;IAChB,WAAW,SAAwC;IACnD,KAAK,SAAoB;IAEzB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;CAa9C"}
@@ -1,79 +0,0 @@
1
- /**
2
- * @fileoverview Theme and banner commands for Advanced Logger CLI
3
- */
4
- import { THEME_PRESETS, BANNER_VARIANTS } from '../../styling/index.js';
5
- import { StyleBuilder } from '../../styling/index.js';
6
- /**
7
- * Themes command - show available themes
8
- */
9
- export class ThemesCommand {
10
- name = 'themes';
11
- description = 'Show available theme presets';
12
- usage = '/themes';
13
- execute(_args, logger) {
14
- logger.group('🎨 Available Themes');
15
- Object.keys(THEME_PRESETS).forEach(themeName => {
16
- const preview = THEME_PRESETS[themeName];
17
- const previewStyle = new StyleBuilder()
18
- .bg(preview.info.background)
19
- .color(preview.info.color)
20
- .padding('4px 8px')
21
- .rounded('4px')
22
- .border(preview.info.border)
23
- .build();
24
- console.log(`%c${themeName}`, previewStyle, `- ${themeName} theme preview`);
25
- });
26
- logger.groupEnd();
27
- }
28
- }
29
- /**
30
- * Banners command - show available banner types
31
- */
32
- export class BannersCommand {
33
- name = 'banners';
34
- description = 'Show available banner types';
35
- usage = '/banners';
36
- execute(_args, logger) {
37
- logger.group('🖼️ Available Banner Types');
38
- Object.keys(BANNER_VARIANTS).forEach(bannerName => {
39
- const banner = BANNER_VARIANTS[bannerName];
40
- console.log(`%c${bannerName}`, 'font-weight: bold; color: #667eea;');
41
- console.log(`%cPreview:`, 'color: #666; font-size: 12px;');
42
- // Show a mini preview
43
- if (bannerName === 'simple') {
44
- console.log(`%c${banner.text}`, banner.style);
45
- }
46
- else if (bannerName === 'ascii') {
47
- console.log(`%c${banner.text.split('\n').slice(1, 4).join('\n')}...`, 'font-family: monospace; color: #667eea; font-size: 10px;');
48
- }
49
- else if (bannerName === 'unicode') {
50
- console.log(`%c${banner.text}`, banner.style);
51
- }
52
- else {
53
- console.log(`%c${bannerName} banner`, 'color: #666; font-style: italic;');
54
- }
55
- });
56
- logger.groupEnd();
57
- }
58
- }
59
- /**
60
- * Banner command - change/show banner type
61
- */
62
- export class BannerCommand {
63
- name = 'banner';
64
- description = 'Change or show current banner type';
65
- usage = '/banner [type]';
66
- execute(args, logger) {
67
- if (!args) {
68
- logger.showBanner();
69
- return;
70
- }
71
- if (args in BANNER_VARIANTS) {
72
- logger.setBannerType(args);
73
- logger.showBanner();
74
- }
75
- else {
76
- logger.error(`Invalid banner type: ${args}. Available: ${Object.keys(BANNER_VARIANTS).join(', ')}`);
77
- }
78
- }
79
- }
@@ -1,15 +0,0 @@
1
- /**
2
- * @fileoverview Help system for Advanced Logger CLI
3
- */
4
- import type { ICommand } from './CommandProcessor.js';
5
- import type { Logger } from '../Logger.js';
6
- /**
7
- * Help command - show comprehensive CLI help
8
- */
9
- export declare class HelpCommand implements ICommand {
10
- name: string;
11
- description: string;
12
- usage: string;
13
- execute(_args: string, logger: Logger): void;
14
- }
15
- //# sourceMappingURL=help.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../src/cli/help.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAG3C;;GAEG;AACH,qBAAa,WAAY,YAAW,QAAQ;IACxC,IAAI,SAAU;IACd,WAAW,SAA0C;IACrD,KAAK,SAAqB;IAE1B,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;CA8G/C"}
package/dist/cli/help.js DELETED
@@ -1,118 +0,0 @@
1
- /**
2
- * @fileoverview Help system for Advanced Logger CLI
3
- */
4
- import { StyleBuilder } from '../styling/index.js';
5
- /**
6
- * Help command - show comprehensive CLI help
7
- */
8
- export class HelpCommand {
9
- name = 'help';
10
- description = 'Show CLI help and available commands';
11
- usage = '/help [command]';
12
- execute(_args, logger) {
13
- const helpStyle = new StyleBuilder()
14
- .bg('linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%)')
15
- .color('#495057')
16
- .padding('15px 20px')
17
- .rounded('8px')
18
- .border('1px solid #dee2e6')
19
- .font('Monaco, Consolas, monospace')
20
- .size('13px')
21
- .build();
22
- const helpText = `
23
- ╭─────────────── ADVANCED LOGGER CLI COMMANDS ─────────────────╮
24
- │ │
25
- │ CONFIGURATION │
26
- │ /config Show current configuration │
27
- │ /config {json} Apply JSON configuration │
28
- │ /config key=val Apply key-value configuration │
29
- │ /themes Show available themes │
30
- │ /banners Show available banner types │
31
- │ /banner [type] Change/show banner type │
32
- │ /status Show logger status & buffer stats │
33
- │ /demo Show feature demonstration │
34
- │ /reset Reset to default configuration │
35
- │ │
36
- │ EXPORT & CLIPBOARD │
37
- │ /export <format> Export logs (json|csv|md|plain|html) │
38
- │ /copy <format> Copy logs to clipboard │
39
- │ /buffer-size N Set log buffer size │
40
- │ /buffer-info Show buffer statistics │
41
- │ /clear-buffer Clear stored logs │
42
- │ │
43
- │ EXPORT FILTERS (for export/copy commands) │
44
- │ --level error,warn Filter by log levels │
45
- │ --since 2h Logs from last 2 hours │
46
- │ --until 1h Logs until 1 hour ago │
47
- │ --prefix API,DB Filter by prefixes │
48
- │ --exclude-prefix INT Exclude prefixes │
49
- │ --last 50 Last 50 logs only │
50
- │ --first 25 First 25 logs only │
51
- │ --search "error" Search in log messages │
52
- │ --with-stack Only logs with stack traces │
53
- │ --errors-only Only error + critical logs │
54
- │ --group-by level Group by level/prefix/hour │
55
- │ │
56
- │ EXPORT OPTIONS │
57
- │ --minimal Minimal output format │
58
- │ --compact Remove extra whitespace │
59
- │ --styled Include styling (HTML format) │
60
- │ │
61
- ├──────────────────── CONFIGURATION OPTIONS ─────────────────┤
62
- │ │
63
- │ theme: default | dark | light | neon | minimal | cyberpunk│
64
- │ bannerType: simple | ascii | unicode | svg | animated │
65
- │ verbosity: debug | info | warn | error | critical | silent│
66
- │ enableColors: true | false │
67
- │ enableTimestamps: true | false │
68
- │ enableStackTrace: true | false │
69
- │ globalPrefix: "string" │
70
- │ bufferSize: number (50-10000) │
71
- │ │
72
- ├──────────────────────── EXAMPLES ──────────────────────────┤
73
- │ │
74
- │ Basic Configuration: │
75
- │ /config {"theme":"dark","verbosity":"debug"} │
76
- │ /config theme=neon,bufferSize=2000 │
77
- │ /banner animated Change to animated banner │
78
- │ │
79
- │ Export Examples: │
80
- │ /export json --level=error,warn --last=25 │
81
- │ /export csv --since=2h --prefix=API │
82
- │ /export markdown --group-by=level --errors-only │
83
- │ /export html --styled --since=1h │
84
- │ │
85
- │ Clipboard Examples: │
86
- │ /copy plain --minimal --last=10 │
87
- │ /copy json --search="authentication" --compact │
88
- │ /copy csv --since=30m --exclude-prefix=DEBUG │
89
- │ │
90
- │ Buffer Management: │
91
- │ /buffer-size 5000 Increase buffer to 5000 logs │
92
- │ /buffer-info Show detailed buffer statistics │
93
- │ /clear-buffer Clear all stored logs │
94
- │ │
95
- │ Time Formats: │
96
- │ --since=2h 2 hours ago │
97
- │ --since=30m 30 minutes ago │
98
- │ --since=1d 1 day ago │
99
- │ --since="2024-01-01T10:00:00Z" Specific ISO date │
100
- │ │
101
- ╰─────────────────────────────────────────────────────────────╯`;
102
- console.log(`%c${helpText}`, helpStyle);
103
- // Show quick tips
104
- logger.group('💡 Quick Tips');
105
- const tips = [
106
- 'Use /demo to see all logger features in action',
107
- 'Logs are automatically stored in a circular buffer for export',
108
- 'Export formats: JSON (structured), CSV (Excel), Markdown (readable), Plain (simple), HTML (styled)',
109
- 'Time filters support relative (2h, 30m) and absolute (ISO) formats',
110
- 'Combine multiple filters: /export json --level=error --since=1h --search="auth"',
111
- 'Use /copy for quick clipboard access instead of /export'
112
- ];
113
- tips.forEach(tip => {
114
- logger.info(`• ${tip}`);
115
- });
116
- logger.groupEnd();
117
- }
118
- }
@@ -1,15 +0,0 @@
1
- /**
2
- * @fileoverview CLI system exports for Advanced Logger
3
- */
4
- export { CommandProcessor, type ICommand } from './CommandProcessor.js';
5
- import { CommandProcessor } from './CommandProcessor.js';
6
- export { ConfigCommand } from './commands/ConfigCommand.js';
7
- export { ThemesCommand, BannersCommand, BannerCommand } from './commands/ThemeCommand.js';
8
- export { StatusCommand, ResetCommand, DemoCommand } from './commands/StatusCommand.js';
9
- export { ExportCommand, CopyCommand, BufferSizeCommand, ClearBufferCommand, BufferInfoCommand } from './commands/ExportCommand.js';
10
- export { HelpCommand } from './help.js';
11
- /**
12
- * Create and configure default CLI processor
13
- */
14
- export declare function createDefaultCLI(): CommandProcessor;
15
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,gBAAgB,EAAE,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAGzD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC1F,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AACvF,OAAO,EACH,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACpB,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAqBxC;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,gBAAgB,CAyBnD"}
package/dist/cli/index.js DELETED
@@ -1,46 +0,0 @@
1
- /**
2
- * @fileoverview CLI system exports for Advanced Logger
3
- */
4
- // Core CLI system
5
- export { CommandProcessor } from './CommandProcessor.js';
6
- import { CommandProcessor } from './CommandProcessor.js';
7
- // Commands
8
- export { ConfigCommand } from './commands/ConfigCommand.js';
9
- export { ThemesCommand, BannersCommand, BannerCommand } from './commands/ThemeCommand.js';
10
- export { StatusCommand, ResetCommand, DemoCommand } from './commands/StatusCommand.js';
11
- export { ExportCommand, CopyCommand, BufferSizeCommand, ClearBufferCommand, BufferInfoCommand } from './commands/ExportCommand.js';
12
- // Help system
13
- export { HelpCommand } from './help.js';
14
- // Import all commands
15
- import { HelpCommand } from './help.js';
16
- import { ConfigCommand } from './commands/ConfigCommand.js';
17
- import { ThemesCommand, BannersCommand, BannerCommand } from './commands/ThemeCommand.js';
18
- import { StatusCommand, ResetCommand, DemoCommand } from './commands/StatusCommand.js';
19
- import { ExportCommand, CopyCommand, BufferSizeCommand, ClearBufferCommand, BufferInfoCommand } from './commands/ExportCommand.js';
20
- import { HistoryCommand, ClearHistoryCommand, InteractiveCommand, PluginsCommand } from './commands/HistoryCommand.js';
21
- /**
22
- * Create and configure default CLI processor
23
- */
24
- export function createDefaultCLI() {
25
- const processor = new CommandProcessor();
26
- // Register all default commands
27
- processor.registerCommand(new HelpCommand());
28
- processor.registerCommand(new ConfigCommand());
29
- processor.registerCommand(new ThemesCommand());
30
- processor.registerCommand(new BannersCommand());
31
- processor.registerCommand(new BannerCommand());
32
- processor.registerCommand(new StatusCommand());
33
- processor.registerCommand(new ResetCommand());
34
- processor.registerCommand(new DemoCommand());
35
- processor.registerCommand(new ExportCommand());
36
- processor.registerCommand(new CopyCommand());
37
- processor.registerCommand(new BufferSizeCommand());
38
- processor.registerCommand(new ClearBufferCommand());
39
- processor.registerCommand(new BufferInfoCommand());
40
- // Register new enhanced commands
41
- processor.registerCommand(new HistoryCommand());
42
- processor.registerCommand(new ClearHistoryCommand());
43
- processor.registerCommand(new InteractiveCommand());
44
- processor.registerCommand(new PluginsCommand());
45
- return processor;
46
- }
@@ -1,122 +0,0 @@
1
- /**
2
- * @fileoverview Global constants for Advanced Logger
3
- */
4
- import type { LogLevel } from './types/index.js';
5
- import type { LevelStyleConfig } from './utils/index.js';
6
- /**
7
- * Default configuration values
8
- */
9
- export declare const DEFAULT_CONFIG: {
10
- readonly verbosity: "info";
11
- readonly enableColors: true;
12
- readonly enableTimestamps: true;
13
- readonly enableStackTrace: true;
14
- readonly theme: "default";
15
- readonly bannerType: "simple";
16
- readonly bufferSize: 1000;
17
- readonly autoDetectTheme: true;
18
- };
19
- /**
20
- * Basic level styles for core module (minimal CSS styling)
21
- */
22
- export declare const LEVEL_STYLES: Record<LogLevel | 'success', LevelStyleConfig>;
23
- /**
24
- * Maximum allowed buffer sizes for performance
25
- */
26
- export declare const BUFFER_LIMITS: {
27
- readonly MIN_SIZE: 50;
28
- readonly DEFAULT_SIZE: 1000;
29
- readonly MAX_SIZE: 10000;
30
- };
31
- /**
32
- * Export format definitions with extensions
33
- */
34
- export declare const EXPORT_FORMATS: {
35
- readonly json: {
36
- readonly extension: ".json";
37
- readonly mimeType: "application/json";
38
- };
39
- readonly csv: {
40
- readonly extension: ".csv";
41
- readonly mimeType: "text/csv";
42
- };
43
- readonly markdown: {
44
- readonly extension: ".md";
45
- readonly mimeType: "text/markdown";
46
- };
47
- readonly plain: {
48
- readonly extension: ".txt";
49
- readonly mimeType: "text/plain";
50
- };
51
- readonly html: {
52
- readonly extension: ".html";
53
- readonly mimeType: "text/html";
54
- };
55
- };
56
- /**
57
- * CLI command definitions
58
- */
59
- export declare const CLI_COMMANDS: {
60
- readonly config: "config";
61
- readonly help: "help";
62
- readonly themes: "themes";
63
- readonly banners: "banners";
64
- readonly banner: "banner";
65
- readonly status: "status";
66
- readonly reset: "reset";
67
- readonly demo: "demo";
68
- readonly export: "export";
69
- readonly copy: "copy";
70
- readonly 'buffer-size': "buffer-size";
71
- readonly 'clear-buffer': "clear-buffer";
72
- readonly 'buffer-info': "buffer-info";
73
- };
74
- /**
75
- * Time parsing constants for relative time filters
76
- */
77
- export declare const TIME_UNITS: {
78
- readonly ms: 1;
79
- readonly s: 1000;
80
- readonly m: number;
81
- readonly h: number;
82
- readonly d: number;
83
- };
84
- /**
85
- * Default styling values
86
- */
87
- export declare const STYLE_DEFAULTS: {
88
- readonly FONT_FAMILY: "Monaco, Consolas, monospace";
89
- readonly FONT_SIZE: "12px";
90
- readonly BORDER_RADIUS: "4px";
91
- readonly PADDING: "4px 8px";
92
- };
93
- /**
94
- * Level priority mapping for filtering
95
- */
96
- export declare const LEVEL_PRIORITIES: Record<LogLevel, number>;
97
- /**
98
- * Adaptive color configurations for DevTools theme compatibility
99
- */
100
- export declare const ADAPTIVE_COLORS: {
101
- readonly timestamp: {
102
- readonly light: "#666666";
103
- readonly dark: "#a0a0a0";
104
- };
105
- readonly messageText: {
106
- readonly light: "#2d3748";
107
- readonly dark: "#f7fafc";
108
- };
109
- readonly prefix: {
110
- readonly light: "#2d3748";
111
- readonly dark: "#e2e8f0";
112
- };
113
- readonly prefixBackground: {
114
- readonly light: "#2d3748";
115
- readonly dark: "#4a5568";
116
- };
117
- readonly location: {
118
- readonly light: "#718096";
119
- readonly dark: "#a0aec0";
120
- };
121
- };
122
- //# sourceMappingURL=constants.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAkB,MAAM,kBAAkB,CAAC;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEzD;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;CASjB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,QAAQ,GAAG,SAAS,EAAE,gBAAgB,CAiD9D,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,aAAa;;;;CAIhB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;CAMjB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;CAcf,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;;CAMb,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;CAKjB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAM5C,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;CAqBuB,CAAC"}