mirror of
https://github.com/appwrite/appwrite
synced 2026-05-06 06:48:22 +00:00
Merge remote-tracking branch 'origin/1.7.x' into 1.8.x
This commit is contained in:
commit
3e8cd9d748
10 changed files with 72 additions and 14 deletions
|
|
@ -59,7 +59,7 @@ return [
|
|||
[
|
||||
'key' => 'flutter',
|
||||
'name' => 'Flutter',
|
||||
'version' => '17.0.1',
|
||||
'version' => '17.0.2',
|
||||
'url' => 'https://github.com/appwrite/sdk-for-flutter',
|
||||
'package' => 'https://pub.dev/packages/appwrite',
|
||||
'enabled' => true,
|
||||
|
|
@ -217,7 +217,7 @@ return [
|
|||
[
|
||||
'key' => 'cli',
|
||||
'name' => 'Command Line',
|
||||
'version' => '8.2.1',
|
||||
'version' => '8.2.2',
|
||||
'url' => 'https://github.com/appwrite/sdk-for-cli',
|
||||
'package' => 'https://www.npmjs.com/package/appwrite-cli',
|
||||
'enabled' => true,
|
||||
|
|
@ -231,6 +231,7 @@ return [
|
|||
'gitRepoName' => 'sdk-for-cli',
|
||||
'gitUserName' => 'appwrite',
|
||||
'gitBranch' => 'dev',
|
||||
'repoBranch' => 'master',
|
||||
'exclude' => [
|
||||
'services' => [
|
||||
['name' => 'assistant'],
|
||||
|
|
@ -376,7 +377,7 @@ return [
|
|||
[
|
||||
'key' => 'dart',
|
||||
'name' => 'Dart',
|
||||
'version' => '16.0.0',
|
||||
'version' => '16.1.0',
|
||||
'url' => 'https://github.com/appwrite/sdk-for-dart',
|
||||
'package' => 'https://pub.dev/packages/dart_appwrite',
|
||||
'enabled' => true,
|
||||
|
|
|
|||
12
composer.lock
generated
12
composer.lock
generated
|
|
@ -4810,16 +4810,16 @@
|
|||
"packages-dev": [
|
||||
{
|
||||
"name": "appwrite/sdk-generator",
|
||||
"version": "0.41.15",
|
||||
"version": "0.41.17",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/appwrite/sdk-generator.git",
|
||||
"reference": "02a7e0df5a555c7bdfb50cb68db60460afb409e1"
|
||||
"reference": "ef5e9d952032deecffee7f825a941c40ed4c84b8"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/02a7e0df5a555c7bdfb50cb68db60460afb409e1",
|
||||
"reference": "02a7e0df5a555c7bdfb50cb68db60460afb409e1",
|
||||
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/ef5e9d952032deecffee7f825a941c40ed4c84b8",
|
||||
"reference": "ef5e9d952032deecffee7f825a941c40ed4c84b8",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
|
@ -4855,9 +4855,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/0.41.15"
|
||||
"source": "https://github.com/appwrite/sdk-generator/tree/0.41.17"
|
||||
},
|
||||
"time": "2025-07-16T13:00:21+00:00"
|
||||
"time": "2025-07-18T08:18:48+00:00"
|
||||
},
|
||||
{
|
||||
"name": "doctrine/annotations",
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
import 'package:dart_appwrite/dart_appwrite.dart';
|
||||
|
||||
Client client = Client()
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<YOUR_PROJECT_ID>') // Your project ID
|
||||
.setSession(''); // The user session to authenticate with
|
||||
|
||||
Databases databases = Databases(client);
|
||||
|
||||
Document result = await databases.upsertDocument(
|
||||
databaseId: '<DATABASE_ID>',
|
||||
collectionId: '<COLLECTION_ID>',
|
||||
documentId: '<DOCUMENT_ID>',
|
||||
data: {},
|
||||
permissions: ["read("any")"], // (optional)
|
||||
);
|
||||
|
|
@ -10,5 +10,5 @@ Databases databases = Databases(client);
|
|||
DocumentList result = await databases.upsertDocuments(
|
||||
databaseId: '<DATABASE_ID>',
|
||||
collectionId: '<COLLECTION_ID>',
|
||||
documents: [], // (optional)
|
||||
documents: [],
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,17 @@
|
|||
# Change Log
|
||||
|
||||
## 8.2.2
|
||||
|
||||
* Fix object comparison logic when pushing settings
|
||||
* Type generation fixes:
|
||||
* Dart: Fixed import casing to snake_case, removed `extends Document` and hardcoded attributes, removed unnecessary imports
|
||||
* Java: Fixed indentation to 4 spaces, updated imports to `java.util.Objects`, fixed enum casing in strict mode as per [Oracle official docs](https://docs.oracle.com/javase/tutorial/java/javaOO/enum.html)
|
||||
* Javascript: Updated optional values formatting from `|null` to `| null`
|
||||
* Kotlin: Fixed indentation to 4 spaces per [Kotlinlang official docs](https://kotlinlang.org/docs/coding-conventions.html#indentation)
|
||||
* PHP: Fixed indentation to 4 spaces per [PHP Fig official docs](https://www.php-fig.org/psr/psr-2/)
|
||||
* Swift: Fixed indentation to 4 spaces, improved `decodeIfPresent` usage for optionals, added missing `public` to `init` method
|
||||
* Typescript: Fixed indentation to 4 spaces per [Typescript coding guidelines](https://github.com/microsoft/TypeScript/wiki/Coding-guidelines)
|
||||
|
||||
## 8.2.1
|
||||
|
||||
* Added `--with-variables` option to the Sites command for adding/updating environment variables
|
||||
|
|
|
|||
|
|
@ -1,5 +1,13 @@
|
|||
# Change Log
|
||||
|
||||
## 16.1.0
|
||||
|
||||
* Add `gif` support to `ImageFormat` enum
|
||||
* Add support for `dart38` and `flutter332` runtimes
|
||||
* Add `upsertDocument()` method to Databases service
|
||||
* Fix `convertTo()` method in `Document` and `Preferences` models to correctly accept `Map<String, dynamic>`
|
||||
* Fix `upsertDocuments()` method to have `documents` attribute as required parameter
|
||||
|
||||
## 16.0.0
|
||||
|
||||
* Add `<REGION>` to doc examples due to the new multi region endpoints
|
||||
|
|
|
|||
|
|
@ -1,9 +1,20 @@
|
|||
# Change Log
|
||||
|
||||
## 16.1.1
|
||||
## 17.0.2
|
||||
|
||||
* Add `gif` support to `ImageFormat` enum
|
||||
* Fix `convertTo()` method in `Document` and `Preferences` models to correctly accept `Map<String, dynamic>`
|
||||
|
||||
## 17.0.1
|
||||
|
||||
* Fix `devKeys` support by conditionally including credentials during requests
|
||||
|
||||
## 17.0.0
|
||||
|
||||
* Update `flutter_web_auth_2` dependency to version 4.1.0
|
||||
* Update `auth.html` example in README.md to align with `flutter_web_auth_2` documentation
|
||||
* Breaking changes:
|
||||
* Minimum iOS version supported is now 17.4 due to the updated requirements of `flutter_web_auth_2` version 4.1.0
|
||||
|
||||
## 16.1.0
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ class Origin extends Validator
|
|||
protected array $schemes = [];
|
||||
protected ?string $scheme = null;
|
||||
protected ?string $host = null;
|
||||
protected string $origin = '';
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
|
|
@ -32,6 +33,7 @@ class Origin extends Validator
|
|||
*/
|
||||
public function isValid($origin): bool
|
||||
{
|
||||
$this->origin = $origin;
|
||||
$this->scheme = null;
|
||||
$this->host = null;
|
||||
|
||||
|
|
@ -68,13 +70,17 @@ class Origin extends Validator
|
|||
*/
|
||||
public function getDescription(): string
|
||||
{
|
||||
$platform = $this->scheme ? Platform::getNameByScheme($this->scheme) : null;
|
||||
$platform = $this->scheme ? Platform::getNameByScheme($this->scheme) : '';
|
||||
$host = $this->host ? '(' . $this->host . ')' : '';
|
||||
|
||||
if (empty($this->host) && empty($this->scheme)) {
|
||||
return 'Invalid Origin.';
|
||||
}
|
||||
|
||||
if (empty($platform)) {
|
||||
return 'Invalid Scheme. The scheme used (' . $this->scheme . ') in the Origin (' . $this->origin . ') is not supported. If you are using a custom scheme, please change it to `appwrite-callback-<PROJECT_ID>`';
|
||||
}
|
||||
|
||||
return 'Invalid Origin. Register your new client ' . $host . ' as a new '
|
||||
. $platform . ' platform on your project console dashboard';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -293,6 +293,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|||
$gitUrl = 'git@github.com:aw-tests/' . $language['gitRepoName'] . '.git';
|
||||
}
|
||||
|
||||
$repoBranch = $language['repoBranch'] ?? 'main';
|
||||
if ($git && !empty($gitUrl)) {
|
||||
\exec('rm -rf ' . $target . ' && \
|
||||
mkdir -p ' . $target . ' && \
|
||||
|
|
@ -300,8 +301,8 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|||
git init && \
|
||||
git remote add origin ' . $gitUrl . ' && \
|
||||
git fetch origin && \
|
||||
git checkout main || git checkout -b main && \
|
||||
git pull origin main && \
|
||||
git checkout ' . $repoBranch . ' || git checkout -b ' . $repoBranch . ' && \
|
||||
git pull origin ' . $repoBranch . ' && \
|
||||
git checkout ' . $gitBranch . ' || git checkout -b ' . $gitBranch . ' && \
|
||||
git fetch origin ' . $gitBranch . ' || git push -u origin ' . $gitBranch . ' && \
|
||||
git pull origin ' . $gitBranch . ' && \
|
||||
|
|
|
|||
|
|
@ -106,5 +106,8 @@ class OriginTest extends TestCase
|
|||
|
||||
$this->assertEquals(false, $validator->isValid('ms-browser-extension://com.company.appname'));
|
||||
$this->assertEquals('Invalid Origin. Register your new client (com.company.appname) as a new Web (Edge Extension) platform on your project console dashboard', $validator->getDescription());
|
||||
|
||||
$this->assertEquals(false, $validator->isValid('random-scheme://localhost'));
|
||||
$this->assertEquals('Invalid Scheme. The scheme used (random-scheme) in the Origin (random-scheme://localhost) is not supported. If you are using a custom scheme, please change it to `appwrite-callback-<PROJECT_ID>`', $validator->getDescription());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue