@wot-ui/cli 0.0.1-beta.8 → 0.0.1-beta.9

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/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { a as resolveVersion, i as listComponents, n as lintProject, o as loadMetadataFile, r as findComponent, s as version, t as analyzeUsage } from "./scanner-DYthnCXr.mjs";
2
+ import { a as resolveVersion, i as listComponents, n as lintProject, o as loadMetadataFile, r as findComponent, s as version, t as analyzeUsage } from "./scanner-L5XVf4jh.mjs";
3
3
  import process from "node:process";
4
4
  import { Command } from "commander";
5
5
  import { existsSync, readFileSync } from "node:fs";
@@ -166,14 +166,8 @@ function getDependencyVersion(pkg, name) {
166
166
  return pkg?.dependencies?.[name] ?? pkg?.devDependencies?.[name];
167
167
  }
168
168
  function detectWotDependency(pkg) {
169
- for (const name of ["wot-design-uni", "wot-ui"]) {
170
- const version$1 = getDependencyVersion(pkg, name);
171
- if (version$1) return `${name}@${version$1}`;
172
- }
173
- if (pkg?.dependencies) {
174
- const scoped = Object.keys(pkg.dependencies).find((name) => name.includes("wot"));
175
- if (scoped) return `${scoped}@${pkg.dependencies[scoped]}`;
176
- }
169
+ const version$1 = getDependencyVersion(pkg, "@wot-ui/ui");
170
+ return version$1 ? `@wot-ui/ui@${version$1}` : void 0;
177
171
  }
178
172
  function createCheck(name, status, message, suggestion) {
179
173
  if (status === "pass") return {
@@ -203,7 +197,7 @@ function diagnoseProject(targetDir) {
203
197
  checks.push(createCheck("package-json", "pass", "package.json found."));
204
198
  const wotVersion = detectWotDependency(pkg);
205
199
  if (wotVersion) checks.push(createCheck("wot-ui-installed", "pass", `Detected ${wotVersion}.`));
206
- else checks.push(createCheck("wot-ui-installed", "fail", "No wot-ui dependency detected.", "Add wot-ui or wot-design-uni to dependencies before using doctor, usage, and lint."));
200
+ else checks.push(createCheck("wot-ui-installed", "fail", "No @wot-ui/ui dependency detected.", "Add @wot-ui/ui to dependencies before using doctor, usage, and lint."));
207
201
  const vueVersion = getDependencyVersion(pkg, "vue");
208
202
  if (vueVersion) checks.push(createCheck("vue-version", vueVersion.includes("3") ? "pass" : "warn", `Detected vue ${vueVersion}.`, vueVersion.includes("3") ? void 0 : "wot-ui v2 is designed for Vue 3 based projects."));
209
203
  else checks.push(createCheck("vue-version", "warn", "Vue dependency not found.", "Add vue@3 to align with wot-ui v2 expectations."));
@@ -328,7 +322,7 @@ function registerListCommand(program) {
328
322
  //#region src/commands/mcp.ts
329
323
  function registerMcpCommand(program) {
330
324
  program.command("mcp").description("Start the wot-ui MCP server").action(async () => {
331
- const { startMcpServer } = await import("./server-65ejz4L2.mjs");
325
+ const { startMcpServer } = await import("./server-BIz6B24d.mjs");
332
326
  await startMcpServer();
333
327
  });
334
328
  }
@@ -5,7 +5,7 @@ import { gunzipSync } from "node:zlib";
5
5
  import { parse } from "@vue/compiler-sfc";
6
6
 
7
7
  //#region package.json
8
- var version = "0.0.1-beta.8";
8
+ var version = "0.0.1-beta.9";
9
9
 
10
10
  //#endregion
11
11
  //#region src/data/loader.ts
@@ -1,4 +1,4 @@
1
- import { a as resolveVersion, i as listComponents, n as lintProject, o as loadMetadataFile, r as findComponent, s as version } from "./scanner-DYthnCXr.mjs";
1
+ import { a as resolveVersion, i as listComponents, n as lintProject, o as loadMetadataFile, r as findComponent, s as version } from "./scanner-L5XVf4jh.mjs";
2
2
  import process from "node:process";
3
3
  import { McpServer, StdioServerTransport } from "@modelcontextprotocol/server";
4
4
  import * as z from "zod/v4";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wot-ui/cli",
3
3
  "type": "module",
4
- "version": "0.0.1-beta.8",
4
+ "version": "0.0.1-beta.9",
5
5
  "description": "面向 wot-ui 的 CLI、MCP 与数据提取工具集",
6
6
  "license": "MIT",
7
7
  "funding": "https://github.com/sponsors/antfu",