1
0
Fork 0
mirror of synced 2024-09-29 17:01:37 +13:00

Fix bugs with new versions of utopia

This commit is contained in:
Matej Bačo 2023-05-13 12:08:02 +02:00
parent cddc40449a
commit c63505078d
4 changed files with 17 additions and 26 deletions

View file

@ -337,7 +337,7 @@ return [
],
Exception::FUNCTION_ENTRYPOINT_MISSING => [
'name' => Exception::FUNCTION_RUNTIME_UNSUPPORTED,
'description' => 'Entrypoint missing. Specify it on deployment or in function settings.',
'description' => 'Entrypoint missing. Specify it in function settings.',
'code' => 404,
],

View file

@ -70,9 +70,9 @@ App::post('/v1/functions')
->param('timeout', 15, new Range(1, (int) App::getEnv('_APP_FUNCTIONS_TIMEOUT', 900)), 'Function maximum execution time in seconds.', true)
->param('enabled', true, new Boolean(), 'Is function enabled?', true)
->param('logging', true, new Boolean(), 'Do executions get logged?', true)
->param('entrypoint', '', new Text('1028', 0), 'Entrypoint File.', true)
->param('buildCommand', '', new Text('1028', 0), 'Build Command.', true)
->param('installCommand', '', new Text('1028', 0), 'Install Command.', true)
->param('entrypoint', '', new Text('1028'), 'Entrypoint File.', true)
->param('buildCommand', '', new Text('1028'), 'Build Command.', true)
->param('installCommand', '', new Text('1028'), 'Install Command.', true)
->inject('response')
->inject('dbForProject')
->inject('project')
@ -519,9 +519,9 @@ App::put('/v1/functions/:functionId')
->param('timeout', 15, new Range(1, (int) App::getEnv('_APP_FUNCTIONS_TIMEOUT', 900)), 'Maximum execution time in seconds.', true)
->param('enabled', true, new Boolean(), 'Is function enabled?', true)
->param('logging', true, new Boolean(), 'Do executions get logged?', true)
->param('entrypoint', '', new Text('1028', 0), 'Entrypoint File.', true)
->param('buildCommand', '', new Text('1028', 0), 'Build Command.', true)
->param('installCommand', '', new Text('1028', 0), 'Install Command.', true)
->param('entrypoint', '', new Text('1028'), 'Entrypoint File.', true)
->param('buildCommand', '', new Text('1028'), 'Build Command.', true)
->param('installCommand', '', new Text('1028'), 'Install Command.', true)
->inject('response')
->inject('dbForProject')
->inject('project')
@ -703,8 +703,7 @@ App::post('/v1/functions/:functionId/deployments')
->inject('project')
->inject('deviceFunctions')
->inject('deviceLocal')
->inject('dbForConsole')
->action(function (string $functionId, string $entrypoint, mixed $code, bool $activate, string $buildCommand, string $installCommand, Request $request, Response $response, Database $dbForProject, Event $events, Document $project, Device $deviceFunctions, Device $deviceLocal, Database $dbForConsole) {
->action(function (string $functionId, mixed $code, bool $activate, Request $request, Response $response, Database $dbForProject, Event $events, Document $project, Device $deviceFunctions, Device $deviceLocal) {
$function = $dbForProject->getDocument('functions', $functionId);
if ($function->isEmpty()) {

View file

@ -56,7 +56,7 @@
"utopia-php/pools": "0.4.*",
"utopia-php/preloader": "0.2.*",
"utopia-php/domains": "1.1.*",
"utopia-php/framework": "dev-fix-wildcard-edge-cases as 0.26.99",
"utopia-php/framework": "0.26.*",
"utopia-php/image": "0.5.*",
"utopia-php/dsn": "0.1.*",
"utopia-php/locale": "0.4.*",

24
composer.lock generated
View file

@ -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": "86bc4c68a6cdf7c44b5e5ae0a99dfcb8",
"content-hash": "e517892c33b9d686f2a94d5b6a4b5ee6",
"packages": [
{
"name": "adhocore/jwt",
@ -1977,24 +1977,23 @@
},
{
"name": "utopia-php/framework",
"version": "dev-fix-wildcard-edge-cases",
"version": "0.26.0",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/framework.git",
"reference": "465873344b3c77392444fc70e8bcdf36f089d4b4"
"reference": "e8da5576370366d3bf9c574ec855f8c96fe4f34e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/framework/zipball/465873344b3c77392444fc70e8bcdf36f089d4b4",
"reference": "465873344b3c77392444fc70e8bcdf36f089d4b4",
"url": "https://api.github.com/repos/utopia-php/framework/zipball/e8da5576370366d3bf9c574ec855f8c96fe4f34e",
"reference": "e8da5576370366d3bf9c574ec855f8c96fe4f34e",
"shasum": ""
},
"require": {
"php": ">=8.0"
"php": ">=8.0.0"
},
"require-dev": {
"laravel/pint": "^1.2",
"phpstan/phpstan": "1.9.x-dev",
"phpunit/phpunit": "^9.5.25",
"vimeo/psalm": "4.27.0"
},
@ -2016,9 +2015,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/framework/issues",
"source": "https://github.com/utopia-php/framework/tree/fix-wildcard-edge-cases"
"source": "https://github.com/utopia-php/framework/tree/0.26.0"
},
"time": "2023-05-11T20:03:11+00:00"
"time": "2023-01-13T08:14:43+00:00"
},
{
"name": "utopia-php/image",
@ -5442,17 +5441,10 @@
"version": "dev-feat-add-path-keyword",
"alias": "0.28.99",
"alias_normalized": "0.28.99.0"
},
{
"package": "utopia-php/framework",
"version": "dev-fix-wildcard-edge-cases",
"alias": "0.26.99",
"alias_normalized": "0.26.99.0"
}
],
"minimum-stability": "stable",
"stability-flags": {
"utopia-php/framework": 20,
"appwrite/sdk-generator": 20
},
"prefer-stable": false,