mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Compare commits
23
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
33fae9cce8 | ||
|
|
917677a002 | ||
|
|
25d7b37ee0 | ||
|
|
e65ed58ca4 | ||
|
|
095159d89b | ||
|
|
509392c48b | ||
|
|
520006864d | ||
|
|
5a3e44a36d | ||
|
|
22cda269b1 | ||
|
|
e8e7ee01b4 | ||
|
|
b7ffd2ca94 | ||
|
|
9356fb4cb4 | ||
|
|
41bc8272ff | ||
|
|
ad60ff9972 | ||
|
|
8c8abfdece | ||
|
|
5e345c0388 | ||
|
|
362618c5af | ||
|
|
cee6420fa2 | ||
|
|
8bac836483 | ||
|
|
01aa9fbb48 | ||
|
|
d7c3100fe9 | ||
|
|
43f9254302 | ||
|
|
710b8bda56 |
@@ -22,6 +22,7 @@ _APP_OPTIONS_FORCE_HTTPS=disabled
|
||||
_APP_OPTIONS_ROUTER_FORCE_HTTPS=disabled
|
||||
_APP_OPENSSL_KEY_V1=your-secret-key
|
||||
_APP_DOMAIN=traefik
|
||||
_APP_CONSOLE_DOMAIN=localhost
|
||||
_APP_DOMAIN_FUNCTIONS=functions.localhost
|
||||
_APP_DOMAIN_SITES=sites.localhost
|
||||
_APP_DOMAIN_TARGET_CNAME=test.localhost
|
||||
|
||||
@@ -65,7 +65,7 @@ jobs:
|
||||
sudo apt update
|
||||
sudo apt install oha
|
||||
- name: Benchmark PR
|
||||
run: 'oha -z 180s http://localhost/v1/health/version --output-format json > benchmark.json'
|
||||
run: 'oha -z 180s http://localhost/v1/health/version -j > benchmark.json'
|
||||
- name: Cleaning
|
||||
run: docker compose down -v
|
||||
- name: Installing latest version
|
||||
@@ -78,7 +78,7 @@ jobs:
|
||||
docker compose up -d
|
||||
sleep 10
|
||||
- name: Benchmark Latest
|
||||
run: oha -z 180s http://localhost/v1/health/version --output-format json > benchmark-latest.json
|
||||
run: oha -z 180s http://localhost/v1/health/version -j > benchmark-latest.json
|
||||
- name: Prepare comment
|
||||
run: |
|
||||
echo '## :sparkles: Benchmark results' > benchmark.txt
|
||||
|
||||
@@ -6,13 +6,8 @@ use Utopia\System\System;
|
||||
* List of Appwrite Sites templates
|
||||
*/
|
||||
|
||||
$protocol = System::getEnv('_APP_OPTIONS_FORCE_HTTPS') == 'disabled' ? 'http' : 'https';
|
||||
$hostname = System::getEnv('_APP_DOMAIN');
|
||||
|
||||
// TODO: Development override
|
||||
if (System::getEnv('_APP_ENV') === 'development') {
|
||||
$hostname = 'localhost';
|
||||
}
|
||||
$protocol = System::getEnv('_APP_OPTIONS_FORCE_HTTPS') === 'disabled' ? 'http' : 'https';
|
||||
$hostname = System::getEnv('_APP_CONSOLE_DOMAIN', System::getEnv('_APP_DOMAIN', ''));
|
||||
|
||||
$url = $protocol . '://' . $hostname;
|
||||
|
||||
|
||||
@@ -116,8 +116,10 @@ $createGitDeployments = function (GitHub $github, string $providerInstallationId
|
||||
}
|
||||
|
||||
$commentStatus = $isAuthorized ? 'waiting' : 'failed';
|
||||
$protocol = System::getEnv('_APP_OPTIONS_FORCE_HTTPS') === 'disabled' ? 'http' : 'https';
|
||||
$hostname = System::getEnv('_APP_CONSOLE_DOMAIN', System::getEnv('_APP_DOMAIN', ''));
|
||||
|
||||
$authorizeUrl = $request->getProtocol() . '://' . $request->getHostname() . "/console/git/authorize-contributor?projectId={$projectId}&installationId={$installationId}&repositoryId={$repositoryId}&providerPullRequestId={$providerPullRequestId}";
|
||||
$authorizeUrl = $protocol . '://' . $hostname . "/console/git/authorize-contributor?projectId={$projectId}&installationId={$installationId}&repositoryId={$repositoryId}&providerPullRequestId={$providerPullRequestId}";
|
||||
|
||||
$action = $isAuthorized ? ['type' => 'logs'] : ['type' => 'authorize', 'url' => $authorizeUrl];
|
||||
|
||||
@@ -378,7 +380,7 @@ $createGitDeployments = function (GitHub $github, string $providerInstallationId
|
||||
}
|
||||
$owner = $github->getOwnerName($providerInstallationId);
|
||||
|
||||
$providerTargetUrl = $request->getProtocol() . '://' . $request->getHostname() . "/console/project-$region-$projectId/$resourceCollection/$resourceType-$resourceId";
|
||||
$providerTargetUrl = $protocol . '://' . $hostname . "/console/project-$region-$projectId/$resourceCollection/$resourceType-$resourceId";
|
||||
$github->updateCommitStatus($repositoryName, $providerCommitHash, $owner, 'pending', $message, $providerTargetUrl, $name);
|
||||
}
|
||||
|
||||
@@ -437,6 +439,8 @@ App::get('/v1/vcs/github/authorize')
|
||||
]);
|
||||
|
||||
$appName = System::getEnv('_APP_VCS_GITHUB_APP_NAME');
|
||||
$protocol = System::getEnv('_APP_OPTIONS_FORCE_HTTPS') === 'disabled' ? 'http' : 'https';
|
||||
$hostname = System::getEnv('_APP_CONSOLE_DOMAIN', System::getEnv('_APP_DOMAIN', ''));
|
||||
|
||||
if (empty($appName)) {
|
||||
throw new Exception(Exception::GENERAL_SERVER_ERROR, 'GitHub App name is not configured. Please configure VCS (Version Control System) variables in .env file.');
|
||||
@@ -444,7 +448,7 @@ App::get('/v1/vcs/github/authorize')
|
||||
|
||||
$url = "https://github.com/apps/$appName/installations/new?" . \http_build_query([
|
||||
'state' => $state,
|
||||
'redirect_uri' => $request->getProtocol() . '://' . $request->getHostname() . "/v1/vcs/github/callback"
|
||||
'redirect_uri' => $protocol . '://' . $hostname . "/v1/vcs/github/callback"
|
||||
]);
|
||||
|
||||
$response
|
||||
@@ -494,10 +498,12 @@ App::get('/v1/vcs/github/callback')
|
||||
}
|
||||
|
||||
$region = $project->getAttribute('region', 'default');
|
||||
$protocol = System::getEnv('_APP_OPTIONS_FORCE_HTTPS') === 'disabled' ? 'http' : 'https';
|
||||
$hostname = System::getEnv('_APP_CONSOLE_DOMAIN', System::getEnv('_APP_DOMAIN', ''));
|
||||
|
||||
$defaultState = [
|
||||
'success' => $request->getProtocol() . '://' . $request->getHostname() . "/console/project-$region-$projectId/settings/git-installations",
|
||||
'failure' => $request->getProtocol() . '://' . $request->getHostname() . "/console/project-$region-$projectId/settings/git-installations",
|
||||
'success' => $protocol . '://' . $hostname . "/console/project-$region-$projectId/settings/git-installations",
|
||||
'failure' => $protocol . '://' . $hostname . "/console/project-$region-$projectId/settings/git-installations",
|
||||
];
|
||||
|
||||
$state = \array_merge($defaultState, $state ?? []);
|
||||
|
||||
+10
-21
@@ -56,7 +56,7 @@ Config::setParam('domainVerification', false);
|
||||
Config::setParam('cookieDomain', 'localhost');
|
||||
Config::setParam('cookieSamesite', Response::COOKIE_SAMESITE_NONE);
|
||||
|
||||
function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, SwooleRequest $swooleRequest, Request $request, Response $response, Log $log, Event $queueForEvents, StatsUsage $queueForStatsUsage, Func $queueForFunctions, Executor $executor, Reader $geodb, callable $isResourceBlocked, string $previewHostname, ?Key $apiKey)
|
||||
function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, SwooleRequest $swooleRequest, Request $request, Response $response, Event $queueForEvents, StatsUsage $queueForStatsUsage, Func $queueForFunctions, Executor $executor, Reader $geodb, callable $isResourceBlocked, string $previewHostname, ?Key $apiKey)
|
||||
{
|
||||
$host = $request->getHostname() ?? '';
|
||||
if (!empty($previewHostname)) {
|
||||
@@ -76,7 +76,7 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw
|
||||
}
|
||||
|
||||
$errorView = __DIR__ . '/../views/general/error.phtml';
|
||||
$url = (System::getEnv('_APP_OPTIONS_FORCE_HTTPS') == 'disabled' ? 'http' : 'https') . '://' . System::getEnv('_APP_DOMAIN', '');
|
||||
$url = (System::getEnv('_APP_OPTIONS_FORCE_HTTPS') == 'disabled' ? 'http' : 'https') . '://' . System::getEnv('_APP_CONSOLE_DOMAIN', System::getEnv('_APP_DOMAIN', ''));
|
||||
|
||||
if ($rule->isEmpty()) {
|
||||
$appDomainFunctionsFallback = System::getEnv('_APP_DOMAIN_FUNCTIONS_FALLBACK', '');
|
||||
@@ -118,11 +118,6 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw
|
||||
$project->setAttribute('accessedAt', DateTime::now());
|
||||
Authorization::skip(fn () => $dbForPlatform->updateDocument('projects', $project->getId(), $project));
|
||||
}
|
||||
|
||||
/**
|
||||
* Set projectId to update the Error hook logger, since x-appwrite-project is not available when executing custom domain function
|
||||
*/
|
||||
$log->addTag('projectId', $project->getId());
|
||||
}
|
||||
|
||||
if (array_key_exists('proxy', $project->getAttribute('services', []))) {
|
||||
@@ -267,7 +262,7 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw
|
||||
}
|
||||
|
||||
if (!$authorized) {
|
||||
$url = (System::getEnv('_APP_OPTIONS_FORCE_HTTPS') == 'disabled' ? 'http' : 'https') . "://" . System::getEnv('_APP_DOMAIN');
|
||||
$url = (System::getEnv('_APP_OPTIONS_FORCE_HTTPS') == 'disabled' ? 'http' : 'https') . "://" . System::getEnv('_APP_CONSOLE_DOMAIN', System::getEnv('_APP_DOMAIN', ''));
|
||||
$response
|
||||
->addHeader('Cache-Control', 'no-store, no-cache, must-revalidate, max-age=0')
|
||||
->addHeader('Pragma', 'no-cache')
|
||||
@@ -453,7 +448,7 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw
|
||||
$vars[$var->getAttribute('key')] = $var->getAttribute('value', '');
|
||||
}
|
||||
|
||||
$protocol = System::getEnv('_APP_OPTIONS_FORCE_HTTPS') == 'disabled' ? 'http' : 'https';
|
||||
$protocol = System::getEnv('_APP_OPTIONS_FORCE_HTTPS') === 'disabled' ? 'http' : 'https';
|
||||
$hostname = System::getEnv('_APP_DOMAIN');
|
||||
$endpoint = $protocol . '://' . $hostname . "/v1";
|
||||
|
||||
@@ -792,7 +787,6 @@ App::init()
|
||||
->inject('swooleRequest')
|
||||
->inject('request')
|
||||
->inject('response')
|
||||
->inject('log')
|
||||
->inject('console')
|
||||
->inject('project')
|
||||
->inject('dbForPlatform')
|
||||
@@ -810,7 +804,7 @@ App::init()
|
||||
->inject('previewHostname')
|
||||
->inject('devKey')
|
||||
->inject('apiKey')
|
||||
->action(function (App $utopia, SwooleRequest $swooleRequest, Request $request, Response $response, Log $log, Document $console, Document $project, Database $dbForPlatform, callable $getProjectDB, Locale $locale, array $localeCodes, array $clients, Reader $geodb, StatsUsage $queueForStatsUsage, Event $queueForEvents, Certificate $queueForCertificates, Func $queueForFunctions, Executor $executor, callable $isResourceBlocked, string $previewHostname, Document $devKey, ?Key $apiKey) {
|
||||
->action(function (App $utopia, SwooleRequest $swooleRequest, Request $request, Response $response, Document $console, Document $project, Database $dbForPlatform, callable $getProjectDB, Locale $locale, array $localeCodes, array $clients, Reader $geodb, StatsUsage $queueForStatsUsage, Event $queueForEvents, Certificate $queueForCertificates, Func $queueForFunctions, Executor $executor, callable $isResourceBlocked, string $previewHostname, Document $devKey, ?Key $apiKey) {
|
||||
/*
|
||||
* Appwrite Router
|
||||
*/
|
||||
@@ -818,7 +812,7 @@ App::init()
|
||||
$mainDomain = System::getEnv('_APP_DOMAIN', '');
|
||||
// Only run Router when external domain
|
||||
if ($host !== $mainDomain || !empty($previewHostname)) {
|
||||
if (router($utopia, $dbForPlatform, $getProjectDB, $swooleRequest, $request, $response, $log, $queueForEvents, $queueForStatsUsage, $queueForFunctions, $executor, $geodb, $isResourceBlocked, $previewHostname, $apiKey)) {
|
||||
if (router($utopia, $dbForPlatform, $getProjectDB, $swooleRequest, $request, $response, $queueForEvents, $queueForStatsUsage, $queueForFunctions, $executor, $geodb, $isResourceBlocked, $previewHostname, $apiKey)) {
|
||||
$utopia->getRoute()?->label('router', true);
|
||||
}
|
||||
}
|
||||
@@ -1100,7 +1094,7 @@ App::options()
|
||||
$mainDomain = System::getEnv('_APP_DOMAIN', '');
|
||||
// Only run Router when external domain
|
||||
if ($host !== $mainDomain || !empty($previewHostname)) {
|
||||
if (router($utopia, $dbForPlatform, $getProjectDB, $swooleRequest, $request, $response, $log, $queueForEvents, $queueForStatsUsage, $queueForFunctions, $executor, $geodb, $isResourceBlocked, $previewHostname, $apiKey)) {
|
||||
if (router($utopia, $dbForPlatform, $getProjectDB, $swooleRequest, $request, $response, $queueForEvents, $queueForStatsUsage, $queueForFunctions, $executor, $geodb, $isResourceBlocked, $previewHostname, $apiKey)) {
|
||||
$utopia->getRoute()?->label('router', true);
|
||||
}
|
||||
}
|
||||
@@ -1273,12 +1267,7 @@ App::error()
|
||||
$log->addTag('url', $request->getURI());
|
||||
$log->addTag('verboseType', get_class($error));
|
||||
$log->addTag('code', $error->getCode());
|
||||
|
||||
$tags = $log->getTags();
|
||||
if (!isset($tags['projectId'])) {
|
||||
$log->addTag('projectId', $project->getId());
|
||||
}
|
||||
|
||||
$log->addTag('projectId', $project->getId());
|
||||
$log->addTag('hostname', $request->getHostname());
|
||||
$log->addTag('locale', (string)$request->getParam('locale', $request->getHeader('x-appwrite-locale', '')));
|
||||
|
||||
@@ -1414,7 +1403,7 @@ App::get('/robots.txt')
|
||||
$template = new View(__DIR__ . '/../views/general/robots.phtml');
|
||||
$response->text($template->render(false));
|
||||
} else {
|
||||
if (router($utopia, $dbForPlatform, $getProjectDB, $swooleRequest, $request, $response, $log, $queueForEvents, $queueForStatsUsage, $queueForFunctions, $executor, $geodb, $isResourceBlocked, $previewHostname, $apiKey)) {
|
||||
if (router($utopia, $dbForPlatform, $getProjectDB, $swooleRequest, $request, $response, $queueForEvents, $queueForStatsUsage, $queueForFunctions, $executor, $geodb, $isResourceBlocked, $previewHostname, $apiKey)) {
|
||||
$utopia->getRoute()?->label('router', true);
|
||||
}
|
||||
}
|
||||
@@ -1446,7 +1435,7 @@ App::get('/humans.txt')
|
||||
$template = new View(__DIR__ . '/../views/general/humans.phtml');
|
||||
$response->text($template->render(false));
|
||||
} else {
|
||||
if (router($utopia, $dbForPlatform, $getProjectDB, $swooleRequest, $request, $response, $log, $queueForEvents, $queueForStatsUsage, $queueForFunctions, $executor, $geodb, $isResourceBlocked, $previewHostname, $apiKey)) {
|
||||
if (router($utopia, $dbForPlatform, $getProjectDB, $swooleRequest, $request, $response, $queueForEvents, $queueForStatsUsage, $queueForFunctions, $executor, $geodb, $isResourceBlocked, $previewHostname, $apiKey)) {
|
||||
$utopia->getRoute()?->label('router', true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@ use Utopia\Abuse\Abuse;
|
||||
use Utopia\App;
|
||||
use Utopia\Cache\Adapter\Filesystem;
|
||||
use Utopia\Cache\Cache;
|
||||
use Utopia\CLI\Console;
|
||||
use Utopia\Config\Config;
|
||||
use Utopia\Database\Database;
|
||||
use Utopia\Database\DateTime;
|
||||
@@ -798,12 +797,6 @@ App::shutdown()
|
||||
}
|
||||
|
||||
if (!empty($queueForDatabase->getType())) {
|
||||
Console::info("Triggering database event: \n" . \json_encode([
|
||||
'projectId' => $project->getId(),
|
||||
'databaseId' => $queueForDatabase->getDatabase()?->getId(),
|
||||
'collectionId' => $queueForDatabase->getCollection()?->getId(),
|
||||
'documentId' => $queueForDatabase->getDocument()?->getId(),
|
||||
]));
|
||||
$queueForDatabase->trigger();
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ $labelClass = '';
|
||||
$buttons = [];
|
||||
|
||||
$protocol = System::getEnv('_APP_OPTIONS_FORCE_HTTPS') == 'disabled' ? 'http' : 'https';
|
||||
$hostname = System::getEnv('_APP_DOMAIN');
|
||||
$hostname = System::getEnv('_APP_CONSOLE_DOMAIN', System::getEnv('_APP_DOMAIN', ''));
|
||||
// TODO: remove this later
|
||||
if (System::getEnv('_APP_ENV') === 'development') {
|
||||
$hostname = 'localhost';
|
||||
|
||||
@@ -864,7 +864,7 @@ $image = $this->getParam('image', '');
|
||||
<<: *x-logging
|
||||
restart: unless-stopped
|
||||
stop_signal: SIGINT
|
||||
image: openruntimes/executor:0.7.22
|
||||
image: openruntimes/executor:0.7.20
|
||||
networks:
|
||||
- appwrite
|
||||
- runtimes
|
||||
|
||||
+1
-1
@@ -67,7 +67,7 @@
|
||||
"utopia-php/platform": "0.7.*",
|
||||
"utopia-php/pools": "0.8.*",
|
||||
"utopia-php/preloader": "0.2.*",
|
||||
"utopia-php/queue": "0.11.0",
|
||||
"utopia-php/queue": "dev-feat-swoole-amqp-adapter as 0.11.1",
|
||||
"utopia-php/registry": "0.5.*",
|
||||
"utopia-php/storage": "0.18.*",
|
||||
"utopia-php/swoole": "0.8.*",
|
||||
|
||||
Generated
+135
-118
@@ -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": "55bc52686a08d64930e6af7411ac0654",
|
||||
"content-hash": "783e4b89e54e4d58f3c177c1a700da7c",
|
||||
"packages": [
|
||||
{
|
||||
"name": "adhocore/jwt",
|
||||
@@ -67,6 +67,99 @@
|
||||
],
|
||||
"time": "2025-02-18T01:00:50+00:00"
|
||||
},
|
||||
{
|
||||
"name": "appwrite-labs/php-amqplib",
|
||||
"version": "0.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/appwrite-labs/php-amqplib.git",
|
||||
"reference": "30d709df7510e784d16ad7a7f817d26fe79615a0"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/appwrite-labs/php-amqplib/zipball/30d709df7510e784d16ad7a7f817d26fe79615a0",
|
||||
"reference": "30d709df7510e784d16ad7a7f817d26fe79615a0",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-mbstring": "*",
|
||||
"ext-sockets": "*",
|
||||
"php": "^7.2||^8.0",
|
||||
"phpseclib/phpseclib": "^2.0|^3.0"
|
||||
},
|
||||
"conflict": {
|
||||
"php": "7.4.0 - 7.4.1"
|
||||
},
|
||||
"replace": {
|
||||
"php-amqplib/php-amqplib": "self.version",
|
||||
"videlalvaro/php-amqplib": "self.version"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-curl": "*",
|
||||
"nategood/httpful": "^0.2.20",
|
||||
"phpunit/phpunit": "^7.5|^9.5",
|
||||
"squizlabs/php_codesniffer": "^3.6",
|
||||
"swoole/ide-helper": "^5.0"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-swoole": "For Swoole coroutine support"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"PhpAmqpLib\\": "PhpAmqpLib/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"LGPL-2.1-or-later"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Appwrite Labs",
|
||||
"email": "team@appwrite.io",
|
||||
"role": "Fork Maintainer"
|
||||
},
|
||||
{
|
||||
"name": "Alvaro Videla",
|
||||
"role": "Original Maintainer"
|
||||
},
|
||||
{
|
||||
"name": "Raúl Araya",
|
||||
"email": "nubeiro@gmail.com",
|
||||
"role": "Maintainer"
|
||||
},
|
||||
{
|
||||
"name": "Luke Bakken",
|
||||
"email": "luke@bakken.io",
|
||||
"role": "Maintainer"
|
||||
},
|
||||
{
|
||||
"name": "Ramūnas Dronga",
|
||||
"email": "github@ramuno.lt",
|
||||
"role": "Maintainer"
|
||||
}
|
||||
],
|
||||
"description": "Fork of php-amqplib with Swoole coroutine support. A pure PHP implementation of the AMQP protocol tested against RabbitMQ.",
|
||||
"homepage": "https://github.com/appwrite-labs/php-amqplib/",
|
||||
"keywords": [
|
||||
"async",
|
||||
"coroutine",
|
||||
"message",
|
||||
"queue",
|
||||
"rabbitmq",
|
||||
"swoole"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/appwrite-labs/php-amqplib/tree/0.1.0"
|
||||
},
|
||||
"time": "2025-06-13T21:45:04+00:00"
|
||||
},
|
||||
{
|
||||
"name": "appwrite/appwrite",
|
||||
"version": "11.1.0",
|
||||
@@ -1113,16 +1206,16 @@
|
||||
},
|
||||
{
|
||||
"name": "open-telemetry/api",
|
||||
"version": "1.4.0",
|
||||
"version": "1.3.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/opentelemetry-php/api.git",
|
||||
"reference": "b3a9286f9c1c8247c83493c5b1fa475cd0cec7f7"
|
||||
"reference": "4e3bb38e069876fb73c2ce85c89583bf2b28cd86"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/opentelemetry-php/api/zipball/b3a9286f9c1c8247c83493c5b1fa475cd0cec7f7",
|
||||
"reference": "b3a9286f9c1c8247c83493c5b1fa475cd0cec7f7",
|
||||
"url": "https://api.github.com/repos/opentelemetry-php/api/zipball/4e3bb38e069876fb73c2ce85c89583bf2b28cd86",
|
||||
"reference": "4e3bb38e069876fb73c2ce85c89583bf2b28cd86",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1142,7 +1235,7 @@
|
||||
]
|
||||
},
|
||||
"branch-alias": {
|
||||
"dev-main": "1.4.x-dev"
|
||||
"dev-main": "1.1.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -1179,7 +1272,7 @@
|
||||
"issues": "https://github.com/open-telemetry/opentelemetry-php/issues",
|
||||
"source": "https://github.com/open-telemetry/opentelemetry-php"
|
||||
},
|
||||
"time": "2025-06-19T23:36:51+00:00"
|
||||
"time": "2025-05-07T12:32:21+00:00"
|
||||
},
|
||||
{
|
||||
"name": "open-telemetry/context",
|
||||
@@ -1242,16 +1335,16 @@
|
||||
},
|
||||
{
|
||||
"name": "open-telemetry/exporter-otlp",
|
||||
"version": "1.3.2",
|
||||
"version": "1.3.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/opentelemetry-php/exporter-otlp.git",
|
||||
"reference": "196f3a1dbce3b2c0f8110d164232c11ac00ddbb2"
|
||||
"reference": "8b3ca1f86d01429c73b407bf1a2075d9c187001e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/opentelemetry-php/exporter-otlp/zipball/196f3a1dbce3b2c0f8110d164232c11ac00ddbb2",
|
||||
"reference": "196f3a1dbce3b2c0f8110d164232c11ac00ddbb2",
|
||||
"url": "https://api.github.com/repos/opentelemetry-php/exporter-otlp/zipball/8b3ca1f86d01429c73b407bf1a2075d9c187001e",
|
||||
"reference": "8b3ca1f86d01429c73b407bf1a2075d9c187001e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1302,7 +1395,7 @@
|
||||
"issues": "https://github.com/open-telemetry/opentelemetry-php/issues",
|
||||
"source": "https://github.com/open-telemetry/opentelemetry-php"
|
||||
},
|
||||
"time": "2025-06-16T00:24:51+00:00"
|
||||
"time": "2025-05-21T12:02:20+00:00"
|
||||
},
|
||||
{
|
||||
"name": "open-telemetry/gen-otlp-protobuf",
|
||||
@@ -1369,22 +1462,22 @@
|
||||
},
|
||||
{
|
||||
"name": "open-telemetry/sdk",
|
||||
"version": "1.6.0",
|
||||
"version": "1.5.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/opentelemetry-php/sdk.git",
|
||||
"reference": "1c0371794e4c0700afd4a9d4d8511cb5e3f78e6a"
|
||||
"reference": "cd0d7367599717fc29e04eb8838ec061e6c2c657"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/opentelemetry-php/sdk/zipball/1c0371794e4c0700afd4a9d4d8511cb5e3f78e6a",
|
||||
"reference": "1c0371794e4c0700afd4a9d4d8511cb5e3f78e6a",
|
||||
"url": "https://api.github.com/repos/opentelemetry-php/sdk/zipball/cd0d7367599717fc29e04eb8838ec061e6c2c657",
|
||||
"reference": "cd0d7367599717fc29e04eb8838ec061e6c2c657",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"nyholm/psr7-server": "^1.1",
|
||||
"open-telemetry/api": "~1.4.0",
|
||||
"open-telemetry/api": "~1.0 || ~1.1",
|
||||
"open-telemetry/context": "^1.0",
|
||||
"open-telemetry/sem-conv": "^1.0",
|
||||
"php": "^8.1",
|
||||
@@ -1407,10 +1500,6 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"spi": {
|
||||
"OpenTelemetry\\API\\Configuration\\ConfigEnv\\EnvComponentLoader": [
|
||||
"OpenTelemetry\\API\\Instrumentation\\Configuration\\General\\ConfigEnv\\EnvComponentLoaderHttpConfig",
|
||||
"OpenTelemetry\\API\\Instrumentation\\Configuration\\General\\ConfigEnv\\EnvComponentLoaderPeerConfig"
|
||||
],
|
||||
"OpenTelemetry\\API\\Instrumentation\\AutoInstrumentation\\HookManagerInterface": [
|
||||
"OpenTelemetry\\API\\Instrumentation\\AutoInstrumentation\\ExtensionHookManager"
|
||||
]
|
||||
@@ -1459,7 +1548,7 @@
|
||||
"issues": "https://github.com/open-telemetry/opentelemetry-php/issues",
|
||||
"source": "https://github.com/open-telemetry/opentelemetry-php"
|
||||
},
|
||||
"time": "2025-06-19T23:36:51+00:00"
|
||||
"time": "2025-05-22T02:33:34+00:00"
|
||||
},
|
||||
{
|
||||
"name": "open-telemetry/sem-conv",
|
||||
@@ -1635,87 +1724,6 @@
|
||||
},
|
||||
"time": "2020-10-15T08:29:30+00:00"
|
||||
},
|
||||
{
|
||||
"name": "php-amqplib/php-amqplib",
|
||||
"version": "v3.7.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-amqplib/php-amqplib.git",
|
||||
"reference": "9f50fe69a9f1a19e2cb25596a354d705de36fe59"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-amqplib/php-amqplib/zipball/9f50fe69a9f1a19e2cb25596a354d705de36fe59",
|
||||
"reference": "9f50fe69a9f1a19e2cb25596a354d705de36fe59",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-mbstring": "*",
|
||||
"ext-sockets": "*",
|
||||
"php": "^7.2||^8.0",
|
||||
"phpseclib/phpseclib": "^2.0|^3.0"
|
||||
},
|
||||
"conflict": {
|
||||
"php": "7.4.0 - 7.4.1"
|
||||
},
|
||||
"replace": {
|
||||
"videlalvaro/php-amqplib": "self.version"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-curl": "*",
|
||||
"nategood/httpful": "^0.2.20",
|
||||
"phpunit/phpunit": "^7.5|^9.5",
|
||||
"squizlabs/php_codesniffer": "^3.6"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"PhpAmqpLib\\": "PhpAmqpLib/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"LGPL-2.1-or-later"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Alvaro Videla",
|
||||
"role": "Original Maintainer"
|
||||
},
|
||||
{
|
||||
"name": "Raúl Araya",
|
||||
"email": "nubeiro@gmail.com",
|
||||
"role": "Maintainer"
|
||||
},
|
||||
{
|
||||
"name": "Luke Bakken",
|
||||
"email": "luke@bakken.io",
|
||||
"role": "Maintainer"
|
||||
},
|
||||
{
|
||||
"name": "Ramūnas Dronga",
|
||||
"email": "github@ramuno.lt",
|
||||
"role": "Maintainer"
|
||||
}
|
||||
],
|
||||
"description": "Formerly videlalvaro/php-amqplib. This library is a pure PHP implementation of the AMQP protocol. It's been tested against RabbitMQ.",
|
||||
"homepage": "https://github.com/php-amqplib/php-amqplib/",
|
||||
"keywords": [
|
||||
"message",
|
||||
"queue",
|
||||
"rabbitmq"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/php-amqplib/php-amqplib/issues",
|
||||
"source": "https://github.com/php-amqplib/php-amqplib/tree/v3.7.3"
|
||||
},
|
||||
"time": "2025-02-18T20:11:13+00:00"
|
||||
},
|
||||
{
|
||||
"name": "php-http/discovery",
|
||||
"version": "1.20.0",
|
||||
@@ -4255,21 +4263,21 @@
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/queue",
|
||||
"version": "0.11.0",
|
||||
"version": "dev-feat-swoole-amqp-adapter",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/utopia-php/queue.git",
|
||||
"reference": "06b5ced0eaed2ecc6aab6d8e1b4d96bff37a1ce5"
|
||||
"reference": "baa8c074ce1d73769cab61d2a1c2c4a9e4f97896"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/utopia-php/queue/zipball/06b5ced0eaed2ecc6aab6d8e1b4d96bff37a1ce5",
|
||||
"reference": "06b5ced0eaed2ecc6aab6d8e1b4d96bff37a1ce5",
|
||||
"url": "https://api.github.com/repos/utopia-php/queue/zipball/baa8c074ce1d73769cab61d2a1c2c4a9e4f97896",
|
||||
"reference": "baa8c074ce1d73769cab61d2a1c2c4a9e4f97896",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"appwrite-labs/php-amqplib": "0.1.0",
|
||||
"php": ">=8.3",
|
||||
"php-amqplib/php-amqplib": "^3.7",
|
||||
"utopia-php/cli": "0.15.*",
|
||||
"utopia-php/fetch": "0.4.*",
|
||||
"utopia-php/framework": "0.33.*",
|
||||
@@ -4315,9 +4323,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/utopia-php/queue/issues",
|
||||
"source": "https://github.com/utopia-php/queue/tree/0.11.0"
|
||||
"source": "https://github.com/utopia-php/queue/tree/feat-swoole-amqp-adapter"
|
||||
},
|
||||
"time": "2025-05-30T09:52:38+00:00"
|
||||
"time": "2025-06-23T19:50:06+00:00"
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/registry",
|
||||
@@ -5151,16 +5159,16 @@
|
||||
},
|
||||
{
|
||||
"name": "matthiasmullie/minify",
|
||||
"version": "1.3.75",
|
||||
"version": "1.3.74",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/matthiasmullie/minify.git",
|
||||
"reference": "76ba4a5f555fd7bf4aa408af608e991569076671"
|
||||
"reference": "a2593286a4135d03c6a6a9e9aeded5d41e931ce4"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/matthiasmullie/minify/zipball/76ba4a5f555fd7bf4aa408af608e991569076671",
|
||||
"reference": "76ba4a5f555fd7bf4aa408af608e991569076671",
|
||||
"url": "https://api.github.com/repos/matthiasmullie/minify/zipball/a2593286a4135d03c6a6a9e9aeded5d41e931ce4",
|
||||
"reference": "a2593286a4135d03c6a6a9e9aeded5d41e931ce4",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -5209,7 +5217,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/matthiasmullie/minify/issues",
|
||||
"source": "https://github.com/matthiasmullie/minify/tree/1.3.75"
|
||||
"source": "https://github.com/matthiasmullie/minify/tree/1.3.74"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -5217,7 +5225,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2025-06-25T09:56:19+00:00"
|
||||
"time": "2025-06-12T08:06:04+00:00"
|
||||
},
|
||||
{
|
||||
"name": "matthiasmullie/path-converter",
|
||||
@@ -8235,9 +8243,18 @@
|
||||
"time": "2024-03-07T20:33:40+00:00"
|
||||
}
|
||||
],
|
||||
"aliases": [],
|
||||
"aliases": [
|
||||
{
|
||||
"package": "utopia-php/queue",
|
||||
"version": "dev-feat-swoole-amqp-adapter",
|
||||
"alias": "0.11.1",
|
||||
"alias_normalized": "0.11.1.0"
|
||||
}
|
||||
],
|
||||
"minimum-stability": "stable",
|
||||
"stability-flags": {},
|
||||
"stability-flags": {
|
||||
"utopia-php/queue": 20
|
||||
},
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": {
|
||||
|
||||
+4
-2
@@ -116,6 +116,7 @@ services:
|
||||
- _APP_OPTIONS_ROUTER_FORCE_HTTPS
|
||||
- _APP_OPENSSL_KEY_V1
|
||||
- _APP_DOMAIN
|
||||
- _APP_CONSOLE_DOMAIN
|
||||
- _APP_DOMAIN_TARGET_CNAME
|
||||
- _APP_DOMAIN_TARGET_AAAA
|
||||
- _APP_DOMAIN_TARGET_A
|
||||
@@ -213,7 +214,7 @@ services:
|
||||
appwrite-console:
|
||||
<<: *x-logging
|
||||
container_name: appwrite-console
|
||||
image: appwrite/console:6.0.41
|
||||
image: appwrite/console:6.1.2
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- appwrite
|
||||
@@ -481,6 +482,7 @@ services:
|
||||
- _APP_OPTIONS_FORCE_HTTPS
|
||||
- _APP_OPTIONS_ROUTER_FORCE_HTTPS
|
||||
- _APP_DOMAIN
|
||||
- _APP_CONSOLE_DOMAIN
|
||||
- _APP_STORAGE_DEVICE
|
||||
- _APP_STORAGE_S3_ACCESS_KEY
|
||||
- _APP_STORAGE_S3_SECRET
|
||||
@@ -951,7 +953,7 @@ services:
|
||||
hostname: exc1
|
||||
<<: *x-logging
|
||||
stop_signal: SIGINT
|
||||
image: openruntimes/executor:0.7.22
|
||||
image: openruntimes/executor:0.7.20
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- appwrite
|
||||
|
||||
@@ -54,16 +54,6 @@ class Database extends Event
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns set database for this event.
|
||||
*
|
||||
* @return null|Document
|
||||
*/
|
||||
public function getDatabase(): ?Document
|
||||
{
|
||||
return $this->database;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the collection for this database event.
|
||||
*
|
||||
|
||||
@@ -6,7 +6,6 @@ use Appwrite\Event\Build;
|
||||
use Appwrite\Extend\Exception;
|
||||
use Utopia\Database\Database;
|
||||
use Utopia\Database\Document;
|
||||
use Utopia\Database\Exception\Duplicate;
|
||||
use Utopia\Database\Helpers\ID;
|
||||
use Utopia\Database\Helpers\Permission;
|
||||
use Utopia\Database\Helpers\Role;
|
||||
@@ -227,73 +226,6 @@ class Base extends Action
|
||||
]))
|
||||
);
|
||||
|
||||
if (!empty($commitDetails['commitHash'])) {
|
||||
$domain = "commit-" . substr($commitDetails['commitHash'], 0, 16) . ".{$sitesDomain}";
|
||||
$ruleId = md5($domain);
|
||||
try {
|
||||
Authorization::skip(
|
||||
fn () => $dbForPlatform->createDocument('rules', new Document([
|
||||
'$id' => $ruleId,
|
||||
'projectId' => $project->getId(),
|
||||
'projectInternalId' => $project->getInternalId(),
|
||||
'domain' => $domain,
|
||||
'type' => 'deployment',
|
||||
'trigger' => 'deployment',
|
||||
'deploymentId' => $deployment->getId(),
|
||||
'deploymentInternalId' => $deployment->getInternalId(),
|
||||
'deploymentResourceType' => 'site',
|
||||
'deploymentResourceId' => $site->getId(),
|
||||
'deploymentResourceInternalId' => $site->getInternalId(),
|
||||
'deploymentVcsProviderBranch' => $providerBranch,
|
||||
'status' => 'verified',
|
||||
'certificateId' => '',
|
||||
'search' => implode(' ', [$ruleId, $domain]),
|
||||
'owner' => 'Appwrite',
|
||||
'region' => $project->getAttribute('region')
|
||||
]))
|
||||
);
|
||||
} catch (Duplicate $err) {
|
||||
// Ignore, rule already exists; will be updated by builds worker
|
||||
}
|
||||
}
|
||||
|
||||
// VCS branch preview
|
||||
if (!empty($providerBranch)) {
|
||||
$branchPrefix = substr($providerBranch, 0, 16);
|
||||
if (strlen($providerBranch) > 16) {
|
||||
$remainingChars = substr($providerBranch, 16);
|
||||
$branchPrefix .= '-' . substr(hash('sha256', $remainingChars), 0, 7);
|
||||
}
|
||||
$resourceProjectHash = substr(hash('sha256', $site->getId() . $project->getId()), 0, 7);
|
||||
$domain = "branch-{$branchPrefix}-{$resourceProjectHash}.{$sitesDomain}";
|
||||
$ruleId = md5($domain);
|
||||
try {
|
||||
Authorization::skip(
|
||||
fn () => $dbForPlatform->createDocument('rules', new Document([
|
||||
'$id' => $ruleId,
|
||||
'projectId' => $project->getId(),
|
||||
'projectInternalId' => $project->getInternalId(),
|
||||
'domain' => $domain,
|
||||
'type' => 'deployment',
|
||||
'trigger' => 'deployment',
|
||||
'deploymentId' => $deployment->getId(),
|
||||
'deploymentInternalId' => $deployment->getInternalId(),
|
||||
'deploymentResourceType' => 'site',
|
||||
'deploymentResourceId' => $site->getId(),
|
||||
'deploymentResourceInternalId' => $site->getInternalId(),
|
||||
'deploymentVcsProviderBranch' => $providerBranch,
|
||||
'status' => 'verified',
|
||||
'certificateId' => '',
|
||||
'search' => implode(' ', [$ruleId, $domain]),
|
||||
'owner' => 'Appwrite',
|
||||
'region' => $project->getAttribute('region')
|
||||
]))
|
||||
);
|
||||
} catch (Duplicate $err) {
|
||||
// Ignore, rule already exists; will be updated by builds worker
|
||||
}
|
||||
}
|
||||
|
||||
$queueForBuilds
|
||||
->setType(BUILD_TYPE_DEPLOYMENT)
|
||||
->setResource($site)
|
||||
|
||||
@@ -57,7 +57,7 @@ class Get extends Action
|
||||
->param('type', '', new WhiteList(['rules']), 'Resource type.')
|
||||
->inject('response')
|
||||
->inject('dbForPlatform')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(
|
||||
|
||||
@@ -87,7 +87,7 @@ class Create extends Action
|
||||
->inject('deviceForLocal')
|
||||
->inject('queueForBuilds')
|
||||
->inject('plan')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(
|
||||
|
||||
@@ -62,7 +62,7 @@ class Delete extends Action
|
||||
->inject('queueForDeletes')
|
||||
->inject('queueForEvents')
|
||||
->inject('deviceForFunctions')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(
|
||||
|
||||
@@ -61,7 +61,7 @@ class Get extends Action
|
||||
->inject('dbForProject')
|
||||
->inject('deviceForFunctions')
|
||||
->inject('deviceForBuilds')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(
|
||||
|
||||
@@ -62,7 +62,7 @@ class Create extends Action
|
||||
->inject('queueForEvents')
|
||||
->inject('queueForBuilds')
|
||||
->inject('deviceForFunctions')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(
|
||||
|
||||
@@ -49,7 +49,7 @@ class Get extends Action
|
||||
->param('deploymentId', '', new UID(), 'Deployment ID.')
|
||||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(
|
||||
|
||||
@@ -59,7 +59,7 @@ class Update extends Action
|
||||
->inject('project')
|
||||
->inject('queueForEvents')
|
||||
->inject('executor')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(
|
||||
|
||||
@@ -75,7 +75,7 @@ class Create extends Base
|
||||
->inject('project')
|
||||
->inject('queueForBuilds')
|
||||
->inject('gitHub')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(
|
||||
|
||||
@@ -72,7 +72,7 @@ class Create extends Base
|
||||
->inject('queueForEvents')
|
||||
->inject('queueForBuilds')
|
||||
->inject('gitHub')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(
|
||||
|
||||
@@ -57,7 +57,7 @@ class XList extends Action
|
||||
->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true)
|
||||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(
|
||||
|
||||
@@ -94,7 +94,7 @@ class Create extends Base
|
||||
->inject('queueForFunctions')
|
||||
->inject('geodb')
|
||||
->inject('executor')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(
|
||||
|
||||
@@ -62,7 +62,7 @@ class Delete extends Base
|
||||
->inject('dbForProject')
|
||||
->inject('dbForPlatform')
|
||||
->inject('queueForEvents')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(
|
||||
|
||||
@@ -52,7 +52,7 @@ class Get extends Base
|
||||
->param('executionId', '', new UID(), 'Execution ID.')
|
||||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(
|
||||
|
||||
@@ -58,7 +58,7 @@ class XList extends Base
|
||||
->param('queries', [], new Executions(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Executions::ALLOWED_ATTRIBUTES), true)
|
||||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(
|
||||
|
||||
@@ -114,7 +114,7 @@ class Create extends Base
|
||||
->inject('dbForPlatform')
|
||||
->inject('request')
|
||||
->inject('gitHub')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(
|
||||
|
||||
@@ -61,7 +61,7 @@ class Delete extends Base
|
||||
->inject('queueForDeletes')
|
||||
->inject('queueForEvents')
|
||||
->inject('dbForPlatform')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(
|
||||
|
||||
@@ -62,7 +62,7 @@ class Update extends Base
|
||||
->inject('dbForProject')
|
||||
->inject('queueForEvents')
|
||||
->inject('dbForPlatform')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(
|
||||
|
||||
@@ -49,7 +49,7 @@ class Get extends Base
|
||||
->param('functionId', '', new UID(), 'Function ID.')
|
||||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(
|
||||
|
||||
@@ -104,7 +104,7 @@ class Update extends Base
|
||||
->inject('dbForPlatform')
|
||||
->inject('gitHub')
|
||||
->inject('executor')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(
|
||||
|
||||
@@ -56,7 +56,7 @@ class XList extends Base
|
||||
->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true)
|
||||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(
|
||||
|
||||
@@ -47,7 +47,7 @@ class XList extends Base
|
||||
]
|
||||
))
|
||||
->inject('response')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(Response $response)
|
||||
|
||||
@@ -48,7 +48,7 @@ class XList extends Base
|
||||
))
|
||||
->inject('response')
|
||||
->inject('plan')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(Response $response, array $plan)
|
||||
|
||||
@@ -49,7 +49,7 @@ class Get extends Base
|
||||
))
|
||||
->param('templateId', '', new Text(128), 'Template ID.')
|
||||
->inject('response')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(string $templateId, Response $response)
|
||||
|
||||
@@ -53,7 +53,7 @@ class XList extends Base
|
||||
->param('limit', 25, new Range(1, 5000), 'Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.', true)
|
||||
->param('offset', 0, new Range(0, 5000), 'Offset the list of returned templates. Maximum offset is 5000.', true)
|
||||
->inject('response')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(array $runtimes, array $usecases, int $limit, int $offset, Response $response)
|
||||
|
||||
@@ -55,7 +55,7 @@ class Get extends Base
|
||||
->param('range', '30d', new WhiteList(['24h', '30d', '90d']), 'Date range.', true)
|
||||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(string $functionId, string $range, Response $response, Database $dbForProject)
|
||||
|
||||
@@ -52,7 +52,7 @@ class XList extends Base
|
||||
->param('range', '30d', new WhiteList(['24h', '30d', '90d']), 'Date range.', true)
|
||||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(string $range, Response $response, Database $dbForProject)
|
||||
|
||||
@@ -65,7 +65,7 @@ class Create extends Base
|
||||
->inject('dbForProject')
|
||||
->inject('dbForPlatform')
|
||||
->inject('project')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(
|
||||
|
||||
@@ -57,7 +57,7 @@ class Delete extends Base
|
||||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->inject('dbForPlatform')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(
|
||||
|
||||
@@ -53,7 +53,7 @@ class Get extends Base
|
||||
->param('variableId', '', new UID(), 'Variable unique ID.', false)
|
||||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(string $functionId, string $variableId, Response $response, Database $dbForProject)
|
||||
|
||||
@@ -61,7 +61,7 @@ class Update extends Base
|
||||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->inject('dbForPlatform')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(
|
||||
|
||||
@@ -53,7 +53,7 @@ class XList extends Base
|
||||
->param('functionId', '', new UID(), 'Function unique ID.', false)
|
||||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(string $functionId, Response $response, Database $dbForProject)
|
||||
|
||||
@@ -75,7 +75,7 @@ class Builds extends Action
|
||||
->inject('log')
|
||||
->inject('executor')
|
||||
->inject('plan')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -209,9 +209,6 @@ class Builds extends Action
|
||||
Executor $executor,
|
||||
array $plan
|
||||
): void {
|
||||
$startTime = DateTime::now();
|
||||
$durationStart = \microtime(true);
|
||||
|
||||
$resourceKey = match ($resource->getCollection()) {
|
||||
'functions' => 'functionId',
|
||||
'sites' => 'siteId',
|
||||
@@ -263,6 +260,9 @@ class Builds extends Action
|
||||
->setParam($resourceKey, $resource->getId())
|
||||
->setParam('deploymentId', $deployment->getId());
|
||||
|
||||
$startTime = DateTime::now();
|
||||
$durationStart = \microtime(true);
|
||||
|
||||
if ($deployment->getAttribute('status') === 'canceled') {
|
||||
Console::info('Build has been canceled');
|
||||
return;
|
||||
@@ -594,7 +594,7 @@ class Builds extends Action
|
||||
]);
|
||||
|
||||
$protocol = System::getEnv('_APP_OPTIONS_FORCE_HTTPS') == 'disabled' ? 'http' : 'https';
|
||||
$hostname = System::getEnv('_APP_DOMAIN');
|
||||
$hostname = System::getEnv('_APP_CONSOLE_DOMAIN', System::getEnv('_APP_DOMAIN', ''));
|
||||
$endpoint = $protocol . '://' . $hostname . "/v1";
|
||||
|
||||
// Appwrite vars
|
||||
@@ -810,6 +810,9 @@ class Builds extends Action
|
||||
throw $err;
|
||||
}
|
||||
|
||||
$endTime = DateTime::now();
|
||||
$durationEnd = \microtime(true);
|
||||
|
||||
$buildSizeLimit = (int)System::getEnv('_APP_COMPUTE_BUILD_SIZE_LIMIT', '2000000000');
|
||||
if (isset($plan['buildSize'])) {
|
||||
$buildSizeLimit = $plan['buildSize'] * 1000 * 1000;
|
||||
@@ -818,6 +821,10 @@ class Builds extends Action
|
||||
throw new \Exception('Build size should be less than ' . number_format($buildSizeLimit / (1000 * 1000), 2) . ' MBs.');
|
||||
}
|
||||
|
||||
/** Update the build document */
|
||||
$deployment->setAttribute('buildStartedAt', DateTime::format((new \DateTime())->setTimestamp(floor($response['startTime']))));
|
||||
$deployment->setAttribute('buildEndedAt', $endTime);
|
||||
$deployment->setAttribute('buildDuration', \intval(\ceil($durationEnd - $durationStart)));
|
||||
$deployment->setAttribute('buildPath', $response['path']);
|
||||
$deployment->setAttribute('buildSize', $response['size']);
|
||||
$deployment->setAttribute('totalSize', $deployment->getAttribute('buildSize', 0) + $deployment->getAttribute('sourceSize', 0));
|
||||
@@ -1184,15 +1191,6 @@ class Builds extends Action
|
||||
}
|
||||
}
|
||||
|
||||
$endTime = DateTime::now();
|
||||
$durationEnd = \microtime(true);
|
||||
$deployment->setAttribute('buildEndedAt', $endTime);
|
||||
$deployment->setAttribute('buildDuration', \intval(\ceil($durationEnd - $durationStart)));
|
||||
$deployment = $dbForProject->updateDocument('deployments', $deployment->getId(), $deployment);
|
||||
$queueForRealtime
|
||||
->setPayload($deployment->getArrayCopy())
|
||||
->trigger();
|
||||
|
||||
if ($dbForProject->getDocument('deployments', $deploymentId)->getAttribute('status') === 'canceled') {
|
||||
Console::info('Build has been canceled');
|
||||
return;
|
||||
@@ -1236,7 +1234,7 @@ class Builds extends Action
|
||||
|
||||
// Combine with previous logs if deployment got past build process
|
||||
$previousLogs = '';
|
||||
if (!is_null($deployment->getAttribute('buildSize', null))) {
|
||||
if (!empty($deployment->getAttribute('buildEndedAt', ''))) {
|
||||
$previousLogs = $deployment->getAttribute('buildLogs', '');
|
||||
if (!empty($previousLogs)) {
|
||||
$message = $previousLogs . "\n" . $message;
|
||||
@@ -1442,7 +1440,7 @@ class Builds extends Action
|
||||
$name = "{$resourceName} ({$projectName})";
|
||||
|
||||
$protocol = System::getEnv('_APP_OPTIONS_FORCE_HTTPS') == 'disabled' ? 'http' : 'https';
|
||||
$hostname = System::getEnv('_APP_DOMAIN');
|
||||
$hostname = System::getEnv('_APP_CONSOLE_DOMAIN', System::getEnv('_APP_DOMAIN', ''));
|
||||
|
||||
$projectId = $project->getId();
|
||||
$region = $project->getAttribute('region', 'default');
|
||||
|
||||
@@ -57,7 +57,7 @@ class Create extends Action
|
||||
->inject('user')
|
||||
->inject('response')
|
||||
->inject('dbForPlatform')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(string $projectId, string $name, ?string $expire, Document $user, Response $response, Database $dbForPlatform)
|
||||
|
||||
@@ -49,7 +49,7 @@ class Delete extends Action
|
||||
->param('keyId', '', new UID(), 'Key unique ID.')
|
||||
->inject('response')
|
||||
->inject('dbForPlatform')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(string $projectId, string $keyId, Response $response, Database $dbForPlatform)
|
||||
|
||||
@@ -49,7 +49,7 @@ class Get extends Action
|
||||
->param('keyId', '', new UID(), 'Key unique ID.')
|
||||
->inject('response')
|
||||
->inject('dbForPlatform')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(string $projectId, string $keyId, Response $response, Database $dbForPlatform)
|
||||
|
||||
@@ -52,7 +52,7 @@ class Update extends Action
|
||||
->param('expire', null, new DatetimeValidator(), 'Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.')
|
||||
->inject('response')
|
||||
->inject('dbForPlatform')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
public function action(string $projectId, string $keyId, string $name, ?string $expire, Response $response, Database $dbForPlatform)
|
||||
{
|
||||
|
||||
@@ -53,7 +53,7 @@ class XList extends Action
|
||||
->param('queries', [], new DevKeys(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', DevKeys::ALLOWED_ATTRIBUTES), true)
|
||||
->inject('response')
|
||||
->inject('dbForPlatform')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(string $projectId, ?array $queries, Response $response, Database $dbForPlatform)
|
||||
|
||||
@@ -66,7 +66,7 @@ class Create extends Action
|
||||
->inject('queueForCertificates')
|
||||
->inject('queueForEvents')
|
||||
->inject('dbForPlatform')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(string $domain, Response $response, Document $project, Certificate $queueForCertificates, Event $queueForEvents, Database $dbForPlatform)
|
||||
|
||||
@@ -71,7 +71,7 @@ class Create extends Action
|
||||
->inject('queueForEvents')
|
||||
->inject('dbForPlatform')
|
||||
->inject('dbForProject')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(string $domain, string $functionId, string $branch, Response $response, Document $project, Certificate $queueForCertificates, Event $queueForEvents, Database $dbForPlatform, Database $dbForProject)
|
||||
|
||||
@@ -74,7 +74,7 @@ class Create extends Action
|
||||
->inject('queueForEvents')
|
||||
->inject('dbForPlatform')
|
||||
->inject('dbForProject')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(string $domain, string $url, int $statusCode, string $resourceId, string $resourceType, Response $response, Document $project, Certificate $queueForCertificates, Event $queueForEvents, Database $dbForPlatform, Database $dbForProject)
|
||||
|
||||
@@ -71,7 +71,7 @@ class Create extends Action
|
||||
->inject('queueForEvents')
|
||||
->inject('dbForPlatform')
|
||||
->inject('dbForProject')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(string $domain, string $siteId, string $branch, Response $response, Document $project, Certificate $queueForCertificates, Event $queueForEvents, Database $dbForPlatform, Database $dbForProject)
|
||||
|
||||
@@ -86,7 +86,7 @@ class Create extends Action
|
||||
->inject('deviceForLocal')
|
||||
->inject('queueForBuilds')
|
||||
->inject('plan')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(
|
||||
|
||||
@@ -62,7 +62,7 @@ class Delete extends Action
|
||||
->inject('queueForDeletes')
|
||||
->inject('queueForEvents')
|
||||
->inject('deviceForSites')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(
|
||||
|
||||
@@ -60,7 +60,7 @@ class Get extends Action
|
||||
->inject('dbForProject')
|
||||
->inject('deviceForSites')
|
||||
->inject('deviceForBuilds')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(
|
||||
|
||||
@@ -65,7 +65,7 @@ class Create extends Action
|
||||
->inject('queueForEvents')
|
||||
->inject('queueForBuilds')
|
||||
->inject('deviceForSites')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(
|
||||
|
||||
@@ -49,7 +49,7 @@ class Get extends Action
|
||||
->param('deploymentId', '', new UID(), 'Deployment ID.')
|
||||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(string $siteId, string $deploymentId, Response $response, Database $dbForProject)
|
||||
|
||||
@@ -57,7 +57,7 @@ class Update extends Action
|
||||
->inject('project')
|
||||
->inject('queueForEvents')
|
||||
->inject('executor')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(
|
||||
|
||||
@@ -77,7 +77,7 @@ class Create extends Base
|
||||
->inject('queueForEvents')
|
||||
->inject('queueForBuilds')
|
||||
->inject('gitHub')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(
|
||||
|
||||
@@ -72,7 +72,7 @@ class Create extends Base
|
||||
->inject('queueForEvents')
|
||||
->inject('queueForBuilds')
|
||||
->inject('gitHub')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(
|
||||
|
||||
@@ -57,7 +57,7 @@ class XList extends Action
|
||||
->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true)
|
||||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(string $siteId, array $queries, string $search, Response $response, Database $dbForProject)
|
||||
|
||||
@@ -46,7 +46,7 @@ class XList extends Base
|
||||
]
|
||||
))
|
||||
->inject('response')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(Response $response)
|
||||
|
||||
@@ -55,7 +55,7 @@ class Delete extends Base
|
||||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->inject('queueForEvents')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(string $siteId, string $logId, Response $response, Database $dbForProject, Event $queueForEvents)
|
||||
|
||||
@@ -50,7 +50,7 @@ class Get extends Base
|
||||
->param('logId', '', new UID(), 'Log ID.')
|
||||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(string $siteId, string $logId, Response $response, Database $dbForProject)
|
||||
|
||||
@@ -57,7 +57,7 @@ class XList extends Base
|
||||
->param('queries', [], new Logs(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', Executions::ALLOWED_ATTRIBUTES), true)
|
||||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(string $siteId, array $queries, Response $response, Database $dbForProject)
|
||||
|
||||
@@ -89,7 +89,7 @@ class Create extends Base
|
||||
->inject('project')
|
||||
->inject('queueForEvents')
|
||||
->inject('dbForPlatform')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(
|
||||
|
||||
@@ -58,7 +58,7 @@ class Delete extends Base
|
||||
->inject('dbForProject')
|
||||
->inject('queueForDeletes')
|
||||
->inject('queueForEvents')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(
|
||||
|
||||
@@ -60,7 +60,7 @@ class Update extends Base
|
||||
->inject('dbForProject')
|
||||
->inject('queueForEvents')
|
||||
->inject('dbForPlatform')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(
|
||||
|
||||
@@ -49,7 +49,7 @@ class Get extends Base
|
||||
->param('siteId', '', new UID(), 'Site ID.')
|
||||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(string $siteId, Response $response, Database $dbForProject)
|
||||
|
||||
@@ -97,7 +97,7 @@ class Update extends Base
|
||||
->inject('dbForPlatform')
|
||||
->inject('gitHub')
|
||||
->inject('executor')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(
|
||||
|
||||
@@ -56,7 +56,7 @@ class XList extends Base
|
||||
->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true)
|
||||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(array $queries, string $search, Response $response, Database $dbForProject)
|
||||
|
||||
@@ -48,7 +48,7 @@ class XList extends Base
|
||||
))
|
||||
->inject('response')
|
||||
->inject('plan')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(Response $response, array $plan)
|
||||
|
||||
@@ -49,7 +49,7 @@ class Get extends Base
|
||||
))
|
||||
->param('templateId', '', new Text(128), 'Template ID.')
|
||||
->inject('response')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(string $templateId, Response $response)
|
||||
|
||||
@@ -53,7 +53,7 @@ class XList extends Base
|
||||
->param('limit', 25, new Range(1, 5000), 'Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.', true)
|
||||
->param('offset', 0, new Range(0, 5000), 'Offset the list of returned templates. Maximum offset is 5000.', true)
|
||||
->inject('response')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(
|
||||
|
||||
@@ -55,7 +55,7 @@ class Get extends Base
|
||||
->param('range', '30d', new WhiteList(['24h', '30d', '90d']), 'Date range.', true)
|
||||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(
|
||||
|
||||
@@ -52,7 +52,7 @@ class XList extends Base
|
||||
->param('range', '30d', new WhiteList(['24h', '30d', '90d']), 'Date range.', true)
|
||||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(string $range, Response $response, Database $dbForProject)
|
||||
|
||||
@@ -62,7 +62,7 @@ class Create extends Base
|
||||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->inject('project')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(string $siteId, string $key, string $value, bool $secret, Response $response, Database $dbForProject, Document $project)
|
||||
|
||||
@@ -54,7 +54,7 @@ class Delete extends Base
|
||||
->param('variableId', '', new UID(), 'Variable unique ID.', false)
|
||||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(string $siteId, string $variableId, Response $response, Database $dbForProject)
|
||||
|
||||
@@ -53,7 +53,7 @@ class Get extends Base
|
||||
->param('variableId', '', new UID(), 'Variable unique ID.', false)
|
||||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(string $siteId, string $variableId, Response $response, Database $dbForProject)
|
||||
|
||||
@@ -58,7 +58,7 @@ class Update extends Base
|
||||
->param('secret', null, new Boolean(), 'Secret variables can be updated or deleted, but only sites can read them during build and runtime.', true)
|
||||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(
|
||||
|
||||
@@ -53,7 +53,7 @@ class XList extends Base
|
||||
->param('siteId', '', new UID(), 'Site unique ID.', false)
|
||||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(
|
||||
|
||||
@@ -65,7 +65,7 @@ class Create extends Action
|
||||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->inject('queueForEvents')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(string $bucketId, string $fileId, ?string $expire, Response $response, Database $dbForProject, Event $queueForEvents): void
|
||||
|
||||
@@ -55,7 +55,7 @@ class XList extends Action
|
||||
->param('queries', [], new FileTokens(), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long. You may filter on the following attributes: ' . implode(', ', FileTokens::ALLOWED_ATTRIBUTES), true)
|
||||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(string $bucketId, string $fileId, array $queries, Response $response, Database $dbForProject)
|
||||
|
||||
@@ -58,7 +58,7 @@ class Delete extends Action
|
||||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->inject('queueForEvents')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(string $tokenId, Response $response, Database $dbForProject, Event $queueForEvents)
|
||||
|
||||
@@ -50,7 +50,7 @@ class Get extends Action
|
||||
->param('tokenId', '', new UID(), 'Token ID.')
|
||||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(string $tokenId, Response $response, Database $dbForProject)
|
||||
|
||||
@@ -61,7 +61,7 @@ class Update extends Action
|
||||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->inject('queueForEvents')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(string $tokenId, ?string $expire, Response $response, Database $dbForProject, Event $queueForEvents)
|
||||
|
||||
@@ -34,7 +34,7 @@ class Doctor extends Action
|
||||
$this
|
||||
->desc('Validate server health')
|
||||
->inject('register')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(Registry $register): void
|
||||
|
||||
@@ -31,7 +31,7 @@ class Install extends Action
|
||||
->param('image', 'appwrite', new Text(0), 'Main appwrite docker image', true)
|
||||
->param('interactive', 'Y', new Text(1), 'Run an interactive session', true)
|
||||
->param('no-start', false, new Boolean(true), 'Run an interactive session', true)
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(string $httpPort, string $httpsPort, string $organization, string $image, string $interactive, bool $noStart): void
|
||||
|
||||
@@ -29,7 +29,7 @@ class Maintenance extends Action
|
||||
->inject('console')
|
||||
->inject('queueForCertificates')
|
||||
->inject('queueForDeletes')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(Database $dbForPlatform, Document $console, Certificate $queueForCertificates, Delete $queueForDeletes): void
|
||||
|
||||
@@ -24,7 +24,7 @@ class QueueRetry extends Action
|
||||
->param('name', '', new Text(100), 'Queue name')
|
||||
->param('limit', 0, new Wildcard(), 'jobs limit', true)
|
||||
->inject('publisher')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -46,7 +46,7 @@ class SDKs extends Action
|
||||
->param('git', null, new Nullable(new WhiteList(['yes', 'no'])), 'Should we use git push?', optional: true)
|
||||
->param('production', null, new Nullable(new WhiteList(['yes', 'no'])), 'Should we push to production?', optional: true)
|
||||
->param('message', null, new Nullable(new Text(256)), 'Commit Message', optional: true)
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(?string $selectedPlatform, ?string $selectedSDK, ?string $version, ?string $git, ?string $production, ?string $message): void
|
||||
|
||||
@@ -24,7 +24,7 @@ class SSL extends Action
|
||||
->param('domain', System::getEnv('_APP_DOMAIN', ''), new Hostname(), 'Domain to generate certificate for. If empty, main domain will be used.', true)
|
||||
->param('skip-check', true, new Boolean(true), 'If DNS and renew check should be skipped. Defaults to true, and when true, all jobs will result in certificate generation attempt.', true)
|
||||
->inject('queueForCertificates')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(string $domain, bool|string $skipCheck, Certificate $queueForCertificates): void
|
||||
|
||||
@@ -21,7 +21,7 @@ class Screenshot extends Action
|
||||
$this
|
||||
->desc('Create Site template screenshot')
|
||||
->param('templateId', '', new Text(128), 'Template ID.')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(string $templateId): void
|
||||
|
||||
@@ -45,7 +45,7 @@ class StatsResources extends Action
|
||||
->inject('dbForPlatform')
|
||||
->inject('logError')
|
||||
->inject('queueForStatsResources')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(Database $dbForPlatform, callable $logError, EventStatsResources $queue): void
|
||||
|
||||
@@ -23,7 +23,7 @@ class Upgrade extends Install
|
||||
->param('image', 'appwrite', new Text(0), 'Main appwrite docker image', true)
|
||||
->param('interactive', 'Y', new Text(1), 'Run an interactive session', true)
|
||||
->param('no-start', false, new Boolean(true), 'Run an interactive session', true)
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(string $httpPort, string $httpsPort, string $organization, string $image, string $interactive, bool $noStart): void
|
||||
|
||||
@@ -18,7 +18,7 @@ class Vars extends Action
|
||||
{
|
||||
$this
|
||||
->desc('List all the server environment variables')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
public function action(): void
|
||||
|
||||
@@ -45,7 +45,7 @@ class Audits extends Action
|
||||
->inject('message')
|
||||
->inject('getProjectDB')
|
||||
->inject('project')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
|
||||
$this->lastTriggeredTime = time();
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ class Databases extends Action
|
||||
->inject('dbForProject')
|
||||
->inject('queueForRealtime')
|
||||
->inject('log')
|
||||
->callback($this->action(...));
|
||||
->callback([$this, 'action']);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -64,14 +64,6 @@ class Databases extends Action
|
||||
$document = new Document($payload['document'] ?? []);
|
||||
$database = new Document($payload['database'] ?? []);
|
||||
|
||||
Console::info("Processing database operation: \n" . \json_encode([
|
||||
'type' => $type,
|
||||
'projectId' => $project->getId(),
|
||||
'databaseId' => $database->getId(),
|
||||
'collectionId' => $collection->getId(),
|
||||
'documentId' => $document->getId(),
|
||||
], JSON_PRETTY_PRINT));
|
||||
|
||||
$log->addTag('projectId', $project->getId());
|
||||
$log->addTag('type', $type);
|
||||
|
||||
@@ -90,14 +82,6 @@ class Databases extends Action
|
||||
DATABASE_TYPE_DELETE_INDEX => $this->deleteIndex($database, $collection, $document, $project, $dbForPlatform, $dbForProject, $queueForRealtime),
|
||||
default => throw new Exception('No database operation for type: ' . \strval($type)),
|
||||
};
|
||||
|
||||
Console::info("Finished processing database operation: \n" . \json_encode([
|
||||
'type' => $type,
|
||||
'projectId' => $project->getId(),
|
||||
'databaseId' => $database->getId(),
|
||||
'collectionId' => $collection->getId(),
|
||||
'documentId' => $document->getId(),
|
||||
], JSON_PRETTY_PRINT));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -132,7 +116,6 @@ class Databases extends Action
|
||||
|
||||
$projectId = $project->getId();
|
||||
$event = "databases.[databaseId].collections.[collectionId].attributes.[attributeId].update";
|
||||
|
||||
/**
|
||||
* TODO @christyjacob4 verify if this is still the case
|
||||
* Fetch attribute from the database, since with Resque float values are loosing informations.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user