The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
tiger d2 (#30842)
Francesco Sansalvadore1b46882326d3
diff --git a/apps/www/_blog/2024-12-01-orioledb-launch.mdx b/apps/www/_blog/2024-12-01-orioledb-launch.mdxindex 54d0b26f736..fde932ad13f 100644--- a/apps/www/_blog/2024-12-01-orioledb-launch.mdx+++ b/apps/www/_blog/2024-12-01-orioledb-launch.mdx@@ -10,6 +10,7 @@ tags:- supabase-engineeringdate: '2024-12-01'toc_depth: 3+launchweek: '13'---# OrioleDB Public Alphadiff --git a/apps/www/_blog/2024-12-02-supabase-ai-assistant-v2.mdx b/apps/www/_blog/2024-12-02-supabase-ai-assistant-v2.mdxindex 52258b76c35..ad3c5c6a597 100644--- a/apps/www/_blog/2024-12-02-supabase-ai-assistant-v2.mdx+++ b/apps/www/_blog/2024-12-02-supabase-ai-assistant-v2.mdx@@ -12,6 +12,7 @@ tags:- postgresdate: '2024-12-02'toc_depth: 3+launchweek: '13'---Today we are releasing Supabase Assistant v2 in the Dashboard - a global assistant with several new abilities:diff --git a/apps/www/_blog/2024-12-03-edge-functions-background-tasks-websockets.mdx b/apps/www/_blog/2024-12-03-edge-functions-background-tasks-websockets.mdxnew file mode 100644index 00000000000..744914b033e--- /dev/null+++ b/apps/www/_blog/2024-12-03-edge-functions-background-tasks-websockets.mdx@@ -0,0 +1,276 @@+---+title: 'Supabase Edge Functions: Introducing Background Tasks, Ephemeral Storage, and WebSockets'+description: Edge functions can be used for workloads outside the request-response lifecycle+author: laktek,nyannyacha+image: launch-week-13/day-2-functions-background-tasks/og.jpg+thumb: launch-week-13/day-2-functions-background-tasks/thumb.jpg+categories:+ - product+tags:+ - functions+ - launch-week+date: '2024-12-03'+toc_depth: 3+launchweek: '13'+---++We are excited to announce three long-awaited features: Background Tasks, Ephemeral File Storage, and WebSockets.++Starting today, you can use these features in any project. Let's explore what exciting things you can build with them.++<div className="video-container">+ <iframe+ className="w-full"+ src="https://www.youtube-nocookie.com/embed/envrsJ8VfAU"+ title="Introducing Background Tasks, Ephemeral Storage, and WebSockets"+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; fullscreen; gyroscope; picture-in-picture; web-share"+ allowfullscreen+ />+</div>++## Background Tasks++Sometimes you need a backend logic to do more than respond to a request. For example, you might want to process a batch of files and upload the results to Supabase Storage. Or read multiple entries from a database table and generate embeddings for each entry.++With the introduction of background tasks, executing these long-running workloads with Edge Functions is super easy.++We've introduced a new method called `EdgeRuntime.waitUntil` , which accepts a promise. This ensures that the function isn't terminated until the promise is resolved.++Free projects can run background tasks for a maximum of 150 seconds (2m 30s). If you are on a paid plan, this limit increases to 400 seconds (6m 40s). We plan to introduce more flexible limits in the coming months.++You can subscribe to notifications when the function is about to be shut down by listening to `beforeunload` event. Read the guide for more details on [how to use background tasks](/docs/guides/functions/background-tasks).++## Ephemeral Storage++Edge Function invocations now have access to ephemeral storage. This is useful for background tasks, as it allows you to read and write files in the `/tmp` directory to store intermediate results.++Check the guide on how to access [ephemeral storage](/docs/guides/functions/ephemeral-storage).++### Example: Extracting a zip file and uploading its content to Supabase Storage++Let's look at a real-world example using Background Tasks and Ephemeral Storage.++Imagine you're building a Photo Album app. You want your users to upload photos as a zip file. You would extract them in an Edge Function and upload them to storage.++One of the most straightforward ways to implement is using streams:++```jsx+import { ZipReaderStream } from 'https://deno.land/x/zipjs/index.js'+import { createClient } from 'jsr:@supabase/supabase-js@2'++const supabase = createClient(+ Deno.env.get('SUPABASE_URL'),+ Deno.env.get('SUPABASE_SERVICE_ROLE_KEY')+)++Deno.serve(async (req) => {+ const uploadId = crypto.randomUUID()++ const { error } = await supabase.storage.createBucket(uploadId, {+ public: false,+ })++ for await (const entry of await req.body.pipeThrough(new ZipReaderStream())) {+ // write file to Supabase Storage+ const { error } = await supabase.storage+ .from(uploadId)+ .upload(entry.filename, entry.readable, {})++ console.log('uploaded', entry.filename)+ }++ return new Response(+ JSON.stringify({+ uploadId,+ }),+ {+ headers: {+ 'content-type': 'application/json',+ },+ }+ )+})+```++If you test out the streaming version, it will run into memory limit errors when you try to upload zip files over 100MB. This is because the streaming version has to keep every file in a zip archive in memory.++We can modify it instead to write the zip file to a temporary file. Then, use a background task to extract and upload it to Supabase Storage. This way, we only read parts of the zip file to the memory.++```jsx+import { BlobWriter, ZipReader, ZipReaderStream } from 'https://deno.land/x/zipjs/index.js'++import { createClient } from 'jsr:@supabase/supabase-js@2'++const supabase = createClient(+ Deno.env.get('SUPABASE_URL'),+ Deno.env.get('SUPABASE_SERVICE_ROLE_KEY')+)++let numFilesUploaded = 0++async function processZipFile(uploadId, filepath) {+ const file = await Deno.open(filepath, { read: true })+ const zipReader = new ZipReader(file.readable)+ const entries = await zipReader.getEntries()++ await supabase.storage.createBucket(uploadId, {+ public: false,+ })++ await Promise.all(+ entries.map(async (entry) => {+ // read file entry+ const blobWriter = new BlobWriter()+ const blob = await entry.getData(blobWriter)++ if (entry.directory) {+ return+ }++ // write file to Supabase Storage+ await supabase.storage.from(uploadId).upload(entry.filename, blob, {})++ numFilesUploaded += 1+ console.log('uploaded', entry.filename)+ })+ )++ await zipReader.close()+}++// you can add a `beforeunload` event listener to be notified+// when Function Worker is about to terminate.+// use this to do any logging, save states.+globalThis.addEventListener('beforeunload', (ev) => {+ console.log('function about to terminate: ', ev.detail.reason)+ console.log('number of files uploaded: ', numFilesUploaded)+})++async function writeZipFile(filepath, stream) {+ await Deno.writeFile(filepath, stream)+}++Deno.serve(async (req) => {+ const uploadId = crypto.randomUUID()+ await writeZipFile('/tmp/' + uploadId, req.body)++ // process zip file in a background task+ // calling EdgeRuntime.waitUntil() would ensure+ // function worker wouldn't exit until the promise is completed.+ EdgeRuntime.waitUntil(processZipFile(uploadId, '/tmp/' + uploadId))++ return new Response(+ JSON.stringify({+ uploadId,+ }),+ {+ headers: {+ 'content-type': 'application/json',+ },+ }+ )+})+```++## WebSockets++Edge Functions now support establishing both inbound (server) and outbound (client) WebSocket connections. This enables a variety of new use cases.++### Example: Building an authenticated relay to OpenAI Realtime API++OpenAI recently introduced a [Realtime API](https://openai.com/index/introducing-the-realtime-api/), which uses WebSockets. This is tricky to implement purely client-side because you'd need to expose your OpenAI key publicly. OpenAI [recommends](https://platform.openai.com/docs/guides/realtime/overview?text-generation-quickstart-example=audio) building a server to authenticate requests.++With our new support for WebSockets, you can easily do this in Edge Functions without standing up any infrastructure. Additionally, you can use [Supabase Auth](https://supabase.com/docs/guides/auth) to authenticate users and protect your OpenAI usage from being abused.++```jsx+import { createClient } from 'jsr:@supabase/supabase-js@2'++const supabase = createClient(+ Deno.env.get('SUPABASE_URL'),+ Deno.env.get('SUPABASE_SERVICE_ROLE_KEY')+)+const OPENAI_API_KEY = Deno.env.get('OPENAI_API_KEY')++Deno.serve(async (req) => {+ const upgrade = req.headers.get('upgrade') || ''++ if (upgrade.toLowerCase() != 'websocket') {+ return new Response("request isn't trying to upgrade to websocket.")+ }++ // WebSocket browser clients does not support sending custom headers.+ // We have to use the URL query params to provide user's JWT.+ // Please be aware query params may be logged in some logging systems.+ const url = new URL(req.url)+ const jwt = url.searchParams.get('jwt')+ if (!jwt) {+ console.error('Auth token not provided')+ return new Response('Auth token not provided', { status: 403 })+ }+ const { error, data } = await supabase.auth.getUser(jwt)+ if (error) {+ console.error(error)+ return new Response('Invalid token provided', { status: 403 })+ }+ if (!data.user) {+ console.error('user is not authenticated')+ return new Response('User is not authenticated', { status: 403 })+ }++ const { socket, response } = Deno.upgradeWebSocket(req)++ socket.onopen = () => {+ // initiate an outbound WebSocket connection to OpenAI+ const url = 'wss://api.openai.com/v1/realtime?model=gpt-4o-realtime-preview-2024-10-01'++ // openai-insecure-api-key isn't a problem since this code runs in an Edge Function+ const openaiWS = new WebSocket(url, [+ 'realtime',+ `openai-insecure-api-key.${OPENAI_API_KEY}`,+ 'openai-beta.realtime-v1',+ ])++ openaiWS.onopen = () => {+ console.log('Connected to OpenAI server.')++ socket.onmessage = (e) => {+ console.log('socket message:', e.data)+ // only send the message if openAI ws is open+ if (openaiWS.readyState === 1) {+ openaiWS.send(e.data)+ } else {+ socket.send(+ JSON.stringify({+ type: 'error',+ msg: 'openAI connection not ready',+ })+ )+ }+ }+ }++ openaiWS.onmessage = (e) => {+ console.log(e.data)+ socket.send(e.data)+ }++ openaiWS.onerror = (e) => console.log('OpenAI error: ', e.message)+ openaiWS.onclose = (e) => console.log('OpenAI session closed')+ }++ socket.onerror = (e) => console.log('socket errored:', e.message)+ socket.onclose = () => console.log('socket closed')++ return response // 101 (Switching Protocols)+})+```++## Performance and stability++In the past few months, we have made many [performance, stability,](https://supabase.com/blog/edge-functions-faster-smaller) and [DX improvements](https://github.com/orgs/supabase/discussions/30307) to Edge Functions. While these improvements often aren't visible to the end-users, they are the foundation of the new features we are announcing today.++## What's next?++We have a very exciting roadmap planned for 2025. One of the main priorities is to provide customizable compute limits (memory, CPU, and execution duration). We will soon announce an update on it.++Stay tuned for the upcoming launches this week. You will see how all these upcoming pieces fit like Lego bricks to make your developer life easy.diff --git a/apps/www/components/Hero/Hero.tsx b/apps/www/components/Hero/Hero.tsxindex f89ca9a8ce6..153193a926e 100644--- a/apps/www/components/Hero/Hero.tsx+++ b/apps/www/components/Hero/Hero.tsx@@ -25,9 +25,9 @@ const Hero = () => {<div className="flex flex-col items-center"><div className="z-40 w-full flex justify-center -mt-4 lg:-mt-12 mb-8"><AnnouncementBadge- url="/launch-week#day-1"- badge="Launch Week 13"- announcement="Day 1: AI Assistant v2"+ url="/launch-week#day-2"+ badge="LW13: Day 2"+ announcement="Background Tasks and WebSockets"/></div><h1 className="text-foreground text-4xl sm:text-5xl sm:leading-none lg:text-7xl">diff --git a/apps/www/components/LaunchWeek/12/LWSummary.tsx b/apps/www/components/LaunchWeek/12/LWSummary.tsxindex 8176c4c499b..eeba78750a5 100644--- a/apps/www/components/LaunchWeek/12/LWSummary.tsx+++ b/apps/www/components/LaunchWeek/12/LWSummary.tsx@@ -9,7 +9,7 @@ const LW11Summary = () => {<div className="w-full border bg-alternative-200 flex flex-col rounded-lg text-foreground-lighter mt-12"><div className="w-full p-4 flex justify-between items-center"><Link- href="/launch-week"+ href="/launch-week/12"className="flex items-center text-foreground font-medium gap-1.5 leading-none uppercase text-xs opacity-80 transition-opacity hover:opacity-100">Launch Weekdiff --git a/apps/www/components/LaunchWeek/13/Releases/LWStickyNav.tsx b/apps/www/components/LaunchWeek/13/Releases/LWStickyNav.tsxindex ec5876f4888..4b28feda299 100644--- a/apps/www/components/LaunchWeek/13/Releases/LWStickyNav.tsx+++ b/apps/www/components/LaunchWeek/13/Releases/LWStickyNav.tsx@@ -79,7 +79,7 @@ const LWXStickyNav: FC = () => {<li><Linkhref="#build-stage"- className="p-1 transition-colors hover:text-foreground pointer-events-auto"+ className="p-1 transition-colors hover:text-foreground pointer-events-auto lw-sticky-nav">Build <span className="hidden sm:inline">Stage</span></Link>diff --git a/apps/www/components/LaunchWeek/13/Releases/LWSummary.tsx b/apps/www/components/LaunchWeek/13/Releases/LWSummary.tsxnew file mode 100644index 00000000000..ca88af8a780--- /dev/null+++ b/apps/www/components/LaunchWeek/13/Releases/LWSummary.tsx@@ -0,0 +1,77 @@+import React from 'react'+import Link from 'next/link'+import { buildDays, mainDays } from './data'++const LW13Summary = () => {+ const days = mainDays()++ return (+ <div className="w-full border bg-alternative-200 flex flex-col rounded-lg text-foreground-lighter mt-12">+ <div className="w-full p-4 flex justify-between items-center">+ <Link+ href="/launch-week"+ className="flex items-center text-foreground font-medium gap-1.5 leading-none uppercase text-xs opacity-80 transition-opacity hover:opacity-100"+ >+ Launch Week+ <span className="font-mono">13</span>+ </Link>+ <div className="font-mono uppercase tracking-wide text-xs">2-6 December 24</div>+ </div>+ <div className="pb-4 border-t p-4">+ <ul className="flex flex-col gap-2">+ {days.map(+ (day, i: number) =>+ day.shipped && (+ <ol key={day.id}>+ <Link href={day.blog} className="group flex py-1 gap-2 hover:text-foreground">+ <span className="shrink-0 text-sm font-mono uppercase leading-6">+ Day {i + 1} -+ </span>+ <span className="leading-6">{day.title}</span>+ </Link>+ </ol>+ )+ )}+ </ul>+ </div>+ <div className="w-[calc(100%+2px)] bg-surface-100 flex flex-col gap-2 -m-px border rounded-lg">+ <div className="p-4">+ <div className="font-mono uppercase text-xs text-foreground tracking-wide">+ Build Stage+ </div>+ <ul className="flex flex-col gap-2 mt-4">+ {buildDays.map(+ (day, i: number) =>+ day.is_shipped && (+ <ol key={day.id}>+ <Link+ href={day.links[0].url}+ className="relative flex items-center justify-between group w-full py-1 hover:text-foreground"+ >+ <span className="relative">+ <span className="font-mono uppercase mr-2">+ {i + 1 < 10 ? '0' : ''}+ {i + 1} -+ </span>+ {day.title}+ </span>+ </Link>+ </ol>+ )+ )}+ <ol className="border-t pt-4 mt-2">+ <Link+ href="/events?category=meetup"+ className="relative flex items-center justify-between group w-full py-1 hover:text-foreground"+ >+ Community Meetups+ </Link>+ </ol>+ </ul>+ </div>+ </div>+ </div>+ )+}++export default LW13Summarydiff --git a/apps/www/components/LaunchWeek/13/Releases/data/lw13_build_stage.tsx b/apps/www/components/LaunchWeek/13/Releases/data/lw13_build_stage.tsxindex 55b9b26b3a5..03893f1521f 100644--- a/apps/www/components/LaunchWeek/13/Releases/data/lw13_build_stage.tsx+++ b/apps/www/components/LaunchWeek/13/Releases/data/lw13_build_stage.tsx@@ -25,11 +25,15 @@ export interface AdventLink {export const days: AdventDay[] = [{title: 'OrioleDB Public Alpha',- description: 'Postgres storage extension with better performance over default Heap storage',+ description: 'Launching OrioleDB Public Alpha',id: 'orioledb',is_shipped: true,links: [- { url: 'https://supabase.com/blog/orioledb-launch', label: 'Blog post', target: '_blank' },+ {+ url: '/blog/orioledb-launch',+ label: 'Blog post',+ target: '_blank',+ },],icon: (<svgdiff --git a/apps/www/components/LaunchWeek/13/Releases/data/lw13_data.tsx b/apps/www/components/LaunchWeek/13/Releases/data/lw13_data.tsxindex 8d3fe38cb99..95737fe24a9 100644--- a/apps/www/components/LaunchWeek/13/Releases/data/lw13_data.tsx+++ b/apps/www/components/LaunchWeek/13/Releases/data/lw13_data.tsx@@ -62,7 +62,7 @@ const days: (isDark?: boolean) => WeekDayProps[] = (isDark = true) => [d: 1,dd: 'Mon',shipped: true,- isToday: true,+ isToday: false,blog: '/blog/supabase-ai-assistant-v2',hasCountdown: false,date: '2 December',@@ -76,7 +76,7 @@ const days: (isDark?: boolean) => WeekDayProps[] = (isDark = true) => [},{type: 'xSpace',- href: 'https://twitter.com/i/spaces/1OyKAZyeQyWGb ',+ href: 'https://twitter.com/i/spaces/1OyKAZyeQyWGb',},],steps: [@@ -99,25 +99,43 @@ const days: (isDark?: boolean) => WeekDayProps[] = (isDark = true) => [id: 'day-2',d: 2,dd: 'Tue',- shipped: false,- isToday: false,- hasCountdown: true,- blog: '',+ shipped: true,+ isToday: true,+ hasCountdown: false,+ blog: '/blog/edge-functions-background-tasks-websockets',date: '3 December',published_at: '2024-12-03T08:00:00.000-07:00',- title: '',- description: null,+ title: 'Supabase Functions: Background Tasks and WebSockets',+ description: (+ <>+ Supabase Functions: <br className="hidden sm:block" /> Background Tasks and WebSockets+ </>+ ),links: [- // {- // type: 'video',- // href: '',- // },+ {+ type: 'video',+ href: 'envrsJ8VfAU',+ },{type: 'xSpace',href: 'https://twitter.com/i/spaces/1yoJMyjzVWRJQ',},],- steps: [],+ steps: [+ {+ title: '',+ bg_layers: [+ {+ img: '/images/launchweek/13/releases/d2/d2-functions-background-tasks-dark.png',+ mobileImg:+ '/images/launchweek/13/releases/d2/d2-functions-background-tasks-mobile-dark.png',+ imgLight: '/images/launchweek/13/releases/d2/d2-functions-background-tasks-light.png',+ mobileImgLight:+ '/images/launchweek/13/releases/d2/d2-functions-background-tasks-mobile-light.png',+ },+ ],+ },+ ],},{id: 'day-3',@@ -125,7 +143,7 @@ const days: (isDark?: boolean) => WeekDayProps[] = (isDark = true) => [dd: 'Wed',shipped: false,isToday: false,- hasCountdown: false,+ hasCountdown: true,blog: '',date: '4 December',published_at: '2024-12-04T08:00:00.000-07:00',diff --git a/apps/www/components/LaunchWeek/13/ThreeTicketCanvas.tsx b/apps/www/components/LaunchWeek/13/ThreeTicketCanvas.tsxindex c662e10e4a5..033e3853062 100644--- a/apps/www/components/LaunchWeek/13/ThreeTicketCanvas.tsx+++ b/apps/www/components/LaunchWeek/13/ThreeTicketCanvas.tsx@@ -150,8 +150,8 @@ const ThreeTicketCanvas: React.FC<{bumpMap: IS_SECRET ? goldTexture : IS_PLATINUM ? metalTexture : undefined,metalnessMap: IS_SECRET ? goldTexture : metalTexture,// roughnessMap: IS_SECRET ? goldTexture : metalTexture,- metalness: IS_SECRET ? 0.8 : IS_PLATINUM ? 0.8 : isDarkTheme ? 0.2 : 0.9,- roughness: IS_SECRET ? 0.12 : IS_PLATINUM ? 0.12 : isDarkTheme ? 0.2 : 0.5,+ metalness: IS_SECRET ? 0.8 : IS_PLATINUM ? 1.0 : isDarkTheme ? 0.2 : 0.9,+ roughness: IS_SECRET ? 0.12 : IS_PLATINUM ? 0.22 : isDarkTheme ? 0.2 : 0.5,bumpScale: IS_SECRET ? 0.02 : IS_PLATINUM ? 0.0045 : undefined,})@@ -293,7 +293,7 @@ const ThreeTicketCanvas: React.FC<{scene.add(ambientLight)const spotLight = new THREE.SpotLight(0xffffff, isDarkTheme ? 0.8 : 0.2)- spotLight.position.z = ticketGroup.position.z + 4+ spotLight.position.z = ticketGroup.position.z + 8spotLight.position.x = ticketGroup.position.x + 10spotLight.angle = (Math.PI / 2) * 0.5spotLight.castShadow = truediff --git a/apps/www/components/LaunchWeek/13/Ticket/TicketCopy.tsx b/apps/www/components/LaunchWeek/13/Ticket/TicketCopy.tsxindex 03f28ee8a23..2534e349879 100644--- a/apps/www/components/LaunchWeek/13/Ticket/TicketCopy.tsx+++ b/apps/www/components/LaunchWeek/13/Ticket/TicketCopy.tsx@@ -29,7 +29,7 @@ export default function TicketCopy() {}, 2000)})}}- className="font-mono w-full flex-grow px-2 lg:px-3.5 !pr-1 py-1 rounded-md bg-alternative-200 border flex gap-2 relative text-foreground-light hover:text-foreground text-xs pointer-events-auto justify-between items-center hover:border-stronger transition-all"+ className="font-mono w-full flex-grow px-2 lg:px-3.5 !pr-1 py-1 rounded-md bg-alternative-200 border flex gap-2 relative text-foreground-light hover:text-foreground text-xs pointer-events-auto justify-between items-center hover:border-stronger transition-all max-w-[80vw]"><span className="truncate">{displayUrl}</span><div className="w-6 min-w-6 h-6 flex items-center justify-center flex-shrink-0 border border-strong rounded bg-muted hover:bg-selection hover:border-stronger">diff --git a/apps/www/components/LaunchWeek/13/Ticket/TicketingFlow.tsx b/apps/www/components/LaunchWeek/13/Ticket/TicketingFlow.tsxindex a998ab6bfd9..bd5e6324dd5 100644--- a/apps/www/components/LaunchWeek/13/Ticket/TicketingFlow.tsx+++ b/apps/www/components/LaunchWeek/13/Ticket/TicketingFlow.tsx@@ -109,7 +109,7 @@ const TicketingFlow = () => {initial={initial}animate={animate}exit={exit}- className="w-full max-w-5xl mx-auto lg:min-h-[400px] lg:pl-12 h-full flex flex-col lg:flex-row items-center lg:justify-start gap-8 md:gap-10 lg:gap-32 text-foreground text-center md:text-left"+ className="w-full max-w-5xl mx-auto lg:min-h-[400px] xl:pl-8 h-full flex flex-col lg:flex-row items-center lg:justify-start gap-8 md:gap-10 lg:gap-32 text-foreground text-center md:text-left"><div className="order-first lg:h-full w-full max-w-md xl:max-w-2xl gap-8 flex flex-col items-center justify-center lg:items-start lg:justify-center text-center lg:text-left"><div className="flex flex-col gap-1 max-w-md">diff --git a/apps/www/pages/blog/[slug].tsx b/apps/www/pages/blog/[slug].tsxindex 3a1bee9f20c..3486322112c 100644--- a/apps/www/pages/blog/[slug].tsx+++ b/apps/www/pages/blog/[slug].tsx@@ -19,6 +19,7 @@ import ShareArticleActions from '~/components/Blog/ShareArticleActions'import CTABanner from '~/components/CTABanner'import LW11Summary from '~/components/LaunchWeek/11/LW11Summary'import LW12Summary from '~/components/LaunchWeek/12/LWSummary'+import LW13Summary from '~/components/LaunchWeek/13/Releases/LWSummary'import BlogLinks from '~/components/LaunchWeek/7/BlogLinks'import LWXSummary from '~/components/LaunchWeek/X/LWXSummary'import DefaultLayout from '~/components/Layouts/Default'@@ -129,6 +130,7 @@ function BlogPostPage(props: InferGetStaticPropsType<typeof getStaticProps>) {const isLaunchWeekX = props.blog.launchweek?.toString().toLocaleLowerCase() === 'x'const isGAWeek = props.blog.launchweek?.toString().toLocaleLowerCase() === '11'const isLaunchWeek12 = props.blog.launchweek?.toString().toLocaleLowerCase() === '12'+ const isLaunchWeek13 = props.blog.launchweek?.toString().toLocaleLowerCase() === '13'const author = authorArray.map((authorId) => {@@ -341,6 +343,7 @@ function BlogPostPage(props: InferGetStaticPropsType<typeof getStaticProps>) {{isLaunchWeekX && <LWXSummary />}{isGAWeek && <LW11Summary />}{isLaunchWeek12 && <LW12Summary />}+ {isLaunchWeek13 && <LW13Summary />}<div className="block lg:hidden py-8"><div className="text-foreground-lighter text-sm">Share this article</div><ShareArticleActions title={props.blog.title} slug={props.blog.slug} />diff --git a/apps/www/public/images/blog/launch-week-13/day-1-ai-assistant-v2/og.jpg b/apps/www/public/images/blog/launch-week-13/day-1-ai-assistant-v2/og.jpgindex f5f1241e030..0e005117a94 100644Binary files a/apps/www/public/images/blog/launch-week-13/day-1-ai-assistant-v2/og.jpg and b/apps/www/public/images/blog/launch-week-13/day-1-ai-assistant-v2/og.jpg differdiff --git a/apps/www/public/images/blog/launch-week-13/day-2-functions-background-tasks/og.jpg b/apps/www/public/images/blog/launch-week-13/day-2-functions-background-tasks/og.jpgnew file mode 100644index 00000000000..91f43c3c661Binary files /dev/null and b/apps/www/public/images/blog/launch-week-13/day-2-functions-background-tasks/og.jpg differdiff --git a/apps/www/public/images/blog/launch-week-13/day-2-functions-background-tasks/thumb.jpg b/apps/www/public/images/blog/launch-week-13/day-2-functions-background-tasks/thumb.jpgnew file mode 100644index 00000000000..d52e6b28c5bBinary files /dev/null and b/apps/www/public/images/blog/launch-week-13/day-2-functions-background-tasks/thumb.jpg differdiff --git a/apps/www/public/images/launchweek/13/releases/d2/d2-functions-background-tasks-dark.png b/apps/www/public/images/launchweek/13/releases/d2/d2-functions-background-tasks-dark.pngnew file mode 100644index 00000000000..edd64194e69Binary files /dev/null and b/apps/www/public/images/launchweek/13/releases/d2/d2-functions-background-tasks-dark.png differdiff --git a/apps/www/public/images/launchweek/13/releases/d2/d2-functions-background-tasks-light.png b/apps/www/public/images/launchweek/13/releases/d2/d2-functions-background-tasks-light.pngnew file mode 100644index 00000000000..a90f24cf9a0Binary files /dev/null and b/apps/www/public/images/launchweek/13/releases/d2/d2-functions-background-tasks-light.png differdiff --git a/apps/www/public/images/launchweek/13/releases/d2/d2-functions-background-tasks-mobile-dark.png b/apps/www/public/images/launchweek/13/releases/d2/d2-functions-background-tasks-mobile-dark.pngnew file mode 100644index 00000000000..6b7dc951ce5Binary files /dev/null and b/apps/www/public/images/launchweek/13/releases/d2/d2-functions-background-tasks-mobile-dark.png differdiff --git a/apps/www/public/images/launchweek/13/releases/d2/d2-functions-background-tasks-mobile-light.png b/apps/www/public/images/launchweek/13/releases/d2/d2-functions-background-tasks-mobile-light.pngnew file mode 100644index 00000000000..81d29492b93Binary files /dev/null and b/apps/www/public/images/launchweek/13/releases/d2/d2-functions-background-tasks-mobile-light.png differdiff --git a/apps/www/public/rss.xml b/apps/www/public/rss.xmlindex 5cba5c3e8da..6fe67574f70 100644--- a/apps/www/public/rss.xml+++ b/apps/www/public/rss.xml@@ -5,19 +5,19 @@<link>https://supabase.com</link><description>Latest news from Supabase</description><language>en</language>- <lastBuildDate>Mon, 02 Dec 2024 00:00:00 -0700</lastBuildDate>+ <lastBuildDate>Tue, 03 Dec 2024 00:00:00 -0700</lastBuildDate><atom:link href="https://supabase.com/rss.xml" rel="self" type="application/rss+xml"/><item>- <guid>https://supabase.com/blog/supabase-ai-assistant-v2</guid>- <title>Supabase AI Assistant v2</title>- <link>https://supabase.com/blog/supabase-ai-assistant-v2</link>- <description>An evolution of how we approach AI within the Supabase dashboard</description>- <pubDate>Mon, 02 Dec 2024 00:00:00 -0700</pubDate>+ <guid>https://supabase.com/blog/edge-functions-background-tasks-websockets</guid>+ <title>Supabase Edge Functions: Introducing Background Tasks, Ephemeral Storage, and WebSockets</title>+ <link>https://supabase.com/blog/edge-functions-background-tasks-websockets</link>+ <description>Edge functions can be used for workloads outside the request-response lifecycle</description>+ <pubDate>Tue, 03 Dec 2024 00:00:00 -0700</pubDate></item><item>- <guid>https://supabase.com/blog/supabase-assistant</guid>+ <guid>https://supabase.com/blog/supabase-ai-assistant-v2</guid><title>Supabase AI Assistant v2</title>- <link>https://supabase.com/blog/supabase-assistant</link>+ <link>https://supabase.com/blog/supabase-ai-assistant-v2</link><description>An evolution of how we approach AI within the Supabase dashboard</description><pubDate>Mon, 02 Dec 2024 00:00:00 -0700</pubDate></item>diff --git a/packages/ui-patterns/PromoToast/PromoToast.tsx b/packages/ui-patterns/PromoToast/PromoToast.tsxindex 5feff90156b..e436e2f8cad 100644--- a/packages/ui-patterns/PromoToast/PromoToast.tsx+++ b/packages/ui-patterns/PromoToast/PromoToast.tsx@@ -44,10 +44,10 @@ const PromoToast = () => {)}><div className="relative z-10 text-foreground-lighter leading-3 flex flex-col font-mono uppercase tracking-wide w-full text-xs">- Launch Week 13: Day 1+ {announcement.text}</div>- <div className="relative z-10 text-foreground uppercase flex flex-col text-xl w-full font-mono -mt-1">- AI Assistant v2+ <div className="relative z-10 text-foreground flex flex-col text-xl w-full -mt-1">+ Supabase Functions — Background Tasks and WebSockets</div><div className="relative z-10 flex items-center space-x-2 mt-2">diff --git a/packages/ui/src/layout/banners/LW13CountdownBanner/LW13CountdownBanner.tsx b/packages/ui/src/layout/banners/LW13CountdownBanner/LW13CountdownBanner.tsxindex 43c88b4da29..3e64a4289d7 100644--- a/packages/ui/src/layout/banners/LW13CountdownBanner/LW13CountdownBanner.tsx+++ b/packages/ui/src/layout/banners/LW13CountdownBanner/LW13CountdownBanner.tsx@@ -36,7 +36,9 @@ export function LW13CountdownBanner() {)}><p className="flex gap-1.5 items-center">{announcement.text}</p>- <div className="hidden sm:block text-foreground-lighter">AI Assistant v2</div>+ <div className="hidden sm:block text-foreground-lighter">+ Supabase Functions: Background Tasks and WebSockets+ </div><Button size="tiny" type="default" className="px-2 !leading-none text-xs" asChild><Link href={announcement.link}>{announcement.cta}</Link></Button>diff --git a/packages/ui/src/layout/banners/data/Announcement.json b/packages/ui/src/layout/banners/data/Announcement.jsonindex 7fb1abfe695..3c2bad9522c 100644--- a/packages/ui/src/layout/banners/data/Announcement.json+++ b/packages/ui/src/layout/banners/data/Announcement.json@@ -1,7 +1,7 @@{"show": true,- "text": "Launch Week 13: Day 1",+ "text": "Launch Week 13: Day 2","launchDate": "2024-12-02T07:00:00.000-08:00",- "link": "/launch-week#day-1",+ "link": "/launch-week#day-2","cta": "Learn more"}