@storybook/mcp 10.6.0-alpha.8 → 10.6.0-beta.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.
Files changed (2) hide show
  1. package/dist/index.js +21 -10
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_k1lte63wj9c from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_k1lte63wj9c from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_k1lte63wj9c from "node:module";
1
+ import CJS_COMPAT_NODE_URL_91qn8bbgm1i from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_91qn8bbgm1i from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_91qn8bbgm1i from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_k1lte63wj9c.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_k1lte63wj9c.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_k1lte63wj9c.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_91qn8bbgm1i.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_91qn8bbgm1i.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_91qn8bbgm1i.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -24,7 +24,7 @@ import { HttpTransport } from "@tmcp/transport-http";
24
24
  // package.json
25
25
  var package_default = {
26
26
  name: "@storybook/mcp",
27
- version: "10.6.0-alpha.8",
27
+ version: "10.6.0-beta.0",
28
28
  description: "MCP server that serves knowledge about your components based on your Storybook stories and documentation",
29
29
  keywords: [
30
30
  "mcp",
@@ -99,7 +99,7 @@ function words(str) {
99
99
  return Array.from(str.match(CASE_SPLIT_PATTERN) ?? []);
100
100
  }
101
101
 
102
- // ../../core/dist/_browser-chunks/chunk-JXXYKX5V.js
102
+ // ../../core/dist/_browser-chunks/chunk-TYQWMAQX.js
103
103
  function kebabCase(str) {
104
104
  return words(str).map((word) => word.toLowerCase()).join("-");
105
105
  }
@@ -126,10 +126,21 @@ function toMcpToolName(method) {
126
126
  return `${kebabCase(toolsetId)}-${toCliMethodName(methodName)}`;
127
127
  }
128
128
  function getToolName(context) {
129
- return (method) => context.transport === "mcp" ? toMcpToolName(method) : `npx storybook tools ${toCliPath(method)}`;
129
+ return (method) => {
130
+ switch (context.transport) {
131
+ case "mcp":
132
+ return toMcpToolName(method);
133
+ case "cli":
134
+ return `npx storybook tools ${toCliPath(method)}`;
135
+ case "sdk":
136
+ return method;
137
+ default:
138
+ return context.transport;
139
+ }
140
+ };
130
141
  }
131
142
 
132
- // ../../core/dist/_browser-chunks/chunk-EBJTI6BD.js
143
+ // ../../core/dist/_browser-chunks/chunk-KJ7GNWII.js
133
144
  function getDocsToolsetInstructions(transport) {
134
145
  let ref = getToolName({ transport });
135
146
  return `## Documentation Workflow
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/mcp",
3
- "version": "10.6.0-alpha.8",
3
+ "version": "10.6.0-beta.0",
4
4
  "description": "MCP server that serves knowledge about your components based on your Storybook stories and documentation",
5
5
  "keywords": [
6
6
  "mcp",
@@ -49,7 +49,7 @@
49
49
  "react-docgen": "^8.0.2",
50
50
  "react-docgen-typescript": "^2.4.0",
51
51
  "srvx": "^0.8.16",
52
- "storybook": "10.6.0-alpha.8",
52
+ "storybook": "10.6.0-beta.0",
53
53
  "tinyexec": "^1.0.2",
54
54
  "typescript": "^6.0.3"
55
55
  },