Upgrading (#354)

* fixed no download bug

* draft

* Working version

* minor improvements

* cicd fix

* merge conflicts

* fixed major merge confusion

* more conflicts, reformatting

* fixed random bugs found

* added second repair option to avoid confusion
This commit is contained in:
Wyatt Verchere
2023-07-26 20:33:03 -07:00
committed by GitHub
parent 70aaf6eef9
commit 21ae310f63
24 changed files with 817 additions and 306 deletions

View File

@@ -17,26 +17,26 @@ pub struct Logs {
/// Get all logs that exist for a given profile
/// This is returned as an array of Log objects, sorted by datetime_string (the folder name, when the log was created)
export async function get_logs(profileUuid, clearContents) {
return await invoke('plugin:logs|logs_get_logs', { profileUuid, clearContents })
export async function get_logs(profilePath, clearContents) {
return await invoke('plugin:logs|logs_get_logs', { profilePath, clearContents })
}
/// Get a profile's log by datetime_string (the folder name, when the log was created)
export async function get_logs_by_datetime(profileUuid, datetimeString) {
return await invoke('plugin:logs|logs_get_logs_by_datetime', { profileUuid, datetimeString })
export async function get_logs_by_datetime(profilePath, datetimeString) {
return await invoke('plugin:logs|logs_get_logs_by_datetime', { profilePath, datetimeString })
}
/// Get a profile's stdout only by datetime_string (the folder name, when the log was created)
export async function get_output_by_datetime(profileUuid, datetimeString) {
return await invoke('plugin:logs|logs_get_output_by_datetime', { profileUuid, datetimeString })
export async function get_output_by_datetime(profilePath, datetimeString) {
return await invoke('plugin:logs|logs_get_output_by_datetime', { profilePath, datetimeString })
}
/// Delete a profile's log by datetime_string (the folder name, when the log was created)
export async function delete_logs_by_datetime(profileUuid, datetimeString) {
return await invoke('plugin:logs|logs_delete_logs_by_datetime', { profileUuid, datetimeString })
export async function delete_logs_by_datetime(profilePath, datetimeString) {
return await invoke('plugin:logs|logs_delete_logs_by_datetime', { profilePath, datetimeString })
}
/// Delete all logs for a given profile
export async function delete_logs(profileUuid) {
return await invoke('plugin:logs|logs_delete_logs', { profileUuid })
export async function delete_logs(profilePath) {
return await invoke('plugin:logs|logs_delete_logs', { profilePath })
}

View File

@@ -94,6 +94,21 @@ export async function remove_project(path, projectPath) {
return await invoke('plugin:profile|profile_remove_project', { path, projectPath })
}
// Update a managed Modrinth profile
export async function update_managed_modrinth(path) {
return await invoke('plugin:profile|profile_update_managed_modrinth', { path })
}
// Repair a managed Modrinth profile
export async function update_repair_modrinth(path) {
return await invoke('plugin:profile|profile_repair_managed_modrinth', { path })
}
// Gets whether a profile is managed by Modrinth
export async function is_managed_modrinth(path) {
return await invoke('plugin:profile|profile_is_managed_modrinth', { path })
}
// Export a profile to .mrpack
/// included_overrides is an array of paths to override folders to include (ie: 'mods', 'resource_packs')
// Version id is optional (ie: 1.1.5)