refactor(diary): share the console types through internal/consolekit so diary no longer links bonfire (IN-07, quick-261028-rqd)

This commit is contained in:
Jakub Zych
2026-10-28 20:46:32 +01:00
parent 3520d5d480
commit f3f87f3cc4
14 changed files with 364 additions and 169 deletions

View File

@@ -8,7 +8,7 @@ import (
"path/filepath"
"sync/atomic"
"git.golem15.com/golem15/summercms/modules/bonfire"
"git.golem15.com/golem15/summercms/internal/consolekit"
"git.golem15.com/golem15/summercms/modules/sunscreen"
"github.com/charmbracelet/colorprofile"
)
@@ -103,7 +103,7 @@ func (b *channelBuilder) build(name string) (slog.Handler, error) {
case FormatLogfmt:
leaf = slog.NewTextHandler(w, hopts)
default:
profile := bonfire.DetectProfile(w, b.opts.Color, b.opts.Environ)
profile := consolekit.DetectProfile(w, b.opts.Color, b.opts.Environ)
if profile > colorprofile.NoTTY {
leaf = newConsoleHandler(w, ConsoleOptions{Level: lv, Profile: profile}, b.out.source)
} else {