appwrite/app/config/frameworks.php

46 lines
1.3 KiB
PHP
Raw Normal View History

2024-10-22 15:01:38 +00:00
<?php
/**
* List of Appwrite Sites supported frameworks
*/
2024-10-27 15:34:49 +00:00
use Utopia\Config\Config;
$templateRuntimes = Config::getParam('template-runtimes');
2024-10-26 16:43:30 +00:00
2024-10-26 18:47:43 +00:00
function getVersions(array $versions, string $prefix)
{
2024-10-26 16:43:30 +00:00
return array_map(function ($version) use ($prefix) {
return $prefix . '-' . $version;
}, $versions);
2024-10-26 18:47:43 +00:00
}
2024-10-26 16:43:30 +00:00
2024-10-25 13:56:28 +00:00
return [
2024-10-26 16:43:30 +00:00
'sveltekit' => [
2024-10-25 13:56:28 +00:00
'key' => 'sveltekit',
'name' => 'SvelteKit',
2024-10-26 16:43:30 +00:00
'defaultServeRuntime' => 'node-22',
2024-10-27 15:34:49 +00:00
'serveRuntimes' => getVersions($templateRuntimes['NODE']['versions'], 'node'),
2024-10-26 16:43:30 +00:00
'defaultBuildRuntime' => 'node-22',
2024-10-27 15:34:49 +00:00
'buildRuntimes' => getVersions($templateRuntimes['NODE']['versions'], 'node')
2024-10-25 13:56:28 +00:00
],
2024-10-26 16:43:30 +00:00
'nextjs' => [
2024-10-25 13:56:28 +00:00
'key' => 'nextjs',
'name' => 'Next.js',
2024-10-26 16:43:30 +00:00
'defaultServeRuntime' => 'node-22',
2024-10-27 15:34:49 +00:00
'serveRuntimes' => getVersions($templateRuntimes['NODE']['versions'], 'node'),
2024-10-26 16:43:30 +00:00
'defaultBuildRuntime' => 'node-22',
2024-10-27 15:34:49 +00:00
'buildRuntimes' => getVersions($templateRuntimes['NODE']['versions'], 'node')
2024-10-26 16:43:30 +00:00
],
'static' => [
'key' => 'static',
'name' => 'Static',
'defaultServeRuntime' => 'static-1',
'serveRuntimes' => [
'static-1'
2024-10-25 13:56:28 +00:00
],
2024-10-26 16:43:30 +00:00
'defaultBuildRuntime' => 'node-22',
2024-10-27 15:34:49 +00:00
'buildRuntimes' => getVersions($templateRuntimes['NODE']['versions'], 'node')
2024-10-25 13:56:28 +00:00
]
];