update sdks

This commit is contained in:
Chirag Aggarwal
2025-10-30 10:03:36 +05:30
parent baa7a170d9
commit 07214de370
9 changed files with 85 additions and 43 deletions
+2 -2
View File
@@ -226,7 +226,7 @@ return [
[
'key' => 'cli',
'name' => 'Command Line',
'version' => '10.2.4',
'version' => '10.3.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.2',
'version' => '13.5.0',
'url' => 'https://github.com/appwrite/sdk-for-python',
'package' => 'https://pypi.org/project/appwrite/',
'enabled' => true,
Generated
+12 -12
View File
@@ -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",
@@ -0,0 +1,4 @@
appwrite migrations create-csv-export \
--resource-id <ID1:ID2> \
--bucket-id <BUCKET_ID> \
--filename <FILENAME>
@@ -0,0 +1,4 @@
appwrite migrations create-csv-import \
--bucket-id <BUCKET_ID> \
--file-id <FILE_ID> \
--resource-id <ID1:ID2>
+1
View File
@@ -3,6 +3,7 @@
## 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
+3 -1
View File
@@ -1,7 +1,9 @@
# Change Log
## 10.2.4
## 10.3.0
* Add `create-csv-export` and `create-csv-import` commands to create a CSV export and import 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
+2
View File
@@ -3,6 +3,8 @@
## 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
+3 -1
View File
@@ -1,7 +1,9 @@
# Change Log
## 13.4.2
## 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
+54 -27
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);