Compare commits
No commits in common. "4fff9ead8c63626334df6fab25599abc4d3e5c1e" and "599b5763964724c07f18d05cb3fe72dcac229f2a" have entirely different histories.
4fff9ead8c
...
599b576396
2
go.mod
2
go.mod
@ -3,7 +3,7 @@ module git.dev.alexdunmow.com/block/calcomblock
|
|||||||
go 1.26.4
|
go 1.26.4
|
||||||
|
|
||||||
require (
|
require (
|
||||||
git.dev.alexdunmow.com/block/core v0.20.2
|
git.dev.alexdunmow.com/block/core v0.18.2
|
||||||
github.com/a-h/templ v0.3.1020
|
github.com/a-h/templ v0.3.1020
|
||||||
github.com/go-chi/chi/v5 v5.3.0
|
github.com/go-chi/chi/v5 v5.3.0
|
||||||
github.com/google/uuid v1.6.0
|
github.com/google/uuid v1.6.0
|
||||||
|
|||||||
8
go.sum
8
go.sum
@ -1,7 +1,7 @@
|
|||||||
connectrpc.com/connect v1.20.0 h1:6TNDAB+WeNd2uolWNlYczB5E0KNNaVMNUEx8JEUsPmQ=
|
connectrpc.com/connect v1.20.0 h1:6TNDAB+WeNd2uolWNlYczB5E0KNNaVMNUEx8JEUsPmQ=
|
||||||
connectrpc.com/connect v1.20.0/go.mod h1:A2ygJrukXwWy32vkCAAHNVguZrqZ+jeZ9rGRnGR4dN4=
|
connectrpc.com/connect v1.20.0/go.mod h1:A2ygJrukXwWy32vkCAAHNVguZrqZ+jeZ9rGRnGR4dN4=
|
||||||
git.dev.alexdunmow.com/block/core v0.20.2 h1:OVh5J7sYsjMDq6UBUpm/6FoUcfeuTr+YUPp0rQiYDuo=
|
git.dev.alexdunmow.com/block/core v0.18.2 h1:+3OfZ424yoc1k1CucXYARk8TBkh8Z693HRkhf5Ci2wU=
|
||||||
git.dev.alexdunmow.com/block/core v0.20.2/go.mod h1:n/0y+8g/zabjwRNseNjme3w5J8thKqdjkIE9YJCzGow=
|
git.dev.alexdunmow.com/block/core v0.18.2/go.mod h1:GGuUu826AoJepC/hKLGJ7BX3PQaDss9ueCT0se6Ao2w=
|
||||||
github.com/BurntSushi/toml v1.6.0 h1:dRaEfpa2VI55EwlIW72hMRHdWouJeRF7TPYhI+AUQjk=
|
github.com/BurntSushi/toml v1.6.0 h1:dRaEfpa2VI55EwlIW72hMRHdWouJeRF7TPYhI+AUQjk=
|
||||||
github.com/BurntSushi/toml v1.6.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
|
github.com/BurntSushi/toml v1.6.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
|
||||||
github.com/a-h/templ v0.3.1020 h1:ypAT/L5ySWEnZ6Zft/5yfoWXYYkhFNvEFOeeqecg4tw=
|
github.com/a-h/templ v0.3.1020 h1:ypAT/L5ySWEnZ6Zft/5yfoWXYYkhFNvEFOeeqecg4tw=
|
||||||
@ -32,14 +32,10 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV
|
|||||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||||
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/tetratelabs/wazero v1.12.0 h1:DuWcpNu/FzgEXgGBDp8J1Spc+CWOvvtvVyjKlaZopYU=
|
|
||||||
github.com/tetratelabs/wazero v1.12.0/go.mod h1:LvKtzl2RqO4gyF27BiXU+nKAjcV8f38U+kP/q2vgxh0=
|
|
||||||
golang.org/x/mod v0.34.0 h1:xIHgNUUnW6sYkcM5Jleh05DvLOtwc6RitGHbDk4akRI=
|
golang.org/x/mod v0.34.0 h1:xIHgNUUnW6sYkcM5Jleh05DvLOtwc6RitGHbDk4akRI=
|
||||||
golang.org/x/mod v0.34.0/go.mod h1:ykgH52iCZe79kzLLMhyCUzhMci+nQj+0XkbXpNYtVjY=
|
golang.org/x/mod v0.34.0/go.mod h1:ykgH52iCZe79kzLLMhyCUzhMci+nQj+0XkbXpNYtVjY=
|
||||||
golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4=
|
golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4=
|
||||||
golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
|
golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
|
||||||
golang.org/x/sys v0.44.0 h1:ildZl3J4uzeKP07r2F++Op7E9B29JRUy+a27EibtBTQ=
|
|
||||||
golang.org/x/sys v0.44.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
|
|
||||||
golang.org/x/text v0.36.0 h1:JfKh3XmcRPqZPKevfXVpI1wXPTqbkE5f7JA92a55Yxg=
|
golang.org/x/text v0.36.0 h1:JfKh3XmcRPqZPKevfXVpI1wXPTqbkE5f7JA92a55Yxg=
|
||||||
golang.org/x/text v0.36.0/go.mod h1:NIdBknypM8iqVmPiuco0Dh6P5Jcdk8lJL0CUebqK164=
|
golang.org/x/text v0.36.0/go.mod h1:NIdBknypM8iqVmPiuco0Dh6P5Jcdk8lJL0CUebqK164=
|
||||||
google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE=
|
google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE=
|
||||||
|
|||||||
@ -28,7 +28,7 @@ func newTestRouter(t *testing.T) http.Handler {
|
|||||||
t.Helper()
|
t.Helper()
|
||||||
settings, _ := newTestSettings()
|
settings, _ := newTestSettings()
|
||||||
limiter := NewRateLimiter(bookingsPerHourPerIP)
|
limiter := NewRateLimiter(bookingsPerHourPerIP)
|
||||||
h := NewCalcomHandler(settings, limiter, "https://test.blockninja.dev")
|
h := NewCalcomHandler(settings, limiter, "https://test.localdev.blockninjacms.com")
|
||||||
|
|
||||||
r := chi.NewRouter()
|
r := chi.NewRouter()
|
||||||
r.Get("/slots", h.HandleGetSlots)
|
r.Get("/slots", h.HandleGetSlots)
|
||||||
@ -1275,7 +1275,7 @@ func TestHandleCancelBooking_RateLimited(t *testing.T) {
|
|||||||
if err := settings.SetAPIKey(context.Background(), "cal_live_test"); err != nil {
|
if err := settings.SetAPIKey(context.Background(), "cal_live_test"); err != nil {
|
||||||
t.Fatalf("SetAPIKey: %v", err)
|
t.Fatalf("SetAPIKey: %v", err)
|
||||||
}
|
}
|
||||||
h := NewCalcomHandler(settings, NewRateLimiter(1), "https://test.blockninja.dev")
|
h := NewCalcomHandler(settings, NewRateLimiter(1), "https://test.localdev.blockninjacms.com")
|
||||||
|
|
||||||
doCancel := func() *httptest.ResponseRecorder {
|
doCancel := func() *httptest.ResponseRecorder {
|
||||||
form := url.Values{"blockId": {"b1"}, "uid": {"some-uid"}}
|
form := url.Values{"blockId": {"b1"}, "uid": {"some-uid"}}
|
||||||
|
|||||||
@ -59,7 +59,7 @@ func newTestSettings() (*SettingsManager, *fakeQuerier) {
|
|||||||
// — handy for tests that need to drive HandleCreateBooking.
|
// — handy for tests that need to drive HandleCreateBooking.
|
||||||
func newTestHandler() (*CalcomHandler, *fakeQuerier) {
|
func newTestHandler() (*CalcomHandler, *fakeQuerier) {
|
||||||
s, q := newTestSettings()
|
s, q := newTestSettings()
|
||||||
return NewCalcomHandler(s, NewRateLimiter(bookingsPerHourPerIP), "https://test.blockninja.dev"), q
|
return NewCalcomHandler(s, NewRateLimiter(bookingsPerHourPerIP), "https://test.localdev.blockninjacms.com"), q
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestWriteServerError_DoesNotLeakInternalError verifies that writeServerError
|
// TestWriteServerError_DoesNotLeakInternalError verifies that writeServerError
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
name = "calcomblock"
|
name = "calcomblock"
|
||||||
display_name = "Cal.com Booking"
|
display_name = "Cal.com Booking"
|
||||||
scope = "@ninja"
|
scope = "@ninja"
|
||||||
version = "2.0.1"
|
version = "2.0.0"
|
||||||
description = "Embeddable Cal.com booking calendar block with custom styling, timezone-aware slot windowing, honeypot + captcha + rate-limited public booking endpoints, and webhook receiver."
|
description = "Embeddable Cal.com booking calendar block with custom styling, timezone-aware slot windowing, honeypot + captcha + rate-limited public booking endpoints, and webhook receiver."
|
||||||
kind = "plugin"
|
kind = "plugin"
|
||||||
categories = ["forms"]
|
categories = ["forms"]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user