diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 60baa93de..e074b7fb8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,7 +4,7 @@ We would ❤️ for you to contribute to Appwrite and help make it better! We wa ## How to Start? -If you are worried about or don’t know where to start, check out the next section that explains what kind of help is needed and how you can get involved. You can reach out with any questions on our [Discord](https://appwrite.io/discord) server. You can also submit an issue and a maintainer can guide you! +If you are worried about or don't know where to start, check out the next section that explains what kind of help is needed and how you can get involved. You can reach out with any questions on our [Discord](https://appwrite.io/discord) server. You can also submit an issue and a maintainer can guide you! ## Repo Structure @@ -242,7 +242,7 @@ When blogging, speaking about, or creating tutorials about one of Appwrite's man ### Presenting at Meetups -Presenting at meetups and conferences about your Appwrite projects is another excellent way to get the word out about Appwrite. Your unique challenges and successes in building things with Appwrite can provide great speaking material. We’d love to review your talk abstract/CFP, so get in touch with us if you’d like some help! +Presenting at meetups and conferences about your Appwrite projects is another excellent way to get the word out about Appwrite. Your unique challenges and successes in building things with Appwrite can provide great speaking material. We'd love to review your talk abstract/CFP, so get in touch with us if you'd like some help! ### Sending Feedback & Reporting Bugs diff --git a/README.md b/README.md index d9365176b..e37369791 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Console 2.0 is designed to be accessible, from design to code. Console 2.0 is al ### Scalability and Collaboration -The new console is more maintainable and welcoming to community contributions. Console 2.0 is built using Svelte instead of our own library. It’s better documented and well-known, making it easier for developers to contribute to Appwrite. +The new console is more maintainable and welcoming to community contributions. Console 2.0 is built using Svelte instead of our own library. It's better documented and well-known, making it easier for developers to contribute to Appwrite. ## Contributing diff --git a/package-lock.json b/package-lock.json index ace5f6d0d..590e07f9e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "dependencies": { "@analytics/google-analytics": "^1.0.5", "@analytics/google-tag-manager": "^0.5.3", - "@appwrite.io/console": "npm:matej-appwrite-console@7.1.130", + "@appwrite.io/console": "^0.3.0", "@appwrite.io/pink": "0.1.0-next.8", "@appwrite.io/pink-icons": "^0.1.0-next.8", "@popperjs/core": "^2.11.6", @@ -169,10 +169,9 @@ "integrity": "sha512-TD+xbmsBLyYy/IxFimW/YL/9L2IEnM7/EoV9Aeh56U64Ify8o27HJcKjo38XY9Tcn0uOq1AX3thkKgvtWvwFQg==" }, "node_modules/@appwrite.io/console": { - "name": "matej-appwrite-console", - "version": "7.1.130", - "resolved": "https://registry.npmjs.org/matej-appwrite-console/-/matej-appwrite-console-7.1.130.tgz", - "integrity": "sha512-XsaGxuUNznKKiQpbYAy7VYtj5f0CitrMcIh+9UiHzI0dVXe4ck8humDv6l8XVFp0aQZWxc6RfiPuHo9oreEKuw==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@appwrite.io/console/-/console-0.3.0.tgz", + "integrity": "sha512-XHKQHirzQliXoDpMLakSdXwpq9aPoeTABNhW8Z7MK3p6oBfp2gMplDD43Fbd91JREXoJ+RG8okX0z0nIc6hDiQ==", "dependencies": { "cross-fetch": "3.1.5", "isomorphic-form-data": "2.0.0" @@ -8985,9 +8984,9 @@ "integrity": "sha512-TD+xbmsBLyYy/IxFimW/YL/9L2IEnM7/EoV9Aeh56U64Ify8o27HJcKjo38XY9Tcn0uOq1AX3thkKgvtWvwFQg==" }, "@appwrite.io/console": { - "version": "npm:matej-appwrite-console@7.1.130", - "resolved": "https://registry.npmjs.org/matej-appwrite-console/-/matej-appwrite-console-7.1.130.tgz", - "integrity": "sha512-XsaGxuUNznKKiQpbYAy7VYtj5f0CitrMcIh+9UiHzI0dVXe4ck8humDv6l8XVFp0aQZWxc6RfiPuHo9oreEKuw==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@appwrite.io/console/-/console-0.3.0.tgz", + "integrity": "sha512-XHKQHirzQliXoDpMLakSdXwpq9aPoeTABNhW8Z7MK3p6oBfp2gMplDD43Fbd91JREXoJ+RG8okX0z0nIc6hDiQ==", "requires": { "cross-fetch": "3.1.5", "isomorphic-form-data": "2.0.0" diff --git a/package.json b/package.json index e38f65dc4..27292b7bb 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "dependencies": { "@analytics/google-analytics": "^1.0.5", "@analytics/google-tag-manager": "^0.5.3", - "@appwrite.io/console": "npm:matej-appwrite-console@7.1.130", + "@appwrite.io/console": "^0.3.0", "@appwrite.io/pink": "0.1.0-next.8", "@appwrite.io/pink-icons": "^0.1.0-next.8", "@popperjs/core": "^2.11.6", diff --git a/src/lib/constants.ts b/src/lib/constants.ts index b73ecbbb9..a2107d03c 100644 --- a/src/lib/constants.ts +++ b/src/lib/constants.ts @@ -40,7 +40,9 @@ export enum Dependencies { WEBHOOK = 'dependency:webhook', WEBHOOKS = 'dependency:webhooks', MIGRATIONS = 'dependency:migrations', - COLLECTIONS = 'dependency:collections' + COLLECTIONS = 'dependency:collections', + RUNTIMES = 'dependency:runtimes', + CONSOLE_VARIABLES = 'dependency:console_variables' } export const scopes: { diff --git a/src/lib/helpers/debounce.ts b/src/lib/helpers/debounce.ts index afb93f4a2..6a36b4e47 100644 --- a/src/lib/helpers/debounce.ts +++ b/src/lib/helpers/debounce.ts @@ -1,6 +1,6 @@ -export function debounce void>(fn: F, delay: number) { +export function debounce void>(fn: F, delay: number) { let timeoutID: ReturnType = null; - const debounceFn = function (this: any, ...args: any[]) { + const debounceFn = function (this: unknown, ...args: unknown[]) { clearTimeout(timeoutID); timeoutID = window.setTimeout(() => fn.apply(this, args), delay) as unknown as ReturnType< typeof setTimeout diff --git a/src/lib/helpers/object.ts b/src/lib/helpers/object.ts index fb09d2ab5..0a901aed3 100644 --- a/src/lib/helpers/object.ts +++ b/src/lib/helpers/object.ts @@ -45,7 +45,7 @@ export function deepMap( return result; } -export function parseIfString(value: unknown): any { +export function parseIfString(value: unknown): unknown { if (typeof value === 'string') { try { return JSON.parse(value); diff --git a/src/lib/helpers/project.ts b/src/lib/helpers/project.ts index ff8f887b0..a8a88cd3f 100644 --- a/src/lib/helpers/project.ts +++ b/src/lib/helpers/project.ts @@ -1,5 +1,5 @@ export function getProjectId() { - const pathname = window.location.pathname; + const pathname = window.location.pathname + '/'; const projectMatch = pathname.match(/\/project-(.*?)\//); return projectMatch?.[1] || null; } diff --git a/src/lib/helpers/stores.ts b/src/lib/helpers/stores.ts index 509693a9e..13a63437d 100644 --- a/src/lib/helpers/stores.ts +++ b/src/lib/helpers/stores.ts @@ -9,7 +9,7 @@ import { deepClone, objectEntries } from './object'; * * @export */ -export function createConservative>(obj: Obj) { +export function createConservative>(obj: Obj) { const stores = Object.fromEntries( objectEntries(obj).map(([key, value]) => [key, writable(value)]) ) as { diff --git a/src/lib/pages/domains/wizard/step1.svelte b/src/lib/pages/domains/wizard/step1.svelte index 6c37353c2..5b21ca35b 100644 --- a/src/lib/pages/domains/wizard/step1.svelte +++ b/src/lib/pages/domains/wizard/step1.svelte @@ -9,6 +9,7 @@ import { onMount } from 'svelte'; import { ProxyTypes } from '../index.svelte'; import { domain, typeStore } from './store'; + import { consoleVariables } from '$routes/console/store'; let error = null; let isDomainsEnabled = false; @@ -17,9 +18,8 @@ if (!isSelfHosted) { return; } - const vars = await sdk.forConsole.console.variables(); - //@ts-expect-error needs an sdk release - isDomainsEnabled = vars?._APP_DOMAIN_ENABLED === true; + + isDomainsEnabled = (await $consoleVariables)?._APP_DOMAIN_ENABLED === true; }); async function createDomain() { @@ -78,8 +78,12 @@ To add a domain to a locally hosted Appwrite project, you must first configure your server domain. - - + {/if} diff --git a/src/lib/stores/marketplace.ts b/src/lib/stores/marketplace.ts index d38c3d679..3c76be73a 100644 --- a/src/lib/stores/marketplace.ts +++ b/src/lib/stores/marketplace.ts @@ -1,4 +1,4 @@ -export const marketplace = [ +export const marketplace: MarketplaceTemplate[] = [ { icon: 'icon-lightning-bolt', id: 'starter', @@ -9,7 +9,7 @@ export const marketplace = [ events: [], cron: '', timeout: 15, - usecases: ['placeholder'], + usecases: ['Starter'], runtimes: [ { name: 'node-18.0', @@ -66,13 +66,31 @@ export const marketplace = [ events: [], cron: '', timeout: 15, - usecases: ['placeholder'], + usecases: ['AI'], runtimes: [ { name: 'node-18.0', commands: 'npm install', entrypoint: 'src/main.js', providerRootDirectory: 'node/prompt-chatgpt' + }, + { + name: 'python-3.9', + commands: 'pip install -r requirements.txt', + entrypoint: 'src/main.py', + providerRootDirectory: 'python/prompt_chatgpt' + }, + { + name: 'php-8.0', + commands: 'composer install', + entrypoint: 'src/index.php', + providerRootDirectory: 'php/prompt-chatgpt' + }, + { + name: 'dart-2.17', + commands: 'dart pub get', + entrypoint: 'lib/main.dart', + providerRootDirectory: 'dart/prompt_chatgpt' } ], instructions: `For documentation and instructions check out file.`, @@ -106,13 +124,19 @@ export const marketplace = [ events: [], cron: '', timeout: 15, - usecases: ['placeholder'], + usecases: ['Messaging'], runtimes: [ { name: 'node-18.0', commands: 'npm install && npm run setup', - entrypoint: 'src/main.js', + entrypoint: 'src/main.js && npm run setup', providerRootDirectory: 'node/discord-command-bot' + }, + { + name: 'python-3.9', + commands: 'pip install -r requirements.txt && python src/setup.py', + entrypoint: 'src/main.py', + providerRootDirectory: 'python/discord_command_bot' } ], instructions: `For documentation and instructions check out file.`, @@ -139,7 +163,7 @@ export const marketplace = [ events: [], cron: '', timeout: 15, - usecases: ['placeholder'], + usecases: ['AI'], runtimes: [ { name: 'node-18.0', @@ -173,13 +197,25 @@ export const marketplace = [ events: [], cron: '', timeout: 15, - usecases: ['placeholder'], + usecases: ['AI'], runtimes: [ { name: 'node-18.0', commands: 'npm install', entrypoint: 'src/main.js', providerRootDirectory: 'node/censor-with-redact' + }, + { + name: 'python-3.9', + commands: 'pip install -r requirements.txt', + entrypoint: 'src/main.py', + providerRootDirectory: 'python/censor_with_redact' + }, + { + name: 'dart-2.17', + commands: 'dart pub get', + entrypoint: 'lib/main.dart', + providerRootDirectory: 'dart/censor_with_redact' } ], instructions: `For documentation and instructions check out file.`, @@ -206,7 +242,7 @@ export const marketplace = [ events: [], cron: '', timeout: 15, - usecases: ['placeholder'], + usecases: ['Utilities'], runtimes: [ { name: 'node-18.0', @@ -232,7 +268,7 @@ export const marketplace = [ events: [], cron: '', timeout: 15, - usecases: ['placeholder'], + usecases: ['Dev Tools'], runtimes: [ { name: 'node-18.0', @@ -272,7 +308,7 @@ export const marketplace = [ events: [], cron: '', timeout: 15, - usecases: ['placeholder'], + usecases: ['Utilities'], runtimes: [ { name: 'node-18.0', @@ -314,6 +350,13 @@ export const marketplace = [ value: 'urls', placeholder: 'urls', required: false + }, + { + name: 'SHORT_BASE_URL', + description: `The domain to use for the short URLs. You can use your functions subdomain or a custom domain.`, + value: '', + placeholder: 'https://shortdomain.io', + required: true } ] }, @@ -326,13 +369,25 @@ export const marketplace = [ events: [], cron: '', timeout: 15, - usecases: ['placeholder'], + usecases: ['Databases'], runtimes: [ { name: 'node-18.0', commands: 'npm install', entrypoint: 'src/main.js', providerRootDirectory: 'node/sync-with-algolia' + }, + { + name: 'python-3.9', + commands: 'pip install -r requirements.txt', + entrypoint: 'src/main.py', + providerRootDirectory: 'python/sync_with_algolia' + }, + { + name: 'php-8.0', + commands: 'composer install', + entrypoint: 'src/index.php', + providerRootDirectory: 'php/sync-with-algolia' } ], instructions: `For documentation and instructions check out file.`, @@ -369,7 +424,7 @@ export const marketplace = [ { name: 'ALGOLIA_INDEX_ID', description: `The ID of the index in Algolia where the documents are to be synced. Learn more.`, - placeholder: 'appwrite_index', + placeholder: 'my_index', required: true }, { @@ -396,7 +451,7 @@ export const marketplace = [ events: [], cron: '', timeout: 15, - usecases: ['placeholder'], + usecases: ['Databases'], runtimes: [ { name: 'node-18.0', @@ -472,7 +527,7 @@ export const marketplace = [ events: [], cron: '', timeout: 15, - usecases: ['placeholder'], + usecases: ['Messaging'], runtimes: [ { name: 'node-18.0', @@ -523,7 +578,7 @@ export const marketplace = [ events: [], cron: '', timeout: 15, - usecases: ['placeholder'], + usecases: ['Messaging'], runtimes: [ { name: 'node-18.0', @@ -574,13 +629,25 @@ export const marketplace = [ events: [], cron: '', timeout: 15, - usecases: ['placeholder'], + usecases: ['Utilities'], runtimes: [ { name: 'node-18.0', commands: 'npm install', entrypoint: 'src/main.js', providerRootDirectory: 'node/email-contact-form' + }, + { + name: 'python-3.9', + commands: 'pip install -r requirements.txt', + entrypoint: 'src/main.py', + providerRootDirectory: 'python/email_contact_form' + }, + { + name: 'php-8.0', + commands: 'composer install', + entrypoint: 'src/index.php', + providerRootDirectory: 'php/email-contact-form' } ], instructions: `For documentation and instructions check out file.`, diff --git a/src/lib/wizards/functions/cover.svelte b/src/lib/wizards/functions/cover.svelte index f38cfa2b2..ee607e3c3 100644 --- a/src/lib/wizards/functions/cover.svelte +++ b/src/lib/wizards/functions/cover.svelte @@ -2,7 +2,7 @@ import CreateTemplate from './createTemplate.svelte'; export function connectTemplate(template: MarketplaceTemplate, runtime: string | null = null) { - const variables: any = {}; + const variables: Record = {}; template.variables.forEach((variable) => { variables[variable.name] = variable.value ?? ''; }); @@ -29,17 +29,19 @@ - Select data + Select resources + + Select the resources you need to migrate to Appwrite. Some resources can be migrated, but + with limitations. + Learn about which resources are supported. + diff --git a/src/routes/console/+layout.svelte b/src/routes/console/+layout.svelte index cf229d45e..c7e0bda5a 100644 --- a/src/routes/console/+layout.svelte +++ b/src/routes/console/+layout.svelte @@ -23,8 +23,8 @@ import { addNotification } from '$lib/stores/notifications'; import { openMigrationWizard } from './(migration-wizard)'; import { project } from './project-[project]/store'; - import { sdk } from '$lib/stores/sdk'; import { feedback } from '$lib/stores/feedback'; + import { consoleVariables } from './store'; function kebabToSentenceCase(str: string) { return str @@ -35,8 +35,7 @@ let isAssistantEnabled = false; onMount(async () => { - const vars = await sdk.forConsole.console.variables(); - isAssistantEnabled = vars._APP_ASSISTANT_ENABLED === true; + isAssistantEnabled = (await $consoleVariables)?._APP_ASSISTANT_ENABLED === true; }); $: isOnSettingsLayout = $project?.$id diff --git a/src/routes/console/+layout.ts b/src/routes/console/+layout.ts index b95930fa5..8221f5d43 100644 --- a/src/routes/console/+layout.ts +++ b/src/routes/console/+layout.ts @@ -1,8 +1,12 @@ +import { Dependencies } from '$lib/constants'; import { sdk } from '$lib/stores/sdk'; import type { LayoutLoad } from './$types'; -export const load: LayoutLoad = async ({ fetch }) => { +export const load: LayoutLoad = async ({ fetch, depends }) => { + depends(Dependencies.RUNTIMES); + depends(Dependencies.CONSOLE_VARIABLES); + const { endpoint, project } = sdk.forConsole.client.config; const response = await fetch(`${endpoint}/health/version`, { headers: { @@ -12,6 +16,7 @@ export const load: LayoutLoad = async ({ fetch }) => { const data = await response.json(); return { + consoleVariables: sdk.forConsole.console.variables(), version: data?.version ?? null }; }; diff --git a/src/routes/console/project-[project]/auth/teams/+page.svelte b/src/routes/console/project-[project]/auth/teams/+page.svelte index 5e6460b73..0d186ccc9 100644 --- a/src/routes/console/project-[project]/auth/teams/+page.svelte +++ b/src/routes/console/project-[project]/auth/teams/+page.svelte @@ -79,7 +79,7 @@ {:else if data.search}
- Sorry, we couldn’t find ‘{data.search}’ + Sorry, we couldn't find ‘{data.search}'

There are no teams that match your search.

+ {:else} diff --git a/src/routes/console/project-[project]/functions/function-[function]/deployment-[deployment]/+page.svelte b/src/routes/console/project-[project]/functions/function-[function]/deployment-[deployment]/+page.svelte index 48ff1087a..a6d1daf72 100644 --- a/src/routes/console/project-[project]/functions/function-[function]/deployment-[deployment]/+page.svelte +++ b/src/routes/console/project-[project]/functions/function-[function]/deployment-[deployment]/+page.svelte @@ -34,7 +34,7 @@ `functions.${$page.params.function}.deployments.${$page.params.deployment}.update` ) ) { - logs = (message.payload as any).logs as string; + logs = message.payload.buildLogs; if (message.payload.status === 'ready') { invalidate(Dependencies.DEPLOYMENT); } diff --git a/src/routes/console/project-[project]/functions/function-[function]/execute.svelte b/src/routes/console/project-[project]/functions/function-[function]/execute.svelte index 1ddddbb7f..26824e5f7 100644 --- a/src/routes/console/project-[project]/functions/function-[function]/execute.svelte +++ b/src/routes/console/project-[project]/functions/function-[function]/execute.svelte @@ -113,8 +113,9 @@ Update your function version to make use of new features including customizable HTTP data in your executions. - - + Your function is outdated Update your function version to make use of new features including build commands and HTTP data in your executions. To update, follow the steps outlined in our - - documentation. + documentation. - - + {/if} diff --git a/src/routes/console/project-[project]/functions/function-[function]/settings/updateConfiguration.svelte b/src/routes/console/project-[project]/functions/function-[function]/settings/updateConfiguration.svelte index edebc1d10..58dab72f2 100644 --- a/src/routes/console/project-[project]/functions/function-[function]/settings/updateConfiguration.svelte +++ b/src/routes/console/project-[project]/functions/function-[function]/settings/updateConfiguration.svelte @@ -49,7 +49,7 @@ import InputSelectSearch from '$lib/elements/forms/inputSelectSearch.svelte'; import { installations } from '$lib/wizards/functions/store'; import { isSelfHosted } from '$lib/system'; - import { consoleVariables } from '$lib/stores/consoleVariables'; + import { consoleVariables, isVcsEnabled } from '$routes/console/store'; const functionId = $page.params.function; @@ -172,8 +172,6 @@ selectedBranch !== $func?.providerBranch || silentMode !== $func?.providerSilentMode || selectedDir !== $func?.providerRootDirectory; - - $: isVcsEnabled = $consoleVariables?._APP_VCS_ENABLED === true;
@@ -282,7 +280,7 @@ {:else} - {#if isSelfHosted && !isVcsEnabled} + {#if isSelfHosted && !isVcsEnabled($consoleVariables)} Installing Git to a self-hosted instance @@ -290,8 +288,12 @@ When installing Git in a locally hosted Appwrite project, you must first configure your environment variables. - - + {/if} @@ -313,6 +315,7 @@ diff --git a/src/lib/stores/consoleVariables.ts b/src/routes/console/project-[project]/functions/store.ts similarity index 56% rename from src/lib/stores/consoleVariables.ts rename to src/routes/console/project-[project]/functions/store.ts index 887820b6b..029ac922d 100644 --- a/src/lib/stores/consoleVariables.ts +++ b/src/routes/console/project-[project]/functions/store.ts @@ -2,7 +2,7 @@ import { page } from '$app/stores'; import { derived } from 'svelte/store'; import type { Models } from '@appwrite.io/console'; -export const consoleVariables = derived( +export const runtimes = derived( page, - ($page) => $page.data.consoleVariables as Models.ConsoleVariables + async ($page) => (await $page.data.runtimes) as Models.RuntimeList ); diff --git a/src/routes/console/project-[project]/functions/templates/template-[template]/+page.svelte b/src/routes/console/project-[project]/functions/templates/template-[template]/+page.svelte index 6b089bce2..5362ac55c 100644 --- a/src/routes/console/project-[project]/functions/templates/template-[template]/+page.svelte +++ b/src/routes/console/project-[project]/functions/templates/template-[template]/+page.svelte @@ -4,12 +4,10 @@ import { Pill } from '$lib/elements'; import { Button } from '$lib/elements/forms'; import { Container } from '$lib/layout'; - import { consoleVariables } from '$lib/stores/consoleVariables'; import { isSelfHosted } from '$lib/system'; import { connectTemplate } from '$lib/wizards/functions/cover.svelte'; + import { consoleVariables, isVcsEnabled } from '$routes/console/store'; import { template } from './store'; - - $: isVcsEnabled = $consoleVariables?._APP_VCS_ENABLED === true; @@ -62,7 +60,7 @@

{$template.tagline}

- {#if isSelfHosted && !isVcsEnabled} + {#if isSelfHosted && !isVcsEnabled($consoleVariables)} Cloning templates to a self-hosted instance @@ -70,8 +68,12 @@ In order to clone a template to a locally hosted Appwrite project, you must set up a Git integration and configure your environment variables. - - + {/if} @@ -83,7 +85,10 @@ View source - diff --git a/src/routes/console/project-[project]/functions/wizard/step1.svelte b/src/routes/console/project-[project]/functions/wizard/step1.svelte index 53c58e72e..08ca69fbe 100644 --- a/src/routes/console/project-[project]/functions/wizard/step1.svelte +++ b/src/routes/console/project-[project]/functions/wizard/step1.svelte @@ -5,7 +5,7 @@ import { WizardStep } from '$lib/layout'; import { onMount } from 'svelte'; import { createFunction } from './store'; - import { runtimes } from '$lib/wizards/functions/store'; + import { runtimes } from '../store'; let showCustomId = false; @@ -20,8 +20,8 @@ - Create your function - Let's create a function. + Configuration function + Create your new Appwrite Function. - Execute access + Permissions - Choose who can execute this function using the client API. For more information, check out - the - Permissions guide + permissions documentation . diff --git a/src/routes/console/project-[project]/functions/wizard/step3.svelte b/src/routes/console/project-[project]/functions/wizard/step3.svelte index 95319ec88..58c099780 100644 --- a/src/routes/console/project-[project]/functions/wizard/step3.svelte +++ b/src/routes/console/project-[project]/functions/wizard/step3.svelte @@ -19,7 +19,13 @@ Events - Set the events that will trigger your function. Maximum 100 events allowed. + Set the events that will trigger your function. Maximum 100 events allowed. + Learn more about events. + . {#if $createFunction?.events?.length} diff --git a/src/routes/console/project-[project]/functions/wizard/step5.svelte b/src/routes/console/project-[project]/functions/wizard/step5.svelte index 932018ffe..4a0505bc7 100644 --- a/src/routes/console/project-[project]/functions/wizard/step5.svelte +++ b/src/routes/console/project-[project]/functions/wizard/step5.svelte @@ -45,7 +45,13 @@ Variables - Create the environment variables or secret keys that will be passed to your function + Create the environment variables or secret keys that will be passed to your function. + permissions documentation + . {#if $createFunction.vars.length} diff --git a/src/routes/console/project-[project]/rawVariableEditor.svelte b/src/routes/console/project-[project]/rawVariableEditor.svelte index 97382f807..012caaf69 100644 --- a/src/routes/console/project-[project]/rawVariableEditor.svelte +++ b/src/routes/console/project-[project]/rawVariableEditor.svelte @@ -12,9 +12,13 @@ export let showEditor = false; export let variableList: Models.VariableList; - export let sdkCreateVariable: (key: string, value: string) => Promise; - export let sdkUpdateVariable: (variableId: string, key: string, value: string) => Promise; - export let sdkDeleteVariable: (variableId: string) => Promise; + export let sdkCreateVariable: (key: string, value: string) => Promise; + export let sdkUpdateVariable: ( + variableId: string, + key: string, + value: string + ) => Promise; + export let sdkDeleteVariable: (variableId: string) => Promise; let error = ''; let envCode = variableList.variables diff --git a/src/routes/console/project-[project]/settings/+page.ts b/src/routes/console/project-[project]/settings/+page.ts index e57a62558..125a929bd 100644 --- a/src/routes/console/project-[project]/settings/+page.ts +++ b/src/routes/console/project-[project]/settings/+page.ts @@ -1,18 +1,13 @@ import { Dependencies, PAGE_LIMIT } from '$lib/constants'; import { sdk } from '$lib/stores/sdk'; -import { Query, type Models } from '@appwrite.io/console'; +import { Query } from '@appwrite.io/console'; import type { PageLoad } from './$types'; -import { isSelfHosted } from '$lib/system'; export const load: PageLoad = async ({ depends, url }) => { depends(Dependencies.PROJECT_VARIABLES); depends(Dependencies.PROJECT_INSTALLATIONS); const limit = PAGE_LIMIT; const offset = Number(url.searchParams.get('offset') ?? 0); - let consoleVariables: Models.ConsoleVariables = null; - if (isSelfHosted) { - consoleVariables = await sdk.forConsole.console.variables(); - } return { limit, @@ -21,7 +16,6 @@ export const load: PageLoad = async ({ depends, url }) => { installations: await sdk.forProject.vcs.listInstallations([ Query.limit(limit), Query.offset(offset) - ]), - consoleVariables + ]) }; }; diff --git a/src/routes/console/project-[project]/settings/migrations/(import)/step1.svelte b/src/routes/console/project-[project]/settings/migrations/(import)/step1.svelte index 09a306725..b881ba155 100644 --- a/src/routes/console/project-[project]/settings/migrations/(import)/step1.svelte +++ b/src/routes/console/project-[project]/settings/migrations/(import)/step1.svelte @@ -52,7 +52,16 @@ - Choose provider + Select source + + Select a source platform with the project you want to migrate. + Learn about which platforms are supported. +
{#each Object.entries(providers) as [key, value]}