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

@@ -42,26 +42,52 @@ export async function list() {
return await invoke('profile_list')
}
// Syncs a profile with the disk
export async function sync(path) {
return await invoke('profile_sync', { path })
}
// Installs/Repairs a profile
export async function install(path) {
return await invoke('profile_install', { path })
}
// Updates all of a profile's projects
export async function update_all(path) {
return await invoke('profile_update_all', { path })
}
// Updates a specified project
export async function update_project(path, projectPath) {
return await invoke('profile_update_project', { path, projectPath })
}
// Replaces a given project with the specified version ID
// Returns a path to the new project file
export async function replace_project(path, projectPath, versionId) {
return await invoke('profile_replace_project', { path, projectPath, versionId })
}
// Add a project to a profile from a version
// Returns a path to the new project file
export async function add_project_from_version(path, version_id) {
return await invoke('profile_add_project_from_version', { path, version_id })
export async function add_project_from_version(path, versionId) {
return await invoke('profile_add_project_from_version', { path, versionId })
}
// Add a project to a profile from a path + project_type
// Returns a path to the new project file
export async function add_project_from_path(path, project_path, project_type) {
return await invoke('profile_add_project_from_path', { path, project_path, project_type })
export async function add_project_from_path(path, projectPath, projectType) {
return await invoke('profile_add_project_from_path', { path, projectPath, projectType })
}
// Toggle disabling a project
export async function toggle_disable_project(path, project_path) {
return await invoke('profile_toggle_disable_project', { path, project_path })
export async function toggle_disable_project(path, projectPath) {
return await invoke('profile_toggle_disable_project', { path, projectPath })
}
// Remove a project
export async function remove_project(path, project_path) {
return await invoke('profile_remove_project', { path, project_path })
export async function remove_project(path, projectPath) {
return await invoke('profile_remove_project', { path, projectPath })
}
// Run Minecraft using a pathed profile