Skip to content

Commit

Permalink
fix: post-rebase build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Rexogamer committed Nov 19, 2024
1 parent d8aa586 commit 2665927
Show file tree
Hide file tree
Showing 19 changed files with 1,606 additions and 2,060 deletions.
3,563 changes: 1,555 additions & 2,008 deletions Cargo.lock

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions crates/bindings/node/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ extern crate serde;
use std::sync::OnceLock;

use neon::prelude::*;
use revolt_database::{Database, DatabaseInfo};
use upryzing_database::{Database, DatabaseInfo};

fn js_init(mut cx: FunctionContext) -> JsResult<JsUndefined> {
static INIT: OnceLock<()> = OnceLock::new();
if INIT.get().is_none() {
INIT.get_or_init(|| {
async_std::task::block_on(async {
revolt_config::configure!(api);
upryzing_config::configure!(api);

match DatabaseInfo::Auto.connect().await {
Ok(db) => {
let authifier_db = db.clone().to_authifier().await.database;
revolt_database::tasks::start_workers(db, authifier_db);
upryzing_database::tasks::start_workers(db, authifier_db);
Ok(())
}
Err(err) => Err(err),
Expand Down Expand Up @@ -50,8 +50,8 @@ fn js_database(mut cx: FunctionContext) -> JsResult<JsBox<DatabaseBinding>> {
#[derive(Clone)]
#[allow(clippy::large_enum_variant)]
enum Model {
User(revolt_database::User),
Error(revolt_result::Error),
User(upryzing_database::User),
Error(upryzing_result::Error),
}

impl Model {
Expand Down Expand Up @@ -111,7 +111,7 @@ fn js_error(mut cx: FunctionContext) -> JsResult<JsValue> {
struct ResultBinding<T> {
#[serde(flatten)]
value: Option<T>,
error: Option<revolt_result::Error>,
error: Option<upryzing_result::Error>,
}

macro_rules! shim {
Expand Down Expand Up @@ -199,7 +199,7 @@ fn main(mut cx: ModuleContext) -> NeonResult<()> {
|db| async move {
let user_a = db.fetch_user(&user_a).await?;
let user_b = db.fetch_user(&user_b).await?;
revolt_database::Channel::create_dm(&db, &user_a, &user_b).await
upryzing_database::Channel::create_dm(&db, &user_a, &user_b).await
},
&userA, &userB,
);
Expand Down
4 changes: 2 additions & 2 deletions crates/core/config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ macro_rules! report_error {
$crate::Level::Error,
);
})
.map_err(|_| ::revolt_result::create_error!($error))
.map_err(|_| ::upryzing_result::create_error!($error))
};
}

Expand All @@ -34,7 +34,7 @@ macro_rules! report_internal_error {
$crate::Level::Error,
);
})
.map_err(|_| ::revolt_result::create_error!(InternalError))
.map_err(|_| ::upryzing_result::create_error!(InternalError))
};
}

Expand Down
1 change: 0 additions & 1 deletion crates/core/database/src/events/client.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use authifier::AuthifierEvent;
use revolt_result::Error;
use serde::{Deserialize, Serialize};

use upryzing_models::v0::{
Expand Down
2 changes: 1 addition & 1 deletion crates/core/database/src/models/file_hashes/ops.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use revolt_result::Result;
use upryzing_result::Result;

use crate::FileHash;

Expand Down
2 changes: 1 addition & 1 deletion crates/core/database/src/models/file_hashes/ops/mongodb.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use revolt_result::Result;
use upryzing_result::Result;

use crate::FileHash;
use crate::MongoDb;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use revolt_result::Result;
use upryzing_result::Result;

use crate::FileHash;
use crate::ReferenceDb;
Expand Down
2 changes: 1 addition & 1 deletion crates/core/database/src/models/messages/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ impl Message {
);
mentions.retain(|m| valid_ids.contains(m));
} else {
revolt_config::capture_error(&valid_members.unwrap_err());
upryzing_config::capture_error(&valid_members.unwrap_err());
}
}
Channel::SavedMessages { .. } => mentions.clear(),
Expand Down
2 changes: 1 addition & 1 deletion crates/core/database/src/models/users/axum.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use axum::{extract::FromRequestParts, http::request::Parts};

use revolt_result::{create_error, Error, Result};
use upryzing_result::{create_error, Error, Result};

use crate::{Database, User};

Expand Down
4 changes: 2 additions & 2 deletions crates/core/files/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ use aes_gcm::{
Aes256Gcm, Key, KeyInit, Nonce,
};
use image::{DynamicImage, ImageBuffer};
use revolt_config::{config, report_internal_error, FilesS3};
use revolt_result::{create_error, Result};
use upryzing_config::{config, report_internal_error, FilesS3};
use upryzing_result::{create_error, Result};

use aws_sdk_s3::{
config::{Credentials, Region},
Expand Down
8 changes: 4 additions & 4 deletions crates/services/autumn/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ use axum::{
};
use axum_typed_multipart::{FieldData, TryFromMultipart, TypedMultipart};
use lazy_static::lazy_static;
use revolt_config::{config, report_internal_error};
use revolt_database::{iso8601_timestamp::Timestamp, Database, FileHash, Metadata, User};
use revolt_files::{
use upryzing_config::{config, report_internal_error};
use upryzing_database::{iso8601_timestamp::Timestamp, Database, FileHash, Metadata, User};
use upryzing_files::{
create_thumbnail, decode_image, fetch_from_s3, upload_to_s3, AUTHENTICATION_TAG_SIZE_BYTES,
};
use revolt_result::{create_error, Result};
use upryzing_result::{create_error, Result};
use serde::{Deserialize, Serialize};
use sha2::Digest;
use tempfile::NamedTempFile;
Expand Down
4 changes: 2 additions & 2 deletions crates/services/autumn/src/clamav.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::time::Duration;

use revolt_config::{config, report_internal_error};
use revolt_result::Result;
use upryzing_config::{config, report_internal_error};
use upryzing_result::Result;

/// Initialise ClamAV
pub async fn init() {
Expand Down
6 changes: 3 additions & 3 deletions crates/services/autumn/src/exif.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ use std::io::{Cursor, Read};

use exif::Reader;
use image::{ImageFormat, ImageReader};
use revolt_config::report_internal_error;
use revolt_database::Metadata;
use revolt_result::{create_error, Result};
use upryzing_config::report_internal_error;
use upryzing_database::Metadata;
use upryzing_result::{create_error, Result};
use tempfile::NamedTempFile;
use tokio::process::Command;

Expand Down
8 changes: 4 additions & 4 deletions crates/services/autumn/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::net::{Ipv4Addr, SocketAddr};

use axum::Router;

use revolt_database::DatabaseInfo;
use upryzing_database::DatabaseInfo;
use tokio::net::TcpListener;
use utoipa::{
openapi::security::{ApiKey, ApiKeyValue, SecurityScheme},
Expand All @@ -19,7 +19,7 @@ pub mod mime_type;
#[tokio::main]
async fn main() -> Result<(), std::io::Error> {
// Configure logging and environment
revolt_config::configure!(files);
upryzing_config::configure!(files);

// Wait for ClamAV
clamav::init().await;
Expand All @@ -36,8 +36,8 @@ async fn main() -> Result<(), std::io::Error> {
),
components(
schemas(
revolt_result::Error,
revolt_result::ErrorType,
upryzing_result::Error,
upryzing_result::ErrorType,
api::RootResponse,
api::Tag,
api::UploadPayload,
Expand Down
4 changes: 2 additions & 2 deletions crates/services/autumn/src/metadata.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::io::Cursor;

use revolt_database::Metadata;
use revolt_files::{image_size, video_size};
use upryzing_database::Metadata;
use upryzing_files::{image_size, video_size};
use tempfile::NamedTempFile;

/// Intersection of what infer can detect and what image-rs supports
Expand Down
4 changes: 2 additions & 2 deletions crates/services/january/src/api.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use axum::{extract::Query, response::IntoResponse, routing::get, Json, Router};
use reqwest::header;
use revolt_models::v0::Embed;
use revolt_result::{create_error, Result};
use upryzing_models::v0::Embed;
use upryzing_result::{create_error, Result};
use serde::{Deserialize, Serialize};
use utoipa::ToSchema;

Expand Down
26 changes: 13 additions & 13 deletions crates/services/january/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub mod website_embed;
#[tokio::main]
async fn main() -> Result<(), std::io::Error> {
// Configure logging and environment
revolt_config::configure!(proxy);
upryzing_config::configure!(proxy);

// Configure API schema
#[derive(OpenApi)]
Expand All @@ -30,18 +30,18 @@ async fn main() -> Result<(), std::io::Error> {
components(
schemas(
api::RootResponse,
revolt_result::Error,
revolt_result::ErrorType,
revolt_models::v0::ImageSize,
revolt_models::v0::Image,
revolt_models::v0::Video,
revolt_models::v0::TwitchType,
revolt_models::v0::LightspeedType,
revolt_models::v0::BandcampType,
revolt_models::v0::Special,
revolt_models::v0::WebsiteMetadata,
revolt_models::v0::Text,
revolt_models::v0::Embed
upryzing_result::Error,
upryzing_result::ErrorType,
upryzing_models::v0::ImageSize,
upryzing_models::v0::Image,
upryzing_models::v0::Video,
upryzing_models::v0::TwitchType,
upryzing_models::v0::LightspeedType,
upryzing_models::v0::BandcampType,
upryzing_models::v0::Special,
upryzing_models::v0::WebsiteMetadata,
upryzing_models::v0::Text,
upryzing_models::v0::Embed
)
)
)]
Expand Down
8 changes: 4 additions & 4 deletions crates/services/january/src/requests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ use reqwest::{
header::{self, CONTENT_TYPE},
redirect, Client, Response,
};
use revolt_config::report_internal_error;
use revolt_files::{create_thumbnail, decode_image, image_size_vec, is_valid_image, video_size};
use revolt_models::v0::{Embed, Image, ImageSize, Video};
use revolt_result::{create_error, Result};
use upryzing_config::report_internal_error;
use upryzing_files::{create_thumbnail, decode_image, image_size_vec, is_valid_image, video_size};
use upryzing_models::v0::{Embed, Image, ImageSize, Video};
use upryzing_result::{create_error, Result};
use std::{
io::{Cursor, Write},
time::Duration,
Expand Down
2 changes: 1 addition & 1 deletion crates/services/january/src/website_embed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::collections::HashMap;

use lazy_static::lazy_static;
use regex::Regex;
use revolt_models::v0::{
use upryzing_models::v0::{
BandcampType, Image, ImageSize, LightspeedType, Special, TwitchType, Video, WebsiteMetadata,
};
use scraper::{Html, Selector};
Expand Down

0 comments on commit 2665927

Please sign in to comment.