From f9dacafbf6922f7e63d853f46295224b85688bf6 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Sat, 7 Jun 2025 21:32:02 +0800 Subject: [PATCH 1/4] :arrow_up: Upgrade kernel deps --- kernel/go.mod | 29 +++++++++++++------------- kernel/go.sum | 58 +++++++++++++++++++++++++-------------------------- 2 files changed, 42 insertions(+), 45 deletions(-) diff --git a/kernel/go.mod b/kernel/go.mod index 168a62999..93a0472e8 100644 --- a/kernel/go.mod +++ b/kernel/go.mod @@ -58,11 +58,11 @@ require ( github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 github.com/sashabaranov/go-openai v1.39.1 github.com/shirou/gopsutil/v4 v4.25.5 - github.com/siyuan-note/dejavu v0.0.0-20250603080928-dd483c7ccb78 + github.com/siyuan-note/dejavu v0.0.0-20250607133044-6990f6650750 github.com/siyuan-note/encryption v0.0.0-20250326023622-24a67e6956ec github.com/siyuan-note/eventbus v0.0.0-20240627125516-396fdb0f0f97 github.com/siyuan-note/filelock v0.0.0-20250227145141-7d111cdf3c57 - github.com/siyuan-note/httpclient v0.0.0-20250603080439-26fc3520fdc0 + github.com/siyuan-note/httpclient v0.0.0-20250607132935-53038a4f631d github.com/siyuan-note/logging v0.0.0-20250425042449-b96c40249b54 github.com/siyuan-note/riff v0.0.0-20250424035337-0a1e91809f6d github.com/spf13/cast v1.8.0 @@ -74,10 +74,10 @@ require ( github.com/xuri/excelize/v2 v2.9.1 golang.org/x/image v0.27.0 golang.org/x/mobile v0.0.0-20250305212854-3a7bc9f8a4de - golang.org/x/mod v0.24.0 - golang.org/x/net v0.40.0 + golang.org/x/mod v0.25.0 + golang.org/x/net v0.41.0 golang.org/x/sys v0.33.0 - golang.org/x/text v0.25.0 + golang.org/x/text v0.26.0 golang.org/x/time v0.11.0 gopkg.in/yaml.v3 v3.0.1 ) @@ -96,8 +96,8 @@ require ( github.com/andybalholm/cascadia v1.3.3 // indirect github.com/aws/aws-sdk-go-v2 v1.36.3 // indirect github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.10 // indirect - github.com/aws/aws-sdk-go-v2/config v1.29.14 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.17.67 // indirect + github.com/aws/aws-sdk-go-v2/config v1.29.15 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.17.68 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34 // indirect @@ -107,10 +107,10 @@ require ( github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.7.2 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15 // indirect github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.15 // indirect - github.com/aws/aws-sdk-go-v2/service/s3 v1.80.0 // indirect + github.com/aws/aws-sdk-go-v2/service/s3 v1.80.1 // indirect github.com/aws/aws-sdk-go-v2/service/sso v1.25.3 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.1 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.33.19 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.33.20 // indirect github.com/aws/smithy-go v1.22.3 // indirect github.com/bytedance/sonic v1.13.2 // indirect github.com/bytedance/sonic/loader v0.2.4 // indirect @@ -162,8 +162,7 @@ require ( github.com/pelletier/go-toml/v2 v2.2.4 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect - github.com/qiniu/go-sdk/v7 v7.25.3 // indirect - github.com/quasoft/memstore v0.0.0-20191010062613-2bce066d2b0b // indirect + github.com/qiniu/go-sdk/v7 v7.25.4 // indirect github.com/quic-go/qpack v0.5.1 // indirect github.com/quic-go/quic-go v0.52.0 // indirect github.com/refraction-networking/utls v1.7.3 // indirect @@ -188,12 +187,12 @@ require ( go.uber.org/automaxprocs v1.6.0 // indirect go.uber.org/mock v0.5.2 // indirect golang.org/x/arch v0.17.0 // indirect - golang.org/x/crypto v0.38.0 // indirect - golang.org/x/sync v0.14.0 // indirect - golang.org/x/tools v0.33.0 // indirect + golang.org/x/crypto v0.39.0 // indirect + golang.org/x/sync v0.15.0 // indirect + golang.org/x/tools v0.34.0 // indirect google.golang.org/protobuf v1.36.6 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - modernc.org/fileutil v1.3.2 // indirect + modernc.org/fileutil v1.3.3 // indirect ) replace github.com/mattn/go-sqlite3 => github.com/88250/go-sqlite3 v1.14.13-0.20231214121541-e7f54c482950 diff --git a/kernel/go.sum b/kernel/go.sum index 22f2be286..b76aa95af 100644 --- a/kernel/go.sum +++ b/kernel/go.sum @@ -60,10 +60,10 @@ github.com/aws/aws-sdk-go-v2 v1.36.3 h1:mJoei2CxPutQVxaATCzDUjcZEjVRdpsiiXi2o38y github.com/aws/aws-sdk-go-v2 v1.36.3/go.mod h1:LLXuLpgzEbD766Z5ECcRmi8AzSwfZItDtmABVkRLGzg= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.10 h1:zAybnyUQXIZ5mok5Jqwlf58/TFE7uvd3IAsa1aF9cXs= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.10/go.mod h1:qqvMj6gHLR/EXWZw4ZbqlPbQUyenf4h82UQUlKc+l14= -github.com/aws/aws-sdk-go-v2/config v1.29.14 h1:f+eEi/2cKCg9pqKBoAIwRGzVb70MRKqWX4dg1BDcSJM= -github.com/aws/aws-sdk-go-v2/config v1.29.14/go.mod h1:wVPHWcIFv3WO89w0rE10gzf17ZYy+UVS1Geq8Iei34g= -github.com/aws/aws-sdk-go-v2/credentials v1.17.67 h1:9KxtdcIA/5xPNQyZRgUSpYOE6j9Bc4+D7nZua0KGYOM= -github.com/aws/aws-sdk-go-v2/credentials v1.17.67/go.mod h1:p3C44m+cfnbv763s52gCqrjaqyPikj9Sg47kUVaNZQQ= +github.com/aws/aws-sdk-go-v2/config v1.29.15 h1:I5XjesVMpDZXZEZonVfjI12VNMrYa38LtLnw4NtY5Ss= +github.com/aws/aws-sdk-go-v2/config v1.29.15/go.mod h1:tNIp4JIPonlsgaO5hxO372a6gjhN63aSWl2GVl5QoBQ= +github.com/aws/aws-sdk-go-v2/credentials v1.17.68 h1:cFb9yjI02/sWHBSYXAtkamjzCuRymvmeFmt0TC0MbYY= +github.com/aws/aws-sdk-go-v2/credentials v1.17.68/go.mod h1:H6E+jBzyqUu8u0vGaU6POkK3P0NylYEeRZ6ynBpMqIk= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30 h1:x793wxmUWVDhshP8WW2mlnXuFrO4cOd3HLBroh1paFw= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30/go.mod h1:Jpne2tDnYiFascUEs2AWHJL9Yp7A5ZVy3TNyxaAjD6M= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34 h1:ZK5jHhnrioRkUNOc+hOgQKlUL5JeC3S6JgLxtQ+Rm0Q= @@ -82,14 +82,14 @@ github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15 h1:dM9/92u2 github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15/go.mod h1:SwFBy2vjtA0vZbjjaFtfN045boopadnoVPhu4Fv66vY= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.15 h1:moLQUoVq91LiqT1nbvzDukyqAlCv89ZmwaHw/ZFlFZg= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.15/go.mod h1:ZH34PJUc8ApjBIfgQCFvkWcUDBtl/WTD+uiYHjd8igA= -github.com/aws/aws-sdk-go-v2/service/s3 v1.80.0 h1:fV4XIU5sn/x8gjRouoJpDVHj+ExJaUk4prYF+eb6qTs= -github.com/aws/aws-sdk-go-v2/service/s3 v1.80.0/go.mod h1:qbn305Je/IofWBJ4bJz/Q7pDEtnnoInw/dGt71v6rHE= +github.com/aws/aws-sdk-go-v2/service/s3 v1.80.1 h1:xYEAf/6QHiTZDccKnPMbsMwlau13GsDsTgdue3wmHGw= +github.com/aws/aws-sdk-go-v2/service/s3 v1.80.1/go.mod h1:qbn305Je/IofWBJ4bJz/Q7pDEtnnoInw/dGt71v6rHE= github.com/aws/aws-sdk-go-v2/service/sso v1.25.3 h1:1Gw+9ajCV1jogloEv1RRnvfRFia2cL6c9cuKV2Ps+G8= github.com/aws/aws-sdk-go-v2/service/sso v1.25.3/go.mod h1:qs4a9T5EMLl/Cajiw2TcbNt2UNo/Hqlyp+GiuG4CFDI= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.1 h1:hXmVKytPfTy5axZ+fYbR5d0cFmC3JvwLm5kM83luako= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.1/go.mod h1:MlYRNmYu/fGPoxBQVvBYr9nyr948aY/WLUvwBMBJubs= -github.com/aws/aws-sdk-go-v2/service/sts v1.33.19 h1:1XuUZ8mYJw9B6lzAkXhqHlJd/XvaX32evhproijJEZY= -github.com/aws/aws-sdk-go-v2/service/sts v1.33.19/go.mod h1:cQnB8CUnxbMU82JvlqjKR2HBOm3fe9pWorWBza6MBJ4= +github.com/aws/aws-sdk-go-v2/service/sts v1.33.20 h1:oIaQ1e17CSKaWmUTu62MtraRWVIosn/iONMuZt0gbqc= +github.com/aws/aws-sdk-go-v2/service/sts v1.33.20/go.mod h1:cQnB8CUnxbMU82JvlqjKR2HBOm3fe9pWorWBza6MBJ4= github.com/aws/smithy-go v1.22.3 h1:Z//5NuZCSW6R4PhQ93hShNbyBbn8BWCmCVCt+Q8Io5k= github.com/aws/smithy-go v1.22.3/go.mod h1:t1ufH5HMublsJYulve2RKmHDC15xu1f26kHCp/HgceI= github.com/bytedance/sonic v1.13.2 h1:8/H1FempDZqC4VqjptGo14QQlJx8VdZJegxs6wwfqpQ= @@ -335,11 +335,9 @@ github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:Om github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= github.com/qiniu/dyn v1.3.0/go.mod h1:E8oERcm8TtwJiZvkQPbcAh0RL8jO1G0VXJMW3FAWdkk= -github.com/qiniu/go-sdk/v7 v7.25.3 h1:eYHh02q4i5MrlEn3qy823w7moieymFzb4dsP38Y43AI= -github.com/qiniu/go-sdk/v7 v7.25.3/go.mod h1:dmKtJ2ahhPWFVi9o1D5GemmWoh/ctuB9peqTowyTO8o= +github.com/qiniu/go-sdk/v7 v7.25.4 h1:ulCKlTEyrZzmNytXweOrnva49+Q4+ASjYBCSXhkRWTo= +github.com/qiniu/go-sdk/v7 v7.25.4/go.mod h1:dmKtJ2ahhPWFVi9o1D5GemmWoh/ctuB9peqTowyTO8o= github.com/qiniu/x v1.10.5/go.mod h1:03Ni9tj+N2h2aKnAz+6N0Xfl8FwMEDRC2PAlxekASDs= -github.com/quasoft/memstore v0.0.0-20191010062613-2bce066d2b0b h1:aUNXCGgukb4gtY99imuIeoh8Vr0GSwAlYxPAhqZrpFc= -github.com/quasoft/memstore v0.0.0-20191010062613-2bce066d2b0b/go.mod h1:wTPjTepVu7uJBYgZ0SdWHQlIas582j6cn2jgk4DDdlg= github.com/quic-go/qpack v0.5.1 h1:giqksBPnT/HDtZ6VhtFKgoLOWmlyo9Ei6u9PqzIMbhI= github.com/quic-go/qpack v0.5.1/go.mod h1:+PC4XFrEskIVkcLzpEkbLqq1uCoxPhQuvK5rH1ZgaEg= github.com/quic-go/quic-go v0.52.0 h1:/SlHrCRElyaU6MaEPKqKr9z83sBg2v4FLLvWM+Z47pA= @@ -377,16 +375,16 @@ github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+D github.com/shurcooL/gofontwoff v0.0.0-20181114050219-180f79e6909d h1:lvCTyBbr36+tqMccdGMwuEU+hjux/zL6xSmf5S9ITaA= github.com/shurcooL/gofontwoff v0.0.0-20181114050219-180f79e6909d/go.mod h1:05UtEgK5zq39gLST6uB0cf3NEHjETfB4Fgr3Gx5R9Vw= github.com/simplereach/timeutils v1.2.0/go.mod h1:VVbQDfN/FHRZa1LSqcwo4kNZ62OOyqLLGQKYB3pB0Q8= -github.com/siyuan-note/dejavu v0.0.0-20250603080928-dd483c7ccb78 h1:qnbBWccE3bJqy9j1xWOIBlLYK5wgrhhlfa8TbdNZvIQ= -github.com/siyuan-note/dejavu v0.0.0-20250603080928-dd483c7ccb78/go.mod h1:nFmfekqMwYx0AYej7Hw39CT3XQFdRudXufcn3hRUU0A= +github.com/siyuan-note/dejavu v0.0.0-20250607133044-6990f6650750 h1:neYEyMp/Ky7Kc8aAQLa7CW02dWn8ZmklMWPyqu514ww= +github.com/siyuan-note/dejavu v0.0.0-20250607133044-6990f6650750/go.mod h1:lVe5CpXIqjzFOxobpxrY+DmQ2LAEVrpKgo48ovZs1K4= github.com/siyuan-note/encryption v0.0.0-20250326023622-24a67e6956ec h1:D8Sjwa+7WxP3XrIBscT4PxBZZddZ83/O+5nX1sq6g6g= github.com/siyuan-note/encryption v0.0.0-20250326023622-24a67e6956ec/go.mod h1:6iAxXPOOAG3+M4bCiKQZTQ+n4gSUx/OyHhsP57dJlS8= github.com/siyuan-note/eventbus v0.0.0-20240627125516-396fdb0f0f97 h1:lM5v8BfNtbOL5jYwhCdMYBcYtr06IYBKjjSLAPMKTM8= github.com/siyuan-note/eventbus v0.0.0-20240627125516-396fdb0f0f97/go.mod h1:1/nGgthl89FPA7GzAcEWKl6zRRnfgyTjzLZj9bW7kuw= github.com/siyuan-note/filelock v0.0.0-20250227145141-7d111cdf3c57 h1:gRFbRUgTFP+XcV6vfiblGB9oHI/UwzD7cSUNwE1TrpE= github.com/siyuan-note/filelock v0.0.0-20250227145141-7d111cdf3c57/go.mod h1:oJhBKYrxS8WRsTZhOafG3FfGgCSOyxFzboBvQxcDX9s= -github.com/siyuan-note/httpclient v0.0.0-20250603080439-26fc3520fdc0 h1:xf7A9knleZdGzZ5M+l6GYhpi5jHZ0Yi4KZaZVGZKJlg= -github.com/siyuan-note/httpclient v0.0.0-20250603080439-26fc3520fdc0/go.mod h1:5ExowIYqWL467RNYHdO/uuWGv42TvXAnvPZJgZo84BY= +github.com/siyuan-note/httpclient v0.0.0-20250607132935-53038a4f631d h1:vWpu+V/iTAES2EOhzzFdozU2FoZRGhti+ZCmZWuB/qw= +github.com/siyuan-note/httpclient v0.0.0-20250607132935-53038a4f631d/go.mod h1:zEXXMCeeJBWuHO4K9zSJSW0BpIeh0Z2qlp2NoQ2X5Ic= github.com/siyuan-note/logging v0.0.0-20250425042449-b96c40249b54 h1:bNfLBxasCNYNIiE8YwIDDq0DxFjQ3aDbp25w8F5aShM= github.com/siyuan-note/logging v0.0.0-20250425042449-b96c40249b54/go.mod h1:9lb3q2RCdpjoQk7nDQwLSArNtCLafHwWtl8+kNkSISM= github.com/siyuan-note/riff v0.0.0-20250424035337-0a1e91809f6d h1:VJ/DuLIx4FE7MZtlX2Gahx2m9tr4YCXPxZxUXZIWRx4= @@ -462,8 +460,8 @@ golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= -golang.org/x/crypto v0.38.0 h1:jt+WWG8IZlBnVbomuhg2Mdq0+BBQaHbtqHEFEigjUV8= -golang.org/x/crypto v0.38.0/go.mod h1:MvrbAqul58NNYPKnOra203SB9vpuZW0e+RRZV+Ggqjw= +golang.org/x/crypto v0.39.0 h1:SHs+kF4LP+f+p14esP5jAoDpHU8Gu/v9lFRK6IT5imM= +golang.org/x/crypto v0.39.0/go.mod h1:L+Xg3Wf6HoL4Bn4238Z6ft6KfEpN0tJGo53AAPC632U= golang.org/x/image v0.0.0-20210628002857-a66eb6448b8d/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= golang.org/x/image v0.27.0 h1:C8gA4oWU/tKkdCfYT6T2u4faJu3MeNS5O8UPWlPF61w= golang.org/x/image v0.27.0/go.mod h1:xbdrClrAUway1MUTEZDq9mz/UpRwYAkFFNUslZtcB+g= @@ -474,8 +472,8 @@ golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU= -golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= +golang.org/x/mod v0.25.0 h1:n7a+ZbQKQA/Ysbyb0/6IbB1H/X41mKgbhfv7AfG/44w= +golang.org/x/mod v0.25.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -490,8 +488,8 @@ golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4= -golang.org/x/net v0.40.0 h1:79Xs7wF06Gbdcg4kdCCIQArK11Z1hr5POQ6+fIYHNuY= -golang.org/x/net v0.40.0/go.mod h1:y0hY0exeL2Pku80/zKK7tpntoX23cqL3Oa6njdgRtds= +golang.org/x/net v0.41.0 h1:vBTly1HeNPEn3wtREYfy4GZ/NECgw2Cnl+nK6Nz3uvw= +golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -499,8 +497,8 @@ golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ= -golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sync v0.15.0 h1:KWH3jNZsfyT6xfAfKiz6MRNmd46ByHDYaZ7KSkCtdW8= +golang.org/x/sync v0.15.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -544,8 +542,8 @@ golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= -golang.org/x/text v0.25.0 h1:qVyWApTSYLk/drJRO5mDlNYskwQznZmkpV2c8q9zls4= -golang.org/x/text v0.25.0/go.mod h1:WEdwpYrmk1qmdHvhkSTNPm3app7v4rsT8F2UD6+VHIA= +golang.org/x/text v0.26.0 h1:P42AVeLghgTYr4+xUnTRKDMqpar+PtX7KWuNQL21L8M= +golang.org/x/text v0.26.0/go.mod h1:QK15LZJUUQVJxhz7wXgxSy/CJaTFjd0G+YLonydOVQA= golang.org/x/time v0.11.0 h1:/bpjEDfN9tkoN/ryeYHnv5hcMlc8ncjMcM4XBk5NWV0= golang.org/x/time v0.11.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -554,8 +552,8 @@ golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= -golang.org/x/tools v0.33.0 h1:4qz2S3zmRxbGIhDIAgjxvFutSvH5EfnsYrRBj0UI0bc= -golang.org/x/tools v0.33.0/go.mod h1:CIJMaWEY88juyUfo7UbgPqbC8rU2OqfAV1h2Qp0oMYI= +golang.org/x/tools v0.34.0 h1:qIpSLOxeCYGg9TrcJokLBG4KFA6d795g0xkBkiESGlo= +golang.org/x/tools v0.34.0/go.mod h1:pAP9OwEaY1CAW3HOmg3hLZC5Z0CCmzjAF2UQMSqNARg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= @@ -577,6 +575,6 @@ gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= modernc.org/fileutil v1.0.0/go.mod h1:JHsWpkrk/CnVV1H/eGlFf85BEpfkrp56ro8nojIq9Q8= -modernc.org/fileutil v1.3.2 h1:EbbGRuQZcZkmeLDkCvd5DV/r5fLRB3BFvK1qdn4fLpg= -modernc.org/fileutil v1.3.2/go.mod h1:HxmghZSZVAz/LXcMNwZPA/DRrQZEVP9VX0V4LQGQFOc= +modernc.org/fileutil v1.3.3 h1:3qaU+7f7xxTUmvU1pJTZiDLAIoJVdUSSauJNHg9yXoA= +modernc.org/fileutil v1.3.3/go.mod h1:HxmghZSZVAz/LXcMNwZPA/DRrQZEVP9VX0V4LQGQFOc= nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= From 570932ea2e11c5a376c677d5a48ebb6fedc11bec Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Sat, 7 Jun 2025 21:44:18 +0800 Subject: [PATCH 2/4] :art: Database gallery view https://github.com/siyuan-note/siyuan/issues/10414 --- app/appearance/langs/ar_SA.json | 1 + app/appearance/langs/de_DE.json | 1 + app/appearance/langs/en_US.json | 1 + app/appearance/langs/es_ES.json | 1 + app/appearance/langs/fr_FR.json | 1 + app/appearance/langs/he_IL.json | 1 + app/appearance/langs/it_IT.json | 1 + app/appearance/langs/ja_JP.json | 1 + app/appearance/langs/pl_PL.json | 1 + app/appearance/langs/ru_RU.json | 1 + app/appearance/langs/zh_CHT.json | 1 + app/appearance/langs/zh_CN.json | 1 + 12 files changed, 12 insertions(+) diff --git a/app/appearance/langs/ar_SA.json b/app/appearance/langs/ar_SA.json index 286475357..73997a197 100644 --- a/app/appearance/langs/ar_SA.json +++ b/app/appearance/langs/ar_SA.json @@ -1336,6 +1336,7 @@ }, "_attrView": { "table": "جدول", + "gallery": "معرض", "key": "المفتاح الرئيسي", "select": "تحديد" }, diff --git a/app/appearance/langs/de_DE.json b/app/appearance/langs/de_DE.json index 45fcce151..cf8259cd3 100644 --- a/app/appearance/langs/de_DE.json +++ b/app/appearance/langs/de_DE.json @@ -1336,6 +1336,7 @@ }, "_attrView": { "table": "Tabelle", + "gallery": "Galerie", "key": "Primärschlüssel", "select": "Auswählen" }, diff --git a/app/appearance/langs/en_US.json b/app/appearance/langs/en_US.json index fc87a2cc0..8042c81dd 100644 --- a/app/appearance/langs/en_US.json +++ b/app/appearance/langs/en_US.json @@ -1336,6 +1336,7 @@ }, "_attrView": { "table": "Table", + "gallery": "Gallery", "key": "Primary Key", "select": "Select" }, diff --git a/app/appearance/langs/es_ES.json b/app/appearance/langs/es_ES.json index 59c1a1a47..c90e31025 100644 --- a/app/appearance/langs/es_ES.json +++ b/app/appearance/langs/es_ES.json @@ -1336,6 +1336,7 @@ }, "_attrView": { "table": "Tabla", + "gallery": "Galería", "key": "Clave principal", "select": "Selección" }, diff --git a/app/appearance/langs/fr_FR.json b/app/appearance/langs/fr_FR.json index 866313ead..af4774dc6 100644 --- a/app/appearance/langs/fr_FR.json +++ b/app/appearance/langs/fr_FR.json @@ -1336,6 +1336,7 @@ }, "_attrView": { "table": "Tableau", + "gallery": "Galerie", "key": "Clé primaire", "select": "Sélectionner" }, diff --git a/app/appearance/langs/he_IL.json b/app/appearance/langs/he_IL.json index 593ea3844..655e686ef 100644 --- a/app/appearance/langs/he_IL.json +++ b/app/appearance/langs/he_IL.json @@ -1336,6 +1336,7 @@ }, "_attrView": { "table": "טבלה", + "gallery": "גלריה", "key": "מפתח ראשי", "select": "בחר" }, diff --git a/app/appearance/langs/it_IT.json b/app/appearance/langs/it_IT.json index aeaba7bf4..2ffa2a131 100644 --- a/app/appearance/langs/it_IT.json +++ b/app/appearance/langs/it_IT.json @@ -1336,6 +1336,7 @@ }, "_attrView": { "table": "Tabella", + "gallery": "Galleria", "key": "Chiave primaria", "select": "Seleziona" }, diff --git a/app/appearance/langs/ja_JP.json b/app/appearance/langs/ja_JP.json index 7565dd625..6a7117422 100644 --- a/app/appearance/langs/ja_JP.json +++ b/app/appearance/langs/ja_JP.json @@ -1336,6 +1336,7 @@ }, "_attrView": { "table": "テーブル", + "gallery": "ギャラリー", "key": "プライマリキー", "select": "選択" }, diff --git a/app/appearance/langs/pl_PL.json b/app/appearance/langs/pl_PL.json index 2f68124b3..377080bee 100644 --- a/app/appearance/langs/pl_PL.json +++ b/app/appearance/langs/pl_PL.json @@ -1336,6 +1336,7 @@ }, "_attrView": { "table": "Tabela", + "gallery": "Galeria", "key": "Klucz główny", "select": "Wybierz" }, diff --git a/app/appearance/langs/ru_RU.json b/app/appearance/langs/ru_RU.json index c96230b7b..db770a845 100644 --- a/app/appearance/langs/ru_RU.json +++ b/app/appearance/langs/ru_RU.json @@ -1336,6 +1336,7 @@ }, "_attrView": { "table": "Таблица", + "gallery": "Галерея", "key": "Первичный ключ", "select": "Выбрать" }, diff --git a/app/appearance/langs/zh_CHT.json b/app/appearance/langs/zh_CHT.json index 868c57fc3..8c90d1500 100644 --- a/app/appearance/langs/zh_CHT.json +++ b/app/appearance/langs/zh_CHT.json @@ -1336,6 +1336,7 @@ }, "_attrView": { "table": "表格", + "gallery": "畫廊", "key": "主鍵", "select": "單選" }, diff --git a/app/appearance/langs/zh_CN.json b/app/appearance/langs/zh_CN.json index 0f45a1516..78fecc86d 100644 --- a/app/appearance/langs/zh_CN.json +++ b/app/appearance/langs/zh_CN.json @@ -1336,6 +1336,7 @@ }, "_attrView": { "table": "表格", + "gallery": "画廊", "key": "主键", "select": "单选" }, From 19bf4273bfabe91c11362a63fba7d5a180ffe62a Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Sat, 7 Jun 2025 21:44:36 +0800 Subject: [PATCH 3/4] :art: Clean code --- kernel/av/table.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel/av/table.go b/kernel/av/table.go index 55e417ab6..3d3d61cae 100644 --- a/kernel/av/table.go +++ b/kernel/av/table.go @@ -59,6 +59,7 @@ type Table struct { PageSize int `json:"pageSize"` // 每页行数 } +// TableColumn 描述了表格实例列的结构。 type TableColumn struct { ID string `json:"id"` // 列 ID Name string `json:"name"` // 列名 @@ -81,13 +82,13 @@ type TableColumn struct { Date *Date `json:"date,omitempty"` // 日期设置 } -// TableRow 描述了表格行的结构。 +// TableRow 描述了表格实例行的结构。 type TableRow struct { ID string `json:"id"` // 行 ID Cells []*TableCell `json:"cells"` // 行单元格 } -// TableCell 描述了表格单元格的结构。 +// TableCell 描述了表格实例单元格的结构。 type TableCell struct { ID string `json:"id"` // 单元格 ID Value *Value `json:"value"` // 单元格值 From 2d23cd918879f201db4b83c0f75ceefff20a8e6a Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Sat, 7 Jun 2025 22:00:04 +0800 Subject: [PATCH 4/4] :art: Database gallery view https://github.com/siyuan-note/siyuan/issues/10414 --- kernel/av/av.go | 24 ++++++++++++-- kernel/av/gallery.go | 77 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+), 3 deletions(-) create mode 100644 kernel/av/gallery.go diff --git a/kernel/av/av.go b/kernel/av/av.go index 095492b80..94f9cc39f 100644 --- a/kernel/av/av.go +++ b/kernel/av/av.go @@ -184,15 +184,17 @@ type View struct { HideAttrViewName bool `json:"hideAttrViewName"` // 是否隐藏属性视图名称 Desc string `json:"desc"` // 视图描述 - LayoutType LayoutType `json:"type"` // 当前布局类型 - Table *LayoutTable `json:"table,omitempty"` // 表格布局 + LayoutType LayoutType `json:"type"` // 当前布局类型 + Table *LayoutTable `json:"table,omitempty"` // 表格布局 + Gallery *LayoutGallery `json:"gallery,omitempty"` // 画廊布局 } // LayoutType 描述了视图布局的类型。 type LayoutType string const ( - LayoutTypeTable LayoutType = "table" // 属性视图类型 - 表格 + LayoutTypeTable LayoutType = "table" // 属性视图类型 - 表格 + LayoutTypeGallery LayoutType = "gallery" // 属性视图类型 - 画廊 ) func NewTableView() (ret *View) { @@ -233,6 +235,22 @@ func NewTableViewWithBlockKey(blockKeyID string) (view *View, blockKey, selectKe return } +func NewGalleryView() (ret *View) { + ret = &View{ + ID: ast.NewNodeID(), + Name: getI18nName("gallery"), + LayoutType: LayoutTypeGallery, + Gallery: &LayoutGallery{ + Spec: 0, + ID: ast.NewNodeID(), + Filters: []*ViewFilter{}, + Sorts: []*ViewSort{}, + PageSize: 50, + }, + } + return +} + // Viewable 描述了视图的接口。 type Viewable interface { Filterable diff --git a/kernel/av/gallery.go b/kernel/av/gallery.go new file mode 100644 index 000000000..9e1aca7a7 --- /dev/null +++ b/kernel/av/gallery.go @@ -0,0 +1,77 @@ +// SiYuan - Refactor your thinking +// Copyright (c) 2020-present, b3log.org +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package av + +// LayoutGallery 描述了画廊布局的结构。 +type LayoutGallery struct { + Spec int `json:"spec"` // 布局格式版本 + ID string `json:"id"` // 布局 ID + + CoverFrom int `json:"coverFrom"` // 封面来源,0:无,1:内容图,2:资源字段 + CoverFromAssetKeyID string `json:"coverFromAssetKeyId,omitempty"` // 资源字段 ID,CoverFrom 为 2 时有效 + CardFields []*ViewGalleryCardField `json:"fields"` // 画廊卡片字段 + CardIDs []string `json:"cardIds"` // 卡片 ID,用于自定义排序 + Filters []*ViewFilter `json:"filters"` // 过滤规则 + Sorts []*ViewSort `json:"sorts"` // 排序规则 + PageSize int `json:"pageSize"` // 每页卡片数 +} + +// ViewGalleryCardField 描述了画廊卡片字段的结构。 +type ViewGalleryCardField struct { + ID string `json:"id"` // 字段 ID + + Hidden bool `json:"hidden"` // 是否隐藏 + Desc string `json:"desc,omitempty"` // 字段描述 +} + +// Gallery 描述了画廊实例的结构。 +type Gallery struct { + ID string `json:"id"` // 画廊布局 ID + Icon string `json:"icon"` // 画廊图标 + Name string `json:"name"` // 画廊名称 + Desc string `json:"desc"` // 画廊描述 + HideAttrViewName bool `json:"hideAttrViewName"` // 是否隐藏属性视图名称 + Filters []*ViewFilter `json:"filters"` // 过滤规则 + Sorts []*ViewSort `json:"sorts"` // 排序规则 + Cards []*GalleryCard `json:"cards"` // 画廊卡片 + CardCount int `json:"cardCount"` // 画廊总卡片数 + Limit int `json:"limit"` // 每页卡片数 +} + +// GalleryCard 描述了画廊实例卡片的结构。 +type GalleryCard struct { + ID string `json:"id"` // 卡片 ID + Fields []*GalleryField `json:"fields"` // 卡片字段 + + CoverURL string `json:"coverURL"` // 卡片封面超链接 +} + +// GalleryField 描述了画廊实例卡片字段的结构。 +type GalleryField struct { + ID string `json:"id"` // 字段 ID + Value *Value `json:"value"` // 字段值 + ValueType KeyType `json:"valueType"` // 字段值类型 + + // 以下是某些字段类型的特有属性 + + Options []*SelectOption `json:"options,omitempty"` // 选项字段表 + NumberFormat NumberFormat `json:"numberFormat"` // 数字字段格式化 + Template string `json:"template"` // 模板字段内容 + Relation *Relation `json:"relation,omitempty"` // 关联字段 + Rollup *Rollup `json:"rollup,omitempty"` // 汇总字段 + Date *Date `json:"date,omitempty"` // 日期设置 +}