@vitejs/devtools-vite 0.0.0-alpha.19 → 0.0.0-alpha.20

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 (90) hide show
  1. package/dist/dirs.mjs +1 -1
  2. package/dist/index.d.mts +60 -10
  3. package/dist/index.mjs +1455 -3928
  4. package/dist/nitro.json +2 -2
  5. package/dist/public/200.html +1 -1
  6. package/dist/public/404.html +1 -1
  7. package/dist/public/_nuxt/4_YkMRLM.js +1 -0
  8. package/dist/public/_nuxt/B6cncnam.js +1 -0
  9. package/dist/public/_nuxt/BReKREoN.js +33 -0
  10. package/dist/public/_nuxt/BaYRDImg.js +1 -0
  11. package/dist/public/_nuxt/Bij65W5n.js +1 -0
  12. package/dist/public/_nuxt/Bja_t-aS.js +1 -0
  13. package/dist/public/_nuxt/BrNGuicP.js +1 -0
  14. package/dist/public/_nuxt/BwW8gZ6K.js +1 -0
  15. package/dist/public/_nuxt/C8YTjkYM.js +1 -0
  16. package/dist/public/_nuxt/CDPpT6Cf.js +1 -0
  17. package/dist/public/_nuxt/CE23KUMI.js +1 -0
  18. package/dist/public/_nuxt/{Bt0_xjwR.js → CEj_FX93.js} +1 -1
  19. package/dist/public/_nuxt/CNlvL5ez.js +1 -0
  20. package/dist/public/_nuxt/CPYYHqxX.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/DHdbcQDR.js +1 -0
  25. package/dist/public/_nuxt/DJFg8Mze.js +1 -0
  26. package/dist/public/_nuxt/DkNjWA7f.js +1 -0
  27. package/dist/public/_nuxt/{DilC1n1-.js → Ds1hqjlp.js} +2 -4
  28. package/dist/public/_nuxt/DuSH8vtp.js +1 -0
  29. package/dist/public/_nuxt/EZmie0b_.js +1 -0
  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/R6f4Y_SJ.js +1 -0
  34. package/dist/public/_nuxt/XY_il7uL.js +2 -0
  35. package/dist/public/_nuxt/builds/latest.json +1 -1
  36. package/dist/public/_nuxt/builds/meta/57a53e55-aaa8-4c2f-ab28-ef6c47fc2198.json +1 -0
  37. package/dist/public/_nuxt/entry.D_RYm3_j.css +1 -0
  38. package/dist/public/_nuxt/error-404.DSMcJjv-.css +1 -0
  39. package/dist/public/_nuxt/error-500.wvWNQOmL.css +1 -0
  40. package/dist/public/_nuxt/gdDtDkxO.js +1 -0
  41. package/dist/public/_nuxt/kgaOZT0B.js +1 -0
  42. package/dist/public/_nuxt/mJg3pdS2.js +1 -0
  43. package/dist/public/_nuxt/s37iQDTO.js +1 -0
  44. package/dist/public/_nuxt/x1G1EAUP.js +1 -0
  45. package/dist/public/_nuxt/xtsFKyex.js +1 -0
  46. package/dist/public/index.html +1 -1
  47. package/package.json +14 -14
  48. package/dist/public/_nuxt/07wnyZKd.js +0 -1
  49. package/dist/public/_nuxt/B60rA_aW.js +0 -1
  50. package/dist/public/_nuxt/B67x4GCP.js +0 -1
  51. package/dist/public/_nuxt/B8MMDSYB.js +0 -1
  52. package/dist/public/_nuxt/BLS3T3KA.js +0 -1
  53. package/dist/public/_nuxt/BMsX1CNy.js +0 -1
  54. package/dist/public/_nuxt/BOkXdHom.js +0 -1
  55. package/dist/public/_nuxt/BOwnK8_Y.js +0 -1
  56. package/dist/public/_nuxt/BYgsyBgs.js +0 -1
  57. package/dist/public/_nuxt/BZp_Rqiq.js +0 -1
  58. package/dist/public/_nuxt/Bax2Xuss.js +0 -1
  59. package/dist/public/_nuxt/BfzWwsgH.js +0 -2
  60. package/dist/public/_nuxt/Bgr0OgUi.js +0 -1
  61. package/dist/public/_nuxt/BrGG6h5U.js +0 -1
  62. package/dist/public/_nuxt/C-y-Odbu.js +0 -1
  63. package/dist/public/_nuxt/C3ZA0X0n.js +0 -1
  64. package/dist/public/_nuxt/C9D_b0Ie.js +0 -1
  65. package/dist/public/_nuxt/CEQkJ3Wx.js +0 -1
  66. package/dist/public/_nuxt/CbraBRjp.js +0 -33
  67. package/dist/public/_nuxt/CquGjqBi.js +0 -1
  68. package/dist/public/_nuxt/CvbH1QZS.js +0 -1
  69. package/dist/public/_nuxt/CwJmFVn8.js +0 -1
  70. package/dist/public/_nuxt/CyjCHwlN.js +0 -1
  71. package/dist/public/_nuxt/DFnm02Ud.js +0 -1
  72. package/dist/public/_nuxt/DGvZD3jQ.js +0 -1
  73. package/dist/public/_nuxt/DQp_1U8q.js +0 -1
  74. package/dist/public/_nuxt/DabxYzqu.js +0 -1
  75. package/dist/public/_nuxt/DtmncGDc.js +0 -1
  76. package/dist/public/_nuxt/DyBWaXpL.js +0 -1
  77. package/dist/public/_nuxt/PBmE2B7U.js +0 -1
  78. package/dist/public/_nuxt/Q3kWpZ_f.js +0 -1
  79. package/dist/public/_nuxt/SUptJs8y.js +0 -1
  80. package/dist/public/_nuxt/builds/meta/9de1cd1a-93a8-4fbf-8efa-effa9e85ee82.json +0 -1
  81. package/dist/public/_nuxt/entry.Dp3ya9sb.css +0 -1
  82. package/dist/public/_nuxt/error-404.CrzVG6qf.css +0 -1
  83. package/dist/public/_nuxt/error-500.UTTFHdkP.css +0 -1
  84. package/dist/public/_nuxt/jTMXHbZw.js +0 -1
  85. package/dist/public/_nuxt/p1Do6sW6.js +0 -1
  86. /package/dist/{dirs-BJbBdMIp.mjs → dirs-BzX7rGLP.mjs} +0 -0
  87. /package/dist/public/_nuxt/{DQtLZa7C.js → CroQ9lcn.js} +0 -0
  88. /package/dist/public/_nuxt/{DnpfwSMy.js → Cvg1SSG2.js} +0 -0
  89. /package/dist/public/_nuxt/{diff.worker-DCsgdfuV.js → diff.worker-CvsEE-qa.js} +0 -0
  90. /package/dist/public/_nuxt/{DJHNY-5T.js → jB8TYliU.js} +0 -0
package/dist/dirs.mjs CHANGED
@@ -1,3 +1,3 @@
1
- import { t as clientPublicDir } from "./dirs-BJbBdMIp.mjs";
1
+ import { t as clientPublicDir } from "./dirs-BzX7rGLP.mjs";
2
2
 
3
3
  export { clientPublicDir };
package/dist/index.d.mts CHANGED
@@ -1,8 +1,7 @@
1
- import { BirpcGroup, BirpcReturn } from "birpc";
2
1
  import { RpcFunctionsCollector, RpcFunctionsCollectorBase } from "birpc-x";
3
2
  import { Plugin, ResolvedConfig, ViteDevServer } from "vite";
4
3
  import { Raw } from "vue";
5
- import "@vitejs/devtools-rpc/presets/ws/client";
4
+ import { BirpcReturn } from "birpc";
6
5
  import { ChildProcess } from "node:child_process";
7
6
 
8
7
  //#region ../kit/src/types/events.d.ts
@@ -23,7 +22,14 @@ interface EventEmitter<Events extends EventsMap> {
23
22
  * @param event The event name.
24
23
  * @param args The arguments for listeners.
25
24
  */
26
- emit: <K extends keyof Events>(this: this, event: K, ...args: Parameters<Events[K]>) => void;
25
+ emit: <K extends keyof Events>(event: K, ...args: Parameters<Events[K]>) => void;
26
+ /**
27
+ * Calls the listeners for a given event once and then removes the listener.
28
+ *
29
+ * @param event The event name.
30
+ * @param args The arguments for listeners.
31
+ */
32
+ emitOnce: <K extends keyof Events>(event: K, ...args: Parameters<Events[K]>) => void;
27
33
  /**
28
34
  * Event names in keys and arrays with listeners in values.
29
35
  *
@@ -47,7 +53,25 @@ interface EventEmitter<Events extends EventsMap> {
47
53
  * @param cb The listener function.
48
54
  * @returns Unbind listener from event.
49
55
  */
50
- on: <K extends keyof Events>(this: this, event: K, cb: Events[K]) => EventUnsubscribe;
56
+ on: <K extends keyof Events>(event: K, cb: Events[K]) => EventUnsubscribe;
57
+ /**
58
+ * Add a listener for a given event once.
59
+ *
60
+ * ```js
61
+ * const unbind = ee.once('tick', (tickType, tickDuration) => {
62
+ * count += 1
63
+ * })
64
+ *
65
+ * disable () {
66
+ * unbind()
67
+ * }
68
+ * ```
69
+ *
70
+ * @param event The event name.
71
+ * @param cb The listener function.
72
+ * @returns Unbind listener from event.
73
+ */
74
+ once: <K extends keyof Events>(event: K, cb: Events[K]) => EventUnsubscribe;
51
75
  }
52
76
  //#endregion
53
77
  //#region ../kit/src/types/docks.d.ts
@@ -154,7 +178,32 @@ interface DevToolsRpcClientFunctions {}
154
178
  interface DevToolsRpcServerFunctions {}
155
179
  //#endregion
156
180
  //#region ../kit/src/client/rpc.d.ts
157
- type DevToolsRpcClient = BirpcReturn<DevToolsRpcServerFunctions, DevToolsRpcClientFunctions>;
181
+ interface DevToolsRpcClient {
182
+ /**
183
+ * The events of the client
184
+ */
185
+ events: EventEmitter<RpcClientEvents>;
186
+ /**
187
+ * The connection meta
188
+ */
189
+ readonly connectionMeta: ConnectionMeta;
190
+ /**
191
+ * Call a RPC function on the server
192
+ */
193
+ call: BirpcReturn<DevToolsRpcServerFunctions, DevToolsRpcClientFunctions>['$call'];
194
+ /**
195
+ * Call a RPC event on the server, and does not expect a response
196
+ */
197
+ callEvent: BirpcReturn<DevToolsRpcServerFunctions, DevToolsRpcClientFunctions>['$callEvent'];
198
+ /**
199
+ * Call a RPC optional function on the server
200
+ */
201
+ callOptional: BirpcReturn<DevToolsRpcServerFunctions, DevToolsRpcClientFunctions>['$callOptional'];
202
+ /**
203
+ * The client RPC host
204
+ */
205
+ client: DevToolsClientRpcHost;
206
+ }
158
207
  //#endregion
159
208
  //#region ../kit/src/client/docks.d.ts
160
209
  interface DockPanelStorage {
@@ -188,10 +237,6 @@ interface DocksContext extends DevToolsClientContext {
188
237
  * The docks entries context
189
238
  */
190
239
  readonly docks: DocksEntriesContext;
191
- /**
192
- * The client-side RPC functions to be called from the server
193
- */
194
- readonly clientRpc: DevToolsClientRpcHost;
195
240
  }
196
241
  type DevToolsClientRpcHost = RpcFunctionsCollector<DevToolsRpcClientFunctions, DevToolsClientContext>;
197
242
  interface DocksPanelContext {
@@ -232,6 +277,7 @@ interface DockEntryStateEvents {
232
277
  'dom:panel:mounted': (panel: HTMLDivElement) => void;
233
278
  'dom:iframe:mounted': (iframe: HTMLIFrameElement) => void;
234
279
  }
280
+ interface RpcClientEvents {}
235
281
  //#endregion
236
282
  //#region ../kit/src/client/client-script.d.ts
237
283
  /**
@@ -335,10 +381,14 @@ interface DevToolsNodeUtils {
335
381
  */
336
382
  createSimpleClientScript: (fn: string | ((ctx: DockClientScriptContext) => void)) => ClientScriptEntry;
337
383
  }
384
+ interface ConnectionMeta {
385
+ backend: 'websocket' | 'static';
386
+ websocket?: number | string;
387
+ }
338
388
  //#endregion
339
389
  //#region ../kit/src/types/rpc.d.ts
340
390
  type RpcFunctionsHost = RpcFunctionsCollectorBase<DevToolsRpcServerFunctions, DevToolsNodeContext> & {
341
- boardcast: BirpcGroup<DevToolsRpcClientFunctions, DevToolsRpcServerFunctions>['broadcast'];
391
+ boardcast: <T extends keyof DevToolsRpcClientFunctions, Args extends Parameters<DevToolsRpcClientFunctions[T]>>(name: T, ...args: Args) => Promise<(Awaited<ReturnType<DevToolsRpcClientFunctions[T]>> | undefined)[]>;
342
392
  };
343
393
  //#endregion
344
394
  //#region ../kit/src/types/vite-augment.d.ts