Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Add realtime cli file

Terry Suttond26949eda684
diff --git a/apps/docs/pages/new/reference/cli/config.tsx b/apps/docs/pages/new/reference/cli/config.tsx
index cea6a34c762..c8c8ac7a745 100644
--- a/apps/docs/pages/new/reference/cli/config.tsx
+++ b/apps/docs/pages/new/reference/cli/config.tsx
@@ -1,9 +1,6 @@
// @ts-expect-error
-import cliConfig from '~/../../spec/cli_v1_config.yaml' assert { type: 'yml' }
-import CodeBlock from '~/components/CodeBlock/CodeBlock'
-import Options from '~/components/Options'
-import Param from '~/components/Params'
-import RefSubLayout from '~/layouts/ref/RefSubLayout'
+import specFile from '~/../../spec/cli_v1_config.yaml' assert { type: 'yml' }
+
import ReactMarkdown from 'react-markdown'
export type Link = {
@@ -32,11 +29,11 @@ export default function CliUsage() {
<div>
<div className="flex my-16">
<div className="w-full prose">
- <h1 className="text-4xl mb-16">{cliConfig.info.title}</h1>
- <ReactMarkdown>{cliConfig.info.description}</ReactMarkdown>
+ <h1 className="text-4xl mb-16">{specFile.info.title}</h1>
+ <ReactMarkdown>{specFile.info.description}</ReactMarkdown>
<div>
{TAGS.map((tag) =>
- cliConfig.parameters
+ specFile.parameters
.filter((param: Parameter) => param.tags[0] === tag)
.map((parameter: Parameter, index) => (
<div>
diff --git a/apps/docs/pages/new/reference/realtime/config.tsx b/apps/docs/pages/new/reference/realtime/config.tsx
new file mode 100644
index 00000000000..b687890bedf
--- /dev/null
+++ b/apps/docs/pages/new/reference/realtime/config.tsx
@@ -0,0 +1,86 @@
+// @ts-expect-error
+import specFile from '~/../../spec/realtime_v0_config.yaml' assert { type: 'yml' }
+
+import ReactMarkdown from 'react-markdown'
+
+export type Link = {
+ name: string
+ link: string
+}
+
+export type Parameter = {
+ id: string
+ title: string
+ description: string
+ summary: string
+ tags?: string[]
+ links?: Link[]
+ subcommands?: []
+ usage?: string
+ required?: boolean
+ default?: boolean
+}
+
+// Parameters are grouped on the page by tag
+const TAGS = ['general', 'database']
+
+export default function CliUsage() {
+ return (
+ <div>
+ <div className="flex my-16">
+ <div className="w-full prose">
+ <h1 className="text-4xl mb-16">{specFile.info.title} Configuration</h1>
+ <ReactMarkdown>{specFile.info.description}</ReactMarkdown>
+ <div>
+ {TAGS.map((tag) =>
+ specFile.parameters
+ .filter((param: Parameter) => param.tags[0] === tag)
+ .map((parameter: Parameter, index) => (
+ <div>
+ {index === 0 && <h2 className="text-xl capitalize">{tag} Settings</h2>}
+ <div className="mt-8">
+ <div>
+ <h2 className="text-xl font-medium text-scale-1200 font-mono">
+ <span className="mr-2">$</span>
+ {parameter.title}
+ </h2>
+ <div className="grid" id={parameter.id}>
+ <div className="border-b pb-8" key={parameter.id}>
+ <div className=" mb-16">
+ <p className="mb-4 scroll-mt-16 mt-0 text-scale-1100 text-base">
+ <ReactMarkdown>{parameter.description}</ReactMarkdown>
+ </p>
+ <div className="grid gap-2">
+ <div className="flex gap-2">
+ Required: <code>{parameter.required.toString()}</code>
+ </div>
+ <div className="flex gap-2">
+ Default:
+ <code>
+ {parameter.default ? parameter.default.toString() : 'None'}
+ </code>
+ </div>
+ </div>
+ </div>
+ {parameter.links &&
+ parameter.links.map((link) => (
+ <div>
+ <h3>See also:</h3>
+ <li>
+ <a href={link.link}>{link.name}</a>
+ </li>
+ </div>
+ ))}
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ ))
+ )}
+ </div>
+ </div>
+ </div>
+ </div>
+ )
+}