diff --git a/app/config/frameworks.php b/app/config/frameworks.php index 47e26ac91e..d224a6e170 100644 --- a/app/config/frameworks.php +++ b/app/config/frameworks.php @@ -215,7 +215,7 @@ return [ 'key' => 'ssr', 'buildCommand' => 'npm run build', 'installCommand' => 'npm install', - 'outputDirectory' => './dist', + 'outputDirectory' => './.output', 'startCommand' => 'bash helpers/tanstack-start/server.sh', ], 'static' => [ diff --git a/app/config/platforms.php b/app/config/platforms.php index ce60b2f6c2..ceb05235d3 100644 --- a/app/config/platforms.php +++ b/app/config/platforms.php @@ -226,7 +226,7 @@ return [ [ 'key' => 'cli', 'name' => 'Command Line', - 'version' => '11.1.1', + 'version' => '12.0.0', 'url' => 'https://github.com/appwrite/sdk-for-cli', 'package' => 'https://www.npmjs.com/package/appwrite-cli', 'enabled' => true, diff --git a/app/config/scopes.php b/app/config/scopes.php index d90ca2eabf..a6ad98e4e0 100644 --- a/app/config/scopes.php +++ b/app/config/scopes.php @@ -47,10 +47,10 @@ return [ // List of publicly visible scopes 'description' => 'Access to create, update, and delete your project\'s database table\'s columns', ], 'indexes.read' => [ - 'description' => 'Access to read your project\'s database collection\'s indexes', + 'description' => 'Access to read your project\'s database table\'s indexes', ], 'indexes.write' => [ - 'description' => 'Access to create, update, and delete your project\'s database collection\'s indexes', + 'description' => 'Access to create, update, and delete your project\'s database table\'s indexes', ], 'documents.read' => [ 'description' => 'Access to read your project\'s database documents', diff --git a/app/config/specs/open-api3-1.8.x-console.json b/app/config/specs/open-api3-1.8.x-console.json index fded6c46b0..365f926685 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -14424,7 +14424,7 @@ "branch", "tag" ], - "x-enum-name": null, + "x-enum-name": "TemplateReferenceType", "x-enum-keys": [] }, "reference": { @@ -14524,7 +14524,7 @@ "branch", "commit" ], - "x-enum-name": "VCSDeploymentType", + "x-enum-name": "VCSReferenceType", "x-enum-keys": [] }, "reference": { @@ -32337,7 +32337,7 @@ "commit", "tag" ], - "x-enum-name": null, + "x-enum-name": "TemplateReferenceType", "x-enum-keys": [] }, "reference": { @@ -32438,7 +32438,7 @@ "commit", "tag" ], - "x-enum-name": "VCSDeploymentType", + "x-enum-name": "VCSReferenceType", "x-enum-keys": [] }, "reference": { diff --git a/app/config/specs/open-api3-1.8.x-server.json b/app/config/specs/open-api3-1.8.x-server.json index 2cb6a74853..a2a97c046e 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -13213,7 +13213,7 @@ "branch", "tag" ], - "x-enum-name": null, + "x-enum-name": "TemplateReferenceType", "x-enum-keys": [] }, "reference": { @@ -13314,7 +13314,7 @@ "branch", "commit" ], - "x-enum-name": "VCSDeploymentType", + "x-enum-name": "VCSReferenceType", "x-enum-keys": [] }, "reference": { @@ -22861,7 +22861,7 @@ "commit", "tag" ], - "x-enum-name": null, + "x-enum-name": "TemplateReferenceType", "x-enum-keys": [] }, "reference": { @@ -22963,7 +22963,7 @@ "commit", "tag" ], - "x-enum-name": "VCSDeploymentType", + "x-enum-name": "VCSReferenceType", "x-enum-keys": [] }, "reference": { diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index fded6c46b0..365f926685 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -14424,7 +14424,7 @@ "branch", "tag" ], - "x-enum-name": null, + "x-enum-name": "TemplateReferenceType", "x-enum-keys": [] }, "reference": { @@ -14524,7 +14524,7 @@ "branch", "commit" ], - "x-enum-name": "VCSDeploymentType", + "x-enum-name": "VCSReferenceType", "x-enum-keys": [] }, "reference": { @@ -32337,7 +32337,7 @@ "commit", "tag" ], - "x-enum-name": null, + "x-enum-name": "TemplateReferenceType", "x-enum-keys": [] }, "reference": { @@ -32438,7 +32438,7 @@ "commit", "tag" ], - "x-enum-name": "VCSDeploymentType", + "x-enum-name": "VCSReferenceType", "x-enum-keys": [] }, "reference": { diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index 2cb6a74853..a2a97c046e 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -13213,7 +13213,7 @@ "branch", "tag" ], - "x-enum-name": null, + "x-enum-name": "TemplateReferenceType", "x-enum-keys": [] }, "reference": { @@ -13314,7 +13314,7 @@ "branch", "commit" ], - "x-enum-name": "VCSDeploymentType", + "x-enum-name": "VCSReferenceType", "x-enum-keys": [] }, "reference": { @@ -22861,7 +22861,7 @@ "commit", "tag" ], - "x-enum-name": null, + "x-enum-name": "TemplateReferenceType", "x-enum-keys": [] }, "reference": { @@ -22963,7 +22963,7 @@ "commit", "tag" ], - "x-enum-name": "VCSDeploymentType", + "x-enum-name": "VCSReferenceType", "x-enum-keys": [] }, "reference": { diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index 28a4f76c61..5d2334764e 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -14366,7 +14366,7 @@ "branch", "tag" ], - "x-enum-name": null, + "x-enum-name": "TemplateReferenceType", "x-enum-keys": [] }, "reference": { @@ -14467,7 +14467,7 @@ "branch", "commit" ], - "x-enum-name": "VCSDeploymentType", + "x-enum-name": "VCSReferenceType", "x-enum-keys": [] }, "reference": { @@ -32441,7 +32441,7 @@ "commit", "tag" ], - "x-enum-name": null, + "x-enum-name": "TemplateReferenceType", "x-enum-keys": [] }, "reference": { @@ -32543,7 +32543,7 @@ "commit", "tag" ], - "x-enum-name": "VCSDeploymentType", + "x-enum-name": "VCSReferenceType", "x-enum-keys": [] }, "reference": { diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index e760c1bb7d..b37aaac8e2 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -13182,7 +13182,7 @@ "branch", "tag" ], - "x-enum-name": null, + "x-enum-name": "TemplateReferenceType", "x-enum-keys": [] }, "reference": { @@ -13284,7 +13284,7 @@ "branch", "commit" ], - "x-enum-name": "VCSDeploymentType", + "x-enum-name": "VCSReferenceType", "x-enum-keys": [] }, "reference": { @@ -23014,7 +23014,7 @@ "commit", "tag" ], - "x-enum-name": null, + "x-enum-name": "TemplateReferenceType", "x-enum-keys": [] }, "reference": { @@ -23117,7 +23117,7 @@ "commit", "tag" ], - "x-enum-name": "VCSDeploymentType", + "x-enum-name": "VCSReferenceType", "x-enum-keys": [] }, "reference": { diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index 28a4f76c61..5d2334764e 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -14366,7 +14366,7 @@ "branch", "tag" ], - "x-enum-name": null, + "x-enum-name": "TemplateReferenceType", "x-enum-keys": [] }, "reference": { @@ -14467,7 +14467,7 @@ "branch", "commit" ], - "x-enum-name": "VCSDeploymentType", + "x-enum-name": "VCSReferenceType", "x-enum-keys": [] }, "reference": { @@ -32441,7 +32441,7 @@ "commit", "tag" ], - "x-enum-name": null, + "x-enum-name": "TemplateReferenceType", "x-enum-keys": [] }, "reference": { @@ -32543,7 +32543,7 @@ "commit", "tag" ], - "x-enum-name": "VCSDeploymentType", + "x-enum-name": "VCSReferenceType", "x-enum-keys": [] }, "reference": { diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index e760c1bb7d..b37aaac8e2 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -13182,7 +13182,7 @@ "branch", "tag" ], - "x-enum-name": null, + "x-enum-name": "TemplateReferenceType", "x-enum-keys": [] }, "reference": { @@ -13284,7 +13284,7 @@ "branch", "commit" ], - "x-enum-name": "VCSDeploymentType", + "x-enum-name": "VCSReferenceType", "x-enum-keys": [] }, "reference": { @@ -23014,7 +23014,7 @@ "commit", "tag" ], - "x-enum-name": null, + "x-enum-name": "TemplateReferenceType", "x-enum-keys": [] }, "reference": { @@ -23117,7 +23117,7 @@ "commit", "tag" ], - "x-enum-name": "VCSDeploymentType", + "x-enum-name": "VCSReferenceType", "x-enum-keys": [] }, "reference": { diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index b973b18d44..0f226b74d5 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -1509,6 +1509,7 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/push') } $isInternal = $decoded['internal'] ?? false; + $disposition = $decoded['disposition'] ?? 'inline'; $dbForProject = $isInternal ? $dbForPlatform : $dbForProject; $isAPIKey = Auth::isAppUser(Authorization::getRoles()); @@ -1565,7 +1566,7 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/push') ->setContentType($contentType) ->addHeader('Content-Security-Policy', 'script-src none;') ->addHeader('X-Content-Type-Options', 'nosniff') - ->addHeader('Content-Disposition', 'inline; filename="' . $file->getAttribute('name', '') . '"') + ->addHeader('Content-Disposition', $disposition . '; filename="' . $file->getAttribute('name', '') . '"') ->addHeader('Cache-Control', 'private, max-age=3888000') // 45 days ->addHeader('X-Peak', \memory_get_peak_usage()); diff --git a/composer.json b/composer.json index d3e20c65f1..5f3c8cd043 100644 --- a/composer.json +++ b/composer.json @@ -65,7 +65,7 @@ "utopia-php/locale": "0.8.*", "utopia-php/logger": "0.6.*", "utopia-php/messaging": "0.20.*", - "utopia-php/migration": "1.*", + "utopia-php/migration": "1.3.*", "utopia-php/orchestration": "0.9.*", "utopia-php/platform": "0.7.*", "utopia-php/pools": "0.8.*", diff --git a/composer.lock b/composer.lock index f63e179183..0d2dae8f0b 100644 --- a/composer.lock +++ b/composer.lock @@ -283,16 +283,16 @@ }, { "name": "brick/math", - "version": "0.14.0", + "version": "0.14.1", "source": { "type": "git", "url": "https://github.com/brick/math.git", - "reference": "113a8ee2656b882d4c3164fa31aa6e12cbb7aaa2" + "reference": "f05858549e5f9d7bb45875a75583240a38a281d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/brick/math/zipball/113a8ee2656b882d4c3164fa31aa6e12cbb7aaa2", - "reference": "113a8ee2656b882d4c3164fa31aa6e12cbb7aaa2", + "url": "https://api.github.com/repos/brick/math/zipball/f05858549e5f9d7bb45875a75583240a38a281d0", + "reference": "f05858549e5f9d7bb45875a75583240a38a281d0", "shasum": "" }, "require": { @@ -331,7 +331,7 @@ ], "support": { "issues": "https://github.com/brick/math/issues", - "source": "https://github.com/brick/math/tree/0.14.0" + "source": "https://github.com/brick/math/tree/0.14.1" }, "funding": [ { @@ -339,7 +339,7 @@ "type": "github" } ], - "time": "2025-08-29T12:40:03+00:00" + "time": "2025-11-24T14:40:29+00:00" }, { "name": "chillerlan/php-qrcode", @@ -1758,16 +1758,16 @@ }, { "name": "php-amqplib/php-amqplib", - "version": "v3.7.3", + "version": "v3.7.4", "source": { "type": "git", "url": "https://github.com/php-amqplib/php-amqplib.git", - "reference": "9f50fe69a9f1a19e2cb25596a354d705de36fe59" + "reference": "381b6f7c600e0e0c7463cdd7f7a1a3bc6268e5fd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-amqplib/php-amqplib/zipball/9f50fe69a9f1a19e2cb25596a354d705de36fe59", - "reference": "9f50fe69a9f1a19e2cb25596a354d705de36fe59", + "url": "https://api.github.com/repos/php-amqplib/php-amqplib/zipball/381b6f7c600e0e0c7463cdd7f7a1a3bc6268e5fd", + "reference": "381b6f7c600e0e0c7463cdd7f7a1a3bc6268e5fd", "shasum": "" }, "require": { @@ -1833,9 +1833,9 @@ ], "support": { "issues": "https://github.com/php-amqplib/php-amqplib/issues", - "source": "https://github.com/php-amqplib/php-amqplib/tree/v3.7.3" + "source": "https://github.com/php-amqplib/php-amqplib/tree/v3.7.4" }, - "time": "2025-02-18T20:11:13+00:00" + "time": "2025-11-23T17:00:56+00:00" }, { "name": "php-http/discovery", @@ -3893,16 +3893,16 @@ }, { "name": "utopia-php/detector", - "version": "0.2.2", + "version": "0.2.3", "source": { "type": "git", "url": "https://github.com/utopia-php/detector.git", - "reference": "9a41be5f21efe2d865de79b08dff94fff85ce5e9" + "reference": "c1f49b3e82250c3256ffba48aa9737d6c17a243a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/detector/zipball/9a41be5f21efe2d865de79b08dff94fff85ce5e9", - "reference": "9a41be5f21efe2d865de79b08dff94fff85ce5e9", + "url": "https://api.github.com/repos/utopia-php/detector/zipball/c1f49b3e82250c3256ffba48aa9737d6c17a243a", + "reference": "c1f49b3e82250c3256ffba48aa9737d6c17a243a", "shasum": "" }, "require": { @@ -3932,9 +3932,9 @@ ], "support": { "issues": "https://github.com/utopia-php/detector/issues", - "source": "https://github.com/utopia-php/detector/tree/0.2.2" + "source": "https://github.com/utopia-php/detector/tree/0.2.3" }, - "time": "2025-10-31T12:43:31+00:00" + "time": "2025-11-24T15:52:51+00:00" }, { "name": "utopia-php/dns", @@ -5374,16 +5374,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "1.5.7", + "version": "1.5.8", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "dc6720ba92ed98e2c62b2a319d4371f167ccc808" + "reference": "05367bc4a4c3e020e9aca114ae875b626ce8fc55" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/dc6720ba92ed98e2c62b2a319d4371f167ccc808", - "reference": "dc6720ba92ed98e2c62b2a319d4371f167ccc808", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/05367bc4a4c3e020e9aca114ae875b626ce8fc55", + "reference": "05367bc4a4c3e020e9aca114ae875b626ce8fc55", "shasum": "" }, "require": { @@ -5419,9 +5419,9 @@ "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", "support": { "issues": "https://github.com/appwrite/sdk-generator/issues", - "source": "https://github.com/appwrite/sdk-generator/tree/1.5.7" + "source": "https://github.com/appwrite/sdk-generator/tree/1.5.8" }, - "time": "2025-11-18T05:57:01+00:00" + "time": "2025-11-20T11:00:34+00:00" }, { "name": "doctrine/annotations", @@ -8887,9 +8887,9 @@ } ], "aliases": [], - "minimum-stability": "dev", + "minimum-stability": "stable", "stability-flags": {}, - "prefer-stable": true, + "prefer-stable": false, "prefer-lowest": false, "platform": { "php": ">=8.3.0", diff --git a/docs/sdks/cli/CHANGELOG.md b/docs/sdks/cli/CHANGELOG.md index 8e50441769..3c2e7ef709 100644 --- a/docs/sdks/cli/CHANGELOG.md +++ b/docs/sdks/cli/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## 12.0.0 + +* Change `create-deployment-template`'s `version` parameter to `type` and `reference`. eg. usage - `create-deployment-template --type tag --reference 1.0.0` +* Remove `bucket-id` parameter from `create-csv-export` command +* Allow enabling or disabling of image `transformations` in a bucket +* Fix type generation for `point`, `lineString` and `polygon` columns + ## 11.1.1 * Fix duplicate `enums` during type generation by prefixing them with table name. For example, `enum MyEnum` will now be generated as `enum MyTableMyEnum` to avoid conflicts. diff --git a/src/Appwrite/Platform/Workers/Migrations.php b/src/Appwrite/Platform/Workers/Migrations.php index 0bd5c50e04..e7b12c5d9d 100644 --- a/src/Appwrite/Platform/Workers/Migrations.php +++ b/src/Appwrite/Platform/Workers/Migrations.php @@ -411,7 +411,7 @@ class Migrations extends Action $source?->success(); if ($migration->getAttribute('destination') === DestinationCSV::getName()) { - $this->handleCSVExportComplete($project, $migration, $queueForMails); + $this->handleCSVExportComplete($project, $migration, $queueForMails, $queueForRealtime); } } } @@ -432,7 +432,8 @@ class Migrations extends Action protected function handleCSVExportComplete( Document $project, Document $migration, - Mail $queueForMails + Mail $queueForMails, + Realtime $queueForRealtime, ): void { $options = $migration->getAttribute('options', []); $bucketId = 'default'; // Always use platform default bucket @@ -524,12 +525,16 @@ class Migrations extends Action 'fileId' => $fileId, 'projectId' => $project->getId(), 'internal' => true, + 'disposition' => 'attachment', ]); // Generate download URL with JWT $endpoint = System::getEnv('_APP_DOMAIN', ''); $protocol = System::getEnv('_APP_OPTIONS_FORCE_HTTPS', 'disabled') === 'enabled' ? 'https' : 'http'; $downloadUrl = "{$protocol}://{$endpoint}/v1/storage/buckets/{$bucketId}/files/{$fileId}/push?project={$project->getId()}&jwt={$jwt}"; + $options['downloadUrl'] = $downloadUrl; + $migration->setAttribute('options', $options); + $this->updateMigrationDocument($migration, $project, $queueForRealtime); $this->sendCSVEmail( success: true, diff --git a/src/Appwrite/SDK/Specification/Format.php b/src/Appwrite/SDK/Specification/Format.php index c687df143a..b9e1c3b4ed 100644 --- a/src/Appwrite/SDK/Specification/Format.php +++ b/src/Appwrite/SDK/Specification/Format.php @@ -263,7 +263,13 @@ abstract class Format case 'createVcsDeployment': switch ($param) { case 'type': - return 'VCSDeploymentType'; + return 'VCSReferenceType'; + } + break; + case 'createTemplateDeployment': + switch ($param) { + case 'type': + return 'TemplateReferenceType'; } break; } @@ -286,7 +292,13 @@ abstract class Format case 'createVcsDeployment': switch ($param) { case 'type': - return 'VCSDeploymentType'; + return 'VCSReferenceType'; + } + break; + case 'createTemplateDeployment': + switch ($param) { + case 'type': + return 'TemplateReferenceType'; } break; } diff --git a/tests/e2e/Services/Migrations/MigrationsBase.php b/tests/e2e/Services/Migrations/MigrationsBase.php index f16864960e..490ac026b5 100644 --- a/tests/e2e/Services/Migrations/MigrationsBase.php +++ b/tests/e2e/Services/Migrations/MigrationsBase.php @@ -1315,7 +1315,7 @@ trait MigrationsBase $this->assertEquals('CSV', $response['body']['destination']); return true; - }, 30000, 500); + }, 30_000, 500); // Check that email was sent with download link $lastEmail = $this->getLastEmail(); diff --git a/tests/e2e/Services/Sites/SitesCustomServerTest.php b/tests/e2e/Services/Sites/SitesCustomServerTest.php index 8c03ec7649..b7dc9e7334 100644 --- a/tests/e2e/Services/Sites/SitesCustomServerTest.php +++ b/tests/e2e/Services/Sites/SitesCustomServerTest.php @@ -2552,7 +2552,7 @@ class SitesCustomServerTest extends Scope $this->cleanupSite($siteId); } - public function testDomainForFailedDeloyment(): void + public function testDomainForFailedDeployment(): void { $siteId = $this->setupSite([ 'siteId' => ID::unique(),