Compare commits

...

13 Commits

Author SHA1 Message Date
seriousm4x 606d26ee88 go-dep: update 2023-12-19 03:59:44 +01:00
seriousm4x 2824a937a8 npm-dep: update 2023-12-19 03:59:31 +01:00
seriousm4x 16ec0b42ea fix: memory leak for cronjobs #356 2023-12-18 21:02:23 +01:00
dependabot[bot] 77daa4f34d go-dep: bump github.com/pocketbase/pocketbase in /backend
Bumps [github.com/pocketbase/pocketbase](https://github.com/pocketbase/pocketbase) from 0.20.0 to 0.20.1.
- [Release notes](https://github.com/pocketbase/pocketbase/releases)
- [Changelog](https://github.com/pocketbase/pocketbase/blob/master/CHANGELOG.md)
- [Commits](https://github.com/pocketbase/pocketbase/compare/v0.20.0...v0.20.1)

---
updated-dependencies:
- dependency-name: github.com/pocketbase/pocketbase
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-18 10:02:48 +00:00
dependabot[bot] ea46f625b6 npm-dep: bump eslint from 8.55.0 to 8.56.0 in /frontend
Bumps [eslint](https://github.com/eslint/eslint) from 8.55.0 to 8.56.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.55.0...v8.56.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-18 09:32:47 +00:00
seriousm4x a9fa2b6a46 always defer close on port check #356 2023-12-17 09:45:34 +01:00
dependabot[bot] 8d532a2e1a npm-dep: bump daisyui from 4.4.19 to 4.4.20 in /frontend
Bumps [daisyui](https://github.com/saadeghi/daisyui) from 4.4.19 to 4.4.20.
- [Release notes](https://github.com/saadeghi/daisyui/releases)
- [Changelog](https://github.com/saadeghi/daisyui/blob/master/CHANGELOG.md)
- [Commits](https://github.com/saadeghi/daisyui/compare/v4.4.19...v4.4.20)

---
updated-dependencies:
- dependency-name: daisyui
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-15 09:18:46 +00:00
seriousm4x b8ac841129 remove title tag 2023-12-14 18:42:40 +01:00
seriousm4x ba17d119cc rename label 2023-12-14 18:21:19 +01:00
seriousm4x 79af6fd046 add config.yml 2023-12-14 18:18:35 +01:00
seriousm4x d7a04562e0 rename again 2023-12-14 18:13:39 +01:00
seriousm4x 4ffae6ebee .yml -> .yaml 2023-12-14 18:11:03 +01:00
seriousm4x 4ccb066469 use github forms for issues/features 2023-12-14 18:09:11 +01:00
12 changed files with 329 additions and 266 deletions
@@ -0,0 +1,10 @@
title: "<feature-name-goes-here>"
labels: ["feature-request"]
body:
- type: textarea
id: feature
attributes:
label: The feature
validations:
required: true
+70
View File
@@ -0,0 +1,70 @@
name: 🕷️ Bug report
description: Create a bug report to help the project improve
labels: ["bug"]
title: "[BUG] <title>"
body:
- type: markdown
attributes:
value: |
This issue form is for reporting bugs only!
If you have a feature or enhancement request, please use the [feature request][fr] section of our [GitHub Discussions][fr].
[fr]: https://github.com/seriousm4x/UpSnap/discussions/new?category=feature-requests
- type: textarea
validations:
required: true
attributes:
label: The bug
description: >-
Describe the issue you are experiencing here. Tell us what you were trying to do and what happened.
Provide a clear and concise description of what the problem is.
- type: markdown
attributes:
value: |
## Environment
- type: input
validations:
required: true
attributes:
label: The OS that UpSnap is running on
placeholder: Ubuntu 22.10, Debian, Arch...
- type: input
id: version
validations:
required: true
attributes:
label: Version of UpSnap
placeholder: 4.2.0
- type: textarea
validations:
required: true
attributes:
label: Your docker-compose.yml content
render: YAML
- type: textarea
id: repro
attributes:
label: Reproduction steps
description: "How do you trigger this bug? Please walk us through it step by step."
value: |
1.
2.
3.
...
render: bash
validations:
required: true
- type: textarea
attributes:
label: Additional information
description: >
If you have any additional information for us, use the field below.
+8
View File
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: I have a question or need support
url: https://github.com/seriousm4x/UpSnap/discussions/categories/help-wanted
about: Please use our GitHub Discussion if you need help.
- name: Feature Request
url: https://github.com/seriousm4x/UpSnap/discussions/categories/feature-requests
about: Please use our GitHub Discussion for making feature requests.
@@ -1,17 +0,0 @@
---
name: "⭐ Feature request"
about: Suggest an idea for this project
title: "[REQUEST]"
labels: ''
assignees: ''
---
**The problem you currently have with this project**
A clear and concise description of what the problem is.
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Additional context**
Add any other context or screenshots about the feature request here.
@@ -1,49 +0,0 @@
---
name: "\U0001F577️ Bug report"
about: Create a report to help the project improve
title: "[BUG]"
labels: ""
assignees: ""
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**UpSnap version**
```bash
$ upsnap --version
upsnap version 4.1.1
```
**Logs**
```
formatted logs here
```
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Host OS (and version)**
eg. Windows 10, Ubuntu 22.10, macOS 13
**Host Architecture**
e.g. amd64/arm64/arm7
**Brower (if relevant)**
e.g. Firefox 109.0.1
**Additional context**
Add any other context about the problem here.
+84 -57
View File
@@ -8,21 +8,24 @@ import (
"github.com/seriousm4x/upsnap/networking"
)
var PingRunning bool = false
var WakeShutdownRunning bool = false
var CronPing *cron.Cron
var CronWakeShutdown *cron.Cron
var (
PingRunning = false
WakeShutdownRunning = false
CronPing = cron.New()
CronWakeShutdown = cron.New()
)
func RunPing(app *pocketbase.PocketBase) {
PingRunning = true
func SetPingJobs(app *pocketbase.PocketBase) {
// remove existing jobs
for _, job := range CronPing.Entries() {
CronPing.Remove(job.ID)
}
settingsPrivateRecords, err := app.Dao().FindRecordsByExpr("settings_private")
if err != nil {
logger.Error.Println(err)
}
// init cronjob
CronPing = cron.New()
CronPing.AddFunc(settingsPrivateRecords[0].GetString("interval"), func() {
// skip cron if no realtime clients connected and lazy_ping is turned on
realtimeClients := len(app.SubscriptionsBroker().Clients())
@@ -89,13 +92,14 @@ func RunPing(app *pocketbase.PocketBase) {
}(device)
}
})
CronPing.Run()
}
func RunWakeShutdown(app *pocketbase.PocketBase) {
WakeShutdownRunning = true
func SetWakeShutdownJobs(app *pocketbase.PocketBase) {
// remove existing jobs
for _, job := range CronWakeShutdown.Entries() {
CronWakeShutdown.Remove(job.ID)
}
CronWakeShutdown = cron.New()
devices, err := app.Dao().FindRecordsByExpr("devices")
if err != nil {
logger.Error.Println(err)
@@ -109,70 +113,93 @@ func RunWakeShutdown(app *pocketbase.PocketBase) {
shutdown_cron_enabled := dev.GetBool("shutdown_cron_enabled")
if wake_cron_enabled && wake_cron != "" {
go func(d *models.Record) {
_, err := CronWakeShutdown.AddFunc(wake_cron, func() {
d.Set("status", "pending")
if err := app.Dao().SaveRecord(d); err != nil {
_, err := CronWakeShutdown.AddFunc(wake_cron, func() {
status := dev.GetString("status")
if status == "pending" || status == "online" {
return
}
dev.Set("status", "pending")
if err := app.Dao().SaveRecord(dev); err != nil {
logger.Error.Println("Failed to save record:", err)
}
if err := networking.WakeDevice(dev); err != nil {
logger.Error.Println(err)
dev.Set("status", "offline")
if err := app.Dao().SaveRecord(dev); err != nil {
logger.Error.Println("Failed to save record:", err)
}
if err := networking.WakeDevice(d); err != nil {
logger.Error.Println(err)
d.Set("status", "offline")
if err := app.Dao().SaveRecord(d); err != nil {
logger.Error.Println("Failed to save record:", err)
}
} else {
d.Set("status", "online")
if err := app.Dao().SaveRecord(d); err != nil {
logger.Error.Println("Failed to save record:", err)
}
} else {
dev.Set("status", "online")
if err := app.Dao().SaveRecord(dev); err != nil {
logger.Error.Println("Failed to save record:", err)
}
})
if err != nil {
logger.Error.Println(err)
}
}(dev)
})
if err != nil {
logger.Error.Println(err)
}
}
if shutdown_cron_enabled && shutdown_cron != "" {
go func(d *models.Record) {
_, err := CronWakeShutdown.AddFunc(shutdown_cron, func() {
d.Set("status", "pending")
if err := app.Dao().SaveRecord(d); err != nil {
_, err := CronWakeShutdown.AddFunc(shutdown_cron, func() {
status := dev.GetString("status")
if status == "pending" || status == "offline" {
return
}
dev.Set("status", "pending")
if err := app.Dao().SaveRecord(dev); err != nil {
logger.Error.Println("Failed to save record:", err)
}
if err := networking.ShutdownDevice(dev); err != nil {
logger.Error.Println(err)
dev.Set("status", "online")
if err := app.Dao().SaveRecord(dev); err != nil {
logger.Error.Println("Failed to save record:", err)
}
if err := networking.ShutdownDevice(d); err != nil {
logger.Error.Println(err)
d.Set("status", "online")
if err := app.Dao().SaveRecord(d); err != nil {
logger.Error.Println("Failed to save record:", err)
}
} else {
d.Set("status", "offline")
if err := app.Dao().SaveRecord(d); err != nil {
logger.Error.Println("Failed to save record:", err)
}
} else {
dev.Set("status", "offline")
if err := app.Dao().SaveRecord(dev); err != nil {
logger.Error.Println("Failed to save record:", err)
}
})
if err != nil {
logger.Error.Println(err)
}
}(dev)
})
if err != nil {
logger.Error.Println(err)
}
}
}
CronWakeShutdown.Run()
}
func StopAll() {
if PingRunning {
logger.Info.Println("Stopping ping cronjob")
ctx := CronPing.Stop()
<-ctx.Done()
func StartWakeShutdown() {
WakeShutdownRunning = true
go CronWakeShutdown.Run()
}
}
func StopWakeShutdown() {
if WakeShutdownRunning {
logger.Info.Println("Stopping wake/shutdown cronjob")
ctx := CronWakeShutdown.Stop()
<-ctx.Done()
}
WakeShutdownRunning = false
}
func StartPing() {
PingRunning = true
go CronPing.Run()
}
func StopPing() {
if PingRunning {
logger.Info.Println("Stopping wake/shutdown cronjob")
ctx := CronPing.Stop()
<-ctx.Done()
}
PingRunning = false
}
func StopAll() {
StopPing()
StopWakeShutdown()
}
+8 -8
View File
@@ -8,7 +8,7 @@ require (
github.com/labstack/echo/v5 v5.0.0-20230722203903-ec5b858dab61
github.com/mdlayher/wol v0.0.0-20220221231636-b763a792253a
github.com/pocketbase/dbx v1.10.1
github.com/pocketbase/pocketbase v0.20.0
github.com/pocketbase/pocketbase v0.20.1
github.com/prometheus-community/pro-bing v0.3.0
github.com/robfig/cron/v3 v3.0.1
golang.org/x/sys v0.15.0
@@ -17,13 +17,13 @@ require (
require (
github.com/AlecAivazis/survey/v2 v2.3.7 // indirect
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
github.com/aws/aws-sdk-go v1.49.2 // indirect
github.com/aws/aws-sdk-go v1.49.5 // indirect
github.com/aws/aws-sdk-go-v2 v1.24.0 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.4 // indirect
github.com/aws/aws-sdk-go-v2/config v1.26.1 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.16.12 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.10 // indirect
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.7 // indirect
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.8 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.9 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.9 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.7.2 // indirect
@@ -32,7 +32,7 @@ require (
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.9 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.9 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.9 // indirect
github.com/aws/aws-sdk-go-v2/service/s3 v1.47.5 // indirect
github.com/aws/aws-sdk-go-v2/service/s3 v1.47.6 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.18.5 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.5 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.26.5 // indirect
@@ -57,7 +57,7 @@ require (
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-sqlite3 v1.14.18 // indirect
github.com/mattn/go-sqlite3 v1.14.19 // indirect
github.com/mdlayher/ethernet v0.0.0-20220221185849-529eae5b6118 // indirect
github.com/mdlayher/packet v1.1.2 // indirect
github.com/mdlayher/socket v0.5.0 // indirect
@@ -70,7 +70,7 @@ require (
github.com/valyala/fasttemplate v1.2.2 // indirect
go.opencensus.io v0.24.0 // indirect
gocloud.dev v0.35.0 // indirect
golang.org/x/crypto v0.16.0 // indirect
golang.org/x/crypto v0.17.0 // indirect
golang.org/x/image v0.14.0 // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/net v0.19.0 // indirect
@@ -84,12 +84,12 @@ require (
google.golang.org/api v0.154.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0 // indirect
google.golang.org/grpc v1.60.0 // indirect
google.golang.org/grpc v1.60.1 // indirect
google.golang.org/protobuf v1.31.0 // indirect
lukechampine.com/uint128 v1.3.0 // indirect
modernc.org/cc/v3 v3.41.0 // indirect
modernc.org/ccgo/v3 v3.16.15 // indirect
modernc.org/libc v1.37.4 // indirect
modernc.org/libc v1.37.6 // indirect
modernc.org/mathutil v1.6.0 // indirect
modernc.org/memory v1.7.2 // indirect
modernc.org/opt v0.1.3 // indirect
+33 -20
View File
@@ -17,10 +17,10 @@ github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2/go.mod h1:HBCaDe
github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg=
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so=
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw=
github.com/aws/aws-sdk-go v1.48.16 h1:mcj2/9J/MJ55Dov+ocMevhR8Jv6jW/fAxbrn4a1JFc8=
github.com/aws/aws-sdk-go v1.48.16/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk=
github.com/aws/aws-sdk-go v1.49.2 h1:+4BEcm1nPCoDbVd+gg8cdxpa1qJfrvnddy12vpEVWjw=
github.com/aws/aws-sdk-go v1.49.2/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk=
github.com/aws/aws-sdk-go v1.49.5 h1:y2yfBlwjPDi3/sBVKeznYEdDy6wIhjA2L5NCBMLUIYA=
github.com/aws/aws-sdk-go v1.49.5/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk=
github.com/aws/aws-sdk-go-v2 v1.24.0 h1:890+mqQ+hTpNuw0gGP6/4akolQkSToDJgHfQE7AwGuk=
github.com/aws/aws-sdk-go-v2 v1.24.0/go.mod h1:LNh45Br1YAkEKaAqvmE1m8FUx6a5b/V0oAKV7of29b4=
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.4 h1:OCs21ST2LrepDfD3lwlQiOqIGp6JiEUqG84GzTDoyJs=
@@ -33,6 +33,8 @@ github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.10 h1:w98BT5w+ao1/r5sUuiH6Jk
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.10/go.mod h1:K2WGI7vUvkIv1HoNbfBA1bvIZ+9kL3YVmWxeKuLQsiw=
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.7 h1:FnLf60PtjXp8ZOzQfhJVsqF0OtYKQZWQfqOLshh8YXg=
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.7/go.mod h1:tDVvl8hyU6E9B8TrnNrZQEVkQlB8hjJwcgpPhgtlnNg=
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.8 h1:7wCngExMTAW2Bjf0Y92uWap6ZUcenLLWI5T3VJiQneU=
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.8/go.mod h1:XVrAWYYM4ZRwOCOuLoUiao5hbLqNutEdqwCR3ZvkXgc=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.9 h1:v+HbZaCGmOwnTTVS86Fleq0vPzOd7tnJGbFhP0stNLs=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.9/go.mod h1:Xjqy+Nyj7VDLBtCMkQYOw1QYfAEZCVLrfI0ezve8wd4=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.9 h1:N94sVhRACtXyVcjXxrwK1SKFIJrA9pOJ5yu2eSHnmls=
@@ -51,6 +53,8 @@ github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.9 h1:iEAeF6YC3l4Fzl
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.9/go.mod h1:kjsXoK23q9Z/tLBrckZLLyvjhZoS+AGrzqzUfEClvMM=
github.com/aws/aws-sdk-go-v2/service/s3 v1.47.5 h1:Keso8lIOS+IzI2MkPZyK6G0LYcK3My2LQ+T5bxghEAY=
github.com/aws/aws-sdk-go-v2/service/s3 v1.47.5/go.mod h1:vADO6Jn+Rq4nDtfwNjhgR84qkZwiC6FqCaXdw/kYwjA=
github.com/aws/aws-sdk-go-v2/service/s3 v1.47.6 h1:bkmlzokzTJyrFNA0J+EPlsF8x4/wp+9D45HTHO/ZUiY=
github.com/aws/aws-sdk-go-v2/service/s3 v1.47.6/go.mod h1:vADO6Jn+Rq4nDtfwNjhgR84qkZwiC6FqCaXdw/kYwjA=
github.com/aws/aws-sdk-go-v2/service/sso v1.18.5 h1:ldSFWz9tEHAwHNmjx2Cvy1MjP5/L9kNoR0skc6wyOOM=
github.com/aws/aws-sdk-go-v2/service/sso v1.18.5/go.mod h1:CaFfXLYL376jgbP7VKC96uFcU8Rlavak0UlAwk1Dlhc=
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.5 h1:2k9KmFawS63euAkY4/ixVNsYYwrwnd5fIvgEKkfZFNM=
@@ -80,12 +84,18 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE=
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uqxgUFjbI0=
github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcPfT7nKyLpA0lbSSk=
github.com/ganigeorgiev/fexpr v0.4.0 h1:ojitI+VMNZX/odeNL1x3RzTTE8qAIVvnSSYPNAnQFDI=
github.com/ganigeorgiev/fexpr v0.4.0/go.mod h1:RyGiGqmeXhEQ6+mlGdnUleLHgtzzu/VGO2WtJkF5drE=
github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY=
github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/go-ozzo/ozzo-validation/v4 v4.3.0 h1:byhDUpfEwjsVQb1vBunvIjh2BHQ9ead57VkAEY4V+Es=
github.com/go-ozzo/ozzo-validation/v4 v4.3.0/go.mod h1:2NKgrcHl3z6cJs+3Oo940FPRiTzuqKbvfrL2RxCj6Ew=
github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
@@ -137,8 +147,6 @@ github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o=
github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw=
github.com/google/subcommands v1.0.1/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk=
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4=
github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.5.0 h1:1p67kYwdtXjb0gL0BPiP1Av9wiZPo5A8z2cWkTZ+eyU=
github.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/wire v0.5.0 h1:I7ELFeVBr3yfPIcc8+MWvrjk+3VjbcSzoXm3JVa+jD8=
@@ -175,6 +183,8 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mattn/go-sqlite3 v1.14.18 h1:JL0eqdCOq6DJVNPSvArO/bIV9/P7fbGrV00LZHc+5aI=
github.com/mattn/go-sqlite3 v1.14.18/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg=
github.com/mattn/go-sqlite3 v1.14.19 h1:fhGleo2h1p8tVChob4I9HpmVFIAkKGpiukdrgQbWfGI=
github.com/mattn/go-sqlite3 v1.14.19/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg=
github.com/mdlayher/ethernet v0.0.0-20190313224307-5b5fc417d966/go.mod h1:5s5p/sMJ6sNsFl6uCh85lkFGV8kLuIYJCRJLavVJwvg=
github.com/mdlayher/ethernet v0.0.0-20220221185849-529eae5b6118 h1:2oDp6OOhLxQ9JBoUuysVz9UZ9uI6oLUbvAZu0x8o+vE=
github.com/mdlayher/ethernet v0.0.0-20220221185849-529eae5b6118/go.mod h1:ZFUnHIVchZ9lJoWoEGUg8Q3M4U8aNNWA3CVSUTkW4og=
@@ -194,8 +204,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/pocketbase/dbx v1.10.1 h1:cw+vsyfCJD8YObOVeqb93YErnlxwYMkNZ4rwN0G0AaA=
github.com/pocketbase/dbx v1.10.1/go.mod h1:xXRCIAKTHMgUCyCKZm55pUOdvFziJjQfXaWKhu2vhMs=
github.com/pocketbase/pocketbase v0.20.0 h1:gDatnEZWz4A+PjPuhllLOvirqKLxDkrI3onx27JccV4=
github.com/pocketbase/pocketbase v0.20.0/go.mod h1:uy7WOxXoICrwe8HlyR78vTvK0RdG5REkhDx4SvYi4FY=
github.com/pocketbase/pocketbase v0.20.1 h1:QrNCDDjTxWyhk5m3PnNAio7n4XX2h4yR6rnmUidEsyY=
github.com/pocketbase/pocketbase v0.20.1/go.mod h1:uy7WOxXoICrwe8HlyR78vTvK0RdG5REkhDx4SvYi4FY=
github.com/prometheus-community/pro-bing v0.3.0 h1:SFT6gHqXwbItEDJhTkzPWVqU6CLEtqEfNAPp47RUON4=
github.com/prometheus-community/pro-bing v0.3.0/go.mod h1:p9dLb9zdmv+eLxWfCT6jESWuDrS+YzpPkQBgysQF8a0=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
@@ -229,6 +239,16 @@ github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0=
go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo=
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 h1:SpGay3w+nEwMpfVnbqOLH5gY52/foP8RE8UzTZ1pdSE=
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1/go.mod h1:4UoMYEZOC0yN/sPGH76KPkkU7zgiEWYWL9vwmbnTJPE=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1 h1:aFJWCqJMNjENlcleuuOkGAPH82y0yULBScfXcIEdS24=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1/go.mod h1:sEGXWArGqc3tVa+ekntsN65DmVbVeW+7lTKTjZF3/Fo=
go.opentelemetry.io/otel v1.21.0 h1:hzLeKBZEL7Okw2mGzZ0cc4k/A7Fta0uoPgaJCr8fsFc=
go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo=
go.opentelemetry.io/otel/metric v1.21.0 h1:tlYWfeo+Bocx5kLEloTjbcDwBuELRrIFxwdQ36PlJu4=
go.opentelemetry.io/otel/metric v1.21.0/go.mod h1:o1p3CA8nNHW8j5yuQLdc1eeqEaPfzug24uvsyIEJRWM=
go.opentelemetry.io/otel/trace v1.21.0 h1:WD9i5gzvoUPuXIXH24ZNBudiarZDKuekPqi/E8fpfLc=
go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ=
gocloud.dev v0.35.0 h1:x/Gtt5OJdT4j+ir1AXAIXb7bBnFawXAAaJptCUGk3HU=
gocloud.dev v0.35.0/go.mod h1:wbyF+BhfdtLWyUtVEWRW13hFLb1vXnV2ovEhYGQe3ck=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
@@ -236,6 +256,8 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY=
golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k=
golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/image v0.14.0 h1:tNgSxAFe3jC4uYqvZdTr84SZoM1KfwdC9SKIFrLjFn4=
@@ -308,16 +330,12 @@ golang.org/x/tools v0.0.0-20190422233926-fe54fb35175b/go.mod h1:LCzVGOaR6xXOjkQ3
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.16.0 h1:GO788SKMRunPIBCXiQyo2AaexLstOrVhuAL5YwsckQM=
golang.org/x/tools v0.16.0/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0=
golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA=
golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU=
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90=
google.golang.org/api v0.153.0 h1:N1AwGhielyKFaUqH07/ZSIQR3uNPcV7NVw0vj+j4iR4=
google.golang.org/api v0.153.0/go.mod h1:3qNJX5eOmhiWYc67jRA/3GsDw97UFb5ivv7Y2PrriAY=
google.golang.org/api v0.154.0 h1:X7QkVKZBskztmpPKWQXgjJRPA2dJYrL6r+sYPRLj050=
google.golang.org/api v0.154.0/go.mod h1:qhSMkM85hgqiokIYsrRyKxrjfBeIhgl4Z2JmeRkYylc=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
@@ -328,13 +346,10 @@ google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJ
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/genproto v0.0.0-20231120223509-83a465c0220f h1:Vn+VyHU5guc9KjB5KrjI2q0wCOWEOIh0OEsleqakHJg=
google.golang.org/genproto v0.0.0-20231120223509-83a465c0220f/go.mod h1:nWSwAFPb+qfNJXsoeO3Io7zf4tMSfN8EA8RlDA04GhY=
google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3 h1:1hfbdAfFbkmpg41000wDVqr7jUpK/Yo+LPnIxxGzmkg=
google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3/go.mod h1:5RBcpGRxr25RbDzY5w+dmaqpSEvl8Gwl1x2CICf60ic=
google.golang.org/genproto/googleapis/api v0.0.0-20231120223509-83a465c0220f h1:2yNACc1O40tTnrsbk9Cv6oxiW8pxI/pXj0wRtdlYmgY=
google.golang.org/genproto/googleapis/api v0.0.0-20231120223509-83a465c0220f/go.mod h1:Uy9bTZJqmfrw2rIBxgGLnamc78euZULUBrLZ9XTITKI=
google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4 h1:DC7wcm+i+P1rN3Ff07vL+OndGg5OhNddHyTA+ocPqYE=
google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4/go.mod h1:eJVxU6o+4G1PSczBr85xmyvSNYAKvAYgkub40YGomFM=
google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0 h1:/jFB8jK5R3Sq3i/lmeZO0cATSzFfZaJq1J2Euan3XKU=
google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0/go.mod h1:FUoWkonphQm3RhTS+kOEhF8h0iDpm4tdXolVCeZ9KKA=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
@@ -342,10 +357,10 @@ google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk=
google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98=
google.golang.org/grpc v1.60.0 h1:6FQAR0kM31P6MRdeluor2w2gPaS4SVNrD/DNTxrQ15k=
google.golang.org/grpc v1.60.0/go.mod h1:OlCHIeLYqSSsLi6i49B5QGdzaMZK9+M7LXN2FKz4eGM=
google.golang.org/grpc v1.60.1 h1:26+wFr+cNqSGFcOXcabYC0lUVJVRa2Sb2ortSK7VrEU=
google.golang.org/grpc v1.60.1/go.mod h1:OlCHIeLYqSSsLi6i49B5QGdzaMZK9+M7LXN2FKz4eGM=
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=
@@ -378,18 +393,16 @@ modernc.org/ccorpus v1.11.6 h1:J16RXiiqiCgua6+ZvQot4yUuUy8zxgqbqEEUuGPlISk=
modernc.org/ccorpus v1.11.6/go.mod h1:2gEUTrWqdpH2pXsmTM1ZkjeSrUWDpjMu2T6m29L/ErQ=
modernc.org/httpfs v1.0.6 h1:AAgIpFZRXuYnkjftxTAZwMIiwEqAfk8aVB2/oA6nAeM=
modernc.org/httpfs v1.0.6/go.mod h1:7dosgurJGp0sPaRanU53W4xZYKh14wfzX420oZADeHM=
modernc.org/libc v1.37.0 h1:WerjebcsP6A7Jy+f2lCnHAkiSTLf7IaSftBYUtoswak=
modernc.org/libc v1.37.0/go.mod h1:YAXkAZ8ktnkCKaN9sw/UDeUVkGYJ/YquGO4FTi5nmHE=
modernc.org/libc v1.37.4 h1:LJpf4AxvDxYnHKDBKmgWE/mp4m3GEhCZBDEg7kivOaE=
modernc.org/libc v1.37.4/go.mod h1:YAXkAZ8ktnkCKaN9sw/UDeUVkGYJ/YquGO4FTi5nmHE=
modernc.org/libc v1.37.6 h1:orZH3c5wmhIQFTXF+Nt+eeauyd+ZIt2BX6ARe+kD+aw=
modernc.org/libc v1.37.6/go.mod h1:YAXkAZ8ktnkCKaN9sw/UDeUVkGYJ/YquGO4FTi5nmHE=
modernc.org/mathutil v1.6.0 h1:fRe9+AmYlaej+64JsEEhoWuAYBkOtQiMEU7n/XgfYi4=
modernc.org/mathutil v1.6.0/go.mod h1:Ui5Q9q1TR2gFm0AQRqQUaBWFLAhQpCwNcuhBOSedWPo=
modernc.org/memory v1.7.2 h1:Klh90S215mmH8c9gO98QxQFsY+W451E8AnzjoE2ee1E=
modernc.org/memory v1.7.2/go.mod h1:NO4NVCQy0N7ln+T9ngWqOQfi7ley4vpwvARR+Hjw95E=
modernc.org/opt v0.1.3 h1:3XOZf2yznlhC+ibLltsDGzABUGVx8J6pnFMS3E4dcq4=
modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0=
modernc.org/sqlite v1.27.0 h1:MpKAHoyYB7xqcwnUwkuD+npwEa0fojF0B5QRbN+auJ8=
modernc.org/sqlite v1.27.0/go.mod h1:Qxpazz0zH8Z1xCFyi5GSL3FzbtZ3fvbjmywNogldEW0=
modernc.org/sqlite v1.28.0 h1:Zx+LyDDmXczNnEQdvPuEfcFVA2ZPyaD7UCZDjef3BHQ=
modernc.org/sqlite v1.28.0/go.mod h1:Qxpazz0zH8Z1xCFyi5GSL3FzbtZ3fvbjmywNogldEW0=
modernc.org/strutil v1.2.0 h1:agBi9dp1I+eOnxXeiZawM8F4LawKv4NzGWSaLfyeNZA=
+2 -5
View File
@@ -57,9 +57,6 @@ func CheckPort(host string, port string) bool {
if err != nil {
return false
}
if conn != nil {
defer conn.Close()
return true
}
return false
defer conn.Close()
return conn != nil
}
+23 -9
View File
@@ -122,23 +122,37 @@ func StartPocketBase(distDirFS fs.FS) {
return err
}
go cronjobs.RunPing(App)
go cronjobs.RunWakeShutdown(App)
cronjobs.SetPingJobs(App)
cronjobs.StartPing()
cronjobs.SetWakeShutdownJobs(App)
cronjobs.StartWakeShutdown()
// restart ping cronjobs or wake/shutdown cronjobs on model update
// add event hook before starting server.
// using this outside App.OnBeforeServe() would not work
App.OnModelAfterUpdate("settings_private", "devices").Add(func(e *core.ModelEvent) error {
if e.Model.TableName() == "settings_private" {
for _, job := range cronjobs.CronPing.Entries() {
cronjobs.CronPing.Remove(job.ID)
}
go cronjobs.RunPing(App)
cronjobs.SetPingJobs(App)
} else if e.Model.TableName() == "devices" {
for _, job := range cronjobs.CronWakeShutdown.Entries() {
cronjobs.CronWakeShutdown.Remove(job.ID)
// only restart wake/shutdown cronjobs if new model's cron changed
newRecord := e.Model.(*models.Record)
newWakeCron := newRecord.GetString("wake_cron")
newWakeCronEnabled := newRecord.GetBool("wake_cron_enabled")
newShutdownCron := newRecord.GetString("shutdown_cron")
newShutdownCronEnabled := newRecord.GetBool("shutdown_cron_enabled")
oldRecord := newRecord.OriginalCopy()
oldWakeCron := oldRecord.GetString("wake_cron")
oldWakeCronEnabled := oldRecord.GetBool("wake_cron_enabled")
oldShutdownCron := oldRecord.GetString("shutdown_cron")
oldShutdownCronEnabled := oldRecord.GetBool("shutdown_cron_enabled")
if newWakeCron != oldWakeCron ||
newWakeCronEnabled != oldWakeCronEnabled ||
newShutdownCron != oldShutdownCron ||
newShutdownCronEnabled != oldShutdownCronEnabled {
cronjobs.SetWakeShutdownJobs(App)
}
go cronjobs.RunWakeShutdown(App)
}
return nil
})
+5 -5
View File
@@ -17,11 +17,11 @@
"devDependencies": {
"@sveltejs/adapter-static": "^2.0.3",
"@sveltejs/kit": "^1.30.3",
"@typescript-eslint/eslint-plugin": "^6.14.0",
"@typescript-eslint/parser": "^6.14.0",
"@typescript-eslint/eslint-plugin": "^6.15.0",
"@typescript-eslint/parser": "^6.15.0",
"autoprefixer": "^10.4.16",
"daisyui": "^4.4.19",
"eslint": "^8.55.0",
"daisyui": "^4.4.20",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-svelte": "^2.35.1",
"husky": "^8.0.3",
@@ -30,7 +30,7 @@
"prettier-plugin-svelte": "^3.1.2",
"svelte": "^4.2.8",
"svelte-check": "^3.6.2",
"tailwindcss": "^3.3.6",
"tailwindcss": "^3.3.7",
"tslib": "^2.6.2",
"typescript": "^5.3.3",
"vite": "^4.5.1"
+86 -96
View File
@@ -38,26 +38,26 @@ devDependencies:
specifier: ^1.30.3
version: 1.30.3(svelte@4.2.8)(vite@4.5.1)
'@typescript-eslint/eslint-plugin':
specifier: ^6.14.0
version: 6.14.0(@typescript-eslint/parser@6.14.0)(eslint@8.55.0)(typescript@5.3.3)
specifier: ^6.15.0
version: 6.15.0(@typescript-eslint/parser@6.15.0)(eslint@8.56.0)(typescript@5.3.3)
'@typescript-eslint/parser':
specifier: ^6.14.0
version: 6.14.0(eslint@8.55.0)(typescript@5.3.3)
specifier: ^6.15.0
version: 6.15.0(eslint@8.56.0)(typescript@5.3.3)
autoprefixer:
specifier: ^10.4.16
version: 10.4.16(postcss@8.4.32)
daisyui:
specifier: ^4.4.19
version: 4.4.19(postcss@8.4.32)
specifier: ^4.4.20
version: 4.4.20(postcss@8.4.32)
eslint:
specifier: ^8.55.0
version: 8.55.0
specifier: ^8.56.0
version: 8.56.0
eslint-config-prettier:
specifier: ^9.1.0
version: 9.1.0(eslint@8.55.0)
version: 9.1.0(eslint@8.56.0)
eslint-plugin-svelte:
specifier: ^2.35.1
version: 2.35.1(eslint@8.55.0)(svelte@4.2.8)
version: 2.35.1(eslint@8.56.0)(svelte@4.2.8)
husky:
specifier: ^8.0.3
version: 8.0.3
@@ -77,8 +77,8 @@ devDependencies:
specifier: ^3.6.2
version: 3.6.2(postcss@8.4.32)(svelte@4.2.8)
tailwindcss:
specifier: ^3.3.6
version: 3.3.6
specifier: ^3.3.7
version: 3.3.7
tslib:
specifier: ^2.6.2
version: 2.6.2
@@ -123,7 +123,7 @@ packages:
}
engines: { node: '>=6.9.0' }
dependencies:
regenerator-runtime: 0.14.0
regenerator-runtime: 0.14.1
dev: false
/@esbuild/android-arm64@0.18.20:
@@ -390,7 +390,7 @@ packages:
dev: true
optional: true
/@eslint-community/eslint-utils@4.4.0(eslint@8.55.0):
/@eslint-community/eslint-utils@4.4.0(eslint@8.56.0):
resolution:
{
integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==
@@ -399,7 +399,7 @@ packages:
peerDependencies:
eslint: ^6.0.0 || ^7.0.0 || >=8.0.0
dependencies:
eslint: 8.55.0
eslint: 8.56.0
eslint-visitor-keys: 3.4.3
dev: true
@@ -431,10 +431,10 @@ packages:
- supports-color
dev: true
/@eslint/js@8.55.0:
/@eslint/js@8.56.0:
resolution:
{
integrity: sha512-qQfo2mxH5yVom1kacMtZZJFVdW+E70mqHMJvVg6WTLo+VBuQJ4TojZlfWBjK0ve5BdEeNAVxOsl/nvNMpJOaJA==
integrity: sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==
}
engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 }
dev: true
@@ -563,7 +563,7 @@ packages:
engines: { node: '>= 8' }
dependencies:
'@nodelib/fs.scandir': 2.1.5
fastq: 1.15.0
fastq: 1.16.0
dev: true
/@polka/url@1.0.0-next.24:
@@ -691,10 +691,10 @@ packages:
}
dev: true
/@typescript-eslint/eslint-plugin@6.14.0(@typescript-eslint/parser@6.14.0)(eslint@8.55.0)(typescript@5.3.3):
/@typescript-eslint/eslint-plugin@6.15.0(@typescript-eslint/parser@6.15.0)(eslint@8.56.0)(typescript@5.3.3):
resolution:
{
integrity: sha512-1ZJBykBCXaSHG94vMMKmiHoL0MhNHKSVlcHVYZNw+BKxufhqQVTOawNpwwI1P5nIFZ/4jLVop0mcY6mJJDFNaw==
integrity: sha512-j5qoikQqPccq9QoBAupOP+CBu8BaJ8BLjaXSioDISeTZkVO3ig7oSIKh3H+rEpee7xCXtWwSB4KIL5l6hWZzpg==
}
engines: { node: ^16.0.0 || >=18.0.0 }
peerDependencies:
@@ -706,13 +706,13 @@ packages:
optional: true
dependencies:
'@eslint-community/regexpp': 4.10.0
'@typescript-eslint/parser': 6.14.0(eslint@8.55.0)(typescript@5.3.3)
'@typescript-eslint/scope-manager': 6.14.0
'@typescript-eslint/type-utils': 6.14.0(eslint@8.55.0)(typescript@5.3.3)
'@typescript-eslint/utils': 6.14.0(eslint@8.55.0)(typescript@5.3.3)
'@typescript-eslint/visitor-keys': 6.14.0
'@typescript-eslint/parser': 6.15.0(eslint@8.56.0)(typescript@5.3.3)
'@typescript-eslint/scope-manager': 6.15.0
'@typescript-eslint/type-utils': 6.15.0(eslint@8.56.0)(typescript@5.3.3)
'@typescript-eslint/utils': 6.15.0(eslint@8.56.0)(typescript@5.3.3)
'@typescript-eslint/visitor-keys': 6.15.0
debug: 4.3.4
eslint: 8.55.0
eslint: 8.56.0
graphemer: 1.4.0
ignore: 5.3.0
natural-compare: 1.4.0
@@ -723,10 +723,10 @@ packages:
- supports-color
dev: true
/@typescript-eslint/parser@6.14.0(eslint@8.55.0)(typescript@5.3.3):
/@typescript-eslint/parser@6.15.0(eslint@8.56.0)(typescript@5.3.3):
resolution:
{
integrity: sha512-QjToC14CKacd4Pa7JK4GeB/vHmWFJckec49FR4hmIRf97+KXole0T97xxu9IFiPxVQ1DBWrQ5wreLwAGwWAVQA==
integrity: sha512-MkgKNnsjC6QwcMdlNAel24jjkEO/0hQaMDLqP4S9zq5HBAUJNQB6y+3DwLjX7b3l2b37eNAxMPLwb3/kh8VKdA==
}
engines: { node: ^16.0.0 || >=18.0.0 }
peerDependencies:
@@ -736,32 +736,32 @@ packages:
typescript:
optional: true
dependencies:
'@typescript-eslint/scope-manager': 6.14.0
'@typescript-eslint/types': 6.14.0
'@typescript-eslint/typescript-estree': 6.14.0(typescript@5.3.3)
'@typescript-eslint/visitor-keys': 6.14.0
'@typescript-eslint/scope-manager': 6.15.0
'@typescript-eslint/types': 6.15.0
'@typescript-eslint/typescript-estree': 6.15.0(typescript@5.3.3)
'@typescript-eslint/visitor-keys': 6.15.0
debug: 4.3.4
eslint: 8.55.0
eslint: 8.56.0
typescript: 5.3.3
transitivePeerDependencies:
- supports-color
dev: true
/@typescript-eslint/scope-manager@6.14.0:
/@typescript-eslint/scope-manager@6.15.0:
resolution:
{
integrity: sha512-VT7CFWHbZipPncAZtuALr9y3EuzY1b1t1AEkIq2bTXUPKw+pHoXflGNG5L+Gv6nKul1cz1VH8fz16IThIU0tdg==
integrity: sha512-+BdvxYBltqrmgCNu4Li+fGDIkW9n//NrruzG9X1vBzaNK+ExVXPoGB71kneaVw/Jp+4rH/vaMAGC6JfMbHstVg==
}
engines: { node: ^16.0.0 || >=18.0.0 }
dependencies:
'@typescript-eslint/types': 6.14.0
'@typescript-eslint/visitor-keys': 6.14.0
'@typescript-eslint/types': 6.15.0
'@typescript-eslint/visitor-keys': 6.15.0
dev: true
/@typescript-eslint/type-utils@6.14.0(eslint@8.55.0)(typescript@5.3.3):
/@typescript-eslint/type-utils@6.15.0(eslint@8.56.0)(typescript@5.3.3):
resolution:
{
integrity: sha512-x6OC9Q7HfYKqjnuNu5a7kffIYs3No30isapRBJl1iCHLitD8O0lFbRcVGiOcuyN837fqXzPZ1NS10maQzZMKqw==
integrity: sha512-CnmHKTfX6450Bo49hPg2OkIm/D/TVYV7jO1MCfPYGwf6x3GO0VU8YMO5AYMn+u3X05lRRxA4fWCz87GFQV6yVQ==
}
engines: { node: ^16.0.0 || >=18.0.0 }
peerDependencies:
@@ -771,28 +771,28 @@ packages:
typescript:
optional: true
dependencies:
'@typescript-eslint/typescript-estree': 6.14.0(typescript@5.3.3)
'@typescript-eslint/utils': 6.14.0(eslint@8.55.0)(typescript@5.3.3)
'@typescript-eslint/typescript-estree': 6.15.0(typescript@5.3.3)
'@typescript-eslint/utils': 6.15.0(eslint@8.56.0)(typescript@5.3.3)
debug: 4.3.4
eslint: 8.55.0
eslint: 8.56.0
ts-api-utils: 1.0.3(typescript@5.3.3)
typescript: 5.3.3
transitivePeerDependencies:
- supports-color
dev: true
/@typescript-eslint/types@6.14.0:
/@typescript-eslint/types@6.15.0:
resolution:
{
integrity: sha512-uty9H2K4Xs8E47z3SnXEPRNDfsis8JO27amp2GNCnzGETEW3yTqEIVg5+AI7U276oGF/tw6ZA+UesxeQ104ceA==
integrity: sha512-yXjbt//E4T/ee8Ia1b5mGlbNj9fB9lJP4jqLbZualwpP2BCQ5is6BcWwxpIsY4XKAhmdv3hrW92GdtJbatC6dQ==
}
engines: { node: ^16.0.0 || >=18.0.0 }
dev: true
/@typescript-eslint/typescript-estree@6.14.0(typescript@5.3.3):
/@typescript-eslint/typescript-estree@6.15.0(typescript@5.3.3):
resolution:
{
integrity: sha512-yPkaLwK0yH2mZKFE/bXkPAkkFgOv15GJAUzgUVonAbv0Hr4PK/N2yaA/4XQbTZQdygiDkpt5DkxPELqHguNvyw==
integrity: sha512-7mVZJN7Hd15OmGuWrp2T9UvqR2Ecg+1j/Bp1jXUEY2GZKV6FXlOIoqVDmLpBiEiq3katvj/2n2mR0SDwtloCew==
}
engines: { node: ^16.0.0 || >=18.0.0 }
peerDependencies:
@@ -801,8 +801,8 @@ packages:
typescript:
optional: true
dependencies:
'@typescript-eslint/types': 6.14.0
'@typescript-eslint/visitor-keys': 6.14.0
'@typescript-eslint/types': 6.15.0
'@typescript-eslint/visitor-keys': 6.15.0
debug: 4.3.4
globby: 11.1.0
is-glob: 4.0.3
@@ -813,36 +813,36 @@ packages:
- supports-color
dev: true
/@typescript-eslint/utils@6.14.0(eslint@8.55.0)(typescript@5.3.3):
/@typescript-eslint/utils@6.15.0(eslint@8.56.0)(typescript@5.3.3):
resolution:
{
integrity: sha512-XwRTnbvRr7Ey9a1NT6jqdKX8y/atWG+8fAIu3z73HSP8h06i3r/ClMhmaF/RGWGW1tHJEwij1uEg2GbEmPYvYg==
integrity: sha512-eF82p0Wrrlt8fQSRL0bGXzK5nWPRV2dYQZdajcfzOD9+cQz9O7ugifrJxclB+xVOvWvagXfqS4Es7vpLP4augw==
}
engines: { node: ^16.0.0 || >=18.0.0 }
peerDependencies:
eslint: ^7.0.0 || ^8.0.0
dependencies:
'@eslint-community/eslint-utils': 4.4.0(eslint@8.55.0)
'@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0)
'@types/json-schema': 7.0.15
'@types/semver': 7.5.6
'@typescript-eslint/scope-manager': 6.14.0
'@typescript-eslint/types': 6.14.0
'@typescript-eslint/typescript-estree': 6.14.0(typescript@5.3.3)
eslint: 8.55.0
'@typescript-eslint/scope-manager': 6.15.0
'@typescript-eslint/types': 6.15.0
'@typescript-eslint/typescript-estree': 6.15.0(typescript@5.3.3)
eslint: 8.56.0
semver: 7.5.4
transitivePeerDependencies:
- supports-color
- typescript
dev: true
/@typescript-eslint/visitor-keys@6.14.0:
/@typescript-eslint/visitor-keys@6.15.0:
resolution:
{
integrity: sha512-fB5cw6GRhJUz03MrROVuj5Zm/Q+XWlVdIsFj+Zb1Hvqouc8t+XP2H5y53QYU/MGtd2dPg6/vJJlhoX3xc2ehfw==
integrity: sha512-1zvtdC1a9h5Tb5jU9x3ADNXO9yjP8rXlaoChu0DQX40vf5ACVpYIVIZhIMZ6d5sDXH7vq4dsZBT1fEGj8D2n2w==
}
engines: { node: ^16.0.0 || >=18.0.0 }
dependencies:
'@typescript-eslint/types': 6.14.0
'@typescript-eslint/types': 6.15.0
eslint-visitor-keys: 3.4.3
dev: true
@@ -1063,7 +1063,7 @@ packages:
hasBin: true
dependencies:
caniuse-lite: 1.0.30001570
electron-to-chromium: 1.4.612
electron-to-chromium: 1.4.615
node-releases: 2.0.14
update-browserslist-db: 1.0.13(browserslist@4.22.2)
dev: true
@@ -1280,10 +1280,10 @@ packages:
engines: { node: ^12.20.0 || ^14.13.1 || >=16.0.0 }
dev: true
/daisyui@4.4.19(postcss@8.4.32):
/daisyui@4.4.20(postcss@8.4.32):
resolution:
{
integrity: sha512-IjOLWwnndD4N7Ut5CDxbUsaVtbqXPeVHM92IcgxGFxpuOd3CCKW/PAXZH6JoBTHFRaN57vB9XqEhdWm5yC+bPA==
integrity: sha512-AR2fuFVVLHVTdbkV+XWAqjtymEoxXksrsEMkdzPQo2wANtWjSXuODUzePNade64gJ0Y2CdQtiQkaZI7fWcp13g==
}
engines: { node: '>=16.9.0' }
dependencies:
@@ -1415,10 +1415,10 @@ packages:
esutils: 2.0.3
dev: true
/electron-to-chromium@1.4.612:
/electron-to-chromium@1.4.615:
resolution:
{
integrity: sha512-dM8BMtXtlH237ecSMnYdYuCkib2QHq0kpWfUnavjdYsyr/6OsAwg5ZGUfnQ9KD1Ga4QgB2sqXlB2NT8zy2GnVg==
integrity: sha512-/bKPPcgZVUziECqDc+0HkT87+0zhaWSZHNXqF8FLd2lQcptpmUFwoCSWjCdOng9Gdq+afKArPdEg/0ZW461Eng==
}
dev: true
@@ -1567,7 +1567,7 @@ packages:
engines: { node: '>=10' }
dev: true
/eslint-compat-utils@0.1.2(eslint@8.55.0):
/eslint-compat-utils@0.1.2(eslint@8.56.0):
resolution:
{
integrity: sha512-Jia4JDldWnFNIru1Ehx1H5s9/yxiRHY/TimCuUc0jNexew3cF1gI6CYZil1ociakfWO3rRqFjl1mskBblB3RYg==
@@ -1576,10 +1576,10 @@ packages:
peerDependencies:
eslint: '>=6.0.0'
dependencies:
eslint: 8.55.0
eslint: 8.56.0
dev: true
/eslint-config-prettier@9.1.0(eslint@8.55.0):
/eslint-config-prettier@9.1.0(eslint@8.56.0):
resolution:
{
integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==
@@ -1588,10 +1588,10 @@ packages:
peerDependencies:
eslint: '>=7.0.0'
dependencies:
eslint: 8.55.0
eslint: 8.56.0
dev: true
/eslint-plugin-svelte@2.35.1(eslint@8.55.0)(svelte@4.2.8):
/eslint-plugin-svelte@2.35.1(eslint@8.56.0)(svelte@4.2.8):
resolution:
{
integrity: sha512-IF8TpLnROSGy98Z3NrsKXWDSCbNY2ReHDcrYTuXZMbfX7VmESISR78TWgO9zdg4Dht1X8coub5jKwHzP0ExRug==
@@ -1604,11 +1604,11 @@ packages:
svelte:
optional: true
dependencies:
'@eslint-community/eslint-utils': 4.4.0(eslint@8.55.0)
'@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0)
'@jridgewell/sourcemap-codec': 1.4.15
debug: 4.3.4
eslint: 8.55.0
eslint-compat-utils: 0.1.2(eslint@8.55.0)
eslint: 8.56.0
eslint-compat-utils: 0.1.2(eslint@8.56.0)
esutils: 2.0.3
known-css-properties: 0.29.0
postcss: 8.4.32
@@ -1642,18 +1642,18 @@ packages:
engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 }
dev: true
/eslint@8.55.0:
/eslint@8.56.0:
resolution:
{
integrity: sha512-iyUUAM0PCKj5QpwGfmCAG9XXbZCWsqP/eWAWrG/W0umvjuLRBECwSFdt+rCntju0xEH7teIABPwXpahftIaTdA==
integrity: sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==
}
engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 }
hasBin: true
dependencies:
'@eslint-community/eslint-utils': 4.4.0(eslint@8.55.0)
'@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0)
'@eslint-community/regexpp': 4.10.0
'@eslint/eslintrc': 2.1.4
'@eslint/js': 8.55.0
'@eslint/js': 8.56.0
'@humanwhocodes/config-array': 0.11.13
'@humanwhocodes/module-importer': 1.0.1
'@nodelib/fs.walk': 1.2.8
@@ -1797,10 +1797,10 @@ packages:
}
dev: true
/fastq@1.15.0:
/fastq@1.16.0:
resolution:
{
integrity: sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==
integrity: sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==
}
dependencies:
reusify: 1.0.4
@@ -2553,16 +2553,6 @@ packages:
yallist: 4.0.0
dev: true
/magic-string@0.27.0:
resolution:
{
integrity: sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA==
}
engines: { node: '>=12' }
dependencies:
'@jridgewell/sourcemap-codec': 1.4.15
dev: true
/magic-string@0.30.5:
resolution:
{
@@ -3190,10 +3180,10 @@ packages:
picomatch: 2.3.1
dev: true
/regenerator-runtime@0.14.0:
/regenerator-runtime@0.14.1:
resolution:
{
integrity: sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==
integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==
}
dev: false
@@ -3643,7 +3633,7 @@ packages:
picocolors: 1.0.0
sade: 1.8.1
svelte: 4.2.8
svelte-preprocess: 5.1.2(postcss@8.4.32)(svelte@4.2.8)(typescript@5.3.3)
svelte-preprocess: 5.1.3(postcss@8.4.32)(svelte@4.2.8)(typescript@5.3.3)
typescript: 5.3.3
transitivePeerDependencies:
- '@babel/core'
@@ -3708,12 +3698,12 @@ packages:
svelte: 4.2.8
dev: true
/svelte-preprocess@5.1.2(postcss@8.4.32)(svelte@4.2.8)(typescript@5.3.3):
/svelte-preprocess@5.1.3(postcss@8.4.32)(svelte@4.2.8)(typescript@5.3.3):
resolution:
{
integrity: sha512-XF0aliMAcYnP4hLETvB6HRAMnaL09ASYT1Z2I1Gwu0nz6xbdg/dSgAEthtFZJA4AKrNhFDFdmUDO+H9d/6xg5g==
integrity: sha512-xxAkmxGHT+J/GourS5mVJeOXZzne1FR5ljeOUAMXUkfEhkLEllRreXpbl3dIYJlcJRfL1LO1uIAPpBpBfiqGPw==
}
engines: { node: '>= 14.10.0' }
engines: { node: '>= 16.0.0', pnpm: ^8.0.0 }
requiresBuild: true
peerDependencies:
'@babel/core': ^7.10.2
@@ -3751,7 +3741,7 @@ packages:
dependencies:
'@types/pug': 2.0.10
detect-indent: 6.1.0
magic-string: 0.27.0
magic-string: 0.30.5
postcss: 8.4.32
sorcery: 0.11.0
strip-indent: 3.0.0
@@ -3791,10 +3781,10 @@ packages:
magic-string: 0.30.5
periscopic: 3.1.0
/tailwindcss@3.3.6:
/tailwindcss@3.3.7:
resolution:
{
integrity: sha512-AKjF7qbbLvLaPieoKeTjG1+FyNZT6KaJMJPFeQyLfIp7l82ggH1fbHJSsYIvnbTFQOlkh+gBYpyby5GT1LIdLw==
integrity: sha512-pjgQxDZPvyS/nG3ZYkyCvsbONJl7GdOejfm24iMt2ElYQQw8Jc4p0m8RdMp7mznPD0kUhfzwV3zAwa80qI0zmQ==
}
engines: { node: '>=14.0.0' }
hasBin: true