@mks2508/better-logger 0.14.0-alpha.2 ā 0.18.2-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +50 -244
- package/dist/Logger.d.ts +662 -202
- package/dist/Logger.d.ts.map +1 -1
- package/dist/ScopedLogger.d.ts +434 -175
- package/dist/ScopedLogger.d.ts.map +1 -1
- package/dist/chunks/HookBridge-C-AvXmPD.cjs +504 -0
- package/dist/chunks/HookBridge-C-AvXmPD.cjs.map +1 -0
- package/dist/chunks/HookBridge-CI2PH79S.js +487 -0
- package/dist/chunks/HookBridge-CI2PH79S.js.map +1 -0
- package/dist/chunks/LogContext-BaMXleWj.cjs +105 -0
- package/dist/chunks/LogContext-BaMXleWj.cjs.map +1 -0
- package/dist/chunks/LogContext-DjlITOzZ.js +100 -0
- package/dist/chunks/LogContext-DjlITOzZ.js.map +1 -0
- package/dist/chunks/SerializerBridge-Ba43Mk7j.js +393 -0
- package/dist/chunks/SerializerBridge-Ba43Mk7j.js.map +1 -0
- package/dist/chunks/SerializerBridge-C4a9Z37F.cjs +410 -0
- package/dist/chunks/SerializerBridge-C4a9Z37F.cjs.map +1 -0
- package/dist/chunks/StyleManager-DQ6UNRB-.cjs +118 -0
- package/dist/chunks/StyleManager-DQ6UNRB-.cjs.map +1 -0
- package/dist/chunks/StyleManager-DjwAYbxE.js +113 -0
- package/dist/chunks/StyleManager-DjwAYbxE.js.map +1 -0
- package/dist/chunks/core-Blfi2klP.js +31 -0
- package/dist/chunks/core-Blfi2klP.js.map +1 -0
- package/dist/chunks/core-CqS_UBzJ.cjs +36 -0
- package/dist/chunks/core-CqS_UBzJ.cjs.map +1 -0
- package/dist/chunks/environment-detector-7NvnYUfr.js +110 -0
- package/dist/chunks/environment-detector-7NvnYUfr.js.map +1 -0
- package/dist/chunks/environment-detector-D-tHkKWA.cjs +163 -0
- package/dist/chunks/environment-detector-D-tHkKWA.cjs.map +1 -0
- package/dist/chunks/server-fallback-CaCPjWby.cjs +119 -0
- package/dist/chunks/server-fallback-CaCPjWby.cjs.map +1 -0
- package/dist/chunks/server-fallback-jj0T6XaK.js +114 -0
- package/dist/chunks/server-fallback-jj0T6XaK.js.map +1 -0
- package/dist/chunks/spinner-BHyYEXsM.cjs +1029 -0
- package/dist/chunks/spinner-BHyYEXsM.cjs.map +1 -0
- package/dist/chunks/spinner-BtkwpzYv.js +982 -0
- package/dist/chunks/spinner-BtkwpzYv.js.map +1 -0
- package/dist/chunks/styling-CRw3KQW4.js +1592 -0
- package/dist/chunks/styling-CRw3KQW4.js.map +1 -0
- package/dist/chunks/styling-Cel2wPRy.cjs +1645 -0
- package/dist/chunks/styling-Cel2wPRy.cjs.map +1 -0
- package/dist/chunks/transports-BGfwwakw.js +1237 -0
- package/dist/chunks/transports-BGfwwakw.js.map +1 -0
- package/dist/chunks/transports-yK6CL0Ml.cjs +1278 -0
- package/dist/chunks/transports-yK6CL0Ml.cjs.map +1 -0
- package/dist/chunks/utils-W_cxqriN.cjs +705 -0
- package/dist/chunks/utils-W_cxqriN.cjs.map +1 -0
- package/dist/chunks/utils-tKfBAWUM.js +586 -0
- package/dist/chunks/utils-tKfBAWUM.js.map +1 -0
- package/dist/cli/CommandProcessor.d.ts +166 -19
- package/dist/cli/CommandProcessor.d.ts.map +1 -1
- package/dist/cli/commands/ConfigCommand.d.ts +36 -1
- package/dist/cli/commands/ConfigCommand.d.ts.map +1 -1
- package/dist/cli/commands/ExportCommand.d.ts +54 -26
- package/dist/cli/commands/ExportCommand.d.ts.map +1 -1
- package/dist/cli/commands/ThemeCommand.d.ts +62 -3
- package/dist/cli/commands/ThemeCommand.d.ts.map +1 -1
- package/dist/cli/help.d.ts +30 -2
- package/dist/cli/help.d.ts.map +1 -1
- package/dist/cli/index.d.ts +30 -4
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli-module.d.ts +13 -0
- package/dist/cli-module.d.ts.map +1 -0
- package/dist/cli.cjs +11 -0
- package/dist/cli.js +3 -0
- package/dist/constants.d.ts +16 -47
- package/dist/constants.d.ts.map +1 -1
- package/dist/context/LogContext.d.ts +245 -0
- package/dist/context/LogContext.d.ts.map +1 -0
- package/dist/context/index.d.ts +6 -0
- package/dist/context/index.d.ts.map +1 -0
- package/dist/context-module.d.ts +6 -0
- package/dist/context-module.d.ts.map +1 -0
- package/dist/context.cjs +3 -0
- package/dist/context.js +2 -0
- package/dist/core.cjs +304 -2
- package/dist/core.cjs.map +1 -1
- package/dist/core.d.ts +56 -34
- package/dist/core.d.ts.map +1 -1
- package/dist/core.js +281 -314
- package/dist/core.js.map +1 -1
- package/dist/hooks/HookBridge.d.ts +32 -0
- package/dist/hooks/HookBridge.d.ts.map +1 -0
- package/dist/hooks/HookManager.d.ts +319 -0
- package/dist/hooks/HookManager.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +7 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks-module.d.ts +7 -0
- package/dist/hooks-module.d.ts.map +1 -0
- package/dist/hooks.cjs +5 -0
- package/dist/hooks.js +2 -0
- package/dist/index.cjs +3402 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +42 -130
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3327 -158
- package/dist/index.js.map +1 -1
- package/dist/node-module.d.ts +10 -0
- package/dist/node-module.d.ts.map +1 -0
- package/dist/node.cjs +13 -0
- package/dist/node.cjs.map +1 -0
- package/dist/node.js +12 -0
- package/dist/node.js.map +1 -0
- package/dist/playground/TerminalBridge.d.ts +53 -0
- package/dist/playground/TerminalBridge.d.ts.map +1 -0
- package/dist/playground/box.d.ts +45 -0
- package/dist/playground/box.d.ts.map +1 -0
- package/dist/playground/cli-table.d.ts +50 -0
- package/dist/playground/cli-table.d.ts.map +1 -0
- package/dist/playground/divider.d.ts +29 -0
- package/dist/playground/divider.d.ts.map +1 -0
- package/dist/playground/header.d.ts +28 -0
- package/dist/playground/header.d.ts.map +1 -0
- package/dist/playground/index.d.ts +11 -0
- package/dist/playground/index.d.ts.map +1 -0
- package/dist/playground/server-fallback.d.ts +114 -0
- package/dist/playground/server-fallback.d.ts.map +1 -0
- package/dist/playground/spinner.d.ts +197 -0
- package/dist/playground/spinner.d.ts.map +1 -0
- package/dist/playground/step.d.ts +33 -0
- package/dist/playground/step.d.ts.map +1 -0
- package/dist/playground-module.d.ts +11 -0
- package/dist/playground-module.d.ts.map +1 -0
- package/dist/playground.cjs +9 -0
- package/dist/playground.js +2 -0
- package/dist/serializers/SerializerBridge.d.ts +28 -0
- package/dist/serializers/SerializerBridge.d.ts.map +1 -0
- package/dist/serializers/SerializerRegistry.d.ts +252 -0
- package/dist/serializers/SerializerRegistry.d.ts.map +1 -0
- package/dist/serializers/index.d.ts +7 -0
- package/dist/serializers/index.d.ts.map +1 -0
- package/dist/serializers-module.d.ts +7 -0
- package/dist/serializers-module.d.ts.map +1 -0
- package/dist/serializers.cjs +5 -0
- package/dist/serializers.js +2 -0
- package/dist/styles/StyleManager.d.ts +190 -0
- package/dist/styles/StyleManager.d.ts.map +1 -0
- package/dist/styles/index.d.ts +7 -0
- package/dist/styles/index.d.ts.map +1 -0
- package/dist/styles-module.d.ts +7 -0
- package/dist/styles-module.d.ts.map +1 -0
- package/dist/styles.cjs +7 -0
- package/dist/styles.js +3 -0
- package/dist/styling/SmartPresets.d.ts +100 -6
- package/dist/styling/SmartPresets.d.ts.map +1 -1
- package/dist/styling/StyleBuilder.d.ts +453 -32
- package/dist/styling/StyleBuilder.d.ts.map +1 -1
- package/dist/styling/banners.d.ts +85 -5
- package/dist/styling/banners.d.ts.map +1 -1
- package/dist/styling/index.d.ts +8 -3
- package/dist/styling/index.d.ts.map +1 -1
- package/dist/styling/themes.d.ts +41 -2
- package/dist/styling/themes.d.ts.map +1 -1
- package/dist/terminal/color-converter.d.ts +73 -0
- package/dist/terminal/color-converter.d.ts.map +1 -0
- package/dist/terminal/formatter.d.ts +23 -0
- package/dist/terminal/formatter.d.ts.map +1 -0
- package/dist/transports/ConsoleTransport.d.ts +104 -0
- package/dist/transports/ConsoleTransport.d.ts.map +1 -0
- package/dist/transports/FileTransport.d.ts +137 -0
- package/dist/transports/FileTransport.d.ts.map +1 -0
- package/dist/transports/HttpTransport.d.ts +180 -0
- package/dist/transports/HttpTransport.d.ts.map +1 -0
- package/dist/transports/OtlpTransport.d.ts +165 -0
- package/dist/transports/OtlpTransport.d.ts.map +1 -0
- package/dist/transports/TransportBridge.d.ts +43 -0
- package/dist/transports/TransportBridge.d.ts.map +1 -0
- package/dist/transports/TransportManager.d.ts +251 -0
- package/dist/transports/TransportManager.d.ts.map +1 -0
- package/dist/transports/index.d.ts +6 -0
- package/dist/transports/index.d.ts.map +1 -0
- package/dist/transports-module.d.ts +10 -0
- package/dist/transports-module.d.ts.map +1 -0
- package/dist/transports.cjs +7 -0
- package/dist/transports.js +2 -0
- package/dist/types/core.d.ts +295 -17
- package/dist/types/core.d.ts.map +1 -1
- package/dist/types/handlers.d.ts +0 -67
- package/dist/types/handlers.d.ts.map +1 -1
- package/dist/types/hooks.d.ts +138 -0
- package/dist/types/hooks.d.ts.map +1 -0
- package/dist/types/index.d.ts +7 -3
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/serializers.d.ts +97 -0
- package/dist/types/serializers.d.ts.map +1 -0
- package/dist/types/transports.d.ts +132 -0
- package/dist/types/transports.d.ts.map +1 -0
- package/dist/utils/ansi-colors.d.ts +115 -0
- package/dist/utils/ansi-colors.d.ts.map +1 -0
- package/dist/utils/environment-detector.d.ts +53 -0
- package/dist/utils/environment-detector.d.ts.map +1 -0
- package/dist/utils/formatting.d.ts +9 -8
- package/dist/utils/formatting.d.ts.map +1 -1
- package/dist/utils/index.d.ts +3 -2
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/output.d.ts +14 -17
- package/dist/utils/output.d.ts.map +1 -1
- package/dist/utils/stackTrace.d.ts +2 -2
- package/dist/utils/stackTrace.d.ts.map +1 -1
- package/dist/utils/timestamps.d.ts +0 -12
- package/dist/utils/timestamps.d.ts.map +1 -1
- package/package.json +95 -21
- package/.claude/settings.local.json +0 -39
- package/.github/workflows/ci-quality.yml +0 -357
- package/.github/workflows/docs-demo.yml +0 -119
- package/.github/workflows/releases-core.yml +0 -512
- package/.github/workflows/releases-full.yml +0 -582
- package/.github/workflows-backup/ci.yml +0 -221
- package/.github/workflows-backup/nightly.yml +0 -196
- package/.github/workflows-backup/release-optimized.yml +0 -373
- package/.github/workflows-backup/release.yml +0 -269
- package/.release-notes-0.2.0.md +0 -129
- package/.yamllint +0 -28
- package/CHANGELOG.json +0 -865
- package/CLAUDE.md +0 -204
- package/bun.lock +0 -323
- package/demo.html +0 -847
- package/dist/.tsbuildinfo +0 -1
- package/dist/Logger.js +0 -1124
- package/dist/ScopedLogger.js +0 -426
- package/dist/chunks/Logger-Crw1woqR.js +0 -3464
- package/dist/chunks/Logger-Crw1woqR.js.map +0 -1
- package/dist/chunks/Logger-D_p3xnbq.js +0 -2
- package/dist/chunks/Logger-D_p3xnbq.js.map +0 -1
- package/dist/chunks/RemoteLogHandler-CjWpWZGl.js +0 -33
- package/dist/chunks/RemoteLogHandler-CjWpWZGl.js.map +0 -1
- package/dist/chunks/RemoteLogHandler-ymkQ97xl.js +0 -2
- package/dist/chunks/RemoteLogHandler-ymkQ97xl.js.map +0 -1
- package/dist/chunks/environment-Bxbnw4pd.js +0 -544
- package/dist/chunks/environment-Bxbnw4pd.js.map +0 -1
- package/dist/chunks/environment-Dm66zOML.js +0 -4
- package/dist/chunks/environment-Dm66zOML.js.map +0 -1
- package/dist/chunks/formatting-C0riPC5_.js +0 -95
- package/dist/chunks/formatting-C0riPC5_.js.map +0 -1
- package/dist/chunks/formatting-DNCAV66-.js +0 -2
- package/dist/chunks/formatting-DNCAV66-.js.map +0 -1
- package/dist/cli/CommandProcessor.js +0 -184
- package/dist/cli/commands/ConfigCommand.js +0 -88
- package/dist/cli/commands/ExportCommand.js +0 -243
- package/dist/cli/commands/HistoryCommand.d.ts +0 -50
- package/dist/cli/commands/HistoryCommand.d.ts.map +0 -1
- package/dist/cli/commands/HistoryCommand.js +0 -96
- package/dist/cli/commands/StatusCommand.d.ts +0 -33
- package/dist/cli/commands/StatusCommand.d.ts.map +0 -1
- package/dist/cli/commands/StatusCommand.js +0 -93
- package/dist/cli/commands/ThemeCommand.js +0 -79
- package/dist/cli/help.js +0 -118
- package/dist/cli/index.js +0 -46
- package/dist/constants.js +0 -159
- package/dist/example.d.ts +0 -18
- package/dist/example.d.ts.map +0 -1
- package/dist/example.js +0 -154
- package/dist/exports-module.d.ts +0 -203
- package/dist/exports-module.d.ts.map +0 -1
- package/dist/exports-module.js +0 -260
- package/dist/exports.cjs +0 -2
- package/dist/exports.cjs.map +0 -1
- package/dist/exports.js +0 -238
- package/dist/exports.js.map +0 -1
- package/dist/handlers/AnalyticsLogHandler.d.ts +0 -11
- package/dist/handlers/AnalyticsLogHandler.d.ts.map +0 -1
- package/dist/handlers/AnalyticsLogHandler.js +0 -19
- package/dist/handlers/ExportLogHandler.d.ts +0 -103
- package/dist/handlers/ExportLogHandler.d.ts.map +0 -1
- package/dist/handlers/ExportLogHandler.js +0 -516
- package/dist/handlers/FileLogHandler.d.ts +0 -36
- package/dist/handlers/FileLogHandler.d.ts.map +0 -1
- package/dist/handlers/FileLogHandler.js +0 -156
- package/dist/handlers/RemoteLogHandler.d.ts +0 -14
- package/dist/handlers/RemoteLogHandler.d.ts.map +0 -1
- package/dist/handlers/RemoteLogHandler.js +0 -37
- package/dist/handlers/index.d.ts +0 -8
- package/dist/handlers/index.d.ts.map +0 -1
- package/dist/handlers/index.js +0 -7
- package/dist/main.d.ts +0 -2
- package/dist/main.d.ts.map +0 -1
- package/dist/main.js +0 -139
- package/dist/styling/LogStyleBuilder.d.ts +0 -149
- package/dist/styling/LogStyleBuilder.d.ts.map +0 -1
- package/dist/styling/LogStyleBuilder.js +0 -289
- package/dist/styling/SemanticStyles.d.ts +0 -181
- package/dist/styling/SemanticStyles.d.ts.map +0 -1
- package/dist/styling/SemanticStyles.js +0 -339
- package/dist/styling/SmartPresets.js +0 -276
- package/dist/styling/StyleBuilder.js +0 -280
- package/dist/styling/banners.js +0 -155
- package/dist/styling/index.js +0 -9
- package/dist/styling/themes.js +0 -231
- package/dist/styling-module.d.ts +0 -185
- package/dist/styling-module.d.ts.map +0 -1
- package/dist/styling-module.js +0 -199
- package/dist/styling.cjs +0 -2
- package/dist/styling.cjs.map +0 -1
- package/dist/styling.js +0 -146
- package/dist/styling.js.map +0 -1
- package/dist/types/Logger.d.ts +0 -700
- package/dist/types/Logger.d.ts.map +0 -1
- package/dist/types/ScopedLogger.d.ts +0 -310
- package/dist/types/ScopedLogger.d.ts.map +0 -1
- package/dist/types/cli/CommandProcessor.d.ts +0 -100
- package/dist/types/cli/CommandProcessor.d.ts.map +0 -1
- package/dist/types/cli/commands/ConfigCommand.d.ts +0 -14
- package/dist/types/cli/commands/ConfigCommand.d.ts.map +0 -1
- package/dist/types/cli/commands/ExportCommand.d.ts +0 -48
- package/dist/types/cli/commands/ExportCommand.d.ts.map +0 -1
- package/dist/types/cli/commands/HistoryCommand.d.ts +0 -47
- package/dist/types/cli/commands/HistoryCommand.d.ts.map +0 -1
- package/dist/types/cli/commands/StatusCommand.d.ts +0 -30
- package/dist/types/cli/commands/StatusCommand.d.ts.map +0 -1
- package/dist/types/cli/commands/ThemeCommand.d.ts +0 -30
- package/dist/types/cli/commands/ThemeCommand.d.ts.map +0 -1
- package/dist/types/cli/help.d.ts +0 -12
- package/dist/types/cli/help.d.ts.map +0 -1
- package/dist/types/cli/index.d.ts +0 -15
- package/dist/types/cli/index.d.ts.map +0 -1
- package/dist/types/constants.d.ts +0 -119
- package/dist/types/constants.d.ts.map +0 -1
- package/dist/types/core.js +0 -28
- package/dist/types/example.d.ts +0 -18
- package/dist/types/example.d.ts.map +0 -1
- package/dist/types/exports-module.d.ts +0 -196
- package/dist/types/exports-module.d.ts.map +0 -1
- package/dist/types/handlers/AnalyticsLogHandler.d.ts +0 -8
- package/dist/types/handlers/AnalyticsLogHandler.d.ts.map +0 -1
- package/dist/types/handlers/ExportLogHandler.d.ts +0 -100
- package/dist/types/handlers/ExportLogHandler.d.ts.map +0 -1
- package/dist/types/handlers/FileLogHandler.d.ts +0 -33
- package/dist/types/handlers/FileLogHandler.d.ts.map +0 -1
- package/dist/types/handlers/RemoteLogHandler.d.ts +0 -11
- package/dist/types/handlers/RemoteLogHandler.d.ts.map +0 -1
- package/dist/types/handlers/index.d.ts +0 -8
- package/dist/types/handlers/index.d.ts.map +0 -1
- package/dist/types/handlers.js +0 -4
- package/dist/types/index.js +0 -4
- package/dist/types/main.d.ts +0 -2
- package/dist/types/main.d.ts.map +0 -1
- package/dist/types/styling/LogStyleBuilder.d.ts +0 -146
- package/dist/types/styling/LogStyleBuilder.d.ts.map +0 -1
- package/dist/types/styling/SemanticStyles.d.ts +0 -178
- package/dist/types/styling/SemanticStyles.d.ts.map +0 -1
- package/dist/types/styling/SmartPresets.d.ts +0 -22
- package/dist/types/styling/SmartPresets.d.ts.map +0 -1
- package/dist/types/styling/StyleBuilder.d.ts +0 -140
- package/dist/types/styling/StyleBuilder.d.ts.map +0 -1
- package/dist/types/styling/banners.d.ts +0 -42
- package/dist/types/styling/banners.d.ts.map +0 -1
- package/dist/types/styling/index.d.ts +0 -10
- package/dist/types/styling/index.d.ts.map +0 -1
- package/dist/types/styling/themes.d.ts +0 -7
- package/dist/types/styling/themes.d.ts.map +0 -1
- package/dist/types/styling-module.d.ts +0 -178
- package/dist/types/styling-module.d.ts.map +0 -1
- package/dist/types/types/core.d.ts +0 -221
- package/dist/types/types/core.d.ts.map +0 -1
- package/dist/types/types/handlers.d.ts +0 -85
- package/dist/types/types/handlers.d.ts.map +0 -1
- package/dist/types/types/index.d.ts +0 -7
- package/dist/types/types/index.d.ts.map +0 -1
- package/dist/types/utils/environment.d.ts +0 -47
- package/dist/types/utils/environment.d.ts.map +0 -1
- package/dist/types/utils/formatting.d.ts +0 -37
- package/dist/types/utils/formatting.d.ts.map +0 -1
- package/dist/types/utils/index.d.ts +0 -7
- package/dist/types/utils/index.d.ts.map +0 -1
- package/dist/types/utils/opentui-detection.d.ts +0 -34
- package/dist/types/utils/opentui-detection.d.ts.map +0 -1
- package/dist/types/utils/output.d.ts +0 -41
- package/dist/types/utils/output.d.ts.map +0 -1
- package/dist/types/utils/stackTrace.d.ts +0 -6
- package/dist/types/utils/stackTrace.d.ts.map +0 -1
- package/dist/types/utils/timestamps.d.ts +0 -20
- package/dist/types/utils/timestamps.d.ts.map +0 -1
- package/dist/utils/environment.d.ts +0 -47
- package/dist/utils/environment.d.ts.map +0 -1
- package/dist/utils/environment.js +0 -85
- package/dist/utils/formatting.js +0 -117
- package/dist/utils/index.js +0 -6
- package/dist/utils/opentui-detection.d.ts +0 -34
- package/dist/utils/opentui-detection.d.ts.map +0 -1
- package/dist/utils/opentui-detection.js +0 -116
- package/dist/utils/output.js +0 -150
- package/dist/utils/stackTrace.js +0 -81
- package/dist/utils/timestamps.js +0 -71
- package/dist/vite.svg +0 -1
- package/docs/API.md +0 -691
- package/docs/CORE.md +0 -264
- package/docs/DEVELOPMENT.md +0 -731
- package/docs/EXPORTS.md +0 -467
- package/docs/PACKAGES.md +0 -244
- package/docs/STYLING.md +0 -405
- package/docs/_config.yml +0 -36
- package/docs/index.md +0 -179
- package/examples/README.md +0 -208
- package/examples/basic-logging.js +0 -75
- package/examples/data-export.js +0 -234
- package/examples/package.json +0 -16
- package/examples/performance-timing.js +0 -170
- package/examples/simplified-api.js +0 -124
- package/examples/styling-themes.js +0 -207
- package/index.html +0 -358
- package/packages/core/package.json +0 -57
- package/packages/exports/package.json +0 -41
- package/packages/nodejs-opentui/README.md +0 -232
- package/packages/nodejs-opentui/package.json +0 -72
- package/packages/nodejs-opentui/src/LogRenderer.ts +0 -171
- package/packages/nodejs-opentui/src/OpenTUILogHandler.ts +0 -178
- package/packages/nodejs-opentui/src/components/LogBadge.tsx +0 -131
- package/packages/nodejs-opentui/src/index.ts +0 -133
- package/packages/nodejs-opentui/src/types.ts +0 -158
- package/packages/nodejs-opentui/tsconfig.json +0 -20
- package/packages/styling/package.json +0 -41
- package/project-utils/README.md +0 -172
- package/project-utils/auto-release-gemini.ts +0 -1193
- package/project-utils/auto-release-ui.ts +0 -1329
- package/project-utils/commit-generator.ts +0 -1385
- package/project-utils/commit-ui.ts +0 -264
- package/project-utils/git-utils.ts +0 -199
- package/project-utils/github-release-manager.ts +0 -466
- package/project-utils/project-config.ts +0 -260
- package/project-utils/prompt-templates.js +0 -345
- package/project-utils/prompt-templates.ts +0 -422
- package/project-utils/version-manager.ts +0 -1078
- package/public/vite.svg +0 -1
- package/src/Logger.ts +0 -1276
- package/src/ScopedLogger.ts +0 -454
- package/src/cli/CommandProcessor.ts +0 -248
- package/src/cli/commands/ConfigCommand.ts +0 -93
- package/src/cli/commands/ExportCommand.ts +0 -276
- package/src/cli/commands/HistoryCommand.ts +0 -117
- package/src/cli/commands/StatusCommand.ts +0 -112
- package/src/cli/commands/ThemeCommand.ts +0 -88
- package/src/cli/help.ts +0 -127
- package/src/cli/index.ts +0 -71
- package/src/constants.ts +0 -171
- package/src/core.ts +0 -393
- package/src/example.ts +0 -210
- package/src/exports-module.ts +0 -311
- package/src/handlers/AnalyticsLogHandler.ts +0 -22
- package/src/handlers/ExportLogHandler.ts +0 -609
- package/src/handlers/FileLogHandler.ts +0 -169
- package/src/handlers/RemoteLogHandler.ts +0 -42
- package/src/handlers/index.ts +0 -8
- package/src/index.ts +0 -209
- package/src/main.ts +0 -196
- package/src/style.css +0 -96
- package/src/styling/LogStyleBuilder.ts +0 -355
- package/src/styling/SemanticStyles.ts +0 -380
- package/src/styling/SmartPresets.ts +0 -288
- package/src/styling/StyleBuilder.ts +0 -319
- package/src/styling/banners.ts +0 -168
- package/src/styling/index.ts +0 -27
- package/src/styling/themes.ts +0 -235
- package/src/styling-module.ts +0 -244
- package/src/types/core.ts +0 -236
- package/src/types/handlers.ts +0 -95
- package/src/types/index.ts +0 -35
- package/src/typescript.svg +0 -1
- package/src/utils/environment.ts +0 -94
- package/src/utils/formatting.ts +0 -142
- package/src/utils/index.ts +0 -21
- package/src/utils/opentui-detection.ts +0 -138
- package/src/utils/output.ts +0 -185
- package/src/utils/stackTrace.ts +0 -95
- package/src/utils/timestamps.ts +0 -80
- package/src/vite-env.d.ts +0 -1
- package/test-core-browser.html +0 -237
- package/test-core-node.js +0 -63
- package/tests/test-conflict-resolution.ts +0 -391
- package/tests/validate-workflows.sh +0 -131
- package/tests/yaml-autofix.sh +0 -146
- package/tsconfig.json +0 -50
- package/vite.config.ts +0 -223
package/dist/cli/help.js
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview Help system for Advanced Logger CLI
|
|
3
|
-
*/
|
|
4
|
-
import { StyleBuilder } from '../styling/index.js';
|
|
5
|
-
/**
|
|
6
|
-
* Help command - show comprehensive CLI help
|
|
7
|
-
*/
|
|
8
|
-
export class HelpCommand {
|
|
9
|
-
name = 'help';
|
|
10
|
-
description = 'Show CLI help and available commands';
|
|
11
|
-
usage = '/help [command]';
|
|
12
|
-
execute(_args, logger) {
|
|
13
|
-
const helpStyle = new StyleBuilder()
|
|
14
|
-
.bg('linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%)')
|
|
15
|
-
.color('#495057')
|
|
16
|
-
.padding('15px 20px')
|
|
17
|
-
.rounded('8px')
|
|
18
|
-
.border('1px solid #dee2e6')
|
|
19
|
-
.font('Monaco, Consolas, monospace')
|
|
20
|
-
.size('13px')
|
|
21
|
-
.build();
|
|
22
|
-
const helpText = `
|
|
23
|
-
āāāāāāāāāāāāāāāā ADVANCED LOGGER CLI COMMANDS āāāāāāāāāāāāāāāāāā®
|
|
24
|
-
ā ā
|
|
25
|
-
ā CONFIGURATION ā
|
|
26
|
-
ā /config Show current configuration ā
|
|
27
|
-
ā /config {json} Apply JSON configuration ā
|
|
28
|
-
ā /config key=val Apply key-value configuration ā
|
|
29
|
-
ā /themes Show available themes ā
|
|
30
|
-
ā /banners Show available banner types ā
|
|
31
|
-
ā /banner [type] Change/show banner type ā
|
|
32
|
-
ā /status Show logger status & buffer stats ā
|
|
33
|
-
ā /demo Show feature demonstration ā
|
|
34
|
-
ā /reset Reset to default configuration ā
|
|
35
|
-
ā ā
|
|
36
|
-
ā EXPORT & CLIPBOARD ā
|
|
37
|
-
ā /export <format> Export logs (json|csv|md|plain|html) ā
|
|
38
|
-
ā /copy <format> Copy logs to clipboard ā
|
|
39
|
-
ā /buffer-size N Set log buffer size ā
|
|
40
|
-
ā /buffer-info Show buffer statistics ā
|
|
41
|
-
ā /clear-buffer Clear stored logs ā
|
|
42
|
-
ā ā
|
|
43
|
-
ā EXPORT FILTERS (for export/copy commands) ā
|
|
44
|
-
ā --level error,warn Filter by log levels ā
|
|
45
|
-
ā --since 2h Logs from last 2 hours ā
|
|
46
|
-
ā --until 1h Logs until 1 hour ago ā
|
|
47
|
-
ā --prefix API,DB Filter by prefixes ā
|
|
48
|
-
ā --exclude-prefix INT Exclude prefixes ā
|
|
49
|
-
ā --last 50 Last 50 logs only ā
|
|
50
|
-
ā --first 25 First 25 logs only ā
|
|
51
|
-
ā --search "error" Search in log messages ā
|
|
52
|
-
ā --with-stack Only logs with stack traces ā
|
|
53
|
-
ā --errors-only Only error + critical logs ā
|
|
54
|
-
ā --group-by level Group by level/prefix/hour ā
|
|
55
|
-
ā ā
|
|
56
|
-
ā EXPORT OPTIONS ā
|
|
57
|
-
ā --minimal Minimal output format ā
|
|
58
|
-
ā --compact Remove extra whitespace ā
|
|
59
|
-
ā --styled Include styling (HTML format) ā
|
|
60
|
-
ā ā
|
|
61
|
-
āāāāāāāāāāāāāāāāāāāāā CONFIGURATION OPTIONS āāāāāāāāāāāāāāāāāā¤
|
|
62
|
-
ā ā
|
|
63
|
-
ā theme: default | dark | light | neon | minimal | cyberpunkā
|
|
64
|
-
ā bannerType: simple | ascii | unicode | svg | animated ā
|
|
65
|
-
ā verbosity: debug | info | warn | error | critical | silentā
|
|
66
|
-
ā enableColors: true | false ā
|
|
67
|
-
ā enableTimestamps: true | false ā
|
|
68
|
-
ā enableStackTrace: true | false ā
|
|
69
|
-
ā globalPrefix: "string" ā
|
|
70
|
-
ā bufferSize: number (50-10000) ā
|
|
71
|
-
ā ā
|
|
72
|
-
āāāāāāāāāāāāāāāāāāāāāāāāā EXAMPLES āāāāāāāāāāāāāāāāāāāāāāāāāāā¤
|
|
73
|
-
ā ā
|
|
74
|
-
ā Basic Configuration: ā
|
|
75
|
-
ā /config {"theme":"dark","verbosity":"debug"} ā
|
|
76
|
-
ā /config theme=neon,bufferSize=2000 ā
|
|
77
|
-
ā /banner animated Change to animated banner ā
|
|
78
|
-
ā ā
|
|
79
|
-
ā Export Examples: ā
|
|
80
|
-
ā /export json --level=error,warn --last=25 ā
|
|
81
|
-
ā /export csv --since=2h --prefix=API ā
|
|
82
|
-
ā /export markdown --group-by=level --errors-only ā
|
|
83
|
-
ā /export html --styled --since=1h ā
|
|
84
|
-
ā ā
|
|
85
|
-
ā Clipboard Examples: ā
|
|
86
|
-
ā /copy plain --minimal --last=10 ā
|
|
87
|
-
ā /copy json --search="authentication" --compact ā
|
|
88
|
-
ā /copy csv --since=30m --exclude-prefix=DEBUG ā
|
|
89
|
-
ā ā
|
|
90
|
-
ā Buffer Management: ā
|
|
91
|
-
ā /buffer-size 5000 Increase buffer to 5000 logs ā
|
|
92
|
-
ā /buffer-info Show detailed buffer statistics ā
|
|
93
|
-
ā /clear-buffer Clear all stored logs ā
|
|
94
|
-
ā ā
|
|
95
|
-
ā Time Formats: ā
|
|
96
|
-
ā --since=2h 2 hours ago ā
|
|
97
|
-
ā --since=30m 30 minutes ago ā
|
|
98
|
-
ā --since=1d 1 day ago ā
|
|
99
|
-
ā --since="2024-01-01T10:00:00Z" Specific ISO date ā
|
|
100
|
-
ā ā
|
|
101
|
-
ā°āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāÆ`;
|
|
102
|
-
console.log(`%c${helpText}`, helpStyle);
|
|
103
|
-
// Show quick tips
|
|
104
|
-
logger.group('š” Quick Tips');
|
|
105
|
-
const tips = [
|
|
106
|
-
'Use /demo to see all logger features in action',
|
|
107
|
-
'Logs are automatically stored in a circular buffer for export',
|
|
108
|
-
'Export formats: JSON (structured), CSV (Excel), Markdown (readable), Plain (simple), HTML (styled)',
|
|
109
|
-
'Time filters support relative (2h, 30m) and absolute (ISO) formats',
|
|
110
|
-
'Combine multiple filters: /export json --level=error --since=1h --search="auth"',
|
|
111
|
-
'Use /copy for quick clipboard access instead of /export'
|
|
112
|
-
];
|
|
113
|
-
tips.forEach(tip => {
|
|
114
|
-
logger.info(`⢠${tip}`);
|
|
115
|
-
});
|
|
116
|
-
logger.groupEnd();
|
|
117
|
-
}
|
|
118
|
-
}
|
package/dist/cli/index.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview CLI system exports for Advanced Logger
|
|
3
|
-
*/
|
|
4
|
-
// Core CLI system
|
|
5
|
-
export { CommandProcessor } from './CommandProcessor.js';
|
|
6
|
-
import { CommandProcessor } from './CommandProcessor.js';
|
|
7
|
-
// Commands
|
|
8
|
-
export { ConfigCommand } from './commands/ConfigCommand.js';
|
|
9
|
-
export { ThemesCommand, BannersCommand, BannerCommand } from './commands/ThemeCommand.js';
|
|
10
|
-
export { StatusCommand, ResetCommand, DemoCommand } from './commands/StatusCommand.js';
|
|
11
|
-
export { ExportCommand, CopyCommand, BufferSizeCommand, ClearBufferCommand, BufferInfoCommand } from './commands/ExportCommand.js';
|
|
12
|
-
// Help system
|
|
13
|
-
export { HelpCommand } from './help.js';
|
|
14
|
-
// Import all commands
|
|
15
|
-
import { HelpCommand } from './help.js';
|
|
16
|
-
import { ConfigCommand } from './commands/ConfigCommand.js';
|
|
17
|
-
import { ThemesCommand, BannersCommand, BannerCommand } from './commands/ThemeCommand.js';
|
|
18
|
-
import { StatusCommand, ResetCommand, DemoCommand } from './commands/StatusCommand.js';
|
|
19
|
-
import { ExportCommand, CopyCommand, BufferSizeCommand, ClearBufferCommand, BufferInfoCommand } from './commands/ExportCommand.js';
|
|
20
|
-
import { HistoryCommand, ClearHistoryCommand, InteractiveCommand, PluginsCommand } from './commands/HistoryCommand.js';
|
|
21
|
-
/**
|
|
22
|
-
* Create and configure default CLI processor
|
|
23
|
-
*/
|
|
24
|
-
export function createDefaultCLI() {
|
|
25
|
-
const processor = new CommandProcessor();
|
|
26
|
-
// Register all default commands
|
|
27
|
-
processor.registerCommand(new HelpCommand());
|
|
28
|
-
processor.registerCommand(new ConfigCommand());
|
|
29
|
-
processor.registerCommand(new ThemesCommand());
|
|
30
|
-
processor.registerCommand(new BannersCommand());
|
|
31
|
-
processor.registerCommand(new BannerCommand());
|
|
32
|
-
processor.registerCommand(new StatusCommand());
|
|
33
|
-
processor.registerCommand(new ResetCommand());
|
|
34
|
-
processor.registerCommand(new DemoCommand());
|
|
35
|
-
processor.registerCommand(new ExportCommand());
|
|
36
|
-
processor.registerCommand(new CopyCommand());
|
|
37
|
-
processor.registerCommand(new BufferSizeCommand());
|
|
38
|
-
processor.registerCommand(new ClearBufferCommand());
|
|
39
|
-
processor.registerCommand(new BufferInfoCommand());
|
|
40
|
-
// Register new enhanced commands
|
|
41
|
-
processor.registerCommand(new HistoryCommand());
|
|
42
|
-
processor.registerCommand(new ClearHistoryCommand());
|
|
43
|
-
processor.registerCommand(new InteractiveCommand());
|
|
44
|
-
processor.registerCommand(new PluginsCommand());
|
|
45
|
-
return processor;
|
|
46
|
-
}
|
package/dist/constants.js
DELETED
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview Global constants for Advanced Logger
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Default configuration values
|
|
6
|
-
*/
|
|
7
|
-
export const DEFAULT_CONFIG = {
|
|
8
|
-
verbosity: 'info',
|
|
9
|
-
enableColors: true,
|
|
10
|
-
enableTimestamps: true,
|
|
11
|
-
enableStackTrace: true,
|
|
12
|
-
theme: 'default',
|
|
13
|
-
bannerType: 'simple',
|
|
14
|
-
bufferSize: 1000,
|
|
15
|
-
autoDetectTheme: true,
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* Basic level styles for core module (minimal CSS styling)
|
|
19
|
-
*/
|
|
20
|
-
export const LEVEL_STYLES = {
|
|
21
|
-
debug: {
|
|
22
|
-
emoji: 'š',
|
|
23
|
-
label: 'DEBUG',
|
|
24
|
-
background: 'linear-gradient(90deg, #6c757d, #495057)',
|
|
25
|
-
color: '#ffffff',
|
|
26
|
-
border: '1px solid #6c757d',
|
|
27
|
-
shadow: '0 2px 4px rgba(108, 117, 125, 0.3)'
|
|
28
|
-
},
|
|
29
|
-
info: {
|
|
30
|
-
emoji: 'ā¹ļø',
|
|
31
|
-
label: 'INFO',
|
|
32
|
-
background: 'linear-gradient(90deg, #007bff, #0056b3)',
|
|
33
|
-
color: '#ffffff',
|
|
34
|
-
border: '1px solid #007bff',
|
|
35
|
-
shadow: '0 2px 4px rgba(0, 123, 255, 0.3)'
|
|
36
|
-
},
|
|
37
|
-
warn: {
|
|
38
|
-
emoji: 'ā ļø',
|
|
39
|
-
label: 'WARN',
|
|
40
|
-
background: 'linear-gradient(90deg, #ffc107, #e0a800)',
|
|
41
|
-
color: '#000000',
|
|
42
|
-
border: '1px solid #ffc107',
|
|
43
|
-
shadow: '0 2px 4px rgba(255, 193, 7, 0.3)'
|
|
44
|
-
},
|
|
45
|
-
error: {
|
|
46
|
-
emoji: 'ā',
|
|
47
|
-
label: 'ERROR',
|
|
48
|
-
background: 'linear-gradient(90deg, #dc3545, #c82333)',
|
|
49
|
-
color: '#ffffff',
|
|
50
|
-
border: '1px solid #dc3545',
|
|
51
|
-
shadow: '0 2px 4px rgba(220, 53, 69, 0.3)'
|
|
52
|
-
},
|
|
53
|
-
critical: {
|
|
54
|
-
emoji: 'šØ',
|
|
55
|
-
label: 'CRITICAL',
|
|
56
|
-
background: 'linear-gradient(90deg, #8B0000, #FF0000)',
|
|
57
|
-
color: '#ffffff',
|
|
58
|
-
border: '2px solid #FF0000',
|
|
59
|
-
shadow: '0 4px 8px rgba(255, 0, 0, 0.4)'
|
|
60
|
-
},
|
|
61
|
-
success: {
|
|
62
|
-
emoji: 'ā
',
|
|
63
|
-
label: 'SUCCESS',
|
|
64
|
-
background: 'linear-gradient(90deg, #28a745, #1e7e34)',
|
|
65
|
-
color: '#ffffff',
|
|
66
|
-
border: '1px solid #28a745',
|
|
67
|
-
shadow: '0 2px 4px rgba(40, 167, 69, 0.3)'
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
/**
|
|
71
|
-
* Maximum allowed buffer sizes for performance
|
|
72
|
-
*/
|
|
73
|
-
export const BUFFER_LIMITS = {
|
|
74
|
-
MIN_SIZE: 50,
|
|
75
|
-
DEFAULT_SIZE: 1000,
|
|
76
|
-
MAX_SIZE: 10000,
|
|
77
|
-
};
|
|
78
|
-
/**
|
|
79
|
-
* Export format definitions with extensions
|
|
80
|
-
*/
|
|
81
|
-
export const EXPORT_FORMATS = {
|
|
82
|
-
json: { extension: '.json', mimeType: 'application/json' },
|
|
83
|
-
csv: { extension: '.csv', mimeType: 'text/csv' },
|
|
84
|
-
markdown: { extension: '.md', mimeType: 'text/markdown' },
|
|
85
|
-
plain: { extension: '.txt', mimeType: 'text/plain' },
|
|
86
|
-
html: { extension: '.html', mimeType: 'text/html' },
|
|
87
|
-
};
|
|
88
|
-
/**
|
|
89
|
-
* CLI command definitions
|
|
90
|
-
*/
|
|
91
|
-
export const CLI_COMMANDS = {
|
|
92
|
-
config: 'config',
|
|
93
|
-
help: 'help',
|
|
94
|
-
themes: 'themes',
|
|
95
|
-
banners: 'banners',
|
|
96
|
-
banner: 'banner',
|
|
97
|
-
status: 'status',
|
|
98
|
-
reset: 'reset',
|
|
99
|
-
demo: 'demo',
|
|
100
|
-
export: 'export',
|
|
101
|
-
copy: 'copy',
|
|
102
|
-
'buffer-size': 'buffer-size',
|
|
103
|
-
'clear-buffer': 'clear-buffer',
|
|
104
|
-
'buffer-info': 'buffer-info',
|
|
105
|
-
};
|
|
106
|
-
/**
|
|
107
|
-
* Time parsing constants for relative time filters
|
|
108
|
-
*/
|
|
109
|
-
export const TIME_UNITS = {
|
|
110
|
-
ms: 1,
|
|
111
|
-
s: 1000,
|
|
112
|
-
m: 60 * 1000,
|
|
113
|
-
h: 60 * 60 * 1000,
|
|
114
|
-
d: 24 * 60 * 60 * 1000,
|
|
115
|
-
};
|
|
116
|
-
/**
|
|
117
|
-
* Default styling values
|
|
118
|
-
*/
|
|
119
|
-
export const STYLE_DEFAULTS = {
|
|
120
|
-
FONT_FAMILY: 'Monaco, Consolas, monospace',
|
|
121
|
-
FONT_SIZE: '12px',
|
|
122
|
-
BORDER_RADIUS: '4px',
|
|
123
|
-
PADDING: '4px 8px',
|
|
124
|
-
};
|
|
125
|
-
/**
|
|
126
|
-
* Level priority mapping for filtering
|
|
127
|
-
*/
|
|
128
|
-
export const LEVEL_PRIORITIES = {
|
|
129
|
-
debug: 0,
|
|
130
|
-
info: 1,
|
|
131
|
-
warn: 2,
|
|
132
|
-
error: 3,
|
|
133
|
-
critical: 4,
|
|
134
|
-
};
|
|
135
|
-
/**
|
|
136
|
-
* Adaptive color configurations for DevTools theme compatibility
|
|
137
|
-
*/
|
|
138
|
-
export const ADAPTIVE_COLORS = {
|
|
139
|
-
timestamp: {
|
|
140
|
-
light: '#666666',
|
|
141
|
-
dark: '#a0a0a0',
|
|
142
|
-
},
|
|
143
|
-
messageText: {
|
|
144
|
-
light: '#2d3748',
|
|
145
|
-
dark: '#f7fafc',
|
|
146
|
-
},
|
|
147
|
-
prefix: {
|
|
148
|
-
light: '#2d3748',
|
|
149
|
-
dark: '#e2e8f0',
|
|
150
|
-
},
|
|
151
|
-
prefixBackground: {
|
|
152
|
-
light: '#2d3748',
|
|
153
|
-
dark: '#4a5568',
|
|
154
|
-
},
|
|
155
|
-
location: {
|
|
156
|
-
light: '#718096',
|
|
157
|
-
dark: '#a0aec0',
|
|
158
|
-
},
|
|
159
|
-
};
|
package/dist/example.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview Comprehensive examples and demonstrations of Better Logger
|
|
3
|
-
*/
|
|
4
|
-
export declare function demonstrateBanners(): void;
|
|
5
|
-
export declare function demonstrateThemes(): void;
|
|
6
|
-
export declare function demonstrateSVG(): void;
|
|
7
|
-
export declare function demonstrateAnimations(): void;
|
|
8
|
-
export declare function demonstrateCLI(): void;
|
|
9
|
-
export declare function demonstrateExports(): void;
|
|
10
|
-
export declare function demonstrateBasicLogging(): void;
|
|
11
|
-
export declare function demonstrateTable(): void;
|
|
12
|
-
export declare function demonstrateGrouping(): void;
|
|
13
|
-
export declare function demonstrateTiming(): void;
|
|
14
|
-
export declare function demonstrateScopedLogger(): void;
|
|
15
|
-
export declare function demonstrateTrace(): void;
|
|
16
|
-
export declare function demonstrateCustomStyles(): void;
|
|
17
|
-
export declare function demonstrateAllFeatures(): void;
|
|
18
|
-
//# sourceMappingURL=example.d.ts.map
|
package/dist/example.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"example.d.ts","sourceRoot":"","sources":["../src/example.ts"],"names":[],"mappings":"AAAA;;GAEG;AA0BH,wBAAgB,kBAAkB,SAQjC;AAED,wBAAgB,iBAAiB,SAUhC;AAED,wBAAgB,cAAc,SAW7B;AAED,wBAAgB,qBAAqB,SAGpC;AAED,wBAAgB,cAAc,SAgB7B;AAED,wBAAgB,kBAAkB,SAWjC;AAGD,wBAAgB,uBAAuB,SAUtC;AAED,wBAAgB,gBAAgB,SAS/B;AAED,wBAAgB,mBAAmB,SAgBlC;AAED,wBAAgB,iBAAiB,SAShC;AAED,wBAAgB,uBAAuB,SAWtC;AAED,wBAAgB,gBAAgB,SAQ/B;AAED,wBAAgB,uBAAuB,SActC;AAGD,wBAAgB,sBAAsB,SAcrC"}
|
package/dist/example.js
DELETED
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview Comprehensive examples and demonstrations of Better Logger
|
|
3
|
-
*/
|
|
4
|
-
import logger, { debug, info, warn, error, success, critical, scope, setGlobalPrefix, setVerbosity, setTheme, showBanner, logWithSVG, logAnimated, cli, createStyle, stylePresets } from './index.js';
|
|
5
|
-
// Visual features demonstrations
|
|
6
|
-
export function demonstrateBanners() {
|
|
7
|
-
info('šØ Banner System Demo');
|
|
8
|
-
showBanner('simple');
|
|
9
|
-
setTimeout(() => showBanner('ascii'), 1000);
|
|
10
|
-
setTimeout(() => showBanner('unicode'), 2000);
|
|
11
|
-
setTimeout(() => showBanner('svg'), 3000);
|
|
12
|
-
setTimeout(() => showBanner('animated'), 4000);
|
|
13
|
-
}
|
|
14
|
-
export function demonstrateThemes() {
|
|
15
|
-
info('š Theme System Demo');
|
|
16
|
-
const themes = ['default', 'dark', 'neon', 'cyberpunk', 'retro'];
|
|
17
|
-
themes.forEach((theme, index) => {
|
|
18
|
-
setTimeout(() => {
|
|
19
|
-
setTheme(theme);
|
|
20
|
-
info(`Theme switched to: ${theme}`);
|
|
21
|
-
}, index * 1500);
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
export function demonstrateSVG() {
|
|
25
|
-
const logoSVG = `<svg width="100" height="50" viewBox="0 0 100 50">
|
|
26
|
-
<rect width="100" height="50" fill="#667eea"/>
|
|
27
|
-
<text x="50" y="30" font-family="Arial" font-size="12" fill="white" text-anchor="middle">LOGO</text>
|
|
28
|
-
</svg>`;
|
|
29
|
-
logWithSVG('š¼ļø Custom SVG Background', logoSVG, {
|
|
30
|
-
width: 300,
|
|
31
|
-
height: 60,
|
|
32
|
-
padding: '20px 100px'
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
export function demonstrateAnimations() {
|
|
36
|
-
logAnimated('⨠Loading animation...', 3);
|
|
37
|
-
setTimeout(() => logAnimated('š Animation complete!', 2), 3500);
|
|
38
|
-
}
|
|
39
|
-
export function demonstrateCLI() {
|
|
40
|
-
info('š» CLI Commands Demo');
|
|
41
|
-
const commands = [
|
|
42
|
-
'/config theme:neon',
|
|
43
|
-
'/banner ascii',
|
|
44
|
-
'/verbose debug',
|
|
45
|
-
'/prefix DEMO'
|
|
46
|
-
];
|
|
47
|
-
commands.forEach((cmd, index) => {
|
|
48
|
-
setTimeout(() => {
|
|
49
|
-
info(`Executing: ${cmd}`);
|
|
50
|
-
cli(cmd);
|
|
51
|
-
}, index * 1500);
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
export function demonstrateExports() {
|
|
55
|
-
info('š¤ Export functionality would be demonstrated here');
|
|
56
|
-
info('Note: Export features require ExportLogger from /exports module');
|
|
57
|
-
const sampleData = [
|
|
58
|
-
{ timestamp: new Date().toISOString(), level: 'info', message: 'Sample log 1' },
|
|
59
|
-
{ timestamp: new Date().toISOString(), level: 'error', message: 'Sample log 2' },
|
|
60
|
-
{ timestamp: new Date().toISOString(), level: 'warn', message: 'Sample log 3' }
|
|
61
|
-
];
|
|
62
|
-
logger.table(sampleData, ['timestamp', 'level', 'message']);
|
|
63
|
-
}
|
|
64
|
-
// Core features demonstrations
|
|
65
|
-
export function demonstrateBasicLogging() {
|
|
66
|
-
setGlobalPrefix('DEMO');
|
|
67
|
-
setVerbosity('debug');
|
|
68
|
-
debug('š Debug information', { config: { mode: 'development' } });
|
|
69
|
-
info('ā¹ļø Application started successfully');
|
|
70
|
-
warn('ā ļø This is a warning message');
|
|
71
|
-
error('ā An error occurred', new Error('Sample error'));
|
|
72
|
-
success('ā
User authentication successful');
|
|
73
|
-
critical('š„ Critical system failure detected');
|
|
74
|
-
}
|
|
75
|
-
export function demonstrateTable() {
|
|
76
|
-
const userData = [
|
|
77
|
-
{ id: 1, name: 'John Doe', email: 'john@example.com', status: 'active' },
|
|
78
|
-
{ id: 2, name: 'Jane Smith', email: 'jane@example.com', status: 'inactive' },
|
|
79
|
-
{ id: 3, name: 'Bob Johnson', email: 'bob@example.com', status: 'active' }
|
|
80
|
-
];
|
|
81
|
-
logger.table(userData);
|
|
82
|
-
logger.table(userData, ['name', 'email']);
|
|
83
|
-
}
|
|
84
|
-
export function demonstrateGrouping() {
|
|
85
|
-
logger.group('š User Analysis');
|
|
86
|
-
info('Analyzing user data...');
|
|
87
|
-
logger.group('š Statistics', false);
|
|
88
|
-
info('Total users: 150');
|
|
89
|
-
info('Active users: 120');
|
|
90
|
-
info('New this month: 25');
|
|
91
|
-
logger.groupEnd();
|
|
92
|
-
logger.group('šÆ Top Users');
|
|
93
|
-
success('Premium user: Alice Johnson');
|
|
94
|
-
success('Most active: Bob Smith');
|
|
95
|
-
logger.groupEnd();
|
|
96
|
-
logger.groupEnd();
|
|
97
|
-
}
|
|
98
|
-
export function demonstrateTiming() {
|
|
99
|
-
logger.time('api-request');
|
|
100
|
-
info('š Making API request...');
|
|
101
|
-
setTimeout(() => {
|
|
102
|
-
logger.timeEnd('api-request');
|
|
103
|
-
success('ā
API request completed');
|
|
104
|
-
}, Math.random() * 2000 + 500);
|
|
105
|
-
}
|
|
106
|
-
export function demonstrateScopedLogger() {
|
|
107
|
-
const apiLogger = scope('API');
|
|
108
|
-
const dbLogger = scope('DB');
|
|
109
|
-
const authLogger = scope('AUTH');
|
|
110
|
-
apiLogger.info('š Fetching user data', { endpoint: '/api/users' });
|
|
111
|
-
dbLogger.debug('š¾ Database query executed', { query: 'SELECT * FROM users LIMIT 10' });
|
|
112
|
-
authLogger.success('š User authentication successful', { userId: 12345 });
|
|
113
|
-
apiLogger.warn('ā ļø Rate limit approaching', { remaining: 10 });
|
|
114
|
-
dbLogger.error('ā Connection timeout', { timeout: '5s' });
|
|
115
|
-
}
|
|
116
|
-
export function demonstrateTrace() {
|
|
117
|
-
function deepFunction() {
|
|
118
|
-
function deeperFunction() {
|
|
119
|
-
logger.trace('š Deep trace call with full stack');
|
|
120
|
-
}
|
|
121
|
-
deeperFunction();
|
|
122
|
-
}
|
|
123
|
-
deepFunction();
|
|
124
|
-
}
|
|
125
|
-
export function demonstrateCustomStyles() {
|
|
126
|
-
const customStyle = createStyle()
|
|
127
|
-
.bg('linear-gradient(135deg, #ff6b6b 0%, #feca57 100%)')
|
|
128
|
-
.color('white')
|
|
129
|
-
.padding('12px 20px')
|
|
130
|
-
.rounded('10px')
|
|
131
|
-
.shadow('0 4px 15px rgba(0,0,0,0.3)')
|
|
132
|
-
.bold()
|
|
133
|
-
.build();
|
|
134
|
-
console.log('%cšØ Custom Styled Message', customStyle);
|
|
135
|
-
console.log('%cā
Success Style', stylePresets.success);
|
|
136
|
-
console.log('%cā Error Style', stylePresets.error);
|
|
137
|
-
console.log('%cā ļø Warning Style', stylePresets.warning);
|
|
138
|
-
}
|
|
139
|
-
// Comprehensive demonstration
|
|
140
|
-
export function demonstrateAllFeatures() {
|
|
141
|
-
info('š Starting comprehensive Better Logger demonstration...');
|
|
142
|
-
setTimeout(() => demonstrateBanners(), 500);
|
|
143
|
-
setTimeout(() => demonstrateBasicLogging(), 6000);
|
|
144
|
-
setTimeout(() => demonstrateCustomStyles(), 8000);
|
|
145
|
-
setTimeout(() => demonstrateGrouping(), 10000);
|
|
146
|
-
setTimeout(() => demonstrateTiming(), 13000);
|
|
147
|
-
setTimeout(() => demonstrateScopedLogger(), 16000);
|
|
148
|
-
setTimeout(() => demonstrateThemes(), 18000);
|
|
149
|
-
setTimeout(() => {
|
|
150
|
-
success('š Demonstration complete! Check your console for all the styled outputs.');
|
|
151
|
-
}, 25000);
|
|
152
|
-
}
|
|
153
|
-
// Auto-run basic demo on import
|
|
154
|
-
demonstrateBasicLogging();
|