@vitejs/devtools-vite 0.0.0-alpha.21 → 0.0.0-alpha.22
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/dist/index.d.mts +76 -12
- package/dist/index.mjs +1 -1
- package/dist/nitro.json +1 -1
- package/dist/public/200.html +1 -1
- package/dist/public/404.html +1 -1
- package/dist/public/_nuxt/D6Epdimc.js +4 -0
- package/dist/public/_nuxt/builds/latest.json +1 -1
- package/dist/public/_nuxt/builds/meta/26a4981b-f9f2-4e38-94f7-bf74f5a3019a.json +1 -0
- package/dist/public/_nuxt/{entry.BVWKKagY.css → entry.B7Ui_tQC.css} +1 -1
- package/dist/public/index.html +1 -1
- package/package.json +3 -3
- package/dist/public/_nuxt/builds/meta/92f58f41-f5d8-4eb9-8df8-90c37ec07cf8.json +0 -1
- package/dist/public/_nuxt/wlAuDjxN.js +0 -4
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BirpcReturn } from "birpc";
|
|
2
|
-
import { RpcFunctionsCollector, RpcFunctionsCollectorBase } from "birpc-x";
|
|
3
2
|
import { WebSocket } from "ws";
|
|
3
|
+
import { RpcFunctionsCollector, RpcFunctionsCollectorBase } from "birpc-x";
|
|
4
|
+
import { Patch } from "immer";
|
|
4
5
|
import { Plugin, ResolvedConfig, ViteDevServer } from "vite";
|
|
5
6
|
import { Raw } from "vue";
|
|
6
7
|
import { ChildProcess } from "node:child_process";
|
|
@@ -23,14 +24,14 @@ interface EventEmitter<Events extends EventsMap> {
|
|
|
23
24
|
* @param event The event name.
|
|
24
25
|
* @param args The arguments for listeners.
|
|
25
26
|
*/
|
|
26
|
-
emit: <K extends keyof Events>(event: K, ...args: Parameters<Events[K]>) => void;
|
|
27
|
+
emit: <K$1 extends keyof Events>(event: K$1, ...args: Parameters<Events[K$1]>) => void;
|
|
27
28
|
/**
|
|
28
29
|
* Calls the listeners for a given event once and then removes the listener.
|
|
29
30
|
*
|
|
30
31
|
* @param event The event name.
|
|
31
32
|
* @param args The arguments for listeners.
|
|
32
33
|
*/
|
|
33
|
-
emitOnce: <K extends keyof Events>(event: K, ...args: Parameters<Events[K]>) => void;
|
|
34
|
+
emitOnce: <K$1 extends keyof Events>(event: K$1, ...args: Parameters<Events[K$1]>) => void;
|
|
34
35
|
/**
|
|
35
36
|
* Event names in keys and arrays with listeners in values.
|
|
36
37
|
*
|
|
@@ -54,7 +55,7 @@ interface EventEmitter<Events extends EventsMap> {
|
|
|
54
55
|
* @param cb The listener function.
|
|
55
56
|
* @returns Unbind listener from event.
|
|
56
57
|
*/
|
|
57
|
-
on: <K extends keyof Events>(event: K, cb: Events[K]) => EventUnsubscribe;
|
|
58
|
+
on: <K$1 extends keyof Events>(event: K$1, cb: Events[K$1]) => EventUnsubscribe;
|
|
58
59
|
/**
|
|
59
60
|
* Add a listener for a given event once.
|
|
60
61
|
*
|
|
@@ -72,7 +73,7 @@ interface EventEmitter<Events extends EventsMap> {
|
|
|
72
73
|
* @param cb The listener function.
|
|
73
74
|
* @returns Unbind listener from event.
|
|
74
75
|
*/
|
|
75
|
-
once: <K extends keyof Events>(event: K, cb: Events[K]) => EventUnsubscribe;
|
|
76
|
+
once: <K$1 extends keyof Events>(event: K$1, cb: Events[K$1]) => EventUnsubscribe;
|
|
76
77
|
}
|
|
77
78
|
//#endregion
|
|
78
79
|
//#region ../kit/src/types/docks.d.ts
|
|
@@ -168,6 +169,50 @@ interface DevToolsViewBuiltin extends DevToolsDockEntryBase {
|
|
|
168
169
|
type DevToolsDockUserEntry = DevToolsViewIframe | DevToolsViewAction | DevToolsViewCustomRender | DevToolsViewLauncher;
|
|
169
170
|
type DevToolsDockEntry = DevToolsDockUserEntry | DevToolsViewBuiltin;
|
|
170
171
|
//#endregion
|
|
172
|
+
//#region ../rpc/src/presets/ws/server.d.ts
|
|
173
|
+
interface DevToolsNodeRpcSessionMeta {
|
|
174
|
+
id: number;
|
|
175
|
+
ws?: WebSocket;
|
|
176
|
+
clientAuthId?: string;
|
|
177
|
+
isTrusted?: boolean;
|
|
178
|
+
}
|
|
179
|
+
//#endregion
|
|
180
|
+
//#region ../kit/src/utils/shared-state.d.ts
|
|
181
|
+
type ImmutablePrimitive = undefined | null | boolean | string | number | Function;
|
|
182
|
+
type Immutable<T> = T extends ImmutablePrimitive ? T : T extends Array<infer U> ? ImmutableArray<U> : T extends Map<infer K, infer V> ? ImmutableMap<K, V> : T extends Set<infer M> ? ImmutableSet<M> : ImmutableObject<T>;
|
|
183
|
+
type ImmutableArray<T> = ReadonlyArray<Immutable<T>>;
|
|
184
|
+
type ImmutableMap<K$1, V$1> = ReadonlyMap<Immutable<K$1>, Immutable<V$1>>;
|
|
185
|
+
type ImmutableSet<T> = ReadonlySet<Immutable<T>>;
|
|
186
|
+
type ImmutableObject<T> = { readonly [K in keyof T]: Immutable<T[K]> };
|
|
187
|
+
/**
|
|
188
|
+
* State host that is immutable by default with explicit mutate.
|
|
189
|
+
*/
|
|
190
|
+
interface SharedState<T> {
|
|
191
|
+
/**
|
|
192
|
+
* Get the current state. Immutable.
|
|
193
|
+
*/
|
|
194
|
+
value: () => Immutable<T>;
|
|
195
|
+
/**
|
|
196
|
+
* Subscribe to state changes.
|
|
197
|
+
*/
|
|
198
|
+
on: EventEmitter<SharedStateEvents<T>>['on'];
|
|
199
|
+
/**
|
|
200
|
+
* Mutate the state.
|
|
201
|
+
*/
|
|
202
|
+
mutate: (fn: (state: T) => void, syncId?: string) => void;
|
|
203
|
+
/**
|
|
204
|
+
* Apply patches to the state.
|
|
205
|
+
*/
|
|
206
|
+
patch: (patches: Patch[], syncId?: string) => void;
|
|
207
|
+
/**
|
|
208
|
+
* Sync IDs that have been applied to the state.
|
|
209
|
+
*/
|
|
210
|
+
syncIds: Set<string>;
|
|
211
|
+
}
|
|
212
|
+
interface SharedStateEvents<T> {
|
|
213
|
+
updated: (fullState: T, patches: Patch[] | undefined, syncId: string) => void;
|
|
214
|
+
}
|
|
215
|
+
//#endregion
|
|
171
216
|
//#region ../kit/src/types/rpc-augments.d.ts
|
|
172
217
|
/**
|
|
173
218
|
* To be extended
|
|
@@ -177,6 +222,10 @@ interface DevToolsRpcClientFunctions {}
|
|
|
177
222
|
* To be extended
|
|
178
223
|
*/
|
|
179
224
|
interface DevToolsRpcServerFunctions {}
|
|
225
|
+
/**
|
|
226
|
+
* To be extended
|
|
227
|
+
*/
|
|
228
|
+
interface DevToolsRpcSharedStates {}
|
|
180
229
|
//#endregion
|
|
181
230
|
//#region ../kit/src/client/rpc.d.ts
|
|
182
231
|
interface DevToolsRpcClient {
|
|
@@ -220,6 +269,10 @@ interface DevToolsRpcClient {
|
|
|
220
269
|
* The client RPC host
|
|
221
270
|
*/
|
|
222
271
|
client: DevToolsClientRpcHost;
|
|
272
|
+
/**
|
|
273
|
+
* The shared state host
|
|
274
|
+
*/
|
|
275
|
+
sharedState: RpcSharedStateHost;
|
|
223
276
|
}
|
|
224
277
|
//#endregion
|
|
225
278
|
//#region ../kit/src/client/docks.d.ts
|
|
@@ -445,28 +498,39 @@ interface ConnectionMeta {
|
|
|
445
498
|
}
|
|
446
499
|
//#endregion
|
|
447
500
|
//#region ../kit/src/types/rpc.d.ts
|
|
448
|
-
interface DevToolsNodeRpcSessionMeta {
|
|
449
|
-
id: number;
|
|
450
|
-
ws?: WebSocket;
|
|
451
|
-
clientAuthId?: string;
|
|
452
|
-
isTrusted?: boolean;
|
|
453
|
-
}
|
|
454
501
|
interface DevToolsNodeRpcSession {
|
|
455
502
|
meta: DevToolsNodeRpcSessionMeta;
|
|
456
503
|
rpc: BirpcReturn<DevToolsRpcClientFunctions, DevToolsRpcServerFunctions, false>;
|
|
457
504
|
}
|
|
505
|
+
interface RpcBroadcastOptions<METHOD, Args extends any[]> {
|
|
506
|
+
method: METHOD;
|
|
507
|
+
args: Args;
|
|
508
|
+
optional?: boolean;
|
|
509
|
+
event?: boolean;
|
|
510
|
+
filter?: (client: BirpcReturn<DevToolsRpcClientFunctions, DevToolsRpcServerFunctions, false>) => boolean | void;
|
|
511
|
+
}
|
|
458
512
|
type RpcFunctionsHost = RpcFunctionsCollectorBase<DevToolsRpcServerFunctions, DevToolsNodeContext> & {
|
|
459
513
|
/**
|
|
460
514
|
* Broadcast a message to all connected clients
|
|
461
515
|
*/
|
|
462
|
-
broadcast: <T extends keyof DevToolsRpcClientFunctions, Args extends Parameters<DevToolsRpcClientFunctions[T]>>(
|
|
516
|
+
broadcast: <T extends keyof DevToolsRpcClientFunctions, Args extends Parameters<DevToolsRpcClientFunctions[T]>>(options: RpcBroadcastOptions<T, Args>) => Promise<void>;
|
|
463
517
|
/**
|
|
464
518
|
* Get the current RPC client
|
|
465
519
|
*
|
|
466
520
|
* Available in RPC functions to get the current RPC client
|
|
467
521
|
*/
|
|
468
522
|
getCurrentRpcSession: () => DevToolsNodeRpcSession | undefined;
|
|
523
|
+
/**
|
|
524
|
+
* The shared state host
|
|
525
|
+
*/
|
|
526
|
+
sharedState: RpcSharedStateHost;
|
|
469
527
|
};
|
|
528
|
+
interface RpcSharedStateGetOptions<T> {
|
|
529
|
+
initialValue?: T;
|
|
530
|
+
}
|
|
531
|
+
interface RpcSharedStateHost {
|
|
532
|
+
get: <T extends keyof DevToolsRpcSharedStates>(key: T, options?: RpcSharedStateGetOptions<DevToolsRpcSharedStates[T]>) => Promise<SharedState<DevToolsRpcSharedStates[T]>>;
|
|
533
|
+
}
|
|
470
534
|
//#endregion
|
|
471
535
|
//#region ../kit/src/types/vite-augment.d.ts
|
|
472
536
|
declare module 'vite' {
|
package/dist/index.mjs
CHANGED
package/dist/nitro.json
CHANGED
package/dist/public/200.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="en" class="bg-dots"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><script type="importmap">{"imports":{"#entry":"/.devtools-vite/_nuxt/
|
|
1
|
+
<!DOCTYPE html><html lang="en" class="bg-dots"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><script type="importmap">{"imports":{"#entry":"/.devtools-vite/_nuxt/D6Epdimc.js"}}</script><title>Vite DevTools</title><link rel="stylesheet" href="/.devtools-vite/_nuxt/entry.B7Ui_tQC.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/.devtools-vite/_nuxt/D6Epdimc.js"><meta name="description" content="DevTools for Vite"><meta property="og:title" content="Vite DevTools"><meta property="og:description" content="DevTools for Vite"><link rel="icon" type="image/svg+xml" href="/favicon.svg"><script type="module" src="/.devtools-vite/_nuxt/D6Epdimc.js" crossorigin></script><script id="unhead:payload" type="application/json">{"title":"Vite DevTools"}</script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1766495915140,false]</script><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/.devtools-vite/",buildId:"26a4981b-f9f2-4e38-94f7-bf74f5a3019a",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|
package/dist/public/404.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="en" class="bg-dots"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><script type="importmap">{"imports":{"#entry":"/.devtools-vite/_nuxt/
|
|
1
|
+
<!DOCTYPE html><html lang="en" class="bg-dots"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><script type="importmap">{"imports":{"#entry":"/.devtools-vite/_nuxt/D6Epdimc.js"}}</script><title>Vite DevTools</title><link rel="stylesheet" href="/.devtools-vite/_nuxt/entry.B7Ui_tQC.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/.devtools-vite/_nuxt/D6Epdimc.js"><meta name="description" content="DevTools for Vite"><meta property="og:title" content="Vite DevTools"><meta property="og:description" content="DevTools for Vite"><link rel="icon" type="image/svg+xml" href="/favicon.svg"><script type="module" src="/.devtools-vite/_nuxt/D6Epdimc.js" crossorigin></script><script id="unhead:payload" type="application/json">{"title":"Vite DevTools"}</script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1766495915141,false]</script><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/.devtools-vite/",buildId:"26a4981b-f9f2-4e38-94f7-bf74f5a3019a",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|