From f2359ee284b5f5b5d0edfb2fc8a4685174f81eda Mon Sep 17 00:00:00 2001 From: wendrul <53628737+wendrul@users.noreply.github.com> Date: Tue, 10 Feb 2026 17:28:50 +0100 Subject: [PATCH] fix typing of app value for npm check (#7883) --- frontend/src/lib/components/DeployWorkspace.svelte | 3 ++- .../(root)/(logged)/apps_raw/edit/[...path]/+page.svelte | 5 +++-- .../(root)/(logged)/apps_raw/get/[...path]/+page.svelte | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/frontend/src/lib/components/DeployWorkspace.svelte b/frontend/src/lib/components/DeployWorkspace.svelte index 60165f8c54..0624240bd0 100644 --- a/frontend/src/lib/components/DeployWorkspace.svelte +++ b/frontend/src/lib/components/DeployWorkspace.svelte @@ -152,7 +152,8 @@ console.log('app', app) let result: { kind: Kind; path: string }[] = [] if (app.raw_app) { - for (const runnable of Object.values(app.value.runnables as Record)) { + const rawAppValue = app.value as { runnables?: Record } + for (const runnable of Object.values(rawAppValue.runnables ?? {})) { if (isRunnableByPath(runnable)) { if (runnable.runType == 'script') { result.push({ kind: 'script', path: runnable.path }) diff --git a/frontend/src/routes/(root)/(logged)/apps_raw/edit/[...path]/+page.svelte b/frontend/src/routes/(root)/(logged)/apps_raw/edit/[...path]/+page.svelte index 9cb73b7555..b22d1884be 100644 --- a/frontend/src/routes/(root)/(logged)/apps_raw/edit/[...path]/+page.svelte +++ b/frontend/src/routes/(root)/(logged)/apps_raw/edit/[...path]/+page.svelte @@ -128,8 +128,9 @@ } sendUserToast('App restored from browser storage', false, actions) app_w_draft.value = stateLoadedFromLocalStorage - files = app_w_draft.value.files as any - runnables = app_w_draft.value.runnables as any + const rawValue = app_w_draft.value as any + files = rawValue.files as any + runnables = rawValue.runnables as any redraw += 1 } else if (app_w_draft.draft) { extractRawApp(app_w_draft.draft) diff --git a/frontend/src/routes/(root)/(logged)/apps_raw/get/[...path]/+page.svelte b/frontend/src/routes/(root)/(logged)/apps_raw/get/[...path]/+page.svelte index d7318752ab..eefa19fcd3 100644 --- a/frontend/src/routes/(root)/(logged)/apps_raw/get/[...path]/+page.svelte +++ b/frontend/src/routes/(root)/(logged)/apps_raw/get/[...path]/+page.svelte @@ -36,7 +36,7 @@ let can_write = $derived(canWrite(page.params.path ?? '', app?.extra_perms ?? {}, $userStore)) function getRunnables(app: AppWithLastVersion) { - return (app?.value?.runnables ?? {}) as Record + return ((app?.value as any)?.runnables ?? {}) as Record }