Skip to content

Commit 0c60e17

Browse files
committed
fix: correct enum renames and Models namespace after SDK bump to 81a4f24
The new SDK renamed top-level enums (Status→ProjectStatus, StatusCode→RedirectStatusCode, Adapter→SiteAdapter, etc.) but kept Models.* names unchanged (Models.Framework, Models.Runtime). Also removed Scopes in favour of ProjectKeyScopes. - Models.SiteFramework → Models.Framework - Models.FunctionRuntime → Models.Runtime - VCSDetectionType.SiteFramework → VCSDetectionType.Framework - VCSDetectionType.FunctionRuntime → VCSDetectionType.Runtime - Scopes → ProjectKeyScopes in function files (enum removed from SDK) - Fix updateScopes.svelte: restore Scopes component import, remove duplicate type alias
1 parent 3a87a9e commit 0c60e17

15 files changed

Lines changed: 20 additions & 24 deletions

File tree

src/routes/(console)/project-[region]-[project]/functions/create-function/(components)/aside.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<Layout.Stack gap="l">
2222
{#if selectedRuntime?.name && !loading}
2323
<Layout.Stack gap="xxxs">
24-
<Typography.Caption variant="400">Runtime</Typography.Caption>
24+
<Typography.Caption variant="400">FunctionRuntime</Typography.Caption>
2525
<Layout.Stack gap="xxs" alignItems="center" direction="row">
2626
{#if selectedRuntime?.key}
2727
<SvgIcon iconSize="small" size={16} name={selectedRuntime.key} />

src/routes/(console)/project-[region]-[project]/functions/create-function/(components)/details.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
{:else}
6060
<InputSelect
6161
id="runtime"
62-
label="Runtime"
62+
label="FunctionRuntime"
6363
placeholder="Select runtime"
6464
bind:value={runtime}
6565
required

src/routes/(console)/project-[region]-[project]/functions/create-function/deploy/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@
214214
</Layout.Stack>
215215
<Input.Select
216216
id="runtime"
217-
label="Runtime"
217+
label="FunctionRuntime"
218218
placeholder="Select runtime"
219219
bind:value={runtime}
220220
required

src/routes/(console)/project-[region]-[project]/functions/function-[function]/(components)/deploymentCard.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@
161161
{@render textGroup('Total size', `${totalSize.value} ${totalSize.unit}`)}
162162

163163
<Layout.Stack gap="xxs" inline>
164-
{@render titleSnippet('Runtime')}
164+
{@render titleSnippet('FunctionRuntime')}
165165
<Typography.Text variant="m-400" color="--fgcolor-neutral-primary">
166166
<Layout.Stack direction="row" gap="xxs" alignItems="center">
167167
<SvgIcon

src/routes/(console)/project-[region]-[project]/functions/function-[function]/settings/executeFunction.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<svelte:fragment slot="aside">
2323
<Layout.Stack gap="xxxl" direction="row" wrap="wrap">
2424
<Layout.Stack gap="xxxs" inline>
25-
<Typography.Caption variant="400">Runtime</Typography.Caption>
25+
<Typography.Caption variant="400">FunctionRuntime</Typography.Caption>
2626
<Typography.Text variant="m-400" color="--fgcolor-neutral-primary">
2727
<Layout.Stack direction="row" gap="xxs" alignItems="center">
2828
<SvgIcon size={16} iconSize="small" name={$func.runtime.split('-')[0]} />

src/routes/(console)/project-[region]-[project]/functions/function-[function]/settings/updateResourceLimits.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@
111111
</Tooltip>
112112
</InputSelect>
113113
<InputSelect
114-
label="Runtime specification"
114+
label="FunctionRuntime specification"
115115
id="runtime-specification"
116116
required
117117
disabled={options.length < 1}

src/routes/(console)/project-[region]-[project]/functions/function-[function]/settings/updateRuntime.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
});
5252
await invalidate(Dependencies.FUNCTION);
5353
addNotification({
54-
message: 'Runtime settings have been updated',
54+
message: 'FunctionRuntime settings have been updated',
5555
type: 'success'
5656
});
5757
trackEvent(Submit.FunctionUpdateRuntime, { runtime });
@@ -69,7 +69,7 @@
6969

7070
<Form onSubmit={updateRuntime}>
7171
<CardGrid>
72-
<svelte:fragment slot="title">Runtime</svelte:fragment>
72+
<svelte:fragment slot="title">FunctionRuntime</svelte:fragment>
7373
<Typography.Text>
7474
Select the runtime for executing your function and define its entrypoint. Version
7575
changes apply on redeploy and can be updated here. <Link external href="#"
@@ -79,7 +79,7 @@
7979
<svelte:fragment slot="aside">
8080
<Layout.Stack gap="l">
8181
<InputSelect
82-
label="Runtime"
82+
label="FunctionRuntime"
8383
id="runtime"
8484
placeholder="Select runtime"
8585
bind:value={runtime}

src/routes/(console)/project-[region]-[project]/functions/function-[function]/settings/updateScopes.svelte

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@
1010
import { onMount } from 'svelte';
1111
import { func } from '../store';
1212
import { isValueOfStringEnum } from '$lib/helpers/types';
13-
import {
14-
FunctionRuntime,
15-
type ProjectKeyScopes,
16-
type ProjectKeyScopes as FunctionScopes
17-
} from '@appwrite.io/console';
13+
import { FunctionRuntime, type ProjectKeyScopes } from '@appwrite.io/console';
1814
import Scopes from '$routes/(console)/project-[region]-[project]/overview/api-keys/scopes.svelte';
1915
import { symmetricDifference } from '$lib/helpers/array';
2016
import { Link } from '$lib/elements';
@@ -43,7 +39,7 @@
4339
logging: $func.logging ?? undefined,
4440
entrypoint: $func.entrypoint || undefined,
4541
commands: $func.commands || undefined,
46-
scopes: (functionScopes as unknown as FunctionScopes[]) || undefined,
42+
scopes: functionScopes || undefined,
4743
installationId: $func.installationId || undefined,
4844
providerRepositoryId: $func.providerRepositoryId || undefined,
4945
providerBranch: $func.providerBranch || undefined,

src/routes/(console)/project-[region]-[project]/functions/templates/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
{/each}
106106
</Layout.Stack>
107107
</Accordion>
108-
<Accordion title="Runtime">
108+
<Accordion title="FunctionRuntime">
109109
<Layout.Stack>
110110
{#each [...data.runtimes] as runtime}
111111
<!-- {@const icon = getIconFromRuntime(runtime)} -->

src/routes/(console)/project-[region]-[project]/sites/create-site/aside.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
{#if framework?.name}
5353
{@const frameworkIcon = getFrameworkIcon(framework.key)}
5454
<Layout.Stack gap="xxxs">
55-
<Typography.Caption variant="400">Framework</Typography.Caption>
55+
<Typography.Caption variant="400">SiteFramework</Typography.Caption>
5656
<Layout.Stack gap="xxs" alignItems="center" direction="row">
5757
{#if frameworkIcon}
5858
<SvgIcon iconSize="small" size={16} name={frameworkIcon} />

0 commit comments

Comments
 (0)