Compare commits

..

39 Commits

Author SHA1 Message Date
bagas 305693a697 Merge pull request 'chore: group all dependencies in renovate config' (#117) from chore/update-renovate-config into staging
SonarQube Scan / SonarQube Trigger (push) Successful in 3m44s
Tests / Run Tests (pull_request) Successful in 2m5s
Reviewed-on: #117
2026-03-20 14:26:38 +07:00
bagas 685d8b9cd3 chore: group all dependencies in renovate config
Tests / Run Tests (pull_request) Successful in 2m4s
2026-03-20 14:19:06 +07:00
bagas 29403b961a Merge pull request 'feat: upgrade bubbletea, bubbles, and lipgloss to v2' (#116) from feat/upgrade-bubbletea-bubbles-lipgloss-v2 into staging
SonarQube Scan / SonarQube Trigger (push) Successful in 3m44s
Reviewed-on: #116
2026-03-20 14:16:17 +07:00
bagas a3ee50174b fix: capture TERM from PTY request to restore terminal colors on SSH sessions
Tests / Run Tests (pull_request) Successful in 2m4s
SonarQube Scan / SonarQube Trigger (push) Successful in 3m40s
2026-03-20 13:59:41 +07:00
Renovate-Clanker 88149088f0 Merge pull request 'fix(deps): update module github.com/charmbracelet/colorprofile to v0.4.3' (#102) from renovate/github.com-charmbracelet-colorprofile-0.x into main
SonarQube Scan / SonarQube Trigger (push) Successful in 3m55s
2026-03-10 07:04:54 +07:00
Renovate-Clanker 5becded0a2 fix(deps): update module github.com/charmbracelet/colorprofile to v0.4.3
Tests / Run Tests (pull_request) Successful in 2m7s
2026-03-10 00:04:48 +00:00
Renovate-Clanker a25a7cc635 Merge pull request 'fix(deps): update module charm.land/lipgloss/v2 to v2.0.1' (#101) from renovate/charm.land-lipgloss-v2-2.x into main
SonarQube Scan / SonarQube Trigger (push) Successful in 3m34s
2026-03-09 20:09:58 +07:00
Renovate-Clanker 9c510359b5 fix(deps): update module charm.land/lipgloss/v2 to v2.0.1
Tests / Run Tests (pull_request) Successful in 2m1s
2026-03-09 12:32:54 +00:00
Renovate-Clanker 85a86d1239 Merge pull request 'fix(deps): update module charm.land/bubbletea/v2 to v2.0.2' (#100) from renovate/charm.land-bubbletea-v2-2.x into main
SonarQube Scan / SonarQube Trigger (push) Successful in 3m39s
2026-03-09 18:06:08 +07:00
Renovate-Clanker ff33d22a32 fix(deps): update module charm.land/bubbletea/v2 to v2.0.2
Tests / Run Tests (pull_request) Successful in 2m15s
2026-03-09 11:06:02 +00:00
bagas fdacc376f9 Merge pull request 'chore(deps): update docker/setup-buildx-action action to v4' (#99) from renovate/docker-setup-buildx-action-4.x into main
SonarQube Scan / SonarQube Trigger (push) Successful in 3m54s
Reviewed-on: #99
2026-03-06 20:13:25 +07:00
bagas 8e8a13fe90 Merge pull request 'chore(deps): update docker/build-push-action action to v7' (#97) from renovate/docker-build-push-action-7.x into main
SonarQube Scan / SonarQube Trigger (push) Has been cancelled
Reviewed-on: #97
2026-03-06 14:40:55 +07:00
Renovate-Clanker e743b21a2d chore(deps): update docker/setup-buildx-action action to v4
Tests / Run Tests (pull_request) Successful in 2m11s
2026-03-06 07:37:52 +00:00
Renovate-Clanker 26901ec9a2 chore(deps): update docker/build-push-action action to v7
Tests / Run Tests (pull_request) Successful in 2m5s
2026-03-06 07:37:48 +00:00
bagas e75788286f feat: upgrade bubbletea, bubbles, and lipgloss to v2
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
2026-03-06 14:26:04 +07:00
Renovate-Clanker bc8deb86d2 Merge pull request 'fix(deps): update module google.golang.org/grpc to v1.79.2' (#96) from renovate/google.golang.org-grpc-1.x into main
SonarQube Scan / SonarQube Trigger (push) Failing after 3s
2026-03-06 14:05:19 +07:00
Renovate-Clanker 9b797659a5 fix(deps): update module google.golang.org/grpc to v1.79.2
Tests / Run Tests (pull_request) Successful in 2m13s
2026-03-06 07:05:13 +00:00
bagas 8c714a471f Merge pull request 'chore(deps): update docker/login-action action to v4' (#92) from renovate/docker-login-action-4.x into main
SonarQube Scan / SonarQube Trigger (push) Successful in 3m40s
Reviewed-on: #92
2026-03-06 14:03:04 +07:00
Renovate-Clanker 3c596bb3d5 Merge pull request 'chore(deps): update golang docker tag to v1.26.1' (#95) from renovate/golang-1.x into main
SonarQube Scan / SonarQube Trigger (push) Successful in 3m43s
2026-03-06 09:04:50 +07:00
Renovate-Clanker 29891b8e63 chore(deps): update golang docker tag to v1.26.1
Tests / Run Tests (pull_request) Successful in 2m3s
2026-03-06 02:04:45 +00:00
Renovate-Clanker b68856260a chore(deps): update docker/login-action action to v4
Tests / Run Tests (pull_request) Successful in 2m5s
2026-03-04 09:05:01 +00:00
Renovate-Clanker 058453ecd8 Merge pull request 'fix(deps): update module github.com/caddyserver/certmagic to v0.25.2' (#88) from renovate/github.com-caddyserver-certmagic-0.x into main
SonarQube Scan / SonarQube Trigger (push) Successful in 3m41s
2026-02-21 03:01:20 +07:00
Renovate-Clanker 66bc0d234b fix(deps): update module github.com/caddyserver/certmagic to v0.25.2
Tests / Run Tests (pull_request) Successful in 2m53s
2026-02-20 20:01:13 +00:00
Renovate-Clanker e55b8afea7 Merge pull request 'fix(deps): update module google.golang.org/grpc to v1.79.1' (#87) from renovate/google.golang.org-grpc-1.x into main
SonarQube Scan / SonarQube Trigger (push) Successful in 4m1s
2026-02-14 19:43:05 +07:00
Renovate-Clanker e050368b4c fix(deps): update module google.golang.org/grpc to v1.79.1
Tests / Run Tests (pull_request) Successful in 2m29s
2026-02-14 12:42:58 +00:00
Renovate-Clanker 5fe540dbf4 Merge pull request 'fix(deps): update module google.golang.org/grpc to v1.79.0' (#86) from renovate/google.golang.org-grpc-1.x into main
SonarQube Scan / SonarQube Trigger (push) Successful in 3m38s
2026-02-13 05:06:39 +07:00
Renovate-Clanker 3080fb8365 fix(deps): update module google.golang.org/grpc to v1.79.0
Tests / Run Tests (pull_request) Successful in 2m3s
2026-02-12 22:06:30 +00:00
bagas 9dc3711875 chore: upgrade to Go version 1.26.0
Docker Build and Push / Run Tests (push) Successful in 2m0s
Docker Build and Push / Build and Push Docker Image (push) Successful in 17m24s
SonarQube Scan / SonarQube Trigger (push) Successful in 3m41s
2026-02-11 12:05:00 +07:00
bagas a671fc91c6 Merge pull request 'fix(deps): update module github.com/charmbracelet/bubbles to v1' (#84) from renovate/github.com-charmbracelet-bubbles-1.x into main
SonarQube Scan / SonarQube Trigger (push) Has been cancelled
Reviewed-on: #84
2026-02-11 11:56:05 +07:00
Renovate-Clanker d47c20ec51 Merge pull request 'chore(deps): update golang docker tag to v1.26.0' (#85) from renovate/golang-1.x into main
SonarQube Scan / SonarQube Trigger (push) Successful in 3m48s
2026-02-11 05:06:16 +07:00
Renovate-Clanker 780e03af38 chore(deps): update golang docker tag to v1.26.0
Tests / Run Tests (pull_request) Successful in 2m3s
2026-02-10 22:06:12 +00:00
Renovate-Clanker 5d33e55537 fix(deps): update module github.com/charmbracelet/bubbles to v1
Tests / Run Tests (pull_request) Successful in 2m53s
2026-02-10 13:01:26 +00:00
Renovate-Clanker 84b6985dc2 Merge pull request 'fix(deps): update module golang.org/x/crypto to v0.48.0' (#83) from renovate/golang.org-x-crypto-0.x into main
SonarQube Scan / SonarQube Trigger (push) Successful in 3m37s
2026-02-10 01:04:37 +07:00
Renovate-Clanker b4f528139c fix(deps): update module golang.org/x/crypto to v0.48.0
Tests / Run Tests (pull_request) Successful in 2m5s
2026-02-09 18:04:33 +00:00
Renovate-Clanker 8229879db8 Merge pull request 'chore(deps): update golang docker tag to v1.25.7' (#82) from renovate/golang-1.x into main
SonarQube Scan / SonarQube Trigger (push) Successful in 2m13s
2026-02-05 02:03:49 +07:00
Renovate-Clanker 7015e7f4de chore(deps): update golang docker tag to v1.25.7
Tests / Run Tests (pull_request) Successful in 1m11s
2026-02-04 19:03:47 +00:00
Renovate-Clanker 03c6b44fa2 Merge pull request 'fix(deps): update module github.com/charmbracelet/bubbles to v0.21.1' (#81) from renovate/github.com-charmbracelet-bubbles-0.x into main
SonarQube Scan / SonarQube Trigger (push) Successful in 3m15s
2026-02-03 15:05:34 +07:00
Renovate-Clanker 3af3fdbc9c fix(deps): update module github.com/charmbracelet/bubbles to v0.21.1
Tests / Run Tests (pull_request) Successful in 1m18s
2026-02-03 08:05:29 +00:00
bagas 6dc4bb58ea Merge pull request 'chore(deps): update actions/checkout action to v6' (#80) from renovate/actions-checkout-6.x into main
SonarQube Scan / SonarQube Trigger (push) Successful in 4m25s
Reviewed-on: #80
2026-01-28 01:16:08 +07:00
16 changed files with 286 additions and 249 deletions
+4 -4
View File
@@ -40,10 +40,10 @@ jobs:
uses: actions/checkout@v6 uses: actions/checkout@v6
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v4
- name: Log in to Docker Registry - name: Log in to Docker Registry
uses: docker/login-action@v3 uses: docker/login-action@v4
with: with:
registry: git.fossy.my.id registry: git.fossy.my.id
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
@@ -79,7 +79,7 @@ jobs:
fi fi
- name: Build and push Docker image (release) - name: Build and push Docker image (release)
uses: docker/build-push-action@v6 uses: docker/build-push-action@v7
with: with:
context: . context: .
push: true push: true
@@ -97,7 +97,7 @@ jobs:
if: steps.version.outputs.IS_PRERELEASE == 'false' if: steps.version.outputs.IS_PRERELEASE == 'false'
- name: Build and push Docker image (pre-release) - name: Build and push Docker image (pre-release)
uses: docker/build-push-action@v6 uses: docker/build-push-action@v7
with: with:
context: . context: .
push: true push: true
+1 -1
View File
@@ -36,7 +36,7 @@ jobs:
uses: golangci/golangci-lint-action@v9 uses: golangci/golangci-lint-action@v9
with: with:
skip-cache: true skip-cache: true
version: v2.6 version: latest
args: > args: >
--issues-exit-code=0 --issues-exit-code=0
--output.text.path=stdout --output.text.path=stdout
+1 -1
View File
@@ -1,4 +1,4 @@
FROM golang:1.25.6-alpine AS go_builder FROM golang:1.26.1-alpine AS go_builder
ARG VERSION=dev ARG VERSION=dev
ARG BUILD_DATE=unknown ARG BUILD_DATE=unknown
+23 -28
View File
@@ -1,44 +1,39 @@
module tunnel_pls module tunnel_pls
go 1.25.5 go 1.26.0
require ( require (
charm.land/bubbles/v2 v2.0.0
charm.land/bubbletea/v2 v2.0.2
charm.land/lipgloss/v2 v2.0.1
git.fossy.my.id/bagas/tunnel-please-grpc v1.5.0 git.fossy.my.id/bagas/tunnel-please-grpc v1.5.0
github.com/caddyserver/certmagic v0.25.1 github.com/caddyserver/certmagic v0.25.2
github.com/charmbracelet/bubbles v0.21.0 github.com/charmbracelet/colorprofile v0.4.3
github.com/charmbracelet/bubbletea v1.3.10
github.com/charmbracelet/lipgloss v1.1.0
github.com/joho/godotenv v1.5.1 github.com/joho/godotenv v1.5.1
github.com/libdns/cloudflare v0.2.2 github.com/libdns/cloudflare v0.2.2
github.com/muesli/termenv v0.16.0
github.com/stretchr/testify v1.11.1 github.com/stretchr/testify v1.11.1
golang.org/x/crypto v0.47.0 golang.org/x/crypto v0.48.0
google.golang.org/grpc v1.78.0 google.golang.org/grpc v1.79.2
google.golang.org/protobuf v1.36.11 google.golang.org/protobuf v1.36.11
) )
require ( require (
github.com/atotto/clipboard v0.1.4 // indirect github.com/atotto/clipboard v0.1.4 // indirect
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/caddyserver/zerossl v0.1.5 // indirect
github.com/caddyserver/zerossl v0.1.4 // indirect github.com/charmbracelet/ultraviolet v0.0.0-20260205113103-524a6607adb8 // indirect
github.com/charmbracelet/colorprofile v0.4.1 // indirect github.com/charmbracelet/x/ansi v0.11.6 // indirect
github.com/charmbracelet/x/ansi v0.11.3 // indirect
github.com/charmbracelet/x/cellbuf v0.0.14 // indirect
github.com/charmbracelet/x/term v0.2.2 // indirect github.com/charmbracelet/x/term v0.2.2 // indirect
github.com/clipperhouse/displaywidth v0.6.2 // indirect github.com/charmbracelet/x/termios v0.1.1 // indirect
github.com/clipperhouse/stringish v0.1.1 // indirect github.com/charmbracelet/x/windows v0.2.2 // indirect
github.com/clipperhouse/uax29/v2 v2.3.0 // indirect github.com/clipperhouse/displaywidth v0.11.0 // indirect
github.com/clipperhouse/uax29/v2 v2.7.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect
github.com/klauspost/cpuid/v2 v2.3.0 // indirect github.com/klauspost/cpuid/v2 v2.3.0 // indirect
github.com/libdns/libdns v1.1.1 // indirect github.com/libdns/libdns v1.1.1 // indirect
github.com/lucasb-eyer/go-colorful v1.3.0 // indirect github.com/lucasb-eyer/go-colorful v1.3.0 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.20 // indirect
github.com/mattn/go-localereader v0.0.1 // indirect github.com/mholt/acmez/v3 v3.1.6 // indirect
github.com/mattn/go-runewidth v0.0.19 // indirect github.com/miekg/dns v1.1.72 // indirect
github.com/mholt/acmez/v3 v3.1.4 // indirect
github.com/miekg/dns v1.1.69 // indirect
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect
github.com/muesli/cancelreader v0.2.2 // indirect github.com/muesli/cancelreader v0.2.2 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rivo/uniseg v0.4.7 // indirect github.com/rivo/uniseg v0.4.7 // indirect
@@ -49,12 +44,12 @@ require (
go.uber.org/multierr v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.1 // indirect go.uber.org/zap v1.27.1 // indirect
go.uber.org/zap/exp v0.3.0 // indirect go.uber.org/zap/exp v0.3.0 // indirect
golang.org/x/mod v0.31.0 // indirect golang.org/x/mod v0.33.0 // indirect
golang.org/x/net v0.48.0 // indirect golang.org/x/net v0.50.0 // indirect
golang.org/x/sync v0.19.0 // indirect golang.org/x/sync v0.19.0 // indirect
golang.org/x/sys v0.40.0 // indirect golang.org/x/sys v0.42.0 // indirect
golang.org/x/text v0.33.0 // indirect golang.org/x/text v0.34.0 // indirect
golang.org/x/tools v0.40.0 // indirect golang.org/x/tools v0.42.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20251222181119-0a764e51fe1b // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20251222181119-0a764e51fe1b // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect
) )
+78 -82
View File
@@ -1,42 +1,51 @@
charm.land/bubbles/v2 v2.0.0 h1:tE3eK/pHjmtrDiRdoC9uGNLgpopOd8fjhEe31B/ai5s=
charm.land/bubbles/v2 v2.0.0/go.mod h1:rCHoleP2XhU8um45NTuOWBPNVHxnkXKTiZqcclL/qOI=
charm.land/bubbletea/v2 v2.0.1 h1:B8e9zzK7x9JJ+XvHGF4xnYu9Xa0E0y0MyggY6dbaCfQ=
charm.land/bubbletea/v2 v2.0.1/go.mod h1:3LRff2U4WIYXy7MTxfbAQ+AdfM3D8Xuvz2wbsOD9OHQ=
charm.land/bubbletea/v2 v2.0.2 h1:4CRtRnuZOdFDTWSff9r8QFt/9+z6Emubz3aDMnf/dx0=
charm.land/bubbletea/v2 v2.0.2/go.mod h1:3LRff2U4WIYXy7MTxfbAQ+AdfM3D8Xuvz2wbsOD9OHQ=
charm.land/lipgloss/v2 v2.0.0 h1:sd8N/B3x892oiOjFfBQdXBQp3cAkvjGaU5TvVZC3ivo=
charm.land/lipgloss/v2 v2.0.0/go.mod h1:w6SnmsBFBmEFBodiEDurGS/sdUY/u1+v72DqUzc6J14=
charm.land/lipgloss/v2 v2.0.1 h1:6Xzrn49+Py1Um5q/wZG1gWgER2+7dUyZ9XMEufqPSys=
charm.land/lipgloss/v2 v2.0.1/go.mod h1:KjPle2Qd3YmvP1KL5OMHiHysGcNwq6u83MUjYkFvEkM=
code.pfad.fr/check v1.1.0 h1:GWvjdzhSEgHvEHe2uJujDcpmZoySKuHQNrZMfzfO0bE=
code.pfad.fr/check v1.1.0/go.mod h1:NiUH13DtYsb7xp5wll0U4SXx7KhXQVCtRgdC96IPfoM=
git.fossy.my.id/bagas/tunnel-please-grpc v1.5.0 h1:3xszIhck4wo9CoeRq9vnkar4PhY7kz9QrR30qj2XszA= git.fossy.my.id/bagas/tunnel-please-grpc v1.5.0 h1:3xszIhck4wo9CoeRq9vnkar4PhY7kz9QrR30qj2XszA=
git.fossy.my.id/bagas/tunnel-please-grpc v1.5.0/go.mod h1:Weh6ZujgWmT8XxD3Qba7sJ6r5eyUMB9XSWynqdyOoLo= git.fossy.my.id/bagas/tunnel-please-grpc v1.5.0/go.mod h1:Weh6ZujgWmT8XxD3Qba7sJ6r5eyUMB9XSWynqdyOoLo=
github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4= github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4=
github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI=
github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= github.com/aymanbagabas/go-udiff v0.4.0 h1:TKnLPh7IbnizJIBKFWa9mKayRUBQ9Kh1BPCk6w2PnYM=
github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= github.com/aymanbagabas/go-udiff v0.4.0/go.mod h1:0L9PGwj20lrtmEMeyw4WKJ/TMyDtvAoK9bf2u/mNo3w=
github.com/aymanbagabas/go-udiff v0.2.0 h1:TK0fH4MteXUDspT88n8CKzvK0X9O2xu9yQjWpi6yML8= github.com/caddyserver/certmagic v0.25.2 h1:D7xcS7ggX/WEY54x0czj7ioTkmDWKIgxtIi2OcQclUc=
github.com/aymanbagabas/go-udiff v0.2.0/go.mod h1:RE4Ex0qsGkTAJoQdQQCA0uG+nAzJO/pI/QwceO5fgrA= github.com/caddyserver/certmagic v0.25.2/go.mod h1:llW/CvsNmza8S6hmsuggsZeiX+uS27dkqY27wDIuBWg=
github.com/caddyserver/certmagic v0.25.1 h1:4sIKKbOt5pg6+sL7tEwymE1x2bj6CHr80da1CRRIPbY= github.com/caddyserver/zerossl v0.1.5 h1:dkvOjBAEEtY6LIGAHei7sw2UgqSD6TrWweXpV7lvEvE=
github.com/caddyserver/certmagic v0.25.1/go.mod h1:VhyvndxtVton/Fo/wKhRoC46Rbw1fmjvQ3GjHYSQTEY= github.com/caddyserver/zerossl v0.1.5/go.mod h1:CxA0acn7oEGO6//4rtrRjYgEoa4MFw/XofZnrYwGqG4=
github.com/caddyserver/zerossl v0.1.4 h1:CVJOE3MZeFisCERZjkxIcsqIH4fnFdlYWnPYeFtBHRw= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
github.com/caddyserver/zerossl v0.1.4/go.mod h1:CxA0acn7oEGO6//4rtrRjYgEoa4MFw/XofZnrYwGqG4= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/charmbracelet/bubbles v0.21.0 h1:9TdC97SdRVg/1aaXNVWfFH3nnLAwOXr8Fn6u6mfQdFs= github.com/charmbracelet/colorprofile v0.4.2 h1:BdSNuMjRbotnxHSfxy+PCSa4xAmz7szw70ktAtWRYrY=
github.com/charmbracelet/bubbles v0.21.0/go.mod h1:HF+v6QUR4HkEpz62dx7ym2xc71/KBHg+zKwJtMw+qtg= github.com/charmbracelet/colorprofile v0.4.2/go.mod h1:0rTi81QpwDElInthtrQ6Ni7cG0sDtwAd4C4le060fT8=
github.com/charmbracelet/bubbletea v1.3.10 h1:otUDHWMMzQSB0Pkc87rm691KZ3SWa4KUlvF9nRvCICw= github.com/charmbracelet/colorprofile v0.4.3 h1:QPa1IWkYI+AOB+fE+mg/5/4HRMZcaXex9t5KX76i20Q=
github.com/charmbracelet/bubbletea v1.3.10/go.mod h1:ORQfo0fk8U+po9VaNvnV95UPWA1BitP1E0N6xJPlHr4= github.com/charmbracelet/colorprofile v0.4.3/go.mod h1:/zT4BhpD5aGFpqQQqw7a+VtHCzu+zrQtt1zhMt9mR4Q=
github.com/charmbracelet/colorprofile v0.4.1 h1:a1lO03qTrSIRaK8c3JRxJDZOvhvIeSco3ej+ngLk1kk= github.com/charmbracelet/ultraviolet v0.0.0-20260205113103-524a6607adb8 h1:eyFRbAmexyt43hVfeyBofiGSEmJ7krjLOYt/9CF5NKA=
github.com/charmbracelet/colorprofile v0.4.1/go.mod h1:U1d9Dljmdf9DLegaJ0nGZNJvoXAhayhmidOdcBwAvKk= github.com/charmbracelet/ultraviolet v0.0.0-20260205113103-524a6607adb8/go.mod h1:SQpCTRNBtzJkwku5ye4S3HEuthAlGy2n9VXZnWkEW98=
github.com/charmbracelet/lipgloss v1.1.0 h1:vYXsiLHVkK7fp74RkV7b2kq9+zDLoEU4MZoFqR/noCY= github.com/charmbracelet/x/ansi v0.11.6 h1:GhV21SiDz/45W9AnV2R61xZMRri5NlLnl6CVF7ihZW8=
github.com/charmbracelet/lipgloss v1.1.0/go.mod h1:/6Q8FR2o+kj8rz4Dq0zQc3vYf7X+B0binUUBwA0aL30= github.com/charmbracelet/x/ansi v0.11.6/go.mod h1:2JNYLgQUsyqaiLovhU2Rv/pb8r6ydXKS3NIttu3VGZQ=
github.com/charmbracelet/x/ansi v0.11.3 h1:6DcVaqWI82BBVM/atTyq6yBoRLZFBsnoDoX9GCu2YOI= github.com/charmbracelet/x/exp/golden v0.0.0-20250806222409-83e3a29d542f h1:pk6gmGpCE7F3FcjaOEKYriCvpmIN4+6OS/RD0vm4uIA=
github.com/charmbracelet/x/ansi v0.11.3/go.mod h1:yI7Zslym9tCJcedxz5+WBq+eUGMJT0bM06Fqy1/Y4dI= github.com/charmbracelet/x/exp/golden v0.0.0-20250806222409-83e3a29d542f/go.mod h1:IfZAMTHB6XkZSeXUqriemErjAWCCzT0LwjKFYCZyw0I=
github.com/charmbracelet/x/cellbuf v0.0.14 h1:iUEMryGyFTelKW3THW4+FfPgi4fkmKnnaLOXuc+/Kj4=
github.com/charmbracelet/x/cellbuf v0.0.14/go.mod h1:P447lJl49ywBbil/KjCk2HexGh4tEY9LH0/1QrZZ9rA=
github.com/charmbracelet/x/exp/golden v0.0.0-20241011142426-46044092ad91 h1:payRxjMjKgx2PaCWLZ4p3ro9y97+TVLZNaRZgJwSVDQ=
github.com/charmbracelet/x/exp/golden v0.0.0-20241011142426-46044092ad91/go.mod h1:wDlXFlCrmJ8J+swcL/MnGUuYnqgQdW9rhSD61oNMb6U=
github.com/charmbracelet/x/term v0.2.2 h1:xVRT/S2ZcKdhhOuSP4t5cLi5o+JxklsoEObBSgfgZRk= github.com/charmbracelet/x/term v0.2.2 h1:xVRT/S2ZcKdhhOuSP4t5cLi5o+JxklsoEObBSgfgZRk=
github.com/charmbracelet/x/term v0.2.2/go.mod h1:kF8CY5RddLWrsgVwpw4kAa6TESp6EB5y3uxGLeCqzAI= github.com/charmbracelet/x/term v0.2.2/go.mod h1:kF8CY5RddLWrsgVwpw4kAa6TESp6EB5y3uxGLeCqzAI=
github.com/clipperhouse/displaywidth v0.6.2 h1:ZDpTkFfpHOKte4RG5O/BOyf3ysnvFswpyYrV7z2uAKo= github.com/charmbracelet/x/termios v0.1.1 h1:o3Q2bT8eqzGnGPOYheoYS8eEleT5ZVNYNy8JawjaNZY=
github.com/clipperhouse/displaywidth v0.6.2/go.mod h1:R+kHuzaYWFkTm7xoMmK1lFydbci4X2CicfbGstSGg0o= github.com/charmbracelet/x/termios v0.1.1/go.mod h1:rB7fnv1TgOPOyyKRJ9o+AsTU/vK5WHJ2ivHeut/Pcwo=
github.com/clipperhouse/stringish v0.1.1 h1:+NSqMOr3GR6k1FdRhhnXrLfztGzuG+VuFDfatpWHKCs= github.com/charmbracelet/x/windows v0.2.2 h1:IofanmuvaxnKHuV04sC0eBy/smG6kIKrWG2/jYn2GuM=
github.com/clipperhouse/stringish v0.1.1/go.mod h1:v/WhFtE1q0ovMta2+m+UbpZ+2/HEXNWYXQgCt4hdOzA= github.com/charmbracelet/x/windows v0.2.2/go.mod h1:/8XtdKZzedat74NQFn0NGlGL4soHB0YQZrETF96h75k=
github.com/clipperhouse/uax29/v2 v2.3.0 h1:SNdx9DVUqMoBuBoW3iLOj4FQv3dN5mDtuqwuhIGpJy4= github.com/clipperhouse/displaywidth v0.11.0 h1:lBc6kY44VFw+TDx4I8opi/EtL9m20WSEFgwIwO+UVM8=
github.com/clipperhouse/uax29/v2 v2.3.0/go.mod h1:Wn1g7MK6OoeDT0vL+Q0SQLDz/KpfsVRgg6W7ihQeh4g= github.com/clipperhouse/displaywidth v0.11.0/go.mod h1:bkrFNkf81G8HyVqmKGxsPufD3JhNl3dSqnGhOoSD/o0=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/clipperhouse/uax29/v2 v2.7.0 h1:+gs4oBZ2gPfVrKPthwbMzWZDaAFPGYK72F0NJv2v7Vk=
github.com/clipperhouse/uax29/v2 v2.7.0/go.mod h1:EFJ2TJMRUaplDxHKj1qAEhCtQPW2tJSwu5BF98AuoVM=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f h1:Y/CXytFA4m6baUTXGLOoWe4PQhGxaX0KpnayAqC48p4= github.com/go-jose/go-jose/v4 v4.1.3 h1:CVLmWDhDVRa6Mi/IgCgaopNosCaHz7zrMeF9MlZRkrs=
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f/go.mod h1:vw97MGsxSvLiUE2X8qFplwetxpGLQrlU1Q9AUEIzCaM= github.com/go-jose/go-jose/v4 v4.1.3/go.mod h1:x4oUasVrzR7071A4TnHLGSPpNOm2a21K9Kf04k1rs08=
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
@@ -53,44 +62,32 @@ github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzh
github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0=
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
github.com/letsencrypt/challtestsrv v1.4.2 h1:0ON3ldMhZyWlfVNYYpFuWRTmZNnyfiL9Hh5YzC3JVwU=
github.com/letsencrypt/challtestsrv v1.4.2/go.mod h1:GhqMqcSoeGpYd5zX5TgwA6er/1MbWzx/o7yuuVya+Wk=
github.com/letsencrypt/pebble/v2 v2.10.0 h1:Wq6gYXlsY6ubqI3hhxsTzdyotvfdjFBxuwYqCLCnj/U=
github.com/letsencrypt/pebble/v2 v2.10.0/go.mod h1:Sk8cmUIPcIdv2nINo+9PB4L+ZBhzY+F9A1a/h/xmWiQ=
github.com/libdns/cloudflare v0.2.2 h1:XWHv+C1dDcApqazlh08Q6pjytYLgR2a+Y3xrXFu0vsI= github.com/libdns/cloudflare v0.2.2 h1:XWHv+C1dDcApqazlh08Q6pjytYLgR2a+Y3xrXFu0vsI=
github.com/libdns/cloudflare v0.2.2/go.mod h1:w9uTmRCDlAoafAsTPnn2nJ0XHK/eaUMh86DUk8BWi60= github.com/libdns/cloudflare v0.2.2/go.mod h1:w9uTmRCDlAoafAsTPnn2nJ0XHK/eaUMh86DUk8BWi60=
github.com/libdns/libdns v1.1.1 h1:wPrHrXILoSHKWJKGd0EiAVmiJbFShguILTg9leS/P/U= github.com/libdns/libdns v1.1.1 h1:wPrHrXILoSHKWJKGd0EiAVmiJbFShguILTg9leS/P/U=
github.com/libdns/libdns v1.1.1/go.mod h1:4Bj9+5CQiNMVGf87wjX4CY3HQJypUHRuLvlsfsZqLWQ= github.com/libdns/libdns v1.1.1/go.mod h1:4Bj9+5CQiNMVGf87wjX4CY3HQJypUHRuLvlsfsZqLWQ=
github.com/lucasb-eyer/go-colorful v1.3.0 h1:2/yBRLdWBZKrf7gB40FoiKfAWYQ0lqNcbuQwVHXptag= github.com/lucasb-eyer/go-colorful v1.3.0 h1:2/yBRLdWBZKrf7gB40FoiKfAWYQ0lqNcbuQwVHXptag=
github.com/lucasb-eyer/go-colorful v1.3.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/lucasb-eyer/go-colorful v1.3.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-runewidth v0.0.20 h1:WcT52H91ZUAwy8+HUkdM3THM6gXqXuLJi9O3rjcQQaQ=
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.20/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs=
github.com/mattn/go-localereader v0.0.1 h1:ygSAOl7ZXTx4RdPYinUpg6W99U8jWvWi9Ye2JC/oIi4= github.com/mholt/acmez/v3 v3.1.6 h1:eGVQNObP0pBN4sxqrXeg7MYqTOWyoiYpQqITVWlrevk=
github.com/mattn/go-localereader v0.0.1/go.mod h1:8fBrzywKY7BI3czFoHkuzRoWE9C+EiG4R1k4Cjx5p88= github.com/mholt/acmez/v3 v3.1.6/go.mod h1:5nTPosTGosLxF3+LU4ygbgMRFDhbAVpqMI4+a4aHLBY=
github.com/mattn/go-runewidth v0.0.19 h1:v++JhqYnZuu5jSKrk9RbgF5v4CGUjqRfBm05byFGLdw= github.com/miekg/dns v1.1.72 h1:vhmr+TF2A3tuoGNkLDFK9zi36F2LS+hKTRW0Uf8kbzI=
github.com/mattn/go-runewidth v0.0.19/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs= github.com/miekg/dns v1.1.72/go.mod h1:+EuEPhdHOsfk6Wk5TT2CzssZdqkmFhf8r+aVyDEToIs=
github.com/mholt/acmez/v3 v3.1.4 h1:DyzZe/RnAzT3rpZj/2Ii5xZpiEvvYk3cQEN/RmqxwFQ=
github.com/mholt/acmez/v3 v3.1.4/go.mod h1:L1wOU06KKvq7tswuMDwKdcHeKpFFgkppZy/y0DFxagQ=
github.com/miekg/dns v1.1.69 h1:Kb7Y/1Jo+SG+a2GtfoFUfDkG//csdRPwRLkCsxDG9Sc=
github.com/miekg/dns v1.1.69/go.mod h1:7OyjD9nEba5OkqQ/hB4fy3PIoxafSZJtducccIelz3g=
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 h1:ZK8zHtRHOkbHy6Mmr5D264iyp3TiX5OmNcI5cIARiQI=
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6/go.mod h1:CJlz5H+gyd6CUWT45Oy4q24RdLyn7Md9Vj2/ldJBSIo=
github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA= github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA=
github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo= github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo=
github.com/muesli/termenv v0.16.0 h1:S5AlUN9dENB57rsbnkPyfdGuWIlkmzJjbFf0Tf5FWUc=
github.com/muesli/termenv v0.16.0/go.mod h1:ZRfOIKPFDYQoDFF4Olj7/QJbW60Ol/kL1pU3VfY/Cnk=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
github.com/sahilm/fuzzy v0.1.1 h1:ceu5RHF8DGgoi+/dR5PsECjCDH1BE3Fnmpo7aVXOdRA= github.com/sahilm/fuzzy v0.1.1 h1:ceu5RHF8DGgoi+/dR5PsECjCDH1BE3Fnmpo7aVXOdRA=
github.com/sahilm/fuzzy v0.1.1/go.mod h1:VFvziUEIMCrT6A6tw2RFIXPXXmzXbOsSHF0DOI8ZK9Y= github.com/sahilm/fuzzy v0.1.1/go.mod h1:VFvziUEIMCrT6A6tw2RFIXPXXmzXbOsSHF0DOI8ZK9Y=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no= github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no=
@@ -103,16 +100,16 @@ github.com/zeebo/pcg v1.0.1 h1:lyqfGeWiv4ahac6ttHs+I5hwtH/+1mrhlCtVNQM2kHo=
github.com/zeebo/pcg v1.0.1/go.mod h1:09F0S9iiKrwn9rlI5yjLkmrug154/YRW6KnnXVDM/l4= github.com/zeebo/pcg v1.0.1/go.mod h1:09F0S9iiKrwn9rlI5yjLkmrug154/YRW6KnnXVDM/l4=
go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64=
go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y=
go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8= go.opentelemetry.io/otel v1.39.0 h1:8yPrr/S0ND9QEfTfdP9V+SiwT4E0G7Y5MO7p85nis48=
go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM= go.opentelemetry.io/otel v1.39.0/go.mod h1:kLlFTywNWrFyEdH0oj2xK0bFYZtHRYUdv1NklR/tgc8=
go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA= go.opentelemetry.io/otel/metric v1.39.0 h1:d1UzonvEZriVfpNKEVmHXbdf909uGTOQjA0HF0Ls5Q0=
go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI= go.opentelemetry.io/otel/metric v1.39.0/go.mod h1:jrZSWL33sD7bBxg1xjrqyDjnuzTUB0x1nBERXd7Ftcs=
go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E= go.opentelemetry.io/otel/sdk v1.39.0 h1:nMLYcjVsvdui1B/4FRkwjzoRVsMK8uL/cj0OyhKzt18=
go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg= go.opentelemetry.io/otel/sdk v1.39.0/go.mod h1:vDojkC4/jsTJsE+kh+LXYQlbL8CgrEcwmt1ENZszdJE=
go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM= go.opentelemetry.io/otel/sdk/metric v1.39.0 h1:cXMVVFVgsIf2YL6QkRF4Urbr/aMInf+2WKg+sEJTtB8=
go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA= go.opentelemetry.io/otel/sdk/metric v1.39.0/go.mod h1:xq9HEVH7qeX69/JnwEfp6fVq5wosJsY1mt4lLfYdVew=
go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE= go.opentelemetry.io/otel/trace v1.39.0 h1:2d2vfpEDmCJ5zVYz7ijaJdOF59xLomrvj7bjt6/qCJI=
go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs= go.opentelemetry.io/otel/trace v1.39.0/go.mod h1:88w4/PnZSazkGzz/w84VHpQafiU4EtqqlVdxWy+rNOA=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
@@ -121,36 +118,35 @@ go.uber.org/zap v1.27.1 h1:08RqriUEv8+ArZRYSTXy1LeBScaMpVSTBhCeaZYfMYc=
go.uber.org/zap v1.27.1/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= go.uber.org/zap v1.27.1/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
go.uber.org/zap/exp v0.3.0 h1:6JYzdifzYkGmTdRR59oYH+Ng7k49H9qVpWwNSsGJj3U= go.uber.org/zap/exp v0.3.0 h1:6JYzdifzYkGmTdRR59oYH+Ng7k49H9qVpWwNSsGJj3U=
go.uber.org/zap/exp v0.3.0/go.mod h1:5I384qq7XGxYyByIhHm6jg5CHkGY0nsTfbDLgDDlgJQ= go.uber.org/zap/exp v0.3.0/go.mod h1:5I384qq7XGxYyByIhHm6jg5CHkGY0nsTfbDLgDDlgJQ=
golang.org/x/crypto v0.47.0 h1:V6e3FRj+n4dbpw86FJ8Fv7XVOql7TEwpHapKoMJ/GO8= golang.org/x/crypto v0.48.0 h1:/VRzVqiRSggnhY7gNRxPauEQ5Drw9haKdM0jqfcCFts=
golang.org/x/crypto v0.47.0/go.mod h1:ff3Y9VzzKbwSSEzWqJsJVBnWmRwRSHt/6Op5n9bQc4A= golang.org/x/crypto v0.48.0/go.mod h1:r0kV5h3qnFPlQnBSrULhlsRfryS2pmewsg+XfMgkVos=
golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI= golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI=
golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo= golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo=
golang.org/x/mod v0.31.0 h1:HaW9xtz0+kOcWKwli0ZXy79Ix+UW/vOfmWI5QVd2tgI= golang.org/x/mod v0.33.0 h1:tHFzIWbBifEmbwtGz65eaWyGiGZatSrT9prnU8DbVL8=
golang.org/x/mod v0.31.0/go.mod h1:43JraMp9cGx1Rx3AqioxrbrhNsLl2l/iNAvuBkrezpg= golang.org/x/mod v0.33.0/go.mod h1:swjeQEj+6r7fODbD2cqrnje9PnziFuw4bmLbBZFrQ5w=
golang.org/x/net v0.48.0 h1:zyQRTTrjc33Lhh0fBgT/H3oZq9WuvRR5gPC70xpDiQU= golang.org/x/net v0.50.0 h1:ucWh9eiCGyDR3vtzso0WMQinm2Dnt8cFMuQa9K33J60=
golang.org/x/net v0.48.0/go.mod h1:+ndRgGjkh8FGtu1w1FGbEC31if4VrNVMuKTgcAAnQRY= golang.org/x/net v0.50.0/go.mod h1:UgoSli3F/pBgdJBHCTc+tp3gmrU4XswgGRgtnwWTfyM=
golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4=
golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.41.0 h1:Ivj+2Cp/ylzLiEU89QhWblYnOE9zerudt9Ftecq2C6k=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.41.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ= golang.org/x/sys v0.42.0 h1:omrd2nAlyT5ESRdCLYdm3+fMfNFE/+Rf4bDIQImRJeo=
golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= golang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
golang.org/x/term v0.39.0 h1:RclSuaJf32jOqZz74CkPA9qFuVTX7vhLlpfj/IGWlqY= golang.org/x/term v0.40.0 h1:36e4zGLqU4yhjlmxEaagx2KuYbJq3EwY8K943ZsHcvg=
golang.org/x/term v0.39.0/go.mod h1:yxzUCTP/U+FzoxfdKmLaA0RV1WgE0VY7hXBwKtY/4ww= golang.org/x/term v0.40.0/go.mod h1:w2P8uVp06p2iyKKuvXIm7N/y0UCRt3UfJTfZ7oOpglM=
golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE= golang.org/x/text v0.34.0 h1:oL/Qq0Kdaqxa1KbNeMKwQq0reLCCaFtqu2eNuSeNHbk=
golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8= golang.org/x/text v0.34.0/go.mod h1:homfLqTYRFyVYemLBFl5GgL/DWEiH5wcsQ5gSh1yziA=
golang.org/x/tools v0.40.0 h1:yLkxfA+Qnul4cs9QA3KnlFu0lVmd8JJfoq+E41uSutA= golang.org/x/tools v0.42.0 h1:uNgphsn75Tdz5Ji2q36v/nsFSfR/9BRFvqhGBaJGd5k=
golang.org/x/tools v0.40.0/go.mod h1:Ik/tzLRlbscWpqqMRjyWYDisX8bG13FrdXp3o4Sr9lc= golang.org/x/tools v0.42.0/go.mod h1:Ma6lCIwGZvHK6XtgbswSoWroEkhugApmsXyrUmBhfr0=
gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk=
gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E=
google.golang.org/genproto/googleapis/rpc v0.0.0-20251222181119-0a764e51fe1b h1:Mv8VFug0MP9e5vUxfBcE3vUkV6CImK3cMNMIDFjmzxU= google.golang.org/genproto/googleapis/rpc v0.0.0-20251222181119-0a764e51fe1b h1:Mv8VFug0MP9e5vUxfBcE3vUkV6CImK3cMNMIDFjmzxU=
google.golang.org/genproto/googleapis/rpc v0.0.0-20251222181119-0a764e51fe1b/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ= google.golang.org/genproto/googleapis/rpc v0.0.0-20251222181119-0a764e51fe1b/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ=
google.golang.org/grpc v1.78.0 h1:K1XZG/yGDJnzMdd/uZHAkVqJE+xIDOcmdSFZkBUicNc= google.golang.org/grpc v1.79.2 h1:fRMD94s2tITpyJGtBBn7MkMseNpOZU8ZxgC3MMBaXRU=
google.golang.org/grpc v1.78.0/go.mod h1:I47qjTo4OKbMkjA/aOOwxDIiPSBofUtQUI5EfpWvW7U= google.golang.org/grpc v1.79.2/go.mod h1:KmT0Kjez+0dde/v2j9vzwoAScgEPx/Bw1CYChhHLrHQ=
google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE=
google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+1 -1
View File
@@ -97,7 +97,7 @@ func (hh *httpHandler) Handler(conn net.Conn, isTLS bool) {
Type: types.TunnelTypeHTTP, Type: types.TunnelTypeHTTP,
}) })
if err != nil { 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 return
} }
+1 -1
View File
@@ -290,7 +290,7 @@ func TestHandler(t *testing.T) {
isTLS: true, isTLS: true,
redirectTLS: false, redirectTLS: false,
request: []byte("GET / HTTP/1.1\r\nHost: test.domain\r\n\r\n"), 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) { setupMocks: func(msr *MockSessionRegistry) {
msr.On("Get", types.SessionKey{ msr.On("Get", types.SessionKey{
Id: "test", Id: "test",
+3 -2
View File
@@ -11,8 +11,9 @@
"digest" "digest"
], ],
"automerge": true, "automerge": true,
"baseBranchPatterns": [ "groupName": "all-dependencies",
"staging" "matchPackageNames": [
"*"
] ]
} }
] ]
+5 -5
View File
@@ -3,14 +3,14 @@ package interaction
import ( import (
"strings" "strings"
"github.com/charmbracelet/bubbles/textinput" "charm.land/bubbles/v2/textinput"
tea "github.com/charmbracelet/bubbletea" tea "charm.land/bubbletea/v2"
"github.com/charmbracelet/lipgloss" "charm.land/lipgloss/v2"
) )
func (m *model) comingSoonUpdate(msg tea.KeyMsg) (tea.Model, tea.Cmd) { func (m *model) comingSoonUpdate(msg tea.KeyPressMsg) (tea.Model, tea.Cmd) {
m.showingComingSoon = false m.showingComingSoon = false
return m, tea.Batch(tea.ClearScreen, textinput.Blink) return m, textinput.Blink
} }
func (m *model) comingSoonView() string { func (m *model) comingSoonView() string {
+8 -8
View File
@@ -4,10 +4,10 @@ import (
"strings" "strings"
"time" "time"
"github.com/charmbracelet/bubbles/key" "charm.land/bubbles/v2/key"
"github.com/charmbracelet/bubbles/textinput" "charm.land/bubbles/v2/textinput"
tea "github.com/charmbracelet/bubbletea" tea "charm.land/bubbletea/v2"
"github.com/charmbracelet/lipgloss" "charm.land/lipgloss/v2"
) )
func (m *model) handleCommandSelection(item commandItem) (tea.Model, tea.Cmd) { func (m *model) handleCommandSelection(item commandItem) (tea.Model, tea.Cmd) {
@@ -17,24 +17,24 @@ func (m *model) handleCommandSelection(item commandItem) (tea.Model, tea.Cmd) {
m.editingSlug = true m.editingSlug = true
m.slugInput.SetValue(m.interaction.slug.String()) m.slugInput.SetValue(m.interaction.slug.String())
m.slugInput.Focus() m.slugInput.Focus()
return m, tea.Batch(tea.ClearScreen, textinput.Blink) return m, textinput.Blink
case "tunnel-type": case "tunnel-type":
m.showingCommands = false m.showingCommands = false
m.showingComingSoon = true m.showingComingSoon = true
return m, tea.Batch(tickCmd(5*time.Second), tea.ClearScreen, textinput.Blink) return m, tickCmd(5 * time.Second)
default: default:
m.showingCommands = false m.showingCommands = false
return m, nil return m, nil
} }
} }
func (m *model) commandsUpdate(msg tea.KeyMsg) (tea.Model, tea.Cmd) { func (m *model) commandsUpdate(msg tea.KeyPressMsg) (tea.Model, tea.Cmd) {
var cmd tea.Cmd var cmd tea.Cmd
switch { switch {
case key.Matches(msg, m.keymap.quit), msg.String() == "esc": case key.Matches(msg, m.keymap.quit), msg.String() == "esc":
m.showingCommands = false m.showingCommands = false
return m, tea.Batch(tea.ClearScreen, textinput.Blink) return m, textinput.Blink
case msg.String() == "enter": case msg.String() == "enter":
selectedItem := m.commandList.SelectedItem() selectedItem := m.commandList.SelectedItem()
if selectedItem != nil { if selectedItem != nil {
+7 -7
View File
@@ -4,20 +4,20 @@ import (
"fmt" "fmt"
"strings" "strings"
"github.com/charmbracelet/bubbles/key" "charm.land/bubbles/v2/key"
"github.com/charmbracelet/bubbles/textinput" "charm.land/bubbles/v2/textinput"
tea "github.com/charmbracelet/bubbletea" tea "charm.land/bubbletea/v2"
"github.com/charmbracelet/lipgloss" "charm.land/lipgloss/v2"
) )
func (m *model) dashboardUpdate(msg tea.KeyMsg) (tea.Model, tea.Cmd) { func (m *model) dashboardUpdate(msg tea.KeyPressMsg) (tea.Model, tea.Cmd) {
switch { switch {
case key.Matches(msg, m.keymap.quit): case key.Matches(msg, m.keymap.quit):
m.quitting = true m.quitting = true
return m, tea.Batch(tea.ClearScreen, textinput.Blink, tea.Quit) return m, tea.Batch(textinput.Blink, tea.Quit)
case key.Matches(msg, m.keymap.command): case key.Matches(msg, m.keymap.command):
m.showingCommands = true m.showingCommands = true
return m, tea.Batch(tea.ClearScreen, textinput.Blink) return m, textinput.Blink
} }
return m, nil return m, nil
} }
+54 -30
View File
@@ -9,13 +9,12 @@ import (
"tunnel_pls/session/slug" "tunnel_pls/session/slug"
"tunnel_pls/types" "tunnel_pls/types"
"github.com/charmbracelet/bubbles/help" "charm.land/bubbles/v2/help"
"github.com/charmbracelet/bubbles/key" "charm.land/bubbles/v2/key"
"github.com/charmbracelet/bubbles/list" "charm.land/bubbles/v2/list"
"github.com/charmbracelet/bubbles/textinput" "charm.land/bubbles/v2/textinput"
tea "github.com/charmbracelet/bubbletea" tea "charm.land/bubbletea/v2"
"github.com/charmbracelet/lipgloss" "github.com/charmbracelet/colorprofile"
"github.com/muesli/termenv"
"golang.org/x/crypto/ssh" "golang.org/x/crypto/ssh"
) )
@@ -54,6 +53,8 @@ type interaction struct {
cancel context.CancelFunc cancel context.CancelFunc
mode types.InteractiveMode mode types.InteractiveMode
programMu sync.Mutex programMu sync.Mutex
width int
height int
} }
func (i *interaction) SetMode(m types.InteractiveMode) { func (i *interaction) SetMode(m types.InteractiveMode) {
@@ -72,8 +73,14 @@ func (i *interaction) Send(message string) error {
return nil return nil
} }
func (i *interaction) SetWH(w, h int) { func (i *interaction) SetWH(w, h int) {
if i.program != nil { i.programMu.Lock()
i.program.Send(tea.WindowSizeMsg{ i.width = w
i.height = h
prog := i.program
i.programMu.Unlock()
if prog != nil {
prog.Send(tea.WindowSizeMsg{
Width: w, Width: w,
Height: h, Height: h,
}) })
@@ -120,7 +127,7 @@ func (m *model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
switch msg := msg.(type) { switch msg := msg.(type) {
case tickMsg: case tickMsg:
m.showingComingSoon = false m.showingComingSoon = false
return m, tea.Batch(tea.ClearScreen, textinput.Blink) return m, textinput.Blink
case tea.WindowSizeMsg: case tea.WindowSizeMsg:
m.width = msg.Width m.width = msg.Width
@@ -129,17 +136,17 @@ func (m *model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
m.commandList.SetHeight(msg.Height - 4) m.commandList.SetHeight(msg.Height - 4)
if msg.Width < 80 { if msg.Width < 80 {
m.slugInput.Width = msg.Width - 10 m.slugInput.SetWidth(msg.Width - 10)
} else { } else {
m.slugInput.Width = 50 m.slugInput.SetWidth(50)
} }
return m, nil return m, nil
case tea.QuitMsg: case tea.QuitMsg:
m.quitting = true m.quitting = true
return m, tea.Batch(tea.ClearScreen, textinput.Blink, tea.Quit) return m, tea.Batch(textinput.Blink, tea.Quit)
case tea.KeyMsg: case tea.KeyPressMsg:
if m.showingComingSoon { if m.showingComingSoon {
return m.comingSoonUpdate(msg) return m.comingSoonUpdate(msg)
} }
@@ -159,36 +166,43 @@ func (m *model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
} }
func (i *interaction) Redraw() { func (i *interaction) Redraw() {
if i.program != nil { i.programMu.Lock()
i.program.Send(tea.ClearScreen()) prog := i.program
w, h := i.width, i.height
i.programMu.Unlock()
if prog != nil {
prog.Send(tea.WindowSizeMsg{Width: w, Height: h})
} }
} }
func (m *model) View() string { func (m *model) View() tea.View {
if m.quitting { if m.quitting {
return "" return tea.NewView("")
} }
if m.showingComingSoon { if m.showingComingSoon {
return m.comingSoonView() return tea.NewView(m.comingSoonView())
} }
if m.editingSlug { if m.editingSlug {
return m.slugView() return tea.NewView(m.slugView())
} }
if m.showingCommands { if m.showingCommands {
return m.commandsView() return tea.NewView(m.commandsView())
} }
return m.dashboardView() v := tea.NewView(m.dashboardView())
v.AltScreen = true
v.MouseMode = tea.MouseModeCellMotion
return v
} }
func (i *interaction) Start() { func (i *interaction) Start() {
if i.mode == types.InteractiveModeHEADLESS { if i.mode == types.InteractiveModeHEADLESS {
return return
} }
lipgloss.SetColorProfile(termenv.TrueColor)
protocol := "http" protocol := "http"
if i.config.TLSEnabled() { if i.config.TLSEnabled() {
@@ -216,7 +230,7 @@ func (i *interaction) Start() {
ti := textinput.New() ti := textinput.New()
ti.Placeholder = "my-custom-slug" ti.Placeholder = "my-custom-slug"
ti.CharLimit = 20 ti.CharLimit = 20
ti.Width = 50 ti.SetWidth(50)
m := &model{ m := &model{
randomizer: i.randomizer, randomizer: i.randomizer,
@@ -245,19 +259,29 @@ func (i *interaction) Start() {
} }
i.programMu.Lock() i.programMu.Lock()
i.program = tea.NewProgram( w, h := i.width, i.height
m, i.programMu.Unlock()
opts := []tea.ProgramOption{
tea.WithInput(i.channel), tea.WithInput(i.channel),
tea.WithOutput(i.channel), tea.WithOutput(i.channel),
tea.WithAltScreen(), tea.WithColorProfile(colorprofile.TrueColor),
tea.WithMouseCellMotion(),
tea.WithoutSignals(), tea.WithoutSignals(),
tea.WithoutSignalHandler(), tea.WithoutSignalHandler(),
tea.WithFPS(30), tea.WithFPS(30),
) tea.WithEnvironment([]string{"TERM=xterm-256color", "COLORTERM=truecolor"}),
}
if w > 0 && h > 0 {
opts = append(opts, tea.WithWindowSize(w, h))
}
prog := tea.NewProgram(m, opts...)
i.programMu.Lock()
i.program = prog
i.programMu.Unlock() i.programMu.Unlock()
_, err := i.program.Run() _, err := prog.Run()
if err != nil { if err != nil {
log.Printf("Cannot close tea: %s \n", err) log.Printf("Cannot close tea: %s \n", err)
} }
+64 -64
View File
@@ -9,10 +9,10 @@ import (
"time" "time"
"tunnel_pls/types" "tunnel_pls/types"
"github.com/charmbracelet/bubbles/key" "charm.land/bubbles/v2/key"
"github.com/charmbracelet/bubbles/list" "charm.land/bubbles/v2/list"
"github.com/charmbracelet/bubbles/textinput" "charm.land/bubbles/v2/textinput"
tea "github.com/charmbracelet/bubbletea" tea "charm.land/bubbletea/v2"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock" "github.com/stretchr/testify/mock"
"golang.org/x/crypto/ssh" "golang.org/x/crypto/ssh"
@@ -459,7 +459,7 @@ func TestInteraction_Start(t *testing.T) {
mockInteraction := New(mockRandom, mockConfig, mockSlug, mockForwarder, mockSessionRegistry, "user", mockCloser.Close) mockInteraction := New(mockRandom, mockConfig, mockSlug, mockForwarder, mockSessionRegistry, "user", mockCloser.Close)
mockInteraction.SetMode(tt.mode) mockInteraction.SetMode(tt.mode)
mockConfig.On("Domain").Return("tunnl.live") mockConfig.On("Domain").Return("tunel.live")
mockConfig.On("TLSEnabled").Return(tt.tlsEnabled) mockConfig.On("TLSEnabled").Return(tt.tlsEnabled)
mockForwarder.On("TunnelType").Return(tt.tunnelType) mockForwarder.On("TunnelType").Return(tt.tunnelType)
mockForwarder.On("ForwardedPort").Return(tt.port) mockForwarder.On("ForwardedPort").Return(tt.port)
@@ -525,7 +525,7 @@ func TestModel_Update(t *testing.T) {
m := &model{ m := &model{
randomizer: mockRandom, randomizer: mockRandom,
domain: "tunnl.live", domain: "tunel.live",
protocol: "http", protocol: "http",
tunnelType: types.TunnelTypeHTTP, tunnelType: types.TunnelTypeHTTP,
port: 8080, port: 8080,
@@ -622,7 +622,7 @@ func TestModel_View(t *testing.T) {
m := &model{ m := &model{
randomizer: mockRandom, randomizer: mockRandom,
domain: "tunnl.live", domain: "tunel.live",
protocol: "http", protocol: "http",
tunnelType: types.TunnelTypeHTTP, tunnelType: types.TunnelTypeHTTP,
port: 8080, port: 8080,
@@ -651,9 +651,9 @@ func TestModel_View(t *testing.T) {
view := m.View() view := m.View()
if tt.expectedEmpty { if tt.expectedEmpty {
assert.Empty(t, view) assert.Empty(t, view.Content)
} else { } else {
assert.NotEmpty(t, view) assert.NotEmpty(t, view.Content)
} }
}) })
} }
@@ -694,7 +694,7 @@ func TestInteraction_Integration(t *testing.T) {
func TestModel_Update_KeyMessages(t *testing.T) { func TestModel_Update_KeyMessages(t *testing.T) {
tests := []struct { tests := []struct {
name string name string
key tea.KeyMsg key tea.KeyPressMsg
showingComingSoon bool showingComingSoon bool
editingSlug bool editingSlug bool
showingCommands bool showingCommands bool
@@ -702,25 +702,25 @@ func TestModel_Update_KeyMessages(t *testing.T) {
}{ }{
{ {
name: "key press while showing coming soon", name: "key press while showing coming soon",
key: tea.KeyMsg{Type: tea.KeyEnter}, key: tea.KeyPressMsg{Code: tea.KeyEnter},
showingComingSoon: true, showingComingSoon: true,
description: "should call comingSoonUpdate", description: "should call comingSoonUpdate",
}, },
{ {
name: "key press while editing slug", name: "key press while editing slug",
key: tea.KeyMsg{Type: tea.KeyEnter}, key: tea.KeyPressMsg{Code: tea.KeyEnter},
editingSlug: true, editingSlug: true,
description: "should call slugUpdate", description: "should call slugUpdate",
}, },
{ {
name: "key press while showing commands", name: "key press while showing commands",
key: tea.KeyMsg{Type: tea.KeyEnter}, key: tea.KeyPressMsg{Code: tea.KeyEnter},
showingCommands: true, showingCommands: true,
description: "should call commandsUpdate", description: "should call commandsUpdate",
}, },
{ {
name: "key press in dashboard view", name: "key press in dashboard view",
key: tea.KeyMsg{Type: tea.KeyRunes, Runes: []rune{'c'}}, key: tea.KeyPressMsg{Code: 'c', Text: "c"},
description: "should call dashboardUpdate", description: "should call dashboardUpdate",
}, },
} }
@@ -742,7 +742,7 @@ func TestModel_Update_KeyMessages(t *testing.T) {
m := &model{ m := &model{
randomizer: mockRandom, randomizer: mockRandom,
domain: "tunnl.live", domain: "tunel.live",
protocol: "http", protocol: "http",
tunnelType: types.TunnelTypeHTTP, tunnelType: types.TunnelTypeHTTP,
port: 8080, port: 8080,
@@ -777,7 +777,7 @@ func TestModel_SlugUpdate(t *testing.T) {
tests := []struct { tests := []struct {
name string name string
tunnelType types.TunnelType tunnelType types.TunnelType
keyMsg tea.KeyMsg keyMsg tea.KeyPressMsg
inputValue string inputValue string
setupMocks func(*MockSessionRegistry, *MockSlug, *MockRandom) setupMocks func(*MockSessionRegistry, *MockSlug, *MockRandom)
expectedEdit bool expectedEdit bool
@@ -787,21 +787,21 @@ func TestModel_SlugUpdate(t *testing.T) {
{ {
name: "escape key cancels editing", name: "escape key cancels editing",
tunnelType: types.TunnelTypeHTTP, tunnelType: types.TunnelTypeHTTP,
keyMsg: tea.KeyMsg{Type: tea.KeyEsc}, keyMsg: tea.KeyPressMsg{Code: tea.KeyEsc},
setupMocks: func(msr *MockSessionRegistry, ms *MockSlug, mr *MockRandom) {}, setupMocks: func(msr *MockSessionRegistry, ms *MockSlug, mr *MockRandom) {},
expectedEdit: false, expectedEdit: false,
}, },
{ {
name: "ctrl+c cancels editing", name: "ctrl+c cancels editing",
tunnelType: types.TunnelTypeHTTP, tunnelType: types.TunnelTypeHTTP,
keyMsg: tea.KeyMsg{Type: tea.KeyCtrlC}, keyMsg: tea.KeyPressMsg{Code: 'c', Mod: tea.ModCtrl},
setupMocks: func(msr *MockSessionRegistry, ms *MockSlug, mr *MockRandom) {}, setupMocks: func(msr *MockSessionRegistry, ms *MockSlug, mr *MockRandom) {},
expectedEdit: false, expectedEdit: false,
}, },
{ {
name: "enter key saves valid slug", name: "enter key saves valid slug",
tunnelType: types.TunnelTypeHTTP, tunnelType: types.TunnelTypeHTTP,
keyMsg: tea.KeyMsg{Type: tea.KeyEnter}, keyMsg: tea.KeyPressMsg{Code: tea.KeyEnter},
inputValue: "my-custom-slug", inputValue: "my-custom-slug",
setupMocks: func(msr *MockSessionRegistry, ms *MockSlug, mr *MockRandom) { setupMocks: func(msr *MockSessionRegistry, ms *MockSlug, mr *MockRandom) {
ms.On("String").Return("old-slug") ms.On("String").Return("old-slug")
@@ -816,7 +816,7 @@ func TestModel_SlugUpdate(t *testing.T) {
{ {
name: "enter key with error shows error message", name: "enter key with error shows error message",
tunnelType: types.TunnelTypeHTTP, tunnelType: types.TunnelTypeHTTP,
keyMsg: tea.KeyMsg{Type: tea.KeyEnter}, keyMsg: tea.KeyPressMsg{Code: tea.KeyEnter},
inputValue: "invalid", inputValue: "invalid",
setupMocks: func(msr *MockSessionRegistry, ms *MockSlug, mr *MockRandom) { setupMocks: func(msr *MockSessionRegistry, ms *MockSlug, mr *MockRandom) {
ms.On("String").Return("old-slug") ms.On("String").Return("old-slug")
@@ -831,7 +831,7 @@ func TestModel_SlugUpdate(t *testing.T) {
{ {
name: "ctrl+r generates random slug", name: "ctrl+r generates random slug",
tunnelType: types.TunnelTypeHTTP, tunnelType: types.TunnelTypeHTTP,
keyMsg: tea.KeyMsg{Type: tea.KeyCtrlR}, keyMsg: tea.KeyPressMsg{Code: 'r', Mod: tea.ModCtrl},
setupMocks: func(msr *MockSessionRegistry, ms *MockSlug, mr *MockRandom) { setupMocks: func(msr *MockSessionRegistry, ms *MockSlug, mr *MockRandom) {
mr.On("String", 20).Return("random-generated-slug", nil) mr.On("String", 20).Return("random-generated-slug", nil)
}, },
@@ -841,7 +841,7 @@ func TestModel_SlugUpdate(t *testing.T) {
{ {
name: "ctrl+r with error does nothing", name: "ctrl+r with error does nothing",
tunnelType: types.TunnelTypeHTTP, tunnelType: types.TunnelTypeHTTP,
keyMsg: tea.KeyMsg{Type: tea.KeyCtrlR}, keyMsg: tea.KeyPressMsg{Code: 'r', Mod: tea.ModCtrl},
setupMocks: func(msr *MockSessionRegistry, ms *MockSlug, mr *MockRandom) { setupMocks: func(msr *MockSessionRegistry, ms *MockSlug, mr *MockRandom) {
mr.On("String", 20).Return("", assert.AnError) mr.On("String", 20).Return("", assert.AnError)
}, },
@@ -850,14 +850,14 @@ func TestModel_SlugUpdate(t *testing.T) {
{ {
name: "regular key updates input", name: "regular key updates input",
tunnelType: types.TunnelTypeHTTP, tunnelType: types.TunnelTypeHTTP,
keyMsg: tea.KeyMsg{Type: tea.KeyRunes, Runes: []rune{'a'}}, keyMsg: tea.KeyPressMsg{Code: 'a', Text: "a"},
setupMocks: func(msr *MockSessionRegistry, ms *MockSlug, mr *MockRandom) {}, setupMocks: func(msr *MockSessionRegistry, ms *MockSlug, mr *MockRandom) {},
expectedEdit: true, expectedEdit: true,
}, },
{ {
name: "tcp tunnel exits editing immediately", name: "tcp tunnel exits editing immediately",
tunnelType: types.TunnelTypeTCP, tunnelType: types.TunnelTypeTCP,
keyMsg: tea.KeyMsg{Type: tea.KeyRunes, Runes: []rune{'a'}}, keyMsg: tea.KeyPressMsg{Code: 'a', Text: "a"},
setupMocks: func(msr *MockSessionRegistry, ms *MockSlug, mr *MockRandom) {}, setupMocks: func(msr *MockSessionRegistry, ms *MockSlug, mr *MockRandom) {},
expectedEdit: false, expectedEdit: false,
}, },
@@ -879,7 +879,7 @@ func TestModel_SlugUpdate(t *testing.T) {
m := &model{ m := &model{
randomizer: mockRandom, randomizer: mockRandom,
domain: "tunnl.live", domain: "tunel.live",
protocol: "http", protocol: "http",
tunnelType: tt.tunnelType, tunnelType: tt.tunnelType,
port: 8080, port: 8080,
@@ -986,7 +986,7 @@ func TestModel_SlugView(t *testing.T) {
m := &model{ m := &model{
randomizer: mockRandom, randomizer: mockRandom,
domain: "tunnl.live", domain: "tunel.live",
protocol: "http", protocol: "http",
tunnelType: tt.tunnelType, tunnelType: tt.tunnelType,
port: 8080, port: 8080,
@@ -1006,19 +1006,19 @@ func TestModel_SlugView(t *testing.T) {
func TestModel_ComingSoonUpdate(t *testing.T) { func TestModel_ComingSoonUpdate(t *testing.T) {
tests := []struct { tests := []struct {
name string name string
keyMsg tea.KeyMsg keyMsg tea.KeyPressMsg
}{ }{
{ {
name: "any key dismisses coming soon", name: "any key dismisses coming soon",
keyMsg: tea.KeyMsg{Type: tea.KeyEnter}, keyMsg: tea.KeyPressMsg{Code: tea.KeyEnter},
}, },
{ {
name: "escape key dismisses", name: "escape key dismisses",
keyMsg: tea.KeyMsg{Type: tea.KeyEsc}, keyMsg: tea.KeyPressMsg{Code: tea.KeyEsc},
}, },
{ {
name: "space key dismisses", name: "space key dismisses",
keyMsg: tea.KeyMsg{Type: tea.KeySpace}, keyMsg: tea.KeyPressMsg{Code: tea.KeySpace},
}, },
} }
@@ -1097,7 +1097,7 @@ func TestModel_ComingSoonView(t *testing.T) {
func TestModel_CommandsUpdate(t *testing.T) { func TestModel_CommandsUpdate(t *testing.T) {
tests := []struct { tests := []struct {
name string name string
keyMsg tea.KeyMsg keyMsg tea.KeyPressMsg
selectedItem list.Item selectedItem list.Item
expectCommands bool expectCommands bool
expectEditSlug bool expectEditSlug bool
@@ -1105,31 +1105,31 @@ func TestModel_CommandsUpdate(t *testing.T) {
}{ }{
{ {
name: "escape key closes commands", name: "escape key closes commands",
keyMsg: tea.KeyMsg{Type: tea.KeyEsc}, keyMsg: tea.KeyPressMsg{Code: tea.KeyEsc},
expectCommands: false, expectCommands: false,
}, },
{ {
name: "q key closes commands", name: "q key closes commands",
keyMsg: tea.KeyMsg{Type: tea.KeyRunes, Runes: []rune{'q'}}, keyMsg: tea.KeyPressMsg{Code: 'q', Text: "q"},
expectCommands: false, expectCommands: false,
}, },
{ {
name: "enter on slug command starts editing", name: "enter on slug command starts editing",
keyMsg: tea.KeyMsg{Type: tea.KeyEnter}, keyMsg: tea.KeyPressMsg{Code: tea.KeyEnter},
selectedItem: commandItem{name: "slug", desc: "Set custom subdomain"}, selectedItem: commandItem{name: "slug", desc: "Set custom subdomain"},
expectCommands: false, expectCommands: false,
expectEditSlug: true, expectEditSlug: true,
}, },
{ {
name: "enter on tunnel-type shows coming soon", name: "enter on tunnel-type shows coming soon",
keyMsg: tea.KeyMsg{Type: tea.KeyEnter}, keyMsg: tea.KeyPressMsg{Code: tea.KeyEnter},
selectedItem: commandItem{name: "tunnel-type", desc: "Change tunnel type"}, selectedItem: commandItem{name: "tunnel-type", desc: "Change tunnel type"},
expectCommands: false, expectCommands: false,
expectComingSoon: true, expectComingSoon: true,
}, },
{ {
name: "arrow key navigates list", name: "arrow key navigates list",
keyMsg: tea.KeyMsg{Type: tea.KeyDown}, keyMsg: tea.KeyPressMsg{Code: tea.KeyDown},
expectCommands: true, expectCommands: true,
}, },
} }
@@ -1261,28 +1261,28 @@ func TestModel_CommandsView(t *testing.T) {
func TestModel_DashboardUpdate(t *testing.T) { func TestModel_DashboardUpdate(t *testing.T) {
tests := []struct { tests := []struct {
name string name string
keyMsg tea.KeyMsg keyMsg tea.KeyPressMsg
expectQuit bool expectQuit bool
expectCommands bool expectCommands bool
}{ }{
{ {
name: "q key quits", name: "q key quits",
keyMsg: tea.KeyMsg{Type: tea.KeyRunes, Runes: []rune{'q'}}, keyMsg: tea.KeyPressMsg{Code: 'q', Text: "q"},
expectQuit: true, expectQuit: true,
}, },
{ {
name: "ctrl+c quits", name: "ctrl+c quits",
keyMsg: tea.KeyMsg{Type: tea.KeyCtrlC}, keyMsg: tea.KeyPressMsg{Code: 'c', Mod: tea.ModCtrl},
expectQuit: true, expectQuit: true,
}, },
{ {
name: "c key opens commands", name: "c key opens commands",
keyMsg: tea.KeyMsg{Type: tea.KeyRunes, Runes: []rune{'c'}}, keyMsg: tea.KeyPressMsg{Code: 'c', Text: "c"},
expectCommands: true, expectCommands: true,
}, },
{ {
name: "other keys do nothing", name: "other keys do nothing",
keyMsg: tea.KeyMsg{Type: tea.KeyRunes, Runes: []rune{'x'}}, keyMsg: tea.KeyPressMsg{Code: 'x', Text: "x"},
}, },
} }
@@ -1398,7 +1398,7 @@ func TestModel_DashboardView(t *testing.T) {
m := &model{ m := &model{
randomizer: mockRandom, randomizer: mockRandom,
domain: "tunnl.live", domain: "tunel.live",
protocol: tt.protocol, protocol: tt.protocol,
tunnelType: tt.tunnelType, tunnelType: tt.tunnelType,
port: tt.port, port: tt.port,
@@ -1550,8 +1550,8 @@ func TestBuildURL(t *testing.T) {
name: "http url", name: "http url",
protocol: "http", protocol: "http",
subdomain: "test", subdomain: "test",
domain: "tunnl.live", domain: "tunel.live",
expected: "http://test.tunnl.live", expected: "http://test.tunel.live",
}, },
{ {
name: "https url", name: "https url",
@@ -1564,8 +1564,8 @@ func TestBuildURL(t *testing.T) {
name: "custom subdomain", name: "custom subdomain",
protocol: "http", protocol: "http",
subdomain: "my-custom-slug", subdomain: "my-custom-slug",
domain: "tunnl.live", domain: "tunel.live",
expected: "http://my-custom-slug.tunnl.live", expected: "http://my-custom-slug.tunel.live",
}, },
} }
@@ -1712,30 +1712,30 @@ func TestModel_GetTunnelURL(t *testing.T) {
tunnelType: types.TunnelTypeHTTP, tunnelType: types.TunnelTypeHTTP,
protocol: "http", protocol: "http",
slug: "my-app", slug: "my-app",
domain: "tunnl.live", domain: "tunel.live",
expected: "http://my-app.tunnl.live", expected: "http://my-app.tunel.live",
}, },
{ {
name: "https tunnel", name: "https tunnel",
tunnelType: types.TunnelTypeHTTP, tunnelType: types.TunnelTypeHTTP,
protocol: "https", protocol: "https",
slug: "secure-app", slug: "secure-app",
domain: "tunnl.live", domain: "tunel.live",
expected: "https://secure-app.tunnl.live", expected: "https://secure-app.tunel.live",
}, },
{ {
name: "tcp tunnel", name: "tcp tunnel",
tunnelType: types.TunnelTypeTCP, tunnelType: types.TunnelTypeTCP,
domain: "tunnl.live", domain: "tunel.live",
port: 8080, port: 8080,
expected: "tcp://tunnl.live:8080", expected: "tcp://tunel.live:8080",
}, },
{ {
name: "tcp tunnel with different port", name: "tcp tunnel with different port",
tunnelType: types.TunnelTypeTCP, tunnelType: types.TunnelTypeTCP,
domain: "tunnl.live", domain: "tunel.live",
port: 3306, port: 3306,
expected: "tcp://tunnl.live:3306", expected: "tcp://tunel.live:3306",
}, },
} }
@@ -1797,28 +1797,28 @@ func TestInteraction_Start_Interactive(t *testing.T) {
tlsEnabled: false, tlsEnabled: false,
tunnelType: types.TunnelTypeHTTP, tunnelType: types.TunnelTypeHTTP,
port: 8080, port: 8080,
domain: "tunnl.live", domain: "tunel.live",
}, },
{ {
name: "interactive mode with https", name: "interactive mode with https",
tlsEnabled: true, tlsEnabled: true,
tunnelType: types.TunnelTypeHTTP, tunnelType: types.TunnelTypeHTTP,
port: 8443, port: 8443,
domain: "secure.tunnl.live", domain: "secure.tunel.live",
}, },
{ {
name: "interactive mode with tcp", name: "interactive mode with tcp",
tlsEnabled: false, tlsEnabled: false,
tunnelType: types.TunnelTypeTCP, tunnelType: types.TunnelTypeTCP,
port: 3306, port: 3306,
domain: "db.tunnl.live", domain: "db.tunel.live",
}, },
{ {
name: "interactive mode with tcp and tls enabled", name: "interactive mode with tcp and tls enabled",
tlsEnabled: true, tlsEnabled: true,
tunnelType: types.TunnelTypeTCP, tunnelType: types.TunnelTypeTCP,
port: 5432, port: 5432,
domain: "postgres.tunnl.live", domain: "postgres.tunel.live",
}, },
} }
@@ -1901,7 +1901,7 @@ func TestInteraction_Start_ProtocolSelection(t *testing.T) {
mockSessionRegistry := &MockSessionRegistry{} mockSessionRegistry := &MockSessionRegistry{}
closeFunc := func() error { return nil } closeFunc := func() error { return nil }
mockConfig.On("Domain").Return("tunnl.live") mockConfig.On("Domain").Return("tunel.live")
mockConfig.On("TLSEnabled").Return(tt.tlsEnabled) mockConfig.On("TLSEnabled").Return(tt.tlsEnabled)
mockForwarder.On("TunnelType").Return(types.TunnelTypeHTTP) mockForwarder.On("TunnelType").Return(types.TunnelTypeHTTP)
mockForwarder.On("ForwardedPort").Return(uint16(8080)) mockForwarder.On("ForwardedPort").Return(uint16(8080))
@@ -1966,7 +1966,7 @@ func TestInteraction_Stop(t *testing.T) {
i := mockInteraction.(*interaction) i := mockInteraction.(*interaction)
if tt.setupProgram { if tt.setupProgram {
mockConfig.On("Domain").Return("tunnl.live") mockConfig.On("Domain").Return("tunel.live")
mockConfig.On("TLSEnabled").Return(false) mockConfig.On("TLSEnabled").Return(false)
mockForwarder.On("TunnelType").Return(types.TunnelTypeHTTP) mockForwarder.On("TunnelType").Return(types.TunnelTypeHTTP)
mockForwarder.On("ForwardedPort").Return(uint16(8080)) mockForwarder.On("ForwardedPort").Return(uint16(8080))
@@ -2007,7 +2007,7 @@ func TestInteraction_Start_CommandListSetup(t *testing.T) {
mockSessionRegistry := &MockSessionRegistry{} mockSessionRegistry := &MockSessionRegistry{}
closeFunc := func() error { return nil } closeFunc := func() error { return nil }
mockConfig.On("Domain").Return("tunnl.live") mockConfig.On("Domain").Return("tunel.live")
mockConfig.On("TLSEnabled").Return(false) mockConfig.On("TLSEnabled").Return(false)
mockForwarder.On("TunnelType").Return(types.TunnelTypeHTTP) mockForwarder.On("TunnelType").Return(types.TunnelTypeHTTP)
mockForwarder.On("ForwardedPort").Return(uint16(8080)) mockForwarder.On("ForwardedPort").Return(uint16(8080))
@@ -2043,7 +2043,7 @@ func TestInteraction_Start_TextInputSetup(t *testing.T) {
mockSessionRegistry := &MockSessionRegistry{} mockSessionRegistry := &MockSessionRegistry{}
closeFunc := func() error { return nil } closeFunc := func() error { return nil }
mockConfig.On("Domain").Return("tunnl.live") mockConfig.On("Domain").Return("tunel.live")
mockConfig.On("TLSEnabled").Return(false) mockConfig.On("TLSEnabled").Return(false)
mockForwarder.On("TunnelType").Return(types.TunnelTypeHTTP) mockForwarder.On("TunnelType").Return(types.TunnelTypeHTTP)
mockForwarder.On("ForwardedPort").Return(uint16(8080)) mockForwarder.On("ForwardedPort").Return(uint16(8080))
@@ -2107,7 +2107,7 @@ func TestInteraction_Start_CleanupOnExit(t *testing.T) {
} }
} }
mockConfig.On("Domain").Return("tunnl.live") mockConfig.On("Domain").Return("tunel.live")
mockConfig.On("TLSEnabled").Return(false) mockConfig.On("TLSEnabled").Return(false)
mockForwarder.On("TunnelType").Return(types.TunnelTypeHTTP) mockForwarder.On("TunnelType").Return(types.TunnelTypeHTTP)
mockForwarder.On("ForwardedPort").Return(uint16(8080)) mockForwarder.On("ForwardedPort").Return(uint16(8080))
@@ -2171,7 +2171,7 @@ func TestInteraction_Start_WithDifferentChannels(t *testing.T) {
mockSessionRegistry := &MockSessionRegistry{} mockSessionRegistry := &MockSessionRegistry{}
closeFunc := func() error { return nil } closeFunc := func() error { return nil }
mockConfig.On("Domain").Return("tunnl.live") mockConfig.On("Domain").Return("tunel.live")
mockConfig.On("TLSEnabled").Return(false) mockConfig.On("TLSEnabled").Return(false)
mockForwarder.On("TunnelType").Return(types.TunnelTypeHTTP) mockForwarder.On("TunnelType").Return(types.TunnelTypeHTTP)
mockForwarder.On("ForwardedPort").Return(uint16(8080)) mockForwarder.On("ForwardedPort").Return(uint16(8080))
+6 -6
View File
@@ -6,11 +6,11 @@ import (
"tunnel_pls/internal/random" "tunnel_pls/internal/random"
"tunnel_pls/types" "tunnel_pls/types"
"github.com/charmbracelet/bubbles/help" "charm.land/bubbles/v2/help"
"github.com/charmbracelet/bubbles/key" "charm.land/bubbles/v2/key"
"github.com/charmbracelet/bubbles/list" "charm.land/bubbles/v2/list"
"github.com/charmbracelet/bubbles/textinput" "charm.land/bubbles/v2/textinput"
tea "github.com/charmbracelet/bubbletea" tea "charm.land/bubbletea/v2"
) )
type commandItem struct { type commandItem struct {
@@ -77,7 +77,7 @@ type keymap struct {
type tickMsg time.Time type tickMsg time.Time
func (m *model) Init() tea.Cmd { func (m *model) Init() tea.Cmd {
return tea.Batch(textinput.Blink, tea.WindowSize()) return tea.Batch(textinput.Blink, tea.RequestWindowSize)
} }
func getResponsiveWidth(screenWidth, padding, minWidth, maxWidth int) int { func getResponsiveWidth(screenWidth, padding, minWidth, maxWidth int) int {
+8 -8
View File
@@ -5,26 +5,26 @@ import (
"strings" "strings"
"tunnel_pls/types" "tunnel_pls/types"
"github.com/charmbracelet/bubbles/key" "charm.land/bubbles/v2/key"
"github.com/charmbracelet/bubbles/textinput" "charm.land/bubbles/v2/textinput"
tea "github.com/charmbracelet/bubbletea" tea "charm.land/bubbletea/v2"
"github.com/charmbracelet/lipgloss" "charm.land/lipgloss/v2"
) )
func (m *model) slugUpdate(msg tea.KeyMsg) (tea.Model, tea.Cmd) { func (m *model) slugUpdate(msg tea.KeyPressMsg) (tea.Model, tea.Cmd) {
var cmd tea.Cmd var cmd tea.Cmd
if m.tunnelType != types.TunnelTypeHTTP { if m.tunnelType != types.TunnelTypeHTTP {
m.editingSlug = false m.editingSlug = false
m.slugError = "" m.slugError = ""
return m, tea.Batch(tea.ClearScreen, textinput.Blink) return m, textinput.Blink
} }
switch msg.String() { switch msg.String() {
case "esc", "ctrl+c": case "esc", "ctrl+c":
m.editingSlug = false m.editingSlug = false
m.slugError = "" m.slugError = ""
return m, tea.Batch(tea.ClearScreen, textinput.Blink) return m, textinput.Blink
case "enter": case "enter":
inputValue := m.slugInput.Value() inputValue := m.slugInput.Value()
if err := m.interaction.sessionRegistry.Update(m.interaction.user, types.SessionKey{ if err := m.interaction.sessionRegistry.Update(m.interaction.user, types.SessionKey{
@@ -39,7 +39,7 @@ func (m *model) slugUpdate(msg tea.KeyMsg) (tea.Model, tea.Cmd) {
} }
m.editingSlug = false m.editingSlug = false
m.slugError = "" m.slugError = ""
return m, tea.Batch(tea.ClearScreen, textinput.Blink) return m, textinput.Blink
default: default:
if key.Matches(msg, m.keymap.random) { if key.Matches(msg, m.keymap.random) {
newSubdomain, err := m.randomizer.String(20) newSubdomain, err := m.randomizer.String(20)
+22 -1
View File
@@ -232,13 +232,34 @@ func (s *session) handleWindowChange(req *ssh.Request) error {
return req.Reply(true, nil) return req.Reply(true, nil)
} }
func (s *session) handlePtyReq(req *ssh.Request) error {
var ptyPayload struct {
Term string
Width uint32
Height uint32
PxW uint32
PxH uint32
Modes string
}
if err := ssh.Unmarshal(req.Payload, &ptyPayload); err == nil {
if ptyPayload.Width > 0 && ptyPayload.Height > 0 {
s.interaction.SetWH(int(ptyPayload.Width), int(ptyPayload.Height))
}
}
return req.Reply(true, nil)
}
func (s *session) HandleGlobalRequest(GlobalRequest <-chan *ssh.Request) error { func (s *session) HandleGlobalRequest(GlobalRequest <-chan *ssh.Request) error {
for req := range GlobalRequest { for req := range GlobalRequest {
switch req.Type { switch req.Type {
case "shell", "pty-req": case "shell":
if err := req.Reply(true, nil); err != nil { if err := req.Reply(true, nil); err != nil {
return err return err
} }
case "pty-req":
if err := s.handlePtyReq(req); err != nil {
return err
}
case "window-change": case "window-change":
if err := s.handleWindowChange(req); err != nil { if err := s.handleWindowChange(req); err != nil {
return err return err