Skip to content

Commit 62f8682

Browse files
committed
Merge branch 'main' of github.com:appwrite/console into chore-sfo
2 parents cf6e4f2 + 0059958 commit 62f8682

513 files changed

Lines changed: 11310 additions & 9897 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
PUBLIC_CONSOLE_MODE=self-hosted
2+
PUBLIC_CONSOLE_FEATURE_FLAGS=sites,index-lengths
23
PUBLIC_APPWRITE_MULTI_REGION=false
34
PUBLIC_APPWRITE_ENDPOINT=http://localhost/v1
4-
55
PUBLIC_STRIPE_KEY=
66
PUBLIC_GROWTH_ENDPOINT=

.github/workflows/publish.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jobs:
3939
labels: ${{ steps.meta.outputs.labels }}
4040
build-args: |
4141
"PUBLIC_CONSOLE_MODE=cloud"
42+
"PUBLIC_CONSOLE_FEATURE_FLAGS=sites"
4243
"PUBLIC_APPWRITE_MULTI_REGION=true"
4344
"PUBLIC_GROWTH_ENDPOINT=${{ secrets.PUBLIC_GROWTH_ENDPOINT }}"
4445
"PUBLIC_STRIPE_KEY=${{ secrets.PUBLIC_STRIPE_KEY }}"
@@ -78,6 +79,7 @@ jobs:
7879
labels: ${{ steps.meta.outputs.labels }}
7980
build-args: |
8081
"PUBLIC_CONSOLE_MODE=cloud"
82+
"PUBLIC_CONSOLE_FEATURE_FLAGS=sites,index-lengths"
8183
"PUBLIC_APPWRITE_MULTI_REGION=true"
8284
"PUBLIC_GROWTH_ENDPOINT=${{ secrets.PUBLIC_GROWTH_ENDPOINT }}"
8385
"PUBLIC_STRIPE_KEY=${{ secrets.PUBLIC_STRIPE_KEY_STAGE }}"
@@ -97,7 +99,7 @@ jobs:
9799
password: ${{ secrets.DOCKERHUB_TOKEN }}
98100
- name: Extract metadata (tags, labels) for Docker
99101
id: meta
100-
uses: docker/metadata-action@v5
102+
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0
101103
with:
102104
images: appwrite/console
103105
tags: |
@@ -116,6 +118,7 @@ jobs:
116118
build-args: |
117119
"PUBLIC_CONSOLE_MODE=self-hosted"
118120
"PUBLIC_APPWRITE_MULTI_REGION=false"
121+
"PUBLIC_CONSOLE_FEATURE_FLAGS=sites,index-lengths"
119122
"PUBLIC_GROWTH_ENDPOINT=${{ secrets.PUBLIC_GROWTH_ENDPOINT }}"
120123
121124
publish-cloud-no-regions:
@@ -153,5 +156,6 @@ jobs:
153156
build-args: |
154157
"PUBLIC_CONSOLE_MODE=cloud"
155158
"PUBLIC_APPWRITE_MULTI_REGION=false"
159+
"PUBLIC_CONSOLE_FEATURE_FLAGS=sites,index-lengths"
156160
"PUBLIC_STRIPE_KEY=${{ secrets.PUBLIC_STRIPE_KEY_STAGE }}"
157161
"PUBLIC_GROWTH_ENDPOINT=${{ secrets.PUBLIC_GROWTH_ENDPOINT }}"

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ ADD ./src /app/src
2121
ADD ./static /app/static
2222

2323
ARG PUBLIC_CONSOLE_MODE
24+
ARG PUBLIC_CONSOLE_FEATURE_FLAGS
2425
ARG PUBLIC_APPWRITE_MULTI_REGION
2526
ARG PUBLIC_APPWRITE_ENDPOINT
2627
ARG PUBLIC_GROWTH_ENDPOINT
@@ -31,6 +32,7 @@ ARG SENTRY_RELEASE
3132
ENV PUBLIC_APPWRITE_ENDPOINT=$PUBLIC_APPWRITE_ENDPOINT
3233
ENV PUBLIC_GROWTH_ENDPOINT=$PUBLIC_GROWTH_ENDPOINT
3334
ENV PUBLIC_CONSOLE_MODE=$PUBLIC_CONSOLE_MODE
35+
ENV PUBLIC_CONSOLE_FEATURE_FLAGS=$PUBLIC_CONSOLE_FEATURE_FLAGS
3436
ENV PUBLIC_APPWRITE_MULTI_REGION=$PUBLIC_APPWRITE_MULTI_REGION
3537
ENV PUBLIC_STRIPE_KEY=$PUBLIC_STRIPE_KEY
3638
ENV SENTRY_AUTH_TOKEN=$SENTRY_AUTH_TOKEN

build.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ async function main() {
2424
log(bold().magenta('APPWRITE CONSOLE'));
2525
log();
2626
logEnv('CONSOLE MODE', env?.PUBLIC_CONSOLE_MODE);
27+
logEnv('CONSOLE FEATURE FLAGS', env?.PUBLIC_CONSOLE_FEATURE_FLAGS);
2728
logEnv('MULTI REGION', env?.PUBLIC_APPWRITE_MULTI_REGION);
2829
logEnv('APPWRITE ENDPOINT', env?.PUBLIC_APPWRITE_ENDPOINT, 'relative');
2930
logEnv('GROWTH ENDPOINT', env?.PUBLIC_GROWTH_ENDPOINT);

compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ services:
55
context: .
66
args:
77
PUBLIC_CONSOLE_MODE: ${PUBLIC_CONSOLE_MODE}
8+
PUBLIC_CONSOLE_FEATURE_FLAGS: ${PUBLIC_CONSOLE_FEATURE_FLAGS}
89
PUBLIC_APPWRITE_MULTI_REGION: ${PUBLIC_APPWRITE_MULTI_REGION}
910
PUBLIC_APPWRITE_ENDPOINT: ${PUBLIC_APPWRITE_ENDPOINT}
1011
PUBLIC_GROWTH_ENDPOINT: ${PUBLIC_GROWTH_ENDPOINT}
@@ -21,6 +22,7 @@ services:
2122
- build/
2223
environment:
2324
- PUBLIC_CONSOLE_MODE
25+
- PUBLIC_CONSOLE_FEATURE_FLAGS
2426
- PUBLIC_APPWRITE_MULTI_REGION
2527
- PUBLIC_APPWRITE_ENDPOINT
2628
- PUBLIC_GROWTH_ENDPOINT

docker/nginx.conf

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
1-
map $sent_http_content_type $cc_header {
2-
default "public, max-age=31536000";
3-
text/html "no-cache";
4-
}
5-
61
server {
72
listen 80;
83
server_name localhost;
94

10-
# serve compressed file if filename.gz exists
115
gzip_static on;
126

13-
location = /console/service-worker.js {
14-
root /usr/share/nginx/html;
15-
add_header Cache-Control "public, max-age=30" always;
7+
root /usr/share/nginx/html;
8+
9+
# Security headers for all locations
10+
add_header X-UA-Compatible "IE=Edge";
11+
add_header X-Frame-Options SAMEORIGIN;
12+
add_header X-XSS-Protection "1; mode=block;";
13+
add_header X-Content-Type-Options nosniff;
14+
15+
# Only cache files in /console/_app/immutable/ for 1 year
16+
location /console/_app/immutable/ {
17+
try_files $uri =404;
18+
19+
expires 1y;
20+
add_header Pragma public;
21+
add_header Cache-Control "public";
1622
}
1723

18-
location = /console/_app/env.js {
19-
root /usr/share/nginx/html;
20-
add_header Cache-Control "public, max-age=30" always;
24+
# Cache, but revalidate, for images, css, fonts, and icons folders
25+
location ~* ^/console/(images|css|fonts|icons)/ {
26+
expires 1d;
27+
add_header Cache-Control "public, must-revalidate";
2128
}
2229

30+
# All other /console requests (no cache)
2331
location /console {
24-
root /usr/share/nginx/html;
25-
index index.html index.htm;
32+
index index.html index.html;
2633
try_files $uri /console/index.html;
2734

28-
add_header Cache-Control $cc_header always;
29-
30-
# Deny IE browsers from going into quirks mode
31-
add_header X-UA-Compatible "IE=Edge";
32-
# X-Frame-Options is to prevent from clickJacking attack
33-
add_header X-Frame-Options SAMEORIGIN;
34-
# This header enables the Cross-site scripting (XSS) filter
35-
add_header X-XSS-Protection "1; mode=block;";
36-
# disable content-type sniffing on some browsers.
37-
add_header X-Content-Type-Options nosniff;
35+
expires 0;
36+
add_header Cache-Control "no-cache, no-store";
37+
add_header Pragma "no-cache";
3838
}
3939

4040
location / {

e2e/journeys/upgrade-free-tier.spec.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,14 @@ test('upgrade - free tier', async ({ page }) => {
1111
await page.waitForURL(/\/organization-[^/]+\/change-plan/);
1212
await page.locator('input[value="tier-1"]').click();
1313
await page.getByRole('button', { name: 'add' }).first().click();
14+
1415
await enterCreditCard(page);
16+
17+
// wait for a second after adding a card to update the UI.
18+
await page.waitForSelector('button#method[role="combobox"]');
19+
1520
// skip members
1621
await page.getByRole('button', { name: 'change plan' }).click();
17-
await page.waitForURL(/\/console\/project-(?:[a-z0-9]+-)?([^/]+)\/overview\/platforms/);
22+
await page.waitForURL(/\/console\/project-(?:[a-z0-9]+-)?([^/]+)\/get-started/);
1823
});
1924
});

e2e/steps/pro-project.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,15 @@ export async function enterCreditCard(page: Page) {
1414
state: 'visible'
1515
});
1616
await page.getByPlaceholder('cardholder').fill('Test User');
17-
const stripe = page.frameLocator('[title="Secure payment input frame"]');
17+
const stripe = page.locator('[title="Secure payment input frame"]').nth(0).contentFrame();
1818
await stripe.locator('id=Field-numberInput').fill('4242424242424242');
1919
await stripe.locator('id=Field-expiryInput').fill('1250');
2020
await stripe.locator('id=Field-cvcInput').fill('123');
2121
await stripe.locator('id=Field-countryInput').selectOption('DE');
22-
await page.getByRole('button', { name: 'Add', exact: true }).click();
22+
await dialog.getByRole('button', { name: 'Add', exact: true }).click();
23+
await page.locator('id=state-picker').click(); // open dropdown
24+
await page.getByRole('option', { name: 'Alabama' }).click();
25+
await dialog.getByRole('button', { name: 'Add', exact: true }).click();
2326
await dialog.waitFor({
2427
state: 'hidden'
2528
});
@@ -29,8 +32,9 @@ export async function createProProject(page: Page): Promise<Metadata> {
2932
const organizationId = await test.step('create organization', async () => {
3033
await page.goto('./create-organization');
3134
await page.locator('id=name').fill('test org');
32-
await page.getByLabel('pro').check();
33-
await page.getByRole('button', { name: 'get started' }).click();
35+
await page.getByRole('radio', { name: /^Pro\b/ }).check();
36+
// `create organization` because there's already free created on start!
37+
await page.getByRole('button', { name: 'create organization' }).click();
3438
await page.getByRole('button', { name: 'add' }).first().click();
3539
await enterCreditCard(page);
3640
// skip members

package.json

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,11 @@
2222
},
2323
"dependencies": {
2424
"@ai-sdk/svelte": "^1.1.24",
25-
"@appwrite.io/console": "https://pkg.pr.new/appwrite-labs/cloud/@appwrite.io/console@1959",
26-
"@appwrite.io/pink": "0.25.0",
25+
"@appwrite.io/console": "^1.10.0",
2726
"@appwrite.io/pink-icons": "0.25.0",
28-
"@appwrite.io/pink-icons-svelte": "https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@d68e5e4",
27+
"@appwrite.io/pink-icons-svelte": "https://pkg.vc/-/@appwrite/@appwrite.io/pink-icons-svelte@d93a5e9",
2928
"@appwrite.io/pink-legacy": "^1.0.3",
30-
"@appwrite.io/pink-svelte": "https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-svelte@b7fa532",
29+
"@appwrite.io/pink-svelte": "https://pkg.vc/-/@appwrite/@appwrite.io/pink-svelte@d93a5e9",
3130
"@popperjs/core": "^2.11.8",
3231
"@sentry/sveltekit": "^8.38.0",
3332
"@stripe/stripe-js": "^3.5.0",
@@ -48,8 +47,8 @@
4847
"tippy.js": "^6.3.7"
4948
},
5049
"devDependencies": {
51-
"@eslint/compat": "^1.2.7",
52-
"@eslint/js": "^9.24.0",
50+
"@eslint/compat": "^1.3.1",
51+
"@eslint/js": "^9.31.0",
5352
"@melt-ui/pp": "^0.3.2",
5453
"@melt-ui/svelte": "^0.86.5",
5554
"@playwright/test": "^1.51.1",
@@ -58,19 +57,20 @@
5857
"@sveltejs/vite-plugin-svelte": "^5.0.3",
5958
"@testing-library/dom": "^10.4.0",
6059
"@testing-library/jest-dom": "^6.6.3",
61-
"@testing-library/svelte": "^5.2.4",
60+
"@testing-library/svelte": "^5.2.8",
6261
"@testing-library/user-event": "^14.6.1",
6362
"@types/deep-equal": "^1.0.4",
6463
"@types/prismjs": "^1.26.5",
6564
"@types/remarkable": "^2.0.8",
6665
"@typescript-eslint/eslint-plugin": "^8.28.0",
6766
"@typescript-eslint/parser": "^8.28.0",
68-
"@vitest/ui": "^3.0.9",
69-
"eslint": "^9.23.0",
67+
"@vitest/ui": "^3.2.4",
68+
"color": "^5.0.0",
69+
"eslint": "^9.31.0",
7070
"eslint-config-prettier": "^10.1.0",
7171
"eslint-plugin-svelte": "^3.3.3",
7272
"globals": "^16.0.0",
73-
"jsdom": "^26.0.0",
73+
"jsdom": "^26.1.0",
7474
"kleur": "^4.1.5",
7575
"prettier": "^3.5.3",
7676
"prettier-plugin-svelte": "^3.3.3",
@@ -79,6 +79,7 @@
7979
"svelte-check": "^4.1.5",
8080
"svelte-preprocess": "^6.0.3",
8181
"svelte-sequential-preprocessor": "^2.0.2",
82+
"tldts": "^7.0.7",
8283
"tslib": "^2.8.1",
8384
"typescript": "^5.8.2",
8485
"typescript-eslint": "^8.30.1",
@@ -93,5 +94,5 @@
9394
"svelte-preprocess"
9495
]
9596
},
96-
"packageManager": "pnpm@10.7.0+sha512.6b865ad4b62a1d9842b61d674a393903b871d9244954f652b8842c2b553c72176b278f64c463e52d40fff8aba385c235c8c9ecf5cc7de4fd78b8bb6d49633ab6"
97+
"packageManager": "pnpm@10.13.1"
9798
}

0 commit comments

Comments
 (0)