Diff schema updates & WASM updates

This commit is contained in:
2024-12-17 21:18:45 -07:00
parent b0c5431ac5
commit c45f4bbc99
8 changed files with 60 additions and 22 deletions

View File

@@ -6,11 +6,11 @@ use std::{
};
use anyhow::{anyhow, Context, Result};
use bimap::BiBTreeMap;
use filetime::FileTime;
use globset::{Glob, GlobSet, GlobSetBuilder};
#[derive(Default, Clone, serde::Serialize, serde::Deserialize)]
#[cfg_attr(feature = "wasm", derive(tsify_next::Tsify), tsify(from_wasm_abi))]
pub struct ProjectConfig {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub min_version: Option<String>,
@@ -55,6 +55,7 @@ impl ProjectConfig {
}
#[derive(Default, Clone, serde::Serialize, serde::Deserialize)]
#[cfg_attr(feature = "wasm", derive(tsify_next::Tsify), tsify(from_wasm_abi))]
pub struct ProjectObject {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
@@ -78,9 +79,15 @@ pub struct ProjectObject {
pub symbol_mappings: Option<SymbolMappings>,
}
pub type SymbolMappings = BiBTreeMap<String, String>;
#[cfg(feature = "wasm")]
#[tsify_next::declare]
pub type SymbolMappings = std::collections::BTreeMap<String, String>;
#[cfg(not(feature = "wasm"))]
pub type SymbolMappings = bimap::BiBTreeMap<String, String>;
#[derive(Default, Clone, serde::Serialize, serde::Deserialize)]
#[cfg_attr(feature = "wasm", derive(tsify_next::Tsify), tsify(from_wasm_abi))]
pub struct ProjectObjectMetadata {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub complete: Option<bool>,
@@ -95,6 +102,7 @@ pub struct ProjectObjectMetadata {
}
#[derive(Default, Clone, serde::Serialize, serde::Deserialize)]
#[cfg_attr(feature = "wasm", derive(tsify_next::Tsify), tsify(from_wasm_abi))]
pub struct ProjectProgressCategory {
#[serde(default)]
pub id: String,
@@ -154,6 +162,7 @@ impl ProjectObject {
}
#[derive(Default, Clone, Eq, PartialEq, serde::Deserialize, serde::Serialize)]
#[cfg_attr(feature = "wasm", derive(tsify_next::Tsify), tsify(from_wasm_abi))]
pub struct ScratchConfig {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub platform: Option<String>,