@mcp-use/cli 2.6.0 → 2.6.1-canary.0
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.cjs
CHANGED
|
@@ -3246,6 +3246,7 @@ function createClientCommand() {
|
|
|
3246
3246
|
}
|
|
3247
3247
|
|
|
3248
3248
|
// src/index.ts
|
|
3249
|
+
var import_zod = require("zod");
|
|
3249
3250
|
var program = new import_commander2.Command();
|
|
3250
3251
|
var packageContent = (0, import_node_fs7.readFileSync)(
|
|
3251
3252
|
import_node_path5.default.join(__dirname, "../package.json"),
|
|
@@ -3590,14 +3591,30 @@ export default PostHog;
|
|
|
3590
3591
|
const mod = await metadataServer.ssrLoadModule(entryPath);
|
|
3591
3592
|
if (mod.widgetMetadata) {
|
|
3592
3593
|
const schemaField = mod.widgetMetadata.props || mod.widgetMetadata.inputs;
|
|
3594
|
+
let inputsValue = schemaField || {};
|
|
3595
|
+
if (schemaField && typeof schemaField === "object" && "~standard" in schemaField) {
|
|
3596
|
+
try {
|
|
3597
|
+
inputsValue = (0, import_zod.toJSONSchema)(schemaField);
|
|
3598
|
+
} catch (conversionError) {
|
|
3599
|
+
console.warn(
|
|
3600
|
+
source_default.yellow(
|
|
3601
|
+
` \u26A0 Could not convert schema for ${widgetName}, using raw schema`
|
|
3602
|
+
)
|
|
3603
|
+
);
|
|
3604
|
+
}
|
|
3605
|
+
}
|
|
3606
|
+
const {
|
|
3607
|
+
props: _rawProps,
|
|
3608
|
+
inputs: _rawInputs,
|
|
3609
|
+
...restMetadata
|
|
3610
|
+
} = mod.widgetMetadata;
|
|
3593
3611
|
widgetMetadata = {
|
|
3594
|
-
...
|
|
3612
|
+
...restMetadata,
|
|
3595
3613
|
title: mod.widgetMetadata.title || widgetName,
|
|
3596
3614
|
description: mod.widgetMetadata.description,
|
|
3597
|
-
//
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
inputs: schemaField || {}
|
|
3615
|
+
// Store the converted JSON Schema (props field is used by production mount)
|
|
3616
|
+
props: inputsValue,
|
|
3617
|
+
inputs: inputsValue
|
|
3601
3618
|
};
|
|
3602
3619
|
}
|
|
3603
3620
|
await new Promise((resolve) => setTimeout(resolve, 50));
|