fix: preserve boolean fields and deploymentRetention in git/domain flows

Extends the same fix to three non-settings flows that call functions.update
or sites.update and had the same bugs:

- functions/(modals)/createGit.svelte: enabled/logging || → ??; add deploymentRetention
- functions/domains/add-domain/+page.svelte: enabled/logging || → ??; add
  providerSilentMode, providerRootDirectory, buildSpecification, and deploymentRetention
  which were missing entirely from this connect() call
- sites/deployments/createGitDeploymentModal.svelte: enabled/logging/
  providerSilentMode || → ??; add deploymentRetention
This commit is contained in:
harsh mahajan
2026-05-28 12:30:13 +05:30
parent 47d78fa0fb
commit e9d0a6fd0d
3 changed files with 16 additions and 10 deletions
@@ -83,8 +83,8 @@
events: $func.events || undefined,
schedule: $func.schedule || undefined,
timeout: $func.timeout || undefined,
enabled: $func.enabled || undefined,
logging: $func.logging || undefined,
enabled: $func.enabled ?? undefined,
logging: $func.logging ?? undefined,
entrypoint: $func.entrypoint,
commands: $func.commands || undefined,
scopes: ($func.scopes as Scopes[]) || undefined,
@@ -93,7 +93,8 @@
providerBranch: branch || undefined,
providerSilentMode: $func.providerSilentMode ?? undefined,
providerRootDirectory: $func.providerRootDirectory ?? undefined,
buildSpecification: $func.buildSpecification || undefined
buildSpecification: $func.buildSpecification || undefined,
deploymentRetention: $func.deploymentRetention ?? undefined
});
}
if (commit) {
@@ -141,14 +141,18 @@
events: data.func.events || undefined,
schedule: data.func.schedule || undefined,
timeout: data.func.timeout || undefined,
enabled: data.func.enabled || undefined,
logging: data.func.logging || undefined,
enabled: data.func.enabled ?? undefined,
logging: data.func.logging ?? undefined,
entrypoint: data.func.entrypoint,
commands: data.func.commands || undefined,
scopes: (data.func.scopes as Scopes[]) || undefined,
installationId: selectedInstallationId,
providerRepositoryId: selectedRepository,
providerBranch: 'main'
providerBranch: 'main',
providerSilentMode: data.func.providerSilentMode ?? undefined,
providerRootDirectory: data.func.providerRootDirectory || undefined,
buildSpecification: data.func.buildSpecification || undefined,
deploymentRetention: data.func.deploymentRetention ?? undefined
});
await invalidate(Dependencies.FUNCTION);
} catch {
@@ -85,8 +85,8 @@
siteId: site.$id,
name: site.name,
framework: site.framework as Framework,
enabled: site.enabled || undefined,
logging: site.logging || undefined,
enabled: site.enabled ?? undefined,
logging: site.logging ?? undefined,
timeout: site.timeout || undefined,
installCommand: site.installCommand || undefined,
buildCommand: site.buildCommand || undefined,
@@ -98,8 +98,9 @@
installationId: $installation.$id || undefined,
providerRepositoryId: selectedRepository || undefined,
providerBranch: branch || undefined,
providerSilentMode: site.providerSilentMode || undefined,
providerRootDirectory: site.providerRootDirectory || undefined
providerSilentMode: site.providerSilentMode ?? undefined,
providerRootDirectory: site.providerRootDirectory || undefined,
deploymentRetention: site.deploymentRetention ?? undefined
});
}
if (commit) {