Fix dashboard wasm build and feature-gate mongodb for wasm compatibility
- Feature-gate mongodb in compliance-core (optional, default on) so wasm builds don't pull in tokio/mio via mongodb - Use bson v2 directly for ObjectId types (wasm-compatible) - Restructure dashboard infrastructure/mod.rs: server function modules always compiled (for RPC stubs), server-only modules cfg-gated - Remove reqwest from dashboard web feature (not needed, data flows through server functions) - Add .gitignore Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,13 +1,23 @@
|
||||
pub mod config;
|
||||
pub mod database;
|
||||
pub mod error;
|
||||
// Server function modules (compiled for both web and server;
|
||||
// the #[server] macro generates client stubs for the web target)
|
||||
pub mod findings;
|
||||
pub mod issues;
|
||||
pub mod repositories;
|
||||
pub mod sbom;
|
||||
pub mod scans;
|
||||
pub mod server;
|
||||
pub mod server_state;
|
||||
pub mod stats;
|
||||
|
||||
// Server-only modules
|
||||
#[cfg(feature = "server")]
|
||||
pub mod config;
|
||||
#[cfg(feature = "server")]
|
||||
pub mod database;
|
||||
#[cfg(feature = "server")]
|
||||
pub mod error;
|
||||
#[cfg(feature = "server")]
|
||||
pub mod server;
|
||||
#[cfg(feature = "server")]
|
||||
pub mod server_state;
|
||||
|
||||
#[cfg(feature = "server")]
|
||||
pub use server::server_start;
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
pub mod app;
|
||||
pub mod components;
|
||||
pub mod infrastructure;
|
||||
pub mod pages;
|
||||
|
||||
#[cfg(feature = "server")]
|
||||
pub mod infrastructure;
|
||||
|
||||
pub use app::App;
|
||||
|
||||
Reference in New Issue
Block a user