diff --git a/app/config/collections.php b/app/config/collections.php index 8fad49fada..dca9f1d166 100644 --- a/app/config/collections.php +++ b/app/config/collections.php @@ -3442,7 +3442,7 @@ $projectCollections = array_merge([ 'size' => 128, 'signed' => true, 'required' => false, - 'default' => null, + 'default' => '', 'array' => false, 'filters' => [], ], diff --git a/app/config/frameworks.php b/app/config/frameworks.php index 02df80793f..a44780137c 100644 --- a/app/config/frameworks.php +++ b/app/config/frameworks.php @@ -153,5 +153,21 @@ return [ 'bundleCommand' => '', ], ], - ] + ], + 'other' => [ + 'key' => 'other', + 'name' => 'Other', + 'buildRuntime' => 'node-22', + 'runtimes' => getVersions($templateRuntimes['NODE']['versions'], 'node'), + 'adapters' => [ + 'static' => [ + 'key' => 'static', + 'buildCommand' => '', + 'installCommand' => '', + 'outputDirectory' => './', + 'startCommand' => 'sh helpers/server.sh', + 'bundleCommand' => '', + ], + ] + ], ]; diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 3ed57047ff..b087c70ef0 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -25318,7 +25318,8 @@ "remix", "nuxt", "nextjs", - "flutter" + "flutter", + "other" ], "x-enum-name": null, "x-enum-keys": [] @@ -25486,8 +25487,7 @@ "siteId", "name", "framework", - "buildRuntime", - "adapter" + "buildRuntime" ] } } @@ -25927,7 +25927,8 @@ "remix", "nuxt", "nextjs", - "flutter" + "flutter", + "other" ], "x-enum-name": null, "x-enum-keys": [] @@ -26068,8 +26069,7 @@ }, "required": [ "name", - "framework", - "adapter" + "framework" ] } } diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index ce226e8655..cbacaff82b 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -17134,7 +17134,8 @@ "remix", "nuxt", "nextjs", - "flutter" + "flutter", + "other" ], "x-enum-name": null, "x-enum-keys": [] @@ -17302,8 +17303,7 @@ "siteId", "name", "framework", - "buildRuntime", - "adapter" + "buildRuntime" ] } } @@ -17508,7 +17508,8 @@ "remix", "nuxt", "nextjs", - "flutter" + "flutter", + "other" ], "x-enum-name": null, "x-enum-keys": [] @@ -17649,8 +17650,7 @@ }, "required": [ "name", - "framework", - "adapter" + "framework" ] } } diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index abb2a389c0..da533d2ef0 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -25795,7 +25795,8 @@ "remix", "nuxt", "nextjs", - "flutter" + "flutter", + "other" ], "x-enum-name": null, "x-enum-keys": [] @@ -25908,7 +25909,7 @@ "adapter": { "type": "string", "description": "Framework adapter. Usuallly allows: static, ssr", - "default": null, + "default": "", "x-example": "" }, "installationId": { @@ -25982,8 +25983,7 @@ "siteId", "name", "framework", - "buildRuntime", - "adapter" + "buildRuntime" ] } } @@ -26421,7 +26421,8 @@ "remix", "nuxt", "nextjs", - "flutter" + "flutter", + "other" ], "x-enum-name": null, "x-enum-keys": [] @@ -26528,7 +26529,7 @@ "adapter": { "type": "string", "description": "Framework adapter. Usuallly allows: static, ssr", - "default": null, + "default": "", "x-example": "" }, "fallbackFile": { @@ -26576,8 +26577,7 @@ }, "required": [ "name", - "framework", - "adapter" + "framework" ] } } diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index be3138e93b..9f8fd86146 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -17579,7 +17579,8 @@ "remix", "nuxt", "nextjs", - "flutter" + "flutter", + "other" ], "x-enum-name": null, "x-enum-keys": [] @@ -17692,7 +17693,7 @@ "adapter": { "type": "string", "description": "Framework adapter. Usuallly allows: static, ssr", - "default": null, + "default": "", "x-example": "" }, "installationId": { @@ -17766,8 +17767,7 @@ "siteId", "name", "framework", - "buildRuntime", - "adapter" + "buildRuntime" ] } } @@ -17974,7 +17974,8 @@ "remix", "nuxt", "nextjs", - "flutter" + "flutter", + "other" ], "x-enum-name": null, "x-enum-keys": [] @@ -18081,7 +18082,7 @@ "adapter": { "type": "string", "description": "Framework adapter. Usuallly allows: static, ssr", - "default": null, + "default": "", "x-example": "" }, "fallbackFile": { @@ -18129,8 +18130,7 @@ }, "required": [ "name", - "framework", - "adapter" + "framework" ] } } diff --git a/src/Appwrite/Platform/Modules/Sites/Http/Sites/CreateSite.php b/src/Appwrite/Platform/Modules/Sites/Http/Sites/CreateSite.php index 74f8f8ab23..dcdb9920b4 100644 --- a/src/Appwrite/Platform/Modules/Sites/Http/Sites/CreateSite.php +++ b/src/Appwrite/Platform/Modules/Sites/Http/Sites/CreateSite.php @@ -66,7 +66,7 @@ class CreateSite extends Base ->param('outputDirectory', '', new Text(8192, 0), 'Output Directory for site.', true) ->param('subdomain', '', new CustomId(), 'Unique custom sub-domain. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.', true) ->param('buildRuntime', '', new WhiteList(array_keys(Config::getParam('runtimes')), true), 'Runtime to use during build step.') - ->param('adapter', '', new Text(8192, 0), 'Framework adapter. Usuallly allows: static, ssr') + ->param('adapter', '', new Text(8192, 0), 'Framework adapter. Usuallly allows: static, ssr', true) ->param('installationId', '', new Text(128, 0), 'Appwrite Installation ID for VCS (Version Control System) deployment.', true) ->param('fallbackFile', '', new Text(255, 0), 'Fallback file for single page application sites.', true) ->param('providerRepositoryId', '', new Text(128, 0), 'Repository ID of the repo linked to the site.', true) diff --git a/src/Appwrite/Platform/Modules/Sites/Http/Sites/UpdateSite.php b/src/Appwrite/Platform/Modules/Sites/Http/Sites/UpdateSite.php index e3403f579b..f17fd6379d 100644 --- a/src/Appwrite/Platform/Modules/Sites/Http/Sites/UpdateSite.php +++ b/src/Appwrite/Platform/Modules/Sites/Http/Sites/UpdateSite.php @@ -63,7 +63,7 @@ class UpdateSite extends Base ->param('buildCommand', '', new Text(8192, 0), 'Build Command.', true) ->param('outputDirectory', '', new Text(8192, 0), 'Output Directory for site.', true) ->param('buildRuntime', '', new WhiteList(array_keys(Config::getParam('runtimes')), true), 'Runtime to use during build step.', true) - ->param('adapter', '', new Text(8192, 0), 'Framework adapter. Usuallly allows: static, ssr') + ->param('adapter', '', new Text(8192, 0), 'Framework adapter. Usuallly allows: static, ssr', true) ->param('fallbackFile', '', new Text(255, 0), 'Fallback file for single page application sites.', true) ->param('installationId', '', new Text(128, 0), 'Appwrite Installation ID for VCS (Version Control System) deployment.', true) ->param('providerRepositoryId', '', new Text(128, 0), 'Repository ID of the repo linked to the site.', true)