@mcp-use/cli 2.6.0-canary.7 → 2.6.0-canary.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.cjs +10 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -3411,6 +3411,14 @@ async function buildWidgets(projectPath) {
|
|
|
3411
3411
|
console.log(source_default.gray(`Building ${entries.length} widget(s)...`));
|
|
3412
3412
|
const react = (await import("@vitejs/plugin-react")).default;
|
|
3413
3413
|
const tailwindcss = (await import("@tailwindcss/vite")).default;
|
|
3414
|
+
const packageJsonPath = path5.join(projectPath, "package.json");
|
|
3415
|
+
let favicon = "";
|
|
3416
|
+
try {
|
|
3417
|
+
const pkgContent = await fs9.readFile(packageJsonPath, "utf-8");
|
|
3418
|
+
const pkg = JSON.parse(pkgContent);
|
|
3419
|
+
favicon = pkg.mcpUse?.favicon || "";
|
|
3420
|
+
} catch {
|
|
3421
|
+
}
|
|
3414
3422
|
const builtWidgets = [];
|
|
3415
3423
|
for (const entry of entries) {
|
|
3416
3424
|
const widgetName = entry.name;
|
|
@@ -3444,7 +3452,8 @@ if (container && Component) {
|
|
|
3444
3452
|
<head>
|
|
3445
3453
|
<meta charset="UTF-8" />
|
|
3446
3454
|
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
|
3447
|
-
<title>${widgetName} Widget</title
|
|
3455
|
+
<title>${widgetName} Widget</title>${favicon ? `
|
|
3456
|
+
<link rel="icon" href="/mcp-use/public/${favicon}" />` : ""}
|
|
3448
3457
|
</head>
|
|
3449
3458
|
<body>
|
|
3450
3459
|
<div id="widget-root"></div>
|