Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: 整理依赖

Liang Ding8e7fafbdfe54
diff --git a/README.md b/README.md
index b15c8bde96..63bc731163 100644
--- a/README.md
+++ b/README.md
@@ -268,9 +268,9 @@ SiYuan is made possible by the following open source projects.
* [https://github.com/ConradIrwin/font](https://github.com/ConradIrwin/font) `MIT License`
* [https://github.com/Masterminds/sprig](https://github.com/Masterminds/sprig) `MIT License`
* [https://github.com/PuerkitoBio/goquery](https://github.com/PuerkitoBio/goquery) `BSD-3-Clause License`
+* [https://github.com/Xuanwo/go-locale](https://github.com/Xuanwo/go-locale) `Apache-2.0 License`
* [https://github.com/araddon/dateparse](https://github.com/araddon/dateparse) `MIT License`
* [https://github.com/common-nighthawk/go-figure](https://github.com/common-nighthawk/go-figure) `MIT License`
-* [https://github.com/denisbrodbeck/machineid](https://github.com/denisbrodbeck/machineid) `MIT License`
* [https://github.com/dgraph-io/ristretto](https://github.com/dgraph-io/ristretto) `Apache-2.0 License`
* [https://github.com/dustin/go-humanize](https://github.com/dustin/go-humanize) `MIT License`
* [https://github.com/emirpasic/gods](https://github.com/emirpasic/gods) `BSD-2-Clause License`
diff --git a/README_zh_CN.md b/README_zh_CN.md
index 16ddf8fbd4..110db60564 100644
--- a/README_zh_CN.md
+++ b/README_zh_CN.md
@@ -277,9 +277,9 @@
* [https://github.com/ConradIrwin/font](https://github.com/ConradIrwin/font) `MIT License`
* [https://github.com/Masterminds/sprig](https://github.com/Masterminds/sprig) `MIT License`
* [https://github.com/PuerkitoBio/goquery](https://github.com/PuerkitoBio/goquery) `BSD-3-Clause License`
+* [https://github.com/Xuanwo/go-locale](https://github.com/Xuanwo/go-locale) `Apache-2.0 License`
* [https://github.com/araddon/dateparse](https://github.com/araddon/dateparse) `MIT License`
* [https://github.com/common-nighthawk/go-figure](https://github.com/common-nighthawk/go-figure) `MIT License`
-* [https://github.com/denisbrodbeck/machineid](https://github.com/denisbrodbeck/machineid) `MIT License`
* [https://github.com/dgraph-io/ristretto](https://github.com/dgraph-io/ristretto) `Apache-2.0 License`
* [https://github.com/dustin/go-humanize](https://github.com/dustin/go-humanize) `MIT License`
* [https://github.com/emirpasic/gods](https://github.com/emirpasic/gods) `BSD-2-Clause License`
diff --git a/app/guide/20210808180117-6v0mkxr/20201121224345-rc27qvo.sy b/app/guide/20210808180117-6v0mkxr/20201121224345-rc27qvo.sy
index a55d127fb3..5679955481 100644
--- a/app/guide/20210808180117-6v0mkxr/20201121224345-rc27qvo.sy
+++ b/app/guide/20210808180117-6v0mkxr/20201121224345-rc27qvo.sy
@@ -6,7 +6,7 @@
"id": "20201121224345-rc27qvo",
"title": "Acknowledgements",
"type": "doc",
- "updated": "20220627111416"
+ "updated": "20220714213452"
},
"Children": [
{
@@ -29,7 +29,7 @@
"ListData": {},
"Properties": {
"id": "20220522101213-z3hokh2",
- "updated": "20220627111416"
+ "updated": "20220714213452"
},
"Children": [
{
@@ -943,23 +943,23 @@
]
},
{
- "ID": "20220522101213-wnm7wrk",
+ "ID": "20220714213423-trvfz6b",
"Type": "NodeListItem",
"ListData": {
"BulletChar": 42,
"Marker": "Kg=="
},
"Properties": {
- "id": "20220522101213-wnm7wrk",
- "updated": "20220522101213"
+ "id": "20220714213423-trvfz6b",
+ "updated": "20220714213452"
},
"Children": [
{
- "ID": "20220522101213-dbo1c15",
+ "ID": "20220714213423-98xbjwl",
"Type": "NodeParagraph",
"Properties": {
- "id": "20220522101213-dbo1c15",
- "updated": "20220522101213"
+ "id": "20220714213423-98xbjwl",
+ "updated": "20220714213452"
},
"Children": [
{
@@ -971,7 +971,7 @@
},
{
"Type": "NodeLinkText",
- "Data": "https://github.com/araddon/dateparse"
+ "Data": "https://github.com/Xuanwo/go-locale"
},
{
"Type": "NodeCloseBracket"
@@ -981,7 +981,7 @@
},
{
"Type": "NodeLinkDest",
- "Data": "https://github.com/araddon/dateparse"
+ "Data": "https://github.com/Xuanwo/go-locale"
},
{
"Type": "NodeCloseParen"
@@ -1001,7 +1001,7 @@
},
{
"Type": "NodeCodeSpanContent",
- "Data": "MIT License"
+ "Data": "Apache-2.0 License"
},
{
"Type": "NodeCodeSpanCloseMarker"
@@ -1013,22 +1013,22 @@
]
},
{
- "ID": "20220522101213-fskm2ln",
+ "ID": "20220522101213-wnm7wrk",
"Type": "NodeListItem",
"ListData": {
"BulletChar": 42,
"Marker": "Kg=="
},
"Properties": {
- "id": "20220522101213-fskm2ln",
+ "id": "20220522101213-wnm7wrk",
"updated": "20220522101213"
},
"Children": [
{
- "ID": "20220522101213-68bec73",
+ "ID": "20220522101213-dbo1c15",
"Type": "NodeParagraph",
"Properties": {
- "id": "20220522101213-68bec73",
+ "id": "20220522101213-dbo1c15",
"updated": "20220522101213"
},
"Children": [
@@ -1041,7 +1041,7 @@
},
{
"Type": "NodeLinkText",
- "Data": "https://github.com/common-nighthawk/go-figure"
+ "Data": "https://github.com/araddon/dateparse"
},
{
"Type": "NodeCloseBracket"
@@ -1051,7 +1051,7 @@
},
{
"Type": "NodeLinkDest",
- "Data": "https://github.com/common-nighthawk/go-figure"
+ "Data": "https://github.com/araddon/dateparse"
},
{
"Type": "NodeCloseParen"
@@ -1083,22 +1083,22 @@
]
},
{
- "ID": "20220522101213-wi37jo4",
+ "ID": "20220522101213-fskm2ln",
"Type": "NodeListItem",
"ListData": {
"BulletChar": 42,
"Marker": "Kg=="
},
"Properties": {
- "id": "20220522101213-wi37jo4",
+ "id": "20220522101213-fskm2ln",
"updated": "20220522101213"
},
"Children": [
{
- "ID": "20220522101213-ubnap2y",
+ "ID": "20220522101213-68bec73",
"Type": "NodeParagraph",
"Properties": {
- "id": "20220522101213-ubnap2y",
+ "id": "20220522101213-68bec73",
"updated": "20220522101213"
},
"Children": [
@@ -1111,7 +1111,7 @@
},
{
"Type": "NodeLinkText",
- "Data": "https://github.com/denisbrodbeck/machineid"
+ "Data": "https://github.com/common-nighthawk/go-figure"
},
{
"Type": "NodeCloseBracket"
@@ -1121,7 +1121,7 @@
},
{
"Type": "NodeLinkDest",
- "Data": "https://github.com/denisbrodbeck/machineid"
+ "Data": "https://github.com/common-nighthawk/go-figure"
},
{
"Type": "NodeCloseParen"
diff --git a/app/guide/20210808180117-czj9bvb/20201121212605-9td1a62.sy b/app/guide/20210808180117-czj9bvb/20201121212605-9td1a62.sy
index 15155e3fe2..b429201a5b 100644
--- a/app/guide/20210808180117-czj9bvb/20201121212605-9td1a62.sy
+++ b/app/guide/20210808180117-czj9bvb/20201121212605-9td1a62.sy
@@ -6,7 +6,7 @@
"id": "20201121212605-9td1a62",
"title": "致谢",
"type": "doc",
- "updated": "20220627111458"
+ "updated": "20220714213505"
},
"Children": [
{
@@ -29,7 +29,7 @@
"ListData": {},
"Properties": {
"id": "20220522101224-ctmcj3d",
- "updated": "20220627111458"
+ "updated": "20220714213505"
},
"Children": [
{
@@ -943,23 +943,23 @@
]
},
{
- "ID": "20220522101224-kd4artt",
+ "ID": "20220714213505-1jo69vh",
"Type": "NodeListItem",
"ListData": {
"BulletChar": 42,
"Marker": "Kg=="
},
"Properties": {
- "id": "20220522101224-kd4artt",
- "updated": "20220522101224"
+ "id": "20220714213505-1jo69vh",
+ "updated": "20220714213505"
},
"Children": [
{
- "ID": "20220522101224-sav0t87",
+ "ID": "20220714213505-2fv6zng",
"Type": "NodeParagraph",
"Properties": {
- "id": "20220522101224-sav0t87",
- "updated": "20220522101224"
+ "id": "20220714213505-2fv6zng",
+ "updated": "20220714213505"
},
"Children": [
{
@@ -971,7 +971,7 @@
},
{
"Type": "NodeLinkText",
- "Data": "https://github.com/araddon/dateparse"
+ "Data": "https://github.com/Xuanwo/go-locale"
},
{
"Type": "NodeCloseBracket"
@@ -981,7 +981,7 @@
},
{
"Type": "NodeLinkDest",
- "Data": "https://github.com/araddon/dateparse"
+ "Data": "https://github.com/Xuanwo/go-locale"
},
{
"Type": "NodeCloseParen"
@@ -1001,7 +1001,7 @@
},
{
"Type": "NodeCodeSpanContent",
- "Data": "MIT License"
+ "Data": "Apache-2.0 License"
},
{
"Type": "NodeCodeSpanCloseMarker"
@@ -1013,22 +1013,22 @@
]
},
{
- "ID": "20220522101224-ixndqmt",
+ "ID": "20220522101224-kd4artt",
"Type": "NodeListItem",
"ListData": {
"BulletChar": 42,
"Marker": "Kg=="
},
"Properties": {
- "id": "20220522101224-ixndqmt",
+ "id": "20220522101224-kd4artt",
"updated": "20220522101224"
},
"Children": [
{
- "ID": "20220522101224-0modgpd",
+ "ID": "20220522101224-sav0t87",
"Type": "NodeParagraph",
"Properties": {
- "id": "20220522101224-0modgpd",
+ "id": "20220522101224-sav0t87",
"updated": "20220522101224"
},
"Children": [
@@ -1041,7 +1041,7 @@
},
{
"Type": "NodeLinkText",
- "Data": "https://github.com/common-nighthawk/go-figure"
+ "Data": "https://github.com/araddon/dateparse"
},
{
"Type": "NodeCloseBracket"
@@ -1051,7 +1051,7 @@
},
{
"Type": "NodeLinkDest",
- "Data": "https://github.com/common-nighthawk/go-figure"
+ "Data": "https://github.com/araddon/dateparse"
},
{
"Type": "NodeCloseParen"
@@ -1083,22 +1083,22 @@
]
},
{
- "ID": "20220522101224-y04bj0j",
+ "ID": "20220522101224-ixndqmt",
"Type": "NodeListItem",
"ListData": {
"BulletChar": 42,
"Marker": "Kg=="
},
"Properties": {
- "id": "20220522101224-y04bj0j",
+ "id": "20220522101224-ixndqmt",
"updated": "20220522101224"
},
"Children": [
{
- "ID": "20220522101224-44d4hhu",
+ "ID": "20220522101224-0modgpd",
"Type": "NodeParagraph",
"Properties": {
- "id": "20220522101224-44d4hhu",
+ "id": "20220522101224-0modgpd",
"updated": "20220522101224"
},
"Children": [
@@ -1111,7 +1111,7 @@
},
{
"Type": "NodeLinkText",
- "Data": "https://github.com/denisbrodbeck/machineid"
+ "Data": "https://github.com/common-nighthawk/go-figure"
},
{
"Type": "NodeCloseBracket"
@@ -1121,7 +1121,7 @@
},
{
"Type": "NodeLinkDest",
- "Data": "https://github.com/denisbrodbeck/machineid"
+ "Data": "https://github.com/common-nighthawk/go-figure"
},
{
"Type": "NodeCloseParen"
diff --git a/app/guide/20211226090932-5lcq56f/20211226114929-08ap1r0.sy b/app/guide/20211226090932-5lcq56f/20211226114929-08ap1r0.sy
index 74c6461d6c..40af7191d9 100644
--- a/app/guide/20211226090932-5lcq56f/20211226114929-08ap1r0.sy
+++ b/app/guide/20211226090932-5lcq56f/20211226114929-08ap1r0.sy
@@ -5,7 +5,7 @@
"icon": "1f64f",
"id": "20211226114929-08ap1r0",
"title": "致謝",
- "updated": "20220627111449"
+ "updated": "20220714213510"
},
"Children": [
{
@@ -28,7 +28,7 @@
"ListData": {},
"Properties": {
"id": "20220326092650-r61gazd",
- "updated": "20220627111449"
+ "updated": "20220714213510"
},
"Children": [
{
@@ -942,23 +942,23 @@
]
},
{
- "ID": "20220326092650-vzdjz6z",
+ "ID": "20220714213510-q1tx9ve",
"Type": "NodeListItem",
"ListData": {
"BulletChar": 42,
"Marker": "Kg=="
},
"Properties": {
- "id": "20220326092650-vzdjz6z",
- "updated": "20220326092650"
+ "id": "20220714213510-q1tx9ve",
+ "updated": "20220714213510"
},
"Children": [
{
- "ID": "20220326092650-48bdhxa",
+ "ID": "20220714213510-l4v3b8t",
"Type": "NodeParagraph",
"Properties": {
- "id": "20220326092650-48bdhxa",
- "updated": "20220326092650"
+ "id": "20220714213510-l4v3b8t",
+ "updated": "20220714213510"
},
"Children": [
{
@@ -970,7 +970,7 @@
},
{
"Type": "NodeLinkText",
- "Data": "https://github.com/araddon/dateparse"
+ "Data": "https://github.com/Xuanwo/go-locale"
},
{
"Type": "NodeCloseBracket"
@@ -980,7 +980,7 @@
},
{
"Type": "NodeLinkDest",
- "Data": "https://github.com/araddon/dateparse"
+ "Data": "https://github.com/Xuanwo/go-locale"
},
{
"Type": "NodeCloseParen"
@@ -1000,7 +1000,7 @@
},
{
"Type": "NodeCodeSpanContent",
- "Data": "MIT License"
+ "Data": "Apache-2.0 License"
},
{
"Type": "NodeCodeSpanCloseMarker"
@@ -1012,22 +1012,22 @@
]
},
{
- "ID": "20220326092650-u0bhj7u",
+ "ID": "20220326092650-vzdjz6z",
"Type": "NodeListItem",
"ListData": {
"BulletChar": 42,
"Marker": "Kg=="
},
"Properties": {
- "id": "20220326092650-u0bhj7u",
+ "id": "20220326092650-vzdjz6z",
"updated": "20220326092650"
},
"Children": [
{
- "ID": "20220326092650-7a41hb5",
+ "ID": "20220326092650-48bdhxa",
"Type": "NodeParagraph",
"Properties": {
- "id": "20220326092650-7a41hb5",
+ "id": "20220326092650-48bdhxa",
"updated": "20220326092650"
},
"Children": [
@@ -1040,7 +1040,7 @@
},
{
"Type": "NodeLinkText",
- "Data": "https://github.com/common-nighthawk/go-figure"
+ "Data": "https://github.com/araddon/dateparse"
},
{
"Type": "NodeCloseBracket"
@@ -1050,7 +1050,7 @@
},
{
"Type": "NodeLinkDest",
- "Data": "https://github.com/common-nighthawk/go-figure"
+ "Data": "https://github.com/araddon/dateparse"
},
{
"Type": "NodeCloseParen"
@@ -1082,23 +1082,23 @@
]
},
{
- "ID": "20220511113332-16r3f9e",
+ "ID": "20220326092650-u0bhj7u",
"Type": "NodeListItem",
"ListData": {
"BulletChar": 42,
"Marker": "Kg=="
},
"Properties": {
- "id": "20220511113332-16r3f9e",
- "updated": "20220511113333"
+ "id": "20220326092650-u0bhj7u",
+ "updated": "20220326092650"
},
"Children": [
{
- "ID": "20220511113332-xioftl4",
+ "ID": "20220326092650-7a41hb5",
"Type": "NodeParagraph",
"Properties": {
- "id": "20220511113332-xioftl4",
- "updated": "20220511113333"
+ "id": "20220326092650-7a41hb5",
+ "updated": "20220326092650"
},
"Children": [
{
@@ -1110,7 +1110,7 @@
},
{
"Type": "NodeLinkText",
- "Data": "https://github.com/denisbrodbeck/machineid"
+ "Data": "https://github.com/common-nighthawk/go-figure"
},
{
"Type": "NodeCloseBracket"
@@ -1120,7 +1120,7 @@
},
{
"Type": "NodeLinkDest",
- "Data": "https://github.com/denisbrodbeck/machineid"
+ "Data": "https://github.com/common-nighthawk/go-figure"
},
{
"Type": "NodeCloseParen"
diff --git a/kernel/go.mod b/kernel/go.mod
index 0799c6cf2c..343b4c6059 100644
--- a/kernel/go.mod
+++ b/kernel/go.mod
@@ -18,7 +18,6 @@ require (
github.com/Xuanwo/go-locale v1.1.0
github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de
github.com/common-nighthawk/go-figure v0.0.0-20210622060536-734e95fb86be
- github.com/denisbrodbeck/machineid v1.0.1
github.com/dgraph-io/ristretto v0.1.0
github.com/dustin/go-humanize v1.0.0
github.com/emirpasic/gods v1.18.1
diff --git a/kernel/go.sum b/kernel/go.sum
index 5a31c25fce..805dff0f30 100644
--- a/kernel/go.sum
+++ b/kernel/go.sum
@@ -109,8 +109,6 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/denisbrodbeck/machineid v1.0.1 h1:geKr9qtkB876mXguW2X6TU4ZynleN6ezuMSRhl4D7AQ=
-github.com/denisbrodbeck/machineid v1.0.1/go.mod h1:dJUwb7PTidGDeYyUBmXZ2GphQBbjJCrnectwCyxcUSI=
github.com/dgraph-io/ristretto v0.1.0 h1:Jv3CGQHp9OjuMBSne1485aDpUkTKEcUqF+jm/LuerPI=
github.com/dgraph-io/ristretto v0.1.0/go.mod h1:fux0lOrBhrVCJd3lcTHsIJhq1T2rokOu6v9Vcb3Q9ug=
github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 h1:tdlZCpZ/P9DhczCTSixgIKmwPv6+wP5DGjqLYw5SUiA=
diff --git a/kernel/util/runtime.go b/kernel/util/runtime.go
index 779803f801..91fa1c71c2 100644
--- a/kernel/util/runtime.go
+++ b/kernel/util/runtime.go
@@ -24,7 +24,6 @@ import (
"time"
"github.com/88250/gulu"
- "github.com/denisbrodbeck/machineid"
"github.com/dustin/go-humanize"
)
@@ -65,17 +64,6 @@ func RandomSleep(minMills, maxMills int) {
time.Sleep(time.Duration(r) * time.Millisecond)
}
-func GetDeviceID() string {
- if "std" == Container {
- machineID, err := machineid.ID()
- if nil != err {
- return gulu.Rand.String(12)
- }
- return machineID
- }
- return gulu.Rand.String(12)
-}
-
func SetNetworkProxy(proxyURL string) {
if err := os.Setenv("HTTPS_PROXY", proxyURL); nil != err {
logger.Errorf("set env [HTTPS_PROXY] failed: %s", err)