diff --git a/.env b/.env index b9aa42e2f5..945680114f 100644 --- a/.env +++ b/.env @@ -81,7 +81,7 @@ _APP_COMPUTE_RUNTIMES_NETWORK=runtimes _APP_EXECUTOR_SECRET=your-secret-key _APP_EXECUTOR_HOST=http://exc1/v1 _APP_FUNCTIONS_RUNTIMES=php-8.0,node-18.0,python-3.9,ruby-3.1 -_APP_SITES_RUNTIMES=static-1,node-22,flutter-3.24 +_APP_SITES_RUNTIMES=static-1,node-22,flutter-3.29 _APP_SITES_FRAMEWORKS=sveltekit,nextjs,nuxt,astro,remix,flutter,other,react,vue,analog,angular _APP_MAINTENANCE_INTERVAL=86400 _APP_MAINTENANCE_DELAY= diff --git a/app/cli.php b/app/cli.php index 360b5478c5..c92d2c2e6d 100644 --- a/app/cli.php +++ b/app/cli.php @@ -26,7 +26,7 @@ use Utopia\Registry\Registry; use Utopia\System\System; // overwriting runtimes to be architectur agnostic for CLI -Config::setParam('runtimes', (new Runtimes('v4rc'))->getAll(supported: false)); +Config::setParam('runtimes', (new Runtimes('v5'))->getAll(supported: false)); // require controllers after overwriting runtimes require_once __DIR__ . '/controllers/general.php'; diff --git a/app/config/collections/projects.php b/app/config/collections/projects.php index 7ea750f2b3..98d282d929 100644 --- a/app/config/collections/projects.php +++ b/app/config/collections/projects.php @@ -674,7 +674,7 @@ return [ 'size' => 8, 'signed' => true, 'required' => false, - 'default' => 'v4', + 'default' => 'v5', 'array' => false, 'filters' => [], ], diff --git a/app/config/frameworks.php b/app/config/frameworks.php index 355ead1bfc..1cb6ac811b 100644 --- a/app/config/frameworks.php +++ b/app/config/frameworks.php @@ -221,7 +221,7 @@ return [ 'flutter' => [ 'key' => 'flutter', 'name' => 'Flutter', - 'buildRuntime' => 'flutter-3.24', + 'buildRuntime' => 'flutter-3.29', 'runtimes' => getVersions($templateRuntimes['FLUTTER']['versions'], 'flutter'), 'adapters' => [ 'static' => [ diff --git a/app/config/runtimes.php b/app/config/runtimes.php index 4260655342..dbd33dac4b 100644 --- a/app/config/runtimes.php +++ b/app/config/runtimes.php @@ -6,4 +6,4 @@ use Appwrite\Runtimes\Runtimes; -return (new Runtimes('v4rc'))->getAll(); +return (new Runtimes('v5'))->getAll(); diff --git a/app/config/templates/site.php b/app/config/templates/site.php index 9954af2bbb..cefb173e4d 100644 --- a/app/config/templates/site.php +++ b/app/config/templates/site.php @@ -73,7 +73,7 @@ const TEMPLATE_FRAMEWORKS = [ 'installCommand' => '', 'buildCommand' => 'flutter build web', 'outputDirectory' => './build/web', - 'buildRuntime' => 'flutter-3.24', + 'buildRuntime' => 'flutter-3.29', 'adapter' => 'static', 'fallbackFile' => '', ], @@ -145,6 +145,48 @@ return [ 'providerVersion' => '0.1.*', 'variables' => [] ], + [ + 'key' => 'starter-for-flutter', + 'name' => 'Flutter starter', + 'useCases' => ['starter'], + 'screenshotDark' => $url . '/images/sites/templates/starter-for-flutter-dark.png', + 'screenshotLight' => $url . '/images/sites/templates/starter-for-flutter-light.png', + 'frameworks' => [ + getFramework('FLUTTER', [ + 'providerRootDirectory' => './', + ]), + ], + 'vcsProvider' => 'github', + 'providerRepositoryId' => 'starter-for-flutter', + 'providerOwner' => 'appwrite', + 'providerVersion' => '0.1.*', + 'variables' => [ + [ + 'name' => 'APPWRITE_PUBLIC_ENDPOINT', + 'description' => 'Endpoint of Appwrite server', + 'value' => '{apiEndpoint}', + 'placeholder' => '{apiEndpoint}', + 'required' => true, + 'type' => 'text' + ], + [ + 'name' => 'APPWRITE_PROJECT_ID', + 'description' => 'Your Appwrite project ID', + 'value' => '{projectId}', + 'placeholder' => '{projectId}', + 'required' => true, + 'type' => 'text' + ], + [ + 'name' => 'APPWRITE_PROJECT_NAME', + 'description' => 'Your Appwrite project name', + 'value' => '{projectName}', + 'placeholder' => '{projectName}', + 'required' => true, + 'type' => 'text' + ], + ] + ], [ 'key' => 'starter-for-js', 'name' => 'JavaScript starter', diff --git a/app/controllers/general.php b/app/controllers/general.php index f28409567e..e80f30c0b4 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -245,7 +245,7 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw $version = match ($type) { 'function' => $resource->getAttribute('version', 'v2'), - 'site' => 'v4', + 'site' => 'v5', }; $runtimes = Config::getParam($version === 'v2' ? 'runtimes-v2' : 'runtimes', []); @@ -416,7 +416,7 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw try { $version = match ($type) { 'function' => $resource->getAttribute('version', 'v2'), - 'site' => 'v4', + 'site' => 'v5', }; $entrypoint = match ($type) { 'function' => $deployment->getAttribute('entrypoint', ''), diff --git a/composer.lock b/composer.lock index 4fc58cf873..da69c2bb0b 100644 --- a/composer.lock +++ b/composer.lock @@ -157,16 +157,16 @@ }, { "name": "appwrite/php-runtimes", - "version": "0.18.0", + "version": "0.18.1", "source": { "type": "git", "url": "https://github.com/appwrite/runtimes.git", - "reference": "f1ddcc567325659ad79506bc9684a4fc2009dc42" + "reference": "97b5d97ae2c0fc9a2a374769eadff024f95783aa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/runtimes/zipball/f1ddcc567325659ad79506bc9684a4fc2009dc42", - "reference": "f1ddcc567325659ad79506bc9684a4fc2009dc42", + "url": "https://api.github.com/repos/appwrite/runtimes/zipball/97b5d97ae2c0fc9a2a374769eadff024f95783aa", + "reference": "97b5d97ae2c0fc9a2a374769eadff024f95783aa", "shasum": "" }, "require": { @@ -206,9 +206,9 @@ ], "support": { "issues": "https://github.com/appwrite/runtimes/issues", - "source": "https://github.com/appwrite/runtimes/tree/0.18.0" + "source": "https://github.com/appwrite/runtimes/tree/0.18.1" }, - "time": "2025-03-07T14:30:31+00:00" + "time": "2025-03-11T14:05:46+00:00" }, { "name": "beberlei/assert", @@ -5085,16 +5085,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "0.40.2", + "version": "0.40.6", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "56f09482d9e2f223911277ab887f197402708049" + "reference": "d8816209a07e7d64ef62dbcaf8ad4aa1262f58b9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/56f09482d9e2f223911277ab887f197402708049", - "reference": "56f09482d9e2f223911277ab887f197402708049", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/d8816209a07e7d64ef62dbcaf8ad4aa1262f58b9", + "reference": "d8816209a07e7d64ef62dbcaf8ad4aa1262f58b9", "shasum": "" }, "require": { @@ -5130,9 +5130,9 @@ "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", "support": { "issues": "https://github.com/appwrite/sdk-generator/issues", - "source": "https://github.com/appwrite/sdk-generator/tree/0.40.2" + "source": "https://github.com/appwrite/sdk-generator/tree/0.40.6" }, - "time": "2025-03-06T16:31:03+00:00" + "time": "2025-03-10T19:04:24+00:00" }, { "name": "doctrine/annotations", @@ -5404,16 +5404,16 @@ }, { "name": "laravel/pint", - "version": "v1.21.0", + "version": "v1.21.1", "source": { "type": "git", "url": "https://github.com/laravel/pint.git", - "reference": "531fa0871fbde719c51b12afa3a443b8f4e4b425" + "reference": "c44bffbb2334e90fba560933c45948fa4a3f3e86" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/pint/zipball/531fa0871fbde719c51b12afa3a443b8f4e4b425", - "reference": "531fa0871fbde719c51b12afa3a443b8f4e4b425", + "url": "https://api.github.com/repos/laravel/pint/zipball/c44bffbb2334e90fba560933c45948fa4a3f3e86", + "reference": "c44bffbb2334e90fba560933c45948fa4a3f3e86", "shasum": "" }, "require": { @@ -5424,9 +5424,9 @@ "php": "^8.2.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.68.5", - "illuminate/view": "^11.42.0", - "larastan/larastan": "^3.0.4", + "friendsofphp/php-cs-fixer": "^3.70.2", + "illuminate/view": "^11.44.1", + "larastan/larastan": "^3.1.0", "laravel-zero/framework": "^11.36.1", "mockery/mockery": "^1.6.12", "nunomaduro/termwind": "^2.3", @@ -5466,7 +5466,7 @@ "issues": "https://github.com/laravel/pint/issues", "source": "https://github.com/laravel/pint" }, - "time": "2025-02-18T03:18:57+00:00" + "time": "2025-03-11T03:22:21+00:00" }, { "name": "matthiasmullie/minify", diff --git a/docker-compose.yml b/docker-compose.yml index 547374eb5f..e457b87325 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -962,7 +962,7 @@ services: hostname: exc1 <<: *x-logging stop_signal: SIGINT - image: openruntimes/executor:0.7.9 + image: openruntimes/executor:0.7.10 restart: unless-stopped networks: - appwrite @@ -985,7 +985,7 @@ services: - OPR_EXECUTOR_ENV=$_APP_ENV - OPR_EXECUTOR_RUNTIMES=$_APP_FUNCTIONS_RUNTIMES,$_APP_SITES_RUNTIMES - OPR_EXECUTOR_SECRET=$_APP_EXECUTOR_SECRET - - OPR_EXECUTOR_RUNTIME_VERSIONS=v2,v4,v4rc + - OPR_EXECUTOR_RUNTIME_VERSIONS=v2,v5 - OPR_EXECUTOR_LOGGING_CONFIG=$_APP_LOGGING_CONFIG - OPR_EXECUTOR_STORAGE_DEVICE=$_APP_STORAGE_DEVICE - OPR_EXECUTOR_STORAGE_S3_ACCESS_KEY=$_APP_STORAGE_S3_ACCESS_KEY diff --git a/public/images/sites/templates/flutter-starter-dark.png b/public/images/sites/templates/flutter-starter-dark.png index 9b239ff767..82c78d0c7d 100644 Binary files a/public/images/sites/templates/flutter-starter-dark.png and b/public/images/sites/templates/flutter-starter-dark.png differ diff --git a/public/images/sites/templates/flutter-starter-light.png b/public/images/sites/templates/flutter-starter-light.png index 9b239ff767..82c78d0c7d 100644 Binary files a/public/images/sites/templates/flutter-starter-light.png and b/public/images/sites/templates/flutter-starter-light.png differ diff --git a/src/Appwrite/Platform/Modules/Functions/Http/Functions/Create.php b/src/Appwrite/Platform/Modules/Functions/Http/Functions/Create.php index b8959ab5bc..329f862fee 100644 --- a/src/Appwrite/Platform/Modules/Functions/Http/Functions/Create.php +++ b/src/Appwrite/Platform/Modules/Functions/Http/Functions/Create.php @@ -169,7 +169,7 @@ class Create extends Base 'commands' => $commands, 'scopes' => $scopes, 'search' => implode(' ', [$functionId, $name, $runtime]), - 'version' => 'v4', + 'version' => 'v5', 'installationId' => $installation->getId(), 'installationInternalId' => $installation->getInternalId(), 'providerRepositoryId' => $providerRepositoryId, diff --git a/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php b/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php index bf442e7c3b..7ed3d0add3 100644 --- a/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php +++ b/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php @@ -1102,7 +1102,7 @@ class Builds extends Action { return match ($resource->getCollection()) { 'functions' => $resource->getAttribute('version', 'v2'), - 'sites' => 'v4', + 'sites' => 'v5', }; } diff --git a/src/Appwrite/Utopia/Response/Model/Func.php b/src/Appwrite/Utopia/Response/Model/Func.php index 3bfc24c82e..7037f5e363 100644 --- a/src/Appwrite/Utopia/Response/Model/Func.php +++ b/src/Appwrite/Utopia/Response/Model/Func.php @@ -119,7 +119,7 @@ class Func extends Model ->addRule('version', [ 'type' => self::TYPE_STRING, 'description' => 'Version of Open Runtimes used for the function.', - 'default' => 'v4', + 'default' => 'v5', 'example' => 'v2', ]) ->addRule('installationId', [ diff --git a/src/Executor/Executor.php b/src/Executor/Executor.php index 9702db43de..6e6a7bd3f4 100644 --- a/src/Executor/Executor.php +++ b/src/Executor/Executor.php @@ -74,8 +74,8 @@ class Executor $route = "/runtimes"; // Remove after migration - if ($version == 'v3') { - $version = 'v4'; + if ($version == 'v3' || $version === 'v4') { + $version = 'v5'; } $params = [ @@ -201,8 +201,8 @@ class Executor $route = '/runtimes/' . $runtimeId . '/executions'; // Remove after migration - if ($version == 'v3') { - $version = 'v4'; + if ($version == 'v3' || $version === 'v4') { + $version = 'v5'; } $params = [ diff --git a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php index 6671c57c90..18d848b9e6 100644 --- a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php +++ b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php @@ -1268,7 +1268,7 @@ class FunctionsCustomServerTest extends Scope return [ ['folder' => 'php-fn', 'name' => 'php-8.0', 'entrypoint' => 'index.php', 'runtimeName' => 'PHP', 'runtimeVersion' => '8.0'], ['folder' => 'node', 'name' => 'node-18.0', 'entrypoint' => 'index.js', 'runtimeName' => 'Node.js', 'runtimeVersion' => '18.0'], - // TODO: Re-enable; temporarly disabled due to OPR v4rc issues + // TODO: Re-enable; temporarly disabled due to OPR v5 issues // ['folder' => 'python', 'name' => 'python-3.9', 'entrypoint' => 'main.py', 'runtimeName' => 'Python', 'runtimeVersion' => '3.9'], ['folder' => 'ruby', 'name' => 'ruby-3.1', 'entrypoint' => 'main.rb', 'runtimeName' => 'Ruby', 'runtimeVersion' => '3.1'], // Swift and Dart disabled on purpose, as it's very slow.