1
0
Fork 0
mirror of synced 2024-06-13 16:24:47 +12:00

CI/CD fixes

This commit is contained in:
Matej Bačo 2024-04-02 18:48:12 +02:00
parent d091b37a15
commit 1234770dc8
8 changed files with 63 additions and 70 deletions

View file

@ -99,7 +99,6 @@ RUN chmod +x /usr/local/bin/doctor && \
chmod +x /usr/local/bin/worker-databases && \ chmod +x /usr/local/bin/worker-databases && \
chmod +x /usr/local/bin/worker-deletes && \ chmod +x /usr/local/bin/worker-deletes && \
chmod +x /usr/local/bin/worker-functions && \ chmod +x /usr/local/bin/worker-functions && \
chmod +x /usr/local/bin/worker-hamster && \
chmod +x /usr/local/bin/worker-mails && \ chmod +x /usr/local/bin/worker-mails && \
chmod +x /usr/local/bin/worker-messaging && \ chmod +x /usr/local/bin/worker-messaging && \
chmod +x /usr/local/bin/worker-migrations && \ chmod +x /usr/local/bin/worker-migrations && \

View file

@ -6,7 +6,6 @@ require_once __DIR__ . '/controllers/general.php';
use Appwrite\Event\Certificate; use Appwrite\Event\Certificate;
use Appwrite\Event\Delete; use Appwrite\Event\Delete;
use Appwrite\Event\Func; use Appwrite\Event\Func;
use Appwrite\Event\Hamster;
use Appwrite\Platform\Appwrite; use Appwrite\Platform\Appwrite;
use Utopia\Cache\Adapter\Sharding; use Utopia\Cache\Adapter\Sharding;
use Utopia\Cache\Cache; use Utopia\Cache\Cache;

View file

@ -4,6 +4,8 @@ use Appwrite\Extend\Exception;
use Appwrite\URL\URL as URLParse; use Appwrite\URL\URL as URLParse;
use Appwrite\Utopia\Response; use Appwrite\Utopia\Response;
use chillerlan\QRCode\QRCode; use chillerlan\QRCode\QRCode;
use chillerlan\QRCode\QRCode;
use chillerlan\QRCode\QROptions;
use chillerlan\QRCode\QROptions; use chillerlan\QRCode\QROptions;
use Utopia\App; use Utopia\App;
use Utopia\CLI\Console; use Utopia\CLI\Console;
@ -14,6 +16,7 @@ use Utopia\Database\Document;
use Utopia\Database\Validator\Authorization; use Utopia\Database\Validator\Authorization;
use Utopia\Database\Validator\UID; use Utopia\Database\Validator\UID;
use Utopia\Domains\Domain; use Utopia\Domains\Domain;
use Utopia\Fetch\Client;
use Utopia\Image\Image; use Utopia\Image\Image;
use Utopia\Logger\Log; use Utopia\Logger\Log;
use Utopia\Logger\Logger; use Utopia\Logger\Logger;
@ -24,9 +27,6 @@ use Utopia\Validator\Range;
use Utopia\Validator\Text; use Utopia\Validator\Text;
use Utopia\Validator\URL; use Utopia\Validator\URL;
use Utopia\Validator\WhiteList; use Utopia\Validator\WhiteList;
use chillerlan\QRCode\QRCode;
use chillerlan\QRCode\QROptions;
use Utopia\Fetch\Client;
$avatarCallback = function (string $type, string $code, int $width, int $height, int $quality, Response $response) { $avatarCallback = function (string $type, string $code, int $width, int $height, int $quality, Response $response) {

View file

@ -16,11 +16,8 @@ use Utopia\App;
use Utopia\Config\Config; use Utopia\Config\Config;
use Utopia\Database\Database; use Utopia\Database\Database;
use Utopia\Database\Document; use Utopia\Database\Document;
use Utopia\Database\Exception\Authorization as AuthorizationException;
use Utopia\Database\Exception\Duplicate; use Utopia\Database\Exception\Duplicate;
use Utopia\Database\Exception\Duplicate as DuplicateException;
use Utopia\Database\Exception\Query as QueryException; use Utopia\Database\Exception\Query as QueryException;
use Utopia\Database\Exception\Structure as StructureException;
use Utopia\Database\Helpers\ID; use Utopia\Database\Helpers\ID;
use Utopia\Database\Helpers\Permission; use Utopia\Database\Helpers\Permission;
use Utopia\Database\Helpers\Role; use Utopia\Database\Helpers\Role;
@ -637,7 +634,7 @@ App::post('/v1/storage/buckets/:bucketId/files')
if (!$validator->isValid($bucket->getCreate())) { if (!$validator->isValid($bucket->getCreate())) {
throw new Exception(Exception::USER_UNAUTHORIZED); throw new Exception(Exception::USER_UNAUTHORIZED);
} }
$file = Authorization::skip(fn() => $dbForProject->updateDocument('bucket_' . $bucket->getInternalId(), $fileId, $file)); $file = Authorization::skip(fn () => $dbForProject->updateDocument('bucket_' . $bucket->getInternalId(), $fileId, $file));
} }
} else { } else {
if ($file->isEmpty()) { if ($file->isEmpty()) {
@ -676,7 +673,7 @@ App::post('/v1/storage/buckets/:bucketId/files')
if (!$validator->isValid($bucket->getCreate())) { if (!$validator->isValid($bucket->getCreate())) {
throw new Exception(Exception::USER_UNAUTHORIZED); throw new Exception(Exception::USER_UNAUTHORIZED);
} }
$file = Authorization::skip(fn() => $dbForProject->updateDocument('bucket_' . $bucket->getInternalId(), $fileId, $file)); $file = Authorization::skip(fn () => $dbForProject->updateDocument('bucket_' . $bucket->getInternalId(), $fileId, $file));
} }
} }

View file

@ -948,7 +948,7 @@ App::patch('/v1/teams/:teamId/memberships/:membershipId/status')
throw new Exception(Exception::MEMBERSHIP_NOT_FOUND); throw new Exception(Exception::MEMBERSHIP_NOT_FOUND);
} }
$team = Authorization::skip(fn() => $dbForProject->getDocument('teams', $teamId)); $team = Authorization::skip(fn () => $dbForProject->getDocument('teams', $teamId));
if ($team->isEmpty()) { if ($team->isEmpty()) {
throw new Exception(Exception::TEAM_NOT_FOUND); throw new Exception(Exception::TEAM_NOT_FOUND);

View file

@ -9,7 +9,6 @@ use Appwrite\Event\Database as EventDatabase;
use Appwrite\Event\Delete; use Appwrite\Event\Delete;
use Appwrite\Event\Event; use Appwrite\Event\Event;
use Appwrite\Event\Func; use Appwrite\Event\Func;
use Appwrite\Event\Hamster;
use Appwrite\Event\Mail; use Appwrite\Event\Mail;
use Appwrite\Event\Messaging; use Appwrite\Event\Messaging;
use Appwrite\Event\Migration; use Appwrite\Event\Migration;

View file

@ -85,7 +85,6 @@
"phpunit/phpunit": "9.5.20", "phpunit/phpunit": "9.5.20",
"swoole/ide-helper": "5.0.2", "swoole/ide-helper": "5.0.2",
"textalk/websocket": "1.5.7", "textalk/websocket": "1.5.7",
"utopia-php/fetch": "0.1.*",
"laravel/pint": "^1.14" "laravel/pint": "^1.14"
}, },
"provide": { "provide": {

114
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "78b9cd75952805a2347578f4fcb96add", "content-hash": "975de4e9a34e72235198c4fd448539bd",
"packages": [ "packages": [
{ {
"name": "adhocore/jwt", "name": "adhocore/jwt",
@ -1717,6 +1717,45 @@
}, },
"time": "2023-11-02T12:01:43+00:00" "time": "2023-11-02T12:01:43+00:00"
}, },
{
"name": "utopia-php/fetch",
"version": "0.2.1",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/fetch.git",
"reference": "1423c0ee3eef944d816ca6e31706895b585aea82"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/fetch/zipball/1423c0ee3eef944d816ca6e31706895b585aea82",
"reference": "1423c0ee3eef944d816ca6e31706895b585aea82",
"shasum": ""
},
"require": {
"php": ">=8.0"
},
"require-dev": {
"laravel/pint": "^1.5.0",
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^9.5"
},
"type": "library",
"autoload": {
"psr-4": {
"Utopia\\Fetch\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "A simple library that provides an interface for making HTTP Requests.",
"support": {
"issues": "https://github.com/utopia-php/fetch/issues",
"source": "https://github.com/utopia-php/fetch/tree/0.2.1"
},
"time": "2024-03-18T11:50:59+00:00"
},
{ {
"name": "utopia-php/framework", "name": "utopia-php/framework",
"version": "0.33.6", "version": "0.33.6",
@ -2337,16 +2376,16 @@
}, },
{ {
"name": "utopia-php/storage", "name": "utopia-php/storage",
"version": "0.18.3", "version": "0.18.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/utopia-php/storage.git", "url": "https://github.com/utopia-php/storage.git",
"reference": "faa0279519ac14f3501e8b138e0865ad9d12bff6" "reference": "94ab8758fabcefee5c5fa723616e45719833f922"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/utopia-php/storage/zipball/faa0279519ac14f3501e8b138e0865ad9d12bff6", "url": "https://api.github.com/repos/utopia-php/storage/zipball/94ab8758fabcefee5c5fa723616e45719833f922",
"reference": "faa0279519ac14f3501e8b138e0865ad9d12bff6", "reference": "94ab8758fabcefee5c5fa723616e45719833f922",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2386,9 +2425,9 @@
], ],
"support": { "support": {
"issues": "https://github.com/utopia-php/storage/issues", "issues": "https://github.com/utopia-php/storage/issues",
"source": "https://github.com/utopia-php/storage/tree/0.18.3" "source": "https://github.com/utopia-php/storage/tree/0.18.4"
}, },
"time": "2023-12-31T11:45:12+00:00" "time": "2024-04-02T08:24:09+00:00"
}, },
{ {
"name": "utopia-php/swoole", "name": "utopia-php/swoole",
@ -2899,16 +2938,16 @@
}, },
{ {
"name": "laravel/pint", "name": "laravel/pint",
"version": "v1.15.0", "version": "v1.15.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/laravel/pint.git", "url": "https://github.com/laravel/pint.git",
"reference": "c52de679b3ac01207016c179d7ce173e4be128c4" "reference": "5f288b5e79938cc72f5c298d384e639de87507c6"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/laravel/pint/zipball/c52de679b3ac01207016c179d7ce173e4be128c4", "url": "https://api.github.com/repos/laravel/pint/zipball/5f288b5e79938cc72f5c298d384e639de87507c6",
"reference": "c52de679b3ac01207016c179d7ce173e4be128c4", "reference": "5f288b5e79938cc72f5c298d384e639de87507c6",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2919,13 +2958,13 @@
"php": "^8.1.0" "php": "^8.1.0"
}, },
"require-dev": { "require-dev": {
"friendsofphp/php-cs-fixer": "^3.49.0", "friendsofphp/php-cs-fixer": "^3.52.1",
"illuminate/view": "^10.43.0", "illuminate/view": "^10.48.4",
"larastan/larastan": "^2.8.1", "larastan/larastan": "^2.9.2",
"laravel-zero/framework": "^10.3.0", "laravel-zero/framework": "^10.3.0",
"mockery/mockery": "^1.6.7", "mockery/mockery": "^1.6.11",
"nunomaduro/termwind": "^1.15.1", "nunomaduro/termwind": "^1.15.1",
"pestphp/pest": "^2.33.6" "pestphp/pest": "^2.34.5"
}, },
"bin": [ "bin": [
"builds/pint" "builds/pint"
@ -2961,7 +3000,7 @@
"issues": "https://github.com/laravel/pint/issues", "issues": "https://github.com/laravel/pint/issues",
"source": "https://github.com/laravel/pint" "source": "https://github.com/laravel/pint"
}, },
"time": "2024-03-26T16:40:24+00:00" "time": "2024-04-02T14:28:47+00:00"
}, },
{ {
"name": "matthiasmullie/minify", "name": "matthiasmullie/minify",
@ -5402,45 +5441,6 @@
} }
], ],
"time": "2023-11-21T18:54:41+00:00" "time": "2023-11-21T18:54:41+00:00"
},
{
"name": "utopia-php/fetch",
"version": "0.1.0",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/fetch.git",
"reference": "2fa214b9262acd1a3583515a364da4f35929d5c5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/fetch/zipball/2fa214b9262acd1a3583515a364da4f35929d5c5",
"reference": "2fa214b9262acd1a3583515a364da4f35929d5c5",
"shasum": ""
},
"require": {
"php": ">=8.0"
},
"require-dev": {
"laravel/pint": "^1.5.0",
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^9.5"
},
"type": "library",
"autoload": {
"psr-4": {
"Utopia\\Fetch\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "A simple library that provides an interface for making HTTP Requests.",
"support": {
"issues": "https://github.com/utopia-php/fetch/issues",
"source": "https://github.com/utopia-php/fetch/tree/0.1.0"
},
"time": "2023-10-10T11:58:32+00:00"
} }
], ],
"aliases": [], "aliases": [],
@ -5469,5 +5469,5 @@
"platform-overrides": { "platform-overrides": {
"php": "8.3" "php": "8.3"
}, },
"plugin-api-version": "2.6.0" "plugin-api-version": "2.3.0"
} }