refactor: move to sr.ht (wip)

This commit is contained in:
Ash Keel 2023-11-10 21:36:15 +01:00
parent c099edfe9f
commit f910d83c06
No known key found for this signature in database
GPG Key ID: 53A9E9A6035DD109
36 changed files with 91 additions and 114 deletions

View File

@ -5,13 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [current]
## current
### Changed
- Updated Kilovolt with a new websocket library
## [3.3.0] - 2023-11-03
## 3.3.0 - 2023-11-03
### Added
@ -32,13 +32,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed bot cooldown being unreliable due to depending on multiple time sources
- Spaces at beginning of messages are now ignored for command checking (e.g. " !lurk" will match !lurk)
## [3.2.1] - 2023-05-17
## 3.2.1 - 2023-05-17
### Fixed
- Fixed the eventsub connection to not use the now broken beta URL
## [3.2.0] - 2023-05-03
## 3.2.0 - 2023-05-03
### Added
@ -56,14 +56,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- The UPDATE AVAILABLE banner in prerelease builds now works properly by only appearing when a newer prerelease (or stable) version is available to download.
- Numeric input boxes in the UI should now be less of a pain to use
## [3.1.5] - 2023-03-31
## 3.1.5 - 2023-03-31
### Fixed
- Updated wails so the window should not flash "connection refused" when opened
- The compiled binary now has the proper version and update notices should work again
## [3.1.4] - 2023-03-31
## 3.1.4 - 2023-03-31
### Fixed
@ -71,7 +71,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- The loyalty points entry were assigned incorrectly upon startup, this has been fixed
- Fixed having multiple messages for an alert use non-compiled templates
## [3.1.3] - 2023-03-14
## 3.1.3 - 2023-03-14
### Changed
@ -82,13 +82,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed changing chat history breaking the database
- Fixed panic on eventsub reconnections
## [3.1.2] - 2023-03-05
## 3.1.2 - 2023-03-05
### Fixed
- Fixed some auth token shenanigans where a valid access token would not be generated when starting the app
## [3.1.1] - 2023-02-23
## 3.1.1 - 2023-02-23
UPGRADE NOTE: If upgrading from an earlier version, please re-authenticate your user to make sure it has a necessary new permission for event notifications to work (even from 3.1.0).
@ -96,7 +96,7 @@ UPGRADE NOTE: If upgrading from an earlier version, please re-authenticate your
- Fixed issue where event notification would not work due to Twitch deprecating the `channel.follows` V1 topic
- Fixed more database leaks
## [3.1.0] - 2023-02-21
## 3.1.0 - 2023-02-21
UPGRADE NOTE: If upgrading from an earlier version, please re-authenticate your user to make sure it has a necessary new permission for the loyalty system to work.
@ -123,7 +123,7 @@ UPGRADE NOTE: If upgrading from an earlier version, please re-authenticate your
- Fixed bug where the loyalty config page had a wrong set interval on first load
- Fixed the formatting of log data so long lines are still contained in the dialog instead of clipping offscreen
## [3.0.0] - 2023-01-09
## 3.0.0 - 2023-01-09
### Added
@ -162,7 +162,7 @@ UPGRADE NOTE: If upgrading from an earlier version, please re-authenticate your
- Badger has been removed as a possible database, see v3 release notes on migration procedures.
- The link to Ash Keel's Twitter profile has been removed
## [2.1.1] - 2022-03-24
## 2.1.1 - 2022-03-24
### Added
@ -172,7 +172,7 @@ UPGRADE NOTE: If upgrading from an earlier version, please re-authenticate your
- Updated dependencies, most notably the Twitch IRC bot has been bumped to v3 and now includes emoji positions for easier embedding of them in chat overlays.
## [2.1.0] - 2022-02-08
## 2.1.0 - 2022-02-08
### Added
@ -183,7 +183,7 @@ UPGRADE NOTE: If upgrading from an earlier version, please re-authenticate your
- Fixed nasty sync bug that would make strimertul unresponsive when it would detect streaming on Twitch.
## [2.0.0] - 2022-02-01
## 2.0.0 - 2022-02-01
### Added
@ -204,7 +204,7 @@ UPGRADE NOTE: If upgrading from an earlier version, please re-authenticate your
- Twitch chat history doesn't have an explicit toggle anymore, they are always enabled unless the `chat_history` setting is set to 0.
- Loyalty point migration from v1.2.0 and earlier has been removed. If you are somehow running such an old version of strimertul and using loyalty points, run any version of strimertul between v1.3.0 and v1.7.0 first to make sure all points are migrated to the new format.
## [1.7.0] - 2021-12-07
## 1.7.0 - 2021-12-07
### Added
@ -220,31 +220,31 @@ UPGRADE NOTE: If upgrading from an earlier version, please re-authenticate your
- Twitch bot: fixed command checking, previous matching only checked for prefix (eg. !verylong could be called by writing !verylonglongbaaah)
- DB was not getting garbage collected, this is now fixed with a GC run every 15 minutes.
## [1.6.3] - 2021-11-30
## 1.6.3 - 2021-11-30
### Added
- ACL on bot commands are now fully working and not a placeholder anymore!
- ACL level "Subscriber" for Twitch subscribers
## [1.6.2] - 2021-11-24
## 1.6.2 - 2021-11-24
### Fixed
- Fixed oversight in bot timer cooldown calculation that made them never start
- Fixed timer configuration never getting applied when changed
## [1.6.1] - 2021-11-24
## 1.6.1 - 2021-11-24
### Changed
- Twitch and Stulbe modules now reload/restart when their configuration changes instead of requiring strimertul to be closed and reopened manually.
## [1.6.0] - 2021-11-21
## 1.6.0 - 2021-11-21
### Added
- KV Authentication using Kilovolt v6, check out [the authentication documentation](https://github.com/strimertul/kilovolt/blob/main/PROTOCOL.md#authentication) for more info.
- KV Authentication using Kilovolt v6, check out [the authentication documentation](https://git.sr.ht/~ashkeel/kilovolt/tree/main/item/PROTOCOL.md#authentication) for more info.
### Changed
@ -252,43 +252,20 @@ UPGRADE NOTE: If upgrading from an earlier version, please re-authenticate your
- The static server will react to configuration changes and auto-restart instead of requiring strimertul to be closed and reopened manually.
- Added a couple buttons in the secret debug page to dump all keys and their content
## [1.5.3] - 2021-11-12
## 1.5.3 - 2021-11-12
### Added
- Added KV RPC `twitch/@send-chat-message` for writing text messages to chat
## [1.5.2] - 2021-11-05
## 1.5.2 - 2021-11-05
### Added
- Chat timers
## [1.5.1] - 2021-10-05
## 1.5.1 - 2021-10-05
### Added
- Stulbe integration for alerts
[current]: https://github.com/strimertul/strimertul/compare/v3.3.0...HEAD
[3.3.0]: https://github.com/strimertul/strimertul/compare/v3.2.1...v3.3.0
[3.2.1]: https://github.com/strimertul/strimertul/compare/v3.2.0...v3.2.1
[3.2.0]: https://github.com/strimertul/strimertul/compare/v3.1.5...v3.2.0
[3.1.5]: https://github.com/strimertul/strimertul/compare/v3.1.4...v3.1.5
[3.1.4]: https://github.com/strimertul/strimertul/compare/v3.1.3...v3.1.4
[3.1.3]: https://github.com/strimertul/strimertul/compare/v3.1.2...v3.1.3
[3.1.2]: https://github.com/strimertul/strimertul/compare/v3.1.1...v3.1.2
[3.1.1]: https://github.com/strimertul/strimertul/compare/v3.1.0...v3.1.1
[3.1.0]: https://github.com/strimertul/strimertul/compare/v3.0.0...v3.1.0
[3.0.0]: https://github.com/strimertul/strimertul/compare/v2.1.1...v3.0.0
[2.1.1]: https://github.com/strimertul/strimertul/compare/v2.1.0...v2.1.1
[2.1.0]: https://github.com/strimertul/strimertul/compare/v2.0.0...v2.1.0
[2.0.0]: https://github.com/strimertul/strimertul/compare/v1.7.0...v2.0.0
[1.7.0]: https://github.com/strimertul/strimertul/compare/v1.6.3...v1.7.0
[1.6.3]: https://github.com/strimertul/strimertul/compare/v1.6.2...v1.6.3
[1.6.2]: https://github.com/strimertul/strimertul/compare/v1.6.1...v1.6.2
[1.6.1]: https://github.com/strimertul/strimertul/compare/v1.6.0...v1.6.1
[1.6.0]: https://github.com/strimertul/strimertul/compare/v1.5.3...v1.6.0
[1.5.3]: https://github.com/strimertul/strimertul/compare/v1.5.2...v1.5.3
[1.5.2]: https://github.com/strimertul/strimertul/compare/v1.5.1...v1.5.2
[1.5.1]: https://github.com/strimertul/strimertul/compare/v1.5.0...v1.5.1
- Stulbe integration for alerts

View File

@ -26,7 +26,7 @@ Strimertül is a single executable app that provides the following:
- Twitch bot for handling chat messages and providing custom commands
- Polling-based loyalty system for rewards and community goals
At strimertül's core is [Kilovolt](https://github.com/strimertul/kilovolt), a pub/sub key-value store accessible via websocket. You can access every functionality of strimertul through the Kilovolt API. Check [this repository](https://github.com/strimertul/kilovolt-clients) for a list of officially supported kilovolt clients (or submit your own). You should be able to easily build a client yourself by just creating a websocket connection and using the [Kilovolt protocol](https://github.com/strimertul/kilovolt/blob/main/PROTOCOL.md).
At strimertül's core is [Kilovolt](https://git.sr.ht/~ashkeel/kilovolt), a pub/sub key-value store accessible via websocket. You can access every functionality of strimertul through the Kilovolt API. Check [this repository](https://github.com/strimertul/kilovolt-clients) for a list of officially supported kilovolt clients (or submit your own). You should be able to easily build a client yourself by just creating a websocket connection and using the [Kilovolt protocol](https://github.com/strimertul/kilovolt/blob/main/PROTOCOL.md).
Check out the [project's wiki](https://github.com/strimertul/strimertul/wiki) for more information on how to use the API to interact with strimertul, or the `docs` folder for more technical information.

12
app.go
View File

@ -15,7 +15,7 @@ import (
kv "github.com/strimertul/kilovolt/v11"
"git.sr.ht/~hamcha/containers/sync"
"git.sr.ht/~ashkeel/containers/sync"
"github.com/nicklaw5/helix/v2"
"github.com/postfinance/single"
"github.com/urfave/cli/v2"
@ -23,11 +23,11 @@ import (
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
"github.com/strimertul/strimertul/database"
"github.com/strimertul/strimertul/docs"
"github.com/strimertul/strimertul/loyalty"
"github.com/strimertul/strimertul/twitch"
"github.com/strimertul/strimertul/webserver"
"git.sr.ht/~ashkeel/strimertul/database"
"git.sr.ht/~ashkeel/strimertul/docs"
"git.sr.ht/~ashkeel/strimertul/loyalty"
"git.sr.ht/~ashkeel/strimertul/twitch"
"git.sr.ht/~ashkeel/strimertul/webserver"
)
// App struct

View File

@ -9,8 +9,8 @@ import (
"go.uber.org/zap"
"github.com/strimertul/strimertul/database"
"github.com/strimertul/strimertul/utils"
"git.sr.ht/~ashkeel/strimertul/database"
"git.sr.ht/~ashkeel/strimertul/utils"
)
func BackupTask(driver database.DatabaseDriver, options database.BackupOptions) {

View File

@ -3,9 +3,9 @@ package main
import (
"os"
"github.com/strimertul/strimertul/utils"
"git.sr.ht/~ashkeel/strimertul/utils"
"github.com/strimertul/strimertul/database"
"git.sr.ht/~ashkeel/strimertul/database"
"github.com/urfave/cli/v2"
)

View File

@ -10,7 +10,7 @@ import (
"github.com/urfave/cli/v2"
"go.uber.org/zap"
"github.com/strimertul/strimertul/utils"
"git.sr.ht/~ashkeel/strimertul/utils"
)
// DatabaseDriver is a driver wrapping a supported database

View File

@ -6,7 +6,7 @@ import (
"os"
"path/filepath"
"github.com/strimertul/strimertul/utils"
"git.sr.ht/~ashkeel/strimertul/utils"
"github.com/cockroachdb/pebble"
kv "github.com/strimertul/kilovolt/v11"

View File

@ -3,8 +3,8 @@ package main
import (
"os"
"git.sr.ht/~ashkeel/strimertul/docs"
jsoniter "github.com/json-iterator/go"
"github.com/strimertul/strimertul/docs"
)
func main() {

View File

@ -5,7 +5,7 @@ import (
"reflect"
"strings"
"github.com/strimertul/strimertul/docs/interfaces"
"git.sr.ht/~ashkeel/strimertul/docs/interfaces"
)
type DataObject struct {

View File

@ -1,11 +1,11 @@
package docs
import (
"github.com/strimertul/strimertul/docs/interfaces"
"github.com/strimertul/strimertul/loyalty"
"github.com/strimertul/strimertul/twitch"
"github.com/strimertul/strimertul/utils"
"github.com/strimertul/strimertul/webserver"
"git.sr.ht/~ashkeel/strimertul/docs/interfaces"
"git.sr.ht/~ashkeel/strimertul/loyalty"
"git.sr.ht/~ashkeel/strimertul/twitch"
"git.sr.ht/~ashkeel/strimertul/utils"
"git.sr.ht/~ashkeel/strimertul/webserver"
)
var (

View File

@ -3,7 +3,7 @@ package docs
import (
"reflect"
"github.com/strimertul/strimertul/docs/interfaces"
"git.sr.ht/~ashkeel/strimertul/docs/interfaces"
)
// Documentation stuff, keep updated at all times

View File

@ -1,16 +1,16 @@
import {
ChatBubbleIcon,
DiscordLogoIcon,
EnvelopeClosedIcon,
GitHubLogoIcon,
} from '@radix-ui/react-icons';
import { ChannelList, Channel, ChannelLink } from '../../pages/Strimertul';
import { ChannelList, Channel, ChannelLink } from '~/ui/pages/Strimertul';
export const Channels = (
<ChannelList>
<Channel>
<ChannelLink href="https://github.com/strimertul/strimertul/issues">
<GitHubLogoIcon width={24} height={24} />
github.com/strimertul/strimertul/issues
<ChannelLink href="https://lists.sr.ht/~ashkeel/strimertul-devel">
<ChatBubbleIcon width={24} height={24} />
lists.sr.ht/~ashkeel/strimertul-devel
</ChannelLink>
</Channel>
<Channel>

View File

@ -148,7 +148,7 @@ export default function StrimertulPage(): React.ReactElement {
i18nKey="pages.strimertul.license-notice-strimertul"
components={{
license: (
<BrowserLink href="https://github.com/strimertul/strimertul/blob/master/LICENSE">
<BrowserLink href="https://git.sr.ht/~ashkeel/strimertul/tree/master/item/LICENSE">
GNU Affero General Public License v3.0
</BrowserLink>
),

4
go.mod
View File

@ -1,9 +1,9 @@
module github.com/strimertul/strimertul
module git.sr.ht/~ashkeel/strimertul
go 1.21
require (
git.sr.ht/~hamcha/containers v0.3.2
git.sr.ht/~ashkeel/containers v0.3.6
github.com/Masterminds/sprig/v3 v3.2.3
github.com/apenwarr/fixconsole v0.0.0-20191012055117-5a9f6489cc29
github.com/cockroachdb/pebble v0.0.0-20231102162011-844f0582c2eb

4
go.sum
View File

@ -1,5 +1,5 @@
git.sr.ht/~hamcha/containers v0.3.2 h1:pAsygdTXsI3YW1d8SvimyB8KPspG2FB06AMbt/ELaIA=
git.sr.ht/~hamcha/containers v0.3.2/go.mod h1:RiZphUpy9t6EnL4Gf6uzByM9QrBoqRCEPo7kz2wzbhE=
git.sr.ht/~ashkeel/containers v0.3.6 h1:+umWlQGKhLxGQlaEUt/F6rBZGpeBd1T01fM3wro+qTY=
git.sr.ht/~ashkeel/containers v0.3.6/go.mod h1:i2KocnJfRH0FwfgPi4nw7/ehYLEoLlP3iwdDoBeVdME=
github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ=
github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw=
github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI=

View File

@ -4,7 +4,7 @@ import (
"os"
"time"
"git.sr.ht/~hamcha/containers/sync"
"git.sr.ht/~ashkeel/containers/sync"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"

View File

@ -3,7 +3,7 @@ package loyalty
import (
"reflect"
"github.com/strimertul/strimertul/docs/interfaces"
"git.sr.ht/~ashkeel/strimertul/docs/interfaces"
)
// Documentation stuff, keep updated at all times

View File

@ -7,11 +7,11 @@ import (
"strings"
"time"
"github.com/strimertul/strimertul/database"
"github.com/strimertul/strimertul/twitch"
"github.com/strimertul/strimertul/utils"
"git.sr.ht/~ashkeel/strimertul/database"
"git.sr.ht/~ashkeel/strimertul/twitch"
"git.sr.ht/~ashkeel/strimertul/utils"
"git.sr.ht/~hamcha/containers/sync"
"git.sr.ht/~ashkeel/containers/sync"
jsoniter "github.com/json-iterator/go"
"go.uber.org/zap"
)

View File

@ -8,9 +8,9 @@ import (
"github.com/nicklaw5/helix/v2"
"github.com/strimertul/strimertul/twitch"
"git.sr.ht/~ashkeel/strimertul/twitch"
"git.sr.ht/~hamcha/containers/sync"
"git.sr.ht/~ashkeel/containers/sync"
irc "github.com/gempir/go-twitch-irc/v4"
"go.uber.org/zap"
)

View File

@ -18,7 +18,7 @@ import (
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
"github.com/strimertul/strimertul/utils"
"git.sr.ht/~ashkeel/strimertul/utils"
)
var json = jsoniter.ConfigFastest

View File

@ -11,7 +11,7 @@ import (
"github.com/nicklaw5/helix/v2"
"go.uber.org/zap"
"github.com/strimertul/strimertul/database"
"git.sr.ht/~ashkeel/strimertul/database"
)
const BotAlertsKey = "twitch/bot-modules/alerts/config"

View File

@ -8,12 +8,12 @@ import (
"github.com/nicklaw5/helix/v2"
"git.sr.ht/~hamcha/containers/sync"
"git.sr.ht/~ashkeel/containers/sync"
irc "github.com/gempir/go-twitch-irc/v4"
"go.uber.org/zap"
"github.com/strimertul/strimertul/database"
"github.com/strimertul/strimertul/utils"
"git.sr.ht/~ashkeel/strimertul/database"
"git.sr.ht/~ashkeel/strimertul/utils"
)
type IRCBot interface {

View File

@ -4,11 +4,11 @@ import (
"math/rand"
"time"
"git.sr.ht/~hamcha/containers/sync"
"git.sr.ht/~ashkeel/containers/sync"
irc "github.com/gempir/go-twitch-irc/v4"
"go.uber.org/zap"
"github.com/strimertul/strimertul/database"
"git.sr.ht/~ashkeel/strimertul/database"
)
const BotTimersKey = "twitch/bot-modules/timers/config"

View File

@ -4,7 +4,7 @@ import (
"fmt"
"time"
"github.com/strimertul/strimertul/utils"
"git.sr.ht/~ashkeel/strimertul/utils"
"github.com/gorilla/websocket"
jsoniter "github.com/json-iterator/go"

View File

@ -6,14 +6,14 @@ import (
"fmt"
"time"
"git.sr.ht/~hamcha/containers/sync"
"git.sr.ht/~ashkeel/containers/sync"
lru "github.com/hashicorp/golang-lru/v2"
jsoniter "github.com/json-iterator/go"
"github.com/nicklaw5/helix/v2"
"go.uber.org/zap"
"github.com/strimertul/strimertul/database"
"github.com/strimertul/strimertul/webserver"
"git.sr.ht/~ashkeel/strimertul/database"
"git.sr.ht/~ashkeel/strimertul/webserver"
)
var json = jsoniter.ConfigFastest

View File

@ -3,11 +3,10 @@ package twitch
import (
"testing"
"github.com/strimertul/strimertul/webserver"
"go.uber.org/zap/zaptest"
"github.com/strimertul/strimertul/database"
"git.sr.ht/~ashkeel/strimertul/database"
"git.sr.ht/~ashkeel/strimertul/webserver"
)
func TestNewClient(t *testing.T) {

View File

@ -3,9 +3,9 @@ package twitch
import (
"reflect"
"git.sr.ht/~ashkeel/strimertul/docs/interfaces"
irc "github.com/gempir/go-twitch-irc/v4"
"github.com/nicklaw5/helix/v2"
"github.com/strimertul/strimertul/docs/interfaces"
)
// Documentation stuff, keep updated at all times

View File

@ -1,7 +1,7 @@
package utils
import (
"git.sr.ht/~hamcha/containers/sync"
"git.sr.ht/~ashkeel/containers/sync"
jsoniter "github.com/json-iterator/go"
)

View File

@ -1,9 +1,10 @@
package utils
import (
"git.sr.ht/~hamcha/containers/sync"
jsoniter "github.com/json-iterator/go"
"testing"
"git.sr.ht/~ashkeel/containers/sync"
jsoniter "github.com/json-iterator/go"
)
func TestLoadJSONToWrapped(t *testing.T) {

View File

@ -1,6 +1,6 @@
package utils
import "git.sr.ht/~hamcha/containers/sync"
import "git.sr.ht/~ashkeel/containers/sync"
func MergeMap[T comparable, V any](a, b map[T]V) {
for key, value := range b {

View File

@ -1,8 +1,9 @@
package utils
import (
"git.sr.ht/~hamcha/containers/sync"
"testing"
"git.sr.ht/~ashkeel/containers/sync"
)
func TestMergeMap(t *testing.T) {

View File

@ -1,7 +1,7 @@
package utils
import (
"git.sr.ht/~hamcha/containers/sync"
"git.sr.ht/~ashkeel/containers/sync"
)
type SyncList[T Comparable] struct {

View File

@ -3,7 +3,7 @@ package webserver
import (
"reflect"
"github.com/strimertul/strimertul/docs/interfaces"
"git.sr.ht/~ashkeel/strimertul/docs/interfaces"
)
// Documentation stuff, keep updated at all times

View File

@ -11,12 +11,12 @@ import (
"net/http"
"net/http/pprof"
"git.sr.ht/~hamcha/containers/sync"
"git.sr.ht/~ashkeel/containers/sync"
jsoniter "github.com/json-iterator/go"
kv "github.com/strimertul/kilovolt/v11"
"go.uber.org/zap"
"github.com/strimertul/strimertul/database"
"git.sr.ht/~ashkeel/strimertul/database"
)
var json = jsoniter.ConfigFastest

View File

@ -7,11 +7,10 @@ import (
"testing"
"time"
"git.sr.ht/~hamcha/containers/sync"
"git.sr.ht/~ashkeel/containers/sync"
"go.uber.org/zap/zaptest"
"github.com/strimertul/strimertul/database"
"git.sr.ht/~ashkeel/strimertul/database"
)
func TestNewServer(t *testing.T) {

View File

@ -5,7 +5,7 @@ import (
"net/http"
"net/http/httptest"
"git.sr.ht/~hamcha/containers/sync"
"git.sr.ht/~ashkeel/containers/sync"
)
type TestServer struct {