repos / pico

pico services - prose.sh, pastes.sh, imgs.sh, feeds.sh, pgs.sh
git clone https://github.com/picosh/pico.git

commit
97f9643
parent
252dc3d
author
Eric Bower
date
2024-08-31 03:03:08 +0000 UTC
feat(imgs): pubsub
5 files changed,  +96, -90
M go.mod
M go.sum
M go.mod
+20, -17
 1@@ -1,6 +1,6 @@
 2 module github.com/picosh/pico
 3 
 4-go 1.22
 5+go 1.22.6
 6 
 7 // replace github.com/picosh/tunkit => ../tunkit
 8 
 9@@ -8,6 +8,8 @@ go 1.22
10 
11 // replace github.com/picosh/pobj => ../pobj
12 
13+// replace github.com/picosh/pubsub => ../pubsub
14+
15 replace git.sr.ht/~delthas/senpai => github.com/picosh/senpai v0.0.0-20240503200611-af89e73973b0
16 
17 replace github.com/gdamore/tcell/v2 => github.com/delthas/tcell/v2 v2.4.1-0.20230710100648-1489e78d90fb
18@@ -17,22 +19,24 @@ require (
19 	github.com/alecthomas/chroma/v2 v2.14.0
20 	github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de
21 	github.com/charmbracelet/bubbles v0.18.0
22-	github.com/charmbracelet/bubbletea v0.26.4
23+	github.com/charmbracelet/bubbletea v0.27.0
24 	github.com/charmbracelet/glamour v0.7.0
25-	github.com/charmbracelet/lipgloss v0.11.0
26+	github.com/charmbracelet/lipgloss v0.12.1
27 	github.com/charmbracelet/promwish v0.7.0
28-	github.com/charmbracelet/ssh v0.0.0-20240531200420-04041eb117c7
29-	github.com/charmbracelet/wish v1.4.0
30+	github.com/charmbracelet/ssh v0.0.0-20240725163421-eb71b85b27aa
31+	github.com/charmbracelet/wish v1.4.2
32 	github.com/google/go-cmp v0.6.0
33+	github.com/google/uuid v1.6.0
34 	github.com/gorilla/feeds v1.1.2
35 	github.com/lib/pq v1.10.9
36 	github.com/microcosm-cc/bluemonday v1.0.26
37 	github.com/minio/minio-go/v7 v7.0.70
38 	github.com/mmcdole/gofeed v1.3.0
39 	github.com/muesli/reflow v0.3.0
40-	github.com/muesli/termenv v0.15.2
41+	github.com/muesli/termenv v0.15.3-0.20240509142007-81b8f94111d5
42 	github.com/neurosnap/go-exif-remove v0.0.0-20221010134343-50d1e3c35577
43 	github.com/picosh/pobj v0.0.0-20240709135546-27097077b26a
44+	github.com/picosh/pubsub v0.0.0-20240831030146-b59a4c387b79
45 	github.com/picosh/send v0.0.0-20240820031602-5d3b1a4494cc
46 	github.com/picosh/tunkit v0.0.0-20240709033345-8315d4f3cd0e
47 	github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06
48@@ -46,7 +50,7 @@ require (
49 	go.abhg.dev/goldmark/anchor v0.1.1
50 	go.abhg.dev/goldmark/hashtag v0.3.1
51 	go.abhg.dev/goldmark/toc v0.10.0
52-	golang.org/x/crypto v0.23.0
53+	golang.org/x/crypto v0.26.0
54 	gopkg.in/yaml.v2 v2.4.0
55 )
56 
57@@ -61,12 +65,12 @@ require (
58 	github.com/aymerick/douceur v0.2.0 // indirect
59 	github.com/beorn7/perks v1.0.1 // indirect
60 	github.com/cespare/xxhash/v2 v2.3.0 // indirect
61-	github.com/charmbracelet/keygen v0.5.0 // indirect
62+	github.com/charmbracelet/keygen v0.5.1 // indirect
63 	github.com/charmbracelet/log v0.4.0 // indirect
64-	github.com/charmbracelet/x/ansi v0.1.2 // indirect
65+	github.com/charmbracelet/x/ansi v0.1.4 // indirect
66+	github.com/charmbracelet/x/conpty v0.1.0 // indirect
67 	github.com/charmbracelet/x/errors v0.0.0-20240603171354-f37319acd141 // indirect
68-	github.com/charmbracelet/x/exp/term v0.0.0-20240603171354-f37319acd141 // indirect
69-	github.com/charmbracelet/x/input v0.1.2 // indirect
70+	github.com/charmbracelet/x/input v0.1.3 // indirect
71 	github.com/charmbracelet/x/term v0.1.1 // indirect
72 	github.com/charmbracelet/x/termios v0.1.0 // indirect
73 	github.com/charmbracelet/x/windows v0.1.2 // indirect
74@@ -96,7 +100,6 @@ require (
75 	github.com/golang/geo v0.0.0-20230421003525-6adc56603217 // indirect
76 	github.com/golang/protobuf v1.5.4 // indirect
77 	github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
78-	github.com/google/uuid v1.6.0 // indirect
79 	github.com/gorilla/css v1.0.1 // indirect
80 	github.com/json-iterator/go v1.1.12 // indirect
81 	github.com/klauspost/compress v1.17.8 // indirect
82@@ -143,11 +146,11 @@ require (
83 	github.com/yusufpapurcu/wmi v1.2.4 // indirect
84 	golang.org/x/exp v0.0.0-20240531132922-fd00a4e0eefc // indirect
85 	golang.org/x/net v0.25.0 // indirect
86-	golang.org/x/sync v0.7.0 // indirect
87-	golang.org/x/sys v0.20.0 // indirect
88-	golang.org/x/term v0.20.0 // indirect
89-	golang.org/x/text v0.15.0 // indirect
90-	golang.org/x/time v0.5.0 // indirect
91+	golang.org/x/sync v0.8.0 // indirect
92+	golang.org/x/sys v0.24.0 // indirect
93+	golang.org/x/term v0.23.0 // indirect
94+	golang.org/x/text v0.17.0 // indirect
95+	golang.org/x/time v0.6.0 // indirect
96 	google.golang.org/protobuf v1.34.1 // indirect
97 	gopkg.in/ini.v1 v1.67.0 // indirect
98 	mvdan.cc/xurls/v2 v2.5.0 // indirect
M go.sum
+32, -30
  1@@ -31,30 +31,30 @@ github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UF
  2 github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
  3 github.com/charmbracelet/bubbles v0.18.0 h1:PYv1A036luoBGroX6VWjQIE9Syf2Wby2oOl/39KLfy0=
  4 github.com/charmbracelet/bubbles v0.18.0/go.mod h1:08qhZhtIwzgrtBjAcJnij1t1H0ZRjwHyGsy6AL11PSw=
  5-github.com/charmbracelet/bubbletea v0.26.4 h1:2gDkkzLZaTjMl/dQBpNVtnvcCxsh/FCkimep7FC9c40=
  6-github.com/charmbracelet/bubbletea v0.26.4/go.mod h1:P+r+RRA5qtI1DOHNFn0otoNwB4rn+zNAzSj/EXz6xU0=
  7+github.com/charmbracelet/bubbletea v0.27.0 h1:Mznj+vvYuYagD9Pn2mY7fuelGvP0HAXtZYGgRBCbHvU=
  8+github.com/charmbracelet/bubbletea v0.27.0/go.mod h1:5MdP9XH6MbQkgGhnlxUqCNmBXf9I74KRQ8HIidRxV1Y=
  9 github.com/charmbracelet/glamour v0.7.0 h1:2BtKGZ4iVJCDfMF229EzbeR1QRKLWztO9dMtjmqZSng=
 10 github.com/charmbracelet/glamour v0.7.0/go.mod h1:jUMh5MeihljJPQbJ/wf4ldw2+yBP59+ctV36jASy7ps=
 11-github.com/charmbracelet/keygen v0.5.0 h1:XY0fsoYiCSM9axkrU+2ziE6u6YjJulo/b9Dghnw6MZc=
 12-github.com/charmbracelet/keygen v0.5.0/go.mod h1:DfvCgLHxZ9rJxdK0DGw3C/LkV4SgdGbnliHcObV3L+8=
 13-github.com/charmbracelet/lipgloss v0.11.0 h1:UoAcbQ6Qml8hDwSWs0Y1cB5TEQuZkDPH/ZqwWWYTG4g=
 14-github.com/charmbracelet/lipgloss v0.11.0/go.mod h1:1UdRTH9gYgpcdNN5oBtjbu/IzNKtzVtb7sqN1t9LNn8=
 15+github.com/charmbracelet/keygen v0.5.1 h1:zBkkYPtmKDVTw+cwUyY6ZwGDhRxXkEp0Oxs9sqMLqxI=
 16+github.com/charmbracelet/keygen v0.5.1/go.mod h1:zznJVmK/GWB6dAtjluqn2qsttiCBhA5MZSiwb80fcHw=
 17+github.com/charmbracelet/lipgloss v0.12.1 h1:/gmzszl+pedQpjCOH+wFkZr/N90Snz40J/NR7A0zQcs=
 18+github.com/charmbracelet/lipgloss v0.12.1/go.mod h1:V2CiwIuhx9S1S1ZlADfOj9HmxeMAORuz5izHb0zGbB8=
 19 github.com/charmbracelet/log v0.4.0 h1:G9bQAcx8rWA2T3pWvx7YtPTPwgqpk7D68BX21IRW8ZM=
 20 github.com/charmbracelet/log v0.4.0/go.mod h1:63bXt/djrizTec0l11H20t8FDSvA4CRZJ1KH22MdptM=
 21 github.com/charmbracelet/promwish v0.7.0 h1:oaMH+ey6W4DDIv1xucS8jL1ik/Q46qxjNXlh6XxEm+s=
 22 github.com/charmbracelet/promwish v0.7.0/go.mod h1:WbRJN9irg8LmsBU8G2rFF8md9O3rSg63qrnqquP/+cs=
 23-github.com/charmbracelet/ssh v0.0.0-20240531200420-04041eb117c7 h1:BTAPOJlz5Q9TUl3HxAc2g04KS9DzSUtKapvXg7pRhwE=
 24-github.com/charmbracelet/ssh v0.0.0-20240531200420-04041eb117c7/go.mod h1:yDZEh+wUCh2sszpTfFQ494YHQpHaJQ0zsIy4BTr1gVw=
 25-github.com/charmbracelet/wish v1.4.0 h1:pL1uVP/YuYgJheHEj98teZ/n6pMYnmlZq/fcHvomrfc=
 26-github.com/charmbracelet/wish v1.4.0/go.mod h1:ew4/MjJVfW/akEO9KmrQHQv1F7bQRGscRMrA+KtovTk=
 27-github.com/charmbracelet/x/ansi v0.1.2 h1:6+LR39uG8DE6zAmbu023YlqjJHkYXDF1z36ZwzO4xZY=
 28-github.com/charmbracelet/x/ansi v0.1.2/go.mod h1:dk73KoMTT5AX5BsX0KrqhsTqAnhZZoCBjs7dGWp4Ktw=
 29+github.com/charmbracelet/ssh v0.0.0-20240725163421-eb71b85b27aa h1:6rePgmsJguB6Z7Y55stsEVDlWFJoUpQvOX4mdnBjgx4=
 30+github.com/charmbracelet/ssh v0.0.0-20240725163421-eb71b85b27aa/go.mod h1:LmMZag2g7ILMmWtDmU7dIlctUopwmb73KpPzj0ip1uk=
 31+github.com/charmbracelet/wish v1.4.2 h1:H2BKXewugK9Al75wST9h0hpQ95h981RZ5rtimDpygPQ=
 32+github.com/charmbracelet/wish v1.4.2/go.mod h1:3Bzq7qMU2LTvdaM61KrCnhrzGP92D/Ru7CasrpyZmzY=
 33+github.com/charmbracelet/x/ansi v0.1.4 h1:IEU3D6+dWwPSgZ6HBH+v6oUuZ/nVawMiWj5831KfiLM=
 34+github.com/charmbracelet/x/ansi v0.1.4/go.mod h1:dk73KoMTT5AX5BsX0KrqhsTqAnhZZoCBjs7dGWp4Ktw=
 35+github.com/charmbracelet/x/conpty v0.1.0 h1:4zc8KaIcbiL4mghEON8D72agYtSeIgq8FSThSPQIb+U=
 36+github.com/charmbracelet/x/conpty v0.1.0/go.mod h1:rMFsDJoDwVmiYM10aD4bH2XiRgwI7NYJtQgl5yskjEQ=
 37 github.com/charmbracelet/x/errors v0.0.0-20240603171354-f37319acd141 h1:9S0jGt7wdFksixTHjDn30qWOUu6LPmPidnO42roe+Ek=
 38 github.com/charmbracelet/x/errors v0.0.0-20240603171354-f37319acd141/go.mod h1:2P0UgXMEa6TsToMSuFqKFQR+fZTO9CNGUNokkPatT/0=
 39-github.com/charmbracelet/x/exp/term v0.0.0-20240603171354-f37319acd141 h1:/uoDqgv4S+M5XVUrkSxSq5rARNAbSXVRmRqnwXzIKlQ=
 40-github.com/charmbracelet/x/exp/term v0.0.0-20240603171354-f37319acd141/go.mod h1:YBotIGhfoWhHDlnUpJMkjebGV2pdGRCn1Y4/Nk/vVcU=
 41-github.com/charmbracelet/x/input v0.1.2 h1:QJAZr33eOhDowkkEQ24rsJy4Llxlm+fRDf/cQrmqJa0=
 42-github.com/charmbracelet/x/input v0.1.2/go.mod h1:LGBim0maUY4Pitjn/4fHnuXb4KirU3DODsyuHuXdOyA=
 43+github.com/charmbracelet/x/input v0.1.3 h1:oy4TMhyGQsYs/WWJwu1ELUMFnjiUAXwtDf048fHbCkg=
 44+github.com/charmbracelet/x/input v0.1.3/go.mod h1:1gaCOyw1KI9e2j00j/BBZ4ErzRZqa05w0Ghn83yIhKU=
 45 github.com/charmbracelet/x/term v0.1.1 h1:3cosVAiPOig+EV4X9U+3LDgtwwAoEzJjNdwbXDjF6yI=
 46 github.com/charmbracelet/x/term v0.1.1/go.mod h1:wB1fHt5ECsu3mXYusyzcngVWWlu1KKUmmLhfgr/Flxw=
 47 github.com/charmbracelet/x/termios v0.1.0 h1:y4rjAHeFksBAfGbkRDmVinMg7x7DELIGAFbdNvxg97k=
 48@@ -210,8 +210,8 @@ github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELU
 49 github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo=
 50 github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s=
 51 github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8=
 52-github.com/muesli/termenv v0.15.2 h1:GohcuySI0QmI3wN8Ok9PtKGkgkFIk7y6Vpb5PvrY+Wo=
 53-github.com/muesli/termenv v0.15.2/go.mod h1:Epx+iuz8sNs7mNKhxzH4fWXGNpZwUaJKRS1noLXviQ8=
 54+github.com/muesli/termenv v0.15.3-0.20240509142007-81b8f94111d5 h1:NiONcKK0EV5gUZcnCiPMORaZA0eBDc+Fgepl9xl4lZ8=
 55+github.com/muesli/termenv v0.15.3-0.20240509142007-81b8f94111d5/go.mod h1:hxSnBBYLK21Vtq/PHd0S2FYCxBXzBua8ov5s1RobyRQ=
 56 github.com/neurosnap/go-exif-remove v0.0.0-20221010134343-50d1e3c35577 h1:hVmVNttSLNloGsbFKVXAUHonXTd8KKrv30U/8UkloKI=
 57 github.com/neurosnap/go-exif-remove v0.0.0-20221010134343-50d1e3c35577/go.mod h1:G3Cu1AW+dmRLDFpOi8eUAfc3cGoRHUjTkGjeRcndgl4=
 58 github.com/neurosnap/go-jpeg-image-structure v0.0.0-20221010133817-70b1c1ff679e h1:76Dng5ms0fR+26doKZAvNqhi2UPfnLxGfPIDEr+BBlM=
 59@@ -224,6 +224,8 @@ github.com/picosh/go-rsync-receiver v0.0.0-20240709135253-1daf4b12a9fc h1:bvcsoO
 60 github.com/picosh/go-rsync-receiver v0.0.0-20240709135253-1daf4b12a9fc/go.mod h1:i0iR3W4GSm1PuvVxB9OH32E5jP+CYkVb2NQSe0JCtlo=
 61 github.com/picosh/pobj v0.0.0-20240709135546-27097077b26a h1:Cr1xODiyd/SjjBRtYA9VX6Do3D+w+DansQzkb4NGeyA=
 62 github.com/picosh/pobj v0.0.0-20240709135546-27097077b26a/go.mod h1:VIkR1MZBvxSK2OO47jikxikAO/sKb/vTmXX5ZuYTIvo=
 63+github.com/picosh/pubsub v0.0.0-20240831030146-b59a4c387b79 h1:QqOtaebSRNXS0FA74bRJUHEESMM4KTmOZ3otXjS+Pss=
 64+github.com/picosh/pubsub v0.0.0-20240831030146-b59a4c387b79/go.mod h1:FKC8uot+40iXmuDzTfbxYDG5PIc3ghwkmP2iItBKH0I=
 65 github.com/picosh/send v0.0.0-20240820031602-5d3b1a4494cc h1:IIsJuAFG2ju3cygKVKTIsYYZf21q5S3Dr1H4fGbfgJg=
 66 github.com/picosh/send v0.0.0-20240820031602-5d3b1a4494cc/go.mod h1:RAgLDK3LrDK6pNeXtU9tjo28obl5DxShcTUk2nm/KCM=
 67 github.com/picosh/senpai v0.0.0-20240503200611-af89e73973b0 h1:pBRIbiCj7K6rGELijb//dYhyCo8A3fvxW5dijrJVtjs=
 68@@ -322,8 +324,8 @@ golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPh
 69 golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
 70 golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw=
 71 golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g=
 72-golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI=
 73-golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
 74+golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw=
 75+golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54=
 76 golang.org/x/exp v0.0.0-20240531132922-fd00a4e0eefc h1:O9NuF4s+E/PvMIy+9IUZB9znFwUIXEWSstNjek6VpVg=
 77 golang.org/x/exp v0.0.0-20240531132922-fd00a4e0eefc/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc=
 78 golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
 79@@ -349,8 +351,8 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ
 80 golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 81 golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 82 golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 83-golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
 84-golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
 85+golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
 86+golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
 87 golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
 88 golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 89 golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 90@@ -368,8 +370,8 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 91 golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 92 golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 93 golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
 94-golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
 95-golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
 96+golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg=
 97+golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
 98 golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
 99 golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
100 golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
101@@ -377,8 +379,8 @@ golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
102 golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY=
103 golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
104 golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww=
105-golang.org/x/term v0.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw=
106-golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY=
107+golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU=
108+golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk=
109 golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
110 golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
111 golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
112@@ -386,11 +388,11 @@ golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
113 golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
114 golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
115 golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
116-golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk=
117-golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
118+golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc=
119+golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
120 golang.org/x/time v0.4.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
121-golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk=
122-golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
123+golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U=
124+golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
125 golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
126 golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
127 golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
M imgs/cli.go
+14, -0
 1@@ -12,11 +12,13 @@ import (
 2 
 3 	"github.com/charmbracelet/ssh"
 4 	"github.com/charmbracelet/wish"
 5+	"github.com/google/uuid"
 6 	"github.com/picosh/pico/db"
 7 	"github.com/picosh/pico/shared"
 8 	"github.com/picosh/pico/shared/storage"
 9 	"github.com/picosh/pico/tui/common"
10 	sst "github.com/picosh/pobj/storage"
11+	psub "github.com/picosh/pubsub"
12 	"github.com/picosh/send/send/utils"
13 )
14 
15@@ -186,12 +188,14 @@ type CliHandler struct {
16 	Logger      *slog.Logger
17 	Storage     storage.StorageServe
18 	RegistryUrl string
19+	PubSub      *psub.Cfg
20 }
21 
22 func WishMiddleware(handler *CliHandler) wish.Middleware {
23 	dbpool := handler.DBPool
24 	log := handler.Logger
25 	st := handler.Storage
26+	pubsub := handler.PubSub
27 
28 	return func(next ssh.Handler) ssh.Handler {
29 		return func(sesh ssh.Session) {
30@@ -254,6 +258,16 @@ func WishMiddleware(handler *CliHandler) wish.Middleware {
31 				opts.notice()
32 				opts.bail(err)
33 				return
34+			} else if cmd == "sub" {
35+				err = pubsub.PubSub.Sub(&psub.Subscriber{
36+					ID:      uuid.NewString(),
37+					Name:    fmt.Sprintf("%s@%s", user.Name, repoName),
38+					Session: sesh,
39+					Chan:    make(chan error),
40+				})
41+				if err != nil {
42+					wish.Errorln(sesh, err)
43+				}
44 			} else {
45 				next(sesh)
46 				return
M imgs/registry.yml
+1, -0
1@@ -5,6 +5,7 @@ storage:
2   s3:
3     region: us-east-1
4     bucket: imgs
5+    # regionendpoint: http://minio:9000
6     regionendpoint: https://minio.pico.sh
7   redirect:
8     disable: true
M imgs/ssh.go
+29, -43
  1@@ -24,6 +24,7 @@ import (
  2 	"github.com/picosh/pico/db/postgres"
  3 	"github.com/picosh/pico/shared"
  4 	"github.com/picosh/pico/shared/storage"
  5+	psub "github.com/picosh/pubsub"
  6 	"github.com/picosh/tunkit"
  7 )
  8 
  9@@ -79,7 +80,7 @@ func (e *ErrorHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
 10 	http.Error(w, e.Err.Error(), http.StatusInternalServerError)
 11 }
 12 
 13-func createServeMux(handler *CliHandler, pubsub *tunkit.PubSubHandler) func(ctx ssh.Context) http.Handler {
 14+func createServeMux(handler *CliHandler, pubsub *psub.Cfg) func(ctx ssh.Context) http.Handler {
 15 	return func(ctx ssh.Context) http.Handler {
 16 		router := http.NewServeMux()
 17 
 18@@ -89,12 +90,6 @@ func createServeMux(handler *CliHandler, pubsub *tunkit.PubSubHandler) func(ctx
 19 			slug = user.Name
 20 		}
 21 
 22-		pubkeys, err := handler.DBPool.FindKeysForUser(user)
 23-		if err != nil {
 24-			handler.Logger.Error("cant get pubkeys for user", "err", err)
 25-			return router
 26-		}
 27-
 28 		proxy := httputil.NewSingleHostReverseProxy(&url.URL{
 29 			Scheme: "http",
 30 			Host:   handler.RegistryUrl,
 31@@ -221,41 +216,26 @@ func createServeMux(handler *CliHandler, pubsub *tunkit.PubSubHandler) func(ctx
 32 
 33 			if r.Request.Method == http.MethodPut && strings.Contains(r.Request.URL.Path, "/manifests/") {
 34 				digest := r.Header.Get("Docker-Content-Digest")
 35-				forwards := pubsub.GetForwards()
 36-				for _, rf := range forwards {
 37-					ck, err := shared.KeyForKeyText(rf.Pubkey)
 38-					if err != nil {
 39-						continue
 40-					}
 41-					found := false
 42-					for _, pk := range pubkeys {
 43-						if pk.Key == ck {
 44-							found = true
 45-						}
 46-					}
 47-					// event corresponds to a different user, skip
 48-					if !found {
 49-						continue
 50-					}
 51+				// [ ]/v2/erock/alpine/manifests/latest
 52+				splitPath := strings.Split(r.Request.URL.Path, "/")
 53+				img := splitPath[3]
 54+				tag := splitPath[5]
 55+
 56+				furl := fmt.Sprintf(
 57+					"digest=%s&image=%s&tag=%s",
 58+					url.QueryEscape(digest),
 59+					img,
 60+					tag,
 61+				)
 62+				handler.Logger.Info("sending event", "url", furl)
 63+
 64+				err := pubsub.PubSub.Pub(&psub.Msg{
 65+					Name:   fmt.Sprintf("%s@%s:%s", user.Name, img, tag),
 66+					Reader: strings.NewReader(furl),
 67+				})
 68 
 69-					// [ ]/v2/erock/alpine/manifests/latest
 70-					splitPath := strings.Split(r.Request.URL.Path, "/")
 71-					img := splitPath[3]
 72-					tag := splitPath[5]
 73-
 74-					addr := rf.Listener.Addr()
 75-					furl := fmt.Sprintf(
 76-						"http://%s?digest=%s&image=%s&tag=%s",
 77-						addr.String(),
 78-						url.QueryEscape(digest),
 79-						img,
 80-						tag,
 81-					)
 82-					handler.Logger.Info("sending event", "url", furl)
 83-					_, err = http.Get(furl)
 84-					if err != nil {
 85-						handler.Logger.Error("could not make request to pubsub", "err", err)
 86-					}
 87+				if err != nil {
 88+					handler.Logger.Error("pub error", "err", err)
 89 				}
 90 			}
 91 
 92@@ -296,14 +276,21 @@ func StartSshServer() {
 93 		panic(err)
 94 	}
 95 
 96+	pubsub := &psub.Cfg{
 97+		Logger: logger,
 98+		PubSub: &psub.PubSubMulticast{
 99+			Logger: logger,
100+		},
101+	}
102+
103 	handler := &CliHandler{
104 		Logger:      logger,
105 		DBPool:      dbh,
106 		Storage:     st,
107 		RegistryUrl: registryUrl,
108+		PubSub:      pubsub,
109 	}
110 
111-	pubsub := tunkit.NewPubSubHandler(logger)
112 	s, err := wish.NewServer(
113 		wish.WithAddress(fmt.Sprintf("%s:%s", host, port)),
114 		wish.WithHostKeyPath("ssh_data/term_info_ed25519"),
115@@ -312,7 +299,6 @@ func StartSshServer() {
116 		tunkit.WithWebTunnel(
117 			tunkit.NewWebTunnelHandler(createServeMux(handler, pubsub), logger),
118 		),
119-		tunkit.WithPubSub(pubsub),
120 	)
121 
122 	if err != nil {