@vitejs/devtools-vite 0.0.0-alpha.2 → 0.0.0-alpha.21

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 (94) hide show
  1. package/dist/{dirs-Z7VQHyIZ.js → dirs-BzX7rGLP.mjs} +1 -1
  2. package/dist/dirs.mjs +3 -0
  3. package/dist/index.d.mts +499 -0
  4. package/dist/index.mjs +9607 -0
  5. package/dist/nitro.json +3 -3
  6. package/dist/public/200.html +1 -1
  7. package/dist/public/404.html +1 -1
  8. package/dist/public/_nuxt/B6cncnam.js +1 -0
  9. package/dist/public/_nuxt/BaYRDImg.js +1 -0
  10. package/dist/public/_nuxt/Bij65W5n.js +1 -0
  11. package/dist/public/_nuxt/Bja_t-aS.js +1 -0
  12. package/dist/public/_nuxt/BrNGuicP.js +1 -0
  13. package/dist/public/_nuxt/BwW8gZ6K.js +1 -0
  14. package/dist/public/_nuxt/C8YTjkYM.js +1 -0
  15. package/dist/public/_nuxt/CDPpT6Cf.js +1 -0
  16. package/dist/public/_nuxt/CE23KUMI.js +1 -0
  17. package/dist/public/_nuxt/{BdGMcGSQ.js → CEj_FX93.js} +1 -1
  18. package/dist/public/_nuxt/CNlvL5ez.js +1 -0
  19. package/dist/public/_nuxt/CPYYHqxX.js +1 -0
  20. package/dist/public/_nuxt/CroQ9lcn.js +1 -0
  21. package/dist/public/_nuxt/Cu87lOT3.js +1 -0
  22. package/dist/public/_nuxt/D6yJLdbI.js +1 -0
  23. package/dist/public/_nuxt/DDRvb9yv.js +1 -0
  24. package/dist/public/_nuxt/DDTVi-ZV.js +33 -0
  25. package/dist/public/_nuxt/DHdbcQDR.js +1 -0
  26. package/dist/public/_nuxt/{DSjlpmm-.js → DJFg8Mze.js} +1 -1
  27. package/dist/public/_nuxt/DkNjWA7f.js +1 -0
  28. package/dist/public/_nuxt/DuSH8vtp.js +1 -0
  29. package/dist/public/_nuxt/{BQ-NBLhA.js → EZmie0b_.js} +1 -1
  30. package/dist/public/_nuxt/HyHtDydt.js +1 -0
  31. package/dist/public/_nuxt/L7giCKVM.js +1 -0
  32. package/dist/public/_nuxt/NkHXFX5A.js +1 -0
  33. package/dist/public/_nuxt/OEdZKRk6.js +1 -0
  34. package/dist/public/_nuxt/R6f4Y_SJ.js +1 -0
  35. package/dist/public/_nuxt/XY_il7uL.js +2 -0
  36. package/dist/public/_nuxt/{_session_.B0BbH92J.css → _session_.BXMlcDmB.css} +1 -1
  37. package/dist/public/_nuxt/builds/latest.json +1 -1
  38. package/dist/public/_nuxt/builds/meta/92f58f41-f5d8-4eb9-8df8-90c37ec07cf8.json +1 -0
  39. package/dist/public/_nuxt/diff.worker-CvsEE-qa.js +10 -0
  40. package/dist/public/_nuxt/entry.BVWKKagY.css +1 -0
  41. package/dist/public/_nuxt/error-404.DgDpC6Er.css +1 -0
  42. package/dist/public/_nuxt/error-500.CDOeHf8w.css +1 -0
  43. package/dist/public/_nuxt/jVJLbHmI.js +1 -0
  44. package/dist/public/_nuxt/kgaOZT0B.js +1 -0
  45. package/dist/public/_nuxt/mJg3pdS2.js +1 -0
  46. package/dist/public/_nuxt/s37iQDTO.js +1 -0
  47. package/dist/public/_nuxt/wlAuDjxN.js +4 -0
  48. package/dist/public/_nuxt/x1G1EAUP.js +1 -0
  49. package/dist/public/_nuxt/xtsFKyex.js +1 -0
  50. package/dist/public/index.html +1 -1
  51. package/package.json +25 -24
  52. package/dist/dirs.js +0 -3
  53. package/dist/index.d.ts +0 -118
  54. package/dist/index.js +0 -1465
  55. package/dist/public/_nuxt/B1Vd6rqS.js +0 -1
  56. package/dist/public/_nuxt/B2YLpys2.js +0 -1
  57. package/dist/public/_nuxt/B2fBtupD.js +0 -1
  58. package/dist/public/_nuxt/BBRXmiYk.js +0 -1
  59. package/dist/public/_nuxt/BL9XEsp7.js +0 -1
  60. package/dist/public/_nuxt/BO9hKuA-.js +0 -1
  61. package/dist/public/_nuxt/BcAccMwu.js +0 -1
  62. package/dist/public/_nuxt/BdSZoQls.js +0 -1
  63. package/dist/public/_nuxt/BjbaCuBE.js +0 -1
  64. package/dist/public/_nuxt/Bjr51Ks8.js +0 -1
  65. package/dist/public/_nuxt/BvuqupwD.js +0 -1
  66. package/dist/public/_nuxt/C2X_oPur.js +0 -1
  67. package/dist/public/_nuxt/C5J04JCq.js +0 -1
  68. package/dist/public/_nuxt/CQNn9qP2.js +0 -1
  69. package/dist/public/_nuxt/CS0-317H.js +0 -1
  70. package/dist/public/_nuxt/CciM0jEL.js +0 -1
  71. package/dist/public/_nuxt/CcwEApAr.js +0 -1
  72. package/dist/public/_nuxt/Ci9NHG69.js +0 -1
  73. package/dist/public/_nuxt/D1yk44lc.js +0 -1
  74. package/dist/public/_nuxt/DJTxkAFF.js +0 -11
  75. package/dist/public/_nuxt/DS2MKblJ.js +0 -1
  76. package/dist/public/_nuxt/DZeYNBxL.js +0 -1
  77. package/dist/public/_nuxt/D_Sk_I-u.js +0 -1
  78. package/dist/public/_nuxt/Dl8iHwQo.js +0 -2
  79. package/dist/public/_nuxt/IrMnfQaU.js +0 -1
  80. package/dist/public/_nuxt/Z5tyTJaP.js +0 -1
  81. package/dist/public/_nuxt/builds/meta/c3fb67dd-1302-42f7-af58-b6ed5d47dbe9.json +0 -1
  82. package/dist/public/_nuxt/cRQbgMUp.js +0 -1
  83. package/dist/public/_nuxt/diff.worker-BXxwMoGc.js +0 -10
  84. package/dist/public/_nuxt/entry.BiqpDmeM.css +0 -1
  85. package/dist/public/_nuxt/error-404.yUUAZDjV.css +0 -1
  86. package/dist/public/_nuxt/error-500.BHZzZRS-.css +0 -1
  87. package/dist/public/_nuxt/pXptjyzi.js +0 -1
  88. package/dist/public/_nuxt/rwBDQBzn.js +0 -1
  89. package/dist/public/_nuxt/tS5wJZMm.js +0 -1
  90. package/dist/public/_nuxt/yfNgynAH.js +0 -33
  91. package/dist/public/_nuxt/z9pSC1xM.js +0 -1
  92. /package/dist/{dirs.d.ts → dirs.d.mts} +0 -0
  93. /package/dist/public/_nuxt/{DnpfwSMy.js → Cvg1SSG2.js} +0 -0
  94. /package/dist/public/_nuxt/{l47FwQA-.js → jB8TYliU.js} +0 -0
@@ -4,4 +4,4 @@ import { fileURLToPath } from "node:url";
4
4
  const clientPublicDir = fileURLToPath(new URL("../dist/public", import.meta.url));
5
5
 
6
6
  //#endregion
7
- export { clientPublicDir };
7
+ export { clientPublicDir as t };
package/dist/dirs.mjs ADDED
@@ -0,0 +1,3 @@
1
+ import { t as clientPublicDir } from "./dirs-BzX7rGLP.mjs";
2
+
3
+ export { clientPublicDir };
@@ -0,0 +1,499 @@
1
+ import { BirpcReturn } from "birpc";
2
+ import { RpcFunctionsCollector, RpcFunctionsCollectorBase } from "birpc-x";
3
+ import { WebSocket } from "ws";
4
+ import { Plugin, ResolvedConfig, ViteDevServer } from "vite";
5
+ import { Raw } from "vue";
6
+ import { ChildProcess } from "node:child_process";
7
+
8
+ //#region ../kit/src/types/events.d.ts
9
+ interface EventsMap {
10
+ [event: string]: any;
11
+ }
12
+ interface EventUnsubscribe {
13
+ (): void;
14
+ }
15
+ interface EventEmitter<Events extends EventsMap> {
16
+ /**
17
+ * Calls each of the listeners registered for a given event.
18
+ *
19
+ * ```js
20
+ * ee.emit('tick', tickType, tickDuration)
21
+ * ```
22
+ *
23
+ * @param event The event name.
24
+ * @param args The arguments for listeners.
25
+ */
26
+ emit: <K extends keyof Events>(event: K, ...args: Parameters<Events[K]>) => void;
27
+ /**
28
+ * Calls the listeners for a given event once and then removes the listener.
29
+ *
30
+ * @param event The event name.
31
+ * @param args The arguments for listeners.
32
+ */
33
+ emitOnce: <K extends keyof Events>(event: K, ...args: Parameters<Events[K]>) => void;
34
+ /**
35
+ * Event names in keys and arrays with listeners in values.
36
+ *
37
+ * @internal
38
+ */
39
+ _listeners: Partial<{ [E in keyof Events]: Events[E][] }>;
40
+ /**
41
+ * Add a listener for a given event.
42
+ *
43
+ * ```js
44
+ * const unbind = ee.on('tick', (tickType, tickDuration) => {
45
+ * count += 1
46
+ * })
47
+ *
48
+ * disable () {
49
+ * unbind()
50
+ * }
51
+ * ```
52
+ *
53
+ * @param event The event name.
54
+ * @param cb The listener function.
55
+ * @returns Unbind listener from event.
56
+ */
57
+ on: <K extends keyof Events>(event: K, cb: Events[K]) => EventUnsubscribe;
58
+ /**
59
+ * Add a listener for a given event once.
60
+ *
61
+ * ```js
62
+ * const unbind = ee.once('tick', (tickType, tickDuration) => {
63
+ * count += 1
64
+ * })
65
+ *
66
+ * disable () {
67
+ * unbind()
68
+ * }
69
+ * ```
70
+ *
71
+ * @param event The event name.
72
+ * @param cb The listener function.
73
+ * @returns Unbind listener from event.
74
+ */
75
+ once: <K extends keyof Events>(event: K, cb: Events[K]) => EventUnsubscribe;
76
+ }
77
+ //#endregion
78
+ //#region ../kit/src/types/docks.d.ts
79
+ interface DevToolsDockHost {
80
+ readonly views: Map<string, DevToolsDockUserEntry>;
81
+ readonly events: EventEmitter<{
82
+ 'dock:entry:updated': (entry: DevToolsDockUserEntry) => void;
83
+ }>;
84
+ register: <T extends DevToolsDockUserEntry>(entry: T, force?: boolean) => {
85
+ update: (patch: Partial<T>) => void;
86
+ };
87
+ update: (entry: DevToolsDockUserEntry) => void;
88
+ values: () => DevToolsDockUserEntry[];
89
+ }
90
+ type DevToolsDockEntryCategory = 'app' | 'framework' | 'web' | 'advanced' | 'default';
91
+ type DevToolsDockEntryIcon = string | {
92
+ light: string;
93
+ dark: string;
94
+ };
95
+ interface DevToolsDockEntryBase {
96
+ id: string;
97
+ title: string;
98
+ icon: DevToolsDockEntryIcon;
99
+ /**
100
+ * The default order of the entry in the dock.
101
+ * The higher the number the earlier it appears.
102
+ * @default 0
103
+ */
104
+ defaultOrder?: number;
105
+ /**
106
+ * The category of the entry
107
+ * @default 'default'
108
+ */
109
+ category?: DevToolsDockEntryCategory;
110
+ /**
111
+ * Whether the entry should be hidden from the user.
112
+ * @default false
113
+ */
114
+ isHidden?: boolean;
115
+ }
116
+ interface ClientScriptEntry {
117
+ /**
118
+ * The filepath or module name to import from
119
+ */
120
+ importFrom: string;
121
+ /**
122
+ * The name to import the module as
123
+ *
124
+ * @default 'default'
125
+ */
126
+ importName?: string;
127
+ }
128
+ interface DevToolsViewIframe extends DevToolsDockEntryBase {
129
+ type: 'iframe';
130
+ url: string;
131
+ /**
132
+ * The id of the iframe, if multiple tabs is assigned with the same id, the iframe will be shared.
133
+ *
134
+ * When not provided, it would be treated as a unique frame.
135
+ */
136
+ frameId?: string;
137
+ /**
138
+ * Optional client script to import into the iframe
139
+ */
140
+ clientScript?: ClientScriptEntry;
141
+ }
142
+ type DevToolsViewLauncherStatus = 'idle' | 'loading' | 'success' | 'error';
143
+ interface DevToolsViewLauncher extends DevToolsDockEntryBase {
144
+ type: 'launcher';
145
+ launcher: {
146
+ icon?: DevToolsDockEntryIcon;
147
+ title: string;
148
+ status?: DevToolsViewLauncherStatus;
149
+ error?: string;
150
+ description?: string;
151
+ buttonStart?: string;
152
+ buttonLoading?: string;
153
+ onLaunch: () => Promise<void>;
154
+ };
155
+ }
156
+ interface DevToolsViewAction extends DevToolsDockEntryBase {
157
+ type: 'action';
158
+ action: ClientScriptEntry;
159
+ }
160
+ interface DevToolsViewCustomRender extends DevToolsDockEntryBase {
161
+ type: 'custom-render';
162
+ renderer: ClientScriptEntry;
163
+ }
164
+ interface DevToolsViewBuiltin extends DevToolsDockEntryBase {
165
+ type: '~builtin';
166
+ id: '~terminals' | '~logs' | '~client-auth-notice';
167
+ }
168
+ type DevToolsDockUserEntry = DevToolsViewIframe | DevToolsViewAction | DevToolsViewCustomRender | DevToolsViewLauncher;
169
+ type DevToolsDockEntry = DevToolsDockUserEntry | DevToolsViewBuiltin;
170
+ //#endregion
171
+ //#region ../kit/src/types/rpc-augments.d.ts
172
+ /**
173
+ * To be extended
174
+ */
175
+ interface DevToolsRpcClientFunctions {}
176
+ /**
177
+ * To be extended
178
+ */
179
+ interface DevToolsRpcServerFunctions {}
180
+ //#endregion
181
+ //#region ../kit/src/client/rpc.d.ts
182
+ interface DevToolsRpcClient {
183
+ /**
184
+ * The events of the client
185
+ */
186
+ events: EventEmitter<RpcClientEvents>;
187
+ /**
188
+ * Whether the client is trusted
189
+ */
190
+ readonly isTrusted: boolean | null;
191
+ /**
192
+ * The connection meta
193
+ */
194
+ readonly connectionMeta: ConnectionMeta;
195
+ /**
196
+ * Return a promise that resolves when the client is trusted
197
+ *
198
+ * Rejects with an error if the timeout is reached
199
+ *
200
+ * @param timeout - The timeout in milliseconds, default to 60 seconds
201
+ */
202
+ ensureTrusted: (timeout?: number) => Promise<boolean>;
203
+ /**
204
+ * Request trust from the server
205
+ */
206
+ requestTrust: () => Promise<boolean>;
207
+ /**
208
+ * Call a RPC function on the server
209
+ */
210
+ call: BirpcReturn<DevToolsRpcServerFunctions, DevToolsRpcClientFunctions>['$call'];
211
+ /**
212
+ * Call a RPC event on the server, and does not expect a response
213
+ */
214
+ callEvent: BirpcReturn<DevToolsRpcServerFunctions, DevToolsRpcClientFunctions>['$callEvent'];
215
+ /**
216
+ * Call a RPC optional function on the server
217
+ */
218
+ callOptional: BirpcReturn<DevToolsRpcServerFunctions, DevToolsRpcClientFunctions>['$callOptional'];
219
+ /**
220
+ * The client RPC host
221
+ */
222
+ client: DevToolsClientRpcHost;
223
+ }
224
+ //#endregion
225
+ //#region ../kit/src/client/docks.d.ts
226
+ interface DockPanelStorage {
227
+ width: number;
228
+ height: number;
229
+ top: number;
230
+ left: number;
231
+ position: 'left' | 'right' | 'bottom' | 'top';
232
+ open: boolean;
233
+ inactiveTimeout: number;
234
+ }
235
+ interface DevToolsClientContext {
236
+ /**
237
+ * The RPC client to interact with the server
238
+ */
239
+ readonly rpc: DevToolsRpcClient;
240
+ }
241
+ interface DocksContext extends DevToolsClientContext {
242
+ /**
243
+ * Type of the client environment
244
+ *
245
+ * 'embedded' - running inside an embedded floating panel
246
+ * 'standalone' - running inside a standalone window (no user app)
247
+ */
248
+ readonly clientType: 'embedded' | 'standalone';
249
+ /**
250
+ * The panel context
251
+ */
252
+ readonly panel: DocksPanelContext;
253
+ /**
254
+ * The docks entries context
255
+ */
256
+ readonly docks: DocksEntriesContext;
257
+ }
258
+ type DevToolsClientRpcHost = RpcFunctionsCollector<DevToolsRpcClientFunctions, DevToolsClientContext>;
259
+ interface DocksPanelContext {
260
+ store: DockPanelStorage;
261
+ isDragging: boolean;
262
+ isResizing: boolean;
263
+ readonly isVertical: boolean;
264
+ }
265
+ interface DocksEntriesContext {
266
+ selectedId: string | null;
267
+ readonly selected: DevToolsDockEntry | null;
268
+ entries: DevToolsDockEntry[];
269
+ entryToStateMap: Map<string, DockEntryState>;
270
+ /**
271
+ * Get the state of a dock entry by its ID
272
+ */
273
+ getStateById: (id: string) => DockEntryState | undefined;
274
+ /**
275
+ * Switch to the selected dock entry, pass `null` to clear the selection
276
+ *
277
+ * @returns Whether the selection was changed successfully
278
+ */
279
+ switchEntry: (id?: string | null) => Promise<boolean>;
280
+ /**
281
+ * Toggle the selected dock entry
282
+ *
283
+ * @returns Whether the selection was changed successfully
284
+ */
285
+ toggleEntry: (id: string) => Promise<boolean>;
286
+ }
287
+ interface DockEntryState {
288
+ entryMeta: DevToolsDockEntry;
289
+ readonly isActive: boolean;
290
+ domElements: {
291
+ iframe?: HTMLIFrameElement | null;
292
+ panel?: HTMLDivElement | null;
293
+ };
294
+ events: Raw<EventEmitter<DockEntryStateEvents>>;
295
+ }
296
+ interface DockEntryStateEvents {
297
+ 'entry:activated': () => void;
298
+ 'entry:deactivated': () => void;
299
+ 'entry:updated': (newMeta: DevToolsDockUserEntry) => void;
300
+ 'dom:panel:mounted': (panel: HTMLDivElement) => void;
301
+ 'dom:iframe:mounted': (iframe: HTMLIFrameElement) => void;
302
+ }
303
+ interface RpcClientEvents {
304
+ 'rpc:is-trusted:updated': (isTrusted: boolean) => void;
305
+ }
306
+ //#endregion
307
+ //#region ../kit/src/client/client-script.d.ts
308
+ /**
309
+ * Context for client scripts running in dock entries
310
+ */
311
+ interface DockClientScriptContext extends DocksContext {
312
+ /**
313
+ * The state of the current dock entry
314
+ */
315
+ current: DockEntryState;
316
+ }
317
+ //#endregion
318
+ //#region ../kit/src/types/terminals.d.ts
319
+ interface DevToolsTerminalSessionStreamChunkEvent {
320
+ id: string;
321
+ chunks: string[];
322
+ ts: number;
323
+ }
324
+ interface DevToolsTerminalHost {
325
+ readonly sessions: Map<string, DevToolsTerminalSession>;
326
+ readonly events: EventEmitter<{
327
+ 'terminal:session:updated': (session: DevToolsTerminalSession) => void;
328
+ 'terminal:session:stream-chunk': (data: DevToolsTerminalSessionStreamChunkEvent) => void;
329
+ }>;
330
+ register: (session: DevToolsTerminalSession) => DevToolsTerminalSession;
331
+ update: (session: DevToolsTerminalSession) => void;
332
+ startChildProcess: (executeOptions: DevToolsChildProcessExecuteOptions, terminal: Omit<DevToolsTerminalSessionBase, 'status'>) => Promise<DevToolsChildProcessTerminalSession>;
333
+ }
334
+ type DevToolsTerminalStatus = 'running' | 'stopped' | 'error';
335
+ interface DevToolsTerminalSessionBase {
336
+ id: string;
337
+ title: string;
338
+ description?: string;
339
+ status: DevToolsTerminalStatus;
340
+ icon?: DevToolsDockEntryIcon;
341
+ }
342
+ interface DevToolsTerminalSession extends DevToolsTerminalSessionBase {
343
+ buffer?: string[];
344
+ stream?: ReadableStream<string>;
345
+ }
346
+ interface DevToolsChildProcessExecuteOptions {
347
+ command: string;
348
+ args: string[];
349
+ cwd?: string;
350
+ env?: Record<string, string>;
351
+ }
352
+ interface DevToolsChildProcessTerminalSession extends DevToolsTerminalSession {
353
+ type: 'child-process';
354
+ executeOptions: DevToolsChildProcessExecuteOptions;
355
+ getChildProcess: () => ChildProcess | undefined;
356
+ terminate: () => Promise<void>;
357
+ restart: () => Promise<void>;
358
+ }
359
+ //#endregion
360
+ //#region ../kit/src/types/views.d.ts
361
+ interface DevToolsViewHost {
362
+ /**
363
+ * @internal
364
+ */
365
+ buildStaticDirs: {
366
+ baseUrl: string;
367
+ distDir: string;
368
+ }[];
369
+ /**
370
+ * Helper to host static files
371
+ * - In `dev` mode, it will register middleware to `viteServer.middlewares` to host the static files
372
+ * - In `build` mode, it will copy the static files to the dist directory
373
+ */
374
+ hostStatic: (baseUrl: string, distDir: string) => void;
375
+ }
376
+ //#endregion
377
+ //#region ../kit/src/types/vite-plugin.d.ts
378
+ interface DevToolsCapabilities {
379
+ rpc?: boolean;
380
+ views?: boolean;
381
+ }
382
+ interface DevToolsPluginOptions {
383
+ capabilities?: {
384
+ dev?: DevToolsCapabilities | boolean;
385
+ build?: DevToolsCapabilities | boolean;
386
+ };
387
+ setup: (context: DevToolsNodeContext) => void | Promise<void>;
388
+ }
389
+ interface DevToolsNodeContext {
390
+ /**
391
+ * Workspace root directory of Vite DevTools
392
+ */
393
+ readonly workspaceRoot: string;
394
+ /**
395
+ * Current working directory of Vite DevTools
396
+ */
397
+ readonly cwd: string;
398
+ /**
399
+ * Current mode of Vite DevTools
400
+ * - 'dev' - when Vite DevTools is running in dev mode
401
+ * - 'build' - when Vite DevTools is running in build mode (no server)
402
+ */
403
+ readonly mode: 'dev' | 'build';
404
+ /**
405
+ * Resolved Vite configuration
406
+ */
407
+ readonly viteConfig: ResolvedConfig;
408
+ /**
409
+ * Vite dev server instance (only available in dev mode)
410
+ */
411
+ readonly viteServer?: ViteDevServer;
412
+ /**
413
+ * RPC functions host, for registering server-side RPC functions and calling client-side RPC functions
414
+ */
415
+ rpc: RpcFunctionsHost;
416
+ /**
417
+ * Docks host, for registering dock entries
418
+ */
419
+ docks: DevToolsDockHost;
420
+ /**
421
+ * Views host, for registering static views
422
+ */
423
+ views: DevToolsViewHost;
424
+ /**
425
+ * Utils for the node context
426
+ */
427
+ utils: DevToolsNodeUtils;
428
+ /**
429
+ * Terminals host, for registering terminal sessions and streaming terminal output
430
+ */
431
+ terminals: DevToolsTerminalHost;
432
+ }
433
+ interface DevToolsNodeUtils {
434
+ /**
435
+ * Create a simple client script from a function or stringified code
436
+ *
437
+ * @deprecated DO NOT USE. This is mostly for testing only. Please use a proper importable module instead.
438
+ * @experimental
439
+ */
440
+ createSimpleClientScript: (fn: string | ((ctx: DockClientScriptContext) => void)) => ClientScriptEntry;
441
+ }
442
+ interface ConnectionMeta {
443
+ backend: 'websocket' | 'static';
444
+ websocket?: number | string;
445
+ }
446
+ //#endregion
447
+ //#region ../kit/src/types/rpc.d.ts
448
+ interface DevToolsNodeRpcSessionMeta {
449
+ id: number;
450
+ ws?: WebSocket;
451
+ clientAuthId?: string;
452
+ isTrusted?: boolean;
453
+ }
454
+ interface DevToolsNodeRpcSession {
455
+ meta: DevToolsNodeRpcSessionMeta;
456
+ rpc: BirpcReturn<DevToolsRpcClientFunctions, DevToolsRpcServerFunctions, false>;
457
+ }
458
+ type RpcFunctionsHost = RpcFunctionsCollectorBase<DevToolsRpcServerFunctions, DevToolsNodeContext> & {
459
+ /**
460
+ * Broadcast a message to all connected clients
461
+ */
462
+ broadcast: <T extends keyof DevToolsRpcClientFunctions, Args extends Parameters<DevToolsRpcClientFunctions[T]>>(name: T, ...args: Args) => Promise<(Awaited<ReturnType<DevToolsRpcClientFunctions[T]>> | undefined)[]>;
463
+ /**
464
+ * Get the current RPC client
465
+ *
466
+ * Available in RPC functions to get the current RPC client
467
+ */
468
+ getCurrentRpcSession: () => DevToolsNodeRpcSession | undefined;
469
+ };
470
+ //#endregion
471
+ //#region ../kit/src/types/vite-augment.d.ts
472
+ declare module 'vite' {
473
+ interface Plugin {
474
+ devtools?: DevToolsPluginOptions;
475
+ }
476
+ interface UserConfig {
477
+ devtools?: ViteConfigDevtoolsOptions;
478
+ }
479
+ }
480
+ interface ViteConfigDevtoolsOptions {
481
+ /**
482
+ * Disable client authentication.
483
+ *
484
+ * Beware that if you disable client authentication,
485
+ * any browsers can connect to the devtools and access to your server and filesystem.
486
+ * (including other devices, if you open server `host` option to LAN or WAN)
487
+ *
488
+ * @default true
489
+ */
490
+ clientAuth?: boolean;
491
+ }
492
+ interface PluginWithDevTools extends Plugin {
493
+ devtools?: DevToolsPluginOptions;
494
+ }
495
+ //#endregion
496
+ //#region src/node/plugin.d.ts
497
+ declare function DevToolsViteUI(): PluginWithDevTools;
498
+ //#endregion
499
+ export { DevToolsViteUI };