Merge pull request #10729 from appwrite/update-sdks-2

update sdks
This commit is contained in:
Jake Barnby 2025-10-31 19:54:45 +13:00 committed by GitHub
commit 8ca083ed27
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 121 additions and 58 deletions

View file

@ -60,7 +60,7 @@ return [
[
'key' => 'flutter',
'name' => 'Flutter',
'version' => '20.2.1',
'version' => '20.2.2',
'url' => 'https://github.com/appwrite/sdk-for-flutter',
'package' => 'https://pub.dev/packages/appwrite',
'enabled' => true,
@ -79,7 +79,7 @@ return [
[
'key' => 'apple',
'name' => 'Apple',
'version' => '13.3.0',
'version' => '13.3.1',
'url' => 'https://github.com/appwrite/sdk-for-apple',
'package' => 'https://github.com/appwrite/sdk-for-apple',
'enabled' => true,
@ -226,7 +226,7 @@ return [
[
'key' => 'cli',
'name' => 'Command Line',
'version' => '10.2.3',
'version' => '11.0.0',
'url' => 'https://github.com/appwrite/sdk-for-cli',
'package' => 'https://www.npmjs.com/package/appwrite-cli',
'enabled' => true,
@ -300,7 +300,7 @@ return [
[
'key' => 'python',
'name' => 'Python',
'version' => '13.4.1',
'version' => '13.5.0',
'url' => 'https://github.com/appwrite/sdk-for-python',
'package' => 'https://pypi.org/project/appwrite/',
'enabled' => true,

54
composer.lock generated
View file

@ -4108,16 +4108,16 @@
},
{
"name": "utopia-php/emails",
"version": "0.6.2",
"version": "0.6.1",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/emails.git",
"reference": "9c4c40cf7c03c2e9e21364566f9b192d03ea93c9"
"reference": "0de8896f369b6aa1f14df338645048f95a8439e3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/emails/zipball/9c4c40cf7c03c2e9e21364566f9b192d03ea93c9",
"reference": "9c4c40cf7c03c2e9e21364566f9b192d03ea93c9",
"url": "https://api.github.com/repos/utopia-php/emails/zipball/0de8896f369b6aa1f14df338645048f95a8439e3",
"reference": "0de8896f369b6aa1f14df338645048f95a8439e3",
"shasum": ""
},
"require": {
@ -4125,7 +4125,7 @@
"utopia-php/cli": "^0.15",
"utopia-php/domains": "^0.9",
"utopia-php/fetch": "^0.4",
"utopia-php/validators": "^0.0.2"
"utopia-php/validators": "^0.0.1"
},
"require-dev": {
"laravel/pint": "1.25.*",
@ -4162,9 +4162,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/emails/issues",
"source": "https://github.com/utopia-php/emails/tree/0.6.2"
"source": "https://github.com/utopia-php/emails/tree/0.6.1"
},
"time": "2025-10-28T16:08:17+00:00"
"time": "2025-10-28T07:29:58+00:00"
},
{
"name": "utopia-php/fetch",
@ -5109,16 +5109,16 @@
},
{
"name": "utopia-php/validators",
"version": "0.0.2",
"version": "0.0.1",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/validators.git",
"reference": "894210695c5d35fa248fb65f7fe7237b6ff4fb0b"
"reference": "69d1afa5df2f052535764520609e91b491708db2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/validators/zipball/894210695c5d35fa248fb65f7fe7237b6ff4fb0b",
"reference": "894210695c5d35fa248fb65f7fe7237b6ff4fb0b",
"url": "https://api.github.com/repos/utopia-php/validators/zipball/69d1afa5df2f052535764520609e91b491708db2",
"reference": "69d1afa5df2f052535764520609e91b491708db2",
"shasum": ""
},
"require": {
@ -5149,9 +5149,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/validators/issues",
"source": "https://github.com/utopia-php/validators/tree/0.0.2"
"source": "https://github.com/utopia-php/validators/tree/0.0.1"
},
"time": "2025-10-20T21:52:28+00:00"
"time": "2025-10-20T15:08:50+00:00"
},
{
"name": "utopia-php/vcs",
@ -5253,16 +5253,16 @@
},
{
"name": "webmozart/assert",
"version": "1.12.0",
"version": "1.12.1",
"source": {
"type": "git",
"url": "https://github.com/webmozarts/assert.git",
"reference": "541057574806f942c94662b817a50f63f7345360"
"reference": "9be6926d8b485f55b9229203f962b51ed377ba68"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/webmozarts/assert/zipball/541057574806f942c94662b817a50f63f7345360",
"reference": "541057574806f942c94662b817a50f63f7345360",
"url": "https://api.github.com/repos/webmozarts/assert/zipball/9be6926d8b485f55b9229203f962b51ed377ba68",
"reference": "9be6926d8b485f55b9229203f962b51ed377ba68",
"shasum": ""
},
"require": {
@ -5305,9 +5305,9 @@
],
"support": {
"issues": "https://github.com/webmozarts/assert/issues",
"source": "https://github.com/webmozarts/assert/tree/1.12.0"
"source": "https://github.com/webmozarts/assert/tree/1.12.1"
},
"time": "2025-10-20T12:43:39+00:00"
"time": "2025-10-29T15:56:20+00:00"
},
{
"name": "webonyx/graphql-php",
@ -5378,16 +5378,16 @@
"packages-dev": [
{
"name": "appwrite/sdk-generator",
"version": "1.4.15",
"version": "1.4.16",
"source": {
"type": "git",
"url": "https://github.com/appwrite/sdk-generator.git",
"reference": "b4a2fd9e92903c2e156f17fc5dafe102e6cfdfda"
"reference": "08f839443f678208eb56a6c5a7456dd632adfc9a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/b4a2fd9e92903c2e156f17fc5dafe102e6cfdfda",
"reference": "b4a2fd9e92903c2e156f17fc5dafe102e6cfdfda",
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/08f839443f678208eb56a6c5a7456dd632adfc9a",
"reference": "08f839443f678208eb56a6c5a7456dd632adfc9a",
"shasum": ""
},
"require": {
@ -5423,9 +5423,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.4.15"
"source": "https://github.com/appwrite/sdk-generator/tree/1.4.16"
},
"time": "2025-10-28T04:52:59+00:00"
"time": "2025-10-29T08:39:55+00:00"
},
{
"name": "doctrine/annotations",
@ -8892,7 +8892,7 @@
],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
@ -8916,5 +8916,5 @@
"platform-overrides": {
"php": "8.3"
},
"plugin-api-version": "2.2.0"
"plugin-api-version": "2.6.0"
}

View file

@ -0,0 +1,4 @@
appwrite migrations create-csv-export \
--resource-id <ID1:ID2> \
--bucket-id <BUCKET_ID> \
--filename <FILENAME>

View file

@ -0,0 +1,4 @@
appwrite migrations create-csv-import \
--bucket-id <BUCKET_ID> \
--file-id <FILE_ID> \
--resource-id <ID1:ID2>

View file

@ -1,5 +1,10 @@
# Change Log
## 13.3.1
* Fix `onOpen` callback not being called when the websocket connection is established
* Fix add missing `scheduled` value to `ExecutionStatus` enum
## 13.3.0
* Add `onOpen`, `onClose` and `onError` callbacks to `Realtime` service

View file

@ -1,5 +1,15 @@
# Change Log
## 11.0.0
* Rename `create-csv-migration` to `create-csv-import` command to create a CSV import of a collection/table
* Add `create-csv-export` command to create a CSV export of a collection/table
* Add `create-resend-provider` and `update-resend-provider` commands to create and update a Resend Email provider
* Fix syncing of tables deleted locally during `push tables` command
* Fix added push command support for cli spatial types
* Fix attribute changing during push
* Replace pkg with @yao-pkg/pkg in dependencies
## 10.2.3
* Fix `init tables` command not working

View file

@ -1,5 +1,11 @@
# Change Log
## 20.2.2
* Widen `device_info_plus` and `package_info_plus` dependencies to allow for newer versions for Android 15+ support
* Fix `CHUNK_SIZE` constant to `chunkSize`
* Fix missing `@override` annotation to `toMap` method in all model classes
## 20.2.1
* Add transaction support for Databases and TablesDB

View file

@ -1,5 +1,12 @@
# Change Log
## 13.5.0
* Add `create_resend_provider` and `update_resend_provider` methods to `Messaging` service
* Improve deprecation warnings
* Fix adding `Optional[]` to optional parameters
* Fix passing of `None` to nullable parameters
## 13.4.1
* Add transaction support for Databases and TablesDB

View file

@ -48,13 +48,18 @@ class SDKs extends Action
->param('message', null, new Nullable(new Text(256)), 'Commit Message', optional: true)
->param('release', null, new Nullable(new WhiteList(['yes', 'no'])), 'Should we create releases?', optional: true)
->param('commit', null, new Nullable(new WhiteList(['yes', 'no'])), 'Actually create releases (yes) or dry-run (no)?', optional: true)
->param('sdks', null, new Nullable(new Text(256)), 'Selected SDKs', optional: true)
->callback($this->action(...));
}
public function action(?string $selectedPlatform, ?string $selectedSDK, ?string $version, ?string $git, ?string $production, ?string $message, ?string $release, ?string $commit): void
public function action(?string $selectedPlatform, ?string $selectedSDK, ?string $version, ?string $git, ?string $production, ?string $message, ?string $release, ?string $commit, ?string $sdks): void
{
$selectedPlatform ??= Console::confirm('Choose Platform ("' . APP_PLATFORM_CLIENT . '", "' . APP_PLATFORM_SERVER . '", "' . APP_PLATFORM_CONSOLE . '" or "*" for all):');
$selectedSDK ??= \strtolower(Console::confirm('Choose SDK ("*" for all):'));
if (!$sdks) {
$selectedPlatform ??= Console::confirm('Choose Platform ("' . APP_PLATFORM_CLIENT . '", "' . APP_PLATFORM_SERVER . '", "' . APP_PLATFORM_CONSOLE . '" or "*" for all):');
$selectedSDK ??= \strtolower(Console::confirm('Choose SDK ("*" for all):'));
} else {
$sdks = explode(',', $sdks);
}
$version ??= Console::confirm('Choose an Appwrite version');
$createRelease = ($release === 'yes');
@ -104,12 +109,12 @@ class SDKs extends Action
$platforms = Config::getParam('platforms');
foreach ($platforms as $key => $platform) {
if ($selectedPlatform !== $key && $selectedPlatform !== '*') {
if ($selectedPlatform !== $key && $selectedPlatform !== '*' && ($sdks === null)) {
continue;
}
foreach ($platform['sdks'] as $language) {
if ($selectedSDK !== $language['key'] && $selectedSDK !== '*') {
if ($selectedSDK !== $language['key'] && $selectedSDK !== '*' && ($sdks === null || !\in_array($language['key'], $sdks))) {
continue;
}
@ -472,38 +477,60 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
$errorMessage = implode("\n", $prOutput);
if (strpos($errorMessage, 'already exists') !== false) {
Console::warning("Pull request already exists for {$language['name']} SDK, updating title and body...");
$updateCommand = 'cd ' . $target . ' && \
gh pr edit "' . $gitBranch . '" \
$prNumberCommand = 'cd ' . $target . ' && \
gh pr list \
--repo "' . $repoName . '" \
--title "' . $prTitle . '" \
--body "' . $prBody . '" \
--head "' . $gitBranch . '" \
--json number \
--jq ".[0].number" \
2>&1';
$updateOutput = [];
$updateReturnCode = 0;
\exec($updateCommand, $updateOutput, $updateReturnCode);
$prNumberOutput = [];
$prNumberReturnCode = 0;
\exec($prNumberCommand, $prNumberOutput, $prNumberReturnCode);
if ($updateReturnCode === 0) {
Console::success("Successfully updated pull request for {$language['name']} SDK");
if ($prNumberReturnCode === 0 && !empty($prNumberOutput[0])) {
$prNumber = trim($prNumberOutput[0]);
$prUrlCommand = 'cd ' . $target . ' && \
gh pr view "' . $gitBranch . '" \
--repo "' . $repoName . '" \
--json url \
--jq .url \
// Use API directly to update PR to avoid deprecated projectCards field
$updateCommand = 'cd ' . $target . ' && \
gh api \
--method PATCH \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/repos/' . $repoName . '/pulls/' . $prNumber . ' \
-f title="' . $prTitle . '" \
-f body="' . $prBody . '" \
2>&1';
$prUrlOutput = [];
$prUrlReturnCode = 0;
\exec($prUrlCommand, $prUrlOutput, $prUrlReturnCode);
$updateOutput = [];
$updateReturnCode = 0;
\exec($updateCommand, $updateOutput, $updateReturnCode);
if ($prUrlReturnCode === 0 && !empty($prUrlOutput)) {
$prUrls[$language['name']] = $prUrlOutput[0];
if ($updateReturnCode === 0) {
Console::success("Successfully updated pull request for {$language['name']} SDK");
$prUrlCommand = 'cd ' . $target . ' && \
gh pr list \
--repo "' . $repoName . '" \
--head "' . $gitBranch . '" \
--json url \
--jq ".[0].url" \
2>&1';
$prUrlOutput = [];
$prUrlReturnCode = 0;
\exec($prUrlCommand, $prUrlOutput, $prUrlReturnCode);
if ($prUrlReturnCode === 0 && !empty($prUrlOutput)) {
$prUrls[$language['name']] = trim($prUrlOutput[0]);
}
} else {
$updateErrorMessage = implode("\n", $updateOutput);
Console::error("Failed to update pull request for {$language['name']} SDK: " . $updateErrorMessage);
}
} else {
$updateErrorMessage = implode("\n", $updateOutput);
Console::error("Failed to update pull request for {$language['name']} SDK: " . $updateErrorMessage);
Console::error("Failed to get PR number for {$language['name']} SDK");
}
} else {
Console::error("Failed to create pull request for {$language['name']} SDK: " . $errorMessage);