Home / Function/ CliGlobalFlagsHandler() — supabase Function Reference

CliGlobalFlagsHandler() — supabase Function Reference

Architecture documentation for the CliGlobalFlagsHandler() function in CliGlobalFlagsHandler.tsx from the supabase codebase.

Entity Profile

Dependency Diagram

graph TD
  3c8f1429_f169_6ae4_6e56_9588b43f2a74["CliGlobalFlagsHandler()"]
  69ce9cdf_2251_a961_e540_8a99edaead0b["getCustomContent()"]
  3c8f1429_f169_6ae4_6e56_9588b43f2a74 -->|calls| 69ce9cdf_2251_a961_e540_8a99edaead0b
  style 3c8f1429_f169_6ae4_6e56_9588b43f2a74 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/docs/components/reference/enrichments/cli/CliGlobalFlagsHandler.tsx lines 10–49

const CliGlobalFlagsHandler = () => {
  // Only fetch cliProfile when custom profiles are enabled
  const cliProfile = !cliDisableCustomProfiles
    ? getCustomContent(['cli:profile'] as any).cliProfile
    : undefined

  // Transform the flags based on feature flags
  const processedFlags = spec.flags.map((flag: any) => {
    if (flag.id === 'profile' && !cliDisableCustomProfiles) {
      return {
        id: 'profile',
        name: `--profile ${cliProfile}`,
        description: `use ${cliProfile} profile for connecting to Supabase API`,
      }
    }
    return flag
  })

  return (
    <RefSubLayout.EducationRow className="not-prose">
      <RefSubLayout.Details>
        <h3 className="text-lg text-foreground mb-3">Flags</h3>
        <ul>
          {processedFlags.map((flag) => {
            return (
              <Param
                {...flag}
                key={flag.id}
                id={`${spec.id}-${flag.id}`}
                isOptional={flag.required === undefined ? true : !flag.required}
              ></Param>
            )
          })}
        </ul>
      </RefSubLayout.Details>

      <RefSubLayout.Examples></RefSubLayout.Examples>
    </RefSubLayout.EducationRow>
  )
}

Subdomains

Frequently Asked Questions

What does CliGlobalFlagsHandler() do?
CliGlobalFlagsHandler() is a function in the supabase codebase.
What does CliGlobalFlagsHandler() call?
CliGlobalFlagsHandler() calls 1 function(s): getCustomContent.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free