Merge branch 'dev' of https://github.com/appwrite/appwrite into feat-265-realtime
This commit is contained in:
commit
288d7d3701
19
CHANGES.md
19
CHANGES.md
|
@ -9,6 +9,25 @@
|
|||
- Only logged in users can execute functions (for guests, use anonymous login)
|
||||
- Only the user who has triggered the execution get access to the relevant execution logs
|
||||
|
||||
# Version 0.7.2 (Not Released Yet)
|
||||
|
||||
## Features
|
||||
|
||||
- When creating new resources from the client API, the current user gets both read & write permissions by default. (#1007)
|
||||
- Added timestamp to errors logs on the HTTP API container (#1002)
|
||||
- Added verbose tests output on the terminal and CI (#1006)
|
||||
|
||||
## Upgrades
|
||||
|
||||
- Upgraded utopia-php/abuse to version 0.4.0
|
||||
|
||||
## Bugs
|
||||
|
||||
- Fixed certificates worker error on successful operations (#1010)
|
||||
- Fixed head requests not responding (#998)
|
||||
- Fixed bug when using auth credential for the Redis container (#993)
|
||||
- Fixed server warning logs on 3** redirect endpoints (#1013)
|
||||
|
||||
# Version 0.7.1
|
||||
|
||||
## Features
|
||||
|
|
|
@ -169,8 +169,8 @@ App::put('/v1/database/collections/:collectionId')
|
|||
->label('sdk.response.model', Response::MODEL_COLLECTION)
|
||||
->param('collectionId', '', new UID(), 'Collection unique ID.')
|
||||
->param('name', null, new Text(128), 'Collection name. Max length: 128 chars.')
|
||||
->param('read', [], new ArrayList(new Text(64)), 'An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions(/docs/permissions) and get a full list of available permissions.')
|
||||
->param('write', [], new ArrayList(new Text(64)), 'An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions.')
|
||||
->param('read', null, new ArrayList(new Text(64)), 'An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions.', true)
|
||||
->param('write', null, new ArrayList(new Text(64)), 'An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions.', true)
|
||||
->param('rules', [], function ($projectDB) { return new ArrayList(new Collection($projectDB, [Database::SYSTEM_COLLECTION_RULES], ['$collection' => Database::SYSTEM_COLLECTION_RULES, '$permissions' => ['read' => [], 'write' => []]])); }, 'Array of [rule objects](/docs/rules). Each rule define a collection field name, data type and validation.', true, ['projectDB'])
|
||||
->inject('response')
|
||||
->inject('projectDB')
|
||||
|
@ -187,6 +187,8 @@ App::put('/v1/database/collections/:collectionId')
|
|||
}
|
||||
|
||||
$parsedRules = [];
|
||||
$read = (is_null($read)) ? ($collection->getPermissions()['read'] ?? []) : $read; // By default inherit read permissions
|
||||
$write = (is_null($write)) ? ($collection->getPermissions()['write'] ?? []) : $write; // By default inherit write permissions
|
||||
|
||||
foreach ($rules as &$rule) {
|
||||
$parsedRules[] = \array_merge([
|
||||
|
@ -295,17 +297,19 @@ App::post('/v1/database/collections/:collectionId/documents')
|
|||
->label('sdk.response.model', Response::MODEL_ANY)
|
||||
->param('collectionId', null, new UID(), 'Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](/docs/server/database#createCollection).')
|
||||
->param('data', [], new JSON(), 'Document data as JSON object.')
|
||||
->param('read', [], new ArrayList(new Text(64)), 'An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions.')
|
||||
->param('write', [], new ArrayList(new Text(64)), 'An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions.')
|
||||
->param('read', null, new ArrayList(new Text(64)), 'An array of strings with read permissions. By default only the current user is granted with read permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions.', true)
|
||||
->param('write', null, new ArrayList(new Text(64)), 'An array of strings with write permissions. By default only the current user is granted with write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions.', true)
|
||||
->param('parentDocument', '', new UID(), 'Parent document unique ID. Use when you want your new document to be a child of a parent document.', true)
|
||||
->param('parentProperty', '', new Key(), 'Parent document property name. Use when you want your new document to be a child of a parent document.', true)
|
||||
->param('parentPropertyType', Document::SET_TYPE_ASSIGN, new WhiteList([Document::SET_TYPE_ASSIGN, Document::SET_TYPE_APPEND, Document::SET_TYPE_PREPEND], true), 'Parent document property connection type. You can set this value to **assign**, **append** or **prepend**, default value is assign. Use when you want your new document to be a child of a parent document.', true)
|
||||
->inject('response')
|
||||
->inject('projectDB')
|
||||
->inject('user')
|
||||
->inject('audits')
|
||||
->action(function ($collectionId, $data, $read, $write, $parentDocument, $parentProperty, $parentPropertyType, $response, $projectDB, $audits) {
|
||||
->action(function ($collectionId, $data, $read, $write, $parentDocument, $parentProperty, $parentPropertyType, $response, $projectDB, $user, $audits) {
|
||||
/** @var Appwrite\Utopia\Response $response */
|
||||
/** @var Appwrite\Database\Database $projectDB */
|
||||
/** @var Appwrite\Database\Document $user */
|
||||
/** @var Appwrite\Event\Event $audits */
|
||||
|
||||
$data = (\is_string($data)) ? \json_decode($data, true) : $data; // Cast to JSON array
|
||||
|
@ -326,8 +330,8 @@ App::post('/v1/database/collections/:collectionId/documents')
|
|||
|
||||
$data['$collection'] = $collectionId; // Adding this param to make API easier for developers
|
||||
$data['$permissions'] = [
|
||||
'read' => $read,
|
||||
'write' => $write,
|
||||
'read' => (is_null($read) && !$user->isEmpty()) ? ['user:'.$user->getId()] : $read ?? [], // By default set read permissions for user
|
||||
'write' => (is_null($write) && !$user->isEmpty()) ? ['user:'.$user->getId()] : $write ?? [], // By default set write permissions for user
|
||||
];
|
||||
|
||||
// Read parent document + validate not 404 + validate read / write permission like patch method
|
||||
|
@ -508,8 +512,8 @@ App::patch('/v1/database/collections/:collectionId/documents/:documentId')
|
|||
->param('collectionId', null, new UID(), 'Collection unique ID. You can create a new collection with validation rules using the Database service [server integration](/docs/server/database#createCollection).')
|
||||
->param('documentId', null, new UID(), 'Document unique ID.')
|
||||
->param('data', [], new JSON(), 'Document data as JSON object.')
|
||||
->param('read', [], new ArrayList(new Text(64)), 'An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions.')
|
||||
->param('write', [], new ArrayList(new Text(64)), 'An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions.')
|
||||
->param('read', null, new ArrayList(new Text(64)), 'An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions.', true)
|
||||
->param('write', null, new ArrayList(new Text(64)), 'An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions.', true)
|
||||
->inject('response')
|
||||
->inject('projectDB')
|
||||
->inject('audits')
|
||||
|
@ -522,7 +526,7 @@ App::patch('/v1/database/collections/:collectionId/documents/:documentId')
|
|||
$document = $projectDB->getDocument($documentId, false);
|
||||
|
||||
$data = (\is_string($data)) ? \json_decode($data, true) : $data; // Cast to JSON array
|
||||
|
||||
|
||||
if (!\is_array($data)) {
|
||||
throw new Exception('Data param should be a valid JSON object', 400);
|
||||
}
|
||||
|
@ -539,8 +543,8 @@ App::patch('/v1/database/collections/:collectionId/documents/:documentId')
|
|||
|
||||
$data['$collection'] = $collection->getId(); // Make sure user don't switch collectionID
|
||||
$data['$id'] = $document->getId(); // Make sure user don't switch document unique ID
|
||||
$data['$permissions']['read'] = $read;
|
||||
$data['$permissions']['write'] = $write;
|
||||
$data['$permissions']['read'] = (is_null($read)) ? ($document->getPermissions()['read'] ?? []) : $read; // By default inherit read permissions
|
||||
$data['$permissions']['write'] = (is_null($write)) ? ($document->getPermissions()['write'] ?? []) : $write; // By default inherit write permissions
|
||||
|
||||
if (empty($data)) {
|
||||
throw new Exception('Missing payload', 400);
|
||||
|
|
|
@ -440,7 +440,7 @@ App::post('/v1/functions/:functionId/tags')
|
|||
->label('sdk.response.model', Response::MODEL_TAG)
|
||||
->param('functionId', '', new UID(), 'Function unique ID.')
|
||||
->param('command', '', new Text('1028'), 'Code execution command.')
|
||||
->param('code', null, new File(), 'Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.', false)
|
||||
->param('code', [], new File(), 'Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.', false)
|
||||
->inject('request')
|
||||
->inject('response')
|
||||
->inject('projectDB')
|
||||
|
|
|
@ -254,7 +254,10 @@ App::get('/v1/health/anti-virus')
|
|||
/** @var Appwrite\Utopia\Response $response */
|
||||
|
||||
if (App::getEnv('_APP_STORAGE_ANTIVIRUS') === 'disabled') { // Check if scans are enabled
|
||||
throw new Exception('Anitvirus is disabled');
|
||||
return $response->json([
|
||||
'status' => 'disabled',
|
||||
'version' => '',
|
||||
]);
|
||||
}
|
||||
|
||||
$antiVirus = new Network(App::getEnv('_APP_STORAGE_ANTIVIRUS_HOST', 'clamav'),
|
||||
|
|
|
@ -38,17 +38,19 @@ App::post('/v1/storage/files')
|
|||
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
|
||||
->label('sdk.response.model', Response::MODEL_FILE)
|
||||
->param('file', [], new File(), 'Binary file.', false)
|
||||
->param('read', [], new ArrayList(new Text(64)), 'An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions.')
|
||||
->param('write', [], new ArrayList(new Text(64)), 'An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions.')
|
||||
->param('read', null, new ArrayList(new Text(64)), 'An array of strings with read permissions. By default only the current user is granted with read permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions.', true)
|
||||
->param('write', null, new ArrayList(new Text(64)), 'An array of strings with write permissions. By default only the current user is granted with write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions.', true)
|
||||
->inject('request')
|
||||
->inject('response')
|
||||
->inject('projectDB')
|
||||
->inject('user')
|
||||
->inject('audits')
|
||||
->inject('usage')
|
||||
->action(function ($file, $read, $write, $request, $response, $projectDB, $audits, $usage) {
|
||||
->action(function ($file, $read, $write, $request, $response, $projectDB, $user, $audits, $usage) {
|
||||
/** @var Utopia\Swoole\Request $request */
|
||||
/** @var Appwrite\Utopia\Response $response */
|
||||
/** @var Appwrite\Database\Database $projectDB */
|
||||
/** @var Appwrite\Database\Document $user */
|
||||
/** @var Appwrite\Event\Event $audits */
|
||||
/** @var Appwrite\Event\Event $usage */
|
||||
|
||||
|
@ -122,8 +124,8 @@ App::post('/v1/storage/files')
|
|||
$file = $projectDB->createDocument([
|
||||
'$collection' => Database::SYSTEM_COLLECTION_FILES,
|
||||
'$permissions' => [
|
||||
'read' => $read,
|
||||
'write' => $write,
|
||||
'read' => (is_null($read) && !$user->isEmpty()) ? ['user:'.$user->getId()] : $read ?? [], // By default set read permissions for user
|
||||
'write' => (is_null($write) && !$user->isEmpty()) ? ['user:'.$user->getId()] : $write ?? [], // By default set write permissions for user
|
||||
],
|
||||
'dateCreated' => \time(),
|
||||
'folderId' => '',
|
||||
|
|
|
@ -256,6 +256,8 @@ App::error(function ($error, $utopia, $request, $response, $layout, $project) {
|
|||
$template = ($route) ? $route->getLabel('error', null) : null;
|
||||
|
||||
if (php_sapi_name() === 'cli') {
|
||||
Console::error('[Error] Timestamp: '.date('c', time()));
|
||||
|
||||
if($route) {
|
||||
Console::error('[Error] Method: '.$route->getMethod());
|
||||
Console::error('[Error] URL: '.$route->getURL());
|
||||
|
|
|
@ -125,7 +125,7 @@ class CertificatesV1 extends Worker
|
|||
." -w ".APP_STORAGE_CERTIFICATES
|
||||
." -d {$domain->get()}", '', $stdout, $stderr);
|
||||
|
||||
if($stderr || $exit !== 0) {
|
||||
if($exit !== 0) {
|
||||
throw new Exception('Failed to issue a certificate with message: '.$stderr);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ -z "$_APP_REDIS_USER" ] || [ -z "$_APP_REDIS_PASS" ]
|
||||
if [ -z "$_APP_REDIS_USER" ] && [ -z "$_APP_REDIS_PASS" ]
|
||||
then
|
||||
REDIS_BACKEND="${_APP_REDIS_HOST}:${_APP_REDIS_PORT}"
|
||||
else
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ -z "$_APP_REDIS_USER" ] || [ -z "$_APP_REDIS_PASS" ]
|
||||
if [ -z "$_APP_REDIS_USER" ] && [ -z "$_APP_REDIS_PASS" ]
|
||||
then
|
||||
REDIS_BACKEND="${_APP_REDIS_HOST}:${_APP_REDIS_PORT}"
|
||||
else
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ -z "$_APP_REDIS_USER" ] || [ -z "$_APP_REDIS_PASS" ]
|
||||
if [ -z "$_APP_REDIS_USER" ] && [ -z "$_APP_REDIS_PASS" ]
|
||||
then
|
||||
REDIS_BACKEND="${_APP_REDIS_HOST}:${_APP_REDIS_PORT}"
|
||||
else
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ -z "$_APP_REDIS_USER" ] || [ -z "$_APP_REDIS_PASS" ]
|
||||
if [ -z "$_APP_REDIS_USER" ] && [ -z "$_APP_REDIS_PASS" ]
|
||||
then
|
||||
REDIS_BACKEND="${_APP_REDIS_HOST}:${_APP_REDIS_PORT}"
|
||||
else
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ -z "$_APP_REDIS_USER" ] || [ -z "$_APP_REDIS_PASS" ]
|
||||
if [ -z "$_APP_REDIS_USER" ] && [ -z "$_APP_REDIS_PASS" ]
|
||||
then
|
||||
REDIS_BACKEND="${_APP_REDIS_HOST}:${_APP_REDIS_PORT}"
|
||||
else
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ -z "$_APP_REDIS_USER" ] || [ -z "$_APP_REDIS_PASS" ]
|
||||
if [ -z "$_APP_REDIS_USER" ] && [ -z "$_APP_REDIS_PASS" ]
|
||||
then
|
||||
REDIS_BACKEND="${_APP_REDIS_HOST}:${_APP_REDIS_PORT}"
|
||||
else
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ -z "$_APP_REDIS_USER" ] || [ -z "$_APP_REDIS_PASS" ]
|
||||
if [ -z "$_APP_REDIS_USER" ] && [ -z "$_APP_REDIS_PASS" ]
|
||||
then
|
||||
REDIS_BACKEND="${_APP_REDIS_HOST}:${_APP_REDIS_PORT}"
|
||||
else
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ -z "$_APP_REDIS_USER" ] || [ -z "$_APP_REDIS_PASS" ]
|
||||
if [ -z "$_APP_REDIS_USER" ] && [ -z "$_APP_REDIS_PASS" ]
|
||||
then
|
||||
REDIS_BACKEND="${_APP_REDIS_HOST}:${_APP_REDIS_PORT}"
|
||||
else
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ -z "$_APP_REDIS_USER" ] || [ -z "$_APP_REDIS_PASS" ]
|
||||
if [ -z "$_APP_REDIS_USER" ] && [ -z "$_APP_REDIS_PASS" ]
|
||||
then
|
||||
REDIS_BACKEND="${_APP_REDIS_HOST}:${_APP_REDIS_PORT}"
|
||||
else
|
||||
|
|
|
@ -15,7 +15,10 @@
|
|||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {"Tests\\E2E\\": "tests/e2e"}
|
||||
"psr-4": {
|
||||
"Tests\\E2E\\": "tests/e2e",
|
||||
"Appwrite\\Tests\\": "tests/extensions"
|
||||
}
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.4.0",
|
||||
|
@ -34,9 +37,9 @@
|
|||
|
||||
"appwrite/php-clamav": "1.0.*",
|
||||
|
||||
"utopia-php/framework": "0.10.0",
|
||||
"utopia-php/abuse": "0.3.*",
|
||||
"utopia-php/analytics": "0.1.*",
|
||||
"utopia-php/framework": "0.12.*",
|
||||
"utopia-php/abuse": "0.4.*",
|
||||
"utopia-php/analytics": "0.2.*",
|
||||
"utopia-php/audit": "0.5.*",
|
||||
"utopia-php/cache": "0.2.*",
|
||||
"utopia-php/cli": "0.10.0",
|
||||
|
|
402
composer.lock
generated
402
composer.lock
generated
|
@ -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": "3463ecea7830f29a67317097ad2aeb66",
|
||||
"content-hash": "69222438c59581b58de7052befa6ac00",
|
||||
"packages": [
|
||||
{
|
||||
"name": "adhocore/jwt",
|
||||
|
@ -360,22 +360,22 @@
|
|||
},
|
||||
{
|
||||
"name": "guzzlehttp/guzzle",
|
||||
"version": "7.2.0",
|
||||
"version": "dev-master",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/guzzle.git",
|
||||
"reference": "0aa74dfb41ae110835923ef10a9d803a22d50e79"
|
||||
"reference": "de6f1e58e735754b888649495ed4cb9ae3b19589"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/0aa74dfb41ae110835923ef10a9d803a22d50e79",
|
||||
"reference": "0aa74dfb41ae110835923ef10a9d803a22d50e79",
|
||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/de6f1e58e735754b888649495ed4cb9ae3b19589",
|
||||
"reference": "de6f1e58e735754b888649495ed4cb9ae3b19589",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"guzzlehttp/promises": "^1.4",
|
||||
"guzzlehttp/psr7": "^1.7",
|
||||
"guzzlehttp/psr7": "^1.7 || ^2.0",
|
||||
"php": "^7.2.5 || ^8.0",
|
||||
"psr/http-client": "^1.0"
|
||||
},
|
||||
|
@ -383,6 +383,7 @@
|
|||
"psr/http-client-implementation": "1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"bamarni/composer-bin-plugin": "^1.4.1",
|
||||
"ext-curl": "*",
|
||||
"php-http/client-integration-tests": "^3.0",
|
||||
"phpunit/phpunit": "^8.5.5 || ^9.3.5",
|
||||
|
@ -393,10 +394,11 @@
|
|||
"ext-intl": "Required for Internationalized Domain Name (IDN) support",
|
||||
"psr/log": "Required for using the Log middleware"
|
||||
},
|
||||
"default-branch": true,
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "7.1-dev"
|
||||
"dev-master": "7.4-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
|
@ -438,7 +440,7 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/guzzle/guzzle/issues",
|
||||
"source": "https://github.com/guzzle/guzzle/tree/7.2.0"
|
||||
"source": "https://github.com/guzzle/guzzle/tree/master"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
@ -458,7 +460,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2020-10-10T11:47:56+00:00"
|
||||
"time": "2021-03-23T14:07:59+00:00"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/promises",
|
||||
|
@ -518,46 +520,47 @@
|
|||
},
|
||||
{
|
||||
"name": "guzzlehttp/psr7",
|
||||
"version": "1.x-dev",
|
||||
"version": "dev-master",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/psr7.git",
|
||||
"reference": "d7fe0a0eabc266c3dcf2f20aa12121044ff196a4"
|
||||
"reference": "c0dcda9f54d145bd4d062a6d15f54931a67732f9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/d7fe0a0eabc266c3dcf2f20aa12121044ff196a4",
|
||||
"reference": "d7fe0a0eabc266c3dcf2f20aa12121044ff196a4",
|
||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/c0dcda9f54d145bd4d062a6d15f54931a67732f9",
|
||||
"reference": "c0dcda9f54d145bd4d062a6d15f54931a67732f9",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.4.0",
|
||||
"psr/http-message": "~1.0",
|
||||
"ralouphie/getallheaders": "^2.0.5 || ^3.0.0"
|
||||
"php": "^7.2.5 || ^8.0",
|
||||
"psr/http-factory": "^1.0",
|
||||
"psr/http-message": "^1.0",
|
||||
"ralouphie/getallheaders": "^3.0"
|
||||
},
|
||||
"provide": {
|
||||
"psr/http-factory-implementation": "1.0",
|
||||
"psr/http-message-implementation": "1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-zlib": "*",
|
||||
"phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10"
|
||||
"bamarni/composer-bin-plugin": "^1.4.1",
|
||||
"http-interop/http-factory-tests": "^0.9",
|
||||
"phpunit/phpunit": "^8.5.8 || ^9.3.10"
|
||||
},
|
||||
"suggest": {
|
||||
"laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
|
||||
},
|
||||
"default-branch": true,
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.7-dev"
|
||||
"dev-master": "2.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"GuzzleHttp\\Psr7\\": "src/"
|
||||
},
|
||||
"files": [
|
||||
"src/functions_include.php"
|
||||
]
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
|
@ -572,6 +575,11 @@
|
|||
{
|
||||
"name": "Tobias Schultze",
|
||||
"homepage": "https://github.com/Tobion"
|
||||
},
|
||||
{
|
||||
"name": "Márk Sági-Kazár",
|
||||
"email": "mark.sagikazar@gmail.com",
|
||||
"homepage": "https://sagikazarmark.hu"
|
||||
}
|
||||
],
|
||||
"description": "PSR-7 message implementation that also provides common utility methods",
|
||||
|
@ -587,9 +595,9 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/guzzle/psr7/issues",
|
||||
"source": "https://github.com/guzzle/psr7/tree/1.x"
|
||||
"source": "https://github.com/guzzle/psr7/tree/2.0.0-beta1"
|
||||
},
|
||||
"time": "2021-03-09T14:42:40+00:00"
|
||||
"time": "2021-03-21T17:21:36+00:00"
|
||||
},
|
||||
{
|
||||
"name": "influxdb/influxdb-php",
|
||||
|
@ -905,6 +913,62 @@
|
|||
},
|
||||
"time": "2020-09-19T09:12:31+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/http-factory",
|
||||
"version": "dev-master",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-fig/http-factory.git",
|
||||
"reference": "36fa03d50ff82abcae81860bdaf4ed9a1510c7cd"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-fig/http-factory/zipball/36fa03d50ff82abcae81860bdaf4ed9a1510c7cd",
|
||||
"reference": "36fa03d50ff82abcae81860bdaf4ed9a1510c7cd",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.0.0",
|
||||
"psr/http-message": "^1.0"
|
||||
},
|
||||
"default-branch": true,
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Psr\\Http\\Message\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "PHP-FIG",
|
||||
"homepage": "https://www.php-fig.org/"
|
||||
}
|
||||
],
|
||||
"description": "Common interfaces for PSR-7 HTTP message factories",
|
||||
"keywords": [
|
||||
"factory",
|
||||
"http",
|
||||
"message",
|
||||
"psr",
|
||||
"psr-17",
|
||||
"psr-7",
|
||||
"request",
|
||||
"response"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/php-fig/http-factory/tree/master"
|
||||
},
|
||||
"time": "2020-09-17T16:52:55+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/http-message",
|
||||
"version": "dev-master",
|
||||
|
@ -1272,21 +1336,21 @@
|
|||
},
|
||||
{
|
||||
"name": "utopia-php/abuse",
|
||||
"version": "0.3.1",
|
||||
"version": "0.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/utopia-php/abuse.git",
|
||||
"reference": "23c2eb533bca8f3ef5548ae265398fa7d4d39a1c"
|
||||
"reference": "2b8cc40a67c045c137b44d1a11326f494acf50a4"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/utopia-php/abuse/zipball/23c2eb533bca8f3ef5548ae265398fa7d4d39a1c",
|
||||
"reference": "23c2eb533bca8f3ef5548ae265398fa7d4d39a1c",
|
||||
"url": "https://api.github.com/repos/utopia-php/abuse/zipball/2b8cc40a67c045c137b44d1a11326f494acf50a4",
|
||||
"reference": "2b8cc40a67c045c137b44d1a11326f494acf50a4",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-pdo": "*",
|
||||
"php": ">=7.1"
|
||||
"php": ">=7.4"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^9.4",
|
||||
|
@ -1318,22 +1382,22 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/utopia-php/abuse/issues",
|
||||
"source": "https://github.com/utopia-php/abuse/tree/0.3.1"
|
||||
"source": "https://github.com/utopia-php/abuse/tree/0.4.0"
|
||||
},
|
||||
"time": "2020-12-21T17:28:03+00:00"
|
||||
"time": "2021-03-17T20:21:24+00:00"
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/analytics",
|
||||
"version": "0.1.0",
|
||||
"version": "0.2.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/utopia-php/analytics.git",
|
||||
"reference": "a1f2a1672a927bef8cd4d9b47e5cfbc856a3c72f"
|
||||
"reference": "adfc2d057a7f6ab618a77c8a20ed3e35485ff416"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/utopia-php/analytics/zipball/a1f2a1672a927bef8cd4d9b47e5cfbc856a3c72f",
|
||||
"reference": "a1f2a1672a927bef8cd4d9b47e5cfbc856a3c72f",
|
||||
"url": "https://api.github.com/repos/utopia-php/analytics/zipball/adfc2d057a7f6ab618a77c8a20ed3e35485ff416",
|
||||
"reference": "adfc2d057a7f6ab618a77c8a20ed3e35485ff416",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1373,9 +1437,9 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/utopia-php/analytics/issues",
|
||||
"source": "https://github.com/utopia-php/analytics/tree/0.1.0"
|
||||
"source": "https://github.com/utopia-php/analytics/tree/0.2.0"
|
||||
},
|
||||
"time": "2021-02-03T17:07:09+00:00"
|
||||
"time": "2021-03-23T21:33:07+00:00"
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/audit",
|
||||
|
@ -1642,16 +1706,16 @@
|
|||
},
|
||||
{
|
||||
"name": "utopia-php/framework",
|
||||
"version": "0.10.0",
|
||||
"version": "0.12.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/utopia-php/framework.git",
|
||||
"reference": "65909bdb24ef6b6c6751abfdea90caf96bbc6c50"
|
||||
"reference": "78be43a0eb711f3677769dfb445e5111bfafaa88"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/utopia-php/framework/zipball/65909bdb24ef6b6c6751abfdea90caf96bbc6c50",
|
||||
"reference": "65909bdb24ef6b6c6751abfdea90caf96bbc6c50",
|
||||
"url": "https://api.github.com/repos/utopia-php/framework/zipball/78be43a0eb711f3677769dfb445e5111bfafaa88",
|
||||
"reference": "78be43a0eb711f3677769dfb445e5111bfafaa88",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1685,9 +1749,9 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/utopia-php/framework/issues",
|
||||
"source": "https://github.com/utopia-php/framework/tree/0.10.0"
|
||||
"source": "https://github.com/utopia-php/framework/tree/0.12.3"
|
||||
},
|
||||
"time": "2020-12-26T12:02:39+00:00"
|
||||
"time": "2021-03-22T22:02:23+00:00"
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/image",
|
||||
|
@ -1953,16 +2017,16 @@
|
|||
},
|
||||
{
|
||||
"name": "utopia-php/swoole",
|
||||
"version": "0.2.1",
|
||||
"version": "0.2.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/utopia-php/swoole.git",
|
||||
"reference": "63168a82037f371516a199d75da101c8caa3edc1"
|
||||
"reference": "45c42aae7e7d3f9f82bf194c2cfa5499b674aefe"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/utopia-php/swoole/zipball/63168a82037f371516a199d75da101c8caa3edc1",
|
||||
"reference": "63168a82037f371516a199d75da101c8caa3edc1",
|
||||
"url": "https://api.github.com/repos/utopia-php/swoole/zipball/45c42aae7e7d3f9f82bf194c2cfa5499b674aefe",
|
||||
"reference": "45c42aae7e7d3f9f82bf194c2cfa5499b674aefe",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -2003,9 +2067,9 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/utopia-php/swoole/issues",
|
||||
"source": "https://github.com/utopia-php/swoole/tree/0.2.1"
|
||||
"source": "https://github.com/utopia-php/swoole/tree/0.2.3"
|
||||
},
|
||||
"time": "2021-02-10T06:20:43+00:00"
|
||||
"time": "2021-03-22T22:39:24+00:00"
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/system",
|
||||
|
@ -2304,7 +2368,6 @@
|
|||
"require-dev": {
|
||||
"phpunit/phpunit": "^7.0"
|
||||
},
|
||||
"default-branch": true,
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
@ -3376,16 +3439,16 @@
|
|||
},
|
||||
{
|
||||
"name": "phpspec/prophecy",
|
||||
"version": "1.12.2",
|
||||
"version": "1.13.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpspec/prophecy.git",
|
||||
"reference": "245710e971a030f42e08f4912863805570f23d39"
|
||||
"reference": "be1996ed8adc35c3fd795488a653f4b518be70ea"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/245710e971a030f42e08f4912863805570f23d39",
|
||||
"reference": "245710e971a030f42e08f4912863805570f23d39",
|
||||
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/be1996ed8adc35c3fd795488a653f4b518be70ea",
|
||||
"reference": "be1996ed8adc35c3fd795488a653f4b518be70ea",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -3437,9 +3500,9 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/phpspec/prophecy/issues",
|
||||
"source": "https://github.com/phpspec/prophecy/tree/1.12.2"
|
||||
"source": "https://github.com/phpspec/prophecy/tree/1.13.0"
|
||||
},
|
||||
"time": "2020-12-19T10:15:11+00:00"
|
||||
"time": "2021-03-17T13:42:18+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-code-coverage",
|
||||
|
@ -3524,12 +3587,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
|
||||
"reference": "be176a771658571c68e432ef2b92766323500396"
|
||||
"reference": "b2ce4cf415b9989fac88e8c27c39b5ba2faad72b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/be176a771658571c68e432ef2b92766323500396",
|
||||
"reference": "be176a771658571c68e432ef2b92766323500396",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/b2ce4cf415b9989fac88e8c27c39b5ba2faad72b",
|
||||
"reference": "b2ce4cf415b9989fac88e8c27c39b5ba2faad72b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -3577,7 +3640,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-03-12T06:35:26+00:00"
|
||||
"time": "2021-03-17T06:17:19+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-invoker",
|
||||
|
@ -3585,12 +3648,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-invoker.git",
|
||||
"reference": "7d0466dfe8d95401153dbd342a68d2dc5f97aa65"
|
||||
"reference": "e2905d5648ac5e9bd0aa85b50d240e5890f76493"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/7d0466dfe8d95401153dbd342a68d2dc5f97aa65",
|
||||
"reference": "7d0466dfe8d95401153dbd342a68d2dc5f97aa65",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/e2905d5648ac5e9bd0aa85b50d240e5890f76493",
|
||||
"reference": "e2905d5648ac5e9bd0aa85b50d240e5890f76493",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -3641,7 +3704,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-03-12T06:35:32+00:00"
|
||||
"time": "2021-03-17T06:17:27+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-text-template",
|
||||
|
@ -3649,12 +3712,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-text-template.git",
|
||||
"reference": "937d542664c42822dc8da4c41b096b44926b35ef"
|
||||
"reference": "e6a2483ffd3659d723996fb8b2ca638244b87e7c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/937d542664c42822dc8da4c41b096b44926b35ef",
|
||||
"reference": "937d542664c42822dc8da4c41b096b44926b35ef",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/e6a2483ffd3659d723996fb8b2ca638244b87e7c",
|
||||
"reference": "e6a2483ffd3659d723996fb8b2ca638244b87e7c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -3701,7 +3764,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-03-12T06:35:57+00:00"
|
||||
"time": "2021-03-17T06:17:59+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-timer",
|
||||
|
@ -3709,12 +3772,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-timer.git",
|
||||
"reference": "c2e5a4f63ab592d38a758be6b8655f12b8ab0e94"
|
||||
"reference": "c0187813193d3709a455b94916bbee2881a1c6e3"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/c2e5a4f63ab592d38a758be6b8655f12b8ab0e94",
|
||||
"reference": "c2e5a4f63ab592d38a758be6b8655f12b8ab0e94",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/c0187813193d3709a455b94916bbee2881a1c6e3",
|
||||
"reference": "c0187813193d3709a455b94916bbee2881a1c6e3",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -3761,7 +3824,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-03-12T06:35:39+00:00"
|
||||
"time": "2021-03-17T06:17:35+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit",
|
||||
|
@ -3920,12 +3983,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/cli-parser.git",
|
||||
"reference": "dd99fa1f5e462d834febfd531068e79b94f63826"
|
||||
"reference": "845853b8c553f6b61d9a708b8f26066806bcc7dd"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/dd99fa1f5e462d834febfd531068e79b94f63826",
|
||||
"reference": "dd99fa1f5e462d834febfd531068e79b94f63826",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/845853b8c553f6b61d9a708b8f26066806bcc7dd",
|
||||
"reference": "845853b8c553f6b61d9a708b8f26066806bcc7dd",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -3969,7 +4032,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-03-12T06:36:17+00:00"
|
||||
"time": "2021-03-17T06:18:24+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/code-unit",
|
||||
|
@ -4033,12 +4096,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
|
||||
"reference": "2e341ac378f28444e8d5a9b1ca878f3e10d095c5"
|
||||
"reference": "ab4d610891809670894a4fc260c17e5d5960ba4c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/2e341ac378f28444e8d5a9b1ca878f3e10d095c5",
|
||||
"reference": "2e341ac378f28444e8d5a9b1ca878f3e10d095c5",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ab4d610891809670894a4fc260c17e5d5960ba4c",
|
||||
"reference": "ab4d610891809670894a4fc260c17e5d5960ba4c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -4081,7 +4144,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-03-12T06:34:30+00:00"
|
||||
"time": "2021-03-17T06:16:16+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/comparator",
|
||||
|
@ -4089,12 +4152,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/comparator.git",
|
||||
"reference": "da86fed339815cda8c93d24184902837e46f3dcf"
|
||||
"reference": "d3d66b8faa86ac57e1236d576ad003f73097c9cd"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/da86fed339815cda8c93d24184902837e46f3dcf",
|
||||
"reference": "da86fed339815cda8c93d24184902837e46f3dcf",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/d3d66b8faa86ac57e1236d576ad003f73097c9cd",
|
||||
"reference": "d3d66b8faa86ac57e1236d576ad003f73097c9cd",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -4156,7 +4219,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-03-12T06:34:37+00:00"
|
||||
"time": "2021-03-17T06:16:24+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/complexity",
|
||||
|
@ -4221,12 +4284,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/diff.git",
|
||||
"reference": "d6a6f22f17c5a6c7454eedc4d202aad1bcd69f97"
|
||||
"reference": "e81849c6dfbe34442b4685fa457fd6f012370e54"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/d6a6f22f17c5a6c7454eedc4d202aad1bcd69f97",
|
||||
"reference": "d6a6f22f17c5a6c7454eedc4d202aad1bcd69f97",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/e81849c6dfbe34442b4685fa457fd6f012370e54",
|
||||
"reference": "e81849c6dfbe34442b4685fa457fd6f012370e54",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -4280,7 +4343,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-03-12T06:34:45+00:00"
|
||||
"time": "2021-03-17T06:16:31+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/environment",
|
||||
|
@ -4288,12 +4351,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/environment.git",
|
||||
"reference": "2b55055f427dd8c7274b87f8fcebeca063553827"
|
||||
"reference": "c25633688d84a9f8694989223479051b5a8a23e7"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/2b55055f427dd8c7274b87f8fcebeca063553827",
|
||||
"reference": "2b55055f427dd8c7274b87f8fcebeca063553827",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/c25633688d84a9f8694989223479051b5a8a23e7",
|
||||
"reference": "c25633688d84a9f8694989223479051b5a8a23e7",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -4344,7 +4407,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-03-12T06:34:52+00:00"
|
||||
"time": "2021-03-17T06:16:40+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/exporter",
|
||||
|
@ -4352,12 +4415,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/exporter.git",
|
||||
"reference": "eac28a6ba06c1d2f4592caab3ecb5a573719dead"
|
||||
"reference": "9119858d42f3963d01b737f029bb90f8464fd0ca"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/eac28a6ba06c1d2f4592caab3ecb5a573719dead",
|
||||
"reference": "eac28a6ba06c1d2f4592caab3ecb5a573719dead",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/9119858d42f3963d01b737f029bb90f8464fd0ca",
|
||||
"reference": "9119858d42f3963d01b737f029bb90f8464fd0ca",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -4422,7 +4485,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-03-12T06:34:58+00:00"
|
||||
"time": "2021-03-17T06:16:48+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/global-state",
|
||||
|
@ -4430,12 +4493,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/global-state.git",
|
||||
"reference": "fdc815035b99d311787aaddee356bcdbfdacd264"
|
||||
"reference": "fe610de5530e3d29007134f76ee8dc79581a607d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/fdc815035b99d311787aaddee356bcdbfdacd264",
|
||||
"reference": "fdc815035b99d311787aaddee356bcdbfdacd264",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/fe610de5530e3d29007134f76ee8dc79581a607d",
|
||||
"reference": "fe610de5530e3d29007134f76ee8dc79581a607d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -4487,7 +4550,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-03-12T06:35:06+00:00"
|
||||
"time": "2021-03-17T06:16:56+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/lines-of-code",
|
||||
|
@ -4552,12 +4615,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/object-enumerator.git",
|
||||
"reference": "cc061578620fe00922c20aa0f563cc48c7260867"
|
||||
"reference": "01ab82e49081de59e2da70c351d5f698c77c33c5"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/cc061578620fe00922c20aa0f563cc48c7260867",
|
||||
"reference": "cc061578620fe00922c20aa0f563cc48c7260867",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/01ab82e49081de59e2da70c351d5f698c77c33c5",
|
||||
"reference": "01ab82e49081de59e2da70c351d5f698c77c33c5",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -4602,7 +4665,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-03-12T06:35:13+00:00"
|
||||
"time": "2021-03-17T06:17:03+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/object-reflector",
|
||||
|
@ -4610,12 +4673,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/object-reflector.git",
|
||||
"reference": "c792bcd052c3290774390afd13c19bb3a96b94e6"
|
||||
"reference": "7ed67aee59862b40785138f0203e86f1fde1b93a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/c792bcd052c3290774390afd13c19bb3a96b94e6",
|
||||
"reference": "c792bcd052c3290774390afd13c19bb3a96b94e6",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/7ed67aee59862b40785138f0203e86f1fde1b93a",
|
||||
"reference": "7ed67aee59862b40785138f0203e86f1fde1b93a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -4658,7 +4721,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-03-12T06:35:20+00:00"
|
||||
"time": "2021-03-17T06:17:11+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/recursion-context",
|
||||
|
@ -4666,12 +4729,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/recursion-context.git",
|
||||
"reference": "c07d99ada2b8e6e5ade4c2522af54b0f3c796387"
|
||||
"reference": "249976376508ed7e83b6dc429cd883a44b2a3c51"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/c07d99ada2b8e6e5ade4c2522af54b0f3c796387",
|
||||
"reference": "c07d99ada2b8e6e5ade4c2522af54b0f3c796387",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/249976376508ed7e83b6dc429cd883a44b2a3c51",
|
||||
"reference": "249976376508ed7e83b6dc429cd883a44b2a3c51",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -4722,7 +4785,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-03-12T06:35:45+00:00"
|
||||
"time": "2021-03-17T06:17:43+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/resource-operations",
|
||||
|
@ -4786,12 +4849,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/type.git",
|
||||
"reference": "3bbff26dad4e0aadda7d8a0b598b903fbef6c3e6"
|
||||
"reference": "e02c851008e26557b4f1b4ffd139b71c96937b04"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/type/zipball/3bbff26dad4e0aadda7d8a0b598b903fbef6c3e6",
|
||||
"reference": "3bbff26dad4e0aadda7d8a0b598b903fbef6c3e6",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/type/zipball/e02c851008e26557b4f1b4ffd139b71c96937b04",
|
||||
"reference": "e02c851008e26557b4f1b4ffd139b71c96937b04",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -4835,7 +4898,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-03-12T06:35:51+00:00"
|
||||
"time": "2021-03-17T06:17:51+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/version",
|
||||
|
@ -4934,16 +4997,17 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/console.git",
|
||||
"reference": "e8bee16c337d9553fb737adf79d6aabe330fd982"
|
||||
"reference": "5da8b675121f9f4419b7052caa0cc6118a3ccd47"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/console/zipball/e8bee16c337d9553fb737adf79d6aabe330fd982",
|
||||
"reference": "e8bee16c337d9553fb737adf79d6aabe330fd982",
|
||||
"url": "https://api.github.com/repos/symfony/console/zipball/5da8b675121f9f4419b7052caa0cc6118a3ccd47",
|
||||
"reference": "5da8b675121f9f4419b7052caa0cc6118a3ccd47",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2.5",
|
||||
"symfony/deprecation-contracts": "^2.1",
|
||||
"symfony/polyfill-mbstring": "~1.0",
|
||||
"symfony/polyfill-php73": "^1.8",
|
||||
"symfony/polyfill-php80": "^1.15",
|
||||
|
@ -5024,7 +5088,75 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-03-12T08:40:58+00:00"
|
||||
"time": "2021-03-23T14:20:07+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/deprecation-contracts",
|
||||
"version": "dev-main",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/deprecation-contracts.git",
|
||||
"reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5f38c8804a9e97d23e0c8d63341088cd8a22d627",
|
||||
"reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.1"
|
||||
},
|
||||
"default-branch": true,
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "2.4-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/contracts",
|
||||
"url": "https://github.com/symfony/contracts"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"files": [
|
||||
"function.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nicolas Grekas",
|
||||
"email": "p@tchwork.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "A generic function and convention to trigger deprecation notices",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/deprecation-contracts/tree/main"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://symfony.com/sponsor",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/fabpot",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-03-23T23:28:01+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-intl-grapheme",
|
||||
|
@ -5444,12 +5576,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/service-contracts.git",
|
||||
"reference": "96cd360b9f03a22a30cf5354e630c557bd3aac33"
|
||||
"reference": "1309413986521646bb0ba91140afdc2a61ed8cfe"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/service-contracts/zipball/96cd360b9f03a22a30cf5354e630c557bd3aac33",
|
||||
"reference": "96cd360b9f03a22a30cf5354e630c557bd3aac33",
|
||||
"url": "https://api.github.com/repos/symfony/service-contracts/zipball/1309413986521646bb0ba91140afdc2a61ed8cfe",
|
||||
"reference": "1309413986521646bb0ba91140afdc2a61ed8cfe",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -5516,7 +5648,7 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-03-05T22:51:52+00:00"
|
||||
"time": "2021-03-23T23:28:01+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/string",
|
||||
|
@ -5524,12 +5656,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/string.git",
|
||||
"reference": "6d830fae00e2bb336074eae141bb00db36cd3551"
|
||||
"reference": "01454c66c88a6bb4449dcdeb913e463e075f331b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/string/zipball/6d830fae00e2bb336074eae141bb00db36cd3551",
|
||||
"reference": "6d830fae00e2bb336074eae141bb00db36cd3551",
|
||||
"url": "https://api.github.com/repos/symfony/string/zipball/01454c66c88a6bb4449dcdeb913e463e075f331b",
|
||||
"reference": "01454c66c88a6bb4449dcdeb913e463e075f331b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -5600,7 +5732,7 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-02-17T15:27:35+00:00"
|
||||
"time": "2021-03-17T17:12:23+00:00"
|
||||
},
|
||||
{
|
||||
"name": "textalk/websocket",
|
||||
|
@ -5707,12 +5839,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/twigphp/Twig.git",
|
||||
"reference": "37e48403c21e06f63bc27d7ccd997fbb72b0ae2a"
|
||||
"reference": "116bfb0bc9ec2a39db93431b7fe67144164d251e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/twigphp/Twig/zipball/37e48403c21e06f63bc27d7ccd997fbb72b0ae2a",
|
||||
"reference": "37e48403c21e06f63bc27d7ccd997fbb72b0ae2a",
|
||||
"url": "https://api.github.com/repos/twigphp/Twig/zipball/116bfb0bc9ec2a39db93431b7fe67144164d251e",
|
||||
"reference": "116bfb0bc9ec2a39db93431b7fe67144164d251e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -5778,7 +5910,7 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-03-10T10:07:14+00:00"
|
||||
"time": "2021-03-22T08:23:49+00:00"
|
||||
},
|
||||
{
|
||||
"name": "vimeo/psalm",
|
||||
|
@ -5998,9 +6130,7 @@
|
|||
],
|
||||
"aliases": [],
|
||||
"minimum-stability": "dev",
|
||||
"stability-flags": {
|
||||
"appwrite/sdk-generator": 20
|
||||
},
|
||||
"stability-flags": [],
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": {
|
||||
|
|
60
docs/sdks/deno/GETTING_STARTED.md
Normal file
60
docs/sdks/deno/GETTING_STARTED.md
Normal file
|
@ -0,0 +1,60 @@
|
|||
## Getting Started
|
||||
|
||||
### Init your SDK
|
||||
Initialize your SDK code with your project ID which can be found in your project settings page and your new API secret Key from project's API keys section.
|
||||
|
||||
```typescript
|
||||
let client = new sdk.Client();
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
||||
;
|
||||
|
||||
```
|
||||
|
||||
### Make your first request
|
||||
|
||||
Once your SDK object is set, create any of the Appwrite service objects and choose any request to send. Full documentation for any service method you would like to use can be found in your SDK documentation or in the API References section.
|
||||
|
||||
```typescript
|
||||
let users = new sdk.Users(client);
|
||||
|
||||
let promise = users.create('email@example.com', 'password');
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response);
|
||||
}, function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
```
|
||||
|
||||
### Full Example
|
||||
```typescript
|
||||
import * as sdk from "https://deno.land/x/appwrite/mod.ts";
|
||||
|
||||
let client = new sdk.Client();
|
||||
let users = new sdk.Users(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
||||
;
|
||||
|
||||
let promise = users.create('email@example.com', 'password');
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response);
|
||||
}, function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
```
|
||||
|
||||
### Learn more
|
||||
You can use followng resources to learn more and get help
|
||||
- 🚀 [Getting Started Tutorial](https://appwrite.io/docs/getting-started-for-server)
|
||||
- 📜 [Appwrite Docs](https://appwrite.io/docs)
|
||||
- 💬 [Discord Community](https://appwrite.io/discord)
|
||||
- 🚂 [Appwrite Deno Playground](https://github.com/appwrite/playground-for-deno)
|
1
docs/sdks/dotnet/CHANGELOG.md
Normal file
1
docs/sdks/dotnet/CHANGELOG.md
Normal file
|
@ -0,0 +1 @@
|
|||
# Change Log
|
36
docs/sdks/dotnet/GETTING_STARTED.md
Normal file
36
docs/sdks/dotnet/GETTING_STARTED.md
Normal file
|
@ -0,0 +1,36 @@
|
|||
## Getting Started
|
||||
|
||||
### Initialize & Make API Request
|
||||
Once you add the dependencies, its extremely easy to get started with the SDK; All you need to do is import the package in your code, set your Appwrite credentials, and start making API calls. Below is a simple example:
|
||||
|
||||
```csharp
|
||||
using Appwrite;
|
||||
|
||||
static async Task Main(string[] args)
|
||||
{
|
||||
var client = Client();
|
||||
|
||||
client
|
||||
.setEndpoint('http://[HOSTNAME_OR_IP]/v1') // Make sure your endpoint is accessible
|
||||
.setProject('5ff3379a01d25') // Your project ID
|
||||
.setKey('cd868c7af8bdc893b4...93b7535db89')
|
||||
;
|
||||
|
||||
var users = Users(client);
|
||||
|
||||
try {
|
||||
var request = await users.create('email@example.com', 'password', 'name');
|
||||
var response = await request.Content.ReadAsStringAsync();
|
||||
Console.WriteLine(response);
|
||||
} catch (AppwriteException e) {
|
||||
Console.WriteLine(e.Message);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Learn more
|
||||
You can use followng resources to learn more and get help
|
||||
- 🚀 [Getting Started Tutorial](https://appwrite.io/docs/getting-started-for-server)
|
||||
- 📜 [Appwrite Docs](https://appwrite.io/docs)
|
||||
- 💬 [Discord Community](https://appwrite.io/discord)
|
||||
- 🚂 [Appwrite Dart Playground](https://github.com/appwrite/playground-for-dotnet)
|
49
docs/sdks/ruby/GETTING_STARTED.md
Normal file
49
docs/sdks/ruby/GETTING_STARTED.md
Normal file
|
@ -0,0 +1,49 @@
|
|||
## Getting Started
|
||||
|
||||
### Init your SDK
|
||||
Initialize your SDK code with your project ID which can be found in your project settings page and your new API secret Key from project's API keys section.
|
||||
|
||||
```ruby
|
||||
require 'appwrite'
|
||||
|
||||
client = Appwrite::Client.new()
|
||||
|
||||
client
|
||||
.set_endpoint(ENV["APPWRITE_ENDPOINT"]) # Your API Endpoint
|
||||
.set_project(ENV["APPWRITE_PROJECT"]) # Your project ID
|
||||
.set_key(ENV["APPWRITE_SECRET"]) # Your secret API key
|
||||
;
|
||||
```
|
||||
|
||||
### Make Your First Request
|
||||
Once your SDK object is set, create any of the Appwrite service objects and choose any request to send. Full documentation for any service method you would like to use can be found in your SDK documentation or in the API References section.
|
||||
|
||||
```ruby
|
||||
users = Appwrite::Users.new(client);
|
||||
|
||||
result = users.create(email: 'email@example.com', password: 'password');
|
||||
```
|
||||
|
||||
### Full Example
|
||||
```ruby
|
||||
require 'appwrite'
|
||||
|
||||
client = Appwrite::Client.new()
|
||||
|
||||
client
|
||||
.set_endpoint(ENV["APPWRITE_ENDPOINT"]) # Your API Endpoint
|
||||
.set_project(ENV["APPWRITE_PROJECT"]) # Your project ID
|
||||
.set_key(ENV["APPWRITE_SECRET"]) # Your secret API key
|
||||
;
|
||||
|
||||
users = Appwrite::Users.new(client);
|
||||
|
||||
result = users.create(email: 'email@example.com', password: 'password');
|
||||
```
|
||||
|
||||
### Learn more
|
||||
You can use followng resources to learn more and get help
|
||||
- 🚀 [Getting Started Tutorial](https://appwrite.io/docs/getting-started-for-server)
|
||||
- 📜 [Appwrite Docs](https://appwrite.io/docs)
|
||||
- 💬 [Discord Community](https://appwrite.io/discord)
|
||||
- 🚂 [Appwrite Ruby Playground](https://github.com/appwrite/playground-for-ruby)
|
|
@ -8,6 +8,9 @@
|
|||
processIsolation="false"
|
||||
stopOnFailure="false"
|
||||
>
|
||||
<extensions>
|
||||
<extension class="Appwrite\Tests\TestHook" />
|
||||
</extensions>
|
||||
<testsuites>
|
||||
<testsuite name="Application Test Suite">
|
||||
<directory>./tests/e2e/</directory>
|
||||
|
|
|
@ -501,6 +501,133 @@ trait DatabaseBase
|
|||
|
||||
$this->assertEquals($document['headers']['status-code'], 404);
|
||||
|
||||
return [];
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @depends testDeleteDocument
|
||||
*/
|
||||
public function testDefaultPermissions(array $data):array
|
||||
{
|
||||
$document = $this->client->call(Client::METHOD_POST, '/database/collections/' . $data['moviesId'] . '/documents', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
], $this->getHeaders()), [
|
||||
'data' => [
|
||||
'name' => 'Captain America',
|
||||
'releaseYear' => 1944,
|
||||
'actors' => [],
|
||||
],
|
||||
]);
|
||||
|
||||
$id = $document['body']['$id'];
|
||||
|
||||
$this->assertEquals($document['headers']['status-code'], 201);
|
||||
$this->assertEquals($document['body']['$collection'], $data['moviesId']);
|
||||
$this->assertEquals($document['body']['name'], 'Captain America');
|
||||
$this->assertEquals($document['body']['releaseYear'], 1944);
|
||||
$this->assertIsArray($document['body']['$permissions']);
|
||||
$this->assertIsArray($document['body']['$permissions']['read']);
|
||||
$this->assertIsArray($document['body']['$permissions']['write']);
|
||||
|
||||
if($this->getSide() == 'client') {
|
||||
$this->assertCount(1, $document['body']['$permissions']['read']);
|
||||
$this->assertCount(1, $document['body']['$permissions']['write']);
|
||||
$this->assertEquals(['user:'.$this->getUser()['$id']], $document['body']['$permissions']['read']);
|
||||
$this->assertEquals(['user:'.$this->getUser()['$id']], $document['body']['$permissions']['write']);
|
||||
}
|
||||
|
||||
if($this->getSide() == 'server') {
|
||||
$this->assertCount(0, $document['body']['$permissions']['read']);
|
||||
$this->assertCount(0, $document['body']['$permissions']['write']);
|
||||
$this->assertEquals([], $document['body']['$permissions']['read']);
|
||||
$this->assertEquals([], $document['body']['$permissions']['write']);
|
||||
}
|
||||
|
||||
// Updated and Inherit Permissions
|
||||
|
||||
$document = $this->client->call(Client::METHOD_PATCH, '/database/collections/' . $data['moviesId'] . '/documents/' . $id, array_merge([
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
], $this->getHeaders()), [
|
||||
'data' => [
|
||||
'name' => 'Captain America 2',
|
||||
'releaseYear' => 1945,
|
||||
'actors' => [],
|
||||
],
|
||||
'read' => ['*'],
|
||||
]);
|
||||
|
||||
$this->assertEquals($document['headers']['status-code'], 200);
|
||||
$this->assertEquals($document['body']['name'], 'Captain America 2');
|
||||
$this->assertEquals($document['body']['releaseYear'], 1945);
|
||||
|
||||
if($this->getSide() == 'client') {
|
||||
$this->assertCount(1, $document['body']['$permissions']['read']);
|
||||
$this->assertCount(1, $document['body']['$permissions']['write']);
|
||||
$this->assertEquals(['*'], $document['body']['$permissions']['read']);
|
||||
$this->assertEquals(['user:'.$this->getUser()['$id']], $document['body']['$permissions']['write']);
|
||||
}
|
||||
|
||||
if($this->getSide() == 'server') {
|
||||
$this->assertCount(1, $document['body']['$permissions']['read']);
|
||||
$this->assertCount(0, $document['body']['$permissions']['write']);
|
||||
$this->assertEquals(['*'], $document['body']['$permissions']['read']);
|
||||
$this->assertEquals([], $document['body']['$permissions']['write']);
|
||||
}
|
||||
|
||||
$document = $this->client->call(Client::METHOD_GET, '/database/collections/' . $data['moviesId'] . '/documents/' . $id, array_merge([
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
], $this->getHeaders()));
|
||||
|
||||
$this->assertEquals($document['headers']['status-code'], 200);
|
||||
$this->assertEquals($document['body']['name'], 'Captain America 2');
|
||||
$this->assertEquals($document['body']['releaseYear'], 1945);
|
||||
|
||||
if($this->getSide() == 'client') {
|
||||
$this->assertCount(1, $document['body']['$permissions']['read']);
|
||||
$this->assertCount(1, $document['body']['$permissions']['write']);
|
||||
$this->assertEquals(['*'], $document['body']['$permissions']['read']);
|
||||
$this->assertEquals(['user:'.$this->getUser()['$id']], $document['body']['$permissions']['write']);
|
||||
}
|
||||
|
||||
if($this->getSide() == 'server') {
|
||||
$this->assertCount(1, $document['body']['$permissions']['read']);
|
||||
$this->assertCount(0, $document['body']['$permissions']['write']);
|
||||
$this->assertEquals(['*'], $document['body']['$permissions']['read']);
|
||||
$this->assertEquals([], $document['body']['$permissions']['write']);
|
||||
}
|
||||
|
||||
// Reset Permissions
|
||||
|
||||
$document = $this->client->call(Client::METHOD_PATCH, '/database/collections/' . $data['moviesId'] . '/documents/' . $id, array_merge([
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
], $this->getHeaders()), [
|
||||
'data' => [
|
||||
'name' => 'Captain America 3',
|
||||
'releaseYear' => 1946,
|
||||
'actors' => [],
|
||||
],
|
||||
'read' => [],
|
||||
'write' => [],
|
||||
]);
|
||||
|
||||
if($this->getSide() == 'client') {
|
||||
$this->assertEquals($document['headers']['status-code'], 401);
|
||||
}
|
||||
|
||||
if($this->getSide() == 'server') {
|
||||
$this->assertEquals($document['headers']['status-code'], 200);
|
||||
$this->assertEquals($document['body']['name'], 'Captain America 3');
|
||||
$this->assertEquals($document['body']['releaseYear'], 1946);
|
||||
$this->assertCount(0, $document['body']['$permissions']['read']);
|
||||
$this->assertCount(0, $document['body']['$permissions']['write']);
|
||||
$this->assertEquals([], $document['body']['$permissions']['read']);
|
||||
$this->assertEquals([], $document['body']['$permissions']['write']);
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
}
|
|
@ -628,7 +628,7 @@ class FunctionsCustomServerTest extends Scope
|
|||
], $this->getHeaders()), [
|
||||
'tag' => $tagId,
|
||||
]);
|
||||
|
||||
|
||||
$this->assertEquals(200, $tag['headers']['status-code']);
|
||||
|
||||
$execution = $this->client->call(Client::METHOD_POST, '/functions/'.$functionId.'/executions', array_merge([
|
||||
|
|
|
@ -234,8 +234,9 @@ class HealthCustomServerTest extends Scope
|
|||
], $this->getHeaders()), []);
|
||||
|
||||
$this->assertEquals(200, $response['headers']['status-code']);
|
||||
$this->assertEquals('online', $response['body']['status']);
|
||||
$this->assertStringStartsWith('ClamAV ', $response['body']['version']);
|
||||
$this->assertNotEmpty($response['body']['status']);
|
||||
$this->assertIsString($response['body']['status']);
|
||||
$this->assertIsString($response['body']['version']);
|
||||
|
||||
/**
|
||||
* Test for FAILURE
|
||||
|
|
15
tests/extensions/TestHook.php
Normal file
15
tests/extensions/TestHook.php
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
namespace Appwrite\Tests;
|
||||
|
||||
use PHPUnit\Runner\AfterTestHook;
|
||||
|
||||
class TestHook implements AfterTestHook
|
||||
{
|
||||
public function executeAfterTest(string $test, float $time): void
|
||||
{
|
||||
printf("%s ended in %s seconds\n",
|
||||
$test,
|
||||
$time
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue