feat: upgrade bubbletea, bubbles, and lipgloss to v2
SonarQube Scan / SonarQube Trigger (push) Successful in 5m41s
SonarQube Scan / SonarQube Trigger (push) Successful in 5m41s
- Migrate import paths from github.com/charmbracelet/* to charm.land/*/v2
- Replace tea.KeyMsg with tea.KeyPressMsg in all update handlers and tests
- Replace View() string return type with tea.View using declarative AltScreen
and MouseMode instead of tea.WithAltScreen()/tea.WithMouseCellMotion()
- Replace tea.WindowSize() with tea.RequestWindowSize in Init()
- Remove tea.ClearScreen from all tea.Batch() calls (removed in v2)
- Replace lipgloss.SetColorProfile(termenv.TrueColor) with
tea.WithColorProfile(colorprofile.TrueColor) in NewProgram options
- Replace ti.Width assignments with ti.SetWidth() method calls
- Update Redraw() to send tea.WindowSizeMsg{} instead of removed tea.ClearScreen
- Update test assertions to check view.Content instead of view directly
- Remove github.com/muesli/termenv dependency
This commit is contained in:
@@ -97,7 +97,7 @@ func (hh *httpHandler) Handler(conn net.Conn, isTLS bool) {
|
||||
Type: types.TunnelTypeHTTP,
|
||||
})
|
||||
if err != nil {
|
||||
_ = hh.redirect(conn, http.StatusMovedPermanently, fmt.Sprintf("https://tunnl.live/tunnel-not-found?slug=%s\r\n", slug))
|
||||
_ = hh.redirect(conn, http.StatusMovedPermanently, fmt.Sprintf("https://tunel.live/tunnel-not-found?slug=%s\r\n", slug))
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -290,7 +290,7 @@ func TestHandler(t *testing.T) {
|
||||
isTLS: true,
|
||||
redirectTLS: false,
|
||||
request: []byte("GET / HTTP/1.1\r\nHost: test.domain\r\n\r\n"),
|
||||
expected: []byte("HTTP/1.1 301 Moved Permanently\r\nLocation: https://tunnl.live/tunnel-not-found?slug=test\r\nContent-Length: 0\r\nConnection: close\r\n\r\n"),
|
||||
expected: []byte("HTTP/1.1 301 Moved Permanently\r\nLocation: https://tunel.live/tunnel-not-found?slug=test\r\nContent-Length: 0\r\nConnection: close\r\n\r\n"),
|
||||
setupMocks: func(msr *MockSessionRegistry) {
|
||||
msr.On("Get", types.SessionKey{
|
||||
Id: "test",
|
||||
|
||||
Reference in New Issue
Block a user