fix: update spa

This commit is contained in:
Arman
2024-11-20 14:53:08 +01:00
parent 81ba96df57
commit e294ef66f6
7 changed files with 13 additions and 5 deletions
@@ -8,7 +8,7 @@
import { addNotification } from '$lib/stores/notifications';
import { trackEvent } from '$lib/actions/analytics';
import { onMount } from 'svelte';
import type { Models } from '@appwrite.io/console';
import { BuildRuntime, Framework, ServeRuntime, type Models } from '@appwrite.io/console';
import { IconArrowSmRight } from '@appwrite.io/pink-icons-svelte';
import { Link } from '$lib/elements';
@@ -38,14 +38,15 @@
await sdk.forProject.sites.update(
site.$id,
site.name,
site.framework,
Framework[site.framework],
site.enabled,
site.timeout,
site.installCommand,
site.buildCommand,
site.outputDirectory,
site.buildRuntime,
site.serveRuntime,
BuildRuntime[site.buildRuntime],
ServeRuntime[site.serveRuntime],
site.fallbackFile,
selectedInstallationId,
selectedRepository
);
@@ -41,6 +41,7 @@
outputDirectory || undefined,
BuildRuntime[site?.buildRuntime] || undefined,
ServeRuntime[site?.serveRuntime] || undefined,
site.fallbackFile || undefined,
site.installationId || undefined,
site.providerRepositoryId || undefined,
site.providerBranch || undefined,
@@ -29,6 +29,7 @@
site.outputDirectory || undefined,
BuildRuntime[site?.buildRuntime] || undefined,
ServeRuntime[site?.serveRuntime] || undefined,
site.fallbackFile || undefined,
site.installationId || undefined,
site.providerRepositoryId || undefined,
site.providerBranch || undefined,
@@ -76,6 +76,7 @@
site.outputDirectory || undefined,
BuildRuntime[site?.buildRuntime] || undefined,
ServeRuntime[site?.serveRuntime] || undefined,
site.fallbackFile || undefined,
site.installationId || undefined,
site.providerRepositoryId || undefined,
selectedBranch || undefined,
@@ -45,6 +45,7 @@
site.outputDirectory || undefined,
BuildRuntime[site?.buildRuntime] || undefined,
ServeRuntime[site?.serveRuntime] || undefined,
site.fallbackFile || undefined,
site.installationId || undefined,
site.providerRepositoryId || undefined,
site.providerBranch || undefined,
@@ -16,7 +16,8 @@
let fallback = '';
onMount(async () => {
fallback ??= site.name; //TODO: fix
fallback ??= site.fallbackFile;
if (fallback !== undefined) spa = true;
});
async function updateSPA() {
@@ -32,6 +33,7 @@
site.outputDirectory || undefined,
BuildRuntime[site?.buildRuntime] || undefined,
ServeRuntime[site?.serveRuntime] || undefined,
fallback,
site.installationId || undefined,
site.providerRepositoryId || undefined,
site.providerBranch || undefined,
@@ -30,6 +30,7 @@
site.outputDirectory || undefined,
BuildRuntime[site?.buildRuntime] || undefined,
ServeRuntime[site?.serveRuntime] || undefined,
site.fallbackFile || undefined,
site.installationId || undefined,
site.providerRepositoryId || undefined,
site.providerBranch || undefined,