+1
-1
appview/auth/auth.go
+1
-1
appview/auth/auth.go
+5
-5
appview/db/pulls.go
+5
-5
appview/db/pulls.go
···
9
10
"github.com/bluekeyes/go-gitdiff/gitdiff"
11
"github.com/bluesky-social/indigo/atproto/syntax"
12
-
"github.com/sotangled/tangled/types"
13
)
14
15
type PullState int
···
289
rkey
290
from
291
pulls
292
-
where
293
repo_at = ? and pull_id = ?
294
`
295
row := e.QueryRow(query, repoAt, pullId)
···
321
submissionsQuery := `
322
select
323
id, pull_id, repo_at, round_number, patch, created
324
-
from
325
pull_submissions
326
where
327
repo_at = ? and pull_id = ?
···
370
}
371
inClause := strings.TrimSuffix(strings.Repeat("?, ", len(submissionsMap)), ", ")
372
commentsQuery := fmt.Sprintf(`
373
-
select
374
id,
375
pull_id,
376
submission_id,
···
383
pull_comments
384
where
385
submission_id IN (%s)
386
-
order by
387
created asc
388
`, inClause)
389
commentsRows, err := e.Query(commentsQuery, args...)
···
9
10
"github.com/bluekeyes/go-gitdiff/gitdiff"
11
"github.com/bluesky-social/indigo/atproto/syntax"
12
+
"tangled.sh/tangled.sh/core/types"
13
)
14
15
type PullState int
···
289
rkey
290
from
291
pulls
292
+
where
293
repo_at = ? and pull_id = ?
294
`
295
row := e.QueryRow(query, repoAt, pullId)
···
321
submissionsQuery := `
322
select
323
id, pull_id, repo_at, round_number, patch, created
324
+
from
325
pull_submissions
326
where
327
repo_at = ? and pull_id = ?
···
370
}
371
inClause := strings.TrimSuffix(strings.Repeat("?, ", len(submissionsMap)), ", ")
372
commentsQuery := fmt.Sprintf(`
373
+
select
374
id,
375
pull_id,
376
submission_id,
···
383
pull_comments
384
where
385
submission_id IN (%s)
386
+
order by
387
created asc
388
`, inClause)
389
commentsRows, err := e.Query(commentsQuery, args...)
+4
-4
appview/pages/pages.go
+4
-4
appview/pages/pages.go
···
20
"github.com/alecthomas/chroma/v2/styles"
21
"github.com/bluesky-social/indigo/atproto/syntax"
22
"github.com/microcosm-cc/bluemonday"
23
-
"github.com/sotangled/tangled/appview/auth"
24
-
"github.com/sotangled/tangled/appview/db"
25
-
"github.com/sotangled/tangled/appview/state/userutil"
26
-
"github.com/sotangled/tangled/types"
27
)
28
29
//go:embed templates/* static
···
20
"github.com/alecthomas/chroma/v2/styles"
21
"github.com/bluesky-social/indigo/atproto/syntax"
22
"github.com/microcosm-cc/bluemonday"
23
+
"tangled.sh/tangled.sh/core/appview/auth"
24
+
"tangled.sh/tangled.sh/core/appview/db"
25
+
"tangled.sh/tangled.sh/core/appview/state/userutil"
26
+
"tangled.sh/tangled.sh/core/types"
27
)
28
29
//go:embed templates/* static
+3
-3
appview/state/follow.go
+3
-3
appview/state/follow.go
···
7
8
comatproto "github.com/bluesky-social/indigo/api/atproto"
9
lexutil "github.com/bluesky-social/indigo/lex/util"
10
-
tangled "github.com/sotangled/tangled/api/tangled"
11
-
"github.com/sotangled/tangled/appview/db"
12
-
"github.com/sotangled/tangled/appview/pages"
13
)
14
15
func (s *State) Follow(w http.ResponseWriter, r *http.Request) {
···
7
8
comatproto "github.com/bluesky-social/indigo/api/atproto"
9
lexutil "github.com/bluesky-social/indigo/lex/util"
10
+
tangled "tangled.sh/tangled.sh/core/api/tangled"
11
+
"tangled.sh/tangled.sh/core/appview/db"
12
+
"tangled.sh/tangled.sh/core/appview/pages"
13
)
14
15
func (s *State) Follow(w http.ResponseWriter, r *http.Request) {
+2
-2
appview/state/jetstream.go
+2
-2
appview/state/jetstream.go
+3
-3
appview/state/middleware.go
+3
-3
appview/state/middleware.go
···
12
"github.com/bluesky-social/indigo/atproto/identity"
13
"github.com/bluesky-social/indigo/xrpc"
14
"github.com/go-chi/chi/v5"
15
-
"github.com/sotangled/tangled/appview"
16
-
"github.com/sotangled/tangled/appview/auth"
17
-
"github.com/sotangled/tangled/appview/db"
18
)
19
20
type Middleware func(http.Handler) http.Handler
···
12
"github.com/bluesky-social/indigo/atproto/identity"
13
"github.com/bluesky-social/indigo/xrpc"
14
"github.com/go-chi/chi/v5"
15
+
"tangled.sh/tangled.sh/core/appview"
16
+
"tangled.sh/tangled.sh/core/appview/auth"
17
+
"tangled.sh/tangled.sh/core/appview/db"
18
)
19
20
type Middleware func(http.Handler) http.Handler
+4
-4
appview/state/pull.go
+4
-4
appview/state/pull.go
···
11
"time"
12
13
"github.com/go-chi/chi/v5"
14
-
"github.com/sotangled/tangled/api/tangled"
15
-
"github.com/sotangled/tangled/appview/db"
16
-
"github.com/sotangled/tangled/appview/pages"
17
-
"github.com/sotangled/tangled/types"
18
19
comatproto "github.com/bluesky-social/indigo/api/atproto"
20
lexutil "github.com/bluesky-social/indigo/lex/util"
···
11
"time"
12
13
"github.com/go-chi/chi/v5"
14
+
"tangled.sh/tangled.sh/core/api/tangled"
15
+
"tangled.sh/tangled.sh/core/appview/db"
16
+
"tangled.sh/tangled.sh/core/appview/pages"
17
+
"tangled.sh/tangled.sh/core/types"
18
19
comatproto "github.com/bluesky-social/indigo/api/atproto"
20
lexutil "github.com/bluesky-social/indigo/lex/util"
+5
-5
appview/state/repo.go
+5
-5
appview/state/repo.go
···
18
"github.com/bluesky-social/indigo/atproto/syntax"
19
securejoin "github.com/cyphar/filepath-securejoin"
20
"github.com/go-chi/chi/v5"
21
-
"github.com/sotangled/tangled/api/tangled"
22
-
"github.com/sotangled/tangled/appview/auth"
23
-
"github.com/sotangled/tangled/appview/db"
24
-
"github.com/sotangled/tangled/appview/pages"
25
-
"github.com/sotangled/tangled/types"
26
27
comatproto "github.com/bluesky-social/indigo/api/atproto"
28
lexutil "github.com/bluesky-social/indigo/lex/util"
···
18
"github.com/bluesky-social/indigo/atproto/syntax"
19
securejoin "github.com/cyphar/filepath-securejoin"
20
"github.com/go-chi/chi/v5"
21
+
"tangled.sh/tangled.sh/core/api/tangled"
22
+
"tangled.sh/tangled.sh/core/appview/auth"
23
+
"tangled.sh/tangled.sh/core/appview/db"
24
+
"tangled.sh/tangled.sh/core/appview/pages"
25
+
"tangled.sh/tangled.sh/core/types"
26
27
comatproto "github.com/bluesky-social/indigo/api/atproto"
28
lexutil "github.com/bluesky-social/indigo/lex/util"
+3
-3
appview/state/repo_util.go
+3
-3
appview/state/repo_util.go
···
10
"github.com/bluesky-social/indigo/atproto/syntax"
11
"github.com/go-chi/chi/v5"
12
"github.com/go-git/go-git/v5/plumbing/object"
13
-
"github.com/sotangled/tangled/appview/auth"
14
-
"github.com/sotangled/tangled/appview/db"
15
-
"github.com/sotangled/tangled/appview/pages"
16
)
17
18
func fullyResolvedRepo(r *http.Request) (*FullyResolvedRepo, error) {
···
10
"github.com/bluesky-social/indigo/atproto/syntax"
11
"github.com/go-chi/chi/v5"
12
"github.com/go-git/go-git/v5/plumbing/object"
13
+
"tangled.sh/tangled.sh/core/appview/auth"
14
+
"tangled.sh/tangled.sh/core/appview/db"
15
+
"tangled.sh/tangled.sh/core/appview/pages"
16
)
17
18
func fullyResolvedRepo(r *http.Request) (*FullyResolvedRepo, error) {
+1
-1
appview/state/router.go
+1
-1
appview/state/router.go
+4
-4
appview/state/settings.go
+4
-4
appview/state/settings.go
···
14
lexutil "github.com/bluesky-social/indigo/lex/util"
15
"github.com/gliderlabs/ssh"
16
"github.com/google/uuid"
17
-
"github.com/sotangled/tangled/api/tangled"
18
-
"github.com/sotangled/tangled/appview/db"
19
-
"github.com/sotangled/tangled/appview/email"
20
-
"github.com/sotangled/tangled/appview/pages"
21
)
22
23
func (s *State) Settings(w http.ResponseWriter, r *http.Request) {
···
14
lexutil "github.com/bluesky-social/indigo/lex/util"
15
"github.com/gliderlabs/ssh"
16
"github.com/google/uuid"
17
+
"tangled.sh/tangled.sh/core/api/tangled"
18
+
"tangled.sh/tangled.sh/core/appview/db"
19
+
"tangled.sh/tangled.sh/core/appview/email"
20
+
"tangled.sh/tangled.sh/core/appview/pages"
21
)
22
23
func (s *State) Settings(w http.ResponseWriter, r *http.Request) {
+1
-1
appview/state/signer.go
+1
-1
appview/state/signer.go
+3
-3
appview/state/star.go
+3
-3
appview/state/star.go
···
8
comatproto "github.com/bluesky-social/indigo/api/atproto"
9
"github.com/bluesky-social/indigo/atproto/syntax"
10
lexutil "github.com/bluesky-social/indigo/lex/util"
11
-
tangled "github.com/sotangled/tangled/api/tangled"
12
-
"github.com/sotangled/tangled/appview/db"
13
-
"github.com/sotangled/tangled/appview/pages"
14
)
15
16
func (s *State) Star(w http.ResponseWriter, r *http.Request) {
···
8
comatproto "github.com/bluesky-social/indigo/api/atproto"
9
"github.com/bluesky-social/indigo/atproto/syntax"
10
lexutil "github.com/bluesky-social/indigo/lex/util"
11
+
tangled "tangled.sh/tangled.sh/core/api/tangled"
12
+
"tangled.sh/tangled.sh/core/appview/db"
13
+
"tangled.sh/tangled.sh/core/appview/pages"
14
)
15
16
func (s *State) Star(w http.ResponseWriter, r *http.Request) {
+7
-7
appview/state/state.go
+7
-7
appview/state/state.go
···
17
lexutil "github.com/bluesky-social/indigo/lex/util"
18
securejoin "github.com/cyphar/filepath-securejoin"
19
"github.com/go-chi/chi/v5"
20
-
tangled "github.com/sotangled/tangled/api/tangled"
21
-
"github.com/sotangled/tangled/appview"
22
-
"github.com/sotangled/tangled/appview/auth"
23
-
"github.com/sotangled/tangled/appview/db"
24
-
"github.com/sotangled/tangled/appview/pages"
25
-
"github.com/sotangled/tangled/jetstream"
26
-
"github.com/sotangled/tangled/rbac"
27
)
28
29
type State struct {
···
17
lexutil "github.com/bluesky-social/indigo/lex/util"
18
securejoin "github.com/cyphar/filepath-securejoin"
19
"github.com/go-chi/chi/v5"
20
+
tangled "tangled.sh/tangled.sh/core/api/tangled"
21
+
"tangled.sh/tangled.sh/core/appview"
22
+
"tangled.sh/tangled.sh/core/appview/auth"
23
+
"tangled.sh/tangled.sh/core/appview/db"
24
+
"tangled.sh/tangled.sh/core/appview/pages"
25
+
"tangled.sh/tangled.sh/core/jetstream"
26
+
"tangled.sh/tangled.sh/core/rbac"
27
)
28
29
type State struct {
+2
-2
cmd/appview/main.go
+2
-2
cmd/appview/main.go
+1
-1
cmd/gen.go
+1
-1
cmd/gen.go
+1
-1
cmd/jstest/main.go
+1
-1
cmd/jstest/main.go
+7
-7
cmd/knotserver/main.go
+7
-7
cmd/knotserver/main.go
···
4
"context"
5
"net/http"
6
7
-
"github.com/sotangled/tangled/api/tangled"
8
-
"github.com/sotangled/tangled/jetstream"
9
-
"github.com/sotangled/tangled/knotserver"
10
-
"github.com/sotangled/tangled/knotserver/config"
11
-
"github.com/sotangled/tangled/knotserver/db"
12
-
"github.com/sotangled/tangled/log"
13
-
"github.com/sotangled/tangled/rbac"
14
15
_ "net/http/pprof"
16
)
···
4
"context"
5
"net/http"
6
7
+
"tangled.sh/tangled.sh/core/api/tangled"
8
+
"tangled.sh/tangled.sh/core/jetstream"
9
+
"tangled.sh/tangled.sh/core/knotserver"
10
+
"tangled.sh/tangled.sh/core/knotserver/config"
11
+
"tangled.sh/tangled.sh/core/knotserver/db"
12
+
"tangled.sh/tangled.sh/core/log"
13
+
"tangled.sh/tangled.sh/core/rbac"
14
15
_ "net/http/pprof"
16
)
+1
-1
cmd/repoguard/main.go
+1
-1
cmd/repoguard/main.go
+3
-3
go.mod
+3
-3
go.mod
···
1
-
module github.com/sotangled/tangled
2
3
go 1.23.0
4
···
17
github.com/gliderlabs/ssh v0.3.5
18
github.com/go-chi/chi/v5 v5.2.0
19
github.com/go-git/go-git/v5 v5.14.0
20
github.com/gorilla/sessions v1.4.0
21
github.com/ipfs/go-cid v0.4.1
22
github.com/mattn/go-sqlite3 v1.14.24
23
github.com/microcosm-cc/bluemonday v1.0.27
24
github.com/sethvargo/go-envconfig v1.1.0
25
github.com/whyrusleeping/cbor-gen v0.2.1-0.20241030202151-b7a6831be65e
26
github.com/yuin/goldmark v1.4.13
···
50
github.com/go-logr/stdr v1.2.2 // indirect
51
github.com/goccy/go-json v0.10.2 // indirect
52
github.com/gogo/protobuf v1.3.2 // indirect
53
-
github.com/google/uuid v1.6.0 // indirect
54
github.com/gorilla/css v1.0.1 // indirect
55
github.com/gorilla/securecookie v1.1.2 // indirect
56
github.com/gorilla/websocket v1.5.1 // indirect
···
92
github.com/prometheus/client_model v0.6.1 // indirect
93
github.com/prometheus/common v0.54.0 // indirect
94
github.com/prometheus/procfs v0.15.1 // indirect
95
-
github.com/resend/resend-go/v2 v2.15.0 // indirect
96
github.com/sergi/go-diff v1.3.1 // indirect
97
github.com/skeema/knownhosts v1.3.1 // indirect
98
github.com/spaolacci/murmur3 v1.1.0 // indirect
···
1
+
module tangled.sh/tangled.sh/core
2
3
go 1.23.0
4
···
17
github.com/gliderlabs/ssh v0.3.5
18
github.com/go-chi/chi/v5 v5.2.0
19
github.com/go-git/go-git/v5 v5.14.0
20
+
github.com/google/uuid v1.6.0
21
github.com/gorilla/sessions v1.4.0
22
github.com/ipfs/go-cid v0.4.1
23
github.com/mattn/go-sqlite3 v1.14.24
24
github.com/microcosm-cc/bluemonday v1.0.27
25
+
github.com/resend/resend-go/v2 v2.15.0
26
github.com/sethvargo/go-envconfig v1.1.0
27
github.com/whyrusleeping/cbor-gen v0.2.1-0.20241030202151-b7a6831be65e
28
github.com/yuin/goldmark v1.4.13
···
52
github.com/go-logr/stdr v1.2.2 // indirect
53
github.com/goccy/go-json v0.10.2 // indirect
54
github.com/gogo/protobuf v1.3.2 // indirect
55
github.com/gorilla/css v1.0.1 // indirect
56
github.com/gorilla/securecookie v1.1.2 // indirect
57
github.com/gorilla/websocket v1.5.1 // indirect
···
93
github.com/prometheus/client_model v0.6.1 // indirect
94
github.com/prometheus/common v0.54.0 // indirect
95
github.com/prometheus/procfs v0.15.1 // indirect
96
github.com/sergi/go-diff v1.3.1 // indirect
97
github.com/skeema/knownhosts v1.3.1 // indirect
98
github.com/spaolacci/murmur3 v1.1.0 // indirect
+1
-1
jetstream/jetstream.go
+1
-1
jetstream/jetstream.go
+1
-1
knotserver/db/pubkeys.go
+1
-1
knotserver/db/pubkeys.go
+1
-1
knotserver/file.go
+1
-1
knotserver/file.go
+1
-1
knotserver/git.go
+1
-1
knotserver/git.go
+1
-1
knotserver/git/diff.go
+1
-1
knotserver/git/diff.go
+1
-1
knotserver/git/git.go
+1
-1
knotserver/git/git.go
+1
-1
knotserver/git/tree.go
+1
-1
knotserver/git/tree.go
+4
-4
knotserver/handler.go
+4
-4
knotserver/handler.go
+2
-2
knotserver/internal.go
+2
-2
knotserver/internal.go
+3
-3
knotserver/jetstream.go
+3
-3
knotserver/jetstream.go
···
10
"strings"
11
12
"github.com/bluesky-social/jetstream/pkg/models"
13
-
"github.com/sotangled/tangled/api/tangled"
14
-
"github.com/sotangled/tangled/knotserver/db"
15
-
"github.com/sotangled/tangled/log"
16
)
17
18
func (h *Handle) processPublicKey(ctx context.Context, did string, record tangled.PublicKey) error {
···
10
"strings"
11
12
"github.com/bluesky-social/jetstream/pkg/models"
13
+
"tangled.sh/tangled.sh/core/api/tangled"
14
+
"tangled.sh/tangled.sh/core/knotserver/db"
15
+
"tangled.sh/tangled.sh/core/log"
16
)
17
18
func (h *Handle) processPublicKey(ctx context.Context, did string, record tangled.PublicKey) error {
+3
-3
knotserver/routes.go
+3
-3
knotserver/routes.go
···
22
gogit "github.com/go-git/go-git/v5"
23
"github.com/go-git/go-git/v5/plumbing"
24
"github.com/go-git/go-git/v5/plumbing/object"
25
-
"github.com/sotangled/tangled/knotserver/db"
26
-
"github.com/sotangled/tangled/knotserver/git"
27
-
"github.com/sotangled/tangled/types"
28
)
29
30
func (h *Handle) Index(w http.ResponseWriter, r *http.Request) {
···
22
gogit "github.com/go-git/go-git/v5"
23
"github.com/go-git/go-git/v5/plumbing"
24
"github.com/go-git/go-git/v5/plumbing/object"
25
+
"tangled.sh/tangled.sh/core/knotserver/db"
26
+
"tangled.sh/tangled.sh/core/knotserver/git"
27
+
"tangled.sh/tangled.sh/core/types"
28
)
29
30
func (h *Handle) Index(w http.ResponseWriter, r *http.Request) {
+1
-1
lexicon-build-config.json
+1
-1
lexicon-build-config.json