@xiaou66/vite-plugin-vue-mcp-next 1.3.0 → 1.3.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/README.md CHANGED
@@ -528,7 +528,7 @@ interface ConsoleRecord {
528
528
  source: 'cdp' | 'hook'
529
529
  level: 'log' | 'info' | 'warn' | 'error' | 'debug'
530
530
  message: string
531
- args?: unknown[]
531
+ args?: string[]
532
532
  stack?: string
533
533
  timestamp: number
534
534
  }
package/dist/index.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Plugin } from 'vite';
2
- import { l as VueMcpNextOptions } from './types-BKXdHkwk.cjs';
3
- export { C as CdpOptions, a as ConsoleOptions, b as ConsoleRecord, c as CursorMcpConfig, D as DomOptions, E as ElementContextResult, d as ElementPickerOptions, e as ElementPickerShortcut, f as EvaluateOptions, M as McpClientConfigOptions, N as NetworkOptions, g as NetworkRecord, P as PageTarget, R as ResolvedVueMcpNextOptions, i as RuntimeElementContextRequest, j as RuntimeMode, k as RuntimeOptions, S as SkillConfigOptions, V as VueMcpNextContext } from './types-BKXdHkwk.cjs';
2
+ import { l as VueMcpNextOptions } from './types-DAx3jHdz.cjs';
3
+ export { C as CdpOptions, a as ConsoleOptions, b as ConsoleRecord, c as CursorMcpConfig, D as DomOptions, E as ElementContextResult, d as ElementPickerOptions, e as ElementPickerShortcut, f as EvaluateOptions, M as McpClientConfigOptions, N as NetworkOptions, g as NetworkRecord, P as PageTarget, R as ResolvedVueMcpNextOptions, i as RuntimeElementContextRequest, j as RuntimeMode, k as RuntimeOptions, S as SkillConfigOptions, V as VueMcpNextContext } from './types-DAx3jHdz.cjs';
4
4
  import 'hookable';
5
5
 
6
6
  /**
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Plugin } from 'vite';
2
- import { l as VueMcpNextOptions } from './types-BKXdHkwk.js';
3
- export { C as CdpOptions, a as ConsoleOptions, b as ConsoleRecord, c as CursorMcpConfig, D as DomOptions, E as ElementContextResult, d as ElementPickerOptions, e as ElementPickerShortcut, f as EvaluateOptions, M as McpClientConfigOptions, N as NetworkOptions, g as NetworkRecord, P as PageTarget, R as ResolvedVueMcpNextOptions, i as RuntimeElementContextRequest, j as RuntimeMode, k as RuntimeOptions, S as SkillConfigOptions, V as VueMcpNextContext } from './types-BKXdHkwk.js';
2
+ import { l as VueMcpNextOptions } from './types-DAx3jHdz.js';
3
+ export { C as CdpOptions, a as ConsoleOptions, b as ConsoleRecord, c as CursorMcpConfig, D as DomOptions, E as ElementContextResult, d as ElementPickerOptions, e as ElementPickerShortcut, f as EvaluateOptions, M as McpClientConfigOptions, N as NetworkOptions, g as NetworkRecord, P as PageTarget, R as ResolvedVueMcpNextOptions, i as RuntimeElementContextRequest, j as RuntimeMode, k as RuntimeOptions, S as SkillConfigOptions, V as VueMcpNextContext } from './types-DAx3jHdz.js';
4
4
  import 'hookable';
5
5
 
6
6
  /**
@@ -173,13 +173,14 @@ function installConsoleHook(options) {
173
173
  debug: console.debug
174
174
  };
175
175
  const emit = (level, args) => {
176
+ const serializedArgs = serializeConsoleArgs(args);
176
177
  options.send({
177
178
  id: (0, import_nanoid.nanoid)(),
178
179
  pageId: options.pageId,
179
180
  source: "hook",
180
181
  level,
181
- message: args.map((arg) => safeStringify(arg)).join(" "),
182
- args,
182
+ message: serializedArgs.join(" "),
183
+ args: serializedArgs,
183
184
  timestamp: Date.now()
184
185
  });
185
186
  };
@@ -206,6 +207,9 @@ function installConsoleHook(options) {
206
207
  window.removeEventListener("error", onError);
207
208
  };
208
209
  }
210
+ function serializeConsoleArgs(args) {
211
+ return args.map((arg) => safeStringify(arg));
212
+ }
209
213
 
210
214
  // src/runtime/elementRegistry.ts
211
215
  var import_nanoid2 = require("nanoid");