Просмотр исходного кода

bin/darkwiki: move darkwikid and darkwiki-cli to the same directory in bin & bump version 0.4.0

ghassmo 3 лет назад
Родитель
Сommit
11f65b6d00

+ 4 - 4
Cargo.lock

@@ -1296,7 +1296,7 @@ dependencies = [
 
 [[package]]
 name = "darkwiki"
-version = "0.3.0"
+version = "0.4.0"
 dependencies = [
  "async-channel",
  "async-std",
@@ -1315,7 +1315,7 @@ dependencies = [
 
 [[package]]
 name = "darkwikid"
-version = "0.3.0"
+version = "0.4.0"
 dependencies = [
  "async-channel",
  "async-executor",
@@ -3986,7 +3986,7 @@ checksum = "c02424087780c9b71cc96799eaeddff35af2bc513278cda5c99fc1f5d026d3c1"
 
 [[package]]
 name = "tau"
-version = "0.3.0"
+version = "0.4.0"
 dependencies = [
  "async-std",
  "chrono",
@@ -4006,7 +4006,7 @@ dependencies = [
 
 [[package]]
 name = "taud"
-version = "0.3.0"
+version = "0.4.0"
 dependencies = [
  "async-channel",
  "async-executor",

+ 2 - 2
Cargo.toml

@@ -20,8 +20,6 @@ name = "darkfi"
 members = [
 	"bin/zkas",
 	#"bin/cashierd",
-	"bin/darkwiki",
-	"bin/darkwikid",
 	"bin/darkfid",
 	"bin/darkotc",
 	"bin/drk",
@@ -33,6 +31,8 @@ members = [
 	"bin/dao-cli",
 	"bin/tau/taud",
 	"bin/tau/tau-cli",
+	"bin/darkwiki/darkwikid",
+	"bin/darkwiki/darkwiki-cli",
 	"bin/vanityaddr",
 	"bin/lilith",
 

+ 2 - 2
bin/darkwiki/Cargo.toml → bin/darkwiki/darkwiki-cli/Cargo.toml

@@ -1,7 +1,7 @@
 [package]
 name = "darkwiki"
 description = ""
-version = "0.3.0"
+version = "0.4.0"
 edition = "2021"
 authors = ["darkfi <dev@dark.fi>"]
 license = "AGPL-3.0-only"
@@ -15,7 +15,7 @@ categories = []
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
 
 [dependencies]
-darkfi = {path = "../../", features = ["rpc"]}
+darkfi = {path = "../../../", features = ["rpc"]}
 
 
 # Async

+ 0 - 0
bin/darkwiki/src/main.rs → bin/darkwiki/darkwiki-cli/src/main.rs


+ 0 - 0
bin/darkwikid/darkwiki.toml → bin/darkwiki/darkwiki.toml


+ 0 - 0
bin/darkwikid/.gitignore → bin/darkwiki/darkwikid/.gitignore


+ 2 - 2
bin/darkwikid/Cargo.toml → bin/darkwiki/darkwikid/Cargo.toml

@@ -1,7 +1,7 @@
 [package]
 name = "darkwikid"
 description = ""
-version = "0.3.0"
+version = "0.4.0"
 edition = "2021"
 authors = ["darkfi <dev@dark.fi>"]
 license = "AGPL-3.0-only"
@@ -13,7 +13,7 @@ categories = []
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
 
 [dependencies]
-darkfi = {path = "../../", features = ["raft", "net", "rpc"]}
+darkfi = {path = "../../../", features = ["raft", "net", "rpc"]}
 
 
 # Async

+ 0 - 0
bin/darkwikid/src/jsonrpc.rs → bin/darkwiki/darkwikid/src/jsonrpc.rs


+ 0 - 0
bin/darkwikid/src/lcs.rs → bin/darkwiki/darkwikid/src/lcs.rs


+ 3 - 2
bin/darkwikid/src/main.rs → bin/darkwiki/darkwikid/src/main.rs

@@ -48,7 +48,7 @@ use patch::{OpMethod, Patch};
 type Patches = (Vec<Patch>, Vec<Patch>, Vec<Patch>, Vec<Patch>);
 
 pub const CONFIG_FILE: &str = "darkwiki.toml";
-pub const CONFIG_FILE_CONTENTS: &str = include_str!("../darkwiki.toml");
+pub const CONFIG_FILE_CONTENTS: &str = include_str!("../../darkwiki.toml");
 
 /// darkwikid cli
 #[derive(Clone, Debug, Deserialize, StructOpt, StructOptToml)]
@@ -225,8 +225,9 @@ impl Darkwiki {
                 }
                 patch = self.raft.1.recv().fuse() => {
                     for (workspace, salsa_box) in self.workspaces.iter() {
-                        if let Ok(patch) = decrypt_patch(&patch.clone()?, &salsa_box) {
+                        if let Ok(mut patch) = decrypt_patch(&patch.clone()?, &salsa_box) {
                             info!("[{}] Receive a {:?}", workspace, patch);
+                            patch.workspace = workspace.clone();
                             self.on_receive_patch(&patch)?;
                         }
                     }

+ 0 - 0
bin/darkwikid/src/patch.rs → bin/darkwiki/darkwikid/src/patch.rs


+ 0 - 3
bin/darkwikid/README.md

@@ -1,3 +0,0 @@
-# Darkwiki 
-
-see [Darkfi Book](https://darkrenaissance.github.io/darkfi/misc/darkwiki.html) for the installation guide.

+ 1 - 1
bin/tau/tau-cli/Cargo.toml

@@ -1,7 +1,7 @@
 [package]
 name = "tau"
 description = "Command-line client for taud"
-version = "0.3.0"
+version = "0.4.0"
 edition = "2021"
 authors = ["darkfi <dev@dark.fi>"]
 license = "AGPL-3.0-only"