diff --git a/appview/issues/issues.go b/appview/issues/issues.go index f0dbeaf1..3b74045d 100644 --- a/appview/issues/issues.go +++ b/appview/issues/issues.go @@ -10,7 +10,7 @@ import ( "time" comatproto "github.com/bluesky-social/indigo/api/atproto" - atpclient "github.com/bluesky-social/indigo/atproto/client" + "github.com/bluesky-social/indigo/atproto/atclient" "github.com/bluesky-social/indigo/atproto/syntax" lexutil "github.com/bluesky-social/indigo/lex/util" "github.com/go-chi/chi/v5" @@ -1098,7 +1098,7 @@ func (rp *Issues) NewIssue(w http.ResponseWriter, r *http.Request) { // this is used to rollback changes made to the PDS // // it is a no-op if the provided ATURI is empty -func rollbackRecord(ctx context.Context, aturi string, client *atpclient.APIClient) error { +func rollbackRecord(ctx context.Context, aturi string, client *atclient.APIClient) error { if aturi == "" { return nil } diff --git a/appview/labels/labels.go b/appview/labels/labels.go index 56a2794a..76c94a5e 100644 --- a/appview/labels/labels.go +++ b/appview/labels/labels.go @@ -22,7 +22,7 @@ import ( "tangled.org/core/tid" comatproto "github.com/bluesky-social/indigo/api/atproto" - atpclient "github.com/bluesky-social/indigo/atproto/client" + "github.com/bluesky-social/indigo/atproto/atclient" "github.com/bluesky-social/indigo/atproto/syntax" lexutil "github.com/bluesky-social/indigo/lex/util" "github.com/go-chi/chi/v5" @@ -269,7 +269,7 @@ func (l *Labels) PerformLabelOp(w http.ResponseWriter, r *http.Request) { // this is used to rollback changes made to the PDS // // it is a no-op if the provided ATURI is empty -func rollbackRecord(ctx context.Context, aturi string, client *atpclient.APIClient) error { +func rollbackRecord(ctx context.Context, aturi string, client *atclient.APIClient) error { if aturi == "" { return nil } diff --git a/appview/oauth/oauth.go b/appview/oauth/oauth.go index 81b2cbb2..2064ab47 100644 --- a/appview/oauth/oauth.go +++ b/appview/oauth/oauth.go @@ -11,9 +11,9 @@ import ( "time" comatproto "github.com/bluesky-social/indigo/api/atproto" + "github.com/bluesky-social/indigo/atproto/atclient" + "github.com/bluesky-social/indigo/atproto/atcrypto" "github.com/bluesky-social/indigo/atproto/auth/oauth" - atpclient "github.com/bluesky-social/indigo/atproto/client" - atcrypto "github.com/bluesky-social/indigo/atproto/crypto" "github.com/bluesky-social/indigo/atproto/syntax" xrpc "github.com/bluesky-social/indigo/xrpc" "github.com/gorilla/sessions" @@ -262,7 +262,7 @@ func (o *OAuth) GetDid(r *http.Request) string { return "" } -func (o *OAuth) AuthorizedClient(r *http.Request) (*atpclient.APIClient, error) { +func (o *OAuth) AuthorizedClient(r *http.Request) (*atclient.APIClient, error) { session, err := o.ResumeSession(r) if err != nil { return nil, fmt.Errorf("error getting session: %w", err) diff --git a/appview/repo/repo.go b/appview/repo/repo.go index 81f46173..3b093ebb 100644 --- a/appview/repo/repo.go +++ b/appview/repo/repo.go @@ -32,7 +32,7 @@ import ( "tangled.org/core/xrpc/serviceauth" comatproto "github.com/bluesky-social/indigo/api/atproto" - atpclient "github.com/bluesky-social/indigo/atproto/client" + "github.com/bluesky-social/indigo/atproto/atclient" "github.com/bluesky-social/indigo/atproto/syntax" lexutil "github.com/bluesky-social/indigo/lex/util" securejoin "github.com/cyphar/filepath-securejoin" @@ -1204,7 +1204,7 @@ func (rp *Repo) ForkRepo(w http.ResponseWriter, r *http.Request) { // this is used to rollback changes made to the PDS // // it is a no-op if the provided ATURI is empty -func rollbackRecord(ctx context.Context, aturi string, client *atpclient.APIClient) error { +func rollbackRecord(ctx context.Context, aturi string, client *atclient.APIClient) error { if aturi == "" { return nil } diff --git a/appview/settings/settings.go b/appview/settings/settings.go index 38e00365..fc80e5da 100644 --- a/appview/settings/settings.go +++ b/appview/settings/settings.go @@ -28,7 +28,7 @@ import ( "tangled.org/core/tid" comatproto "github.com/bluesky-social/indigo/api/atproto" - atpclient "github.com/bluesky-social/indigo/atproto/client" + "github.com/bluesky-social/indigo/atproto/atclient" "github.com/bluesky-social/indigo/atproto/syntax" lexutil "github.com/bluesky-social/indigo/lex/util" "github.com/gliderlabs/ssh" @@ -816,7 +816,7 @@ func (s *Settings) updateHandle(w http.ResponseWriter, r *http.Request) { log.Printf("failed to update handle: %s", err) msg := err.Error() - var apiErr *atpclient.APIError + var apiErr *atclient.APIError if errors.As(err, &apiErr) && apiErr.Message != "" { msg = apiErr.Message } diff --git a/appview/state/state.go b/appview/state/state.go index d22eb3e0..ac927ede 100644 --- a/appview/state/state.go +++ b/appview/state/state.go @@ -38,7 +38,7 @@ import ( "tangled.org/core/tid" comatproto "github.com/bluesky-social/indigo/api/atproto" - atpclient "github.com/bluesky-social/indigo/atproto/client" + "github.com/bluesky-social/indigo/atproto/atclient" "github.com/bluesky-social/indigo/atproto/syntax" lexutil "github.com/bluesky-social/indigo/lex/util" "github.com/bluesky-social/indigo/xrpc" @@ -588,7 +588,7 @@ func (s *State) NewRepo(w http.ResponseWriter, r *http.Request) { // this is used to rollback changes made to the PDS // // it is a no-op if the provided ATURI is empty -func rollbackRecord(ctx context.Context, aturi string, client *atpclient.APIClient) error { +func rollbackRecord(ctx context.Context, aturi string, client *atclient.APIClient) error { if aturi == "" { return nil } diff --git a/go.mod b/go.mod index f0105aa4..fa22559b 100644 --- a/go.mod +++ b/go.mod @@ -12,8 +12,8 @@ require ( github.com/aws/aws-sdk-go-v2/service/s3 v1.96.0 github.com/blevesearch/bleve/v2 v2.5.3 github.com/bluekeyes/go-gitdiff v0.8.1 - github.com/bluesky-social/indigo v0.0.0-20251003000214-3259b215110e - github.com/bluesky-social/jetstream v0.0.0-20241210005130-ea96859b93d1 + github.com/bluesky-social/indigo v0.0.0-20260220055544-bf41e2ee75ab + github.com/bluesky-social/jetstream v0.0.0-20260226214936-e0274250f654 github.com/bmatcuk/doublestar/v4 v4.9.1 github.com/carlmjohnson/versioninfo v0.22.5 github.com/casbin/casbin/v2 v2.103.0 @@ -45,7 +45,7 @@ require ( github.com/srwiley/oksvg v0.0.0-20221011165216-be6e8873101c github.com/srwiley/rasterx v0.0.0-20220730225603-2ab79fcdd4ef github.com/stretchr/testify v1.10.0 - github.com/urfave/cli/v3 v3.3.3 + github.com/urfave/cli/v3 v3.4.1 github.com/whyrusleeping/cbor-gen v0.3.1 github.com/yuin/goldmark v1.7.13 github.com/yuin/goldmark-emoji v1.0.6 @@ -116,6 +116,7 @@ require ( github.com/dlclark/regexp2 v1.11.5 // indirect github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect + github.com/earthboundkid/versioninfo/v2 v2.24.1 // indirect github.com/emirpasic/gods v1.18.1 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect @@ -246,5 +247,7 @@ replace github.com/bluekeyes/go-gitdiff => tangled.sh/oppi.li/go-gitdiff v0.8.2 replace github.com/alecthomas/chroma/v2 => github.com/oppiliappan/chroma/v2 v2.24.2 +replace github.com/bluesky-social/indigo => github.com/boltlessengineer/indigo v0.0.0-20260315101958-fb1dfa36fed2 + // from bluesky-social/indigo replace github.com/gocql/gocql => github.com/scylladb/gocql v1.14.4 diff --git a/go.sum b/go.sum index b7421648..063901fa 100644 --- a/go.sum +++ b/go.sum @@ -94,14 +94,14 @@ github.com/blevesearch/zapx/v15 v15.4.2 h1:sWxpDE0QQOTjyxYbAVjt3+0ieu8NCE0fDRaFx github.com/blevesearch/zapx/v15 v15.4.2/go.mod h1:1pssev/59FsuWcgSnTa0OeEpOzmhtmr/0/11H0Z8+Nw= github.com/blevesearch/zapx/v16 v16.2.4 h1:tGgfvleXTAkwsD5mEzgM3zCS/7pgocTCnO1oyAUjlww= github.com/blevesearch/zapx/v16 v16.2.4/go.mod h1:Rti/REtuuMmzwsI8/C/qIzRaEoSK/wiFYw5e5ctUKKs= -github.com/bluesky-social/indigo v0.0.0-20251003000214-3259b215110e h1:IutKPwmbU0LrYqw03EuwJtMdAe67rDTrL1U8S8dicRU= -github.com/bluesky-social/indigo v0.0.0-20251003000214-3259b215110e/go.mod h1:n6QE1NDPFoi7PRbMUZmc2y7FibCqiVU4ePpsvhHUBR8= -github.com/bluesky-social/jetstream v0.0.0-20241210005130-ea96859b93d1 h1:CFvRtYNSnWRAi/98M3O466t9dYuwtesNbu6FVPymRrA= -github.com/bluesky-social/jetstream v0.0.0-20241210005130-ea96859b93d1/go.mod h1:WiYEeyJSdUwqoaZ71KJSpTblemUCpwJfh5oVXplK6T4= +github.com/bluesky-social/jetstream v0.0.0-20260226214936-e0274250f654 h1:OK76FcHhZp8ohjRB0OMWgti0oYAWFlt3KDQcIkH1pfI= +github.com/bluesky-social/jetstream v0.0.0-20260226214936-e0274250f654/go.mod h1:vt8kVRKtvrBspt9G38wDD8+BotjIMO8u8IYoVnyE4zY= github.com/bmatcuk/doublestar/v4 v4.6.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= github.com/bmatcuk/doublestar/v4 v4.7.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= github.com/bmatcuk/doublestar/v4 v4.9.1 h1:X8jg9rRZmJd4yRy7ZeNDRnM+T3ZfHv15JiBJ/avrEXE= github.com/bmatcuk/doublestar/v4 v4.9.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= +github.com/boltlessengineer/indigo v0.0.0-20260315101958-fb1dfa36fed2 h1:63+EsT7kltod8g1eA0eNuvq1q9ANJWRdxlLeJjJDVYY= +github.com/boltlessengineer/indigo v0.0.0-20260315101958-fb1dfa36fed2/go.mod h1:VG/LeqLGNI3Ew7lsYixajnZGFfWPv144qbUddh+Oyag= github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs= github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c= github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA= @@ -178,6 +178,8 @@ github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4 github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= +github.com/earthboundkid/versioninfo/v2 v2.24.1 h1:SJTMHaoUx3GzjjnUO1QzP3ZXK6Ee/nbWyCm58eY3oUg= +github.com/earthboundkid/versioninfo/v2 v2.24.1/go.mod h1:VcWEooDEuyUJnMfbdTh0uFN4cfEIg+kHMuWB2CDCLjw= github.com/elazarl/goproxy v1.7.2 h1:Y2o6urb7Eule09PjlhQRGNsqRfPmYI3KKQLFpCAV3+o= github.com/elazarl/goproxy v1.7.2/go.mod h1:82vkLNir0ALaW14Rc399OTTjyNREgmdL2cVoIbS6XaE= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= @@ -535,8 +537,8 @@ github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhso github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= github.com/urfave/cli v1.22.10/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/urfave/cli/v3 v3.3.3 h1:byCBaVdIXuLPIDm5CYZRVG6NvT7tv1ECqdU4YzlEa3I= -github.com/urfave/cli/v3 v3.3.3/go.mod h1:FJSKtM/9AiiTOJL4fJ6TbMUkxBXn7GO9guZqoZtpYpo= +github.com/urfave/cli/v3 v3.4.1 h1:1M9UOCy5bLmGnuu1yn3t3CB4rG79Rtoxuv1sPhnm6qM= +github.com/urfave/cli/v3 v3.4.1/go.mod h1:FJSKtM/9AiiTOJL4fJ6TbMUkxBXn7GO9guZqoZtpYpo= github.com/vmihailenco/go-tinylfu v0.2.2 h1:H1eiG6HM36iniK6+21n9LLpzx1G9R3DJa2UjUjbynsI= github.com/vmihailenco/go-tinylfu v0.2.2/go.mod h1:CutYi2Q9puTxfcolkliPq4npPuofg9N9t8JVrjzwa3Q= github.com/vmihailenco/msgpack/v5 v5.3.4/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= diff --git a/idresolver/resolver.go b/idresolver/resolver.go index 6ec77097..c8b8c003 100644 --- a/idresolver/resolver.go +++ b/idresolver/resolver.go @@ -60,7 +60,7 @@ func DefaultResolver(plcUrl string) *Resolver { base := BaseDirectory(plcUrl) cached := identity.NewCacheDirectory(base, 250_000, time.Hour*24, time.Minute*2, time.Minute*5) return &Resolver{ - directory: &cached, + directory: cached, } } @@ -80,7 +80,7 @@ func (r *Resolver) ResolveIdent(ctx context.Context, arg string) (*identity.Iden return nil, err } - return r.directory.Lookup(ctx, *id) + return r.directory.Lookup(ctx, id) } func (r *Resolver) ResolveIdents(ctx context.Context, idents []string) []*identity.Identity { @@ -117,7 +117,7 @@ func (r *Resolver) InvalidateIdent(ctx context.Context, arg string) error { return err } - return r.directory.Purge(ctx, *id) + return r.directory.Purge(ctx, id) } func (r *Resolver) Directory() identity.Directory { diff --git a/nix/gomod2nix.toml b/nix/gomod2nix.toml index d1f90767..b0bf80b4 100644 --- a/nix/gomod2nix.toml +++ b/nix/gomod2nix.toml @@ -139,11 +139,12 @@ schema = 3 hash = "sha256-GWm5i1ukuBukV0GMF1rffpbOSSXZdfg6/0pABMiGzLQ=" replaced = "tangled.sh/oppi.li/go-gitdiff" [mod."github.com/bluesky-social/indigo"] - version = "v0.0.0-20251003000214-3259b215110e" - hash = "sha256-qi/GrquJznbLnnHVpd7IqoryCESbi6xE4X1SiEM2qlo=" + version = "v0.0.0-20260315101958-fb1dfa36fed2" + hash = "sha256-R5Dmcsi1a5LquA/a30YyjLAh7Mjg17EuTNVCDxyw4JE=" + replaced = "github.com/boltlessengineer/indigo" [mod."github.com/bluesky-social/jetstream"] - version = "v0.0.0-20241210005130-ea96859b93d1" - hash = "sha256-AiapbrkjXboIKc5QNiWH0KyNs0zKnn6UlGwWFlkUfm0=" + version = "v0.0.0-20260226214936-e0274250f654" + hash = "sha256-VE93NvI3PreteLHnlv7WT6GgH2vSjtoFjMygCmrznfg=" [mod."github.com/bmatcuk/doublestar/v4"] version = "v4.9.1" hash = "sha256-0iyHjyTAsfhgYSsE+NKxSNGBuM3Id615VWeQhssTShE=" @@ -225,6 +226,9 @@ schema = 3 [mod."github.com/dustin/go-humanize"] version = "v1.0.1" hash = "sha256-yuvxYYngpfVkUg9yAmG99IUVmADTQA0tMbBXe0Fq0Mc=" + [mod."github.com/earthboundkid/versioninfo/v2"] + version = "v2.24.1" + hash = "sha256-nbRdiX9WN2y1aiw1CR/DQ6AYqztow8FazndwY3kByHM=" [mod."github.com/emirpasic/gods"] version = "v1.18.1" hash = "sha256-hGDKddjLj+5dn2woHtXKUdd49/3xdsqnhx7VEdCu1m4=" @@ -558,8 +562,8 @@ schema = 3 version = "v1.2.5" hash = "sha256-OYGNolkmL7E1Qs2qrQ3IVpQp5gkcHNU/AB/z2O+Myps=" [mod."github.com/urfave/cli/v3"] - version = "v3.3.3" - hash = "sha256-FdPiu7koY1qBinkfca4A05zCrX+Vu4eRz8wlRDZJyGg=" + version = "v3.4.1" + hash = "sha256-cDMaQrIVMthUhdyI1mKXzDC5/wIK151073lzRl92RnA=" [mod."github.com/vmihailenco/go-tinylfu"] version = "v0.2.2" hash = "sha256-ZHr4g7DJAV6rLcfrEWZwo9wJSeZcXB9KSP38UIOFfaM="