mirror of
https://github.com/haexhub/haex-hub.git
synced 2025-12-16 22:20:51 +01:00
Fix production build crash by resolving circular import dependency
Moved database schemas from src-tauri/database/schemas/ to src/database/schemas/ to fix bundling issues and resolved circular import dependency that caused "Cannot access uninitialized variable" error in production builds. Key changes: - Moved crdtColumnNames definition into haex.ts to break circular dependency - Restored .$defaultFn(() => crypto.randomUUID()) calls - Kept AnySQLiteColumn type annotations - Removed obsolete TDZ fix script (no longer needed) - Updated all import paths across stores and configuration files
This commit is contained in:
@ -21,7 +21,7 @@ struct TableDefinition {
|
||||
pub fn generate_table_names() {
|
||||
let out_dir = env::var("OUT_DIR").expect("OUT_DIR ist nicht gesetzt.");
|
||||
println!("Generiere Tabellennamen nach {}", out_dir);
|
||||
let schema_path = Path::new("database/tableNames.json");
|
||||
let schema_path = Path::new("../src/database/tableNames.json");
|
||||
let dest_path = Path::new(&out_dir).join("tableNames.rs");
|
||||
|
||||
let file = File::open(&schema_path).expect("Konnte tableNames.json nicht öffnen");
|
||||
@ -66,7 +66,7 @@ pub fn generate_table_names() {
|
||||
f.write_all(code.as_bytes())
|
||||
.expect("Konnte nicht in Zieldatei schreiben");
|
||||
|
||||
println!("cargo:rerun-if-changed=database/tableNames.json");
|
||||
println!("cargo:rerun-if-changed=../src/database/tableNames.json");
|
||||
}
|
||||
|
||||
/// Konvertiert einen String zu SCREAMING_SNAKE_CASE
|
||||
|
||||
Reference in New Issue
Block a user