shadcn-vue 2.7.2 → 2.7.4
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.
- package/dist/{api-DIv5FGuT.d.ts → api-Ba3aHwCX.d.ts} +3 -3
- package/dist/{api-DIv5FGuT.d.ts.map → api-Ba3aHwCX.d.ts.map} +1 -1
- package/dist/icons/index.d.ts +3 -3
- package/dist/icons/index.d.ts.map +1 -1
- package/dist/icons/index.js +3 -3
- package/dist/icons/index.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +39 -68
- package/dist/index.js.map +1 -1
- package/dist/mcp/index.js +3 -3
- package/dist/{mcp-DTXGTqSC.js → mcp-D65MaH3A.js} +2 -2
- package/dist/{mcp-DTXGTqSC.js.map → mcp-D65MaH3A.js.map} +1 -1
- package/dist/registry/index.d.ts +1 -1
- package/dist/registry/index.js +2 -2
- package/dist/{registry-AuS-7q5e.js → registry-BZ439r4u.js} +102 -47
- package/dist/registry-BZ439r4u.js.map +1 -0
- package/dist/{transform-menu-CrSgzEag.js → transform-menu-ZTp9ez-j.js} +50 -6
- package/dist/transform-menu-ZTp9ez-j.js.map +1 -0
- package/dist/utils/index.js +1 -1
- package/package.json +2 -2
- package/dist/registry-AuS-7q5e.js.map +0 -1
- package/dist/transform-menu-CrSgzEag.js.map +0 -1
|
@@ -649,7 +649,7 @@ declare function getRegistryVisualStyles(): readonly [{
|
|
|
649
649
|
declare function getRegistryIconLibraries(): readonly [{
|
|
650
650
|
readonly name: "lucide";
|
|
651
651
|
readonly label: "Lucide";
|
|
652
|
-
readonly packages: readonly ["lucide
|
|
652
|
+
readonly packages: readonly ["@lucide/vue"];
|
|
653
653
|
}, {
|
|
654
654
|
readonly name: "tabler";
|
|
655
655
|
readonly label: "Tabler Icons";
|
|
@@ -814,7 +814,7 @@ declare function getRegistryVisualStyle(name: string): {
|
|
|
814
814
|
declare function getRegistryIconLibrary(name: string): {
|
|
815
815
|
readonly name: "lucide";
|
|
816
816
|
readonly label: "Lucide";
|
|
817
|
-
readonly packages: readonly ["lucide
|
|
817
|
+
readonly packages: readonly ["@lucide/vue"];
|
|
818
818
|
} | {
|
|
819
819
|
readonly name: "tabler";
|
|
820
820
|
readonly label: "Tabler Icons";
|
|
@@ -1409,4 +1409,4 @@ declare function getRegistriesIndex(options?: {
|
|
|
1409
1409
|
}): Promise<Record<string, string>>;
|
|
1410
1410
|
//#endregion
|
|
1411
1411
|
export { resolveTree as C, resolveRegistryItems as S, getRegistryPresets as _, getRegistry as a, getRegistryVisualStyles as b, getRegistryBaseColors as c, getRegistryFonts as d, getRegistryIconLibraries as f, getRegistryPreset as g, getRegistryItems as h, getRegistriesIndex as i, getRegistryBases as l, getRegistryIcons as m, getItemTargetPath as n, getRegistryBase as o, getRegistryIconLibrary as p, getRegistriesConfig as r, getRegistryBaseColor as s, fetchTree as t, getRegistryFont as u, getRegistryStyles as v, getShadcnRegistryIndex as x, getRegistryVisualStyle as y };
|
|
1412
|
-
//# sourceMappingURL=api-
|
|
1412
|
+
//# sourceMappingURL=api-Ba3aHwCX.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-
|
|
1
|
+
{"version":3,"file":"api-Ba3aHwCX.d.ts","names":[],"sources":["../src/registry/api.ts"],"sourcesContent":[],"mappings":";;;;;iBA8CsB,WAAA,sBAGD;WAAR,QAAQ;EAHC,QAAA,CAAA,EAAA,OAAW;CAGZ,CAAA,EAElB,OAFkB,CAAA;EAAR,IAAA,EAAA,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;QAEV,KAAA,CAAA,EAAA,MAAA,GAAA,SAAA;QAAA,EAAA,CAAA,EAAA,MAAA,GAAA,SAAA;QAgDmB,GAAA,CAAA,EAAA,MAAgB,GAAA,SAAA;QAGjB,KAAA,CAAA,EAAA,MAAA,GAAA,SAAA;QAAR,WAAA,CAAA,EAAA,MAAA,GAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;MAEV,IA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAUA,iBAAA;;;;;;;;;;;;;;;;iBAOM,oBAAA,qBAAsC;;;;;;;;;;;;;;;;;;;;;iBAqBtC,WAAA,QACb,CAAA,CAAE,aAAa,wCACP;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA4BK,SAAA,sBAEd,CAAA,CAAE,aAAa,uBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAgBrB,iBAAA,SACZ,cACF,KAAK,CAAA,CAAE,aAAa,kDACT;iBAqBG,kBAAA;;IAAmD,QAAA"}
|
package/dist/icons/index.d.ts
CHANGED
|
@@ -3,10 +3,10 @@ declare const iconLibraries: {
|
|
|
3
3
|
readonly lucide: {
|
|
4
4
|
readonly name: "lucide";
|
|
5
5
|
readonly title: "Lucide";
|
|
6
|
-
readonly packages: readonly ["lucide
|
|
7
|
-
readonly import: "import { ICON } from 'lucide
|
|
6
|
+
readonly packages: readonly ["@lucide/vue"];
|
|
7
|
+
readonly import: "import { ICON } from '@lucide/vue'";
|
|
8
8
|
readonly usage: "<ICON />";
|
|
9
|
-
readonly export: "lucide
|
|
9
|
+
readonly export: "@lucide/vue";
|
|
10
10
|
};
|
|
11
11
|
readonly tabler: {
|
|
12
12
|
readonly name: "tabler";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/icons/libraries.ts"],"sourcesContent":[],"mappings":";cAAa;EAAA,SAAA,MAAA,EA0CH;IAEE,SAAA,IAAa,EAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/icons/libraries.ts"],"sourcesContent":[],"mappings":";cAAa;EAAA,SAAA,MAAA,EA0CH;IAEE,SAAA,IAAa,EAAA,QAAU;IAEvB,SAAA,KAAW,EAAA,QAAG;IAEd,SAAA,QAAe,EAAA,SAAS,CAAA,aAAa,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAJrC,aAAA,UAAuB;KAEvB,WAAA,GAAc,oBAAoB;KAElC,eAAA,SAAwB"}
|
package/dist/icons/index.js
CHANGED
|
@@ -3,10 +3,10 @@ const iconLibraries = {
|
|
|
3
3
|
lucide: {
|
|
4
4
|
name: "lucide",
|
|
5
5
|
title: "Lucide",
|
|
6
|
-
packages: ["lucide
|
|
7
|
-
import: "import { ICON } from 'lucide
|
|
6
|
+
packages: ["@lucide/vue"],
|
|
7
|
+
import: "import { ICON } from '@lucide/vue'",
|
|
8
8
|
usage: "<ICON />",
|
|
9
|
-
export: "lucide
|
|
9
|
+
export: "@lucide/vue"
|
|
10
10
|
},
|
|
11
11
|
tabler: {
|
|
12
12
|
name: "tabler",
|
package/dist/icons/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/icons/libraries.ts"],"sourcesContent":["export const iconLibraries = {\n lucide: {\n name: 'lucide',\n title: 'Lucide',\n packages: ['lucide
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/icons/libraries.ts"],"sourcesContent":["export const iconLibraries = {\n lucide: {\n name: 'lucide',\n title: 'Lucide',\n packages: ['@lucide/vue'],\n import: 'import { ICON } from \\'@lucide/vue\\'',\n usage: '<ICON />',\n export: '@lucide/vue',\n },\n tabler: {\n name: 'tabler',\n title: 'Tabler Icons',\n packages: ['@tabler/icons-vue'],\n import: 'import { ICON } from \\'@tabler/icons-vue\\'',\n usage: '<ICON />',\n export: '@tabler/icons-vue',\n },\n hugeicons: {\n name: 'hugeicons',\n title: 'HugeIcons',\n packages: ['@hugeicons/vue', '@hugeicons/core-free-icons'],\n import:\n 'import { HugeiconsIcon } from \\'@hugeicons/vue\\'\\nimport { ICON } from \\'@hugeicons/core-free-icons\\';',\n usage: '<HugeiconsIcon :icon=\"ICON\" :strokeWidth=\"2\" />',\n export: '@hugeicons/core-free-icons',\n },\n phosphor: {\n name: 'phosphor',\n title: 'Phosphor Icons',\n packages: ['@phosphor-icons/vue'],\n import: 'import { ICON } from \\'@phosphor-icons/vue\\'',\n usage: '<ICON :strokeWidth=\"2\" />',\n export: '@phosphor-icons/vue',\n },\n remixicon: {\n name: 'remixicon',\n title: 'Remix Icon',\n packages: ['@remixicon/vue'],\n import: 'import { ICON } from \\'@remixicon/vue\\'',\n usage: '<ICON />',\n export: '@remixicon/vue',\n },\n} as const\n\nexport type IconLibraries = typeof iconLibraries\n\nexport type IconLibrary = IconLibraries[keyof IconLibraries]\n\nexport type IconLibraryName = keyof IconLibraries\n"],"mappings":";AAAA,MAAa,gBAAgB;CAC3B,QAAQ;EACN,MAAM;EACN,OAAO;EACP,UAAU,CAAC,cAAc;EACzB,QAAQ;EACR,OAAO;EACP,QAAQ;EACT;CACD,QAAQ;EACN,MAAM;EACN,OAAO;EACP,UAAU,CAAC,oBAAoB;EAC/B,QAAQ;EACR,OAAO;EACP,QAAQ;EACT;CACD,WAAW;EACT,MAAM;EACN,OAAO;EACP,UAAU,CAAC,kBAAkB,6BAA6B;EAC1D,QACE;EACF,OAAO;EACP,QAAQ;EACT;CACD,UAAU;EACR,MAAM;EACN,OAAO;EACP,UAAU,CAAC,sBAAsB;EACjC,QAAQ;EACR,OAAO;EACP,QAAQ;EACT;CACD,WAAW;EACT,MAAM;EACN,OAAO;EACP,UAAU,CAAC,iBAAiB;EAC5B,QAAQ;EACR,OAAO;EACP,QAAQ;EACT;CACF"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import "./index-VbcDxT_d.js";
|
|
3
3
|
import "./get-config-BRAQ-Tnk.js";
|
|
4
|
-
import { C as resolveTree, S as resolveRegistryItems, _ as getRegistryPresets, a as getRegistry, b as getRegistryVisualStyles, c as getRegistryBaseColors, d as getRegistryFonts, f as getRegistryIconLibraries, g as getRegistryPreset, h as getRegistryItems, i as getRegistriesIndex, l as getRegistryBases, m as getRegistryIcons, n as getItemTargetPath, o as getRegistryBase, p as getRegistryIconLibrary, r as getRegistriesConfig, s as getRegistryBaseColor, t as fetchTree, u as getRegistryFont, v as getRegistryStyles, x as getShadcnRegistryIndex, y as getRegistryVisualStyle } from "./api-
|
|
4
|
+
import { C as resolveTree, S as resolveRegistryItems, _ as getRegistryPresets, a as getRegistry, b as getRegistryVisualStyles, c as getRegistryBaseColors, d as getRegistryFonts, f as getRegistryIconLibraries, g as getRegistryPreset, h as getRegistryItems, i as getRegistriesIndex, l as getRegistryBases, m as getRegistryIcons, n as getItemTargetPath, o as getRegistryBase, p as getRegistryIconLibrary, r as getRegistriesConfig, s as getRegistryBaseColor, t as fetchTree, u as getRegistryFont, v as getRegistryStyles, x as getShadcnRegistryIndex, y as getRegistryVisualStyle } from "./api-Ba3aHwCX.js";
|
|
5
5
|
export { fetchTree, getItemTargetPath, getRegistriesConfig, getRegistriesIndex, getRegistry, getRegistryBase, getRegistryBaseColor, getRegistryBaseColors, getRegistryBases, getRegistryFont, getRegistryFonts, getRegistryIconLibraries, getRegistryIconLibrary, getRegistryIcons, getRegistryItems, getRegistryPreset, getRegistryPresets, getRegistryStyles, getRegistryVisualStyle, getRegistryVisualStyles, getShadcnRegistryIndex, resolveRegistryItems, resolveTree };
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as
|
|
2
|
+
import { a as BASES, c as DEPRECATED_COMPONENTS, d as ICON_LIBRARIES$1, i as replaceIconLibraryInDependencies, m as STYLES, o as BASE_COLORS, p as SHADCN_VUE_URL, r as ICON_LIBRARIES, s as BUILTIN_REGISTRIES, u as FONTS } from "./transform-menu-ZTp9ez-j.js";
|
|
3
3
|
import { _ as registryItemSchema, a as rawConfigSchema, x as registrySchema } from "./schema-CjAXtlQ7.js";
|
|
4
|
-
import { $ as
|
|
4
|
+
import { $ as findExistingEnvFile, A as resolveRegistryItems, B as _getQuoteChar, C as getRegistryItems, D as getRegistryVisualStyle, E as getRegistryStyles, F as resolveInitUrl, G as clearRegistryContext, H as handleError, I as resolveRegistryBaseConfig, J as updateFiles, K as isUniversalRegistryItem, L as ensureRegistriesInConfig, M as DEFAULT_PRESETS, N as promptForBase, O as getRegistryVisualStyles, P as promptForPreset, Q as logger, R as resolveRegistryTree, S as getRegistryIcons, T as getRegistryPresets, Tt as highlighter, U as buildUrlAndHeadersForRegistryItem, V as updateTailwindConfig, W as validateRegistryConfigForItems, X as transformRtl, Y as transform$1, Z as spinner, _ as getRegistryBases, a as getProjectTailwindVersionFromConfig, at as DEFAULT_TAILWIND_CONFIG, b as getRegistryIconLibraries, c as getPackageInfo, ct as createConfig, d as getRegistriesConfig, dt as getConfig, et as getNewEnvKeys, f as getRegistriesIndex, ft as getWorkspaceConfig, g as getRegistryBaseColors, h as getRegistryBaseColor, i as getProjectInfo, it as DEFAULT_COMPONENTS, j as resolveTree, k as getShadcnRegistryIndex, l as fetchTree, lt as findCommonRoot, m as getRegistryBase, n as getProjectComponents, nt as composeStyleId, o as getPackageManager, ot as DEFAULT_TAILWIND_CSS, p as getRegistry, pt as resolveConfigPaths, q as isUrl, r as getProjectConfig, rt as configWithDefaults, s as updateDependencies, st as DEFAULT_UTILS, t as searchRegistries, tt as mergeEnvContent, u as getItemTargetPath, ut as findPackageRoot, v as getRegistryFont, w as getRegistryPreset, x as getRegistryIconLibrary, y as getRegistryFonts, z as _createSourceFile } from "./registry-BZ439r4u.js";
|
|
5
5
|
import { p as decodePreset, v as isPresetCode } from "./preset-ByCdjgEv.js";
|
|
6
|
-
import { t as server } from "./mcp-
|
|
6
|
+
import { t as server } from "./mcp-D65MaH3A.js";
|
|
7
7
|
import { Command } from "commander";
|
|
8
8
|
import path, { isAbsolute, join, normalize, resolve, sep } from "pathe";
|
|
9
9
|
import prompts from "prompts";
|
|
@@ -12,18 +12,18 @@ import { existsSync, promises } from "fs";
|
|
|
12
12
|
import deepmerge from "deepmerge";
|
|
13
13
|
import fsExtra from "fs-extra";
|
|
14
14
|
import { glob } from "tinyglobby";
|
|
15
|
-
import * as fs from "fs/promises";
|
|
15
|
+
import * as fs$1 from "fs/promises";
|
|
16
16
|
import { tmpdir } from "os";
|
|
17
17
|
import { Project, ScriptKind, SyntaxKind } from "ts-morph";
|
|
18
18
|
import { transform } from "vue-metamorph";
|
|
19
19
|
import consola from "consola";
|
|
20
20
|
import { randomBytes } from "crypto";
|
|
21
|
+
import * as path$2 from "path";
|
|
22
|
+
import { addDevDependency, installDependencies } from "nypm";
|
|
21
23
|
import postcss from "postcss";
|
|
22
24
|
import AtRule from "postcss/lib/at-rule";
|
|
23
|
-
import { addDependency, detectPackageManager } from "nypm";
|
|
24
25
|
import { downloadTemplate } from "giget";
|
|
25
26
|
import { x } from "tinyexec";
|
|
26
|
-
import * as path$1 from "path";
|
|
27
27
|
import { diffLines } from "diff";
|
|
28
28
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
29
29
|
|
|
@@ -144,11 +144,11 @@ function isSafeTarget(targetPath, cwd) {
|
|
|
144
144
|
}
|
|
145
145
|
const normalizedTarget = normalize(decodedPath);
|
|
146
146
|
const normalizedRoot = normalize(cwd);
|
|
147
|
-
const hasPathTraversal = (path$
|
|
148
|
-
return path$
|
|
147
|
+
const hasPathTraversal = (path$3) => {
|
|
148
|
+
return path$3.replace(/\[\.\.\..*?\]/g, "").includes("..");
|
|
149
149
|
};
|
|
150
150
|
if (hasPathTraversal(normalizedTarget) || hasPathTraversal(decodedPath) || hasPathTraversal(targetPath)) return false;
|
|
151
|
-
const cleanPath = (path$
|
|
151
|
+
const cleanPath = (path$3) => path$3.replace(/\[\.\.\..*?\]/g, "");
|
|
152
152
|
const cleanTarget = cleanPath(targetPath);
|
|
153
153
|
const cleanDecoded = cleanPath(decodedPath);
|
|
154
154
|
if ([
|
|
@@ -206,7 +206,13 @@ function updateCssPlugin(css) {
|
|
|
206
206
|
if (!atRuleMatch) continue;
|
|
207
207
|
const [, name, params] = atRuleMatch;
|
|
208
208
|
if (name === "import") {
|
|
209
|
-
|
|
209
|
+
const normalizeImportParams = (p) => {
|
|
210
|
+
const trimmed = p.trim();
|
|
211
|
+
if (trimmed.startsWith("\"") && trimmed.endsWith("\"")) return trimmed.slice(1, -1);
|
|
212
|
+
if (trimmed.startsWith("'") && trimmed.endsWith("'")) return trimmed.slice(1, -1);
|
|
213
|
+
return trimmed;
|
|
214
|
+
};
|
|
215
|
+
if (!root.nodes?.find((node) => node.type === "atrule" && node.name === "import" && normalizeImportParams(node.params) === normalizeImportParams(params))) {
|
|
210
216
|
const importRule = postcss.atRule({
|
|
211
217
|
name: "import",
|
|
212
218
|
params,
|
|
@@ -989,31 +995,6 @@ function isColorValue(value) {
|
|
|
989
995
|
return value.startsWith("hsl") || value.startsWith("rgb") || value.startsWith("#") || value.startsWith("oklch") || value.includes("var(--color-");
|
|
990
996
|
}
|
|
991
997
|
|
|
992
|
-
//#endregion
|
|
993
|
-
//#region src/utils/updaters/update-dependencies.ts
|
|
994
|
-
async function updateDependencies(dependencies, devDependencies, config, options) {
|
|
995
|
-
dependencies = Array.from(new Set(dependencies));
|
|
996
|
-
devDependencies = Array.from(new Set(devDependencies));
|
|
997
|
-
if (!dependencies?.length && !devDependencies?.length) return;
|
|
998
|
-
options = {
|
|
999
|
-
silent: false,
|
|
1000
|
-
...options
|
|
1001
|
-
};
|
|
1002
|
-
const dependenciesSpinner = spinner(`Installing dependencies.`, { silent: options.silent })?.start();
|
|
1003
|
-
dependenciesSpinner?.start();
|
|
1004
|
-
if (dependencies?.length) await addDependency(dependencies, {
|
|
1005
|
-
cwd: config.resolvedPaths.cwd,
|
|
1006
|
-
silent: true,
|
|
1007
|
-
dev: false
|
|
1008
|
-
});
|
|
1009
|
-
if (devDependencies?.length) await addDependency(devDependencies, {
|
|
1010
|
-
cwd: config.resolvedPaths.cwd,
|
|
1011
|
-
silent: true,
|
|
1012
|
-
dev: true
|
|
1013
|
-
});
|
|
1014
|
-
dependenciesSpinner?.succeed();
|
|
1015
|
-
}
|
|
1016
|
-
|
|
1017
998
|
//#endregion
|
|
1018
999
|
//#region src/utils/updaters/update-env-vars.ts
|
|
1019
1000
|
async function updateEnvVars(envVars, config, options) {
|
|
@@ -1112,7 +1093,7 @@ async function addProjectComponents(components, config, options) {
|
|
|
1112
1093
|
});
|
|
1113
1094
|
await updateCss(tree.css, config, { silent: options.silent });
|
|
1114
1095
|
await updateEnvVars(tree.envVars, config, { silent: options.silent });
|
|
1115
|
-
await updateDependencies(tree.dependencies, tree.devDependencies, config, { silent: options.silent });
|
|
1096
|
+
await updateDependencies(replaceIconLibraryInDependencies(tree.dependencies, config.iconLibrary), tree.devDependencies, config, { silent: options.silent });
|
|
1116
1097
|
await updateFiles(tree.files, config, {
|
|
1117
1098
|
overwrite: options.overwrite,
|
|
1118
1099
|
silent: options.silent,
|
|
@@ -1166,7 +1147,7 @@ async function addWorkspaceComponents(components, config, workspaceConfig, optio
|
|
|
1166
1147
|
filesUpdated.push(path.relative(workspaceRoot, mainTargetConfig.resolvedPaths.tailwindCss));
|
|
1167
1148
|
}
|
|
1168
1149
|
if (tree.envVars) await updateEnvVars(tree.envVars, mainTargetConfig, { silent: true });
|
|
1169
|
-
await updateDependencies(tree.dependencies, tree.devDependencies, mainTargetConfig, { silent: true });
|
|
1150
|
+
await updateDependencies(replaceIconLibraryInDependencies(tree.dependencies, mainTargetConfig.iconLibrary), tree.devDependencies, mainTargetConfig, { silent: true });
|
|
1170
1151
|
const filesByType = /* @__PURE__ */ new Map();
|
|
1171
1152
|
for (const file of tree.files ?? []) {
|
|
1172
1153
|
const type = file.type || "registry:ui";
|
|
@@ -1320,7 +1301,7 @@ async function createProject(options) {
|
|
|
1320
1301
|
template = type ?? template;
|
|
1321
1302
|
projectName = name ?? projectName;
|
|
1322
1303
|
}
|
|
1323
|
-
const packageManager = await
|
|
1304
|
+
const packageManager = await getPackageManager(options.cwd, { withFallback: true });
|
|
1324
1305
|
const projectPath = `${options.cwd}/${projectName}`;
|
|
1325
1306
|
try {
|
|
1326
1307
|
await fsExtra.access(options.cwd, fsExtra.constants.W_OK);
|
|
@@ -1348,9 +1329,10 @@ async function createProject(options) {
|
|
|
1348
1329
|
pkg.name = projectName;
|
|
1349
1330
|
await fsExtra.writeJson(pkgPath, pkg, { spaces: 2 });
|
|
1350
1331
|
await x("git", ["init"], { nodeOptions: { cwd: projectPath } });
|
|
1351
|
-
await
|
|
1352
|
-
|
|
1353
|
-
|
|
1332
|
+
await installDependencies({
|
|
1333
|
+
cwd: projectPath,
|
|
1334
|
+
packageManager,
|
|
1335
|
+
silent: true
|
|
1354
1336
|
});
|
|
1355
1337
|
createSpinner?.succeed(`Created a new ${template} project.`);
|
|
1356
1338
|
} catch (error) {
|
|
@@ -2451,11 +2433,11 @@ const buildOptionsSchema = z.object({
|
|
|
2451
2433
|
const build = new Command().name("build").description("build components for a shadcn-vue registry").argument("[registry]", "path to registry.json file", "./registry.json").option("-o, --output <path>", "destination directory for json files", "./public/r").option("-c, --cwd <cwd>", "the working directory. defaults to the current directory.", process.cwd()).action(async (registry, opts) => {
|
|
2452
2434
|
try {
|
|
2453
2435
|
const { resolvePaths } = await preFlightBuild(buildOptionsSchema.parse({
|
|
2454
|
-
cwd: path$
|
|
2436
|
+
cwd: path$2.resolve(opts.cwd),
|
|
2455
2437
|
registryFile: registry,
|
|
2456
2438
|
outputDir: opts.output
|
|
2457
2439
|
}));
|
|
2458
|
-
const content = await fs.readFile(resolvePaths.registryFile, "utf-8");
|
|
2440
|
+
const content = await fs$1.readFile(resolvePaths.registryFile, "utf-8");
|
|
2459
2441
|
const result = registrySchema.safeParse(JSON.parse(content));
|
|
2460
2442
|
if (!result.success) {
|
|
2461
2443
|
logger.error(`Invalid registry file found at ${highlighter.info(resolvePaths.registryFile)}.`);
|
|
@@ -2465,15 +2447,15 @@ const build = new Command().name("build").description("build components for a sh
|
|
|
2465
2447
|
for (const registryItem of result.data.items) {
|
|
2466
2448
|
buildSpinner.start(`Building ${registryItem.name}...`);
|
|
2467
2449
|
registryItem.$schema = "https://shadcn-vue.com/schema/registry-item.json";
|
|
2468
|
-
for (const file of registryItem.files ?? []) file.content = (await fs.readFile(path$
|
|
2450
|
+
for (const file of registryItem.files ?? []) file.content = (await fs$1.readFile(path$2.resolve(resolvePaths.cwd, file.path), "utf-8")).replace(/\r\n/g, "\n");
|
|
2469
2451
|
const result$1 = registryItemSchema.safeParse(registryItem);
|
|
2470
2452
|
if (!result$1.success) {
|
|
2471
2453
|
logger.error(`Invalid registry item found for ${highlighter.info(registryItem.name)}.`);
|
|
2472
2454
|
continue;
|
|
2473
2455
|
}
|
|
2474
|
-
await fs.writeFile(path$
|
|
2456
|
+
await fs$1.writeFile(path$2.resolve(resolvePaths.outputDir, `${result$1.data.name}.json`), JSON.stringify(result$1.data, null, 2));
|
|
2475
2457
|
}
|
|
2476
|
-
await fs.copyFile(resolvePaths.registryFile, path$
|
|
2458
|
+
await fs$1.copyFile(resolvePaths.registryFile, path$2.resolve(resolvePaths.outputDir, "registry.json"));
|
|
2477
2459
|
buildSpinner.succeed("Building registry.");
|
|
2478
2460
|
} catch (error) {
|
|
2479
2461
|
logger.break();
|
|
@@ -2614,11 +2596,7 @@ const docs = new Command().name("docs").description("get docs, api references an
|
|
|
2614
2596
|
const metaLinks = (item.meta?.links)?.[base];
|
|
2615
2597
|
let links;
|
|
2616
2598
|
if (metaLinks && Object.keys(metaLinks).length > 0) links = metaLinks;
|
|
2617
|
-
else {
|
|
2618
|
-
const fallbackUrl = `${SHADCN_VUE_URL}/docs/components/${component}`;
|
|
2619
|
-
logger.debug(`No registry links found for ${highlighter.info(component)} (base: ${highlighter.info(base)}). Using best-effort fallback: ${fallbackUrl}`);
|
|
2620
|
-
links = { docs: fallbackUrl };
|
|
2621
|
-
}
|
|
2599
|
+
else links = { docs: `${SHADCN_VUE_URL}/docs/components/${component}` };
|
|
2622
2600
|
results.push({
|
|
2623
2601
|
component,
|
|
2624
2602
|
base,
|
|
@@ -2774,15 +2752,8 @@ mcp.command("init").description("Initialize MCP configuration for your client").
|
|
|
2774
2752
|
if (options.client === "codex") {
|
|
2775
2753
|
if (config) await updateDependencies([], DEPENDENCIES, config, { silent: false });
|
|
2776
2754
|
else {
|
|
2777
|
-
const packageManager = await detectPackageManager(options.cwd);
|
|
2778
|
-
const installCommand = packageManager?.name === "npm" ? "install" : "add";
|
|
2779
|
-
const devFlag = packageManager?.name === "npm" ? "--save-dev" : "-D";
|
|
2780
2755
|
const installSpinner = spinner("Installing dependencies...").start();
|
|
2781
|
-
await
|
|
2782
|
-
installCommand,
|
|
2783
|
-
devFlag,
|
|
2784
|
-
...DEPENDENCIES
|
|
2785
|
-
], { nodeOptions: { cwd: options.cwd } });
|
|
2756
|
+
await installMcpDependencies(options.cwd);
|
|
2786
2757
|
installSpinner.succeed("Installing dependencies.");
|
|
2787
2758
|
}
|
|
2788
2759
|
logger.break();
|
|
@@ -2804,15 +2775,8 @@ args = ["shadcn-vue@${SHADCN_MCP_VERSION}", "mcp"]`);
|
|
|
2804
2775
|
configSpinner.succeed("Configuring MCP server.");
|
|
2805
2776
|
if (config) await updateDependencies([], DEPENDENCIES, config, { silent: false });
|
|
2806
2777
|
else {
|
|
2807
|
-
const packageManager = await detectPackageManager(options.cwd);
|
|
2808
|
-
const installCommand = packageManager?.name === "npm" ? "install" : "add";
|
|
2809
|
-
const devFlag = packageManager?.name === "npm" ? "--save-dev" : "-D";
|
|
2810
2778
|
const installSpinner = spinner("Installing dependencies...").start();
|
|
2811
|
-
await
|
|
2812
|
-
installCommand,
|
|
2813
|
-
devFlag,
|
|
2814
|
-
...DEPENDENCIES
|
|
2815
|
-
], { nodeOptions: { cwd: options.cwd } });
|
|
2779
|
+
await installMcpDependencies(options.cwd);
|
|
2816
2780
|
installSpinner.succeed("Installing dependencies.");
|
|
2817
2781
|
}
|
|
2818
2782
|
logger.break();
|
|
@@ -2839,6 +2803,13 @@ async function runMcpInit(options) {
|
|
|
2839
2803
|
await promises.writeFile(configPath, `${JSON.stringify(mergedConfig, null, 2)}\n`, "utf-8");
|
|
2840
2804
|
return clientInfo.configPath;
|
|
2841
2805
|
}
|
|
2806
|
+
async function installMcpDependencies(cwd) {
|
|
2807
|
+
await addDevDependency(DEPENDENCIES, {
|
|
2808
|
+
cwd,
|
|
2809
|
+
packageManager: await getPackageManager(cwd, { withFallback: true }),
|
|
2810
|
+
silent: true
|
|
2811
|
+
});
|
|
2812
|
+
}
|
|
2842
2813
|
|
|
2843
2814
|
//#endregion
|
|
2844
2815
|
//#region src/migrations/migrate-icons.ts
|
|
@@ -3183,7 +3154,7 @@ const view = new Command().name("view").description("view items from the registr
|
|
|
3183
3154
|
|
|
3184
3155
|
//#endregion
|
|
3185
3156
|
//#region package.json
|
|
3186
|
-
var version = "2.7.
|
|
3157
|
+
var version = "2.7.4";
|
|
3187
3158
|
|
|
3188
3159
|
//#endregion
|
|
3189
3160
|
//#region src/index.ts
|