The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
add global flags
Jonathan Summers-Muir6afc1cc4ec16
diff --git a/apps/docs/components/index.tsx b/apps/docs/components/index.tsxindex 524a64f2399..bc9c78b9d1b 100644--- a/apps/docs/components/index.tsx+++ b/apps/docs/components/index.tsx@@ -24,6 +24,10 @@ import RefSubLayout from '~/layouts/ref/RefSubLayout'// import { CH } from '@code-hike/mdx/components'import RefHeaderSection from './reference/RefHeaderSection'+import CliGlobalFlagsHandler from '~/components/reference/enrichments/cli/CliGlobalFlagsHandler'++// Ref version specific+const components = {Admonition,Button,@@ -64,6 +68,7 @@ const components = {// CH,code: (props: any) => <CodeBlock {...props} />,RefHeaderSection: (props: any) => <RefHeaderSection {...props} />,+ CliGlobalFlagsHandler: () => <CliGlobalFlagsHandler />,}export default componentsdiff --git a/apps/docs/components/reference/enrichments/cli/CliGlobalFlagsHandler.tsx b/apps/docs/components/reference/enrichments/cli/CliGlobalFlagsHandler.tsxnew file mode 100644index 00000000000..43a345dbc3b--- /dev/null+++ b/apps/docs/components/reference/enrichments/cli/CliGlobalFlagsHandler.tsx@@ -0,0 +1,33 @@+import RefSubLayout from '~/layouts/ref/RefSubLayout'++// @ts-expect-error+import spec from '~/../../spec/cli_v1_commands.yaml' assert { type: 'yaml' }+import Param from '~/components/Params'+import Options from '~/components/Options'++const CliGlobalFlagsHandler = () => {+ return (+ <RefSubLayout.EducationRow className="not-prose">+ <>+ <RefSubLayout.Details>+ <h3 className="text-lg text-scale-1200 mb-3">Flags</h3>+ <ul className="">+ {spec.flags.map((flag) => {+ console.log('flag', flag)+ return (+ <Param+ {...flag}+ isOptional={flag.required === undefined ? true : !flag.required}+ ></Param>+ )+ })}+ </ul>+ </RefSubLayout.Details>++ <RefSubLayout.Examples></RefSubLayout.Examples>+ </>+ </RefSubLayout.EducationRow>+ )+}++export default CliGlobalFlagsHandlerdiff --git a/apps/docs/docs/ref/cli/global-flags.mdx b/apps/docs/docs/ref/cli/global-flags.mdxnew file mode 100644index 00000000000..39aaf77295b--- /dev/null+++ b/apps/docs/docs/ref/cli/global-flags.mdx@@ -0,0 +1,8 @@+---+title: Global Flags+description: 'Supabase CLI supports global flags for every command.'+---++Supabase CLI supports global flags for every command.++<CliGlobalFlagsHandler />diff --git a/apps/docs/layouts/ref/RefSubLayout.tsx b/apps/docs/layouts/ref/RefSubLayout.tsxindex 3aa2b0930f0..26e1c612515 100644--- a/apps/docs/layouts/ref/RefSubLayout.tsx+++ b/apps/docs/layouts/ref/RefSubLayout.tsx@@ -34,7 +34,9 @@ type StickyHeader = {type RefSubLayoutType = {}-interface IEducationRow {}+interface IEducationRow {+ className?: string+}interface IEducationSection {id: stringtitle?: string@@ -129,7 +131,11 @@ const Examples: FC<ISectionExamples> = (props) => {}const EducationRow: FC<IEducationRow> = (props) => {- return <div className="grid lg:grid-cols-2 gap-8 lg:gap-16">{props.children}</div>+ return (+ <div className={['grid lg:grid-cols-2 gap-8 lg:gap-16', props.className].join(' ')}>+ {props.children}+ </div>+ )}const EducationSection: FC<IEducationSection> = ({ icon, hideTitle = false, ...props }) => {diff --git a/spec/common-cli-sections.json b/spec/common-cli-sections.jsonindex 94570bfab9b..7d43432b6f2 100644--- a/spec/common-cli-sections.json+++ b/spec/common-cli-sections.json@@ -6,6 +6,13 @@"isFunc": false,"type": "markdown"},+ {+ "title": "Global flags",+ "id": "global-flags",+ "slug": "global-flags",+ "isFunc": false,+ "type": "markdown"+ },{"title": "general","items": [