Updating + Profile Repairs + Performance Improvements (#97)

* repairing

* Main framework for updating

* add jsconfig

* more work

* Improve performance

* Finish updating

* run lint
This commit is contained in:
Geometrically
2023-04-26 10:28:08 -07:00
committed by GitHub
parent c53104c28e
commit f0b8a708a3
48 changed files with 1217 additions and 894 deletions

View File

@@ -32,6 +32,8 @@ async fn main() -> theseus::Result<()> {
// Initialize state
let st = State::get().await?;
State::update();
st.settings.write().await.max_concurrent_downloads = 5;
st.settings.write().await.hooks.post_exit =
Some("echo This is after Minecraft runs- global setting!".to_string());
@@ -61,26 +63,30 @@ async fn main() -> theseus::Result<()> {
Some(loader_version),
None,
None,
None,
)
.await?;
println!("Adding sodium");
let sodium_path = profile::add_project_from_version(
&profile_path,
"rAfhHfow".to_string(),
)
.await?;
// let mut value = list().await?;
// let profile_path = value.iter().next().map(|x| x.0).unwrap();
let mod_menu_path = profile::add_project_from_version(
&profile_path,
"gSoPJyVn".to_string(),
)
.await?;
println!("Disabling sodium");
profile::toggle_disable_project(&profile_path, &sodium_path).await?;
profile::remove_project(&profile_path, &mod_menu_path).await?;
// println!("Adding sodium");
// let sodium_path = profile::add_project_from_version(
// &profile_path,
// "rAfhHfow".to_string(),
// )
// .await?;
//
// let mod_menu_path = profile::add_project_from_version(
// &profile_path,
// "gSoPJyVn".to_string(),
// )
// .await?;
//
// println!("Disabling sodium");
// profile::toggle_disable_project(&profile_path, &sodium_path).await?;
//
// profile::remove_project(&profile_path, &mod_menu_path).await?;
// let profile_path =
// pack::install_pack_from_version_id("KxUUUFh5".to_string())
// .await
@@ -102,7 +108,7 @@ async fn main() -> theseus::Result<()> {
State::sync().await?;
// Attempt to run game
if auth::users().await?.len() == 0 {
if auth::users().await?.is_empty() {
println!("No users found, authenticating.");
authenticate_run().await?; // could take credentials from here direct, but also deposited in state users
}