From ccb3113191a757ba53d988f4c0836588414d9398 Mon Sep 17 00:00:00 2001 From: Anirudh Oppiliappan Date: Mon, 24 Mar 2025 13:02:01 +0200 Subject: [PATCH] all: rename module to tangled.sh/tangled.sh/core --- appview/auth/auth.go | 2 +- appview/db/pulls.go | 10 +++++----- appview/pages/pages.go | 8 ++++---- appview/state/follow.go | 6 +++--- appview/state/jetstream.go | 4 ++-- appview/state/middleware.go | 6 +++--- appview/state/pull.go | 8 ++++---- appview/state/repo.go | 10 +++++----- appview/state/repo_util.go | 6 +++--- appview/state/router.go | 2 +- appview/state/settings.go | 8 ++++---- appview/state/signer.go | 2 +- appview/state/star.go | 6 +++--- appview/state/state.go | 14 +++++++------- cmd/appview/main.go | 4 ++-- cmd/gen.go | 2 +- cmd/jstest/main.go | 2 +- cmd/knotserver/main.go | 14 +++++++------- cmd/repoguard/main.go | 2 +- go.mod | 6 +++--- jetstream/jetstream.go | 2 +- knotserver/db/pubkeys.go | 2 +- knotserver/file.go | 2 +- knotserver/git.go | 2 +- knotserver/git/diff.go | 2 +- knotserver/git/git.go | 2 +- knotserver/git/tree.go | 2 +- knotserver/handler.go | 8 ++++---- knotserver/internal.go | 4 ++-- knotserver/jetstream.go | 6 +++--- knotserver/routes.go | 6 +++--- lexicon-build-config.json | 2 +- 32 files changed, 81 insertions(+), 81 deletions(-) diff --git a/appview/auth/auth.go b/appview/auth/auth.go index a015d528..ff191962 100644 --- a/appview/auth/auth.go +++ b/appview/auth/auth.go @@ -10,7 +10,7 @@ import ( "github.com/bluesky-social/indigo/atproto/identity" "github.com/bluesky-social/indigo/xrpc" "github.com/gorilla/sessions" - "github.com/sotangled/tangled/appview" + "tangled.sh/tangled.sh/core/appview" ) type Auth struct { diff --git a/appview/db/pulls.go b/appview/db/pulls.go index 14129cfd..8761edd8 100644 --- a/appview/db/pulls.go +++ b/appview/db/pulls.go @@ -9,7 +9,7 @@ import ( "github.com/bluekeyes/go-gitdiff/gitdiff" "github.com/bluesky-social/indigo/atproto/syntax" - "github.com/sotangled/tangled/types" + "tangled.sh/tangled.sh/core/types" ) type PullState int @@ -289,7 +289,7 @@ func GetPull(e Execer, repoAt syntax.ATURI, pullId int) (*Pull, error) { rkey from pulls - where + where repo_at = ? and pull_id = ? ` row := e.QueryRow(query, repoAt, pullId) @@ -321,7 +321,7 @@ func GetPull(e Execer, repoAt syntax.ATURI, pullId int) (*Pull, error) { submissionsQuery := ` select id, pull_id, repo_at, round_number, patch, created - from + from pull_submissions where repo_at = ? and pull_id = ? @@ -370,7 +370,7 @@ func GetPull(e Execer, repoAt syntax.ATURI, pullId int) (*Pull, error) { } inClause := strings.TrimSuffix(strings.Repeat("?, ", len(submissionsMap)), ", ") commentsQuery := fmt.Sprintf(` - select + select id, pull_id, submission_id, @@ -383,7 +383,7 @@ func GetPull(e Execer, repoAt syntax.ATURI, pullId int) (*Pull, error) { pull_comments where submission_id IN (%s) - order by + order by created asc `, inClause) commentsRows, err := e.Query(commentsQuery, args...) diff --git a/appview/pages/pages.go b/appview/pages/pages.go index f38df42f..e44066be 100644 --- a/appview/pages/pages.go +++ b/appview/pages/pages.go @@ -20,10 +20,10 @@ import ( "github.com/alecthomas/chroma/v2/styles" "github.com/bluesky-social/indigo/atproto/syntax" "github.com/microcosm-cc/bluemonday" - "github.com/sotangled/tangled/appview/auth" - "github.com/sotangled/tangled/appview/db" - "github.com/sotangled/tangled/appview/state/userutil" - "github.com/sotangled/tangled/types" + "tangled.sh/tangled.sh/core/appview/auth" + "tangled.sh/tangled.sh/core/appview/db" + "tangled.sh/tangled.sh/core/appview/state/userutil" + "tangled.sh/tangled.sh/core/types" ) //go:embed templates/* static diff --git a/appview/state/follow.go b/appview/state/follow.go index 8997d654..6f168020 100644 --- a/appview/state/follow.go +++ b/appview/state/follow.go @@ -7,9 +7,9 @@ import ( comatproto "github.com/bluesky-social/indigo/api/atproto" lexutil "github.com/bluesky-social/indigo/lex/util" - tangled "github.com/sotangled/tangled/api/tangled" - "github.com/sotangled/tangled/appview/db" - "github.com/sotangled/tangled/appview/pages" + tangled "tangled.sh/tangled.sh/core/api/tangled" + "tangled.sh/tangled.sh/core/appview/db" + "tangled.sh/tangled.sh/core/appview/pages" ) func (s *State) Follow(w http.ResponseWriter, r *http.Request) { diff --git a/appview/state/jetstream.go b/appview/state/jetstream.go index 0a1630e3..4614544a 100644 --- a/appview/state/jetstream.go +++ b/appview/state/jetstream.go @@ -8,8 +8,8 @@ import ( "github.com/bluesky-social/indigo/atproto/syntax" "github.com/bluesky-social/jetstream/pkg/models" - tangled "github.com/sotangled/tangled/api/tangled" - "github.com/sotangled/tangled/appview/db" + tangled "tangled.sh/tangled.sh/core/api/tangled" + "tangled.sh/tangled.sh/core/appview/db" ) type Ingester func(ctx context.Context, e *models.Event) error diff --git a/appview/state/middleware.go b/appview/state/middleware.go index 4a6d26c7..a90f7d84 100644 --- a/appview/state/middleware.go +++ b/appview/state/middleware.go @@ -12,9 +12,9 @@ import ( "github.com/bluesky-social/indigo/atproto/identity" "github.com/bluesky-social/indigo/xrpc" "github.com/go-chi/chi/v5" - "github.com/sotangled/tangled/appview" - "github.com/sotangled/tangled/appview/auth" - "github.com/sotangled/tangled/appview/db" + "tangled.sh/tangled.sh/core/appview" + "tangled.sh/tangled.sh/core/appview/auth" + "tangled.sh/tangled.sh/core/appview/db" ) type Middleware func(http.Handler) http.Handler diff --git a/appview/state/pull.go b/appview/state/pull.go index 69499db3..4bd8e6f9 100644 --- a/appview/state/pull.go +++ b/appview/state/pull.go @@ -11,10 +11,10 @@ import ( "time" "github.com/go-chi/chi/v5" - "github.com/sotangled/tangled/api/tangled" - "github.com/sotangled/tangled/appview/db" - "github.com/sotangled/tangled/appview/pages" - "github.com/sotangled/tangled/types" + "tangled.sh/tangled.sh/core/api/tangled" + "tangled.sh/tangled.sh/core/appview/db" + "tangled.sh/tangled.sh/core/appview/pages" + "tangled.sh/tangled.sh/core/types" comatproto "github.com/bluesky-social/indigo/api/atproto" lexutil "github.com/bluesky-social/indigo/lex/util" diff --git a/appview/state/repo.go b/appview/state/repo.go index 419794e1..aba56be1 100644 --- a/appview/state/repo.go +++ b/appview/state/repo.go @@ -18,11 +18,11 @@ import ( "github.com/bluesky-social/indigo/atproto/syntax" securejoin "github.com/cyphar/filepath-securejoin" "github.com/go-chi/chi/v5" - "github.com/sotangled/tangled/api/tangled" - "github.com/sotangled/tangled/appview/auth" - "github.com/sotangled/tangled/appview/db" - "github.com/sotangled/tangled/appview/pages" - "github.com/sotangled/tangled/types" + "tangled.sh/tangled.sh/core/api/tangled" + "tangled.sh/tangled.sh/core/appview/auth" + "tangled.sh/tangled.sh/core/appview/db" + "tangled.sh/tangled.sh/core/appview/pages" + "tangled.sh/tangled.sh/core/types" comatproto "github.com/bluesky-social/indigo/api/atproto" lexutil "github.com/bluesky-social/indigo/lex/util" diff --git a/appview/state/repo_util.go b/appview/state/repo_util.go index d4800873..d7066234 100644 --- a/appview/state/repo_util.go +++ b/appview/state/repo_util.go @@ -10,9 +10,9 @@ import ( "github.com/bluesky-social/indigo/atproto/syntax" "github.com/go-chi/chi/v5" "github.com/go-git/go-git/v5/plumbing/object" - "github.com/sotangled/tangled/appview/auth" - "github.com/sotangled/tangled/appview/db" - "github.com/sotangled/tangled/appview/pages" + "tangled.sh/tangled.sh/core/appview/auth" + "tangled.sh/tangled.sh/core/appview/db" + "tangled.sh/tangled.sh/core/appview/pages" ) func fullyResolvedRepo(r *http.Request) (*FullyResolvedRepo, error) { diff --git a/appview/state/router.go b/appview/state/router.go index 5d1b2b26..22bc1d48 100644 --- a/appview/state/router.go +++ b/appview/state/router.go @@ -5,7 +5,7 @@ import ( "strings" "github.com/go-chi/chi/v5" - "github.com/sotangled/tangled/appview/state/userutil" + "tangled.sh/tangled.sh/core/appview/state/userutil" ) func (s *State) Router() http.Handler { diff --git a/appview/state/settings.go b/appview/state/settings.go index 35ec4635..f1b8c5b2 100644 --- a/appview/state/settings.go +++ b/appview/state/settings.go @@ -14,10 +14,10 @@ import ( lexutil "github.com/bluesky-social/indigo/lex/util" "github.com/gliderlabs/ssh" "github.com/google/uuid" - "github.com/sotangled/tangled/api/tangled" - "github.com/sotangled/tangled/appview/db" - "github.com/sotangled/tangled/appview/email" - "github.com/sotangled/tangled/appview/pages" + "tangled.sh/tangled.sh/core/api/tangled" + "tangled.sh/tangled.sh/core/appview/db" + "tangled.sh/tangled.sh/core/appview/email" + "tangled.sh/tangled.sh/core/appview/pages" ) func (s *State) Settings(w http.ResponseWriter, r *http.Request) { diff --git a/appview/state/signer.go b/appview/state/signer.go index 9a5b9070..142e83eb 100644 --- a/appview/state/signer.go +++ b/appview/state/signer.go @@ -11,7 +11,7 @@ import ( "net/url" "time" - "github.com/sotangled/tangled/types" + "tangled.sh/tangled.sh/core/types" ) type SignerTransport struct { diff --git a/appview/state/star.go b/appview/state/star.go index 1ad831f7..46969ad8 100644 --- a/appview/state/star.go +++ b/appview/state/star.go @@ -8,9 +8,9 @@ import ( comatproto "github.com/bluesky-social/indigo/api/atproto" "github.com/bluesky-social/indigo/atproto/syntax" lexutil "github.com/bluesky-social/indigo/lex/util" - tangled "github.com/sotangled/tangled/api/tangled" - "github.com/sotangled/tangled/appview/db" - "github.com/sotangled/tangled/appview/pages" + tangled "tangled.sh/tangled.sh/core/api/tangled" + "tangled.sh/tangled.sh/core/appview/db" + "tangled.sh/tangled.sh/core/appview/pages" ) func (s *State) Star(w http.ResponseWriter, r *http.Request) { diff --git a/appview/state/state.go b/appview/state/state.go index 3cd606ee..7c83a109 100644 --- a/appview/state/state.go +++ b/appview/state/state.go @@ -17,13 +17,13 @@ import ( lexutil "github.com/bluesky-social/indigo/lex/util" securejoin "github.com/cyphar/filepath-securejoin" "github.com/go-chi/chi/v5" - tangled "github.com/sotangled/tangled/api/tangled" - "github.com/sotangled/tangled/appview" - "github.com/sotangled/tangled/appview/auth" - "github.com/sotangled/tangled/appview/db" - "github.com/sotangled/tangled/appview/pages" - "github.com/sotangled/tangled/jetstream" - "github.com/sotangled/tangled/rbac" + tangled "tangled.sh/tangled.sh/core/api/tangled" + "tangled.sh/tangled.sh/core/appview" + "tangled.sh/tangled.sh/core/appview/auth" + "tangled.sh/tangled.sh/core/appview/db" + "tangled.sh/tangled.sh/core/appview/pages" + "tangled.sh/tangled.sh/core/jetstream" + "tangled.sh/tangled.sh/core/rbac" ) type State struct { diff --git a/cmd/appview/main.go b/cmd/appview/main.go index 9b36af16..2cc33c24 100644 --- a/cmd/appview/main.go +++ b/cmd/appview/main.go @@ -7,8 +7,8 @@ import ( "net/http" "os" - "github.com/sotangled/tangled/appview" - "github.com/sotangled/tangled/appview/state" + "tangled.sh/tangled.sh/core/appview" + "tangled.sh/tangled.sh/core/appview/state" ) func main() { diff --git a/cmd/gen.go b/cmd/gen.go index 2824054b..25cd3850 100644 --- a/cmd/gen.go +++ b/cmd/gen.go @@ -1,8 +1,8 @@ package main import ( - shtangled "github.com/sotangled/tangled/api/tangled" cbg "github.com/whyrusleeping/cbor-gen" + shtangled "tangled.sh/tangled.sh/core/api/tangled" ) func main() { diff --git a/cmd/jstest/main.go b/cmd/jstest/main.go index e96e2b2d..2bca5980 100644 --- a/cmd/jstest/main.go +++ b/cmd/jstest/main.go @@ -12,7 +12,7 @@ import ( "github.com/bluesky-social/jetstream/pkg/client" "github.com/bluesky-social/jetstream/pkg/models" - "github.com/sotangled/tangled/jetstream" + "tangled.sh/tangled.sh/core/jetstream" ) // Simple in-memory implementation of DB interface diff --git a/cmd/knotserver/main.go b/cmd/knotserver/main.go index 3a910bd5..6a44d75d 100644 --- a/cmd/knotserver/main.go +++ b/cmd/knotserver/main.go @@ -4,13 +4,13 @@ import ( "context" "net/http" - "github.com/sotangled/tangled/api/tangled" - "github.com/sotangled/tangled/jetstream" - "github.com/sotangled/tangled/knotserver" - "github.com/sotangled/tangled/knotserver/config" - "github.com/sotangled/tangled/knotserver/db" - "github.com/sotangled/tangled/log" - "github.com/sotangled/tangled/rbac" + "tangled.sh/tangled.sh/core/api/tangled" + "tangled.sh/tangled.sh/core/jetstream" + "tangled.sh/tangled.sh/core/knotserver" + "tangled.sh/tangled.sh/core/knotserver/config" + "tangled.sh/tangled.sh/core/knotserver/db" + "tangled.sh/tangled.sh/core/log" + "tangled.sh/tangled.sh/core/rbac" _ "net/http/pprof" ) diff --git a/cmd/repoguard/main.go b/cmd/repoguard/main.go index 3ed88102..224e73f2 100644 --- a/cmd/repoguard/main.go +++ b/cmd/repoguard/main.go @@ -13,7 +13,7 @@ import ( "time" securejoin "github.com/cyphar/filepath-securejoin" - "github.com/sotangled/tangled/appview" + "tangled.sh/tangled.sh/core/appview" ) var ( diff --git a/go.mod b/go.mod index b79cc791..718a5671 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/sotangled/tangled +module tangled.sh/tangled.sh/core go 1.23.0 @@ -17,10 +17,12 @@ require ( github.com/gliderlabs/ssh v0.3.5 github.com/go-chi/chi/v5 v5.2.0 github.com/go-git/go-git/v5 v5.14.0 + github.com/google/uuid v1.6.0 github.com/gorilla/sessions v1.4.0 github.com/ipfs/go-cid v0.4.1 github.com/mattn/go-sqlite3 v1.14.24 github.com/microcosm-cc/bluemonday v1.0.27 + github.com/resend/resend-go/v2 v2.15.0 github.com/sethvargo/go-envconfig v1.1.0 github.com/whyrusleeping/cbor-gen v0.2.1-0.20241030202151-b7a6831be65e github.com/yuin/goldmark v1.4.13 @@ -50,7 +52,6 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/goccy/go-json v0.10.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/google/uuid v1.6.0 // indirect github.com/gorilla/css v1.0.1 // indirect github.com/gorilla/securecookie v1.1.2 // indirect github.com/gorilla/websocket v1.5.1 // indirect @@ -92,7 +93,6 @@ require ( github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.54.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect - github.com/resend/resend-go/v2 v2.15.0 // indirect github.com/sergi/go-diff v1.3.1 // indirect github.com/skeema/knownhosts v1.3.1 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect diff --git a/jetstream/jetstream.go b/jetstream/jetstream.go index a35bb12c..b538d2bc 100644 --- a/jetstream/jetstream.go +++ b/jetstream/jetstream.go @@ -10,7 +10,7 @@ import ( "github.com/bluesky-social/jetstream/pkg/client" "github.com/bluesky-social/jetstream/pkg/client/schedulers/sequential" "github.com/bluesky-social/jetstream/pkg/models" - "github.com/sotangled/tangled/log" + "tangled.sh/tangled.sh/core/log" ) type DB interface { diff --git a/knotserver/db/pubkeys.go b/knotserver/db/pubkeys.go index d7735113..6c3a1b3d 100644 --- a/knotserver/db/pubkeys.go +++ b/knotserver/db/pubkeys.go @@ -3,7 +3,7 @@ package db import ( "time" - "github.com/sotangled/tangled/api/tangled" + "tangled.sh/tangled.sh/core/api/tangled" ) type PublicKey struct { diff --git a/knotserver/file.go b/knotserver/file.go index 7c3a43bf..8a5c0298 100644 --- a/knotserver/file.go +++ b/knotserver/file.go @@ -7,7 +7,7 @@ import ( "net/http" "strings" - "github.com/sotangled/tangled/types" + "tangled.sh/tangled.sh/core/types" ) func (h *Handle) listFiles(files []types.NiceTree, data map[string]any, w http.ResponseWriter) { diff --git a/knotserver/git.go b/knotserver/git.go index 3a7f976a..0f5b00a0 100644 --- a/knotserver/git.go +++ b/knotserver/git.go @@ -8,7 +8,7 @@ import ( securejoin "github.com/cyphar/filepath-securejoin" "github.com/go-chi/chi/v5" - "github.com/sotangled/tangled/knotserver/git/service" + "tangled.sh/tangled.sh/core/knotserver/git/service" ) func (d *Handle) InfoRefs(w http.ResponseWriter, r *http.Request) { diff --git a/knotserver/git/diff.go b/knotserver/git/diff.go index 5fe70d47..5fcda11b 100644 --- a/knotserver/git/diff.go +++ b/knotserver/git/diff.go @@ -7,7 +7,7 @@ import ( "github.com/bluekeyes/go-gitdiff/gitdiff" "github.com/go-git/go-git/v5/plumbing/object" - "github.com/sotangled/tangled/types" + "tangled.sh/tangled.sh/core/types" ) func (g *GitRepo) Diff() (*types.NiceDiff, error) { diff --git a/knotserver/git/git.go b/knotserver/git/git.go index 30e59d85..a66d370b 100644 --- a/knotserver/git/git.go +++ b/knotserver/git/git.go @@ -18,7 +18,7 @@ import ( "github.com/go-git/go-git/v5" "github.com/go-git/go-git/v5/plumbing" "github.com/go-git/go-git/v5/plumbing/object" - "github.com/sotangled/tangled/types" + "tangled.sh/tangled.sh/core/types" ) var ( diff --git a/knotserver/git/tree.go b/knotserver/git/tree.go index 3783adf2..1c7f8c49 100644 --- a/knotserver/git/tree.go +++ b/knotserver/git/tree.go @@ -4,7 +4,7 @@ import ( "fmt" "github.com/go-git/go-git/v5/plumbing/object" - "github.com/sotangled/tangled/types" + "tangled.sh/tangled.sh/core/types" ) func (g *GitRepo) FileTree(path string) ([]types.NiceTree, error) { diff --git a/knotserver/handler.go b/knotserver/handler.go index e26d8044..6e7ea35c 100644 --- a/knotserver/handler.go +++ b/knotserver/handler.go @@ -7,10 +7,10 @@ import ( "net/http" "github.com/go-chi/chi/v5" - "github.com/sotangled/tangled/jetstream" - "github.com/sotangled/tangled/knotserver/config" - "github.com/sotangled/tangled/knotserver/db" - "github.com/sotangled/tangled/rbac" + "tangled.sh/tangled.sh/core/jetstream" + "tangled.sh/tangled.sh/core/knotserver/config" + "tangled.sh/tangled.sh/core/knotserver/db" + "tangled.sh/tangled.sh/core/rbac" ) const ( diff --git a/knotserver/internal.go b/knotserver/internal.go index 7219db8f..03a1ae15 100644 --- a/knotserver/internal.go +++ b/knotserver/internal.go @@ -6,8 +6,8 @@ import ( "github.com/go-chi/chi/v5" "github.com/go-chi/chi/v5/middleware" - "github.com/sotangled/tangled/knotserver/db" - "github.com/sotangled/tangled/rbac" + "tangled.sh/tangled.sh/core/knotserver/db" + "tangled.sh/tangled.sh/core/rbac" ) type InternalHandle struct { diff --git a/knotserver/jetstream.go b/knotserver/jetstream.go index 735842b2..264c1a90 100644 --- a/knotserver/jetstream.go +++ b/knotserver/jetstream.go @@ -10,9 +10,9 @@ import ( "strings" "github.com/bluesky-social/jetstream/pkg/models" - "github.com/sotangled/tangled/api/tangled" - "github.com/sotangled/tangled/knotserver/db" - "github.com/sotangled/tangled/log" + "tangled.sh/tangled.sh/core/api/tangled" + "tangled.sh/tangled.sh/core/knotserver/db" + "tangled.sh/tangled.sh/core/log" ) func (h *Handle) processPublicKey(ctx context.Context, did string, record tangled.PublicKey) error { diff --git a/knotserver/routes.go b/knotserver/routes.go index 1a328712..6ab61c19 100644 --- a/knotserver/routes.go +++ b/knotserver/routes.go @@ -22,9 +22,9 @@ import ( gogit "github.com/go-git/go-git/v5" "github.com/go-git/go-git/v5/plumbing" "github.com/go-git/go-git/v5/plumbing/object" - "github.com/sotangled/tangled/knotserver/db" - "github.com/sotangled/tangled/knotserver/git" - "github.com/sotangled/tangled/types" + "tangled.sh/tangled.sh/core/knotserver/db" + "tangled.sh/tangled.sh/core/knotserver/git" + "tangled.sh/tangled.sh/core/types" ) func (h *Handle) Index(w http.ResponseWriter, r *http.Request) { diff --git a/lexicon-build-config.json b/lexicon-build-config.json index 8f32ed5d..993cf825 100644 --- a/lexicon-build-config.json +++ b/lexicon-build-config.json @@ -3,7 +3,7 @@ "package": "tangled", "prefix": "sh.tangled", "outdir": "api/tangled", - "import": "github.com/sotangled/tangled/api/tangled", + "import": "tangled.sh/tangled.sh/core/api/tangled", "gen-server": true } ] -- 2.51.2