Merge branch 'main' into 'fix-flutter-web-env'.

This commit is contained in:
Darshan
2025-05-21 11:00:25 +05:30
859 changed files with 8802 additions and 33 deletions
+32 -3
View File
@@ -348,9 +348,21 @@ class V22 extends Migration
if ($deploymentResourceType === 'function') {
$project = $this->dbForProject->getDocument('projects', $document->getAttribute('projectId'));
if ($project->isEmpty()) {
Console::warning("Project \"{$document->getAttribute('projectId')}\" not found for rule \"{$document->getId()}\"");
break;
}
$dbForOwnerProject = ($this->getProjectDB)($project);
$function = $dbForOwnerProject->getDocument('functions', $resourceId);
$deploymentId = $function->getAttribute('deployment', $function->getAttribute('deploymentId', $document->getAttribute('deploymentId')));
if ($function->isEmpty()) {
Console::warning("Function \"{$resourceId}\" not found for rule \"{$document->getId()}\"");
break;
}
$deploymentId = $function->getAttribute('deployment', $function->getAttribute('deploymentId', $document->getAttribute('deploymentId', '')));
$deploymentInternalId = $function->getAttribute('deploymentInternalId', $document->getAttribute('deploymentInternalId', ''));
$document
@@ -386,12 +398,19 @@ class V22 extends Migration
5. Fill latestDeploymentCreatedAt with latestDeployment's "$createdAt"
6. Fill latestDeploymentStatus with latestDeployment's build's "status"
*/
if ($document->getAttribute('deployment')) {
$document->setAttribute('deploymentId', $document->getAttribute('deployment', $document->getAttribute('deploymentId', '')));
if (empty($document->getAttribute('deployment'))) {
break;
}
$document->setAttribute('deploymentId', $document->getAttribute('deployment', $document->getAttribute('deploymentId', '')));
$deploymentId = $document->getAttribute('deploymentId');
$deployment = $this->dbForProject->getDocument('deployments', $deploymentId);
if ($deployment->isEmpty()) {
Console::warning("Deployment \"{$deploymentId}\" not found for function \"{$document->getId()}\"");
break;
}
$document->setAttribute('deploymentCreatedAt', $deployment->getCreatedAt());
$latestDeployment = $this->dbForProject->findOne('deployments', [
@@ -400,8 +419,18 @@ class V22 extends Migration
Query::equal('resourceType', ['functions']),
]);
if ($latestDeployment->isEmpty()) {
Console::warning("Latest deployment not found for function \"{$document->getId()}\"");
break;
}
$latestBuild = $this->dbForProject->getDocument('builds', $latestDeployment->getAttribute('buildId', ''));
if ($latestBuild->isEmpty()) {
Console::warning("Build \"{$latestDeployment->getAttribute('buildId')}\" not found for deployment \"{$latestDeployment->getId()}\"");
break;
}
$document
->setAttribute('latestDeploymentId', $latestDeployment->getId())
->setAttribute('latestDeploymentInternalId', $latestDeployment->getInternalId())
@@ -48,7 +48,7 @@ class Create extends Action
group: 'files',
name: 'createFileToken',
description: <<<EOT
Create a new token. A token is linked to a file. Token can be passed as a header or request get parameter.
Create a new token. A token is linked to a file. Token can be passed as a request URL search parameter.
EOT,
auth: [AuthType::ADMIN, AuthType::KEY],
responses: [
-2
View File
@@ -312,7 +312,5 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
}
}
}
Console::exit();
}
}
@@ -309,7 +309,7 @@ class OpenAPI3 extends Format
$bodyRequired = [];
foreach ($route->getParams() as $name => $param) { // Set params
if ($param['deprecated']) {
if (($param['deprecated'] ?? false) === true) {
continue;
}
@@ -314,7 +314,7 @@ class Swagger2 extends Format
);
foreach ($parameters as $name => $param) { // Set params
if ($param['deprecated']) {
if (($param['deprecated'] ?? false) === true) {
continue;
}