@mcp-use/cli 2.6.0 → 2.6.1
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 +22 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +22 -5
- package/dist/index.js.map +1 -1
- package/package.json +4 -3
package/dist/index.js
CHANGED
|
@@ -3228,6 +3228,7 @@ function createClientCommand() {
|
|
|
3228
3228
|
}
|
|
3229
3229
|
|
|
3230
3230
|
// src/index.ts
|
|
3231
|
+
import { toJSONSchema } from "zod";
|
|
3231
3232
|
var program = new Command2();
|
|
3232
3233
|
var packageContent = readFileSync(
|
|
3233
3234
|
path5.join(__dirname, "../package.json"),
|
|
@@ -3572,14 +3573,30 @@ export default PostHog;
|
|
|
3572
3573
|
const mod = await metadataServer.ssrLoadModule(entryPath);
|
|
3573
3574
|
if (mod.widgetMetadata) {
|
|
3574
3575
|
const schemaField = mod.widgetMetadata.props || mod.widgetMetadata.inputs;
|
|
3576
|
+
let inputsValue = schemaField || {};
|
|
3577
|
+
if (schemaField && typeof schemaField === "object" && "~standard" in schemaField) {
|
|
3578
|
+
try {
|
|
3579
|
+
inputsValue = toJSONSchema(schemaField);
|
|
3580
|
+
} catch (conversionError) {
|
|
3581
|
+
console.warn(
|
|
3582
|
+
source_default.yellow(
|
|
3583
|
+
` \u26A0 Could not convert schema for ${widgetName}, using raw schema`
|
|
3584
|
+
)
|
|
3585
|
+
);
|
|
3586
|
+
}
|
|
3587
|
+
}
|
|
3588
|
+
const {
|
|
3589
|
+
props: _rawProps,
|
|
3590
|
+
inputs: _rawInputs,
|
|
3591
|
+
...restMetadata
|
|
3592
|
+
} = mod.widgetMetadata;
|
|
3575
3593
|
widgetMetadata = {
|
|
3576
|
-
...
|
|
3594
|
+
...restMetadata,
|
|
3577
3595
|
title: mod.widgetMetadata.title || widgetName,
|
|
3578
3596
|
description: mod.widgetMetadata.description,
|
|
3579
|
-
//
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
inputs: schemaField || {}
|
|
3597
|
+
// Store the converted JSON Schema (props field is used by production mount)
|
|
3598
|
+
props: inputsValue,
|
|
3599
|
+
inputs: inputsValue
|
|
3583
3600
|
};
|
|
3584
3601
|
}
|
|
3585
3602
|
await new Promise((resolve) => setTimeout(resolve, 50));
|