chore: update deps

This commit is contained in:
2025-10-12 20:51:46 +07:00
parent 2415374567
commit 1742031901
2 changed files with 25 additions and 46 deletions

36
Cargo.lock generated
View File

@@ -2533,7 +2533,7 @@ dependencies = [
[[package]] [[package]]
name = "gpui" name = "gpui"
version = "0.2.0" version = "0.2.0"
source = "git+https://github.com/zed-industries/zed#42365df12fa6af685bc132318ce60fc655c7f936" source = "git+https://github.com/zed-industries/zed#998fece3af752121c2aa336588934d86958547b5"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"as-raw-xcb-connection", "as-raw-xcb-connection",
@@ -2627,7 +2627,7 @@ dependencies = [
[[package]] [[package]]
name = "gpui-macros" name = "gpui-macros"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#42365df12fa6af685bc132318ce60fc655c7f936" source = "git+https://github.com/zed-industries/zed#998fece3af752121c2aa336588934d86958547b5"
dependencies = [ dependencies = [
"heck 0.5.0", "heck 0.5.0",
"proc-macro2", "proc-macro2",
@@ -2639,7 +2639,7 @@ dependencies = [
[[package]] [[package]]
name = "gpui_tokio" name = "gpui_tokio"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#42365df12fa6af685bc132318ce60fc655c7f936" source = "git+https://github.com/zed-industries/zed#998fece3af752121c2aa336588934d86958547b5"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"gpui", "gpui",
@@ -2869,7 +2869,7 @@ dependencies = [
[[package]] [[package]]
name = "http_client_tls" name = "http_client_tls"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#42365df12fa6af685bc132318ce60fc655c7f936" source = "git+https://github.com/zed-industries/zed#998fece3af752121c2aa336588934d86958547b5"
dependencies = [ dependencies = [
"rustls", "rustls",
"rustls-platform-verifier", "rustls-platform-verifier",
@@ -3784,9 +3784,9 @@ dependencies = [
[[package]] [[package]]
name = "moxcms" name = "moxcms"
version = "0.7.6" version = "0.7.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1cc7d85f3d741164e8972ad355e26ac6e51b20fcae5f911c7da8f2d8bbbb3f33" checksum = "c588e11a3082784af229e23e8e4ecf5bcc6fbe4f69101e0421ce8d79da7f0b40"
dependencies = [ dependencies = [
"num-traits", "num-traits",
"pxfm", "pxfm",
@@ -5210,7 +5210,7 @@ dependencies = [
[[package]] [[package]]
name = "reqwest_client" name = "reqwest_client"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#42365df12fa6af685bc132318ce60fc655c7f936" source = "git+https://github.com/zed-industries/zed#998fece3af752121c2aa336588934d86958547b5"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bytes", "bytes",
@@ -5265,7 +5265,7 @@ dependencies = [
[[package]] [[package]]
name = "rope" name = "rope"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#42365df12fa6af685bc132318ce60fc655c7f936" source = "git+https://github.com/zed-industries/zed#998fece3af752121c2aa336588934d86958547b5"
dependencies = [ dependencies = [
"arrayvec", "arrayvec",
"log", "log",
@@ -8495,7 +8495,7 @@ dependencies = [
[[package]] [[package]]
name = "zed-collections" name = "zed-collections"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#42365df12fa6af685bc132318ce60fc655c7f936" source = "git+https://github.com/zed-industries/zed#998fece3af752121c2aa336588934d86958547b5"
dependencies = [ dependencies = [
"indexmap", "indexmap",
"rustc-hash 2.1.1", "rustc-hash 2.1.1",
@@ -8505,7 +8505,7 @@ dependencies = [
[[package]] [[package]]
name = "zed-derive-refineable" name = "zed-derive-refineable"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#42365df12fa6af685bc132318ce60fc655c7f936" source = "git+https://github.com/zed-industries/zed#998fece3af752121c2aa336588934d86958547b5"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@@ -8540,7 +8540,7 @@ dependencies = [
[[package]] [[package]]
name = "zed-http-client" name = "zed-http-client"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#42365df12fa6af685bc132318ce60fc655c7f936" source = "git+https://github.com/zed-industries/zed#998fece3af752121c2aa336588934d86958547b5"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-compression", "async-compression",
@@ -8566,7 +8566,7 @@ dependencies = [
[[package]] [[package]]
name = "zed-media" name = "zed-media"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#42365df12fa6af685bc132318ce60fc655c7f936" source = "git+https://github.com/zed-industries/zed#998fece3af752121c2aa336588934d86958547b5"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bindgen 0.71.1", "bindgen 0.71.1",
@@ -8582,7 +8582,7 @@ dependencies = [
[[package]] [[package]]
name = "zed-perf" name = "zed-perf"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#42365df12fa6af685bc132318ce60fc655c7f936" source = "git+https://github.com/zed-industries/zed#998fece3af752121c2aa336588934d86958547b5"
dependencies = [ dependencies = [
"serde", "serde",
"serde_json", "serde_json",
@@ -8593,7 +8593,7 @@ dependencies = [
[[package]] [[package]]
name = "zed-refineable" name = "zed-refineable"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#42365df12fa6af685bc132318ce60fc655c7f936" source = "git+https://github.com/zed-industries/zed#998fece3af752121c2aa336588934d86958547b5"
dependencies = [ dependencies = [
"workspace-hack", "workspace-hack",
"zed-derive-refineable", "zed-derive-refineable",
@@ -8672,7 +8672,7 @@ dependencies = [
[[package]] [[package]]
name = "zed-semantic-version" name = "zed-semantic-version"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#42365df12fa6af685bc132318ce60fc655c7f936" source = "git+https://github.com/zed-industries/zed#998fece3af752121c2aa336588934d86958547b5"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"serde", "serde",
@@ -8682,7 +8682,7 @@ dependencies = [
[[package]] [[package]]
name = "zed-sum-tree" name = "zed-sum-tree"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#42365df12fa6af685bc132318ce60fc655c7f936" source = "git+https://github.com/zed-industries/zed#998fece3af752121c2aa336588934d86958547b5"
dependencies = [ dependencies = [
"arrayvec", "arrayvec",
"log", "log",
@@ -8693,7 +8693,7 @@ dependencies = [
[[package]] [[package]]
name = "zed-util" name = "zed-util"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#42365df12fa6af685bc132318ce60fc655c7f936" source = "git+https://github.com/zed-industries/zed#998fece3af752121c2aa336588934d86958547b5"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-fs", "async-fs",
@@ -8729,7 +8729,7 @@ dependencies = [
[[package]] [[package]]
name = "zed-util-macros" name = "zed-util-macros"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#42365df12fa6af685bc132318ce60fc655c7f936" source = "git+https://github.com/zed-industries/zed#998fece3af752121c2aa336588934d86958547b5"
dependencies = [ dependencies = [
"quote", "quote",
"syn 2.0.106", "syn 2.0.106",

View File

@@ -19,8 +19,7 @@ impl Gossip {
pub fn insert(&mut self, event: &Event) { pub fn insert(&mut self, event: &Event) {
match event.kind { match event.kind {
Kind::InboxRelays => { Kind::InboxRelays => {
let urls: Vec<RelayUrl> = let urls: Vec<RelayUrl> = nip17::extract_relay_list(event).cloned().collect();
nip17::extract_relay_list(event).take(3).cloned().collect();
if !urls.is_empty() { if !urls.is_empty() {
self.nip17.entry(event.pubkey).or_default().extend(urls); self.nip17.entry(event.pubkey).or_default().extend(urls);
@@ -85,22 +84,12 @@ impl Gossip {
let timeout = Duration::from_secs(5); let timeout = Duration::from_secs(5);
let opts = SubscribeAutoCloseOptions::default().exit_policy(ReqExitPolicy::ExitOnEOSE); let opts = SubscribeAutoCloseOptions::default().exit_policy(ReqExitPolicy::ExitOnEOSE);
let latest_filter = Filter::new() let filter = Filter::new()
.kind(Kind::RelayList) .kind(Kind::RelayList)
.author(public_key) .author(public_key)
.limit(1); .limit(1);
// Subscribe to events from the bootstrapping relays // Subscribe to events from the bootstrapping relays
client
.subscribe_to(BOOTSTRAP_RELAYS, latest_filter.clone(), Some(opts))
.await?;
let filter = Filter::new()
.kind(Kind::RelayList)
.author(public_key)
.since(Timestamp::now());
// Continuously subscribe for new events from the bootstrap relays
client client
.subscribe_to(BOOTSTRAP_RELAYS, filter.clone(), Some(opts)) .subscribe_to(BOOTSTRAP_RELAYS, filter.clone(), Some(opts))
.await?; .await?;
@@ -109,7 +98,7 @@ impl Gossip {
smol::spawn(async move { smol::spawn(async move {
smol::Timer::after(timeout).await; smol::Timer::after(timeout).await;
if client.database().count(latest_filter).await.unwrap_or(0) < 1 { if client.database().count(filter).await.unwrap_or(0) < 1 {
app_state() app_state()
.signal .signal
.send(SignalKind::GossipRelaysNotFound) .send(SignalKind::GossipRelaysNotFound)
@@ -168,7 +157,7 @@ impl Gossip {
// Ensure user's have at least one write relay // Ensure user's have at least one write relay
if urls.is_empty() { if urls.is_empty() {
return Err(anyhow!("NIP-17 relays are empty")); return Err(anyhow!("Write relays are empty"));
} }
// Ensure connection to relays // Ensure connection to relays
@@ -177,22 +166,12 @@ impl Gossip {
client.connect_relay(url).await?; client.connect_relay(url).await?;
} }
let latest_filter = Filter::new() let filter = Filter::new()
.kind(Kind::InboxRelays) .kind(Kind::InboxRelays)
.author(public_key) .author(public_key)
.limit(1); .limit(1);
// Subscribe to events from the bootstrapping relays // Subscribe to events from the bootstrapping relays
client
.subscribe_to(urls.clone(), latest_filter.clone(), Some(opts))
.await?;
let filter = Filter::new()
.kind(Kind::InboxRelays)
.author(public_key)
.since(Timestamp::now());
// Continuously subscribe for new events from the bootstrap relays
client client
.subscribe_to(urls, filter.clone(), Some(opts)) .subscribe_to(urls, filter.clone(), Some(opts))
.await?; .await?;
@@ -201,7 +180,7 @@ impl Gossip {
smol::spawn(async move { smol::spawn(async move {
smol::Timer::after(timeout).await; smol::Timer::after(timeout).await;
if client.database().count(latest_filter).await.unwrap_or(0) < 1 { if client.database().count(filter).await.unwrap_or(0) < 1 {
app_state() app_state()
.signal .signal
.send(SignalKind::MessagingRelaysNotFound) .send(SignalKind::MessagingRelaysNotFound)
@@ -266,7 +245,7 @@ impl Gossip {
// Ensure user's have at least one write relay // Ensure user's have at least one write relay
if urls.is_empty() { if urls.is_empty() {
return Err(anyhow!("NIP-65 relays are empty")); return Err(anyhow!("Write relays are empty"));
} }
// Ensure connection to relays // Ensure connection to relays