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
2 changes: 1 addition & 1 deletion apps/docs/content/guides/auth/custom-oauth-providers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ There are two provider types:

<Admonition type="note">

You can add up to 3 custom providers per project. If you need more, [contact support](/dashboard/support/new).
Free plan projects can add up to 3 custom providers. Pro plan and above have unlimited custom providers.

</Admonition>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,13 @@ hideToc: true
}, []);

async function getInstruments() {
const { data } = await supabase.from("instruments").select();
const { data, error } = await supabase.from("instruments").select();

if (error) {
console.error(error);
return;
}

setInstruments(data);
}

Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/guides/local-development.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ As a prerequisite, you must install a container runtime compatible with Docker A

<Admonition type="caution">

If your local development machine is connected to an untrusted public network, you should create a separate docker network and bind to 127.0.0.1 before starting the local development stack. This restricts network access to only your localhost machine.
If your local development machine is connected to an untrusted public network, you should create a separate Docker network and bind to 127.0.0.1 before starting the local development stack. This restricts network access to only your localhost machine.

```sh
docker network create -o 'com.docker.network.bridge.host_binding_ipv4=127.0.0.1' local-network
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ These events are surfaced through logs and observability tools, allowing you to

### CPUTime

**What it means:** The worker consumed more CPU time than allowed. CPU time measures actual processing cycles used by your code, excluding time spent waiting for I/O or sleeping. Currently limited to 200 milliseconds.
**What it means:** The worker consumed more CPU time than allowed. CPU time measures actual processing cycles used by your code, excluding time spent waiting for I/O or sleeping. Currently limited to 2000 milliseconds.

**When it happens:** Your function is performing too much computation. This includes complex calculations, data processing, encryption, or other CPU-intensive operations.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,121 +26,111 @@ import { DOCS_URL } from '@/lib/constants'

interface AdvancedConfigurationProps {
form: UseFormReturn<CreateProjectForm>
layout?: 'vertical' | 'horizontal'
collapsible?: boolean
}

export const AdvancedConfiguration = ({
form,
layout = 'horizontal',
collapsible = true,
}: AdvancedConfigurationProps) => {
export const AdvancedConfiguration = ({ form }: AdvancedConfigurationProps) => {
const disableOrioleProjectCreation = useFlag('disableOrioleProjectCreation')

const content = (
<>
<FormField
name="useOrioleDb"
control={form.control}
render={({ field }) => (
<>
<FormItemLayout
layout={layout}
label="Postgres Type"
className="[&>div>label]:break-normal!"
>
<FormControl>
<RadioGroupStacked
// Due to radio group not supporting boolean values
// value is converted to boolean
onValueChange={(value) => field.onChange(value === 'true')}
defaultValue={field.value.toString()}
return (
<Panel.Content>
<Collapsible_Shadcn_>
<CollapsibleTrigger_Shadcn_ className="group/advanced-trigger font-mono uppercase tracking-widest text-xs flex items-center gap-1 text-foreground-lighter/75 hover:text-foreground-light transition data-open:text-foreground-light">
Advanced Configuration
<ChevronRight
size={16}
strokeWidth={1}
className="mr-2 group-data-open/advanced-trigger:rotate-90 group-hover/advanced-trigger:text-foreground-light transition"
/>
</CollapsibleTrigger_Shadcn_>
<CollapsibleContent_Shadcn_
className={cn(
'pt-2 data-closed:animate-collapsible-up data-open:animate-collapsible-down'
)}
>
<p className="text-xs text-foreground-lighter mb-6">
These settings cannot be changed after the project is created
</p>
<FormField
name="useOrioleDb"
control={form.control}
render={({ field }) => (
<>
<FormItemLayout
layout="horizontal"
label="Postgres Type"
className="[&>div>label]:break-normal!"
>
<FormItem asChild>
<FormControl>
<RadioGroupStackedItem
value="false"
// @ts-ignore
label={
<>
Postgres
<Badge>Default</Badge>
</>
}
description="Recommended for production workloads"
className="[&>div>div>p]:text-left [&>div>div>p]:text-xs [&>div>div>label]:flex [&>div>div>label]:items-center [&>div>div>label]:gap-x-2"
/>
</FormControl>
</FormItem>
<FormItem asChild>
<FormControl>
<Tooltip>
<TooltipTrigger asChild>
<FormControl>
<RadioGroupStacked
// Due to radio group not supporting boolean values
// value is converted to boolean
onValueChange={(value) => field.onChange(value === 'true')}
defaultValue={field.value.toString()}
>
<FormItem asChild>
<FormControl>
<RadioGroupStackedItem
value="true"
value="false"
// @ts-ignore
label={
<>
Postgres with OrioleDB
<Badge variant="warning">Alpha</Badge>
Postgres
<Badge>Default</Badge>
</>
}
description="Not recommended for production workloads"
className={cn(
'[&>div>div>p]:text-left [&>div>div>p]:text-xs [&>div>div>label]:flex [&>div>div>label]:items-center [&>div>div>label]:gap-x-2',
form.getValues('useOrioleDb') ? 'rounded-b-none!' : ''
)}
disabled={disableOrioleProjectCreation}
description="Recommended for production workloads"
className="[&>div>div>p]:text-left [&>div>div>p]:text-xs [&>div>div>label]:flex [&>div>div>label]:items-center [&>div>div>label]:gap-x-2"
/>
</TooltipTrigger>
{disableOrioleProjectCreation && (
<TooltipContent side="right" className="w-60 text-center">
OrioleDB is temporarily disabled for new projects. Please try again
later.
</TooltipContent>
)}
</Tooltip>
</FormControl>
</FormItem>
</RadioGroupStacked>
</FormControl>
{form.getValues('useOrioleDb') && (
<Admonition
type="warning"
className="rounded-t-none [&>div]:text-xs"
title="OrioleDB is not production ready"
description="Postgres with OrioleDB extension is currently in Public Alpha and not recommended for production usage yet."
>
<DocsButton className="mt-2" href={`${DOCS_URL}/guides/database/orioledb`} />
</Admonition>
)}
</FormItemLayout>
</>
)}
/>
<p className="text-xs text-foreground-lighter mt-3">
These settings cannot be changed after the project is created
</p>
</>
)

const collapsibleContent = (
<Collapsible_Shadcn_>
<CollapsibleTrigger_Shadcn_ className="group/advanced-trigger font-mono uppercase tracking-widest text-xs flex items-center gap-1 text-foreground-lighter/75 hover:text-foreground-light transition data-open:text-foreground-light">
Advanced Configuration
<ChevronRight
size={16}
strokeWidth={1}
className="mr-2 group-data-open/advanced-trigger:rotate-90 group-hover/advanced-trigger:text-foreground-light transition"
/>
</CollapsibleTrigger_Shadcn_>
<CollapsibleContent_Shadcn_
className={cn('pt-5 data-closed:animate-collapsible-up data-open:animate-collapsible-down')}
>
{content}
</CollapsibleContent_Shadcn_>
</Collapsible_Shadcn_>
</FormControl>
</FormItem>
<FormItem asChild>
<FormControl>
<Tooltip>
<TooltipTrigger asChild>
<RadioGroupStackedItem
value="true"
// @ts-ignore
label={
<>
Postgres with OrioleDB
<Badge variant="warning">Alpha</Badge>
</>
}
description="Not recommended for production workloads"
className={cn(
'[&>div>div>p]:text-left [&>div>div>p]:text-xs [&>div>div>label]:flex [&>div>div>label]:items-center [&>div>div>label]:gap-x-2',
form.getValues('useOrioleDb') ? 'rounded-b-none!' : ''
)}
disabled={disableOrioleProjectCreation}
/>
</TooltipTrigger>
{disableOrioleProjectCreation && (
<TooltipContent side="right" className="w-60 text-center">
OrioleDB is temporarily disabled for new projects. Please try again
later.
</TooltipContent>
)}
</Tooltip>
</FormControl>
</FormItem>
</RadioGroupStacked>
</FormControl>
{form.getValues('useOrioleDb') && (
<Admonition
type="warning"
className="rounded-t-none [&>div]:text-xs"
title="OrioleDB is not production ready"
description="Postgres with OrioleDB extension is currently in Public Alpha and not recommended for production usage yet."
>
<DocsButton className="mt-2" href={`${DOCS_URL}/guides/database/orioledb`} />
</Admonition>
)}
</FormItemLayout>
</>
)}
/>
</CollapsibleContent_Shadcn_>
</Collapsible_Shadcn_>
</Panel.Content>
)

return <Panel.Content>{collapsible ? collapsibleContent : content}</Panel.Content>
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
import { CollapsibleContent, CollapsibleTrigger } from '@ui/components/shadcn/ui/collapsible'
import { ChevronRight } from 'lucide-react'
import { UseFormReturn } from 'react-hook-form'
import { Collapsible, FormControl, FormField, Input_Shadcn_ } from 'ui'
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'

import { CreateProjectForm } from './ProjectCreation.schema'
import Panel from '@/components/ui/Panel'

interface InternalOnlyConfigurationProps {
form: UseFormReturn<CreateProjectForm>
}

export const InternalOnlyConfiguration = ({ form }: InternalOnlyConfigurationProps) => {
return (
<Panel.Content>
<Collapsible>
<CollapsibleTrigger className="group/advanced-trigger font-mono uppercase tracking-widest text-xs flex items-center gap-1 text-foreground-lighter/75 hover:text-foreground-light transition data-open:text-foreground-light">
Internal-only Configuration
<ChevronRight
size={16}
strokeWidth={1}
className="mr-2 group-data-open/advanced-trigger:rotate-90 group-hover/advanced-trigger:text-foreground-light transition"
/>
</CollapsibleTrigger>
<CollapsibleContent className="pt-2 data-closed:animate-collapsible-up data-open:animate-collapsible-down">
<p className="text-xs text-foreground-lighter mb-6">
These settings are only applicable for local/staging projects
</p>
<div className="flex flex-col gap-y-4">
<FormField
control={form.control}
name="postgresVersion"
render={({ field }) => (
<FormItemLayout
label="Custom Postgres version"
layout="horizontal"
description="Specify a custom version of Postgres (defaults to the latest)."
>
<FormControl>
<Input_Shadcn_ placeholder="e.g 17.6.1.104" {...field} autoComplete="off" />
</FormControl>
</FormItemLayout>
)}
/>

<FormField
control={form.control}
name="instanceType"
render={({ field }) => (
<FormItemLayout
label="Custom instance type"
layout="horizontal"
description="Specify a custom instance type."
>
<FormControl>
<Input_Shadcn_ placeholder="e.g t3.nano" {...field} autoComplete="off" />
</FormControl>
</FormItemLayout>
)}
/>
</div>
</CollapsibleContent>
</Collapsible>
</Panel.Content>
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export const FormSchema = z
postgresVersion: z.string({
required_error: 'Please enter a Postgres version.',
}),
instanceType: z.string().optional(),
dbRegion: z.string({
required_error: 'Please select a region.',
}),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import Link from 'next/link'
import { UseFormReturn } from 'react-hook-form'
import {
Checkbox,
Expand All @@ -17,8 +16,10 @@ import { Admonition } from 'ui-patterns'
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'

import { CreateProjectForm } from './ProjectCreation.schema'
import { InlineLink } from '@/components/ui/InlineLink'
import Panel from '@/components/ui/Panel'
import { useTrackDefaultPrivilegesExposure } from '@/hooks/misc/useDataApiRevokeOnCreateDefault'
import { DOCS_URL } from '@/lib/constants'

interface SecurityOptionsProps {
form: UseFormReturn<CreateProjectForm>
Expand Down Expand Up @@ -51,13 +52,9 @@ export const SecurityOptions = ({ form, layout = 'horizontal' }: SecurityOptions
<FormDescription className="text-foreground-lighter">
Autogenerate a RESTful API for your public schema. Recommended if using a client
library like{' '}
<Link
href="https://supabase.com/docs/reference/javascript/introduction"
target="_blank"
className="text-link"
>
<InlineLink href={`${DOCS_URL}/reference/javascript/introduction`}>
supabase-js
</Link>
</InlineLink>
.
</FormDescription>
</div>
Expand Down
Loading
Loading