@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
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
# Script de validación de workflows YAML
|
|
4
|
-
# Valida sintaxis y estructura de workflows de GitHub Actions
|
|
5
|
-
|
|
6
|
-
set -e
|
|
7
|
-
|
|
8
|
-
echo "🔍 Validando workflows YAML..."
|
|
9
|
-
|
|
10
|
-
WORKFLOW_DIR=".github/workflows"
|
|
11
|
-
EXIT_CODE=0
|
|
12
|
-
|
|
13
|
-
# Función para validar un archivo YAML
|
|
14
|
-
validate_yaml() {
|
|
15
|
-
local file="$1"
|
|
16
|
-
echo "📄 Validando: $file"
|
|
17
|
-
|
|
18
|
-
# Validar sintaxis YAML básica
|
|
19
|
-
if command -v yamllint >/dev/null 2>&1; then
|
|
20
|
-
echo " 🔧 Verificando sintaxis con yamllint..."
|
|
21
|
-
if yamllint -c .yamllint "$file"; then
|
|
22
|
-
echo " ✅ Sintaxis YAML válida"
|
|
23
|
-
else
|
|
24
|
-
echo " ❌ Error de sintaxis YAML"
|
|
25
|
-
EXIT_CODE=1
|
|
26
|
-
fi
|
|
27
|
-
else
|
|
28
|
-
echo " ⚠️ yamllint no disponible, saltando validación de sintaxis"
|
|
29
|
-
fi
|
|
30
|
-
|
|
31
|
-
# Validar estructura de workflow específica
|
|
32
|
-
echo " 🔍 Verificando estructura de workflow..."
|
|
33
|
-
|
|
34
|
-
# Verificar elementos obligatorios
|
|
35
|
-
if ! grep -q "^name:" "$file"; then
|
|
36
|
-
echo " ❌ Falta campo 'name'"
|
|
37
|
-
EXIT_CODE=1
|
|
38
|
-
fi
|
|
39
|
-
|
|
40
|
-
if ! grep -q "^on:" "$file"; then
|
|
41
|
-
echo " ❌ Falta campo 'on'"
|
|
42
|
-
EXIT_CODE=1
|
|
43
|
-
fi
|
|
44
|
-
|
|
45
|
-
if ! grep -q "^jobs:" "$file"; then
|
|
46
|
-
echo " ❌ Falta campo 'jobs'"
|
|
47
|
-
EXIT_CODE=1
|
|
48
|
-
fi
|
|
49
|
-
|
|
50
|
-
# Verificar concurrency control en workflows de release
|
|
51
|
-
if [[ "$file" == *"release"* ]]; then
|
|
52
|
-
if ! grep -q "^concurrency:" "$file"; then
|
|
53
|
-
echo " ❌ Workflow de release falta concurrency control"
|
|
54
|
-
EXIT_CODE=1
|
|
55
|
-
fi
|
|
56
|
-
|
|
57
|
-
if ! grep -q "group: release-pipeline-" "$file"; then
|
|
58
|
-
echo " ❌ Falta group correcto en concurrency"
|
|
59
|
-
EXIT_CODE=1
|
|
60
|
-
fi
|
|
61
|
-
|
|
62
|
-
if ! grep -q "cancel-in-progress: true" "$file"; then
|
|
63
|
-
echo " ❌ Falta cancel-in-progress en concurrency"
|
|
64
|
-
EXIT_CODE=1
|
|
65
|
-
fi
|
|
66
|
-
|
|
67
|
-
echo " ✅ Concurrency control verificado"
|
|
68
|
-
fi
|
|
69
|
-
|
|
70
|
-
# Verificar estrategia anti-conflictos en releases
|
|
71
|
-
if [[ "$file" == *"release"* ]]; then
|
|
72
|
-
if grep -q "git fetch origin" "$file" &&
|
|
73
|
-
grep -q "git rebase" "$file" &&
|
|
74
|
-
grep -q "MAX_RETRIES" "$file"; then
|
|
75
|
-
echo " ✅ Estrategia anti-conflictos verificada"
|
|
76
|
-
else
|
|
77
|
-
echo " ❌ Estrategia anti-conflictos incompleta"
|
|
78
|
-
EXIT_CODE=1
|
|
79
|
-
fi
|
|
80
|
-
fi
|
|
81
|
-
|
|
82
|
-
# Verificar integración project-utils en releases
|
|
83
|
-
if [[ "$file" == *"release"* ]]; then
|
|
84
|
-
if grep -q "bun project-utils/commit-generator.ts" "$file" &&
|
|
85
|
-
grep -q "RELEASE_WORKFLOW=true" "$file"; then
|
|
86
|
-
echo " ✅ Integración project-utils verificada"
|
|
87
|
-
else
|
|
88
|
-
echo " ❌ Integración project-utils incompleta"
|
|
89
|
-
EXIT_CODE=1
|
|
90
|
-
fi
|
|
91
|
-
fi
|
|
92
|
-
|
|
93
|
-
echo " ✅ Validación de $file completada"
|
|
94
|
-
echo ""
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
# Verificar que existe el directorio de workflows
|
|
98
|
-
if [ ! -d "$WORKFLOW_DIR" ]; then
|
|
99
|
-
echo "❌ Directorio $WORKFLOW_DIR no encontrado"
|
|
100
|
-
exit 1
|
|
101
|
-
fi
|
|
102
|
-
|
|
103
|
-
# Validar todos los archivos YAML en el directorio
|
|
104
|
-
echo "🚀 Iniciando validación de workflows..."
|
|
105
|
-
echo ""
|
|
106
|
-
|
|
107
|
-
for file in "$WORKFLOW_DIR"/*.yml "$WORKFLOW_DIR"/*.yaml; do
|
|
108
|
-
if [ -f "$file" ]; then
|
|
109
|
-
validate_yaml "$file"
|
|
110
|
-
fi
|
|
111
|
-
done
|
|
112
|
-
|
|
113
|
-
# Resumen final
|
|
114
|
-
echo "============================================================"
|
|
115
|
-
echo "📊 RESUMEN DE VALIDACIÓN YAML"
|
|
116
|
-
echo "============================================================"
|
|
117
|
-
|
|
118
|
-
if [ $EXIT_CODE -eq 0 ]; then
|
|
119
|
-
echo "✅ TODOS LOS WORKFLOWS SON VÁLIDOS"
|
|
120
|
-
echo "🎉 Sintaxis YAML correcta"
|
|
121
|
-
echo "🎉 Estructura de workflows completa"
|
|
122
|
-
echo "🎉 Concurrency control implementado"
|
|
123
|
-
echo "🎉 Estrategias anti-conflictos verificadas"
|
|
124
|
-
echo "🎉 Integración project-utils confirmada"
|
|
125
|
-
else
|
|
126
|
-
echo "❌ SE ENCONTRARON ERRORES EN WORKFLOWS"
|
|
127
|
-
echo "⚠️ Revisar los mensajes de error anteriores"
|
|
128
|
-
fi
|
|
129
|
-
|
|
130
|
-
echo "============================================================"
|
|
131
|
-
exit $EXIT_CODE
|
package/tests/yaml-autofix.sh
DELETED
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
# Script de auto-fix para archivos YAML
|
|
4
|
-
# Corrige automáticamente problemas comunes de sintaxis y formato
|
|
5
|
-
|
|
6
|
-
set -e
|
|
7
|
-
|
|
8
|
-
echo "🔧 Auto-fixing YAML files..."
|
|
9
|
-
|
|
10
|
-
WORKFLOW_DIR=".github/workflows"
|
|
11
|
-
EXIT_CODE=0
|
|
12
|
-
FIXED_FILES=0
|
|
13
|
-
|
|
14
|
-
# Función para auto-fix un archivo YAML
|
|
15
|
-
autofix_yaml() {
|
|
16
|
-
local file="$1"
|
|
17
|
-
echo "🔧 Auto-fixing: $file"
|
|
18
|
-
|
|
19
|
-
local temp_file=$(mktemp)
|
|
20
|
-
local changes_made=false
|
|
21
|
-
|
|
22
|
-
# 1. Remover trailing spaces
|
|
23
|
-
if sed 's/[[:space:]]*$//' "$file" > "$temp_file"; then
|
|
24
|
-
if ! cmp -s "$file" "$temp_file"; then
|
|
25
|
-
echo " ✓ Removed trailing spaces"
|
|
26
|
-
changes_made=true
|
|
27
|
-
fi
|
|
28
|
-
cp "$temp_file" "$file"
|
|
29
|
-
fi
|
|
30
|
-
|
|
31
|
-
# 2. Corregir líneas demasiado largas en comentarios
|
|
32
|
-
if sed -E 's/^([[:space:]]*#.{75}).+$/\1.../' "$file" > "$temp_file"; then
|
|
33
|
-
if ! cmp -s "$file" "$temp_file"; then
|
|
34
|
-
echo " ✓ Truncated long comment lines"
|
|
35
|
-
changes_made=true
|
|
36
|
-
fi
|
|
37
|
-
cp "$temp_file" "$file"
|
|
38
|
-
fi
|
|
39
|
-
|
|
40
|
-
# 3. Escapar emojis y caracteres especiales en names
|
|
41
|
-
if sed -E 's/^([[:space:]]*- name: )([^"]*[🔧📄🚀✅❌⚠️🎉📋🔄📥📦🏗️🧪🤖🏷️📤][^"]*)/\1"\2"/' "$file" > "$temp_file"; then
|
|
42
|
-
if ! cmp -s "$file" "$temp_file"; then
|
|
43
|
-
echo " ✓ Quoted names with special characters"
|
|
44
|
-
changes_made=true
|
|
45
|
-
fi
|
|
46
|
-
cp "$temp_file" "$file"
|
|
47
|
-
fi
|
|
48
|
-
|
|
49
|
-
# 4. Normalizar boolean values (on -> true/false)
|
|
50
|
-
if sed -E 's/^([[:space:]]*[a-zA-Z_-]+:[[:space:]]*)on([[:space:]]*$)/\1true\2/' "$file" > "$temp_file"; then
|
|
51
|
-
if ! cmp -s "$file" "$temp_file"; then
|
|
52
|
-
echo " ✓ Normalized boolean values"
|
|
53
|
-
changes_made=true
|
|
54
|
-
fi
|
|
55
|
-
cp "$temp_file" "$file"
|
|
56
|
-
fi
|
|
57
|
-
|
|
58
|
-
# 5. Corregir indentación básica (2 spaces)
|
|
59
|
-
if sed -E 's/^( )+/ /' "$file" > "$temp_file"; then
|
|
60
|
-
# Solo aplicar si mejora la indentación
|
|
61
|
-
if yamllint --format parsable "$temp_file" 2>/dev/null | grep -q "wrong indentation"; then
|
|
62
|
-
# Revertir si empeora
|
|
63
|
-
cp "$file" "$temp_file"
|
|
64
|
-
else
|
|
65
|
-
if ! cmp -s "$file" "$temp_file"; then
|
|
66
|
-
echo " ✓ Fixed basic indentation"
|
|
67
|
-
changes_made=true
|
|
68
|
-
fi
|
|
69
|
-
fi
|
|
70
|
-
cp "$temp_file" "$file"
|
|
71
|
-
fi
|
|
72
|
-
|
|
73
|
-
# 6. Skip advanced line splitting for now (needs improvement)
|
|
74
|
-
# TODO: Implement smarter line breaking for YAML multiline strings
|
|
75
|
-
|
|
76
|
-
# Cleanup
|
|
77
|
-
rm -f "$temp_file"
|
|
78
|
-
|
|
79
|
-
if [ "$changes_made" = true ]; then
|
|
80
|
-
echo " ✅ Auto-fixes applied to $file"
|
|
81
|
-
FIXED_FILES=$((FIXED_FILES + 1))
|
|
82
|
-
else
|
|
83
|
-
echo " ℹ️ No fixes needed for $file"
|
|
84
|
-
fi
|
|
85
|
-
|
|
86
|
-
# Validar después de los fixes
|
|
87
|
-
if command -v yamllint >/dev/null 2>&1; then
|
|
88
|
-
if yamllint "$file" >/dev/null 2>&1; then
|
|
89
|
-
echo " ✅ YAML syntax valid after fixes"
|
|
90
|
-
else
|
|
91
|
-
echo " ⚠️ Manual intervention may be needed"
|
|
92
|
-
EXIT_CODE=1
|
|
93
|
-
fi
|
|
94
|
-
fi
|
|
95
|
-
|
|
96
|
-
echo ""
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
# Verificar que existe el directorio de workflows
|
|
100
|
-
if [ ! -d "$WORKFLOW_DIR" ]; then
|
|
101
|
-
echo "❌ Directorio $WORKFLOW_DIR no encontrado"
|
|
102
|
-
exit 1
|
|
103
|
-
fi
|
|
104
|
-
|
|
105
|
-
# Auto-fix todos los archivos YAML en el directorio
|
|
106
|
-
echo "🚀 Starting YAML auto-fix..."
|
|
107
|
-
echo ""
|
|
108
|
-
|
|
109
|
-
for file in "$WORKFLOW_DIR"/*.yml "$WORKFLOW_DIR"/*.yaml; do
|
|
110
|
-
if [ -f "$file" ]; then
|
|
111
|
-
autofix_yaml "$file"
|
|
112
|
-
fi
|
|
113
|
-
done
|
|
114
|
-
|
|
115
|
-
# También fix archivos YAML en root si existen
|
|
116
|
-
for file in .yamllint .github/dependabot.yml; do
|
|
117
|
-
if [ -f "$file" ]; then
|
|
118
|
-
autofix_yaml "$file"
|
|
119
|
-
fi
|
|
120
|
-
done
|
|
121
|
-
|
|
122
|
-
# Resumen final
|
|
123
|
-
echo "============================================================"
|
|
124
|
-
echo "🔧 YAML AUTO-FIX SUMMARY"
|
|
125
|
-
echo "============================================================"
|
|
126
|
-
echo "📄 Files processed: $(find "$WORKFLOW_DIR" -name "*.yml" -o -name "*.yaml" | wc -l | tr -d ' ')"
|
|
127
|
-
echo "🔧 Files fixed: $FIXED_FILES"
|
|
128
|
-
|
|
129
|
-
if [ $EXIT_CODE -eq 0 ]; then
|
|
130
|
-
echo "✅ ALL FILES AUTO-FIXED SUCCESSFULLY"
|
|
131
|
-
echo "💡 Run 'npm run validate:workflows' to verify fixes"
|
|
132
|
-
else
|
|
133
|
-
echo "⚠️ SOME FILES MAY NEED MANUAL INTERVENTION"
|
|
134
|
-
echo "💡 Check yamllint output for remaining issues"
|
|
135
|
-
fi
|
|
136
|
-
|
|
137
|
-
echo "============================================================"
|
|
138
|
-
|
|
139
|
-
# Mostrar comandos útiles
|
|
140
|
-
echo ""
|
|
141
|
-
echo "🚀 Next steps:"
|
|
142
|
-
echo " npm run lint:yaml # Check syntax"
|
|
143
|
-
echo " npm run validate:workflows # Full validation"
|
|
144
|
-
echo " git diff # Review changes"
|
|
145
|
-
|
|
146
|
-
exit $EXIT_CODE
|
package/tsconfig.json
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2022",
|
|
4
|
-
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
5
|
-
"module": "ESNext",
|
|
6
|
-
"moduleResolution": "node",
|
|
7
|
-
"skipLibCheck": true,
|
|
8
|
-
|
|
9
|
-
/* Library Build Configuration */
|
|
10
|
-
"declaration": true,
|
|
11
|
-
"declarationMap": true,
|
|
12
|
-
"outDir": "dist",
|
|
13
|
-
"rootDir": "src",
|
|
14
|
-
"emitDeclarationOnly": false,
|
|
15
|
-
|
|
16
|
-
/* Module System */
|
|
17
|
-
"esModuleInterop": true,
|
|
18
|
-
"allowSyntheticDefaultImports": true,
|
|
19
|
-
"forceConsistentCasingInFileNames": true,
|
|
20
|
-
"isolatedModules": true,
|
|
21
|
-
"moduleDetection": "force",
|
|
22
|
-
"verbatimModuleSyntax": false,
|
|
23
|
-
|
|
24
|
-
/* Type Checking */
|
|
25
|
-
"strict": true,
|
|
26
|
-
"noImplicitAny": true,
|
|
27
|
-
"strictNullChecks": true,
|
|
28
|
-
"strictFunctionTypes": true,
|
|
29
|
-
"noImplicitReturns": true,
|
|
30
|
-
"noFallthroughCasesInSwitch": true,
|
|
31
|
-
"noUncheckedIndexedAccess": true,
|
|
32
|
-
|
|
33
|
-
/* Advanced */
|
|
34
|
-
"resolveJsonModule": true,
|
|
35
|
-
"allowImportingTsExtensions": false,
|
|
36
|
-
"noEmit": false,
|
|
37
|
-
"incremental": true,
|
|
38
|
-
"tsBuildInfoFile": "./dist/.tsbuildinfo"
|
|
39
|
-
},
|
|
40
|
-
"include": [
|
|
41
|
-
"src/**/*"
|
|
42
|
-
],
|
|
43
|
-
"exclude": [
|
|
44
|
-
"node_modules",
|
|
45
|
-
"dist",
|
|
46
|
-
"**/*.test.ts",
|
|
47
|
-
"**/*.spec.ts",
|
|
48
|
-
"**/*.d.ts"
|
|
49
|
-
]
|
|
50
|
-
}
|
package/vite.config.ts
DELETED
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
import { defineConfig, UserConfig } from 'vite'
|
|
2
|
-
import { resolve } from 'path'
|
|
3
|
-
import dts from 'vite-plugin-dts'
|
|
4
|
-
|
|
5
|
-
// Configuración base compartida
|
|
6
|
-
const baseConfig = {
|
|
7
|
-
plugins: [
|
|
8
|
-
dts({
|
|
9
|
-
include: ['src/**/*'],
|
|
10
|
-
exclude: ['src/**/*.test.ts', 'src/**/*.spec.ts', 'src/main.ts', 'src/example.ts'],
|
|
11
|
-
rollupTypes: true,
|
|
12
|
-
insertTypesEntry: true,
|
|
13
|
-
})
|
|
14
|
-
],
|
|
15
|
-
define: {
|
|
16
|
-
'process.env.NODE_ENV': JSON.stringify('production')
|
|
17
|
-
},
|
|
18
|
-
build: {
|
|
19
|
-
sourcemap: true,
|
|
20
|
-
minify: 'terser',
|
|
21
|
-
terserOptions: {
|
|
22
|
-
compress: {
|
|
23
|
-
drop_console: false,
|
|
24
|
-
drop_debugger: true,
|
|
25
|
-
pure_funcs: ['console.debug'],
|
|
26
|
-
passes: 2
|
|
27
|
-
},
|
|
28
|
-
mangle: {
|
|
29
|
-
properties: false,
|
|
30
|
-
keep_classnames: true,
|
|
31
|
-
keep_fnames: true
|
|
32
|
-
},
|
|
33
|
-
format: {
|
|
34
|
-
comments: false,
|
|
35
|
-
preserve_annotations: true
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
target: 'es2022'
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
// Configuraciones específicas por build
|
|
43
|
-
const buildConfigs = {
|
|
44
|
-
// Build completa - Incluye todas las funcionalidades
|
|
45
|
-
full: {
|
|
46
|
-
...baseConfig,
|
|
47
|
-
plugins: [
|
|
48
|
-
dts({
|
|
49
|
-
...baseConfig.plugins[0].options,
|
|
50
|
-
outDir: 'dist/types',
|
|
51
|
-
})
|
|
52
|
-
],
|
|
53
|
-
build: {
|
|
54
|
-
...baseConfig.build,
|
|
55
|
-
outDir: 'dist',
|
|
56
|
-
lib: {
|
|
57
|
-
entry: {
|
|
58
|
-
index: resolve(__dirname, 'src/index.ts'),
|
|
59
|
-
core: resolve(__dirname, 'src/core.ts'),
|
|
60
|
-
styling: resolve(__dirname, 'src/styling-module.ts'),
|
|
61
|
-
exports: resolve(__dirname, 'src/exports-module.ts')
|
|
62
|
-
},
|
|
63
|
-
name: 'BetterLogger',
|
|
64
|
-
formats: ['es', 'cjs'],
|
|
65
|
-
fileName: (format, entryName) => {
|
|
66
|
-
const ext = format === 'cjs' ? 'cjs' : 'js';
|
|
67
|
-
return `${entryName}.${ext}`;
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
rollupOptions: {
|
|
71
|
-
external: [],
|
|
72
|
-
output: {
|
|
73
|
-
globals: {},
|
|
74
|
-
exports: 'named',
|
|
75
|
-
preserveModules: false,
|
|
76
|
-
chunkFileNames: 'chunks/[name]-[hash].js'
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
|
|
82
|
-
// Build modular - Solo core (logger básico universal)
|
|
83
|
-
core: {
|
|
84
|
-
...baseConfig,
|
|
85
|
-
plugins: [
|
|
86
|
-
dts({
|
|
87
|
-
...baseConfig.plugins[0].options,
|
|
88
|
-
outDir: 'packages/core/dist/types',
|
|
89
|
-
include: ['src/core.ts', 'src/constants.ts', 'src/types/**/*', 'src/utils/**/*'],
|
|
90
|
-
})
|
|
91
|
-
],
|
|
92
|
-
build: {
|
|
93
|
-
...baseConfig.build,
|
|
94
|
-
outDir: 'packages/core/dist',
|
|
95
|
-
lib: {
|
|
96
|
-
entry: resolve(__dirname, 'src/core.ts'),
|
|
97
|
-
name: 'BetterLoggerCore',
|
|
98
|
-
formats: ['es', 'cjs', 'umd'],
|
|
99
|
-
fileName: (format) => {
|
|
100
|
-
if (format === 'cjs') return 'index.cjs';
|
|
101
|
-
if (format === 'es') return 'index.js';
|
|
102
|
-
if (format === 'umd') return 'index.umd.js';
|
|
103
|
-
return 'index.js';
|
|
104
|
-
}
|
|
105
|
-
},
|
|
106
|
-
rollupOptions: {
|
|
107
|
-
// External dependencies for Node.js
|
|
108
|
-
external: (id) => {
|
|
109
|
-
// Mark Node.js built-ins as external
|
|
110
|
-
return ['fs', 'path', 'process', 'util'].includes(id);
|
|
111
|
-
},
|
|
112
|
-
output: [
|
|
113
|
-
{
|
|
114
|
-
format: 'es',
|
|
115
|
-
entryFileNames: 'index.js',
|
|
116
|
-
globals: {
|
|
117
|
-
fs: 'fs',
|
|
118
|
-
path: 'path',
|
|
119
|
-
process: 'process',
|
|
120
|
-
util: 'util'
|
|
121
|
-
},
|
|
122
|
-
exports: 'named'
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
format: 'cjs',
|
|
126
|
-
entryFileNames: 'index.cjs',
|
|
127
|
-
globals: {
|
|
128
|
-
fs: 'fs',
|
|
129
|
-
path: 'path',
|
|
130
|
-
process: 'process',
|
|
131
|
-
util: 'util'
|
|
132
|
-
},
|
|
133
|
-
exports: 'named'
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
format: 'umd',
|
|
137
|
-
name: 'BetterLoggerCore',
|
|
138
|
-
entryFileNames: 'index.umd.js',
|
|
139
|
-
globals: {
|
|
140
|
-
fs: 'fs',
|
|
141
|
-
path: 'path',
|
|
142
|
-
process: 'process',
|
|
143
|
-
util: 'util'
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
]
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
},
|
|
150
|
-
|
|
151
|
-
// Build modular - Solo styling (características visuales)
|
|
152
|
-
styling: {
|
|
153
|
-
...baseConfig,
|
|
154
|
-
plugins: [
|
|
155
|
-
dts({
|
|
156
|
-
...baseConfig.plugins[0].options,
|
|
157
|
-
outDir: 'packages/styling/dist/types',
|
|
158
|
-
include: ['src/styling-module.ts', 'src/constants.ts', 'src/types/**/*'],
|
|
159
|
-
})
|
|
160
|
-
],
|
|
161
|
-
build: {
|
|
162
|
-
...baseConfig.build,
|
|
163
|
-
outDir: 'packages/styling/dist',
|
|
164
|
-
lib: {
|
|
165
|
-
entry: resolve(__dirname, 'src/styling-module.ts'),
|
|
166
|
-
name: 'BetterLoggerStyling',
|
|
167
|
-
formats: ['es', 'cjs'],
|
|
168
|
-
fileName: (format) => {
|
|
169
|
-
const ext = format === 'cjs' ? 'cjs' : 'js';
|
|
170
|
-
return `index.${ext}`;
|
|
171
|
-
}
|
|
172
|
-
},
|
|
173
|
-
rollupOptions: {
|
|
174
|
-
external: [],
|
|
175
|
-
output: {
|
|
176
|
-
globals: {},
|
|
177
|
-
exports: 'named'
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
},
|
|
182
|
-
|
|
183
|
-
// Build modular - Solo exports (handlers de exportación)
|
|
184
|
-
exports: {
|
|
185
|
-
...baseConfig,
|
|
186
|
-
plugins: [
|
|
187
|
-
dts({
|
|
188
|
-
...baseConfig.plugins[0].options,
|
|
189
|
-
outDir: 'packages/exports/dist/types',
|
|
190
|
-
include: ['src/exports-module.ts', 'src/constants.ts', 'src/types/**/*'],
|
|
191
|
-
})
|
|
192
|
-
],
|
|
193
|
-
build: {
|
|
194
|
-
...baseConfig.build,
|
|
195
|
-
outDir: 'packages/exports/dist',
|
|
196
|
-
lib: {
|
|
197
|
-
entry: resolve(__dirname, 'src/exports-module.ts'),
|
|
198
|
-
name: 'BetterLoggerExports',
|
|
199
|
-
formats: ['es', 'cjs'],
|
|
200
|
-
fileName: (format) => {
|
|
201
|
-
const ext = format === 'cjs' ? 'cjs' : 'js';
|
|
202
|
-
return `index.${ext}`;
|
|
203
|
-
}
|
|
204
|
-
},
|
|
205
|
-
rollupOptions: {
|
|
206
|
-
external: [],
|
|
207
|
-
output: {
|
|
208
|
-
globals: {},
|
|
209
|
-
exports: 'named'
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
};
|
|
215
|
-
|
|
216
|
-
// Determinar configuración según variable de entorno
|
|
217
|
-
const buildMode = process.env.BUILD_MODE || 'full';
|
|
218
|
-
|
|
219
|
-
if (!buildConfigs[buildMode]) {
|
|
220
|
-
throw new Error(`Build mode "${buildMode}" not found. Available modes: ${Object.keys(buildConfigs).join(', ')}`);
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
export default defineConfig(buildConfigs[buildMode] as UserConfig);
|