Home / Function/ configureRegistries() — ui Function Reference

configureRegistries() — ui Function Reference

Architecture documentation for the configureRegistries() function in registry.ts from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  c3b306fd_b8f5_6d85_f831_2817ec0ad4a1["configureRegistries()"]
  36b31cf1_05ba_97d7_e250_f336253a3080["registry.ts"]
  c3b306fd_b8f5_6d85_f831_2817ec0ad4a1 -->|defined in| 36b31cf1_05ba_97d7_e250_f336253a3080
  style c3b306fd_b8f5_6d85_f831_2817ec0ad4a1 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/tests/src/utils/registry.ts lines 258–273

export async function configureRegistries(
  fixturePath: string,
  payload: Record<string, any>
) {
  if (!fs.pathExistsSync(path.join(fixturePath, "components.json"))) {
    await fs.writeJSON(path.join(fixturePath, "components.json"), {
      registries: payload,
    })
  }

  const componentsJson = await fs.readJSON(
    path.join(fixturePath, "components.json")
  )
  componentsJson.registries = payload
  await fs.writeJSON(path.join(fixturePath, "components.json"), componentsJson)
}

Subdomains

Frequently Asked Questions

What does configureRegistries() do?
configureRegistries() is a function in the ui codebase, defined in packages/tests/src/utils/registry.ts.
Where is configureRegistries() defined?
configureRegistries() is defined in packages/tests/src/utils/registry.ts at line 258.

Analyze Your Own Codebase

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

Try Supermodel Free