diff --git a/go.mod b/go.mod index 152d66c6..b91c2e36 100644 --- a/go.mod +++ b/go.mod @@ -12,42 +12,41 @@ require ( github.com/alibabacloud-go/darabonba-openapi/v2 v2.0.10 github.com/alibabacloud-go/live-20161101 v1.1.1 github.com/alibabacloud-go/nlb-20220430/v2 v2.0.3 - github.com/alibabacloud-go/slb-20140515/v4 v4.0.9 + github.com/alibabacloud-go/slb-20140515/v4 v4.0.10 github.com/alibabacloud-go/tea v1.2.2 github.com/aliyun/aliyun-oss-go-sdk v3.0.2+incompatible - github.com/baidubce/bce-sdk-go v0.9.209 - github.com/byteplus-sdk/byteplus-sdk-golang v1.0.35 + github.com/baidubce/bce-sdk-go v0.9.214 + github.com/byteplus-sdk/byteplus-sdk-golang v1.0.40 github.com/go-acme/lego/v4 v4.21.0 github.com/go-resty/resty/v2 v2.16.3 github.com/go-viper/mapstructure/v2 v2.2.1 - github.com/huaweicloud/huaweicloud-sdk-go-v3 v0.1.128 - github.com/labstack/echo/v5 v5.0.0-20230722203903-ec5b858dab61 - github.com/nikoksr/notify v1.1.0 + github.com/huaweicloud/huaweicloud-sdk-go-v3 v0.1.132 + github.com/nikoksr/notify v1.3.0 github.com/pavlo-v-chernykh/keystore-go/v4 v4.5.0 github.com/pkg/sftp v1.13.7 github.com/pocketbase/dbx v1.11.0 - github.com/pocketbase/pocketbase v0.22.21 - github.com/qiniu/go-sdk/v7 v7.25.1 - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cdn v1.0.1065 - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/clb v1.0.1065 - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1080 - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/live v1.0.1080 - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ssl v1.0.1065 - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo v1.0.1065 + github.com/pocketbase/pocketbase v0.24.3 + github.com/qiniu/go-sdk/v7 v7.25.2 + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cdn v1.0.1084 + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/clb v1.0.1084 + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1084 + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/live v1.0.1084 + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ssl v1.0.1084 + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo v1.0.1084 github.com/ucloud/ucloud-sdk-go v0.22.31 github.com/volcengine/ve-tos-golang-sdk/v2 v2.7.8 - github.com/volcengine/volc-sdk-golang v1.0.189 - github.com/volcengine/volcengine-go-sdk v1.0.177 + github.com/volcengine/volc-sdk-golang v1.0.193 + github.com/volcengine/volcengine-go-sdk v1.0.178 golang.org/x/crypto v0.32.0 golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8 - k8s.io/api v0.32.0 - k8s.io/apimachinery v0.32.0 - k8s.io/client-go v0.32.0 + k8s.io/api v0.32.1 + k8s.io/apimachinery v0.32.1 + k8s.io/client-go v0.32.1 software.sslmate.com/src/go-pkcs12 v0.5.0 ) require ( - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.1 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dns/armdns v1.2.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/privatedns/armprivatedns v1.3.0 // indirect @@ -57,26 +56,27 @@ require ( github.com/alibabacloud-go/tea-fileform v1.1.1 // indirect github.com/alibabacloud-go/tea-oss-sdk v1.1.3 // indirect github.com/alibabacloud-go/tea-oss-utils v1.1.0 // indirect - github.com/alibabacloud-go/tea-utils/v2 v2.0.6 // indirect - github.com/aws/aws-sdk-go-v2/service/route53 v1.46.4 // indirect + github.com/alibabacloud-go/tea-utils/v2 v2.0.7 // indirect + github.com/aws/aws-sdk-go-v2/service/route53 v1.48.1 // indirect github.com/blinkbean/dingtalk v1.1.3 // indirect - github.com/emicklei/go-restful/v3 v3.11.0 // indirect + github.com/emicklei/go-restful/v3 v3.12.1 // indirect github.com/fxamacker/cbor/v2 v2.7.0 // indirect - github.com/go-lark/lark v1.15.0 // indirect + github.com/go-lark/lark v1.15.1 // indirect github.com/go-logr/logr v1.4.2 // indirect github.com/go-openapi/jsonpointer v0.21.0 // indirect - github.com/go-openapi/jsonreference v0.20.2 // indirect + github.com/go-openapi/jsonreference v0.21.0 // indirect github.com/go-openapi/swag v0.23.0 // indirect github.com/go-telegram-bot-api/telegram-bot-api v4.6.4+incompatible // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v5 v5.2.1 // indirect github.com/golang/protobuf v1.5.4 // indirect - github.com/google/gnostic-models v0.6.8 // indirect + github.com/google/gnostic-models v0.6.9 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/gofuzz v1.2.0 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/kylelemons/godebug v1.1.0 // indirect - github.com/mailru/easyjson v0.7.7 // indirect + github.com/mailru/easyjson v0.9.0 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/namedotcom/go v0.0.0-20180403034216-08470befbe04 // indirect github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect @@ -84,16 +84,19 @@ require ( github.com/sirupsen/logrus v1.9.3 // indirect github.com/technoweenie/multipartstreamer v1.0.1 // indirect github.com/x448/float16 v0.8.4 // indirect - go.mongodb.org/mongo-driver v1.12.0 // indirect + go.mongodb.org/mongo-driver v1.17.2 // indirect gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ns1/ns1-go.v2 v2.13.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect k8s.io/klog/v2 v2.130.1 // indirect - k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f // indirect - k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 // indirect - sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.4.2 // indirect + k8s.io/kube-openapi v0.0.0-20241212222426-2c72e554b1e7 // indirect + k8s.io/utils v0.0.0-20241210054802-24370beab758 // indirect + modernc.org/gc/v3 v3.0.0-20250105121824-520be1a3aee6 // indirect + modernc.org/strutil v1.2.1 // indirect + modernc.org/token v1.1.0 // indirect + sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.5.0 // indirect sigs.k8s.io/yaml v1.4.0 // indirect ) @@ -101,43 +104,43 @@ require ( github.com/AlecAivazis/survey/v2 v2.3.7 // indirect github.com/BurntSushi/toml v1.4.0 // indirect github.com/alibabacloud-go/alibabacloud-gateway-spi v0.0.5 // indirect - github.com/alibabacloud-go/dcdn-20180115/v3 v3.4.2 + github.com/alibabacloud-go/dcdn-20180115/v3 v3.5.0 github.com/alibabacloud-go/debug v1.0.1 // indirect - github.com/alibabacloud-go/endpoint-util v1.1.0 // indirect + github.com/alibabacloud-go/endpoint-util v1.1.1 // indirect github.com/alibabacloud-go/openapi-util v0.1.1 // indirect github.com/alibabacloud-go/tea-utils v1.4.5 // indirect github.com/alibabacloud-go/tea-xml v1.1.3 // indirect - github.com/aliyun/alibaba-cloud-sdk-go v1.63.80 // indirect - github.com/aliyun/credentials-go v1.3.10 // indirect + github.com/aliyun/alibaba-cloud-sdk-go v1.63.83 // indirect + github.com/aliyun/credentials-go v1.4.3 // indirect github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect - github.com/aws/aws-sdk-go-v2 v1.32.7 // indirect + github.com/aws/aws-sdk-go-v2 v1.33.0 // indirect github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.7 // indirect - github.com/aws/aws-sdk-go-v2/config v1.28.7 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.17.48 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.22 // indirect - github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.44 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.26 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.26 // indirect + github.com/aws/aws-sdk-go-v2/config v1.29.0 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.17.53 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.24 // indirect + github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.51 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.28 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.28 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect - github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.26 // indirect + github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.28 // indirect github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.4.7 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.7 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.7 // indirect - github.com/aws/aws-sdk-go-v2/service/s3 v1.71.1 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.24.8 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.7 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.33.3 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.5.1 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.9 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.9 // indirect + github.com/aws/aws-sdk-go-v2/service/s3 v1.73.1 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.24.10 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.9 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.33.8 // indirect github.com/aws/smithy-go v1.22.1 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect - github.com/clbanning/mxj/v2 v2.5.6 // indirect - github.com/cloudflare/cloudflare-go v0.112.0 // indirect + github.com/clbanning/mxj/v2 v2.7.0 // indirect + github.com/cloudflare/cloudflare-go v0.114.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/disintegration/imaging v1.6.2 // indirect github.com/domodwyer/mailyak/v3 v3.6.2 github.com/dustin/go-humanize v1.0.1 // indirect github.com/fatih/color v1.18.0 // indirect - github.com/gabriel-vasile/mimetype v1.4.7 // indirect + github.com/gabriel-vasile/mimetype v1.4.8 // indirect github.com/ganigeorgiev/fexpr v0.4.1 // indirect github.com/go-jose/go-jose/v4 v4.0.4 // indirect github.com/go-ozzo/ozzo-validation/v4 v4.3.0 // indirect @@ -147,15 +150,13 @@ require ( github.com/google/go-querystring v1.1.0 // indirect github.com/google/uuid v1.6.0 // indirect github.com/googleapis/gax-go/v2 v2.14.1 // indirect - github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect github.com/kr/fs v0.1.0 // indirect - github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-colorable v0.1.14 // indirect github.com/mattn/go-isatty v0.0.20 // indirect - github.com/mattn/go-sqlite3 v1.14.22 // indirect github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect github.com/miekg/dns v1.1.62 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect @@ -170,34 +171,29 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/stretchr/objx v0.5.2 // indirect github.com/stretchr/testify v1.10.0 // indirect - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dnspod v1.0.1065 // indirect + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dnspod v1.0.1084 // indirect github.com/tjfoc/gmsm v1.4.1 // indirect - github.com/valyala/bytebufferpool v1.0.0 // indirect - github.com/valyala/fasttemplate v1.2.2 // indirect go.opencensus.io v0.24.0 // indirect gocloud.dev v0.40.0 // indirect golang.org/x/image v0.23.0 // indirect golang.org/x/mod v0.22.0 // indirect golang.org/x/net v0.34.0 // indirect - golang.org/x/oauth2 v0.24.0 // indirect + golang.org/x/oauth2 v0.25.0 // indirect golang.org/x/sync v0.10.0 golang.org/x/sys v0.29.0 // indirect golang.org/x/term v0.28.0 // indirect golang.org/x/text v0.21.0 // indirect - golang.org/x/time v0.8.0 // indirect + golang.org/x/time v0.9.0 golang.org/x/tools v0.29.0 // indirect golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect - google.golang.org/api v0.214.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20241219192143-6b3ec007d9bb // indirect - google.golang.org/grpc v1.69.2 // indirect - google.golang.org/protobuf v1.36.0 // indirect + google.golang.org/api v0.217.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f // indirect + google.golang.org/grpc v1.69.4 // indirect + google.golang.org/protobuf v1.36.3 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - modernc.org/gc/v3 v3.0.0-20241213165251-3bc300f6d0c9 // indirect - modernc.org/libc v1.61.5 // indirect - modernc.org/mathutil v1.7.0 // indirect - modernc.org/memory v1.8.0 // indirect + modernc.org/libc v1.55.3 // indirect + modernc.org/mathutil v1.7.1 // indirect + modernc.org/memory v1.8.2 // indirect modernc.org/sqlite v1.34.4 // indirect - modernc.org/strutil v1.2.0 // indirect - modernc.org/token v1.1.0 // indirect ) diff --git a/go.sum b/go.sum index 57ff9916..27e5c075 100644 --- a/go.sum +++ b/go.sum @@ -17,10 +17,10 @@ cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOY cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= cloud.google.com/go v0.116.0 h1:B3fRrSDkLRt5qSHWe40ERJvhvnQwdZiHu0bJOpldweE= cloud.google.com/go v0.116.0/go.mod h1:cEPSRWPzZEswwdr9BxE6ChEn01dWlTaF05LiC2Xs70U= -cloud.google.com/go/auth v0.13.0 h1:8Fu8TZy167JkW8Tj3q7dIkr2v4cndv41ouecJx0PAHs= -cloud.google.com/go/auth v0.13.0/go.mod h1:COOjD9gwfKNKz+IIduatIhYJQIc0mG3H102r/EMxX6Q= -cloud.google.com/go/auth/oauth2adapt v0.2.6 h1:V6a6XDu2lTwPZWOawrAa9HUK+DB2zfJyTuciBG5hFkU= -cloud.google.com/go/auth/oauth2adapt v0.2.6/go.mod h1:AlmsELtlEBnaNTL7jCj8VQFLy6mbZv0s4Q7NGBeQ5E8= +cloud.google.com/go/auth v0.14.0 h1:A5C4dKV/Spdvxcl0ggWwWEzzP7AZMJSEIgrkngwhGYM= +cloud.google.com/go/auth v0.14.0/go.mod h1:CYsoRL1PdiDuqeQpZE0bP2pnPrGqFcOkI0nldEQis+A= +cloud.google.com/go/auth/oauth2adapt v0.2.7 h1:/Lc7xODdqcEw8IrZ9SvwnlLX6j9FHQM74z6cBk9Rw6M= +cloud.google.com/go/auth/oauth2adapt v0.2.7/go.mod h1:NTbTTzfvPl1Y3V1nPpOgl2w6d/FjO7NNUQaWSox6ZMc= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -44,8 +44,8 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.45.0 h1:5av0QcIVj77t+44mV4gffFC/LscFRUhto6UBMB5SimM= -cloud.google.com/go/storage v1.45.0/go.mod h1:wpPblkIuMP5jCB/E48Pz9zIo2S/zD8g+ITmxKkPCITE= +cloud.google.com/go/storage v1.47.0 h1:ajqgt30fnOMmLfWfu1PWcb+V9Dxz6n+9WKjdNg5R4HM= +cloud.google.com/go/storage v1.47.0/go.mod h1:Ks0vP374w0PW6jOUameJbapbQKXqkjGd/OJRp2fb9IQ= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= @@ -54,10 +54,10 @@ github.com/AlecAivazis/survey/v2 v2.3.7/go.mod h1:xUTIdE4KCOIjsBAE1JYsUPoCqYdZ1r github.com/Azure/azure-sdk-for-go v68.0.0+incompatible h1:fcYLmCpyNYRnvJbPerq7U0hS+6+I79yEDJBqVNcqUzU= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.17.0 h1:g0EZJwz7xkXQiZAI5xi9f3WWFYBlX1CPTrR+NDToRkQ= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.17.0/go.mod h1:XCW7KnZet0Opnr7HccfUw1PLc4CjHqpcaxW8DHklNkQ= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.0 h1:B/dfvscEQtew9dVuoxqxrUKKv8Ih2f55PydknDamU+g= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.0/go.mod h1:fiPSssYvltE08HJchL04dOy+RD4hgrjph0cwGGMntdI= -github.com/Azure/azure-sdk-for-go/sdk/azidentity/cache v0.3.0 h1:+m0M/LFxN43KvULkDNfdXOgrjtg6UYJPFBJyuEcRCAw= -github.com/Azure/azure-sdk-for-go/sdk/azidentity/cache v0.3.0/go.mod h1:PwOyop78lveYMRs6oCxjiVyBdyCgIYH6XHIVZO9/SFQ= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.1 h1:1mvYtZfWQAnwNah/C+Z+Jb9rQH95LPE2vlmMuWAHJk8= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.1/go.mod h1:75I/mXtme1JyWFtz8GocPHVFyH421IBoZErnO16dd0k= +github.com/Azure/azure-sdk-for-go/sdk/azidentity/cache v0.3.1 h1:Bk5uOhSAenHyR5P61D/NzeQCv+4fEVV8mOkJ82NqpWw= +github.com/Azure/azure-sdk-for-go/sdk/azidentity/cache v0.3.1/go.mod h1:QZ4pw3or1WPmRBxf0cHd1tknzrT54WPBOQoGutCPvSU= github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 h1:ywEEhmNahHBihViHepv3xPBn1663uRv2t2q/ESv9seY= github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0/go.mod h1:iZDifYGJTIgIIkYRNWPENUnqx6bJ2xnSDFI2tjwZNuY= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dns/armdns v1.2.0 h1:lpOxwrQ919lCZoNCd69rVt8u1eLZuMORrGXqy8sNf3c= @@ -81,12 +81,12 @@ github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0 github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.24.3 h1:cb3br57K508pQEFgBxn9GDhPS9HefpyMPK1RzmtMNzk= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.24.3/go.mod h1:itPGVDKf9cC/ov4MdvJ2QZ0khw4bfoo9jzwTJlaxy2k= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.48.3 h1:xir5X8TS8UBVPWg2jHL+cSTf0jZgqYQSA54TscSt1/0= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.48.3/go.mod h1:SsdWig2J5PMnfMvfJuEb1uZa8Y+kvNyvrULFo69gTFk= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.48.3 h1:2vcVkrNdSMJpoOVAWi9ApsQR5iqNeFGt5Qx8Xlt3IoI= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.48.3/go.mod h1:wRbFgBQUVm1YXrvWKofAEmq9HNJTDphbAaJSSX01KUI= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.25.0 h1:3c8yed4lgqTt+oTQ+JNMDo+F4xprBf+O/il4ZC0nRLw= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.25.0/go.mod h1:obipzmGjfSjam60XLwGfqUkJsfiheAl+TUjG+4yzyPM= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.49.0 h1:o90wcURuxekmXrtxmYWTyNla0+ZEHhud6DI1ZTxd1vI= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.49.0/go.mod h1:6fTWu4m3jocfUZLYF5KsZC1TUfRvEjs7lM4crme/irw= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.49.0 h1:GYUJLfvd++4DMuMhCFLgLXvFwofIxh/qOwoGuS/LTew= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.49.0/go.mod h1:wRbFgBQUVm1YXrvWKofAEmq9HNJTDphbAaJSSX01KUI= github.com/HdrHistogram/hdrhistogram-go v1.1.0/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= @@ -126,22 +126,21 @@ github.com/alibabacloud-go/darabonba-map v0.0.2/go.mod h1:28AJaX8FOE/ym8OUFWga+M github.com/alibabacloud-go/darabonba-openapi/v2 v2.0.0/go.mod h1:5JHVmnHvGzR2wNdgaW1zDLQG8kOC4Uec8ubkMogW7OQ= github.com/alibabacloud-go/darabonba-openapi/v2 v2.0.2/go.mod h1:5JHVmnHvGzR2wNdgaW1zDLQG8kOC4Uec8ubkMogW7OQ= github.com/alibabacloud-go/darabonba-openapi/v2 v2.0.5/go.mod h1:kUe8JqFmoVU7lfBauaDD5taFaW7mBI+xVsyHutYtabg= -github.com/alibabacloud-go/darabonba-openapi/v2 v2.0.7/go.mod h1:CzQnh+94WDnJOnKZH5YRyouL+OOcdBnXY5VWAf0McgI= -github.com/alibabacloud-go/darabonba-openapi/v2 v2.0.9/go.mod h1:bb+Io8Sn2RuM3/Rpme6ll86jMyFSrD1bxeV/+v61KeU= github.com/alibabacloud-go/darabonba-openapi/v2 v2.0.10 h1:GEYkMApgpKEVDn6z12DcH1EGYpDYRB8JxsazM4Rywak= github.com/alibabacloud-go/darabonba-openapi/v2 v2.0.10/go.mod h1:26a14FGhZVELuz2cc2AolvW4RHmIO3/HRwsdHhaIPDE= github.com/alibabacloud-go/darabonba-signature-util v0.0.7 h1:UzCnKvsjPFzApvODDNEYqBHMFt1w98wC7FOo0InLyxg= github.com/alibabacloud-go/darabonba-signature-util v0.0.7/go.mod h1:oUzCYV2fcCH797xKdL6BDH8ADIHlzrtKVjeRtunBNTQ= github.com/alibabacloud-go/darabonba-string v1.0.2 h1:E714wms5ibdzCqGeYJ9JCFywE5nDyvIXIIQbZVFkkqo= github.com/alibabacloud-go/darabonba-string v1.0.2/go.mod h1:93cTfV3vuPhhEwGGpKKqhVW4jLe7tDpo3LUM0i0g6mA= -github.com/alibabacloud-go/dcdn-20180115/v3 v3.4.2 h1:WKMtPfhEmf8jX4FvdG7MFBJeCknPQ+FEHQppDcaCoU0= -github.com/alibabacloud-go/dcdn-20180115/v3 v3.4.2/go.mod h1:dGuR8qQqofJKl99rVaWvObnP3bMkru3cdOtqJJ95048= +github.com/alibabacloud-go/dcdn-20180115/v3 v3.5.0 h1:EQmKhYju6y38kJ1ZvZROeJG2Q1Wk6hlc8KQrVhvGyaw= +github.com/alibabacloud-go/dcdn-20180115/v3 v3.5.0/go.mod h1:b9qzvr/2V1f0r1Z6xUmkLqEouKcPGy4LCC22yV+6HQo= github.com/alibabacloud-go/debug v0.0.0-20190504072949-9472017b5c68/go.mod h1:6pb/Qy8c+lqua8cFpEy7g39NRRqOWc3rOwAy8m5Y2BY= github.com/alibabacloud-go/debug v1.0.0/go.mod h1:8gfgZCCAC3+SCzjWtY053FrOcd4/qlH6IHTI4QyICOc= github.com/alibabacloud-go/debug v1.0.1 h1:MsW9SmUtbb1Fnt3ieC6NNZi6aEwrXfDksD4QA6GSbPg= github.com/alibabacloud-go/debug v1.0.1/go.mod h1:8gfgZCCAC3+SCzjWtY053FrOcd4/qlH6IHTI4QyICOc= -github.com/alibabacloud-go/endpoint-util v1.1.0 h1:r/4D3VSw888XGaeNpP994zDUaxdgTSHBbVfZlzf6b5Q= github.com/alibabacloud-go/endpoint-util v1.1.0/go.mod h1:O5FuCALmCKs2Ff7JFJMudHs0I5EBgecXXxZRyswlEjE= +github.com/alibabacloud-go/endpoint-util v1.1.1 h1:ZkBv2/jnghxtU0p+upSU0GGzW1VL9GQdZO3mcSUTUy8= +github.com/alibabacloud-go/endpoint-util v1.1.1/go.mod h1:O5FuCALmCKs2Ff7JFJMudHs0I5EBgecXXxZRyswlEjE= github.com/alibabacloud-go/live-20161101 v1.1.1 h1:rUGfA8RHmCMtQ5M3yMSyRde+yRXWqVecmiXBU3XrGJ8= github.com/alibabacloud-go/live-20161101 v1.1.1/go.mod h1:g84w6qeAodT0/IHdc0tEed2a8PyhQhYl7TAj3jGl4A4= github.com/alibabacloud-go/nlb-20220430/v2 v2.0.3 h1:LtyUVlgBEKyzWgQJurzXM6MXCt84sQr9cE5OKqYymko= @@ -152,8 +151,8 @@ github.com/alibabacloud-go/openapi-util v0.1.1 h1:ujGErJjG8ncRW6XtBBMphzHTvCxn4D github.com/alibabacloud-go/openapi-util v0.1.1/go.mod h1:/UehBSE2cf1gYT43GV4E+RxTdLRzURImCYY0aRmlXpw= github.com/alibabacloud-go/openplatform-20191219/v2 v2.0.1 h1:L0TIjr9Qh/SLVc1yPhFkcB9+9SbCNK/jPq4ZKB5zmnc= github.com/alibabacloud-go/openplatform-20191219/v2 v2.0.1/go.mod h1:EKxBRDLcMzwl4VLF/1WJwlByZZECJawPXUvinKMsTTs= -github.com/alibabacloud-go/slb-20140515/v4 v4.0.9 h1:nrf9gQth7fONUj7V8i78Yb98eb9NdKl0VdeSjmeYugI= -github.com/alibabacloud-go/slb-20140515/v4 v4.0.9/go.mod h1:PEMEsQoxhkMvykMFP5ZXg6SWI9vmAiZ6lK3Pu4mTKB0= +github.com/alibabacloud-go/slb-20140515/v4 v4.0.10 h1:ppAt0BUr8hPyp9aCP+fV1KTKclbr/QRqFCSjCPFVXTE= +github.com/alibabacloud-go/slb-20140515/v4 v4.0.10/go.mod h1:N1z4uYIL1DcWrrsIq5r552RlAoarl2zmaPKChoG+UA0= github.com/alibabacloud-go/tea v1.1.0/go.mod h1:IkGyUSX4Ba1V+k4pCtJUc6jDpZLFph9QMy2VUPTwukg= github.com/alibabacloud-go/tea v1.1.7/go.mod h1:/tmnEaQMyb4Ky1/5D+SE1BAsa5zj/KeGOFfwYm3N/p4= github.com/alibabacloud-go/tea v1.1.8/go.mod h1:/tmnEaQMyb4Ky1/5D+SE1BAsa5zj/KeGOFfwYm3N/p4= @@ -180,21 +179,23 @@ github.com/alibabacloud-go/tea-utils/v2 v2.0.0/go.mod h1:U5MTY10WwlquGPS34DOeomU github.com/alibabacloud-go/tea-utils/v2 v2.0.1/go.mod h1:U5MTY10WwlquGPS34DOeomUGBB0gXbLueiq5Trwu0C4= github.com/alibabacloud-go/tea-utils/v2 v2.0.4/go.mod h1:sj1PbjPodAVTqGTA3olprfeeqqmwD0A5OQz94o9EuXQ= github.com/alibabacloud-go/tea-utils/v2 v2.0.5/go.mod h1:dL6vbUT35E4F4bFTHL845eUloqaerYBYPsdWR2/jhe4= -github.com/alibabacloud-go/tea-utils/v2 v2.0.6 h1:ZkmUlhlQbaDC+Eba/GARMPy6hKdCLiSke5RsN5LcyQ0= github.com/alibabacloud-go/tea-utils/v2 v2.0.6/go.mod h1:qxn986l+q33J5VkialKMqT/TTs3E+U9MJpd001iWQ9I= +github.com/alibabacloud-go/tea-utils/v2 v2.0.7 h1:WDx5qW3Xa5ZgJ1c8NfqJkF6w+AU5wB8835UdhPr6Ax0= +github.com/alibabacloud-go/tea-utils/v2 v2.0.7/go.mod h1:qxn986l+q33J5VkialKMqT/TTs3E+U9MJpd001iWQ9I= github.com/alibabacloud-go/tea-xml v1.1.1/go.mod h1:Rq08vgCcCAjHyRi/M7xlHKUykZCEtyBy9+DPF6GgEu8= github.com/alibabacloud-go/tea-xml v1.1.2/go.mod h1:Rq08vgCcCAjHyRi/M7xlHKUykZCEtyBy9+DPF6GgEu8= github.com/alibabacloud-go/tea-xml v1.1.3 h1:7LYnm+JbOq2B+T/B0fHC4Ies4/FofC4zHzYtqw7dgt0= github.com/alibabacloud-go/tea-xml v1.1.3/go.mod h1:Rq08vgCcCAjHyRi/M7xlHKUykZCEtyBy9+DPF6GgEu8= -github.com/aliyun/alibaba-cloud-sdk-go v1.63.80 h1:Dn5QrIWYgi7IZJkuhrAe33x/jFWlbHCW3Dip1Tv3z9c= -github.com/aliyun/alibaba-cloud-sdk-go v1.63.80/go.mod h1:SOSDHfe1kX91v3W5QiBsWSLqeLxImobbMX1mxrFHsVQ= +github.com/aliyun/alibaba-cloud-sdk-go v1.63.83 h1:YBkf7H5CSgrlb3C1aWcpDt7Vk8UEGFPeD2OOirtt6IM= +github.com/aliyun/alibaba-cloud-sdk-go v1.63.83/go.mod h1:SOSDHfe1kX91v3W5QiBsWSLqeLxImobbMX1mxrFHsVQ= github.com/aliyun/aliyun-oss-go-sdk v3.0.2+incompatible h1:8psS8a+wKfiLt1iVDX79F7Y6wUM49Lcha2FMXt4UM8g= github.com/aliyun/aliyun-oss-go-sdk v3.0.2+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8= github.com/aliyun/credentials-go v1.1.2/go.mod h1:ozcZaMR5kLM7pwtCMEpVmQ242suV6qTJya2bDq4X1Tw= github.com/aliyun/credentials-go v1.3.1/go.mod h1:8jKYhQuDawt8x2+fusqa1Y6mPxemTsBEN04dgcAcYz0= github.com/aliyun/credentials-go v1.3.6/go.mod h1:1LxUuX7L5YrZUWzBrRyk0SwSdH4OmPrib8NVePL3fxM= -github.com/aliyun/credentials-go v1.3.10 h1:45Xxrae/evfzQL9V10zL3xX31eqgLWEaIdCoPipOEQA= github.com/aliyun/credentials-go v1.3.10/go.mod h1:Jm6d+xIgwJVLVWT561vy67ZRP4lPTQxMbEYRuT2Ti1U= +github.com/aliyun/credentials-go v1.4.3 h1:N3iHyvHRMyOwY1+0qBLSf3hb5JFiOujVSVuEpgeGttY= +github.com/aliyun/credentials-go v1.4.3/go.mod h1:Jm6d+xIgwJVLVWT561vy67ZRP4lPTQxMbEYRuT2Ti1U= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= @@ -209,50 +210,50 @@ github.com/aws/aws-sdk-go v1.40.45/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm github.com/aws/aws-sdk-go v1.55.5 h1:KKUZBfBoyqy5d3swXyiC7Q76ic40rYcbqH7qjh59kzU= github.com/aws/aws-sdk-go v1.55.5/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU= github.com/aws/aws-sdk-go-v2 v1.9.1/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= -github.com/aws/aws-sdk-go-v2 v1.32.7 h1:ky5o35oENWi0JYWUZkB7WYvVPP+bcRF5/Iq7JWSb5Rw= -github.com/aws/aws-sdk-go-v2 v1.32.7/go.mod h1:P5WJBrYqqbWVaOxgH0X/FYYD47/nooaPOZPlQdmiN2U= +github.com/aws/aws-sdk-go-v2 v1.33.0 h1:Evgm4DI9imD81V0WwD+TN4DCwjUMdc94TrduMLbgZJs= +github.com/aws/aws-sdk-go-v2 v1.33.0/go.mod h1:P5WJBrYqqbWVaOxgH0X/FYYD47/nooaPOZPlQdmiN2U= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.7 h1:lL7IfaFzngfx0ZwUGOZdsFFnQ5uLvR0hWqqhyE7Q9M8= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.7/go.mod h1:QraP0UcVlQJsmHfioCrveWOC1nbiWUl3ej08h4mXWoc= -github.com/aws/aws-sdk-go-v2/config v1.28.7 h1:GduUnoTXlhkgnxTD93g1nv4tVPILbdNQOzav+Wpg7AE= -github.com/aws/aws-sdk-go-v2/config v1.28.7/go.mod h1:vZGX6GVkIE8uECSUHB6MWAUsd4ZcG2Yq/dMa4refR3M= -github.com/aws/aws-sdk-go-v2/credentials v1.17.48 h1:IYdLD1qTJ0zanRavulofmqut4afs45mOWEI+MzZtTfQ= -github.com/aws/aws-sdk-go-v2/credentials v1.17.48/go.mod h1:tOscxHN3CGmuX9idQ3+qbkzrjVIx32lqDSU1/0d/qXs= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.22 h1:kqOrpojG71DxJm/KDPO+Z/y1phm1JlC8/iT+5XRmAn8= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.22/go.mod h1:NtSFajXVVL8TA2QNngagVZmUtXciyrHOt7xgz4faS/M= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.44 h1:2zxMLXLedpB4K1ilbJFxtMKsVKaexOqDttOhc0QGm3Q= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.44/go.mod h1:VuLHdqwjSvgftNC7yqPWyGVhEwPmJpeRi07gOgOfHF8= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.26 h1:I/5wmGMffY4happ8NOCuIUEWGUvvFp5NSeQcXl9RHcI= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.26/go.mod h1:FR8f4turZtNy6baO0KJ5FJUmXH/cSkI9fOngs0yl6mA= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.26 h1:zXFLuEuMMUOvEARXFUVJdfqZ4bvvSgdGRq/ATcrQxzM= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.26/go.mod h1:3o2Wpy0bogG1kyOPrgkXA8pgIfEEv0+m19O9D5+W8y8= +github.com/aws/aws-sdk-go-v2/config v1.29.0 h1:Vk/u4jof33or1qAQLdofpjKV7mQQT7DcUpnYx8kdmxY= +github.com/aws/aws-sdk-go-v2/config v1.29.0/go.mod h1:iXAZK3Gxvpq3tA+B9WaDYpZis7M8KFgdrDPMmHrgbJM= +github.com/aws/aws-sdk-go-v2/credentials v1.17.53 h1:lwrVhiEDW5yXsuVKlFVUnR2R50zt2DklhOyeLETqDuE= +github.com/aws/aws-sdk-go-v2/credentials v1.17.53/go.mod h1:CkqM1bIw/xjEpBMhBnvqUXYZbpCFuj6dnCAyDk2AtAY= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.24 h1:5grmdTdMsovn9kPZPI23Hhvp0ZyNm5cRO+IZFIYiAfw= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.24/go.mod h1:zqi7TVKTswH3Ozq28PkmBmgzG1tona7mo9G2IJg4Cis= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.51 h1:Q0FNHs6JTGuoBWNQycD5LRSf+/WVHWEl+FwJ0tEDZUE= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.51/go.mod h1:B9sW5/AD5bStKdTyUdz1xWRKOwnyUwJ4eJ4olQBtZo0= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.28 h1:igORFSiH3bfq4lxKFkTSYDhJEUCYo6C8VKiWJjYwQuQ= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.28/go.mod h1:3So8EA/aAYm36L7XIvCVwLa0s5N0P7o2b1oqnx/2R4g= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.28 h1:1mOW9zAUMhTSrMDssEHS/ajx8JcAj/IcftzcmNlmVLI= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.28/go.mod h1:kGlXVIWDfvt2Ox5zEaNglmq0hXPHgQFNMix33Tw22jA= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 h1:VaRN3TlFdd6KxX1x3ILT5ynH6HvKgqdiXoTxAF4HQcQ= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1/go.mod h1:FbtygfRFze9usAadmnGJNc8KsP346kEe+y2/oyhGAGc= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.26 h1:GeNJsIFHB+WW5ap2Tec4K6dzcVTsRbsT1Lra46Hv9ME= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.26/go.mod h1:zfgMpwHDXX2WGoG84xG2H+ZlPTkJUU4YUvx2svLQYWo= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.28 h1:7kpeALOUeThs2kEjlAxlADAVfxKmkYAedlpZ3kdoSJ4= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.28/go.mod h1:pyaOYEdp1MJWgtXLy6q80r3DhsVdOIOZNB9hdTcJIvI= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.8.1/go.mod h1:CM+19rL1+4dFWnOQKwDc7H1KwXTz+h61oUSHyhV0b3o= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1 h1:iXtILhvDxB6kPvEXgsDhGaZCSC6LQET5ZHSdJozeI0Y= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1/go.mod h1:9nu0fVANtYiAePIBh2/pFUSwtJ402hLnp854CNoDOeE= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.4.7 h1:tB4tNw83KcajNAzaIMhkhVI2Nt8fAZd5A5ro113FEMY= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.4.7/go.mod h1:lvpyBGkZ3tZ9iSsUIcC2EWp+0ywa7aK3BLT+FwZi+mQ= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.7 h1:8eUsivBQzZHqe/3FE+cqwfH+0p5Jo8PFM/QYQSmeZ+M= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.7/go.mod h1:kLPQvGUmxn/fqiCrDeohwG33bq2pQpGeY62yRO6Nrh0= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.7 h1:Hi0KGbrnr57bEHWM0bJ1QcBzxLrL/k2DHvGYhb8+W1w= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.7/go.mod h1:wKNgWgExdjjrm4qvfbTorkvocEstaoDl4WCvGfeCy9c= -github.com/aws/aws-sdk-go-v2/service/route53 v1.46.4 h1:0jMtawybbfpFEIMy4wvfyW2Z4YLr7mnuzT0fhR67Nrc= -github.com/aws/aws-sdk-go-v2/service/route53 v1.46.4/go.mod h1:xlMODgumb0Pp8bzfpojqelDrf8SL9rb5ovwmwKJl+oU= -github.com/aws/aws-sdk-go-v2/service/s3 v1.71.1 h1:aOVVZJgWbaH+EJYPvEgkNhCEbXXvH7+oML36oaPK3zE= -github.com/aws/aws-sdk-go-v2/service/s3 v1.71.1/go.mod h1:r+xl5yzMk9083rMR+sJ5TYj9Tihvf/l1oxzZXDgGj2Q= -github.com/aws/aws-sdk-go-v2/service/sso v1.24.8 h1:CvuUmnXI7ebaUAhbJcDy9YQx8wHR69eZ9I7q5hszt/g= -github.com/aws/aws-sdk-go-v2/service/sso v1.24.8/go.mod h1:XDeGv1opzwm8ubxddF0cgqkZWsyOtw4lr6dxwmb6YQg= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.7 h1:F2rBfNAL5UyswqoeWv9zs74N/NanhK16ydHW1pahX6E= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.7/go.mod h1:JfyQ0g2JG8+Krq0EuZNnRwX0mU0HrwY/tG6JNfcqh4k= -github.com/aws/aws-sdk-go-v2/service/sts v1.33.3 h1:Xgv/hyNgvLda/M9l9qxXc4UFSgppnRczLxlMs5Ae/QY= -github.com/aws/aws-sdk-go-v2/service/sts v1.33.3/go.mod h1:5Gn+d+VaaRgsjewpMvGazt0WfcFO+Md4wLOuBfGR9Bc= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.5.1 h1:mJ9FRktB8v1Ihpqwfk0AWvYEd0FgQtLsshc2Qb2TVc8= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.5.1/go.mod h1:dIW8puxSbYLSPv/ju0d9A3CpwXdtqvJtYKDMVmPLOWE= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.9 h1:TQmKDyETFGiXVhZfQ/I0cCFziqqX58pi4tKJGYGFSz0= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.9/go.mod h1:HVLPK2iHQBUx7HfZeOQSEu3v2ubZaAY2YPbAm5/WUyY= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.9 h1:2aInXbh02XsbO0KobPGMNXyv2QP73VDKsWPNJARj/+4= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.9/go.mod h1:dgXS1i+HgWnYkPXqNoPIPKeUsUUYHaUbThC90aDnNiE= +github.com/aws/aws-sdk-go-v2/service/route53 v1.48.1 h1:njgAP7Rtt4DGdTGFPhJ4gaZXCD1CDj/SZDa5W4ZgSTs= +github.com/aws/aws-sdk-go-v2/service/route53 v1.48.1/go.mod h1:TN4PcCL0lvqmYcv+AV8iZFC4Sd0FM06QDaoBXrFEftU= +github.com/aws/aws-sdk-go-v2/service/s3 v1.73.1 h1:OzmyfYGiMCOIAq5pa0KWcaZoA9F8FqajOJevh+hhFdY= +github.com/aws/aws-sdk-go-v2/service/s3 v1.73.1/go.mod h1:K+0a0kWDHAUXBH8GvYGS3cQRwIuRjO9bMWUz6vpNCaU= +github.com/aws/aws-sdk-go-v2/service/sso v1.24.10 h1:DyZUj3xSw3FR3TXSwDhPhuZkkT14QHBiacdbUVcD0Dg= +github.com/aws/aws-sdk-go-v2/service/sso v1.24.10/go.mod h1:Ro744S4fKiCCuZECXgOi760TiYylUM8ZBf6OGiZzJtY= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.9 h1:I1TsPEs34vbpOnR81GIcAq4/3Ud+jRHVGwx6qLQUHLs= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.9/go.mod h1:Fzsj6lZEb8AkTE5S68OhcbBqeWPsR8RnGuKPr8Todl8= +github.com/aws/aws-sdk-go-v2/service/sts v1.33.8 h1:pqEJQtlKWvnv3B6VRt60ZmsHy3SotlEBvfUBPB1KVcM= +github.com/aws/aws-sdk-go-v2/service/sts v1.33.8/go.mod h1:f6vjfZER1M17Fokn0IzssOTMT2N8ZSq+7jnNF0tArvw= github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= github.com/aws/smithy-go v1.22.1 h1:/HPHZQ0g7f4eUeK6HKglFz8uwVfZKgoI25rb/J+dnro= github.com/aws/smithy-go v1.22.1/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= -github.com/baidubce/bce-sdk-go v0.9.209 h1:2UaYKD5D2kia+8bhLlqhYWZdhhGnx8vgHfHX7YUpXPg= -github.com/baidubce/bce-sdk-go v0.9.209/go.mod h1:zbYJMQwE4IZuyrJiFO8tO8NbtYiKTFTbwh4eIsqjVdg= +github.com/baidubce/bce-sdk-go v0.9.214 h1:bsVfwMh/emI6vreEveUEq9xAr6xtHLycTAGy2K7kvKM= +github.com/baidubce/bce-sdk-go v0.9.214/go.mod h1:zbYJMQwE4IZuyrJiFO8tO8NbtYiKTFTbwh4eIsqjVdg= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= @@ -260,8 +261,8 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/blinkbean/dingtalk v1.1.3 h1:MbidFZYom7DTFHD/YIs+eaI7kRy52kmWE/sy0xjo6E4= github.com/blinkbean/dingtalk v1.1.3/go.mod h1:9BaLuGSBqY3vT5hstValh48DbsKO7vaHaJnG9pXwbto= -github.com/byteplus-sdk/byteplus-sdk-golang v1.0.35 h1:bM18V4iw9ylRc2LahQaq3k3gjEVJdyQYvptLVZaCa54= -github.com/byteplus-sdk/byteplus-sdk-golang v1.0.35/go.mod h1:7iCaE+dR9EycrJU0GQyMhptbInLbQhsKXiDKDjNi8Vs= +github.com/byteplus-sdk/byteplus-sdk-golang v1.0.40 h1:DIVVXfeIg4FXdN1pIoL3Q8YoC/VXu5nn2zcDKFHqe6s= +github.com/byteplus-sdk/byteplus-sdk-golang v1.0.40/go.mod h1:7iCaE+dR9EycrJU0GQyMhptbInLbQhsKXiDKDjNi8Vs= github.com/casbin/casbin/v2 v2.37.0/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/cenkalti/backoff/v4 v4.1.2/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= @@ -283,11 +284,11 @@ github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6D github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/clbanning/mxj v1.8.4/go.mod h1:BVjHeAH+rl9rs6f+QIpeRl0tfu10SXn1pUSa5PVGJng= github.com/clbanning/mxj/v2 v2.5.5/go.mod h1:hNiWqW14h+kc+MdF9C6/YoRfjEJoR3ou6tn/Qo+ve2s= -github.com/clbanning/mxj/v2 v2.5.6 h1:Jm4VaCI/+Ug5Q57IzEoZbwx4iQFA6wkXv72juUSeK+g= -github.com/clbanning/mxj/v2 v2.5.6/go.mod h1:hNiWqW14h+kc+MdF9C6/YoRfjEJoR3ou6tn/Qo+ve2s= +github.com/clbanning/mxj/v2 v2.7.0 h1:WA/La7UGCanFe5NpHF0Q3DNtnCsVoxbPKuyBNHWRyME= +github.com/clbanning/mxj/v2 v2.7.0/go.mod h1:hNiWqW14h+kc+MdF9C6/YoRfjEJoR3ou6tn/Qo+ve2s= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudflare/cloudflare-go v0.112.0 h1:caFwqXdGJCl3rjVMgbPEn8iCYAg9JsRYV3dIVQE5d7g= -github.com/cloudflare/cloudflare-go v0.112.0/go.mod h1:QB55kuJ5ZTeLNFcLJePfMuBilhu/LDKpLBmKFQIoSZ0= +github.com/cloudflare/cloudflare-go v0.114.0 h1:ucoti4/7Exo0XQ+rzpn1H+IfVVe++zgiM+tyKtf0HUA= +github.com/cloudflare/cloudflare-go v0.114.0/go.mod h1:O7fYfFfA6wKqKFn2QIR9lhj7FDw6VQCGOY6hd2TBtd0= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= @@ -319,10 +320,8 @@ github.com/eapache/go-resiliency v1.2.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5m github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/elastic/go-sysinfo v1.0.2/go.mod h1:O/D5m1VpYLwGjCYzEt63g3Z1uO3jXfwyzzjiW90t8cY= -github.com/elastic/go-windows v1.0.0/go.mod h1:TsU0Nrp7/y3+VwE82FoZF8gC/XFg/Elz6CcloAxnPgU= -github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= -github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.12.1 h1:PJMDIM/ak7btuL8Ex0iYET9hxM3CI2sjZtzpL63nKAU= +github.com/emicklei/go-restful/v3 v3.12.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -352,8 +351,8 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= -github.com/gabriel-vasile/mimetype v1.4.7 h1:SKFKl7kD0RiPdbht0s7hFtjl489WcQ1VyPW8ZzUMYCA= -github.com/gabriel-vasile/mimetype v1.4.7/go.mod h1:GDlAgAyIRT27BhFl53XNAFtfjzOkLaF35JdEG0P7LtU= +github.com/gabriel-vasile/mimetype v1.4.8 h1:FfZ3gj38NjllZIeJAmMhr+qKL8Wu+nOoI3GqacKw1NM= +github.com/gabriel-vasile/mimetype v1.4.8/go.mod h1:ByKUIKGjh1ODkGM1asKUbQZOLGrPjydw3hYPU2YU9t8= github.com/gammazero/toposort v0.1.1/go.mod h1:H2cozTnNpMw0hg2VHAYsAxmkHXBYroNangj2NTBQDvw= github.com/ganigeorgiev/fexpr v0.4.1 h1:hpUgbUEEWIZhSDBtf4M9aUNfQQ0BZkGRaMePy7Gcx5k= github.com/ganigeorgiev/fexpr v0.4.1/go.mod h1:RyGiGqmeXhEQ6+mlGdnUleLHgtzzu/VGO2WtJkF5drE= @@ -370,8 +369,8 @@ github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2 github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-lark/lark v1.15.0 h1:wzfzK9j85BrbFYcjxGZSjJiXbOxHQYkKjIClUwyT9XU= -github.com/go-lark/lark v1.15.0/go.mod h1:6ltbSztPZRT6IaO9ZIQyVaY5pVp/KeMizDYtfZkU+vM= +github.com/go-lark/lark v1.15.1 h1:fo6PQKBJht/71N9Zn3/xjknOYx0TmdVuP+VP8NrUCsI= +github.com/go-lark/lark v1.15.1/go.mod h1:6ltbSztPZRT6IaO9ZIQyVaY5pVp/KeMizDYtfZkU+vM= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= @@ -380,12 +379,10 @@ github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/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-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= -github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= -github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= -github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-openapi/jsonreference v0.21.0 h1:Rs+Y7hSXT83Jacb7kFyjn4ijOuVGSvOdF2+tg1TRrwQ= +github.com/go-openapi/jsonreference v0.21.0/go.mod h1:LmZmgsrTkVg9LG4EaHeY8cBDslNPMo06cago5JNLkm4= github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= github.com/go-ozzo/ozzo-validation/v4 v4.3.0 h1:byhDUpfEwjsVQb1vBunvIjh2BHQ9ead57VkAEY4V+Es= @@ -463,8 +460,8 @@ github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= -github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= +github.com/google/gnostic-models v0.6.9 h1:MU/8wDLif2qCXZmzncUQ/BOfxWfthHi63KqpoNbWqVw= +github.com/google/gnostic-models v0.6.9/go.mod h1:CiWsm0s6BSQd1hRn8/QmxqB6BesYcbSZxsz9b0KuDBw= 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= @@ -498,8 +495,8 @@ github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db h1:097atOisP2aRj7vFgYQBbFN4U4JNXUNYpxael3UzMyo= github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/s2a-go v0.1.8 h1:zZDs9gcbt9ZPLV0ndSyQk6Kacx2g/X+SKYovpnz3SMM= -github.com/google/s2a-go v0.1.8/go.mod h1:6iNWHTpQ+nfNRN5E00MSdfDwVesa8hhS32PhPO8deJA= +github.com/google/s2a-go v0.1.9 h1:LGD7gtMgezd8a/Xak7mEWL0PjoTQFvpRudN895yqKW0= +github.com/google/s2a-go v0.1.9/go.mod h1:YA0Ei2ZQL3acow2O62kdp9UlnvMmU7kA6Eutn0dXayM= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= @@ -554,8 +551,8 @@ github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKEN github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec h1:qv2VnGeEQHchGaZ/u7lxST/RaJw+cv273q79D81Xbog= github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec/go.mod h1:Q48J4R4DvxnHolD5P8pOtXigYlRuPLGl6moFx3ulM68= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/huaweicloud/huaweicloud-sdk-go-v3 v0.1.128 h1:kQ2Agpfy7Ze1ajn9xCQG9G6T7XIbqv+FBDS/U98W9Mk= -github.com/huaweicloud/huaweicloud-sdk-go-v3 v0.1.128/go.mod h1:JWz2ujO9X3oU5wb6kXp+DpR2UuDj2SldDbX8T0FSuhI= +github.com/huaweicloud/huaweicloud-sdk-go-v3 v0.1.132 h1:5LqzrJa8LADcY0sDEdV35e8nbwI7RoUQEt+KXWvWoY0= +github.com/huaweicloud/huaweicloud-sdk-go-v3 v0.1.132/go.mod h1:JWz2ujO9X3oU5wb6kXp+DpR2UuDj2SldDbX8T0FSuhI= github.com/hudl/fargo v1.4.0/go.mod h1:9Ai6uvFy5fQNq6VPKtg+Ceq1+eTY4nKUlR2JElEOcDo= github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= @@ -573,7 +570,6 @@ github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9Y github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901/go.mod h1:Z86h9688Y0wesXCyonoVr47MasHilkuLMqGhRZ4Hpak= 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/jordan-wright/email v4.0.1-0.20210109023952-943e75fe5223+incompatible h1:jdpOPRN1zP63Td1hDQbZW73xKmzDvZHzVdNYxhnTMDA= @@ -619,30 +615,25 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/labstack/echo/v5 v5.0.0-20230722203903-ec5b858dab61 h1:FwuzbVh87iLiUQj1+uQUsuw9x5t9m5n5g7rG7o4svW4= -github.com/labstack/echo/v5 v5.0.0-20230722203903-ec5b858dab61/go.mod h1:paQfF1YtHe+GrGg5fOgjsjoCX/UKDr9bc1DoWpZfns8= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= -github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= -github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mailru/easyjson v0.9.0 h1:PrnmzHw7262yW8sTBwxi1PdJA3Iw/EKBa8psRf7d9a4= +github.com/mailru/easyjson v0.9.0/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= -github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE= +github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU= -github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d h1:5PJl274Y63IEHC+7izoQE9x6ikvDFZS2mDVS3drnohI= @@ -684,8 +675,8 @@ github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OS github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4= github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nikoksr/notify v1.1.0 h1:IMw9p5ARDtKzZQmQSUy2+2LU/PPwBCdwQg2lCZh9EvY= -github.com/nikoksr/notify v1.1.0/go.mod h1:joe1r6qqAznTHzkC734Li8hxxVAYxzO6phBtMLfOVuo= +github.com/nikoksr/notify v1.3.0 h1:UxzfxzAYGQD9a5JYLBTVx0lFMxeHCke3rPCkfWdPgLs= +github.com/nikoksr/notify v1.3.0/go.mod h1:Xor2hMmkvrCfkCKvXGbcrESez4brac2zQjhd6U2BbeM= github.com/nrdcg/namesilo v0.2.1 h1:kLjCjsufdW/IlC+iSfAqj0iQGgKjlbUUeDJio5Y6eMg= github.com/nrdcg/namesilo v0.2.1/go.mod h1:lwMvfQTyYq+BbjJd30ylEG4GPSS6PII0Tia4rRpRiyw= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= @@ -732,8 +723,8 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRI github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pocketbase/dbx v1.11.0 h1:LpZezioMfT3K4tLrqA55wWFw1EtH1pM4tzSVa7kgszU= github.com/pocketbase/dbx v1.11.0/go.mod h1:xXRCIAKTHMgUCyCKZm55pUOdvFziJjQfXaWKhu2vhMs= -github.com/pocketbase/pocketbase v0.22.21 h1:DGPCxn6co8VuTV0mton4NFO/ON49XiFMszRr+Mysy48= -github.com/pocketbase/pocketbase v0.22.21/go.mod h1:Cw5E4uoGhKItBIE2lJL3NfmiUr9Syk2xaNJ2G7Dssow= +github.com/pocketbase/pocketbase v0.24.3 h1:WUrzW11ijCySlDsVRHon3HXdtiratWv+ODK26/k6cI8= +github.com/pocketbase/pocketbase v0.24.3/go.mod h1:EfXV/8RUY76jA6g1RPNHjOuW7wTd2bz0QlvAI/RU8YY= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= @@ -751,20 +742,19 @@ github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB8 github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190425082905-87a4384529e0/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/qiniu/dyn v1.3.0/go.mod h1:E8oERcm8TtwJiZvkQPbcAh0RL8jO1G0VXJMW3FAWdkk= -github.com/qiniu/go-sdk/v7 v7.25.1 h1:fynXKE2RP9XYkispAI3YI+eML39JFEx2+PLYP46ephA= -github.com/qiniu/go-sdk/v7 v7.25.1/go.mod h1:uZE85Pi0ftIHT/UNLShosdzwsovqpdas0LwAGO7cPao= +github.com/qiniu/go-sdk/v7 v7.25.2 h1:URwgZpxySdiwu2yQpHk93X4LXWHyFRp1x3Vmlk/YWvo= +github.com/qiniu/go-sdk/v7 v7.25.2/go.mod h1:dmKtJ2ahhPWFVi9o1D5GemmWoh/ctuB9peqTowyTO8o= github.com/qiniu/x v1.10.5/go.mod h1:03Ni9tj+N2h2aKnAz+6N0Xfl8FwMEDRC2PAlxekASDs= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/redis/go-redis/v9 v9.6.1 h1:HHDteefn6ZkTtY5fGUE8tj8uy85AHk6zP7CpzIAM0y4= -github.com/redis/go-redis/v9 v9.6.1/go.mod h1:0C0c6ycQsdpVNQpxb1njEQIqkx5UcsM8FJCQLgE9+RA= +github.com/redis/go-redis/v9 v9.7.0 h1:HhLSs+B6O021gwzl+locl0zEDnyNkxMtf/Z3NNBMa9E= +github.com/redis/go-redis/v9 v9.7.0/go.mod h1:f6zhXITC7JUJIlPEiBOTXxJgPLdZcA93GewI7inzyWw= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= @@ -822,21 +812,20 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/technoweenie/multipartstreamer v1.0.1 h1:XRztA5MXiR1TIRHxH2uNxXxaIkKQDeX7m2XsSOlQEnM= github.com/technoweenie/multipartstreamer v1.0.1/go.mod h1:jNVxdtShOxzAsukZwTSw6MDx5eUJoiEBsSvzDU9uzog= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cdn v1.0.1065 h1:q0Op2QlMmag0R2vZX08GvOh0T29dcUqc+aIHF6a1sIE= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cdn v1.0.1065/go.mod h1:UiS7HMWbxGhO/y7nmnHuBMyP4qEDmJeooK6YKWNMuEw= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/clb v1.0.1065 h1:Kb/l5yh9M6Ow59ZRAMcdIBxsNT3uy8fZYh8xy2rM+xQ= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/clb v1.0.1065/go.mod h1:bgwicHdrBXLcgB4mQd8pWbSNuM7fIAjhxHfdZ/Hb7p4= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1065/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1080 h1:N+Urn1Sva75ZoYh9Gjf7A4kJAA3wWItxsoxyADZBol4= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1080/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dnspod v1.0.1065 h1:aEFtLD1ceyeljQXB1S2BjN0zjTkf0X3XmpuxFIiC29w= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dnspod v1.0.1065/go.mod h1:HWvwy09hFSMXrj9SMvVRWV4U7rZO3l+WuogyNuxiT3M= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/live v1.0.1080 h1:ygmXHhIedpjo0yFe6LbB+4ygHaVK8mnrwBAllfw7cX8= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/live v1.0.1080/go.mod h1:UuvtB7f2kQMCBC5vt8hbjWGEba8qzf5YWP+C3VLKY6w= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ssl v1.0.1065 h1:rHI/2WYmEBfnqVNo5iUy0gu0J7ekFBE/NDV/oKZv448= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ssl v1.0.1065/go.mod h1:nnd6/G8xfl7RMsm2XYdQT5SfjdxG/U09QaC6qO89JJg= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo v1.0.1065 h1:gDuqak8/kNgF99+ksk70JHjI1Poa5pmrgYDW6xYya8I= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo v1.0.1065/go.mod h1:r6yv70O5CZLsVhz6z05ZTGVUYxKQtGE2p90mopsR014= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cdn v1.0.1084 h1:5Iz0/XXuUU1MdKrmvccQLAk+llp7bEk36h984qE8T9Y= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cdn v1.0.1084/go.mod h1:3nbV34YVSizZRIqFx1dgNp4ef8omgIebKaLR9F5bICM= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/clb v1.0.1084 h1:/71/twaTjtN5Hj9iMQaq4Zf20whqKcRO8FExzQMQzdM= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/clb v1.0.1084/go.mod h1:i/+RxtoN5tjr68alWwo99kNNE7mNPYg2liUFvAwNtJk= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1084 h1:kVMffrA57uPQvNaPBXSp1NJPiz+Y0a/bxqiEVBjrZAI= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1084/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dnspod v1.0.1084 h1:kwctN0WQYt8/iKP+iRCTCwdzEMIXsXklbRIib5rjeQ8= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dnspod v1.0.1084/go.mod h1:qE67ApiBzeRvzeDsV+GxyIDbVIDemsKpHXllQATz/Vw= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/live v1.0.1084 h1:5qycOmUrfeOXluBDdULUZdbadZsvNqdpXgkt3SfZGSI= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/live v1.0.1084/go.mod h1:tEa+1jYkcgrFo4Y13orgk3D3BySAwnrZ1T+lnAU+3Q8= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ssl v1.0.1084 h1:NBRaaKBeZKhGhpZkXKnAT8HWMQuV15QPNApBjB+4C8k= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ssl v1.0.1084/go.mod h1:+VVUGbyLN66PdAu7+qM0gTNKQ8JH02eJSaImGGg+UzU= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo v1.0.1084 h1:Tcl6f/fBt+y7KmhlRcCMenm4wRNf8z1fm0jrhDmIkaQ= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo v1.0.1084/go.mod h1:hBCyZEVg22KuOIaiUc7M2mjXWpCwa8Q3T1X6h+3EPCA= github.com/tjfoc/gmsm v1.3.2/go.mod h1:HaUcFuY0auTiaHB9MHFGCPx5IaLhTUd2atbCFBQXn9w= github.com/tjfoc/gmsm v1.4.1 h1:aMe1GlZb+0bLjn+cKTPEvvn9oUEBlJitaZiiBwsbgho= github.com/tjfoc/gmsm v1.4.1/go.mod h1:j4INPkHWMrhJb38G+J6W4Tw0AbuN8Thu3PbdVYhVcTE= @@ -848,17 +837,13 @@ github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6 github.com/ucloud/ucloud-sdk-go v0.22.31 h1:izZK+Re9ZkJAd1fHSVpFzgh8uKda4f5G6++iUw4n/mE= github.com/ucloud/ucloud-sdk-go v0.22.31/go.mod h1:dyLmFHmUfgb4RZKYQP9IArlvQ2pxzFthfhwxRzOEPIw= github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= -github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo= -github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= github.com/volcengine/ve-tos-golang-sdk/v2 v2.7.8 h1:/vB6jop4i70Ys8KAzK0xZfbMzMggJsTnIp6gZYnnSFM= github.com/volcengine/ve-tos-golang-sdk/v2 v2.7.8/go.mod h1:IrjK84IJJTuOZOTMv/P18Ydjy/x+ow7fF7q11jAxXLM= github.com/volcengine/volc-sdk-golang v1.0.23/go.mod h1:AfG/PZRUkHJ9inETvbjNifTDgut25Wbkm2QoYBTbvyU= -github.com/volcengine/volc-sdk-golang v1.0.189 h1:VMDTHWYXakXJtZqPYn0As/h4eB0c4imvyru6mIp+o60= -github.com/volcengine/volc-sdk-golang v1.0.189/go.mod h1:u0VtPvlXWpXDTmc9IHkaW1q+5Jjwus4oAqRhNMDRInE= -github.com/volcengine/volcengine-go-sdk v1.0.177 h1:Z5D8BZAR1ilH7bLtRjBVP/I0QOIk7G/xuLvjeSJIax0= -github.com/volcengine/volcengine-go-sdk v1.0.177/go.mod h1:gfEDc1s7SYaGoY+WH2dRrS3qiuDJMkwqyfXWCa7+7oA= +github.com/volcengine/volc-sdk-golang v1.0.193 h1:mL1rlk+m9SaqF2MSGFWfigEaz10ZVJiYDnFuWfj65Ww= +github.com/volcengine/volc-sdk-golang v1.0.193/go.mod h1:u0VtPvlXWpXDTmc9IHkaW1q+5Jjwus4oAqRhNMDRInE= +github.com/volcengine/volcengine-go-sdk v1.0.178 h1:lCu2JuWOoIZAjNfJSBi/KLTWVFdvejLXsBrNE1wgCIU= +github.com/volcengine/volcengine-go-sdk v1.0.178/go.mod h1:gfEDc1s7SYaGoY+WH2dRrS3qiuDJMkwqyfXWCa7+7oA= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= @@ -878,8 +863,9 @@ go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQc go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= -go.mongodb.org/mongo-driver v1.12.0 h1:aPx33jmn/rQuJXPQLZQ8NtfPQG8CaqgLThFtqRb0PiE= go.mongodb.org/mongo-driver v1.12.0/go.mod h1:AZkxhPnFJUoH7kZlFkVKucV20K387miPfm7oimrSmK0= +go.mongodb.org/mongo-driver v1.17.2 h1:gvZyk8352qSfzyZ2UMWcpDpMSGEr1eqE4T793SqyhzM= +go.mongodb.org/mongo-driver v1.17.2/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -888,22 +874,22 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= 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/detectors/gcp v1.31.0 h1:G1JQOreVrfhRkner+l4mrGxmfqYCAuy76asTDAo0xsA= -go.opentelemetry.io/contrib/detectors/gcp v1.31.0/go.mod h1:tzQL6E1l+iV44YFTkcAeNQqzXUiekSYP9jjJjXwEd00= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.56.0 h1:yMkBS9yViCc7U7yeLzJPM2XizlfdVvBRSmsQDWu6qc0= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.56.0/go.mod h1:n8MR6/liuGB5EmTETUBeU5ZgqMOlqKRxUaqPQBOANZ8= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.56.0 h1:UP6IpuHFkUgOQL9FFQFrZ+5LiwhhYRbi7VZSIx6Nj5s= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.56.0/go.mod h1:qxuZLtbq5QDtdeSHsS7bcf6EH6uO6jUAgk764zd3rhM= -go.opentelemetry.io/otel v1.31.0 h1:NsJcKPIW0D0H3NgzPDHmo0WW6SptzPdqg/L1zsIm2hY= -go.opentelemetry.io/otel v1.31.0/go.mod h1:O0C14Yl9FgkjqcCZAsE053C13OaddMYr/hz6clDkEJE= -go.opentelemetry.io/otel/metric v1.31.0 h1:FSErL0ATQAmYHUIzSezZibnyVlft1ybhy4ozRPcF2fE= -go.opentelemetry.io/otel/metric v1.31.0/go.mod h1:C3dEloVbLuYoX41KpmAhOqNriGbA+qqH6PQ5E5mUfnY= -go.opentelemetry.io/otel/sdk v1.31.0 h1:xLY3abVHYZ5HSfOg3l2E5LUj2Cwva5Y7yGxnSW9H5Gk= -go.opentelemetry.io/otel/sdk v1.31.0/go.mod h1:TfRbMdhvxIIr/B2N2LQW2S5v9m3gOQ/08KsbbO5BPT0= -go.opentelemetry.io/otel/sdk/metric v1.31.0 h1:i9hxxLJF/9kkvfHppyLL55aW7iIJz4JjxTeYusH7zMc= -go.opentelemetry.io/otel/sdk/metric v1.31.0/go.mod h1:CRInTMVvNhUKgSAMbKyTMxqOBC0zgyxzW55lZzX43Y8= -go.opentelemetry.io/otel/trace v1.31.0 h1:ffjsj1aRouKewfr85U2aGagJ46+MvodynlQ1HYdmJys= -go.opentelemetry.io/otel/trace v1.31.0/go.mod h1:TXZkRk7SM2ZQLtR6eoAWQFIHPvzQ06FJAsO1tJg480A= +go.opentelemetry.io/contrib/detectors/gcp v1.32.0 h1:P78qWqkLSShicHmAzfECaTgvslqHxblNE9j62Ws1NK8= +go.opentelemetry.io/contrib/detectors/gcp v1.32.0/go.mod h1:TVqo0Sda4Cv8gCIixd7LuLwW4EylumVWfhjZJjDD4DU= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.57.0 h1:qtFISDHKolvIxzSs0gIaiPUPR0Cucb0F2coHC7ZLdps= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.57.0/go.mod h1:Y+Pop1Q6hCOnETWTW4NROK/q1hv50hM7yDaUTjG8lp8= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.57.0 h1:DheMAlT6POBP+gh8RUH19EOTnQIor5QE0uSRPtzCpSw= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.57.0/go.mod h1:wZcGmeVO9nzP67aYSLDqXNWK87EZWhi7JWj1v7ZXf94= +go.opentelemetry.io/otel v1.32.0 h1:WnBN+Xjcteh0zdk01SVqV55d/m62NJLJdIyb4y/WO5U= +go.opentelemetry.io/otel v1.32.0/go.mod h1:00DCVSB0RQcnzlwyTfqtxSm+DRr9hpYrHjNGiBHVQIg= +go.opentelemetry.io/otel/metric v1.32.0 h1:xV2umtmNcThh2/a/aCP+h64Xx5wsj8qqnkYZktzNa0M= +go.opentelemetry.io/otel/metric v1.32.0/go.mod h1:jH7CIbbK6SH2V2wE16W05BHCtIDzauciCRLoc/SyMv8= +go.opentelemetry.io/otel/sdk v1.32.0 h1:RNxepc9vK59A8XsgZQouW8ue8Gkb4jpWtJm9ge5lEG4= +go.opentelemetry.io/otel/sdk v1.32.0/go.mod h1:LqgegDBjKMmb2GC6/PrTnteJG39I8/vJCAP9LlJXEjU= +go.opentelemetry.io/otel/sdk/metric v1.32.0 h1:rZvFnvmvawYb0alrYkjraqJq0Z4ZUJAiyYCU9snn1CU= +go.opentelemetry.io/otel/sdk/metric v1.32.0/go.mod h1:PWeZlq0zt9YkYAp3gjKZ0eicRYvOh1Gd+X99x6GHpCQ= +go.opentelemetry.io/otel/trace v1.32.0 h1:WIC9mYrXf8TmY/EXuULKc8hR17vE+Hjv2cssQDe03fM= +go.opentelemetry.io/otel/trace v1.32.0/go.mod h1:+i4rkvCraA+tG6AzwloGaCtkx53Fa+L+V8e9a7YvhT8= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= @@ -1049,8 +1035,8 @@ golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.24.0 h1:KTBBxWqUa0ykRPLtV69rRto9TLXcqYkeswu48x/gvNE= -golang.org/x/oauth2 v0.24.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.25.0 h1:CY4y7XT9v0cRI9oupztF8AgiIu99L/ksR/Xp/6jrZ70= +golang.org/x/oauth2 v0.25.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= 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-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1078,7 +1064,6 @@ golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190425145619-16072639606e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1129,7 +1114,6 @@ golang.org/x/sys v0.0.0-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1182,8 +1166,8 @@ golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.8.0 h1:9i3RxcPv3PZnitoVGMPDKZSq1xW1gK1Xy3ArNOGZfEg= -golang.org/x/time v0.8.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.9.0 h1:EsRrnYcQiGH+5FfbgvV4AP7qEZstoyrHB0DzarOQ4ZY= +golang.org/x/time v0.9.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 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= @@ -1264,8 +1248,8 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.214.0 h1:h2Gkq07OYi6kusGOaT/9rnNljuXmqPnaig7WGPmKbwA= -google.golang.org/api v0.214.0/go.mod h1:bYPpLG8AyeMWwDU6NXoB00xC0DFkikVvd5MfwoxjLqE= +google.golang.org/api v0.217.0 h1:GYrUtD289o4zl1AhiTZL0jvQGa2RDLyC+kX1N/lfGOU= +google.golang.org/api v0.217.0/go.mod h1:qMc2E8cBAbQlRypBTBWHklNJlaZZJBwDv81B1Iu8oSI= 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/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1304,12 +1288,12 @@ google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20241021214115-324edc3d5d38 h1:Q3nlH8iSQSRUwOskjbcSMcF2jiYMNiQYZ0c2KEJLKKU= -google.golang.org/genproto v0.0.0-20241021214115-324edc3d5d38/go.mod h1:xBI+tzfqGGN2JBeSebfKXFSdBpWVQ7sLW40PTupVRm4= +google.golang.org/genproto v0.0.0-20241118233622-e639e219e697 h1:ToEetK57OidYuqD4Q5w+vfEnPvPpuTwedCNVohYJfNk= +google.golang.org/genproto v0.0.0-20241118233622-e639e219e697/go.mod h1:JJrvXBWRZaFMxBufik1a4RpFw4HhgVtBBWQeQgUj2cc= google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576 h1:CkkIfIt50+lT6NHAVoRYEyAvQGFM7xEwXUUywFvEb3Q= google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576/go.mod h1:1R3kvZ1dtP3+4p4d3G8uJ8rFk/fWlScl38vanWACI08= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241219192143-6b3ec007d9bb h1:3oy2tynMOP1QbTC0MsNNAV+Se8M2Bd0A5+x1QHyw+pI= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241219192143-6b3ec007d9bb/go.mod h1:lcTa1sDdWEIHMWlITnIczmw5w60CF9ffkb8Z+DVmmjA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f h1:OxYkA3wjPsZyBylwymxSHa7ViiW1Sml4ToBrncvFehI= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f/go.mod h1:+2Yz8+CLJbIfL9z73EW45avw8Lmge3xVElCP9zEKi50= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -1327,8 +1311,8 @@ google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.69.2 h1:U3S9QEtbXC0bYNvRtcoklF3xGtLViumSYxWykJS+7AU= -google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= +google.golang.org/grpc v1.69.4 h1:MF5TftSMkd8GLw/m0KM6V8CMOCY6NZ1NQDPGFgbTt4A= +google.golang.org/grpc v1.69.4/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= 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= @@ -1344,8 +1328,8 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.36.0 h1:mjIs9gYtt56AzC4ZaffQuh88TZurBGhIJMBZGSxNerQ= -google.golang.org/protobuf v1.36.0/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.36.3 h1:82DV7MYdb8anAVi3qge1wSnMDrnKK7ebr+I0hHRN1BU= +google.golang.org/protobuf v1.36.3/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1389,54 +1373,53 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -howett.net/plist v0.0.0-20181124034731-591f970eefbb/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0= -k8s.io/api v0.32.0 h1:OL9JpbvAU5ny9ga2fb24X8H6xQlVp+aJMFlgtQjR9CE= -k8s.io/api v0.32.0/go.mod h1:4LEwHZEf6Q/cG96F3dqR965sYOfmPM7rq81BLgsE0p0= -k8s.io/apimachinery v0.32.0 h1:cFSE7N3rmEEtv4ei5X6DaJPHHX0C+upp+v5lVPiEwpg= -k8s.io/apimachinery v0.32.0/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE= -k8s.io/client-go v0.32.0 h1:DimtMcnN/JIKZcrSrstiwvvZvLjG0aSxy8PxN8IChp8= -k8s.io/client-go v0.32.0/go.mod h1:boDWvdM1Drk4NJj/VddSLnx59X3OPgwrOo0vGbtq9+8= +k8s.io/api v0.32.1 h1:f562zw9cy+GvXzXf0CKlVQ7yHJVYzLfL6JAS4kOAaOc= +k8s.io/api v0.32.1/go.mod h1:/Yi/BqkuueW1BgpoePYBRdDYfjPF5sgTr5+YqDZra5k= +k8s.io/apimachinery v0.32.1 h1:683ENpaCBjma4CYqsmZyhEzrGz6cjn1MY/X2jB2hkZs= +k8s.io/apimachinery v0.32.1/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE= +k8s.io/client-go v0.32.1 h1:otM0AxdhdBIaQh7l1Q0jQpmo7WOFIk5FFa4bg6YMdUU= +k8s.io/client-go v0.32.1/go.mod h1:aTTKZY7MdxUaJ/KiUs8D+GssR9zJZi77ZqtzcGXIiDg= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f h1:GA7//TjRY9yWGy1poLzYYJJ4JRdzg3+O6e8I+e+8T5Y= -k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f/go.mod h1:R/HEjbvWI0qdfb8viZUeVZm0X6IZnxAydC7YU42CMw4= -k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 h1:M3sRQVHv7vB20Xc2ybTt7ODCeFj6JSWYFzOFnYeS6Ro= -k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -modernc.org/cc/v4 v4.24.1 h1:mLykA8iIlZ/SZbwI2JgYIURXQMSgmOb/+5jaielxPi4= -modernc.org/cc/v4 v4.24.1/go.mod h1:T1lKJZhXIi2VSqGBiB4LIbKs9NsKTbUXj4IDrmGqtTI= -modernc.org/ccgo/v4 v4.23.5 h1:6uAwu8u3pnla3l/+UVUrDDO1HIGxHTYmFH6w+X9nsyw= -modernc.org/ccgo/v4 v4.23.5/go.mod h1:FogrWfBdzqLWm1ku6cfr4IzEFouq2fSAPf6aSAHdAJQ= +k8s.io/kube-openapi v0.0.0-20241212222426-2c72e554b1e7 h1:hcha5B1kVACrLujCKLbr8XWMxCxzQx42DY8QKYJrDLg= +k8s.io/kube-openapi v0.0.0-20241212222426-2c72e554b1e7/go.mod h1:GewRfANuJ70iYzvn+i4lezLDAFzvjxZYK1gn1lWcfas= +k8s.io/utils v0.0.0-20241210054802-24370beab758 h1:sdbE21q2nlQtFh65saZY+rRM6x6aJJI8IUa1AmH/qa0= +k8s.io/utils v0.0.0-20241210054802-24370beab758/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +modernc.org/cc/v4 v4.21.4 h1:3Be/Rdo1fpr8GrQ7IVw9OHtplU4gWbb+wNgeoBMmGLQ= +modernc.org/cc/v4 v4.21.4/go.mod h1:HM7VJTZbUCR3rV8EYBi9wxnJ0ZBRiGE5OeGXNA0IsLQ= +modernc.org/ccgo/v4 v4.19.2 h1:lwQZgvboKD0jBwdaeVCTouxhxAyN6iawF3STraAal8Y= +modernc.org/ccgo/v4 v4.19.2/go.mod h1:ysS3mxiMV38XGRTTcgo0DQTeTmAO4oCmJl1nX9VFI3s= modernc.org/fileutil v1.0.0/go.mod h1:JHsWpkrk/CnVV1H/eGlFf85BEpfkrp56ro8nojIq9Q8= modernc.org/fileutil v1.3.0 h1:gQ5SIzK3H9kdfai/5x41oQiKValumqNTDXMvKo62HvE= modernc.org/fileutil v1.3.0/go.mod h1:XatxS8fZi3pS8/hKG2GH/ArUogfxjpEKs3Ku3aK4JyQ= -modernc.org/gc/v2 v2.6.0 h1:Tiw3pezQj7PfV8k4Dzyu/vhRHR2e92kOXtTFU8pbCl4= -modernc.org/gc/v2 v2.6.0/go.mod h1:wzN5dK1AzVGoH6XOzc3YZ+ey/jPgYHLuVckd62P0GYU= -modernc.org/gc/v3 v3.0.0-20241213165251-3bc300f6d0c9 h1:ovz6yUKX71igz2yvk4NpiCL5fvdjZAI+DhuDEGx1xyU= -modernc.org/gc/v3 v3.0.0-20241213165251-3bc300f6d0c9/go.mod h1:Qz0X07sNOR1jWYCrJMEnbW/X55x206Q7Vt4mz6/wHp4= -modernc.org/libc v1.61.5 h1:WzsPUvWl2CvsRmk2foyWWHUEUmQ2iW4oFyWOVR0O5ho= -modernc.org/libc v1.61.5/go.mod h1:llBdEGIywhnRgAFuTF+CWaKV8/2bFgACcQZTXhkAuAM= -modernc.org/mathutil v1.7.0 h1:KPlMfpLMs4EXAo8T8JJEkmCT9KP/B4vU1+GaBnDhHQY= -modernc.org/mathutil v1.7.0/go.mod h1:4p5IwJITfppl0G4sUEDtCr4DthTaT47/N3aT6MhfgJg= -modernc.org/memory v1.8.0 h1:IqGTL6eFMaDZZhEWwcREgeMXYwmW83LYW8cROZYkg+E= -modernc.org/memory v1.8.0/go.mod h1:XPZ936zp5OMKGWPqbD3JShgd/ZoQ7899TUuQqxY+peU= +modernc.org/gc/v2 v2.4.1 h1:9cNzOqPyMJBvrUipmynX0ZohMhcxPtMccYgGOJdOiBw= +modernc.org/gc/v2 v2.4.1/go.mod h1:wzN5dK1AzVGoH6XOzc3YZ+ey/jPgYHLuVckd62P0GYU= +modernc.org/gc/v3 v3.0.0-20250105121824-520be1a3aee6 h1:JoKwHjIFumiKrjMbp1cNbC5E9UyCgA/ZcID0xOWQ2N8= +modernc.org/gc/v3 v3.0.0-20250105121824-520be1a3aee6/go.mod h1:LG5UO1Ran4OO0JRKz2oNiXhR5nNrgz0PzH7UKhz0aMU= +modernc.org/libc v1.55.3 h1:AzcW1mhlPNrRtjS5sS+eW2ISCgSOLLNyFzRh/V3Qj/U= +modernc.org/libc v1.55.3/go.mod h1:qFXepLhz+JjFThQ4kzwzOjA/y/artDeg+pcYnY+Q83w= +modernc.org/mathutil v1.7.1 h1:GCZVGXdaN8gTqB1Mf/usp1Y/hSqgI2vAGGP4jZMCxOU= +modernc.org/mathutil v1.7.1/go.mod h1:4p5IwJITfppl0G4sUEDtCr4DthTaT47/N3aT6MhfgJg= +modernc.org/memory v1.8.2 h1:cL9L4bcoAObu4NkxOlKWBWtNHIsnnACGF/TbqQ6sbcI= +modernc.org/memory v1.8.2/go.mod h1:ZbjSvMO5NQ1A2i3bWeDiVMxIorXwdClKE/0SZ+BMotU= modernc.org/opt v0.1.3 h1:3XOZf2yznlhC+ibLltsDGzABUGVx8J6pnFMS3E4dcq4= modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= modernc.org/sortutil v1.2.0 h1:jQiD3PfS2REGJNzNCMMaLSp/wdMNieTbKX920Cqdgqc= modernc.org/sortutil v1.2.0/go.mod h1:TKU2s7kJMf1AE84OoiGppNHJwvB753OYfNl2WRb++Ss= modernc.org/sqlite v1.34.4 h1:sjdARozcL5KJBvYQvLlZEmctRgW9xqIZc2ncN7PU0P8= modernc.org/sqlite v1.34.4/go.mod h1:3QQFCG2SEMtc2nv+Wq4cQCH7Hjcg+p/RMlS1XK+zwbk= -modernc.org/strutil v1.2.0 h1:agBi9dp1I+eOnxXeiZawM8F4LawKv4NzGWSaLfyeNZA= -modernc.org/strutil v1.2.0/go.mod h1:/mdcBmfOibveCTBxUl5B5l6W+TTH1FXPLHZE6bTosX0= +modernc.org/strutil v1.2.1 h1:UneZBkQA+DX2Rp35KcM69cSsNES9ly8mQWD71HKlOA0= +modernc.org/strutil v1.2.1/go.mod h1:EHkiggD70koQxjVdSBM3JKM7k6L0FbGE5eymy9i3B9A= modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y= modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 h1:/Rv+M11QRah1itp8VhT6HoVx1Ray9eB4DBr+K+/sCJ8= -sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3/go.mod h1:18nIHnGi6636UCz6m8i4DhaJ65T6EruyzmoQqI2BVDo= -sigs.k8s.io/structured-merge-diff/v4 v4.4.2 h1:MdmvkGuXi/8io6ixD5wud3vOLwc1rj0aNqRlpuvjmwA= -sigs.k8s.io/structured-merge-diff/v4 v4.4.2/go.mod h1:N8f93tFZh9U6vpxwRArLiikrE5/2tiu1w1AGfACIGE4= +sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE= +sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= +sigs.k8s.io/structured-merge-diff/v4 v4.5.0 h1:nbCitCK2hfnhyiKo6uf2HxUPTCodY6Qaf85SbDIaMBk= +sigs.k8s.io/structured-merge-diff/v4 v4.5.0/go.mod h1:N8f93tFZh9U6vpxwRArLiikrE5/2tiu1w1AGfACIGE4= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/internal/app/app.go b/internal/app/app.go index 7a13e2ea..11c81d8d 100644 --- a/internal/app/app.go +++ b/internal/app/app.go @@ -4,14 +4,16 @@ import ( "log/slog" "sync" + "github.com/pocketbase/dbx" "github.com/pocketbase/pocketbase" + "github.com/pocketbase/pocketbase/core" ) -var instance *pocketbase.PocketBase +var instance core.App var intanceOnce sync.Once -func GetApp() *pocketbase.PocketBase { +func GetApp() core.App { intanceOnce.Do(func() { instance = pocketbase.NewWithConfig(pocketbase.Config{ HideStartBanner: true, @@ -21,6 +23,10 @@ func GetApp() *pocketbase.PocketBase { return instance } +func GetDB() dbx.Builder { + return GetApp().DB() +} + func GetLogger() *slog.Logger { return GetApp().Logger() } diff --git a/internal/app/scheduler.go b/internal/app/scheduler.go index 6b274302..1b16ac32 100644 --- a/internal/app/scheduler.go +++ b/internal/app/scheduler.go @@ -12,11 +12,13 @@ var scheduler *cron.Cron var schedulerOnce sync.Once func GetScheduler() *cron.Cron { + scheduler = GetApp().Cron() schedulerOnce.Do(func() { - scheduler = cron.New() location, err := time.LoadLocation("Local") if err == nil { + scheduler.Stop() scheduler.SetTimezone(location) + scheduler.Start() } }) diff --git a/internal/applicant/acme-ca.go b/internal/applicant/acme_ca.go similarity index 100% rename from internal/applicant/acme-ca.go rename to internal/applicant/acme_ca.go diff --git a/internal/applicant/acme-user.go b/internal/applicant/acme_user.go similarity index 100% rename from internal/applicant/acme-user.go rename to internal/applicant/acme_user.go diff --git a/internal/applicant/applicant.go b/internal/applicant/applicant.go index 6be0eb12..b4536921 100644 --- a/internal/applicant/applicant.go +++ b/internal/applicant/applicant.go @@ -35,15 +35,17 @@ type Applicant interface { } type applicantOptions struct { - Domains []string - ContactEmail string - Provider domain.ApplyDNSProviderType - ProviderAccessConfig map[string]any - ProviderApplyConfig map[string]any - KeyAlgorithm string - Nameservers []string - PropagationTimeout int32 - DisableFollowCNAME bool + Domains []string + ContactEmail string + Provider domain.ApplyDNSProviderType + ProviderAccessConfig map[string]any + ProviderApplyConfig map[string]any + KeyAlgorithm string + Nameservers []string + DnsPropagationTimeout int32 + DnsTTL int32 + DisableFollowCNAME bool + SkipBeforeExpiryDays int32 } func NewWithApplyNode(node *domain.WorkflowNode) (Applicant, error) { @@ -51,11 +53,12 @@ func NewWithApplyNode(node *domain.WorkflowNode) (Applicant, error) { return nil, fmt.Errorf("node type is not apply") } + nodeConfig := node.GetConfigForApply() + accessRepo := repository.NewAccessRepository() - accessId := node.GetConfigString("providerAccessId") - access, err := accessRepo.GetById(context.Background(), accessId) + access, err := accessRepo.GetById(context.Background(), nodeConfig.ProviderAccessId) if err != nil { - return nil, fmt.Errorf("failed to get access #%s record: %w", accessId, err) + return nil, fmt.Errorf("failed to get access #%s record: %w", nodeConfig.ProviderAccessId, err) } accessConfig, err := access.UnmarshalConfigToMap() @@ -64,15 +67,17 @@ func NewWithApplyNode(node *domain.WorkflowNode) (Applicant, error) { } options := &applicantOptions{ - Domains: slices.Filter(strings.Split(node.GetConfigString("domains"), ";"), func(s string) bool { return s != "" }), - ContactEmail: node.GetConfigString("contactEmail"), - Provider: domain.ApplyDNSProviderType(node.GetConfigString("provider")), - ProviderAccessConfig: accessConfig, - ProviderApplyConfig: node.GetConfigMap("providerConfig"), - KeyAlgorithm: node.GetConfigString("keyAlgorithm"), - Nameservers: slices.Filter(strings.Split(node.GetConfigString("nameservers"), ";"), func(s string) bool { return s != "" }), - PropagationTimeout: node.GetConfigInt32("propagationTimeout"), - DisableFollowCNAME: node.GetConfigBool("disableFollowCNAME"), + Domains: slices.Filter(strings.Split(nodeConfig.Domains, ";"), func(s string) bool { return s != "" }), + ContactEmail: nodeConfig.ContactEmail, + Provider: domain.ApplyDNSProviderType(nodeConfig.Provider), + ProviderAccessConfig: accessConfig, + ProviderApplyConfig: nodeConfig.ProviderConfig, + KeyAlgorithm: nodeConfig.KeyAlgorithm, + Nameservers: slices.Filter(strings.Split(nodeConfig.Nameservers, ";"), func(s string) bool { return s != "" }), + DnsPropagationTimeout: nodeConfig.DnsPropagationTimeout, + DnsTTL: nodeConfig.DnsTTL, + DisableFollowCNAME: nodeConfig.DisableFollowCNAME, + SkipBeforeExpiryDays: nodeConfig.SkipBeforeExpiryDays, } applicant, err := createApplicant(options) diff --git a/internal/applicant/applicant_test.go b/internal/applicant/applicant_test.go index 352cea24..98a3e38e 100644 --- a/internal/applicant/applicant_test.go +++ b/internal/applicant/applicant_test.go @@ -1,4 +1,4 @@ -package applicant +package applicant_test import ( "testing" diff --git a/internal/applicant/providers.go b/internal/applicant/providers.go index 8e42f4f2..248af1b4 100644 --- a/internal/applicant/providers.go +++ b/internal/applicant/providers.go @@ -36,11 +36,11 @@ func createApplicant(options *applicantOptions) (challenge.Provider, error) { } applicant, err := providerACMEHttpReq.NewChallengeProvider(&providerACMEHttpReq.ACMEHttpReqApplicantConfig{ - Endpoint: access.Endpoint, - Mode: access.Mode, - Username: access.Username, - Password: access.Password, - PropagationTimeout: options.PropagationTimeout, + Endpoint: access.Endpoint, + Mode: access.Mode, + Username: access.Username, + Password: access.Password, + DnsPropagationTimeout: options.DnsPropagationTimeout, }) return applicant, err } @@ -53,9 +53,10 @@ func createApplicant(options *applicantOptions) (challenge.Provider, error) { } applicant, err := providerAliyun.NewChallengeProvider(&providerAliyun.AliyunApplicantConfig{ - AccessKeyId: access.AccessKeyId, - AccessKeySecret: access.AccessKeySecret, - PropagationTimeout: options.PropagationTimeout, + AccessKeyId: access.AccessKeyId, + AccessKeySecret: access.AccessKeySecret, + DnsPropagationTimeout: options.DnsPropagationTimeout, + DnsTTL: options.DnsTTL, }) return applicant, err } @@ -68,11 +69,12 @@ func createApplicant(options *applicantOptions) (challenge.Provider, error) { } applicant, err := providerAWSRoute53.NewChallengeProvider(&providerAWSRoute53.AWSRoute53ApplicantConfig{ - AccessKeyId: access.AccessKeyId, - SecretAccessKey: access.SecretAccessKey, - Region: maps.GetValueAsString(options.ProviderApplyConfig, "region"), - HostedZoneId: maps.GetValueAsString(options.ProviderApplyConfig, "hostedZoneId"), - PropagationTimeout: options.PropagationTimeout, + AccessKeyId: access.AccessKeyId, + SecretAccessKey: access.SecretAccessKey, + Region: maps.GetValueAsString(options.ProviderApplyConfig, "region"), + HostedZoneId: maps.GetValueAsString(options.ProviderApplyConfig, "hostedZoneId"), + DnsPropagationTimeout: options.DnsPropagationTimeout, + DnsTTL: options.DnsTTL, }) return applicant, err } @@ -85,11 +87,12 @@ func createApplicant(options *applicantOptions) (challenge.Provider, error) { } applicant, err := providerAzureDNS.NewChallengeProvider(&providerAzureDNS.AzureDNSApplicantConfig{ - TenantId: access.TenantId, - ClientId: access.ClientId, - ClientSecret: access.ClientSecret, - CloudName: access.CloudName, - PropagationTimeout: options.PropagationTimeout, + TenantId: access.TenantId, + ClientId: access.ClientId, + ClientSecret: access.ClientSecret, + CloudName: access.CloudName, + DnsPropagationTimeout: options.DnsPropagationTimeout, + DnsTTL: options.DnsTTL, }) return applicant, err } @@ -102,8 +105,9 @@ func createApplicant(options *applicantOptions) (challenge.Provider, error) { } applicant, err := providerCloudflare.NewChallengeProvider(&providerCloudflare.CloudflareApplicantConfig{ - DnsApiToken: access.DnsApiToken, - PropagationTimeout: options.PropagationTimeout, + DnsApiToken: access.DnsApiToken, + DnsPropagationTimeout: options.DnsPropagationTimeout, + DnsTTL: options.DnsTTL, }) return applicant, err } @@ -116,9 +120,10 @@ func createApplicant(options *applicantOptions) (challenge.Provider, error) { } applicant, err := providerGoDaddy.NewChallengeProvider(&providerGoDaddy.GoDaddyApplicantConfig{ - ApiKey: access.ApiKey, - ApiSecret: access.ApiSecret, - PropagationTimeout: options.PropagationTimeout, + ApiKey: access.ApiKey, + ApiSecret: access.ApiSecret, + DnsPropagationTimeout: options.DnsPropagationTimeout, + DnsTTL: options.DnsTTL, }) return applicant, err } @@ -131,10 +136,11 @@ func createApplicant(options *applicantOptions) (challenge.Provider, error) { } applicant, err := providerHuaweiCloud.NewChallengeProvider(&providerHuaweiCloud.HuaweiCloudApplicantConfig{ - AccessKeyId: access.AccessKeyId, - SecretAccessKey: access.SecretAccessKey, - Region: maps.GetValueAsString(options.ProviderApplyConfig, "region"), - PropagationTimeout: options.PropagationTimeout, + AccessKeyId: access.AccessKeyId, + SecretAccessKey: access.SecretAccessKey, + Region: maps.GetValueAsString(options.ProviderApplyConfig, "region"), + DnsPropagationTimeout: options.DnsPropagationTimeout, + DnsTTL: options.DnsTTL, }) return applicant, err } @@ -147,9 +153,10 @@ func createApplicant(options *applicantOptions) (challenge.Provider, error) { } applicant, err := providerNameDotCom.NewChallengeProvider(&providerNameDotCom.NameDotComApplicantConfig{ - Username: access.Username, - ApiToken: access.ApiToken, - PropagationTimeout: options.PropagationTimeout, + Username: access.Username, + ApiToken: access.ApiToken, + DnsPropagationTimeout: options.DnsPropagationTimeout, + DnsTTL: options.DnsTTL, }) return applicant, err } @@ -162,8 +169,9 @@ func createApplicant(options *applicantOptions) (challenge.Provider, error) { } applicant, err := providerNameSilo.NewChallengeProvider(&providerNameSilo.NameSiloApplicantConfig{ - ApiKey: access.ApiKey, - PropagationTimeout: options.PropagationTimeout, + ApiKey: access.ApiKey, + DnsPropagationTimeout: options.DnsPropagationTimeout, + DnsTTL: options.DnsTTL, }) return applicant, err } @@ -176,8 +184,9 @@ func createApplicant(options *applicantOptions) (challenge.Provider, error) { } applicant, err := providerNS1.NewChallengeProvider(&providerNS1.NS1ApplicantConfig{ - ApiKey: access.ApiKey, - PropagationTimeout: options.PropagationTimeout, + ApiKey: access.ApiKey, + DnsPropagationTimeout: options.DnsPropagationTimeout, + DnsTTL: options.DnsTTL, }) return applicant, err } @@ -190,9 +199,10 @@ func createApplicant(options *applicantOptions) (challenge.Provider, error) { } applicant, err := providerPowerDNS.NewChallengeProvider(&providerPowerDNS.PowerDNSApplicantConfig{ - ApiUrl: access.ApiUrl, - ApiKey: access.ApiKey, - PropagationTimeout: options.PropagationTimeout, + ApiUrl: access.ApiUrl, + ApiKey: access.ApiKey, + DnsPropagationTimeout: options.DnsPropagationTimeout, + DnsTTL: options.DnsTTL, }) return applicant, err } @@ -205,9 +215,10 @@ func createApplicant(options *applicantOptions) (challenge.Provider, error) { } applicant, err := providerTencentCloud.NewChallengeProvider(&providerTencentCloud.TencentCloudApplicantConfig{ - SecretId: access.SecretId, - SecretKey: access.SecretKey, - PropagationTimeout: options.PropagationTimeout, + SecretId: access.SecretId, + SecretKey: access.SecretKey, + DnsPropagationTimeout: options.DnsPropagationTimeout, + DnsTTL: options.DnsTTL, }) return applicant, err } @@ -220,9 +231,10 @@ func createApplicant(options *applicantOptions) (challenge.Provider, error) { } applicant, err := providerVolcEngine.NewChallengeProvider(&providerVolcEngine.VolcEngineApplicantConfig{ - AccessKeyId: access.AccessKeyId, - SecretAccessKey: access.SecretAccessKey, - PropagationTimeout: options.PropagationTimeout, + AccessKeyId: access.AccessKeyId, + SecretAccessKey: access.SecretAccessKey, + DnsPropagationTimeout: options.DnsPropagationTimeout, + DnsTTL: options.DnsTTL, }) return applicant, err } diff --git a/internal/certificate/service.go b/internal/certificate/service.go index af46c202..1e9dd462 100644 --- a/internal/certificate/service.go +++ b/internal/certificate/service.go @@ -1,6 +1,8 @@ package certificate import ( + "archive/zip" + "bytes" "context" "encoding/json" "strconv" @@ -8,7 +10,9 @@ import ( "github.com/usual2970/certimate/internal/app" "github.com/usual2970/certimate/internal/domain" + "github.com/usual2970/certimate/internal/domain/dtos" "github.com/usual2970/certimate/internal/notify" + "github.com/usual2970/certimate/internal/pkg/utils/certs" "github.com/usual2970/certimate/internal/repository" ) @@ -18,6 +22,7 @@ const ( ) type certificateRepository interface { + GetById(ctx context.Context, id string) (*domain.Certificate, error) ListExpireSoon(ctx context.Context) ([]*domain.Certificate, error) } @@ -32,8 +37,7 @@ func NewCertificateService(repo certificateRepository) *CertificateService { } func (s *CertificateService) InitSchedule(ctx context.Context) error { - scheduler := app.GetScheduler() - err := scheduler.Add("certificate", "0 0 * * *", func() { + app.GetScheduler().MustAdd("certificateExpireSoonNotify", "0 0 * * *", func() { certs, err := s.repo.ListExpireSoon(context.Background()) if err != nil { app.GetLogger().Error("failed to get certificates which expire soon", "err", err) @@ -49,15 +53,129 @@ func (s *CertificateService) InitSchedule(ctx context.Context) error { app.GetLogger().Error("failed to send notification", "err", err) } }) - if err != nil { - app.GetLogger().Error("failed to add schedule", "err", err) - return err - } - scheduler.Start() - app.GetLogger().Info("certificate schedule started") return nil } +func (s *CertificateService) ArchiveFile(ctx context.Context, req *dtos.CertificateArchiveFileReq) ([]byte, error) { + certificate, err := s.repo.GetById(ctx, req.CertificateId) + if err != nil { + return nil, err + } + + var buf bytes.Buffer + zipWriter := zip.NewWriter(&buf) + defer zipWriter.Close() + + switch strings.ToUpper(req.Format) { + case "", "PEM": + { + certWriter, err := zipWriter.Create("certbundle.pem") + if err != nil { + return nil, err + } + + _, err = certWriter.Write([]byte(certificate.Certificate)) + if err != nil { + return nil, err + } + + keyWriter, err := zipWriter.Create("privkey.pem") + if err != nil { + return nil, err + } + + _, err = keyWriter.Write([]byte(certificate.PrivateKey)) + if err != nil { + return nil, err + } + + err = zipWriter.Close() + if err != nil { + return nil, err + } + + return buf.Bytes(), nil + } + + case "PFX": + { + const pfxPassword = "certimate" + + certPFX, err := certs.TransformCertificateFromPEMToPFX(certificate.Certificate, certificate.PrivateKey, pfxPassword) + if err != nil { + return nil, err + } + + certWriter, err := zipWriter.Create("cert.pfx") + if err != nil { + return nil, err + } + + _, err = certWriter.Write(certPFX) + if err != nil { + return nil, err + } + + keyWriter, err := zipWriter.Create("pfx-password.txt") + if err != nil { + return nil, err + } + + _, err = keyWriter.Write([]byte(pfxPassword)) + if err != nil { + return nil, err + } + + err = zipWriter.Close() + if err != nil { + return nil, err + } + + return buf.Bytes(), nil + } + + case "JKS": + { + const jksPassword = "certimate" + + certJKS, err := certs.TransformCertificateFromPEMToJKS(certificate.Certificate, certificate.PrivateKey, jksPassword, jksPassword, jksPassword) + if err != nil { + return nil, err + } + + certWriter, err := zipWriter.Create("cert.jks") + if err != nil { + return nil, err + } + + _, err = certWriter.Write(certJKS) + if err != nil { + return nil, err + } + + keyWriter, err := zipWriter.Create("jks-password.txt") + if err != nil { + return nil, err + } + + _, err = keyWriter.Write([]byte(jksPassword)) + if err != nil { + return nil, err + } + + err = zipWriter.Close() + if err != nil { + return nil, err + } + + return buf.Bytes(), nil + } + + default: + return nil, domain.ErrInvalidParams + } +} + func buildExpireSoonNotification(certificates []*domain.Certificate) *struct { Subject string Message string @@ -70,11 +188,11 @@ func buildExpireSoonNotification(certificates []*domain.Certificate) *struct { message := defaultExpireMessage // 查询模板信息 - settingRepo := repository.NewSettingsRepository() - setting, err := settingRepo.GetByName(context.Background(), "notifyTemplates") + settingsRepo := repository.NewSettingsRepository() + settings, err := settingsRepo.GetByName(context.Background(), "notifyTemplates") if err == nil { var templates *domain.NotifyTemplatesSettingsContent - json.Unmarshal([]byte(setting.Content), &templates) + json.Unmarshal([]byte(settings.Content), &templates) if templates != nil && len(templates.NotifyTemplates) > 0 { subject = templates.NotifyTemplates[0].Subject diff --git a/internal/deployer/deployer.go b/internal/deployer/deployer.go index 41c589bc..e64c8a88 100644 --- a/internal/deployer/deployer.go +++ b/internal/deployer/deployer.go @@ -29,11 +29,12 @@ func NewWithDeployNode(node *domain.WorkflowNode, certdata struct { return nil, fmt.Errorf("node type is not deploy") } + nodeConfig := node.GetConfigForDeploy() + accessRepo := repository.NewAccessRepository() - accessId := node.GetConfigString("providerAccessId") - access, err := accessRepo.GetById(context.Background(), accessId) + access, err := accessRepo.GetById(context.Background(), nodeConfig.ProviderAccessId) if err != nil { - return nil, fmt.Errorf("failed to get access #%s record: %w", accessId, err) + return nil, fmt.Errorf("failed to get access #%s record: %w", nodeConfig.ProviderAccessId, err) } accessConfig, err := access.UnmarshalConfigToMap() @@ -42,9 +43,9 @@ func NewWithDeployNode(node *domain.WorkflowNode, certdata struct { } deployer, logger, err := createDeployer(&deployerOptions{ - Provider: domain.DeployProviderType(node.GetConfigString("provider")), + Provider: domain.DeployProviderType(nodeConfig.Provider), ProviderAccessConfig: accessConfig, - ProviderDeployConfig: node.GetConfigMap("providerConfig"), + ProviderDeployConfig: nodeConfig.ProviderConfig, }) if err != nil { return nil, err diff --git a/internal/domain/access.go b/internal/domain/access.go index c7cf08fd..dda7d2b4 100644 --- a/internal/domain/access.go +++ b/internal/domain/access.go @@ -5,6 +5,8 @@ import ( "time" ) +const CollectionNameAccess = "access" + type Access struct { Meta Name string `json:"name" db:"name"` diff --git a/internal/domain/acme_accounts.go b/internal/domain/acme_account.go similarity index 86% rename from internal/domain/acme_accounts.go rename to internal/domain/acme_account.go index b4f88dc4..3a663e3e 100644 --- a/internal/domain/acme_accounts.go +++ b/internal/domain/acme_account.go @@ -4,6 +4,8 @@ import ( "github.com/go-acme/lego/v4/registration" ) +const CollectionNameAcmeAccount = "acme_accounts" + type AcmeAccount struct { Meta CA string `json:"ca" db:"ca"` diff --git a/internal/domain/certificate.go b/internal/domain/certificate.go index 84179c3a..f0e03711 100644 --- a/internal/domain/certificate.go +++ b/internal/domain/certificate.go @@ -2,12 +2,7 @@ package domain import "time" -type CertificateSourceType string - -const ( - CertificateSourceTypeWorkflow = CertificateSourceType("workflow") - CertificateSourceTypeUpload = CertificateSourceType("upload") -) +const CollectionNameCertificate = "certificate" type Certificate struct { Meta @@ -25,3 +20,10 @@ type Certificate struct { WorkflowOutputId string `json:"workflowOutputId" db:"workflowOutputId"` DeletedAt *time.Time `json:"deleted" db:"deleted"` } + +type CertificateSourceType string + +const ( + CertificateSourceTypeWorkflow = CertificateSourceType("workflow") + CertificateSourceTypeUpload = CertificateSourceType("upload") +) diff --git a/internal/domain/dtos/certificate.go b/internal/domain/dtos/certificate.go new file mode 100644 index 00000000..3fe13f16 --- /dev/null +++ b/internal/domain/dtos/certificate.go @@ -0,0 +1,6 @@ +package dtos + +type CertificateArchiveFileReq struct { + CertificateId string `json:"-"` + Format string `json:"format"` +} diff --git a/internal/domain/dtos/notify.go b/internal/domain/dtos/notify.go new file mode 100644 index 00000000..72c6cc79 --- /dev/null +++ b/internal/domain/dtos/notify.go @@ -0,0 +1,7 @@ +package dtos + +import "github.com/usual2970/certimate/internal/domain" + +type NotifyTestPushReq struct { + Channel domain.NotifyChannelType `json:"channel"` +} diff --git a/internal/domain/dtos/workflow.go b/internal/domain/dtos/workflow.go new file mode 100644 index 00000000..3a760971 --- /dev/null +++ b/internal/domain/dtos/workflow.go @@ -0,0 +1,8 @@ +package dtos + +import "github.com/usual2970/certimate/internal/domain" + +type WorkflowRunReq struct { + WorkflowId string `json:"-"` + Trigger domain.WorkflowTriggerType `json:"trigger"` +} diff --git a/internal/domain/notify.go b/internal/domain/notify.go index 7db79be6..3d71a3a7 100644 --- a/internal/domain/notify.go +++ b/internal/domain/notify.go @@ -18,7 +18,3 @@ const ( NotifyChannelTypeWebhook = NotifyChannelType("webhook") NotifyChannelTypeWeCom = NotifyChannelType("wecom") ) - -type NotifyTestPushReq struct { - Channel string `json:"channel"` -} diff --git a/internal/domain/settings.go b/internal/domain/settings.go index 8d1d983f..9819ec43 100644 --- a/internal/domain/settings.go +++ b/internal/domain/settings.go @@ -5,6 +5,8 @@ import ( "fmt" ) +const CollectionNameSettings = "settings" + type Settings struct { Meta Name string `json:"name" db:"name"` diff --git a/internal/domain/workflow.go b/internal/domain/workflow.go index 5ad8d0fe..e090d038 100644 --- a/internal/domain/workflow.go +++ b/internal/domain/workflow.go @@ -6,6 +6,23 @@ import ( "github.com/usual2970/certimate/internal/pkg/utils/maps" ) +const CollectionNameWorkflow = "workflow" + +type Workflow struct { + Meta + Name string `json:"name" db:"name"` + Description string `json:"description" db:"description"` + Trigger WorkflowTriggerType `json:"trigger" db:"trigger"` + TriggerCron string `json:"triggerCron" db:"triggerCron"` + Enabled bool `json:"enabled" db:"enabled"` + Content *WorkflowNode `json:"content" db:"content"` + Draft *WorkflowNode `json:"draft" db:"draft"` + HasDraft bool `json:"hasDraft" db:"hasDraft"` + LastRunId string `json:"lastRunId" db:"lastRunId"` + LastRunStatus WorkflowRunStatusType `json:"lastRunStatus" db:"lastRunStatus"` + LastRunTime time.Time `json:"lastRunTime" db:"lastRunTime"` +} + type WorkflowNodeType string const ( @@ -28,25 +45,6 @@ const ( WorkflowTriggerTypeManual = WorkflowTriggerType("manual") ) -type Workflow struct { - Meta - Name string `json:"name" db:"name"` - Description string `json:"description" db:"description"` - Trigger WorkflowTriggerType `json:"trigger" db:"trigger"` - TriggerCron string `json:"triggerCron" db:"triggerCron"` - Enabled bool `json:"enabled" db:"enabled"` - Content *WorkflowNode `json:"content" db:"content"` - Draft *WorkflowNode `json:"draft" db:"draft"` - HasDraft bool `json:"hasDraft" db:"hasDraft"` - LastRunId string `json:"lastRunId" db:"lastRunId"` - LastRunStatus WorkflowRunStatusType `json:"lastRunStatus" db:"lastRunStatus"` - LastRunTime time.Time `json:"lastRunTime" db:"lastRunTime"` -} - -func (w *Workflow) Table() string { - return "workflow" -} - type WorkflowNode struct { Id string `json:"id"` Type WorkflowNodeType `json:"type"` @@ -62,23 +60,47 @@ type WorkflowNode struct { Validated bool `json:"validated"` } -func (n *WorkflowNode) GetConfigString(key string) string { +type WorkflowNodeConfigForApply struct { + Domains string `json:"domains"` // 域名列表,以半角逗号分隔 + ContactEmail string `json:"contactEmail"` // 联系邮箱 + Provider string `json:"provider"` // DNS 提供商 + ProviderAccessId string `json:"providerAccessId"` // DNS 提供商授权记录 ID + ProviderConfig map[string]any `json:"providerConfig"` // DNS 提供商额外配置 + KeyAlgorithm string `json:"keyAlgorithm"` // 密钥算法 + Nameservers string `json:"nameservers"` // DNS 服务器列表,以半角逗号分隔 + DnsPropagationTimeout int32 `json:"dnsPropagationTimeout"` // DNS 传播超时时间(默认取决于提供商) + DnsTTL int32 `json:"dnsTTL"` // DNS TTL(默认取决于提供商) + DisableFollowCNAME bool `json:"disableFollowCNAME"` // 是否禁用 CNAME 跟随 + SkipBeforeExpiryDays int32 `json:"skipBeforeExpiryDays"` // 证书到期前多少天前跳过续期(默认值:30) +} + +type WorkflowNodeConfigForDeploy struct { + Certificate string `json:"certificate"` // 前序节点输出的证书,形如“${NodeId}#certificate” + Provider string `json:"provider"` // 主机提供商 + ProviderAccessId string `json:"providerAccessId"` // 主机提供商授权记录 ID + ProviderConfig map[string]any `json:"providerConfig"` // 主机提供商额外配置 + SkipOnLastSucceeded bool `json:"skipOnLastSucceeded"` // 上次部署成功时是否跳过 +} + +type WorkflowNodeConfigForNotify struct { + Channel string `json:"channel"` // 通知渠道 + Subject string `json:"subject"` // 通知主题 + Message string `json:"message"` // 通知内容 +} + +func (n *WorkflowNode) getConfigValueAsString(key string) string { return maps.GetValueAsString(n.Config, key) } -func (n *WorkflowNode) GetConfigBool(key string) bool { +func (n *WorkflowNode) getConfigValueAsBool(key string) bool { return maps.GetValueAsBool(n.Config, key) } -func (n *WorkflowNode) GetConfigInt32(key string) int32 { +func (n *WorkflowNode) getConfigValueAsInt32(key string) int32 { return maps.GetValueAsInt32(n.Config, key) } -func (n *WorkflowNode) GetConfigInt64(key string) int64 { - return maps.GetValueAsInt64(n.Config, key) -} - -func (n *WorkflowNode) GetConfigMap(key string) map[string]any { +func (n *WorkflowNode) getConfigValueAsMap(key string) map[string]any { if val, ok := n.Config[key]; ok { if result, ok := val.(map[string]any); ok { return result @@ -88,6 +110,45 @@ func (n *WorkflowNode) GetConfigMap(key string) map[string]any { return make(map[string]any) } +func (n *WorkflowNode) GetConfigForApply() WorkflowNodeConfigForApply { + skipBeforeExpiryDays := n.getConfigValueAsInt32("skipBeforeExpiryDays") + if skipBeforeExpiryDays == 0 { + skipBeforeExpiryDays = 30 + } + + return WorkflowNodeConfigForApply{ + Domains: n.getConfigValueAsString("domains"), + ContactEmail: n.getConfigValueAsString("contactEmail"), + Provider: n.getConfigValueAsString("provider"), + ProviderAccessId: n.getConfigValueAsString("providerAccessId"), + ProviderConfig: n.getConfigValueAsMap("providerConfig"), + KeyAlgorithm: n.getConfigValueAsString("keyAlgorithm"), + Nameservers: n.getConfigValueAsString("nameservers"), + DnsPropagationTimeout: n.getConfigValueAsInt32("dnsPropagationTimeout"), + DnsTTL: n.getConfigValueAsInt32("dnsTTL"), + DisableFollowCNAME: n.getConfigValueAsBool("disableFollowCNAME"), + SkipBeforeExpiryDays: skipBeforeExpiryDays, + } +} + +func (n *WorkflowNode) GetConfigForDeploy() WorkflowNodeConfigForDeploy { + return WorkflowNodeConfigForDeploy{ + Certificate: n.getConfigValueAsString("certificate"), + Provider: n.getConfigValueAsString("provider"), + ProviderAccessId: n.getConfigValueAsString("providerAccessId"), + ProviderConfig: n.getConfigValueAsMap("providerConfig"), + SkipOnLastSucceeded: n.getConfigValueAsBool("skipOnLastSucceeded"), + } +} + +func (n *WorkflowNode) GetConfigForNotify() WorkflowNodeConfigForNotify { + return WorkflowNodeConfigForNotify{ + Channel: n.getConfigValueAsString("channel"), + Subject: n.getConfigValueAsString("subject"), + Message: n.getConfigValueAsString("message"), + } +} + type WorkflowNodeIO struct { Label string `json:"label"` Name string `json:"name"` @@ -102,7 +163,4 @@ type WorkflowNodeIOValueSelector struct { Name string `json:"name"` } -type WorkflowRunReq struct { - WorkflowId string `json:"workflowId"` - Trigger WorkflowTriggerType `json:"trigger"` -} +const WorkflowNodeIONameCertificate string = "certificate" diff --git a/internal/domain/workflow_output.go b/internal/domain/workflow_output.go index abbddac1..44a70bc2 100644 --- a/internal/domain/workflow_output.go +++ b/internal/domain/workflow_output.go @@ -1,5 +1,7 @@ package domain +const CollectionNameWorkflowOutput = "workflow_output" + type WorkflowOutput struct { Meta WorkflowId string `json:"workflowId" db:"workflow"` @@ -8,5 +10,3 @@ type WorkflowOutput struct { Outputs []WorkflowNodeIO `json:"outputs" db:"outputs"` Succeeded bool `json:"succeeded" db:"succeeded"` } - -const WORKFLOW_OUTPUT_CERTIFICATE = "certificate" diff --git a/internal/domain/workflow_run.go b/internal/domain/workflow_run.go index ef4fb643..27ec30de 100644 --- a/internal/domain/workflow_run.go +++ b/internal/domain/workflow_run.go @@ -2,14 +2,7 @@ package domain import "time" -type WorkflowRunStatusType string - -const ( - WorkflowRunStatusTypePending WorkflowRunStatusType = "pending" - WorkflowRunStatusTypeRunning WorkflowRunStatusType = "running" - WorkflowRunStatusTypeSucceeded WorkflowRunStatusType = "succeeded" - WorkflowRunStatusTypeFailed WorkflowRunStatusType = "failed" -) +const CollectionNameWorkflowRun = "workflow_run" type WorkflowRun struct { Meta @@ -22,6 +15,15 @@ type WorkflowRun struct { Error string `json:"error" db:"error"` } +type WorkflowRunStatusType string + +const ( + WorkflowRunStatusTypePending WorkflowRunStatusType = "pending" + WorkflowRunStatusTypeRunning WorkflowRunStatusType = "running" + WorkflowRunStatusTypeSucceeded WorkflowRunStatusType = "succeeded" + WorkflowRunStatusTypeFailed WorkflowRunStatusType = "failed" +) + type WorkflowRunLog struct { NodeId string `json:"nodeId"` NodeName string `json:"nodeName"` diff --git a/internal/notify/service.go b/internal/notify/service.go index 0e414950..9b7cc416 100644 --- a/internal/notify/service.go +++ b/internal/notify/service.go @@ -5,6 +5,7 @@ import ( "fmt" "github.com/usual2970/certimate/internal/domain" + "github.com/usual2970/certimate/internal/domain/dtos" ) const ( @@ -17,25 +18,25 @@ type settingsRepository interface { } type NotifyService struct { - settingRepo settingsRepository + settingsRepo settingsRepository } -func NewNotifyService(settingRepo settingsRepository) *NotifyService { +func NewNotifyService(settingsRepo settingsRepository) *NotifyService { return &NotifyService{ - settingRepo: settingRepo, + settingsRepo: settingsRepo, } } -func (n *NotifyService) Test(ctx context.Context, req *domain.NotifyTestPushReq) error { - setting, err := n.settingRepo.GetByName(ctx, "notifyChannels") +func (n *NotifyService) Test(ctx context.Context, req *dtos.NotifyTestPushReq) error { + settings, err := n.settingsRepo.GetByName(ctx, "notifyChannels") if err != nil { return fmt.Errorf("failed to get notify channels settings: %w", err) } - channelConfig, err := setting.GetNotifyChannelConfig(req.Channel) + channelConfig, err := settings.GetNotifyChannelConfig(string(req.Channel)) if err != nil { return fmt.Errorf("failed to get notify channel \"%s\" config: %w", req.Channel, err) } - return SendToChannel(notifyTestTitle, notifyTestBody, req.Channel, channelConfig) + return SendToChannel(notifyTestTitle, notifyTestBody, string(req.Channel), channelConfig) } diff --git a/internal/pkg/core/applicant/acme-dns-01/lego-providers/acmehttpreq/acmehttpreq.go b/internal/pkg/core/applicant/acme-dns-01/lego-providers/acmehttpreq/acmehttpreq.go index 4242809f..a25c13bb 100644 --- a/internal/pkg/core/applicant/acme-dns-01/lego-providers/acmehttpreq/acmehttpreq.go +++ b/internal/pkg/core/applicant/acme-dns-01/lego-providers/acmehttpreq/acmehttpreq.go @@ -10,11 +10,11 @@ import ( ) type ACMEHttpReqApplicantConfig struct { - Endpoint string `json:"endpoint"` - Mode string `json:"mode"` - Username string `json:"username"` - Password string `json:"password"` - PropagationTimeout int32 `json:"propagationTimeout,omitempty"` + Endpoint string `json:"endpoint"` + Mode string `json:"mode"` + Username string `json:"username"` + Password string `json:"password"` + DnsPropagationTimeout int32 `json:"dnsPropagationTimeout,omitempty"` } func NewChallengeProvider(config *ACMEHttpReqApplicantConfig) (challenge.Provider, error) { @@ -28,8 +28,8 @@ func NewChallengeProvider(config *ACMEHttpReqApplicantConfig) (challenge.Provide providerConfig.Mode = config.Mode providerConfig.Username = config.Username providerConfig.Password = config.Password - if config.PropagationTimeout != 0 { - providerConfig.PropagationTimeout = time.Duration(config.PropagationTimeout) * time.Second + if config.DnsPropagationTimeout != 0 { + providerConfig.PropagationTimeout = time.Duration(config.DnsPropagationTimeout) * time.Second } provider, err := httpreq.NewDNSProviderConfig(providerConfig) diff --git a/internal/pkg/core/applicant/acme-dns-01/lego-providers/aliyun/aliyun.go b/internal/pkg/core/applicant/acme-dns-01/lego-providers/aliyun/aliyun.go index 687cc0ff..6f6d2d89 100644 --- a/internal/pkg/core/applicant/acme-dns-01/lego-providers/aliyun/aliyun.go +++ b/internal/pkg/core/applicant/acme-dns-01/lego-providers/aliyun/aliyun.go @@ -9,9 +9,10 @@ import ( ) type AliyunApplicantConfig struct { - AccessKeyId string `json:"accessKeyId"` - AccessKeySecret string `json:"accessKeySecret"` - PropagationTimeout int32 `json:"propagationTimeout,omitempty"` + AccessKeyId string `json:"accessKeyId"` + AccessKeySecret string `json:"accessKeySecret"` + DnsPropagationTimeout int32 `json:"dnsPropagationTimeout,omitempty"` + DnsTTL int32 `json:"dnsTTL,omitempty"` } func NewChallengeProvider(config *AliyunApplicantConfig) (challenge.Provider, error) { @@ -22,8 +23,11 @@ func NewChallengeProvider(config *AliyunApplicantConfig) (challenge.Provider, er providerConfig := alidns.NewDefaultConfig() providerConfig.APIKey = config.AccessKeyId providerConfig.SecretKey = config.AccessKeySecret - if config.PropagationTimeout != 0 { - providerConfig.PropagationTimeout = time.Duration(config.PropagationTimeout) * time.Second + if config.DnsPropagationTimeout != 0 { + providerConfig.PropagationTimeout = time.Duration(config.DnsPropagationTimeout) * time.Second + } + if config.DnsTTL != 0 { + providerConfig.TTL = int(config.DnsTTL) } provider, err := alidns.NewDNSProviderConfig(providerConfig) diff --git a/internal/pkg/core/applicant/acme-dns-01/lego-providers/aws-route53/aws-route53.go b/internal/pkg/core/applicant/acme-dns-01/lego-providers/aws-route53/aws-route53.go index bbd5a190..6799885f 100644 --- a/internal/pkg/core/applicant/acme-dns-01/lego-providers/aws-route53/aws-route53.go +++ b/internal/pkg/core/applicant/acme-dns-01/lego-providers/aws-route53/aws-route53.go @@ -9,11 +9,12 @@ import ( ) type AWSRoute53ApplicantConfig struct { - AccessKeyId string `json:"accessKeyId"` - SecretAccessKey string `json:"secretAccessKey"` - Region string `json:"region"` - HostedZoneId string `json:"hostedZoneId"` - PropagationTimeout int32 `json:"propagationTimeout,omitempty"` + AccessKeyId string `json:"accessKeyId"` + SecretAccessKey string `json:"secretAccessKey"` + Region string `json:"region"` + HostedZoneId string `json:"hostedZoneId"` + DnsPropagationTimeout int32 `json:"dnsPropagationTimeout,omitempty"` + DnsTTL int32 `json:"dnsTTL,omitempty"` } func NewChallengeProvider(config *AWSRoute53ApplicantConfig) (challenge.Provider, error) { @@ -26,8 +27,11 @@ func NewChallengeProvider(config *AWSRoute53ApplicantConfig) (challenge.Provider providerConfig.SecretAccessKey = config.SecretAccessKey providerConfig.Region = config.Region providerConfig.HostedZoneID = config.HostedZoneId - if config.PropagationTimeout != 0 { - providerConfig.PropagationTimeout = time.Duration(config.PropagationTimeout) * time.Second + if config.DnsPropagationTimeout != 0 { + providerConfig.PropagationTimeout = time.Duration(config.DnsPropagationTimeout) * time.Second + } + if config.DnsTTL != 0 { + providerConfig.TTL = int(config.DnsTTL) } provider, err := route53.NewDNSProviderConfig(providerConfig) diff --git a/internal/pkg/core/applicant/acme-dns-01/lego-providers/azure-dns/azure-dns.go b/internal/pkg/core/applicant/acme-dns-01/lego-providers/azure-dns/azure-dns.go index 76389e8e..7cfce4a7 100644 --- a/internal/pkg/core/applicant/acme-dns-01/lego-providers/azure-dns/azure-dns.go +++ b/internal/pkg/core/applicant/acme-dns-01/lego-providers/azure-dns/azure-dns.go @@ -12,11 +12,12 @@ import ( ) type AzureDNSApplicantConfig struct { - TenantId string `json:"tenantId"` - ClientId string `json:"clientId"` - ClientSecret string `json:"clientSecret"` - CloudName string `json:"cloudName,omitempty"` - PropagationTimeout int32 `json:"propagationTimeout,omitempty"` + TenantId string `json:"tenantId"` + ClientId string `json:"clientId"` + ClientSecret string `json:"clientSecret"` + CloudName string `json:"cloudName,omitempty"` + DnsPropagationTimeout int32 `json:"dnsPropagationTimeout,omitempty"` + DnsTTL int32 `json:"dnsTTL,omitempty"` } func NewChallengeProvider(config *AzureDNSApplicantConfig) (challenge.Provider, error) { @@ -40,8 +41,11 @@ func NewChallengeProvider(config *AzureDNSApplicantConfig) (challenge.Provider, return nil, fmt.Errorf("azuredns: unknown environment %s", config.CloudName) } } - if config.PropagationTimeout != 0 { - providerConfig.PropagationTimeout = time.Duration(config.PropagationTimeout) * time.Second + if config.DnsPropagationTimeout != 0 { + providerConfig.PropagationTimeout = time.Duration(config.DnsPropagationTimeout) * time.Second + } + if config.DnsTTL != 0 { + providerConfig.TTL = int(config.DnsTTL) } provider, err := azuredns.NewDNSProviderConfig(providerConfig) diff --git a/internal/pkg/core/applicant/acme-dns-01/lego-providers/cloudflare/cloudflare.go b/internal/pkg/core/applicant/acme-dns-01/lego-providers/cloudflare/cloudflare.go index 0f1abc40..cea32e94 100644 --- a/internal/pkg/core/applicant/acme-dns-01/lego-providers/cloudflare/cloudflare.go +++ b/internal/pkg/core/applicant/acme-dns-01/lego-providers/cloudflare/cloudflare.go @@ -9,8 +9,9 @@ import ( ) type CloudflareApplicantConfig struct { - DnsApiToken string `json:"dnsApiToken"` - PropagationTimeout int32 `json:"propagationTimeout,omitempty"` + DnsApiToken string `json:"dnsApiToken"` + DnsPropagationTimeout int32 `json:"dnsPropagationTimeout,omitempty"` + DnsTTL int32 `json:"dnsTTL,omitempty"` } func NewChallengeProvider(config *CloudflareApplicantConfig) (challenge.Provider, error) { @@ -20,8 +21,11 @@ func NewChallengeProvider(config *CloudflareApplicantConfig) (challenge.Provider providerConfig := cloudflare.NewDefaultConfig() providerConfig.AuthToken = config.DnsApiToken - if config.PropagationTimeout != 0 { - providerConfig.PropagationTimeout = time.Duration(config.PropagationTimeout) * time.Second + if config.DnsPropagationTimeout != 0 { + providerConfig.PropagationTimeout = time.Duration(config.DnsPropagationTimeout) * time.Second + } + if config.DnsTTL != 0 { + providerConfig.TTL = int(config.DnsTTL) } provider, err := cloudflare.NewDNSProviderConfig(providerConfig) diff --git a/internal/pkg/core/applicant/acme-dns-01/lego-providers/godaddy/godaddy.go b/internal/pkg/core/applicant/acme-dns-01/lego-providers/godaddy/godaddy.go index 1a85a28d..3a44616b 100644 --- a/internal/pkg/core/applicant/acme-dns-01/lego-providers/godaddy/godaddy.go +++ b/internal/pkg/core/applicant/acme-dns-01/lego-providers/godaddy/godaddy.go @@ -9,9 +9,10 @@ import ( ) type GoDaddyApplicantConfig struct { - ApiKey string `json:"apiKey"` - ApiSecret string `json:"apiSecret"` - PropagationTimeout int32 `json:"propagationTimeout,omitempty"` + ApiKey string `json:"apiKey"` + ApiSecret string `json:"apiSecret"` + DnsPropagationTimeout int32 `json:"dnsPropagationTimeout,omitempty"` + DnsTTL int32 `json:"dnsTTL,omitempty"` } func NewChallengeProvider(config *GoDaddyApplicantConfig) (challenge.Provider, error) { @@ -22,8 +23,11 @@ func NewChallengeProvider(config *GoDaddyApplicantConfig) (challenge.Provider, e providerConfig := godaddy.NewDefaultConfig() providerConfig.APIKey = config.ApiKey providerConfig.APISecret = config.ApiSecret - if config.PropagationTimeout != 0 { - providerConfig.PropagationTimeout = time.Duration(config.PropagationTimeout) * time.Second + if config.DnsPropagationTimeout != 0 { + providerConfig.PropagationTimeout = time.Duration(config.DnsPropagationTimeout) * time.Second + } + if config.DnsTTL != 0 { + providerConfig.TTL = int(config.DnsTTL) } provider, err := godaddy.NewDNSProviderConfig(providerConfig) diff --git a/internal/pkg/core/applicant/acme-dns-01/lego-providers/huaweicloud/huaweicloud.go b/internal/pkg/core/applicant/acme-dns-01/lego-providers/huaweicloud/huaweicloud.go index a271f99c..cbdf2928 100644 --- a/internal/pkg/core/applicant/acme-dns-01/lego-providers/huaweicloud/huaweicloud.go +++ b/internal/pkg/core/applicant/acme-dns-01/lego-providers/huaweicloud/huaweicloud.go @@ -9,10 +9,11 @@ import ( ) type HuaweiCloudApplicantConfig struct { - AccessKeyId string `json:"accessKeyId"` - SecretAccessKey string `json:"secretAccessKey"` - Region string `json:"region"` - PropagationTimeout int32 `json:"propagationTimeout,omitempty"` + AccessKeyId string `json:"accessKeyId"` + SecretAccessKey string `json:"secretAccessKey"` + Region string `json:"region"` + DnsPropagationTimeout int32 `json:"dnsPropagationTimeout,omitempty"` + DnsTTL int32 `json:"dnsTTL,omitempty"` } func NewChallengeProvider(config *HuaweiCloudApplicantConfig) (challenge.Provider, error) { @@ -30,8 +31,11 @@ func NewChallengeProvider(config *HuaweiCloudApplicantConfig) (challenge.Provide providerConfig.AccessKeyID = config.AccessKeyId providerConfig.SecretAccessKey = config.SecretAccessKey providerConfig.Region = region - if config.PropagationTimeout != 0 { - providerConfig.PropagationTimeout = time.Duration(config.PropagationTimeout) * time.Second + if config.DnsPropagationTimeout != 0 { + providerConfig.PropagationTimeout = time.Duration(config.DnsPropagationTimeout) * time.Second + } + if config.DnsTTL != 0 { + providerConfig.TTL = config.DnsTTL } provider, err := hwc.NewDNSProviderConfig(providerConfig) diff --git a/internal/pkg/core/applicant/acme-dns-01/lego-providers/namedotcom/namedotcom.go b/internal/pkg/core/applicant/acme-dns-01/lego-providers/namedotcom/namedotcom.go index b5c8d3cb..c51b1a9b 100644 --- a/internal/pkg/core/applicant/acme-dns-01/lego-providers/namedotcom/namedotcom.go +++ b/internal/pkg/core/applicant/acme-dns-01/lego-providers/namedotcom/namedotcom.go @@ -9,9 +9,10 @@ import ( ) type NameDotComApplicantConfig struct { - Username string `json:"username"` - ApiToken string `json:"apiToken"` - PropagationTimeout int32 `json:"propagationTimeout,omitempty"` + Username string `json:"username"` + ApiToken string `json:"apiToken"` + DnsPropagationTimeout int32 `json:"dnsPropagationTimeout,omitempty"` + DnsTTL int32 `json:"dnsTTL,omitempty"` } func NewChallengeProvider(config *NameDotComApplicantConfig) (challenge.Provider, error) { @@ -22,8 +23,11 @@ func NewChallengeProvider(config *NameDotComApplicantConfig) (challenge.Provider providerConfig := namedotcom.NewDefaultConfig() providerConfig.Username = config.Username providerConfig.APIToken = config.ApiToken - if config.PropagationTimeout != 0 { - providerConfig.PropagationTimeout = time.Duration(config.PropagationTimeout) * time.Second + if config.DnsPropagationTimeout != 0 { + providerConfig.PropagationTimeout = time.Duration(config.DnsPropagationTimeout) * time.Second + } + if config.DnsTTL != 0 { + providerConfig.TTL = int(config.DnsTTL) } provider, err := namedotcom.NewDNSProviderConfig(providerConfig) diff --git a/internal/pkg/core/applicant/acme-dns-01/lego-providers/namesilo/namesilo.go b/internal/pkg/core/applicant/acme-dns-01/lego-providers/namesilo/namesilo.go index f62201d6..0f1bf8ea 100644 --- a/internal/pkg/core/applicant/acme-dns-01/lego-providers/namesilo/namesilo.go +++ b/internal/pkg/core/applicant/acme-dns-01/lego-providers/namesilo/namesilo.go @@ -9,8 +9,9 @@ import ( ) type NameSiloApplicantConfig struct { - ApiKey string `json:"apiKey"` - PropagationTimeout int32 `json:"propagationTimeout,omitempty"` + ApiKey string `json:"apiKey"` + DnsPropagationTimeout int32 `json:"dnsPropagationTimeout,omitempty"` + DnsTTL int32 `json:"dnsTTL,omitempty"` } func NewChallengeProvider(config *NameSiloApplicantConfig) (challenge.Provider, error) { @@ -20,8 +21,11 @@ func NewChallengeProvider(config *NameSiloApplicantConfig) (challenge.Provider, providerConfig := namesilo.NewDefaultConfig() providerConfig.APIKey = config.ApiKey - if config.PropagationTimeout != 0 { - providerConfig.PropagationTimeout = time.Duration(config.PropagationTimeout) * time.Second + if config.DnsPropagationTimeout != 0 { + providerConfig.PropagationTimeout = time.Duration(config.DnsPropagationTimeout) * time.Second + } + if config.DnsTTL != 0 { + providerConfig.TTL = int(config.DnsTTL) } provider, err := namesilo.NewDNSProviderConfig(providerConfig) diff --git a/internal/pkg/core/applicant/acme-dns-01/lego-providers/ns1/ns1.go b/internal/pkg/core/applicant/acme-dns-01/lego-providers/ns1/ns1.go index 7403ecb8..efa40076 100644 --- a/internal/pkg/core/applicant/acme-dns-01/lego-providers/ns1/ns1.go +++ b/internal/pkg/core/applicant/acme-dns-01/lego-providers/ns1/ns1.go @@ -9,8 +9,9 @@ import ( ) type NS1ApplicantConfig struct { - ApiKey string `json:"apiKey"` - PropagationTimeout int32 `json:"propagationTimeout,omitempty"` + ApiKey string `json:"apiKey"` + DnsPropagationTimeout int32 `json:"dnsPropagationTimeout,omitempty"` + DnsTTL int32 `json:"dnsTTL,omitempty"` } func NewChallengeProvider(config *NS1ApplicantConfig) (challenge.Provider, error) { @@ -20,8 +21,11 @@ func NewChallengeProvider(config *NS1ApplicantConfig) (challenge.Provider, error providerConfig := ns1.NewDefaultConfig() providerConfig.APIKey = config.ApiKey - if config.PropagationTimeout != 0 { - providerConfig.PropagationTimeout = time.Duration(config.PropagationTimeout) * time.Second + if config.DnsPropagationTimeout != 0 { + providerConfig.PropagationTimeout = time.Duration(config.DnsPropagationTimeout) * time.Second + } + if config.DnsTTL != 0 { + providerConfig.TTL = int(config.DnsTTL) } provider, err := ns1.NewDNSProviderConfig(providerConfig) diff --git a/internal/pkg/core/applicant/acme-dns-01/lego-providers/powerdns/powerdns.go b/internal/pkg/core/applicant/acme-dns-01/lego-providers/powerdns/powerdns.go index b6512389..d5fa616c 100644 --- a/internal/pkg/core/applicant/acme-dns-01/lego-providers/powerdns/powerdns.go +++ b/internal/pkg/core/applicant/acme-dns-01/lego-providers/powerdns/powerdns.go @@ -10,9 +10,10 @@ import ( ) type PowerDNSApplicantConfig struct { - ApiUrl string `json:"apiUrl"` - ApiKey string `json:"apiKey"` - PropagationTimeout int32 `json:"propagationTimeout,omitempty"` + ApiUrl string `json:"apiUrl"` + ApiKey string `json:"apiKey"` + DnsPropagationTimeout int32 `json:"dnsPropagationTimeout,omitempty"` + DnsTTL int32 `json:"dnsTTL,omitempty"` } func NewChallengeProvider(config *PowerDNSApplicantConfig) (challenge.Provider, error) { @@ -24,8 +25,11 @@ func NewChallengeProvider(config *PowerDNSApplicantConfig) (challenge.Provider, providerConfig := pdns.NewDefaultConfig() providerConfig.Host = host providerConfig.APIKey = config.ApiKey - if config.PropagationTimeout != 0 { - providerConfig.PropagationTimeout = time.Duration(config.PropagationTimeout) * time.Second + if config.DnsPropagationTimeout != 0 { + providerConfig.PropagationTimeout = time.Duration(config.DnsPropagationTimeout) * time.Second + } + if config.DnsTTL != 0 { + providerConfig.TTL = int(config.DnsTTL) } provider, err := pdns.NewDNSProviderConfig(providerConfig) diff --git a/internal/pkg/core/applicant/acme-dns-01/lego-providers/tencentcloud/tencentcloud.go b/internal/pkg/core/applicant/acme-dns-01/lego-providers/tencentcloud/tencentcloud.go index bd335fc4..f7e6bf7b 100644 --- a/internal/pkg/core/applicant/acme-dns-01/lego-providers/tencentcloud/tencentcloud.go +++ b/internal/pkg/core/applicant/acme-dns-01/lego-providers/tencentcloud/tencentcloud.go @@ -9,9 +9,10 @@ import ( ) type TencentCloudApplicantConfig struct { - SecretId string `json:"secretId"` - SecretKey string `json:"secretKey"` - PropagationTimeout int32 `json:"propagationTimeout,omitempty"` + SecretId string `json:"secretId"` + SecretKey string `json:"secretKey"` + DnsPropagationTimeout int32 `json:"dnsPropagationTimeout,omitempty"` + DnsTTL int32 `json:"dnsTTL,omitempty"` } func NewChallengeProvider(config *TencentCloudApplicantConfig) (challenge.Provider, error) { @@ -22,8 +23,11 @@ func NewChallengeProvider(config *TencentCloudApplicantConfig) (challenge.Provid providerConfig := tencentcloud.NewDefaultConfig() providerConfig.SecretID = config.SecretId providerConfig.SecretKey = config.SecretKey - if config.PropagationTimeout != 0 { - providerConfig.PropagationTimeout = time.Duration(config.PropagationTimeout) * time.Second + if config.DnsPropagationTimeout != 0 { + providerConfig.PropagationTimeout = time.Duration(config.DnsPropagationTimeout) * time.Second + } + if config.DnsTTL != 0 { + providerConfig.TTL = int(config.DnsTTL) } provider, err := tencentcloud.NewDNSProviderConfig(providerConfig) diff --git a/internal/pkg/core/applicant/acme-dns-01/lego-providers/volcengine/volcengine.go b/internal/pkg/core/applicant/acme-dns-01/lego-providers/volcengine/volcengine.go index 0c9ad3c5..a8f11ff9 100644 --- a/internal/pkg/core/applicant/acme-dns-01/lego-providers/volcengine/volcengine.go +++ b/internal/pkg/core/applicant/acme-dns-01/lego-providers/volcengine/volcengine.go @@ -9,9 +9,10 @@ import ( ) type VolcEngineApplicantConfig struct { - AccessKeyId string `json:"accessKeyId"` - SecretAccessKey string `json:"secretAccessKey"` - PropagationTimeout int32 `json:"propagationTimeout,omitempty"` + AccessKeyId string `json:"accessKeyId"` + SecretAccessKey string `json:"secretAccessKey"` + DnsPropagationTimeout int32 `json:"dnsPropagationTimeout,omitempty"` + DnsTTL int32 `json:"dnsTTL,omitempty"` } func NewChallengeProvider(config *VolcEngineApplicantConfig) (challenge.Provider, error) { @@ -22,8 +23,11 @@ func NewChallengeProvider(config *VolcEngineApplicantConfig) (challenge.Provider providerConfig := volcengine.NewDefaultConfig() providerConfig.AccessKey = config.AccessKeyId providerConfig.SecretKey = config.SecretAccessKey - if config.PropagationTimeout != 0 { - providerConfig.PropagationTimeout = time.Duration(config.PropagationTimeout) * time.Second + if config.DnsPropagationTimeout != 0 { + providerConfig.PropagationTimeout = time.Duration(config.DnsPropagationTimeout) * time.Second + } + if config.DnsTTL != 0 { + providerConfig.TTL = int(config.DnsTTL) } provider, err := volcengine.NewDNSProviderConfig(providerConfig) diff --git a/internal/pkg/core/deployer/providers/huaweicloud-cdn/huaweicloud_cdn.go b/internal/pkg/core/deployer/providers/huaweicloud-cdn/huaweicloud_cdn.go index 1b2de807..5c303ce4 100644 --- a/internal/pkg/core/deployer/providers/huaweicloud-cdn/huaweicloud_cdn.go +++ b/internal/pkg/core/deployer/providers/huaweicloud-cdn/huaweicloud_cdn.go @@ -15,7 +15,6 @@ import ( "github.com/usual2970/certimate/internal/pkg/core/uploader" providerScm "github.com/usual2970/certimate/internal/pkg/core/uploader/providers/huaweicloud-scm" hwsdk "github.com/usual2970/certimate/internal/pkg/vendors/huaweicloud-sdk" - hwsdkCdn "github.com/usual2970/certimate/internal/pkg/vendors/huaweicloud-sdk/cdn" ) type HuaweiCloudCDNDeployerConfig struct { @@ -32,7 +31,7 @@ type HuaweiCloudCDNDeployerConfig struct { type HuaweiCloudCDNDeployer struct { config *HuaweiCloudCDNDeployerConfig logger logger.Logger - sdkClient *hwsdkCdn.Client + sdkClient *hcCdn.CdnClient sslUploader uploader.Uploader } @@ -100,21 +99,21 @@ func (d *HuaweiCloudCDNDeployer) Deploy(ctx context.Context, certPem string, pri // 更新加速域名配置 // REF: https://support.huaweicloud.com/api-cdn/UpdateDomainMultiCertificates.html // REF: https://support.huaweicloud.com/usermanual-cdn/cdn_01_0306.html - updateDomainMultiCertificatesReqBodyContent := &hwsdkCdn.UpdateDomainMultiCertificatesExRequestBodyContent{} + updateDomainMultiCertificatesReqBodyContent := &hcCdnModel.UpdateDomainMultiCertificatesRequestBodyContent{} updateDomainMultiCertificatesReqBodyContent.DomainName = d.config.Domain updateDomainMultiCertificatesReqBodyContent.HttpsSwitch = 1 updateDomainMultiCertificatesReqBodyContent.CertificateType = hwsdk.Int32Ptr(2) - updateDomainMultiCertificatesReqBodyContent.SCMCertificateId = hwsdk.StringPtr(upres.CertId) + updateDomainMultiCertificatesReqBodyContent.ScmCertificateId = hwsdk.StringPtr(upres.CertId) updateDomainMultiCertificatesReqBodyContent.CertName = hwsdk.StringPtr(upres.CertName) - updateDomainMultiCertificatesReqBodyContent = updateDomainMultiCertificatesReqBodyContent.MergeConfig(showDomainFullConfigResp.Configs) - updateDomainMultiCertificatesReq := &hwsdkCdn.UpdateDomainMultiCertificatesExRequest{ - Body: &hwsdkCdn.UpdateDomainMultiCertificatesExRequestBody{ + updateDomainMultiCertificatesReqBodyContent = assign(updateDomainMultiCertificatesReqBodyContent, showDomainFullConfigResp.Configs) + updateDomainMultiCertificatesReq := &hcCdnModel.UpdateDomainMultiCertificatesRequest{ + Body: &hcCdnModel.UpdateDomainMultiCertificatesRequestBody{ Https: updateDomainMultiCertificatesReqBodyContent, }, } - updateDomainMultiCertificatesResp, err := d.sdkClient.UploadDomainMultiCertificatesEx(updateDomainMultiCertificatesReq) + updateDomainMultiCertificatesResp, err := d.sdkClient.UpdateDomainMultiCertificates(updateDomainMultiCertificatesReq) if err != nil { - return nil, xerrors.Wrap(err, "failed to execute sdk request 'cdn.UploadDomainMultiCertificatesEx'") + return nil, xerrors.Wrap(err, "failed to execute sdk request 'cdn.UploadDomainMultiCertificates'") } d.logger.Logt("已更新加速域名配置", updateDomainMultiCertificatesResp) @@ -122,7 +121,7 @@ func (d *HuaweiCloudCDNDeployer) Deploy(ctx context.Context, certPem string, pri return &deployer.DeployResult{}, nil } -func createSdkClient(accessKeyId, secretAccessKey, region string) (*hwsdkCdn.Client, error) { +func createSdkClient(accessKeyId, secretAccessKey, region string) (*hcCdn.CdnClient, error) { if region == "" { region = "cn-north-1" // CDN 服务默认区域:华北一北京 } @@ -148,6 +147,42 @@ func createSdkClient(accessKeyId, secretAccessKey, region string) (*hwsdkCdn.Cli return nil, err } - client := hwsdkCdn.NewClient(hcClient) + client := hcCdn.NewCdnClient(hcClient) return client, nil } + +func assign(reqContent *hcCdnModel.UpdateDomainMultiCertificatesRequestBodyContent, target *hcCdnModel.ConfigsGetBody) *hcCdnModel.UpdateDomainMultiCertificatesRequestBodyContent { + if target == nil { + return reqContent + } + + // 华为云 API 中不传的字段表示使用默认值、而非保留原值,因此这里需要把原配置中的参数重新赋值回去。 + // 而且蛋疼的是查询接口返回的数据结构和更新接口传入的参数结构不一致,需要做很多转化。 + + if *target.OriginProtocol == "follow" { + reqContent.AccessOriginWay = hwsdk.Int32Ptr(1) + } else if *target.OriginProtocol == "http" { + reqContent.AccessOriginWay = hwsdk.Int32Ptr(2) + } else if *target.OriginProtocol == "https" { + reqContent.AccessOriginWay = hwsdk.Int32Ptr(3) + } + + if target.ForceRedirect != nil { + reqContent.ForceRedirectConfig = &hcCdnModel.ForceRedirect{} + + if target.ForceRedirect.Status == "on" { + reqContent.ForceRedirectConfig.Switch = 1 + reqContent.ForceRedirectConfig.RedirectType = target.ForceRedirect.Type + } else { + reqContent.ForceRedirectConfig.Switch = 0 + } + } + + if target.Https != nil { + if *target.Https.Http2Status == "on" { + reqContent.Http2 = hwsdk.Int32Ptr(1) + } + } + + return reqContent +} diff --git a/internal/pkg/utils/certs/transformer.go b/internal/pkg/utils/certs/transformer.go index 6918a3b4..c3575b3e 100644 --- a/internal/pkg/utils/certs/transformer.go +++ b/internal/pkg/utils/certs/transformer.go @@ -2,6 +2,8 @@ import ( "bytes" + "crypto/ecdsa" + "crypto/rsa" "encoding/pem" "errors" "time" @@ -26,9 +28,23 @@ func TransformCertificateFromPEMToPFX(certPem string, privkeyPem string, pfxPass return nil, err } - privkey, err := ParsePKCS1PrivateKeyFromPEM(privkeyPem) - if err != nil { - return nil, err + var privkey interface{} + switch cert.PublicKey.(type) { + case *rsa.PublicKey: + { + privkey, err = ParsePKCS1PrivateKeyFromPEM(privkeyPem) + if err != nil { + return nil, err + } + } + + case *ecdsa.PublicKey: + { + privkey, err = ParseECPrivateKeyFromPEM(privkeyPem) + if err != nil { + return nil, err + } + } } pfxData, err := pkcs12.LegacyRC2.Encode(privkey, cert, nil, pfxPassword) diff --git a/internal/pkg/vendors/huaweicloud-sdk/cdn/client.go b/internal/pkg/vendors/huaweicloud-sdk/cdn/client.go deleted file mode 100644 index 842ce9ef..00000000 --- a/internal/pkg/vendors/huaweicloud-sdk/cdn/client.go +++ /dev/null @@ -1,28 +0,0 @@ -package cdn - -import ( - "github.com/huaweicloud/huaweicloud-sdk-go-v3/core" - hcCdn "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/cdn/v2" - hcCdnModel "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/cdn/v2/model" -) - -type Client struct { - hcCdn.CdnClient -} - -func NewClient(hcClient *core.HcHttpClient) *Client { - return &Client{ - CdnClient: *hcCdn.NewCdnClient(hcClient), - } -} - -func (c *Client) UploadDomainMultiCertificatesEx(request *UpdateDomainMultiCertificatesExRequest) (*UpdateDomainMultiCertificatesExResponse, error) { - requestDef := hcCdn.GenReqDefForUpdateDomainMultiCertificates() - - if resp, err := c.HcClient.Sync(request, requestDef); err != nil { - return nil, err - } else { - temp := resp.(*hcCdnModel.UpdateDomainMultiCertificatesResponse) - return &UpdateDomainMultiCertificatesExResponse{UpdateDomainMultiCertificatesResponse: *temp}, nil - } -} diff --git a/internal/pkg/vendors/huaweicloud-sdk/cdn/models.go b/internal/pkg/vendors/huaweicloud-sdk/cdn/models.go deleted file mode 100644 index 5aa167f0..00000000 --- a/internal/pkg/vendors/huaweicloud-sdk/cdn/models.go +++ /dev/null @@ -1,62 +0,0 @@ -package cdn - -import ( - hcCdnModel "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/cdn/v2/model" - - hwsdk "github.com/usual2970/certimate/internal/pkg/vendors/huaweicloud-sdk" -) - -type UpdateDomainMultiCertificatesExRequestBodyContent struct { - hcCdnModel.UpdateDomainMultiCertificatesRequestBodyContent `json:",inline"` - - // 华为云官方 SDK 中目前提供的字段缺失,这里暂时先需自定义请求,可能需要等之后 SDK 更新。 - SCMCertificateId *string `json:"scm_certificate_id,omitempty"` -} - -type UpdateDomainMultiCertificatesExRequestBody struct { - Https *UpdateDomainMultiCertificatesExRequestBodyContent `json:"https,omitempty"` -} - -type UpdateDomainMultiCertificatesExRequest struct { - Body *UpdateDomainMultiCertificatesExRequestBody `json:"body,omitempty"` -} - -type UpdateDomainMultiCertificatesExResponse struct { - hcCdnModel.UpdateDomainMultiCertificatesResponse -} - -func (m *UpdateDomainMultiCertificatesExRequestBodyContent) MergeConfig(src *hcCdnModel.ConfigsGetBody) *UpdateDomainMultiCertificatesExRequestBodyContent { - if src == nil { - return m - } - - // 华为云 API 中不传的字段表示使用默认值、而非保留原值,因此这里需要把原配置中的参数重新赋值回去。 - // 而且蛋疼的是查询接口返回的数据结构和更新接口传入的参数结构不一致,需要做很多转化。 - - if *src.OriginProtocol == "follow" { - m.AccessOriginWay = hwsdk.Int32Ptr(1) - } else if *src.OriginProtocol == "http" { - m.AccessOriginWay = hwsdk.Int32Ptr(2) - } else if *src.OriginProtocol == "https" { - m.AccessOriginWay = hwsdk.Int32Ptr(3) - } - - if src.ForceRedirect != nil { - m.ForceRedirectConfig = &hcCdnModel.ForceRedirect{} - - if src.ForceRedirect.Status == "on" { - m.ForceRedirectConfig.Switch = 1 - m.ForceRedirectConfig.RedirectType = src.ForceRedirect.Type - } else { - m.ForceRedirectConfig.Switch = 0 - } - } - - if src.Https != nil { - if *src.Https.Http2Status == "on" { - m.Http2 = hwsdk.Int32Ptr(1) - } - } - - return m -} diff --git a/internal/repository/access.go b/internal/repository/access.go index 9244a112..a8370fd8 100644 --- a/internal/repository/access.go +++ b/internal/repository/access.go @@ -6,7 +6,8 @@ import ( "errors" "fmt" - "github.com/pocketbase/pocketbase/models" + "github.com/pocketbase/pocketbase/core" + "github.com/usual2970/certimate/internal/app" "github.com/usual2970/certimate/internal/domain" ) @@ -18,7 +19,7 @@ func NewAccessRepository() *AccessRepository { } func (r *AccessRepository) GetById(ctx context.Context, id string) (*domain.Access, error) { - record, err := app.GetApp().Dao().FindRecordById("access", id) + record, err := app.GetApp().FindRecordById(domain.CollectionNameAccess, id) if err != nil { if errors.Is(err, sql.ErrNoRows) { return nil, domain.ErrRecordNotFound @@ -33,16 +34,16 @@ func (r *AccessRepository) GetById(ctx context.Context, id string) (*domain.Acce return r.castRecordToModel(record) } -func (r *AccessRepository) castRecordToModel(record *models.Record) (*domain.Access, error) { +func (r *AccessRepository) castRecordToModel(record *core.Record) (*domain.Access, error) { if record == nil { return nil, fmt.Errorf("record is nil") } access := &domain.Access{ Meta: domain.Meta{ - Id: record.GetId(), - CreatedAt: record.GetCreated().Time(), - UpdatedAt: record.GetUpdated().Time(), + Id: record.Id, + CreatedAt: record.GetDateTime("created").Time(), + UpdatedAt: record.GetDateTime("updated").Time(), }, Name: record.GetString("name"), Provider: record.GetString("provider"), diff --git a/internal/repository/acme_account.go b/internal/repository/acme_account.go index f5996fe9..ef8ed62f 100644 --- a/internal/repository/acme_account.go +++ b/internal/repository/acme_account.go @@ -5,7 +5,7 @@ import ( "github.com/go-acme/lego/v4/registration" "github.com/pocketbase/dbx" - "github.com/pocketbase/pocketbase/models" + "github.com/pocketbase/pocketbase/core" "golang.org/x/sync/singleflight" "github.com/usual2970/certimate/internal/app" @@ -22,8 +22,8 @@ var g singleflight.Group func (r *AcmeAccountRepository) GetByCAAndEmail(ca, email string) (*domain.AcmeAccount, error) { resp, err, _ := g.Do(fmt.Sprintf("acme_account_%s_%s", ca, email), func() (interface{}, error) { - resp, err := app.GetApp().Dao().FindFirstRecordByFilter( - "acme_accounts", + resp, err := app.GetApp().FindFirstRecordByFilter( + domain.CollectionNameAcmeAccount, "ca={:ca} && email={:email}", dbx.Params{"ca": ca, "email": email}, ) @@ -40,7 +40,7 @@ func (r *AcmeAccountRepository) GetByCAAndEmail(ca, email string) (*domain.AcmeA return nil, domain.ErrRecordNotFound } - record, ok := resp.(*models.Record) + record, ok := resp.(*core.Record) if !ok { return nil, domain.ErrRecordNotFound } @@ -49,20 +49,20 @@ func (r *AcmeAccountRepository) GetByCAAndEmail(ca, email string) (*domain.AcmeA } func (r *AcmeAccountRepository) Save(ca, email, key string, resource *registration.Resource) error { - collection, err := app.GetApp().Dao().FindCollectionByNameOrId("acme_accounts") + collection, err := app.GetApp().FindCollectionByNameOrId(domain.CollectionNameAcmeAccount) if err != nil { return err } - record := models.NewRecord(collection) + record := core.NewRecord(collection) record.Set("ca", ca) record.Set("email", email) record.Set("key", key) record.Set("resource", resource) - return app.GetApp().Dao().Save(record) + return app.GetApp().Save(record) } -func (r *AcmeAccountRepository) castRecordToModel(record *models.Record) (*domain.AcmeAccount, error) { +func (r *AcmeAccountRepository) castRecordToModel(record *core.Record) (*domain.AcmeAccount, error) { if record == nil { return nil, fmt.Errorf("record is nil") } @@ -74,9 +74,9 @@ func (r *AcmeAccountRepository) castRecordToModel(record *models.Record) (*domai acmeAccount := &domain.AcmeAccount{ Meta: domain.Meta{ - Id: record.GetId(), - CreatedAt: record.GetCreated().Time(), - UpdatedAt: record.GetUpdated().Time(), + Id: record.Id, + CreatedAt: record.GetDateTime("created").Time(), + UpdatedAt: record.GetDateTime("updated").Time(), }, CA: record.GetString("ca"), Email: record.GetString("email"), diff --git a/internal/repository/certificate.go b/internal/repository/certificate.go index 0499eb48..6aee6add 100644 --- a/internal/repository/certificate.go +++ b/internal/repository/certificate.go @@ -7,7 +7,7 @@ import ( "fmt" "github.com/pocketbase/dbx" - "github.com/pocketbase/pocketbase/models" + "github.com/pocketbase/pocketbase/core" "github.com/usual2970/certimate/internal/app" "github.com/usual2970/certimate/internal/domain" ) @@ -19,8 +19,8 @@ func NewCertificateRepository() *CertificateRepository { } func (r *CertificateRepository) ListExpireSoon(ctx context.Context) ([]*domain.Certificate, error) { - records, err := app.GetApp().Dao().FindRecordsByFilter( - "certificate", + records, err := app.GetApp().FindRecordsByFilter( + domain.CollectionNameCertificate, "expireAt>DATETIME('now') && expireAt DATETIME('now') and expireAt < DATETIME('now', '+20 days')"). One(&certExpireSoonTotal); err != nil { return nil, err @@ -40,7 +42,7 @@ func (r *StatisticsRepository) Get(ctx context.Context) (*domain.Statistics, err certExpiredTotal := struct { Total int `db:"total"` }{} - if err := app.GetApp().Dao().DB(). + if err := app.GetDB(). NewQuery("SELECT COUNT(*) AS total FROM certificate WHERE expireAt < DATETIME('now')"). One(&certExpiredTotal); err != nil { return nil, err @@ -51,7 +53,9 @@ func (r *StatisticsRepository) Get(ctx context.Context) (*domain.Statistics, err workflowTotal := struct { Total int `db:"total"` }{} - if err := app.GetApp().Dao().DB().NewQuery("SELECT COUNT(*) AS total FROM workflow").One(&workflowTotal); err != nil { + if err := app.GetDB(). + NewQuery("SELECT COUNT(*) AS total FROM workflow"). + One(&workflowTotal); err != nil { return nil, err } rs.WorkflowTotal = workflowTotal.Total @@ -60,7 +64,9 @@ func (r *StatisticsRepository) Get(ctx context.Context) (*domain.Statistics, err workflowEnabledTotal := struct { Total int `db:"total"` }{} - if err := app.GetApp().Dao().DB().NewQuery("SELECT COUNT(*) AS total FROM workflow WHERE enabled IS TRUE").One(&workflowEnabledTotal); err != nil { + if err := app.GetDB(). + NewQuery("SELECT COUNT(*) AS total FROM workflow WHERE enabled IS TRUE"). + One(&workflowEnabledTotal); err != nil { return nil, err } rs.WorkflowEnabled = workflowEnabledTotal.Total diff --git a/internal/repository/workflow.go b/internal/repository/workflow.go index d8a1980f..ac9b3e9f 100644 --- a/internal/repository/workflow.go +++ b/internal/repository/workflow.go @@ -7,8 +7,7 @@ import ( "fmt" "github.com/pocketbase/dbx" - "github.com/pocketbase/pocketbase/daos" - "github.com/pocketbase/pocketbase/models" + "github.com/pocketbase/pocketbase/core" "github.com/usual2970/certimate/internal/app" "github.com/usual2970/certimate/internal/domain" ) @@ -20,8 +19,8 @@ func NewWorkflowRepository() *WorkflowRepository { } func (r *WorkflowRepository) ListEnabledAuto(ctx context.Context) ([]*domain.Workflow, error) { - records, err := app.GetApp().Dao().FindRecordsByFilter( - "workflow", + records, err := app.GetApp().FindRecordsByFilter( + domain.CollectionNameWorkflow, "enabled={:enabled} && trigger={:trigger}", "-created", 0, 0, @@ -45,7 +44,7 @@ func (r *WorkflowRepository) ListEnabledAuto(ctx context.Context) ([]*domain.Wor } func (r *WorkflowRepository) GetById(ctx context.Context, id string) (*domain.Workflow, error) { - record, err := app.GetApp().Dao().FindRecordById("workflow", id) + record, err := app.GetApp().FindRecordById(domain.CollectionNameWorkflow, id) if err != nil { if errors.Is(err, sql.ErrNoRows) { return nil, domain.ErrRecordNotFound @@ -57,15 +56,16 @@ func (r *WorkflowRepository) GetById(ctx context.Context, id string) (*domain.Wo } func (r *WorkflowRepository) Save(ctx context.Context, workflow *domain.Workflow) error { - collection, err := app.GetApp().Dao().FindCollectionByNameOrId(workflow.Table()) + collection, err := app.GetApp().FindCollectionByNameOrId(domain.CollectionNameWorkflow) if err != nil { return err } - var record *models.Record + + var record *core.Record if workflow.Id == "" { - record = models.NewRecord(collection) + record = core.NewRecord(collection) } else { - record, err = app.GetApp().Dao().FindRecordById(workflow.Table(), workflow.Id) + record, err = app.GetApp().FindRecordById(domain.CollectionNameWorkflow, workflow.Id) if err != nil { if errors.Is(err, sql.ErrNoRows) { return domain.ErrRecordNotFound @@ -86,40 +86,44 @@ func (r *WorkflowRepository) Save(ctx context.Context, workflow *domain.Workflow record.Set("lastRunStatus", string(workflow.LastRunStatus)) record.Set("lastRunTime", workflow.LastRunTime) - return app.GetApp().Dao().SaveRecord(record) + return app.GetApp().Save(record) } func (r *WorkflowRepository) SaveRun(ctx context.Context, workflowRun *domain.WorkflowRun) error { - collection, err := app.GetApp().Dao().FindCollectionByNameOrId("workflow_run") + collection, err := app.GetApp().FindCollectionByNameOrId(domain.CollectionNameWorkflowRun) if err != nil { return err } - err = app.GetApp().Dao().RunInTransaction(func(txDao *daos.Dao) error { - record := models.NewRecord(collection) - record.Set("workflowId", workflowRun.WorkflowId) - record.Set("trigger", string(workflowRun.Trigger)) - record.Set("status", string(workflowRun.Status)) - record.Set("startedAt", workflowRun.StartedAt) - record.Set("endedAt", workflowRun.EndedAt) - record.Set("logs", workflowRun.Logs) - record.Set("error", workflowRun.Error) - err = txDao.SaveRecord(record) + err = app.GetApp().RunInTransaction(func(txApp core.App) error { + workflowRunRecord := core.NewRecord(collection) + workflowRunRecord.Id = workflowRun.Id + workflowRunRecord.Set("workflowId", workflowRun.WorkflowId) + workflowRunRecord.Set("trigger", string(workflowRun.Trigger)) + workflowRunRecord.Set("status", string(workflowRun.Status)) + workflowRunRecord.Set("startedAt", workflowRun.StartedAt) + workflowRunRecord.Set("endedAt", workflowRun.EndedAt) + workflowRunRecord.Set("logs", workflowRun.Logs) + workflowRunRecord.Set("error", workflowRun.Error) + err = txApp.Save(workflowRunRecord) if err != nil { return err } - // unable trigger sse using DB() - workflowRecord, err := txDao.FindRecordById("workflow", workflowRun.WorkflowId) + workflowRecord, err := txApp.FindRecordById(domain.CollectionNameWorkflow, workflowRun.WorkflowId) if err != nil { return err } - workflowRecord.Set("lastRunId", record.GetId()) - workflowRecord.Set("lastRunStatus", record.GetString("status")) - workflowRecord.Set("lastRunTime", record.GetString("startedAt")) + workflowRecord.Set("lastRunId", workflowRunRecord.Id) + workflowRecord.Set("lastRunStatus", workflowRunRecord.GetString("status")) + workflowRecord.Set("lastRunTime", workflowRunRecord.GetString("startedAt")) + err = txApp.Save(workflowRecord) + if err != nil { + return err + } - return txDao.SaveRecord(workflowRecord) + return nil }) if err != nil { return err @@ -128,7 +132,7 @@ func (r *WorkflowRepository) SaveRun(ctx context.Context, workflowRun *domain.Wo return nil } -func (r *WorkflowRepository) castRecordToModel(record *models.Record) (*domain.Workflow, error) { +func (r *WorkflowRepository) castRecordToModel(record *core.Record) (*domain.Workflow, error) { if record == nil { return nil, fmt.Errorf("record is nil") } @@ -145,9 +149,9 @@ func (r *WorkflowRepository) castRecordToModel(record *models.Record) (*domain.W workflow := &domain.Workflow{ Meta: domain.Meta{ - Id: record.GetId(), - CreatedAt: record.GetCreated().Time(), - UpdatedAt: record.GetUpdated().Time(), + Id: record.Id, + CreatedAt: record.GetDateTime("created").Time(), + UpdatedAt: record.GetDateTime("updated").Time(), }, Name: record.GetString("name"), Description: record.GetString("description"), diff --git a/internal/repository/workflow_output.go b/internal/repository/workflow_output.go index 43a6294b..724bb799 100644 --- a/internal/repository/workflow_output.go +++ b/internal/repository/workflow_output.go @@ -6,7 +6,7 @@ import ( "errors" "github.com/pocketbase/dbx" - "github.com/pocketbase/pocketbase/models" + "github.com/pocketbase/pocketbase/core" "github.com/usual2970/certimate/internal/app" "github.com/usual2970/certimate/internal/domain" ) @@ -18,8 +18,8 @@ func NewWorkflowOutputRepository() *WorkflowOutputRepository { } func (r *WorkflowOutputRepository) GetByNodeId(ctx context.Context, nodeId string) (*domain.WorkflowOutput, error) { - records, err := app.GetApp().Dao().FindRecordsByFilter( - "workflow_output", + records, err := app.GetApp().FindRecordsByFilter( + domain.CollectionNameWorkflowOutput, "nodeId={:nodeId}", "-created", 1, 0, @@ -48,9 +48,9 @@ func (r *WorkflowOutputRepository) GetByNodeId(ctx context.Context, nodeId strin rs := &domain.WorkflowOutput{ Meta: domain.Meta{ - Id: record.GetId(), - CreatedAt: record.GetCreated().Time(), - UpdatedAt: record.GetUpdated().Time(), + Id: record.Id, + CreatedAt: record.GetDateTime("created").Time(), + UpdatedAt: record.GetDateTime("updated").Time(), }, WorkflowId: record.GetString("workflowId"), NodeId: record.GetString("nodeId"), @@ -64,17 +64,17 @@ func (r *WorkflowOutputRepository) GetByNodeId(ctx context.Context, nodeId strin // 保存节点输出 func (r *WorkflowOutputRepository) Save(ctx context.Context, output *domain.WorkflowOutput, certificate *domain.Certificate, cb func(id string) error) error { - var record *models.Record + var record *core.Record var err error if output.Id == "" { - collection, err := app.GetApp().Dao().FindCollectionByNameOrId("workflow_output") + collection, err := app.GetApp().FindCollectionByNameOrId(domain.CollectionNameWorkflowOutput) if err != nil { return err } - record = models.NewRecord(collection) + record = core.NewRecord(collection) } else { - record, err = app.GetApp().Dao().FindRecordById("workflow_output", output.Id) + record, err = app.GetApp().FindRecordById(domain.CollectionNameWorkflowOutput, output.Id) if err != nil { return err } @@ -85,21 +85,21 @@ func (r *WorkflowOutputRepository) Save(ctx context.Context, output *domain.Work record.Set("outputs", output.Outputs) record.Set("succeeded", output.Succeeded) - if err := app.GetApp().Dao().SaveRecord(record); err != nil { + if err := app.GetApp().Save(record); err != nil { return err } if cb != nil && certificate != nil { - if err := cb(record.GetId()); err != nil { + if err := cb(record.Id); err != nil { return err } - certCollection, err := app.GetApp().Dao().FindCollectionByNameOrId("certificate") + certCollection, err := app.GetApp().FindCollectionByNameOrId(domain.CollectionNameCertificate) if err != nil { return err } - certRecord := models.NewRecord(certCollection) + certRecord := core.NewRecord(certCollection) certRecord.Set("source", string(certificate.Source)) certRecord.Set("subjectAltNames", certificate.SubjectAltNames) certRecord.Set("certificate", certificate.Certificate) @@ -113,21 +113,21 @@ func (r *WorkflowOutputRepository) Save(ctx context.Context, output *domain.Work certRecord.Set("workflowNodeId", certificate.WorkflowNodeId) certRecord.Set("workflowOutputId", certificate.WorkflowOutputId) - if err := app.GetApp().Dao().SaveRecord(certRecord); err != nil { + if err := app.GetApp().Save(certRecord); err != nil { return err } // 更新 certificate for i, item := range output.Outputs { - if item.Name == domain.WORKFLOW_OUTPUT_CERTIFICATE { - output.Outputs[i].Value = certRecord.GetId() + if item.Name == string(domain.WorkflowNodeIONameCertificate) { + output.Outputs[i].Value = certRecord.Id break } } record.Set("outputs", output.Outputs) - if err := app.GetApp().Dao().SaveRecord(record); err != nil { + if err := app.GetApp().Save(record); err != nil { return err } diff --git a/internal/rest/handlers/certificate.go b/internal/rest/handlers/certificate.go new file mode 100644 index 00000000..26788de6 --- /dev/null +++ b/internal/rest/handlers/certificate.go @@ -0,0 +1,42 @@ +package handlers + +import ( + "context" + + "github.com/pocketbase/pocketbase/core" + "github.com/pocketbase/pocketbase/tools/router" + + "github.com/usual2970/certimate/internal/domain/dtos" + "github.com/usual2970/certimate/internal/rest/resp" +) + +type certificateService interface { + ArchiveFile(ctx context.Context, req *dtos.CertificateArchiveFileReq) ([]byte, error) +} + +type CertificateHandler struct { + service certificateService +} + +func NewCertificateHandler(router *router.RouterGroup[*core.RequestEvent], service certificateService) { + handler := &CertificateHandler{ + service: service, + } + + group := router.Group("/certificates") + group.POST("/{id}/archive", handler.run) +} + +func (handler *CertificateHandler) run(e *core.RequestEvent) error { + req := &dtos.CertificateArchiveFileReq{} + req.CertificateId = e.Request.PathValue("id") + if err := e.BindBody(req); err != nil { + return resp.Err(e, err) + } + + if bt, err := handler.service.ArchiveFile(e.Request.Context(), req); err != nil { + return resp.Err(e, err) + } else { + return resp.Ok(e, bt) + } +} diff --git a/internal/rest/handlers/notify.go b/internal/rest/handlers/notify.go new file mode 100644 index 00000000..eed8b8cc --- /dev/null +++ b/internal/rest/handlers/notify.go @@ -0,0 +1,41 @@ +package handlers + +import ( + "context" + + "github.com/pocketbase/pocketbase/core" + "github.com/pocketbase/pocketbase/tools/router" + + "github.com/usual2970/certimate/internal/domain/dtos" + "github.com/usual2970/certimate/internal/rest/resp" +) + +type notifyService interface { + Test(ctx context.Context, req *dtos.NotifyTestPushReq) error +} + +type NotifyHandler struct { + service notifyService +} + +func NewNotifyHandler(router *router.RouterGroup[*core.RequestEvent], service notifyService) { + handler := &NotifyHandler{ + service: service, + } + + group := router.Group("/notify") + group.POST("/test", handler.test) +} + +func (handler *NotifyHandler) test(e *core.RequestEvent) error { + req := &dtos.NotifyTestPushReq{} + if err := e.BindBody(req); err != nil { + return resp.Err(e, err) + } + + if err := handler.service.Test(e.Request.Context(), req); err != nil { + return resp.Err(e, err) + } + + return resp.Ok(e, nil) +} diff --git a/internal/rest/handlers/statistics.go b/internal/rest/handlers/statistics.go new file mode 100644 index 00000000..65853cae --- /dev/null +++ b/internal/rest/handlers/statistics.go @@ -0,0 +1,36 @@ +package handlers + +import ( + "context" + + "github.com/pocketbase/pocketbase/core" + "github.com/pocketbase/pocketbase/tools/router" + + "github.com/usual2970/certimate/internal/domain" + "github.com/usual2970/certimate/internal/rest/resp" +) + +type statisticsService interface { + Get(ctx context.Context) (*domain.Statistics, error) +} + +type StatisticsHandler struct { + service statisticsService +} + +func NewStatisticsHandler(router *router.RouterGroup[*core.RequestEvent], service statisticsService) { + handler := &StatisticsHandler{ + service: service, + } + + group := router.Group("/statistics") + group.GET("/get", handler.get) +} + +func (handler *StatisticsHandler) get(e *core.RequestEvent) error { + if statistics, err := handler.service.Get(e.Request.Context()); err != nil { + return resp.Err(e, err) + } else { + return resp.Ok(e, statistics) + } +} diff --git a/internal/rest/handlers/workflow.go b/internal/rest/handlers/workflow.go new file mode 100644 index 00000000..b1ba70e4 --- /dev/null +++ b/internal/rest/handlers/workflow.go @@ -0,0 +1,43 @@ +package handlers + +import ( + "context" + + "github.com/pocketbase/pocketbase/core" + "github.com/pocketbase/pocketbase/tools/router" + + "github.com/usual2970/certimate/internal/domain/dtos" + "github.com/usual2970/certimate/internal/rest/resp" +) + +type workflowService interface { + Run(ctx context.Context, req *dtos.WorkflowRunReq) error + Stop(ctx context.Context) +} + +type WorkflowHandler struct { + service workflowService +} + +func NewWorkflowHandler(router *router.RouterGroup[*core.RequestEvent], service workflowService) { + handler := &WorkflowHandler{ + service: service, + } + + group := router.Group("/workflows") + group.POST("/{id}/run", handler.run) +} + +func (handler *WorkflowHandler) run(e *core.RequestEvent) error { + req := &dtos.WorkflowRunReq{} + req.WorkflowId = e.Request.PathValue("id") + if err := e.BindBody(req); err != nil { + return resp.Err(e, err) + } + + if err := handler.service.Run(e.Request.Context(), req); err != nil { + return resp.Err(e, err) + } + + return resp.Ok(e, nil) +} diff --git a/internal/rest/notify.go b/internal/rest/notify.go deleted file mode 100644 index 2eb3db7b..00000000 --- a/internal/rest/notify.go +++ /dev/null @@ -1,41 +0,0 @@ -package rest - -import ( - "context" - - "github.com/usual2970/certimate/internal/domain" - "github.com/usual2970/certimate/internal/rest/resp" - - "github.com/labstack/echo/v5" -) - -type NotifyService interface { - Test(ctx context.Context, req *domain.NotifyTestPushReq) error -} - -type notifyHandler struct { - service NotifyService -} - -func NewNotifyHandler(route *echo.Group, service NotifyService) { - handler := ¬ifyHandler{ - service: service, - } - - group := route.Group("/notify") - - group.POST("/test", handler.test) -} - -func (handler *notifyHandler) test(c echo.Context) error { - req := &domain.NotifyTestPushReq{} - if err := c.Bind(req); err != nil { - return resp.Err(c, err) - } - - if err := handler.service.Test(c.Request().Context(), req); err != nil { - return resp.Err(c, err) - } - - return resp.Ok(c, nil) -} diff --git a/internal/rest/resp/resp.go b/internal/rest/resp/resp.go index 20fd4a06..3b0ae91b 100644 --- a/internal/rest/resp/resp.go +++ b/internal/rest/resp/resp.go @@ -3,7 +3,7 @@ package resp import ( "net/http" - "github.com/labstack/echo/v5" + "github.com/pocketbase/pocketbase/core" "github.com/usual2970/certimate/internal/domain" ) @@ -14,7 +14,7 @@ type Response struct { Data interface{} `json:"data"` } -func Ok(e echo.Context, data interface{}) error { +func Ok(e *core.RequestEvent, data interface{}) error { rs := &Response{ Code: 0, Msg: "success", @@ -23,7 +23,7 @@ func Ok(e echo.Context, data interface{}) error { return e.JSON(http.StatusOK, rs) } -func Err(e echo.Context, err error) error { +func Err(e *core.RequestEvent, err error) error { code := 500 xerr, ok := err.(*domain.Error) diff --git a/internal/rest/routes/routes.go b/internal/rest/routes/routes.go new file mode 100644 index 00000000..58b4f0f1 --- /dev/null +++ b/internal/rest/routes/routes.go @@ -0,0 +1,50 @@ +package routes + +import ( + "context" + + "github.com/pocketbase/pocketbase/apis" + "github.com/pocketbase/pocketbase/core" + "github.com/pocketbase/pocketbase/tools/router" + + "github.com/usual2970/certimate/internal/certificate" + "github.com/usual2970/certimate/internal/notify" + "github.com/usual2970/certimate/internal/repository" + "github.com/usual2970/certimate/internal/rest/handlers" + "github.com/usual2970/certimate/internal/statistics" + "github.com/usual2970/certimate/internal/workflow" +) + +var ( + certificateSvc *certificate.CertificateService + workflowSvc *workflow.WorkflowService + statisticsSvc *statistics.StatisticsService + notifySvc *notify.NotifyService +) + +func Register(router *router.Router[*core.RequestEvent]) { + certificateRepo := repository.NewCertificateRepository() + certificateSvc = certificate.NewCertificateService(certificateRepo) + + workflowRepo := repository.NewWorkflowRepository() + workflowSvc = workflow.NewWorkflowService(workflowRepo) + + statisticsRepo := repository.NewStatisticsRepository() + statisticsSvc = statistics.NewStatisticsService(statisticsRepo) + + notifyRepo := repository.NewSettingsRepository() + notifySvc = notify.NewNotifyService(notifyRepo) + + group := router.Group("/api") + group.Bind(apis.RequireSuperuserAuth()) + handlers.NewCertificateHandler(group, certificateSvc) + handlers.NewWorkflowHandler(group, workflowSvc) + handlers.NewStatisticsHandler(group, statisticsSvc) + handlers.NewNotifyHandler(group, notifySvc) +} + +func Unregister() { + if workflowSvc != nil { + workflowSvc.Stop(context.Background()) + } +} diff --git a/internal/rest/statistics.go b/internal/rest/statistics.go deleted file mode 100644 index e3129c50..00000000 --- a/internal/rest/statistics.go +++ /dev/null @@ -1,35 +0,0 @@ -package rest - -import ( - "context" - - "github.com/labstack/echo/v5" - "github.com/usual2970/certimate/internal/domain" - "github.com/usual2970/certimate/internal/rest/resp" -) - -type StatisticsService interface { - Get(ctx context.Context) (*domain.Statistics, error) -} - -type statisticsHandler struct { - service StatisticsService -} - -func NewStatisticsHandler(route *echo.Group, service StatisticsService) { - handler := &statisticsHandler{ - service: service, - } - - group := route.Group("/statistics") - - group.GET("/get", handler.get) -} - -func (handler *statisticsHandler) get(c echo.Context) error { - if statistics, err := handler.service.Get(c.Request().Context()); err != nil { - return resp.Err(c, err) - } else { - return resp.Ok(c, statistics) - } -} diff --git a/internal/rest/workflow.go b/internal/rest/workflow.go deleted file mode 100644 index 8881ee42..00000000 --- a/internal/rest/workflow.go +++ /dev/null @@ -1,40 +0,0 @@ -package rest - -import ( - "context" - - "github.com/labstack/echo/v5" - "github.com/usual2970/certimate/internal/domain" - "github.com/usual2970/certimate/internal/rest/resp" -) - -type WorkflowService interface { - Run(ctx context.Context, req *domain.WorkflowRunReq) error - Stop() -} - -type workflowHandler struct { - service WorkflowService -} - -func NewWorkflowHandler(route *echo.Group, service WorkflowService) { - handler := &workflowHandler{ - service: service, - } - - group := route.Group("/workflow") - - group.POST("/run", handler.run) -} - -func (handler *workflowHandler) run(c echo.Context) error { - req := &domain.WorkflowRunReq{} - if err := c.Bind(req); err != nil { - return resp.Err(c, err) - } - - if err := handler.service.Run(c.Request().Context(), req); err != nil { - return resp.Err(c, err) - } - return resp.Ok(c, nil) -} diff --git a/internal/routes/routes.go b/internal/routes/routes.go deleted file mode 100644 index 8fab1a15..00000000 --- a/internal/routes/routes.go +++ /dev/null @@ -1,49 +0,0 @@ -package routes - -import ( - "sync" - - "github.com/usual2970/certimate/internal/notify" - "github.com/usual2970/certimate/internal/repository" - "github.com/usual2970/certimate/internal/rest" - "github.com/usual2970/certimate/internal/statistics" - "github.com/usual2970/certimate/internal/workflow" - - "github.com/labstack/echo/v5" - "github.com/pocketbase/pocketbase/apis" -) - -var ( - workflowSvc rest.WorkflowService - workflowSvcOnce sync.Once -) - -func getWorkflowService() rest.WorkflowService { - workflowSvcOnce.Do(func() { - workflowRepo := repository.NewWorkflowRepository() - workflowSvc = workflow.NewWorkflowService(workflowRepo) - }) - return workflowSvc -} - -func Register(e *echo.Echo) { - group := e.Group("/api", apis.RequireAdminAuth()) - - notifyRepo := repository.NewSettingsRepository() - notifySvc := notify.NewNotifyService(notifyRepo) - - workflowSvc := getWorkflowService() - - statisticsRepo := repository.NewStatisticsRepository() - statisticsSvc := statistics.NewStatisticsService(statisticsRepo) - - rest.NewWorkflowHandler(group, workflowSvc) - - rest.NewNotifyHandler(group, notifySvc) - - rest.NewStatisticsHandler(group, statisticsSvc) -} - -func Unregister() { - getWorkflowService().Stop() -} diff --git a/internal/scheduler/certificate.go b/internal/scheduler/certificate.go index 352ff0aa..26c7311f 100644 --- a/internal/scheduler/certificate.go +++ b/internal/scheduler/certificate.go @@ -2,10 +2,10 @@ package scheduler import "context" -type CertificateService interface { +type certificateService interface { InitSchedule(ctx context.Context) error } -func NewCertificateScheduler(service CertificateService) error { +func NewCertificateScheduler(service certificateService) error { return service.InitSchedule(context.Background()) } diff --git a/internal/scheduler/workflow.go b/internal/scheduler/workflow.go index 679bb3aa..7cb4dfa8 100644 --- a/internal/scheduler/workflow.go +++ b/internal/scheduler/workflow.go @@ -2,10 +2,10 @@ package scheduler import "context" -type WorkflowService interface { +type workflowService interface { InitSchedule(ctx context.Context) error } -func NewWorkflowScheduler(service WorkflowService) error { +func NewWorkflowScheduler(service workflowService) error { return service.InitSchedule(context.Background()) } diff --git a/internal/workflow/event.go b/internal/workflow/event.go index aaad9822..9bb3b310 100644 --- a/internal/workflow/event.go +++ b/internal/workflow/event.go @@ -5,49 +5,67 @@ import ( "fmt" "github.com/pocketbase/pocketbase/core" - "github.com/pocketbase/pocketbase/models" "github.com/usual2970/certimate/internal/app" "github.com/usual2970/certimate/internal/domain" + "github.com/usual2970/certimate/internal/domain/dtos" "github.com/usual2970/certimate/internal/repository" ) -const tableName = "workflow" - func Register() { app := app.GetApp() + app.OnRecordCreateRequest(domain.CollectionNameWorkflow).BindFunc(func(e *core.RecordRequestEvent) error { + if err := e.Next(); err != nil { + return err + } - app.OnRecordAfterCreateRequest(tableName).Add(func(e *core.RecordCreateEvent) error { - return update(e.HttpContext.Request().Context(), e.Record) + if err := onWorkflowRecordCreateOrUpdate(e.Request.Context(), e.Record); err != nil { + return err + } + + return nil }) + app.OnRecordUpdateRequest(domain.CollectionNameWorkflow).BindFunc(func(e *core.RecordRequestEvent) error { + if err := e.Next(); err != nil { + return err + } - app.OnRecordAfterUpdateRequest(tableName).Add(func(e *core.RecordUpdateEvent) error { - return update(e.HttpContext.Request().Context(), e.Record) + if err := onWorkflowRecordCreateOrUpdate(e.Request.Context(), e.Record); err != nil { + return err + } + + return nil }) + app.OnRecordDeleteRequest(domain.CollectionNameWorkflow).BindFunc(func(e *core.RecordRequestEvent) error { + if err := e.Next(); err != nil { + return err + } - app.OnRecordAfterDeleteRequest(tableName).Add(func(e *core.RecordDeleteEvent) error { - return delete(e.HttpContext.Request().Context(), e.Record) + if err := onWorkflowRecordDelete(e.Request.Context(), e.Record); err != nil { + return err + } + + return nil }) } -func update(ctx context.Context, record *models.Record) error { +func onWorkflowRecordCreateOrUpdate(ctx context.Context, record *core.Record) error { scheduler := app.GetScheduler() // 向数据库插入/更新时,同时更新定时任务 - workflowId := record.GetId() + workflowId := record.Id enabled := record.GetBool("enabled") trigger := record.GetString("trigger") // 如果是手动触发或未启用,移除定时任务 if !enabled || trigger == string(domain.WorkflowTriggerTypeManual) { scheduler.Remove(fmt.Sprintf("workflow#%s", workflowId)) - scheduler.Start() return nil } // 反之,重新添加定时任务 err := scheduler.Add(fmt.Sprintf("workflow#%s", workflowId), record.GetString("triggerCron"), func() { - NewWorkflowService(repository.NewWorkflowRepository()).Run(ctx, &domain.WorkflowRunReq{ + NewWorkflowService(repository.NewWorkflowRepository()).Run(ctx, &dtos.WorkflowRunReq{ WorkflowId: workflowId, Trigger: domain.WorkflowTriggerTypeAuto, }) @@ -57,18 +75,15 @@ func update(ctx context.Context, record *models.Record) error { return fmt.Errorf("add cron job failed: %w", err) } - scheduler.Start() - return nil } -func delete(_ context.Context, record *models.Record) error { +func onWorkflowRecordDelete(_ context.Context, record *core.Record) error { scheduler := app.GetScheduler() // 从数据库删除时,同时移除定时任务 - workflowId := record.GetId() + workflowId := record.Id scheduler.Remove(fmt.Sprintf("workflow#%s", workflowId)) - scheduler.Start() return nil } diff --git a/internal/workflow/node-processor/apply_node.go b/internal/workflow/node-processor/apply_node.go index 4e20ebcb..28a7588a 100644 --- a/internal/workflow/node-processor/apply_node.go +++ b/internal/workflow/node-processor/apply_node.go @@ -77,14 +77,14 @@ func (a *applyNode) Run(ctx context.Context) error { ACMECertStableUrl: applyResult.ACMECertStableUrl, EffectAt: certX509.NotBefore, ExpireAt: certX509.NotAfter, - WorkflowId: GetWorkflowId(ctx), + WorkflowId: getContextWorkflowId(ctx), WorkflowNodeId: a.node.Id, } // 保存执行结果 // TODO: 先保持一个节点始终只有一个输出,后续增加版本控制 currentOutput := &domain.WorkflowOutput{ - WorkflowId: GetWorkflowId(ctx), + WorkflowId: getContextWorkflowId(ctx), NodeId: a.node.Id, Node: a.node, Succeeded: true, @@ -109,32 +109,32 @@ func (a *applyNode) Run(ctx context.Context) error { } func (a *applyNode) checkCanSkip(ctx context.Context, lastOutput *domain.WorkflowOutput) (skip bool, reason string) { - const validityDuration = time.Hour * 24 * 10 - - // TODO: 可控制是否强制申请 if lastOutput != nil && lastOutput.Succeeded { // 比较和上次申请时的关键配置(即影响证书签发的)参数是否一致 - if lastOutput.Node.GetConfigString("domains") != a.node.GetConfigString("domains") { + currentNodeConfig := a.node.GetConfigForApply() + lastNodeConfig := lastOutput.Node.GetConfigForApply() + if currentNodeConfig.Domains != lastNodeConfig.Domains { return false, "配置项变化:域名" } - if lastOutput.Node.GetConfigString("contactEmail") != a.node.GetConfigString("contactEmail") { + if currentNodeConfig.ContactEmail != lastNodeConfig.ContactEmail { return false, "配置项变化:联系邮箱" } - if lastOutput.Node.GetConfigString("provider") != a.node.GetConfigString("provider") { + if currentNodeConfig.ProviderAccessId != lastNodeConfig.ProviderAccessId { return false, "配置项变化:DNS 提供商授权" } - if !maps.Equal(lastOutput.Node.GetConfigMap("providerConfig"), a.node.GetConfigMap("providerConfig")) { + if !maps.Equal(currentNodeConfig.ProviderConfig, lastNodeConfig.ProviderConfig) { return false, "配置项变化:DNS 提供商参数" } - if lastOutput.Node.GetConfigString("keyAlgorithm") != a.node.GetConfigString("keyAlgorithm") { + if currentNodeConfig.KeyAlgorithm != lastNodeConfig.KeyAlgorithm { return false, "配置项变化:数字签名算法" } lastCertificate, _ := a.certRepo.GetByWorkflowNodeId(ctx, a.node.Id) - if lastCertificate != nil && time.Until(lastCertificate.ExpireAt) > validityDuration { + renewalInterval := time.Duration(currentNodeConfig.SkipBeforeExpiryDays) * time.Hour * 24 + if lastCertificate != nil && time.Until(lastCertificate.ExpireAt) > renewalInterval { return true, "已申请过证书,且证书尚未临近过期" } } - return false, "无历史申请记录" + return false, "" } diff --git a/internal/workflow/node-processor/deploy_node.go b/internal/workflow/node-processor/deploy_node.go index 6b4fb512..48e344ad 100644 --- a/internal/workflow/node-processor/deploy_node.go +++ b/internal/workflow/node-processor/deploy_node.go @@ -38,13 +38,13 @@ func (d *deployNode) Run(ctx context.Context) error { } // 获取前序节点输出证书 - certSource := d.node.GetConfigString("certificate") - certSourceSlice := strings.Split(certSource, "#") - if len(certSourceSlice) != 2 { - d.AddOutput(ctx, d.node.Name, "证书来源配置错误", certSource) - return fmt.Errorf("证书来源配置错误: %s", certSource) + previousNodeOutputCertificateSource := d.node.GetConfigForDeploy().Certificate + previousNodeOutputCertificateSourceSlice := strings.Split(previousNodeOutputCertificateSource, "#") + if len(previousNodeOutputCertificateSourceSlice) != 2 { + d.AddOutput(ctx, d.node.Name, "证书来源配置错误", previousNodeOutputCertificateSource) + return fmt.Errorf("证书来源配置错误: %s", previousNodeOutputCertificateSource) } - certificate, err := d.certRepo.GetByWorkflowNodeId(ctx, certSourceSlice[0]) + certificate, err := d.certRepo.GetByWorkflowNodeId(ctx, previousNodeOutputCertificateSourceSlice[0]) if err != nil { d.AddOutput(ctx, d.node.Name, "获取证书失败", err.Error()) return err @@ -81,7 +81,7 @@ func (d *deployNode) Run(ctx context.Context) error { // TODO: 先保持一个节点始终只有一个输出,后续增加版本控制 currentOutput := &domain.WorkflowOutput{ Meta: domain.Meta{}, - WorkflowId: GetWorkflowId(ctx), + WorkflowId: getContextWorkflowId(ctx), NodeId: d.node.Id, Node: d.node, Succeeded: true, @@ -99,18 +99,21 @@ func (d *deployNode) Run(ctx context.Context) error { } func (d *deployNode) checkCanSkip(ctx context.Context, lastOutput *domain.WorkflowOutput) (skip bool, reason string) { - // TODO: 可控制是否强制部署 if lastOutput != nil && lastOutput.Succeeded { // 比较和上次部署时的关键配置(即影响证书部署的)参数是否一致 - if lastOutput.Node.GetConfigString("provider") != d.node.GetConfigString("provider") { + currentNodeConfig := d.node.GetConfigForDeploy() + lastNodeConfig := lastOutput.Node.GetConfigForDeploy() + if currentNodeConfig.ProviderAccessId != lastNodeConfig.ProviderAccessId { return false, "配置项变化:主机提供商授权" } - if !maps.Equal(lastOutput.Node.GetConfigMap("providerConfig"), d.node.GetConfigMap("providerConfig")) { + if !maps.Equal(currentNodeConfig.ProviderConfig, lastNodeConfig.ProviderConfig) { return false, "配置项变化:主机提供商参数" } - return true, "已部署过证书" + if currentNodeConfig.SkipOnLastSucceeded { + return true, "已部署过证书" + } } - return false, "无历史部署记录" + return false, "" } diff --git a/internal/workflow/node-processor/notify_node.go b/internal/workflow/node-processor/notify_node.go index cbc7fa47..0ba5eb1f 100644 --- a/internal/workflow/node-processor/notify_node.go +++ b/internal/workflow/node-processor/notify_node.go @@ -10,7 +10,7 @@ import ( type notifyNode struct { node *domain.WorkflowNode - settingsRepo settingRepository + settingsRepo settingsRepository *nodeLogger } @@ -25,6 +25,8 @@ func NewNotifyNode(node *domain.WorkflowNode) *notifyNode { func (n *notifyNode) Run(ctx context.Context) error { n.AddOutput(ctx, n.node.Name, "开始执行") + nodeConfig := n.node.GetConfigForNotify() + // 获取通知配置 settings, err := n.settingsRepo.GetByName(ctx, "notifyChannels") if err != nil { @@ -33,18 +35,14 @@ func (n *notifyNode) Run(ctx context.Context) error { } // 获取通知渠道 - channelConfig, err := settings.GetNotifyChannelConfig(n.node.GetConfigString("channel")) + channelConfig, err := settings.GetNotifyChannelConfig(nodeConfig.Channel) if err != nil { n.AddOutput(ctx, n.node.Name, "获取通知渠道配置失败", err.Error()) return err } // 发送通知 - if err := notify.SendToChannel(n.node.GetConfigString("subject"), - n.node.GetConfigString("message"), - n.node.GetConfigString("channel"), - channelConfig, - ); err != nil { + if err := notify.SendToChannel(nodeConfig.Subject, nodeConfig.Message, nodeConfig.Channel, channelConfig); err != nil { n.AddOutput(ctx, n.node.Name, "发送通知失败", err.Error()) return err } diff --git a/internal/workflow/node-processor/processor.go b/internal/workflow/node-processor/processor.go index c9dd01c6..3c347815 100644 --- a/internal/workflow/node-processor/processor.go +++ b/internal/workflow/node-processor/processor.go @@ -8,7 +8,7 @@ import ( "github.com/usual2970/certimate/internal/domain" ) -type nodeProcessor interface { +type NodeProcessor interface { Run(ctx context.Context) error Log(ctx context.Context) *domain.WorkflowRunLog AddOutput(ctx context.Context, title, content string, err ...string) @@ -18,6 +18,19 @@ type nodeLogger struct { log *domain.WorkflowRunLog } +type certificateRepository interface { + GetByWorkflowNodeId(ctx context.Context, workflowNodeId string) (*domain.Certificate, error) +} + +type workflowOutputRepository interface { + GetByNodeId(ctx context.Context, nodeId string) (*domain.WorkflowOutput, error) + Save(ctx context.Context, output *domain.WorkflowOutput, certificate *domain.Certificate, cb func(id string) error) error +} + +type settingsRepository interface { + GetByName(ctx context.Context, name string) (*domain.Settings, error) +} + func NewNodeLogger(node *domain.WorkflowNode) *nodeLogger { return &nodeLogger{ log: &domain.WorkflowRunLog{ @@ -45,7 +58,7 @@ func (l *nodeLogger) AddOutput(ctx context.Context, title, content string, err . l.log.Outputs = append(l.log.Outputs, output) } -func GetProcessor(node *domain.WorkflowNode) (nodeProcessor, error) { +func GetProcessor(node *domain.WorkflowNode) (NodeProcessor, error) { switch node.Type { case domain.WorkflowNodeTypeStart: return NewStartNode(node), nil @@ -65,15 +78,6 @@ func GetProcessor(node *domain.WorkflowNode) (nodeProcessor, error) { return nil, errors.New("not implemented") } -type certificateRepository interface { - GetByWorkflowNodeId(ctx context.Context, workflowNodeId string) (*domain.Certificate, error) -} - -type workflowOutputRepository interface { - GetByNodeId(ctx context.Context, nodeId string) (*domain.WorkflowOutput, error) - Save(ctx context.Context, output *domain.WorkflowOutput, certificate *domain.Certificate, cb func(id string) error) error -} - -type settingRepository interface { - GetByName(ctx context.Context, name string) (*domain.Settings, error) +func getContextWorkflowId(ctx context.Context) string { + return ctx.Value("workflow_id").(string) } diff --git a/internal/workflow/node-processor/workflow_processor.go b/internal/workflow/processor/processor.go similarity index 80% rename from internal/workflow/node-processor/workflow_processor.go rename to internal/workflow/processor/processor.go index d4286578..ec6a8da4 100644 --- a/internal/workflow/node-processor/workflow_processor.go +++ b/internal/workflow/processor/processor.go @@ -1,9 +1,10 @@ -package nodeprocessor +package processor import ( "context" "github.com/usual2970/certimate/internal/domain" + nodes "github.com/usual2970/certimate/internal/workflow/node-processor" ) type workflowProcessor struct { @@ -23,26 +24,26 @@ func (w *workflowProcessor) Log(ctx context.Context) []domain.WorkflowRunLog { } func (w *workflowProcessor) Run(ctx context.Context) error { - ctx = WithWorkflowId(ctx, w.workflow.Id) - return w.runNode(ctx, w.workflow.Content) + ctx = setContextWorkflowId(ctx, w.workflow.Id) + return w.processNode(ctx, w.workflow.Content) } -func (w *workflowProcessor) runNode(ctx context.Context, node *domain.WorkflowNode) error { +func (w *workflowProcessor) processNode(ctx context.Context, node *domain.WorkflowNode) error { current := node for current != nil { if current.Type == domain.WorkflowNodeTypeBranch || current.Type == domain.WorkflowNodeTypeExecuteResultBranch { for _, branch := range current.Branches { - if err := w.runNode(ctx, &branch); err != nil { + if err := w.processNode(ctx, &branch); err != nil { continue } } } var runErr error - var processor nodeProcessor + var processor nodes.NodeProcessor for { if current.Type != domain.WorkflowNodeTypeBranch && current.Type != domain.WorkflowNodeTypeExecuteResultBranch { - processor, runErr = GetProcessor(current) + processor, runErr = nodes.GetProcessor(current) if runErr != nil { break } @@ -74,7 +75,7 @@ func (w *workflowProcessor) runNode(ctx context.Context, node *domain.WorkflowNo return nil } -func WithWorkflowId(ctx context.Context, id string) context.Context { +func setContextWorkflowId(ctx context.Context, id string) context.Context { return context.WithValue(ctx, "workflow_id", id) } diff --git a/internal/workflow/service.go b/internal/workflow/service.go index 93b4c51a..62f8a888 100644 --- a/internal/workflow/service.go +++ b/internal/workflow/service.go @@ -9,21 +9,22 @@ import ( "github.com/usual2970/certimate/internal/app" "github.com/usual2970/certimate/internal/domain" - nodeprocessor "github.com/usual2970/certimate/internal/workflow/node-processor" + "github.com/usual2970/certimate/internal/domain/dtos" + processor "github.com/usual2970/certimate/internal/workflow/processor" ) const defaultRoutines = 10 type workflowRunData struct { - Workflow *domain.Workflow - Options *domain.WorkflowRunReq + Workflow *domain.Workflow + RunTrigger domain.WorkflowTriggerType } type workflowRepository interface { ListEnabledAuto(ctx context.Context) ([]*domain.Workflow, error) GetById(ctx context.Context, id string) (*domain.Workflow, error) Save(ctx context.Context, workflow *domain.Workflow) error - SaveRun(ctx context.Context, run *domain.WorkflowRun) error + SaveRun(ctx context.Context, workflowRun *domain.WorkflowRun) error } type WorkflowService struct { @@ -74,7 +75,7 @@ func (s *WorkflowService) InitSchedule(ctx context.Context) error { scheduler := app.GetScheduler() for _, workflow := range workflows { err := scheduler.Add(fmt.Sprintf("workflow#%s", workflow.Id), workflow.TriggerCron, func() { - s.Run(ctx, &domain.WorkflowRunReq{ + s.Run(ctx, &dtos.WorkflowRunReq{ WorkflowId: workflow.Id, Trigger: domain.WorkflowTriggerTypeAuto, }) @@ -84,18 +85,15 @@ func (s *WorkflowService) InitSchedule(ctx context.Context) error { return err } } - scheduler.Start() - - app.GetLogger().Info("workflow schedule started") return nil } -func (s *WorkflowService) Run(ctx context.Context, options *domain.WorkflowRunReq) error { +func (s *WorkflowService) Run(ctx context.Context, req *dtos.WorkflowRunReq) error { // 查询 - workflow, err := s.repo.GetById(ctx, options.WorkflowId) + workflow, err := s.repo.GetById(ctx, req.WorkflowId) if err != nil { - app.GetLogger().Error("failed to get workflow", "id", options.WorkflowId, "err", err) + app.GetLogger().Error("failed to get workflow", "id", req.WorkflowId, "err", err) return err } @@ -113,8 +111,8 @@ func (s *WorkflowService) Run(ctx context.Context, options *domain.WorkflowRunRe } s.ch <- &workflowRunData{ - Workflow: workflow, - Options: options, + Workflow: workflow, + RunTrigger: req.Trigger, } return nil @@ -123,16 +121,15 @@ func (s *WorkflowService) Run(ctx context.Context, options *domain.WorkflowRunRe func (s *WorkflowService) run(ctx context.Context, runData *workflowRunData) error { // 执行 workflow := runData.Workflow - options := runData.Options - run := &domain.WorkflowRun{ WorkflowId: workflow.Id, Status: domain.WorkflowRunStatusTypeRunning, - Trigger: options.Trigger, + Trigger: runData.RunTrigger, StartedAt: time.Now(), EndedAt: time.Now(), } - processor := nodeprocessor.NewWorkflowProcessor(workflow) + + processor := processor.NewWorkflowProcessor(workflow) if err := processor.Run(ctx); err != nil { run.Status = domain.WorkflowRunStatusTypeFailed run.EndedAt = time.Now() @@ -165,7 +162,7 @@ func (s *WorkflowService) run(ctx context.Context, runData *workflowRunData) err return nil } -func (s *WorkflowService) Stop() { +func (s *WorkflowService) Stop(ctx context.Context) { s.cancel() s.wg.Wait() } diff --git a/main.go b/main.go index 2db632d6..1928c46b 100644 --- a/main.go +++ b/main.go @@ -5,25 +5,24 @@ import ( "log" "os" "strings" - _ "time/tzdata" - "github.com/labstack/echo/v5" - "github.com/labstack/echo/v5/middleware" + "github.com/pocketbase/pocketbase" + "github.com/pocketbase/pocketbase/apis" "github.com/pocketbase/pocketbase/core" "github.com/pocketbase/pocketbase/plugins/migratecmd" + "github.com/pocketbase/pocketbase/tools/hook" "github.com/usual2970/certimate/internal/app" - "github.com/usual2970/certimate/internal/routes" + "github.com/usual2970/certimate/internal/rest/routes" "github.com/usual2970/certimate/internal/scheduler" "github.com/usual2970/certimate/internal/workflow" "github.com/usual2970/certimate/ui" - - _ "github.com/usual2970/certimate/migrations" + //_ "github.com/usual2970/certimate/migrations" ) func main() { - app := app.GetApp() + app := app.GetApp().(*pocketbase.PocketBase) var flagHttp string var flagDir string @@ -37,27 +36,29 @@ func main() { Automigrate: strings.HasPrefix(os.Args[0], os.TempDir()), }) - app.OnBeforeServe().Add(func(e *core.ServeEvent) error { + app.OnServe().BindFunc(func(e *core.ServeEvent) error { scheduler.Register() - workflow.Register() - routes.Register(e.Router) - e.Router.GET( - "/*", - echo.StaticDirectoryHandler(ui.DistDirFS, false), - middleware.Gzip(), - ) - - return nil + return e.Next() }) - app.OnTerminate().Add(func(e *core.TerminateEvent) error { + app.OnServe().Bind(&hook.Handler[*core.ServeEvent]{ + Func: func(e *core.ServeEvent) error { + e.Router. + GET("/{path...}", apis.Static(ui.DistDirFS, false)). + Bind(apis.Gzip()) + return e.Next() + }, + Priority: 999, + }) + + app.OnTerminate().BindFunc(func(e *core.TerminateEvent) error { routes.Unregister() log.Println("Exit!") - return nil + return e.Next() }) log.Printf("Visit the website: http://%s", flagHttp) diff --git a/migrations/1724677539_update_admin.go b/migrations/1724677539_update_admin.go deleted file mode 100644 index fffa4dff..00000000 --- a/migrations/1724677539_update_admin.go +++ /dev/null @@ -1,29 +0,0 @@ -package migrations - -import ( - "github.com/pocketbase/dbx" - "github.com/pocketbase/pocketbase/daos" - m "github.com/pocketbase/pocketbase/migrations" - "github.com/pocketbase/pocketbase/models" -) - -func init() { - m.Register(func(db dbx.Builder) error { - // add up queries... - dao := daos.New(db) - - admin := &models.Admin{} - admin.Email = "admin@certimate.fun" - admin.SetPassword("1234567890") - return dao.SaveAdmin(admin) - }, func(db dbx.Builder) error { - // add down queries... - dao := daos.New(db) - - admin, _ := dao.FindAdminByEmail("admin@certimate.fun") - if admin != nil { - return dao.DeleteAdmin(admin) - } - return nil - }) -} diff --git a/migrations/1726147254_collections_snapshot.go b/migrations/1726147254_collections_snapshot.go deleted file mode 100644 index 9ccb728d..00000000 --- a/migrations/1726147254_collections_snapshot.go +++ /dev/null @@ -1,526 +0,0 @@ -package migrations - -import ( - "encoding/json" - - "github.com/pocketbase/dbx" - "github.com/pocketbase/pocketbase/daos" - m "github.com/pocketbase/pocketbase/migrations" - "github.com/pocketbase/pocketbase/models" -) - -func init() { - m.Register(func(db dbx.Builder) error { - jsonData := `[ - { - "id": "z3p974ainxjqlvs", - "created": "2024-07-29 10:02:48.334Z", - "updated": "2024-09-12 13:09:54.500Z", - "name": "domains", - "type": "base", - "system": false, - "schema": [ - { - "system": false, - "id": "iuaerpl2", - "name": "domain", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "v98eebqq", - "name": "crontab", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "alc8e9ow", - "name": "access", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "4yzbv8urny5ja1e", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - }, - { - "system": false, - "id": "topsc9bj", - "name": "certUrl", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "vixgq072", - "name": "certStableUrl", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "g3a3sza5", - "name": "privateKey", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "gr6iouny", - "name": "certificate", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "tk6vnrmn", - "name": "issuerCertificate", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "sjo6ibse", - "name": "csr", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "x03n1bkj", - "name": "expiredAt", - "type": "date", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": "", - "max": "" - } - }, - { - "system": false, - "id": "srybpixz", - "name": "targetType", - "type": "select", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSelect": 1, - "values": [ - "aliyun-oss", - "aliyun-cdn", - "ssh", - "webhook", - "tencent-cdn", - "qiniu-cdn" - ] - } - }, - { - "system": false, - "id": "xy7yk0mb", - "name": "targetAccess", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "4yzbv8urny5ja1e", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - }, - { - "system": false, - "id": "6jqeyggw", - "name": "enabled", - "type": "bool", - "required": false, - "presentable": false, - "unique": false, - "options": {} - }, - { - "system": false, - "id": "hdsjcchf", - "name": "deployed", - "type": "bool", - "required": false, - "presentable": false, - "unique": false, - "options": {} - }, - { - "system": false, - "id": "aiya3rev", - "name": "rightnow", - "type": "bool", - "required": false, - "presentable": false, - "unique": false, - "options": {} - }, - { - "system": false, - "id": "ixznmhzc", - "name": "lastDeployedAt", - "type": "date", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": "", - "max": "" - } - }, - { - "system": false, - "id": "ghtlkn5j", - "name": "lastDeployment", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "0a1o4e6sstp694f", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - } - ], - "indexes": [ - "CREATE UNIQUE INDEX ` + "`" + `idx_4ABO6EQ` + "`" + ` ON ` + "`" + `domains` + "`" + ` (` + "`" + `domain` + "`" + `)" - ], - "listRule": null, - "viewRule": null, - "createRule": null, - "updateRule": null, - "deleteRule": null, - "options": {} - }, - { - "id": "4yzbv8urny5ja1e", - "created": "2024-07-29 10:04:39.685Z", - "updated": "2024-09-12 13:18:00.093Z", - "name": "access", - "type": "base", - "system": false, - "schema": [ - { - "system": false, - "id": "geeur58v", - "name": "name", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "iql7jpwx", - "name": "config", - "type": "json", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSize": 2000000 - } - }, - { - "system": false, - "id": "hwy7m03o", - "name": "configType", - "type": "select", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSelect": 1, - "values": [ - "aliyun", - "tencent", - "ssh", - "webhook", - "cloudflare", - "qiniu", - "namesilo", - "godaddy" - ] - } - }, - { - "system": false, - "id": "lr33hiwg", - "name": "deleted", - "type": "date", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": "", - "max": "" - } - }, - { - "system": false, - "id": "hsxcnlvd", - "name": "usage", - "type": "select", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSelect": 1, - "values": [ - "apply", - "deploy", - "all" - ] - } - } - ], - "indexes": [ - "CREATE UNIQUE INDEX ` + "`" + `idx_wkoST0j` + "`" + ` ON ` + "`" + `access` + "`" + ` (` + "`" + `name` + "`" + `)" - ], - "listRule": null, - "viewRule": null, - "createRule": null, - "updateRule": null, - "deleteRule": null, - "options": {} - }, - { - "id": "0a1o4e6sstp694f", - "created": "2024-07-30 06:30:27.801Z", - "updated": "2024-09-12 13:09:54.500Z", - "name": "deployments", - "type": "base", - "system": false, - "schema": [ - { - "system": false, - "id": "farvlzk7", - "name": "domain", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "z3p974ainxjqlvs", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - }, - { - "system": false, - "id": "jx5f69i3", - "name": "log", - "type": "json", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSize": 2000000 - } - }, - { - "system": false, - "id": "qbxdtg9q", - "name": "phase", - "type": "select", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSelect": 1, - "values": [ - "check", - "apply", - "deploy" - ] - } - }, - { - "system": false, - "id": "rglrp1hz", - "name": "phaseSuccess", - "type": "bool", - "required": false, - "presentable": false, - "unique": false, - "options": {} - }, - { - "system": false, - "id": "lt1g1blu", - "name": "deployedAt", - "type": "date", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": "", - "max": "" - } - } - ], - "indexes": [], - "listRule": null, - "viewRule": null, - "createRule": null, - "updateRule": null, - "deleteRule": null, - "options": {} - }, - { - "id": "_pb_users_auth_", - "created": "2024-09-12 13:09:54.234Z", - "updated": "2024-09-12 13:09:54.500Z", - "name": "users", - "type": "auth", - "system": false, - "schema": [ - { - "system": false, - "id": "users_name", - "name": "name", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "users_avatar", - "name": "avatar", - "type": "file", - "required": false, - "presentable": false, - "unique": false, - "options": { - "mimeTypes": [ - "image/jpeg", - "image/png", - "image/svg+xml", - "image/gif", - "image/webp" - ], - "thumbs": null, - "maxSelect": 1, - "maxSize": 5242880, - "protected": false - } - } - ], - "indexes": [], - "listRule": "id = @request.auth.id", - "viewRule": "id = @request.auth.id", - "createRule": "", - "updateRule": "id = @request.auth.id", - "deleteRule": "id = @request.auth.id", - "options": { - "allowEmailAuth": true, - "allowOAuth2Auth": true, - "allowUsernameAuth": true, - "exceptEmailDomains": null, - "manageRule": null, - "minPasswordLength": 8, - "onlyEmailDomains": null, - "onlyVerified": false, - "requireEmail": false - } - } - ]` - - collections := []*models.Collection{} - if err := json.Unmarshal([]byte(jsonData), &collections); err != nil { - return err - } - - return daos.New(db).ImportCollections(collections, true, nil) - }, func(db dbx.Builder) error { - return nil - }) -} diff --git a/migrations/1726147268_update_access_usage.go b/migrations/1726147268_update_access_usage.go deleted file mode 100644 index 07d8c188..00000000 --- a/migrations/1726147268_update_access_usage.go +++ /dev/null @@ -1,20 +0,0 @@ -package migrations - -import ( - "github.com/pocketbase/dbx" - m "github.com/pocketbase/pocketbase/migrations" -) - -func init() { - m.Register(func(db dbx.Builder) error { - // add up queries... - db.NewQuery("update access set usage='all' where configType in ('aliyun', 'tencent')").Execute() - db.NewQuery("update access set usage='deploy' where configType in ('ssh', 'webhook','qiniu')").Execute() - db.NewQuery("update access set usage='apply' where configType in ('cloudflare','namesilo','godaddy')").Execute() - return nil - }, func(db dbx.Builder) error { - // add down queries... - - return nil - }) -} diff --git a/migrations/1726184067_collections_snapshot.go b/migrations/1726184067_collections_snapshot.go deleted file mode 100644 index 86b806d7..00000000 --- a/migrations/1726184067_collections_snapshot.go +++ /dev/null @@ -1,584 +0,0 @@ -package migrations - -import ( - "encoding/json" - - "github.com/pocketbase/dbx" - "github.com/pocketbase/pocketbase/daos" - m "github.com/pocketbase/pocketbase/migrations" - "github.com/pocketbase/pocketbase/models" -) - -func init() { - m.Register(func(db dbx.Builder) error { - jsonData := `[ - { - "id": "z3p974ainxjqlvs", - "created": "2024-07-29 10:02:48.334Z", - "updated": "2024-09-12 23:13:12.119Z", - "name": "domains", - "type": "base", - "system": false, - "schema": [ - { - "system": false, - "id": "iuaerpl2", - "name": "domain", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "ukkhuw85", - "name": "email", - "type": "email", - "required": false, - "presentable": false, - "unique": false, - "options": { - "exceptDomains": null, - "onlyDomains": null - } - }, - { - "system": false, - "id": "v98eebqq", - "name": "crontab", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "alc8e9ow", - "name": "access", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "4yzbv8urny5ja1e", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - }, - { - "system": false, - "id": "topsc9bj", - "name": "certUrl", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "vixgq072", - "name": "certStableUrl", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "g3a3sza5", - "name": "privateKey", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "gr6iouny", - "name": "certificate", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "tk6vnrmn", - "name": "issuerCertificate", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "sjo6ibse", - "name": "csr", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "x03n1bkj", - "name": "expiredAt", - "type": "date", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": "", - "max": "" - } - }, - { - "system": false, - "id": "srybpixz", - "name": "targetType", - "type": "select", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSelect": 1, - "values": [ - "aliyun-oss", - "aliyun-cdn", - "ssh", - "webhook", - "tencent-cdn", - "qiniu-cdn" - ] - } - }, - { - "system": false, - "id": "xy7yk0mb", - "name": "targetAccess", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "4yzbv8urny5ja1e", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - }, - { - "system": false, - "id": "6jqeyggw", - "name": "enabled", - "type": "bool", - "required": false, - "presentable": false, - "unique": false, - "options": {} - }, - { - "system": false, - "id": "hdsjcchf", - "name": "deployed", - "type": "bool", - "required": false, - "presentable": false, - "unique": false, - "options": {} - }, - { - "system": false, - "id": "aiya3rev", - "name": "rightnow", - "type": "bool", - "required": false, - "presentable": false, - "unique": false, - "options": {} - }, - { - "system": false, - "id": "ixznmhzc", - "name": "lastDeployedAt", - "type": "date", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": "", - "max": "" - } - }, - { - "system": false, - "id": "ghtlkn5j", - "name": "lastDeployment", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "0a1o4e6sstp694f", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - } - ], - "indexes": [ - "CREATE UNIQUE INDEX ` + "`" + `idx_4ABO6EQ` + "`" + ` ON ` + "`" + `domains` + "`" + ` (` + "`" + `domain` + "`" + `)" - ], - "listRule": null, - "viewRule": null, - "createRule": null, - "updateRule": null, - "deleteRule": null, - "options": {} - }, - { - "id": "4yzbv8urny5ja1e", - "created": "2024-07-29 10:04:39.685Z", - "updated": "2024-09-12 23:08:52.810Z", - "name": "access", - "type": "base", - "system": false, - "schema": [ - { - "system": false, - "id": "geeur58v", - "name": "name", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "iql7jpwx", - "name": "config", - "type": "json", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSize": 2000000 - } - }, - { - "system": false, - "id": "hwy7m03o", - "name": "configType", - "type": "select", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSelect": 1, - "values": [ - "aliyun", - "tencent", - "ssh", - "webhook", - "cloudflare", - "qiniu", - "namesilo", - "godaddy" - ] - } - }, - { - "system": false, - "id": "lr33hiwg", - "name": "deleted", - "type": "date", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": "", - "max": "" - } - }, - { - "system": false, - "id": "hsxcnlvd", - "name": "usage", - "type": "select", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSelect": 1, - "values": [ - "apply", - "deploy", - "all" - ] - } - } - ], - "indexes": [ - "CREATE UNIQUE INDEX ` + "`" + `idx_wkoST0j` + "`" + ` ON ` + "`" + `access` + "`" + ` (` + "`" + `name` + "`" + `)" - ], - "listRule": null, - "viewRule": null, - "createRule": null, - "updateRule": null, - "deleteRule": null, - "options": {} - }, - { - "id": "0a1o4e6sstp694f", - "created": "2024-07-30 06:30:27.801Z", - "updated": "2024-09-12 23:08:52.810Z", - "name": "deployments", - "type": "base", - "system": false, - "schema": [ - { - "system": false, - "id": "farvlzk7", - "name": "domain", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "z3p974ainxjqlvs", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - }, - { - "system": false, - "id": "jx5f69i3", - "name": "log", - "type": "json", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSize": 2000000 - } - }, - { - "system": false, - "id": "qbxdtg9q", - "name": "phase", - "type": "select", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSelect": 1, - "values": [ - "check", - "apply", - "deploy" - ] - } - }, - { - "system": false, - "id": "rglrp1hz", - "name": "phaseSuccess", - "type": "bool", - "required": false, - "presentable": false, - "unique": false, - "options": {} - }, - { - "system": false, - "id": "lt1g1blu", - "name": "deployedAt", - "type": "date", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": "", - "max": "" - } - } - ], - "indexes": [], - "listRule": null, - "viewRule": null, - "createRule": null, - "updateRule": null, - "deleteRule": null, - "options": {} - }, - { - "id": "_pb_users_auth_", - "created": "2024-09-12 13:09:54.234Z", - "updated": "2024-09-12 23:08:52.811Z", - "name": "users", - "type": "auth", - "system": false, - "schema": [ - { - "system": false, - "id": "users_name", - "name": "name", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "users_avatar", - "name": "avatar", - "type": "file", - "required": false, - "presentable": false, - "unique": false, - "options": { - "mimeTypes": [ - "image/jpeg", - "image/png", - "image/svg+xml", - "image/gif", - "image/webp" - ], - "thumbs": null, - "maxSelect": 1, - "maxSize": 5242880, - "protected": false - } - } - ], - "indexes": [], - "listRule": "id = @request.auth.id", - "viewRule": "id = @request.auth.id", - "createRule": "", - "updateRule": "id = @request.auth.id", - "deleteRule": "id = @request.auth.id", - "options": { - "allowEmailAuth": true, - "allowOAuth2Auth": true, - "allowUsernameAuth": true, - "exceptEmailDomains": null, - "manageRule": null, - "minPasswordLength": 8, - "onlyEmailDomains": null, - "onlyVerified": false, - "requireEmail": false - } - }, - { - "id": "dy6ccjb60spfy6p", - "created": "2024-09-12 23:12:21.677Z", - "updated": "2024-09-12 23:19:09.110Z", - "name": "settings", - "type": "base", - "system": false, - "schema": [ - { - "system": false, - "id": "1tcmdsdf", - "name": "name", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "f9wyhypi", - "name": "content", - "type": "json", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSize": 2000000 - } - } - ], - "indexes": [ - "CREATE UNIQUE INDEX ` + "`" + `idx_RO7X9Vw` + "`" + ` ON ` + "`" + `settings` + "`" + ` (` + "`" + `name` + "`" + `)" - ], - "listRule": null, - "viewRule": null, - "createRule": null, - "updateRule": null, - "deleteRule": null, - "options": {} - } - ]` - - collections := []*models.Collection{} - if err := json.Unmarshal([]byte(jsonData), &collections); err != nil { - return err - } - - return daos.New(db).ImportCollections(collections, true, nil) - }, func(db dbx.Builder) error { - return nil - }) -} diff --git a/migrations/1726299230_collections_snapshot.go b/migrations/1726299230_collections_snapshot.go deleted file mode 100644 index d0ab1968..00000000 --- a/migrations/1726299230_collections_snapshot.go +++ /dev/null @@ -1,679 +0,0 @@ -package migrations - -import ( - "encoding/json" - - "github.com/pocketbase/dbx" - "github.com/pocketbase/pocketbase/daos" - m "github.com/pocketbase/pocketbase/migrations" - "github.com/pocketbase/pocketbase/models" -) - -func init() { - m.Register(func(db dbx.Builder) error { - jsonData := `[ - { - "id": "z3p974ainxjqlvs", - "created": "2024-07-29 10:02:48.334Z", - "updated": "2024-09-14 02:53:22.520Z", - "name": "domains", - "type": "base", - "system": false, - "schema": [ - { - "system": false, - "id": "iuaerpl2", - "name": "domain", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "ukkhuw85", - "name": "email", - "type": "email", - "required": false, - "presentable": false, - "unique": false, - "options": { - "exceptDomains": null, - "onlyDomains": null - } - }, - { - "system": false, - "id": "v98eebqq", - "name": "crontab", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "alc8e9ow", - "name": "access", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "4yzbv8urny5ja1e", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - }, - { - "system": false, - "id": "topsc9bj", - "name": "certUrl", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "vixgq072", - "name": "certStableUrl", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "g3a3sza5", - "name": "privateKey", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "gr6iouny", - "name": "certificate", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "tk6vnrmn", - "name": "issuerCertificate", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "sjo6ibse", - "name": "csr", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "x03n1bkj", - "name": "expiredAt", - "type": "date", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": "", - "max": "" - } - }, - { - "system": false, - "id": "srybpixz", - "name": "targetType", - "type": "select", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSelect": 1, - "values": [ - "aliyun-oss", - "aliyun-cdn", - "ssh", - "webhook", - "tencent-cdn", - "qiniu-cdn" - ] - } - }, - { - "system": false, - "id": "xy7yk0mb", - "name": "targetAccess", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "4yzbv8urny5ja1e", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - }, - { - "system": false, - "id": "6jqeyggw", - "name": "enabled", - "type": "bool", - "required": false, - "presentable": false, - "unique": false, - "options": {} - }, - { - "system": false, - "id": "hdsjcchf", - "name": "deployed", - "type": "bool", - "required": false, - "presentable": false, - "unique": false, - "options": {} - }, - { - "system": false, - "id": "aiya3rev", - "name": "rightnow", - "type": "bool", - "required": false, - "presentable": false, - "unique": false, - "options": {} - }, - { - "system": false, - "id": "ixznmhzc", - "name": "lastDeployedAt", - "type": "date", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": "", - "max": "" - } - }, - { - "system": false, - "id": "ghtlkn5j", - "name": "lastDeployment", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "0a1o4e6sstp694f", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - }, - { - "system": false, - "id": "zfnyj9he", - "name": "variables", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "1bspzuku", - "name": "group", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "teolp9pl72dxlxq", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - } - ], - "indexes": [ - "CREATE UNIQUE INDEX ` + "`" + `idx_4ABO6EQ` + "`" + ` ON ` + "`" + `domains` + "`" + ` (` + "`" + `domain` + "`" + `)" - ], - "listRule": null, - "viewRule": null, - "createRule": null, - "updateRule": null, - "deleteRule": null, - "options": {} - }, - { - "id": "4yzbv8urny5ja1e", - "created": "2024-07-29 10:04:39.685Z", - "updated": "2024-09-13 23:47:27.173Z", - "name": "access", - "type": "base", - "system": false, - "schema": [ - { - "system": false, - "id": "geeur58v", - "name": "name", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "iql7jpwx", - "name": "config", - "type": "json", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSize": 2000000 - } - }, - { - "system": false, - "id": "hwy7m03o", - "name": "configType", - "type": "select", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSelect": 1, - "values": [ - "aliyun", - "tencent", - "ssh", - "webhook", - "cloudflare", - "qiniu", - "namesilo", - "godaddy" - ] - } - }, - { - "system": false, - "id": "lr33hiwg", - "name": "deleted", - "type": "date", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": "", - "max": "" - } - }, - { - "system": false, - "id": "hsxcnlvd", - "name": "usage", - "type": "select", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSelect": 1, - "values": [ - "apply", - "deploy", - "all" - ] - } - }, - { - "system": false, - "id": "c8egzzwj", - "name": "group", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "teolp9pl72dxlxq", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - } - ], - "indexes": [ - "CREATE UNIQUE INDEX ` + "`" + `idx_wkoST0j` + "`" + ` ON ` + "`" + `access` + "`" + ` (` + "`" + `name` + "`" + `)" - ], - "listRule": null, - "viewRule": null, - "createRule": null, - "updateRule": null, - "deleteRule": null, - "options": {} - }, - { - "id": "0a1o4e6sstp694f", - "created": "2024-07-30 06:30:27.801Z", - "updated": "2024-09-13 12:52:50.804Z", - "name": "deployments", - "type": "base", - "system": false, - "schema": [ - { - "system": false, - "id": "farvlzk7", - "name": "domain", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "z3p974ainxjqlvs", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - }, - { - "system": false, - "id": "jx5f69i3", - "name": "log", - "type": "json", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSize": 2000000 - } - }, - { - "system": false, - "id": "qbxdtg9q", - "name": "phase", - "type": "select", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSelect": 1, - "values": [ - "check", - "apply", - "deploy" - ] - } - }, - { - "system": false, - "id": "rglrp1hz", - "name": "phaseSuccess", - "type": "bool", - "required": false, - "presentable": false, - "unique": false, - "options": {} - }, - { - "system": false, - "id": "lt1g1blu", - "name": "deployedAt", - "type": "date", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": "", - "max": "" - } - } - ], - "indexes": [], - "listRule": null, - "viewRule": null, - "createRule": null, - "updateRule": null, - "deleteRule": null, - "options": {} - }, - { - "id": "_pb_users_auth_", - "created": "2024-09-12 13:09:54.234Z", - "updated": "2024-09-12 23:34:40.687Z", - "name": "users", - "type": "auth", - "system": false, - "schema": [ - { - "system": false, - "id": "users_name", - "name": "name", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "users_avatar", - "name": "avatar", - "type": "file", - "required": false, - "presentable": false, - "unique": false, - "options": { - "mimeTypes": [ - "image/jpeg", - "image/png", - "image/svg+xml", - "image/gif", - "image/webp" - ], - "thumbs": null, - "maxSelect": 1, - "maxSize": 5242880, - "protected": false - } - } - ], - "indexes": [], - "listRule": "id = @request.auth.id", - "viewRule": "id = @request.auth.id", - "createRule": "", - "updateRule": "id = @request.auth.id", - "deleteRule": "id = @request.auth.id", - "options": { - "allowEmailAuth": true, - "allowOAuth2Auth": true, - "allowUsernameAuth": true, - "exceptEmailDomains": null, - "manageRule": null, - "minPasswordLength": 8, - "onlyEmailDomains": null, - "onlyVerified": false, - "requireEmail": false - } - }, - { - "id": "dy6ccjb60spfy6p", - "created": "2024-09-12 23:12:21.677Z", - "updated": "2024-09-12 23:34:40.687Z", - "name": "settings", - "type": "base", - "system": false, - "schema": [ - { - "system": false, - "id": "1tcmdsdf", - "name": "name", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "f9wyhypi", - "name": "content", - "type": "json", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSize": 2000000 - } - } - ], - "indexes": [ - "CREATE UNIQUE INDEX ` + "`" + `idx_RO7X9Vw` + "`" + ` ON ` + "`" + `settings` + "`" + ` (` + "`" + `name` + "`" + `)" - ], - "listRule": null, - "viewRule": null, - "createRule": null, - "updateRule": null, - "deleteRule": null, - "options": {} - }, - { - "id": "teolp9pl72dxlxq", - "created": "2024-09-13 12:51:05.611Z", - "updated": "2024-09-14 00:01:58.239Z", - "name": "access_groups", - "type": "base", - "system": false, - "schema": [ - { - "system": false, - "id": "7sajiv6i", - "name": "name", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "xp8admif", - "name": "access", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "4yzbv8urny5ja1e", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": null, - "displayFields": null - } - } - ], - "indexes": [ - "CREATE UNIQUE INDEX ` + "`" + `idx_RgRXp0R` + "`" + ` ON ` + "`" + `access_groups` + "`" + ` (` + "`" + `name` + "`" + `)" - ], - "listRule": null, - "viewRule": null, - "createRule": null, - "updateRule": null, - "deleteRule": null, - "options": {} - } - ]` - - collections := []*models.Collection{} - if err := json.Unmarshal([]byte(jsonData), &collections); err != nil { - return err - } - - return daos.New(db).ImportCollections(collections, true, nil) - }, func(db dbx.Builder) error { - return nil - }) -} diff --git a/migrations/1729671262_collections_snapshot.go b/migrations/1729671262_collections_snapshot.go deleted file mode 100644 index f72fdbe0..00000000 --- a/migrations/1729671262_collections_snapshot.go +++ /dev/null @@ -1,805 +0,0 @@ -package migrations - -import ( - "encoding/json" - - "github.com/pocketbase/dbx" - "github.com/pocketbase/pocketbase/daos" - m "github.com/pocketbase/pocketbase/migrations" - "github.com/pocketbase/pocketbase/models" -) - -func init() { - m.Register(func(db dbx.Builder) error { - jsonData := `[ - { - "id": "z3p974ainxjqlvs", - "created": "2024-07-29 10:02:48.334Z", - "updated": "2024-10-13 02:40:36.312Z", - "name": "domains", - "type": "base", - "system": false, - "schema": [ - { - "system": false, - "id": "iuaerpl2", - "name": "domain", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "ukkhuw85", - "name": "email", - "type": "email", - "required": false, - "presentable": false, - "unique": false, - "options": { - "exceptDomains": null, - "onlyDomains": null - } - }, - { - "system": false, - "id": "v98eebqq", - "name": "crontab", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "alc8e9ow", - "name": "access", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "4yzbv8urny5ja1e", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - }, - { - "system": false, - "id": "topsc9bj", - "name": "certUrl", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "vixgq072", - "name": "certStableUrl", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "g3a3sza5", - "name": "privateKey", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "gr6iouny", - "name": "certificate", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "tk6vnrmn", - "name": "issuerCertificate", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "sjo6ibse", - "name": "csr", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "x03n1bkj", - "name": "expiredAt", - "type": "date", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": "", - "max": "" - } - }, - { - "system": false, - "id": "srybpixz", - "name": "targetType", - "type": "select", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSelect": 1, - "values": [ - "aliyun-oss", - "aliyun-cdn", - "aliyun-dcdn", - "ssh", - "webhook", - "tencent-cdn", - "qiniu-cdn", - "local" - ] - } - }, - { - "system": false, - "id": "xy7yk0mb", - "name": "targetAccess", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "4yzbv8urny5ja1e", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - }, - { - "system": false, - "id": "6jqeyggw", - "name": "enabled", - "type": "bool", - "required": false, - "presentable": false, - "unique": false, - "options": {} - }, - { - "system": false, - "id": "hdsjcchf", - "name": "deployed", - "type": "bool", - "required": false, - "presentable": false, - "unique": false, - "options": {} - }, - { - "system": false, - "id": "aiya3rev", - "name": "rightnow", - "type": "bool", - "required": false, - "presentable": false, - "unique": false, - "options": {} - }, - { - "system": false, - "id": "ixznmhzc", - "name": "lastDeployedAt", - "type": "date", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": "", - "max": "" - } - }, - { - "system": false, - "id": "ghtlkn5j", - "name": "lastDeployment", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "0a1o4e6sstp694f", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - }, - { - "system": false, - "id": "zfnyj9he", - "name": "variables", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "1bspzuku", - "name": "group", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "teolp9pl72dxlxq", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - }, - { - "system": false, - "id": "g65gfh7a", - "name": "nameservers", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "wwrzc3jo", - "name": "applyConfig", - "type": "json", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSize": 2000000 - } - }, - { - "system": false, - "id": "474iwy8r", - "name": "deployConfig", - "type": "json", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSize": 2000000 - } - } - ], - "indexes": [ - "CREATE UNIQUE INDEX ` + "`" + `idx_4ABO6EQ` + "`" + ` ON ` + "`" + `domains` + "`" + ` (` + "`" + `domain` + "`" + `)" - ], - "listRule": null, - "viewRule": null, - "createRule": null, - "updateRule": null, - "deleteRule": null, - "options": {} - }, - { - "id": "4yzbv8urny5ja1e", - "created": "2024-07-29 10:04:39.685Z", - "updated": "2024-10-20 04:36:58.692Z", - "name": "access", - "type": "base", - "system": false, - "schema": [ - { - "system": false, - "id": "geeur58v", - "name": "name", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "iql7jpwx", - "name": "config", - "type": "json", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSize": 2000000 - } - }, - { - "system": false, - "id": "hwy7m03o", - "name": "configType", - "type": "select", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSelect": 1, - "values": [ - "aliyun", - "tencent", - "huaweicloud", - "qiniu", - "aws", - "cloudflare", - "namesilo", - "godaddy", - "pdns", - "httpreq", - "local", - "ssh", - "webhook", - "k8s" - ] - } - }, - { - "system": false, - "id": "lr33hiwg", - "name": "deleted", - "type": "date", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": "", - "max": "" - } - }, - { - "system": false, - "id": "hsxcnlvd", - "name": "usage", - "type": "select", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSelect": 1, - "values": [ - "apply", - "deploy", - "all" - ] - } - }, - { - "system": false, - "id": "c8egzzwj", - "name": "group", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "teolp9pl72dxlxq", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - } - ], - "indexes": [ - "CREATE UNIQUE INDEX ` + "`" + `idx_wkoST0j` + "`" + ` ON ` + "`" + `access` + "`" + ` (` + "`" + `name` + "`" + `)" - ], - "listRule": null, - "viewRule": null, - "createRule": null, - "updateRule": null, - "deleteRule": null, - "options": {} - }, - { - "id": "0a1o4e6sstp694f", - "created": "2024-07-30 06:30:27.801Z", - "updated": "2024-10-17 15:21:58.176Z", - "name": "deployments", - "type": "base", - "system": false, - "schema": [ - { - "system": false, - "id": "farvlzk7", - "name": "domain", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "z3p974ainxjqlvs", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - }, - { - "system": false, - "id": "jx5f69i3", - "name": "log", - "type": "json", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSize": 2000000 - } - }, - { - "system": false, - "id": "qbxdtg9q", - "name": "phase", - "type": "select", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSelect": 1, - "values": [ - "check", - "apply", - "deploy" - ] - } - }, - { - "system": false, - "id": "rglrp1hz", - "name": "phaseSuccess", - "type": "bool", - "required": false, - "presentable": false, - "unique": false, - "options": {} - }, - { - "system": false, - "id": "lt1g1blu", - "name": "deployedAt", - "type": "date", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": "", - "max": "" - } - }, - { - "system": false, - "id": "wledpzgb", - "name": "wholeSuccess", - "type": "bool", - "required": false, - "presentable": false, - "unique": false, - "options": {} - } - ], - "indexes": [], - "listRule": null, - "viewRule": null, - "createRule": null, - "updateRule": null, - "deleteRule": null, - "options": {} - }, - { - "id": "_pb_users_auth_", - "created": "2024-09-12 13:09:54.234Z", - "updated": "2024-10-13 02:40:36.312Z", - "name": "users", - "type": "auth", - "system": false, - "schema": [ - { - "system": false, - "id": "users_name", - "name": "name", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "users_avatar", - "name": "avatar", - "type": "file", - "required": false, - "presentable": false, - "unique": false, - "options": { - "mimeTypes": [ - "image/jpeg", - "image/png", - "image/svg+xml", - "image/gif", - "image/webp" - ], - "thumbs": null, - "maxSelect": 1, - "maxSize": 5242880, - "protected": false - } - } - ], - "indexes": [], - "listRule": "id = @request.auth.id", - "viewRule": "id = @request.auth.id", - "createRule": "", - "updateRule": "id = @request.auth.id", - "deleteRule": "id = @request.auth.id", - "options": { - "allowEmailAuth": true, - "allowOAuth2Auth": true, - "allowUsernameAuth": true, - "exceptEmailDomains": null, - "manageRule": null, - "minPasswordLength": 8, - "onlyEmailDomains": null, - "onlyVerified": false, - "requireEmail": false - } - }, - { - "id": "dy6ccjb60spfy6p", - "created": "2024-09-12 23:12:21.677Z", - "updated": "2024-10-13 02:40:36.312Z", - "name": "settings", - "type": "base", - "system": false, - "schema": [ - { - "system": false, - "id": "1tcmdsdf", - "name": "name", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "f9wyhypi", - "name": "content", - "type": "json", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSize": 2000000 - } - } - ], - "indexes": [ - "CREATE UNIQUE INDEX ` + "`" + `idx_RO7X9Vw` + "`" + ` ON ` + "`" + `settings` + "`" + ` (` + "`" + `name` + "`" + `)" - ], - "listRule": null, - "viewRule": null, - "createRule": null, - "updateRule": null, - "deleteRule": null, - "options": {} - }, - { - "id": "teolp9pl72dxlxq", - "created": "2024-09-13 12:51:05.611Z", - "updated": "2024-10-13 02:40:36.312Z", - "name": "access_groups", - "type": "base", - "system": false, - "schema": [ - { - "system": false, - "id": "7sajiv6i", - "name": "name", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "xp8admif", - "name": "access", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "4yzbv8urny5ja1e", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": null, - "displayFields": null - } - } - ], - "indexes": [ - "CREATE UNIQUE INDEX ` + "`" + `idx_RgRXp0R` + "`" + ` ON ` + "`" + `access_groups` + "`" + ` (` + "`" + `name` + "`" + `)" - ], - "listRule": null, - "viewRule": null, - "createRule": null, - "updateRule": null, - "deleteRule": null, - "options": {} - }, - { - "id": "012d7abbod1hwvr", - "created": "2024-10-23 06:37:13.155Z", - "updated": "2024-10-23 07:34:58.636Z", - "name": "acme_accounts", - "type": "base", - "system": false, - "schema": [ - { - "system": false, - "id": "fmjfn0yw", - "name": "ca", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "qqwijqzt", - "name": "email", - "type": "email", - "required": false, - "presentable": false, - "unique": false, - "options": { - "exceptDomains": null, - "onlyDomains": null - } - }, - { - "system": false, - "id": "genxqtii", - "name": "key", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "1aoia909", - "name": "resource", - "type": "json", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSize": 2000000 - } - } - ], - "indexes": [], - "listRule": null, - "viewRule": null, - "createRule": null, - "updateRule": null, - "deleteRule": null, - "options": {} - } - ]` - - collections := []*models.Collection{} - if err := json.Unmarshal([]byte(jsonData), &collections); err != nil { - return err - } - - return daos.New(db).ImportCollections(collections, true, nil) - }, func(db dbx.Builder) error { - return nil - }) -} diff --git a/migrations/1730766480_collections_snapshot.go b/migrations/1730766480_collections_snapshot.go deleted file mode 100644 index 74be734c..00000000 --- a/migrations/1730766480_collections_snapshot.go +++ /dev/null @@ -1,807 +0,0 @@ -package migrations - -import ( - "encoding/json" - - "github.com/pocketbase/dbx" - "github.com/pocketbase/pocketbase/daos" - m "github.com/pocketbase/pocketbase/migrations" - "github.com/pocketbase/pocketbase/models" -) - -func init() { - m.Register(func(db dbx.Builder) error { - jsonData := `[ - { - "id": "z3p974ainxjqlvs", - "created": "2024-07-29 10:02:48.334Z", - "updated": "2024-10-23 09:25:43.083Z", - "name": "domains", - "type": "base", - "system": false, - "schema": [ - { - "system": false, - "id": "iuaerpl2", - "name": "domain", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "ukkhuw85", - "name": "email", - "type": "email", - "required": false, - "presentable": false, - "unique": false, - "options": { - "exceptDomains": null, - "onlyDomains": null - } - }, - { - "system": false, - "id": "v98eebqq", - "name": "crontab", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "alc8e9ow", - "name": "access", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "4yzbv8urny5ja1e", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - }, - { - "system": false, - "id": "topsc9bj", - "name": "certUrl", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "vixgq072", - "name": "certStableUrl", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "g3a3sza5", - "name": "privateKey", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "gr6iouny", - "name": "certificate", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "tk6vnrmn", - "name": "issuerCertificate", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "sjo6ibse", - "name": "csr", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "x03n1bkj", - "name": "expiredAt", - "type": "date", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": "", - "max": "" - } - }, - { - "system": false, - "id": "srybpixz", - "name": "targetType", - "type": "select", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSelect": 1, - "values": [ - "aliyun-oss", - "aliyun-cdn", - "aliyun-dcdn", - "ssh", - "webhook", - "tencent-cdn", - "qiniu-cdn", - "local" - ] - } - }, - { - "system": false, - "id": "xy7yk0mb", - "name": "targetAccess", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "4yzbv8urny5ja1e", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - }, - { - "system": false, - "id": "6jqeyggw", - "name": "enabled", - "type": "bool", - "required": false, - "presentable": false, - "unique": false, - "options": {} - }, - { - "system": false, - "id": "hdsjcchf", - "name": "deployed", - "type": "bool", - "required": false, - "presentable": false, - "unique": false, - "options": {} - }, - { - "system": false, - "id": "aiya3rev", - "name": "rightnow", - "type": "bool", - "required": false, - "presentable": false, - "unique": false, - "options": {} - }, - { - "system": false, - "id": "ixznmhzc", - "name": "lastDeployedAt", - "type": "date", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": "", - "max": "" - } - }, - { - "system": false, - "id": "ghtlkn5j", - "name": "lastDeployment", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "0a1o4e6sstp694f", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - }, - { - "system": false, - "id": "zfnyj9he", - "name": "variables", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "1bspzuku", - "name": "group", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "teolp9pl72dxlxq", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - }, - { - "system": false, - "id": "g65gfh7a", - "name": "nameservers", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "wwrzc3jo", - "name": "applyConfig", - "type": "json", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSize": 2000000 - } - }, - { - "system": false, - "id": "474iwy8r", - "name": "deployConfig", - "type": "json", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSize": 2000000 - } - } - ], - "indexes": [ - "CREATE UNIQUE INDEX ` + "`" + `idx_4ABO6EQ` + "`" + ` ON ` + "`" + `domains` + "`" + ` (` + "`" + `domain` + "`" + `)" - ], - "listRule": null, - "viewRule": null, - "createRule": null, - "updateRule": null, - "deleteRule": null, - "options": {} - }, - { - "id": "4yzbv8urny5ja1e", - "created": "2024-07-29 10:04:39.685Z", - "updated": "2024-11-05 00:21:32.129Z", - "name": "access", - "type": "base", - "system": false, - "schema": [ - { - "system": false, - "id": "geeur58v", - "name": "name", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "iql7jpwx", - "name": "config", - "type": "json", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSize": 2000000 - } - }, - { - "system": false, - "id": "hwy7m03o", - "name": "configType", - "type": "select", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSelect": 1, - "values": [ - "aliyun", - "tencent", - "huaweicloud", - "qiniu", - "aws", - "cloudflare", - "namesilo", - "godaddy", - "pdns", - "httpreq", - "local", - "ssh", - "webhook", - "k8s", - "baiducloud", - "dogecloud" - ] - } - }, - { - "system": false, - "id": "lr33hiwg", - "name": "deleted", - "type": "date", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": "", - "max": "" - } - }, - { - "system": false, - "id": "hsxcnlvd", - "name": "usage", - "type": "select", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSelect": 1, - "values": [ - "apply", - "deploy", - "all" - ] - } - }, - { - "system": false, - "id": "c8egzzwj", - "name": "group", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "teolp9pl72dxlxq", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - } - ], - "indexes": [ - "CREATE UNIQUE INDEX ` + "`" + `idx_wkoST0j` + "`" + ` ON ` + "`" + `access` + "`" + ` (` + "`" + `name` + "`" + `)" - ], - "listRule": null, - "viewRule": null, - "createRule": null, - "updateRule": null, - "deleteRule": null, - "options": {} - }, - { - "id": "0a1o4e6sstp694f", - "created": "2024-07-30 06:30:27.801Z", - "updated": "2024-10-23 09:25:43.084Z", - "name": "deployments", - "type": "base", - "system": false, - "schema": [ - { - "system": false, - "id": "farvlzk7", - "name": "domain", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "z3p974ainxjqlvs", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - }, - { - "system": false, - "id": "jx5f69i3", - "name": "log", - "type": "json", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSize": 2000000 - } - }, - { - "system": false, - "id": "qbxdtg9q", - "name": "phase", - "type": "select", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSelect": 1, - "values": [ - "check", - "apply", - "deploy" - ] - } - }, - { - "system": false, - "id": "rglrp1hz", - "name": "phaseSuccess", - "type": "bool", - "required": false, - "presentable": false, - "unique": false, - "options": {} - }, - { - "system": false, - "id": "lt1g1blu", - "name": "deployedAt", - "type": "date", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": "", - "max": "" - } - }, - { - "system": false, - "id": "wledpzgb", - "name": "wholeSuccess", - "type": "bool", - "required": false, - "presentable": false, - "unique": false, - "options": {} - } - ], - "indexes": [], - "listRule": null, - "viewRule": null, - "createRule": null, - "updateRule": null, - "deleteRule": null, - "options": {} - }, - { - "id": "_pb_users_auth_", - "created": "2024-09-12 13:09:54.234Z", - "updated": "2024-10-23 09:25:43.085Z", - "name": "users", - "type": "auth", - "system": false, - "schema": [ - { - "system": false, - "id": "users_name", - "name": "name", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "users_avatar", - "name": "avatar", - "type": "file", - "required": false, - "presentable": false, - "unique": false, - "options": { - "mimeTypes": [ - "image/jpeg", - "image/png", - "image/svg+xml", - "image/gif", - "image/webp" - ], - "thumbs": null, - "maxSelect": 1, - "maxSize": 5242880, - "protected": false - } - } - ], - "indexes": [], - "listRule": "id = @request.auth.id", - "viewRule": "id = @request.auth.id", - "createRule": "", - "updateRule": "id = @request.auth.id", - "deleteRule": "id = @request.auth.id", - "options": { - "allowEmailAuth": true, - "allowOAuth2Auth": true, - "allowUsernameAuth": true, - "exceptEmailDomains": null, - "manageRule": null, - "minPasswordLength": 8, - "onlyEmailDomains": null, - "onlyVerified": false, - "requireEmail": false - } - }, - { - "id": "dy6ccjb60spfy6p", - "created": "2024-09-12 23:12:21.677Z", - "updated": "2024-10-23 09:25:43.085Z", - "name": "settings", - "type": "base", - "system": false, - "schema": [ - { - "system": false, - "id": "1tcmdsdf", - "name": "name", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "f9wyhypi", - "name": "content", - "type": "json", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSize": 2000000 - } - } - ], - "indexes": [ - "CREATE UNIQUE INDEX ` + "`" + `idx_RO7X9Vw` + "`" + ` ON ` + "`" + `settings` + "`" + ` (` + "`" + `name` + "`" + `)" - ], - "listRule": null, - "viewRule": null, - "createRule": null, - "updateRule": null, - "deleteRule": null, - "options": {} - }, - { - "id": "teolp9pl72dxlxq", - "created": "2024-09-13 12:51:05.611Z", - "updated": "2024-10-23 09:25:43.086Z", - "name": "access_groups", - "type": "base", - "system": false, - "schema": [ - { - "system": false, - "id": "7sajiv6i", - "name": "name", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "xp8admif", - "name": "access", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "4yzbv8urny5ja1e", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": null, - "displayFields": null - } - } - ], - "indexes": [ - "CREATE UNIQUE INDEX ` + "`" + `idx_RgRXp0R` + "`" + ` ON ` + "`" + `access_groups` + "`" + ` (` + "`" + `name` + "`" + `)" - ], - "listRule": null, - "viewRule": null, - "createRule": null, - "updateRule": null, - "deleteRule": null, - "options": {} - }, - { - "id": "012d7abbod1hwvr", - "created": "2024-10-23 06:37:13.155Z", - "updated": "2024-10-23 09:25:43.086Z", - "name": "acme_accounts", - "type": "base", - "system": false, - "schema": [ - { - "system": false, - "id": "fmjfn0yw", - "name": "ca", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "qqwijqzt", - "name": "email", - "type": "email", - "required": false, - "presentable": false, - "unique": false, - "options": { - "exceptDomains": null, - "onlyDomains": null - } - }, - { - "system": false, - "id": "genxqtii", - "name": "key", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "1aoia909", - "name": "resource", - "type": "json", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSize": 2000000 - } - } - ], - "indexes": [], - "listRule": null, - "viewRule": null, - "createRule": null, - "updateRule": null, - "deleteRule": null, - "options": {} - } - ]` - - collections := []*models.Collection{} - if err := json.Unmarshal([]byte(jsonData), &collections); err != nil { - return err - } - - return daos.New(db).ImportCollections(collections, true, nil) - }, func(db dbx.Builder) error { - return nil - }) -} diff --git a/migrations/1731463526_updated_access.go b/migrations/1731463526_updated_access.go deleted file mode 100644 index 68249292..00000000 --- a/migrations/1731463526_updated_access.go +++ /dev/null @@ -1,105 +0,0 @@ -package migrations - -import ( - "encoding/json" - - "github.com/pocketbase/dbx" - "github.com/pocketbase/pocketbase/daos" - m "github.com/pocketbase/pocketbase/migrations" - "github.com/pocketbase/pocketbase/models/schema" -) - -func init() { - m.Register(func(db dbx.Builder) error { - dao := daos.New(db) - - collection, err := dao.FindCollectionByNameOrId("4yzbv8urny5ja1e") - if err != nil { - return err - } - - // update - edit_configType := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "hwy7m03o", - "name": "configType", - "type": "select", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSelect": 1, - "values": [ - "aliyun", - "tencent", - "huaweicloud", - "qiniu", - "aws", - "cloudflare", - "namesilo", - "godaddy", - "pdns", - "httpreq", - "local", - "ssh", - "webhook", - "k8s", - "baiducloud", - "dogecloud", - "volcengine" - ] - } - }`), edit_configType); err != nil { - return err - } - collection.Schema.AddField(edit_configType) - - return dao.SaveCollection(collection) - }, func(db dbx.Builder) error { - dao := daos.New(db) - - collection, err := dao.FindCollectionByNameOrId("4yzbv8urny5ja1e") - if err != nil { - return err - } - - // update - edit_configType := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "hwy7m03o", - "name": "configType", - "type": "select", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSelect": 1, - "values": [ - "aliyun", - "tencent", - "huaweicloud", - "qiniu", - "aws", - "cloudflare", - "namesilo", - "godaddy", - "pdns", - "httpreq", - "local", - "ssh", - "webhook", - "k8s", - "baiducloud", - "dogecloud" - ] - } - }`), edit_configType); err != nil { - return err - } - collection.Schema.AddField(edit_configType) - - return dao.SaveCollection(collection) - }) -} diff --git a/migrations/1731872250_add_byteplus.go b/migrations/1731872250_add_byteplus.go deleted file mode 100644 index 63daae39..00000000 --- a/migrations/1731872250_add_byteplus.go +++ /dev/null @@ -1,107 +0,0 @@ -package migrations - -import ( - "encoding/json" - - "github.com/pocketbase/dbx" - "github.com/pocketbase/pocketbase/daos" - m "github.com/pocketbase/pocketbase/migrations" - "github.com/pocketbase/pocketbase/models/schema" -) - -func init() { - m.Register(func(db dbx.Builder) error { - dao := daos.New(db) - - collection, err := dao.FindCollectionByNameOrId("4yzbv8urny5ja1e") - if err != nil { - return err - } - - // update - edit_configType := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "hwy7m03o", - "name": "configType", - "type": "select", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSelect": 1, - "values": [ - "aliyun", - "tencent", - "huaweicloud", - "qiniu", - "aws", - "cloudflare", - "namesilo", - "godaddy", - "pdns", - "httpreq", - "local", - "ssh", - "webhook", - "k8s", - "baiducloud", - "dogecloud", - "volcengine", - "byteplus" - ] - } - }`), edit_configType); err != nil { - return err - } - collection.Schema.AddField(edit_configType) - - return dao.SaveCollection(collection) - }, func(db dbx.Builder) error { - dao := daos.New(db) - - collection, err := dao.FindCollectionByNameOrId("4yzbv8urny5ja1e") - if err != nil { - return err - } - - // update - edit_configType := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "hwy7m03o", - "name": "configType", - "type": "select", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSelect": 1, - "values": [ - "aliyun", - "tencent", - "huaweicloud", - "qiniu", - "aws", - "cloudflare", - "namesilo", - "godaddy", - "pdns", - "httpreq", - "local", - "ssh", - "webhook", - "k8s", - "baiducloud", - "dogecloud", - "volcengine" - ] - } - }`), edit_configType); err != nil { - return err - } - collection.Schema.AddField(edit_configType) - - return dao.SaveCollection(collection) - }) -} diff --git a/migrations/1732450576_collections_snapshot.go b/migrations/1732450576_collections_snapshot.go deleted file mode 100644 index 01aa2d29..00000000 --- a/migrations/1732450576_collections_snapshot.go +++ /dev/null @@ -1,1236 +0,0 @@ -package migrations - -import ( - "encoding/json" - - "github.com/pocketbase/dbx" - "github.com/pocketbase/pocketbase/daos" - m "github.com/pocketbase/pocketbase/migrations" - "github.com/pocketbase/pocketbase/models" -) - -func init() { - m.Register(func(db dbx.Builder) error { - jsonData := `[ - { - "id": "z3p974ainxjqlvs", - "created": "2024-07-29 10:02:48.334Z", - "updated": "2024-11-05 12:57:58.246Z", - "name": "domains", - "type": "base", - "system": false, - "schema": [ - { - "system": false, - "id": "iuaerpl2", - "name": "domain", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "ukkhuw85", - "name": "email", - "type": "email", - "required": false, - "presentable": false, - "unique": false, - "options": { - "exceptDomains": null, - "onlyDomains": null - } - }, - { - "system": false, - "id": "v98eebqq", - "name": "crontab", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "alc8e9ow", - "name": "access", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "4yzbv8urny5ja1e", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - }, - { - "system": false, - "id": "topsc9bj", - "name": "certUrl", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "vixgq072", - "name": "certStableUrl", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "g3a3sza5", - "name": "privateKey", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "gr6iouny", - "name": "certificate", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "tk6vnrmn", - "name": "issuerCertificate", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "sjo6ibse", - "name": "csr", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "x03n1bkj", - "name": "expiredAt", - "type": "date", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": "", - "max": "" - } - }, - { - "system": false, - "id": "srybpixz", - "name": "targetType", - "type": "select", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSelect": 1, - "values": [ - "aliyun-oss", - "aliyun-cdn", - "aliyun-dcdn", - "ssh", - "webhook", - "tencent-cdn", - "qiniu-cdn", - "local" - ] - } - }, - { - "system": false, - "id": "xy7yk0mb", - "name": "targetAccess", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "4yzbv8urny5ja1e", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - }, - { - "system": false, - "id": "6jqeyggw", - "name": "enabled", - "type": "bool", - "required": false, - "presentable": false, - "unique": false, - "options": {} - }, - { - "system": false, - "id": "hdsjcchf", - "name": "deployed", - "type": "bool", - "required": false, - "presentable": false, - "unique": false, - "options": {} - }, - { - "system": false, - "id": "aiya3rev", - "name": "rightnow", - "type": "bool", - "required": false, - "presentable": false, - "unique": false, - "options": {} - }, - { - "system": false, - "id": "ixznmhzc", - "name": "lastDeployedAt", - "type": "date", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": "", - "max": "" - } - }, - { - "system": false, - "id": "ghtlkn5j", - "name": "lastDeployment", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "0a1o4e6sstp694f", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - }, - { - "system": false, - "id": "zfnyj9he", - "name": "variables", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "1bspzuku", - "name": "group", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "teolp9pl72dxlxq", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - }, - { - "system": false, - "id": "g65gfh7a", - "name": "nameservers", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "wwrzc3jo", - "name": "applyConfig", - "type": "json", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSize": 2000000 - } - }, - { - "system": false, - "id": "474iwy8r", - "name": "deployConfig", - "type": "json", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSize": 2000000 - } - } - ], - "indexes": [ - "CREATE UNIQUE INDEX ` + "`" + `idx_4ABO6EQ` + "`" + ` ON ` + "`" + `domains` + "`" + ` (` + "`" + `domain` + "`" + `)" - ], - "listRule": null, - "viewRule": null, - "createRule": null, - "updateRule": null, - "deleteRule": null, - "options": {} - }, - { - "id": "4yzbv8urny5ja1e", - "created": "2024-07-29 10:04:39.685Z", - "updated": "2024-11-18 11:43:01.059Z", - "name": "access", - "type": "base", - "system": false, - "schema": [ - { - "system": false, - "id": "geeur58v", - "name": "name", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "iql7jpwx", - "name": "config", - "type": "json", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSize": 2000000 - } - }, - { - "system": false, - "id": "hwy7m03o", - "name": "configType", - "type": "select", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSelect": 1, - "values": [ - "aliyun", - "tencent", - "huaweicloud", - "qiniu", - "aws", - "cloudflare", - "namesilo", - "godaddy", - "pdns", - "httpreq", - "local", - "ssh", - "webhook", - "k8s", - "baiducloud", - "dogecloud", - "volcengine", - "byteplus" - ] - } - }, - { - "system": false, - "id": "lr33hiwg", - "name": "deleted", - "type": "date", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": "", - "max": "" - } - }, - { - "system": false, - "id": "hsxcnlvd", - "name": "usage", - "type": "select", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSelect": 1, - "values": [ - "apply", - "deploy", - "all" - ] - } - }, - { - "system": false, - "id": "c8egzzwj", - "name": "group", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "teolp9pl72dxlxq", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - } - ], - "indexes": [ - "CREATE UNIQUE INDEX ` + "`" + `idx_wkoST0j` + "`" + ` ON ` + "`" + `access` + "`" + ` (` + "`" + `name` + "`" + `)" - ], - "listRule": null, - "viewRule": null, - "createRule": null, - "updateRule": null, - "deleteRule": null, - "options": {} - }, - { - "id": "0a1o4e6sstp694f", - "created": "2024-07-30 06:30:27.801Z", - "updated": "2024-11-05 12:57:58.247Z", - "name": "deployments", - "type": "base", - "system": false, - "schema": [ - { - "system": false, - "id": "farvlzk7", - "name": "domain", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "z3p974ainxjqlvs", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - }, - { - "system": false, - "id": "jx5f69i3", - "name": "log", - "type": "json", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSize": 2000000 - } - }, - { - "system": false, - "id": "qbxdtg9q", - "name": "phase", - "type": "select", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSelect": 1, - "values": [ - "check", - "apply", - "deploy" - ] - } - }, - { - "system": false, - "id": "rglrp1hz", - "name": "phaseSuccess", - "type": "bool", - "required": false, - "presentable": false, - "unique": false, - "options": {} - }, - { - "system": false, - "id": "lt1g1blu", - "name": "deployedAt", - "type": "date", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": "", - "max": "" - } - }, - { - "system": false, - "id": "wledpzgb", - "name": "wholeSuccess", - "type": "bool", - "required": false, - "presentable": false, - "unique": false, - "options": {} - } - ], - "indexes": [], - "listRule": null, - "viewRule": null, - "createRule": null, - "updateRule": null, - "deleteRule": null, - "options": {} - }, - { - "id": "_pb_users_auth_", - "created": "2024-09-12 13:09:54.234Z", - "updated": "2024-11-05 12:57:58.247Z", - "name": "users", - "type": "auth", - "system": false, - "schema": [ - { - "system": false, - "id": "users_name", - "name": "name", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "users_avatar", - "name": "avatar", - "type": "file", - "required": false, - "presentable": false, - "unique": false, - "options": { - "mimeTypes": [ - "image/jpeg", - "image/png", - "image/svg+xml", - "image/gif", - "image/webp" - ], - "thumbs": null, - "maxSelect": 1, - "maxSize": 5242880, - "protected": false - } - } - ], - "indexes": [], - "listRule": "id = @request.auth.id", - "viewRule": "id = @request.auth.id", - "createRule": "", - "updateRule": "id = @request.auth.id", - "deleteRule": "id = @request.auth.id", - "options": { - "allowEmailAuth": true, - "allowOAuth2Auth": true, - "allowUsernameAuth": true, - "exceptEmailDomains": null, - "manageRule": null, - "minPasswordLength": 8, - "onlyEmailDomains": null, - "onlyVerified": false, - "requireEmail": false - } - }, - { - "id": "dy6ccjb60spfy6p", - "created": "2024-09-12 23:12:21.677Z", - "updated": "2024-11-05 12:57:58.247Z", - "name": "settings", - "type": "base", - "system": false, - "schema": [ - { - "system": false, - "id": "1tcmdsdf", - "name": "name", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "f9wyhypi", - "name": "content", - "type": "json", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSize": 2000000 - } - } - ], - "indexes": [ - "CREATE UNIQUE INDEX ` + "`" + `idx_RO7X9Vw` + "`" + ` ON ` + "`" + `settings` + "`" + ` (` + "`" + `name` + "`" + `)" - ], - "listRule": null, - "viewRule": null, - "createRule": null, - "updateRule": null, - "deleteRule": null, - "options": {} - }, - { - "id": "teolp9pl72dxlxq", - "created": "2024-09-13 12:51:05.611Z", - "updated": "2024-11-05 12:57:58.247Z", - "name": "access_groups", - "type": "base", - "system": false, - "schema": [ - { - "system": false, - "id": "7sajiv6i", - "name": "name", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "xp8admif", - "name": "access", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "4yzbv8urny5ja1e", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": null, - "displayFields": null - } - } - ], - "indexes": [ - "CREATE UNIQUE INDEX ` + "`" + `idx_RgRXp0R` + "`" + ` ON ` + "`" + `access_groups` + "`" + ` (` + "`" + `name` + "`" + `)" - ], - "listRule": null, - "viewRule": null, - "createRule": null, - "updateRule": null, - "deleteRule": null, - "options": {} - }, - { - "id": "012d7abbod1hwvr", - "created": "2024-10-23 06:37:13.155Z", - "updated": "2024-11-05 12:57:58.247Z", - "name": "acme_accounts", - "type": "base", - "system": false, - "schema": [ - { - "system": false, - "id": "fmjfn0yw", - "name": "ca", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "qqwijqzt", - "name": "email", - "type": "email", - "required": false, - "presentable": false, - "unique": false, - "options": { - "exceptDomains": null, - "onlyDomains": null - } - }, - { - "system": false, - "id": "genxqtii", - "name": "key", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "1aoia909", - "name": "resource", - "type": "json", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSize": 2000000 - } - } - ], - "indexes": [], - "listRule": null, - "viewRule": null, - "createRule": null, - "updateRule": null, - "deleteRule": null, - "options": {} - }, - { - "id": "tovyif5ax6j62ur", - "created": "2024-11-12 01:09:03.542Z", - "updated": "2024-11-18 02:36:33.502Z", - "name": "workflow", - "type": "base", - "system": false, - "schema": [ - { - "system": false, - "id": "8yydhv1h", - "name": "name", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "1buzebwz", - "name": "description", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "vqoajwjq", - "name": "type", - "type": "select", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSelect": 1, - "values": [ - "auto", - "manual" - ] - } - }, - { - "system": false, - "id": "8ho247wh", - "name": "crontab", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "awlphkfe", - "name": "content", - "type": "json", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSize": 2000000 - } - }, - { - "system": false, - "id": "g9ohkk5o", - "name": "draft", - "type": "json", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSize": 2000000 - } - }, - { - "system": false, - "id": "nq7kfdzi", - "name": "enabled", - "type": "bool", - "required": false, - "presentable": false, - "unique": false, - "options": {} - }, - { - "system": false, - "id": "2rpfz9t3", - "name": "hasDraft", - "type": "bool", - "required": false, - "presentable": false, - "unique": false, - "options": {} - } - ], - "indexes": [], - "listRule": null, - "viewRule": null, - "createRule": null, - "updateRule": null, - "deleteRule": null, - "options": {} - }, - { - "id": "bqnxb95f2cooowp", - "created": "2024-11-18 01:35:35.222Z", - "updated": "2024-11-18 08:27:41.125Z", - "name": "workflow_output", - "type": "base", - "system": false, - "schema": [ - { - "system": false, - "id": "jka88auc", - "name": "workflow", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "tovyif5ax6j62ur", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - }, - { - "system": false, - "id": "z9fgvqkz", - "name": "nodeId", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "c2rm9omj", - "name": "node", - "type": "json", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSize": 2000000 - } - }, - { - "system": false, - "id": "he4cceqb", - "name": "output", - "type": "json", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSize": 2000000 - } - }, - { - "system": false, - "id": "2yfxbxuf", - "name": "succeed", - "type": "bool", - "required": false, - "presentable": false, - "unique": false, - "options": {} - } - ], - "indexes": [], - "listRule": null, - "viewRule": null, - "createRule": null, - "updateRule": null, - "deleteRule": null, - "options": {} - }, - { - "id": "4szxr9x43tpj6np", - "created": "2024-11-18 01:36:34.011Z", - "updated": "2024-11-19 06:50:53.806Z", - "name": "certificate", - "type": "base", - "system": false, - "schema": [ - { - "system": false, - "id": "fugxf58p", - "name": "san", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "plmambpz", - "name": "certificate", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "49qvwxcg", - "name": "privateKey", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "agt7n5bb", - "name": "issuerCertificate", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "ayyjy5ve", - "name": "certUrl", - "type": "url", - "required": false, - "presentable": false, - "unique": false, - "options": { - "exceptDomains": null, - "onlyDomains": null - } - }, - { - "system": false, - "id": "3x5heo8e", - "name": "certStableUrl", - "type": "url", - "required": false, - "presentable": false, - "unique": false, - "options": { - "exceptDomains": null, - "onlyDomains": null - } - }, - { - "system": false, - "id": "2ohlr0yd", - "name": "output", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "bqnxb95f2cooowp", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - }, - { - "system": false, - "id": "zgpdby2k", - "name": "expireAt", - "type": "date", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": "", - "max": "" - } - }, - { - "system": false, - "id": "uvqfamb1", - "name": "workflow", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "tovyif5ax6j62ur", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - }, - { - "system": false, - "id": "uqldzldw", - "name": "nodeId", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - } - ], - "indexes": [], - "listRule": null, - "viewRule": null, - "createRule": null, - "updateRule": null, - "deleteRule": null, - "options": {} - }, - { - "id": "qjp8lygssgwyqyz", - "created": "2024-11-19 07:58:21.573Z", - "updated": "2024-11-19 07:59:50.658Z", - "name": "workflow_run_log", - "type": "base", - "system": false, - "schema": [ - { - "system": false, - "id": "m8xfsyyy", - "name": "workflow", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "tovyif5ax6j62ur", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - }, - { - "system": false, - "id": "2m9byaa9", - "name": "log", - "type": "json", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSize": 2000000 - } - }, - { - "system": false, - "id": "cht6kqw9", - "name": "succeed", - "type": "bool", - "required": false, - "presentable": false, - "unique": false, - "options": {} - }, - { - "system": false, - "id": "hvebkuxw", - "name": "error", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - } - ], - "indexes": [], - "listRule": null, - "viewRule": null, - "createRule": null, - "updateRule": null, - "deleteRule": null, - "options": {} - } - ]` - - collections := []*models.Collection{} - if err := json.Unmarshal([]byte(jsonData), &collections); err != nil { - return err - } - - return daos.New(db).ImportCollections(collections, true, nil) - }, func(db dbx.Builder) error { - return nil - }) -} diff --git a/migrations/1734398918_updated_access.go b/migrations/1734398918_updated_access.go deleted file mode 100644 index e7e3cd98..00000000 --- a/migrations/1734398918_updated_access.go +++ /dev/null @@ -1,108 +0,0 @@ -package migrations - -import ( - "encoding/json" - - "github.com/pocketbase/dbx" - "github.com/pocketbase/pocketbase/daos" - m "github.com/pocketbase/pocketbase/migrations" - "github.com/pocketbase/pocketbase/models/schema" -) - -func init() { - m.Register(func(db dbx.Builder) error { - dao := daos.New(db); - - collection, err := dao.FindCollectionByNameOrId("4yzbv8urny5ja1e") - if err != nil { - return err - } - - // update - edit_configType := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "hwy7m03o", - "name": "configType", - "type": "select", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSelect": 1, - "values": [ - "aliyun", - "acmehttpreq", - "aws", - "baiducloud", - "byteplus", - "cloudflare", - "dogecloud", - "godaddy", - "huaweicloud", - "k8s", - "local", - "namesilo", - "powerdns", - "qiniu", - "ssh", - "tencentcloud", - "volcengine", - "webhook" - ] - } - }`), edit_configType); err != nil { - return err - } - collection.Schema.AddField(edit_configType) - - return dao.SaveCollection(collection) - }, func(db dbx.Builder) error { - dao := daos.New(db); - - collection, err := dao.FindCollectionByNameOrId("4yzbv8urny5ja1e") - if err != nil { - return err - } - - // update - edit_configType := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "hwy7m03o", - "name": "configType", - "type": "select", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSelect": 1, - "values": [ - "aliyun", - "tencent", - "huaweicloud", - "qiniu", - "aws", - "cloudflare", - "namesilo", - "godaddy", - "pdns", - "httpreq", - "local", - "ssh", - "webhook", - "k8s", - "baiducloud", - "dogecloud", - "volcengine", - "byteplus" - ] - } - }`), edit_configType); err != nil { - return err - } - collection.Schema.AddField(edit_configType) - - return dao.SaveCollection(collection) - }) -} diff --git a/migrations/1734434522_updated_access.go b/migrations/1734434522_updated_access.go deleted file mode 100644 index 02c87f24..00000000 --- a/migrations/1734434522_updated_access.go +++ /dev/null @@ -1,43 +0,0 @@ -package migrations - -import ( - "encoding/json" - - "github.com/pocketbase/dbx" - "github.com/pocketbase/pocketbase/daos" - m "github.com/pocketbase/pocketbase/migrations" -) - -func init() { - m.Register(func(db dbx.Builder) error { - dao := daos.New(db); - - collection, err := dao.FindCollectionByNameOrId("4yzbv8urny5ja1e") - if err != nil { - return err - } - - if err := json.Unmarshal([]byte(`[ - "CREATE INDEX ` + "`" + `idx_wkoST0j` + "`" + ` ON ` + "`" + `access` + "`" + ` (` + "`" + `name` + "`" + `)" - ]`), &collection.Indexes); err != nil { - return err - } - - return dao.SaveCollection(collection) - }, func(db dbx.Builder) error { - dao := daos.New(db); - - collection, err := dao.FindCollectionByNameOrId("4yzbv8urny5ja1e") - if err != nil { - return err - } - - if err := json.Unmarshal([]byte(`[ - "CREATE UNIQUE INDEX ` + "`" + `idx_wkoST0j` + "`" + ` ON ` + "`" + `access` + "`" + ` (` + "`" + `name` + "`" + `)" - ]`), &collection.Indexes); err != nil { - return err - } - - return dao.SaveCollection(collection) - }) -} diff --git a/migrations/1734868882_updated_access.go b/migrations/1734868882_updated_access.go deleted file mode 100644 index 75dedc10..00000000 --- a/migrations/1734868882_updated_access.go +++ /dev/null @@ -1,57 +0,0 @@ -package migrations - -import ( - "encoding/json" - - "github.com/pocketbase/dbx" - "github.com/pocketbase/pocketbase/daos" - m "github.com/pocketbase/pocketbase/migrations" - "github.com/pocketbase/pocketbase/models/schema" -) - -func init() { - m.Register(func(db dbx.Builder) error { - dao := daos.New(db); - - collection, err := dao.FindCollectionByNameOrId("4yzbv8urny5ja1e") - if err != nil { - return err - } - - // remove - collection.Schema.RemoveField("c8egzzwj") - - return dao.SaveCollection(collection) - }, func(db dbx.Builder) error { - dao := daos.New(db); - - collection, err := dao.FindCollectionByNameOrId("4yzbv8urny5ja1e") - if err != nil { - return err - } - - // add - del_group := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "c8egzzwj", - "name": "group", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "teolp9pl72dxlxq", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - }`), del_group); err != nil { - return err - } - collection.Schema.AddField(del_group) - - return dao.SaveCollection(collection) - }) -} diff --git a/migrations/1734869127_updated_domains.go b/migrations/1734869127_updated_domains.go deleted file mode 100644 index f9575fa0..00000000 --- a/migrations/1734869127_updated_domains.go +++ /dev/null @@ -1,57 +0,0 @@ -package migrations - -import ( - "encoding/json" - - "github.com/pocketbase/dbx" - "github.com/pocketbase/pocketbase/daos" - m "github.com/pocketbase/pocketbase/migrations" - "github.com/pocketbase/pocketbase/models/schema" -) - -func init() { - m.Register(func(db dbx.Builder) error { - dao := daos.New(db); - - collection, err := dao.FindCollectionByNameOrId("z3p974ainxjqlvs") - if err != nil { - return err - } - - // remove - collection.Schema.RemoveField("1bspzuku") - - return dao.SaveCollection(collection) - }, func(db dbx.Builder) error { - dao := daos.New(db); - - collection, err := dao.FindCollectionByNameOrId("z3p974ainxjqlvs") - if err != nil { - return err - } - - // add - del_group := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "1bspzuku", - "name": "group", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "teolp9pl72dxlxq", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - }`), del_group); err != nil { - return err - } - collection.Schema.AddField(del_group) - - return dao.SaveCollection(collection) - }) -} diff --git a/migrations/1734869146_updated_deployments.go b/migrations/1734869146_updated_deployments.go deleted file mode 100644 index a1b31228..00000000 --- a/migrations/1734869146_updated_deployments.go +++ /dev/null @@ -1,57 +0,0 @@ -package migrations - -import ( - "encoding/json" - - "github.com/pocketbase/dbx" - "github.com/pocketbase/pocketbase/daos" - m "github.com/pocketbase/pocketbase/migrations" - "github.com/pocketbase/pocketbase/models/schema" -) - -func init() { - m.Register(func(db dbx.Builder) error { - dao := daos.New(db); - - collection, err := dao.FindCollectionByNameOrId("0a1o4e6sstp694f") - if err != nil { - return err - } - - // remove - collection.Schema.RemoveField("farvlzk7") - - return dao.SaveCollection(collection) - }, func(db dbx.Builder) error { - dao := daos.New(db); - - collection, err := dao.FindCollectionByNameOrId("0a1o4e6sstp694f") - if err != nil { - return err - } - - // add - del_domain := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "farvlzk7", - "name": "domain", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "z3p974ainxjqlvs", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - }`), del_domain); err != nil { - return err - } - collection.Schema.AddField(del_domain) - - return dao.SaveCollection(collection) - }) -} diff --git a/migrations/1734869175_updated_domains.go b/migrations/1734869175_updated_domains.go deleted file mode 100644 index 1c89f58a..00000000 --- a/migrations/1734869175_updated_domains.go +++ /dev/null @@ -1,57 +0,0 @@ -package migrations - -import ( - "encoding/json" - - "github.com/pocketbase/dbx" - "github.com/pocketbase/pocketbase/daos" - m "github.com/pocketbase/pocketbase/migrations" - "github.com/pocketbase/pocketbase/models/schema" -) - -func init() { - m.Register(func(db dbx.Builder) error { - dao := daos.New(db); - - collection, err := dao.FindCollectionByNameOrId("z3p974ainxjqlvs") - if err != nil { - return err - } - - // remove - collection.Schema.RemoveField("ghtlkn5j") - - return dao.SaveCollection(collection) - }, func(db dbx.Builder) error { - dao := daos.New(db); - - collection, err := dao.FindCollectionByNameOrId("z3p974ainxjqlvs") - if err != nil { - return err - } - - // add - del_lastDeployment := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "ghtlkn5j", - "name": "lastDeployment", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "0a1o4e6sstp694f", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - }`), del_lastDeployment); err != nil { - return err - } - collection.Schema.AddField(del_lastDeployment) - - return dao.SaveCollection(collection) - }) -} diff --git a/migrations/1734869180_deleted_domains.go b/migrations/1734869180_deleted_domains.go deleted file mode 100644 index af224651..00000000 --- a/migrations/1734869180_deleted_domains.go +++ /dev/null @@ -1,337 +0,0 @@ -package migrations - -import ( - "encoding/json" - - "github.com/pocketbase/dbx" - "github.com/pocketbase/pocketbase/daos" - m "github.com/pocketbase/pocketbase/migrations" - "github.com/pocketbase/pocketbase/models" -) - -func init() { - m.Register(func(db dbx.Builder) error { - dao := daos.New(db); - - collection, err := dao.FindCollectionByNameOrId("z3p974ainxjqlvs") - if err != nil { - return err - } - - return dao.DeleteCollection(collection) - }, func(db dbx.Builder) error { - jsonData := `{ - "id": "z3p974ainxjqlvs", - "created": "2024-07-29 10:02:48.334Z", - "updated": "2024-12-22 12:06:15.156Z", - "name": "domains", - "type": "base", - "system": false, - "schema": [ - { - "system": false, - "id": "iuaerpl2", - "name": "domain", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "ukkhuw85", - "name": "email", - "type": "email", - "required": false, - "presentable": false, - "unique": false, - "options": { - "exceptDomains": null, - "onlyDomains": null - } - }, - { - "system": false, - "id": "v98eebqq", - "name": "crontab", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "alc8e9ow", - "name": "access", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "4yzbv8urny5ja1e", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - }, - { - "system": false, - "id": "topsc9bj", - "name": "certUrl", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "vixgq072", - "name": "certStableUrl", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "g3a3sza5", - "name": "privateKey", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "gr6iouny", - "name": "certificate", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "tk6vnrmn", - "name": "issuerCertificate", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "sjo6ibse", - "name": "csr", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "x03n1bkj", - "name": "expiredAt", - "type": "date", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": "", - "max": "" - } - }, - { - "system": false, - "id": "srybpixz", - "name": "targetType", - "type": "select", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSelect": 1, - "values": [ - "aliyun-oss", - "aliyun-cdn", - "aliyun-dcdn", - "ssh", - "webhook", - "tencent-cdn", - "qiniu-cdn", - "local" - ] - } - }, - { - "system": false, - "id": "xy7yk0mb", - "name": "targetAccess", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "4yzbv8urny5ja1e", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - }, - { - "system": false, - "id": "6jqeyggw", - "name": "enabled", - "type": "bool", - "required": false, - "presentable": false, - "unique": false, - "options": {} - }, - { - "system": false, - "id": "hdsjcchf", - "name": "deployed", - "type": "bool", - "required": false, - "presentable": false, - "unique": false, - "options": {} - }, - { - "system": false, - "id": "aiya3rev", - "name": "rightnow", - "type": "bool", - "required": false, - "presentable": false, - "unique": false, - "options": {} - }, - { - "system": false, - "id": "ixznmhzc", - "name": "lastDeployedAt", - "type": "date", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": "", - "max": "" - } - }, - { - "system": false, - "id": "zfnyj9he", - "name": "variables", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "g65gfh7a", - "name": "nameservers", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "wwrzc3jo", - "name": "applyConfig", - "type": "json", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSize": 2000000 - } - }, - { - "system": false, - "id": "474iwy8r", - "name": "deployConfig", - "type": "json", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSize": 2000000 - } - } - ], - "indexes": [ - "CREATE UNIQUE INDEX ` + "`" + `idx_4ABO6EQ` + "`" + ` ON ` + "`" + `domains` + "`" + ` (` + "`" + `domain` + "`" + `)" - ], - "listRule": null, - "viewRule": null, - "createRule": null, - "updateRule": null, - "deleteRule": null, - "options": {} - }` - - collection := &models.Collection{} - if err := json.Unmarshal([]byte(jsonData), &collection); err != nil { - return err - } - - return daos.New(db).SaveCollection(collection) - }) -} diff --git a/migrations/1734869185_deleted_deployments.go b/migrations/1734869185_deleted_deployments.go deleted file mode 100644 index 5b7ab42a..00000000 --- a/migrations/1734869185_deleted_deployments.go +++ /dev/null @@ -1,110 +0,0 @@ -package migrations - -import ( - "encoding/json" - - "github.com/pocketbase/dbx" - "github.com/pocketbase/pocketbase/daos" - m "github.com/pocketbase/pocketbase/migrations" - "github.com/pocketbase/pocketbase/models" -) - -func init() { - m.Register(func(db dbx.Builder) error { - dao := daos.New(db); - - collection, err := dao.FindCollectionByNameOrId("0a1o4e6sstp694f") - if err != nil { - return err - } - - return dao.DeleteCollection(collection) - }, func(db dbx.Builder) error { - jsonData := `{ - "id": "0a1o4e6sstp694f", - "created": "2024-07-30 06:30:27.801Z", - "updated": "2024-12-22 12:05:46.060Z", - "name": "deployments", - "type": "base", - "system": false, - "schema": [ - { - "system": false, - "id": "jx5f69i3", - "name": "log", - "type": "json", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSize": 2000000 - } - }, - { - "system": false, - "id": "qbxdtg9q", - "name": "phase", - "type": "select", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSelect": 1, - "values": [ - "check", - "apply", - "deploy" - ] - } - }, - { - "system": false, - "id": "rglrp1hz", - "name": "phaseSuccess", - "type": "bool", - "required": false, - "presentable": false, - "unique": false, - "options": {} - }, - { - "system": false, - "id": "lt1g1blu", - "name": "deployedAt", - "type": "date", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": "", - "max": "" - } - }, - { - "system": false, - "id": "wledpzgb", - "name": "wholeSuccess", - "type": "bool", - "required": false, - "presentable": false, - "unique": false, - "options": {} - } - ], - "indexes": [], - "listRule": null, - "viewRule": null, - "createRule": null, - "updateRule": null, - "deleteRule": null, - "options": {} - }` - - collection := &models.Collection{} - if err := json.Unmarshal([]byte(jsonData), &collection); err != nil { - return err - } - - return daos.New(db).SaveCollection(collection) - }) -} diff --git a/migrations/1734869190_deleted_access_groups.go b/migrations/1734869190_deleted_access_groups.go deleted file mode 100644 index 6e423d88..00000000 --- a/migrations/1734869190_deleted_access_groups.go +++ /dev/null @@ -1,80 +0,0 @@ -package migrations - -import ( - "encoding/json" - - "github.com/pocketbase/dbx" - "github.com/pocketbase/pocketbase/daos" - m "github.com/pocketbase/pocketbase/migrations" - "github.com/pocketbase/pocketbase/models" -) - -func init() { - m.Register(func(db dbx.Builder) error { - dao := daos.New(db); - - collection, err := dao.FindCollectionByNameOrId("teolp9pl72dxlxq") - if err != nil { - return err - } - - return dao.DeleteCollection(collection) - }, func(db dbx.Builder) error { - jsonData := `{ - "id": "teolp9pl72dxlxq", - "created": "2024-09-13 12:51:05.611Z", - "updated": "2024-11-25 07:41:10.235Z", - "name": "access_groups", - "type": "base", - "system": false, - "schema": [ - { - "system": false, - "id": "7sajiv6i", - "name": "name", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }, - { - "system": false, - "id": "xp8admif", - "name": "access", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "4yzbv8urny5ja1e", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": null, - "displayFields": null - } - } - ], - "indexes": [ - "CREATE UNIQUE INDEX ` + "`" + `idx_RgRXp0R` + "`" + ` ON ` + "`" + `access_groups` + "`" + ` (` + "`" + `name` + "`" + `)" - ], - "listRule": null, - "viewRule": null, - "createRule": null, - "updateRule": null, - "deleteRule": null, - "options": {} - }` - - collection := &models.Collection{} - if err := json.Unmarshal([]byte(jsonData), &collection); err != nil { - return err - } - - return daos.New(db).SaveCollection(collection) - }) -} diff --git a/migrations/1735032595_add_namedotcom.go b/migrations/1735032595_add_namedotcom.go deleted file mode 100644 index b464a93c..00000000 --- a/migrations/1735032595_add_namedotcom.go +++ /dev/null @@ -1,109 +0,0 @@ -package migrations - -import ( - "encoding/json" - - "github.com/pocketbase/dbx" - "github.com/pocketbase/pocketbase/daos" - m "github.com/pocketbase/pocketbase/migrations" - "github.com/pocketbase/pocketbase/models/schema" -) - -func init() { - m.Register(func(db dbx.Builder) error { - dao := daos.New(db) - - collection, err := dao.FindCollectionByNameOrId("4yzbv8urny5ja1e") - if err != nil { - return err - } - - // update - edit_configType := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "hwy7m03o", - "name": "configType", - "type": "select", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSelect": 1, - "values": [ - "aliyun", - "tencent", - "huaweicloud", - "qiniu", - "aws", - "cloudflare", - "namesilo", - "godaddy", - "pdns", - "httpreq", - "local", - "ssh", - "webhook", - "k8s", - "baiducloud", - "dogecloud", - "volcengine", - "byteplus", - "namedotcom" - ] - } - }`), edit_configType); err != nil { - return err - } - collection.Schema.AddField(edit_configType) - - return dao.SaveCollection(collection) - }, func(db dbx.Builder) error { - dao := daos.New(db) - - collection, err := dao.FindCollectionByNameOrId("4yzbv8urny5ja1e") - if err != nil { - return err - } - - // update - edit_configType := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "hwy7m03o", - "name": "configType", - "type": "select", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSelect": 1, - "values": [ - "aliyun", - "tencent", - "huaweicloud", - "qiniu", - "aws", - "cloudflare", - "namesilo", - "godaddy", - "pdns", - "httpreq", - "local", - "ssh", - "webhook", - "k8s", - "baiducloud", - "dogecloud", - "volcengine", - "byteplus" - ] - } - }`), edit_configType); err != nil { - return err - } - collection.Schema.AddField(edit_configType) - - return dao.SaveCollection(collection) - }) -} diff --git a/migrations/1735151867_updated_access.go b/migrations/1735151867_updated_access.go deleted file mode 100644 index 4dfdef1a..00000000 --- a/migrations/1735151867_updated_access.go +++ /dev/null @@ -1,110 +0,0 @@ -package migrations - -import ( - "encoding/json" - - "github.com/pocketbase/dbx" - "github.com/pocketbase/pocketbase/daos" - m "github.com/pocketbase/pocketbase/migrations" - "github.com/pocketbase/pocketbase/models/schema" -) - -func init() { - m.Register(func(db dbx.Builder) error { - dao := daos.New(db); - - collection, err := dao.FindCollectionByNameOrId("4yzbv8urny5ja1e") - if err != nil { - return err - } - - // update - edit_configType := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "hwy7m03o", - "name": "configType", - "type": "select", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSelect": 1, - "values": [ - "acmehttpreq", - "aliyun", - "aws", - "baiducloud", - "byteplus", - "cloudflare", - "dogecloud", - "godaddy", - "huaweicloud", - "k8s", - "local", - "namedotcom", - "namesilo", - "powerdns", - "qiniu", - "ssh", - "tencentcloud", - "volcengine", - "webhook" - ] - } - }`), edit_configType); err != nil { - return err - } - collection.Schema.AddField(edit_configType) - - return dao.SaveCollection(collection) - }, func(db dbx.Builder) error { - dao := daos.New(db); - - collection, err := dao.FindCollectionByNameOrId("4yzbv8urny5ja1e") - if err != nil { - return err - } - - // update - edit_configType := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "hwy7m03o", - "name": "configType", - "type": "select", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSelect": 1, - "values": [ - "aliyun", - "tencent", - "huaweicloud", - "qiniu", - "aws", - "cloudflare", - "namesilo", - "godaddy", - "pdns", - "httpreq", - "local", - "ssh", - "webhook", - "k8s", - "baiducloud", - "dogecloud", - "volcengine", - "byteplus", - "namedotcom" - ] - } - }`), edit_configType); err != nil { - return err - } - collection.Schema.AddField(edit_configType) - - return dao.SaveCollection(collection) - }) -} diff --git a/migrations/1735913237_updated_access.go b/migrations/1735913237_updated_access.go deleted file mode 100644 index 047028cb..00000000 --- a/migrations/1735913237_updated_access.go +++ /dev/null @@ -1,110 +0,0 @@ -package migrations - -import ( - "encoding/json" - - "github.com/pocketbase/dbx" - "github.com/pocketbase/pocketbase/daos" - m "github.com/pocketbase/pocketbase/migrations" - "github.com/pocketbase/pocketbase/models/schema" -) - -func init() { - m.Register(func(db dbx.Builder) error { - dao := daos.New(db); - - collection, err := dao.FindCollectionByNameOrId("4yzbv8urny5ja1e") - if err != nil { - return err - } - - // update - edit_provider := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "hwy7m03o", - "name": "provider", - "type": "select", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSelect": 1, - "values": [ - "acmehttpreq", - "aliyun", - "aws", - "baiducloud", - "byteplus", - "cloudflare", - "dogecloud", - "godaddy", - "huaweicloud", - "k8s", - "local", - "namedotcom", - "namesilo", - "powerdns", - "qiniu", - "ssh", - "tencentcloud", - "volcengine", - "webhook" - ] - } - }`), edit_provider); err != nil { - return err - } - collection.Schema.AddField(edit_provider) - - return dao.SaveCollection(collection) - }, func(db dbx.Builder) error { - dao := daos.New(db); - - collection, err := dao.FindCollectionByNameOrId("4yzbv8urny5ja1e") - if err != nil { - return err - } - - // update - edit_provider := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "hwy7m03o", - "name": "configType", - "type": "select", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSelect": 1, - "values": [ - "acmehttpreq", - "aliyun", - "aws", - "baiducloud", - "byteplus", - "cloudflare", - "dogecloud", - "godaddy", - "huaweicloud", - "k8s", - "local", - "namedotcom", - "namesilo", - "powerdns", - "qiniu", - "ssh", - "tencentcloud", - "volcengine", - "webhook" - ] - } - }`), edit_provider); err != nil { - return err - } - collection.Schema.AddField(edit_provider) - - return dao.SaveCollection(collection) - }) -} diff --git a/migrations/1735966817_updated_workflow.go b/migrations/1735966817_updated_workflow.go deleted file mode 100644 index 6d714a0b..00000000 --- a/migrations/1735966817_updated_workflow.go +++ /dev/null @@ -1,116 +0,0 @@ -package migrations - -import ( - "encoding/json" - - "github.com/pocketbase/dbx" - "github.com/pocketbase/pocketbase/daos" - m "github.com/pocketbase/pocketbase/migrations" - "github.com/pocketbase/pocketbase/models/schema" -) - -func init() { - m.Register(func(db dbx.Builder) error { - dao := daos.New(db); - - collection, err := dao.FindCollectionByNameOrId("tovyif5ax6j62ur") - if err != nil { - return err - } - - // update - edit_trigger := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "vqoajwjq", - "name": "trigger", - "type": "select", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSelect": 1, - "values": [ - "auto", - "manual" - ] - } - }`), edit_trigger); err != nil { - return err - } - collection.Schema.AddField(edit_trigger) - - // update - edit_triggerCron := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "8ho247wh", - "name": "triggerCron", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }`), edit_triggerCron); err != nil { - return err - } - collection.Schema.AddField(edit_triggerCron) - - return dao.SaveCollection(collection) - }, func(db dbx.Builder) error { - dao := daos.New(db); - - collection, err := dao.FindCollectionByNameOrId("tovyif5ax6j62ur") - if err != nil { - return err - } - - // update - edit_trigger := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "vqoajwjq", - "name": "type", - "type": "select", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSelect": 1, - "values": [ - "auto", - "manual" - ] - } - }`), edit_trigger); err != nil { - return err - } - collection.Schema.AddField(edit_trigger) - - // update - edit_triggerCron := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "8ho247wh", - "name": "crontab", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }`), edit_triggerCron); err != nil { - return err - } - collection.Schema.AddField(edit_triggerCron) - - return dao.SaveCollection(collection) - }) -} diff --git a/migrations/1735976342_updated_certificate.go b/migrations/1735976342_updated_certificate.go deleted file mode 100644 index 2537f86c..00000000 --- a/migrations/1735976342_updated_certificate.go +++ /dev/null @@ -1,298 +0,0 @@ -package migrations - -import ( - "encoding/json" - - "github.com/pocketbase/dbx" - "github.com/pocketbase/pocketbase/daos" - m "github.com/pocketbase/pocketbase/migrations" - "github.com/pocketbase/pocketbase/models/schema" -) - -func init() { - m.Register(func(db dbx.Builder) error { - dao := daos.New(db); - - collection, err := dao.FindCollectionByNameOrId("4szxr9x43tpj6np") - if err != nil { - return err - } - - // add - new_effectAt := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "v40aqzpd", - "name": "effectAt", - "type": "date", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": "", - "max": "" - } - }`), new_effectAt); err != nil { - return err - } - collection.Schema.AddField(new_effectAt) - - // update - edit_subjectAltNames := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "fugxf58p", - "name": "subjectAltNames", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }`), edit_subjectAltNames); err != nil { - return err - } - collection.Schema.AddField(edit_subjectAltNames) - - // update - edit_acmeCertUrl := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "ayyjy5ve", - "name": "acmeCertUrl", - "type": "url", - "required": false, - "presentable": false, - "unique": false, - "options": { - "exceptDomains": null, - "onlyDomains": null - } - }`), edit_acmeCertUrl); err != nil { - return err - } - collection.Schema.AddField(edit_acmeCertUrl) - - // update - edit_acmeCertStableUrl := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "3x5heo8e", - "name": "acmeCertStableUrl", - "type": "url", - "required": false, - "presentable": false, - "unique": false, - "options": { - "exceptDomains": null, - "onlyDomains": null - } - }`), edit_acmeCertStableUrl); err != nil { - return err - } - collection.Schema.AddField(edit_acmeCertStableUrl) - - // update - edit_workflowId := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "uvqfamb1", - "name": "workflowId", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "tovyif5ax6j62ur", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - }`), edit_workflowId); err != nil { - return err - } - collection.Schema.AddField(edit_workflowId) - - // update - edit_workflowNodeId := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "uqldzldw", - "name": "workflowNodeId", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }`), edit_workflowNodeId); err != nil { - return err - } - collection.Schema.AddField(edit_workflowNodeId) - - // update - edit_workflowOutputId := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "2ohlr0yd", - "name": "workflowOutputId", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "bqnxb95f2cooowp", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - }`), edit_workflowOutputId); err != nil { - return err - } - collection.Schema.AddField(edit_workflowOutputId) - - return dao.SaveCollection(collection) - }, func(db dbx.Builder) error { - dao := daos.New(db); - - collection, err := dao.FindCollectionByNameOrId("4szxr9x43tpj6np") - if err != nil { - return err - } - - // remove - collection.Schema.RemoveField("v40aqzpd") - - // update - edit_subjectAltNames := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "fugxf58p", - "name": "san", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }`), edit_subjectAltNames); err != nil { - return err - } - collection.Schema.AddField(edit_subjectAltNames) - - // update - edit_acmeCertUrl := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "ayyjy5ve", - "name": "certUrl", - "type": "url", - "required": false, - "presentable": false, - "unique": false, - "options": { - "exceptDomains": null, - "onlyDomains": null - } - }`), edit_acmeCertUrl); err != nil { - return err - } - collection.Schema.AddField(edit_acmeCertUrl) - - // update - edit_acmeCertStableUrl := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "3x5heo8e", - "name": "certStableUrl", - "type": "url", - "required": false, - "presentable": false, - "unique": false, - "options": { - "exceptDomains": null, - "onlyDomains": null - } - }`), edit_acmeCertStableUrl); err != nil { - return err - } - collection.Schema.AddField(edit_acmeCertStableUrl) - - // update - edit_workflowId := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "uvqfamb1", - "name": "workflow", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "tovyif5ax6j62ur", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - }`), edit_workflowId); err != nil { - return err - } - collection.Schema.AddField(edit_workflowId) - - // update - edit_workflowNodeId := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "uqldzldw", - "name": "nodeId", - "type": "text", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": null, - "max": null, - "pattern": "" - } - }`), edit_workflowNodeId); err != nil { - return err - } - collection.Schema.AddField(edit_workflowNodeId) - - // update - edit_workflowOutputId := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "2ohlr0yd", - "name": "output", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "bqnxb95f2cooowp", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - }`), edit_workflowOutputId); err != nil { - return err - } - collection.Schema.AddField(edit_workflowOutputId) - - return dao.SaveCollection(collection) - }) -} diff --git a/migrations/1735977005_updated_workflow_output.go b/migrations/1735977005_updated_workflow_output.go deleted file mode 100644 index 26795e2e..00000000 --- a/migrations/1735977005_updated_workflow_output.go +++ /dev/null @@ -1,144 +0,0 @@ -package migrations - -import ( - "encoding/json" - - "github.com/pocketbase/dbx" - "github.com/pocketbase/pocketbase/daos" - m "github.com/pocketbase/pocketbase/migrations" - "github.com/pocketbase/pocketbase/models/schema" -) - -func init() { - m.Register(func(db dbx.Builder) error { - dao := daos.New(db); - - collection, err := dao.FindCollectionByNameOrId("bqnxb95f2cooowp") - if err != nil { - return err - } - - // update - edit_workflowId := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "jka88auc", - "name": "workflowId", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "tovyif5ax6j62ur", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - }`), edit_workflowId); err != nil { - return err - } - collection.Schema.AddField(edit_workflowId) - - // update - edit_outputs := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "he4cceqb", - "name": "outputs", - "type": "json", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSize": 2000000 - } - }`), edit_outputs); err != nil { - return err - } - collection.Schema.AddField(edit_outputs) - - // update - edit_succeeded := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "2yfxbxuf", - "name": "succeeded", - "type": "bool", - "required": false, - "presentable": false, - "unique": false, - "options": {} - }`), edit_succeeded); err != nil { - return err - } - collection.Schema.AddField(edit_succeeded) - - return dao.SaveCollection(collection) - }, func(db dbx.Builder) error { - dao := daos.New(db); - - collection, err := dao.FindCollectionByNameOrId("bqnxb95f2cooowp") - if err != nil { - return err - } - - // update - edit_workflowId := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "jka88auc", - "name": "workflow", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "tovyif5ax6j62ur", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - }`), edit_workflowId); err != nil { - return err - } - collection.Schema.AddField(edit_workflowId) - - // update - edit_outputs := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "he4cceqb", - "name": "output", - "type": "json", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSize": 2000000 - } - }`), edit_outputs); err != nil { - return err - } - collection.Schema.AddField(edit_outputs) - - // update - edit_succeeded := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "2yfxbxuf", - "name": "succeed", - "type": "bool", - "required": false, - "presentable": false, - "unique": false, - "options": {} - }`), edit_succeeded); err != nil { - return err - } - collection.Schema.AddField(edit_succeeded) - - return dao.SaveCollection(collection) - }) -} diff --git a/migrations/1735977021_updated_workflow_run_log.go b/migrations/1735977021_updated_workflow_run_log.go deleted file mode 100644 index 1cafab81..00000000 --- a/migrations/1735977021_updated_workflow_run_log.go +++ /dev/null @@ -1,144 +0,0 @@ -package migrations - -import ( - "encoding/json" - - "github.com/pocketbase/dbx" - "github.com/pocketbase/pocketbase/daos" - m "github.com/pocketbase/pocketbase/migrations" - "github.com/pocketbase/pocketbase/models/schema" -) - -func init() { - m.Register(func(db dbx.Builder) error { - dao := daos.New(db); - - collection, err := dao.FindCollectionByNameOrId("qjp8lygssgwyqyz") - if err != nil { - return err - } - - // update - edit_workflowId := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "m8xfsyyy", - "name": "workflowId", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "tovyif5ax6j62ur", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - }`), edit_workflowId); err != nil { - return err - } - collection.Schema.AddField(edit_workflowId) - - // update - edit_logs := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "2m9byaa9", - "name": "logs", - "type": "json", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSize": 2000000 - } - }`), edit_logs); err != nil { - return err - } - collection.Schema.AddField(edit_logs) - - // update - edit_succeeded := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "cht6kqw9", - "name": "succeeded", - "type": "bool", - "required": false, - "presentable": false, - "unique": false, - "options": {} - }`), edit_succeeded); err != nil { - return err - } - collection.Schema.AddField(edit_succeeded) - - return dao.SaveCollection(collection) - }, func(db dbx.Builder) error { - dao := daos.New(db); - - collection, err := dao.FindCollectionByNameOrId("qjp8lygssgwyqyz") - if err != nil { - return err - } - - // update - edit_workflowId := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "m8xfsyyy", - "name": "workflow", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "tovyif5ax6j62ur", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - }`), edit_workflowId); err != nil { - return err - } - collection.Schema.AddField(edit_workflowId) - - // update - edit_logs := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "2m9byaa9", - "name": "log", - "type": "json", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSize": 2000000 - } - }`), edit_logs); err != nil { - return err - } - collection.Schema.AddField(edit_logs) - - // update - edit_succeeded := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "cht6kqw9", - "name": "succeed", - "type": "bool", - "required": false, - "presentable": false, - "unique": false, - "options": {} - }`), edit_succeeded); err != nil { - return err - } - collection.Schema.AddField(edit_succeeded) - - return dao.SaveCollection(collection) - }) -} diff --git a/migrations/1735977530_updated_certificate.go b/migrations/1735977530_updated_certificate.go deleted file mode 100644 index 8812c593..00000000 --- a/migrations/1735977530_updated_certificate.go +++ /dev/null @@ -1,57 +0,0 @@ -package migrations - -import ( - "encoding/json" - - "github.com/pocketbase/dbx" - "github.com/pocketbase/pocketbase/daos" - m "github.com/pocketbase/pocketbase/migrations" - "github.com/pocketbase/pocketbase/models/schema" -) - -func init() { - m.Register(func(db dbx.Builder) error { - dao := daos.New(db); - - collection, err := dao.FindCollectionByNameOrId("4szxr9x43tpj6np") - if err != nil { - return err - } - - // add - new_source := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "by9hetqi", - "name": "source", - "type": "select", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSelect": 1, - "values": [ - "workflow", - "upload" - ] - } - }`), new_source); err != nil { - return err - } - collection.Schema.AddField(new_source) - - return dao.SaveCollection(collection) - }, func(db dbx.Builder) error { - dao := daos.New(db); - - collection, err := dao.FindCollectionByNameOrId("4szxr9x43tpj6np") - if err != nil { - return err - } - - // remove - collection.Schema.RemoveField("by9hetqi") - - return dao.SaveCollection(collection) - }) -} diff --git a/migrations/1735980691_updated_workflow_run_log.go b/migrations/1735980691_updated_workflow_run_log.go deleted file mode 100644 index 03117dc8..00000000 --- a/migrations/1735980691_updated_workflow_run_log.go +++ /dev/null @@ -1,105 +0,0 @@ -package migrations - -import ( - "encoding/json" - - "github.com/pocketbase/dbx" - "github.com/pocketbase/pocketbase/daos" - m "github.com/pocketbase/pocketbase/migrations" - "github.com/pocketbase/pocketbase/models/schema" -) - -func init() { - m.Register(func(db dbx.Builder) error { - dao := daos.New(db); - - collection, err := dao.FindCollectionByNameOrId("qjp8lygssgwyqyz") - if err != nil { - return err - } - - collection.Name = "workflow_run" - - // add - new_trigger := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "jlroa3fk", - "name": "trigger", - "type": "select", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSelect": 1, - "values": [ - "auto", - "manual" - ] - } - }`), new_trigger); err != nil { - return err - } - collection.Schema.AddField(new_trigger) - - // add - new_startedAt := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "k9xvtf89", - "name": "startedAt", - "type": "date", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": "", - "max": "" - } - }`), new_startedAt); err != nil { - return err - } - collection.Schema.AddField(new_startedAt) - - // add - new_endedAt := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "3ikum7mk", - "name": "endedAt", - "type": "date", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": "", - "max": "" - } - }`), new_endedAt); err != nil { - return err - } - collection.Schema.AddField(new_endedAt) - - return dao.SaveCollection(collection) - }, func(db dbx.Builder) error { - dao := daos.New(db); - - collection, err := dao.FindCollectionByNameOrId("qjp8lygssgwyqyz") - if err != nil { - return err - } - - collection.Name = "workflow_run_log" - - // remove - collection.Schema.RemoveField("jlroa3fk") - - // remove - collection.Schema.RemoveField("k9xvtf89") - - // remove - collection.Schema.RemoveField("3ikum7mk") - - return dao.SaveCollection(collection) - }) -} diff --git a/migrations/1735981441_updated_workflow.go b/migrations/1735981441_updated_workflow.go deleted file mode 100644 index 051945f2..00000000 --- a/migrations/1735981441_updated_workflow.go +++ /dev/null @@ -1,106 +0,0 @@ -package migrations - -import ( - "encoding/json" - - "github.com/pocketbase/dbx" - "github.com/pocketbase/pocketbase/daos" - m "github.com/pocketbase/pocketbase/migrations" - "github.com/pocketbase/pocketbase/models/schema" -) - -func init() { - m.Register(func(db dbx.Builder) error { - dao := daos.New(db); - - collection, err := dao.FindCollectionByNameOrId("tovyif5ax6j62ur") - if err != nil { - return err - } - - // add - new_lastRunId := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "a23wkj9x", - "name": "lastRunId", - "type": "relation", - "required": false, - "presentable": false, - "unique": false, - "options": { - "collectionId": "qjp8lygssgwyqyz", - "cascadeDelete": false, - "minSelect": null, - "maxSelect": 1, - "displayFields": null - } - }`), new_lastRunId); err != nil { - return err - } - collection.Schema.AddField(new_lastRunId) - - // add - new_lastRunStatus := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "zivdxh23", - "name": "lastRunStatus", - "type": "select", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSelect": 1, - "values": [ - "pending", - "running", - "succeeded", - "failed" - ] - } - }`), new_lastRunStatus); err != nil { - return err - } - collection.Schema.AddField(new_lastRunStatus) - - // add - new_lastRunTime := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "u9bosu36", - "name": "lastRunTime", - "type": "date", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": "", - "max": "" - } - }`), new_lastRunTime); err != nil { - return err - } - collection.Schema.AddField(new_lastRunTime) - - return dao.SaveCollection(collection) - }, func(db dbx.Builder) error { - dao := daos.New(db); - - collection, err := dao.FindCollectionByNameOrId("tovyif5ax6j62ur") - if err != nil { - return err - } - - // remove - collection.Schema.RemoveField("a23wkj9x") - - // remove - collection.Schema.RemoveField("zivdxh23") - - // remove - collection.Schema.RemoveField("u9bosu36") - - return dao.SaveCollection(collection) - }) -} diff --git a/migrations/1735981515_updated_workflow_run.go b/migrations/1735981515_updated_workflow_run.go deleted file mode 100644 index c649cd04..00000000 --- a/migrations/1735981515_updated_workflow_run.go +++ /dev/null @@ -1,78 +0,0 @@ -package migrations - -import ( - "encoding/json" - - "github.com/pocketbase/dbx" - "github.com/pocketbase/pocketbase/daos" - m "github.com/pocketbase/pocketbase/migrations" - "github.com/pocketbase/pocketbase/models/schema" -) - -func init() { - m.Register(func(db dbx.Builder) error { - dao := daos.New(db); - - collection, err := dao.FindCollectionByNameOrId("qjp8lygssgwyqyz") - if err != nil { - return err - } - - // remove - collection.Schema.RemoveField("cht6kqw9") - - // add - new_status := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "qldmh0tw", - "name": "status", - "type": "select", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSelect": 1, - "values": [ - "pending", - "running", - "succeeded", - "failed" - ] - } - }`), new_status); err != nil { - return err - } - collection.Schema.AddField(new_status) - - return dao.SaveCollection(collection) - }, func(db dbx.Builder) error { - dao := daos.New(db); - - collection, err := dao.FindCollectionByNameOrId("qjp8lygssgwyqyz") - if err != nil { - return err - } - - // add - del_succeeded := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "cht6kqw9", - "name": "succeeded", - "type": "bool", - "required": false, - "presentable": false, - "unique": false, - "options": {} - }`), del_succeeded); err != nil { - return err - } - collection.Schema.AddField(del_succeeded) - - // remove - collection.Schema.RemoveField("qldmh0tw") - - return dao.SaveCollection(collection) - }) -} diff --git a/migrations/1736685828_updated_access.go b/migrations/1736685828_updated_access.go deleted file mode 100644 index dc0fe496..00000000 --- a/migrations/1736685828_updated_access.go +++ /dev/null @@ -1,111 +0,0 @@ -package migrations - -import ( - "encoding/json" - - "github.com/pocketbase/dbx" - "github.com/pocketbase/pocketbase/daos" - m "github.com/pocketbase/pocketbase/migrations" - "github.com/pocketbase/pocketbase/models/schema" -) - -func init() { - m.Register(func(db dbx.Builder) error { - dao := daos.New(db); - - collection, err := dao.FindCollectionByNameOrId("4yzbv8urny5ja1e") - if err != nil { - return err - } - - // update - edit_provider := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "hwy7m03o", - "name": "provider", - "type": "select", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSelect": 1, - "values": [ - "acmehttpreq", - "aliyun", - "aws", - "azure", - "baiducloud", - "byteplus", - "cloudflare", - "dogecloud", - "godaddy", - "huaweicloud", - "k8s", - "local", - "namedotcom", - "namesilo", - "powerdns", - "qiniu", - "ssh", - "tencentcloud", - "volcengine", - "webhook" - ] - } - }`), edit_provider); err != nil { - return err - } - collection.Schema.AddField(edit_provider) - - return dao.SaveCollection(collection) - }, func(db dbx.Builder) error { - dao := daos.New(db); - - collection, err := dao.FindCollectionByNameOrId("4yzbv8urny5ja1e") - if err != nil { - return err - } - - // update - edit_provider := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "hwy7m03o", - "name": "provider", - "type": "select", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSelect": 1, - "values": [ - "acmehttpreq", - "aliyun", - "aws", - "baiducloud", - "byteplus", - "cloudflare", - "dogecloud", - "godaddy", - "huaweicloud", - "k8s", - "local", - "namedotcom", - "namesilo", - "powerdns", - "qiniu", - "ssh", - "tencentcloud", - "volcengine", - "webhook" - ] - } - }`), edit_provider); err != nil { - return err - } - collection.Schema.AddField(edit_provider) - - return dao.SaveCollection(collection) - }) -} diff --git a/migrations/1736861196_updated_access.go b/migrations/1736861196_updated_access.go deleted file mode 100644 index 8d6023bc..00000000 --- a/migrations/1736861196_updated_access.go +++ /dev/null @@ -1,113 +0,0 @@ -package migrations - -import ( - "encoding/json" - - "github.com/pocketbase/dbx" - "github.com/pocketbase/pocketbase/daos" - m "github.com/pocketbase/pocketbase/migrations" - "github.com/pocketbase/pocketbase/models/schema" -) - -func init() { - m.Register(func(db dbx.Builder) error { - dao := daos.New(db); - - collection, err := dao.FindCollectionByNameOrId("4yzbv8urny5ja1e") - if err != nil { - return err - } - - // update - edit_provider := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "hwy7m03o", - "name": "provider", - "type": "select", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSelect": 1, - "values": [ - "acmehttpreq", - "aliyun", - "aws", - "azure", - "baiducloud", - "byteplus", - "cloudflare", - "dogecloud", - "godaddy", - "huaweicloud", - "k8s", - "local", - "namedotcom", - "namesilo", - "powerdns", - "qiniu", - "ssh", - "tencentcloud", - "ucloud", - "volcengine", - "webhook" - ] - } - }`), edit_provider); err != nil { - return err - } - collection.Schema.AddField(edit_provider) - - return dao.SaveCollection(collection) - }, func(db dbx.Builder) error { - dao := daos.New(db); - - collection, err := dao.FindCollectionByNameOrId("4yzbv8urny5ja1e") - if err != nil { - return err - } - - // update - edit_provider := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "hwy7m03o", - "name": "provider", - "type": "select", - "required": false, - "presentable": false, - "unique": false, - "options": { - "maxSelect": 1, - "values": [ - "acmehttpreq", - "aliyun", - "aws", - "azure", - "baiducloud", - "byteplus", - "cloudflare", - "dogecloud", - "godaddy", - "huaweicloud", - "k8s", - "local", - "namedotcom", - "namesilo", - "powerdns", - "qiniu", - "ssh", - "tencentcloud", - "volcengine", - "webhook" - ] - } - }`), edit_provider); err != nil { - return err - } - collection.Schema.AddField(edit_provider) - - return dao.SaveCollection(collection) - }) -} diff --git a/migrations/1737019549_updated_certificate.go b/migrations/1737019549_updated_certificate.go deleted file mode 100644 index cef2a645..00000000 --- a/migrations/1737019549_updated_certificate.go +++ /dev/null @@ -1,54 +0,0 @@ -package migrations - -import ( - "encoding/json" - - "github.com/pocketbase/dbx" - "github.com/pocketbase/pocketbase/daos" - m "github.com/pocketbase/pocketbase/migrations" - "github.com/pocketbase/pocketbase/models/schema" -) - -func init() { - m.Register(func(db dbx.Builder) error { - dao := daos.New(db); - - collection, err := dao.FindCollectionByNameOrId("4szxr9x43tpj6np") - if err != nil { - return err - } - - // add - new_deleted := &schema.SchemaField{} - if err := json.Unmarshal([]byte(`{ - "system": false, - "id": "klyf4nlq", - "name": "deleted", - "type": "date", - "required": false, - "presentable": false, - "unique": false, - "options": { - "min": "", - "max": "" - } - }`), new_deleted); err != nil { - return err - } - collection.Schema.AddField(new_deleted) - - return dao.SaveCollection(collection) - }, func(db dbx.Builder) error { - dao := daos.New(db); - - collection, err := dao.FindCollectionByNameOrId("4szxr9x43tpj6np") - if err != nil { - return err - } - - // remove - collection.Schema.RemoveField("klyf4nlq") - - return dao.SaveCollection(collection) - }) -} diff --git a/migrations/1737141501_collections_snapshot.go b/migrations/1737141501_collections_snapshot.go new file mode 100644 index 00000000..1a933d41 --- /dev/null +++ b/migrations/1737141501_collections_snapshot.go @@ -0,0 +1,1525 @@ +package migrations + +import ( + "github.com/pocketbase/pocketbase/core" + m "github.com/pocketbase/pocketbase/migrations" +) + +func init() { + m.Register(func(app core.App) error { + jsonData := `[ + { + "createRule": null, + "deleteRule": null, + "fields": [ + { + "autogeneratePattern": "[a-z0-9]{15}", + "hidden": false, + "id": "text3208210256", + "max": 15, + "min": 15, + "name": "id", + "pattern": "^[a-z0-9]+$", + "presentable": false, + "primaryKey": true, + "required": true, + "system": true, + "type": "text" + }, + { + "autogeneratePattern": "", + "hidden": false, + "id": "geeur58v", + "max": 0, + "min": 0, + "name": "name", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": false, + "system": false, + "type": "text" + }, + { + "hidden": false, + "id": "hwy7m03o", + "maxSelect": 1, + "name": "provider", + "presentable": false, + "required": false, + "system": false, + "type": "select", + "values": [ + "acmehttpreq", + "aliyun", + "aws", + "azure", + "baiducloud", + "byteplus", + "cloudflare", + "dogecloud", + "godaddy", + "huaweicloud", + "k8s", + "local", + "namedotcom", + "namesilo", + "powerdns", + "qiniu", + "ssh", + "tencentcloud", + "ucloud", + "volcengine", + "webhook" + ] + }, + { + "hidden": false, + "id": "iql7jpwx", + "maxSize": 2000000, + "name": "config", + "presentable": false, + "required": false, + "system": false, + "type": "json" + }, + { + "hidden": false, + "id": "hsxcnlvd", + "maxSelect": 1, + "name": "usage", + "presentable": false, + "required": false, + "system": false, + "type": "select", + "values": [ + "apply", + "deploy", + "all" + ] + }, + { + "hidden": false, + "id": "lr33hiwg", + "max": "", + "min": "", + "name": "deleted", + "presentable": false, + "required": false, + "system": false, + "type": "date" + }, + { + "hidden": false, + "id": "autodate2990389176", + "name": "created", + "onCreate": true, + "onUpdate": false, + "presentable": false, + "system": false, + "type": "autodate" + }, + { + "hidden": false, + "id": "autodate3332085495", + "name": "updated", + "onCreate": true, + "onUpdate": true, + "presentable": false, + "system": false, + "type": "autodate" + } + ], + "id": "4yzbv8urny5ja1e", + "indexes": [ + "CREATE INDEX ` + "`" + `idx_wkoST0j` + "`" + ` ON ` + "`" + `access` + "`" + ` (` + "`" + `name` + "`" + `)" + ], + "listRule": null, + "name": "access", + "system": false, + "type": "base", + "updateRule": null, + "viewRule": null + }, + { + "createRule": null, + "deleteRule": null, + "fields": [ + { + "autogeneratePattern": "[a-z0-9]{15}", + "hidden": false, + "id": "text3208210256", + "max": 15, + "min": 15, + "name": "id", + "pattern": "^[a-z0-9]+$", + "presentable": false, + "primaryKey": true, + "required": true, + "system": true, + "type": "text" + }, + { + "autogeneratePattern": "", + "hidden": false, + "id": "1tcmdsdf", + "max": 0, + "min": 0, + "name": "name", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": false, + "system": false, + "type": "text" + }, + { + "hidden": false, + "id": "f9wyhypi", + "maxSize": 2000000, + "name": "content", + "presentable": false, + "required": false, + "system": false, + "type": "json" + }, + { + "hidden": false, + "id": "autodate2990389176", + "name": "created", + "onCreate": true, + "onUpdate": false, + "presentable": false, + "system": false, + "type": "autodate" + }, + { + "hidden": false, + "id": "autodate3332085495", + "name": "updated", + "onCreate": true, + "onUpdate": true, + "presentable": false, + "system": false, + "type": "autodate" + } + ], + "id": "dy6ccjb60spfy6p", + "indexes": [ + "CREATE UNIQUE INDEX ` + "`" + `idx_RO7X9Vw` + "`" + ` ON ` + "`" + `settings` + "`" + ` (` + "`" + `name` + "`" + `)" + ], + "listRule": null, + "name": "settings", + "system": false, + "type": "base", + "updateRule": null, + "viewRule": null + }, + { + "createRule": null, + "deleteRule": null, + "fields": [ + { + "autogeneratePattern": "[a-z0-9]{15}", + "hidden": false, + "id": "text3208210256", + "max": 15, + "min": 15, + "name": "id", + "pattern": "^[a-z0-9]+$", + "presentable": false, + "primaryKey": true, + "required": true, + "system": true, + "type": "text" + }, + { + "autogeneratePattern": "", + "hidden": false, + "id": "fmjfn0yw", + "max": 0, + "min": 0, + "name": "ca", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": false, + "system": false, + "type": "text" + }, + { + "exceptDomains": null, + "hidden": false, + "id": "qqwijqzt", + "name": "email", + "onlyDomains": null, + "presentable": false, + "required": false, + "system": false, + "type": "email" + }, + { + "autogeneratePattern": "", + "hidden": false, + "id": "genxqtii", + "max": 0, + "min": 0, + "name": "key", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": false, + "system": false, + "type": "text" + }, + { + "hidden": false, + "id": "1aoia909", + "maxSize": 2000000, + "name": "resource", + "presentable": false, + "required": false, + "system": false, + "type": "json" + }, + { + "hidden": false, + "id": "autodate2990389176", + "name": "created", + "onCreate": true, + "onUpdate": false, + "presentable": false, + "system": false, + "type": "autodate" + }, + { + "hidden": false, + "id": "autodate3332085495", + "name": "updated", + "onCreate": true, + "onUpdate": true, + "presentable": false, + "system": false, + "type": "autodate" + } + ], + "id": "012d7abbod1hwvr", + "indexes": [], + "listRule": null, + "name": "acme_accounts", + "system": false, + "type": "base", + "updateRule": null, + "viewRule": null + }, + { + "createRule": null, + "deleteRule": null, + "fields": [ + { + "autogeneratePattern": "[a-z0-9]{15}", + "hidden": false, + "id": "text3208210256", + "max": 15, + "min": 15, + "name": "id", + "pattern": "^[a-z0-9]+$", + "presentable": false, + "primaryKey": true, + "required": true, + "system": true, + "type": "text" + }, + { + "autogeneratePattern": "", + "hidden": false, + "id": "8yydhv1h", + "max": 0, + "min": 0, + "name": "name", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": false, + "system": false, + "type": "text" + }, + { + "autogeneratePattern": "", + "hidden": false, + "id": "1buzebwz", + "max": 0, + "min": 0, + "name": "description", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": false, + "system": false, + "type": "text" + }, + { + "hidden": false, + "id": "vqoajwjq", + "maxSelect": 1, + "name": "trigger", + "presentable": false, + "required": false, + "system": false, + "type": "select", + "values": [ + "auto", + "manual" + ] + }, + { + "autogeneratePattern": "", + "hidden": false, + "id": "8ho247wh", + "max": 0, + "min": 0, + "name": "triggerCron", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": false, + "system": false, + "type": "text" + }, + { + "hidden": false, + "id": "nq7kfdzi", + "name": "enabled", + "presentable": false, + "required": false, + "system": false, + "type": "bool" + }, + { + "hidden": false, + "id": "awlphkfe", + "maxSize": 2000000, + "name": "content", + "presentable": false, + "required": false, + "system": false, + "type": "json" + }, + { + "hidden": false, + "id": "g9ohkk5o", + "maxSize": 2000000, + "name": "draft", + "presentable": false, + "required": false, + "system": false, + "type": "json" + }, + { + "hidden": false, + "id": "2rpfz9t3", + "name": "hasDraft", + "presentable": false, + "required": false, + "system": false, + "type": "bool" + }, + { + "cascadeDelete": false, + "collectionId": "qjp8lygssgwyqyz", + "hidden": false, + "id": "a23wkj9x", + "maxSelect": 1, + "minSelect": 0, + "name": "lastRunId", + "presentable": false, + "required": false, + "system": false, + "type": "relation" + }, + { + "hidden": false, + "id": "zivdxh23", + "maxSelect": 1, + "name": "lastRunStatus", + "presentable": false, + "required": false, + "system": false, + "type": "select", + "values": [ + "pending", + "running", + "succeeded", + "failed" + ] + }, + { + "hidden": false, + "id": "u9bosu36", + "max": "", + "min": "", + "name": "lastRunTime", + "presentable": false, + "required": false, + "system": false, + "type": "date" + }, + { + "hidden": false, + "id": "autodate2990389176", + "name": "created", + "onCreate": true, + "onUpdate": false, + "presentable": false, + "system": false, + "type": "autodate" + }, + { + "hidden": false, + "id": "autodate3332085495", + "name": "updated", + "onCreate": true, + "onUpdate": true, + "presentable": false, + "system": false, + "type": "autodate" + } + ], + "id": "tovyif5ax6j62ur", + "indexes": [], + "listRule": null, + "name": "workflow", + "system": false, + "type": "base", + "updateRule": null, + "viewRule": null + }, + { + "createRule": null, + "deleteRule": null, + "fields": [ + { + "autogeneratePattern": "[a-z0-9]{15}", + "hidden": false, + "id": "text3208210256", + "max": 15, + "min": 15, + "name": "id", + "pattern": "^[a-z0-9]+$", + "presentable": false, + "primaryKey": true, + "required": true, + "system": true, + "type": "text" + }, + { + "cascadeDelete": false, + "collectionId": "tovyif5ax6j62ur", + "hidden": false, + "id": "jka88auc", + "maxSelect": 1, + "minSelect": 0, + "name": "workflowId", + "presentable": false, + "required": false, + "system": false, + "type": "relation" + }, + { + "autogeneratePattern": "", + "hidden": false, + "id": "z9fgvqkz", + "max": 0, + "min": 0, + "name": "nodeId", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": false, + "system": false, + "type": "text" + }, + { + "hidden": false, + "id": "c2rm9omj", + "maxSize": 2000000, + "name": "node", + "presentable": false, + "required": false, + "system": false, + "type": "json" + }, + { + "hidden": false, + "id": "he4cceqb", + "maxSize": 2000000, + "name": "outputs", + "presentable": false, + "required": false, + "system": false, + "type": "json" + }, + { + "hidden": false, + "id": "2yfxbxuf", + "name": "succeeded", + "presentable": false, + "required": false, + "system": false, + "type": "bool" + }, + { + "hidden": false, + "id": "autodate2990389176", + "name": "created", + "onCreate": true, + "onUpdate": false, + "presentable": false, + "system": false, + "type": "autodate" + }, + { + "hidden": false, + "id": "autodate3332085495", + "name": "updated", + "onCreate": true, + "onUpdate": true, + "presentable": false, + "system": false, + "type": "autodate" + } + ], + "id": "bqnxb95f2cooowp", + "indexes": [], + "listRule": null, + "name": "workflow_output", + "system": false, + "type": "base", + "updateRule": null, + "viewRule": null + }, + { + "createRule": null, + "deleteRule": null, + "fields": [ + { + "autogeneratePattern": "[a-z0-9]{15}", + "hidden": false, + "id": "text3208210256", + "max": 15, + "min": 15, + "name": "id", + "pattern": "^[a-z0-9]+$", + "presentable": false, + "primaryKey": true, + "required": true, + "system": true, + "type": "text" + }, + { + "hidden": false, + "id": "by9hetqi", + "maxSelect": 1, + "name": "source", + "presentable": false, + "required": false, + "system": false, + "type": "select", + "values": [ + "workflow", + "upload" + ] + }, + { + "autogeneratePattern": "", + "hidden": false, + "id": "fugxf58p", + "max": 0, + "min": 0, + "name": "subjectAltNames", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": false, + "system": false, + "type": "text" + }, + { + "autogeneratePattern": "", + "hidden": false, + "id": "plmambpz", + "max": 0, + "min": 0, + "name": "certificate", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": false, + "system": false, + "type": "text" + }, + { + "autogeneratePattern": "", + "hidden": false, + "id": "49qvwxcg", + "max": 0, + "min": 0, + "name": "privateKey", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": false, + "system": false, + "type": "text" + }, + { + "autogeneratePattern": "", + "hidden": false, + "id": "agt7n5bb", + "max": 0, + "min": 0, + "name": "issuerCertificate", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": false, + "system": false, + "type": "text" + }, + { + "hidden": false, + "id": "v40aqzpd", + "max": "", + "min": "", + "name": "effectAt", + "presentable": false, + "required": false, + "system": false, + "type": "date" + }, + { + "hidden": false, + "id": "zgpdby2k", + "max": "", + "min": "", + "name": "expireAt", + "presentable": false, + "required": false, + "system": false, + "type": "date" + }, + { + "exceptDomains": null, + "hidden": false, + "id": "ayyjy5ve", + "name": "acmeCertUrl", + "onlyDomains": null, + "presentable": false, + "required": false, + "system": false, + "type": "url" + }, + { + "exceptDomains": null, + "hidden": false, + "id": "3x5heo8e", + "name": "acmeCertStableUrl", + "onlyDomains": null, + "presentable": false, + "required": false, + "system": false, + "type": "url" + }, + { + "cascadeDelete": false, + "collectionId": "tovyif5ax6j62ur", + "hidden": false, + "id": "uvqfamb1", + "maxSelect": 1, + "minSelect": 0, + "name": "workflowId", + "presentable": false, + "required": false, + "system": false, + "type": "relation" + }, + { + "autogeneratePattern": "", + "hidden": false, + "id": "uqldzldw", + "max": 0, + "min": 0, + "name": "workflowNodeId", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": false, + "system": false, + "type": "text" + }, + { + "cascadeDelete": false, + "collectionId": "bqnxb95f2cooowp", + "hidden": false, + "id": "2ohlr0yd", + "maxSelect": 1, + "minSelect": 0, + "name": "workflowOutputId", + "presentable": false, + "required": false, + "system": false, + "type": "relation" + }, + { + "hidden": false, + "id": "klyf4nlq", + "max": "", + "min": "", + "name": "deleted", + "presentable": false, + "required": false, + "system": false, + "type": "date" + }, + { + "hidden": false, + "id": "autodate2990389176", + "name": "created", + "onCreate": true, + "onUpdate": false, + "presentable": false, + "system": false, + "type": "autodate" + }, + { + "hidden": false, + "id": "autodate3332085495", + "name": "updated", + "onCreate": true, + "onUpdate": true, + "presentable": false, + "system": false, + "type": "autodate" + } + ], + "id": "4szxr9x43tpj6np", + "indexes": [], + "listRule": null, + "name": "certificate", + "system": false, + "type": "base", + "updateRule": null, + "viewRule": null + }, + { + "createRule": null, + "deleteRule": null, + "fields": [ + { + "autogeneratePattern": "[a-z0-9]{15}", + "hidden": false, + "id": "text3208210256", + "max": 15, + "min": 15, + "name": "id", + "pattern": "^[a-z0-9]+$", + "presentable": false, + "primaryKey": true, + "required": true, + "system": true, + "type": "text" + }, + { + "cascadeDelete": false, + "collectionId": "tovyif5ax6j62ur", + "hidden": false, + "id": "m8xfsyyy", + "maxSelect": 1, + "minSelect": 0, + "name": "workflowId", + "presentable": false, + "required": false, + "system": false, + "type": "relation" + }, + { + "hidden": false, + "id": "qldmh0tw", + "maxSelect": 1, + "name": "status", + "presentable": false, + "required": false, + "system": false, + "type": "select", + "values": [ + "pending", + "running", + "succeeded", + "failed" + ] + }, + { + "hidden": false, + "id": "jlroa3fk", + "maxSelect": 1, + "name": "trigger", + "presentable": false, + "required": false, + "system": false, + "type": "select", + "values": [ + "auto", + "manual" + ] + }, + { + "hidden": false, + "id": "k9xvtf89", + "max": "", + "min": "", + "name": "startedAt", + "presentable": false, + "required": false, + "system": false, + "type": "date" + }, + { + "hidden": false, + "id": "3ikum7mk", + "max": "", + "min": "", + "name": "endedAt", + "presentable": false, + "required": false, + "system": false, + "type": "date" + }, + { + "hidden": false, + "id": "2m9byaa9", + "maxSize": 2000000, + "name": "logs", + "presentable": false, + "required": false, + "system": false, + "type": "json" + }, + { + "autogeneratePattern": "", + "hidden": false, + "id": "hvebkuxw", + "max": 0, + "min": 0, + "name": "error", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": false, + "system": false, + "type": "text" + }, + { + "hidden": false, + "id": "autodate2990389176", + "name": "created", + "onCreate": true, + "onUpdate": false, + "presentable": false, + "system": false, + "type": "autodate" + }, + { + "hidden": false, + "id": "autodate3332085495", + "name": "updated", + "onCreate": true, + "onUpdate": true, + "presentable": false, + "system": false, + "type": "autodate" + } + ], + "id": "qjp8lygssgwyqyz", + "indexes": [], + "listRule": null, + "name": "workflow_run", + "system": false, + "type": "base", + "updateRule": null, + "viewRule": null + }, + { + "authAlert": { + "emailTemplate": { + "body": "

Hello,

\n

We noticed a login to your {APP_NAME} account from a new location.

\n

If this was you, you may disregard this email.

\n

If this wasn't you, you should immediately change your {APP_NAME} account password to revoke access from all other locations.

\n

\n Thanks,
\n {APP_NAME} team\n

", + "subject": "Login from a new location" + }, + "enabled": true + }, + "authRule": "", + "authToken": { + "duration": 1209600 + }, + "confirmEmailChangeTemplate": { + "body": "

Hello,

\n

Click on the button below to confirm your new email address.

\n

\n Confirm new email\n

\n

If you didn't ask to change your email address, you can ignore this email.

\n

\n Thanks,
\n {APP_NAME} team\n

", + "subject": "Confirm your {APP_NAME} new email address" + }, + "createRule": null, + "deleteRule": null, + "emailChangeToken": { + "duration": 1800 + }, + "fields": [ + { + "autogeneratePattern": "[a-z0-9]{15}", + "hidden": false, + "id": "text3208210256", + "max": 15, + "min": 15, + "name": "id", + "pattern": "^[a-z0-9]+$", + "presentable": false, + "primaryKey": true, + "required": true, + "system": true, + "type": "text" + }, + { + "cost": 0, + "hidden": true, + "id": "password901924565", + "max": 0, + "min": 8, + "name": "password", + "pattern": "", + "presentable": false, + "required": true, + "system": true, + "type": "password" + }, + { + "autogeneratePattern": "[a-zA-Z0-9]{50}", + "hidden": true, + "id": "text2504183744", + "max": 60, + "min": 30, + "name": "tokenKey", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": true, + "system": true, + "type": "text" + }, + { + "exceptDomains": null, + "hidden": false, + "id": "email3885137012", + "name": "email", + "onlyDomains": null, + "presentable": false, + "required": true, + "system": true, + "type": "email" + }, + { + "hidden": false, + "id": "bool1547992806", + "name": "emailVisibility", + "presentable": false, + "required": false, + "system": true, + "type": "bool" + }, + { + "hidden": false, + "id": "bool256245529", + "name": "verified", + "presentable": false, + "required": false, + "system": true, + "type": "bool" + }, + { + "hidden": false, + "id": "autodate2990389176", + "name": "created", + "onCreate": true, + "onUpdate": false, + "presentable": false, + "system": true, + "type": "autodate" + }, + { + "hidden": false, + "id": "autodate3332085495", + "name": "updated", + "onCreate": true, + "onUpdate": true, + "presentable": false, + "system": true, + "type": "autodate" + } + ], + "fileToken": { + "duration": 120 + }, + "id": "pbc_3142635823", + "indexes": [ + "CREATE UNIQUE INDEX ` + "`" + `idx_tokenKey_pbc_3142635823` + "`" + ` ON ` + "`" + `_superusers` + "`" + ` (` + "`" + `tokenKey` + "`" + `)", + "CREATE UNIQUE INDEX ` + "`" + `idx_email_pbc_3142635823` + "`" + ` ON ` + "`" + `_superusers` + "`" + ` (` + "`" + `email` + "`" + `) WHERE ` + "`" + `email` + "`" + ` != ''" + ], + "listRule": null, + "manageRule": null, + "mfa": { + "duration": 1800, + "enabled": false, + "rule": "" + }, + "name": "_superusers", + "oauth2": { + "enabled": false, + "mappedFields": { + "avatarURL": "", + "id": "", + "name": "", + "username": "" + } + }, + "otp": { + "duration": 180, + "emailTemplate": { + "body": "

Hello,

\n

Your one-time password is: {OTP}

\n

If you didn't ask for the one-time password, you can ignore this email.

\n

\n Thanks,
\n {APP_NAME} team\n

", + "subject": "OTP for {APP_NAME}" + }, + "enabled": false, + "length": 8 + }, + "passwordAuth": { + "enabled": true, + "identityFields": [ + "email" + ] + }, + "passwordResetToken": { + "duration": 1800 + }, + "resetPasswordTemplate": { + "body": "

Hello,

\n

Click on the button below to reset your password.

\n

\n Reset password\n

\n

If you didn't ask to reset your password, you can ignore this email.

\n

\n Thanks,
\n {APP_NAME} team\n

", + "subject": "Reset your {APP_NAME} password" + }, + "system": true, + "type": "auth", + "updateRule": null, + "verificationTemplate": { + "body": "

Hello,

\n

Thank you for joining us at {APP_NAME}.

\n

Click on the button below to verify your email address.

\n

\n Verify\n

\n

\n Thanks,
\n {APP_NAME} team\n

", + "subject": "Verify your {APP_NAME} email" + }, + "verificationToken": { + "duration": 259200 + }, + "viewRule": null + }, + { + "createRule": null, + "deleteRule": "@request.auth.id != '' && recordRef = @request.auth.id && collectionRef = @request.auth.collectionId", + "fields": [ + { + "autogeneratePattern": "[a-z0-9]{15}", + "hidden": false, + "id": "text3208210256", + "max": 15, + "min": 15, + "name": "id", + "pattern": "^[a-z0-9]+$", + "presentable": false, + "primaryKey": true, + "required": true, + "system": true, + "type": "text" + }, + { + "autogeneratePattern": "", + "hidden": false, + "id": "text455797646", + "max": 0, + "min": 0, + "name": "collectionRef", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": true, + "system": true, + "type": "text" + }, + { + "autogeneratePattern": "", + "hidden": false, + "id": "text127846527", + "max": 0, + "min": 0, + "name": "recordRef", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": true, + "system": true, + "type": "text" + }, + { + "autogeneratePattern": "", + "hidden": false, + "id": "text2462348188", + "max": 0, + "min": 0, + "name": "provider", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": true, + "system": true, + "type": "text" + }, + { + "autogeneratePattern": "", + "hidden": false, + "id": "text1044722854", + "max": 0, + "min": 0, + "name": "providerId", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": true, + "system": true, + "type": "text" + }, + { + "hidden": false, + "id": "autodate2990389176", + "name": "created", + "onCreate": true, + "onUpdate": false, + "presentable": false, + "system": true, + "type": "autodate" + }, + { + "hidden": false, + "id": "autodate3332085495", + "name": "updated", + "onCreate": true, + "onUpdate": true, + "presentable": false, + "system": true, + "type": "autodate" + } + ], + "id": "pbc_2281828961", + "indexes": [ + "CREATE UNIQUE INDEX ` + "`" + `idx_externalAuths_record_provider` + "`" + ` ON ` + "`" + `_externalAuths` + "`" + ` (collectionRef, recordRef, provider)", + "CREATE UNIQUE INDEX ` + "`" + `idx_externalAuths_collection_provider` + "`" + ` ON ` + "`" + `_externalAuths` + "`" + ` (collectionRef, provider, providerId)" + ], + "listRule": "@request.auth.id != '' && recordRef = @request.auth.id && collectionRef = @request.auth.collectionId", + "name": "_externalAuths", + "system": true, + "type": "base", + "updateRule": null, + "viewRule": "@request.auth.id != '' && recordRef = @request.auth.id && collectionRef = @request.auth.collectionId" + }, + { + "createRule": null, + "deleteRule": null, + "fields": [ + { + "autogeneratePattern": "[a-z0-9]{15}", + "hidden": false, + "id": "text3208210256", + "max": 15, + "min": 15, + "name": "id", + "pattern": "^[a-z0-9]+$", + "presentable": false, + "primaryKey": true, + "required": true, + "system": true, + "type": "text" + }, + { + "autogeneratePattern": "", + "hidden": false, + "id": "text455797646", + "max": 0, + "min": 0, + "name": "collectionRef", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": true, + "system": true, + "type": "text" + }, + { + "autogeneratePattern": "", + "hidden": false, + "id": "text127846527", + "max": 0, + "min": 0, + "name": "recordRef", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": true, + "system": true, + "type": "text" + }, + { + "autogeneratePattern": "", + "hidden": false, + "id": "text1582905952", + "max": 0, + "min": 0, + "name": "method", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": true, + "system": true, + "type": "text" + }, + { + "hidden": false, + "id": "autodate2990389176", + "name": "created", + "onCreate": true, + "onUpdate": false, + "presentable": false, + "system": true, + "type": "autodate" + }, + { + "hidden": false, + "id": "autodate3332085495", + "name": "updated", + "onCreate": true, + "onUpdate": true, + "presentable": false, + "system": true, + "type": "autodate" + } + ], + "id": "pbc_2279338944", + "indexes": [ + "CREATE INDEX ` + "`" + `idx_mfas_collectionRef_recordRef` + "`" + ` ON ` + "`" + `_mfas` + "`" + ` (collectionRef,recordRef)" + ], + "listRule": "@request.auth.id != '' && recordRef = @request.auth.id && collectionRef = @request.auth.collectionId", + "name": "_mfas", + "system": true, + "type": "base", + "updateRule": null, + "viewRule": "@request.auth.id != '' && recordRef = @request.auth.id && collectionRef = @request.auth.collectionId" + }, + { + "createRule": null, + "deleteRule": null, + "fields": [ + { + "autogeneratePattern": "[a-z0-9]{15}", + "hidden": false, + "id": "text3208210256", + "max": 15, + "min": 15, + "name": "id", + "pattern": "^[a-z0-9]+$", + "presentable": false, + "primaryKey": true, + "required": true, + "system": true, + "type": "text" + }, + { + "autogeneratePattern": "", + "hidden": false, + "id": "text455797646", + "max": 0, + "min": 0, + "name": "collectionRef", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": true, + "system": true, + "type": "text" + }, + { + "autogeneratePattern": "", + "hidden": false, + "id": "text127846527", + "max": 0, + "min": 0, + "name": "recordRef", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": true, + "system": true, + "type": "text" + }, + { + "cost": 8, + "hidden": true, + "id": "password901924565", + "max": 0, + "min": 0, + "name": "password", + "pattern": "", + "presentable": false, + "required": true, + "system": true, + "type": "password" + }, + { + "autogeneratePattern": "", + "hidden": true, + "id": "text3866985172", + "max": 0, + "min": 0, + "name": "sentTo", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": false, + "system": true, + "type": "text" + }, + { + "hidden": false, + "id": "autodate2990389176", + "name": "created", + "onCreate": true, + "onUpdate": false, + "presentable": false, + "system": true, + "type": "autodate" + }, + { + "hidden": false, + "id": "autodate3332085495", + "name": "updated", + "onCreate": true, + "onUpdate": true, + "presentable": false, + "system": true, + "type": "autodate" + } + ], + "id": "pbc_1638494021", + "indexes": [ + "CREATE INDEX ` + "`" + `idx_otps_collectionRef_recordRef` + "`" + ` ON ` + "`" + `_otps` + "`" + ` (collectionRef, recordRef)" + ], + "listRule": "@request.auth.id != '' && recordRef = @request.auth.id && collectionRef = @request.auth.collectionId", + "name": "_otps", + "system": true, + "type": "base", + "updateRule": null, + "viewRule": "@request.auth.id != '' && recordRef = @request.auth.id && collectionRef = @request.auth.collectionId" + }, + { + "createRule": null, + "deleteRule": "@request.auth.id != '' && recordRef = @request.auth.id && collectionRef = @request.auth.collectionId", + "fields": [ + { + "autogeneratePattern": "[a-z0-9]{15}", + "hidden": false, + "id": "text3208210256", + "max": 15, + "min": 15, + "name": "id", + "pattern": "^[a-z0-9]+$", + "presentable": false, + "primaryKey": true, + "required": true, + "system": true, + "type": "text" + }, + { + "autogeneratePattern": "", + "hidden": false, + "id": "text455797646", + "max": 0, + "min": 0, + "name": "collectionRef", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": true, + "system": true, + "type": "text" + }, + { + "autogeneratePattern": "", + "hidden": false, + "id": "text127846527", + "max": 0, + "min": 0, + "name": "recordRef", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": true, + "system": true, + "type": "text" + }, + { + "autogeneratePattern": "", + "hidden": false, + "id": "text4228609354", + "max": 0, + "min": 0, + "name": "fingerprint", + "pattern": "", + "presentable": false, + "primaryKey": false, + "required": true, + "system": true, + "type": "text" + }, + { + "hidden": false, + "id": "autodate2990389176", + "name": "created", + "onCreate": true, + "onUpdate": false, + "presentable": false, + "system": true, + "type": "autodate" + }, + { + "hidden": false, + "id": "autodate3332085495", + "name": "updated", + "onCreate": true, + "onUpdate": true, + "presentable": false, + "system": true, + "type": "autodate" + } + ], + "id": "pbc_4275539003", + "indexes": [ + "CREATE UNIQUE INDEX ` + "`" + `idx_authOrigins_unique_pairs` + "`" + ` ON ` + "`" + `_authOrigins` + "`" + ` (collectionRef, recordRef, fingerprint)" + ], + "listRule": "@request.auth.id != '' && recordRef = @request.auth.id && collectionRef = @request.auth.collectionId", + "name": "_authOrigins", + "system": true, + "type": "base", + "updateRule": null, + "viewRule": "@request.auth.id != '' && recordRef = @request.auth.id && collectionRef = @request.auth.collectionId" + } + ]` + + return app.ImportCollectionsByMarshaledJSON([]byte(jsonData), false) + }, func(app core.App) error { + return nil + }) +} diff --git a/migrations/1737141502_superusers_initial.go b/migrations/1737141502_superusers_initial.go new file mode 100644 index 00000000..a9dd9522 --- /dev/null +++ b/migrations/1737141502_superusers_initial.go @@ -0,0 +1,27 @@ +package migrations + +import ( + "github.com/pocketbase/pocketbase/core" + m "github.com/pocketbase/pocketbase/migrations" +) + +func init() { + m.Register(func(app core.App) error { + superusers, err := app.FindCollectionByNameOrId(core.CollectionNameSuperusers) + if err != nil { + return err + } + + record := core.NewRecord(superusers) + record.Set("email", "admin@certimate.fun") + record.Set("password", "1234567890") + return app.Save(record) + }, func(app core.App) error { + record, _ := app.FindAuthRecordByEmail(core.CollectionNameSuperusers, "admin@certimate.fun") + if record == nil { + return nil + } + + return app.Delete(record) + }) +} diff --git a/ui/embed.go b/ui/embed.go index 5d1cb45f..dc02dac5 100644 --- a/ui/embed.go +++ b/ui/embed.go @@ -4,11 +4,11 @@ package ui import ( "embed" - "github.com/labstack/echo/v5" + "github.com/pocketbase/pocketbase/apis" ) //go:embed all:dist var distDir embed.FS // DistDirFS contains the embedded dist directory files (without the "dist" prefix) -var DistDirFS = echo.MustSubFS(distDir, "dist") +var DistDirFS = apis.MustSubFS(distDir, "dist") diff --git a/ui/package-lock.json b/ui/package-lock.json index 57e6696d..97dcc7fe 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -9,53 +9,54 @@ "version": "0.0.0", "dependencies": { "@ant-design/icons": "^5.5.2", - "@ant-design/pro-components": "^2.8.2", + "@ant-design/pro-components": "^2.8.4", "ahooks": "^3.8.4", - "antd": "^5.22.7", - "antd-zod": "^6.0.0", + "antd": "^5.23.1", + "antd-zod": "^6.0.1", "cron-parser": "^4.9.0", - "i18next": "^24.2.0", + "file-saver": "^2.0.5", + "i18next": "^24.2.1", "i18next-browser-languagedetector": "^8.0.2", "immer": "^10.1.1", - "jszip": "^3.10.1", - "lucide-react": "^0.469.0", + "lucide-react": "^0.473.0", "nanoid": "^5.0.9", - "pocketbase": "^0.21.5", + "pocketbase": "^0.25.0", "radash": "^12.1.0", "react": "^18.3.1", "react-copy-to-clipboard": "^5.1.0", "react-dom": "^18.3.1", "react-i18next": "^15.4.0", - "react-router-dom": "^7.1.1", + "react-router-dom": "^7.1.3", "zod": "^3.24.1", - "zustand": "^5.0.2" + "zustand": "^5.0.3" }, "devDependencies": { + "@types/file-saver": "^2.0.7", "@types/fs-extra": "^11.0.4", - "@types/node": "^22.10.3", + "@types/node": "^22.10.7", "@types/react": "^18.3.12", "@types/react-copy-to-clipboard": "^5.0.7", "@types/react-dom": "^18.3.1", - "@typescript-eslint/eslint-plugin": "^8.19.0", - "@typescript-eslint/parser": "^8.19.0", + "@typescript-eslint/eslint-plugin": "^8.20.0", + "@typescript-eslint/parser": "^8.20.0", "@vitejs/plugin-legacy": "^6.0.0", "@vitejs/plugin-react": "^4.3.4", "autoprefixer": "^10.4.20", "eslint": "^8.57.0", - "eslint-config-prettier": "^9.1.0", + "eslint-config-prettier": "^10.0.1", "eslint-import-resolver-typescript": "^3.7.0", "eslint-plugin-import": "^2.31.0", - "eslint-plugin-prettier": "^5.2.1", + "eslint-plugin-prettier": "^5.2.2", "eslint-plugin-react-hooks": "^5.1.0", - "eslint-plugin-react-refresh": "^0.4.16", - "eslint-plugin-tailwindcss": "^3.17.5", - "fs-extra": "^11.2.0", - "postcss": "^8.4.49", + "eslint-plugin-react-refresh": "^0.4.18", + "eslint-plugin-tailwindcss": "^3.18.0", + "fs-extra": "^11.3.0", + "postcss": "^8.5.1", "prettier": "^3.4.2", "tailwindcss": "^3.4.17", "tailwindcss-animate": "^1.0.7", - "typescript": "^5.7.2", - "vite": "^6.0.6" + "typescript": "^5.7.3", + "vite": "^6.0.7" } }, "node_modules/@alloc/quick-lru": { @@ -84,11 +85,11 @@ } }, "node_modules/@ant-design/colors": { - "version": "7.1.0", - "resolved": "https://registry.npmmirror.com/@ant-design/colors/-/colors-7.1.0.tgz", - "integrity": "sha512-MMoDGWn1y9LdQJQSHiCC20x3uZ3CwQnv9QMz6pCmJOrqdgM9YxsoVVY0wtrdXbmfSgnV0KNk6zi09NAhMR2jvg==", + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/@ant-design/colors/-/colors-7.2.0.tgz", + "integrity": "sha512-bjTObSnZ9C/O8MB/B4OUtd/q9COomuJAR2SYfhxLyHvCKn4EKwCN3e+fWGMo7H5InAyV0wL17jdE9ALrdOW/6A==", "dependencies": { - "@ctrl/tinycolor": "^3.6.1" + "@ant-design/fast-color": "^2.0.6" } }, "node_modules/@ant-design/cssinjs": { @@ -159,17 +160,16 @@ "integrity": "sha512-vHbT+zJEVzllwP+CM+ul7reTEfBR0vgxFe7+lREAsAA7YGsYpboiq2sQNeQeRvh09GfQgs/GyFEvZpJ9cLXpXA==" }, "node_modules/@ant-design/pro-card": { - "version": "2.9.2", - "resolved": "https://registry.npmmirror.com/@ant-design/pro-card/-/pro-card-2.9.2.tgz", - "integrity": "sha512-mKOmNb7jc3Pz41RrPY7EFKRWBjLdN4tp9yzmRkS2g8K7P3pW435f7Ip6rc+58FWDzbZa8lElTGPxAoFB/dq7LA==", + "version": "2.9.4", + "resolved": "https://registry.npmmirror.com/@ant-design/pro-card/-/pro-card-2.9.4.tgz", + "integrity": "sha512-qxRJCLcLV+pc1ljSIjCq5AIDlNioiziIzX/K4JjYTBV8gmlcurV30mVt8k/K0PM2vbPS1RcEzhX0D7tlUNwWDg==", "dependencies": { "@ant-design/cssinjs": "^1.21.1", "@ant-design/icons": "^5.0.0", - "@ant-design/pro-provider": "2.15.2", - "@ant-design/pro-utils": "2.16.2", + "@ant-design/pro-provider": "2.15.3", + "@ant-design/pro-utils": "2.16.3", "@babel/runtime": "^7.18.0", "classnames": "^2.3.2", - "omit.js": "^2.0.2", "rc-resize-observer": "^1.0.0", "rc-util": "^5.4.0" }, @@ -179,20 +179,20 @@ } }, "node_modules/@ant-design/pro-components": { - "version": "2.8.2", - "resolved": "https://registry.npmmirror.com/@ant-design/pro-components/-/pro-components-2.8.2.tgz", - "integrity": "sha512-gSzt/Pw1ayZeHhxh5yaeP7pGpk0V2ZsB4PZab0s6V88O15Ql3w5ciYTObxbxGXMPc+A72AwVThoYLv2ZIl3cMA==", + "version": "2.8.4", + "resolved": "https://registry.npmmirror.com/@ant-design/pro-components/-/pro-components-2.8.4.tgz", + "integrity": "sha512-TEI+V/zpD6KEP5vJUAKb7f9eq9T1q6TOBDuFndoVgNaij0I90SZZVHdiz+bwhuN5P7HIVdsWtnQo4MHMVM5JNw==", "dependencies": { - "@ant-design/pro-card": "2.9.2", - "@ant-design/pro-descriptions": "2.6.2", - "@ant-design/pro-field": "2.17.2", - "@ant-design/pro-form": "2.31.2", - "@ant-design/pro-layout": "7.21.2", - "@ant-design/pro-list": "2.6.2", - "@ant-design/pro-provider": "2.15.2", + "@ant-design/pro-card": "2.9.4", + "@ant-design/pro-descriptions": "2.6.4", + "@ant-design/pro-field": "3.0.1", + "@ant-design/pro-form": "2.31.4", + "@ant-design/pro-layout": "7.22.1", + "@ant-design/pro-list": "2.6.4", + "@ant-design/pro-provider": "2.15.3", "@ant-design/pro-skeleton": "2.2.1", - "@ant-design/pro-table": "3.18.2", - "@ant-design/pro-utils": "2.16.2", + "@ant-design/pro-table": "3.18.4", + "@ant-design/pro-utils": "2.16.3", "@babel/runtime": "^7.16.3" }, "peerDependencies": { @@ -202,15 +202,15 @@ } }, "node_modules/@ant-design/pro-descriptions": { - "version": "2.6.2", - "resolved": "https://registry.npmmirror.com/@ant-design/pro-descriptions/-/pro-descriptions-2.6.2.tgz", - "integrity": "sha512-IrXf4qNMyaypEhO54oZDOFNJ9jrQgg2ovARY7hHRZCChC+I2xVGFCFWXrmtyS82kusxHb6OlLw20ahm+TLZ71w==", + "version": "2.6.4", + "resolved": "https://registry.npmmirror.com/@ant-design/pro-descriptions/-/pro-descriptions-2.6.4.tgz", + "integrity": "sha512-/c0nFYI4HJBR+mY6wymiAiMjOVxgeS+KjGTWj3/GG7sM7BzodntlWeOpe8yW4ss9KFRc8Kd8M6DJOSL9BvqMhg==", "dependencies": { - "@ant-design/pro-field": "2.17.2", - "@ant-design/pro-form": "2.31.2", - "@ant-design/pro-provider": "2.15.2", + "@ant-design/pro-field": "3.0.1", + "@ant-design/pro-form": "2.31.4", + "@ant-design/pro-provider": "2.15.3", "@ant-design/pro-skeleton": "2.2.1", - "@ant-design/pro-utils": "2.16.2", + "@ant-design/pro-utils": "2.16.3", "@babel/runtime": "^7.18.0", "rc-resize-observer": "^0.2.3", "rc-util": "^5.0.6" @@ -236,20 +236,19 @@ } }, "node_modules/@ant-design/pro-field": { - "version": "2.17.2", - "resolved": "https://registry.npmmirror.com/@ant-design/pro-field/-/pro-field-2.17.2.tgz", - "integrity": "sha512-cebfWGaE6MYwfchXpU9xA6jPETZOvk3i9+1IvebjSEKKVXecXuA+muZorpwYzORmkgGBmSPyR0KW+6Ttgtmg9Q==", + "version": "3.0.1", + "resolved": "https://registry.npmmirror.com/@ant-design/pro-field/-/pro-field-3.0.1.tgz", + "integrity": "sha512-Wp2e5eeea7LIO7f3hMgf/PkZrwcnmWgkOLWRkeHXOyCuQzOfi9MiVHs2n7oFiTKMFvkaKipWBTJThBz5BFtIsQ==", "dependencies": { "@ant-design/icons": "^5.0.0", - "@ant-design/pro-provider": "2.15.2", - "@ant-design/pro-utils": "2.16.2", + "@ant-design/pro-provider": "2.15.3", + "@ant-design/pro-utils": "2.16.3", "@babel/runtime": "^7.18.0", "@chenshuai2144/sketch-color": "^1.0.8", "classnames": "^2.3.2", "dayjs": "^1.11.10", "lodash": "^4.17.21", "lodash-es": "^4.17.21", - "omit.js": "^2.0.2", "rc-util": "^5.4.0", "swr": "^2.0.0" }, @@ -259,14 +258,14 @@ } }, "node_modules/@ant-design/pro-form": { - "version": "2.31.2", - "resolved": "https://registry.npmmirror.com/@ant-design/pro-form/-/pro-form-2.31.2.tgz", - "integrity": "sha512-fzchlk+vGi8rCpmC62/SrikuwC2ZpyKnvNVAyihPCNe9oyyv+LD2TZAD0fbshfifP/1aHOOtS4fb7ptYq+LarQ==", + "version": "2.31.4", + "resolved": "https://registry.npmmirror.com/@ant-design/pro-form/-/pro-form-2.31.4.tgz", + "integrity": "sha512-LLlURJkJEtLAvwuPyYtfL9BxcrXtEOmHbmIBZ/u5Cekg/mAL/k5w04ElSP0ImiDU6p3jdHTbHeePzJAE1H603g==", "dependencies": { "@ant-design/icons": "^5.0.0", - "@ant-design/pro-field": "2.17.2", - "@ant-design/pro-provider": "2.15.2", - "@ant-design/pro-utils": "2.16.2", + "@ant-design/pro-field": "3.0.1", + "@ant-design/pro-provider": "2.15.3", + "@ant-design/pro-utils": "2.16.3", "@babel/runtime": "^7.18.0", "@chenshuai2144/sketch-color": "^1.0.7", "@umijs/use-params": "^1.0.9", @@ -274,7 +273,6 @@ "dayjs": "^1.11.10", "lodash": "^4.17.21", "lodash-es": "^4.17.21", - "omit.js": "^2.0.2", "rc-resize-observer": "^1.1.0", "rc-util": "^5.0.6" }, @@ -286,22 +284,21 @@ } }, "node_modules/@ant-design/pro-layout": { - "version": "7.21.2", - "resolved": "https://registry.npmmirror.com/@ant-design/pro-layout/-/pro-layout-7.21.2.tgz", - "integrity": "sha512-dtqap5YNDrxUWxhi43QJQSv1JLHYPCV4/h4cFM10HNiX/86Cxw37DiCOMdIM/ZwWk619BiwN7CJNgL5Q8obrAQ==", + "version": "7.22.1", + "resolved": "https://registry.npmmirror.com/@ant-design/pro-layout/-/pro-layout-7.22.1.tgz", + "integrity": "sha512-aOwdd/u/yz/0ZHPDpnoVUIDGneZUDw62lCo3C4s6o0SGQrCOkYvY0efG4yLC4RA8eSFvXwnMt5pB7ii7f46KLQ==", "dependencies": { "@ant-design/cssinjs": "^1.21.1", "@ant-design/icons": "^5.0.0", - "@ant-design/pro-provider": "2.15.2", - "@ant-design/pro-utils": "2.16.2", + "@ant-design/pro-provider": "2.15.3", + "@ant-design/pro-utils": "2.16.3", "@babel/runtime": "^7.18.0", "@umijs/route-utils": "^4.0.0", "@umijs/use-params": "^1.0.9", "classnames": "^2.3.2", "lodash": "^4.17.21", "lodash-es": "^4.17.21", - "omit.js": "^2.0.2", - "path-to-regexp": "8.0.0", + "path-to-regexp": "8.2.0", "rc-resize-observer": "^1.1.0", "rc-util": "^5.0.6", "swr": "^2.0.0", @@ -314,16 +311,16 @@ } }, "node_modules/@ant-design/pro-list": { - "version": "2.6.2", - "resolved": "https://registry.npmmirror.com/@ant-design/pro-list/-/pro-list-2.6.2.tgz", - "integrity": "sha512-BEM/WFe8vj4TCdsxa1JDQwl87Xb7oj+3bxA8yLDjRWWwX+D9UuxdYyB2lZsFfSEnphau/mccDE3K/Lbtim6yJg==", + "version": "2.6.4", + "resolved": "https://registry.npmmirror.com/@ant-design/pro-list/-/pro-list-2.6.4.tgz", + "integrity": "sha512-ALsvn5l1gsTUgSj8zkMpoOMwutxJVnSU7w6zR5/zRMABnyVTw3a3JJv7C9/kPiEDBa30kvtqbh1P/Uq1qD1v2A==", "dependencies": { "@ant-design/cssinjs": "^1.21.1", "@ant-design/icons": "^5.0.0", - "@ant-design/pro-card": "2.9.2", - "@ant-design/pro-field": "2.17.2", - "@ant-design/pro-table": "3.18.2", - "@ant-design/pro-utils": "2.16.2", + "@ant-design/pro-card": "2.9.4", + "@ant-design/pro-field": "3.0.1", + "@ant-design/pro-table": "3.18.4", + "@ant-design/pro-utils": "2.16.3", "@babel/runtime": "^7.18.0", "classnames": "^2.3.2", "dayjs": "^1.11.10", @@ -354,9 +351,9 @@ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, "node_modules/@ant-design/pro-provider": { - "version": "2.15.2", - "resolved": "https://registry.npmmirror.com/@ant-design/pro-provider/-/pro-provider-2.15.2.tgz", - "integrity": "sha512-7WSJcjYIuLwco1YiiSgEEJnrqvg7x/YZap8pxOChRnyNh9S3HuV1D5HTc18kfHTpWqZWTAUcS66b0kMP96uKrw==", + "version": "2.15.3", + "resolved": "https://registry.npmmirror.com/@ant-design/pro-provider/-/pro-provider-2.15.3.tgz", + "integrity": "sha512-jUBCuRrhAXNMumSZ++704/zEg/7U1k2N3jMVBgtirvVaCAk5O9iZQKK4W3O3LRFc+D8yO16sXjsxhawvdGL4cA==", "dependencies": { "@ant-design/cssinjs": "^1.21.1", "@babel/runtime": "^7.18.0", @@ -385,17 +382,17 @@ } }, "node_modules/@ant-design/pro-table": { - "version": "3.18.2", - "resolved": "https://registry.npmmirror.com/@ant-design/pro-table/-/pro-table-3.18.2.tgz", - "integrity": "sha512-IIhWXvpBfdy1hqh0qYQOou6tDawrisFYwFhYdiMwuCnvy7UvaHi/JS4yikMe+KG0XVdh6xxfrF1Ad39SR8CrxQ==", + "version": "3.18.4", + "resolved": "https://registry.npmmirror.com/@ant-design/pro-table/-/pro-table-3.18.4.tgz", + "integrity": "sha512-vQQ9R5/U6fS+b/Kb3iVqy/dkDe7avAiX/L3n/JIA5skp+t1NQTCZBlPDzopp+2dJDd96aXdWGDIfV6kiSuL82g==", "dependencies": { "@ant-design/cssinjs": "^1.21.1", "@ant-design/icons": "^5.0.0", - "@ant-design/pro-card": "2.9.2", - "@ant-design/pro-field": "2.17.2", - "@ant-design/pro-form": "2.31.2", - "@ant-design/pro-provider": "2.15.2", - "@ant-design/pro-utils": "2.16.2", + "@ant-design/pro-card": "2.9.4", + "@ant-design/pro-field": "3.0.1", + "@ant-design/pro-form": "2.31.4", + "@ant-design/pro-provider": "2.15.3", + "@ant-design/pro-utils": "2.16.3", "@babel/runtime": "^7.18.0", "@dnd-kit/core": "^6.0.8", "@dnd-kit/modifiers": "^6.0.1", @@ -405,7 +402,6 @@ "dayjs": "^1.11.10", "lodash": "^4.17.21", "lodash-es": "^4.17.21", - "omit.js": "^2.0.2", "rc-resize-observer": "^1.0.0", "rc-util": "^5.0.1" }, @@ -417,12 +413,12 @@ } }, "node_modules/@ant-design/pro-utils": { - "version": "2.16.2", - "resolved": "https://registry.npmmirror.com/@ant-design/pro-utils/-/pro-utils-2.16.2.tgz", - "integrity": "sha512-ama73ZSzz9O6Qz6DvHd6cnyUA3vI7N+AAl5BV5plijujtnXpNC8KJMXl9jOI1K7QuUVJgJIKbZ2DVm8LnBcTAQ==", + "version": "2.16.3", + "resolved": "https://registry.npmmirror.com/@ant-design/pro-utils/-/pro-utils-2.16.3.tgz", + "integrity": "sha512-uNjKh51v/SUlCJbWfhg2lRQB/TB0MyNMCQkFZ8mZBQ2rk3Ew47Sly6VssVVWMjIWBLE+g9fOgPg0C1IVeilIXA==", "dependencies": { "@ant-design/icons": "^5.0.0", - "@ant-design/pro-provider": "2.15.2", + "@ant-design/pro-provider": "2.15.3", "@babel/runtime": "^7.18.0", "classnames": "^2.3.2", "dayjs": "^1.11.10", @@ -1968,9 +1964,9 @@ } }, "node_modules/@dnd-kit/core": { - "version": "6.2.0", - "resolved": "https://registry.npmmirror.com/@dnd-kit/core/-/core-6.2.0.tgz", - "integrity": "sha512-KVK/CJmaYGTxTPU6P0+Oy4itgffTUa80B8317sXzfOr1qUzSL29jE7Th11llXiu2haB7B9Glpzo2CDElin+geQ==", + "version": "6.3.1", + "resolved": "https://registry.npmmirror.com/@dnd-kit/core/-/core-6.3.1.tgz", + "integrity": "sha512-xkGBRQQab4RLwgXxoqETICr6S5JlogafbhNsidmrkVv2YRs5MLwpjoF2qpiGjQt8S9AoxtIV603s0GIUpY5eYQ==", "dependencies": { "@dnd-kit/accessibility": "^3.1.1", "@dnd-kit/utilities": "^3.2.2", @@ -3188,6 +3184,12 @@ "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", "dev": true }, + "node_modules/@types/file-saver": { + "version": "2.0.7", + "resolved": "https://registry.npmmirror.com/@types/file-saver/-/file-saver-2.0.7.tgz", + "integrity": "sha512-dNKVfHd/jk0SkR/exKGj2ggkB45MAkzvWCaqLUUgkyjITkGNzH8H+yUwr+BLJUBjZOe9w8X3wgmXhZDRg1ED6A==", + "dev": true + }, "node_modules/@types/fs-extra": { "version": "11.0.4", "resolved": "https://registry.npmmirror.com/@types/fs-extra/-/fs-extra-11.0.4.tgz", @@ -3214,9 +3216,9 @@ } }, "node_modules/@types/node": { - "version": "22.10.3", - "resolved": "https://registry.npmmirror.com/@types/node/-/node-22.10.3.tgz", - "integrity": "sha512-DifAyw4BkrufCILvD3ucnuN8eydUfc/C1GlyrnI+LK6543w5/L3VeVgf05o3B4fqSXP1dKYLOZsKfutpxPzZrw==", + "version": "22.10.7", + "resolved": "https://registry.npmmirror.com/@types/node/-/node-22.10.7.tgz", + "integrity": "sha512-V09KvXxFiutGp6B7XkpaDXlNadZxrzajcY50EuoLIpQ6WWYCSvf19lVIazzfIzQvhUN2HjX12spLojTnhuKlGg==", "dev": true, "dependencies": { "undici-types": "~6.20.0" @@ -3257,20 +3259,20 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.19.0", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.19.0.tgz", - "integrity": "sha512-NggSaEZCdSrFddbctrVjkVZvFC6KGfKfNK0CU7mNK/iKHGKbzT4Wmgm08dKpcZECBu9f5FypndoMyRHkdqfT1Q==", + "version": "8.20.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.20.0.tgz", + "integrity": "sha512-naduuphVw5StFfqp4Gq4WhIBE2gN1GEmMUExpJYknZJdRnc+2gDzB8Z3+5+/Kv33hPQRDGzQO/0opHE72lZZ6A==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.19.0", - "@typescript-eslint/type-utils": "8.19.0", - "@typescript-eslint/utils": "8.19.0", - "@typescript-eslint/visitor-keys": "8.19.0", + "@typescript-eslint/scope-manager": "8.20.0", + "@typescript-eslint/type-utils": "8.20.0", + "@typescript-eslint/utils": "8.20.0", + "@typescript-eslint/visitor-keys": "8.20.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", - "ts-api-utils": "^1.3.0" + "ts-api-utils": "^2.0.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -3286,15 +3288,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.19.0", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/parser/-/parser-8.19.0.tgz", - "integrity": "sha512-6M8taKyOETY1TKHp0x8ndycipTVgmp4xtg5QpEZzXxDhNvvHOJi5rLRkLr8SK3jTgD5l4fTlvBiRdfsuWydxBw==", + "version": "8.20.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/parser/-/parser-8.20.0.tgz", + "integrity": "sha512-gKXG7A5HMyjDIedBi6bUrDcun8GIjnI8qOwVLiY3rx6T/sHP/19XLJOnIq/FgQvWLHja5JN/LSE7eklNBr612g==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "8.19.0", - "@typescript-eslint/types": "8.19.0", - "@typescript-eslint/typescript-estree": "8.19.0", - "@typescript-eslint/visitor-keys": "8.19.0", + "@typescript-eslint/scope-manager": "8.20.0", + "@typescript-eslint/types": "8.20.0", + "@typescript-eslint/typescript-estree": "8.20.0", + "@typescript-eslint/visitor-keys": "8.20.0", "debug": "^4.3.4" }, "engines": { @@ -3310,13 +3312,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.19.0", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/scope-manager/-/scope-manager-8.19.0.tgz", - "integrity": "sha512-hkoJiKQS3GQ13TSMEiuNmSCvhz7ujyqD1x3ShbaETATHrck+9RaDdUbt+osXaUuns9OFwrDTTrjtwsU8gJyyRA==", + "version": "8.20.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/scope-manager/-/scope-manager-8.20.0.tgz", + "integrity": "sha512-J7+VkpeGzhOt3FeG1+SzhiMj9NzGD/M6KoGn9f4dbz3YzK9hvbhVTmLj/HiTp9DazIzJ8B4XcM80LrR9Dm1rJw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "8.19.0", - "@typescript-eslint/visitor-keys": "8.19.0" + "@typescript-eslint/types": "8.20.0", + "@typescript-eslint/visitor-keys": "8.20.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -3327,15 +3329,15 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.19.0", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/type-utils/-/type-utils-8.19.0.tgz", - "integrity": "sha512-TZs0I0OSbd5Aza4qAMpp1cdCYVnER94IziudE3JU328YUHgWu9gwiwhag+fuLeJ2LkWLXI+F/182TbG+JaBdTg==", + "version": "8.20.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/type-utils/-/type-utils-8.20.0.tgz", + "integrity": "sha512-bPC+j71GGvA7rVNAHAtOjbVXbLN5PkwqMvy1cwGeaxUoRQXVuKCebRoLzm+IPW/NtFFpstn1ummSIasD5t60GA==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "8.19.0", - "@typescript-eslint/utils": "8.19.0", + "@typescript-eslint/typescript-estree": "8.20.0", + "@typescript-eslint/utils": "8.20.0", "debug": "^4.3.4", - "ts-api-utils": "^1.3.0" + "ts-api-utils": "^2.0.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -3350,9 +3352,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.19.0", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/types/-/types-8.19.0.tgz", - "integrity": "sha512-8XQ4Ss7G9WX8oaYvD4OOLCjIQYgRQxO+qCiR2V2s2GxI9AUpo7riNwo6jDhKtTcaJjT8PY54j2Yb33kWtSJsmA==", + "version": "8.20.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/types/-/types-8.20.0.tgz", + "integrity": "sha512-cqaMiY72CkP+2xZRrFt3ExRBu0WmVitN/rYPZErA80mHjHx/Svgp8yfbzkJmDoQ/whcytOPO9/IZXnOc+wigRA==", "dev": true, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -3363,19 +3365,19 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.19.0", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.19.0.tgz", - "integrity": "sha512-WW9PpDaLIFW9LCbucMSdYUuGeFUz1OkWYS/5fwZwTA+l2RwlWFdJvReQqMUMBw4yJWJOfqd7An9uwut2Oj8sLw==", + "version": "8.20.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.20.0.tgz", + "integrity": "sha512-Y7ncuy78bJqHI35NwzWol8E0X7XkRVS4K4P4TCyzWkOJih5NDvtoRDW4Ba9YJJoB2igm9yXDdYI/+fkiiAxPzA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "8.19.0", - "@typescript-eslint/visitor-keys": "8.19.0", + "@typescript-eslint/types": "8.20.0", + "@typescript-eslint/visitor-keys": "8.20.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", "minimatch": "^9.0.4", "semver": "^7.6.0", - "ts-api-utils": "^1.3.0" + "ts-api-utils": "^2.0.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -3389,15 +3391,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.19.0", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/utils/-/utils-8.19.0.tgz", - "integrity": "sha512-PTBG+0oEMPH9jCZlfg07LCB2nYI0I317yyvXGfxnvGvw4SHIOuRnQ3kadyyXY6tGdChusIHIbM5zfIbp4M6tCg==", + "version": "8.20.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/utils/-/utils-8.20.0.tgz", + "integrity": "sha512-dq70RUw6UK9ei7vxc4KQtBRk7qkHZv447OUZ6RPQMQl71I3NZxQJX/f32Smr+iqWrB02pHKn2yAdHBb0KNrRMA==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.19.0", - "@typescript-eslint/types": "8.19.0", - "@typescript-eslint/typescript-estree": "8.19.0" + "@typescript-eslint/scope-manager": "8.20.0", + "@typescript-eslint/types": "8.20.0", + "@typescript-eslint/typescript-estree": "8.20.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -3412,12 +3414,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.19.0", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.19.0.tgz", - "integrity": "sha512-mCFtBbFBJDCNCWUl5y6sZSCHXw1DEFEk3c/M3nRK2a4XUB8StGFtmcEMizdjKuBzB6e/smJAAWYug3VrdLMr1w==", + "version": "8.20.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.20.0.tgz", + "integrity": "sha512-v/BpkeeYAsPkKCkR8BDwcno0llhzWVqPOamQrAEMdpZav2Y9OVjd9dwJyBLJWwf335B5DmlifECIkZRJCaGaHA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "8.19.0", + "@typescript-eslint/types": "8.20.0", "eslint-visitor-keys": "^4.2.0" }, "engines": { @@ -3581,17 +3583,17 @@ } }, "node_modules/antd": { - "version": "5.22.7", - "resolved": "https://registry.npmmirror.com/antd/-/antd-5.22.7.tgz", - "integrity": "sha512-koT5QMliDgXc21yNcs4Uyuq6TeB5AJbzGZ2qjNExzE7Tjr8yYIX6sJsQfunsEV80wC1mpF7m9ldKuNj+PafcFA==", + "version": "5.23.1", + "resolved": "https://registry.npmmirror.com/antd/-/antd-5.23.1.tgz", + "integrity": "sha512-rg5xd5LotHw0IRyo/nsiUN/EEV3e+xU4V4UmIb/62hMN9+3APyz1Ohjf17a+fN13jC8sNY1hP1K252SU2Th0xA==", "dependencies": { - "@ant-design/colors": "^7.1.0", - "@ant-design/cssinjs": "^1.21.1", + "@ant-design/colors": "^7.2.0", + "@ant-design/cssinjs": "^1.22.0", "@ant-design/cssinjs-utils": "^1.1.3", + "@ant-design/fast-color": "^2.0.6", "@ant-design/icons": "^5.5.2", "@ant-design/react-slick": "~1.1.2", - "@babel/runtime": "^7.25.7", - "@ctrl/tinycolor": "^3.6.1", + "@babel/runtime": "^7.26.0", "@rc-component/color-picker": "~2.0.1", "@rc-component/mutate-observer": "^1.1.0", "@rc-component/qrcode": "~1.0.0", @@ -3600,36 +3602,36 @@ "classnames": "^2.5.1", "copy-to-clipboard": "^3.3.3", "dayjs": "^1.11.11", - "rc-cascader": "~3.30.0", - "rc-checkbox": "~3.3.0", + "rc-cascader": "~3.33.0", + "rc-checkbox": "~3.5.0", "rc-collapse": "~3.9.0", "rc-dialog": "~9.6.0", "rc-drawer": "~7.2.0", "rc-dropdown": "~4.2.1", "rc-field-form": "~2.7.0", "rc-image": "~7.11.0", - "rc-input": "~1.6.4", - "rc-input-number": "~9.3.0", - "rc-mentions": "~2.17.0", + "rc-input": "~1.7.2", + "rc-input-number": "~9.4.0", + "rc-mentions": "~2.19.1", "rc-menu": "~9.16.0", "rc-motion": "^2.9.5", "rc-notification": "~5.6.2", "rc-pagination": "~5.0.0", - "rc-picker": "~4.8.3", + "rc-picker": "~4.9.2", "rc-progress": "~4.0.0", "rc-rate": "~2.13.0", "rc-resize-observer": "^1.4.3", - "rc-segmented": "~2.5.0", - "rc-select": "~14.16.4", - "rc-slider": "~11.1.7", + "rc-segmented": "~2.7.0", + "rc-select": "~14.16.5", + "rc-slider": "~11.1.8", "rc-steps": "~6.0.1", "rc-switch": "~4.1.0", - "rc-table": "~7.49.0", - "rc-tabs": "~15.4.0", - "rc-textarea": "~1.8.2", - "rc-tooltip": "~6.2.1", - "rc-tree": "~5.10.1", - "rc-tree-select": "~5.24.5", + "rc-table": "~7.50.2", + "rc-tabs": "~15.5.0", + "rc-textarea": "~1.9.0", + "rc-tooltip": "~6.3.2", + "rc-tree": "~5.13.0", + "rc-tree-select": "~5.27.0", "rc-upload": "~4.8.1", "rc-util": "^5.44.3", "scroll-into-view-if-needed": "^3.1.0", @@ -3645,9 +3647,9 @@ } }, "node_modules/antd-zod": { - "version": "6.0.0", - "resolved": "https://registry.npmmirror.com/antd-zod/-/antd-zod-6.0.0.tgz", - "integrity": "sha512-dv5XXR72UtWm1Sz2IhRV5Ho0t7FGZtQLUbEQMeryY6k3W/K9MrvT+e1mV9Ye9tBY+vUD5CksN9cgSAlqimVMXQ==", + "version": "6.0.1", + "resolved": "https://registry.npmmirror.com/antd-zod/-/antd-zod-6.0.1.tgz", + "integrity": "sha512-O4cEUq2p/DOwmpZYtPHbrie1CzcvhJKeN/bDOtfostjcFRz3E/HgINqALZeNaT68X+hqcXxhnxjwIHhxb+oaWw==", "dependencies": { "lodash.merge": "^4.6.2" }, @@ -4122,11 +4124,6 @@ "resolved": "https://registry.npmmirror.com/classnames/-/classnames-2.5.1.tgz", "integrity": "sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==" }, - "node_modules/client-only": { - "version": "0.0.1", - "resolved": "https://registry.npmmirror.com/client-only/-/client-only-0.0.1.tgz", - "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==" - }, "node_modules/commander": { "version": "4.1.1", "resolved": "https://registry.npmmirror.com/commander/-/commander-4.1.1.tgz", @@ -4193,11 +4190,6 @@ "url": "https://opencollective.com/core-js" } }, - "node_modules/core-util-is": { - "version": "1.0.3", - "resolved": "https://registry.npmmirror.com/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" - }, "node_modules/cron-parser": { "version": "4.9.0", "resolved": "https://registry.npmmirror.com/cron-parser/-/cron-parser-4.9.0.tgz", @@ -4353,6 +4345,14 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/dequal": { + "version": "2.0.3", + "resolved": "https://registry.npmmirror.com/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", + "engines": { + "node": ">=6" + } + }, "node_modules/didyoumean": { "version": "1.2.2", "resolved": "https://registry.npmmirror.com/didyoumean/-/didyoumean-1.2.2.tgz", @@ -4660,12 +4660,12 @@ } }, "node_modules/eslint-config-prettier": { - "version": "9.1.0", - "resolved": "https://registry.npmmirror.com/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", - "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", + "version": "10.0.1", + "resolved": "https://registry.npmmirror.com/eslint-config-prettier/-/eslint-config-prettier-10.0.1.tgz", + "integrity": "sha512-lZBts941cyJyeaooiKxAtzoPHTN+GbQTJFAIdQbRhA4/8whaAraEh47Whw/ZFfrjNSnlAxqfm9i0XVAEkULjCw==", "dev": true, "bin": { - "eslint-config-prettier": "bin/cli.js" + "eslint-config-prettier": "build/bin/cli.js" }, "peerDependencies": { "eslint": ">=7.0.0" @@ -4838,9 +4838,9 @@ } }, "node_modules/eslint-plugin-prettier": { - "version": "5.2.1", - "resolved": "https://registry.npmmirror.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.2.1.tgz", - "integrity": "sha512-gH3iR3g4JfF+yYPaJYkN7jEl9QbweL/YfkoRlNnuIEHEz1vHVlCmWOS+eGGiRuzHQXdJFCOTxRgvju9b8VUmrw==", + "version": "5.2.2", + "resolved": "https://registry.npmmirror.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.2.2.tgz", + "integrity": "sha512-1yI3/hf35wmlq66C8yOyrujQnel+v5l1Vop5Cl2I6ylyNTT1JbuUUnV3/41PzwTzcyDp/oF0jWE3HXvcH5AQOQ==", "dev": true, "dependencies": { "prettier-linter-helpers": "^1.0.0", @@ -4880,18 +4880,18 @@ } }, "node_modules/eslint-plugin-react-refresh": { - "version": "0.4.16", - "resolved": "https://registry.npmmirror.com/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.4.16.tgz", - "integrity": "sha512-slterMlxAhov/DZO8NScf6mEeMBBXodFUolijDvrtTxyezyLoTQaa73FyYus/VbTdftd8wBgBxPMRk3poleXNQ==", + "version": "0.4.18", + "resolved": "https://registry.npmmirror.com/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.4.18.tgz", + "integrity": "sha512-IRGEoFn3OKalm3hjfolEWGqoF/jPqeEYFp+C8B0WMzwGwBMvlRDQd06kghDhF0C61uJ6WfSDhEZE/sAQjduKgw==", "dev": true, "peerDependencies": { "eslint": ">=8.40" } }, "node_modules/eslint-plugin-tailwindcss": { - "version": "3.17.5", - "resolved": "https://registry.npmmirror.com/eslint-plugin-tailwindcss/-/eslint-plugin-tailwindcss-3.17.5.tgz", - "integrity": "sha512-8Mi7p7dm+mO1dHgRHHFdPu4RDTBk69Cn4P0B40vRQR+MrguUpwmKwhZy1kqYe3Km8/4nb+cyrCF+5SodOEmaow==", + "version": "3.18.0", + "resolved": "https://registry.npmmirror.com/eslint-plugin-tailwindcss/-/eslint-plugin-tailwindcss-3.18.0.tgz", + "integrity": "sha512-PQDU4ZMzFH0eb2DrfHPpbgo87Zgg2EXSMOj1NSfzdZm+aJzpuwGerfowMIaVehSREEa0idbf/eoNYAOHSJoDAQ==", "dev": true, "dependencies": { "fast-glob": "^3.2.5", @@ -5183,6 +5183,11 @@ "node": "^10.12.0 || >=12.0.0" } }, + "node_modules/file-saver": { + "version": "2.0.5", + "resolved": "https://registry.npmmirror.com/file-saver/-/file-saver-2.0.5.tgz", + "integrity": "sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA==" + }, "node_modules/fill-range": { "version": "7.1.1", "resolved": "https://registry.npmmirror.com/fill-range/-/fill-range-7.1.1.tgz", @@ -5270,9 +5275,9 @@ } }, "node_modules/fs-extra": { - "version": "11.2.0", - "resolved": "https://registry.npmmirror.com/fs-extra/-/fs-extra-11.2.0.tgz", - "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", + "version": "11.3.0", + "resolved": "https://registry.npmmirror.com/fs-extra/-/fs-extra-11.3.0.tgz", + "integrity": "sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew==", "dev": true, "dependencies": { "graceful-fs": "^4.2.0", @@ -5594,9 +5599,9 @@ } }, "node_modules/i18next": { - "version": "24.2.0", - "resolved": "https://registry.npmmirror.com/i18next/-/i18next-24.2.0.tgz", - "integrity": "sha512-ArJJTS1lV6lgKH7yEf4EpgNZ7+THl7bsGxxougPYiXRTJ/Fe1j08/TBpV9QsXCIYVfdE/HWG/xLezJ5DOlfBOA==", + "version": "24.2.1", + "resolved": "https://registry.npmmirror.com/i18next/-/i18next-24.2.1.tgz", + "integrity": "sha512-Q2wC1TjWcSikn1VAJg13UGIjc+okpFxQTxjVAymOnSA3RpttBQNMPf2ovcgoFVsV4QNxTfNZMAxorXZXsk4fBA==", "funding": [ { "type": "individual", @@ -5640,11 +5645,6 @@ "node": ">= 4" } }, - "node_modules/immediate": { - "version": "3.0.6", - "resolved": "https://registry.npmmirror.com/immediate/-/immediate-3.0.6.tgz", - "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==" - }, "node_modules/immer": { "version": "10.1.1", "resolved": "https://registry.npmmirror.com/immer/-/immer-10.1.1.tgz", @@ -5693,7 +5693,8 @@ "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmmirror.com/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true }, "node_modules/internal-slot": { "version": "1.1.0", @@ -6100,11 +6101,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" - }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmmirror.com/isexe/-/isexe-2.0.0.tgz", @@ -6222,17 +6218,6 @@ "graceful-fs": "^4.1.6" } }, - "node_modules/jszip": { - "version": "3.10.1", - "resolved": "https://registry.npmmirror.com/jszip/-/jszip-3.10.1.tgz", - "integrity": "sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==", - "dependencies": { - "lie": "~3.3.0", - "pako": "~1.0.2", - "readable-stream": "~2.3.6", - "setimmediate": "^1.0.5" - } - }, "node_modules/keyv": { "version": "4.5.4", "resolved": "https://registry.npmmirror.com/keyv/-/keyv-4.5.4.tgz", @@ -6255,14 +6240,6 @@ "node": ">= 0.8.0" } }, - "node_modules/lie": { - "version": "3.3.0", - "resolved": "https://registry.npmmirror.com/lie/-/lie-3.3.0.tgz", - "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", - "dependencies": { - "immediate": "~3.0.5" - } - }, "node_modules/lilconfig": { "version": "3.1.3", "resolved": "https://registry.npmmirror.com/lilconfig/-/lilconfig-3.1.3.tgz", @@ -6338,9 +6315,9 @@ } }, "node_modules/lucide-react": { - "version": "0.469.0", - "resolved": "https://registry.npmmirror.com/lucide-react/-/lucide-react-0.469.0.tgz", - "integrity": "sha512-28vvUnnKQ/dBwiCQtwJw7QauYnE7yd2Cyp4tTTJpvglX4EMpbflcdBgrgToX2j71B3YvugK/NH3BGUk+E/p/Fw==", + "version": "0.473.0", + "resolved": "https://registry.npmmirror.com/lucide-react/-/lucide-react-0.473.0.tgz", + "integrity": "sha512-KW6u5AKeIjkvrxXZ6WuCu9zHE/gEYSXCay+Gre2ZoInD0Je/e3RBtP4OHpJVJ40nDklSvjVKjgH7VU8/e2dzRw==", "peerDependencies": { "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" } @@ -6610,11 +6587,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/omit.js": { - "version": "2.0.2", - "resolved": "https://registry.npmmirror.com/omit.js/-/omit.js-2.0.2.tgz", - "integrity": "sha512-hJmu9D+bNB40YpL9jYebQl4lsTW6yEHRTroJzNLqQJYHm7c+NQnJGfZmIWh8S3q3KoaxV1aLhV6B3+0N0/kyJg==" - }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmmirror.com/once/-/once-1.4.0.tgz", @@ -6694,11 +6666,6 @@ "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==", "dev": true }, - "node_modules/pako": { - "version": "1.0.11", - "resolved": "https://registry.npmmirror.com/pako/-/pako-1.0.11.tgz", - "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==" - }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmmirror.com/parent-module/-/parent-module-1.0.1.tgz", @@ -6767,9 +6734,9 @@ "dev": true }, "node_modules/path-to-regexp": { - "version": "8.0.0", - "resolved": "https://registry.npmmirror.com/path-to-regexp/-/path-to-regexp-8.0.0.tgz", - "integrity": "sha512-GAWaqWlTjYK/7SVpIUA6CTxmcg65SP30sbjdCvyYReosRkk7Z/LyHWwkK3Vu0FcIi0FNTADUs4eh1AsU5s10cg==", + "version": "8.2.0", + "resolved": "https://registry.npmmirror.com/path-to-regexp/-/path-to-regexp-8.2.0.tgz", + "integrity": "sha512-TdrF7fW9Rphjq4RjrW0Kp2AW0Ahwu9sRGTkS6bvDi0SCwZlEZYmcfDbEsTz8RVk0EHIS/Vd1bv3JhG+1xZuAyQ==", "engines": { "node": ">=16" } @@ -6811,9 +6778,9 @@ } }, "node_modules/pocketbase": { - "version": "0.21.5", - "resolved": "https://registry.npmmirror.com/pocketbase/-/pocketbase-0.21.5.tgz", - "integrity": "sha512-bnI/uinnQps+ElSlzxkc4yvwuSFfKcoszDtXH/4QT2FhGq2mJVUvDlxn+rjRXVntUjPfmMG5LEPZ1eGqV6ssog==" + "version": "0.25.0", + "resolved": "https://registry.npmmirror.com/pocketbase/-/pocketbase-0.25.0.tgz", + "integrity": "sha512-xbjiQG/tnh2HsjZrTW7ZEJASvl4hmGAB5PQAmNRkRU8BmrPib7zwKyXdiYJl34QN7ADpqykZD2lAMdDtrrQbuw==" }, "node_modules/possible-typed-array-names": { "version": "1.0.0", @@ -6825,9 +6792,9 @@ } }, "node_modules/postcss": { - "version": "8.4.49", - "resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.4.49.tgz", - "integrity": "sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==", + "version": "8.5.1", + "resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.5.1.tgz", + "integrity": "sha512-6oz2beyjc5VMn/KV1pPw8fliQkhBXrVn1Z3TVyqZxU8kZpzEKhBdmCFqI6ZbmGtamQvQGuU1sgPTk8ZrXDD7jQ==", "dev": true, "funding": [ { @@ -6844,7 +6811,7 @@ } ], "dependencies": { - "nanoid": "^3.3.7", + "nanoid": "^3.3.8", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" }, @@ -6968,9 +6935,9 @@ "dev": true }, "node_modules/postcss/node_modules/nanoid": { - "version": "3.3.7", - "resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "version": "3.3.8", + "resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.8.tgz", + "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", "dev": true, "funding": [ { @@ -7021,11 +6988,6 @@ "node": ">=6.0.0" } }, - "node_modules/process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" - }, "node_modules/prop-types": { "version": "15.8.1", "resolved": "https://registry.npmmirror.com/prop-types/-/prop-types-15.8.1.tgz", @@ -7079,14 +7041,14 @@ } }, "node_modules/rc-cascader": { - "version": "3.30.0", - "resolved": "https://registry.npmmirror.com/rc-cascader/-/rc-cascader-3.30.0.tgz", - "integrity": "sha512-rrzSbk1Bdqbu+pDwiLCLHu72+lwX9BZ28+JKzoi0DWZ4N29QYFeip8Gctl33QVd2Xg3Rf14D3yAOG76ElJw16w==", + "version": "3.33.0", + "resolved": "https://registry.npmmirror.com/rc-cascader/-/rc-cascader-3.33.0.tgz", + "integrity": "sha512-JvZrMbKBXIbEDmpIORxqvedY/bck6hGbs3hxdWT8eS9wSQ1P7//lGxbyKjOSyQiVBbgzNWriSe6HoMcZO/+0rQ==", "dependencies": { "@babel/runtime": "^7.25.7", "classnames": "^2.3.1", "rc-select": "~14.16.2", - "rc-tree": "~5.10.1", + "rc-tree": "~5.13.0", "rc-util": "^5.43.0" }, "peerDependencies": { @@ -7095,9 +7057,9 @@ } }, "node_modules/rc-checkbox": { - "version": "3.3.0", - "resolved": "https://registry.npmmirror.com/rc-checkbox/-/rc-checkbox-3.3.0.tgz", - "integrity": "sha512-Ih3ZaAcoAiFKJjifzwsGiT/f/quIkxJoklW4yKGho14Olulwn8gN7hOBve0/WGDg5o/l/5mL0w7ff7/YGvefVw==", + "version": "3.5.0", + "resolved": "https://registry.npmmirror.com/rc-checkbox/-/rc-checkbox-3.5.0.tgz", + "integrity": "sha512-aOAQc3E98HteIIsSqm6Xk2FPKIER6+5vyEFMZfo73TqM+VVAIqOkHoPjgKLqSNtVLWScoaM7vY2ZrGEheI79yg==", "dependencies": { "@babel/runtime": "^7.10.1", "classnames": "^2.3.2", @@ -7205,9 +7167,9 @@ } }, "node_modules/rc-input": { - "version": "1.6.4", - "resolved": "https://registry.npmmirror.com/rc-input/-/rc-input-1.6.4.tgz", - "integrity": "sha512-lBZhfRD4NSAUW0zOKLUeI6GJuXkxeZYi0hr8VcJgJpyTNOvHw1ysrKWAHcEOAAHj7guxgmWYSi6xWrEdfrSAsA==", + "version": "1.7.2", + "resolved": "https://registry.npmmirror.com/rc-input/-/rc-input-1.7.2.tgz", + "integrity": "sha512-g3nYONnl4edWj2FfVoxsU3Ec4XTE+Hb39Kfh2MFxMZjp/0gGyPUgy/v7ZhS27ZxUFNkuIDYXm9PJsLyJbtg86A==", "dependencies": { "@babel/runtime": "^7.11.1", "classnames": "^2.2.1", @@ -7219,14 +7181,14 @@ } }, "node_modules/rc-input-number": { - "version": "9.3.0", - "resolved": "https://registry.npmmirror.com/rc-input-number/-/rc-input-number-9.3.0.tgz", - "integrity": "sha512-JQ363ywqRyxwgVxpg2z2kja3CehTpYdqR7emJ/6yJjRdbvo+RvfE83fcpBCIJRq3zLp8SakmEXq60qzWyZ7Usw==", + "version": "9.4.0", + "resolved": "https://registry.npmmirror.com/rc-input-number/-/rc-input-number-9.4.0.tgz", + "integrity": "sha512-Tiy4DcXcFXAf9wDhN8aUAyMeCLHJUHA/VA/t7Hj8ZEx5ETvxG7MArDOSE6psbiSCo+vJPm4E3fGN710ITVn6GA==", "dependencies": { "@babel/runtime": "^7.10.1", "@rc-component/mini-decimal": "^1.0.1", "classnames": "^2.2.5", - "rc-input": "~1.6.0", + "rc-input": "~1.7.1", "rc-util": "^5.40.1" }, "peerDependencies": { @@ -7235,16 +7197,16 @@ } }, "node_modules/rc-mentions": { - "version": "2.17.0", - "resolved": "https://registry.npmmirror.com/rc-mentions/-/rc-mentions-2.17.0.tgz", - "integrity": "sha512-sfHy+qLvc+p8jx8GUsujZWXDOIlIimp6YQz7N5ONQ6bHsa2kyG+BLa5k2wuxgebBbH97is33wxiyq5UkiXRpHA==", + "version": "2.19.1", + "resolved": "https://registry.npmmirror.com/rc-mentions/-/rc-mentions-2.19.1.tgz", + "integrity": "sha512-KK3bAc/bPFI993J3necmaMXD2reZTzytZdlTvkeBbp50IGH1BDPDvxLdHDUrpQx2b2TGaVJsn+86BvYa03kGqA==", "dependencies": { "@babel/runtime": "^7.22.5", "@rc-component/trigger": "^2.0.0", "classnames": "^2.2.6", - "rc-input": "~1.6.0", + "rc-input": "~1.7.1", "rc-menu": "~9.16.0", - "rc-textarea": "~1.8.0", + "rc-textarea": "~1.9.0", "rc-util": "^5.34.1" }, "peerDependencies": { @@ -7302,9 +7264,9 @@ } }, "node_modules/rc-overflow": { - "version": "1.3.2", - "resolved": "https://registry.npmmirror.com/rc-overflow/-/rc-overflow-1.3.2.tgz", - "integrity": "sha512-nsUm78jkYAoPygDAcGZeC2VwIg/IBGSodtOY3pMof4W3M9qRJgqaDYm03ZayHlde3I6ipliAxbN0RUcGf5KOzw==", + "version": "1.4.1", + "resolved": "https://registry.npmmirror.com/rc-overflow/-/rc-overflow-1.4.1.tgz", + "integrity": "sha512-3MoPQQPV1uKyOMVNd6SZfONi+f3st0r8PksexIdBTeIYbMX0Jr+k7pHEDvsXtR4BpCv90/Pv2MovVNhktKrwvw==", "dependencies": { "@babel/runtime": "^7.11.1", "classnames": "^2.2.1", @@ -7331,9 +7293,9 @@ } }, "node_modules/rc-picker": { - "version": "4.8.3", - "resolved": "https://registry.npmmirror.com/rc-picker/-/rc-picker-4.8.3.tgz", - "integrity": "sha512-hJ45qoEs4mfxXPAJdp1n3sKwADul874Cd0/HwnsEOE60H+tgiJUGgbOD62As3EG/rFVNS5AWRfBCDJJfmRqOVQ==", + "version": "4.9.2", + "resolved": "https://registry.npmmirror.com/rc-picker/-/rc-picker-4.9.2.tgz", + "integrity": "sha512-SLW4PRudODOomipKI0dvykxW4P8LOqtMr17MOaLU6NQJhkh9SZeh44a/8BMxwv5T6e3kiIeYc9k5jFg2Mv35Pg==", "dependencies": { "@babel/runtime": "^7.24.7", "@rc-component/trigger": "^2.0.0", @@ -7415,9 +7377,9 @@ } }, "node_modules/rc-segmented": { - "version": "2.5.0", - "resolved": "https://registry.npmmirror.com/rc-segmented/-/rc-segmented-2.5.0.tgz", - "integrity": "sha512-B28Fe3J9iUFOhFJET3RoXAPFJ2u47QvLSYcZWC4tFYNGPEjug5LAxEasZlA/PpAxhdOPqGWsGbSj7ftneukJnw==", + "version": "2.7.0", + "resolved": "https://registry.npmmirror.com/rc-segmented/-/rc-segmented-2.7.0.tgz", + "integrity": "sha512-liijAjXz+KnTRVnxxXG2sYDGd6iLL7VpGGdR8gwoxAXy2KglviKCxLWZdjKYJzYzGSUwKDSTdYk8brj54Bn5BA==", "dependencies": { "@babel/runtime": "^7.11.1", "classnames": "^2.2.1", @@ -7430,9 +7392,9 @@ } }, "node_modules/rc-select": { - "version": "14.16.4", - "resolved": "https://registry.npmmirror.com/rc-select/-/rc-select-14.16.4.tgz", - "integrity": "sha512-jP6qf7+vjnxGvPpfPWbGYfFlSl3h8L2XcD4O7g2GYXmEeBC0mw+nPD7i++OOE8v3YGqP8xtYjRKAWCMLfjgxlw==", + "version": "14.16.6", + "resolved": "https://registry.npmmirror.com/rc-select/-/rc-select-14.16.6.tgz", + "integrity": "sha512-YPMtRPqfZWOm2XGTbx5/YVr1HT0vn//8QS77At0Gjb3Lv+Lbut0IORJPKLWu1hQ3u4GsA0SrDzs7nI8JG7Zmyg==", "dependencies": { "@babel/runtime": "^7.10.1", "@rc-component/trigger": "^2.1.1", @@ -7451,9 +7413,9 @@ } }, "node_modules/rc-slider": { - "version": "11.1.7", - "resolved": "https://registry.npmmirror.com/rc-slider/-/rc-slider-11.1.7.tgz", - "integrity": "sha512-ytYbZei81TX7otdC0QvoYD72XSlxvTihNth5OeZ6PMXyEDq/vHdWFulQmfDGyXK1NwKwSlKgpvINOa88uT5g2A==", + "version": "11.1.8", + "resolved": "https://registry.npmmirror.com/rc-slider/-/rc-slider-11.1.8.tgz", + "integrity": "sha512-2gg/72YFSpKP+Ja5AjC5DPL1YnV8DEITDQrcc1eASrUYjl0esptaBVJBh5nLTXCCp15eD8EuGjwezVGSHhs9tQ==", "dependencies": { "@babel/runtime": "^7.10.1", "classnames": "^2.2.5", @@ -7499,15 +7461,15 @@ } }, "node_modules/rc-table": { - "version": "7.49.0", - "resolved": "https://registry.npmmirror.com/rc-table/-/rc-table-7.49.0.tgz", - "integrity": "sha512-/FoPLX94muAQOxVpi1jhnpKjOIqUbT81eELQPAzSXOke4ky4oCWYUXOcVpL31ZCO90xScwVSXRd7coqtgtB1Ng==", + "version": "7.50.2", + "resolved": "https://registry.npmmirror.com/rc-table/-/rc-table-7.50.2.tgz", + "integrity": "sha512-+nJbzxzstBriLb5sr9U7Vjs7+4dO8cWlouQbMwBVYghk2vr508bBdkHJeP/z9HVjAIKmAgMQKxmtbgDd3gc5wA==", "dependencies": { "@babel/runtime": "^7.10.1", "@rc-component/context": "^1.4.0", "classnames": "^2.2.5", "rc-resize-observer": "^1.1.0", - "rc-util": "^5.41.0", + "rc-util": "^5.44.3", "rc-virtual-list": "^3.14.2" }, "engines": { @@ -7519,9 +7481,9 @@ } }, "node_modules/rc-tabs": { - "version": "15.4.0", - "resolved": "https://registry.npmmirror.com/rc-tabs/-/rc-tabs-15.4.0.tgz", - "integrity": "sha512-llKuyiAVqmXm2z7OrmhX5cNb2ueZaL8ZyA2P4R+6/72NYYcbEgOXibwHiQCFY2RiN3swXl53SIABi2CumUS02g==", + "version": "15.5.0", + "resolved": "https://registry.npmmirror.com/rc-tabs/-/rc-tabs-15.5.0.tgz", + "integrity": "sha512-NrDcTaUJLh9UuDdMBkjKTn97U9iXG44s9D03V5NHkhEDWO5/nC6PwC3RhkCWFMKB9hh+ryqgZ+TIr1b9Jd/hnQ==", "dependencies": { "@babel/runtime": "^7.11.2", "classnames": "2.x", @@ -7540,13 +7502,13 @@ } }, "node_modules/rc-textarea": { - "version": "1.8.2", - "resolved": "https://registry.npmmirror.com/rc-textarea/-/rc-textarea-1.8.2.tgz", - "integrity": "sha512-UFAezAqltyR00a8Lf0IPAyTd29Jj9ee8wt8DqXyDMal7r/Cg/nDt3e1OOv3Th4W6mKaZijjgwuPXhAfVNTN8sw==", + "version": "1.9.0", + "resolved": "https://registry.npmmirror.com/rc-textarea/-/rc-textarea-1.9.0.tgz", + "integrity": "sha512-dQW/Bc/MriPBTugj2Kx9PMS5eXCCGn2cxoIaichjbNvOiARlaHdI99j4DTxLl/V8+PIfW06uFy7kjfUIDDKyxQ==", "dependencies": { "@babel/runtime": "^7.10.1", "classnames": "^2.2.1", - "rc-input": "~1.6.0", + "rc-input": "~1.7.1", "rc-resize-observer": "^1.0.0", "rc-util": "^5.27.0" }, @@ -7556,9 +7518,9 @@ } }, "node_modules/rc-tooltip": { - "version": "6.2.1", - "resolved": "https://registry.npmmirror.com/rc-tooltip/-/rc-tooltip-6.2.1.tgz", - "integrity": "sha512-rws0duD/3sHHsD905Nex7FvoUGy2UBQRhTkKxeEvr2FB+r21HsOxcDJI0TzyO8NHhnAA8ILr8pfbSBg5Jj5KBg==", + "version": "6.3.2", + "resolved": "https://registry.npmmirror.com/rc-tooltip/-/rc-tooltip-6.3.2.tgz", + "integrity": "sha512-oA4HZIiZJbUQ5ojigM0y4XtWxaH/aQlJSzknjICRWNpqyemy1sL3X3iEQV2eSPBWEq+bqU3+aSs81z+28j9luA==", "dependencies": { "@babel/runtime": "^7.11.2", "@rc-component/trigger": "^2.0.0", @@ -7570,9 +7532,9 @@ } }, "node_modules/rc-tree": { - "version": "5.10.1", - "resolved": "https://registry.npmmirror.com/rc-tree/-/rc-tree-5.10.1.tgz", - "integrity": "sha512-FPXb3tT/u39mgjr6JNlHaUTYfHkVGW56XaGDahDpEFLGsnPxGcVLNTjcqoQb/GNbSCycl7tD7EvIymwOTP0+Yw==", + "version": "5.13.0", + "resolved": "https://registry.npmmirror.com/rc-tree/-/rc-tree-5.13.0.tgz", + "integrity": "sha512-2+lFvoVRnvHQ1trlpXMOWtF8BUgF+3TiipG72uOfhpL5CUdXCk931kvDdUkTL/IZVtNEDQKwEEmJbAYJSA5NnA==", "dependencies": { "@babel/runtime": "^7.10.1", "classnames": "2.x", @@ -7589,14 +7551,14 @@ } }, "node_modules/rc-tree-select": { - "version": "5.24.5", - "resolved": "https://registry.npmmirror.com/rc-tree-select/-/rc-tree-select-5.24.5.tgz", - "integrity": "sha512-PnyR8LZJWaiEFw0SHRqo4MNQWyyZsyMs8eNmo68uXZWjxc7QqeWcjPPoONN0rc90c3HZqGF9z+Roz+GLzY5GXA==", + "version": "5.27.0", + "resolved": "https://registry.npmmirror.com/rc-tree-select/-/rc-tree-select-5.27.0.tgz", + "integrity": "sha512-2qTBTzwIT7LRI1o7zLyrCzmo5tQanmyGbSaGTIf7sYimCklAToVVfpMC6OAldSKolcnjorBYPNSKQqJmN3TCww==", "dependencies": { "@babel/runtime": "^7.25.7", "classnames": "2.x", "rc-select": "~14.16.2", - "rc-tree": "~5.10.1", + "rc-tree": "~5.13.0", "rc-util": "^5.43.0" }, "peerDependencies": { @@ -7632,9 +7594,9 @@ } }, "node_modules/rc-virtual-list": { - "version": "3.15.0", - "resolved": "https://registry.npmmirror.com/rc-virtual-list/-/rc-virtual-list-3.15.0.tgz", - "integrity": "sha512-dF2YQztqrU3ijAeWOqscTshCEr7vpimzSqAVjO1AyAmaqcHulaXpnGR0ptK5PXfxTUy48VkJOiglMIxlkYGs0w==", + "version": "3.17.1", + "resolved": "https://registry.npmmirror.com/rc-virtual-list/-/rc-virtual-list-3.17.1.tgz", + "integrity": "sha512-n9rKy6BB/Hi/LsOJr9ILpeFxDJfAIYzFYX1famZb0KLQrlsdxNBDsBjBY9lblJ35MTRJwi06ohv5ma9uTUeLog==", "dependencies": { "@babel/runtime": "^7.20.0", "classnames": "^2.2.6", @@ -7730,9 +7692,9 @@ } }, "node_modules/react-router": { - "version": "7.1.1", - "resolved": "https://registry.npmmirror.com/react-router/-/react-router-7.1.1.tgz", - "integrity": "sha512-39sXJkftkKWRZ2oJtHhCxmoCrBCULr/HAH4IT5DHlgu/Q0FCPV0S4Lx+abjDTx/74xoZzNYDYbOZWlJjruyuDQ==", + "version": "7.1.3", + "resolved": "https://registry.npmmirror.com/react-router/-/react-router-7.1.3.tgz", + "integrity": "sha512-EezYymLY6Guk/zLQ2vRA8WvdUhWFEj5fcE3RfWihhxXBW7+cd1LsIiA3lmx+KCmneAGQuyBv820o44L2+TtkSA==", "dependencies": { "@types/cookie": "^0.6.0", "cookie": "^1.0.1", @@ -7753,11 +7715,11 @@ } }, "node_modules/react-router-dom": { - "version": "7.1.1", - "resolved": "https://registry.npmmirror.com/react-router-dom/-/react-router-dom-7.1.1.tgz", - "integrity": "sha512-vSrQHWlJ5DCfyrhgo0k6zViOe9ToK8uT5XGSmnuC2R3/g261IdIMpZVqfjD6vWSXdnf5Czs4VA/V60oVR6/jnA==", + "version": "7.1.3", + "resolved": "https://registry.npmmirror.com/react-router-dom/-/react-router-dom-7.1.3.tgz", + "integrity": "sha512-qQGTE+77hleBzv9SIUIkGRvuFBQGagW+TQKy53UTZAO/3+YFNBYvRsNIZ1GT17yHbc63FylMOdS+m3oUriF1GA==", "dependencies": { - "react-router": "7.1.1" + "react-router": "7.1.3" }, "engines": { "node": ">=20.0.0" @@ -7784,20 +7746,6 @@ "pify": "^2.3.0" } }, - "node_modules/readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmmirror.com/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmmirror.com/readdirp/-/readdirp-3.6.0.tgz", @@ -8081,11 +8029,6 @@ "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", "dev": true }, - "node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, "node_modules/safe-push-apply": { "version": "1.0.0", "resolved": "https://registry.npmmirror.com/safe-push-apply/-/safe-push-apply-1.0.0.tgz", @@ -8209,11 +8152,6 @@ "node": ">= 0.4" } }, - "node_modules/setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmmirror.com/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==" - }, "node_modules/shallowequal": { "version": "1.1.0", "resolved": "https://registry.npmmirror.com/shallowequal/-/shallowequal-1.1.0.tgz", @@ -8360,14 +8298,6 @@ "integrity": "sha512-LjdcbuBeLcdETCrPn9i8AYAZ1eCtu4ECAWtP7UleOiZ9LzVxRzzUZEoZ8zB24nhkQnDWyET0I+3sWokSDS3E7g==", "dev": true }, - "node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmmirror.com/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, "node_modules/string-convert": { "version": "0.2.1", "resolved": "https://registry.npmmirror.com/string-convert/-/string-convert-0.2.1.tgz", @@ -8600,15 +8530,15 @@ } }, "node_modules/swr": { - "version": "2.2.5", - "resolved": "https://registry.npmmirror.com/swr/-/swr-2.2.5.tgz", - "integrity": "sha512-QtxqyclFeAsxEUeZIYmsaQ0UjimSq1RZ9Un7I68/0ClKK/U3LoyQunwkQfJZr2fc22DfIXLNDc2wFyTEikCUpg==", + "version": "2.3.0", + "resolved": "https://registry.npmmirror.com/swr/-/swr-2.3.0.tgz", + "integrity": "sha512-NyZ76wA4yElZWBHzSgEJc28a0u6QZvhb6w0azeL2k7+Q1gAzVK+IqQYXhVOC/mzi+HZIozrZvBVeSeOZNR2bqA==", "dependencies": { - "client-only": "^0.0.1", - "use-sync-external-store": "^1.2.0" + "dequal": "^2.0.3", + "use-sync-external-store": "^1.4.0" }, "peerDependencies": { - "react": "^16.11.0 || ^17.0.0 || ^18.0.0" + "react": "^16.11.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "node_modules/synckit": { @@ -8772,15 +8702,15 @@ "integrity": "sha512-BiZS+C1OS8g/q2RRbJmy59xpyghNBqrr6k5L/uKBGRsTfxmu3ffiRnd8mlGPUVayg8pvfi5urfnu8TU7DVOkLQ==" }, "node_modules/ts-api-utils": { - "version": "1.4.3", - "resolved": "https://registry.npmmirror.com/ts-api-utils/-/ts-api-utils-1.4.3.tgz", - "integrity": "sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==", + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/ts-api-utils/-/ts-api-utils-2.0.0.tgz", + "integrity": "sha512-xCt/TOAc+EOHS1XPnijD3/yzpH6qg2xppZO1YDqGoVsNXfQfzHpOdNuXwrwOU8u4ITXJyDCTyt8w5g1sZv9ynQ==", "dev": true, "engines": { - "node": ">=16" + "node": ">=18.12" }, "peerDependencies": { - "typescript": ">=4.2.0" + "typescript": ">=4.8.4" } }, "node_modules/ts-interface-checker": { @@ -8922,9 +8852,9 @@ } }, "node_modules/typescript": { - "version": "5.7.2", - "resolved": "https://registry.npmmirror.com/typescript/-/typescript-5.7.2.tgz", - "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", + "version": "5.7.3", + "resolved": "https://registry.npmmirror.com/typescript/-/typescript-5.7.3.tgz", + "integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==", "devOptional": true, "bin": { "tsc": "bin/tsc", @@ -9047,22 +8977,23 @@ } }, "node_modules/use-sync-external-store": { - "version": "1.2.2", - "resolved": "https://registry.npmmirror.com/use-sync-external-store/-/use-sync-external-store-1.2.2.tgz", - "integrity": "sha512-PElTlVMwpblvbNqQ82d2n6RjStvdSoNe9FG28kNfz3WiXilJm4DdNkEzRhCZuIDwY8U08WVihhGR5iRqAwfDiw==", + "version": "1.4.0", + "resolved": "https://registry.npmmirror.com/use-sync-external-store/-/use-sync-external-store-1.4.0.tgz", + "integrity": "sha512-9WXSPC5fMv61vaupRkCKCxsPxBocVnwakBEkMIHHpkTTg6icbJtg6jzgtLDm4bl3cSHAca52rYWih0k4K3PfHw==", "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmmirror.com/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true }, "node_modules/vite": { - "version": "6.0.6", - "resolved": "https://registry.npmmirror.com/vite/-/vite-6.0.6.tgz", - "integrity": "sha512-NSjmUuckPmDU18bHz7QZ+bTYhRR0iA72cs2QAxCqDpafJ0S6qetco0LB3WW2OxlMHS0JmAv+yZ/R3uPmMyGTjQ==", + "version": "6.0.7", + "resolved": "https://registry.npmmirror.com/vite/-/vite-6.0.7.tgz", + "integrity": "sha512-RDt8r/7qx9940f8FcOIAH9PTViRrghKaK2K1jY3RaAURrEUbm9Du1mJ72G+jlhtG3WwodnfzY8ORQZbBavZEAQ==", "dev": true, "dependencies": { "esbuild": "^0.24.2", @@ -9432,9 +9363,9 @@ } }, "node_modules/zustand": { - "version": "5.0.2", - "resolved": "https://registry.npmmirror.com/zustand/-/zustand-5.0.2.tgz", - "integrity": "sha512-8qNdnJVJlHlrKXi50LDqqUNmUbuBjoKLrYQBnoChIbVph7vni+sY+YpvdjXG9YLd/Bxr6scMcR+rm5H3aSqPaw==", + "version": "5.0.3", + "resolved": "https://registry.npmmirror.com/zustand/-/zustand-5.0.3.tgz", + "integrity": "sha512-14fwWQtU3pH4dE0dOpdMiWjddcH+QzKIgk1cl8epwSE7yag43k/AD/m4L6+K7DytAOr9gGBe3/EXj9g7cdostg==", "engines": { "node": ">=12.20.0" }, diff --git a/ui/package.json b/ui/package.json index 3d390b94..c5cafafc 100644 --- a/ui/package.json +++ b/ui/package.json @@ -11,52 +11,53 @@ }, "dependencies": { "@ant-design/icons": "^5.5.2", - "@ant-design/pro-components": "^2.8.2", + "@ant-design/pro-components": "^2.8.4", "ahooks": "^3.8.4", - "antd": "^5.22.7", - "antd-zod": "^6.0.0", + "antd": "^5.23.1", + "antd-zod": "^6.0.1", "cron-parser": "^4.9.0", - "i18next": "^24.2.0", + "file-saver": "^2.0.5", + "i18next": "^24.2.1", "i18next-browser-languagedetector": "^8.0.2", "immer": "^10.1.1", - "jszip": "^3.10.1", - "lucide-react": "^0.469.0", + "lucide-react": "^0.473.0", "nanoid": "^5.0.9", - "pocketbase": "^0.21.5", + "pocketbase": "^0.25.0", "radash": "^12.1.0", "react": "^18.3.1", "react-copy-to-clipboard": "^5.1.0", "react-dom": "^18.3.1", "react-i18next": "^15.4.0", - "react-router-dom": "^7.1.1", + "react-router-dom": "^7.1.3", "zod": "^3.24.1", - "zustand": "^5.0.2" + "zustand": "^5.0.3" }, "devDependencies": { + "@types/file-saver": "^2.0.7", "@types/fs-extra": "^11.0.4", - "@types/node": "^22.10.3", + "@types/node": "^22.10.7", "@types/react": "^18.3.12", "@types/react-copy-to-clipboard": "^5.0.7", "@types/react-dom": "^18.3.1", - "@typescript-eslint/eslint-plugin": "^8.19.0", - "@typescript-eslint/parser": "^8.19.0", + "@typescript-eslint/eslint-plugin": "^8.20.0", + "@typescript-eslint/parser": "^8.20.0", "@vitejs/plugin-legacy": "^6.0.0", "@vitejs/plugin-react": "^4.3.4", "autoprefixer": "^10.4.20", "eslint": "^8.57.0", - "eslint-config-prettier": "^9.1.0", + "eslint-config-prettier": "^10.0.1", "eslint-import-resolver-typescript": "^3.7.0", "eslint-plugin-import": "^2.31.0", - "eslint-plugin-prettier": "^5.2.1", + "eslint-plugin-prettier": "^5.2.2", "eslint-plugin-react-hooks": "^5.1.0", - "eslint-plugin-react-refresh": "^0.4.16", - "eslint-plugin-tailwindcss": "^3.17.5", - "fs-extra": "^11.2.0", - "postcss": "^8.4.49", + "eslint-plugin-react-refresh": "^0.4.18", + "eslint-plugin-tailwindcss": "^3.18.0", + "fs-extra": "^11.3.0", + "postcss": "^8.5.1", "prettier": "^3.4.2", "tailwindcss": "^3.4.17", "tailwindcss-animate": "^1.0.7", - "typescript": "^5.7.2", - "vite": "^6.0.6" + "typescript": "^5.7.3", + "vite": "^6.0.7" } } diff --git a/ui/src/api/certificates.ts b/ui/src/api/certificates.ts new file mode 100644 index 00000000..b8764d0a --- /dev/null +++ b/ui/src/api/certificates.ts @@ -0,0 +1,24 @@ +import { ClientResponseError } from "pocketbase"; + +import { type CertificateFormatType } from "@/domain/certificate"; +import { getPocketBase } from "@/repository/_pocketbase"; + +export const archive = async (id: string, format?: CertificateFormatType) => { + const pb = getPocketBase(); + + const resp = await pb.send(`/api/certificates/${encodeURIComponent(id)}/archive`, { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: { + format: format, + }, + }); + + if (resp.code != 0) { + throw new ClientResponseError({ status: resp.code, response: resp, data: {} }); + } + + return resp; +}; diff --git a/ui/src/api/notify.ts b/ui/src/api/notify.ts index e0167175..b98a1610 100644 --- a/ui/src/api/notify.ts +++ b/ui/src/api/notify.ts @@ -1,6 +1,6 @@ import { ClientResponseError } from "pocketbase"; -import { getPocketBase } from "@/repository/pocketbase"; +import { getPocketBase } from "@/repository/_pocketbase"; export const notifyTest = async (channel: string) => { const pb = getPocketBase(); diff --git a/ui/src/api/statistics.ts b/ui/src/api/statistics.ts index f05dda0c..162e7a92 100644 --- a/ui/src/api/statistics.ts +++ b/ui/src/api/statistics.ts @@ -1,7 +1,7 @@ import { ClientResponseError } from "pocketbase"; import { type Statistics } from "@/domain/statistics"; -import { getPocketBase } from "@/repository/pocketbase"; +import { getPocketBase } from "@/repository/_pocketbase"; export const get = async () => { const pb = getPocketBase(); diff --git a/ui/src/api/workflow.ts b/ui/src/api/workflows.ts similarity index 75% rename from ui/src/api/workflow.ts rename to ui/src/api/workflows.ts index afead94e..4ad9e2d3 100644 --- a/ui/src/api/workflow.ts +++ b/ui/src/api/workflows.ts @@ -1,18 +1,17 @@ import { ClientResponseError } from "pocketbase"; import { WORKFLOW_TRIGGERS } from "@/domain/workflow"; -import { getPocketBase } from "@/repository/pocketbase"; +import { getPocketBase } from "@/repository/_pocketbase"; export const run = async (id: string) => { const pb = getPocketBase(); - const resp = await pb.send("/api/workflow/run", { + const resp = await pb.send(`/api/workflows/${encodeURIComponent(id)}/run`, { method: "POST", headers: { "Content-Type": "application/json", }, body: { - workflowId: id, trigger: WORKFLOW_TRIGGERS.MANUAL, }, }); diff --git a/ui/src/components/MultipleInput.tsx b/ui/src/components/MultipleInput.tsx index f1383e34..8931379c 100644 --- a/ui/src/components/MultipleInput.tsx +++ b/ui/src/components/MultipleInput.tsx @@ -52,7 +52,7 @@ const MultipleInput = ({ draft.push(""); }); setValue(newValue); - setTimeout(() => itemRefs.current[newValue.length - 1]?.focus(), 0); + setTimeout(() => itemRefs.current[newValue.length - 1]?.focus(), 1); onValueCreate?.(newValue.length - 1); }; @@ -110,7 +110,7 @@ const MultipleInput = ({ draft.splice(index + 1, 0, ""); }); setValue(newValue); - setTimeout(() => itemRefs.current[index + 1]?.focus(), 0); + setTimeout(() => itemRefs.current[index + 1]?.focus(), 1); onValueCreate?.(index + 1); }; diff --git a/ui/src/components/certificate/CertificateDetail.tsx b/ui/src/components/certificate/CertificateDetail.tsx index b82cb8db..b782afb5 100644 --- a/ui/src/components/certificate/CertificateDetail.tsx +++ b/ui/src/components/certificate/CertificateDetail.tsx @@ -3,9 +3,10 @@ import { useTranslation } from "react-i18next"; import { CopyOutlined as CopyOutlinedIcon, DownOutlined as DownOutlinedIcon, LikeOutlined as LikeOutlinedIcon } from "@ant-design/icons"; import { Button, Dropdown, Form, Input, Space, Tooltip, message } from "antd"; import dayjs from "dayjs"; +import { saveAs } from "file-saver"; -import { type CertificateModel } from "@/domain/certificate"; -import { saveFiles2Zip } from "@/utils/file"; +import { archive as archiveCertificate } from "@/api/certificates"; +import { CERTIFICATE_FORMATS, type CertificateFormatType, type CertificateModel } from "@/domain/certificate"; export type CertificateDetailProps = { className?: string; @@ -18,20 +19,17 @@ const CertificateDetail = ({ data, ...props }: CertificateDetailProps) => { const [messageApi, MessageContextHolder] = message.useMessage(); - const handleDownloadPEMClick = async () => { - const zipName = `${data.id}-${data.subjectAltNames}.zip`; - const files = [ - { - name: `${data.subjectAltNames}.pem`, - content: data.certificate ?? "", - }, - { - name: `${data.subjectAltNames}.key`, - content: data.privateKey ?? "", - }, - ]; - - await saveFiles2Zip(zipName, files); + const handleDownloadClick = async (format: CertificateFormatType) => { + try { + const res = await archiveCertificate(data.id, format); + const bstr = atob(res.data); + const u8arr = Uint8Array.from(bstr, (ch) => ch.charCodeAt(0)); + const blob = new Blob([u8arr], { type: "application/zip" }); + saveAs(blob, `${data.id}-${data.subjectAltNames}.zip`); + } catch (err) { + console.log(err); + messageApi.warning(t("common.text.operation_failed")); + } }; return ( @@ -90,21 +88,17 @@ const CertificateDetail = ({ data, ...props }: CertificateDetailProps) => { key: "PEM", label: "PEM", extra: , - onClick: () => handleDownloadPEMClick(), + onClick: () => handleDownloadClick(CERTIFICATE_FORMATS.PEM), }, { key: "PFX", label: "PFX", - onClick: () => { - alert("TODO: 暂时不支持下载 PFX 证书"); - }, + onClick: () => handleDownloadClick(CERTIFICATE_FORMATS.PFX), }, { key: "JKS", label: "JKS", - onClick: () => { - alert("TODO: 暂时不支持下载 JKS 证书"); - }, + onClick: () => handleDownloadClick(CERTIFICATE_FORMATS.JKS), }, ], }} diff --git a/ui/src/components/workflow/WorkflowRunDetailDrawer.tsx b/ui/src/components/workflow/WorkflowRunDetailDrawer.tsx index 91fc54b9..5c052aa1 100644 --- a/ui/src/components/workflow/WorkflowRunDetailDrawer.tsx +++ b/ui/src/components/workflow/WorkflowRunDetailDrawer.tsx @@ -42,14 +42,14 @@ const WorkflowRunDetailDrawer = ({ data, loading, trigger, ...props }: WorkflowR
- {data!.logs.map((item, i) => { + {data!.logs?.map((item, i) => { return (
{item.nodeName}
- {item.outputs.map((output, j) => { + {item.outputs?.map((output, j) => { return ( -
+
[{dayjs(output.time).format("YYYY-MM-DD HH:mm:ss")}]
{output.error ?
{output.error}
:
{output.content}
}
diff --git a/ui/src/components/workflow/node/ApplyNodeConfigForm.tsx b/ui/src/components/workflow/node/ApplyNodeConfigForm.tsx index 67db24d2..5a3fb9f1 100644 --- a/ui/src/components/workflow/node/ApplyNodeConfigForm.tsx +++ b/ui/src/components/workflow/node/ApplyNodeConfigForm.tsx @@ -2,7 +2,22 @@ import { forwardRef, memo, useEffect, useImperativeHandle, useMemo, useState } f import { useTranslation } from "react-i18next"; import { FormOutlined as FormOutlinedIcon, PlusOutlined as PlusOutlinedIcon, QuestionCircleOutlined as QuestionCircleOutlinedIcon } from "@ant-design/icons"; import { useControllableValue } from "ahooks"; -import { AutoComplete, type AutoCompleteProps, Button, Divider, Form, type FormInstance, Input, Select, Space, Switch, Tooltip, Typography } from "antd"; +import { + AutoComplete, + type AutoCompleteProps, + Button, + Divider, + Flex, + Form, + type FormInstance, + Input, + InputNumber, + Select, + Space, + Switch, + Tooltip, + Typography, +} from "antd"; import { createSchemaFieldRule } from "antd-zod"; import { z } from "zod"; @@ -42,8 +57,8 @@ const MULTIPLE_INPUT_DELIMITER = ";"; const initFormModel = (): ApplyNodeConfigFormFieldValues => { return { keyAlgorithm: "RSA2048", - propagationTimeout: 60, disableFollowCNAME: true, + skipBeforeExpiryDays: 20, }; }; @@ -77,13 +92,24 @@ const ApplyNodeConfigForm = forwardRef validIPv4Address(e) || validIPv6Address(e) || validDomainName(e)); }, t("common.errmsg.host_invalid")), - propagationTimeout: z + dnsPropagationTimeout: z .union([ - z.number().int().gte(1, t("workflow_node.apply.form.propagation_timeout.placeholder")), - z.string().refine((v) => !v || /^[1-9]\d*$/.test(v), t("workflow_node.apply.form.propagation_timeout.placeholder")), + z.number().int().gte(1, t("workflow_node.apply.form.dns_propagation_timeout.placeholder")), + z.string().refine((v) => !v || /^[1-9]\d*$/.test(v), t("workflow_node.apply.form.dns_propagation_timeout.placeholder")), + ]) + .nullish(), + dnsTTL: z + .union([ + z.number().int().gte(1, t("workflow_node.apply.form.dns_ttl.placeholder")), + z.string().refine((v) => !v || /^[1-9]\d*$/.test(v), t("workflow_node.apply.form.dns_ttl.placeholder")), ]) .nullish(), disableFollowCNAME: z.boolean().nullish(), + skipBeforeExpiryDays: z + .number({ message: t("workflow_node.apply.form.skip_before_expiry_days.placeholder") }) + .int(t("workflow_node.apply.form.skip_before_expiry_days.placeholder")) + .gte(1, t("workflow_node.apply.form.skip_before_expiry_days.placeholder")) + .lte(60, t("workflow_node.apply.form.skip_before_expiry_days.placeholder")), }); const formRule = createSchemaFieldRule(formSchema); const { form: formInst, formProps } = useAntdForm({ @@ -313,18 +339,34 @@ const ApplyNodeConfigForm = forwardRef } + tooltip={} > + + + } + > + @@ -337,6 +379,33 @@ const ApplyNodeConfigForm = forwardRef + + + + {t("workflow_node.apply.form.strategy_config.label")} + + + +
+ } + > + +
{t("workflow_node.apply.form.skip_before_expiry_days.prefix")}
+ + + +
{t("workflow_node.apply.form.skip_before_expiry_days.suffix")}
+
+
+
); } diff --git a/ui/src/components/workflow/node/DeployNodeConfigForm.tsx b/ui/src/components/workflow/node/DeployNodeConfigForm.tsx index 77516024..9a9e22d2 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigForm.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigForm.tsx @@ -1,7 +1,7 @@ import { forwardRef, memo, useEffect, useImperativeHandle, useMemo, useState } from "react"; import { useTranslation } from "react-i18next"; import { PlusOutlined as PlusOutlinedIcon, QuestionCircleOutlined as QuestionCircleOutlinedIcon } from "@ant-design/icons"; -import { Button, Divider, Form, type FormInstance, Select, Tooltip, Typography } from "antd"; +import { Button, Divider, Flex, Form, type FormInstance, Select, Switch, Tooltip, Typography } from "antd"; import { createSchemaFieldRule } from "antd-zod"; import { z } from "zod"; @@ -65,7 +65,9 @@ export type DeployNodeConfigFormInstance = { }; const initFormModel = (): DeployNodeConfigFormFieldValues => { - return {}; + return { + skipOnLastSucceeded: true, + }; }; const DeployNodeConfigForm = forwardRef( @@ -91,6 +93,7 @@ const DeployNodeConfigForm = forwardRef !!formInst.getFieldValue("provider"), t("workflow_node.deploy.form.provider.placeholder")), providerConfig: z.any(), + skipOnLastSucceeded: z.boolean(), }); const formRule = createSchemaFieldRule(formSchema); const { form: formInst, formProps } = useAntdForm({ @@ -340,6 +343,27 @@ const DeployNodeConfigForm = forwardRef + + + + {t("workflow_node.deploy.form.strategy_config.label")} + + + +
+ + +
{t("workflow_node.deploy.form.skip_on_last_succeeded.prefix")}
+ + + +
{t("workflow_node.deploy.form.skip_on_last_succeeded.suffix")}
+
+
+
); } diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormAliyunOSSConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormAliyunOSSConfig.tsx index 156892f9..5cc1edd6 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormAliyunOSSConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormAliyunOSSConfig.tsx @@ -6,7 +6,7 @@ import { z } from "zod"; import { validDomainName } from "@/utils/validators"; type DeployNodeConfigFormAliyunOSSConfigFieldValues = Nullish<{ - endpoint: string; + region: string; bucket: string; domain: string; }>; @@ -33,9 +33,9 @@ const DeployNodeConfigFormAliyunOSSConfig = ({ const { t } = useTranslation(); const formSchema = z.object({ - endpoint: z - .string({ message: t("workflow_node.deploy.form.aliyun_oss_endpoint.placeholder") }) - .url(t("common.errmsg.url_invalid")) + region: z + .string({ message: t("workflow_node.deploy.form.aliyun_oss_region.placeholder") }) + .nonempty(t("workflow_node.deploy.form.aliyun_oss_region.placeholder")) .trim(), bucket: z .string({ message: t("workflow_node.deploy.form.aliyun_oss_bucket.placeholder") }) @@ -61,12 +61,12 @@ const DeployNodeConfigFormAliyunOSSConfig = ({ onValuesChange={handleFormChange} > } + tooltip={} > - + void; }; -const FORMAT_PEM = "PEM" as const; -const FORMAT_PFX = "PFX" as const; -const FORMAT_JKS = "JKS" as const; +const FORMAT_PEM = CERTIFICATE_FORMATS.PEM; +const FORMAT_PFX = CERTIFICATE_FORMATS.PFX; +const FORMAT_JKS = CERTIFICATE_FORMATS.JKS; const SHELLENV_SH = "sh" as const; const SHELLENV_CMD = "cmd" as const; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormSSHConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormSSHConfig.tsx index 77da315b..976ca079 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormSSHConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormSSHConfig.tsx @@ -5,6 +5,7 @@ import { createSchemaFieldRule } from "antd-zod"; import { z } from "zod"; import Show from "@/components/Show"; +import { CERTIFICATE_FORMATS } from "@/domain/certificate"; type DeployNodeConfigFormSSHConfigFieldValues = Nullish<{ format: string; @@ -26,9 +27,9 @@ export type DeployNodeConfigFormSSHConfigProps = { onValuesChange?: (values: DeployNodeConfigFormSSHConfigFieldValues) => void; }; -const FORMAT_PEM = "PEM" as const; -const FORMAT_PFX = "PFX" as const; -const FORMAT_JKS = "JKS" as const; +const FORMAT_PEM = CERTIFICATE_FORMATS.PEM; +const FORMAT_PFX = CERTIFICATE_FORMATS.PFX; +const FORMAT_JKS = CERTIFICATE_FORMATS.JKS; const initFormModel = (): DeployNodeConfigFormSSHConfigFieldValues => { return { diff --git a/ui/src/components/workflow/node/_SharedNode.tsx b/ui/src/components/workflow/node/_SharedNode.tsx index 39bd6119..868481ef 100644 --- a/ui/src/components/workflow/node/_SharedNode.tsx +++ b/ui/src/components/workflow/node/_SharedNode.tsx @@ -7,7 +7,7 @@ import { MoreOutlined as MoreOutlinedIcon, } from "@ant-design/icons"; import { useControllableValue } from "ahooks"; -import { Button, Card, Drawer, Dropdown, Input, Modal, Popover, Space } from "antd"; +import { Button, Card, Drawer, Dropdown, Input, type InputRef, Modal, Popover, Space } from "antd"; import { produce } from "immer"; import { isEqual } from "radash"; @@ -71,9 +71,10 @@ const SharedNodeMenu = ({ trigger, node, disabled, branchId, branchIndex, afterU const [modalApi, ModelContextHolder] = Modal.useModal(); + const nameInputRef = useRef(null); const nameRef = useRef(); - const handleRenameClick = async () => { + const handleRenameConfirm = async () => { const oldName = node.name; const newName = nameRef.current?.trim()?.substring(0, 64) || oldName; if (oldName === newName) { @@ -131,11 +132,12 @@ const SharedNodeMenu = ({ trigger, node, disabled, branchId, branchIndex, afterU content: (
setTimeout(() => ref?.focus({ cursor: "end" }), 0)} + ref={nameInputRef} + autoFocus defaultValue={node.name} onChange={(e) => (nameRef.current = e.target.value)} onPressEnter={async () => { - await handleRenameClick(); + await handleRenameConfirm(); dialog.destroy(); }} /> @@ -143,8 +145,9 @@ const SharedNodeMenu = ({ trigger, node, disabled, branchId, branchIndex, afterU ), icon: null, okText: t("common.button.save"), - onOk: handleRenameClick, + onOk: handleRenameConfirm, }); + setTimeout(() => nameInputRef.current?.focus(), 1); }, }, { diff --git a/ui/src/domain/certificate.ts b/ui/src/domain/certificate.ts index 00c0d7d5..2ec857fc 100644 --- a/ui/src/domain/certificate.ts +++ b/ui/src/domain/certificate.ts @@ -19,3 +19,11 @@ export const CERTIFICATE_SOURCES = Object.freeze({ } as const); export type CertificateSourceType = (typeof CERTIFICATE_SOURCES)[keyof typeof CERTIFICATE_SOURCES]; + +export const CERTIFICATE_FORMATS = Object.freeze({ + PEM: "PEM", + PFX: "PFX", + JKS: "JKS", +} as const); + +export type CertificateFormatType = (typeof CERTIFICATE_FORMATS)[keyof typeof CERTIFICATE_FORMATS]; diff --git a/ui/src/domain/workflow.ts b/ui/src/domain/workflow.ts index a7ff010e..ed0ea52a 100644 --- a/ui/src/domain/workflow.ts +++ b/ui/src/domain/workflow.ts @@ -114,8 +114,10 @@ export type WorkflowNodeConfigForApply = { providerConfig?: Record; keyAlgorithm: string; nameservers?: string; - propagationTimeout?: number; + dnsPropagationTimeout?: number; + dnsTTL?: number; disableFollowCNAME?: boolean; + skipBeforeExpiryDays: number; }; export type WorkflowNodeConfigForDeploy = { @@ -123,6 +125,7 @@ export type WorkflowNodeConfigForDeploy = { provider: string; providerAccessId: string; providerConfig: Record; + skipOnLastSucceeded: boolean; }; export type WorkflowNodeConfigForNotify = { diff --git a/ui/src/domain/workflowRun.ts b/ui/src/domain/workflowRun.ts index 95b44546..eaac90b4 100644 --- a/ui/src/domain/workflowRun.ts +++ b/ui/src/domain/workflowRun.ts @@ -6,8 +6,8 @@ export interface WorkflowRunModel extends BaseModel { trigger: string; startedAt: ISO8601String; endedAt: ISO8601String; - logs: WorkflowRunLog[]; - error: string; + logs?: WorkflowRunLog[]; + error?: string; expand?: { workflowId?: WorkflowModel; }; @@ -16,15 +16,15 @@ export interface WorkflowRunModel extends BaseModel { export type WorkflowRunLog = { nodeId: string; nodeName: string; - outputs: WorkflowRunLogOutput[]; - error: string; + outputs?: WorkflowRunLogOutput[]; + error?: string; }; export type WorkflowRunLogOutput = { time: ISO8601String; title: string; content: string; - error: string; + error?: string; }; export const WORKFLOW_RUN_STATUSES = Object.freeze({ diff --git a/ui/src/i18n/locales/en/nls.settings.json b/ui/src/i18n/locales/en/nls.settings.json index 68b93ec5..7a12b408 100644 --- a/ui/src/i18n/locales/en/nls.settings.json +++ b/ui/src/i18n/locales/en/nls.settings.json @@ -77,8 +77,8 @@ "settings.sslprovider.form.provider.option.letsencrypt_staging.label": "Let's Encrypt Staging Environment", "settings.sslprovider.form.provider.option.zerossl.label": "ZeroSSL", "settings.sslprovider.form.provider.option.gts.label": "Google Trust Services", + "settings.sslprovider.form.provider.alert": "Attention: The certificate validity lifetime, certificate algorithm, domain names count, and support for wildcard domain names are allowed may vary among different providers. After switching service providers, please check whether the configuration of the workflows needs to be adjusted.", "settings.sslprovider.form.letsencrypt_staging_alert": "The staging environment can reduce the chance of your running up against rate limits.

Learn more:
https://letsencrypt.org/docs/staging-environment/", - "settings.sslprovider.form.letsencrypt_staging_warning": "Attention: Certificates from the staging environment are only for testing purposes.", "settings.sslprovider.form.zerossl_eab_kid.label": "EAB KID", "settings.sslprovider.form.zerossl_eab_kid.placeholder": "Please enter EAB KID", "settings.sslprovider.form.zerossl_eab_kid.tooltip": "For more information, see https://zerossl.com/documentation/acme/", diff --git a/ui/src/i18n/locales/en/nls.workflow.nodes.json b/ui/src/i18n/locales/en/nls.workflow.nodes.json index 9fa6e336..9b5ab3b8 100644 --- a/ui/src/i18n/locales/en/nls.workflow.nodes.json +++ b/ui/src/i18n/locales/en/nls.workflow.nodes.json @@ -51,15 +51,26 @@ "workflow_node.apply.form.key_algorithm.placeholder": "Please select certificate key algorithm", "workflow_node.apply.form.nameservers.label": "DNS recursive nameservers (Optional)", "workflow_node.apply.form.nameservers.placeholder": "Please enter DNS recursive nameservers (separated by semicolons)", - "workflow_node.apply.form.nameservers.tooltip": "It determines whether to custom DNS recursive nameservers during ACME DNS-01 authentication. If you don't understand this option, just keep it by default.
Learn more.", + "workflow_node.apply.form.nameservers.tooltip": "It determines whether to custom DNS recursive nameservers during ACME DNS-01 authentication. If you don't understand this option, just keep it by default.Learn more.", "workflow_node.apply.form.nameservers.multiple_input_modal.title": "Change DNS rcursive nameservers", "workflow_node.apply.form.nameservers.multiple_input_modal.placeholder": "Please enter DNS recursive nameserver", - "workflow_node.apply.form.propagation_timeout.label": "DNS propagation timeout (Optional)", - "workflow_node.apply.form.propagation_timeout.placeholder": "Please enter DNS propagation timeout", - "workflow_node.apply.form.propagation_timeout.suffix": "seconds", - "workflow_node.apply.form.propagation_timeout.tooltip": "It determines the maximum waiting time for DNS propagation checks during ACME DNS-01 authentication. If you don't understand this option, just keep it by default.", + "workflow_node.apply.form.dns_propagation_timeout.label": "DNS propagation timeout (Optional)", + "workflow_node.apply.form.dns_propagation_timeout.placeholder": "Please enter DNS propagation timeout", + "workflow_node.apply.form.dns_propagation_timeout.unit": "seconds", + "workflow_node.apply.form.dns_propagation_timeout.tooltip": "It determines the maximum waiting time for DNS propagation checks during ACME DNS-01 authentication. If you don't understand this option, just keep it by default.

Leave blank to use the default value provided by the provider.", + "workflow_node.apply.form.dns_ttl.label": "DNS TTL (Optional)", + "workflow_node.apply.form.dns_ttl.placeholder": "Please enter DNS TTL", + "workflow_node.apply.form.dns_ttl.unit": "seconds", + "workflow_node.apply.form.dns_ttl.tooltip": "It determines the time to live for DNS record during ACME DNS-01 authentication. If you don't understand this option, just keep it by default.

Leave blank to use the default value provided by the provider.", "workflow_node.apply.form.disable_follow_cname.label": "Disable CNAME following", - "workflow_node.apply.form.disable_follow_cname.tooltip": "It determines whether to disable CNAME following during ACME DNS-01 authentication. If you don't understand this option, just keep it by default.
Learn more.", + "workflow_node.apply.form.disable_follow_cname.tooltip": "It determines whether to disable CNAME following during ACME DNS-01 authentication. If you don't understand this option, just keep it by default.Learn more.", + "workflow_node.apply.form.strategy_config.label": "Strategy settings", + "workflow_node.apply.form.skip_before_expiry_days.label": "Renewal interval", + "workflow_node.apply.form.skip_before_expiry_days.placeholder": "Please enter renewal interval", + "workflow_node.apply.form.skip_before_expiry_days.prefix": "If the certificate expiration time exceeds", + "workflow_node.apply.form.skip_before_expiry_days.suffix": ", skip to re-apply.", + "workflow_node.apply.form.skip_before_expiry_days.unit": "days", + "workflow_node.apply.form.skip_before_expiry_days.tooltip": "Be careful not to exceed the validity period limit of the CA, otherwise the certificate may never be renewed.", "workflow_node.deploy.label": "Deployment", "workflow_node.deploy.search.provider.placeholder": "Search deploy target ...", @@ -130,9 +141,9 @@ "workflow_node.deploy.form.aliyun_nlb_listener_id.label": "Alibaba Cloud NLB listener ID", "workflow_node.deploy.form.aliyun_nlb_listener_id.placeholder": "Please enter Alibaba Cloud NLB listener ID", "workflow_node.deploy.form.aliyun_nlb_listener_id.tooltip": "For more information, see https://slb.console.aliyun.com/nlb", - "workflow_node.deploy.form.aliyun_oss_endpoint.label": "Alibaba Cloud OSS endpoint", - "workflow_node.deploy.form.aliyun_oss_endpoint.placeholder": "Please enter Alibaba Cloud OSS endpoint", - "workflow_node.deploy.form.aliyun_oss_endpoint.tooltip": "For more information, see https://www.alibabacloud.com/help/en/oss/user-guide/regions-and-endpoints", + "workflow_node.deploy.form.aliyun_oss_region.label": "Alibaba Cloud region", + "workflow_node.deploy.form.aliyun_oss_region.placeholder": "Please enter Alibaba Cloud region (e.g. cn-hangzhou)", + "workflow_node.deploy.form.aliyun_oss_region.tooltip": "For more information, see https://www.alibabacloud.com/help/en/oss/user-guide/regions-and-endpoints", "workflow_node.deploy.form.aliyun_oss_bucket.label": "Alibaba Cloud OSS bucket", "workflow_node.deploy.form.aliyun_oss_bucket.placeholder": "Please enter Alibaba Cloud OSS bucket name", "workflow_node.deploy.form.aliyun_oss_bucket.tooltip": "For more information, see https://oss.console.aliyun.com", @@ -348,6 +359,12 @@ "workflow_node.deploy.form.webhook_data.guide": "Tips: The Webhook data should be a key-value pair in JSON format. The values in JSON support template variables, which will be replaced by actual values when sent to the Webhook URL.

Supported variables:
${DOMAIN}: The primary domain of the certificate (CommonName).
${DOMAINS}: The domain list of the certificate (SubjectAltNames).
${CERTIFICATE}: The PEM format content of the certificate file.
${PRIVATE_KEY}: The PEM format content of the private key file.", "workflow_node.deploy.form.webhook_data.errmsg.json_invalid": "Please enter a valiod JSON string", "workflow_node.deploy.form.webhook_data_preset.button": "Use preset template", + "workflow_node.deploy.form.strategy_config.label": "Strategy settings", + "workflow_node.deploy.form.skip_on_last_succeeded.label": "Repeated deployment", + "workflow_node.deploy.form.skip_on_last_succeeded.prefix": "If the last deployment was successful, ", + "workflow_node.deploy.form.skip_on_last_succeeded.suffix": " to re-deploy.", + "workflow_node.deploy.form.skip_on_last_succeeded.enabled.on": "skip", + "workflow_node.deploy.form.skip_on_last_succeeded.enabled.off": "not skip", "workflow_node.notify.label": "Notification", "workflow_node.notify.form.subject.label": "Subject", diff --git a/ui/src/i18n/locales/zh/nls.settings.json b/ui/src/i18n/locales/zh/nls.settings.json index c8d4703a..c2204d4d 100644 --- a/ui/src/i18n/locales/zh/nls.settings.json +++ b/ui/src/i18n/locales/zh/nls.settings.json @@ -25,7 +25,7 @@ "settings.notification.template.form.message.extra": "支持的变量(${COUNT}: 即将过期张数;${DOMAINS}: 域名列表)", "settings.notification.channels.card.title": "通知渠道", "settings.notification.channel.enabled.on": "启用", - "settings.notification.channel.enabled.off": "未启用", + "settings.notification.channel.enabled.off": "停用", "settings.notification.push_test.button": "推送测试消息", "settings.notification.push_test.pushed": "已推送", "settings.notification.channel.form.bark_server_url.label": "服务器地址", @@ -77,8 +77,8 @@ "settings.sslprovider.form.provider.option.letsencrypt_staging.label": "Let's Encrypt 测试环境", "settings.sslprovider.form.provider.option.zerossl.label": "ZeroSSL", "settings.sslprovider.form.provider.option.gts.label": "Google Trust Services", + "settings.sslprovider.form.provider.alert": "注意:不同服务商所支持的证书有效期、证书算法、多域名数量上限、是否允许泛域名等可能不同,切换服务商后请注意检查已有工作流的配置是否需要调整。", "settings.sslprovider.form.letsencrypt_staging_alert": "测试环境比生产环境有更宽松的速率限制,可进行测试性部署。

点击下方链接了解更多:
https://letsencrypt.org/zh-cn/docs/staging-environment/", - "settings.sslprovider.form.letsencrypt_staging_warning": "警告:测试环境证书仅能用于测试目的。", "settings.sslprovider.form.zerossl_eab_kid.label": "EAB KID", "settings.sslprovider.form.zerossl_eab_kid.placeholder": "请输入 EAB KID", "settings.sslprovider.form.zerossl_eab_kid.tooltip": "这是什么?请参阅 https://zerossl.com/documentation/acme/", diff --git a/ui/src/i18n/locales/zh/nls.workflow.nodes.json b/ui/src/i18n/locales/zh/nls.workflow.nodes.json index 74974795..fbe951e9 100644 --- a/ui/src/i18n/locales/zh/nls.workflow.nodes.json +++ b/ui/src/i18n/locales/zh/nls.workflow.nodes.json @@ -30,7 +30,7 @@ "workflow_node.apply.form.domains.multiple_input_modal.placeholder": "请输入域名", "workflow_node.apply.form.contact_email.label": "联系邮箱", "workflow_node.apply.form.contact_email.placeholder": "请输入联系邮箱", - "workflow_node.apply.form.contact_email.tooltip": "申请签发 SSL 证书时所需的联系方式。请注意 Let's Encrypt 账户注册的速率限制。
点此了解更多。", + "workflow_node.apply.form.contact_email.tooltip": "申请签发 SSL 证书时所需的联系方式。请注意 Let's Encrypt 账户注册的速率限制。点此了解更多。", "workflow_node.apply.form.provider.label": "DNS 提供商", "workflow_node.apply.form.provider.placeholder": "请选择 DNS 提供商", "workflow_node.apply.form.provider_access.label": "DNS 提供商授权", @@ -51,15 +51,26 @@ "workflow_node.apply.form.key_algorithm.placeholder": "请选择数字证书算法", "workflow_node.apply.form.nameservers.label": "DNS 递归服务器(可选)", "workflow_node.apply.form.nameservers.placeholder": "请输入 DNS 递归服务器(多个值请用半角分号隔开)", - "workflow_node.apply.form.nameservers.tooltip": "在 ACME DNS-01 认证时使用自定义的 DNS 递归服务器。如果你不了解该选项的用途,保持默认即可。
点此了解更多。", + "workflow_node.apply.form.nameservers.tooltip": "在 ACME DNS-01 认证时使用自定义的 DNS 递归服务器。如果你不了解该选项的用途,保持默认即可。点此了解更多。", "workflow_node.apply.form.nameservers.multiple_input_modal.title": "修改 DNS 递归服务器", "workflow_node.apply.form.nameservers.multiple_input_modal.placeholder": "请输入 DNS 递归服务器", - "workflow_node.apply.form.propagation_timeout.label": "DNS 传播检查超时时间(可选)", - "workflow_node.apply.form.propagation_timeout.placeholder": "请输入 DNS 传播检查超时时间", - "workflow_node.apply.form.propagation_timeout.suffix": "秒", - "workflow_node.apply.form.propagation_timeout.tooltip": "在 ACME DNS-01 认证时等待 DNS 传播检查的最长时间。如果你不了解此选项的用途,保持默认即可。", + "workflow_node.apply.form.dns_propagation_timeout.label": "DNS 传播检查超时时间(可选)", + "workflow_node.apply.form.dns_propagation_timeout.placeholder": "请输入 DNS 传播检查超时时间", + "workflow_node.apply.form.dns_propagation_timeout.unit": "秒", + "workflow_node.apply.form.dns_propagation_timeout.tooltip": "在 ACME DNS-01 认证时等待 DNS 传播检查的最长时间。如果你不了解此选项的用途,保持默认即可。

为空时,将使用提供商提供的默认值。", + "workflow_node.apply.form.dns_ttl.label": "DNS 解析 TTL(可选)", + "workflow_node.apply.form.dns_ttl.placeholder": "请输入 DNS 解析 TTL", + "workflow_node.apply.form.dns_ttl.unit": "秒", + "workflow_node.apply.form.dns_ttl.tooltip": "在 ACME DNS-01 认证时 DNS 解析记录的 TTL。如果你不了解此选项的用途,保持默认即可。

为空时,将使用提供商提供的默认值。", "workflow_node.apply.form.disable_follow_cname.label": "禁止 CNAME 跟随", - "workflow_node.apply.form.disable_follow_cname.tooltip": "在 ACME DNS-01 认证时是否禁止 CNAME 跟随。如果你不了解该选项的用途,保持默认即可。
点此了解更多。", + "workflow_node.apply.form.disable_follow_cname.tooltip": "在 ACME DNS-01 认证时是否禁止 CNAME 跟随。如果你不了解该选项的用途,保持默认即可。点此了解更多。", + "workflow_node.apply.form.strategy_config.label": "执行策略", + "workflow_node.apply.form.skip_before_expiry_days.label": "续期间隔", + "workflow_node.apply.form.skip_before_expiry_days.placeholder": "请输入续期间隔", + "workflow_node.apply.form.skip_before_expiry_days.prefix": "当上次签发的证书到期时间超过", + "workflow_node.apply.form.skip_before_expiry_days.suffix": "时,跳过重新申请。", + "workflow_node.apply.form.skip_before_expiry_days.unit": "天", + "workflow_node.apply.form.skip_before_expiry_days.tooltip": "注意不要超过 CA 的证书有效期限制,否则证书可能永远不会续期。", "workflow_node.deploy.label": "部署", "workflow_node.deploy.search.provider.placeholder": "搜索部署目标……", @@ -130,9 +141,9 @@ "workflow_node.deploy.form.aliyun_nlb_listener_id.label": "阿里云 NLB 监听器 ID", "workflow_node.deploy.form.aliyun_nlb_listener_id.placeholder": "请输入阿里云 NLB 监听器 ID", "workflow_node.deploy.form.aliyun_nlb_listener_id.tooltip": "这是什么?请参阅 https://slb.console.aliyun.com/nlb", - "workflow_node.deploy.form.aliyun_oss_endpoint.label": "阿里云 OSS Endpoint", - "workflow_node.deploy.form.aliyun_oss_endpoint.placeholder": "请输入阿里云 OSS Endpoint", - "workflow_node.deploy.form.aliyun_oss_endpoint.tooltip": "这是什么?请参阅 https://help.aliyun.com/zh/oss/user-guide/regions-and-endpoints", + "workflow_node.deploy.form.aliyun_oss_region.label": "阿里云地域", + "workflow_node.deploy.form.aliyun_oss_region.placeholder": "请输入阿里云地域(例如:cn-hangzhou)", + "workflow_node.deploy.form.aliyun_oss_region.tooltip": "这是什么?请参阅 https://help.aliyun.com/zh/oss/user-guide/regions-and-endpoints", "workflow_node.deploy.form.aliyun_oss_bucket.label": "阿里云 OSS 存储桶名", "workflow_node.deploy.form.aliyun_oss_bucket.placeholder": "请输入阿里云 OSS 存储桶名", "workflow_node.deploy.form.aliyun_oss_bucket.tooltip": "这是什么?请参阅 https://oss.console.aliyun.com", @@ -348,6 +359,12 @@ "workflow_node.deploy.form.webhook_data.guide": "小贴士:回调数据是一个 JSON 格式的键值对。其中值支持模板变量,将在被发送到指定的 Webhook URL 时被替换为实际值;其他内容将保持原样。

支持的变量:
${DOMAIN}:证书的主域名(即 CommonName
${DOMAINS}:证书的多域名列表(即 SubjectAltNames
${CERTIFICATE}:证书文件 PEM 格式内容
${PRIVATE_KEY}:私钥文件 PEM 格式内容", "workflow_node.deploy.form.webhook_data.errmsg.json_invalid": "请输入有效的 JSON 格式字符串", "workflow_node.deploy.form.webhook_data_preset.button": "使用预设模板", + "workflow_node.deploy.form.strategy_config.label": "执行策略", + "workflow_node.deploy.form.skip_on_last_succeeded.label": "重复部署", + "workflow_node.deploy.form.skip_on_last_succeeded.prefix": "当上次部署已成功时", + "workflow_node.deploy.form.skip_on_last_succeeded.suffix": "重新部署。", + "workflow_node.deploy.form.skip_on_last_succeeded.enabled.on": "跳过", + "workflow_node.deploy.form.skip_on_last_succeeded.enabled.off": "不跳过", "workflow_node.notify.label": "通知", "workflow_node.notify.form.subject.label": "通知主题", diff --git a/ui/src/pages/AuthLayout.tsx b/ui/src/pages/AuthLayout.tsx index 8e15fb4d..73ce0076 100644 --- a/ui/src/pages/AuthLayout.tsx +++ b/ui/src/pages/AuthLayout.tsx @@ -1,11 +1,11 @@ import { Navigate, Outlet } from "react-router-dom"; import Version from "@/components/Version"; -import { getPocketBase } from "@/repository/pocketbase"; +import { getAuthStore } from "@/repository/admin"; const AuthLayout = () => { - const auth = getPocketBase().authStore; - if (auth.isValid && auth.isAdmin) { + const auth = getAuthStore(); + if (auth.isValid && auth.isSuperuser) { return ; } diff --git a/ui/src/pages/ConsoleLayout.tsx b/ui/src/pages/ConsoleLayout.tsx index a5125be4..a370d46c 100644 --- a/ui/src/pages/ConsoleLayout.tsx +++ b/ui/src/pages/ConsoleLayout.tsx @@ -17,7 +17,7 @@ import { Button, type ButtonProps, Drawer, Dropdown, Layout, Menu, type MenuProp import Version from "@/components/Version"; import { useBrowserTheme, useTriggerElement } from "@/hooks"; -import { getPocketBase } from "@/repository/pocketbase"; +import { getAuthStore } from "@/repository/admin"; const ConsoleLayout = () => { const navigate = useNavigate(); @@ -35,8 +35,8 @@ const ConsoleLayout = () => { navigate("/settings/account"); }; - const auth = getPocketBase().authStore; - if (!auth.isValid || !auth.isAdmin) { + const auth = getAuthStore(); + if (!auth.isValid || !auth.isSuperuser) { return ; } diff --git a/ui/src/pages/login/Login.tsx b/ui/src/pages/login/Login.tsx index 8725c4e4..32d8759b 100644 --- a/ui/src/pages/login/Login.tsx +++ b/ui/src/pages/login/Login.tsx @@ -5,7 +5,7 @@ import { createSchemaFieldRule } from "antd-zod"; import { z } from "zod"; import { useAntdForm } from "@/hooks"; -import { getPocketBase } from "@/repository/pocketbase"; +import { authWithPassword } from "@/repository/admin"; import { getErrMsg } from "@/utils/error"; const Login = () => { @@ -27,7 +27,7 @@ const Login = () => { } = useAntdForm>({ onSubmit: async (values) => { try { - await getPocketBase().admins.authWithPassword(values.username, values.password); + await authWithPassword(values.username, values.password); await navigage("/"); } catch (err) { notificationApi.error({ message: t("common.text.request_error"), description: getErrMsg(err) }); diff --git a/ui/src/pages/settings/SettingsAccount.tsx b/ui/src/pages/settings/SettingsAccount.tsx index 5a3aac0b..aedd746a 100644 --- a/ui/src/pages/settings/SettingsAccount.tsx +++ b/ui/src/pages/settings/SettingsAccount.tsx @@ -6,7 +6,7 @@ import { createSchemaFieldRule } from "antd-zod"; import { z } from "zod"; import { useAntdForm } from "@/hooks"; -import { getPocketBase } from "@/repository/pocketbase"; +import { getAuthStore, save as saveAdmin } from "@/repository/admin"; import { getErrMsg } from "@/utils/error"; const SettingsAccount = () => { @@ -27,18 +27,16 @@ const SettingsAccount = () => { formProps, } = useAntdForm>({ initialValues: { - username: getPocketBase().authStore.model?.email, + username: getAuthStore().record?.email, }, onSubmit: async (values) => { try { - await getPocketBase().admins.update(getPocketBase().authStore.model?.id, { - email: values.username, - }); + await saveAdmin({ email: values.username }); messageApi.success(t("common.text.operation_succeeded")); setTimeout(() => { - getPocketBase().authStore.clear(); + getAuthStore().clear(); navigate("/login"); }, 500); } catch (err) { diff --git a/ui/src/pages/settings/SettingsPassword.tsx b/ui/src/pages/settings/SettingsPassword.tsx index e7b28656..59447be7 100644 --- a/ui/src/pages/settings/SettingsPassword.tsx +++ b/ui/src/pages/settings/SettingsPassword.tsx @@ -6,7 +6,7 @@ import { createSchemaFieldRule } from "antd-zod"; import { z } from "zod"; import { useAntdForm } from "@/hooks"; -import { getPocketBase } from "@/repository/pocketbase"; +import { authWithPassword, getAuthStore, save as saveAdmin } from "@/repository/admin"; import { getErrMsg } from "@/utils/error"; const SettingsPassword = () => { @@ -33,16 +33,13 @@ const SettingsPassword = () => { } = useAntdForm({ onSubmit: async (values) => { try { - await getPocketBase().admins.authWithPassword(getPocketBase().authStore.model?.email, values.oldPassword); - await getPocketBase().admins.update(getPocketBase().authStore.model?.id, { - password: values.newPassword, - passwordConfirm: values.confirmPassword, - }); + await authWithPassword(getAuthStore().record!.email, values.oldPassword); + await saveAdmin({ password: values.newPassword }); messageApi.success(t("common.text.operation_succeeded")); setTimeout(() => { - getPocketBase().authStore.clear(); + getAuthStore().clear(); navigate("/login"); }, 500); } catch (err) { diff --git a/ui/src/pages/settings/SettingsSSLProvider.tsx b/ui/src/pages/settings/SettingsSSLProvider.tsx index c3a550f0..c082c4e7 100644 --- a/ui/src/pages/settings/SettingsSSLProvider.tsx +++ b/ui/src/pages/settings/SettingsSSLProvider.tsx @@ -97,10 +97,6 @@ const SSLProviderEditFormLetsEncryptStagingConfig = () => { } /> - - } /> - -