Home / Function/ updateContentDates() — supabase Function Reference

updateContentDates() — supabase Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  65532f97_bc9f_6f02_810b_e5b4e021fa6f["updateContentDates()"]
  e4cf611d_5f26_7e21_2879_db880ac1bde0["main()"]
  e4cf611d_5f26_7e21_2879_db880ac1bde0 -->|calls| 65532f97_bc9f_6f02_810b_e5b4e021fa6f
  88f45a4f_9be3_8498_2a53_06ed061ad50a["getContentDir()"]
  65532f97_bc9f_6f02_810b_e5b4e021fa6f -->|calls| 88f45a4f_9be3_8498_2a53_06ed061ad50a
  d8159e12_443b_ebed_95e9_d1cd192f627a["walkDir()"]
  65532f97_bc9f_6f02_810b_e5b4e021fa6f -->|calls| d8159e12_443b_ebed_95e9_d1cd192f627a
  c4ba6037_4ea4_e34c_3bed_9d9cf63274e8["updateTimestamps()"]
  65532f97_bc9f_6f02_810b_e5b4e021fa6f -->|calls| c4ba6037_4ea4_e34c_3bed_9d9cf63274e8
  style 65532f97_bc9f_6f02_810b_e5b4e021fa6f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/docs/scripts/last-changed.ts lines 119–133

async function updateContentDates({ reset, ctx }: { reset: boolean; ctx: Ctx }) {
  const CONTENT_DIR = getContentDir()
  const mdxFiles = await walkDir(CONTENT_DIR)

  const timestamp = new Date()

  const updateTasks: Array<Promise<void>> = []
  for (const file of mdxFiles) {
    const tasks = await updateTimestamps(file, { reset, timestamp, ctx })
    if (tasks) {
      updateTasks.push(...tasks)
    }
  }
  await Promise.all(updateTasks)
}

Subdomains

Called By

Frequently Asked Questions

What does updateContentDates() do?
updateContentDates() is a function in the supabase codebase.
What does updateContentDates() call?
updateContentDates() calls 3 function(s): getContentDir, updateTimestamps, walkDir.
What calls updateContentDates()?
updateContentDates() is called by 1 function(s): main.

Analyze Your Own Codebase

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

Try Supermodel Free