Compare commits

..
Author SHA1 Message Date
ArnabChatterjee20k 7c408d675e pr followups 2025-11-07 14:30:22 +05:30
ArnabChatterjee20k 4d47bc2ebf Merge remote-tracking branch 'upstream/1.8.x' into dat-647 2025-11-07 13:48:59 +05:30
ArnabChatterjee20k 119d6c1789 Merge remote-tracking branch 'upstream/1.8.x' into dat-647 2025-11-07 13:19:28 +05:30
Steven NguyenandGitHub ef938a1c39 Merge pull request #10732 from appwrite/copilot/fix-google-token-disappears
Fix Google OAuth2 refresh token support
2025-11-06 10:28:02 -08:00
Matej BačoandGitHub e342009c9e Merge pull request #10771 from appwrite/Update-facts-on-Github-sites-and-functions
feat: Add new tips to Comment class
2025-11-06 13:50:27 +01:00
Matej BačoandGitHub 41d89f1b7a Merge pull request #10773 from appwrite/chore-remove-locale-cache
Chore: remove locale cache
2025-11-06 13:49:32 +01:00
Matej Bačo ad6aff6af2 remove locale cache 2025-11-06 13:24:17 +01:00
Harsh MahajanandGitHub 9b52f6f8f6 Add new tips to Comment class 2025-11-06 14:17:31 +05:30
copilot-swe-agent[bot]andstnguyen90 627adb43e0 Add access_type=offline and prompt=consent to Google OAuth2 login URL to enable refresh tokens
Co-authored-by: stnguyen90 <1477010+stnguyen90@users.noreply.github.com>
2025-10-29 23:12:28 +00:00
copilot-swe-agent[bot] 9ad08694ed Initial plan 2025-10-29 23:01:33 +00:00
ArnabChatterjee20k ac604b11e3 added migration script 2025-09-01 13:13:52 +05:30
ArnabChatterjee20k f68d49c4d6 updated the migration error size attribute 2025-08-29 18:19:29 +05:30
7 changed files with 85 additions and 12 deletions
+1 -1
View File
@@ -2345,7 +2345,7 @@ return [
'$id' => ID::custom('errors'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 65535,
'size' => 1_000_000,
'signed' => true,
'required' => true,
'default' => null,
-5
View File
@@ -37,7 +37,6 @@ App::get('/v1/locale')
$currencies = Config::getParam('locale-currencies');
$output = [];
$ip = $request->getIP();
$time = (60 * 60 * 24 * 45); // 45 days cache
$output['ip'] = $ip;
@@ -68,10 +67,6 @@ App::get('/v1/locale')
$output['currency'] = $currency;
}
$response
->addHeader('Cache-Control', 'public, max-age=' . $time)
->addHeader('Cache-Control', 'private, max-age=3888000') // 45 days
;
$response->dynamic(new Document($output), Response::MODEL_LOCALE);
});
+1 -1
View File
@@ -57,7 +57,7 @@
"utopia-php/emails": "0.6.*",
"utopia-php/dns": "1.1.*",
"utopia-php/dsn": "0.2.1",
"utopia-php/framework": "dev-fix-nullable-check as 0.33.28",
"utopia-php/framework": "0.33.*",
"utopia-php/fetch": "0.4.*",
"utopia-php/image": "0.8.*",
"utopia-php/locale": "0.8.*",
+3 -1
View File
@@ -53,7 +53,9 @@ class Google extends OAuth2
'redirect_uri' => $this->callback,
'scope' => \implode(' ', $this->getScopes()),
'state' => \json_encode($this->state),
'response_type' => 'code'
'response_type' => 'code',
'access_type' => 'offline',
'prompt' => 'consent'
]);
}
+50
View File
@@ -6,6 +6,7 @@ use Appwrite\Migration\Migration;
use Exception;
use Throwable;
use Utopia\CLI\Console;
use Utopia\Config\Config;
use Utopia\Database\Database;
use Utopia\Database\Document;
use Utopia\Database\Exception\Conflict;
@@ -132,6 +133,13 @@ class V23 extends Migration
}
$this->dbForProject->purgeCachedCollection($id);
break;
case 'migrations':
try {
$this->updateMigrateErrorSize();
} catch (\Throwable $th) {
Console::warning("Failed to migration error attribute size in collection {$id}: {$th->getMessage()}");
}
default:
break;
}
@@ -201,4 +209,46 @@ class V23 extends Migration
}
return $document;
}
/**
* Update migration attribute size
* @return void
*/
private function updateMigrateErrorSize(): void
{
if ($this->project->getId() === 'console') {
return;
}
// Read-modify-write from the live schema to avoid overwriting unrelated changes.
$migration = $this->dbForProject->getCollection('migrations');
$attributes = $migration->getAttribute('attributes', []);
$attrsArray = \array_map(fn (Document $doc) => $doc->getArrayCopy(), $attributes);
$errorsIdx = \array_search('errors', \array_column($attrsArray, '$id'));
if ($errorsIdx === false) {
Console::warning("Skipping: 'errors' attribute not found in migrations collection for project {$this->project->getId()}");
return;
}
$desiredSize = 1_000_000;
$migrationAttributes = Config::getParam('collections', [])['projects']['migrations']['attributes'] ?? [];
$migrationIndex = \array_search('errors', \array_column($migrationAttributes, '$id'));
if ($migrationIndex !== false && isset($migrationAttributes[$migrationIndex]['size'])) {
$desiredSize = (int) $migrationAttributes[$migrationIndex]['size'];
}
$currentSize = (int) ($attributes[$errorsIdx]['size'] ?? 0);
if ($currentSize === $desiredSize) {
Console::warning("Skipping: 'errors' attribute already of desired size {$desiredSize} in migrations collection for project {$this->project->getId()}");
return;
}
$attributes[$errorsIdx]['size'] = $desiredSize;
$migration->setAttribute('attributes', $attributes);
$this->dbForProject->updateDocument($migration->getCollection(), $migration->getId(), $migration);
$this->dbForProject->purgeCachedCollection('migrations');
}
}
@@ -138,7 +138,6 @@ class StatsUsage extends Action
$this->getLogsDB = $getLogsDB;
$this->register = $register;
$payload = $message->getPayload() ?? [];
Console::log('Payload: ' . json_encode($payload));
if (empty($payload)) {
throw new Exception('Missing payload');
}
+30 -3
View File
@@ -11,9 +11,36 @@ class Comment
{
// TODO: Add more tips
protected array $tips = [
'Appwrite has a Discord community with over 16 000 members.',
'You can use Avatars API to generate QR code for any text or URLs.',
'Cursor pagination performs better than offset pagination when loading further pages.',
'Appwrite has crossed the 50K GitHub stars milestone with hundreds of active contributors',
'Our Discord community has grown to 24K developers, and counting',
'Sites auto-generate unique domains with the pattern https://randomstring.appwrite.network',
'Every Git commit and branch gets its own deployment URL automatically',
'Custom domains work with both CNAME for subdomains and NS records for apex domains',
'HTTPS and SSL certificates are handled automatically for all your Sites',
'Functions can run for up to 15 minutes before timing out',
'Schedule functions to run as often as every minute with cron expressions',
'Environment variables can be scoped per function or shared across your project',
'Function scopes give you fine-grained control over API permissions',
'Sites support three domain rule types: Active deployment, Git branch, and Redirect',
'Preview deployments create instant URLs for every branch and commit',
'Trigger functions via HTTP, SDKs, events, webhooks, or scheduled cron jobs',
'Each function runs in its own isolated container with custom environment variables',
'Build commands execute in runtime containers during deployment',
'Dynamic API keys are generated automatically for each function execution',
'JWT tokens let functions act on behalf of users while preserving their permissions',
'Storage files get ClamAV malware scanning and encryption by default',
'Roll back Sites deployments instantly by switching between versions',
'Git integration provides automatic deployments with optional PR comments',
'Silent mode disables those chatty PR comments if you prefer peace and quiet',
'Environment variable changes require redeployment to take effect',
'SSR frameworks are fully supported with configurable build runtimes',
'Global CDN and DDoS protection come free with every Sites deployment',
'Deploy functions via zip upload or connect directly to your Git repo',
'Realtime gives you live updates for users, storage, functions, and databases',
'GraphQL API works alongside REST and WebSocket protocols',
'Messaging handles push notifications, emails, and SMS through one unified API',
'Teams feature lets you group users with membership management and role permissions',
'MCP server integration brings LLM superpowers to Claude Desktop and Cursor IDE',
];
protected string $statePrefix = '[appwrite]: #';