@mcp-use/cli 2.11.0-canary.3 → 2.11.0-canary.5
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 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -7
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -4649,8 +4649,7 @@ async function buildWidgets(projectPath) {
|
|
|
4649
4649
|
favicon = pkg.mcpUse?.favicon || "";
|
|
4650
4650
|
} catch {
|
|
4651
4651
|
}
|
|
4652
|
-
const
|
|
4653
|
-
for (const entry of entries) {
|
|
4652
|
+
const buildSingleWidget = async (entry) => {
|
|
4654
4653
|
const widgetName = entry.name;
|
|
4655
4654
|
const entryPath = entry.path.replace(/\\/g, "/");
|
|
4656
4655
|
console.log(source_default.gray(` - Building ${widgetName}...`));
|
|
@@ -4990,15 +4989,19 @@ export default {
|
|
|
4990
4989
|
);
|
|
4991
4990
|
}
|
|
4992
4991
|
}
|
|
4993
|
-
builtWidgets.push({
|
|
4994
|
-
name: widgetName,
|
|
4995
|
-
metadata: widgetMetadata
|
|
4996
|
-
});
|
|
4997
4992
|
console.log(source_default.green(` \u2713 Built ${widgetName}`));
|
|
4993
|
+
return { name: widgetName, metadata: widgetMetadata };
|
|
4998
4994
|
} catch (error) {
|
|
4999
4995
|
console.error(source_default.red(` \u2717 Failed to build ${widgetName}:`), error);
|
|
4996
|
+
return null;
|
|
5000
4997
|
}
|
|
5001
|
-
}
|
|
4998
|
+
};
|
|
4999
|
+
const buildResults = await Promise.all(
|
|
5000
|
+
entries.map((entry) => buildSingleWidget(entry))
|
|
5001
|
+
);
|
|
5002
|
+
const builtWidgets = buildResults.filter(
|
|
5003
|
+
(result) => result !== null
|
|
5004
|
+
);
|
|
5002
5005
|
return builtWidgets;
|
|
5003
5006
|
}
|
|
5004
5007
|
program.command("build").description("Build TypeScript and MCP UI widgets").option("-p, --path <path>", "Path to project directory", process.cwd()).option("--with-inspector", "Include inspector in production build").action(async (options) => {
|