{"$schema":"https://ui.shadcn.com/schema/registry-item.json","author":"Eduardo Calvo <educlopez93@gmail.com>","css":{},"dependencies":["@clack/prompts","picocolors"],"description":"CLI to install SmoothUI components - beautifully designed React components with smooth animations","devDependencies":["@types/node","tsup","tsx","ultracite","vitest"],"files":[{"content":"import { existsSync, readFileSync } from \"node:fs\";\nimport path from \"node:path\";\nimport { describe, expect, it } from \"vitest\";\n\ninterface PackageJson {\n  bin?: Record<string, string>;\n  files?: string[];\n  name?: string;\n  private?: boolean;\n  publishConfig?: Record<string, unknown>;\n  repository?: { directory?: string };\n  version?: string;\n}\n\ninterface ReleasePleaseConfig {\n  packages: Record<string, { component?: string; \"package-name\"?: string }>;\n}\n\nconst readJson = <Value>(filePath: string): Value =>\n  JSON.parse(\n    readFileSync(path.join(repositoryRoot, filePath), \"utf8\")\n  ) as Value;\n\nconst repositoryRoot = path.resolve(import.meta.dirname, \"../..\");\nconst repositoryPathExists = (filePath: string): boolean =>\n  existsSync(path.join(repositoryRoot, filePath));\n\ndescribe(\"smoothui-cli workspace isolation\", () => {\n  it(\"keeps the repository root private and non-publishable\", () => {\n    const rootPackage = readJson<PackageJson>(\"package.json\");\n\n    expect(rootPackage.private).toBe(true);\n    expect(rootPackage.name).not.toBe(\"smoothui-cli\");\n    expect(rootPackage.bin).toBeUndefined();\n    expect(rootPackage.publishConfig).toBeUndefined();\n    expect(repositoryPathExists(\"scripts/index.ts\")).toBe(false);\n  });\n\n  it(\"owns all publish metadata inside packages/cli\", () => {\n    const cliPackage = readJson<PackageJson>(\"packages/cli/package.json\");\n    const manifest = readJson<Record<string, string>>(\n      \".release-please-manifest.json\"\n    );\n\n    expect(cliPackage).toMatchObject({\n      bin: {\n        smoothui: \"dist/index.js\",\n        \"smoothui-cli\": \"dist/index.js\",\n      },\n      files: [\"dist/index.js\", \"README.md\", \"LICENSE\"],\n      name: \"smoothui-cli\",\n      publishConfig: { access: \"public\", provenance: true },\n      repository: { directory: \"packages/cli\" },\n    });\n    expect(cliPackage.version).toBe(manifest[\"packages/cli\"]);\n    expect(repositoryPathExists(\"packages/cli/scripts/index.ts\")).toBe(true);\n    expect(repositoryPathExists(\"packages/cli/README.md\")).toBe(true);\n    expect(repositoryPathExists(\"packages/cli/LICENSE\")).toBe(true);\n    expect(\n      readFileSync(path.join(repositoryRoot, \"packages/cli/LICENSE\"))\n    ).toEqual(readFileSync(path.join(repositoryRoot, \"LICENSE\")));\n  });\n\n  it(\"uses workspace paths as the release boundaries\", () => {\n    const releaseConfig = readJson<ReleasePleaseConfig>(\n      \"release-please-config.json\"\n    );\n    const manifest = readJson<Record<string, string>>(\n      \".release-please-manifest.json\"\n    );\n    const cliPackage = readJson<PackageJson>(\"packages/cli/package.json\");\n    const libraryPackage = readJson<PackageJson>(\n      \"packages/smoothui/package.json\"\n    );\n\n    expect(releaseConfig.packages).toEqual({\n      \"packages/cli\": {\n        component: \"cli\",\n        \"include-component-in-tag\": true,\n        \"package-name\": \"smoothui-cli\",\n      },\n      \"packages/smoothui\": { \"package-name\": \"smoothui\" },\n    });\n    expect(Object.keys(manifest).sort()).toEqual([\n      \"packages/cli\",\n      \"packages/smoothui\",\n    ]);\n    expect(manifest[\"packages/cli\"]).toBe(cliPackage.version);\n    expect(manifest[\"packages/smoothui\"]).toBe(libraryPackage.version);\n  });\n});\n","path":"package-isolation.test.ts","target":"components/smoothui/cli/package-isolation.test.ts","type":"registry:ui"}],"name":"cli","registryDependencies":[],"title":"Cli","type":"registry:ui"}