mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2025-12-11 20:15:30 +01:00
move prisma codegen into sd-prisma (#876)
This commit is contained in:
parent
17cdffc329
commit
ac93c22647
11
Cargo.lock
generated
11
Cargo.lock
generated
@ -6814,6 +6814,7 @@ dependencies = [
|
||||
"sd-file-ext",
|
||||
"sd-heif",
|
||||
"sd-p2p",
|
||||
"sd-prisma",
|
||||
"sd-sync",
|
||||
"serde",
|
||||
"serde-hashkey",
|
||||
@ -6964,6 +6965,16 @@ dependencies = [
|
||||
"tracing-subscriber",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sd-prisma"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"prisma-client-rust",
|
||||
"sd-sync",
|
||||
"serde",
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sd-sync"
|
||||
version = "0.1.0"
|
||||
|
||||
@ -31,6 +31,7 @@ sd-heif = { path = "../crates/heif", optional = true }
|
||||
sd-file-ext = { path = "../crates/file-ext" }
|
||||
sd-sync = { path = "../crates/sync" }
|
||||
sd-p2p = { path = "../crates/p2p", features = ["specta", "serde"] }
|
||||
sd-prisma = { path = "../crates/prisma" }
|
||||
|
||||
rspc = { workspace = true, features = [
|
||||
"uuid",
|
||||
|
||||
@ -4,13 +4,14 @@ datasource db {
|
||||
}
|
||||
|
||||
generator client {
|
||||
provider = "cargo prisma"
|
||||
output = "../src/prisma.rs"
|
||||
provider = "cargo prisma"
|
||||
output = "../../crates/prisma/src/prisma.rs"
|
||||
module_path = "crate::prisma"
|
||||
}
|
||||
|
||||
generator sync {
|
||||
provider = "cargo prisma-sync"
|
||||
output = "../src/prisma_sync.rs"
|
||||
output = "../../crates/prisma/src/prisma_sync.rs"
|
||||
}
|
||||
|
||||
//// Sync ////
|
||||
|
||||
@ -7,6 +7,8 @@ use crate::{
|
||||
p2p::P2PManager,
|
||||
};
|
||||
|
||||
pub use sd_prisma::*;
|
||||
|
||||
use std::{path::Path, sync::Arc};
|
||||
use thiserror::Error;
|
||||
use tokio::{fs, sync::broadcast};
|
||||
@ -26,10 +28,6 @@ pub(crate) mod sync;
|
||||
pub(crate) mod util;
|
||||
pub(crate) mod volume;
|
||||
|
||||
#[allow(warnings, unused)]
|
||||
mod prisma;
|
||||
pub(crate) mod prisma_sync;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct NodeContext {
|
||||
pub config: Arc<NodeConfigManager>,
|
||||
|
||||
12
crates/prisma/Cargo.toml
Normal file
12
crates/prisma/Cargo.toml
Normal file
@ -0,0 +1,12 @@
|
||||
[package]
|
||||
name = "sd-prisma"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
prisma-client-rust = { workspace = true }
|
||||
serde = "1.0"
|
||||
serde_json = "1.0"
|
||||
sd-sync = { path = "../sync" }
|
||||
4
crates/prisma/src/lib.rs
Normal file
4
crates/prisma/src/lib.rs
Normal file
@ -0,0 +1,4 @@
|
||||
#[allow(warnings, unused)]
|
||||
pub mod prisma;
|
||||
#[allow(warnings, unused)]
|
||||
pub mod prisma_sync;
|
||||
Loading…
x
Reference in New Issue
Block a user