Home / Function/ main() — supabase Function Reference

main() — supabase Function Reference

Architecture documentation for the main() function in last-changed.ts from the supabase codebase.

Entity Profile

Dependency Diagram

graph TD
  e4cf611d_5f26_7e21_2879_db880ac1bde0["main()"]
  be78ce97_5926_e9de_5a14_f6249807ccce["checkEnv()"]
  e4cf611d_5f26_7e21_2879_db880ac1bde0 -->|calls| be78ce97_5926_e9de_5a14_f6249807ccce
  eb0952ec_e4e3_73fb_ad33_cdb57a9cefff["parseOptions()"]
  e4cf611d_5f26_7e21_2879_db880ac1bde0 -->|calls| eb0952ec_e4e3_73fb_ad33_cdb57a9cefff
  7cf33710_ec56_da5f_1b5f_35125c400ee7["createSupabaseClient()"]
  e4cf611d_5f26_7e21_2879_db880ac1bde0 -->|calls| 7cf33710_ec56_da5f_1b5f_35125c400ee7
  65532f97_bc9f_6f02_810b_e5b4e021fa6f["updateContentDates()"]
  e4cf611d_5f26_7e21_2879_db880ac1bde0 -->|calls| 65532f97_bc9f_6f02_810b_e5b4e021fa6f
  style e4cf611d_5f26_7e21_2879_db880ac1bde0 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/docs/scripts/last-changed.ts lines 57–80

async function main() {
  console.log('Updating content timestamps....')

  checkEnv()

  const { reset } = parseOptions()
  const supabase = createSupabaseClient()
  const git = simpleGit()

  const stats: Stats = {
    sectionsUpdated: 0,
    sectionsErrored: 0,
  }

  const ctx: Ctx = { supabase, git, stats }

  await updateContentDates({ reset, ctx })

  console.log('Content timestamps successfully updated')
  console.log(`  - ${stats.sectionsUpdated} sections updated`)
  console.log(`  - ${stats.sectionsErrored} sections errored when updating`)

  if (stats.sectionsErrored) process.exit(1)
}

Subdomains

Frequently Asked Questions

What does main() do?
main() is a function in the supabase codebase.
What does main() call?
main() calls 4 function(s): checkEnv, createSupabaseClient, parseOptions, updateContentDates.

Analyze Your Own Codebase

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

Try Supermodel Free