@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.
@@ -1,4 +1,4 @@
1
- import { h as RuntimeClientOptions } from '../types-BKXdHkwk.cjs';
1
+ import { h as RuntimeClientOptions } from '../types-DAx3jHdz.cjs';
2
2
  import 'hookable';
3
3
  import 'vite';
4
4
 
@@ -1,4 +1,4 @@
1
- import { h as RuntimeClientOptions } from '../types-BKXdHkwk.js';
1
+ import { h as RuntimeClientOptions } from '../types-DAx3jHdz.js';
2
2
  import 'hookable';
3
3
  import 'vite';
4
4
 
@@ -146,13 +146,14 @@ function installConsoleHook(options) {
146
146
  debug: console.debug
147
147
  };
148
148
  const emit = (level, args) => {
149
+ const serializedArgs = serializeConsoleArgs(args);
149
150
  options.send({
150
151
  id: nanoid(),
151
152
  pageId: options.pageId,
152
153
  source: "hook",
153
154
  level,
154
- message: args.map((arg) => safeStringify(arg)).join(" "),
155
- args,
155
+ message: serializedArgs.join(" "),
156
+ args: serializedArgs,
156
157
  timestamp: Date.now()
157
158
  });
158
159
  };
@@ -179,6 +180,9 @@ function installConsoleHook(options) {
179
180
  window.removeEventListener("error", onError);
180
181
  };
181
182
  }
183
+ function serializeConsoleArgs(args) {
184
+ return args.map((arg) => safeStringify(arg));
185
+ }
182
186
 
183
187
  // src/runtime/elementRegistry.ts
184
188
  import { nanoid as nanoid2 } from "nanoid";