1
0
Fork 0
mirror of synced 2024-05-29 17:09:48 +12:00

Merge branch 'master' of github.com:appwrite/appwrite into feat-465-add-arm-support

This commit is contained in:
Eldad Fux 2021-02-19 10:39:05 +02:00
commit f860fe1770
267 changed files with 899 additions and 541 deletions

10
.gitattributes vendored
View file

@ -0,0 +1,10 @@
app/config/* linguist-detectable=false
app/config/* linguist-detectable=false
app/config/*/* linguist-detectable=false
app/config/*/*/* linguist-detectable=false
app/config/*/*/*/* linguist-detectable=false
tests/* linguist-detectable=false
tests/*/* linguist-detectable=false
tests/*/*/* linguist-detectable=false
tests/*/*/*/* linguist-detectable=false
tests/*/*/*/*/* linguist-detectable=false

View file

@ -15,12 +15,7 @@ then
exit 1
fi
echo "Updating git repository $1 / $2"
git fetch origin
git reset --hard origin/master
if test $(find "./app/db/DBIP/dbip-country-lite-2020-01.mmdb" -mmin +259200)
if test $(find "./app/db/DBIP/dbip-country-lite-2021-02.mmdb" -mmin +259200)
then
printf "${RED}GEO country DB has not been updated for more than 6 months. Go to https://db-ip.com/db/download/ip-to-country-lite to download a newer version${NC}\n"
fi

View file

@ -1,4 +1,15 @@
# Version 0.7.0 (NOT-RELEASED)
# Version 0.8.0 (Not Released Yet)
- Anonymous login
# Version 0.7.1 (Not Released Yet)
- Updated missing storage env vars
- Added option to for Redis authentication
- Force adding a security email on setup
- Better error logs on appwrite cretificates worker
# Version 0.7.0
## Features
@ -39,7 +50,7 @@
- New OAuth adapter for PayPal sandbox (@armino-dev - [#420](https://github.com/appwrite/appwrite/issues/410))
- New OAuth adapter for Tradeshift (@armino-dev - [#855](https://github.com/appwrite/appwrite/pull/855))
- New OAuth adapter for Tradeshift sandbox (@armino-dev - [#855](https://github.com/appwrite/appwrite/pull/855))
- Introducing new permssion types: role:guest, role:member, role:app
- Introducing new permssion types: role:guest & role:member
- Disabled rate-limits on server side integrations
- Refactored migration script
@ -68,6 +79,7 @@
- Upgraded Redis Resque queue library to version 1.3.6 ([#319](https://github.com/appwrite/appwrite/issues/319))
- Upgraded ClamAV container image to version 1.0.11 ([#412](https://github.com/appwrite/appwrite/issues/412))
- Upgraded device detctor to version 3.12.6
- Upgraded GEOIP DB file to Feb 2021 release
## Breaking Changes (Read before upgrading!)
@ -118,6 +130,7 @@
- Block iframe access to Appwrite console using the `X-Frame-Options` header.
- Fixed `roles` param input validator
- API Keys are now stored encrypted
- Disabled domains whitlist ACL for the Appwrite console
# Version 0.6.2 (PRE-RELEASE)

View file

@ -79,7 +79,7 @@ To get proper autocompletion for all the different functions and classes in the
```bash
docker run --rm --interactive --tty \
--volume $PWD:/app \
composer install
composer update --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist
```
### User Interface
@ -90,6 +90,35 @@ Appwrite uses an internal micro-framework called Litespeed.js to build simple UI
After finishing the installation process, you can start writing and editing code.
#### Advanced Topics
We love to create issues that are good for begginers and label them as `good for begginers` or `hacktoberfest`, but some more advanced topics might require extra knowledge. Below is a list of links you can use to learn more about some of the more advance topics that will help you master the Appwrite codebase.
##### Tools and Libs
- [Docker](https://www.docker.com/get-started)
- [PHP FIG](https://www.php-fig.org/) - [PSR-1](https://www.php-fig.org/psr/psr-1/) and [PSR-4](https://www.php-fig.org/psr/psr-4/)
- [PHP Swoole](https://www.swoole.co.uk/)
Learn more at our [Technology Stack](## Technology Stack) section.
##### Network and Protocols
- [OSI Model](https://en.wikipedia.org/wiki/OSI_model)
- [TCP vs UDP](https://www.guru99.com/tcp-vs-udp-understanding-the-difference.html#:~:text=TCP%20is%20a%20connection%2Doriented,speed%20of%20UDP%20is%20faster&text=TCP%20does%20error%20checking%20and,but%20it%20discards%20erroneous%20packets.)
- [HTTP](https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol)
- [REST API](https://en.wikipedia.org/wiki/Representational_state_transfer)
- [GraphQL](https://en.wikipedia.org/wiki/GraphQL)
- [gRPC](https://en.wikipedia.org/wiki/GRPC)
##### Architecture
- [Microservices vs Monolithic](https://www.mulesoft.com/resources/api/microservices-vs-monolithic#:~:text=Microservices%20architecture%20vs%20monolithic%20architecture&text=A%20monolithic%20application%20is%20built%20as%20a%20single%20unit.&text=To%20make%20any%20alterations%20to,formally%20with%20business%2Doriented%20APIs.)
- [MVVM](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93viewmodel) - Appwrite console architecture
##### Security
- [Appwrite Auth and ACL](https://github.com/appwrite/appwrite/blob/0.7.x/docs/specs/authentication.drawio.svg)
- [OAuth](https://en.wikipedia.org/wiki/OAuth)
- [Encryption](https://medium.com/searchencrypt/what-is-encryption-how-does-it-work-e8f20e340537#:~:text=Encryption%20is%20a%20process%20that,%2C%20or%20decrypt%2C%20the%20information.)
- [Hashing](https://searchsqlserver.techtarget.com/definition/hashing#:~:text=Hashing%20is%20the%20transformation%20of,it%20using%20the%20original%20value.)
## Architecture
Appwrite's current structure is a combination of both [Monolithic](https://en.wikipedia.org/wiki/Monolithic_application) and [Microservice](https://en.wikipedia.org/wiki/Microservices) architectures, but our final goal, as we grow, is to be using only microservices.

View file

@ -94,6 +94,7 @@ Getting started with Appwrite is as easy as creating a new project, choosing you
* [Getting Started for Web](https://appwrite.io/docs/getting-started-for-web)
* [Getting Started for Flutter](https://appwrite.io/docs/getting-started-for-flutter)
* [Getting Started for Server](https://appwrite.io/docs/getting-started-for-server)
* [Getting Started for CLI](https://appwrite.io/docs/command-line)
* Getting Started for Android (Coming soon...)
* Getting Started for iOS (Coming soon...)

View file

@ -15,12 +15,13 @@ return [
[
'key' => 'web',
'name' => 'Web',
'version' => '1.2.0',
'version' => '2.0.0',
'url' => 'https://github.com/appwrite/sdk-for-web',
'package' => 'https://www.npmjs.com/package/appwrite',
'enabled' => true,
'beta' => false,
'dev' => false,
'hidden' => false,
'family' => APP_PLATFORM_CLIENT,
'prism' => 'javascript',
'source' => \realpath(__DIR__ . '/../sdks/client-web'),
@ -31,12 +32,13 @@ return [
[
'key' => 'flutter',
'name' => 'Flutter',
'version' => '0.3.0-dev.2',
'version' => '0.3.0',
'url' => 'https://github.com/appwrite/sdk-for-flutter',
'package' => 'https://pub.dev/packages/appwrite',
'enabled' => true,
'beta' => true,
'dev' => false,
'hidden' => false,
'family' => APP_PLATFORM_CLIENT,
'prism' => 'dart',
'source' => \realpath(__DIR__ . '/../sdks/client-flutter'),
@ -52,6 +54,7 @@ return [
'enabled' => false,
'beta' => false,
'dev' => false,
'hidden' => false,
'family' => APP_PLATFORM_CLIENT,
'prism' => 'swift',
'source' => false,
@ -67,6 +70,7 @@ return [
'enabled' => false,
'beta' => false,
'dev' => false,
'hidden' => false,
'family' => APP_PLATFORM_CLIENT,
'prism' => '',
'source' => false,
@ -82,6 +86,7 @@ return [
'enabled' => false,
'beta' => false,
'dev' => false,
'hidden' => false,
'family' => APP_PLATFORM_CLIENT,
'prism' => 'kotlin',
'source' => false,
@ -94,9 +99,9 @@ return [
// 'name' => 'Java',
// 'url' => '',
// 'enabled' => false,
// 'dev' => false,
// 'beta' => false,
// 'dev' => false,
// 'hidden' => false,
// 'family' => APP_PLATFORM_CLIENT,
// 'prism' => 'java',
// 'source' => false,
@ -122,6 +127,7 @@ return [
'enabled' => true,
'beta' => false,
'dev' => false,
'hidden' => true,
'family' => APP_PLATFORM_CONSOLE,
'prism' => 'console',
'source' => \realpath(__DIR__ . '/../sdks/console-web'),
@ -139,31 +145,16 @@ return [
'enabled' => true,
'beta' => false,
'languages' => [ // TODO change key to 'sdks'
[
'key' => 'cli',
'name' => 'Command Line',
'version' => '0.1.0',
'url' => 'https://github.com/appwrite/sdk-for-cli',
'package' => 'https://github.com/appwrite/sdk-for-cli',
'enabled' => true,
'beta' => true,
'dev' => true,
'family' => APP_PLATFORM_SERVER,
'prism' => 'bash',
'source' => \realpath(__DIR__ . '/../sdks/server-cli'),
'gitUrl' => 'git@github.com:appwrite/sdk-for-cli.git',
'gitRepoName' => 'sdk-for-cli',
'gitUserName' => 'appwrite',
],
[
'key' => 'nodejs',
'name' => 'Node.js',
'version' => '1.1.0',
'version' => '2.0.0',
'url' => 'https://github.com/appwrite/sdk-for-node',
'package' => 'https://www.npmjs.com/package/node-appwrite',
'enabled' => true,
'beta' => false,
'dev' => false,
'hidden' => false,
'family' => APP_PLATFORM_SERVER,
'prism' => 'javascript',
'source' => \realpath(__DIR__ . '/../sdks/server-nodejs'),
@ -174,12 +165,13 @@ return [
[
'key' => 'deno',
'name' => 'Deno',
'version' => '0.0.2',
'version' => '0.1.0',
'url' => 'https://github.com/appwrite/sdk-for-deno',
'package' => 'https://deno.land/x/appwrite',
'enabled' => true,
'beta' => true,
'dev' => false,
'hidden' => false,
'family' => APP_PLATFORM_SERVER,
'prism' => 'typescript',
'source' => \realpath(__DIR__ . '/../sdks/server-deno'),
@ -190,12 +182,13 @@ return [
[
'key' => 'php',
'name' => 'PHP',
'version' => '1.1.0',
'version' => '2.0.0',
'url' => 'https://github.com/appwrite/sdk-for-php',
'package' => 'https://packagist.org/packages/appwrite/appwrite',
'enabled' => true,
'beta' => false,
'dev' => false,
'hidden' => false,
'family' => APP_PLATFORM_SERVER,
'prism' => 'php',
'source' => \realpath(__DIR__ . '/../sdks/server-php'),
@ -206,12 +199,13 @@ return [
[
'key' => 'python',
'name' => 'Python',
'version' => '0.0.6',
'version' => '0.1.0',
'url' => 'https://github.com/appwrite/sdk-for-python',
'package' => 'https://pypi.org/project/appwrite/',
'enabled' => true,
'beta' => true,
'beta' => false,
'dev' => false,
'hidden' => false,
'family' => APP_PLATFORM_SERVER,
'prism' => 'python',
'source' => \realpath(__DIR__ . '/../sdks/server-python'),
@ -222,12 +216,13 @@ return [
[
'key' => 'ruby',
'name' => 'Ruby',
'version' => '1.0.11',
'version' => '2.0.0',
'url' => 'https://github.com/appwrite/sdk-for-ruby',
'package' => 'https://rubygems.org/gems/appwrite',
'enabled' => true,
'beta' => true,
'beta' => false,
'dev' => false,
'hidden' => false,
'family' => APP_PLATFORM_SERVER,
'prism' => 'ruby',
'source' => \realpath(__DIR__ . '/../sdks/server-ruby'),
@ -244,6 +239,7 @@ return [
'enabled' => false,
'beta' => true,
'dev' => false,
'hidden' => false,
'family' => APP_PLATFORM_SERVER,
'prism' => 'go',
'source' => \realpath(__DIR__ . '/../sdks/server-go'),
@ -260,6 +256,7 @@ return [
'enabled' => false,
'beta' => true,
'dev' => false,
'hidden' => false,
'family' => APP_PLATFORM_SERVER,
'prism' => 'java',
'source' => \realpath(__DIR__ . '/../sdks/server-java'),
@ -270,12 +267,13 @@ return [
[
'key' => 'dotnet',
'name' => '.NET',
'version' => '0.0.3',
'version' => '0.1.0',
'url' => 'https://github.com/appwrite/sdk-for-dotnet',
'package' => 'https://www.nuget.org/packages/Appwrite',
'enabled' => true,
'beta' => true,
'dev' => true,
'hidden' => false,
'family' => APP_PLATFORM_SERVER,
'prism' => 'csharp',
'source' => \realpath(__DIR__ . '/../sdks/server-dotnet'),
@ -286,12 +284,13 @@ return [
[
'key' => 'dart',
'name' => 'Dart',
'version' => '0.1.0',
'version' => '0.2.0',
'url' => 'https://github.com/appwrite/sdk-for-dart',
'package' => 'https://pub.dev/packages/dart_appwrite',
'enabled' => true,
'beta' => true,
'dev' => true,
'hidden' => false,
'family' => APP_PLATFORM_SERVER,
'prism' => 'dart',
'source' => \realpath(__DIR__ . '/../sdks/server-dart'),
@ -299,6 +298,23 @@ return [
'gitRepoName' => 'sdk-for-dart',
'gitUserName' => 'appwrite',
],
[
'key' => 'cli',
'name' => 'Command Line',
'version' => '0.5.0',
'url' => 'https://github.com/appwrite/sdk-for-cli',
'package' => 'https://github.com/appwrite/sdk-for-cli',
'enabled' => true,
'beta' => true,
'dev' => false,
'hidden' => true,
'family' => APP_PLATFORM_SERVER,
'prism' => 'bash',
'source' => \realpath(__DIR__ . '/../sdks/server-cli'),
'gitUrl' => 'git@github.com:appwrite/sdk-for-cli.git',
'gitRepoName' => 'sdk-for-cli',
'gitUserName' => 'appwrite',
],
],
],
];

View file

@ -4,6 +4,7 @@ return [
'/' => [
'key' => 'homepage',
'name' => 'Homepage',
'subtitle' => '',
'controller' => 'web/home.php',
'sdk' => false,
'docs' => false,
@ -20,6 +21,7 @@ return [
'v1/account' => [
'key' => 'account',
'name' => 'Account',
'subtitle' => 'The Account service allows you to authenticate and manage a user account.',
'description' => '/docs/services/account.md',
'controller' => 'api/account.php',
'sdk' => true,
@ -29,6 +31,7 @@ return [
'v1/avatars' => [
'key' => 'avatars',
'name' => 'Avatars',
'subtitle'=> 'The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars.',
'description' => '/docs/services/avatars.md',
'controller' => 'api/avatars.php',
'sdk' => true,
@ -38,6 +41,7 @@ return [
'v1/database' => [
'key' => 'database',
'name' => 'Database',
'subtitle' => 'The Database service allows you to create structured collections of documents, query and filter lists of documents',
'description' => '/docs/services/database.md',
'controller' => 'api/database.php',
'sdk' => true,
@ -47,6 +51,7 @@ return [
'v1/locale' => [
'key' => 'locale',
'name' => 'Locale',
'subtitle' => 'The Locale service allows you to customize your app based on your users\' location.',
'description' => '/docs/services/locale.md',
'controller' => 'api/locale.php',
'sdk' => true,
@ -56,6 +61,7 @@ return [
'v1/health' => [
'key' => 'health',
'name' => 'Health',
'subtitle' => 'The Health service allows you to both validate and monitor your Appwrite server\'s health.',
'description' => '/docs/services/health.md',
'controller' => 'api/health.php',
'sdk' => true,
@ -65,6 +71,7 @@ return [
'v1/projects' => [
'key' => 'projects',
'name' => 'Projects',
'subtitle' => 'The Project service allows you to manage all the projects in your Appwrite server.',
'controller' => 'api/projects.php',
'sdk' => true,
'docs' => true,
@ -73,6 +80,7 @@ return [
'v1/storage' => [
'key' => 'storage',
'name' => 'Storage',
'subtitle' => 'The Storage service allows you to manage your project files.',
'description' => '/docs/services/storage.md',
'controller' => 'api/storage.php',
'sdk' => true,
@ -82,6 +90,7 @@ return [
'v1/teams' => [
'key' => 'teams',
'name' => 'Teams',
'subtitle' => 'The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources',
'description' => '/docs/services/teams.md',
'controller' => 'api/teams.php',
'sdk' => true,
@ -91,6 +100,7 @@ return [
'v1/users' => [
'key' => 'users',
'name' => 'Users',
'subtitle' => 'The Users service allows you to manage your project users.',
'description' => '/docs/services/users.md',
'controller' => 'api/users.php',
'sdk' => true,
@ -100,6 +110,7 @@ return [
'v1/functions' => [
'key' => 'functions',
'name' => 'Functions',
'subtitle' => 'The Functions Service allows you view, create and manage your Cloud Functions.',
'description' => '/docs/services/functions.md',
'controller' => 'api/functions.php',
'sdk' => true,
@ -109,6 +120,7 @@ return [
'v1/mock' => [
'key' => 'mock',
'name' => 'Mock',
'subtitle' => '',
'description' => '',
'controller' => 'mock.php',
'sdk' => false,
@ -118,6 +130,7 @@ return [
'v1/graphql' => [
'key' => 'graphql',
'name' => 'GraphQL',
'subtitle' => 'Appwrite\'s GraphQL Endpoint',
'description' => 'GraphQL Endpoint',
'controller' => 'api/graphql.php',
'sdk' => false,

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -63,14 +63,14 @@ return [
'required' => false,
'question' => '',
],
[
'name' => '_APP_CONSOLE_WHITELIST_DOMAINS',
'description' => 'This option allows you to limit creation of users to Appwrite console for users sharing the same email domains. This option is very useful for team working with company emails domain.\n\nTo enable this option, pass a list of allowed email domains separated by a comma.',
'introduction' => '',
'default' => '',
'required' => false,
'question' => '',
],
// [
// 'name' => '_APP_CONSOLE_WHITELIST_DOMAINS',
// 'description' => 'This option allows you to limit creation of users to Appwrite console for users sharing the same email domains. This option is very useful for team working with company emails domain.\n\nTo enable this option, pass a list of allowed email domains separated by a comma.',
// 'introduction' => '',
// 'default' => '',
// 'required' => false,
// 'question' => '',
// ],
[
'name' => '_APP_CONSOLE_WHITELIST_IPS',
'description' => 'This last option allows you to limit creation of users in Appwrite console for users sharing the same set of IP addresses. This option is very useful for team working with a VPN service or a company IP.\n\nTo enable/activate this option, pass a list of allowed IP addresses separated by a comma.',
@ -339,15 +339,15 @@ return [
],
[
'name' => '_APP_FUNCTIONS_CPUS',
'description' => 'The maximum number of CPU core a single cloud function is allowed to use. Please note that setting a value higher than available cores will result in a function error, which might result in an error. The default value is 1.',
'description' => 'The maximum number of CPU core a single cloud function is allowed to use. Please note that setting a value higher than available cores will result in a function error, which might result in an error. The default value is empty. When it\'s empty, CPU limit will be disabled.',
'introduction' => '0.7.0',
'default' => '1',
'default' => '',
'required' => false,
'question' => '',
],
[
'name' => '_APP_FUNCTIONS_MEMORY',
'description' => 'The maximum amount of memory a single cloud function is allowed to use in megabytes. The default value is 128.',
'description' => 'The maximum amount of memory a single cloud function is allowed to use in megabytes. The default value is empty. When it\'s empty, memory limit will be disabled.',
'introduction' => '0.7.0',
'default' => '256',
'required' => false,
@ -355,7 +355,7 @@ return [
],
[
'name' => '_APP_FUNCTIONS_MEMORY_SWAP',
'description' => 'The maximum amount of swap memory a single cloud function is allowed to use in megabytes. The default value is 128.',
'description' => 'The maximum amount of swap memory a single cloud function is allowed to use in megabytes. The default value is empty. When it\'s empty, swap memory limit will be disabled.',
'introduction' => '0.7.0',
'default' => '256',
'required' => false,

View file

@ -19,11 +19,11 @@ use Appwrite\Database\Document;
use Appwrite\Database\Exception\Duplicate;
use Appwrite\Database\Validator\UID;
use Appwrite\Database\Validator\Authorization;
use Appwrite\Detector\Detector;
use Appwrite\Template\Template;
use Appwrite\OpenSSL\OpenSSL;
use Appwrite\URL\URL as URLParser;
use Appwrite\Utopia\Response;
use DeviceDetector\DeviceDetector;
use Utopia\Validator\ArrayList;
$oauthDefaultSuccess = App::getEnv('_APP_HOME').'/auth/oauth2/success';
@ -184,59 +184,23 @@ App::post('/v1/account/sessions')
throw new Exception('Invalid credentials. User is blocked', 401); // User is in status blocked
}
$dd = new DeviceDetector($request->getUserAgent('UNKNOWN'));
$dd->parse();
$os = $dd->getOs();
$osCode = (isset($os['short_name'])) ? $os['short_name'] : '';
$osName = (isset($os['name'])) ? $os['name'] : '';
$osVersion = (isset($os['version'])) ? $os['version'] : '';
$client = $dd->getClient();
$clientType = (isset($client['type'])) ? $client['type'] : '';
$clientCode = (isset($client['short_name'])) ? $client['short_name'] : '';
$clientName = (isset($client['name'])) ? $client['name'] : '';
$clientVersion = (isset($client['version'])) ? $client['version'] : '';
$clientEngine = (isset($client['engine'])) ? $client['engine'] : '';
$clientEngineVersion = (isset($client['engine_version'])) ? $client['engine_version'] : '';
$detector = new Detector($request->getUserAgent('UNKNOWN'));
$record = $geodb->get($request->getIP());
$expiry = \time() + Auth::TOKEN_EXPIRATION_LOGIN_LONG;
$secret = Auth::tokenGenerator();
$session = new Document([
'$collection' => Database::SYSTEM_COLLECTION_TOKENS,
'$permissions' => ['read' => ['user:'.$profile->getId()], 'write' => ['user:'.$profile->getId()]],
'userId' => $profile->getId(),
'type' => Auth::TOKEN_TYPE_LOGIN,
'secret' => Auth::hash($secret), // One way hash encryption to protect DB leak
'expire' => $expiry,
'userAgent' => $request->getUserAgent('UNKNOWN'),
'ip' => $request->getIP(),
'osCode' => $osCode,
'osName' => $osName,
'osVersion' => $osVersion,
'clientType' => $clientType,
'clientCode' => $clientCode,
'clientName' => $clientName,
'clientVersion' => $clientVersion,
'clientEngine' => $clientEngine,
'clientEngineVersion' => $clientEngineVersion,
'deviceName' => $dd->getDeviceName(),
'deviceBrand' => $dd->getBrandName(),
'deviceModel' => $dd->getModel(),
]);
$record = $geodb->get($request->getIP());
if($record) {
$session
->setAttribute('countryCode', \strtolower($record['country']['iso_code']))
;
} else {
$session
->setAttribute('countryCode', '--')
;
}
$session = new Document(array_merge(
[
'$collection' => Database::SYSTEM_COLLECTION_TOKENS,
'$permissions' => ['read' => ['user:'.$profile->getId()], 'write' => ['user:'.$profile->getId()]],
'userId' => $profile->getId(),
'type' => Auth::TOKEN_TYPE_LOGIN,
'secret' => Auth::hash($secret), // One way hash encryption to protect DB leak
'expire' => $expiry,
'userAgent' => $request->getUserAgent('UNKNOWN'),
'ip' => $request->getIP(),
'countryCode' => ($record) ? \strtolower($record['country']['iso_code']) : '--',
], $detector->getOS(), $detector->getClient(), $detector->getDevice()
));
Authorization::setRole('user:'.$profile->getId());
@ -535,26 +499,11 @@ App::get('/v1/account/sessions/oauth2/:provider/redirect')
// Create session token, verify user account and update OAuth2 ID and Access Token
$dd = new DeviceDetector($request->getUserAgent('UNKNOWN'));
$dd->parse();
$os = $dd->getOs();
$osCode = (isset($os['short_name'])) ? $os['short_name'] : '';
$osName = (isset($os['name'])) ? $os['name'] : '';
$osVersion = (isset($os['version'])) ? $os['version'] : '';
$client = $dd->getClient();
$clientType = (isset($client['type'])) ? $client['type'] : '';
$clientCode = (isset($client['short_name'])) ? $client['short_name'] : '';
$clientName = (isset($client['name'])) ? $client['name'] : '';
$clientVersion = (isset($client['version'])) ? $client['version'] : '';
$clientEngine = (isset($client['engine'])) ? $client['engine'] : '';
$clientEngineVersion = (isset($client['engine_version'])) ? $client['engine_version'] : '';
$detector = new Detector($request->getUserAgent('UNKNOWN'));
$record = $geodb->get($request->getIP());
$secret = Auth::tokenGenerator();
$expiry = \time() + Auth::TOKEN_EXPIRATION_LOGIN_LONG;
$session = new Document([
$session = new Document(array_merge([
'$collection' => Database::SYSTEM_COLLECTION_TOKENS,
'$permissions' => ['read' => ['user:'.$user['$id']], 'write' => ['user:'.$user['$id']]],
'userId' => $user->getId(),
@ -563,31 +512,8 @@ App::get('/v1/account/sessions/oauth2/:provider/redirect')
'expire' => $expiry,
'userAgent' => $request->getUserAgent('UNKNOWN'),
'ip' => $request->getIP(),
'osCode' => $osCode,
'osName' => $osName,
'osVersion' => $osVersion,
'clientType' => $clientType,
'clientCode' => $clientCode,
'clientName' => $clientName,
'clientVersion' => $clientVersion,
'clientEngine' => $clientEngine,
'clientEngineVersion' => $clientEngineVersion,
'deviceName' => $dd->getDeviceName(),
'deviceBrand' => $dd->getBrandName(),
'deviceModel' => $dd->getModel(),
]);
$record = $geodb->get($request->getIP());
if($record) {
$session
->setAttribute('countryCode', \strtolower($record['country']['iso_code']))
;
} else {
$session
->setAttribute('countryCode', '--')
;
}
'countryCode' => ($record) ? \strtolower($record['country']['iso_code']) : '--',
], $detector->getOS(), $detector->getClient(), $detector->getDevice()));
$user
->setAttribute('oauth2'.\ucfirst($provider), $oauth2ID)
@ -820,43 +746,13 @@ App::get('/v1/account/logs')
foreach ($logs as $i => &$log) {
$log['userAgent'] = (!empty($log['userAgent'])) ? $log['userAgent'] : 'UNKNOWN';
$dd = new DeviceDetector($log['userAgent']);
$detector = new Detector($log['userAgent']);
$dd->skipBotDetection(); // OPTIONAL: If called, bot detection will completely be skipped (bots will be detected as regular devices then)
$dd->parse();
$os = $dd->getOs();
$osCode = (isset($os['short_name'])) ? $os['short_name'] : '';
$osName = (isset($os['name'])) ? $os['name'] : '';
$osVersion = (isset($os['version'])) ? $os['version'] : '';
$client = $dd->getClient();
$clientType = (isset($client['type'])) ? $client['type'] : '';
$clientCode = (isset($client['short_name'])) ? $client['short_name'] : '';
$clientName = (isset($client['name'])) ? $client['name'] : '';
$clientVersion = (isset($client['version'])) ? $client['version'] : '';
$clientEngine = (isset($client['engine'])) ? $client['engine'] : '';
$clientEngineVersion = (isset($client['engine_version'])) ? $client['engine_version'] : '';
$output[$i] = new Document([
$output[$i] = new Document(array_merge([
'event' => $log['event'],
'ip' => $log['ip'],
'time' => \strtotime($log['time']),
'osCode' => $osCode,
'osName' => $osName,
'osVersion' => $osVersion,
'clientType' => $clientType,
'clientCode' => $clientCode,
'clientName' => $clientName,
'clientVersion' => $clientVersion,
'clientEngine' => $clientEngine,
'clientEngineVersion' => $clientEngineVersion,
'deviceName' => $dd->getDeviceName(),
'deviceBrand' => $dd->getBrandName(),
'deviceModel' => $dd->getModel(),
]);
], $detector->getOS(), $detector->getClient(), $detector->getDevice()));
$record = $geodb->get($log['ip']);

View file

@ -477,15 +477,22 @@ App::delete('/v1/projects/:projectId')
;
foreach (['keys', 'webhooks', 'tasks', 'platforms', 'domains'] as $key) { // Delete all children (keys, webhooks, tasks [stop tasks?], platforms)
$list = $project->getAttribute('webhooks', []);
foreach ($list as $document) { /* @var $document Document */
if (!$consoleDB->deleteDocument($projectId)) {
$list = $project->getAttribute($key, []);
foreach ($list as $document) {
/** @var Document $document */
if ($consoleDB->deleteDocument($document->getId())) {
if ($document->getCollection() == Database::SYSTEM_COLLECTION_DOMAINS) {
$deletes
->setParam('type', DELETE_TYPE_CERTIFICATES)
->setParam('document', $document)
;
}
} else {
throw new Exception('Failed to remove project document ('.$key.')] from DB', 500);
}
}
}
if (!$consoleDB->deleteDocument($project->getAttribute('teamId', null))) {
throw new Exception('Failed to remove project team from DB', 500);
}
@ -1566,7 +1573,8 @@ App::delete('/v1/projects/:projectId/domains/:domainId')
->param('domainId', null, new UID(), 'Domain unique ID.')
->inject('response')
->inject('consoleDB')
->action(function ($projectId, $domainId, $response, $consoleDB) {
->inject('deletes')
->action(function ($projectId, $domainId, $response, $consoleDB, $deletes) {
/** @var Appwrite\Utopia\Response $response */
/** @var Appwrite\Database\Database $consoleDB */
@ -1582,7 +1590,12 @@ App::delete('/v1/projects/:projectId/domains/:domainId')
throw new Exception('Domain not found', 404);
}
if (!$consoleDB->deleteDocument($domain->getId())) {
if ($consoleDB->deleteDocument($domain->getId())) {
$deletes
->setParam('type', DELETE_TYPE_CERTIFICATES)
->setParam('document', $domain)
;
} else {
throw new Exception('Failed to remove domains from DB', 500);
}

View file

@ -16,9 +16,9 @@ use Appwrite\Database\Validator\UID;
use Appwrite\Database\Validator\Authorization;
use Appwrite\Database\Exception\Duplicate;
use Appwrite\Database\Validator\Key;
use Appwrite\Detector\Detector;
use Appwrite\Template\Template;
use Appwrite\Utopia\Response;
use DeviceDetector\DeviceDetector;
App::post('/v1/teams')
->desc('Create Team')
@ -406,11 +406,12 @@ App::post('/v1/teams/:teamId/memberships')
$body = new Template(__DIR__.'/../../config/locale/templates/email-base.tpl');
$content = new Template(__DIR__.'/../../config/locale/translations/templates/'.$locale->getText('account.emails.invitation.body'));
$cta = new Template(__DIR__.'/../../config/locale/templates/email-cta.tpl');
$title = \sprintf($locale->getText('account.emails.invitation.title'), $team->getAttribute('name', '[TEAM-NAME]'), $project->getAttribute('name', ['[APP-NAME]']));
$body
->setParam('{{content}}', $content->render())
->setParam('{{cta}}', $cta->render())
->setParam('{{title}}', $locale->getText('account.emails.invitation.title'))
->setParam('{{title}}', $title)
->setParam('{{direction}}', $locale->getText('settings.direction'))
->setParam('{{project}}', $project->getAttribute('name', ['[APP-NAME]']))
->setParam('{{team}}', $team->getAttribute('name', '[TEAM-NAME]'))
@ -430,9 +431,9 @@ App::post('/v1/teams/:teamId/memberships')
->setParam('from', ($project->getId() === 'console') ? '' : \sprintf($locale->getText('account.emails.team'), $project->getAttribute('name')))
->setParam('recipient', $email)
->setParam('name', $name)
->setParam('subject', \sprintf($locale->getText('account.emails.invitation.title'), $team->getAttribute('name', '[TEAM-NAME]'), $project->getAttribute('name', ['[APP-NAME]'])))
->setParam('subject', $title)
->setParam('body', $body->render())
->trigger();
->trigger()
;
}
@ -589,27 +590,11 @@ App::patch('/v1/teams/:teamId/memberships/:inviteId/status')
// Log user in
$dd = new DeviceDetector($request->getUserAgent('UNKNOWN'));
$dd->parse();
$os = $dd->getOs();
$osCode = (isset($os['short_name'])) ? $os['short_name'] : '';
$osName = (isset($os['name'])) ? $os['name'] : '';
$osVersion = (isset($os['version'])) ? $os['version'] : '';
$client = $dd->getClient();
$clientType = (isset($client['type'])) ? $client['type'] : '';
$clientCode = (isset($client['short_name'])) ? $client['short_name'] : '';
$clientName = (isset($client['name'])) ? $client['name'] : '';
$clientVersion = (isset($client['version'])) ? $client['version'] : '';
$clientEngine = (isset($client['engine'])) ? $client['engine'] : '';
$clientEngineVersion = (isset($client['engine_version'])) ? $client['engine_version'] : '';
$detector = new Detector($request->getUserAgent('UNKNOWN'));
$record = $geodb->get($request->getIP());
$expiry = \time() + Auth::TOKEN_EXPIRATION_LOGIN_LONG;
$secret = Auth::tokenGenerator();
$session = new Document([
$session = new Document(array_merge([
'$collection' => Database::SYSTEM_COLLECTION_TOKENS,
'$permissions' => ['read' => ['user:'.$user->getId()], 'write' => ['user:'.$user->getId()]],
'userId' => $user->getId(),
@ -618,32 +603,8 @@ App::patch('/v1/teams/:teamId/memberships/:inviteId/status')
'expire' => $expiry,
'userAgent' => $request->getUserAgent('UNKNOWN'),
'ip' => $request->getIP(),
'osCode' => $osCode,
'osName' => $osName,
'osVersion' => $osVersion,
'clientType' => $clientType,
'clientCode' => $clientCode,
'clientName' => $clientName,
'clientVersion' => $clientVersion,
'clientEngine' => $clientEngine,
'clientEngineVersion' => $clientEngineVersion,
'deviceName' => $dd->getDeviceName(),
'deviceBrand' => $dd->getBrandName(),
'deviceModel' => $dd->getModel(),
]);
$record = $geodb->get($request->getIP());
if($record) {
$session
->setAttribute('countryCode', \strtolower($record['country']['iso_code']))
;
} else {
$session
->setAttribute('countryCode', '--')
;
}
'countryCode' => ($record) ? \strtolower($record['country']['iso_code']) : '--',
], $detector->getOS(), $detector->getClient(), $detector->getDevice()));
$user->setAttribute('tokens', $session, Document::SET_TYPE_APPEND);

View file

@ -93,7 +93,7 @@ App::init(function ($utopia, $request, $response, $console, $project, $user, $lo
Response::setFilter(new V06());
break;
default:
throw new Exception('No filter available for response format : '.$responseFormat, 400);
Response::setFilter(null);
}
} else {
Response::setFilter(null);

View file

@ -328,7 +328,7 @@ App::get('/specs/:format')
$services[] = [
'name' => $service['key'] ?? '',
'description' => (!empty($service['description'])) ? file_get_contents(realpath(__DIR__.'/../../..'.$service['description'])) : '',
'description' => $service['subtitle'] ?? '',
];
}

Binary file not shown.

View file

@ -39,7 +39,7 @@ const APP_USERAGENT = APP_NAME.'-Server v%s. Please report abuse at %s';
const APP_MODE_DEFAULT = 'default';
const APP_MODE_ADMIN = 'admin';
const APP_PAGING_LIMIT = 12;
const APP_CACHE_BUSTER = 142;
const APP_CACHE_BUSTER = 144;
const APP_VERSION_STABLE = '0.7.0';
const APP_STORAGE_UPLOADS = '/storage/uploads';
const APP_STORAGE_FUNCTIONS = '/storage/functions';
@ -60,6 +60,7 @@ const DELETE_TYPE_DOCUMENT = 'document';
const DELETE_TYPE_EXECUTIONS = 'executions';
const DELETE_TYPE_AUDIT = 'audit';
const DELETE_TYPE_ABUSE = 'abuse';
const DELETE_TYPE_CERTIFICATES = 'certificates';
$register = new Registry();
@ -208,7 +209,7 @@ $register->set('smtp', function () {
return $mail;
});
$register->set('geodb', function () {
return new Reader(__DIR__.'/db/DBIP/dbip-country-lite-2020-01.mmdb');
return new Reader(__DIR__.'/db/DBIP/dbip-country-lite-2021-02.mmdb');
});
/*

View file

@ -4,6 +4,7 @@ use Utopia\Config\Config;
use Utopia\CLI\Console;
use Appwrite\Spec\Swagger2;
use Appwrite\SDK\SDK;
use Appwrite\SDK\Language\CLI;
use Appwrite\SDK\Language\PHP;
use Appwrite\SDK\Language\Web;
use Appwrite\SDK\Language\Node;
@ -91,6 +92,11 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
$config->setNPMPackage('appwrite');
$config->setBowerPackage('appwrite');
break;
case 'cli':
$config = new CLI();
$config->setComposerVendor('appwrite');
$config->setComposerPackage('cli');
break;
case 'php':
$config = new PHP();
$config->setComposerVendor('appwrite');

View file

@ -147,41 +147,7 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled',true);
</div>
<div class="pull-start">
<div data-ui-modal class="modal close box sticky-footer" data-button-text="Deploy Tag">
<button type="button" class="close pull-end" data-ui-modal-close=""><i class="icon-cancel"></i></button>
<h1>Deploy a New Tag</h1>
<form
data-analytics
data-analytics-activity
data-analytics-event="submit"
data-analytics-category="console"
data-analytics-label="Create Function Tag"
data-service="functions.createTag"
data-scope="sdk"
data-event="submit"
data-success="alert,trigger,reset"
data-success-param-alert-text="Created function tag successfully"
data-success-param-trigger-events="functions.createTag"
data-failure="alert"
data-failure-param-alert-text="Failed to create function tag"
data-failure-param-alert-classname="error">
<input type="hidden" name="functionId" data-ls-bind="{{router.params.id}}" />
<label for="tag-command">Command</label>
<input type="text" id="tag-command" name="command" required autocomplete="off" class="margin-bottom" placeholder="node main.js" />
<label for="tag-code">Gzipped Code (tar.gz file)</label>
<input type="file" name="code" id="tag-code" size="1" required accept="application/x-gzip">
<div class="text-fade text-size-xs margin-top-negative-small margin-bottom-large">(Max file size allowed: <?php echo $fileLimitHuman; ?>)</div>
<footer>
<button type="submit">Create</button> &nbsp; <button data-ui-modal-close="" type="button" class="reverse">Cancel</button>
</footer>
</form>
</div>
<button data-ls-ui-trigger="deploy-tag">Deploy Tag</button>
</div>
<div class="pull-end paging">
@ -607,4 +573,71 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled',true);
</li>
</ul>
</div>
</div>
</div>
<div data-ui-modal class="modal close box sticky-footer" data-button-hide="on" data-open-event="deploy-tag">
<button type="button" class="close pull-end" data-ui-modal-close=""><i class="icon-cancel"></i></button>
<h1 class="margin-bottom-xl">Deploy a New Tag</h1>
<ul class="phases padding margin-top-negative-small" data-ui-phases>
<li>
<h2 style="display: none">CLI</h2>
<p><b>Unix</b></p>
<div class="margin-bottom">
<textarea type="hidden" data-ls-bind="appwrite functions createTag \
--functionId={{project-function.$id}} \
--command='mycommand' \
--code='/myrepo/myfunction'" data-forms-code="bash" data-lang="bash" data-lang-label="Bash"></textarea>
</div>
<p><b>PowerShell</b></p>
<div class="margin-bottom">
<textarea type="hidden" data-ls-bind="appwrite functions createTag ,
--functionId={{project-function.$id}} ,
--command='mycommand' ,
--code='/myrepo/myfunction'" data-forms-code="powershell" data-lang="powershell" data-lang-label="PowerShell"></textarea>
</div>
<p>Learn more about <a href="" target="_blank">creating tags</a>, installing and using the <a href="" target="_blank">Appwrite CLI</a>.</p>
</li>
<li>
<h2 style="display: none">Manual</h2>
<form class="margin-top-negative"
data-analytics
data-analytics-activity
data-analytics-event="submit"
data-analytics-category="console"
data-analytics-label="Create Function Tag"
data-service="functions.createTag"
data-scope="sdk"
data-event="submit"
data-success="alert,trigger,reset"
data-success-param-alert-text="Created function tag successfully"
data-success-param-trigger-events="functions.createTag"
data-failure="alert"
data-failure-param-alert-text="Failed to create function tag"
data-failure-param-alert-classname="error">
<input type="hidden" name="functionId" data-ls-bind="{{router.params.id}}" />
<label for="tag-command">Command</label>
<input type="text" id="tag-command" name="command" required autocomplete="off" class="margin-bottom" placeholder="node main.js" />
<label for="tag-code">Gzipped Code (tar.gz file)</label>
<input type="file" name="code" id="tag-code" size="1" required accept="application/x-gzip,.gz">
<div class="text-fade text-size-xs margin-top-negative-small margin-bottom-large">(Max file size allowed: <?php echo $fileLimitHuman; ?>)</div>
<footer>
<button type="submit">Create</button> &nbsp; <button data-ui-modal-close="" type="button" class="reverse">Cancel</button>
</footer>
</form>
</li>
</ul>
</div>

View file

@ -27,52 +27,54 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled',true);
<div class="zone xxl margin-top-negative-xxxl">
<div class="clear margin-bottom-small margin-top-negative">
<div class="pull-end">
<?php if (!$graph && $usageStatsEnabled): ?>
<div class="pull-end">
<form class="margin-start-small inline" data-ls-if="{{usage.range}} !== '24h'"
data-analytics
data-analytics-event="click"
data-analytics-category="console"
data-analytics-label="Usage 24h"
data-service="projects.getUsage"
data-event="submit"
data-name="usage"
data-param-project-id="{{router.params.project}}"
data-param-range="24h">
<button class="tick">24h</button>
</form>
<form class="margin-start-small inline" data-ls-if="{{usage.range}} !== '24h'"
data-analytics
data-analytics-event="click"
data-analytics-category="console"
data-analytics-label="Usage 24h"
data-service="projects.getUsage"
data-event="submit"
data-name="usage"
data-param-project-id="{{router.params.project}}"
data-param-range="24h">
<button class="tick">24h</button>
</form>
<button class="tick margin-start-small" data-ls-if="{{usage.range}} === '24h'" disabled>24h</button>
<button class="tick margin-start-small" data-ls-if="{{usage.range}} === '24h'" disabled>24h</button>
<form class="margin-start-small inline" data-ls-if="{{usage.range}} !== '30d'"
data-analytics
data-analytics-event="click"
data-analytics-category="console"
data-analytics-label="Usage 30d"
data-service="projects.getUsage"
data-event="submit"
data-name="usage"
data-param-project-id="{{router.params.project}}">
<button class="tick">30d</button>
</form>
<form class="margin-start-small inline" data-ls-if="{{usage.range}} !== '30d'"
data-analytics
data-analytics-event="click"
data-analytics-category="console"
data-analytics-label="Usage 30d"
data-service="projects.getUsage"
data-event="submit"
data-name="usage"
data-param-project-id="{{router.params.project}}">
<button class="tick">30d</button>
</form>
<button class="tick margin-start-small" data-ls-if="{{usage.range}} === '30d'" disabled>30d</button>
<button class="tick margin-start-small" data-ls-if="{{usage.range}} === '30d'" disabled>30d</button>
<form class="margin-start-small inline" data-ls-if="{{usage.range}} !== '90d'"
data-analytics
data-analytics-event="click"
data-analytics-category="console"
data-analytics-label="Usage 90d"
data-service="projects.getUsage"
data-event="submit"
data-name="usage"
data-param-project-id="{{router.params.project}}"
data-param-range="90d">
<button class="tick">90d</button>
</form>
<form class="margin-start-small inline" data-ls-if="{{usage.range}} !== '90d'"
data-analytics
data-analytics-event="click"
data-analytics-category="console"
data-analytics-label="Usage 90d"
data-service="projects.getUsage"
data-event="submit"
data-name="usage"
data-param-project-id="{{router.params.project}}"
data-param-range="90d">
<button class="tick">90d</button>
</form>
<button class="tick margin-start-small" data-ls-if="{{usage.range}} === '90d'" disabled>90d</button>
</div>
<button class="tick margin-start-small" data-ls-if="{{usage.range}} === '90d'" disabled>90d</button>
</div>
<?php endif; ?>
</div>
<div
data-service="projects.getUsage"

View file

@ -80,6 +80,9 @@ services:
- _APP_INFLUXDB_HOST
- _APP_INFLUXDB_PORT
- _APP_STORAGE_LIMIT
- _APP_STORAGE_ANTIVIRUS
- _APP_STORAGE_ANTIVIRUS_HOST
- _APP_STORAGE_ANTIVIRUS_PORT
- _APP_FUNCTIONS_TIMEOUT
- _APP_FUNCTIONS_CONTAINERS
- _APP_FUNCTIONS_CPUS
@ -179,6 +182,7 @@ services:
volumes:
- appwrite-uploads:/storage/uploads:rw
- appwrite-cache:/storage/cache:rw
- appwrite-certificates:/storage/certificates:rw
environment:
- _APP_ENV
- _APP_REDIS_HOST
@ -207,6 +211,7 @@ services:
- _APP_SYSTEM_SECURITY_EMAIL_ADDRESS
- _APP_REDIS_HOST
- _APP_REDIS_PORT
- _APP_DOMAIN_TARGET
- _APP_DB_HOST
- _APP_DB_PORT
- _APP_DB_SCHEMA

View file

@ -38,7 +38,7 @@ class DeletesV1
switch (strval($type)) {
case DELETE_TYPE_DOCUMENT:
$document = $this->args['document'];
$document = new Document($document);
$document = new Document($document);
switch (strval($document->getCollection())) {
case Database::SYSTEM_COLLECTION_PROJECTS:
$this->deleteProject($document);
@ -69,6 +69,11 @@ class DeletesV1
case DELETE_TYPE_ABUSE:
$this->deleteAbuseLogs($this->args['timestamp']);
break;
case DELETE_TYPE_CERTIFICATES:
$document = new Document($this->args['document']);
$this->deleteCertificates($document);
break;
default:
Console::error('No delete operation for type: '.$type);
@ -305,6 +310,21 @@ class DeletesV1
Console::info("Deleted {$count} document by group in " . ($executionEnd - $executionStart) . " seconds");
}
protected function deleteCertificates(Document $document)
{
$domain = $document->getAttribute('domain');
$directory = APP_STORAGE_CERTIFICATES . '/' . $domain;
$checkTraversal = realpath($directory) === $directory;
if($domain && $checkTraversal && is_dir($directory)) {
array_map('unlink', glob($directory.'/*.*'));
rmdir($directory);
Console::info("Deleted certificate files for {$domain}");
} else {
Console::info("No certificate files found for {$domain}");
}
}
/**
* @return Database;
*/

View file

@ -397,13 +397,15 @@ class FunctionsV1
$executionStart = \microtime(true);
$executionTime = \time();
$cpus = App::getEnv('_APP_FUNCTIONS_CPUS', '');
$memory = App::getEnv('_APP_FUNCTIONS_MEMORY', '');
$swap = App::getEnv('_APP_FUNCTIONS_MEMORY_SWAP', '');
$exitCode = Console::execute("docker run ".
" -d".
" --entrypoint=\"\"".
" --cpus=".App::getEnv('_APP_FUNCTIONS_CPUS', '1').
" --memory=".App::getEnv('_APP_FUNCTIONS_MEMORY', '256')."m".
" --memory-swap=".App::getEnv('_APP_FUNCTIONS_MEMORY_SWAP', '256')."m".
(empty($cpus) ? "" : (" --cpus=".$cpus)).
(empty($memory) ? "" : (" --memory=".$memory."m")).
(empty($swap) ? "" : (" --memory-swap=".$swap."m")).
" --name={$container}".
" --label appwrite-type=function".
" --label appwrite-created={$executionTime}".

View file

@ -1,3 +1,3 @@
#!/bin/sh
/usr/src/code/vendor/bin/phpunit --configuration /usr/src/code/phpunit.xml $@
/usr/src/code/vendor/bin/phpunit --verbose --configuration /usr/src/code/phpunit.xml $@

View file

@ -59,7 +59,7 @@
"adhocore/jwt": "1.1.0"
},
"require-dev": {
"appwrite/sdk-generator": "0.4.5",
"appwrite/sdk-generator": "0.5.5",
"phpunit/phpunit": "9.4.2",
"swoole/ide-helper": "4.5.5",
"vimeo/psalm": "4.1.1"

240
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": "9392457b87e42defd544ca840fee0bab",
"content-hash": "5893b378d1dcda91aedf77059f4b0efb",
"packages": [
{
"name": "adhocore/jwt",
@ -349,6 +349,7 @@
"issues": "https://github.com/domnikl/statsd-php/issues",
"source": "https://github.com/domnikl/statsd-php/tree/master"
},
"abandoned": true,
"time": "2020-01-03T14:24:58+00:00"
},
{
@ -1804,21 +1805,21 @@
},
{
"name": "utopia-php/swoole",
"version": "0.2.0",
"version": "0.2.1",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/swoole.git",
"reference": "bc9dd3e113e9b8cbbf54468524637f39b2deb861"
"reference": "63168a82037f371516a199d75da101c8caa3edc1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/swoole/zipball/bc9dd3e113e9b8cbbf54468524637f39b2deb861",
"reference": "bc9dd3e113e9b8cbbf54468524637f39b2deb861",
"url": "https://api.github.com/repos/utopia-php/swoole/zipball/63168a82037f371516a199d75da101c8caa3edc1",
"reference": "63168a82037f371516a199d75da101c8caa3edc1",
"shasum": ""
},
"require": {
"ext-swoole": "*",
"php": ">=7.3",
"php": ">=7.4",
"utopia-php/framework": "0.*.*"
},
"require-dev": {
@ -1854,9 +1855,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/swoole/issues",
"source": "https://github.com/utopia-php/swoole/tree/0.2.0"
"source": "https://github.com/utopia-php/swoole/tree/0.2.1"
},
"time": "2020-10-29T12:42:38+00:00"
"time": "2021-02-10T06:20:43+00:00"
},
{
"name": "utopia-php/system",
@ -2085,11 +2086,11 @@
},
{
"name": "appwrite/sdk-generator",
"version": "0.4.5",
"version": "0.5.5",
"source": {
"type": "git",
"url": "https://github.com/appwrite/sdk-generator",
"reference": "9c04ed7ff34a723c3c226941b9f9a844738c595e"
"reference": "08d6dc72f83ec99cfc0f7a50cb7fc0be0c029ac1"
},
"require": {
"ext-curl": "*",
@ -2119,7 +2120,7 @@
}
],
"description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms",
"time": "2021-01-28T08:03:13+00:00"
"time": "2021-02-18T16:37:32+00:00"
},
{
"name": "composer/package-versions-deprecated",
@ -3244,12 +3245,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "0bf76e406e6b1d08d8be732db3ec8e6cbe2f8cc2"
"reference": "ad069801f3d0cdb7102e58afd5f9f32834ec7160"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/0bf76e406e6b1d08d8be732db3ec8e6cbe2f8cc2",
"reference": "0bf76e406e6b1d08d8be732db3ec8e6cbe2f8cc2",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ad069801f3d0cdb7102e58afd5f9f32834ec7160",
"reference": "ad069801f3d0cdb7102e58afd5f9f32834ec7160",
"shasum": ""
},
"require": {
@ -3313,7 +3314,7 @@
"type": "github"
}
],
"time": "2021-01-21T05:59:53+00:00"
"time": "2021-02-08T09:55:27+00:00"
},
{
"name": "phpunit/php-file-iterator",
@ -3321,12 +3322,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
"reference": "7643948b9b254d2c1406437070c53489ca858632"
"reference": "05fa32de35b15c94838d22482cc59d99860a706f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/7643948b9b254d2c1406437070c53489ca858632",
"reference": "7643948b9b254d2c1406437070c53489ca858632",
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/05fa32de35b15c94838d22482cc59d99860a706f",
"reference": "05fa32de35b15c94838d22482cc59d99860a706f",
"shasum": ""
},
"require": {
@ -3374,7 +3375,7 @@
"type": "github"
}
],
"time": "2021-01-31T06:06:23+00:00"
"time": "2021-02-14T06:52:34+00:00"
},
{
"name": "phpunit/php-invoker",
@ -3382,12 +3383,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-invoker.git",
"reference": "8ddb05c30eb42ee9342a711ff490436db0f42aad"
"reference": "7bba8d62fc6140730c268d5ff7fbf9c3a54996a8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/8ddb05c30eb42ee9342a711ff490436db0f42aad",
"reference": "8ddb05c30eb42ee9342a711ff490436db0f42aad",
"url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/7bba8d62fc6140730c268d5ff7fbf9c3a54996a8",
"reference": "7bba8d62fc6140730c268d5ff7fbf9c3a54996a8",
"shasum": ""
},
"require": {
@ -3438,7 +3439,7 @@
"type": "github"
}
],
"time": "2021-01-31T06:06:31+00:00"
"time": "2021-02-14T06:52:42+00:00"
},
{
"name": "phpunit/php-text-template",
@ -3446,12 +3447,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-text-template.git",
"reference": "eace5f89cab382a6908f404ca2ea757e644047ab"
"reference": "bca9f27936ccd6d7450f16f1ee3f125b755b7905"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/eace5f89cab382a6908f404ca2ea757e644047ab",
"reference": "eace5f89cab382a6908f404ca2ea757e644047ab",
"url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/bca9f27936ccd6d7450f16f1ee3f125b755b7905",
"reference": "bca9f27936ccd6d7450f16f1ee3f125b755b7905",
"shasum": ""
},
"require": {
@ -3498,7 +3499,7 @@
"type": "github"
}
],
"time": "2021-01-31T06:07:05+00:00"
"time": "2021-02-14T06:53:15+00:00"
},
{
"name": "phpunit/php-timer",
@ -3506,12 +3507,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-timer.git",
"reference": "c2c32bcece727700ce67b2c4fa5b5231c03d1232"
"reference": "e3125d0dc516e7f7ab23d54ddefbce67627fd608"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/c2c32bcece727700ce67b2c4fa5b5231c03d1232",
"reference": "c2c32bcece727700ce67b2c4fa5b5231c03d1232",
"url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/e3125d0dc516e7f7ab23d54ddefbce67627fd608",
"reference": "e3125d0dc516e7f7ab23d54ddefbce67627fd608",
"shasum": ""
},
"require": {
@ -3558,7 +3559,7 @@
"type": "github"
}
],
"time": "2021-01-31T06:06:40+00:00"
"time": "2021-02-14T06:52:50+00:00"
},
{
"name": "phpunit/phpunit",
@ -3723,12 +3724,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/cli-parser.git",
"reference": "852907f9ef27ea08ad4135614a9fbd2f70c91ed1"
"reference": "5a6fc83d266e0fcbf890d4475bfbb713dbb4d202"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/852907f9ef27ea08ad4135614a9fbd2f70c91ed1",
"reference": "852907f9ef27ea08ad4135614a9fbd2f70c91ed1",
"url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/5a6fc83d266e0fcbf890d4475bfbb713dbb4d202",
"reference": "5a6fc83d266e0fcbf890d4475bfbb713dbb4d202",
"shasum": ""
},
"require": {
@ -3772,7 +3773,7 @@
"type": "github"
}
],
"time": "2021-01-31T06:07:32+00:00"
"time": "2021-02-14T06:53:40+00:00"
},
{
"name": "sebastian/code-unit",
@ -3836,12 +3837,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
"reference": "bae9e6f9fc00aa95c1971a52f819b08494a394f0"
"reference": "96fc758350a824cf96f9e7847ecdf9bb82c87083"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/bae9e6f9fc00aa95c1971a52f819b08494a394f0",
"reference": "bae9e6f9fc00aa95c1971a52f819b08494a394f0",
"url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/96fc758350a824cf96f9e7847ecdf9bb82c87083",
"reference": "96fc758350a824cf96f9e7847ecdf9bb82c87083",
"shasum": ""
},
"require": {
@ -3884,7 +3885,7 @@
"type": "github"
}
],
"time": "2021-01-31T06:05:15+00:00"
"time": "2021-02-14T06:51:27+00:00"
},
{
"name": "sebastian/comparator",
@ -3892,12 +3893,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git",
"reference": "d529bf5bc5746f6c59a1defc17c3725b5374c750"
"reference": "3b943ec66244e5d0a5252708d1c9073ae6d3efc9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/d529bf5bc5746f6c59a1defc17c3725b5374c750",
"reference": "d529bf5bc5746f6c59a1defc17c3725b5374c750",
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/3b943ec66244e5d0a5252708d1c9073ae6d3efc9",
"reference": "3b943ec66244e5d0a5252708d1c9073ae6d3efc9",
"shasum": ""
},
"require": {
@ -3959,20 +3960,20 @@
"type": "github"
}
],
"time": "2021-01-31T06:05:24+00:00"
"time": "2021-02-14T06:51:35+00:00"
},
{
"name": "sebastian/complexity",
"version": "dev-master",
"version": "2.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/complexity.git",
"reference": "1e51f588b0bf9783d80e952339a1f057f530f3ac"
"reference": "739b35e53379900cc9ac327b2147867b8b6efd88"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/1e51f588b0bf9783d80e952339a1f057f530f3ac",
"reference": "1e51f588b0bf9783d80e952339a1f057f530f3ac",
"url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88",
"reference": "739b35e53379900cc9ac327b2147867b8b6efd88",
"shasum": ""
},
"require": {
@ -3982,7 +3983,6 @@
"require-dev": {
"phpunit/phpunit": "^9.3"
},
"default-branch": true,
"type": "library",
"extra": {
"branch-alias": {
@ -4009,7 +4009,7 @@
"homepage": "https://github.com/sebastianbergmann/complexity",
"support": {
"issues": "https://github.com/sebastianbergmann/complexity/issues",
"source": "https://github.com/sebastianbergmann/complexity/tree/master"
"source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2"
},
"funding": [
{
@ -4017,7 +4017,7 @@
"type": "github"
}
],
"time": "2021-01-31T06:07:14+00:00"
"time": "2020-10-26T15:52:27+00:00"
},
{
"name": "sebastian/diff",
@ -4025,12 +4025,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/diff.git",
"reference": "492912a4b41de6a0127ebcd2f766b7d7f10f574c"
"reference": "1895a1a29e197f7d31099a320b2a3ae9e428b21d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/492912a4b41de6a0127ebcd2f766b7d7f10f574c",
"reference": "492912a4b41de6a0127ebcd2f766b7d7f10f574c",
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/1895a1a29e197f7d31099a320b2a3ae9e428b21d",
"reference": "1895a1a29e197f7d31099a320b2a3ae9e428b21d",
"shasum": ""
},
"require": {
@ -4084,7 +4084,7 @@
"type": "github"
}
],
"time": "2021-01-31T06:05:32+00:00"
"time": "2021-02-14T06:51:43+00:00"
},
{
"name": "sebastian/environment",
@ -4092,12 +4092,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/environment.git",
"reference": "36ffd0fc651961e864d955e6fd71ef03c367abae"
"reference": "7f8f2720df4d03d4368edadac24c3a7950b6cdc5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/36ffd0fc651961e864d955e6fd71ef03c367abae",
"reference": "36ffd0fc651961e864d955e6fd71ef03c367abae",
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/7f8f2720df4d03d4368edadac24c3a7950b6cdc5",
"reference": "7f8f2720df4d03d4368edadac24c3a7950b6cdc5",
"shasum": ""
},
"require": {
@ -4148,7 +4148,7 @@
"type": "github"
}
],
"time": "2021-01-31T06:05:40+00:00"
"time": "2021-02-14T06:51:52+00:00"
},
{
"name": "sebastian/exporter",
@ -4156,12 +4156,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git",
"reference": "61024af3555edd28c0e2df7ae6a72bb24b1c3f88"
"reference": "c6819d6edff3496f28c29a9ed61c564a9fdae27b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/61024af3555edd28c0e2df7ae6a72bb24b1c3f88",
"reference": "61024af3555edd28c0e2df7ae6a72bb24b1c3f88",
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/c6819d6edff3496f28c29a9ed61c564a9fdae27b",
"reference": "c6819d6edff3496f28c29a9ed61c564a9fdae27b",
"shasum": ""
},
"require": {
@ -4226,7 +4226,7 @@
"type": "github"
}
],
"time": "2021-01-31T06:05:49+00:00"
"time": "2021-02-14T06:52:00+00:00"
},
{
"name": "sebastian/global-state",
@ -4234,12 +4234,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/global-state.git",
"reference": "ebe2eda599117719755417db6552cf3e6cea68a3"
"reference": "a912746c9e31610f52b8e6977107e745c758cfd8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/ebe2eda599117719755417db6552cf3e6cea68a3",
"reference": "ebe2eda599117719755417db6552cf3e6cea68a3",
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/a912746c9e31610f52b8e6977107e745c758cfd8",
"reference": "a912746c9e31610f52b8e6977107e745c758cfd8",
"shasum": ""
},
"require": {
@ -4291,20 +4291,20 @@
"type": "github"
}
],
"time": "2021-01-31T06:05:57+00:00"
"time": "2021-02-14T06:52:09+00:00"
},
{
"name": "sebastian/lines-of-code",
"version": "dev-master",
"version": "1.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/lines-of-code.git",
"reference": "a58591ee219008ebc039a6ef1a1ad5ebd7aa5094"
"reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/a58591ee219008ebc039a6ef1a1ad5ebd7aa5094",
"reference": "a58591ee219008ebc039a6ef1a1ad5ebd7aa5094",
"url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc",
"reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc",
"shasum": ""
},
"require": {
@ -4314,7 +4314,6 @@
"require-dev": {
"phpunit/phpunit": "^9.3"
},
"default-branch": true,
"type": "library",
"extra": {
"branch-alias": {
@ -4341,7 +4340,7 @@
"homepage": "https://github.com/sebastianbergmann/lines-of-code",
"support": {
"issues": "https://github.com/sebastianbergmann/lines-of-code/issues",
"source": "https://github.com/sebastianbergmann/lines-of-code/tree/master"
"source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3"
},
"funding": [
{
@ -4349,7 +4348,7 @@
"type": "github"
}
],
"time": "2021-01-31T06:07:23+00:00"
"time": "2020-11-28T06:42:11+00:00"
},
{
"name": "sebastian/object-enumerator",
@ -4357,12 +4356,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/object-enumerator.git",
"reference": "c3392f76c657681a2fde9073a47d26190580acee"
"reference": "79f258bf9b9f9f1aff7ec27fa3e0d5d7ef344088"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/c3392f76c657681a2fde9073a47d26190580acee",
"reference": "c3392f76c657681a2fde9073a47d26190580acee",
"url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/79f258bf9b9f9f1aff7ec27fa3e0d5d7ef344088",
"reference": "79f258bf9b9f9f1aff7ec27fa3e0d5d7ef344088",
"shasum": ""
},
"require": {
@ -4407,7 +4406,7 @@
"type": "github"
}
],
"time": "2021-01-31T06:06:06+00:00"
"time": "2021-02-14T06:52:17+00:00"
},
{
"name": "sebastian/object-reflector",
@ -4415,12 +4414,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/object-reflector.git",
"reference": "0b1e3b35407041b8f28c2d8b9f3d792720c81c23"
"reference": "232add5a51167e359e1dd03334ebffaddfb95795"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/0b1e3b35407041b8f28c2d8b9f3d792720c81c23",
"reference": "0b1e3b35407041b8f28c2d8b9f3d792720c81c23",
"url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/232add5a51167e359e1dd03334ebffaddfb95795",
"reference": "232add5a51167e359e1dd03334ebffaddfb95795",
"shasum": ""
},
"require": {
@ -4463,7 +4462,7 @@
"type": "github"
}
],
"time": "2021-01-31T06:06:15+00:00"
"time": "2021-02-14T06:52:26+00:00"
},
{
"name": "sebastian/recursion-context",
@ -4471,12 +4470,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/recursion-context.git",
"reference": "5df92f91b2cc5f733bb1d2df3eb81013a2bf69c6"
"reference": "d6cde15be46e8e5cc8671ceb41b63b69dfd7bd5a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5df92f91b2cc5f733bb1d2df3eb81013a2bf69c6",
"reference": "5df92f91b2cc5f733bb1d2df3eb81013a2bf69c6",
"url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/d6cde15be46e8e5cc8671ceb41b63b69dfd7bd5a",
"reference": "d6cde15be46e8e5cc8671ceb41b63b69dfd7bd5a",
"shasum": ""
},
"require": {
@ -4527,7 +4526,7 @@
"type": "github"
}
],
"time": "2021-01-31T06:06:48+00:00"
"time": "2021-02-14T06:52:58+00:00"
},
{
"name": "sebastian/resource-operations",
@ -4591,12 +4590,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/type.git",
"reference": "6751662dde805fb5e46e05d3133a89e056796404"
"reference": "8abc9c1947c9f928da999be28778a0ba48cdf5b4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/type/zipball/6751662dde805fb5e46e05d3133a89e056796404",
"reference": "6751662dde805fb5e46e05d3133a89e056796404",
"url": "https://api.github.com/repos/sebastianbergmann/type/zipball/8abc9c1947c9f928da999be28778a0ba48cdf5b4",
"reference": "8abc9c1947c9f928da999be28778a0ba48cdf5b4",
"shasum": ""
},
"require": {
@ -4640,11 +4639,11 @@
"type": "github"
}
],
"time": "2021-01-31T06:06:56+00:00"
"time": "2021-02-14T06:53:07+00:00"
},
{
"name": "sebastian/version",
"version": "dev-master",
"version": "3.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/version.git",
@ -4659,7 +4658,6 @@
"require": {
"php": ">=7.3"
},
"default-branch": true,
"type": "library",
"extra": {
"branch-alias": {
@ -4740,12 +4738,12 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
"reference": "56d4c04ca6069c93857c7335a626dbe747fa82d4"
"reference": "2a6f75224a537ee506e9fa1e6fc4200ad411ffd9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/56d4c04ca6069c93857c7335a626dbe747fa82d4",
"reference": "56d4c04ca6069c93857c7335a626dbe747fa82d4",
"url": "https://api.github.com/repos/symfony/console/zipball/2a6f75224a537ee506e9fa1e6fc4200ad411ffd9",
"reference": "2a6f75224a537ee506e9fa1e6fc4200ad411ffd9",
"shasum": ""
},
"require": {
@ -4830,7 +4828,7 @@
"type": "tidelift"
}
],
"time": "2021-01-28T22:09:26+00:00"
"time": "2021-02-17T15:27:35+00:00"
},
{
"name": "symfony/polyfill-ctype",
@ -4894,7 +4892,7 @@
"portable"
],
"support": {
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.22.0"
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.22.1"
},
"funding": [
{
@ -4918,12 +4916,12 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-grapheme.git",
"reference": "267a9adeb8ecb8071040a740930e077cdfb987af"
"reference": "5601e09b69f26c1828b13b6bb87cb07cddba3170"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/267a9adeb8ecb8071040a740930e077cdfb987af",
"reference": "267a9adeb8ecb8071040a740930e077cdfb987af",
"url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/5601e09b69f26c1828b13b6bb87cb07cddba3170",
"reference": "5601e09b69f26c1828b13b6bb87cb07cddba3170",
"shasum": ""
},
"require": {
@ -4976,7 +4974,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.22.0"
"source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.22.1"
},
"funding": [
{
@ -4992,7 +4990,7 @@
"type": "tidelift"
}
],
"time": "2021-01-07T16:49:33+00:00"
"time": "2021-01-22T09:19:47+00:00"
},
{
"name": "symfony/polyfill-intl-normalizer",
@ -5000,12 +4998,12 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-normalizer.git",
"reference": "6e971c891537eb617a00bb07a43d182a6915faba"
"reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/6e971c891537eb617a00bb07a43d182a6915faba",
"reference": "6e971c891537eb617a00bb07a43d182a6915faba",
"url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/43a0283138253ed1d48d352ab6d0bdb3f809f248",
"reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248",
"shasum": ""
},
"require": {
@ -5061,7 +5059,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.22.0"
"source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.22.1"
},
"funding": [
{
@ -5077,7 +5075,7 @@
"type": "tidelift"
}
],
"time": "2021-01-07T17:09:11+00:00"
"time": "2021-01-22T09:19:47+00:00"
},
{
"name": "symfony/polyfill-mbstring",
@ -5085,12 +5083,12 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "f377a3dd1fde44d37b9831d68dc8dea3ffd28e13"
"reference": "5232de97ee3b75b0360528dae24e73db49566ab1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/f377a3dd1fde44d37b9831d68dc8dea3ffd28e13",
"reference": "f377a3dd1fde44d37b9831d68dc8dea3ffd28e13",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/5232de97ee3b75b0360528dae24e73db49566ab1",
"reference": "5232de97ee3b75b0360528dae24e73db49566ab1",
"shasum": ""
},
"require": {
@ -5142,7 +5140,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.22.0"
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.22.1"
},
"funding": [
{
@ -5158,7 +5156,7 @@
"type": "tidelift"
}
],
"time": "2021-01-07T16:49:33+00:00"
"time": "2021-01-22T09:19:47+00:00"
},
{
"name": "symfony/polyfill-php73",
@ -5222,7 +5220,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php73/tree/v1.22.0"
"source": "https://github.com/symfony/polyfill-php73/tree/v1.22.1"
},
"funding": [
{
@ -5306,7 +5304,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php80/tree/v1.22.0"
"source": "https://github.com/symfony/polyfill-php80/tree/v1.22.1"
},
"funding": [
{
@ -5410,12 +5408,12 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/string.git",
"reference": "13c9099cdb470223b5863f7d11d17554b2dc6404"
"reference": "6d830fae00e2bb336074eae141bb00db36cd3551"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/string/zipball/13c9099cdb470223b5863f7d11d17554b2dc6404",
"reference": "13c9099cdb470223b5863f7d11d17554b2dc6404",
"url": "https://api.github.com/repos/symfony/string/zipball/6d830fae00e2bb336074eae141bb00db36cd3551",
"reference": "6d830fae00e2bb336074eae141bb00db36cd3551",
"shasum": ""
},
"require": {
@ -5486,7 +5484,7 @@
"type": "tidelift"
}
],
"time": "2021-01-26T09:33:05+00:00"
"time": "2021-02-17T15:27:35+00:00"
},
{
"name": "theseer/tokenizer",
@ -5544,12 +5542,12 @@
"source": {
"type": "git",
"url": "https://github.com/twigphp/Twig.git",
"reference": "5a60e72afa8511b63217d27bef3f4b7f074e20e1"
"reference": "429f90a02d3bd4a06787ac9bc48c56c4320b58a0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/5a60e72afa8511b63217d27bef3f4b7f074e20e1",
"reference": "5a60e72afa8511b63217d27bef3f4b7f074e20e1",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/429f90a02d3bd4a06787ac9bc48c56c4320b58a0",
"reference": "429f90a02d3bd4a06787ac9bc48c56c4320b58a0",
"shasum": ""
},
"require": {
@ -5615,7 +5613,7 @@
"type": "tidelift"
}
],
"time": "2021-02-02T15:25:09+00:00"
"time": "2021-02-08T09:50:07+00:00"
},
{
"name": "vimeo/psalm",

View file

@ -213,6 +213,7 @@ services:
- appwrite-uploads:/storage/uploads:rw
- appwrite-cache:/storage/cache:rw
- appwrite-functions:/storage/functions:rw
- appwrite-certificates:/storage/certificates:rw
- ./app:/usr/src/code/app
- ./src:/usr/src/code/src
depends_on:

View file

@ -0,0 +1 @@
appwrite avatars getBrowser --code="aa" --width="0" --height="0" --quality="0"

View file

@ -0,0 +1 @@
appwrite avatars getCreditCard --code="amex" --width="0" --height="0" --quality="0"

View file

@ -0,0 +1 @@
appwrite avatars getFavicon --url="https://example.com"

View file

@ -0,0 +1 @@
appwrite avatars getFlag --code="af" --width="0" --height="0" --quality="0"

View file

@ -0,0 +1 @@
appwrite avatars getImage --url="https://example.com" --width="0" --height="0"

View file

@ -0,0 +1 @@
appwrite avatars getInitials --name="[NAME]" --width="0" --height="0" --color="" --background=""

View file

@ -0,0 +1 @@
appwrite avatars getQR --text="[TEXT]" --size="0" --margin="0" --download=""

View file

@ -0,0 +1 @@
appwrite database createCollection --name="[NAME]" "--read[]=" "--write[]=" "--rules[]="

View file

@ -0,0 +1 @@
appwrite database createDocument --collectionId="[COLLECTION_ID]" --data="{}" "--read[]=" "--write[]=" --parentDocument="[PARENT_DOCUMENT]" --parentProperty="" --parentPropertyType="assign"

View file

@ -0,0 +1 @@
appwrite database deleteCollection --collectionId="[COLLECTION_ID]"

View file

@ -0,0 +1 @@
appwrite database deleteDocument --collectionId="[COLLECTION_ID]" --documentId="[DOCUMENT_ID]"

View file

@ -0,0 +1 @@
appwrite database getCollection --collectionId="[COLLECTION_ID]"

View file

@ -0,0 +1 @@
appwrite database getDocument --collectionId="[COLLECTION_ID]" --documentId="[DOCUMENT_ID]"

View file

@ -0,0 +1 @@
appwrite database listCollections --search="[SEARCH]" --limit="0" --offset="0" --orderType="ASC"

View file

@ -0,0 +1 @@
appwrite database listDocuments --collectionId="[COLLECTION_ID]" "--filters[]=" --offset="0" --limit="0" --orderField="[ORDER_FIELD]" --orderType="DESC" --orderCast="int" --search="[SEARCH]"

View file

@ -0,0 +1 @@
appwrite database updateCollection --collectionId="[COLLECTION_ID]" --name="[NAME]" "--read[]=" "--write[]=" "--rules[]="

View file

@ -0,0 +1 @@
appwrite database updateDocument --collectionId="[COLLECTION_ID]" --documentId="[DOCUMENT_ID]" --data="{}" "--read[]=" "--write[]="

View file

@ -0,0 +1 @@
appwrite health getAntiVirus

View file

@ -0,0 +1 @@
appwrite health getCache

View file

@ -0,0 +1 @@
appwrite health getDB

View file

@ -0,0 +1 @@
appwrite health getQueueCertificates

View file

@ -0,0 +1 @@
appwrite health getQueueFunctions

View file

@ -0,0 +1 @@
appwrite health getQueueLogs

View file

@ -0,0 +1 @@
appwrite health getQueueTasks

View file

@ -0,0 +1 @@
appwrite health getQueueUsage

View file

@ -0,0 +1 @@
appwrite health getQueueWebhooks

View file

@ -0,0 +1 @@
appwrite health getStorageLocal

View file

@ -0,0 +1 @@
appwrite health getTime

View file

@ -0,0 +1 @@
appwrite health get

View file

@ -0,0 +1 @@
appwrite locale getContinents

View file

@ -0,0 +1 @@
appwrite locale getCountriesEU

View file

@ -0,0 +1 @@
appwrite locale getCountriesPhones

View file

@ -0,0 +1 @@
appwrite locale getCountries

View file

@ -0,0 +1 @@
appwrite locale getCurrencies

View file

@ -0,0 +1 @@
appwrite locale getLanguages

View file

@ -0,0 +1 @@
appwrite locale get

View file

@ -0,0 +1 @@
appwrite storage createFile --file="" "--read[]=" "--write[]="

View file

@ -0,0 +1 @@
appwrite storage deleteFile --fileId="[FILE_ID]"

View file

@ -0,0 +1 @@
appwrite storage getFileDownload --fileId="[FILE_ID]"

View file

@ -0,0 +1 @@
appwrite storage getFilePreview --fileId="[FILE_ID]" --width="0" --height="0" --quality="0" --background="" --output="jpg"

View file

@ -0,0 +1 @@
appwrite storage getFileView --fileId="[FILE_ID]" --as="pdf"

View file

@ -0,0 +1 @@
appwrite storage getFile --fileId="[FILE_ID]"

View file

@ -0,0 +1 @@
appwrite storage listFiles --search="[SEARCH]" --limit="0" --offset="0" --orderType="ASC"

View file

@ -0,0 +1 @@
appwrite storage updateFile --fileId="[FILE_ID]" "--read[]=" "--write[]="

View file

@ -0,0 +1 @@
appwrite teams createMembership --teamId="[TEAM_ID]" --email="email@example.com" "--roles[]=" --url="https://example.com" --name="[NAME]"

View file

@ -0,0 +1 @@
appwrite teams create --name="[NAME]" "--roles[]="

View file

@ -0,0 +1 @@
appwrite teams deleteMembership --teamId="[TEAM_ID]" --inviteId="[INVITE_ID]"

View file

@ -0,0 +1 @@
appwrite teams delete --teamId="[TEAM_ID]"

View file

@ -0,0 +1 @@
appwrite teams getMemberships --teamId="[TEAM_ID]" --search="[SEARCH]" --limit="0" --offset="0" --orderType="ASC"

View file

@ -0,0 +1 @@
appwrite teams get --teamId="[TEAM_ID]"

View file

@ -0,0 +1 @@
appwrite teams list --search="[SEARCH]" --limit="0" --offset="0" --orderType="ASC"

View file

@ -0,0 +1 @@
appwrite teams update --teamId="[TEAM_ID]" --name="[NAME]"

View file

@ -0,0 +1 @@
appwrite users create --email="email@example.com" --password="password" --name="[NAME]"

View file

@ -0,0 +1 @@
appwrite users deleteSession --userId="[USER_ID]" --sessionId="[SESSION_ID]"

View file

@ -0,0 +1 @@
appwrite users deleteSessions --userId="[USER_ID]"

View file

@ -0,0 +1 @@
appwrite users getLogs --userId="[USER_ID]"

View file

@ -0,0 +1 @@
appwrite users getPrefs --userId="[USER_ID]"

View file

@ -0,0 +1 @@
appwrite users getSessions --userId="[USER_ID]"

View file

@ -0,0 +1 @@
appwrite users get --userId="[USER_ID]"

View file

@ -0,0 +1 @@
appwrite users list --search="[SEARCH]" --limit="0" --offset="0" --orderType="ASC"

View file

@ -0,0 +1 @@
appwrite users updatePrefs --userId="[USER_ID]" --prefs="{}"

View file

@ -0,0 +1 @@
appwrite users updateStatus --userId="[USER_ID]" --status="1"

View file

@ -0,0 +1 @@
appwrite avatars getBrowser --code="aa" --width="0" --height="0" --quality="0"

View file

@ -0,0 +1 @@
appwrite avatars getCreditCard --code="amex" --width="0" --height="0" --quality="0"

View file

@ -0,0 +1 @@
appwrite avatars getFavicon --url="https://example.com"

View file

@ -0,0 +1 @@
appwrite avatars getFlag --code="af" --width="0" --height="0" --quality="0"

View file

@ -0,0 +1 @@
appwrite avatars getImage --url="https://example.com" --width="0" --height="0"

View file

@ -0,0 +1 @@
appwrite avatars getInitials --name="[NAME]" --width="0" --height="0" --color="" --background=""

View file

@ -0,0 +1 @@
appwrite avatars getQR --text="[TEXT]" --size="0" --margin="0" --download=""

View file

@ -0,0 +1 @@
appwrite database createCollection --name="[NAME]" "--read[]=" "--write[]=" "--rules[]="

View file

@ -0,0 +1 @@
appwrite database createDocument --collectionId="[COLLECTION_ID]" --data="{}" "--read[]=" "--write[]=" --parentDocument="[PARENT_DOCUMENT]" --parentProperty="" --parentPropertyType="assign"

Some files were not shown because too many files have changed in this diff Show more