Date: Fri, 16 May 2025 13:31:13 +0530
Subject: [PATCH 5/8] fix: errors, warnings, tests.
---
package.json | 2 +-
pnpm-lock.yaml | 10 +++++-----
src/lib/components/bottomModalAlert.svelte | 4 ++++
src/lib/components/git/repositories.svelte | 7 ++++---
src/lib/elements/forms/inputText.svelte | 3 ++-
src/routes/(console)/bottomAlerts.ts | 2 +-
.../add-domain/verify-[domain]/+page.svelte | 19 +++++++++---------
.../add-domain/verify-[domain]/+page.svelte | 19 +++++++++---------
.../add-domain/verify-[domain]/+page.svelte | 20 ++++++++++---------
.../domains/retryDomainModal.svelte | 20 ++++++++++---------
.../bucket-[bucket]/file-[file]/+page.svelte | 3 +--
11 files changed, 60 insertions(+), 49 deletions(-)
diff --git a/package.json b/package.json
index ed26ec193..ca2e77b43 100644
--- a/package.json
+++ b/package.json
@@ -22,7 +22,7 @@
},
"dependencies": {
"@ai-sdk/svelte": "^1.1.24",
- "@appwrite.io/console": "https://pkg.pr.new/appwrite-labs/cloud/@appwrite.io/console@1960",
+ "@appwrite.io/console": "https://pkg.pr.new/appwrite-labs/cloud/@appwrite.io/console@1959",
"@appwrite.io/pink": "0.25.0",
"@appwrite.io/pink-icons": "0.25.0",
"@appwrite.io/pink-icons-svelte": "https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@d68e5e4",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index f2d1a6d9f..5eca140a2 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -12,8 +12,8 @@ importers:
specifier: ^1.1.24
version: 1.1.24(svelte@5.25.3)(zod@3.24.3)
'@appwrite.io/console':
- specifier: https://pkg.pr.new/appwrite-labs/cloud/@appwrite.io/console@1960
- version: https://pkg.pr.new/appwrite-labs/cloud/@appwrite.io/console@1960
+ specifier: https://pkg.pr.new/appwrite-labs/cloud/@appwrite.io/console@1959
+ version: https://pkg.pr.new/appwrite-labs/cloud/@appwrite.io/console@1959
'@appwrite.io/pink':
specifier: 0.25.0
version: 0.25.0
@@ -254,8 +254,8 @@ packages:
'@analytics/type-utils@0.6.2':
resolution: {integrity: sha512-TD+xbmsBLyYy/IxFimW/YL/9L2IEnM7/EoV9Aeh56U64Ify8o27HJcKjo38XY9Tcn0uOq1AX3thkKgvtWvwFQg==}
- '@appwrite.io/console@https://pkg.pr.new/appwrite-labs/cloud/@appwrite.io/console@1960':
- resolution: {tarball: https://pkg.pr.new/appwrite-labs/cloud/@appwrite.io/console@1960}
+ '@appwrite.io/console@https://pkg.pr.new/appwrite-labs/cloud/@appwrite.io/console@1959':
+ resolution: {tarball: https://pkg.pr.new/appwrite-labs/cloud/@appwrite.io/console@1959}
version: 1.5.2
'@appwrite.io/pink-icons-svelte@https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@b39a7c45d4b8ebf03059018d195141c8d2b7c221':
@@ -3625,7 +3625,7 @@ snapshots:
'@analytics/type-utils@0.6.2': {}
- '@appwrite.io/console@https://pkg.pr.new/appwrite-labs/cloud/@appwrite.io/console@1960': {}
+ '@appwrite.io/console@https://pkg.pr.new/appwrite-labs/cloud/@appwrite.io/console@1959': {}
'@appwrite.io/pink-icons-svelte@https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@b39a7c45d4b8ebf03059018d195141c8d2b7c221(svelte@5.25.3)':
dependencies:
diff --git a/src/lib/components/bottomModalAlert.svelte b/src/lib/components/bottomModalAlert.svelte
index 2c105354a..3e98be3ca 100644
--- a/src/lib/components/bottomModalAlert.svelte
+++ b/src/lib/components/bottomModalAlert.svelte
@@ -373,7 +373,11 @@
{:else}
{@const mobileConfig = getMobileWindowConfig()}
+
+
{
diff --git a/src/lib/components/git/repositories.svelte b/src/lib/components/git/repositories.svelte
index 4212997bc..9830edf81 100644
--- a/src/lib/components/git/repositories.svelte
+++ b/src/lib/components/git/repositories.svelte
@@ -22,6 +22,7 @@
import { page } from '$app/state';
import Card from '../card.svelte';
import SkeletonRepoList from './skeletonRepoList.svelte';
+ import { untrack } from 'svelte';
let {
action = $bindable('select'),
@@ -42,13 +43,13 @@
} = $props();
let search = $state('');
- let selectedInstallation: string = null;
+ let selectedInstallation = $state(null);
let isLoadingRepositories = $state(null);
async function loadInstallations() {
if (installationList) {
if (installationList.installations.length) {
- selectedInstallation = installationList.installations[0].$id;
+ untrack(() => selectedInstallation = installationList.installations[0].$id);
installation.set(
installationList.installations.find(
(entry) => entry.$id === selectedInstallation
@@ -61,7 +62,7 @@
.forProject(page.params.region, page.params.project)
.vcs.listInstallations();
if (installations.length) {
- selectedInstallation = installations[0].$id;
+ untrack(() => selectedInstallation = installations[0].$id);
installation.set(installations.find((entry) => entry.$id === selectedInstallation));
}
return installations;
diff --git a/src/lib/elements/forms/inputText.svelte b/src/lib/elements/forms/inputText.svelte
index 169d44245..800c661dc 100644
--- a/src/lib/elements/forms/inputText.svelte
+++ b/src/lib/elements/forms/inputText.svelte
@@ -6,7 +6,7 @@
export let name: string = id;
export let helper: string = undefined;
export let value = '';
- export let pattern: string = null; //TODO: implement pattern check
+ export let pattern: string = undefined; //TODO: implement pattern check
export let patternError: string = '';
export let placeholder = '';
export let required = false;
@@ -53,6 +53,7 @@
{label}
{nullable}
{readonly}
+ {pattern}
autofocus={autofocus || undefined}
autocomplete={autocomplete ? 'on' : 'off'}
helper={error || helper}
diff --git a/src/routes/(console)/bottomAlerts.ts b/src/routes/(console)/bottomAlerts.ts
index 156a0dff8..88d63a6dd 100644
--- a/src/routes/(console)/bottomAlerts.ts
+++ b/src/routes/(console)/bottomAlerts.ts
@@ -9,7 +9,7 @@ import { isCloud } from '$lib/system';
const listOfPromotions: BottomModalAlertItem[] = [];
-if (isCloud) {
+if (!isCloud) {
const title = 'Join Init 19-23 May';
const message =
'This release will change the way you build with Appwrite forever. Register for Init and join the giveaway.';
diff --git a/src/routes/(console)/project-[region]-[project]/functions/function-[function]/domains/add-domain/verify-[domain]/+page.svelte b/src/routes/(console)/project-[region]-[project]/functions/function-[function]/domains/add-domain/verify-[domain]/+page.svelte
index 155445767..f8b03eb86 100644
--- a/src/routes/(console)/project-[region]-[project]/functions/function-[function]/domains/add-domain/verify-[domain]/+page.svelte
+++ b/src/routes/(console)/project-[region]-[project]/functions/function-[function]/domains/add-domain/verify-[domain]/+page.svelte
@@ -29,15 +29,16 @@
const ruleId = page.url.searchParams.get('rule');
let isSubDomain = $derived(page.params.domain?.split('.')?.length >= 3);
- let selectedTab: 'cname' | 'nameserver' | 'a' | 'aaaa' = $state(
- !!$consoleVariables._APP_DOMAIN_TARGET_CNAME && isSubDomain
- ? 'cname'
- : !!$consoleVariables._APP_DOMAIN_TARGET_A
- ? 'a'
- : !!$consoleVariables._APP_DOMAIN_TARGET_AAAA
- ? 'aaaa'
- : 'nameserver'
- );
+ let selectedTab = $state<'cname' | 'nameserver' | 'a' | 'aaaa'>('nameserver');
+ $effect(() => {
+ if ($consoleVariables._APP_DOMAIN_TARGET_CNAME && isSubDomain) {
+ selectedTab = 'cname';
+ } else if ($consoleVariables._APP_DOMAIN_TARGET_A) {
+ selectedTab = 'a';
+ } else if ($consoleVariables._APP_DOMAIN_TARGET_AAAA) {
+ selectedTab = 'aaaa';
+ }
+ });
let verified = $state(false);
let routeBase = `${base}/project-${page.params.region}-${page.params.project}/functions/function-${page.params.function}/domains`;
diff --git a/src/routes/(console)/project-[region]-[project]/settings/domains/add-domain/verify-[domain]/+page.svelte b/src/routes/(console)/project-[region]-[project]/settings/domains/add-domain/verify-[domain]/+page.svelte
index 7df1b1ccc..083034326 100644
--- a/src/routes/(console)/project-[region]-[project]/settings/domains/add-domain/verify-[domain]/+page.svelte
+++ b/src/routes/(console)/project-[region]-[project]/settings/domains/add-domain/verify-[domain]/+page.svelte
@@ -29,15 +29,16 @@
const ruleId = page.url.searchParams.get('rule');
let isSubDomain = $derived(page.params.domain?.split('.')?.length >= 3);
- let selectedTab: 'cname' | 'nameserver' | 'a' | 'aaaa' = $state(
- !!$consoleVariables._APP_DOMAIN_TARGET_CNAME && isSubDomain
- ? 'cname'
- : !!$consoleVariables._APP_DOMAIN_TARGET_A
- ? 'a'
- : !!$consoleVariables._APP_DOMAIN_TARGET_AAAA
- ? 'aaaa'
- : 'nameserver'
- );
+ let selectedTab = $state<'cname' | 'nameserver' | 'a' | 'aaaa'>('nameserver');
+ $effect(() => {
+ if ($consoleVariables._APP_DOMAIN_TARGET_CNAME && isSubDomain) {
+ selectedTab = 'cname';
+ } else if ($consoleVariables._APP_DOMAIN_TARGET_A) {
+ selectedTab = 'a';
+ } else if ($consoleVariables._APP_DOMAIN_TARGET_AAAA) {
+ selectedTab = 'aaaa';
+ }
+ });
let verified = $state(false);
let routeBase = `${base}/project-${page.params.region}-${page.params.project}/settings/domains`;
diff --git a/src/routes/(console)/project-[region]-[project]/sites/site-[site]/domains/add-domain/verify-[domain]/+page.svelte b/src/routes/(console)/project-[region]-[project]/sites/site-[site]/domains/add-domain/verify-[domain]/+page.svelte
index 7381f4173..d19eb28f2 100644
--- a/src/routes/(console)/project-[region]-[project]/sites/site-[site]/domains/add-domain/verify-[domain]/+page.svelte
+++ b/src/routes/(console)/project-[region]-[project]/sites/site-[site]/domains/add-domain/verify-[domain]/+page.svelte
@@ -29,15 +29,17 @@
const ruleId = page.url.searchParams.get('rule');
let isSubDomain = $derived(page.params.domain?.split('.')?.length >= 3);
- let selectedTab: 'cname' | 'nameserver' | 'a' | 'aaaa' = $state(
- !!$consoleVariables._APP_DOMAIN_TARGET_CNAME && isSubDomain
- ? 'cname'
- : !!$consoleVariables._APP_DOMAIN_TARGET_A
- ? 'a'
- : !!$consoleVariables._APP_DOMAIN_TARGET_AAAA
- ? 'aaaa'
- : 'nameserver'
- );
+ let selectedTab = $state<'cname' | 'nameserver' | 'a' | 'aaaa'>('nameserver');
+ $effect(() => {
+ if ($consoleVariables._APP_DOMAIN_TARGET_CNAME && isSubDomain) {
+ selectedTab = 'cname';
+ } else if ($consoleVariables._APP_DOMAIN_TARGET_A) {
+ selectedTab = 'a';
+ } else if ($consoleVariables._APP_DOMAIN_TARGET_AAAA) {
+ selectedTab = 'aaaa';
+ }
+ });
+
let verified = $state(false);
let routeBase = `${base}/project-${page.params.region}-${page.params.project}/sites/site-${page.params.site}/domains`;
diff --git a/src/routes/(console)/project-[region]-[project]/sites/site-[site]/domains/retryDomainModal.svelte b/src/routes/(console)/project-[region]-[project]/sites/site-[site]/domains/retryDomainModal.svelte
index 5a6d05e1d..36e75c465 100644
--- a/src/routes/(console)/project-[region]-[project]/sites/site-[site]/domains/retryDomainModal.svelte
+++ b/src/routes/(console)/project-[region]-[project]/sites/site-[site]/domains/retryDomainModal.svelte
@@ -25,15 +25,17 @@
let isSubDomain = $derived.by(() =>
selectedDomain?.domain?.length ? selectedDomain?.domain?.split('.')?.length >= 3 : false
);
- let selectedTab: 'cname' | 'nameserver' | 'a' | 'aaaa' = $state(
- !!$consoleVariables._APP_DOMAIN_TARGET_CNAME && isSubDomain
- ? 'cname'
- : !!$consoleVariables._APP_DOMAIN_TARGET_A
- ? 'a'
- : !!$consoleVariables._APP_DOMAIN_TARGET_AAAA
- ? 'aaaa'
- : 'nameserver'
- );
+
+ let selectedTab = $state<'cname' | 'nameserver' | 'a' | 'aaaa'>('nameserver');
+ $effect(() => {
+ if ($consoleVariables._APP_DOMAIN_TARGET_CNAME && isSubDomain) {
+ selectedTab = 'cname';
+ } else if ($consoleVariables._APP_DOMAIN_TARGET_A) {
+ selectedTab = 'a';
+ } else if ($consoleVariables._APP_DOMAIN_TARGET_AAAA) {
+ selectedTab = 'aaaa';
+ }
+ });
let verified = $state(false);
diff --git a/src/routes/(console)/project-[region]-[project]/storage/bucket-[bucket]/file-[file]/+page.svelte b/src/routes/(console)/project-[region]-[project]/storage/bucket-[bucket]/file-[file]/+page.svelte
index 8594cf613..36e087c71 100644
--- a/src/routes/(console)/project-[region]-[project]/storage/bucket-[bucket]/file-[file]/+page.svelte
+++ b/src/routes/(console)/project-[region]-[project]/storage/bucket-[bucket]/file-[file]/+page.svelte
@@ -29,14 +29,13 @@
import {
IconDotsHorizontal,
IconDuplicate,
- IconKey,
IconPencil,
IconPlus,
IconTrash
} from '@appwrite.io/pink-icons-svelte';
import FileTokensCopyUrl from './fileTokensCopyUrl.svelte';
import ManageFileTokenModal, { cleanFormattedDate } from './manageFileToken.svelte';
- import { type Models, Permission, Role } from '@appwrite.io/console';
+ import { type Models } from '@appwrite.io/console';
import { isSmallViewport } from '$lib/stores/viewport';
import { Menu } from '$lib/components/menu';
import { SHOW_INIT_FEATURES } from '$lib/system';
From 34cb60e20898aa4503ddef552ae60fed16e91419 Mon Sep 17 00:00:00 2001
From: Darshan
Date: Fri, 16 May 2025 13:37:06 +0530
Subject: [PATCH 6/8] fix: leftover.
---
src/routes/(console)/bottomAlerts.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/routes/(console)/bottomAlerts.ts b/src/routes/(console)/bottomAlerts.ts
index 88d63a6dd..156a0dff8 100644
--- a/src/routes/(console)/bottomAlerts.ts
+++ b/src/routes/(console)/bottomAlerts.ts
@@ -9,7 +9,7 @@ import { isCloud } from '$lib/system';
const listOfPromotions: BottomModalAlertItem[] = [];
-if (!isCloud) {
+if (isCloud) {
const title = 'Join Init 19-23 May';
const message =
'This release will change the way you build with Appwrite forever. Register for Init and join the giveaway.';
From 5d9f0e93f856abcf71ba3f12aac1ec4e02c962d5 Mon Sep 17 00:00:00 2001
From: Darshan
Date: Fri, 16 May 2025 13:37:31 +0530
Subject: [PATCH 7/8] lint.
---
src/lib/components/git/repositories.svelte | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/lib/components/git/repositories.svelte b/src/lib/components/git/repositories.svelte
index 9830edf81..ad59b0948 100644
--- a/src/lib/components/git/repositories.svelte
+++ b/src/lib/components/git/repositories.svelte
@@ -49,7 +49,7 @@
async function loadInstallations() {
if (installationList) {
if (installationList.installations.length) {
- untrack(() => selectedInstallation = installationList.installations[0].$id);
+ untrack(() => (selectedInstallation = installationList.installations[0].$id));
installation.set(
installationList.installations.find(
(entry) => entry.$id === selectedInstallation
@@ -62,7 +62,7 @@
.forProject(page.params.region, page.params.project)
.vcs.listInstallations();
if (installations.length) {
- untrack(() => selectedInstallation = installations[0].$id);
+ untrack(() => (selectedInstallation = installations[0].$id));
installation.set(installations.find((entry) => entry.$id === selectedInstallation));
}
return installations;
From 7c16b474679afa39e349ccfa6c75586219577882 Mon Sep 17 00:00:00 2001
From: Darshan
Date: Fri, 16 May 2025 13:54:19 +0530
Subject: [PATCH 8/8] fix: advanced lint.
---
src/lib/components/billing/usageRates.svelte | 2 +-
src/lib/components/filters/filtersBottomSheet.svelte | 2 --
src/lib/components/filters/quickFilters.svelte | 2 --
src/lib/components/git/connectRepoModal.svelte | 2 +-
src/lib/components/git/repositories.svelte | 2 --
src/lib/layout/shell.svelte | 2 +-
src/lib/stores/feedback.ts | 1 -
.../databases/database-[database]/backups/createPolicy.svelte | 4 ++--
.../functions/templates/+page.svelte | 2 +-
.../sites/create-site/templates/+page.svelte | 2 +-
.../storage/bucket-[bucket]/settings/updateMaxFileSize.svelte | 2 +-
11 files changed, 8 insertions(+), 15 deletions(-)
diff --git a/src/lib/components/billing/usageRates.svelte b/src/lib/components/billing/usageRates.svelte
index 4635a1d5a..653b9c154 100644
--- a/src/lib/components/billing/usageRates.svelte
+++ b/src/lib/components/billing/usageRates.svelte
@@ -45,7 +45,7 @@
$: isFree = org.billingPlan === BillingPlan.FREE;
// equal or above means unlimited!
- $: getCorrectSeatsCountValue = (count: number): string | number => {
+ const getCorrectSeatsCountValue = (count: number): string | number => {
// php int max is always larger than js
const exceedsSafeLimit = count >= Number.MAX_SAFE_INTEGER;
return exceedsSafeLimit ? 'Unlimited' : count || 0;
diff --git a/src/lib/components/filters/filtersBottomSheet.svelte b/src/lib/components/filters/filtersBottomSheet.svelte
index 3d61e8b6b..5d7137c1a 100644
--- a/src/lib/components/filters/filtersBottomSheet.svelte
+++ b/src/lib/components/filters/filtersBottomSheet.svelte
@@ -111,8 +111,6 @@
return arrayValue;
}
}
-
- $inspect(subSheets);
diff --git a/src/lib/components/filters/quickFilters.svelte b/src/lib/components/filters/quickFilters.svelte
index 3e1d1142a..76bbf90c5 100644
--- a/src/lib/components/filters/quickFilters.svelte
+++ b/src/lib/components/filters/quickFilters.svelte
@@ -19,8 +19,6 @@
filterCols: FilterData[];
analyticsSource?: string;
} = $props();
-
- $inspect(filterCols);