From eb691f0b2f3a80f7d1b487a4baaac32cd5c89a9a Mon Sep 17 00:00:00 2001 From: "Calum H. (IMB11)" Date: Thu, 1 Oct 2026 10:35:10 +0100 Subject: [PATCH 1/4] fix: allow all java versions for custom java installation override --- .../app-frontend/src/composables/useJavaTest.ts | 11 ++++++----- .../components/settings-modal/java-settings.vue | 17 ++++++++--------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/apps/app-frontend/src/composables/useJavaTest.ts b/apps/app-frontend/src/composables/useJavaTest.ts index c5209db8de8..448854454c6 100644 --- a/apps/app-frontend/src/composables/useJavaTest.ts +++ b/apps/app-frontend/src/composables/useJavaTest.ts @@ -1,14 +1,14 @@ import { ref } from 'vue' import { trackEvent } from '@/helpers/analytics' -import { test_jre } from '@/helpers/jre.js' +import { get_jre, test_jre } from '@/helpers/jre.js' export default function useJavaTest() { const testingJava = ref(false) const javaTestResult = ref(null) let testDebounceTimer: ReturnType | null = null - async function runJavaTest(path: string, version: number, track = true) { + async function runJavaTest(path: string, version: number | null, track = true) { if (testDebounceTimer) { clearTimeout(testDebounceTimer) testDebounceTimer = null @@ -19,7 +19,8 @@ export default function useJavaTest() { } testingJava.value = true try { - javaTestResult.value = await test_jre(path, version) + javaTestResult.value = + version === null ? !!(await get_jre(path)) : await test_jre(path, version) } catch { javaTestResult.value = false } @@ -30,7 +31,7 @@ export default function useJavaTest() { } } - function testJavaInstallationDebounced(path: string, version: number, delay = 600) { + function testJavaInstallationDebounced(path: string, version: number | null, delay = 600) { if (testDebounceTimer) clearTimeout(testDebounceTimer) if (!path) { javaTestResult.value = null @@ -39,7 +40,7 @@ export default function useJavaTest() { testDebounceTimer = setTimeout(() => runJavaTest(path, version, false), delay) } - async function testJavaInstallation(path: string, version: number, track = false) { + async function testJavaInstallation(path: string, version: number | null, track = false) { await runJavaTest(path, version, track) } diff --git a/apps/app-frontend/src/pages/instance/components/settings-modal/java-settings.vue b/apps/app-frontend/src/pages/instance/components/settings-modal/java-settings.vue index 8050e44c685..49868d84774 100644 --- a/apps/app-frontend/src/pages/instance/components/settings-modal/java-settings.vue +++ b/apps/app-frontend/src/pages/instance/components/settings-modal/java-settings.vue @@ -62,19 +62,21 @@ let hasInitialized = false watch( javaTestPath, (newPath) => { - if (newPath && optimalJava?.parsed_version) { + if (newPath) { if (!hasInitialized) { - testJavaInstallation(newPath, optimalJava?.parsed_version, false) + testJavaInstallation(newPath, null, false) hasInitialized = true } else { - testJavaInstallationDebounced(newPath, optimalJava?.parsed_version) + testJavaInstallationDebounced(newPath, null) } } }, { immediate: true }, ) -const javaDetectionModal = ref<{ show: (version: number, current: object) => void } | null>(null) +const javaDetectionModal = ref<{ show: (version: number | null, current: object) => void } | null>( + null, +) async function handleBrowseJava() { const result = await open({ multiple: false }) @@ -84,7 +86,7 @@ async function handleBrowseJava() { } function handleDetectJava() { - javaDetectionModal.value?.show(optimalJava?.parsed_version, { path: javaPath.value }) + javaDetectionModal.value?.show(null, { path: javaPath.value }) } const overrideJavaArgs = ref((instance.value.extra_launch_args?.length ?? 0) > 0) @@ -262,9 +264,6 @@ const messages = defineMessages({
- Java {{ optimalJava?.parsed_version }}
From c4fa4f25b362ac76ddc9e45c80de39f52fa00bab Mon Sep 17 00:00:00 2001 From: "Calum H. (IMB11)" Date: Thu, 1 Oct 2026 11:58:39 +0100 Subject: [PATCH 2/4] fix: update all bugs --- packages/app-lib/src/install/recovery.rs | 36 ++++++++++++++-- .../content_store/commands/instance_files.rs | 14 ++++++ .../instances/commands/content_mutation.rs | 43 +++++++++++++------ 3 files changed, 76 insertions(+), 17 deletions(-) diff --git a/packages/app-lib/src/install/recovery.rs b/packages/app-lib/src/install/recovery.rs index c2b12278f80..12a78236aae 100644 --- a/packages/app-lib/src/install/recovery.rs +++ b/packages/app-lib/src/install/recovery.rs @@ -29,6 +29,10 @@ struct SharedInstanceUpdateRollback { entries: Vec, #[serde(default)] bindings: Vec, + #[serde(default)] + missing_file_ids: std::collections::HashSet, + #[serde(default)] + copied_file_ids: std::collections::HashSet, } pub(super) async fn prepare_instance_update_backup( @@ -60,7 +64,7 @@ pub(super) async fn prepare_instance_update_backup( state, ) .await?; - let files = content_rows::get_instance_files( + let mut files = content_rows::get_instance_files( &metadata.instance.id, &state.pool, ) @@ -75,9 +79,11 @@ pub(super) async fn prepare_instance_update_backup( &metadata.instance.id, ) .await?; + let mut missing_file_ids = std::collections::HashSet::new(); + let mut copied_file_ids = std::collections::HashSet::new(); for binding in &bindings { let file = files - .iter() + .iter_mut() .find(|file| file.id == binding.file_id) .ok_or_else(|| { crate::state::content_store::input( @@ -86,20 +92,28 @@ pub(super) async fn prepare_instance_update_backup( })?; let file_status = state.content_store .check_instance_file(&metadata.instance, file, binding).await?; + file.missing = file_status == crate::state::content_store::InstanceFileStatus::Missing; + if file.missing { + missing_file_ids.insert(file.id.clone()); + continue; + } let content = state.content_store.file_content(file).await?; if file_status != crate::state::content_store::InstanceFileStatus::Healthy - || !matches!(content, crate::state::content_store::FileContent::Stored { .. }) { return Err(crate::state::content_store::input(format!( "Restore or repair {} before updating this instance; its current content cannot be backed up safely", file.relative_path, ))); } + if !matches!(content, crate::state::content_store::FileContent::Stored { .. }) { + copied_file_ids.insert(file.id.clone()); + } } let skipped = files .iter() .filter(|file| { bindings.iter().any(|binding| binding.file_id == file.id) + && !copied_file_ids.contains(&file.id) }) .map(crate::state::content_store::content_file_path) .collect(); @@ -111,6 +125,8 @@ pub(super) async fn prepare_instance_update_backup( files, entries, bindings, + missing_file_ids, + copied_file_ids, }; let instance_path = state .directories @@ -247,6 +263,18 @@ async fn restore_instance_update( )); } for binding in &snapshot.bindings { + if snapshot.missing_file_ids.contains(&binding.file_id) { + continue; + } + if snapshot.copied_file_ids.contains(&binding.file_id) { + let file = snapshot.files.iter().find(|file| file.id == binding.file_id) + .ok_or_else(|| crate::state::content_store::input("Backup content reference has no file record"))?; + let path = backup_path.join(crate::state::content_store::content_file_path(file)); + if crate::state::content_store::hash_file(&path).await?.sha512 != binding.blob_sha512 { + return Err(crate::state::content_store::input("The instance backup contains changed content")); + } + continue; + } if state .content_store .lookup(Some(&binding.blob_sha512), None) @@ -282,6 +310,8 @@ async fn restore_instance_update( &rollback.instance.instance, &snapshot.files, &snapshot.bindings, + &snapshot.missing_file_ids, + &snapshot.copied_file_ids, ) .await?; diff --git a/packages/app-lib/src/state/content_store/commands/instance_files.rs b/packages/app-lib/src/state/content_store/commands/instance_files.rs index 298c7048656..e24ac058b4a 100644 --- a/packages/app-lib/src/state/content_store/commands/instance_files.rs +++ b/packages/app-lib/src/state/content_store/commands/instance_files.rs @@ -122,6 +122,8 @@ impl ContentStore { instance: &Instance, files: &[InstanceFile], bindings: &[InstanceFileStorage], + missing_file_ids: &std::collections::HashSet, + copied_file_ids: &std::collections::HashSet, ) -> crate::Result<()> { let files: HashMap<_, _> = files.iter().map(|file| (file.id.as_str(), file)).collect(); @@ -131,6 +133,18 @@ impl ContentStore { files.get(binding.file_id.as_str()).ok_or_else(|| { input("Rollback content reference has no file record") })?; + if missing_file_ids.contains(&binding.file_id) { + restored.push(( + &binding.file_id, + &binding.blob_sha512, + binding.storage_kind, + )); + continue; + } + if copied_file_ids.contains(&binding.file_id) { + restored.push((&binding.file_id, &binding.blob_sha512, FileStorageKind::Copy)); + continue; + } let stored_file = self .lookup(Some(&binding.blob_sha512), Some(file.size)) .await? diff --git a/packages/app-lib/src/state/instances/commands/content_mutation.rs b/packages/app-lib/src/state/instances/commands/content_mutation.rs index fda62f4d6d2..7fa3af0716f 100644 --- a/packages/app-lib/src/state/instances/commands/content_mutation.rs +++ b/packages/app-lib/src/state/instances/commands/content_mutation.rs @@ -344,7 +344,7 @@ impl<'a> InstanceContent<'a> { ) -> crate::Result { self.content_scope()?; let canonical_path = canonical_content_path(project_path); - let file = content_rows::get_instance_file_by_relative_path( + let mut file = content_rows::get_instance_file_by_relative_path( &self.instance.id, canonical_path, &self.state.pool, @@ -365,6 +365,7 @@ impl<'a> InstanceContent<'a> { ) .await?; let enabled = desired_enabled.unwrap_or(!file.enabled); + file.missing = false; let file_change = match self .state .content_store @@ -393,13 +394,14 @@ impl<'a> InstanceContent<'a> { .await? } InstanceFileStatus::Missing => { + file.missing = !enabled; self.state .content_store .prepare_file_change( &self.instance, FileChangeRequest { relative_path: canonical_path, - replacement: Some(&stored_file), + replacement: enabled.then_some(&stored_file), enabled, legacy_path: None, previous_content: None, @@ -414,17 +416,31 @@ impl<'a> InstanceContent<'a> { } } } - FileContent::Damaged(binding) if !enabled => { - self.state - .content_store - .prepare_file_move(&self.instance, &file, &binding, false) - .await? - } - FileContent::Damaged(_) => { - return Err(input( - "Content needs repair or re-import before it can be enabled", - )); - } + FileContent::Damaged(binding) => { + match self.state.content_store.check_instance_file(&self.instance, &file, &binding).await? { + InstanceFileStatus::Healthy => self.state.content_store + .prepare_file_move(&self.instance, &file, &binding, enabled).await?, + InstanceFileStatus::Missing if !enabled => { + file.missing = true; + self.state.content_store.prepare_file_change( + &self.instance, + FileChangeRequest { + relative_path: canonical_path, + replacement: None, + enabled, + legacy_path: None, + previous_content: None, + }, + ).await? + } + InstanceFileStatus::Missing => return Err(input( + "Content needs repair or re-import before it can be enabled", + )), + InstanceFileStatus::Conflict => return Err(input( + "Content was changed outside the app; resolve the conflict first", + )), + } + } FileContent::Unmanaged => { let physical_path = content_file_path(&file); let path = self @@ -685,7 +701,6 @@ impl<'a> InstanceContent<'a> { PreparedChange::Toggle { file, enabled } => { let mut updated = file.clone(); updated.enabled = *enabled; - updated.missing = false; updated.modified_at = Utc::now(); let updated = content_rows::upsert_instance_file(&updated, &mut tx) From bb2319cb5dba3562377bbaa7f92db11367c6ae2b Mon Sep 17 00:00:00 2001 From: "Calum H. (IMB11)" Date: Thu, 1 Oct 2026 12:08:27 +0100 Subject: [PATCH 3/4] fix: lint --- packages/app-lib/src/install/recovery.rs | 48 +++++++----- .../content_store/commands/instance_files.rs | 32 ++++---- .../instances/commands/content_mutation.rs | 78 ++++++++++++------- .../src/layouts/shared/content-tab/layout.vue | 4 + 4 files changed, 102 insertions(+), 60 deletions(-) diff --git a/packages/app-lib/src/install/recovery.rs b/packages/app-lib/src/install/recovery.rs index 12a78236aae..e6c7b7e5979 100644 --- a/packages/app-lib/src/install/recovery.rs +++ b/packages/app-lib/src/install/recovery.rs @@ -29,10 +29,10 @@ struct SharedInstanceUpdateRollback { entries: Vec, #[serde(default)] bindings: Vec, - #[serde(default)] - missing_file_ids: std::collections::HashSet, - #[serde(default)] - copied_file_ids: std::collections::HashSet, + #[serde(default)] + missing_file_ids: std::collections::HashSet, + #[serde(default)] + copied_file_ids: std::collections::HashSet, } pub(super) async fn prepare_instance_update_backup( @@ -263,18 +263,30 @@ async fn restore_instance_update( )); } for binding in &snapshot.bindings { - if snapshot.missing_file_ids.contains(&binding.file_id) { - continue; - } - if snapshot.copied_file_ids.contains(&binding.file_id) { - let file = snapshot.files.iter().find(|file| file.id == binding.file_id) - .ok_or_else(|| crate::state::content_store::input("Backup content reference has no file record"))?; - let path = backup_path.join(crate::state::content_store::content_file_path(file)); - if crate::state::content_store::hash_file(&path).await?.sha512 != binding.blob_sha512 { - return Err(crate::state::content_store::input("The instance backup contains changed content")); - } - continue; - } + if snapshot.missing_file_ids.contains(&binding.file_id) { + continue; + } + if snapshot.copied_file_ids.contains(&binding.file_id) { + let file = snapshot + .files + .iter() + .find(|file| file.id == binding.file_id) + .ok_or_else(|| { + crate::state::content_store::input( + "Backup content reference has no file record", + ) + })?; + let path = backup_path + .join(crate::state::content_store::content_file_path(file)); + if crate::state::content_store::hash_file(&path).await?.sha512 + != binding.blob_sha512 + { + return Err(crate::state::content_store::input( + "The instance backup contains changed content", + )); + } + continue; + } if state .content_store .lookup(Some(&binding.blob_sha512), None) @@ -310,8 +322,8 @@ async fn restore_instance_update( &rollback.instance.instance, &snapshot.files, &snapshot.bindings, - &snapshot.missing_file_ids, - &snapshot.copied_file_ids, + &snapshot.missing_file_ids, + &snapshot.copied_file_ids, ) .await?; diff --git a/packages/app-lib/src/state/content_store/commands/instance_files.rs b/packages/app-lib/src/state/content_store/commands/instance_files.rs index e24ac058b4a..406afd52919 100644 --- a/packages/app-lib/src/state/content_store/commands/instance_files.rs +++ b/packages/app-lib/src/state/content_store/commands/instance_files.rs @@ -122,8 +122,8 @@ impl ContentStore { instance: &Instance, files: &[InstanceFile], bindings: &[InstanceFileStorage], - missing_file_ids: &std::collections::HashSet, - copied_file_ids: &std::collections::HashSet, + missing_file_ids: &std::collections::HashSet, + copied_file_ids: &std::collections::HashSet, ) -> crate::Result<()> { let files: HashMap<_, _> = files.iter().map(|file| (file.id.as_str(), file)).collect(); @@ -133,18 +133,22 @@ impl ContentStore { files.get(binding.file_id.as_str()).ok_or_else(|| { input("Rollback content reference has no file record") })?; - if missing_file_ids.contains(&binding.file_id) { - restored.push(( - &binding.file_id, - &binding.blob_sha512, - binding.storage_kind, - )); - continue; - } - if copied_file_ids.contains(&binding.file_id) { - restored.push((&binding.file_id, &binding.blob_sha512, FileStorageKind::Copy)); - continue; - } + if missing_file_ids.contains(&binding.file_id) { + restored.push(( + &binding.file_id, + &binding.blob_sha512, + binding.storage_kind, + )); + continue; + } + if copied_file_ids.contains(&binding.file_id) { + restored.push(( + &binding.file_id, + &binding.blob_sha512, + FileStorageKind::Copy, + )); + continue; + } let stored_file = self .lookup(Some(&binding.blob_sha512), Some(file.size)) .await? diff --git a/packages/app-lib/src/state/instances/commands/content_mutation.rs b/packages/app-lib/src/state/instances/commands/content_mutation.rs index 7fa3af0716f..76197116675 100644 --- a/packages/app-lib/src/state/instances/commands/content_mutation.rs +++ b/packages/app-lib/src/state/instances/commands/content_mutation.rs @@ -365,7 +365,7 @@ impl<'a> InstanceContent<'a> { ) .await?; let enabled = desired_enabled.unwrap_or(!file.enabled); - file.missing = false; + file.missing = false; let file_change = match self .state .content_store @@ -394,14 +394,15 @@ impl<'a> InstanceContent<'a> { .await? } InstanceFileStatus::Missing => { - file.missing = !enabled; + file.missing = !enabled; self.state .content_store .prepare_file_change( &self.instance, FileChangeRequest { relative_path: canonical_path, - replacement: enabled.then_some(&stored_file), + replacement: enabled + .then_some(&stored_file), enabled, legacy_path: None, previous_content: None, @@ -416,31 +417,52 @@ impl<'a> InstanceContent<'a> { } } } - FileContent::Damaged(binding) => { - match self.state.content_store.check_instance_file(&self.instance, &file, &binding).await? { - InstanceFileStatus::Healthy => self.state.content_store - .prepare_file_move(&self.instance, &file, &binding, enabled).await?, - InstanceFileStatus::Missing if !enabled => { - file.missing = true; - self.state.content_store.prepare_file_change( - &self.instance, - FileChangeRequest { - relative_path: canonical_path, - replacement: None, - enabled, - legacy_path: None, - previous_content: None, - }, - ).await? - } - InstanceFileStatus::Missing => return Err(input( - "Content needs repair or re-import before it can be enabled", - )), - InstanceFileStatus::Conflict => return Err(input( - "Content was changed outside the app; resolve the conflict first", - )), - } - } + FileContent::Damaged(binding) => { + match self + .state + .content_store + .check_instance_file(&self.instance, &file, &binding) + .await? + { + InstanceFileStatus::Healthy => { + self.state + .content_store + .prepare_file_move( + &self.instance, + &file, + &binding, + enabled, + ) + .await? + } + InstanceFileStatus::Missing if !enabled => { + file.missing = true; + self.state + .content_store + .prepare_file_change( + &self.instance, + FileChangeRequest { + relative_path: canonical_path, + replacement: None, + enabled, + legacy_path: None, + previous_content: None, + }, + ) + .await? + } + InstanceFileStatus::Missing => { + return Err(input( + "Content needs repair or re-import before it can be enabled", + )); + } + InstanceFileStatus::Conflict => { + return Err(input( + "Content was changed outside the app; resolve the conflict first", + )); + } + } + } FileContent::Unmanaged => { let physical_path = content_file_path(&file); let path = self diff --git a/packages/ui/src/layouts/shared/content-tab/layout.vue b/packages/ui/src/layouts/shared/content-tab/layout.vue index 85df3a09628..ea8ac4d8c8c 100644 --- a/packages/ui/src/layouts/shared/content-tab/layout.vue +++ b/packages/ui/src/layouts/shared/content-tab/layout.vue @@ -900,6 +900,10 @@ async function openUpdateAll(items: ContentItem[]) { return const candidates = getUpdateAllCandidates(items) if (candidates.length === 0) return + if (candidates.length === 1 && ctx.updateItem) { + handleUpdateById(getItemId(candidates[0])) + return + } const requestId = ++updateAllRequestId updateAllItems.value = [] From 33ad3f9e2bd64d5a4f9f82fe7c4c2be57e1f4eec Mon Sep 17 00:00:00 2001 From: "Calum H. (IMB11)" Date: Thu, 1 Oct 2026 12:23:10 +0100 Subject: [PATCH 4/4] fix: json db encode bug --- ...1e51367c91c9ef6222b0c25bbaa0289cf9a205ea401c8457.json} | 6 +++--- ...c289bad1448edc640dea4ba9b6974340ee97854efed8bae4.json} | 6 +++--- ...9c5c07d46cbba1a15e90793fff78d6a0413e58d5cba6a528.json} | 6 +++--- ...f2a320368f783293c458336d82332b1618acf8bcf0ad4d79.json} | 6 +++--- packages/app-lib/src/install/store.rs | 8 ++++---- 5 files changed, 16 insertions(+), 16 deletions(-) rename packages/app-lib/.sqlx/{query-c280b9abf116b5a66f143930fac11009b7f280931fead45a761f89f7b3fdea8b.json => query-15779eadd05e60411e51367c91c9ef6222b0c25bbaa0289cf9a205ea401c8457.json} (79%) rename packages/app-lib/.sqlx/{query-292785598cdf815a69bed6f31d2159d689861c0fa57571e727ac9602c4e05a6d.json => query-1f778f4aebf65f0ec289bad1448edc640dea4ba9b6974340ee97854efed8bae4.json} (73%) rename packages/app-lib/.sqlx/{query-8ed032e3cddd751ae19257c08a549774ad7aefdfb98d9e5cacad1d9d5be4cb78.json => query-67109d9f8d123bc89c5c07d46cbba1a15e90793fff78d6a0413e58d5cba6a528.json} (76%) rename packages/app-lib/.sqlx/{query-1dd81b3ad9385bee89722711f41056178bd088841064a4b3086cdcf2458632ad.json => query-c6bdc28338f3668ff2a320368f783293c458336d82332b1618acf8bcf0ad4d79.json} (76%) diff --git a/packages/app-lib/.sqlx/query-c280b9abf116b5a66f143930fac11009b7f280931fead45a761f89f7b3fdea8b.json b/packages/app-lib/.sqlx/query-15779eadd05e60411e51367c91c9ef6222b0c25bbaa0289cf9a205ea401c8457.json similarity index 79% rename from packages/app-lib/.sqlx/query-c280b9abf116b5a66f143930fac11009b7f280931fead45a761f89f7b3fdea8b.json rename to packages/app-lib/.sqlx/query-15779eadd05e60411e51367c91c9ef6222b0c25bbaa0289cf9a205ea401c8457.json index 1664558b4cf..053ad2b78b5 100644 --- a/packages/app-lib/.sqlx/query-c280b9abf116b5a66f143930fac11009b7f280931fead45a761f89f7b3fdea8b.json +++ b/packages/app-lib/.sqlx/query-15779eadd05e60411e51367c91c9ef6222b0c25bbaa0289cf9a205ea401c8457.json @@ -1,6 +1,6 @@ { "db_name": "SQLite", - "query": "\n\t\tSELECT\n\t\t\tid AS \"id!: String\",\n\t\t\tinstance_id,\n\t\t\tkind AS \"kind!: String\",\n\t\t\tstatus AS \"status!: String\",\n\t\t\tstate AS \"state!: String\",\n\t\t\tcreated AS \"created!: i64\",\n\t\t\tmodified AS \"modified!: i64\",\n\t\t\tfinished,\n\t\t\tdismissed AS \"dismissed!: i64\"\n\t\tFROM install_jobs\n\t\tWHERE id = ?\n\t\t", + "query": "\n\t\tSELECT\n\t\t\tid AS \"id!: String\",\n\t\t\tinstance_id,\n\t\t\tkind AS \"kind!: String\",\n\t\t\tstatus AS \"status!: String\",\n\t\t\tjson(state) AS \"state!: String\",\n\t\t\tcreated AS \"created!: i64\",\n\t\t\tmodified AS \"modified!: i64\",\n\t\t\tfinished,\n\t\t\tdismissed AS \"dismissed!: i64\"\n\t\tFROM install_jobs\n\t\tWHERE id = ?\n\t\t", "describe": { "columns": [ { @@ -57,12 +57,12 @@ true, false, false, - false, + null, false, false, true, false ] }, - "hash": "c280b9abf116b5a66f143930fac11009b7f280931fead45a761f89f7b3fdea8b" + "hash": "15779eadd05e60411e51367c91c9ef6222b0c25bbaa0289cf9a205ea401c8457" } diff --git a/packages/app-lib/.sqlx/query-292785598cdf815a69bed6f31d2159d689861c0fa57571e727ac9602c4e05a6d.json b/packages/app-lib/.sqlx/query-1f778f4aebf65f0ec289bad1448edc640dea4ba9b6974340ee97854efed8bae4.json similarity index 73% rename from packages/app-lib/.sqlx/query-292785598cdf815a69bed6f31d2159d689861c0fa57571e727ac9602c4e05a6d.json rename to packages/app-lib/.sqlx/query-1f778f4aebf65f0ec289bad1448edc640dea4ba9b6974340ee97854efed8bae4.json index a4d38cda255..e71b097fd84 100644 --- a/packages/app-lib/.sqlx/query-292785598cdf815a69bed6f31d2159d689861c0fa57571e727ac9602c4e05a6d.json +++ b/packages/app-lib/.sqlx/query-1f778f4aebf65f0ec289bad1448edc640dea4ba9b6974340ee97854efed8bae4.json @@ -1,6 +1,6 @@ { "db_name": "SQLite", - "query": "\n\t\t\tSELECT\n\t\t\t\tid AS \"id!: String\",\n\t\t\t\tinstance_id,\n\t\t\t\tkind AS \"kind!: String\",\n\t\t\t\tstatus AS \"status!: String\",\n\t\t\t\tstate AS \"state!: String\",\n\t\t\t\tcreated AS \"created!: i64\",\n\t\t\t\tmodified AS \"modified!: i64\",\n\t\t\t\tfinished,\n\t\t\t\tdismissed AS \"dismissed!: i64\"\n\t\t\tFROM install_jobs\n\t\t\tWHERE dismissed = 0 AND status IN ('queued', 'running', 'failed', 'interrupted')\n\t\t\tORDER BY created ASC\n\t\t\t", + "query": "\n\t\t\tSELECT\n\t\t\t\tid AS \"id!: String\",\n\t\t\t\tinstance_id,\n\t\t\t\tkind AS \"kind!: String\",\n\t\t\t\tstatus AS \"status!: String\",\n\t\t\t\tjson(state) AS \"state!: String\",\n\t\t\t\tcreated AS \"created!: i64\",\n\t\t\t\tmodified AS \"modified!: i64\",\n\t\t\t\tfinished,\n\t\t\t\tdismissed AS \"dismissed!: i64\"\n\t\t\tFROM install_jobs\n\t\t\tWHERE dismissed = 0 AND status IN ('queued', 'running', 'failed', 'interrupted')\n\t\t\tORDER BY created ASC\n\t\t\t", "describe": { "columns": [ { @@ -57,12 +57,12 @@ true, false, false, - false, + null, false, false, true, false ] }, - "hash": "292785598cdf815a69bed6f31d2159d689861c0fa57571e727ac9602c4e05a6d" + "hash": "1f778f4aebf65f0ec289bad1448edc640dea4ba9b6974340ee97854efed8bae4" } diff --git a/packages/app-lib/.sqlx/query-8ed032e3cddd751ae19257c08a549774ad7aefdfb98d9e5cacad1d9d5be4cb78.json b/packages/app-lib/.sqlx/query-67109d9f8d123bc89c5c07d46cbba1a15e90793fff78d6a0413e58d5cba6a528.json similarity index 76% rename from packages/app-lib/.sqlx/query-8ed032e3cddd751ae19257c08a549774ad7aefdfb98d9e5cacad1d9d5be4cb78.json rename to packages/app-lib/.sqlx/query-67109d9f8d123bc89c5c07d46cbba1a15e90793fff78d6a0413e58d5cba6a528.json index 94c024afc61..b259bb9f3ff 100644 --- a/packages/app-lib/.sqlx/query-8ed032e3cddd751ae19257c08a549774ad7aefdfb98d9e5cacad1d9d5be4cb78.json +++ b/packages/app-lib/.sqlx/query-67109d9f8d123bc89c5c07d46cbba1a15e90793fff78d6a0413e58d5cba6a528.json @@ -1,6 +1,6 @@ { "db_name": "SQLite", - "query": "\n\t\tSELECT\n\t\t\tid AS \"id!: String\",\n\t\t\tinstance_id,\n\t\t\tkind AS \"kind!: String\",\n\t\t\tstatus AS \"status!: String\",\n\t\t\tstate AS \"state!: String\",\n\t\t\tcreated AS \"created!: i64\",\n\t\t\tmodified AS \"modified!: i64\",\n\t\t\tfinished,\n\t\t\tdismissed AS \"dismissed!: i64\"\n\t\tFROM install_jobs\n\t\tWHERE status IN ('queued', 'running')\n\t\tORDER BY created ASC\n\t\t", + "query": "\n\t\tSELECT\n\t\t\tid AS \"id!: String\",\n\t\t\tinstance_id,\n\t\t\tkind AS \"kind!: String\",\n\t\t\tstatus AS \"status!: String\",\n\t\t\tjson(state) AS \"state!: String\",\n\t\t\tcreated AS \"created!: i64\",\n\t\t\tmodified AS \"modified!: i64\",\n\t\t\tfinished,\n\t\t\tdismissed AS \"dismissed!: i64\"\n\t\tFROM install_jobs\n\t\tWHERE status IN ('queued', 'running')\n\t\tORDER BY created ASC\n\t\t", "describe": { "columns": [ { @@ -57,12 +57,12 @@ true, false, false, - false, + null, false, false, true, false ] }, - "hash": "8ed032e3cddd751ae19257c08a549774ad7aefdfb98d9e5cacad1d9d5be4cb78" + "hash": "67109d9f8d123bc89c5c07d46cbba1a15e90793fff78d6a0413e58d5cba6a528" } diff --git a/packages/app-lib/.sqlx/query-1dd81b3ad9385bee89722711f41056178bd088841064a4b3086cdcf2458632ad.json b/packages/app-lib/.sqlx/query-c6bdc28338f3668ff2a320368f783293c458336d82332b1618acf8bcf0ad4d79.json similarity index 76% rename from packages/app-lib/.sqlx/query-1dd81b3ad9385bee89722711f41056178bd088841064a4b3086cdcf2458632ad.json rename to packages/app-lib/.sqlx/query-c6bdc28338f3668ff2a320368f783293c458336d82332b1618acf8bcf0ad4d79.json index 8719dbd0474..8f49510345b 100644 --- a/packages/app-lib/.sqlx/query-1dd81b3ad9385bee89722711f41056178bd088841064a4b3086cdcf2458632ad.json +++ b/packages/app-lib/.sqlx/query-c6bdc28338f3668ff2a320368f783293c458336d82332b1618acf8bcf0ad4d79.json @@ -1,6 +1,6 @@ { "db_name": "SQLite", - "query": "\n\t\t\tSELECT\n\t\t\t\tid AS \"id!: String\",\n\t\t\t\tinstance_id,\n\t\t\t\tkind AS \"kind!: String\",\n\t\t\t\tstatus AS \"status!: String\",\n\t\t\t\tstate AS \"state!: String\",\n\t\t\t\tcreated AS \"created!: i64\",\n\t\t\t\tmodified AS \"modified!: i64\",\n\t\t\t\tfinished,\n\t\t\t\tdismissed AS \"dismissed!: i64\"\n\t\t\tFROM install_jobs\n\t\t\tWHERE dismissed = 0\n\t\t\tORDER BY created ASC\n\t\t\t", + "query": "\n\t\t\tSELECT\n\t\t\t\tid AS \"id!: String\",\n\t\t\t\tinstance_id,\n\t\t\t\tkind AS \"kind!: String\",\n\t\t\t\tstatus AS \"status!: String\",\n\t\t\t\tjson(state) AS \"state!: String\",\n\t\t\t\tcreated AS \"created!: i64\",\n\t\t\t\tmodified AS \"modified!: i64\",\n\t\t\t\tfinished,\n\t\t\t\tdismissed AS \"dismissed!: i64\"\n\t\t\tFROM install_jobs\n\t\t\tWHERE dismissed = 0\n\t\t\tORDER BY created ASC\n\t\t\t", "describe": { "columns": [ { @@ -57,12 +57,12 @@ true, false, false, - false, + null, false, false, true, false ] }, - "hash": "1dd81b3ad9385bee89722711f41056178bd088841064a4b3086cdcf2458632ad" + "hash": "c6bdc28338f3668ff2a320368f783293c458336d82332b1618acf8bcf0ad4d79" } diff --git a/packages/app-lib/src/install/store.rs b/packages/app-lib/src/install/store.rs index e24d9be61e5..0ac59638751 100644 --- a/packages/app-lib/src/install/store.rs +++ b/packages/app-lib/src/install/store.rs @@ -124,7 +124,7 @@ pub async fn get( instance_id, kind AS \"kind!: String\", status AS \"status!: String\", - state AS \"state!: String\", + json(state) AS \"state!: String\", created AS \"created!: i64\", modified AS \"modified!: i64\", finished, @@ -153,7 +153,7 @@ pub async fn list( instance_id, kind AS \"kind!: String\", status AS \"status!: String\", - state AS \"state!: String\", + json(state) AS \"state!: String\", created AS \"created!: i64\", modified AS \"modified!: i64\", finished, @@ -174,7 +174,7 @@ pub async fn list( instance_id, kind AS \"kind!: String\", status AS \"status!: String\", - state AS \"state!: String\", + json(state) AS \"state!: String\", created AS \"created!: i64\", modified AS \"modified!: i64\", finished, @@ -202,7 +202,7 @@ pub async fn list_interrupted_candidates( instance_id, kind AS \"kind!: String\", status AS \"status!: String\", - state AS \"state!: String\", + json(state) AS \"state!: String\", created AS \"created!: i64\", modified AS \"modified!: i64\", finished,