Rewrite the bot process in Node/Discord.js (#206)

* Rewrite the bot process in js using discord.js

* remove old go code
This commit is contained in:
Katie Macke 2021-03-31 15:35:07 -04:00 committed by GitHub
parent 55bc84e045
commit 7ec603cf70
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 104 additions and 799 deletions

View file

@ -1,5 +1,5 @@
{
"name": "Roleypoly (Go, Node)",
"name": "Roleypoly (Node)",
"image": "ghcr.io/roleypoly/dev-container:main",
// Set *default* container specific settings.json values on container create.
"settings": {
@ -8,7 +8,6 @@
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"dbaeumer.vscode-eslint",
"golang.go",
"hashicorp.terraform",
"firsttris.vscode-jest-runner",
"esbenp.prettier-vscode",

View file

@ -5,25 +5,6 @@ on:
pull_request:
jobs:
go_test:
runs-on: ubuntu-latest
name: Go CI
steps:
- uses: actions/checkout@master
- uses: actions/cache@v2.1.4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- uses: actions/setup-go@v2
with:
go-version: '^1.15.5'
- run: go vet ./...
- run: go test ./...
node_test:
runs-on: ubuntu-latest
name: Node CI
@ -116,7 +97,6 @@ jobs:
name: Docker Build & Publish
runs-on: ubuntu-latest
needs:
- go_test
- node_test
strategy:
matrix:

View file

@ -6,7 +6,6 @@
"editor.formatOnSave": true,
"editor.insertSpaces": true,
"editor.tabSize": 2,
"go.inferGopath": false,
"search.exclude": {
"**/.yarn": true,
"**/.pnp.*": true

20
go.mod
View file

@ -1,20 +0,0 @@
module github.com/roleypoly/roleypoly
go 1.15
require (
github.com/bwmarrin/discordgo v0.23.2
github.com/dghubble/trie v0.0.0-20201011220304-ed6d6b8add55
github.com/google/go-cmp v0.5.4 // indirect
github.com/joho/godotenv v1.3.0
github.com/kr/pretty v0.1.0 // indirect
github.com/lampjaw/discordclient v0.0.0-20210312234541-165fc2e57e2b
github.com/onsi/gomega v1.11.0
golang.org/x/net v0.0.0-20201224014010-6772e930b67b // indirect
golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073 // indirect
golang.org/x/text v0.3.4 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
google.golang.org/protobuf v1.25.0 // indirect
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect
k8s.io/klog v1.0.0
)

135
go.sum
View file

@ -1,135 +0,0 @@
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/bwmarrin/discordgo v0.23.2 h1:BzrtTktixGHIu9Tt7dEE6diysEF9HWnXeHuoJEt2fH4=
github.com/bwmarrin/discordgo v0.23.2/go.mod h1:c1WtWUGN6nREDmzIpyTp/iD3VYt4Fpx+bVyfBG7JE+M=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/dghubble/trie v0.0.0-20201011220304-ed6d6b8add55 h1:3yKntgWb7KwnHd4nCVgCIUNQs4qRdua+jitRqGMxKys=
github.com/dghubble/trie v0.0.0-20201011220304-ed6d6b8add55/go.mod h1:xNBeoT4V92/aNvuC3IJ2g59uxuKP4/kzvkpoHrb7v4A=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM=
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4=
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M=
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/gorilla/websocket v1.4.0 h1:WDFjx/TMzVgy9VdMMQi2K2Emtwi2QcUQsztZ/zLaH/Q=
github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc=
github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg=
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/lampjaw/discordclient v0.0.0-20210312234541-165fc2e57e2b h1:SDLw5YNtl6n7eArjurP/yLgMBA4qT4hBIJ5YuROaizY=
github.com/lampjaw/discordclient v0.0.0-20210312234541-165fc2e57e2b/go.mod h1:li2xX5VLDvw1fPoYpA3nTShwnLbYrcSzso9dOSnZ3Iw=
github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78=
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.12.1 h1:mFwc4LvZ0xpSvDZ3E+k8Yte0hLOMxXUlP+yXtJqkYfQ=
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
github.com/onsi/gomega v1.11.0 h1:+CqWgvj0OZycCaqclBD1pxKHAU+tOkHmQIWvDHq2aug=
github.com/onsi/gomega v1.11.0/go.mod h1:azGKhqFUon9Vuj0YmTfLSmx0FUwqXYSTl5re8lQLTUg=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb h1:eBmm0M9fYhWpKZLjQUUKka/LtIxf46G4fxeEz5KJr9U=
golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201224014010-6772e930b67b h1:iFwSg7t5GZmB/Q5TjiEAsdoLDrdJRC1RiF2WhuV29Qw=
golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f h1:+Nyd8tzPX9R7BWHguqsrbFdRx3WQ/1ib8I44HXV5yTA=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073 h1:8qxJSnu+7dRq6upnbntrmriWByIakBuct5OM/MdQC1M=
golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.4 h1:0YWbFKbhXG/wIiuHDSKpS0Iy7FSA+u45VtBMfQcFTTc=
golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM=
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c=
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8=
k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I=

View file

@ -22,7 +22,6 @@
"build:web": "yarn workspace @roleypoly/web run build",
"lint": "run-p -c lint:* --",
"lint:eslint": "eslint",
"lint:go": "go fmt ./...",
"lint:prettier": "cross-env prettier -c '**/*.{ts,tsx,css,yml,yaml,md,json,js,jsx,sh,gitignore,mdx,Dockerfile}'",
"lint:stylelint": "cross-env stylelint '**/*.{ts,tsx}'",
"lint:terraform": "terraform fmt -recursive -check ./terraform",
@ -30,6 +29,7 @@
"lint:types-api": "yarn workspace @roleypoly/api run lint:types",
"postinstall": "is-ci || husky install",
"start": "run-p -c start:*",
"start:bot": "yarn workspace @roleypoly/bot start",
"start:design-system": "yarn workspace @roleypoly/design-system start",
"start:web": "yarn workspace @roleypoly/web start",
"start:worker": "yarn workspace @roleypoly/api start",
@ -64,9 +64,6 @@
"*.{ts,tsx,js,jsx}": [
"prettier --write"
],
"*.go": [
"go fmt"
],
"*.{json,Dockerfile,sh,md,env,mdx,yml,html}": [
"prettier --write"
],

27
packages/bot/bot.js Normal file
View file

@ -0,0 +1,27 @@
const { Client } = require('discord.js');
const botToken = process.env['BOT_TOKEN'];
const allowedBots = process.env['ALLOWED_BOTS']?.split(',') ?? [];
const appUrl = process.env['UI_PUBLIC_URI'] ?? '';
function messageEventListener(message) {
const { author, channel, client, guild, mentions } = message;
if (!guild) {
return;
} // Ignore DMs
if (client.user && !mentions.has(client.user.id)) {
return;
} // Ignore non bot mentions
if (author.bot && !allowedBots.includes(author.id)) {
return;
} // Only respond to allowed bots
const guildId = guild.id;
channel.send(`:beginner: Assign your roles here! ${appUrl}/s/${guildId}`);
}
const client = new Client();
client.on('message', (message) => messageEventListener(message));
client.login(botToken);

9
packages/bot/index.js Normal file
View file

@ -0,0 +1,9 @@
const path = require('path');
require('dotenv').config({ path: path.resolve(__dirname, '../../.env') });
const { ShardingManager } = require('discord.js');
const botToken = process.env['BOT_TOKEN'];
const manager = new ShardingManager('./bot.js', { token: botToken });
manager.spawn();

10
packages/bot/package.json Normal file
View file

@ -0,0 +1,10 @@
{
"name": "@roleypoly/bot",
"version": "0.1.0",
"scripts": {
"start": "node index.js"
},
"dependencies": {
"discord.js": "^12.5.1"
}
}

View file

@ -1,19 +0,0 @@
package common
import (
"os"
"os/signal"
"syscall"
)
func AwaitExit() {
syscallExit := make(chan os.Signal, 1)
signal.Notify(
syscallExit,
syscall.SIGINT,
syscall.SIGTERM,
os.Interrupt,
os.Kill,
)
<-syscallExit
}

View file

@ -1,87 +0,0 @@
package bot
import (
"context"
"regexp"
"strings"
"github.com/dghubble/trie"
"github.com/lampjaw/discordclient"
"k8s.io/klog"
)
type CommandMux struct {
commandTrie *trie.PathTrie
matcher *regexp.Regexp
}
func NewCommandMux(matcher *regexp.Regexp) CommandMux {
return CommandMux{
commandTrie: trie.NewPathTrie(),
matcher: matcher,
}
}
type CommandGroup []Command
func (cg CommandGroup) RegisterCommands(commandTrie *trie.PathTrie, prefix string) {
for _, command := range cg {
commandTrie.Put(prefix+"/"+command.CommandName, command.Handler)
}
}
type Command struct {
CommandName string
Handler HandlerFunc
}
func (c CommandMux) RegisterCommandGroup(prefix string, group CommandGroup) {
group.RegisterCommands(c.commandTrie, prefix)
}
func (c CommandMux) Handler(ctx context.Context, message discordclient.Message) {
if !c.matches(message) {
return
}
key := c.commandKeyFromMessage(message)
command := c.commandTrie.Get(key)
if command == nil {
return
}
handlerFn, ok := command.(HandlerFunc)
if !ok {
klog.Warning("CommandMux.Handler: " + key + " handler was not HandlerFunc")
return
}
c.logCommandRun(key, message)
handlerFn(ctx, message)
}
func (c CommandMux) commandKeyFromMessage(message discordclient.Message) string {
commandParts := strings.Split(message.RawMessage(), " ")[1:]
return commandParts[0] + "/" + commandParts[1]
}
func (c CommandMux) matches(message discordclient.Message) bool {
return c.matcher.MatchString(message.RawMessage())
}
func (c CommandMux) logCommandRun(key string, message discordclient.Message) {
klog.Info("CommandMux: " + key + " by " + message.UserName() + " <@" + message.UserID() + ">")
}
func PrefixMatcher(prefix string) *regexp.Regexp {
return regexp.MustCompile(`^` + prefix)
}
func MentionMatcher(userID string) *regexp.Regexp {
return regexp.MustCompile(`<@!?` + userID + ">")
}
func Tokenize(message discordclient.Message) []string {
return strings.SplitAfterN(message.RawMessage(), " ", 3)
}

View file

@ -1,101 +0,0 @@
package bot
import (
"context"
"github.com/bwmarrin/discordgo"
"github.com/lampjaw/discordclient"
"github.com/roleypoly/roleypoly/src/common"
)
type HandlerFunc func(context.Context, discordclient.Message)
type BotScaffolding struct {
BotToken string
BotClientID string
RootUsers []string
AllowBots bool
AllowEdits bool
AllowDeletes bool
GatewayIntents discordgo.Intent
Handler HandlerFunc
}
type Listener struct {
DiscordClient *discordclient.DiscordClient
config *BotScaffolding
handler HandlerFunc
}
type ctxKey string
var ListenerCtxKey ctxKey = "listener"
var MessageCtxKey ctxKey = "message"
func ScaffoldBot(config BotScaffolding) error {
discordClient := discordclient.NewDiscordClient(config.BotToken, config.RootUsers[0], config.BotClientID)
discordClient.GatewayIntents = config.GatewayIntents
discordClient.AllowBots = config.AllowBots
messageChannel, err := discordClient.Listen(-1)
if err != nil {
return err
}
defer common.AwaitExit()
listener := &Listener{
config: &config,
DiscordClient: discordClient,
handler: config.Handler,
}
go listener.processMessages(messageChannel)
return nil
}
func (l *Listener) processMessages(messageChannel <-chan discordclient.Message) {
listenerCtx := context.WithValue(context.Background(), ListenerCtxKey, l)
for {
message := <-messageChannel
if !l.config.AllowEdits && message.Type() == discordclient.MessageTypeUpdate {
continue
}
if !l.config.AllowDeletes && message.Type() == discordclient.MessageTypeDelete {
continue
}
localCtx := context.WithValue(listenerCtx, MessageCtxKey, message)
go l.handler(localCtx, message)
}
}
// ReplyToMessage will use the message context to reply to a message.
// Message may be one of two types:
// - *discordgo.MessageSend
// - string
func ReplyToMessage(listenerCtx context.Context, message interface{}) error {
l := listenerCtx.Value(ListenerCtxKey).(*Listener)
m := listenerCtx.Value(MessageCtxKey).(discordclient.Message)
channelID := m.Channel()
switch message.(type) {
case *discordgo.MessageSend:
_, err := l.DiscordClient.Session.ChannelMessageSendComplex(channelID, message.(*discordgo.MessageSend))
if err != nil {
return err
}
case string:
return l.DiscordClient.SendMessage(channelID, message.(string))
}
return nil
}
// NoOpHandlerFunc does no operations againdst a message. This can be an equivalent to nil.
func NoOpHandlerFunc(context.Context, discordclient.Message) {
}

View file

@ -1,84 +0,0 @@
package common
import (
"encoding/json"
"os"
"strconv"
"strings"
)
// GetenvValue is a holder type for Getenv to translate any Getenv strings to real types
type GetenvValue struct {
key string
value string
}
func Getenv(key string, defaultValue ...string) GetenvValue {
value := ""
if len(defaultValue) > 0 {
value = defaultValue[0]
}
envValue := os.Getenv(key)
if envValue != "" {
value = envValue
}
return GetenvValue{
value: strings.TrimSpace(value),
key: key,
}
}
func (g GetenvValue) String() string {
return g.value
}
func (g GetenvValue) StringSlice(optionalDelimiter ...string) []string {
delimiter := ","
if len(optionalDelimiter) > 0 {
delimiter = optionalDelimiter[0]
}
return strings.Split(g.value, delimiter)
}
// SafeURL removes any trailing slash
func (g GetenvValue) SafeURL() string {
if g.value[len(g.value)-1] == '/' {
return g.value[:len(g.value)-1]
}
return g.value
}
func (g GetenvValue) Bool() bool {
lowercaseValue := strings.ToLower(g.value)
if g.value == "1" || lowercaseValue == "true" || lowercaseValue == "yes" {
return true
} else {
return false
}
}
func (g GetenvValue) Number() int {
result, err := strconv.Atoi(g.value)
if err != nil {
return -999999
}
return result
}
func (g GetenvValue) JSON(target interface{}) error {
return json.Unmarshal([]byte(g.value), target)
}
func (g GetenvValue) OrFatal() GetenvValue {
if g.value == "" {
panic("Getenv value was empty and shouldn't be. key: " + g.key)
}
return g
}

View file

@ -1,154 +0,0 @@
package common_test
import (
"os"
"strings"
"testing"
"github.com/onsi/gomega"
"github.com/roleypoly/roleypoly/src/common"
)
var (
testEnv = map[string]string{
"string": "hello world",
"slice": "hello,world",
"slice_no_delim": "hello world",
"slice_set_delim": "hello|world",
"url": "https://google.com",
"url_trailing": "https://google.com/",
"number": "10005",
"number_bad": "abc123",
"bool": "true",
"bool_bad": "truth",
"bool_no": "false",
"bool_number": "1",
"json": `{"hello":"world","arr":[1,2,3]}`,
}
)
func TestMain(m *testing.M) {
for key, value := range testEnv {
os.Setenv("test__"+key, value)
}
m.Run()
}
func TestEnvconfigString(t *testing.T) {
testStr := common.Getenv("test__string").String()
if testStr != testEnv["string"] {
t.FailNow()
}
}
func TestEnvconfigStringSlice(t *testing.T) {
testSl := common.Getenv("test__slice").StringSlice()
if testSl[0] != "hello" || testSl[1] != "world" {
t.FailNow()
}
}
func TestEnvconfigStringSliceNoDelimeter(t *testing.T) {
testSl := common.Getenv("test__slice_no_delim").StringSlice()
if testSl[0] != testEnv["slice_no_delim"] {
t.FailNow()
}
}
func TestEnvconfigStringSliceSetDelimeter(t *testing.T) {
testSl := common.Getenv("test__slice_set_delim").StringSlice("|")
if testSl[0] != "hello" || testSl[1] != "world" {
t.FailNow()
}
}
func TestEnvconfigSafeURL(t *testing.T) {
testUrl := common.Getenv("test__url").SafeURL()
if strings.HasSuffix(testUrl, "/") {
t.FailNow()
}
}
func TestEnvconfigSafeURLWithTrailing(t *testing.T) {
testUrl := common.Getenv("test__url_trailing").SafeURL()
if strings.HasSuffix(testUrl, "/") {
t.FailNow()
}
}
func TestEnvconfigNumber(t *testing.T) {
testNum := common.Getenv("test__number").Number()
if testNum != 10005 {
t.FailNow()
}
}
func TestEnvconfigNumberBad(t *testing.T) {
testNum := common.Getenv("test__number_bad").Number()
if testNum != -999999 {
t.FailNow()
}
}
func TestEnvconfigBool(t *testing.T) {
testBool := common.Getenv("test__bool").Bool()
if !testBool {
t.FailNow()
}
}
func TestEnvconfigBoolBad(t *testing.T) {
testBool := common.Getenv("test__bool_bad").Bool()
if testBool {
t.FailNow()
}
}
func TestEnvconfigBoolFalse(t *testing.T) {
testBool := common.Getenv("test__bool_no").Bool()
if testBool {
t.FailNow()
}
}
func TestEnvconfigBoolNumber(t *testing.T) {
testBool := common.Getenv("test__bool_number").Bool()
if !testBool {
t.FailNow()
}
}
func TestEnvconfigDefault(t *testing.T) {
testBool := common.Getenv("test__thing_that_doesnt_exist", "yes").Bool()
if !testBool {
t.FailNow()
}
}
type testJSONData struct {
Hello string `json:"hello,omitempty"`
Arr []int `json:"arr,omitempty"`
}
func TestEnvconfigJSON(t *testing.T) {
data := testJSONData{}
err := common.Getenv("test__json").JSON(&data)
if err != nil || data.Hello != "world" || len(data.Arr) != 3 {
t.FailNow()
}
}
func TestEnvconfigFatal(t *testing.T) {
O := gomega.NewWithT(t)
O.Expect(func() {
_ = common.Getenv("test__thing_that_doesnt_exist").OrFatal().String()
}).Should(gomega.Panic(), "Getenv without a value should panic")
}
func TestEnvconfigNotFatal(t *testing.T) {
O := gomega.NewWithT(t)
O.Expect(func() {
_ = common.Getenv("test__string").OrFatal().String()
}).ShouldNot(gomega.Panic(), "Getenv with a value should not panic")
}

View file

@ -1,12 +0,0 @@
package common
// FindString returns true if needle is in haystack
func FindString(needle string, haystack []string) bool {
for _, str := range haystack {
if str == needle {
return true
}
}
return false
}

View file

@ -1,17 +0,0 @@
package common_test
import (
"testing"
"github.com/roleypoly/roleypoly/src/common"
)
func TestFindString(t *testing.T) {
if !common.FindString("hello", []string{"hello", "world"}) {
t.FailNow()
}
if common.FindString("foo", []string{"a", "b", "c"}) {
t.FailNow()
}
}

View file

@ -1,4 +0,0 @@
.env
vendor
discord
discord.exe

View file

@ -1,44 +0,0 @@
package main
import (
"github.com/bwmarrin/discordgo"
_ "github.com/joho/godotenv/autoload"
"github.com/roleypoly/roleypoly/src/common"
"github.com/roleypoly/roleypoly/src/common/bot"
"k8s.io/klog"
)
var (
botToken = common.Getenv("BOT_TOKEN").String()
botClientID = common.Getenv("BOT_CLIENT_ID").String()
rootUsers = common.Getenv("ROOT_USERS").StringSlice()
allowedBots = common.Getenv("ALLOWED_BOTS").StringSlice()
appURL = common.Getenv("UI_PUBLIC_URI").SafeURL()
selfMention = bot.MentionMatcher(botClientID)
)
func main() {
klog.Info("bot started")
err := bot.ScaffoldBot(bot.BotScaffolding{
RootUsers: rootUsers,
AllowBots: true,
BotClientID: botClientID,
BotToken: botToken,
GatewayIntents: discordgo.IntentsGuildMessages,
Handler: handle,
})
if err != nil {
klog.Fatal(err)
}
}
func isBotAllowlisted(userID string) bool {
for _, id := range allowedBots {
if id == userID {
return true
}
}
return false
}

View file

@ -1,13 +0,0 @@
package strings
import (
"bytes"
"text/template"
)
// Render a template to string
func Render(tmpl *template.Template, data interface{}) string {
buffer := &bytes.Buffer{}
tmpl.Execute(buffer, data)
return buffer.String()
}

View file

@ -1,44 +0,0 @@
package strings
import (
"text/template"
)
var (
// MentionResponse is a template that requires strings AppURL and GuildID.
MentionResponse = template.Must(
template.New("MentionResponse").Parse(
`:beginner: Assign your roles here! {{ .AppURL }}/s/{{ .GuildID }}`,
),
)
RootStats = template.Must(
template.New("RootStats").Parse(`🐈
**People Stats**
<:blank:676216695375003650>🙎 **Total Users:** {{ .Users }}
<:blank:676216695375003650>👨👩👦👦 **Total Guilds:** {{ .Guilds }}
<:blank:676216695375003650>🦺 **Total Roles:** {{ .Roles }}
**Bot Stats**
<:blank:676216695375003650>🔩 **Total Shards:** {{ .Shards }}
<:blank:676216695375003650> **Revision:** {{ .GitCommit }} ({{ .GitBranch }})
<:blank:676216695375003650> **Built at** {{ .BuildDate }}
`,
),
)
)
type MentionResponseData struct {
AppURL string
GuildID string
}
type RootStatsData struct {
Users int
Guilds int
Roles int
Shards int
GitCommit string
GitBranch string
BuildDate string
}

View file

@ -1,37 +0,0 @@
package main
import (
"context"
"github.com/lampjaw/discordclient"
"k8s.io/klog"
"github.com/roleypoly/roleypoly/src/common/bot"
"github.com/roleypoly/roleypoly/src/discord-bot/internal/strings"
)
func handle(ctx context.Context, message discordclient.Message) {
// Only if it's an allowed bot
if message.IsBot() && !isBotAllowlisted(message.UserID()) {
return
}
// Only if it has the right mention
if !selfMention.MatchString(message.RawMessage()) {
return
}
bot.ReplyToMessage(ctx, defaultResponse(message))
}
func defaultResponse(message discordclient.Message) string {
guild, err := message.ResolveGuildID()
if err != nil {
klog.Warning("failed to fetch guild, ", err)
}
return strings.Render(
strings.MentionResponse,
strings.MentionResponseData{GuildID: guild, AppURL: appURL},
)
}

View file

@ -1280,6 +1280,20 @@
resolved "https://registry.yarnpkg.com/@csstools/normalize.css/-/normalize.css-10.1.0.tgz#f0950bba18819512d42f7197e56c518aa491cf18"
integrity sha512-ij4wRiunFfaJxjB0BdrYHIH8FxBJpOwNPhhAcunlmPdXudL1WQV1qoP9un6JsEBAgQH+7UXyyjh0g7jTxXK6tg==
"@discordjs/collection@^0.1.6":
version "0.1.6"
resolved "https://registry.yarnpkg.com/@discordjs/collection/-/collection-0.1.6.tgz#9e9a7637f4e4e0688fd8b2b5c63133c91607682c"
integrity sha512-utRNxnd9kSS2qhyivo9lMlt5qgAUasH2gb7BEOn6p0efFh24gjGomHzWKMAPn2hEReOPQZCJaRKoURwRotKucQ==
"@discordjs/form-data@^3.0.1":
version "3.0.1"
resolved "https://registry.yarnpkg.com/@discordjs/form-data/-/form-data-3.0.1.tgz#5c9e6be992e2e57d0dfa0e39979a850225fb4697"
integrity sha512-ZfFsbgEXW71Rw/6EtBdrP5VxBJy4dthyC0tpQKGKmYFImlmmrykO14Za+BiIVduwjte0jXEBlhSKf0MWbFp9Eg==
dependencies:
asynckit "^0.4.0"
combined-stream "^1.0.8"
mime-types "^2.1.12"
"@emotion/cache@^10.0.27":
version "10.0.29"
resolved "https://registry.yarnpkg.com/@emotion/cache/-/cache-10.0.29.tgz#87e7e64f412c060102d589fe7c6dc042e6f9d1e0"
@ -3342,6 +3356,13 @@ abab@^2.0.0, abab@^2.0.3:
resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.5.tgz#c0b678fb32d60fc1219c784d6a826fe385aeb79a"
integrity sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==
abort-controller@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392"
integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==
dependencies:
event-target-shim "^5.0.0"
abstract-leveldown@^6.2.1:
version "6.3.0"
resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-6.3.0.tgz#d25221d1e6612f820c35963ba4bd739928f6026a"
@ -6172,6 +6193,20 @@ discontinuous-range@1.0.0:
resolved "https://registry.yarnpkg.com/discontinuous-range/-/discontinuous-range-1.0.0.tgz#e38331f0844bba49b9a9cb71c771585aab1bc65a"
integrity sha1-44Mx8IRLukm5qctxx3FYWqsbxlo=
discord.js@^12.5.1:
version "12.5.1"
resolved "https://registry.yarnpkg.com/discord.js/-/discord.js-12.5.1.tgz#992b45753e3815526a279914ccc281d3496f5990"
integrity sha512-VwZkVaUAIOB9mKdca0I5MefPMTQJTNg0qdgi1huF3iwsFwJ0L5s/Y69AQe+iPmjuV6j9rtKoG0Ta0n9vgEIL6w==
dependencies:
"@discordjs/collection" "^0.1.6"
"@discordjs/form-data" "^3.0.1"
abort-controller "^3.0.0"
node-fetch "^2.6.1"
prism-media "^1.2.2"
setimmediate "^1.0.5"
tweetnacl "^1.0.3"
ws "^7.3.1"
dns-equal@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/dns-equal/-/dns-equal-1.0.0.tgz#b39e7f1da6eb0a75ba9c17324b34753c47e0654d"
@ -7013,6 +7048,11 @@ etag@~1.8.1:
resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887"
integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=
event-target-shim@^5.0.0:
version "5.0.1"
resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789"
integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==
eventemitter3@^4.0.0:
version "4.0.7"
resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f"
@ -12638,6 +12678,11 @@ pretty-hrtime@^1.0.3:
resolved "https://registry.yarnpkg.com/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1"
integrity sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=
prism-media@^1.2.2:
version "1.2.9"
resolved "https://registry.yarnpkg.com/prism-media/-/prism-media-1.2.9.tgz#8d4f97b36efdfc82483eb8d3db64020767866f36"
integrity sha512-UHCYuqHipbTR1ZsXr5eg4JUmHER8Ss4YEb9Azn+9zzJ7/jlTtD1h0lc4g6tNx3eMlB8Mp6bfll0LPMAV4R6r3Q==
prismjs@^1.21.0, prismjs@~1.22.0:
version "1.22.0"
resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.22.0.tgz#73c3400afc58a823dd7eed023f8e1ce9fd8977fa"
@ -14170,7 +14215,7 @@ set-value@^2.0.0, set-value@^2.0.1:
is-plain-object "^2.0.3"
split-string "^3.0.1"
setimmediate@^1.0.4:
setimmediate@^1.0.4, setimmediate@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285"
integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=
@ -15467,6 +15512,11 @@ tweetnacl@^0.14.3, tweetnacl@~0.14.0:
resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64"
integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=
tweetnacl@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596"
integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==
type-check@^0.4.0, type-check@~0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1"
@ -16544,6 +16594,11 @@ ws@^7.2.3:
resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.0.tgz#a5dd76a24197940d4a8bb9e0e152bb4503764da7"
integrity sha512-kyFwXuV/5ymf+IXhS6f0+eAFvydbaBW3zjpT6hUdAh/hbVjTIB5EHBGi0bPoCLSK2wcuz3BrEkB9LrYv1Nm4NQ==
ws@^7.3.1:
version "7.4.4"
resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.4.tgz#383bc9742cb202292c9077ceab6f6047b17f2d59"
integrity sha512-Qm8k8ojNQIMx7S+Zp8u/uHOx7Qazv3Yv4q68MiWWWOJhiwG5W3x7iqmRtJo8xxrciZUY4vRxUTJCKuRnF28ZZw==
xml-name-validator@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a"