mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 17:08:45 +00:00
Merge remote-tracking branch 'origin/1.8.x' into feat-operators
# Conflicts: # composer.lock
This commit is contained in:
commit
dc968a1fa4
24 changed files with 146 additions and 45 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
import { Client, Migrations } from "@appwrite.io/console";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
||||
|
||||
const migrations = new Migrations(client);
|
||||
|
||||
const result = await migrations.createCSVExport({
|
||||
resourceId: '<ID1:ID2>',
|
||||
bucketId: '<BUCKET_ID>',
|
||||
filename: '<FILENAME>',
|
||||
columns: [], // optional
|
||||
queries: [], // optional
|
||||
delimiter: '<DELIMITER>', // optional
|
||||
enclosure: '<ENCLOSURE>', // optional
|
||||
escape: '<ESCAPE>', // optional
|
||||
header: false, // optional
|
||||
notify: false // optional
|
||||
});
|
||||
|
||||
console.log(result);
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
import { Client, Migrations } from "@appwrite.io/console";
|
||||
|
||||
const client = new Client()
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
||||
|
||||
const migrations = new Migrations(client);
|
||||
|
||||
const result = await migrations.createCSVImport({
|
||||
bucketId: '<BUCKET_ID>',
|
||||
fileId: '<FILE_ID>',
|
||||
resourceId: '<ID1:ID2>',
|
||||
internalFile: false // optional
|
||||
});
|
||||
|
||||
console.log(result);
|
||||
|
|
@ -11,7 +11,7 @@ const result = await databases.createCollection({
|
|||
databaseId: '<DATABASE_ID>',
|
||||
collectionId: '<COLLECTION_ID>',
|
||||
name: '<NAME>',
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: [sdk.Permission.read(sdk.Role.any())], // optional
|
||||
documentSecurity: false, // optional
|
||||
enabled: false // optional
|
||||
});
|
||||
|
|
|
|||
|
|
@ -18,6 +18,6 @@ const result = await databases.createDocument({
|
|||
"age": 30,
|
||||
"isAdmin": false
|
||||
},
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: [sdk.Permission.read(sdk.Role.any())], // optional
|
||||
transactionId: '<TRANSACTION_ID>' // optional
|
||||
});
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ const result = await databases.updateCollection({
|
|||
databaseId: '<DATABASE_ID>',
|
||||
collectionId: '<COLLECTION_ID>',
|
||||
name: '<NAME>',
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: [sdk.Permission.read(sdk.Role.any())], // optional
|
||||
documentSecurity: false, // optional
|
||||
enabled: false // optional
|
||||
});
|
||||
|
|
|
|||
|
|
@ -12,6 +12,6 @@ const result = await databases.updateDocument({
|
|||
collectionId: '<COLLECTION_ID>',
|
||||
documentId: '<DOCUMENT_ID>',
|
||||
data: {}, // optional
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: [sdk.Permission.read(sdk.Role.any())], // optional
|
||||
transactionId: '<TRANSACTION_ID>' // optional
|
||||
});
|
||||
|
|
|
|||
|
|
@ -12,6 +12,6 @@ const result = await databases.upsertDocument({
|
|||
collectionId: '<COLLECTION_ID>',
|
||||
documentId: '<DOCUMENT_ID>',
|
||||
data: {},
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: [sdk.Permission.read(sdk.Role.any())], // optional
|
||||
transactionId: '<TRANSACTION_ID>' // optional
|
||||
});
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ const storage = new sdk.Storage(client);
|
|||
const result = await storage.createBucket({
|
||||
bucketId: '<BUCKET_ID>',
|
||||
name: '<NAME>',
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: [sdk.Permission.read(sdk.Role.any())], // optional
|
||||
fileSecurity: false, // optional
|
||||
enabled: false, // optional
|
||||
maximumFileSize: 1, // optional
|
||||
|
|
|
|||
|
|
@ -12,5 +12,5 @@ const result = await storage.createFile({
|
|||
bucketId: '<BUCKET_ID>',
|
||||
fileId: '<FILE_ID>',
|
||||
file: InputFile.fromPath('/path/to/file', 'filename'),
|
||||
permissions: ["read("any")"] // optional
|
||||
permissions: [sdk.Permission.read(sdk.Role.any())] // optional
|
||||
});
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ const storage = new sdk.Storage(client);
|
|||
const result = await storage.updateBucket({
|
||||
bucketId: '<BUCKET_ID>',
|
||||
name: '<NAME>',
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: [sdk.Permission.read(sdk.Role.any())], // optional
|
||||
fileSecurity: false, // optional
|
||||
enabled: false, // optional
|
||||
maximumFileSize: 1, // optional
|
||||
|
|
|
|||
|
|
@ -11,5 +11,5 @@ const result = await storage.updateFile({
|
|||
bucketId: '<BUCKET_ID>',
|
||||
fileId: '<FILE_ID>',
|
||||
name: '<NAME>', // optional
|
||||
permissions: ["read("any")"] // optional
|
||||
permissions: [sdk.Permission.read(sdk.Role.any())] // optional
|
||||
});
|
||||
|
|
|
|||
|
|
@ -18,6 +18,6 @@ const result = await tablesDB.createRow({
|
|||
"age": 30,
|
||||
"isAdmin": false
|
||||
},
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: [sdk.Permission.read(sdk.Role.any())], // optional
|
||||
transactionId: '<TRANSACTION_ID>' // optional
|
||||
});
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ const result = await tablesDB.createTable({
|
|||
databaseId: '<DATABASE_ID>',
|
||||
tableId: '<TABLE_ID>',
|
||||
name: '<NAME>',
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: [sdk.Permission.read(sdk.Role.any())], // optional
|
||||
rowSecurity: false, // optional
|
||||
enabled: false // optional
|
||||
});
|
||||
|
|
|
|||
|
|
@ -12,6 +12,6 @@ const result = await tablesDB.updateRow({
|
|||
tableId: '<TABLE_ID>',
|
||||
rowId: '<ROW_ID>',
|
||||
data: {}, // optional
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: [sdk.Permission.read(sdk.Role.any())], // optional
|
||||
transactionId: '<TRANSACTION_ID>' // optional
|
||||
});
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ const result = await tablesDB.updateTable({
|
|||
databaseId: '<DATABASE_ID>',
|
||||
tableId: '<TABLE_ID>',
|
||||
name: '<NAME>',
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: [sdk.Permission.read(sdk.Role.any())], // optional
|
||||
rowSecurity: false, // optional
|
||||
enabled: false // optional
|
||||
});
|
||||
|
|
|
|||
|
|
@ -12,6 +12,6 @@ const result = await tablesDB.upsertRow({
|
|||
tableId: '<TABLE_ID>',
|
||||
rowId: '<ROW_ID>',
|
||||
data: {}, // optional
|
||||
permissions: ["read("any")"], // optional
|
||||
permissions: [sdk.Permission.read(sdk.Role.any())], // optional
|
||||
transactionId: '<TRANSACTION_ID>' // optional
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue