traceperf 0.2.1 → 1.3.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 (268) hide show
  1. package/README.md +608 -253
  2. package/dist/__tests__/helpers/console.d.ts +9 -0
  3. package/dist/__tests__/helpers/console.js +25 -0
  4. package/dist/__tests__/helpers/console.js.map +1 -0
  5. package/dist/auto.d.ts +30 -0
  6. package/dist/auto.js +91 -0
  7. package/dist/auto.js.map +1 -0
  8. package/dist/browser.d.ts +52 -144
  9. package/dist/browser.js +112 -439
  10. package/dist/browser.js.map +1 -1
  11. package/dist/cli.d.ts +68 -0
  12. package/dist/cli.js +528 -0
  13. package/dist/cli.js.map +1 -0
  14. package/dist/core/allocations.d.ts +38 -0
  15. package/dist/core/allocations.js +85 -0
  16. package/dist/core/allocations.js.map +1 -0
  17. package/dist/core/cpu-profile.d.ts +84 -0
  18. package/dist/core/cpu-profile.js +181 -0
  19. package/dist/core/cpu-profile.js.map +1 -0
  20. package/dist/core/env.d.ts +10 -0
  21. package/dist/core/env.js +40 -0
  22. package/dist/core/env.js.map +1 -0
  23. package/dist/core/event-loop.d.ts +30 -0
  24. package/dist/core/event-loop.js +43 -0
  25. package/dist/core/event-loop.js.map +1 -0
  26. package/dist/core/explain.d.ts +48 -0
  27. package/dist/core/explain.js +236 -0
  28. package/dist/core/explain.js.map +1 -0
  29. package/dist/core/exporters.d.ts +111 -0
  30. package/dist/core/exporters.js +236 -0
  31. package/dist/core/exporters.js.map +1 -0
  32. package/dist/core/index.d.ts +9 -3
  33. package/dist/core/index.js +9 -3
  34. package/dist/core/index.js.map +1 -1
  35. package/dist/core/optimized-performance-monitor.d.ts +180 -26
  36. package/dist/core/optimized-performance-monitor.js +687 -175
  37. package/dist/core/optimized-performance-monitor.js.map +1 -1
  38. package/dist/core/prometheus.d.ts +36 -0
  39. package/dist/core/prometheus.js +93 -0
  40. package/dist/core/prometheus.js.map +1 -0
  41. package/dist/core/records.d.ts +97 -0
  42. package/dist/core/records.js +87 -0
  43. package/dist/core/records.js.map +1 -0
  44. package/dist/core/stats.d.ts +45 -0
  45. package/dist/core/stats.js +136 -0
  46. package/dist/core/stats.js.map +1 -0
  47. package/dist/core/timeline.d.ts +28 -0
  48. package/dist/core/timeline.js +65 -0
  49. package/dist/core/timeline.js.map +1 -0
  50. package/dist/drivers.d.ts +51 -0
  51. package/dist/drivers.js +205 -0
  52. package/dist/drivers.js.map +1 -0
  53. package/dist/esm/auto.d.ts +30 -0
  54. package/dist/esm/auto.js +87 -0
  55. package/dist/esm/auto.js.map +1 -0
  56. package/dist/esm/browser.d.ts +52 -144
  57. package/dist/esm/browser.js +101 -445
  58. package/dist/esm/browser.js.map +1 -1
  59. package/dist/esm/cli.d.ts +68 -0
  60. package/dist/esm/cli.js +520 -0
  61. package/dist/esm/cli.js.map +1 -0
  62. package/dist/esm/core/allocations.d.ts +38 -0
  63. package/dist/esm/core/allocations.js +82 -0
  64. package/dist/esm/core/allocations.js.map +1 -0
  65. package/dist/esm/core/cpu-profile.d.ts +84 -0
  66. package/dist/esm/core/cpu-profile.js +176 -0
  67. package/dist/esm/core/cpu-profile.js.map +1 -0
  68. package/dist/esm/core/env.d.ts +10 -0
  69. package/dist/esm/core/env.js +35 -0
  70. package/dist/esm/core/env.js.map +1 -0
  71. package/dist/esm/core/event-loop.d.ts +30 -0
  72. package/dist/esm/core/event-loop.js +40 -0
  73. package/dist/esm/core/event-loop.js.map +1 -0
  74. package/dist/esm/core/explain.d.ts +48 -0
  75. package/dist/esm/core/explain.js +232 -0
  76. package/dist/esm/core/explain.js.map +1 -0
  77. package/dist/esm/core/exporters.d.ts +111 -0
  78. package/dist/esm/core/exporters.js +229 -0
  79. package/dist/esm/core/exporters.js.map +1 -0
  80. package/dist/esm/core/index.d.ts +10 -4
  81. package/dist/esm/core/index.js +10 -4
  82. package/dist/esm/core/index.js.map +1 -1
  83. package/dist/esm/core/optimized-performance-monitor.d.ts +180 -26
  84. package/dist/esm/core/optimized-performance-monitor.js +685 -173
  85. package/dist/esm/core/optimized-performance-monitor.js.map +1 -1
  86. package/dist/esm/core/prometheus.d.ts +36 -0
  87. package/dist/esm/core/prometheus.js +89 -0
  88. package/dist/esm/core/prometheus.js.map +1 -0
  89. package/dist/esm/core/records.d.ts +97 -0
  90. package/dist/esm/core/records.js +82 -0
  91. package/dist/esm/core/records.js.map +1 -0
  92. package/dist/esm/core/stats.d.ts +45 -0
  93. package/dist/esm/core/stats.js +131 -0
  94. package/dist/esm/core/stats.js.map +1 -0
  95. package/dist/esm/core/timeline.d.ts +28 -0
  96. package/dist/esm/core/timeline.js +62 -0
  97. package/dist/esm/core/timeline.js.map +1 -0
  98. package/dist/esm/drivers.d.ts +51 -0
  99. package/dist/esm/drivers.js +197 -0
  100. package/dist/esm/drivers.js.map +1 -0
  101. package/dist/esm/index.d.ts +13 -5
  102. package/dist/esm/index.js +21 -17
  103. package/dist/esm/index.js.map +1 -1
  104. package/dist/esm/instrument.d.ts +88 -0
  105. package/dist/esm/instrument.js +274 -0
  106. package/dist/esm/instrument.js.map +1 -0
  107. package/dist/esm/integrations.d.ts +70 -0
  108. package/dist/esm/integrations.js +197 -0
  109. package/dist/esm/integrations.js.map +1 -0
  110. package/dist/esm/node-builtins.d.ts +1 -0
  111. package/dist/esm/node-builtins.js +32 -0
  112. package/dist/esm/node-builtins.js.map +1 -0
  113. package/dist/esm/package.json +3 -0
  114. package/dist/esm/register.d.ts +20 -0
  115. package/dist/esm/register.js +98 -0
  116. package/dist/esm/register.js.map +1 -0
  117. package/dist/esm/report-html.d.ts +11 -0
  118. package/dist/esm/report-html.js +106 -0
  119. package/dist/esm/report-html.js.map +1 -0
  120. package/dist/esm/types/index.d.ts +4 -80
  121. package/dist/esm/types/index.js +1 -2
  122. package/dist/esm/types/index.js.map +1 -1
  123. package/dist/esm/types/options.d.ts +72 -0
  124. package/dist/esm/types/options.js +2 -0
  125. package/dist/esm/types/options.js.map +1 -0
  126. package/dist/esm/watch.d.ts +17 -0
  127. package/dist/esm/watch.js +87 -0
  128. package/dist/esm/watch.js.map +1 -0
  129. package/dist/index.d.ts +10 -2
  130. package/dist/index.js +26 -29
  131. package/dist/index.js.map +1 -1
  132. package/dist/instrument.d.ts +88 -0
  133. package/dist/instrument.js +282 -0
  134. package/dist/instrument.js.map +1 -0
  135. package/dist/integrations.d.ts +70 -0
  136. package/dist/integrations.js +205 -0
  137. package/dist/integrations.js.map +1 -0
  138. package/dist/node-builtins.d.ts +1 -0
  139. package/dist/node-builtins.js +67 -0
  140. package/dist/node-builtins.js.map +1 -0
  141. package/dist/register.d.ts +20 -0
  142. package/dist/register.js +103 -0
  143. package/dist/register.js.map +1 -0
  144. package/dist/report-html.d.ts +11 -0
  145. package/dist/report-html.js +109 -0
  146. package/dist/report-html.js.map +1 -0
  147. package/dist/traceperf.browser.js +1910 -0
  148. package/dist/traceperf.browser.min.js +6 -0
  149. package/dist/types/index.d.ts +4 -80
  150. package/dist/types/index.js +1 -2
  151. package/dist/types/index.js.map +1 -1
  152. package/dist/types/options.d.ts +72 -0
  153. package/dist/types/{config.js → options.js} +1 -1
  154. package/dist/types/options.js.map +1 -0
  155. package/dist/watch.d.ts +17 -0
  156. package/dist/watch.js +90 -0
  157. package/dist/watch.js.map +1 -0
  158. package/package.json +99 -19
  159. package/dist/core/config.d.ts +0 -77
  160. package/dist/core/config.js +0 -116
  161. package/dist/core/config.js.map +0 -1
  162. package/dist/core/constants.d.ts +0 -78
  163. package/dist/core/constants.js +0 -109
  164. package/dist/core/constants.js.map +0 -1
  165. package/dist/core/logger.d.ts +0 -97
  166. package/dist/core/logger.js +0 -186
  167. package/dist/core/logger.js.map +0 -1
  168. package/dist/esm/core/config.d.ts +0 -77
  169. package/dist/esm/core/config.js +0 -112
  170. package/dist/esm/core/config.js.map +0 -1
  171. package/dist/esm/core/constants.d.ts +0 -78
  172. package/dist/esm/core/constants.js +0 -106
  173. package/dist/esm/core/constants.js.map +0 -1
  174. package/dist/esm/core/logger.d.ts +0 -97
  175. package/dist/esm/core/logger.js +0 -182
  176. package/dist/esm/core/logger.js.map +0 -1
  177. package/dist/esm/formatters/ascii.d.ts +0 -52
  178. package/dist/esm/formatters/ascii.js +0 -100
  179. package/dist/esm/formatters/ascii.js.map +0 -1
  180. package/dist/esm/formatters/cli.d.ts +0 -50
  181. package/dist/esm/formatters/cli.js +0 -96
  182. package/dist/esm/formatters/cli.js.map +0 -1
  183. package/dist/esm/formatters/index.d.ts +0 -3
  184. package/dist/esm/formatters/index.js +0 -4
  185. package/dist/esm/formatters/index.js.map +0 -1
  186. package/dist/esm/formatters/json.d.ts +0 -45
  187. package/dist/esm/formatters/json.js +0 -85
  188. package/dist/esm/formatters/json.js.map +0 -1
  189. package/dist/esm/trackers/execution.d.ts +0 -101
  190. package/dist/esm/trackers/execution.js +0 -226
  191. package/dist/esm/trackers/execution.js.map +0 -1
  192. package/dist/esm/trackers/index.d.ts +0 -2
  193. package/dist/esm/trackers/index.js +0 -3
  194. package/dist/esm/trackers/index.js.map +0 -1
  195. package/dist/esm/trackers/performance.d.ts +0 -68
  196. package/dist/esm/trackers/performance.js +0 -112
  197. package/dist/esm/trackers/performance.js.map +0 -1
  198. package/dist/esm/types/config.d.ts +0 -142
  199. package/dist/esm/types/config.js +0 -2
  200. package/dist/esm/types/config.js.map +0 -1
  201. package/dist/esm/types/logger.d.ts +0 -147
  202. package/dist/esm/types/logger.js +0 -2
  203. package/dist/esm/types/logger.js.map +0 -1
  204. package/dist/esm/utils/colors.d.ts +0 -87
  205. package/dist/esm/utils/colors.js +0 -146
  206. package/dist/esm/utils/colors.js.map +0 -1
  207. package/dist/esm/utils/index.d.ts +0 -3
  208. package/dist/esm/utils/index.js +0 -4
  209. package/dist/esm/utils/index.js.map +0 -1
  210. package/dist/esm/utils/proxy-tracker.d.ts +0 -68
  211. package/dist/esm/utils/proxy-tracker.js +0 -127
  212. package/dist/esm/utils/proxy-tracker.js.map +0 -1
  213. package/dist/esm/utils/stack.d.ts +0 -63
  214. package/dist/esm/utils/stack.js +0 -110
  215. package/dist/esm/utils/stack.js.map +0 -1
  216. package/dist/esm/utils/string.d.ts +0 -29
  217. package/dist/esm/utils/string.js +0 -45
  218. package/dist/esm/utils/string.js.map +0 -1
  219. package/dist/esm/utils/timing.d.ts +0 -65
  220. package/dist/esm/utils/timing.js +0 -99
  221. package/dist/esm/utils/timing.js.map +0 -1
  222. package/dist/formatters/ascii.d.ts +0 -52
  223. package/dist/formatters/ascii.js +0 -104
  224. package/dist/formatters/ascii.js.map +0 -1
  225. package/dist/formatters/cli.d.ts +0 -50
  226. package/dist/formatters/cli.js +0 -100
  227. package/dist/formatters/cli.js.map +0 -1
  228. package/dist/formatters/index.d.ts +0 -3
  229. package/dist/formatters/index.js +0 -20
  230. package/dist/formatters/index.js.map +0 -1
  231. package/dist/formatters/json.d.ts +0 -45
  232. package/dist/formatters/json.js +0 -89
  233. package/dist/formatters/json.js.map +0 -1
  234. package/dist/trackers/execution.d.ts +0 -101
  235. package/dist/trackers/execution.js +0 -230
  236. package/dist/trackers/execution.js.map +0 -1
  237. package/dist/trackers/index.d.ts +0 -2
  238. package/dist/trackers/index.js +0 -19
  239. package/dist/trackers/index.js.map +0 -1
  240. package/dist/trackers/performance.d.ts +0 -68
  241. package/dist/trackers/performance.js +0 -116
  242. package/dist/trackers/performance.js.map +0 -1
  243. package/dist/types/config.d.ts +0 -142
  244. package/dist/types/config.js.map +0 -1
  245. package/dist/types/logger.d.ts +0 -147
  246. package/dist/types/logger.js +0 -3
  247. package/dist/types/logger.js.map +0 -1
  248. package/dist/types.d.ts +0 -65
  249. package/dist/types.js +0 -6
  250. package/dist/types.js.map +0 -1
  251. package/dist/utils/colors.d.ts +0 -87
  252. package/dist/utils/colors.js +0 -160
  253. package/dist/utils/colors.js.map +0 -1
  254. package/dist/utils/index.d.ts +0 -3
  255. package/dist/utils/index.js +0 -20
  256. package/dist/utils/index.js.map +0 -1
  257. package/dist/utils/proxy-tracker.d.ts +0 -68
  258. package/dist/utils/proxy-tracker.js +0 -131
  259. package/dist/utils/proxy-tracker.js.map +0 -1
  260. package/dist/utils/stack.d.ts +0 -63
  261. package/dist/utils/stack.js +0 -116
  262. package/dist/utils/stack.js.map +0 -1
  263. package/dist/utils/string.d.ts +0 -29
  264. package/dist/utils/string.js +0 -50
  265. package/dist/utils/string.js.map +0 -1
  266. package/dist/utils/timing.d.ts +0 -65
  267. package/dist/utils/timing.js +0 -106
  268. package/dist/utils/timing.js.map +0 -1
@@ -1,112 +0,0 @@
1
- import { DEFAULT_CONFIG, LOG_LEVEL_PRIORITY, MODE_MIN_LEVELS } from './constants';
2
- /**
3
- * Configuration manager for the logger
4
- * Handles merging user config with defaults and provides utility methods
5
- */
6
- export class ConfigManager {
7
- /**
8
- * Create a new ConfigManager instance
9
- *
10
- * @param userConfig - User-provided configuration options
11
- */
12
- constructor(userConfig = {}) {
13
- this._config = { ...DEFAULT_CONFIG, ...userConfig };
14
- }
15
- /**
16
- * Get the current configuration
17
- *
18
- * @returns The current configuration
19
- */
20
- getConfig() {
21
- return { ...this._config };
22
- }
23
- /**
24
- * Update the configuration
25
- *
26
- * @param newConfig - New configuration options to merge
27
- */
28
- updateConfig(newConfig) {
29
- this._config = { ...this._config, ...newConfig };
30
- }
31
- /**
32
- * Get the current mode
33
- *
34
- * @returns The current mode
35
- */
36
- getMode() {
37
- var _a;
38
- return (_a = this._config.mode) !== null && _a !== void 0 ? _a : DEFAULT_CONFIG.mode;
39
- }
40
- /**
41
- * Set the current mode
42
- *
43
- * @param mode - The mode to set
44
- */
45
- setMode(mode) {
46
- this._config.mode = mode;
47
- }
48
- /**
49
- * Check if a log level should be displayed based on the current mode and level
50
- *
51
- * @param level - The log level to check
52
- * @returns Whether the log level should be displayed
53
- */
54
- shouldLog(level) {
55
- var _a;
56
- const currentMode = this.getMode();
57
- const configLevel = (_a = this._config.level) !== null && _a !== void 0 ? _a : DEFAULT_CONFIG.level;
58
- // Get the minimum level for the current mode
59
- const modeMinLevel = MODE_MIN_LEVELS[currentMode] || 'info';
60
- // Use the higher of the mode's minimum level and the configured level
61
- const effectiveMinLevel = this.getHigherPriorityLevel(modeMinLevel, configLevel);
62
- // Check if the provided level meets the minimum threshold
63
- return LOG_LEVEL_PRIORITY[level] >= LOG_LEVEL_PRIORITY[effectiveMinLevel];
64
- }
65
- /**
66
- * Get the higher priority level between two log levels
67
- *
68
- * @param levelA - First log level
69
- * @param levelB - Second log level
70
- * @returns The higher priority level
71
- */
72
- getHigherPriorityLevel(levelA, levelB) {
73
- return LOG_LEVEL_PRIORITY[levelA] >= LOG_LEVEL_PRIORITY[levelB] ? levelA : levelB;
74
- }
75
- /**
76
- * Get the performance threshold
77
- *
78
- * @returns The performance threshold in milliseconds
79
- */
80
- getPerformanceThreshold() {
81
- var _a;
82
- return (_a = this._config.performanceThreshold) !== null && _a !== void 0 ? _a : DEFAULT_CONFIG.performanceThreshold;
83
- }
84
- /**
85
- * Get the indentation size
86
- *
87
- * @returns The number of spaces for each indentation level
88
- */
89
- getIndentSize() {
90
- var _a;
91
- return (_a = this._config.indentSize) !== null && _a !== void 0 ? _a : DEFAULT_CONFIG.indentSize;
92
- }
93
- /**
94
- * Check if colorization is enabled
95
- *
96
- * @returns Whether colorization is enabled
97
- */
98
- isColorEnabled() {
99
- var _a;
100
- return (_a = this._config.colorize) !== null && _a !== void 0 ? _a : DEFAULT_CONFIG.colorize;
101
- }
102
- /**
103
- * Check if timestamps are enabled
104
- *
105
- * @returns Whether timestamps are enabled
106
- */
107
- isTimestampEnabled() {
108
- var _a;
109
- return (_a = this._config.timestamp) !== null && _a !== void 0 ? _a : DEFAULT_CONFIG.timestamp;
110
- }
111
- }
112
- //# sourceMappingURL=config.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/core/config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAElF;;;GAGG;AACH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,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;IACpF,CAAC;IAED;;;;OAIG;IACI,uBAAuB;;QAC5B,OAAO,MAAA,IAAI,CAAC,OAAO,CAAC,oBAAoB,mCAAI,cAAc,CAAC,oBAA8B,CAAC;IAC5F,CAAC;IAED;;;;OAIG;IACI,aAAa;;QAClB,OAAO,MAAA,IAAI,CAAC,OAAO,CAAC,UAAU,mCAAI,cAAc,CAAC,UAAoB,CAAC;IACxE,CAAC;IAED;;;;OAIG;IACI,cAAc;;QACnB,OAAO,MAAA,IAAI,CAAC,OAAO,CAAC,QAAQ,mCAAI,cAAc,CAAC,QAAmB,CAAC;IACrE,CAAC;IAED;;;;OAIG;IACI,kBAAkB;;QACvB,OAAO,MAAA,IAAI,CAAC,OAAO,CAAC,SAAS,mCAAI,cAAc,CAAC,SAAoB,CAAC;IACvE,CAAC;CACF"}
@@ -1,78 +0,0 @@
1
- import { LogLevel, LogMode, ILoggerConfig } from '../types';
2
- /**
3
- * Default configuration for the logger
4
- */
5
- export declare const DEFAULT_CONFIG: ILoggerConfig;
6
- /**
7
- * Log level priorities (higher number = higher priority)
8
- */
9
- export declare const LOG_LEVEL_PRIORITY: Record<LogLevel, number>;
10
- /**
11
- * Minimum log level for each mode
12
- */
13
- export declare const MODE_MIN_LEVELS: Record<LogMode, LogLevel>;
14
- /**
15
- * ANSI color codes for terminal output
16
- */
17
- export declare const COLORS: {
18
- reset: string;
19
- bright: string;
20
- dim: string;
21
- underscore: string;
22
- fg: {
23
- black: string;
24
- red: string;
25
- green: string;
26
- yellow: string;
27
- blue: string;
28
- magenta: string;
29
- cyan: string;
30
- white: string;
31
- gray: string;
32
- };
33
- bg: {
34
- black: string;
35
- red: string;
36
- green: string;
37
- yellow: string;
38
- blue: string;
39
- magenta: string;
40
- cyan: string;
41
- white: string;
42
- };
43
- };
44
- /**
45
- * Log level colors
46
- */
47
- export declare const LEVEL_COLORS: Record<LogLevel, string>;
48
- /**
49
- * Log level icons
50
- */
51
- export declare const LEVEL_ICONS: Record<LogLevel, string>;
52
- /**
53
- * Box drawing characters for ASCII flow charts
54
- */
55
- export declare const BOX_CHARS: {
56
- topLeft: string;
57
- topRight: string;
58
- bottomLeft: string;
59
- bottomRight: string;
60
- horizontal: string;
61
- vertical: string;
62
- verticalRight: string;
63
- verticalLeft: string;
64
- horizontalDown: string;
65
- horizontalUp: string;
66
- cross: string;
67
- downArrow: string;
68
- };
69
- /**
70
- * Performance icons
71
- */
72
- export declare const PERFORMANCE_ICONS: {
73
- timer: string;
74
- slow: string;
75
- memory: string;
76
- bottleneck: string;
77
- fix: string;
78
- };
@@ -1,106 +0,0 @@
1
- /**
2
- * Default configuration for the logger
3
- */
4
- export const DEFAULT_CONFIG = {
5
- mode: 'dev',
6
- level: 'debug',
7
- colorize: true,
8
- timestamp: true,
9
- performanceThreshold: 100, // ms
10
- indentSize: 2,
11
- };
12
- /**
13
- * Log level priorities (higher number = higher priority)
14
- */
15
- export const LOG_LEVEL_PRIORITY = {
16
- debug: 0,
17
- info: 1,
18
- warn: 2,
19
- error: 3,
20
- };
21
- /**
22
- * Minimum log level for each mode
23
- */
24
- export const MODE_MIN_LEVELS = {
25
- dev: 'debug', // In dev mode, show all logs
26
- staging: 'warn', // In staging, show only warnings and errors
27
- prod: 'error', // In prod, show only errors
28
- };
29
- /**
30
- * ANSI color codes for terminal output
31
- */
32
- export const COLORS = {
33
- reset: '\x1b[0m',
34
- bright: '\x1b[1m',
35
- dim: '\x1b[2m',
36
- underscore: '\x1b[4m',
37
- // Foreground colors
38
- fg: {
39
- black: '\x1b[30m',
40
- red: '\x1b[31m',
41
- green: '\x1b[32m',
42
- yellow: '\x1b[33m',
43
- blue: '\x1b[34m',
44
- magenta: '\x1b[35m',
45
- cyan: '\x1b[36m',
46
- white: '\x1b[37m',
47
- gray: '\x1b[90m',
48
- },
49
- // Background colors
50
- bg: {
51
- black: '\x1b[40m',
52
- red: '\x1b[41m',
53
- green: '\x1b[42m',
54
- yellow: '\x1b[43m',
55
- blue: '\x1b[44m',
56
- magenta: '\x1b[45m',
57
- cyan: '\x1b[46m',
58
- white: '\x1b[47m',
59
- },
60
- };
61
- /**
62
- * Log level colors
63
- */
64
- export const LEVEL_COLORS = {
65
- debug: COLORS.fg.gray,
66
- info: COLORS.fg.blue,
67
- warn: COLORS.fg.yellow,
68
- error: COLORS.fg.red,
69
- };
70
- /**
71
- * Log level icons
72
- */
73
- export const LEVEL_ICONS = {
74
- debug: '🔍',
75
- info: 'ℹ️',
76
- warn: '⚠️',
77
- error: '❌',
78
- };
79
- /**
80
- * Box drawing characters for ASCII flow charts
81
- */
82
- export const BOX_CHARS = {
83
- topLeft: '┌',
84
- topRight: '┐',
85
- bottomLeft: '└',
86
- bottomRight: '┘',
87
- horizontal: '─',
88
- vertical: '│',
89
- verticalRight: '├',
90
- verticalLeft: '┤',
91
- horizontalDown: '┬',
92
- horizontalUp: '┴',
93
- cross: '┼',
94
- downArrow: '▼',
95
- };
96
- /**
97
- * Performance icons
98
- */
99
- export const PERFORMANCE_ICONS = {
100
- timer: '⏱',
101
- slow: '⚠️',
102
- memory: '📊',
103
- bottleneck: '🛑',
104
- fix: '🛠',
105
- };
106
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/core/constants.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAkB;IAC3C,IAAI,EAAE,KAAK;IACX,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,IAAI;IACd,SAAS,EAAE,IAAI;IACf,oBAAoB,EAAE,GAAG,EAAE,KAAK;IAChC,UAAU,EAAE,CAAC;CACd,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAA6B;IAC1D,KAAK,EAAE,CAAC;IACR,IAAI,EAAE,CAAC;IACP,IAAI,EAAE,CAAC;IACP,KAAK,EAAE,CAAC;CACT,CAAC;AAEF;;GAEG;AACH,M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MAAM,SAAS,GAAG;IACvB,OAAO,EAAE,GAAG;IACZ,QAAQ,EAAE,GAAG;IACb,UAAU,EAAE,GAAG;IACf,WAAW,EAAE,GAAG;IAChB,UAAU,EAAE,GAAG;IACf,QAAQ,EAAE,GAAG;IACb,aAAa,EAAE,GAAG;IAClB,YAAY,EAAE,GAAG;IACjB,cAAc,EAAE,GAAG;IACnB,YAAY,EAAE,GAAG;IACjB,KAAK,EAAE,GAAG;IACV,SAAS,EAAE,GAAG;CACf,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,KAAK,EAAE,GAAG;IACV,IAAI,EAAE,IAAI;IACV,MAAM,EAAE,IAAI;IACZ,UAAU,EAAE,IAAI;IAChB,GAAG,EAAE,IAAI;CACV,CAAC"}
@@ -1,97 +0,0 @@
1
- import { ILogger, ILoggerConfig, LogMode, ITrackOptions } from '../types';
2
- /**
3
- * Main logger class that implements the ILogger interface
4
- */
5
- export declare class Logger implements ILogger {
6
- private _config;
7
- private _executionTracker;
8
- private _performanceMonitor;
9
- private _indentLevel;
10
- private _transports;
11
- private _formatters;
12
- /**
13
- * Create a new Logger instance
14
- *
15
- * @param config - Logger configuration
16
- */
17
- constructor(config?: Partial<ILoggerConfig>);
18
- /**
19
- * Log an informational message
20
- *
21
- * @param message - The message to log
22
- * @param args - Additional arguments to include in the log
23
- */
24
- info(message: string | object, ...args: any[]): void;
25
- /**
26
- * Log a warning message
27
- *
28
- * @param message - The message to log
29
- * @param args - Additional arguments to include in the log
30
- */
31
- warn(message: string | object, ...args: any[]): void;
32
- /**
33
- * Log an error message
34
- *
35
- * @param message - The message to log
36
- * @param args - Additional arguments to include in the log
37
- */
38
- error(message: string | object, ...args: any[]): void;
39
- /**
40
- * Log a debug message
41
- *
42
- * @param message - The message to log
43
- * @param args - Additional arguments to include in the log
44
- */
45
- debug(message: string | object, ...args: any[]): void;
46
- /**
47
- * Start a new log group with the given label
48
- *
49
- * @param label - The label for the group
50
- */
51
- group(label: string): void;
52
- /**
53
- * End the current log group
54
- */
55
- groupEnd(): void;
56
- /**
57
- * Set the operational mode for the logger
58
- *
59
- * @param mode - The mode to set
60
- */
61
- setMode(mode: LogMode): void;
62
- /**
63
- * Get the current operational mode
64
- *
65
- * @returns The current mode
66
- */
67
- getMode(): LogMode;
68
- /**
69
- * Track the execution of a function
70
- *
71
- * @param fn - The function to track
72
- * @param options - Options for tracking
73
- * @returns The return value of the tracked function
74
- */
75
- track<T>(fn: () => T, options?: ITrackOptions): T;
76
- /**
77
- * Create a trackable version of a function
78
- *
79
- * This is a helper method to create a tracked version of a function
80
- * that can be used for nested function tracking.
81
- *
82
- * @param fn - The function to make trackable
83
- * @param options - Options for tracking
84
- * @returns A tracked version of the function
85
- */
86
- createTrackable<T extends (...args: any[]) => any>(fn: T, options?: Omit<ITrackOptions, 'label'> & {
87
- label?: string;
88
- }): (...args: Parameters<T>) => ReturnType<T>;
89
- /**
90
- * Internal method to log a message
91
- *
92
- * @param level - The log level
93
- * @param message - The message to log
94
- * @param args - Additional arguments
95
- */
96
- private log;
97
- }
@@ -1,182 +0,0 @@
1
- import { ConfigManager } from './config';
2
- import { ExecutionTracker } from '../trackers/execution';
3
- import { PerformanceMonitor } from '../trackers/performance';
4
- import { CliFormatter } from '../formatters/cli';
5
- /**
6
- * Console transport for outputting logs to the console
7
- */
8
- class ConsoleTransport {
9
- /**
10
- * Write a log entry to the console
11
- *
12
- * @param entry - The formatted log entry
13
- */
14
- write(entry) {
15
- console.log(entry);
16
- }
17
- }
18
- /**
19
- * Main logger class that implements the ILogger interface
20
- */
21
- export class Logger {
22
- /**
23
- * Create a new Logger instance
24
- *
25
- * @param config - Logger configuration
26
- */
27
- constructor(config = {}) {
28
- this._indentLevel = 0;
29
- this._config = new ConfigManager(config);
30
- // Set up trackers
31
- this._executionTracker = new ExecutionTracker({
32
- defaultThreshold: this._config.getPerformanceThreshold(),
33
- });
34
- this._performanceMonitor = new PerformanceMonitor({
35
- defaultThreshold: this._config.getPerformanceThreshold(),
36
- });
37
- // Set up transports
38
- this._transports = config.transports || [new ConsoleTransport()];
39
- // Set up formatters
40
- this._formatters = config.formatters || [
41
- new CliFormatter({
42
- colorEnabled: this._config.isColorEnabled(),
43
- indentSize: this._config.getIndentSize(),
44
- }),
45
- ];
46
- }
47
- /**
48
- * Log an informational message
49
- *
50
- * @param message - The message to log
51
- * @param args - Additional arguments to include in the log
52
- */
53
- info(message, ...args) {
54
- this.log('info', message, args);
55
- }
56
- /**
57
- * Log a warning message
58
- *
59
- * @param message - The message to log
60
- * @param args - Additional arguments to include in the log
61
- */
62
- warn(message, ...args) {
63
- this.log('warn', message, args);
64
- }
65
- /**
66
- * Log an error message
67
- *
68
- * @param message - The message to log
69
- * @param args - Additional arguments to include in the log
70
- */
71
- error(message, ...args) {
72
- this.log('error', message, args);
73
- }
74
- /**
75
- * Log a debug message
76
- *
77
- * @param message - The message to log
78
- * @param args - Additional arguments to include in the log
79
- */
80
- debug(message, ...args) {
81
- // Skip debug logs in production mode
82
- if (this.getMode() === 'prod') {
83
- return;
84
- }
85
- this.log('debug', message, args);
86
- }
87
- /**
88
- * Start a new log group with the given label
89
- *
90
- * @param label - The label for the group
91
- */
92
- group(label) {
93
- this.info(label);
94
- this._indentLevel++;
95
- }
96
- /**
97
- * End the current log group
98
- */
99
- groupEnd() {
100
- if (this._indentLevel > 0) {
101
- this._indentLevel--;
102
- }
103
- }
104
- /**
105
- * Set the operational mode for the logger
106
- *
107
- * @param mode - The mode to set
108
- */
109
- setMode(mode) {
110
- this._config.setMode(mode);
111
- }
112
- /**
113
- * Get the current operational mode
114
- *
115
- * @returns The current mode
116
- */
117
- getMode() {
118
- return this._config.getMode();
119
- }
120
- /**
121
- * Track the execution of a function
122
- *
123
- * @param fn - The function to track
124
- * @param options - Options for tracking
125
- * @returns The return value of the tracked function
126
- */
127
- track(fn, options) {
128
- var _a;
129
- const silent = (_a = options === null || options === void 0 ? void 0 : options.silent) !== null && _a !== void 0 ? _a : false;
130
- // Track the function execution
131
- const result = this._executionTracker.track(fn, options);
132
- // Log the execution flow if not silent
133
- if (!silent) {
134
- const flowChart = this._executionTracker.generateFlowChart();
135
- // Log the flow chart directly to console to preserve ASCII art
136
- // Skip formatters to avoid messing up the ASCII art
137
- console.log(flowChart);
138
- }
139
- return result;
140
- }
141
- /**
142
- * Create a trackable version of a function
143
- *
144
- * This is a helper method to create a tracked version of a function
145
- * that can be used for nested function tracking.
146
- *
147
- * @param fn - The function to make trackable
148
- * @param options - Options for tracking
149
- * @returns A tracked version of the function
150
- */
151
- createTrackable(fn, options) {
152
- return this._executionTracker.createTrackable(fn, options);
153
- }
154
- /**
155
- * Internal method to log a message
156
- *
157
- * @param level - The log level
158
- * @param message - The message to log
159
- * @param args - Additional arguments
160
- */
161
- log(level, message, args) {
162
- // Check if this log level should be displayed
163
- if (!this._config.shouldLog(level)) {
164
- return;
165
- }
166
- // Create metadata for the log entry
167
- const meta = {
168
- timestamp: new Date(),
169
- level,
170
- indentLevel: this._indentLevel,
171
- };
172
- // Format the log entry using each formatter
173
- for (const formatter of this._formatters) {
174
- const formattedEntry = formatter.format(level, message, args, meta);
175
- // Send to each transport
176
- for (const transport of this._transports) {
177
- transport.write(formattedEntry);
178
- }
179
- }
180
- }
181
- }
182
- //# sourceMappingURL=logger.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../src/core/logger.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD;;GAEG;AACH,MAAM,gBAAgB;IACpB;;;;OAIG;IACI,KAAK,CAAC,KAAa;QACxB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACrB,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;;OASG;IACI,eAAe,CACpB,EAAK,EACL,OAA2D;QAE3D,OAAO,IAAI,CAAC,iBAAiB,CAAC,eAAe,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;IAED;;;;;;OAMG;IACK,GAAG,CAAC,KAAe,EAAE,OAAwB,EAAE,IAAW;QAChE,8CAA8C;QAC9C,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC;YACnC,OAAO;QACT,CAAC;QAED,oCAAoC;QACpC,MAAM,IAAI,GAAY;YACpB,SAAS,EAAE,IAAI,IAAI,EAAE;YACrB,KAAK;YACL,WAAW,EAAE,IAAI,CAAC,YAAY;SAC/B,CAAC;QAEF,4CAA4C;QAC5C,KAAK,MAAM,SAAS,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YACzC,MAAM,cAAc,GAAG,SAAS,CAAC,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;YAEpE,yBAAyB;YACzB,KAAK,MAAM,SAAS,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;gBACzC,SAAS,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;YAClC,CAAC;QACH,CAAC;IACH,CAAC;CACF"}
@@ -1,52 +0,0 @@
1
- /**
2
- * Execution data for a function call
3
- */
4
- export interface ExecutionData {
5
- name: string;
6
- duration: number;
7
- isSlow: boolean;
8
- memoryUsage?: number;
9
- level: number;
10
- }
11
- /**
12
- * ASCII art generator for execution flow charts
13
- */
14
- export declare class AsciiArtGenerator {
15
- private _boxWidth;
16
- /**
17
- * Create a new AsciiArtGenerator instance
18
- *
19
- * @param options - Generator options
20
- */
21
- constructor(options?: {
22
- boxWidth?: number;
23
- });
24
- /**
25
- * Generate a flow chart for a sequence of function executions
26
- *
27
- * @param executions - Array of execution data
28
- * @returns ASCII art flow chart
29
- */
30
- generateFlowChart(executions: ExecutionData[]): string;
31
- /**
32
- * Generate a box for a function execution
33
- *
34
- * @param execution - The execution data
35
- * @returns ASCII art box
36
- */
37
- private generateFunctionBox;
38
- /**
39
- * Generate an arrow between function boxes
40
- *
41
- * @param levelDiff - Difference in nesting level
42
- * @returns ASCII art arrow
43
- */
44
- private generateArrow;
45
- /**
46
- * Format memory usage in a human-readable format
47
- *
48
- * @param bytes - Memory usage in bytes
49
- * @returns Formatted memory usage
50
- */
51
- private formatMemory;
52
- }