From 40588237edd8046cd98c737fb0ce830894d407a2 Mon Sep 17 00:00:00 2001 From: harsh mahajan Date: Thu, 13 Aug 2026 16:16:05 +0530 Subject: [PATCH] Keep the start command field, drop the adapter reads behind it The field stays where it is. What goes is the code reading startCommand off a framework adapter: the SDK never declared it and the API no longer sends it, so the prefill and the placeholder were pointing at nothing, and Reset restored a value that does not exist. Also stop carrying a start command across a framework or adapter change - it names an entrypoint only the previous framework has - and send it only for the ssr adapter, matching the fallbackFile line beside it. --- .../sites/create-site/configuration.svelte | 10 ++++++ .../sites/create-site/deploy/+page.svelte | 16 ++++++++- .../sites/create-site/manual/+page.svelte | 3 ++ .../repository-[repository]/+page.svelte | 3 ++ .../settings/updateBuildSettings.svelte | 36 +++++++------------ 5 files changed, 43 insertions(+), 25 deletions(-) diff --git a/src/routes/(console)/project-[region]-[project]/sites/create-site/configuration.svelte b/src/routes/(console)/project-[region]-[project]/sites/create-site/configuration.svelte index 8ab02601a..f92ec6ae0 100644 --- a/src/routes/(console)/project-[region]-[project]/sites/create-site/configuration.svelte +++ b/src/routes/(console)/project-[region]-[project]/sites/create-site/configuration.svelte @@ -17,6 +17,7 @@ export let isLoading = false; export let installCommand = ''; export let buildCommand = ''; + export let startCommand = ''; export let outputDirectory = ''; let frameworkId = selectedFramework.key; @@ -83,6 +84,15 @@ Reset + {#if adapterData?.key === 'ssr'} + + + + {/if} data.frameworks.frameworks.find((f) => f.key === framework)?.adapters?.[0] + ); + const shouldShowStartCommand = $derived(primaryAdapter?.key === Adapter.Ssr); + $effect(() => { if (framework && data.frameworks && !hasCustomCommands) { const fw = data.frameworks.frameworks.find((f) => f.key === framework); @@ -103,10 +109,11 @@ // Build configuration - use from URL params or defaults installCommand = page.url.searchParams.get('install') || ''; buildCommand = page.url.searchParams.get('build') || ''; + startCommand = page.url.searchParams.get('start') || ''; outputDirectory = page.url.searchParams.get('output') || ''; // Check if custom commands were provided via URL - hasCustomCommands = !!(installCommand || buildCommand || outputDirectory); + hasCustomCommands = !!(installCommand || buildCommand || startCommand || outputDirectory); // If no custom commands, auto-fill from framework defaults if (!hasCustomCommands && data.frameworks) { @@ -145,6 +152,7 @@ buildRuntime: selectedFramework.buildRuntime, installCommand: installCommand || undefined, buildCommand: buildCommand || undefined, + startCommand: shouldShowStartCommand ? startCommand || undefined : undefined, outputDirectory: outputDirectory || undefined, adapter: framework === Framework.Other ? Adapter.Static : undefined, providerSilentMode: false @@ -273,6 +281,12 @@ label="Build command" placeholder={buildCommand || 'npm run build'} bind:value={buildCommand} /> + {#if shouldShowStartCommand} + + {/if} [] = []; let files: FileList; @@ -77,6 +78,7 @@ buildRuntime, installCommand: installCommand || undefined, buildCommand: buildCommand || undefined, + startCommand: startCommand || undefined, outputDirectory: outputDirectory || undefined }); @@ -251,6 +253,7 @@ [] = []; let silentMode = false; @@ -121,6 +122,7 @@ buildRuntime, installCommand: installCommand || undefined, buildCommand: buildCommand || undefined, + startCommand: startCommand || undefined, outputDirectory: outputDirectory || undefined, installationId: data.installation.$id, providerRepositoryId: data.repository.id, @@ -219,6 +221,7 @@ a.key === adapter) ?? @@ -105,13 +97,13 @@ buildCommand = isOriginalAdapter ? (site?.buildCommand ?? frameworkAdapterData.buildCommand) : data.buildCommand; + startCommand = isOriginalAdapter ? (site?.startCommand ?? '') : ''; outputDirectory = isOriginalAdapter ? (site?.outputDirectory ?? frameworkAdapterData.outputDirectory) : data.outputDirectory; fallback = isOriginalAdapter ? (site?.fallbackFile ?? data.fallbackFile) : data.fallbackFile; - startCommand = isOriginalAdapter ? (site?.startCommand ?? '') : ''; } lastFrameworkAdapterKey = `${selectedFramework.key}:${adapter ?? ''}`; @@ -335,6 +327,15 @@ Reset + {#if adapter === Adapter.Ssr} + + + + {/if} {/if} - {#if adapter === Adapter.Ssr} - - - Command used to start your SSR server after a successful deploy. - Leave it empty to use the framework default. - - - - {/if}