@mcpc-tech/unplugin-dev-inspector-mcp 0.0.27 → 0.0.29
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/client/dist/inspector.iife.js +327 -327
- package/dist/cli.cjs +7 -7
- package/dist/config-updater.cjs +9962 -9954
- package/dist/config-updater.js +9924 -9916
- package/dist/index.cjs +10 -10
- package/dist/index.d.cts +4 -4
- package/dist/loader.cjs +2 -2
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -4,16 +4,16 @@ const require_config_updater = require('./config-updater.cjs');
|
|
|
4
4
|
let node_module = require("node:module");
|
|
5
5
|
let node_path = require("node:path");
|
|
6
6
|
node_path = require_chunk.__toESM(node_path);
|
|
7
|
-
let
|
|
8
|
-
let
|
|
7
|
+
let _modelcontextprotocol_sdk_client_index_js = require("@modelcontextprotocol/sdk/client/index.js");
|
|
8
|
+
let _modelcontextprotocol_sdk_client_sse_js = require("@modelcontextprotocol/sdk/client/sse.js");
|
|
9
9
|
let node_url = require("node:url");
|
|
10
|
-
let
|
|
10
|
+
let _babel_parser = require("@babel/parser");
|
|
11
11
|
let magic_string = require("magic-string");
|
|
12
12
|
magic_string = require_chunk.__toESM(magic_string);
|
|
13
13
|
let unplugin = require("unplugin");
|
|
14
|
-
let
|
|
14
|
+
let _vue_compiler_sfc = require("@vue/compiler-sfc");
|
|
15
15
|
let svelte_compiler = require("svelte/compiler");
|
|
16
|
-
let
|
|
16
|
+
let _code_inspector_core = require("@code-inspector/core");
|
|
17
17
|
|
|
18
18
|
//#region src/utils/browser-launcher.ts
|
|
19
19
|
var browser_launcher_exports = /* @__PURE__ */ require_chunk.__export({ launchBrowserWithDevTools: () => launchBrowserWithDevTools });
|
|
@@ -26,11 +26,11 @@ async function launchBrowserWithDevTools(options) {
|
|
|
26
26
|
const sseUrl = `http://${serverContext.host === "0.0.0.0" ? "localhost" : serverContext.host || "localhost"}:${serverContext.port || 5173}/__mcp__/sse?clientId=auto-browser`;
|
|
27
27
|
let client = null;
|
|
28
28
|
try {
|
|
29
|
-
client = new
|
|
29
|
+
client = new _modelcontextprotocol_sdk_client_index_js.Client({
|
|
30
30
|
name: "dev-inspector-auto-browser",
|
|
31
31
|
version: "1.0.0"
|
|
32
32
|
});
|
|
33
|
-
const transport = new
|
|
33
|
+
const transport = new _modelcontextprotocol_sdk_client_sse_js.SSEClientTransport(new URL(sseUrl));
|
|
34
34
|
await client.connect(transport);
|
|
35
35
|
await client.callTool({
|
|
36
36
|
name: "chrome_devtools",
|
|
@@ -307,7 +307,7 @@ function transformJSX({ code, id }) {
|
|
|
307
307
|
if (!code.includes("<")) return null;
|
|
308
308
|
let ast;
|
|
309
309
|
try {
|
|
310
|
-
ast = (0,
|
|
310
|
+
ast = (0, _babel_parser.parse)(code, {
|
|
311
311
|
sourceType: "module",
|
|
312
312
|
plugins: [
|
|
313
313
|
"jsx",
|
|
@@ -361,7 +361,7 @@ function normalizePath$1(id) {
|
|
|
361
361
|
const DATA_SOURCE_ATTR$1 = "data-source";
|
|
362
362
|
function compileVue({ code, id }) {
|
|
363
363
|
const relativePath = normalizePath$1(node_path.default.relative(process.cwd(), id));
|
|
364
|
-
const { descriptor } = (0,
|
|
364
|
+
const { descriptor } = (0, _vue_compiler_sfc.parse)(code, {
|
|
365
365
|
filename: id,
|
|
366
366
|
sourceMap: true
|
|
367
367
|
});
|
|
@@ -499,7 +499,7 @@ const unpluginExternal = createDevInspectorPlugin("unplugin-dev-inspector-extern
|
|
|
499
499
|
const fileType = detectFileType(id);
|
|
500
500
|
if (!fileType) return null;
|
|
501
501
|
try {
|
|
502
|
-
return (0,
|
|
502
|
+
return (0, _code_inspector_core.transformCode)({
|
|
503
503
|
content: code,
|
|
504
504
|
filePath: id,
|
|
505
505
|
fileType,
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as unplugin1 from "unplugin";
|
|
2
2
|
|
|
3
3
|
//#region src/utils/config-updater.d.ts
|
|
4
4
|
type EditorId = "cursor" | "vscode" | "windsurf" | "claude-code" | "antigravity";
|
|
@@ -134,10 +134,10 @@ interface DevInspectorOptions extends McpConfigOptions, AcpOptions {
|
|
|
134
134
|
}
|
|
135
135
|
//#endregion
|
|
136
136
|
//#region src/core.d.ts
|
|
137
|
-
declare const unplugin:
|
|
137
|
+
declare const unplugin: unplugin1.UnpluginInstance<DevInspectorOptions | undefined, boolean>;
|
|
138
138
|
//#endregion
|
|
139
139
|
//#region src/core-external.d.ts
|
|
140
|
-
declare const unpluginExternal:
|
|
140
|
+
declare const unpluginExternal: unplugin1.UnpluginInstance<DevInspectorOptions | undefined, boolean>;
|
|
141
141
|
//#endregion
|
|
142
142
|
//#region src/turbopack.d.ts
|
|
143
143
|
interface TurbopackDevInspectorOptions extends DevInspectorOptions {
|
|
@@ -162,7 +162,7 @@ interface TurbopackDevInspectorOptions extends DevInspectorOptions {
|
|
|
162
162
|
declare function turbopackDevInspector(options?: TurbopackDevInspectorOptions): any;
|
|
163
163
|
//#endregion
|
|
164
164
|
//#region src/index.d.ts
|
|
165
|
-
declare const external:
|
|
165
|
+
declare const external: unplugin1.UnpluginInstance<DevInspectorOptions | undefined, boolean>;
|
|
166
166
|
declare module "virtual:dev-inspector-mcp" {}
|
|
167
167
|
//#endregion
|
|
168
168
|
export { type CustomEditorConfig, type DevInspectorOptions, type EditorId, type McpConfigOptions, type TurbopackDevInspectorOptions, unplugin as default, unplugin, external, turbopackDevInspector, unpluginExternal };
|
package/dist/loader.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
2
|
const require_chunk = require('./chunk.cjs');
|
|
3
|
-
let
|
|
3
|
+
let _code_inspector_core = require("@code-inspector/core");
|
|
4
4
|
|
|
5
5
|
//#region src/loader.ts
|
|
6
6
|
function devInspectorLoader(source) {
|
|
@@ -10,7 +10,7 @@ function devInspectorLoader(source) {
|
|
|
10
10
|
const isVue = resourcePath.match(/\.vue$/);
|
|
11
11
|
const isSvelte = resourcePath.match(/\.svelte$/);
|
|
12
12
|
if (isJsx || isVue || isSvelte) try {
|
|
13
|
-
return (0,
|
|
13
|
+
return (0, _code_inspector_core.transformCode)({
|
|
14
14
|
content: source,
|
|
15
15
|
filePath: resourcePath,
|
|
16
16
|
fileType: isJsx ? "jsx" : isVue ? "vue" : "svelte",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcpc-tech/unplugin-dev-inspector-mcp",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.29",
|
|
4
4
|
"description": "Universal dev inspector plugin for React/Vue - inspect component sources and API calls in any bundler",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
"@babel/parser": "^7.28.5",
|
|
114
114
|
"@babel/traverse": "^7.28.5",
|
|
115
115
|
"@code-inspector/core": "^1.3.0",
|
|
116
|
-
"@mcpc-tech/acp-ai-provider": "^0.1.
|
|
116
|
+
"@mcpc-tech/acp-ai-provider": "^0.1.35",
|
|
117
117
|
"@mcpc-tech/cmcp": "^0.0.15",
|
|
118
118
|
"@mcpc-tech/core": "^0.3.8",
|
|
119
119
|
"@modelcontextprotocol/sdk": "^1.20.1",
|