@mks2508/better-logger 0.14.0-alpha.2 → 0.18.2-alpha.1

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 (454) hide show
  1. package/README.md +289 -185
  2. package/dist/Logger.d.ts +576 -205
  3. package/dist/Logger.d.ts.map +1 -1
  4. package/dist/ScopedLogger.d.ts +48 -292
  5. package/dist/ScopedLogger.d.ts.map +1 -1
  6. package/dist/chunks/HookBridge-CiRfR67f.cjs +190 -0
  7. package/dist/chunks/HookBridge-CiRfR67f.cjs.map +1 -0
  8. package/dist/chunks/HookBridge-SgMmbXZB.js +173 -0
  9. package/dist/chunks/HookBridge-SgMmbXZB.js.map +1 -0
  10. package/dist/chunks/LogContext-Cwn-1Zzb.js +85 -0
  11. package/dist/chunks/LogContext-Cwn-1Zzb.js.map +1 -0
  12. package/dist/chunks/LogContext-L7HzynFw.cjs +90 -0
  13. package/dist/chunks/LogContext-L7HzynFw.cjs.map +1 -0
  14. package/dist/chunks/SerializerBridge-BaOQOb8q.cjs +166 -0
  15. package/dist/chunks/SerializerBridge-BaOQOb8q.cjs.map +1 -0
  16. package/dist/chunks/SerializerBridge-BkpQu5c9.js +149 -0
  17. package/dist/chunks/SerializerBridge-BkpQu5c9.js.map +1 -0
  18. package/dist/chunks/StyleManager-CIpd6wbO.cjs +92 -0
  19. package/dist/chunks/StyleManager-CIpd6wbO.cjs.map +1 -0
  20. package/dist/chunks/StyleManager-LCvVlVdx.js +87 -0
  21. package/dist/chunks/StyleManager-LCvVlVdx.js.map +1 -0
  22. package/dist/chunks/core-Dzz7agGa.cjs +39 -0
  23. package/dist/chunks/core-Dzz7agGa.cjs.map +1 -0
  24. package/dist/chunks/core-PoT7RrTK.js +34 -0
  25. package/dist/chunks/core-PoT7RrTK.js.map +1 -0
  26. package/dist/chunks/environment-detector-CI3TrWK_.js +110 -0
  27. package/dist/chunks/environment-detector-CI3TrWK_.js.map +1 -0
  28. package/dist/chunks/environment-detector-Cnn6wr6O.cjs +163 -0
  29. package/dist/chunks/environment-detector-Cnn6wr6O.cjs.map +1 -0
  30. package/dist/chunks/server-fallback-BUKjdLS7.cjs +42 -0
  31. package/dist/chunks/server-fallback-BUKjdLS7.cjs.map +1 -0
  32. package/dist/chunks/server-fallback-BsuWH1Dk.js +37 -0
  33. package/dist/chunks/server-fallback-BsuWH1Dk.js.map +1 -0
  34. package/dist/chunks/spinner-D3FsF78o.js +700 -0
  35. package/dist/chunks/spinner-D3FsF78o.js.map +1 -0
  36. package/dist/chunks/spinner-DNvxbM9a.cjs +747 -0
  37. package/dist/chunks/spinner-DNvxbM9a.cjs.map +1 -0
  38. package/dist/chunks/styling-84N8T97t.js +941 -0
  39. package/dist/chunks/styling-84N8T97t.js.map +1 -0
  40. package/dist/chunks/styling-Cg5saQ46.cjs +994 -0
  41. package/dist/chunks/styling-Cg5saQ46.cjs.map +1 -0
  42. package/dist/chunks/transports-BiDk345e.js +715 -0
  43. package/dist/chunks/transports-BiDk345e.js.map +1 -0
  44. package/dist/chunks/transports-COPWmlF1.cjs +756 -0
  45. package/dist/chunks/transports-COPWmlF1.cjs.map +1 -0
  46. package/dist/chunks/utils-BqlFYocD.cjs +698 -0
  47. package/dist/chunks/utils-BqlFYocD.cjs.map +1 -0
  48. package/dist/chunks/utils-VETbVpkR.js +579 -0
  49. package/dist/chunks/utils-VETbVpkR.js.map +1 -0
  50. package/dist/cli/commands/ExportCommand.d.ts +8 -26
  51. package/dist/cli/commands/ExportCommand.d.ts.map +1 -1
  52. package/dist/cli/index.d.ts +1 -2
  53. package/dist/cli/index.d.ts.map +1 -1
  54. package/dist/cli-module.d.ts +13 -0
  55. package/dist/cli-module.d.ts.map +1 -0
  56. package/dist/cli.cjs +11 -0
  57. package/dist/cli.js +3 -0
  58. package/dist/constants.d.ts +16 -47
  59. package/dist/constants.d.ts.map +1 -1
  60. package/dist/context/LogContext.d.ts +146 -0
  61. package/dist/context/LogContext.d.ts.map +1 -0
  62. package/dist/context/index.d.ts +6 -0
  63. package/dist/context/index.d.ts.map +1 -0
  64. package/dist/context-module.d.ts +6 -0
  65. package/dist/context-module.d.ts.map +1 -0
  66. package/dist/context.cjs +3 -0
  67. package/dist/context.js +2 -0
  68. package/dist/core.cjs +281 -2
  69. package/dist/core.cjs.map +1 -1
  70. package/dist/core.d.ts +6 -7
  71. package/dist/core.d.ts.map +1 -1
  72. package/dist/core.js +258 -314
  73. package/dist/core.js.map +1 -1
  74. package/dist/example.d.ts.map +1 -1
  75. package/dist/hooks/HookBridge.d.ts +26 -0
  76. package/dist/hooks/HookBridge.d.ts.map +1 -0
  77. package/dist/hooks/HookManager.d.ts +26 -0
  78. package/dist/hooks/HookManager.d.ts.map +1 -0
  79. package/dist/hooks/index.d.ts +7 -0
  80. package/dist/hooks/index.d.ts.map +1 -0
  81. package/dist/hooks-module.d.ts +7 -0
  82. package/dist/hooks-module.d.ts.map +1 -0
  83. package/dist/hooks.cjs +5 -0
  84. package/dist/hooks.js +2 -0
  85. package/dist/index.cjs +2522 -2
  86. package/dist/index.cjs.map +1 -1
  87. package/dist/index.d.ts +42 -130
  88. package/dist/index.d.ts.map +1 -1
  89. package/dist/index.js +2447 -158
  90. package/dist/index.js.map +1 -1
  91. package/dist/node-module.d.ts +10 -0
  92. package/dist/node-module.d.ts.map +1 -0
  93. package/dist/node.cjs +13 -0
  94. package/dist/node.cjs.map +1 -0
  95. package/dist/node.js +12 -0
  96. package/dist/node.js.map +1 -0
  97. package/dist/playground/TerminalBridge.d.ts +46 -0
  98. package/dist/playground/TerminalBridge.d.ts.map +1 -0
  99. package/dist/playground/box.d.ts +14 -0
  100. package/dist/playground/box.d.ts.map +1 -0
  101. package/dist/playground/cli-table.d.ts +14 -0
  102. package/dist/playground/cli-table.d.ts.map +1 -0
  103. package/dist/playground/divider.d.ts +10 -0
  104. package/dist/playground/divider.d.ts.map +1 -0
  105. package/dist/playground/header.d.ts +11 -0
  106. package/dist/playground/header.d.ts.map +1 -0
  107. package/dist/playground/index.d.ts +11 -0
  108. package/dist/playground/index.d.ts.map +1 -0
  109. package/dist/playground/server-fallback.d.ts +27 -0
  110. package/dist/playground/server-fallback.d.ts.map +1 -0
  111. package/dist/playground/spinner.d.ts +48 -0
  112. package/dist/playground/spinner.d.ts.map +1 -0
  113. package/dist/playground/step.d.ts +14 -0
  114. package/dist/playground/step.d.ts.map +1 -0
  115. package/dist/playground-module.d.ts +11 -0
  116. package/dist/playground-module.d.ts.map +1 -0
  117. package/dist/playground.cjs +9 -0
  118. package/dist/playground.js +2 -0
  119. package/dist/serializers/SerializerBridge.d.ts +21 -0
  120. package/dist/serializers/SerializerBridge.d.ts.map +1 -0
  121. package/dist/serializers/SerializerRegistry.d.ts +16 -0
  122. package/dist/serializers/SerializerRegistry.d.ts.map +1 -0
  123. package/dist/serializers/index.d.ts +7 -0
  124. package/dist/serializers/index.d.ts.map +1 -0
  125. package/dist/serializers-module.d.ts +7 -0
  126. package/dist/serializers-module.d.ts.map +1 -0
  127. package/dist/serializers.cjs +5 -0
  128. package/dist/serializers.js +2 -0
  129. package/dist/styles/StyleManager.d.ts +83 -0
  130. package/dist/styles/StyleManager.d.ts.map +1 -0
  131. package/dist/styles/index.d.ts +7 -0
  132. package/dist/styles/index.d.ts.map +1 -0
  133. package/dist/styles-module.d.ts +7 -0
  134. package/dist/styles-module.d.ts.map +1 -0
  135. package/dist/styles.cjs +7 -0
  136. package/dist/styles.js +3 -0
  137. package/dist/styling/banners.d.ts +6 -2
  138. package/dist/styling/banners.d.ts.map +1 -1
  139. package/dist/styling/index.d.ts +8 -3
  140. package/dist/styling/index.d.ts.map +1 -1
  141. package/dist/terminal/color-converter.d.ts +73 -0
  142. package/dist/terminal/color-converter.d.ts.map +1 -0
  143. package/dist/terminal/formatter.d.ts +23 -0
  144. package/dist/terminal/formatter.d.ts.map +1 -0
  145. package/dist/transports/ConsoleTransport.d.ts +9 -0
  146. package/dist/transports/ConsoleTransport.d.ts.map +1 -0
  147. package/dist/transports/FileTransport.d.ts +56 -0
  148. package/dist/transports/FileTransport.d.ts.map +1 -0
  149. package/dist/transports/HttpTransport.d.ts +67 -0
  150. package/dist/transports/HttpTransport.d.ts.map +1 -0
  151. package/dist/transports/OtlpTransport.d.ts +148 -0
  152. package/dist/transports/OtlpTransport.d.ts.map +1 -0
  153. package/dist/transports/TransportBridge.d.ts +37 -0
  154. package/dist/transports/TransportBridge.d.ts.map +1 -0
  155. package/dist/transports/TransportManager.d.ts +36 -0
  156. package/dist/transports/TransportManager.d.ts.map +1 -0
  157. package/dist/transports/index.d.ts +6 -0
  158. package/dist/transports/index.d.ts.map +1 -0
  159. package/dist/transports-module.d.ts +10 -0
  160. package/dist/transports-module.d.ts.map +1 -0
  161. package/dist/transports.cjs +7 -0
  162. package/dist/transports.js +2 -0
  163. package/dist/types/core.d.ts +188 -6
  164. package/dist/types/core.d.ts.map +1 -1
  165. package/dist/types/handlers.d.ts +0 -67
  166. package/dist/types/handlers.d.ts.map +1 -1
  167. package/dist/types/hooks.d.ts +60 -0
  168. package/dist/types/hooks.d.ts.map +1 -0
  169. package/dist/types/index.d.ts +7 -3
  170. package/dist/types/index.d.ts.map +1 -1
  171. package/dist/types/serializers.d.ts +25 -0
  172. package/dist/types/serializers.d.ts.map +1 -0
  173. package/dist/types/transports.d.ts +127 -0
  174. package/dist/types/transports.d.ts.map +1 -0
  175. package/dist/utils/ansi-colors.d.ts +115 -0
  176. package/dist/utils/ansi-colors.d.ts.map +1 -0
  177. package/dist/utils/environment-detector.d.ts +53 -0
  178. package/dist/utils/environment-detector.d.ts.map +1 -0
  179. package/dist/utils/formatting.d.ts +1 -0
  180. package/dist/utils/formatting.d.ts.map +1 -1
  181. package/dist/utils/index.d.ts +3 -2
  182. package/dist/utils/index.d.ts.map +1 -1
  183. package/dist/utils/output.d.ts +8 -11
  184. package/dist/utils/output.d.ts.map +1 -1
  185. package/dist/utils/stackTrace.d.ts.map +1 -1
  186. package/dist/utils/timestamps.d.ts +0 -12
  187. package/dist/utils/timestamps.d.ts.map +1 -1
  188. package/package.json +96 -21
  189. package/.claude/settings.local.json +0 -39
  190. package/.github/workflows/ci-quality.yml +0 -357
  191. package/.github/workflows/docs-demo.yml +0 -119
  192. package/.github/workflows/releases-core.yml +0 -512
  193. package/.github/workflows/releases-full.yml +0 -582
  194. package/.github/workflows-backup/ci.yml +0 -221
  195. package/.github/workflows-backup/nightly.yml +0 -196
  196. package/.github/workflows-backup/release-optimized.yml +0 -373
  197. package/.github/workflows-backup/release.yml +0 -269
  198. package/.release-notes-0.2.0.md +0 -129
  199. package/.yamllint +0 -28
  200. package/CHANGELOG.json +0 -865
  201. package/CLAUDE.md +0 -204
  202. package/bun.lock +0 -323
  203. package/demo.html +0 -847
  204. package/dist/.tsbuildinfo +0 -1
  205. package/dist/Logger.js +0 -1124
  206. package/dist/ScopedLogger.js +0 -426
  207. package/dist/chunks/Logger-Crw1woqR.js +0 -3464
  208. package/dist/chunks/Logger-Crw1woqR.js.map +0 -1
  209. package/dist/chunks/Logger-D_p3xnbq.js +0 -2
  210. package/dist/chunks/Logger-D_p3xnbq.js.map +0 -1
  211. package/dist/chunks/RemoteLogHandler-CjWpWZGl.js +0 -33
  212. package/dist/chunks/RemoteLogHandler-CjWpWZGl.js.map +0 -1
  213. package/dist/chunks/RemoteLogHandler-ymkQ97xl.js +0 -2
  214. package/dist/chunks/RemoteLogHandler-ymkQ97xl.js.map +0 -1
  215. package/dist/chunks/environment-Bxbnw4pd.js +0 -544
  216. package/dist/chunks/environment-Bxbnw4pd.js.map +0 -1
  217. package/dist/chunks/environment-Dm66zOML.js +0 -4
  218. package/dist/chunks/environment-Dm66zOML.js.map +0 -1
  219. package/dist/chunks/formatting-C0riPC5_.js +0 -95
  220. package/dist/chunks/formatting-C0riPC5_.js.map +0 -1
  221. package/dist/chunks/formatting-DNCAV66-.js +0 -2
  222. package/dist/chunks/formatting-DNCAV66-.js.map +0 -1
  223. package/dist/cli/CommandProcessor.js +0 -184
  224. package/dist/cli/commands/ConfigCommand.js +0 -88
  225. package/dist/cli/commands/ExportCommand.js +0 -243
  226. package/dist/cli/commands/HistoryCommand.d.ts +0 -50
  227. package/dist/cli/commands/HistoryCommand.d.ts.map +0 -1
  228. package/dist/cli/commands/HistoryCommand.js +0 -96
  229. package/dist/cli/commands/StatusCommand.d.ts +0 -33
  230. package/dist/cli/commands/StatusCommand.d.ts.map +0 -1
  231. package/dist/cli/commands/StatusCommand.js +0 -93
  232. package/dist/cli/commands/ThemeCommand.js +0 -79
  233. package/dist/cli/help.js +0 -118
  234. package/dist/cli/index.js +0 -46
  235. package/dist/constants.js +0 -159
  236. package/dist/example.js +0 -154
  237. package/dist/exports-module.d.ts +0 -203
  238. package/dist/exports-module.d.ts.map +0 -1
  239. package/dist/exports-module.js +0 -260
  240. package/dist/exports.cjs +0 -2
  241. package/dist/exports.cjs.map +0 -1
  242. package/dist/exports.js +0 -238
  243. package/dist/exports.js.map +0 -1
  244. package/dist/handlers/AnalyticsLogHandler.d.ts +0 -11
  245. package/dist/handlers/AnalyticsLogHandler.d.ts.map +0 -1
  246. package/dist/handlers/AnalyticsLogHandler.js +0 -19
  247. package/dist/handlers/ExportLogHandler.d.ts +0 -103
  248. package/dist/handlers/ExportLogHandler.d.ts.map +0 -1
  249. package/dist/handlers/ExportLogHandler.js +0 -516
  250. package/dist/handlers/FileLogHandler.d.ts +0 -36
  251. package/dist/handlers/FileLogHandler.d.ts.map +0 -1
  252. package/dist/handlers/FileLogHandler.js +0 -156
  253. package/dist/handlers/RemoteLogHandler.d.ts +0 -14
  254. package/dist/handlers/RemoteLogHandler.d.ts.map +0 -1
  255. package/dist/handlers/RemoteLogHandler.js +0 -37
  256. package/dist/handlers/index.d.ts +0 -8
  257. package/dist/handlers/index.d.ts.map +0 -1
  258. package/dist/handlers/index.js +0 -7
  259. package/dist/main.js +0 -139
  260. package/dist/styling/LogStyleBuilder.d.ts +0 -149
  261. package/dist/styling/LogStyleBuilder.d.ts.map +0 -1
  262. package/dist/styling/LogStyleBuilder.js +0 -289
  263. package/dist/styling/SemanticStyles.d.ts +0 -181
  264. package/dist/styling/SemanticStyles.d.ts.map +0 -1
  265. package/dist/styling/SemanticStyles.js +0 -339
  266. package/dist/styling/SmartPresets.js +0 -276
  267. package/dist/styling/StyleBuilder.js +0 -280
  268. package/dist/styling/banners.js +0 -155
  269. package/dist/styling/index.js +0 -9
  270. package/dist/styling/themes.js +0 -231
  271. package/dist/styling-module.d.ts +0 -185
  272. package/dist/styling-module.d.ts.map +0 -1
  273. package/dist/styling-module.js +0 -199
  274. package/dist/styling.cjs +0 -2
  275. package/dist/styling.cjs.map +0 -1
  276. package/dist/styling.js +0 -146
  277. package/dist/styling.js.map +0 -1
  278. package/dist/types/Logger.d.ts +0 -700
  279. package/dist/types/Logger.d.ts.map +0 -1
  280. package/dist/types/ScopedLogger.d.ts +0 -310
  281. package/dist/types/ScopedLogger.d.ts.map +0 -1
  282. package/dist/types/cli/CommandProcessor.d.ts +0 -100
  283. package/dist/types/cli/CommandProcessor.d.ts.map +0 -1
  284. package/dist/types/cli/commands/ConfigCommand.d.ts +0 -14
  285. package/dist/types/cli/commands/ConfigCommand.d.ts.map +0 -1
  286. package/dist/types/cli/commands/ExportCommand.d.ts +0 -48
  287. package/dist/types/cli/commands/ExportCommand.d.ts.map +0 -1
  288. package/dist/types/cli/commands/HistoryCommand.d.ts +0 -47
  289. package/dist/types/cli/commands/HistoryCommand.d.ts.map +0 -1
  290. package/dist/types/cli/commands/StatusCommand.d.ts +0 -30
  291. package/dist/types/cli/commands/StatusCommand.d.ts.map +0 -1
  292. package/dist/types/cli/commands/ThemeCommand.d.ts +0 -30
  293. package/dist/types/cli/commands/ThemeCommand.d.ts.map +0 -1
  294. package/dist/types/cli/help.d.ts +0 -12
  295. package/dist/types/cli/help.d.ts.map +0 -1
  296. package/dist/types/cli/index.d.ts +0 -15
  297. package/dist/types/cli/index.d.ts.map +0 -1
  298. package/dist/types/constants.d.ts +0 -119
  299. package/dist/types/constants.d.ts.map +0 -1
  300. package/dist/types/core.js +0 -28
  301. package/dist/types/example.d.ts +0 -18
  302. package/dist/types/example.d.ts.map +0 -1
  303. package/dist/types/exports-module.d.ts +0 -196
  304. package/dist/types/exports-module.d.ts.map +0 -1
  305. package/dist/types/handlers/AnalyticsLogHandler.d.ts +0 -8
  306. package/dist/types/handlers/AnalyticsLogHandler.d.ts.map +0 -1
  307. package/dist/types/handlers/ExportLogHandler.d.ts +0 -100
  308. package/dist/types/handlers/ExportLogHandler.d.ts.map +0 -1
  309. package/dist/types/handlers/FileLogHandler.d.ts +0 -33
  310. package/dist/types/handlers/FileLogHandler.d.ts.map +0 -1
  311. package/dist/types/handlers/RemoteLogHandler.d.ts +0 -11
  312. package/dist/types/handlers/RemoteLogHandler.d.ts.map +0 -1
  313. package/dist/types/handlers/index.d.ts +0 -8
  314. package/dist/types/handlers/index.d.ts.map +0 -1
  315. package/dist/types/handlers.js +0 -4
  316. package/dist/types/index.js +0 -4
  317. package/dist/types/main.d.ts +0 -2
  318. package/dist/types/main.d.ts.map +0 -1
  319. package/dist/types/styling/LogStyleBuilder.d.ts +0 -146
  320. package/dist/types/styling/LogStyleBuilder.d.ts.map +0 -1
  321. package/dist/types/styling/SemanticStyles.d.ts +0 -178
  322. package/dist/types/styling/SemanticStyles.d.ts.map +0 -1
  323. package/dist/types/styling/SmartPresets.d.ts +0 -22
  324. package/dist/types/styling/SmartPresets.d.ts.map +0 -1
  325. package/dist/types/styling/StyleBuilder.d.ts +0 -140
  326. package/dist/types/styling/StyleBuilder.d.ts.map +0 -1
  327. package/dist/types/styling/banners.d.ts +0 -42
  328. package/dist/types/styling/banners.d.ts.map +0 -1
  329. package/dist/types/styling/index.d.ts +0 -10
  330. package/dist/types/styling/index.d.ts.map +0 -1
  331. package/dist/types/styling/themes.d.ts +0 -7
  332. package/dist/types/styling/themes.d.ts.map +0 -1
  333. package/dist/types/styling-module.d.ts +0 -178
  334. package/dist/types/styling-module.d.ts.map +0 -1
  335. package/dist/types/types/core.d.ts +0 -221
  336. package/dist/types/types/core.d.ts.map +0 -1
  337. package/dist/types/types/handlers.d.ts +0 -85
  338. package/dist/types/types/handlers.d.ts.map +0 -1
  339. package/dist/types/types/index.d.ts +0 -7
  340. package/dist/types/types/index.d.ts.map +0 -1
  341. package/dist/types/utils/environment.d.ts +0 -47
  342. package/dist/types/utils/environment.d.ts.map +0 -1
  343. package/dist/types/utils/formatting.d.ts +0 -37
  344. package/dist/types/utils/formatting.d.ts.map +0 -1
  345. package/dist/types/utils/index.d.ts +0 -7
  346. package/dist/types/utils/index.d.ts.map +0 -1
  347. package/dist/types/utils/opentui-detection.d.ts +0 -34
  348. package/dist/types/utils/opentui-detection.d.ts.map +0 -1
  349. package/dist/types/utils/output.d.ts +0 -41
  350. package/dist/types/utils/output.d.ts.map +0 -1
  351. package/dist/types/utils/stackTrace.d.ts +0 -6
  352. package/dist/types/utils/stackTrace.d.ts.map +0 -1
  353. package/dist/types/utils/timestamps.d.ts +0 -20
  354. package/dist/types/utils/timestamps.d.ts.map +0 -1
  355. package/dist/utils/environment.d.ts +0 -47
  356. package/dist/utils/environment.d.ts.map +0 -1
  357. package/dist/utils/environment.js +0 -85
  358. package/dist/utils/formatting.js +0 -117
  359. package/dist/utils/index.js +0 -6
  360. package/dist/utils/opentui-detection.d.ts +0 -34
  361. package/dist/utils/opentui-detection.d.ts.map +0 -1
  362. package/dist/utils/opentui-detection.js +0 -116
  363. package/dist/utils/output.js +0 -150
  364. package/dist/utils/stackTrace.js +0 -81
  365. package/dist/utils/timestamps.js +0 -71
  366. package/dist/vite.svg +0 -1
  367. package/docs/API.md +0 -691
  368. package/docs/CORE.md +0 -264
  369. package/docs/DEVELOPMENT.md +0 -731
  370. package/docs/EXPORTS.md +0 -467
  371. package/docs/PACKAGES.md +0 -244
  372. package/docs/STYLING.md +0 -405
  373. package/docs/_config.yml +0 -36
  374. package/docs/index.md +0 -179
  375. package/examples/README.md +0 -208
  376. package/examples/basic-logging.js +0 -75
  377. package/examples/data-export.js +0 -234
  378. package/examples/package.json +0 -16
  379. package/examples/performance-timing.js +0 -170
  380. package/examples/simplified-api.js +0 -124
  381. package/examples/styling-themes.js +0 -207
  382. package/index.html +0 -358
  383. package/packages/core/package.json +0 -57
  384. package/packages/exports/package.json +0 -41
  385. package/packages/nodejs-opentui/README.md +0 -232
  386. package/packages/nodejs-opentui/package.json +0 -72
  387. package/packages/nodejs-opentui/src/LogRenderer.ts +0 -171
  388. package/packages/nodejs-opentui/src/OpenTUILogHandler.ts +0 -178
  389. package/packages/nodejs-opentui/src/components/LogBadge.tsx +0 -131
  390. package/packages/nodejs-opentui/src/index.ts +0 -133
  391. package/packages/nodejs-opentui/src/types.ts +0 -158
  392. package/packages/nodejs-opentui/tsconfig.json +0 -20
  393. package/packages/styling/package.json +0 -41
  394. package/project-utils/README.md +0 -172
  395. package/project-utils/auto-release-gemini.ts +0 -1193
  396. package/project-utils/auto-release-ui.ts +0 -1329
  397. package/project-utils/commit-generator.ts +0 -1385
  398. package/project-utils/commit-ui.ts +0 -264
  399. package/project-utils/git-utils.ts +0 -199
  400. package/project-utils/github-release-manager.ts +0 -466
  401. package/project-utils/project-config.ts +0 -260
  402. package/project-utils/prompt-templates.js +0 -345
  403. package/project-utils/prompt-templates.ts +0 -422
  404. package/project-utils/version-manager.ts +0 -1078
  405. package/public/vite.svg +0 -1
  406. package/src/Logger.ts +0 -1276
  407. package/src/ScopedLogger.ts +0 -454
  408. package/src/cli/CommandProcessor.ts +0 -248
  409. package/src/cli/commands/ConfigCommand.ts +0 -93
  410. package/src/cli/commands/ExportCommand.ts +0 -276
  411. package/src/cli/commands/HistoryCommand.ts +0 -117
  412. package/src/cli/commands/StatusCommand.ts +0 -112
  413. package/src/cli/commands/ThemeCommand.ts +0 -88
  414. package/src/cli/help.ts +0 -127
  415. package/src/cli/index.ts +0 -71
  416. package/src/constants.ts +0 -171
  417. package/src/core.ts +0 -393
  418. package/src/example.ts +0 -210
  419. package/src/exports-module.ts +0 -311
  420. package/src/handlers/AnalyticsLogHandler.ts +0 -22
  421. package/src/handlers/ExportLogHandler.ts +0 -609
  422. package/src/handlers/FileLogHandler.ts +0 -169
  423. package/src/handlers/RemoteLogHandler.ts +0 -42
  424. package/src/handlers/index.ts +0 -8
  425. package/src/index.ts +0 -209
  426. package/src/main.ts +0 -196
  427. package/src/style.css +0 -96
  428. package/src/styling/LogStyleBuilder.ts +0 -355
  429. package/src/styling/SemanticStyles.ts +0 -380
  430. package/src/styling/SmartPresets.ts +0 -288
  431. package/src/styling/StyleBuilder.ts +0 -319
  432. package/src/styling/banners.ts +0 -168
  433. package/src/styling/index.ts +0 -27
  434. package/src/styling/themes.ts +0 -235
  435. package/src/styling-module.ts +0 -244
  436. package/src/types/core.ts +0 -236
  437. package/src/types/handlers.ts +0 -95
  438. package/src/types/index.ts +0 -35
  439. package/src/typescript.svg +0 -1
  440. package/src/utils/environment.ts +0 -94
  441. package/src/utils/formatting.ts +0 -142
  442. package/src/utils/index.ts +0 -21
  443. package/src/utils/opentui-detection.ts +0 -138
  444. package/src/utils/output.ts +0 -185
  445. package/src/utils/stackTrace.ts +0 -95
  446. package/src/utils/timestamps.ts +0 -80
  447. package/src/vite-env.d.ts +0 -1
  448. package/test-core-browser.html +0 -237
  449. package/test-core-node.js +0 -63
  450. package/tests/test-conflict-resolution.ts +0 -391
  451. package/tests/validate-workflows.sh +0 -131
  452. package/tests/yaml-autofix.sh +0 -146
  453. package/tsconfig.json +0 -50
  454. package/vite.config.ts +0 -223
package/demo.html DELETED
@@ -1,847 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>Better Logger - Professional Console Logging</title>
7
- <link rel="icon" type="image/svg+xml" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>šŸ“Š</text></svg>">
8
-
9
- <!-- Import Better Logger from jsDelivr CDN with local fallback -->
10
- <script type="module">
11
- try {
12
- await import('https://cdn.jsdelivr.net/npm/@mks2508/better-logger@latest/dist/index.js');
13
- } catch (e) {
14
- console.log('Using local fallback');
15
- await import('./dist/index.js');
16
- }
17
- </script>
18
-
19
- <style>
20
- * {
21
- margin: 0;
22
- padding: 0;
23
- box-sizing: border-box;
24
- }
25
-
26
- body {
27
- font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
28
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
29
- min-height: 100vh;
30
- color: #333;
31
- }
32
-
33
- .container {
34
- max-width: 1200px;
35
- margin: 0 auto;
36
- padding: 20px;
37
- }
38
-
39
- .header {
40
- text-align: center;
41
- margin-bottom: 40px;
42
- padding: 40px 20px;
43
- background: rgba(255, 255, 255, 0.95);
44
- border-radius: 20px;
45
- box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
46
- backdrop-filter: blur(10px);
47
- }
48
-
49
- .logo {
50
- font-size: 4rem;
51
- margin-bottom: 20px;
52
- background: linear-gradient(135deg, #667eea, #764ba2);
53
- -webkit-background-clip: text;
54
- -webkit-text-fill-color: transparent;
55
- background-clip: text;
56
- }
57
-
58
- .title {
59
- font-size: 3rem;
60
- font-weight: 700;
61
- margin-bottom: 10px;
62
- background: linear-gradient(135deg, #667eea, #764ba2);
63
- -webkit-background-clip: text;
64
- -webkit-text-fill-color: transparent;
65
- background-clip: text;
66
- }
67
-
68
- .subtitle {
69
- font-size: 1.3rem;
70
- color: #666;
71
- margin-bottom: 30px;
72
- }
73
-
74
- .badges {
75
- display: flex;
76
- justify-content: center;
77
- gap: 15px;
78
- flex-wrap: wrap;
79
- margin-bottom: 30px;
80
- }
81
-
82
- .badge {
83
- display: inline-flex;
84
- align-items: center;
85
- padding: 8px 16px;
86
- background: linear-gradient(135deg, #4facfe, #00f2fe);
87
- color: white;
88
- border-radius: 25px;
89
- font-weight: 600;
90
- text-decoration: none;
91
- transition: all 0.3s ease;
92
- font-size: 0.9rem;
93
- }
94
-
95
- .badge:hover {
96
- transform: translateY(-2px);
97
- box-shadow: 0 8px 25px rgba(79, 172, 254, 0.4);
98
- }
99
-
100
- .npm-badge { background: linear-gradient(135deg, #CB3837, #FF4D6D); }
101
- .github-badge { background: linear-gradient(135deg, #333, #24292e); }
102
- .docs-badge { background: linear-gradient(135deg, #00C851, #00E676); }
103
-
104
- .demo-grid {
105
- display: grid;
106
- grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
107
- gap: 30px;
108
- margin-bottom: 40px;
109
- }
110
-
111
- .demo-section {
112
- background: rgba(255, 255, 255, 0.95);
113
- border-radius: 15px;
114
- padding: 30px;
115
- box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
116
- backdrop-filter: blur(10px);
117
- transition: transform 0.3s ease;
118
- }
119
-
120
- .demo-section:hover {
121
- transform: translateY(-5px);
122
- }
123
-
124
- .section-title {
125
- font-size: 1.5rem;
126
- font-weight: 700;
127
- margin-bottom: 15px;
128
- color: #333;
129
- display: flex;
130
- align-items: center;
131
- gap: 10px;
132
- }
133
-
134
- .section-description {
135
- color: #666;
136
- margin-bottom: 20px;
137
- line-height: 1.6;
138
- }
139
-
140
- .button-group {
141
- display: flex;
142
- flex-wrap: wrap;
143
- gap: 10px;
144
- margin-top: 20px;
145
- }
146
-
147
- .demo-btn {
148
- padding: 12px 24px;
149
- border: none;
150
- border-radius: 8px;
151
- font-weight: 600;
152
- cursor: pointer;
153
- transition: all 0.3s ease;
154
- color: white;
155
- font-size: 0.9rem;
156
- }
157
-
158
- .demo-btn:hover {
159
- transform: translateY(-2px);
160
- box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
161
- }
162
-
163
- .btn-primary { background: linear-gradient(135deg, #667eea, #764ba2); }
164
- .btn-success { background: linear-gradient(135deg, #4CAF50, #45a049); }
165
- .btn-warning { background: linear-gradient(135deg, #FF9800, #F57C00); }
166
- .btn-error { background: linear-gradient(135deg, #F44336, #D32F2F); }
167
- .btn-info { background: linear-gradient(135deg, #2196F3, #1976D2); }
168
- .btn-critical { background: linear-gradient(135deg, #9C27B0, #7B1FA2); }
169
-
170
- .features-grid {
171
- display: grid;
172
- grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
173
- gap: 20px;
174
- margin-bottom: 40px;
175
- }
176
-
177
- .feature-card {
178
- background: rgba(255, 255, 255, 0.9);
179
- border-radius: 12px;
180
- padding: 25px;
181
- text-align: center;
182
- transition: transform 0.3s ease;
183
- }
184
-
185
- .feature-card:hover {
186
- transform: translateY(-3px);
187
- }
188
-
189
- .feature-icon {
190
- font-size: 2.5rem;
191
- margin-bottom: 15px;
192
- }
193
-
194
- .feature-title {
195
- font-weight: 700;
196
- margin-bottom: 10px;
197
- color: #333;
198
- }
199
-
200
- .feature-desc {
201
- color: #666;
202
- font-size: 0.9rem;
203
- }
204
-
205
- .console-notice {
206
- background: rgba(255, 255, 255, 0.95);
207
- border-radius: 15px;
208
- padding: 25px;
209
- text-align: center;
210
- margin-bottom: 40px;
211
- box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
212
- }
213
-
214
- .console-notice h3 {
215
- color: #333;
216
- margin-bottom: 10px;
217
- font-size: 1.3rem;
218
- }
219
-
220
- .console-notice p {
221
- color: #666;
222
- margin-bottom: 15px;
223
- }
224
-
225
- .console-shortcut {
226
- display: inline-flex;
227
- align-items: center;
228
- gap: 5px;
229
- background: #f5f5f5;
230
- padding: 8px 12px;
231
- border-radius: 8px;
232
- font-family: 'Monaco', 'Consolas', monospace;
233
- font-weight: 600;
234
- }
235
-
236
- .footer {
237
- text-align: center;
238
- padding: 40px 20px;
239
- background: rgba(255, 255, 255, 0.9);
240
- border-radius: 15px;
241
- margin-top: 40px;
242
- }
243
-
244
- .footer-links {
245
- display: flex;
246
- justify-content: center;
247
- gap: 30px;
248
- flex-wrap: wrap;
249
- margin-bottom: 20px;
250
- }
251
-
252
- .footer-link {
253
- color: #667eea;
254
- text-decoration: none;
255
- font-weight: 600;
256
- transition: color 0.3s ease;
257
- }
258
-
259
- .footer-link:hover {
260
- color: #764ba2;
261
- }
262
-
263
- @media (max-width: 768px) {
264
- .title { font-size: 2rem; }
265
- .subtitle { font-size: 1.1rem; }
266
- .demo-grid { grid-template-columns: 1fr; }
267
- .badges { justify-content: center; }
268
- .button-group { justify-content: center; }
269
- }
270
- </style>
271
- </head>
272
- <body>
273
- <div class="container">
274
- <!-- Header -->
275
- <div class="header">
276
- <div class="logo">šŸ“Š</div>
277
- <h1 class="title">Better Logger</h1>
278
- <p class="subtitle">State-of-the-art console logging with advanced CSS styling, SVG support, and animations</p>
279
-
280
- <div class="badges">
281
- <a href="https://www.npmjs.com/package/@mks2508/better-logger" class="badge npm-badge">šŸ“¦ NPM Package</a>
282
- <a href="https://github.com/MKS2508/advanced-logger" class="badge github-badge">⭐ GitHub</a>
283
- <a href="https://github.com/MKS2508/advanced-logger/blob/main/README.md" class="badge docs-badge">šŸ“š Documentation</a>
284
- </div>
285
- </div>
286
-
287
- <!-- Console Notice -->
288
- <div class="console-notice">
289
- <h3>šŸ” Open Developer Console</h3>
290
- <p>To see the magical console output, open your browser's Developer Console:</p>
291
- <div class="console-shortcut">
292
- <span>Press</span>
293
- <kbd>F12</kbd>
294
- <span>or</span>
295
- <kbd>Ctrl+Shift+I</kbd>
296
- <span>(Windows/Linux)</span>
297
- <kbd>Cmd+Opt+I</kbd>
298
- <span>(Mac)</span>
299
- </div>
300
- </div>
301
-
302
- <!-- Features Overview -->
303
- <div class="features-grid">
304
- <div class="feature-card">
305
- <div class="feature-icon">šŸŽØ</div>
306
- <div class="feature-title">Advanced Styling</div>
307
- <div class="feature-desc">CSS gradients, shadows, and modern visual effects</div>
308
- </div>
309
- <div class="feature-card">
310
- <div class="feature-icon">šŸ–¼ļø</div>
311
- <div class="feature-title">SVG Support</div>
312
- <div class="feature-desc">Custom graphics and branded console messages</div>
313
- </div>
314
- <div class="feature-card">
315
- <div class="feature-icon">✨</div>
316
- <div class="feature-title">Animations</div>
317
- <div class="feature-desc">CSS keyframe animations in console output</div>
318
- </div>
319
- <div class="feature-card">
320
- <div class="feature-icon">šŸ“Š</div>
321
- <div class="feature-title">Performance</div>
322
- <div class="feature-desc">Built-in timing and performance monitoring</div>
323
- </div>
324
- <div class="feature-card">
325
- <div class="feature-icon">šŸ”§</div>
326
- <div class="feature-title">Modular</div>
327
- <div class="feature-desc">Import only what you need - Core, Styling, or Exports</div>
328
- </div>
329
- <div class="feature-card">
330
- <div class="feature-icon">🌈</div>
331
- <div class="feature-title">Themes</div>
332
- <div class="feature-desc">5 built-in themes: Default, Dark, Neon, Cyberpunk, Retro</div>
333
- </div>
334
- </div>
335
-
336
- <!-- Demo Sections -->
337
- <div class="demo-grid">
338
- <!-- Core Logging -->
339
- <div class="demo-section">
340
- <h2 class="section-title">šŸš€ Core Logging</h2>
341
- <p class="section-description">Essential logging features with beautiful styling and performance monitoring.</p>
342
- <div class="button-group">
343
- <button class="demo-btn btn-info" onclick="demoBasicLogging()">Basic Levels</button>
344
- <button class="demo-btn btn-primary" onclick="demoPerformanceTiming()">Performance</button>
345
- <button class="demo-btn btn-success" onclick="demoScopedLogger()">Scoped Logger</button>
346
- </div>
347
- </div>
348
-
349
- <!-- Visual Features -->
350
- <div class="demo-section">
351
- <h2 class="section-title">šŸŽØ Visual Features</h2>
352
- <p class="section-description">Advanced styling with themes, banners, SVG backgrounds, and CSS animations.</p>
353
- <div class="button-group">
354
- <button class="demo-btn btn-primary" onclick="demoThemes()">Themes</button>
355
- <button class="demo-btn btn-success" onclick="demoBanners()">Banners</button>
356
- <button class="demo-btn btn-warning" onclick="demoSVGBackgrounds()">SVG Graphics</button>
357
- <button class="demo-btn btn-error" onclick="demoAnimations()">Animations</button>
358
- </div>
359
- </div>
360
-
361
- <!-- Data Export -->
362
- <div class="demo-section">
363
- <h2 class="section-title">šŸ“¤ Data Export</h2>
364
- <p class="section-description">Export logs to CSV, JSON, XML formats and send to remote endpoints.</p>
365
- <div class="button-group">
366
- <button class="demo-btn btn-info" onclick="demoLogBuffer()">Log Buffer</button>
367
- <button class="demo-btn btn-primary" onclick="demoExportCSV()">Export CSV</button>
368
- <button class="demo-btn btn-success" onclick="demoExportJSON()">Export JSON</button>
369
- <button class="demo-btn btn-warning" onclick="demoRemoteLogging()">Remote Logging</button>
370
- </div>
371
- </div>
372
-
373
- <!-- Advanced Features -->
374
- <div class="demo-section">
375
- <h2 class="section-title">⚔ Advanced Features</h2>
376
- <p class="section-description">Table display, grouping, stack traces, and custom styling APIs.</p>
377
- <div class="button-group">
378
- <button class="demo-btn btn-primary" onclick="demoTableDisplay()">Tables</button>
379
- <button class="demo-btn btn-success" onclick="demoGrouping()">Grouping</button>
380
- <button class="demo-btn btn-info" onclick="demoStackTraces()">Stack Traces</button>
381
- <button class="demo-btn btn-critical" onclick="demoCustomStyles()">Custom Styles</button>
382
- </div>
383
- </div>
384
-
385
- <!-- CLI Interface -->
386
- <div class="demo-section">
387
- <h2 class="section-title">šŸ’» CLI Interface</h2>
388
- <p class="section-description">Interactive command-line interface with configuration, help, and enumeration.</p>
389
- <div class="button-group">
390
- <button class="demo-btn btn-info" onclick="demoCLIHelp()">Help</button>
391
- <button class="demo-btn btn-primary" onclick="demoCLIConfig()">Config</button>
392
- <button class="demo-btn btn-success" onclick="demoCLIFeatures()">Enumerate All</button>
393
- <button class="demo-btn btn-warning" onclick="demoCLIStatus()">Status</button>
394
- </div>
395
- </div>
396
-
397
- <!-- Bundle Information -->
398
- <div class="demo-section">
399
- <h2 class="section-title">šŸ“¦ Bundle Information</h2>
400
- <p class="section-description">Optimized bundle sizes for different use cases and selective imports.</p>
401
- <div class="button-group">
402
- <button class="demo-btn btn-info" onclick="showBundleSizes()">Bundle Sizes</button>
403
- <button class="demo-btn btn-primary" onclick="showModularImports()">Modular Imports</button>
404
- <button class="demo-btn btn-success" onclick="showCompatibility()">Compatibility</button>
405
- </div>
406
- </div>
407
- </div>
408
-
409
- <!-- Footer -->
410
- <div class="footer">
411
- <div class="footer-links">
412
- <a href="https://github.com/MKS2508/advanced-logger" class="footer-link">GitHub Repository</a>
413
- <a href="https://www.npmjs.com/package/@mks2508/better-logger" class="footer-link">NPM Package</a>
414
- <a href="https://github.com/MKS2508/advanced-logger/blob/main/README.md" class="footer-link">Documentation</a>
415
- <a href="https://github.com/MKS2508/advanced-logger/issues" class="footer-link">Issues & Support</a>
416
- <a href="https://github.com/MKS2508/advanced-logger/blob/main/LICENSE" class="footer-link">MIT License</a>
417
- </div>
418
- <p style="color: #666; margin-top: 20px;">
419
- Made with ā¤ļø by <strong>MKS2508</strong> • Better Logger v0.0.1
420
- </p>
421
- </div>
422
- </div>
423
-
424
- <script type="module">
425
- // Import from CDN will be available globally after load
426
- // Wait for module to load
427
- setTimeout(() => {
428
- if (window.BetterLogger) {
429
- console.log('%cšŸŽ‰ Better Logger loaded successfully!', 'background: linear-gradient(135deg, #667eea, #764ba2); color: white; padding: 10px 20px; border-radius: 8px; font-weight: bold;');
430
- }
431
- }, 1000);
432
-
433
- // Demo Functions
434
- window.demoBasicLogging = function() {
435
- console.log('%cšŸš€ Basic Logging Demo', 'background: linear-gradient(135deg, #4facfe, #00f2fe); color: white; padding: 8px 16px; border-radius: 6px; font-weight: bold;');
436
-
437
- // Simulate different log levels
438
- console.log('%cšŸ”· DEBUG: Application initialized', 'background: linear-gradient(135deg, #9E9E9E, #757575); color: white; padding: 6px 12px; border-radius: 4px;');
439
- console.log('%cā„¹ļø INFO: User logged in successfully', 'background: linear-gradient(135deg, #2196F3, #1976D2); color: white; padding: 6px 12px; border-radius: 4px;');
440
- console.log('%cāš ļø WARN: API rate limit approaching', 'background: linear-gradient(135deg, #FF9800, #F57C00); color: white; padding: 6px 12px; border-radius: 4px;');
441
- console.log('%cāŒ ERROR: Payment processing failed', 'background: linear-gradient(135deg, #F44336, #D32F2F); color: white; padding: 6px 12px; border-radius: 4px;');
442
- console.log('%c🚨 CRITICAL: Database connection lost', 'background: linear-gradient(135deg, #9C27B0, #7B1FA2); color: white; padding: 6px 12px; border-radius: 4px;');
443
- };
444
-
445
- window.demoPerformanceTiming = function() {
446
- console.log('%cā±ļø Performance Timing Demo', 'background: linear-gradient(135deg, #4CAF50, #45a049); color: white; padding: 8px 16px; border-radius: 6px; font-weight: bold;');
447
-
448
- const start = performance.now();
449
-
450
- // Simulate some work
451
- setTimeout(() => {
452
- const end = performance.now();
453
- const duration = (end - start).toFixed(2);
454
- console.log(`%cšŸ“Š Operation completed in ${duration}ms`, 'background: linear-gradient(135deg, #00C851, #00E676); color: white; padding: 6px 12px; border-radius: 4px;');
455
-
456
- // Show performance data
457
- console.table({
458
- 'Start Time': start.toFixed(2) + 'ms',
459
- 'End Time': end.toFixed(2) + 'ms',
460
- 'Duration': duration + 'ms',
461
- 'Status': 'āœ… Success'
462
- });
463
- }, 100);
464
- };
465
-
466
- window.demoScopedLogger = function() {
467
- console.log('%cšŸŽÆ Scoped Logger Demo', 'background: linear-gradient(135deg, #667eea, #764ba2); color: white; padding: 8px 16px; border-radius: 6px; font-weight: bold;');
468
-
469
- console.log('%c[API] 🌐 Making HTTP request...', 'background: linear-gradient(135deg, #2196F3, #1976D2); color: white; padding: 6px 12px; border-radius: 4px;');
470
- console.log('%c[AUTH] šŸ” Validating token...', 'background: linear-gradient(135deg, #FF9800, #F57C00); color: white; padding: 6px 12px; border-radius: 4px;');
471
- console.log('%c[DB] šŸ—„ļø Querying user data...', 'background: linear-gradient(135deg, #4CAF50, #45a049); color: white; padding: 6px 12px; border-radius: 4px;');
472
- console.log('%c[CACHE] ⚔ Cache hit for user:123', 'background: linear-gradient(135deg, #9C27B0, #7B1FA2); color: white; padding: 6px 12px; border-radius: 4px;');
473
- };
474
-
475
- window.demoThemes = function() {
476
- console.log('%c🌈 Theme System Demo', 'background: linear-gradient(135deg, #667eea, #764ba2); color: white; padding: 8px 16px; border-radius: 6px; font-weight: bold;');
477
-
478
- const themes = [
479
- { name: 'Default', colors: ['#667eea', '#764ba2'] },
480
- { name: 'Dark', colors: ['#2c3e50', '#34495e'] },
481
- { name: 'Neon', colors: ['#ff006e', '#fb8500'] },
482
- { name: 'Cyberpunk', colors: ['#b224ef', '#7209b7'] },
483
- { name: 'Retro', colors: ['#f72585', '#b5179e'] }
484
- ];
485
-
486
- themes.forEach((theme, index) => {
487
- setTimeout(() => {
488
- const style = `background: linear-gradient(135deg, ${theme.colors[0]}, ${theme.colors[1]}); color: white; padding: 8px 16px; border-radius: 6px; font-weight: bold;`;
489
- console.log(`%cšŸŽØ ${theme.name} Theme Applied`, style);
490
- }, index * 500);
491
- });
492
- };
493
-
494
- window.demoBanners = function() {
495
- console.log('%cšŸŽ­ Banner System Demo', 'background: linear-gradient(135deg, #4CAF50, #45a049); color: white; padding: 8px 16px; border-radius: 6px; font-weight: bold;');
496
-
497
- // ASCII Banner
498
- console.log('%c╔══════════════════════════════════╗\nā•‘ BETTER LOGGER ā•‘\nā•‘ Advanced Console Logging ā•‘\nā•šā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•', 'color: #667eea; font-family: monospace; font-weight: bold;');
499
-
500
- // Unicode Banner
501
- setTimeout(() => {
502
- console.log('%cā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“\nā–“ ā–“\nā–“ šŸš€ BETTER LOGGER ā–“\nā–“ Professional Logging ā–“\nā–“ ā–“\nā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“ā–“', 'background: linear-gradient(135deg, #667eea, #764ba2); color: white; padding: 10px; border-radius: 8px; font-family: monospace; font-weight: bold;');
503
- }, 1000);
504
- };
505
-
506
- window.demoSVGBackgrounds = function() {
507
- console.log('%cšŸ–¼ļø SVG Graphics Demo', 'background: linear-gradient(135deg, #FF9800, #F57C00); color: white; padding: 8px 16px; border-radius: 6px; font-weight: bold;');
508
-
509
- // SVG with gradient background
510
- const svgStyle = "background-image: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 400 80\"><defs><linearGradient id=\"bg\" x1=\"0%\" y1=\"0%\" x2=\"100%\" y2=\"0%\"><stop offset=\"0%\" style=\"stop-color:%23667eea\"/><stop offset=\"100%\" style=\"stop-color:%23764ba2\"/></linearGradient></defs><rect width=\"100%\" height=\"100%\" fill=\"url(%23bg)\" rx=\"8\"/><text x=\"200\" y=\"45\" text-anchor=\"middle\" fill=\"white\" font-family=\"Arial\" font-size=\"18\" font-weight=\"bold\">BETTER LOGGER</text></svg>'); background-size: 400px 80px; background-repeat: no-repeat; color: transparent; padding: 40px 200px; border-radius: 8px;";
511
-
512
- console.log('%c ', svgStyle);
513
- console.log('%c✨ Custom SVG graphics in console!', 'background: linear-gradient(135deg, #4CAF50, #45a049); color: white; padding: 6px 12px; border-radius: 4px; margin-top: 10px;');
514
- };
515
-
516
- window.demoAnimations = function() {
517
- console.log('%c✨ CSS Animations Demo', 'background: linear-gradient(135deg, #9C27B0, #7B1FA2); color: white; padding: 8px 16px; border-radius: 6px; font-weight: bold;');
518
-
519
- // Add CSS animation keyframes
520
- const style = document.createElement('style');
521
- style.textContent = `
522
- @keyframes loggerPulse {
523
- 0%, 100% { background-position: 0% 50%; }
524
- 50% { background-position: 100% 50%; }
525
- }
526
- `;
527
- document.head.appendChild(style);
528
-
529
- const animatedStyle = 'background: linear-gradient(270deg, #ff006e, #fb8500, #ff006e); background-size: 400% 100%; animation: loggerPulse 2s ease-in-out infinite; color: white; padding: 10px 20px; border-radius: 8px; font-weight: bold;';
530
-
531
- setTimeout(() => {
532
- console.log('%c🌟 Animated gradient background!', animatedStyle);
533
- console.log('%c⚔ Watch the colors flow...', animatedStyle);
534
- }, 500);
535
- };
536
-
537
- window.demoLogBuffer = function() {
538
- console.log('%cšŸ“Š Log Buffer Demo', 'background: linear-gradient(135deg, #2196F3, #1976D2); color: white; padding: 8px 16px; border-radius: 6px; font-weight: bold;');
539
-
540
- console.log('%cšŸ“ Collecting logs in buffer...', 'background: linear-gradient(135deg, #4CAF50, #45a049); color: white; padding: 6px 12px; border-radius: 4px;');
541
-
542
- // Simulate buffer data
543
- const bufferData = [
544
- { timestamp: new Date().toISOString(), level: 'info', message: 'User login', data: { userId: 123 } },
545
- { timestamp: new Date().toISOString(), level: 'warn', message: 'Cache miss', data: { key: 'user:123' } },
546
- { timestamp: new Date().toISOString(), level: 'error', message: 'API timeout', data: { endpoint: '/api/users' } }
547
- ];
548
-
549
- setTimeout(() => {
550
- console.table(bufferData);
551
- console.log('%cāœ… Buffer contains 3 log entries', 'background: linear-gradient(135deg, #00C851, #00E676); color: white; padding: 6px 12px; border-radius: 4px;');
552
- }, 1000);
553
- };
554
-
555
- window.demoExportCSV = function() {
556
- console.log('%cšŸ“„ CSV Export Demo', 'background: linear-gradient(135deg, #4CAF50, #45a049); color: white; padding: 8px 16px; border-radius: 6px; font-weight: bold;');
557
-
558
- const csvData = `timestamp,level,prefix,message,location
559
- 2024-01-15T10:30:00.123Z,error,API,"Payment timeout","api.js:45:12"
560
- 2024-01-15T10:31:15.456Z,info,DB,"Query completed","database.js:23:8"
561
- 2024-01-15T10:32:30.789Z,warn,CACHE,"Cache expiry","cache.js:67:5"`;
562
-
563
- console.log('%cšŸ“‹ CSV Export Preview:', 'background: #f5f5f5; color: #333; padding: 6px 12px; border-radius: 4px; font-family: monospace;');
564
- console.log(csvData);
565
-
566
- setTimeout(() => {
567
- console.log('%cāœ… CSV export completed', 'background: linear-gradient(135deg, #00C851, #00E676); color: white; padding: 6px 12px; border-radius: 4px;');
568
- }, 1500);
569
- };
570
-
571
- window.demoExportJSON = function() {
572
- console.log('%cšŸ“‹ JSON Export Demo', 'background: linear-gradient(135deg, #FF9800, #F57C00); color: white; padding: 8px 16px; border-radius: 6px; font-weight: bold;');
573
-
574
- const jsonData = {
575
- metadata: {
576
- exportTime: new Date().toISOString(),
577
- totalLogs: 3,
578
- filters: { level: 'all' }
579
- },
580
- logs: [
581
- {
582
- id: 'log_001',
583
- timestamp: '2024-01-15T10:30:00.123Z',
584
- level: 'error',
585
- prefix: 'API',
586
- message: 'Payment timeout',
587
- location: { file: 'api.js', line: 45, column: 12 }
588
- },
589
- {
590
- id: 'log_002',
591
- timestamp: '2024-01-15T10:31:15.456Z',
592
- level: 'info',
593
- prefix: 'DB',
594
- message: 'Query completed',
595
- location: { file: 'database.js', line: 23, column: 8 }
596
- }
597
- ]
598
- };
599
-
600
- setTimeout(() => {
601
- console.log('%cšŸ“Š JSON Export Data:', 'background: #f5f5f5; color: #333; padding: 6px 12px; border-radius: 4px;');
602
- console.log(jsonData);
603
- console.log('%cāœ… JSON export completed', 'background: linear-gradient(135deg, #00C851, #00E676); color: white; padding: 6px 12px; border-radius: 4px;');
604
- }, 1000);
605
- };
606
-
607
- window.demoRemoteLogging = function() {
608
- console.log('%cšŸ“” Remote Logging Demo', 'background: linear-gradient(135deg, #9C27B0, #7B1FA2); color: white; padding: 8px 16px; border-radius: 6px; font-weight: bold;');
609
-
610
- console.log('%cšŸ”— Connecting to remote endpoint...', 'background: linear-gradient(135deg, #2196F3, #1976D2); color: white; padding: 6px 12px; border-radius: 4px;');
611
-
612
- setTimeout(() => {
613
- console.log('%cšŸ“¤ Sending log batch (5 entries)...', 'background: linear-gradient(135deg, #FF9800, #F57C00); color: white; padding: 6px 12px; border-radius: 4px;');
614
- }, 1000);
615
-
616
- setTimeout(() => {
617
- console.log('%cāœ… Remote logging successful', 'background: linear-gradient(135deg, #4CAF50, #45a049); color: white; padding: 6px 12px; border-radius: 4px;');
618
- console.log('%cšŸ“Š Endpoint: https://api.logs.company.com', 'background: #f5f5f5; color: #333; padding: 4px 8px; border-radius: 4px; font-family: monospace;');
619
- }, 2000);
620
- };
621
-
622
- window.demoTableDisplay = function() {
623
- console.log('%cšŸ“Š Table Display Demo', 'background: linear-gradient(135deg, #667eea, #764ba2); color: white; padding: 8px 16px; border-radius: 6px; font-weight: bold;');
624
-
625
- const userData = [
626
- { id: 1, name: 'John Doe', email: 'john@example.com', status: 'āœ… Active', lastLogin: '2024-01-15' },
627
- { id: 2, name: 'Jane Smith', email: 'jane@example.com', status: 'āš ļø Pending', lastLogin: '2024-01-14' },
628
- { id: 3, name: 'Bob Wilson', email: 'bob@example.com', status: 'āŒ Inactive', lastLogin: '2024-01-10' }
629
- ];
630
-
631
- setTimeout(() => {
632
- console.table(userData);
633
- console.log('%c✨ Formatted data tables in console!', 'background: linear-gradient(135deg, #4CAF50, #45a049); color: white; padding: 6px 12px; border-radius: 4px;');
634
- }, 500);
635
- };
636
-
637
- window.demoGrouping = function() {
638
- console.log('%cšŸ“ Console Grouping Demo', 'background: linear-gradient(135deg, #4CAF50, #45a049); color: white; padding: 8px 16px; border-radius: 6px; font-weight: bold;');
639
-
640
- console.group('šŸš€ Application Startup');
641
- console.log('%cāš™ļø Loading configuration...', 'background: linear-gradient(135deg, #2196F3, #1976D2); color: white; padding: 4px 8px; border-radius: 4px;');
642
- console.log('%cšŸ”Œ Connecting to database...', 'background: linear-gradient(135deg, #FF9800, #F57C00); color: white; padding: 4px 8px; border-radius: 4px;');
643
- console.log('%cāœ… Server ready on port 3000', 'background: linear-gradient(135deg, #4CAF50, #45a049); color: white; padding: 4px 8px; border-radius: 4px;');
644
- console.groupEnd();
645
-
646
- setTimeout(() => {
647
- console.group('šŸ‘¤ User Authentication');
648
- console.log('%cšŸ” Validating credentials...', 'background: linear-gradient(135deg, #9C27B0, #7B1FA2); color: white; padding: 4px 8px; border-radius: 4px;');
649
- console.log('%cāœ… Login successful', 'background: linear-gradient(135deg, #4CAF50, #45a049); color: white; padding: 4px 8px; border-radius: 4px;');
650
- console.groupEnd();
651
- }, 1500);
652
- };
653
-
654
- window.demoStackTraces = function() {
655
- console.log('%cšŸ” Stack Trace Demo', 'background: linear-gradient(135deg, #F44336, #D32F2F); color: white; padding: 8px 16px; border-radius: 6px; font-weight: bold;');
656
-
657
- function level3() {
658
- console.trace('%cšŸ“ Stack trace from level 3', 'background: linear-gradient(135deg, #FF9800, #F57C00); color: white; padding: 6px 12px; border-radius: 4px;');
659
- }
660
-
661
- function level2() {
662
- level3();
663
- }
664
-
665
- function level1() {
666
- level2();
667
- }
668
-
669
- setTimeout(() => {
670
- console.log('%cšŸ”— Tracing function call hierarchy:', 'background: #f5f5f5; color: #333; padding: 6px 12px; border-radius: 4px;');
671
- level1();
672
- }, 500);
673
- };
674
-
675
- window.demoCustomStyles = function() {
676
- console.log('%cšŸŽØ Custom Styles Demo', 'background: linear-gradient(135deg, #9C27B0, #7B1FA2); color: white; padding: 8px 16px; border-radius: 6px; font-weight: bold;');
677
-
678
- const styles = [
679
- 'background: linear-gradient(45deg, #ff6b6b, #feca57); color: white; padding: 12px 24px; border-radius: 25px; font-weight: bold; text-shadow: 0 2px 4px rgba(0,0,0,0.3);',
680
- 'background: #2c3e50; color: #ecf0f1; padding: 10px 20px; border-radius: 8px; border-left: 4px solid #3498db; font-family: monospace;',
681
- 'background: radial-gradient(circle, #667eea, #764ba2); color: white; padding: 15px 30px; border-radius: 50px; box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);'
682
- ];
683
-
684
- const messages = [
685
- '🌟 Gradient with rounded corners',
686
- 'šŸ’» Monospace with left border',
687
- 'šŸ”® Radial gradient with shadow'
688
- ];
689
-
690
- styles.forEach((style, index) => {
691
- setTimeout(() => {
692
- console.log(`%c${messages[index]}`, style);
693
- }, (index + 1) * 500);
694
- });
695
- };
696
-
697
- window.demoCLIHelp = function() {
698
- console.log('%cšŸ’» CLI Help System', 'background: linear-gradient(135deg, #667eea, #764ba2); color: white; padding: 8px 16px; border-radius: 6px; font-weight: bold;');
699
-
700
- const helpText = `
701
- šŸ”§ Better Logger CLI Commands:
702
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
703
-
704
- šŸ“‹ Information Commands:
705
- /help Show this help message
706
- /version Display version information
707
- /status Show logger status and statistics
708
- /enumerate List all available features
709
-
710
- šŸŽØ Configuration Commands:
711
- /config Show current configuration
712
- /theme [name] Change theme (default, dark, neon, cyberpunk, retro)
713
- /banner [type] Set banner type (simple, ascii, unicode, svg, animated)
714
- /reset Reset to default configuration
715
-
716
- šŸš€ Action Commands:
717
- /clear Clear console and log buffer
718
- /export [format] Export logs (csv, json, xml)
719
- /demo [feature] Run feature demonstration
720
- /benchmark Run performance benchmarks
721
- `;
722
-
723
- console.log('%c' + helpText, 'background: #f8f9fa; color: #333; padding: 15px; border-radius: 8px; font-family: monospace; line-height: 1.6;');
724
- };
725
-
726
- window.demoCLIConfig = function() {
727
- console.log('%cāš™ļø CLI Configuration Demo', 'background: linear-gradient(135deg, #4CAF50, #45a049); color: white; padding: 8px 16px; border-radius: 6px; font-weight: bold;');
728
-
729
- setTimeout(() => {
730
- console.log('%c/theme cyberpunk', 'background: #2c3e50; color: #00ff41; padding: 8px 12px; border-radius: 4px; font-family: monospace;');
731
- }, 500);
732
-
733
- setTimeout(() => {
734
- console.log('%c🌈 Theme changed to Cyberpunk!', 'background: linear-gradient(135deg, #b224ef, #7209b7); color: white; padding: 8px 16px; border-radius: 6px; font-weight: bold;');
735
- }, 1500);
736
-
737
- setTimeout(() => {
738
- console.log('%c/banner animated', 'background: #2c3e50; color: #00ff41; padding: 8px 12px; border-radius: 4px; font-family: monospace;');
739
- }, 2500);
740
-
741
- setTimeout(() => {
742
- console.log('%c✨ Banner type set to animated!', 'background: linear-gradient(135deg, #FF9800, #F57C00); color: white; padding: 8px 16px; border-radius: 6px; font-weight: bold;');
743
- }, 3500);
744
- };
745
-
746
- window.demoCLIFeatures = function() {
747
- console.log('%cšŸ“š CLI Feature Enumeration', 'background: linear-gradient(135deg, #2196F3, #1976D2); color: white; padding: 8px 16px; border-radius: 6px; font-weight: bold;');
748
-
749
- const features = [
750
- { category: 'šŸš€ Core Features', items: ['Multi-level logging', 'Performance timing', 'Scoped loggers', 'Stack trace analysis'] },
751
- { category: 'šŸŽØ Visual Features', items: ['5 Built-in themes', 'CSS animations', 'SVG backgrounds', 'Custom styling API'] },
752
- { category: 'šŸ“¤ Export Features', items: ['CSV export', 'JSON export', 'XML export', 'Remote logging'] },
753
- { category: '⚔ Advanced Features', items: ['Table display', 'Console grouping', 'Log buffering', 'Real-time filtering'] }
754
- ];
755
-
756
- features.forEach((category, index) => {
757
- setTimeout(() => {
758
- console.group(`%c${category.category}`, 'background: linear-gradient(135deg, #667eea, #764ba2); color: white; padding: 6px 12px; border-radius: 4px; font-weight: bold;');
759
- category.items.forEach(item => {
760
- console.log(`%cāœ… ${item}`, 'color: #4CAF50; padding: 2px 8px;');
761
- });
762
- console.groupEnd();
763
- }, index * 1000);
764
- });
765
- };
766
-
767
- window.demoCLIStatus = function() {
768
- console.log('%cšŸ“Š CLI Status Information', 'background: linear-gradient(135deg, #FF9800, #F57C00); color: white; padding: 8px 16px; border-radius: 6px; font-weight: bold;');
769
-
770
- const status = {
771
- version: '0.0.1',
772
- theme: 'Default',
773
- bannerType: 'SVG',
774
- logBuffer: '142 entries',
775
- performance: '⚔ Optimized',
776
- remoteEndpoints: '2 active',
777
- lastExport: '2024-01-15T10:30:00Z'
778
- };
779
-
780
- setTimeout(() => {
781
- console.table(status);
782
- console.log('%c🟢 All systems operational', 'background: linear-gradient(135deg, #4CAF50, #45a049); color: white; padding: 6px 12px; border-radius: 4px;');
783
- }, 1000);
784
- };
785
-
786
- window.showBundleSizes = function() {
787
- console.log('%cšŸ“¦ Bundle Size Information', 'background: linear-gradient(135deg, #9C27B0, #7B1FA2); color: white; padding: 8px 16px; border-radius: 6px; font-weight: bold;');
788
-
789
- const bundleData = [
790
- { module: 'Full Library', size: '64KB', gzipped: '13KB', description: 'Complete feature set' },
791
- { module: 'Core Module', size: '6KB', gzipped: '2KB', description: 'Essential logging only' },
792
- { module: 'Styling Module', size: '26KB', gzipped: '5KB', description: 'Visual features & themes' },
793
- { module: 'Exports Module', size: '12KB', gzipped: '3KB', description: 'Data export & remote logging' }
794
- ];
795
-
796
- setTimeout(() => {
797
- console.table(bundleData);
798
- console.log('%cšŸ’” Use selective imports to minimize bundle size!', 'background: linear-gradient(135deg, #00C851, #00E676); color: white; padding: 6px 12px; border-radius: 4px;');
799
- }, 500);
800
- };
801
-
802
- window.showModularImports = function() {
803
- console.log('%cšŸ”§ Modular Import Examples', 'background: linear-gradient(135deg, #4CAF50, #45a049); color: white; padding: 8px 16px; border-radius: 6px; font-weight: bold;');
804
-
805
- const importExamples = `
806
- // šŸ“¦ Full library (64KB)
807
- import { Logger } from '@mks2508/better-logger';
808
-
809
- // šŸš€ Core only (6KB)
810
- import { Logger } from '@mks2508/better-logger/core';
811
-
812
- // šŸŽØ Styling features (26KB)
813
- import { setTheme, logWithSVG } from '@mks2508/better-logger/styling';
814
-
815
- // šŸ“¤ Export features (12KB)
816
- import { ExportLogger } from '@mks2508/better-logger/exports';
817
-
818
- // šŸŽÆ Mix and match
819
- import { Logger } from '@mks2508/better-logger/core';
820
- import { setTheme } from '@mks2508/better-logger/styling';
821
- `;
822
-
823
- setTimeout(() => {
824
- console.log('%c' + importExamples, 'background: #f8f9fa; color: #333; padding: 15px; border-radius: 8px; font-family: monospace; line-height: 1.6;');
825
- }, 500);
826
- };
827
-
828
- window.showCompatibility = function() {
829
- console.log('%c🌐 Browser Compatibility', 'background: linear-gradient(135deg, #2196F3, #1976D2); color: white; padding: 8px 16px; border-radius: 6px; font-weight: bold;');
830
-
831
- const compatibility = [
832
- { feature: 'CSS Styling', chrome: 'āœ…', firefox: 'āœ…', safari: 'āœ…', node: 'āŒ' },
833
- { feature: 'SVG Backgrounds', chrome: 'āœ…', firefox: 'āœ…', safari: 'āœ…', node: 'āŒ' },
834
- { feature: 'Animations', chrome: 'āœ…', firefox: 'āœ…', safari: 'āœ…', node: 'āŒ' },
835
- { feature: 'Unicode Banners', chrome: 'āœ…', firefox: 'āœ…', safari: 'āœ…', node: 'āœ…' },
836
- { feature: 'Performance API', chrome: 'āœ…', firefox: 'āœ…', safari: 'āœ…', node: 'āœ…' },
837
- { feature: 'Core Logging', chrome: 'āœ…', firefox: 'āœ…', safari: 'āœ…', node: 'āœ…' }
838
- ];
839
-
840
- setTimeout(() => {
841
- console.table(compatibility);
842
- console.log('%cšŸ’” Automatic fallbacks for Node.js environments', 'background: linear-gradient(135deg, #00C851, #00E676); color: white; padding: 6px 12px; border-radius: 4px;');
843
- }, 500);
844
- };
845
- </script>
846
- </body>
847
- </html>