diff --git a/app/config/site-templates.php b/app/config/site-templates.php index 1467f3415f..3b08f17de0 100644 --- a/app/config/site-templates.php +++ b/app/config/site-templates.php @@ -27,7 +27,8 @@ return [ getFramework('SVELTEKIT', [ 'serveRuntime' => 'static-1', 'installCommand' => 'npm install --force', - 'providerRootDirectory' => './' + 'providerRootDirectory' => './', + 'fallbackFile' => null ]) ], 'vcsProvider' => 'github', diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 3cb5acc0a6..c208a8ed00 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -37652,6 +37652,11 @@ "type": "string", "description": "Runtime used during build step of template.", "x-example": "node-22" + }, + "fallbackFile": { + "type": "string", + "description": "Fallback file for SPA. Only relevant for static serve runtime.", + "x-example": "index.html" } }, "required": [ @@ -37662,7 +37667,8 @@ "outputDirectory", "providerRootDirectory", "serveRuntime", - "buildRuntime" + "buildRuntime", + "fallbackFile" ] }, "function": { diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index 612d3005b3..3eba58f5d1 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -38208,6 +38208,11 @@ "type": "string", "description": "Runtime used during build step of template.", "x-example": "node-22" + }, + "fallbackFile": { + "type": "string", + "description": "Fallback file for SPA. Only relevant for static serve runtime.", + "x-example": "index.html" } }, "required": [ @@ -38218,7 +38223,8 @@ "outputDirectory", "providerRootDirectory", "serveRuntime", - "buildRuntime" + "buildRuntime", + "fallbackFile" ] }, "function": { diff --git a/src/Appwrite/Utopia/Response/Model/TemplateFramework.php b/src/Appwrite/Utopia/Response/Model/TemplateFramework.php index b042de0bc8..63d1c6e218 100644 --- a/src/Appwrite/Utopia/Response/Model/TemplateFramework.php +++ b/src/Appwrite/Utopia/Response/Model/TemplateFramework.php @@ -58,6 +58,12 @@ class TemplateFramework extends Model 'default' => '', 'example' => 'node-22', ]) + ->addRule('fallbackFile', [ + 'type' => self::TYPE_STRING, + 'description' => 'Fallback file for SPA. Only relevant for static serve runtime.', + 'default' => null, + 'example' => 'index.html', + ]) ; }