MCPcopy
hub / github.com/shadcn-ui/ui / configureRegistries

Function configureRegistries

packages/tests/src/utils/registry.ts:258–273  ·  view source on GitHub ↗
(
  fixturePath: string,
  payload: Record<string, any>
)

Source from the content-addressed store, hash-verified

256}
257
258export async function configureRegistries(
259 fixturePath: string,
260 payload: Record<string, any>
261) {
262 if (!fs.pathExistsSync(path.join(fixturePath, "components.json"))) {
263 await fs.writeJSON(path.join(fixturePath, "components.json"), {
264 registries: payload,
265 })
266 }
267
268 const componentsJson = await fs.readJSON(
269 path.join(fixturePath, "components.json")
270 )
271 componentsJson.registries = payload
272 await fs.writeJSON(path.join(fixturePath, "components.json"), componentsJson)
273}

Callers 4

view.test.tsFile · 0.90
registries.test.tsFile · 0.90
add.test.tsFile · 0.90
search.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected