Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"dependencies": {
"@ai-sdk/svelte": "^1.1.24",
"@appwrite.io/console": "https://pkg.vc/-/@appwrite/@appwrite.io/console@35c3dea",
"@appwrite.io/console": "https://pkg.vc/-/@appwrite/@appwrite.io/console@9786d91",
"@appwrite.io/pink-icons": "0.25.0",
"@appwrite.io/pink-icons-svelte": "https://pkg.vc/-/@appwrite/@appwrite.io/pink-icons-svelte@bfe7ce3",
"@appwrite.io/pink-legacy": "^1.0.3",
Expand Down
8 changes: 4 additions & 4 deletions src/lib/stores/domains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ import { StatusCode } from '@appwrite.io/console';
export const statusCodeOptions = [
{
label: '301 Moved permanently',
value: StatusCode.MovedPermanently301
value: StatusCode.MovedPermanently
},
{
label: '302 Found',
value: StatusCode.Found302
value: StatusCode.Found
},
{
label: '307 Temporary redirect',
value: StatusCode.TemporaryRedirect307
value: StatusCode.TemporaryRedirect
},
{
label: '308 Permanent redirect',
value: StatusCode.PermanentRedirect308
value: StatusCode.PermanentRedirect
}
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@
import { Fieldset, Layout, Icon, Input, Tag } from '@appwrite.io/pink-svelte';
import { IconGithub, IconPencil } from '@appwrite.io/pink-icons-svelte';
import { onMount } from 'svelte';
import { ID, Runtime, TemplateReferenceType, type Scopes } from '@appwrite.io/console';
import {
ID,
Runtime,
TemplateReferenceType,
type ProjectKeyScopes
} from '@appwrite.io/console';
import { CustomId } from '$lib/components';
import { getIconFromRuntime } from '$lib/stores/runtimes';
import { regionalConsoleVariables } from '$routes/(console)/project-[region]-[project]/store';
Expand Down Expand Up @@ -39,7 +44,7 @@
let specification = $state('');
let runtime = $state<Runtime>();
let installCommand = $state('');
let selectedScopes = $state<Scopes[]>([]);
let selectedScopes = $state<ProjectKeyScopes[]>([]);
let rootDir = $state(data.repository?.rootDirectory);
let variables = $state<Array<{ key: string; value: string; secret: boolean }>>([]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
Runtime,
TemplateReferenceType,
type Models,
type Scopes
type ProjectKeyScopes
} from '@appwrite.io/console';
import {
ConnectBehaviour,
Expand Down Expand Up @@ -71,7 +71,7 @@
let showConfig = $state(false);
let silentMode = $state(false);
let entrypoint = $state('');
let selectedScopes = $state<Scopes[]>([]);
let selectedScopes = $state<ProjectKeyScopes[]>([]);
let execute = $state(true);
let variables = $state<Partial<Models.TemplateVariable>[]>([]);
let specification = $state(untrack(() => specificationOptions[0]?.value || ''));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<script lang="ts">
import { scopes } from '$lib/constants';
import { Fieldset, Layout, Selector } from '@appwrite.io/pink-svelte';
import type { Scopes } from '@appwrite.io/console';
import type { ProjectKeyScopes } from '@appwrite.io/console';

export let templateScopes: string[];
export let selectedScopes: Scopes[];
export let selectedScopes: ProjectKeyScopes[];
export let execute = true;

let scopeList = scopes
.filter((s) => templateScopes.includes(s.scope))
.map((s) => {
selectedScopes.push(s.scope as Scopes);
selectedScopes.push(s.scope as ProjectKeyScopes);
return {
value: s,
checked: true
Expand Down Expand Up @@ -38,7 +38,7 @@
on:change={() => {
selectedScopes = scopeList
.filter((s) => s.checked)
.map((s) => s.value.scope as Scopes);
.map((s) => s.value.scope as ProjectKeyScopes);
}}>
</Selector.Switch>
{/each}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@
import { addNotification } from '$lib/stores/notifications';
import { sdk } from '$lib/stores/sdk';
import { installation, repository, sortBranches } from '$lib/stores/vcs';
import { Runtime, VCSReferenceType, type Models, type Scopes } from '@appwrite.io/console';
import {
Runtime,
VCSReferenceType,
type Models,
type ProjectKeyScopes
} from '@appwrite.io/console';
import { IconGithub } from '@appwrite.io/pink-icons-svelte';
import { Icon, Input, Layout, Skeleton, Typography } from '@appwrite.io/pink-svelte';
import { func } from '../store';
Expand Down Expand Up @@ -87,7 +92,7 @@
logging: $func.logging ?? undefined,
entrypoint: $func.entrypoint,
commands: $func.commands || undefined,
scopes: ($func.scopes as Scopes[]) || undefined,
scopes: ($func.scopes as ProjectKeyScopes[]) || undefined,
installationId: $installation.$id || undefined,
providerRepositoryId: selectedRepository || undefined,
providerBranch: branch || undefined,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
ProxyResourceType,
Runtime,
StatusCode,
type Scopes
type ProjectKeyScopes
} from '@appwrite.io/console';
import { statusCodeOptions } from '$lib/stores/domains';
import { writable } from 'svelte/store';
Expand All @@ -36,7 +36,7 @@
let domainName = $state('');
let redirect: string = $state(null);
let branch: string = $state(null);
let statusCode = $state(StatusCode.TemporaryRedirect307);
let statusCode = $state(StatusCode.TemporaryRedirect);

const routeBase = resolveRoute(
'/(console)/project-[region]-[project]/functions/function-[function]/domains',
Expand Down Expand Up @@ -145,7 +145,7 @@
logging: data.func.logging ?? undefined,
entrypoint: data.func.entrypoint,
commands: data.func.commands || undefined,
scopes: (data.func.scopes as Scopes[]) || undefined,
scopes: (data.func.scopes as ProjectKeyScopes[]) || undefined,
installationId: selectedInstallationId,
providerRepositoryId: selectedRepository,
providerBranch: 'main',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import { createEventDispatcher } from 'svelte';
import { func } from '../store';
import { isValueOfStringEnum } from '$lib/helpers/types';
import { Runtime, type Scopes } from '@appwrite.io/console';
import { Runtime, type ProjectKeyScopes } from '@appwrite.io/console';

export let show = false;
const functionId = page.params.function;
Expand All @@ -35,7 +35,7 @@
logging: $func.logging ?? undefined,
entrypoint: $func.entrypoint,
commands: $func.commands || undefined,
scopes: ($func.scopes as Scopes[]) || undefined,
scopes: ($func.scopes as ProjectKeyScopes[]) || undefined,
installationId: '',
providerRepositoryId: '',
providerBranch: '',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import { addNotification } from '$lib/stores/notifications';
import { sdk } from '$lib/stores/sdk';
import { isValueOfStringEnum } from '$lib/helpers/types';
import { Runtime, type Models, type Scopes } from '@appwrite.io/console';
import { Runtime, type Models, type ProjectKeyScopes } from '@appwrite.io/console';
import { page } from '$app/state';

export let func: Models.Function;
Expand All @@ -30,7 +30,7 @@
logging: func.logging ?? undefined,
entrypoint: func.entrypoint || undefined,
commands: buildCommand || undefined,
scopes: (func.scopes as Scopes[]) || undefined,
scopes: (func.scopes as ProjectKeyScopes[]) || undefined,
installationId: func.installationId || undefined,
providerRepositoryId: func.providerRepositoryId || undefined,
providerBranch: func.providerBranch || undefined,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import { symmetricDifference } from '$lib/helpers/array';
import { addNotification } from '$lib/stores/notifications';
import { sdk } from '$lib/stores/sdk';
import { type Models, Runtime, type Scopes } from '@appwrite.io/console';
import { type Models, Runtime, type ProjectKeyScopes } from '@appwrite.io/console';
import { Icon, Layout, Tooltip, Typography } from '@appwrite.io/pink-svelte';
import Link from '$lib/elements/link.svelte';
import { IconInfo } from '@appwrite.io/pink-icons-svelte';
Expand Down Expand Up @@ -50,7 +50,7 @@
logging: func.logging ?? undefined,
entrypoint: func.entrypoint ?? undefined,
commands: func.commands ?? undefined,
scopes: func.scopes?.length ? (func.scopes as Scopes[]) : undefined,
scopes: func.scopes?.length ? (func.scopes as ProjectKeyScopes[]) : undefined,
installationId: func.installationId ?? undefined,
providerRepositoryId: func.providerRepositoryId ?? undefined,
providerBranch: func.providerBranch ?? undefined,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import { isValueOfStringEnum } from '$lib/helpers/types';
import { addNotification } from '$lib/stores/notifications';
import { sdk } from '$lib/stores/sdk';
import { Runtime, type Models, type Scopes } from '@appwrite.io/console';
import { Runtime, type Models, type ProjectKeyScopes } from '@appwrite.io/console';

let { func }: { func: Models.Function } = $props();

Expand Down Expand Up @@ -68,7 +68,7 @@
logging: func.logging ?? undefined,
entrypoint: func.entrypoint || undefined,
commands: func.commands || undefined,
scopes: (func.scopes as Scopes[]) || undefined,
scopes: (func.scopes as ProjectKeyScopes[]) || undefined,
installationId: func.installationId || undefined,
providerRepositoryId: func.providerRepositoryId || undefined,
providerBranch: func.providerBranch || undefined,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import { EventModal } from '$lib/components';
import { Button } from '$lib/elements/forms';
import { isValueOfStringEnum } from '$lib/helpers/types';
import { Runtime, type Scopes } from '@appwrite.io/console';
import { Runtime, type ProjectKeyScopes } from '@appwrite.io/console';
import { IconPlus, IconX } from '@appwrite.io/pink-icons-svelte';
import { Icon, Layout, Link, Table, Typography } from '@appwrite.io/pink-svelte';

Expand All @@ -41,7 +41,7 @@
logging: $func.logging ?? undefined,
entrypoint: $func.entrypoint || undefined,
commands: $func.commands || undefined,
scopes: ($func.scopes as Scopes[]) || undefined,
scopes: ($func.scopes as ProjectKeyScopes[]) || undefined,
installationId: $func.installationId || undefined,
providerRepositoryId: $func.providerRepositoryId || undefined,
providerBranch: $func.providerBranch || undefined,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import { addNotification } from '$lib/stores/notifications';
import { sdk } from '$lib/stores/sdk';
import { isValueOfStringEnum } from '$lib/helpers/types';
import { Runtime, type Models, type Scopes } from '@appwrite.io/console';
import { Runtime, type Models, type ProjectKeyScopes } from '@appwrite.io/console';
import { Typography } from '@appwrite.io/pink-svelte';
import { page } from '$app/state';

Expand All @@ -32,7 +32,7 @@
deploymentRetention: func.deploymentRetention ?? undefined,
entrypoint: func.entrypoint || undefined,
commands: func.commands || undefined,
scopes: (func.scopes as Scopes[]) || undefined,
scopes: (func.scopes as ProjectKeyScopes[]) || undefined,
installationId: func.installationId || undefined,
providerRepositoryId: func.providerRepositoryId || undefined,
providerBranch: func.providerBranch || undefined,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import { onMount } from 'svelte';
import { func } from '../store';
import { isValueOfStringEnum } from '$lib/helpers/types';
import { Runtime, type Scopes } from '@appwrite.io/console';
import { Runtime, type ProjectKeyScopes } from '@appwrite.io/console';

const functionId = page.params.function;
let functionName: string = null;
Expand All @@ -36,7 +36,7 @@
logging: $func.logging ?? undefined,
entrypoint: $func.entrypoint || undefined,
commands: $func.commands || undefined,
scopes: ($func.scopes as Scopes[]) || undefined,
scopes: ($func.scopes as ProjectKeyScopes[]) || undefined,
installationId: $func.installationId || undefined,
providerRepositoryId: $func.providerRepositoryId || undefined,
providerBranch: $func.providerBranch || undefined,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import { Roles } from '$lib/components/permissions';
import { symmetricDifference } from '$lib/helpers/array';
import { isValueOfStringEnum } from '$lib/helpers/types';
import { Runtime, type Scopes } from '@appwrite.io/console';
import { Runtime, type ProjectKeyScopes } from '@appwrite.io/console';
import { Link } from '$lib/elements';

const functionId = page.params.function;
Expand Down Expand Up @@ -41,7 +41,7 @@
logging: $func.logging ?? undefined,
entrypoint: $func.entrypoint || undefined,
commands: $func.commands || undefined,
scopes: ($func.scopes as Scopes[]) || undefined,
scopes: ($func.scopes as ProjectKeyScopes[]) || undefined,
installationId: $func.installationId || undefined,
providerRepositoryId: $func.providerRepositoryId || undefined,
providerBranch: $func.providerBranch || undefined,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { Button, Form, InputText } from '$lib/elements/forms';
import { addNotification } from '$lib/stores/notifications';
import { sdk } from '$lib/stores/sdk';
import { Runtime, type Models, type Scopes } from '@appwrite.io/console';
import { Runtime, type Models, type ProjectKeyScopes } from '@appwrite.io/console';
import { onMount } from 'svelte';
import DisconnectRepo from './disconnectRepo.svelte';
import { installation, repository as repositoryStore, sortBranches } from '$lib/stores/vcs';
Expand Down Expand Up @@ -86,7 +86,7 @@
logging: func.logging ?? undefined,
entrypoint: func.entrypoint || undefined,
commands: func.commands || undefined,
scopes: (func.scopes as Scopes[]) || undefined,
scopes: (func.scopes as ProjectKeyScopes[]) || undefined,
installationId: func.installationId || undefined,
providerRepositoryId: func.providerRepositoryId || undefined,
providerBranch: selectedBranch,
Expand Down Expand Up @@ -161,7 +161,7 @@
logging: func.logging ?? undefined,
entrypoint: func.entrypoint,
commands: func.commands || undefined,
scopes: (func.scopes as Scopes[]) || undefined,
scopes: (func.scopes as ProjectKeyScopes[]) || undefined,
installationId: selectedInstallationId,
providerRepositoryId: selectedRepository,
providerBranch: nextBranch,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import { addNotification } from '$lib/stores/notifications';
import { sdk } from '$lib/stores/sdk';
import { isValueOfStringEnum } from '$lib/helpers/types';
import { Runtime, type Models, type Scopes } from '@appwrite.io/console';
import { Runtime, type Models, type ProjectKeyScopes } from '@appwrite.io/console';
import Link from '$lib/elements/link.svelte';
import { Alert, Icon, Tooltip } from '@appwrite.io/pink-svelte';
import { IconInfo } from '@appwrite.io/pink-icons-svelte';
Expand Down Expand Up @@ -52,7 +52,7 @@
logging: func.logging ?? undefined,
entrypoint: func.entrypoint || undefined,
commands: func.commands || undefined,
scopes: (func.scopes as Scopes[]) || undefined,
scopes: (func.scopes as ProjectKeyScopes[]) || undefined,
installationId: func.installationId || undefined,
providerRepositoryId: func.providerRepositoryId || undefined,
providerBranch: func.providerBranch || undefined,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import { func } from '../store';
import InputSelect from '$lib/elements/forms/inputSelect.svelte';
import { isValueOfStringEnum } from '$lib/helpers/types';
import { Runtime, type Models, type Scopes } from '@appwrite.io/console';
import { Runtime, type Models, type ProjectKeyScopes } from '@appwrite.io/console';
import { Layout, Typography } from '@appwrite.io/pink-svelte';
import Link from '$lib/elements/link.svelte';

Expand Down Expand Up @@ -40,7 +40,7 @@
logging: $func.logging ?? undefined,
entrypoint: entrypoint || undefined,
commands: $func.commands || undefined,
scopes: ($func.scopes as Scopes[]) || undefined,
scopes: ($func.scopes as ProjectKeyScopes[]) || undefined,
installationId: $func.installationId || undefined,
providerRepositoryId: $func.providerRepositoryId || undefined,
providerBranch: $func.providerBranch || undefined,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import { onMount } from 'svelte';
import { func } from '../store';
import { isValueOfStringEnum } from '$lib/helpers/types';
import { Runtime, type Scopes } from '@appwrite.io/console';
import { Runtime, type ProjectKeyScopes } from '@appwrite.io/console';
import { Link } from '$lib/elements';
import { parseExpression } from 'cron-parser';

Expand Down Expand Up @@ -41,7 +41,7 @@
logging: $func.logging ?? undefined,
entrypoint: $func.entrypoint || undefined,
commands: $func.commands || undefined,
scopes: ($func.scopes as Scopes[]) || undefined,
scopes: ($func.scopes as ProjectKeyScopes[]) || undefined,
installationId: $func.installationId || undefined,
providerRepositoryId: $func.providerRepositoryId || undefined,
providerBranch: $func.providerBranch || undefined,
Expand Down
Loading