rename conduit to conduwuit finally

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-12-14 21:58:01 -05:00
parent c6bf8f5ea1
commit 0317cc8cc5
No known key found for this signature in database
277 changed files with 559 additions and 551 deletions

View file

@ -1,5 +1,5 @@
[package]
name = "conduit_admin"
name = "conduwuit_admin"
categories.workspace = true
description.workspace = true
edition.workspace = true
@ -27,11 +27,11 @@ release_max_log_level = [
[dependencies]
clap.workspace = true
conduit-api.workspace = true
conduit-core.workspace = true
conduit-database.workspace = true
conduit-macros.workspace = true
conduit-service.workspace = true
conduwuit-api.workspace = true
conduwuit-core.workspace = true
conduwuit-database.workspace = true
conduwuit-macros.workspace = true
conduwuit-service.workspace = true
const-str.workspace = true
futures.workspace = true
log.workspace = true

View file

@ -1,5 +1,5 @@
use clap::Parser;
use conduit::Result;
use conduwuit::Result;
use ruma::events::room::message::RoomMessageEventContent;
use crate::{
@ -9,7 +9,7 @@ use crate::{
};
#[derive(Debug, Parser)]
#[command(name = "conduwuit", version = conduit::version())]
#[command(name = "conduwuit", version = conduwuit::version())]
pub(super) enum AdminCommand {
#[command(subcommand)]
/// - Commands for managing appservices

View file

@ -1,7 +1,7 @@
mod commands;
use clap::Subcommand;
use conduit::Result;
use conduwuit::Result;
use crate::admin_command_dispatch;

View file

@ -1,5 +1,5 @@
use conduit::Result;
use conduit_macros::implement;
use conduwuit::Result;
use conduwuit_macros::implement;
use futures::StreamExt;
use ruma::events::room::message::RoomMessageEventContent;

View file

@ -1,7 +1,7 @@
mod commands;
use clap::Subcommand;
use conduit::Result;
use conduwuit::Result;
use ruma::events::room::message::RoomMessageEventContent;
use crate::Command;

View file

@ -1,6 +1,6 @@
use std::time::SystemTime;
use conduit_service::Services;
use conduwuit_service::Services;
use ruma::EventId;
pub(crate) struct Command<'a> {

View file

@ -6,7 +6,7 @@ use std::{
time::{Instant, SystemTime},
};
use conduit::{debug_error, err, info, trace, utils, utils::string::EMPTY, warn, Error, PduEvent, Result};
use conduwuit::{debug_error, err, info, trace, utils, utils::string::EMPTY, warn, Error, PduEvent, Result};
use futures::{FutureExt, StreamExt};
use ruma::{
api::{client::error::ErrorKind, federation::event::get_room_state},
@ -754,7 +754,7 @@ pub(super) async fn resolve_true_destination(
#[admin_command]
pub(super) async fn memory_stats(&self) -> Result<RoomMessageEventContent> {
let html_body = conduit::alloc::memory_stats();
let html_body = conduwuit::alloc::memory_stats();
if html_body.is_none() {
return Ok(RoomMessageEventContent::text_plain(

View file

@ -2,7 +2,7 @@ mod commands;
pub(crate) mod tester;
use clap::Subcommand;
use conduit::Result;
use conduwuit::Result;
use ruma::{EventId, OwnedRoomOrAliasId, RoomId, ServerName};
use self::tester::TesterCommand;

View file

@ -1,4 +1,4 @@
use conduit::Err;
use conduwuit::Err;
use ruma::events::room::message::RoomMessageEventContent;
use crate::{admin_command, admin_command_dispatch, Result};

View file

@ -1,6 +1,6 @@
use std::fmt::Write;
use conduit::Result;
use conduwuit::Result;
use futures::StreamExt;
use ruma::{events::room::message::RoomMessageEventContent, OwnedRoomId, RoomId, ServerName, UserId};

View file

@ -1,7 +1,7 @@
mod commands;
use clap::Subcommand;
use conduit::Result;
use conduwuit::Result;
use ruma::{RoomId, ServerName, UserId};
use crate::admin_command_dispatch;

View file

@ -1,7 +1,7 @@
use std::time::Duration;
use conduit::{debug, debug_info, debug_warn, error, info, trace, utils::time::parse_timepoint_ago, Result};
use conduit_service::media::Dim;
use conduwuit::{debug, debug_info, debug_warn, error, info, trace, utils::time::parse_timepoint_ago, Result};
use conduwuit_service::media::Dim;
use ruma::{
events::room::message::RoomMessageEventContent, EventId, Mxc, MxcUri, OwnedMxcUri, OwnedServerName, ServerName,
};

View file

@ -1,7 +1,7 @@
mod commands;
use clap::Subcommand;
use conduit::Result;
use conduwuit::Result;
use ruma::{EventId, MxcUri, OwnedMxcUri, OwnedServerName, ServerName};
use crate::admin_command_dispatch;

View file

@ -18,12 +18,12 @@ pub(crate) mod room;
pub(crate) mod server;
pub(crate) mod user;
extern crate conduit_api as api;
extern crate conduit_core as conduit;
extern crate conduit_service as service;
extern crate conduwuit_api as api;
extern crate conduwuit_core as conduwuit;
extern crate conduwuit_service as service;
pub(crate) use conduit::Result;
pub(crate) use conduit_macros::{admin_command, admin_command_dispatch};
pub(crate) use conduwuit::Result;
pub(crate) use conduwuit_macros::{admin_command, admin_command_dispatch};
pub(crate) use crate::{
command::Command,
@ -32,9 +32,9 @@ pub(crate) use crate::{
pub(crate) const PAGE_SIZE: usize = 100;
conduit::mod_ctor! {}
conduit::mod_dtor! {}
conduit::rustc_flags_capture! {}
conduwuit::mod_ctor! {}
conduwuit::mod_dtor! {}
conduwuit::rustc_flags_capture! {}
/// Install the admin command processor
pub async fn init(admin_service: &service::admin::Service) {

View file

@ -6,7 +6,7 @@ use std::{
};
use clap::{CommandFactory, Parser};
use conduit::{
use conduwuit::{
debug, error,
log::{
capture,

View file

@ -1,5 +1,5 @@
use clap::Subcommand;
use conduit::Result;
use conduwuit::Result;
use futures::StreamExt;
use ruma::{events::room::message::RoomMessageEventContent, RoomId, UserId};

View file

@ -1,5 +1,5 @@
use clap::Subcommand;
use conduit::Result;
use conduwuit::Result;
use ruma::events::room::message::RoomMessageEventContent;
use crate::Command;

View file

@ -1,5 +1,5 @@
use clap::Subcommand;
use conduit::Result;
use conduwuit::Result;
use ruma::{events::room::message::RoomMessageEventContent, ServerName};
use crate::Command;

View file

@ -10,7 +10,7 @@ mod sending;
mod users;
use clap::Subcommand;
use conduit::Result;
use conduwuit::Result;
use self::{
account_data::AccountDataCommand, appservice::AppserviceCommand, globals::GlobalsCommand,

View file

@ -1,5 +1,5 @@
use clap::Subcommand;
use conduit::Result;
use conduwuit::Result;
use futures::StreamExt;
use ruma::{events::room::message::RoomMessageEventContent, UserId};

View file

@ -1,5 +1,5 @@
use clap::Subcommand;
use conduit::Result;
use conduwuit::Result;
use ruma::{events::room::message::RoomMessageEventContent, UserId};
use crate::Command;

View file

@ -1,7 +1,7 @@
use std::fmt::Write;
use clap::Subcommand;
use conduit::{utils::time, Result};
use conduwuit::{utils::time, Result};
use ruma::{events::room::message::RoomMessageEventContent, OwnedServerName};
use crate::{admin_command, admin_command_dispatch};

View file

@ -1,5 +1,5 @@
use clap::Subcommand;
use conduit::Result;
use conduwuit::Result;
use futures::StreamExt;
use ruma::{events::room::message::RoomMessageEventContent, RoomAliasId, RoomId};

View file

@ -1,5 +1,5 @@
use clap::Subcommand;
use conduit::Result;
use conduwuit::Result;
use futures::StreamExt;
use ruma::{events::room::message::RoomMessageEventContent, RoomId, ServerName, UserId};

View file

@ -1,5 +1,5 @@
use clap::Subcommand;
use conduit::Result;
use conduwuit::Result;
use futures::StreamExt;
use ruma::{events::room::message::RoomMessageEventContent, ServerName, UserId};
use service::sending::Destination;

View file

@ -1,5 +1,5 @@
use clap::Subcommand;
use conduit::Result;
use conduwuit::Result;
use futures::stream::StreamExt;
use ruma::{events::room::message::RoomMessageEventContent, OwnedDeviceId, OwnedRoomId, OwnedUserId};

View file

@ -1,7 +1,7 @@
use std::fmt::Write;
use clap::Subcommand;
use conduit::Result;
use conduwuit::Result;
use futures::StreamExt;
use ruma::{events::room::message::RoomMessageEventContent, OwnedRoomAliasId, OwnedRoomId, RoomAliasId, RoomId};

View file

@ -1,4 +1,4 @@
use conduit::Result;
use conduwuit::Result;
use futures::StreamExt;
use ruma::{events::room::message::RoomMessageEventContent, OwnedRoomId};

View file

@ -1,5 +1,5 @@
use clap::Subcommand;
use conduit::Result;
use conduwuit::Result;
use futures::StreamExt;
use ruma::{events::room::message::RoomMessageEventContent, RoomId};

View file

@ -1,5 +1,5 @@
use clap::Subcommand;
use conduit::{utils::ReadyExt, Result};
use conduwuit::{utils::ReadyExt, Result};
use futures::StreamExt;
use ruma::{events::room::message::RoomMessageEventContent, RoomId};

View file

@ -5,7 +5,7 @@ mod info;
mod moderation;
use clap::Subcommand;
use conduit::Result;
use conduwuit::Result;
use ruma::OwnedRoomId;
use self::{

View file

@ -1,6 +1,6 @@
use api::client::leave_room;
use clap::Subcommand;
use conduit::{
use conduwuit::{
debug, error, info,
utils::{IterStream, ReadyExt},
warn, Result,

View file

@ -1,6 +1,6 @@
use std::{fmt::Write, sync::Arc};
use conduit::{info, utils::time, warn, Err, Result};
use conduwuit::{info, utils::time, warn, Err, Result};
use ruma::events::room::message::RoomMessageEventContent;
use crate::admin_command;
@ -73,7 +73,7 @@ pub(super) async fn list_features(
pub(super) async fn memory_usage(&self) -> Result<RoomMessageEventContent> {
let services_usage = self.services.memory_usage().await?;
let database_usage = self.services.db.db.memory_usage()?;
let allocator_usage = conduit::alloc::memory_usage().map_or(String::new(), |s| format!("\nAllocator:\n{s}"));
let allocator_usage = conduwuit::alloc::memory_usage().map_or(String::new(), |s| format!("\nAllocator:\n{s}"));
Ok(RoomMessageEventContent::text_plain(format!(
"Services:\n{services_usage}\nDatabase:\n{database_usage}{allocator_usage}",
@ -143,7 +143,7 @@ pub(super) async fn reload_mods(&self) -> Result<RoomMessageEventContent> {
#[admin_command]
#[cfg(unix)]
pub(super) async fn restart(&self, force: bool) -> Result<RoomMessageEventContent> {
use conduit::utils::sys::current_exe_deleted;
use conduwuit::utils::sys::current_exe_deleted;
if !force && current_exe_deleted() {
return Err!(

View file

@ -1,7 +1,7 @@
mod commands;
use clap::Subcommand;
use conduit::Result;
use conduwuit::Result;
use crate::admin_command_dispatch;

View file

@ -1,12 +1,12 @@
use std::{collections::BTreeMap, fmt::Write as _};
use api::client::{full_user_deactivate, join_room_by_id_helper, leave_room};
use conduit::{
use conduwuit::{
debug_warn, error, info, is_equal_to,
utils::{self, ReadyExt},
warn, PduBuilder, Result,
};
use conduit_api::client::{leave_all_rooms, update_avatar_url, update_displayname};
use conduwuit_api::client::{leave_all_rooms, update_avatar_url, update_displayname};
use futures::StreamExt;
use ruma::{
events::{

View file

@ -1,7 +1,7 @@
mod commands;
use clap::Subcommand;
use conduit::Result;
use conduwuit::Result;
use ruma::{EventId, OwnedRoomOrAliasId, RoomId};
use crate::admin_command_dispatch;

View file

@ -1,4 +1,4 @@
use conduit_core::{err, Err, Result};
use conduwuit_core::{err, Err, Result};
use ruma::{OwnedRoomId, OwnedUserId, RoomId, UserId};
use service::Services;