fix: errors, warnings, tests.

This commit is contained in:
Darshan committed 2025-05-16 13:31:13 +05:30
1 parent 7b5c1b5b9e
commit 7a985d8bce
11 files changed
+60 -49

No files matched your search

+1 -1
View File
@@ -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",
+5 -5
View File
@@ -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:
@@ -373,7 +373,11 @@
</div>
{:else}
{@const mobileConfig = getMobileWindowConfig()}
<!-- we don't need keydown because we show this only on mobile -->
<!-- svelte-ignore a11y-click-events-have-key-events -->
<div
tabindex="0"
role="button"
class:showing={!openModalOnMobile}
class="card notification-card u-width-full-line"
on:click={() => {
+4 -3
View File
@@ -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;
+2 -1
View File
@@ -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}
+1 -1
View File
@@ -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.';
@@ -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`;
@@ -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`;
@@ -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`;
@@ -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);
@@ -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';