The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Resolved prettier in package.json
Ayushh Kharec9fa5a043821
diff --git a/apps/docs/pages/guides/functions/quickstart.mdx b/apps/docs/pages/guides/functions/quickstart.mdxindex 3c14d2a760b..26fcc5623c7 100644--- a/apps/docs/pages/guides/functions/quickstart.mdx+++ b/apps/docs/pages/guides/functions/quickstart.mdx@@ -1,12 +1,12 @@-import Layout from "~/layouts/DefaultGuideLayout";+import Layout from '~/layouts/DefaultGuideLayout'export const meta = {- id: "functions-quickstart",- title: "Edge Functions Quickstart",- description: "Globally distributed TypeScript Functions.",- sidebar_label: "Quickstart",- video: "https://www.youtube.com/v/rzglqRdZUQE",-};+ id: 'functions-quickstart',+ title: 'Edge Functions Quickstart',+ description: 'Globally distributed TypeScript Functions.',+ sidebar_label: 'Quickstart',+ video: 'https://www.youtube.com/v/rzglqRdZUQE',+}Learn how to build an Edge Function locally and deploy it to the Supabase Platform in less than 7 minutes.@@ -94,17 +94,14 @@ or using one of the [client libraries](/docs#reference-documentation), e.g. usin```js// https://supabase.com/docs/reference/javascript/installing-import { createClient } from "@supabase/supabase-js";+import { createClient } from '@supabase/supabase-js'// Create a single supabase client for interacting with your database-const supabase = createClient(- "https://xyzcompany.supabase.co",- "public-anon-key",-);--const { data, error } = await supabase.functions.invoke("hello-world", {- body: { name: "Functions" },-});+const supabase = createClient('https://xyzcompany.supabase.co', 'public-anon-key')++const { data, error } = await supabase.functions.invoke('hello-world', {+ body: { name: 'Functions' },+})```After invoking your Edge Function you should see the response `{ "message":"Hello Functions!" }`.@@ -114,26 +111,22 @@ After invoking your Edge Function you should see the response `{ "message":"HellWhen interacting with Edge Functions, it's important to be prepared for potential errors that might occur during the invocation. To handle errors effectively, the following error handling code can be used:```js-import {- FunctionsHttpError,- FunctionsRelayError,- FunctionsFetchError,-} from "@supabase/supabase-js";+import { FunctionsHttpError, FunctionsRelayError, FunctionsFetchError } from '@supabase/supabase-js'-const { data, error } = await supabase.functions.invoke("hello", {+const { data, error } = await supabase.functions.invoke('hello', {headers: {- "my-custom-header": "my-custom-header-value",+ 'my-custom-header': 'my-custom-header-value',},- body: { foo: "bar" },-});+ body: { foo: 'bar' },+})if (error instanceof FunctionsHttpError) {- const errorMessage = await error.context.json();- console.log("Function returned an error", errorMessage);+ const errorMessage = await error.context.json()+ console.log('Function returned an error', errorMessage)} else if (error instanceof FunctionsRelayError) {- console.log("Relay error:", error.message);+ console.log('Relay error:', error.message)} else if (error instanceof FunctionsFetchError) {- console.log("Fetch error:", error.message);+ console.log('Fetch error:', error.message)}```@@ -148,7 +141,7 @@ We recommend using [esm.sh](https://esm.sh/) for importing Node.js modules thatFor example, when you want to use supabase-js within Supabase Edge Functions, you would import `createClient` as follows:```ts-import { createClient } from "https://esm.sh/@supabase/supabase-js@2";+import { createClient } from 'https://esm.sh/@supabase/supabase-js@2'```As long as your environment is set up properly and the module you're importing is exporting types, the import will have types and autocompletion support.@@ -273,8 +266,6 @@ Edge Functions supports `GET`, `POST`, `PUT`, `PATCH`, `DELETE`, and `OPTIONS`.- Edge Functions- Serving of HTML content is not supported (`GET` requests that return `text/html` will be rewritten to `text/plain`).-export const Page = ({ children }) => (- <Layout meta={meta} children={children} />-);+export const Page = ({ children }) => <Layout meta={meta} children={children} />-export default Page;+export default Pagediff --git a/package-lock.json b/package-lock.jsonindex eb04f2ab31e..c128a6c1c44 100644--- a/package-lock.json+++ b/package-lock.json@@ -18,7 +18,7 @@"devDependencies": {"eslint": "^8.41.0","eslint-config-custom": "*",- "prettier": "2.8.8",+ "prettier": "^2.8.8","prettier-plugin-sql-cst": "^0.5.0","supabase": "^1.45.2","turbo": "^1.10.13"diff --git a/package.json b/package.jsonindex bd188f04809..3f8d338576e 100644--- a/package.json+++ b/package.json@@ -41,7 +41,7 @@"devDependencies": {"eslint": "^8.41.0","eslint-config-custom": "*",- "prettier": "2.8.8",+ "prettier": "^2.8.8","prettier-plugin-sql-cst": "^0.5.0","supabase": "^1.45.2","turbo": "^1.10.13"