mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Merge branch '0.9.x' into feat-upgrade-runtimes
This commit is contained in:
+11
-11
@@ -15,7 +15,7 @@ return [
|
||||
[
|
||||
'key' => 'web',
|
||||
'name' => 'Web',
|
||||
'version' => '3.1.0',
|
||||
'version' => '3.2.0',
|
||||
'url' => 'https://github.com/appwrite/sdk-for-web',
|
||||
'package' => 'https://www.npmjs.com/package/appwrite',
|
||||
'enabled' => true,
|
||||
@@ -62,7 +62,7 @@ return [
|
||||
[
|
||||
'key' => 'flutter',
|
||||
'name' => 'Flutter',
|
||||
'version' => '0.6.4',
|
||||
'version' => '0.7.0',
|
||||
'url' => 'https://github.com/appwrite/sdk-for-flutter',
|
||||
'package' => 'https://pub.dev/packages/appwrite',
|
||||
'enabled' => true,
|
||||
@@ -152,7 +152,7 @@ return [
|
||||
[
|
||||
'key' => 'web',
|
||||
'name' => 'Console',
|
||||
'version' => '2.0.0',
|
||||
'version' => '2.1.0',
|
||||
'url' => 'https://github.com/appwrite/sdk-for-console',
|
||||
'package' => '',
|
||||
'enabled' => true,
|
||||
@@ -179,7 +179,7 @@ return [
|
||||
[
|
||||
'key' => 'nodejs',
|
||||
'name' => 'Node.js',
|
||||
'version' => '2.3.0',
|
||||
'version' => '2.4.0',
|
||||
'url' => 'https://github.com/appwrite/sdk-for-node',
|
||||
'package' => 'https://www.npmjs.com/package/node-appwrite',
|
||||
'enabled' => true,
|
||||
@@ -196,7 +196,7 @@ return [
|
||||
[
|
||||
'key' => 'deno',
|
||||
'name' => 'Deno',
|
||||
'version' => '0.2.2',
|
||||
'version' => '0.3.0',
|
||||
'url' => 'https://github.com/appwrite/sdk-for-deno',
|
||||
'package' => 'https://deno.land/x/appwrite',
|
||||
'enabled' => true,
|
||||
@@ -213,7 +213,7 @@ return [
|
||||
[
|
||||
'key' => 'php',
|
||||
'name' => 'PHP',
|
||||
'version' => '2.1.2',
|
||||
'version' => '2.2.0',
|
||||
'url' => 'https://github.com/appwrite/sdk-for-php',
|
||||
'package' => 'https://packagist.org/packages/appwrite/appwrite',
|
||||
'enabled' => true,
|
||||
@@ -230,7 +230,7 @@ return [
|
||||
[
|
||||
'key' => 'python',
|
||||
'name' => 'Python',
|
||||
'version' => '0.3.0',
|
||||
'version' => '0.4.0',
|
||||
'url' => 'https://github.com/appwrite/sdk-for-python',
|
||||
'package' => 'https://pypi.org/project/appwrite/',
|
||||
'enabled' => true,
|
||||
@@ -247,7 +247,7 @@ return [
|
||||
[
|
||||
'key' => 'ruby',
|
||||
'name' => 'Ruby',
|
||||
'version' => '2.2.0',
|
||||
'version' => '2.3.0',
|
||||
'url' => 'https://github.com/appwrite/sdk-for-ruby',
|
||||
'package' => 'https://rubygems.org/gems/appwrite',
|
||||
'enabled' => true,
|
||||
@@ -264,7 +264,7 @@ return [
|
||||
[
|
||||
'key' => 'go',
|
||||
'name' => 'Go',
|
||||
'version' => '0.0.7',
|
||||
'version' => '0.1.0',
|
||||
'url' => 'https://github.com/appwrite/sdk-for-go',
|
||||
'package' => '',
|
||||
'enabled' => false,
|
||||
@@ -315,7 +315,7 @@ return [
|
||||
[
|
||||
'key' => 'dart',
|
||||
'name' => 'Dart',
|
||||
'version' => '0.6.3',
|
||||
'version' => '0.7.0',
|
||||
'url' => 'https://github.com/appwrite/sdk-for-dart',
|
||||
'package' => 'https://pub.dev/packages/dart_appwrite',
|
||||
'enabled' => true,
|
||||
@@ -332,7 +332,7 @@ return [
|
||||
[
|
||||
'key' => 'cli',
|
||||
'name' => 'Command Line',
|
||||
'version' => '0.10.0',
|
||||
'version' => '0.11.0',
|
||||
'url' => 'https://github.com/appwrite/sdk-for-cli',
|
||||
'package' => 'https://github.com/appwrite/sdk-for-cli',
|
||||
'enabled' => true,
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1155,14 +1155,23 @@ App::patch('/v1/account/email')
|
||||
|
||||
// TODO after this user needs to confirm mail again
|
||||
|
||||
$user = $projectDB->updateDocument(\array_merge(
|
||||
if (!$isAnonymousUser) {
|
||||
// Remove previous unique ID.
|
||||
$projectDB->deleteUniqueKey(\md5($user->getArrayCopy()['$collection'].':'.'email'.'='.$user->getAttribute('email')));
|
||||
}
|
||||
|
||||
$document = (\array_merge(
|
||||
$user->getArrayCopy(),
|
||||
($isAnonymousUser ? [ 'password' => Auth::passwordHash($password) ] : []),
|
||||
[
|
||||
'email' => $email,
|
||||
'emailVerification' => false,
|
||||
]
|
||||
));
|
||||
));
|
||||
|
||||
$user = $projectDB->updateDocument($document);
|
||||
|
||||
$projectDB->addUniqueKey(\md5($document['$collection'].':'.'email'.'='.$email));
|
||||
|
||||
if (false === $user) {
|
||||
throw new Exception('Failed saving user to DB', 500);
|
||||
|
||||
@@ -22,7 +22,6 @@ use Utopia\Image\Image;
|
||||
use Appwrite\OpenSSL\OpenSSL;
|
||||
use Appwrite\Utopia\Response;
|
||||
use Utopia\Config\Config;
|
||||
use Utopia\Validator\Numeric;
|
||||
|
||||
App::post('/v1/storage/files')
|
||||
->desc('Create File')
|
||||
@@ -280,7 +279,7 @@ App::get('/v1/storage/files/:fileId/preview')
|
||||
$fileLogos = Config::getParam('storage-logos');
|
||||
|
||||
$date = \date('D, d M Y H:i:s', \time() + (60 * 60 * 24 * 45)).' GMT'; // 45 days cache
|
||||
$key = \md5($fileId.$width.$height.$quality.$borderWidth.$borderColor.$borderRadius.$opacity.$rotation.$background.$storage.$output);
|
||||
$key = \md5($fileId.$width.$height.$gravity.$quality.$borderWidth.$borderColor.$borderRadius.$opacity.$rotation.$background.$storage.$output);
|
||||
|
||||
$file = $projectDB->getDocument($fileId);
|
||||
|
||||
@@ -300,7 +299,7 @@ App::get('/v1/storage/files/:fileId/preview')
|
||||
$cipher = null;
|
||||
$background = (empty($background)) ? 'eceff1' : $background;
|
||||
$type = \strtolower(\pathinfo($path, PATHINFO_EXTENSION));
|
||||
$key = \md5($path.$width.$height.$quality.$borderWidth.$borderColor.$borderRadius.$opacity.$rotation.$background.$storage.$output);
|
||||
$key = \md5($path.$width.$height.$gravity.$quality.$borderWidth.$borderColor.$borderRadius.$opacity.$rotation.$background.$storage.$output);
|
||||
}
|
||||
|
||||
$compressor = new GZIP();
|
||||
|
||||
+12
-12
@@ -7,7 +7,7 @@ use Appwrite\Network\Validator\Host;
|
||||
use Appwrite\Utopia\Response;
|
||||
use Utopia\App;
|
||||
use Utopia\Validator\ArrayList;
|
||||
use Utopia\Validator\Integer;
|
||||
use Utopia\Validator\Numeric;
|
||||
use Utopia\Validator\Text;
|
||||
use Utopia\Storage\Validator\File;
|
||||
|
||||
@@ -24,7 +24,7 @@ App::get('/v1/mock/tests/foo')
|
||||
->label('sdk.response.model', Response::MODEL_MOCK)
|
||||
->label('sdk.mock', true)
|
||||
->param('x', '', new Text(100), 'Sample string param')
|
||||
->param('y', '', new Integer(), 'Sample numeric param')
|
||||
->param('y', '', new Numeric(), 'Sample numeric param')
|
||||
->param('z', null, new ArrayList(new Text(256)), 'Sample array param')
|
||||
->action(function ($x, $y, $z) {
|
||||
});
|
||||
@@ -42,7 +42,7 @@ App::post('/v1/mock/tests/foo')
|
||||
->label('sdk.response.model', Response::MODEL_MOCK)
|
||||
->label('sdk.mock', true)
|
||||
->param('x', '', new Text(100), 'Sample string param')
|
||||
->param('y', '', new Integer(), 'Sample numeric param')
|
||||
->param('y', '', new Numeric(), 'Sample numeric param')
|
||||
->param('z', null, new ArrayList(new Text(256)), 'Sample array param')
|
||||
->action(function ($x, $y, $z) {
|
||||
});
|
||||
@@ -60,7 +60,7 @@ App::patch('/v1/mock/tests/foo')
|
||||
->label('sdk.response.model', Response::MODEL_MOCK)
|
||||
->label('sdk.mock', true)
|
||||
->param('x', '', new Text(100), 'Sample string param')
|
||||
->param('y', '', new Integer(), 'Sample numeric param')
|
||||
->param('y', '', new Numeric(), 'Sample numeric param')
|
||||
->param('z', null, new ArrayList(new Text(256)), 'Sample array param')
|
||||
->action(function ($x, $y, $z) {
|
||||
});
|
||||
@@ -78,7 +78,7 @@ App::put('/v1/mock/tests/foo')
|
||||
->label('sdk.response.model', Response::MODEL_MOCK)
|
||||
->label('sdk.mock', true)
|
||||
->param('x', '', new Text(100), 'Sample string param')
|
||||
->param('y', '', new Integer(), 'Sample numeric param')
|
||||
->param('y', '', new Numeric(), 'Sample numeric param')
|
||||
->param('z', null, new ArrayList(new Text(256)), 'Sample array param')
|
||||
->action(function ($x, $y, $z) {
|
||||
});
|
||||
@@ -96,7 +96,7 @@ App::delete('/v1/mock/tests/foo')
|
||||
->label('sdk.response.model', Response::MODEL_MOCK)
|
||||
->label('sdk.mock', true)
|
||||
->param('x', '', new Text(100), 'Sample string param')
|
||||
->param('y', '', new Integer(), 'Sample numeric param')
|
||||
->param('y', '', new Numeric(), 'Sample numeric param')
|
||||
->param('z', null, new ArrayList(new Text(256)), 'Sample array param')
|
||||
->action(function ($x, $y, $z) {
|
||||
});
|
||||
@@ -114,7 +114,7 @@ App::get('/v1/mock/tests/bar')
|
||||
->label('sdk.response.model', Response::MODEL_MOCK)
|
||||
->label('sdk.mock', true)
|
||||
->param('x', '', new Text(100), 'Sample string param')
|
||||
->param('y', '', new Integer(), 'Sample numeric param')
|
||||
->param('y', '', new Numeric(), 'Sample numeric param')
|
||||
->param('z', null, new ArrayList(new Text(256)), 'Sample array param')
|
||||
->action(function ($x, $y, $z) {
|
||||
});
|
||||
@@ -132,7 +132,7 @@ App::post('/v1/mock/tests/bar')
|
||||
->label('sdk.response.model', Response::MODEL_MOCK)
|
||||
->label('sdk.mock', true)
|
||||
->param('x', '', new Text(100), 'Sample string param')
|
||||
->param('y', '', new Integer(), 'Sample numeric param')
|
||||
->param('y', '', new Numeric(), 'Sample numeric param')
|
||||
->param('z', null, new ArrayList(new Text(256)), 'Sample array param')
|
||||
->action(function ($x, $y, $z) {
|
||||
});
|
||||
@@ -150,7 +150,7 @@ App::patch('/v1/mock/tests/bar')
|
||||
->label('sdk.response.model', Response::MODEL_MOCK)
|
||||
->label('sdk.mock', true)
|
||||
->param('x', '', new Text(100), 'Sample string param')
|
||||
->param('y', '', new Integer(), 'Sample numeric param')
|
||||
->param('y', '', new Numeric(), 'Sample numeric param')
|
||||
->param('z', null, new ArrayList(new Text(256)), 'Sample array param')
|
||||
->action(function ($x, $y, $z) {
|
||||
});
|
||||
@@ -168,7 +168,7 @@ App::put('/v1/mock/tests/bar')
|
||||
->label('sdk.response.model', Response::MODEL_MOCK)
|
||||
->label('sdk.mock', true)
|
||||
->param('x', '', new Text(100), 'Sample string param')
|
||||
->param('y', '', new Integer(), 'Sample numeric param')
|
||||
->param('y', '', new Numeric(), 'Sample numeric param')
|
||||
->param('z', null, new ArrayList(new Text(256)), 'Sample array param')
|
||||
->action(function ($x, $y, $z) {
|
||||
});
|
||||
@@ -186,7 +186,7 @@ App::delete('/v1/mock/tests/bar')
|
||||
->label('sdk.response.model', Response::MODEL_MOCK)
|
||||
->label('sdk.mock', true)
|
||||
->param('x', '', new Text(100), 'Sample string param')
|
||||
->param('y', '', new Integer(), 'Sample numeric param')
|
||||
->param('y', '', new Numeric(), 'Sample numeric param')
|
||||
->param('z', null, new ArrayList(new Text(256)), 'Sample array param')
|
||||
->action(function ($x, $y, $z) {
|
||||
});
|
||||
@@ -230,7 +230,7 @@ App::post('/v1/mock/tests/general/upload')
|
||||
->label('sdk.response.model', Response::MODEL_MOCK)
|
||||
->label('sdk.mock', true)
|
||||
->param('x', '', new Text(100), 'Sample string param')
|
||||
->param('y', '', new Integer(), 'Sample numeric param')
|
||||
->param('y', '', new Numeric(), 'Sample numeric param')
|
||||
->param('z', null, new ArrayList(new Text(256)), 'Sample array param')
|
||||
->param('file', [], new File(), 'Sample file param', false)
|
||||
->inject('request')
|
||||
|
||||
+13
-4
@@ -8,12 +8,20 @@ use Appwrite\Database\Database;
|
||||
use Appwrite\Database\Validator\Authorization;
|
||||
use Appwrite\Database\Adapter\MySQL as MySQLAdapter;
|
||||
use Appwrite\Database\Adapter\Redis as RedisAdapter;
|
||||
use Appwrite\Migration\Version;
|
||||
use Appwrite\Migration\Migration;
|
||||
use Utopia\Validator\Text;
|
||||
|
||||
$cli
|
||||
->task('migrate')
|
||||
->action(function () use ($register) {
|
||||
Console::success('Starting Data Migration');
|
||||
->param('version', APP_VERSION_STABLE, new Text(8), 'Version to migrate to.', true)
|
||||
->action(function ($version) use ($register) {
|
||||
if (!array_key_exists($version, Migration::$versions)) {
|
||||
Console::error("Version {$version} not found.");
|
||||
Console::exit(1);
|
||||
return;
|
||||
}
|
||||
|
||||
Console::success('Starting Data Migration to version '.$version);
|
||||
$db = $register->get('db', true);
|
||||
$cache = $register->get('cache', true);
|
||||
|
||||
@@ -38,7 +46,8 @@ $cli
|
||||
$projects = [$console];
|
||||
$count = 0;
|
||||
|
||||
$migration = new Version\V08($register->get('db')); //TODO: remove hardcoded version and move to dynamic migration
|
||||
$class = 'Appwrite\\Migration\\Version\\'.Migration::$versions[$version];
|
||||
$migration = new $class($register->get('db'));
|
||||
|
||||
while ($sum > 0) {
|
||||
foreach ($projects as $project) {
|
||||
|
||||
@@ -225,8 +225,6 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
\exec('mkdir -p '.$resultExamples.' && cp -r '.$result.'/docs/examples '.$resultExamples);
|
||||
Console::success("Copied code examples for {$language['name']} SDK to: {$resultExamples}");
|
||||
|
||||
\exec('rm -rf '.$result);
|
||||
Console::success("Removed source code directory '{$result}' for {$language['name']} SDK");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -612,7 +612,7 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled',true);
|
||||
--code='/myrepo/myfunction'" data-forms-code="powershell" data-lang="powershell" data-lang-label="PowerShell"></textarea>
|
||||
</div>
|
||||
|
||||
<p>Learn more about <a href="" target="_blank">creating tags</a>, installing and using the <a href="" target="_blank">Appwrite CLI</a>.</p>
|
||||
<p>Learn more about <a href="https://appwrite.io/docs/server/functions#functionsCreateTag" target="_blank">creating tags</a>, installing and using the <a href="https://appwrite.io/docs/command-line" target="_blank">Appwrite CLI</a>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<h2 style="display: none">Manual</h2>
|
||||
|
||||
Reference in New Issue
Block a user