| 527 | } |
| 528 | |
| 529 | const buildAllItems = (items: any[]) => { |
| 530 | const base = (REGISTRY_HOMEPAGE || 'http://localhost:3000').replace(/\/+$/, '') |
| 531 | const urls = items |
| 532 | .filter((it: any) => it.type === 'registry:ui') |
| 533 | .map((it: any) => `${base}/r/ui/${it.name}`) |
| 534 | .sort() |
| 535 | |
| 536 | return registryItemSchema.parse({ |
| 537 | $schema: 'https://ui.shadcn.com/schema/registry-item.json', |
| 538 | extends: 'none', |
| 539 | name: 'all', |
| 540 | type: 'registry:item', |
| 541 | title: 'All UI components', |
| 542 | description: 'Installs all UI components from this registry.', |
| 543 | registryDependencies: urls, |
| 544 | }) |
| 545 | } |
| 546 | |
| 547 | const buildAll = async () => { |
| 548 | const items: any[] = [...themeItems] |