From 5287e70f9ab0c14984636c696f60bb97af7e987b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Tue, 8 Oct 2024 16:20:04 +0200 Subject: [PATCH 1/3] Add new runtimes --- app/config/function-templates.php | 11 ++++++++--- composer.json | 2 +- composer.lock | 14 +++++++------- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/app/config/function-templates.php b/app/config/function-templates.php index db26ff2c19..7254c602cd 100644 --- a/app/config/function-templates.php +++ b/app/config/function-templates.php @@ -3,7 +3,7 @@ const TEMPLATE_RUNTIMES = [ 'NODE' => [ 'name' => 'node', - 'versions' => ['21.0', '20.0', '19.0', '18.0', '16.0', '14.5'] + 'versions' => ['22.0', '21.0', '20.0', '19.0', '18.0', '16.0', '14.5'] ], 'PYTHON' => [ 'name' => 'python', @@ -11,7 +11,7 @@ const TEMPLATE_RUNTIMES = [ ], 'DART' => [ 'name' => 'dart', - 'versions' => ['3.3', '3.1', '3.0', '2.19', '2.18', '2.17', '2.16', '2.16'] + 'versions' => ['3.5', '3.3', '3.1', '3.0', '2.19', '2.18', '2.17', '2.16', '2.16'] ], 'GO' => [ 'name' => 'go', @@ -23,12 +23,16 @@ const TEMPLATE_RUNTIMES = [ ], 'BUN' => [ 'name' => 'bun', - 'versions' => ['1.0'] + 'versions' => ['1.1', '1.0'] ], 'RUBY' => [ 'name' => 'ruby', 'versions' => ['3.3', '3.2', '3.1', '3.0'] ], + 'DENO' => [ + 'name' => 'deno', + 'versions' => ['2.0', '1.46', '1.40', '1.35', '1.24', '1.21'] + ], ]; function getRuntimes($runtime, $commands, $entrypoint, $providerRootDirectory, $versionsDenyList = []) @@ -75,6 +79,7 @@ return [ ), ...getRuntimes(TEMPLATE_RUNTIMES['BUN'], 'bun install', 'src/main.ts', 'bun/starter'), ...getRuntimes(TEMPLATE_RUNTIMES['RUBY'], 'bundle install', 'lib/main.rb', 'ruby/starter'), + ...getRuntimes(TEMPLATE_RUNTIMES['DENO'], 'deno cache src/main.ts', 'src/main.ts', 'deno/starter'), ], 'instructions' => 'For documentation and instructions check out file.', 'vcsProvider' => 'github', diff --git a/composer.json b/composer.json index 50881bec87..e7c7743da7 100644 --- a/composer.json +++ b/composer.json @@ -43,7 +43,7 @@ "ext-openssl": "*", "ext-zlib": "*", "ext-sockets": "*", - "appwrite/php-runtimes": "0.15.*", + "appwrite/php-runtimes": "0.16.*", "appwrite/php-clamav": "2.0.*", "utopia-php/abuse": "0.43.0", "utopia-php/analytics": "0.10.*", diff --git a/composer.lock b/composer.lock index bba2391d2c..a70e681ccc 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "a81b2ddbd465059b986947b63435e2bc", + "content-hash": "89ebc75f08cd9ee5a5cccd64d0f9938a", "packages": [ { "name": "adhocore/jwt", @@ -157,16 +157,16 @@ }, { "name": "appwrite/php-runtimes", - "version": "0.15.0", + "version": "0.16.0", "source": { "type": "git", "url": "https://github.com/appwrite/runtimes.git", - "reference": "68ea5bcc24c513a6d641ddf9412bbab13e5dfb94" + "reference": "0ccc89e5ed2d2fec757139a50626179b76c579d9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/runtimes/zipball/68ea5bcc24c513a6d641ddf9412bbab13e5dfb94", - "reference": "68ea5bcc24c513a6d641ddf9412bbab13e5dfb94", + "url": "https://api.github.com/repos/appwrite/runtimes/zipball/0ccc89e5ed2d2fec757139a50626179b76c579d9", + "reference": "0ccc89e5ed2d2fec757139a50626179b76c579d9", "shasum": "" }, "require": { @@ -206,9 +206,9 @@ ], "support": { "issues": "https://github.com/appwrite/runtimes/issues", - "source": "https://github.com/appwrite/runtimes/tree/0.15.0" + "source": "https://github.com/appwrite/runtimes/tree/0.16.0" }, - "time": "2024-08-21T10:23:45+00:00" + "time": "2024-10-08T12:49:05+00:00" }, { "name": "beberlei/assert", From d38383bf7893abd35392dcf3369bcbcf99cb31bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Tue, 8 Oct 2024 18:16:38 +0200 Subject: [PATCH 2/3] Upgrade console SDK version --- app/config/platforms.php | 2 +- src/Appwrite/Utopia/Response/Model/Execution.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/config/platforms.php b/app/config/platforms.php index e7eb1180cd..deac92ddee 100644 --- a/app/config/platforms.php +++ b/app/config/platforms.php @@ -199,7 +199,7 @@ return [ [ 'key' => 'web', 'name' => 'Console', - 'version' => '1.1.0', + 'version' => '1.2.1', 'url' => 'https://github.com/appwrite/sdk-for-console', 'package' => '', 'enabled' => true, diff --git a/src/Appwrite/Utopia/Response/Model/Execution.php b/src/Appwrite/Utopia/Response/Model/Execution.php index dc5d41c02c..80b65af696 100644 --- a/src/Appwrite/Utopia/Response/Model/Execution.php +++ b/src/Appwrite/Utopia/Response/Model/Execution.php @@ -81,7 +81,7 @@ class Execution extends Model 'example' => 200, ]) ->addRule('responseBody', [ - 'type' => self::TYPE_PAYLOAD, + 'type' => self::TYPE_STRING, 'description' => 'HTTP response body. This will return empty unless execution is created as synchronous.', 'default' => '', ]) From a63acb7f231399bdf939f8210cbb2bc71ffd7f5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Tue, 8 Oct 2024 21:11:25 +0200 Subject: [PATCH 3/3] Revert unwanted changes --- src/Appwrite/Utopia/Response/Model/Execution.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Utopia/Response/Model/Execution.php b/src/Appwrite/Utopia/Response/Model/Execution.php index 80b65af696..dc5d41c02c 100644 --- a/src/Appwrite/Utopia/Response/Model/Execution.php +++ b/src/Appwrite/Utopia/Response/Model/Execution.php @@ -81,7 +81,7 @@ class Execution extends Model 'example' => 200, ]) ->addRule('responseBody', [ - 'type' => self::TYPE_STRING, + 'type' => self::TYPE_PAYLOAD, 'description' => 'HTTP response body. This will return empty unless execution is created as synchronous.', 'default' => '', ])