shadcn 4.0.7-beta.1 → 4.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/LICENSE.md +21 -0
  2. package/dist/index.js +1 -1
  3. package/package.json +20 -20
package/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 shadcn
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/dist/index.js CHANGED
@@ -159,4 +159,4 @@ args = ["shadcn@${Ce}", "mcp"]`),b.break(),b.info("3. Restart Codex to load the
159
159
  `).map(x=>{if(x.trim().startsWith("import "))return x;let v=x;return v=v.replace(/\b(asChild\s*\?\s*)Slot(\s*:)/g,"$1__SLOT_PLACEHOLDER__$2"),v=v.replace(/\bReact\.ComponentProps<typeof\s+Slot>/g,"React.ComponentProps<typeof __SLOT_PLACEHOLDER__>"),v=v.replace(/\bComponentProps<typeof\s+Slot>/g,"ComponentProps<typeof __SLOT_PLACEHOLDER__>"),v=v.replace(/(<\/?)Slot(\s*\/?>)/g,"$1__SLOT_PLACEHOLDER__$2"),v=v.replace(/\bSlot\b/g,(P,C,R)=>{let $=R.substring(0,C),M=($.match(/"/g)||[]).length,Z=($.match(/'/g)||[]).length;return M%2!==0||Z%2!==0?P:"__SLOT_PLACEHOLDER__"}),v=v.replace(/__SLOT_PLACEHOLDER__/g,"SlotPrimitive.Slot"),v}).join(`
160
160
  `));let h=Array.from(new Set(i));return {content:c,replacedPackages:h}}var Ws=["sidebar.tsx","pagination.tsx","calendar.tsx"],Ms=`${c$1}/docs/rtl#manual-migration-optional`;async function ro(e,t={}){let r,n;if(t.path){if(n=e.resolvedPaths.cwd,t.path.includes("*"))r=await Qt(t.path,{cwd:n,onlyFiles:true,ignore:["**/node_modules/**"]});else {let f=te__default.resolve(n,t.path),l=await promises.stat(f).catch(()=>null);if(!l)throw new Error(`File not found: ${t.path}`);if(l.isDirectory())n=f,r=await Qt("**/*.{js,ts,jsx,tsx}",{cwd:n,onlyFiles:true,ignore:["**/node_modules/**"]});else if(l.isFile())r=[t.path];else throw new Error(`Unsupported path type: ${t.path}`)}if(r.length===0)throw new Error(`No files found matching: ${t.path}`)}else {if(!e.resolvedPaths.ui)throw new Error("Could not find a valid `ui` path in your `components.json`. Please provide a path or glob pattern.");n=e.resolvedPaths.ui,r=await Qt("**/*.{js,ts,jsx,tsx}",{cwd:n,onlyFiles:true});}if(!t.yes){let a$1=t.path?t.path:`./${te__default.relative(e.resolvedPaths.cwd,n)}`,{confirm:f}=await pe({type:"confirm",name:"confirm",initial:true,message:`We will migrate ${a.info(r.length)} file(s) in ${a.info(a$1)} to RTL. Continue?`});f||(b.info("Migration cancelled."),process.exit(0));}let i=w("Updating components.json...").start();try{let a=te__default.resolve(e.resolvedPaths.cwd,"components.json"),f=JSON.parse(await promises.readFile(a,"utf-8"));f.rtl=!0,await promises.writeFile(a,JSON.stringify(f,null,2)+`
161
161
  `),i.succeed("Updated components.json.");}catch{throw i.fail("Failed to update components.json."),new Error("Could not update components.json. Please manually set `rtl: true`.")}let o=w("Migrating files to RTL...").start(),s=0,c=[];if(await Promise.all(r.map(async a=>{o.text=`Migrating ${a}...`;let f=te__default.join(n,a),l=await promises.readFile(f,"utf-8"),m=await e$1(l,true);m!==l&&(await promises.writeFile(f,m),s++);let d=te__default.basename(a);Ws.includes(d)&&c.push(a);})),o.succeed(`Migration complete. ${s} file(s) transformed.`),c.length>0){b.break(),b.warn("The following components may need manual RTL adjustments:");for(let a of c)b.info(` - ${a}`);b.break(),b.info(`See ${a.info(Ms)} for more information.`);}}async function oo(e){let t={};if(!A.existsSync(e.cwd)||!A.existsSync(te__default.resolve(e.cwd,"package.json")))return t["1"]=true,{errors:t,config:null};if(!A.existsSync(te__default.resolve(e.cwd,"components.json")))return t["3"]=true,{errors:t,config:null};try{let r=await N(e.cwd);return {errors:t,config:r}}catch{b.break(),b.error(`An invalid ${a.info("components.json")} file was found at ${a.info(e.cwd)}.
162
- Before you can run a migration, you must create a valid ${a.info("components.json")} file by running the ${a.info("init")} command.`),b.error(`Learn more at ${a.info(`${c$1}/docs/components-json`)}.`),b.break(),process.exit(1);}}var io=[{name:"icons",description:"migrate your ui components to a different icon library."},{name:"radix",description:"migrate to radix-ui."},{name:"rtl",description:"migrate your components to support RTL (right-to-left)."}],zs=z.object({cwd:z.string(),list:z.boolean(),yes:z.boolean(),migration:z.string().refine(e=>e&&io.some(t=>t.name===e),{message:"You must specify a valid migration. Run `shadcn migrate --list` to see available migrations."}).optional(),path:z.string().optional()}),so=new Command().name("migrate").description("run a migration.").argument("[migration]","the migration to run.").argument("[path]","optional path or glob pattern to migrate.").option("-c, --cwd <cwd>","the working directory. defaults to the current directory.",process.cwd()).option("-l, --list","list all migrations.",false).option("-y, --yes","skip confirmation prompt.",false).action(async(e,t,r)=>{try{let n=zs.parse({cwd:te__default.resolve(r.cwd),migration:e,path:t,list:r.list,yes:r.yes});if(n.list||!n.migration){b.info("Available migrations:");for(let s of io)b.info(`- ${s.name}: ${s.description}`);return}if(!n.migration)throw new Error("You must specify a migration. Run `shadcn migrate --list` to see available migrations.");let{errors:i,config:o}=await oo(n);if(i["1"]||i["3"])throw new Error("No `components.json` file found. Ensure you are at the root of your project.");if(!o)throw new Error("Something went wrong reading your `components.json` file. Please ensure you have a valid `components.json` file.");n.migration==="icons"&&await eo(o),n.migration==="radix"&&await to(o,{yes:n.yes,path:n.path}),n.migration==="rtl"&&await ro(o,{yes:n.yes,path:n.path});}catch(n){b.break(),$(n);}});var Hs=z.object({cwd:z.string(),silent:z.boolean()}),co=new Command().name("add").description("add registries to your project").argument("[registries...]","registries (@namespace) or registry URLs (@namespace=url)").option("-c, --cwd <cwd>","the working directory. defaults to the current directory.",process.cwd()).option("-s, --silent","mute output.",false).action(async(e,t)=>{try{let r=Hs.parse({cwd:te__default.resolve(t.cwd),silent:t.silent}),n=e.length>0?e:await qs({silent:r.silent});await Ks(n,r.cwd,{silent:r.silent});}catch(r){b.break(),$(r);}});function Ys(e){let[t,...r]=e.split("="),n=r.length>0?r.join("="):void 0;if(!t.startsWith("@"))throw new Error(`Invalid registry namespace: ${a.info(t)}. Registry names must start with @ (e.g., @acme).`);return {namespace:t,url:n}}function or(e,t,r){return `${e} ${e===1?t:r}`}async function Ks(e,t,r){let n=te__default.resolve(t,"components.json");if(!A.existsSync(n))throw new Error(`No ${a.info("components.json")} found. Run ${a.info("shadcn init")} first.`);let i=e.map(Ys),o=i.filter(g=>!g.url),s=[];if(o.length>0){let g=w("Fetching registries.",{silent:r.silent}).start(),w$1=await ma();if(!w$1)throw g.fail(),new Error("Failed to fetch registries.");g.succeed(),s=w$1;}let c={};for(let{namespace:g,url:w}of i){if(g in d){b.warn(`${a.info(g)} is a built-in registry and cannot be added.`);continue}if(w){if(!w.includes("{name}"))throw new Error(`Invalid registry URL for ${a.info(g)}. URL must include {name} placeholder. Example: ${a.info(`${g}=https://example.com/r/{name}.json`)}`);c[g]=w;}else {let x=s.find(v=>v.name===g);if(!x)throw new Error(`Registry ${a.info(g)} not found. Provide a URL: ${a.info(`${g}=https://.../{name}.json`)}`);c[g]=x.url;}}if(Object.keys(c).length===0)return {addedRegistries:[]};let a$1=await A.readJson(n),f=a$1.registries||{},l={},m=[];for(let[g,w]of Object.entries(c))f[g]?m.push(g):l[g]=w;if(Object.keys(l).length===0){if(m.length>0&&!r.silent){w(`Skipped ${or(m.length,"registry","registries")}: (already configured)`,{silent:r.silent})?.info();for(let g of m)b.log(` - ${g}`);}else r.silent||b.info("No new registries to add.");return}let d$1={...a$1,registries:{...f,...l}},h=w("Updating components.json.",{silent:r.silent}).start();if(await A.writeJson(n,d$1,{spaces:2}),h.succeed(),!r.silent){let g=Object.keys(l);w(`Added ${or(g.length,"registry","registries")}:`,{silent:r.silent})?.succeed();for(let w of g)b.log(` - ${w}`);if(m.length>0){w(`Skipped ${or(m.length,"registry","registries")}: (already configured)`,{silent:r.silent})?.info();for(let w of m)b.log(` - ${w}`);}}}async function qs(e){let t=w("Fetching registries.",{silent:e.silent}).start(),r=await ma();if(!r)throw t.fail(),new Error("Failed to fetch registries.");t.succeed();let n=[...r].sort((o,s)=>o.name.localeCompare(s.name)),{selected:i}=await pe({type:"autocompleteMultiselect",name:"selected",message:"Which registries would you like to add?",hint:"Space to select. A to toggle all. Enter to submit.",instructions:false,choices:n.map(o=>({title:o.name,description:o.description,value:o.name}))});return i?.length||(b.warn("No registries selected. Exiting."),b.info(""),process.exit(1)),i}var lo=new Command().name("registry").description("manage registries").addCommand(co);var Qs=z.object({cwd:z.string(),query:z.string().optional(),limit:z.number().optional(),offset:z.number().optional()}),mo=new Command().name("search").alias("list").description("search items from registries").argument("<registries...>","the registry names or urls to search items from. Names must be prefixed with @.").option("-c, --cwd <cwd>","the working directory. defaults to the current directory.",process.cwd()).option("-q, --query <query>","query string").option("-l, --limit <number>","maximum number of items to display per registry","100").option("-o, --offset <number>","number of items to skip","0").action(async(e,t)=>{try{let r=Qs.parse({cwd:te__default.resolve(t.cwd),query:t.query,limit:t.limit?parseInt(t.limit,10):void 0,offset:t.offset?parseInt(t.offset,10):void 0});await X(r.cwd);let n=T({style:"new-york",resolvedPaths:{cwd:r.cwd}}),i=U$1(n),o=te__default.resolve(r.cwd,"components.json");if(A.existsSync(o)){let l=await A.readJson(o),m=c.partial().parse(l);i=U$1({...n,...m});}let s=i;try{let l=await N(r.cwd);l&&(s=U$1(l));}catch{}let{config:c$1,newRegistries:a}=await _(e.map(l=>`${l}/registry`),s,{silent:!0,writeFile:!1});a.length>0&&(s.registries=c$1.registries),W(e,s);let f=await va(e,{query:r.query,limit:r.limit,offset:r.offset,config:s});console.log(JSON.stringify(f,null,2)),process.exit(0);}catch(r){$(r);}finally{V();}});var ta=z.object({cwd:z.string()}),yo=new Command().name("view").description("view items from the registry").argument("<items...>","the item names or URLs to view").option("-c, --cwd <cwd>","the working directory. defaults to the current directory.",process.cwd()).action(async(e,t)=>{try{let r=ta.parse({cwd:te__default.resolve(t.cwd)});await X(r.cwd);let n=U$1({}),i=te__default.resolve(r.cwd,"components.json");if(A.existsSync(i)){let f=await A.readJson(i),l=c.partial().parse(f);n=U$1(l);}let o=n;try{let f=await N(r.cwd);f&&(o=U$1(f));}catch{}let{config:s,newRegistries:c$1}=await _(e,o,{silent:!0,writeFile:!1});c$1.length>0&&(o.registries=s.registries),W(e,o);let a=await ba(e,{config:o});console.log(JSON.stringify(a,null,2)),process.exit(0);}catch(r){$(r);}finally{V();}});var wo={version:"4.0.7-beta.1"};process.on("SIGINT",()=>process.exit(0));process.on("SIGTERM",()=>process.exit(0));async function oa(){let e=new Command().name("shadcn").description("build your component library").version(wo.version,"-v, --version","display the version number");e.addCommand(Sn).addCommand(_n).addCommand(Jn).addCommand(Gn).addCommand(yo).addCommand(mo).addCommand(so).addCommand(Kn).addCommand(Bn).addCommand(Xt).addCommand(lo),e.parse();}oa();
162
+ Before you can run a migration, you must create a valid ${a.info("components.json")} file by running the ${a.info("init")} command.`),b.error(`Learn more at ${a.info(`${c$1}/docs/components-json`)}.`),b.break(),process.exit(1);}}var io=[{name:"icons",description:"migrate your ui components to a different icon library."},{name:"radix",description:"migrate to radix-ui."},{name:"rtl",description:"migrate your components to support RTL (right-to-left)."}],zs=z.object({cwd:z.string(),list:z.boolean(),yes:z.boolean(),migration:z.string().refine(e=>e&&io.some(t=>t.name===e),{message:"You must specify a valid migration. Run `shadcn migrate --list` to see available migrations."}).optional(),path:z.string().optional()}),so=new Command().name("migrate").description("run a migration.").argument("[migration]","the migration to run.").argument("[path]","optional path or glob pattern to migrate.").option("-c, --cwd <cwd>","the working directory. defaults to the current directory.",process.cwd()).option("-l, --list","list all migrations.",false).option("-y, --yes","skip confirmation prompt.",false).action(async(e,t,r)=>{try{let n=zs.parse({cwd:te__default.resolve(r.cwd),migration:e,path:t,list:r.list,yes:r.yes});if(n.list||!n.migration){b.info("Available migrations:");for(let s of io)b.info(`- ${s.name}: ${s.description}`);return}if(!n.migration)throw new Error("You must specify a migration. Run `shadcn migrate --list` to see available migrations.");let{errors:i,config:o}=await oo(n);if(i["1"]||i["3"])throw new Error("No `components.json` file found. Ensure you are at the root of your project.");if(!o)throw new Error("Something went wrong reading your `components.json` file. Please ensure you have a valid `components.json` file.");n.migration==="icons"&&await eo(o),n.migration==="radix"&&await to(o,{yes:n.yes,path:n.path}),n.migration==="rtl"&&await ro(o,{yes:n.yes,path:n.path});}catch(n){b.break(),$(n);}});var Hs=z.object({cwd:z.string(),silent:z.boolean()}),co=new Command().name("add").description("add registries to your project").argument("[registries...]","registries (@namespace) or registry URLs (@namespace=url)").option("-c, --cwd <cwd>","the working directory. defaults to the current directory.",process.cwd()).option("-s, --silent","mute output.",false).action(async(e,t)=>{try{let r=Hs.parse({cwd:te__default.resolve(t.cwd),silent:t.silent}),n=e.length>0?e:await qs({silent:r.silent});await Ks(n,r.cwd,{silent:r.silent});}catch(r){b.break(),$(r);}});function Ys(e){let[t,...r]=e.split("="),n=r.length>0?r.join("="):void 0;if(!t.startsWith("@"))throw new Error(`Invalid registry namespace: ${a.info(t)}. Registry names must start with @ (e.g., @acme).`);return {namespace:t,url:n}}function or(e,t,r){return `${e} ${e===1?t:r}`}async function Ks(e,t,r){let n=te__default.resolve(t,"components.json");if(!A.existsSync(n))throw new Error(`No ${a.info("components.json")} found. Run ${a.info("shadcn init")} first.`);let i=e.map(Ys),o=i.filter(g=>!g.url),s=[];if(o.length>0){let g=w("Fetching registries.",{silent:r.silent}).start(),w$1=await ma();if(!w$1)throw g.fail(),new Error("Failed to fetch registries.");g.succeed(),s=w$1;}let c={};for(let{namespace:g,url:w}of i){if(g in d){b.warn(`${a.info(g)} is a built-in registry and cannot be added.`);continue}if(w){if(!w.includes("{name}"))throw new Error(`Invalid registry URL for ${a.info(g)}. URL must include {name} placeholder. Example: ${a.info(`${g}=https://example.com/r/{name}.json`)}`);c[g]=w;}else {let x=s.find(v=>v.name===g);if(!x)throw new Error(`Registry ${a.info(g)} not found. Provide a URL: ${a.info(`${g}=https://.../{name}.json`)}`);c[g]=x.url;}}if(Object.keys(c).length===0)return {addedRegistries:[]};let a$1=await A.readJson(n),f=a$1.registries||{},l={},m=[];for(let[g,w]of Object.entries(c))f[g]?m.push(g):l[g]=w;if(Object.keys(l).length===0){if(m.length>0&&!r.silent){w(`Skipped ${or(m.length,"registry","registries")}: (already configured)`,{silent:r.silent})?.info();for(let g of m)b.log(` - ${g}`);}else r.silent||b.info("No new registries to add.");return}let d$1={...a$1,registries:{...f,...l}},h=w("Updating components.json.",{silent:r.silent}).start();if(await A.writeJson(n,d$1,{spaces:2}),h.succeed(),!r.silent){let g=Object.keys(l);w(`Added ${or(g.length,"registry","registries")}:`,{silent:r.silent})?.succeed();for(let w of g)b.log(` - ${w}`);if(m.length>0){w(`Skipped ${or(m.length,"registry","registries")}: (already configured)`,{silent:r.silent})?.info();for(let w of m)b.log(` - ${w}`);}}}async function qs(e){let t=w("Fetching registries.",{silent:e.silent}).start(),r=await ma();if(!r)throw t.fail(),new Error("Failed to fetch registries.");t.succeed();let n=[...r].sort((o,s)=>o.name.localeCompare(s.name)),{selected:i}=await pe({type:"autocompleteMultiselect",name:"selected",message:"Which registries would you like to add?",hint:"Space to select. A to toggle all. Enter to submit.",instructions:false,choices:n.map(o=>({title:o.name,description:o.description,value:o.name}))});return i?.length||(b.warn("No registries selected. Exiting."),b.info(""),process.exit(1)),i}var lo=new Command().name("registry").description("manage registries").addCommand(co);var Qs=z.object({cwd:z.string(),query:z.string().optional(),limit:z.number().optional(),offset:z.number().optional()}),mo=new Command().name("search").alias("list").description("search items from registries").argument("<registries...>","the registry names or urls to search items from. Names must be prefixed with @.").option("-c, --cwd <cwd>","the working directory. defaults to the current directory.",process.cwd()).option("-q, --query <query>","query string").option("-l, --limit <number>","maximum number of items to display per registry","100").option("-o, --offset <number>","number of items to skip","0").action(async(e,t)=>{try{let r=Qs.parse({cwd:te__default.resolve(t.cwd),query:t.query,limit:t.limit?parseInt(t.limit,10):void 0,offset:t.offset?parseInt(t.offset,10):void 0});await X(r.cwd);let n=T({style:"new-york",resolvedPaths:{cwd:r.cwd}}),i=U$1(n),o=te__default.resolve(r.cwd,"components.json");if(A.existsSync(o)){let l=await A.readJson(o),m=c.partial().parse(l);i=U$1({...n,...m});}let s=i;try{let l=await N(r.cwd);l&&(s=U$1(l));}catch{}let{config:c$1,newRegistries:a}=await _(e.map(l=>`${l}/registry`),s,{silent:!0,writeFile:!1});a.length>0&&(s.registries=c$1.registries),W(e,s);let f=await va(e,{query:r.query,limit:r.limit,offset:r.offset,config:s});console.log(JSON.stringify(f,null,2)),process.exit(0);}catch(r){$(r);}finally{V();}});var ta=z.object({cwd:z.string()}),yo=new Command().name("view").description("view items from the registry").argument("<items...>","the item names or URLs to view").option("-c, --cwd <cwd>","the working directory. defaults to the current directory.",process.cwd()).action(async(e,t)=>{try{let r=ta.parse({cwd:te__default.resolve(t.cwd)});await X(r.cwd);let n=U$1({}),i=te__default.resolve(r.cwd,"components.json");if(A.existsSync(i)){let f=await A.readJson(i),l=c.partial().parse(f);n=U$1(l);}let o=n;try{let f=await N(r.cwd);f&&(o=U$1(f));}catch{}let{config:s,newRegistries:c$1}=await _(e,o,{silent:!0,writeFile:!1});c$1.length>0&&(o.registries=s.registries),W(e,o);let a=await ba(e,{config:o});console.log(JSON.stringify(a,null,2)),process.exit(0);}catch(r){$(r);}finally{V();}});var wo={version:"4.0.7"};process.on("SIGINT",()=>process.exit(0));process.on("SIGTERM",()=>process.exit(0));async function oa(){let e=new Command().name("shadcn").description("build your component library").version(wo.version,"-v, --version","display the version number");e.addCommand(Sn).addCommand(_n).addCommand(Jn).addCommand(Gn).addCommand(yo).addCommand(mo).addCommand(so).addCommand(Kn).addCommand(Bn).addCommand(Xt).addCommand(lo),e.parse();}oa();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shadcn",
3
- "version": "4.0.7-beta.1",
3
+ "version": "4.0.7",
4
4
  "description": "Add components to your apps.",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -60,24 +60,6 @@
60
60
  }
61
61
  },
62
62
  "bin": "./dist/index.js",
63
- "scripts": {
64
- "dev": "tsup --watch",
65
- "build": "tsup",
66
- "typecheck": "tsc --noEmit",
67
- "clean": "rimraf dist && rimraf components",
68
- "start:dev": "cross-env REGISTRY_URL=http://localhost:4000/r SHADCN_TEMPLATE_DIR=../../templates node dist/index.js",
69
- "start:prod": "cross-env REGISTRY_URL=https://ui.shadcn.com/r node dist/index.js",
70
- "start": "node dist/index.js",
71
- "format:write": "prettier --write \"**/*.{ts,tsx,mdx}\" --cache",
72
- "format:check": "prettier --check \"**/*.{ts,tsx,mdx}\" --cache",
73
- "release": "changeset version",
74
- "pub:beta": "pnpm build && pnpm publish --no-git-checks --access public --tag beta",
75
- "pub:next": "pnpm build && pnpm publish --no-git-checks --access public --tag next",
76
- "pub:release": "pnpm build && pnpm publish --access public",
77
- "test": "vitest run",
78
- "test:dev": "REGISTRY_URL=http://localhost:4000/r SHADCN_TEMPLATE_DIR=../../templates vitest run",
79
- "mcp:inspect": "pnpm dlx @modelcontextprotocol/inspector node dist/index.js mcp"
80
- },
81
63
  "dependencies": {
82
64
  "@antfu/ni": "^25.0.0",
83
65
  "@babel/core": "^7.28.0",
@@ -124,5 +106,23 @@
124
106
  "tsup": "^8.5.0",
125
107
  "type-fest": "^4.41.0",
126
108
  "typescript": "^5.9.2"
109
+ },
110
+ "scripts": {
111
+ "dev": "tsup --watch",
112
+ "build": "tsup",
113
+ "typecheck": "tsc --noEmit",
114
+ "clean": "rimraf dist && rimraf components",
115
+ "start:dev": "cross-env REGISTRY_URL=http://localhost:4000/r SHADCN_TEMPLATE_DIR=../../templates node dist/index.js",
116
+ "start:prod": "cross-env REGISTRY_URL=https://ui.shadcn.com/r node dist/index.js",
117
+ "start": "node dist/index.js",
118
+ "format:write": "prettier --write \"**/*.{ts,tsx,mdx}\" --cache",
119
+ "format:check": "prettier --check \"**/*.{ts,tsx,mdx}\" --cache",
120
+ "release": "changeset version",
121
+ "pub:beta": "pnpm build && pnpm publish --no-git-checks --access public --tag beta",
122
+ "pub:next": "pnpm build && pnpm publish --no-git-checks --access public --tag next",
123
+ "pub:release": "pnpm build && pnpm publish --access public",
124
+ "test": "vitest run",
125
+ "test:dev": "REGISTRY_URL=http://localhost:4000/r SHADCN_TEMPLATE_DIR=../../templates vitest run",
126
+ "mcp:inspect": "pnpm dlx @modelcontextprotocol/inspector node dist/index.js mcp"
127
127
  }
128
- }
128
+ }