From b8ea2ab7a54d3735332d6f03978c4e2fdcdf4636 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Thu, 9 Jan 2025 12:44:28 +0000 Subject: [PATCH] Add deprecwated arning --- .env.example | 2 +- package.json | 2 +- pnpm-lock.yaml | 15 ++++++++------- .../steps/templateConfiguration.svelte | 1 + .../settings/updateRuntime.svelte | 17 +++++++++++++++++ .../functions/wizard/step1.svelte | 2 +- 6 files changed, 29 insertions(+), 10 deletions(-) diff --git a/.env.example b/.env.example index 138249fc10..6721220e9e 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,4 @@ -PUBLIC_APPWRITE_ENDPOINT=https://localhost/v1 +PUBLIC_APPWRITE_ENDPOINT=http://localhost/v1 PUBLIC_CONSOLE_MODE=self-hosted PUBLIC_STRIPE_KEY= PUBLIC_GROWTH_ENDPOINT= \ No newline at end of file diff --git a/package.json b/package.json index f189113b97..999f01307b 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "e2e:ui": "playwright test tests/e2e --ui" }, "dependencies": { - "@appwrite.io/console": "1.4.4", + "@appwrite.io/console": "https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@9197", "@appwrite.io/pink": "0.25.0", "@appwrite.io/pink-icons": "0.25.0", "@popperjs/core": "^2.11.8", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 627a97cc9f..93fe972dad 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: dependencies: '@appwrite.io/console': - specifier: 1.4.4 - version: 1.4.4 + specifier: https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@9197 + version: https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@9197 '@appwrite.io/pink': specifier: 0.25.0 version: 0.25.0 @@ -95,7 +95,7 @@ importers: version: 6.6.3 '@testing-library/svelte': specifier: ^5.2.4 - version: 5.2.4(svelte@4.2.19)(vite@5.4.11(@types/node@22.9.0)(sass@1.81.0))(vitest@1.6.0(@types/node@22.9.0)(@vitest/ui@1.6.0)(jsdom@22.1.0)(sass@1.81.0)) + version: 5.2.4(svelte@4.2.19)(vite@5.4.11(@types/node@22.9.0)(sass@1.81.0))(vitest@1.6.0) '@testing-library/user-event': specifier: ^14.5.2 version: 14.5.2(@testing-library/dom@10.4.0) @@ -199,8 +199,9 @@ packages: '@analytics/type-utils@0.6.2': resolution: {integrity: sha512-TD+xbmsBLyYy/IxFimW/YL/9L2IEnM7/EoV9Aeh56U64Ify8o27HJcKjo38XY9Tcn0uOq1AX3thkKgvtWvwFQg==} - '@appwrite.io/console@1.4.4': - resolution: {integrity: sha512-0B7PEHJIi0eS8+WQOs7RNwY+j3gffMTz6DKyvZAEJbe4550UnmTn4i8pxmyaiEVbhlqIVZ+QD8jVrjXqtkPK6Q==} + '@appwrite.io/console@https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@9197': + resolution: {tarball: https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@9197} + version: 1.2.1 '@appwrite.io/pink-icons@0.25.0': resolution: {integrity: sha512-0O3i2oEuh5mWvjO80i+X6rbzrWLJ1m5wmv2/M3a1p2PyBJsFxN8xQMTEmTn3Wl/D26SsM7SpzbdW6gmfgoVU9Q==} @@ -3834,7 +3835,7 @@ snapshots: '@analytics/type-utils@0.6.2': {} - '@appwrite.io/console@1.4.4': {} + '@appwrite.io/console@https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@9197': {} '@appwrite.io/pink-icons@0.25.0': {} @@ -5075,7 +5076,7 @@ snapshots: lodash: 4.17.21 redent: 3.0.0 - '@testing-library/svelte@5.2.4(svelte@4.2.19)(vite@5.4.11(@types/node@22.9.0)(sass@1.81.0))(vitest@1.6.0(@types/node@22.9.0)(@vitest/ui@1.6.0)(jsdom@22.1.0)(sass@1.81.0))': + '@testing-library/svelte@5.2.4(svelte@4.2.19)(vite@5.4.11(@types/node@22.9.0)(sass@1.81.0))(vitest@1.6.0)': dependencies: '@testing-library/dom': 10.4.0 svelte: 4.2.19 diff --git a/src/lib/wizards/functions/steps/templateConfiguration.svelte b/src/lib/wizards/functions/steps/templateConfiguration.svelte index fbce477fb5..d5f0f951e2 100644 --- a/src/lib/wizards/functions/steps/templateConfiguration.svelte +++ b/src/lib/wizards/functions/steps/templateConfiguration.svelte @@ -25,6 +25,7 @@ async function loadRuntimes() { const options = (await $runtimesList).runtimes + .filter(runtime => !runtime.deprecated) .map((runtime) => ({ label: `${runtime.name} - ${runtime.version}`, value: runtime.$id diff --git a/src/routes/(console)/project-[project]/functions/function-[function]/settings/updateRuntime.svelte b/src/routes/(console)/project-[project]/functions/function-[function]/settings/updateRuntime.svelte index 1f06dbe9cd..202315d7b9 100644 --- a/src/routes/(console)/project-[project]/functions/function-[function]/settings/updateRuntime.svelte +++ b/src/routes/(console)/project-[project]/functions/function-[function]/settings/updateRuntime.svelte @@ -17,6 +17,7 @@ import { isCloud } from '$lib/system'; import { organization } from '$lib/stores/organization'; import SpecificationsTooltip from '$lib/wizards/functions/components/specificationsTooltip.svelte'; + import Alert from '$lib/components/alert.svelte'; const functionId = $page.params.function; let runtime: string = null; @@ -25,12 +26,20 @@ let options = []; let specificationOptions = []; + let isDeprecated: boolean = null; + onMount(async () => { runtime ??= $func.runtime; specification ??= $func.specification; let runtimes = await $runtimesList; let allowedSpecifications = (await $specificationsList).specifications; + + isDeprecated = runtimes.runtimes.find((r) => r.$id === runtime)?.deprecated ?? false; + if(!isDeprecated) { + runtimes.runtimes = runtimes.runtimes.filter(runtime => !runtime.deprecated); + } + options = runtimes.runtimes.map((runtime) => ({ label: `${runtime.name} - ${runtime.version}`, value: runtime.$id @@ -102,6 +111,14 @@ {options} required hideRequired /> + {#if isDeprecated} + + Your runtime is deprecated +

+ Please upgrade to newer versio of the runtime, because on April 1st 2024, builds for deprecated runtimes will be disabled. +

+
+ {/if} { - options = (await $runtimesList).runtimes.map((runtime) => ({ + options = (await $runtimesList).runtimes.filter(runtime => !runtime.deprecated).map((runtime) => ({ label: `${runtime.name} - ${runtime.version}`, value: runtime.$id }));