@vitejs/devtools-vite 0.0.0-alpha.16 → 0.0.0-alpha.18
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 +100 -73
- package/dist/index.mjs +10723 -167
- package/dist/nitro.json +1 -1
- package/dist/public/200.html +1 -1
- package/dist/public/404.html +1 -1
- package/dist/public/_nuxt/{Bwl74Dmc.js → 7Xmy2J8w.js} +1 -1
- package/dist/public/_nuxt/{C92JN8-1.js → B3PvEETZ.js} +1 -1
- package/dist/public/_nuxt/{DAYnNRKo.js → B9OSaO_y.js} +1 -1
- package/dist/public/_nuxt/{C69S_2QT.js → BC_PfwI9.js} +1 -1
- package/dist/public/_nuxt/{CW2IEEV4.js → BKyQoL6o.js} +1 -1
- package/dist/public/_nuxt/{CuP828Ev.js → BMA1s1VI.js} +1 -1
- package/dist/public/_nuxt/BUo-D9gX.js +6 -0
- package/dist/public/_nuxt/{DnfHXPIS.js → BZWmKTD9.js} +1 -1
- package/dist/public/_nuxt/{DCH6tnYG.js → BZtNaBML.js} +1 -1
- package/dist/public/_nuxt/Bexkoyc0.js +1 -0
- package/dist/public/_nuxt/{B4sg2h3A.js → BmVkH5Zk.js} +1 -1
- package/dist/public/_nuxt/{1wmGBmx3.js → Brb1aI-2.js} +1 -1
- package/dist/public/_nuxt/{NcoMSw9p.js → C2OwekHB.js} +1 -1
- package/dist/public/_nuxt/{Bdpt9CY1.js → C3jmS5U3.js} +1 -1
- package/dist/public/_nuxt/{CPaPq6PM.js → C6Dt55Q_.js} +1 -1
- package/dist/public/_nuxt/{BIVRCSMb.js → CEjOBQvu.js} +1 -1
- package/dist/public/_nuxt/{iqmTIKrs.js → CPoVdMeM.js} +1 -1
- package/dist/public/_nuxt/{CurpbAUw.js → CbwMXojR.js} +1 -1
- package/dist/public/_nuxt/{BZ-bSyWq.js → CiEs9bP4.js} +1 -1
- package/dist/public/_nuxt/{D3IV73AC.js → Cs8a9RWb.js} +1 -1
- package/dist/public/_nuxt/{BTOJgFG9.js → CuCopH82.js} +1 -1
- package/dist/public/_nuxt/{BkjxFYSI.js → Cuw21ZGH.js} +1 -1
- package/dist/public/_nuxt/D4hayKlJ.js +1 -0
- package/dist/public/_nuxt/{DSJ0HTzo.js → D4jWsLoz.js} +1 -1
- package/dist/public/_nuxt/DC_Jmw0F.js +1 -0
- package/dist/public/_nuxt/{CYdbuFTi.js → DIDN4Ni9.js} +1 -1
- package/dist/public/_nuxt/{BFpsRNSh.js → DMWw7fde.js} +1 -1
- package/dist/public/_nuxt/DPbvd5Yn.js +1 -0
- package/dist/public/_nuxt/{BaiUA85t.js → DYWgomYl.js} +1 -1
- package/dist/public/_nuxt/{C0EU2JTm.js → HdutzUjM.js} +1 -1
- package/dist/public/_nuxt/{BZK-pdMD.js → IRC0Jirb.js} +1 -1
- package/dist/public/_nuxt/{_session_.B0BbH92J.css → _session_.BXMlcDmB.css} +1 -1
- package/dist/public/_nuxt/builds/latest.json +1 -1
- package/dist/public/_nuxt/builds/meta/2a08e48f-ceea-4c2d-9171-63b36d85d409.json +1 -0
- package/dist/public/_nuxt/ebWyu6T_.js +33 -0
- package/dist/public/_nuxt/{entry.DKbtHB8Z.css → entry.CsYdxLia.css} +1 -1
- package/dist/public/_nuxt/error-404.l69urhXw.css +1 -0
- package/dist/public/_nuxt/error-500.C1nOm2YL.css +1 -0
- package/dist/public/_nuxt/{CwH022lo.js → qjx43ao6.js} +1 -1
- package/dist/public/_nuxt/{CFJX1-o6.js → w-XmH5Bg.js} +1 -1
- package/dist/public/_nuxt/{W7DZ1OHe.js → xNC6DpAO.js} +1 -1
- package/dist/public/index.html +1 -1
- package/package.json +8 -8
- package/dist/public/_nuxt/CAUg2nFN.js +0 -1
- package/dist/public/_nuxt/CYG9lvnx.js +0 -1
- package/dist/public/_nuxt/Cysfad9V.js +0 -6
- package/dist/public/_nuxt/KahQcwFc.js +0 -1
- package/dist/public/_nuxt/builds/meta/cd27d01e-b5bf-4470-b74c-544c8db5078a.json +0 -1
- package/dist/public/_nuxt/cT-zQbp8.js +0 -1
- package/dist/public/_nuxt/error-404.Brb8RtBp.css +0 -1
- package/dist/public/_nuxt/error-500.BscIrM8z.css +0 -1
- package/dist/public/_nuxt/n0_Vc1O0.js +0 -33
package/dist/index.d.mts
CHANGED
|
@@ -1,10 +1,88 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BirpcGroup, BirpcReturn } from "birpc";
|
|
2
|
+
import { RpcFunctionsCollector, RpcFunctionsCollectorBase } from "birpc-x";
|
|
2
3
|
import { Plugin, ResolvedConfig, ViteDevServer } from "vite";
|
|
3
4
|
import { Emitter } from "nanoevents";
|
|
4
5
|
import { Raw } from "vue";
|
|
5
6
|
import "@vitejs/devtools-rpc/presets/ws/client";
|
|
6
|
-
import { BirpcReturn } from "birpc";
|
|
7
7
|
|
|
8
|
+
//#region ../kit/src/types/docks.d.ts
|
|
9
|
+
interface DevToolsDockHost {
|
|
10
|
+
views: Map<string, DevToolsDockEntry>;
|
|
11
|
+
register: (entry: DevToolsDockEntry) => void;
|
|
12
|
+
update: (entry: DevToolsDockEntry) => void;
|
|
13
|
+
values: () => DevToolsDockEntry[];
|
|
14
|
+
}
|
|
15
|
+
type DevToolsDockEntryCategory = 'app' | 'framework' | 'web' | 'advanced' | 'default';
|
|
16
|
+
type DevToolsDockEntryIcon = string | {
|
|
17
|
+
light: string;
|
|
18
|
+
dark: string;
|
|
19
|
+
};
|
|
20
|
+
interface DevToolsDockEntryBase {
|
|
21
|
+
id: string;
|
|
22
|
+
title: string;
|
|
23
|
+
icon: DevToolsDockEntryIcon;
|
|
24
|
+
/**
|
|
25
|
+
* The default order of the entry in the dock.
|
|
26
|
+
* The higher the number the earlier it appears.
|
|
27
|
+
* @default 0
|
|
28
|
+
*/
|
|
29
|
+
defaultOrder?: number;
|
|
30
|
+
/**
|
|
31
|
+
* The category of the entry
|
|
32
|
+
* @default 'default'
|
|
33
|
+
*/
|
|
34
|
+
category?: DevToolsDockEntryCategory;
|
|
35
|
+
}
|
|
36
|
+
interface ClientScriptEntry {
|
|
37
|
+
/**
|
|
38
|
+
* The filepath or module name to import from
|
|
39
|
+
*/
|
|
40
|
+
importFrom: string;
|
|
41
|
+
/**
|
|
42
|
+
* The name to import the module as
|
|
43
|
+
*
|
|
44
|
+
* @default 'default'
|
|
45
|
+
*/
|
|
46
|
+
importName?: string;
|
|
47
|
+
}
|
|
48
|
+
interface DevToolsViewIframe extends DevToolsDockEntryBase {
|
|
49
|
+
type: 'iframe';
|
|
50
|
+
url: string;
|
|
51
|
+
/**
|
|
52
|
+
* The id of the iframe, if multiple tabs is assigned with the same id, the iframe will be shared.
|
|
53
|
+
*
|
|
54
|
+
* When not provided, it would be treated as a unique frame.
|
|
55
|
+
*/
|
|
56
|
+
frameId?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Optional client script to import into the iframe
|
|
59
|
+
*/
|
|
60
|
+
clientScript?: ClientScriptEntry;
|
|
61
|
+
}
|
|
62
|
+
type DevToolsViewLauncherStatus = 'idle' | 'loading' | 'success' | 'error';
|
|
63
|
+
interface DevToolsViewLauncher extends DevToolsDockEntryBase {
|
|
64
|
+
type: 'launcher';
|
|
65
|
+
launcher: {
|
|
66
|
+
icon?: DevToolsDockEntryIcon;
|
|
67
|
+
title: string;
|
|
68
|
+
status?: DevToolsViewLauncherStatus;
|
|
69
|
+
error?: string;
|
|
70
|
+
description?: string;
|
|
71
|
+
buttonStart?: string;
|
|
72
|
+
buttonLoading?: string;
|
|
73
|
+
onLaunch: () => Promise<void>;
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
interface DevToolsViewAction extends DevToolsDockEntryBase {
|
|
77
|
+
type: 'action';
|
|
78
|
+
action: ClientScriptEntry;
|
|
79
|
+
}
|
|
80
|
+
interface DevToolsViewCustomRender extends DevToolsDockEntryBase {
|
|
81
|
+
type: 'custom-render';
|
|
82
|
+
renderer: ClientScriptEntry;
|
|
83
|
+
}
|
|
84
|
+
type DevToolsDockEntry = DevToolsViewIframe | DevToolsViewAction | DevToolsViewCustomRender | DevToolsViewLauncher;
|
|
85
|
+
//#endregion
|
|
8
86
|
//#region ../kit/src/types/rpc-augments.d.ts
|
|
9
87
|
/**
|
|
10
88
|
* To be extended
|
|
@@ -28,27 +106,34 @@ interface DockPanelStorage {
|
|
|
28
106
|
open: boolean;
|
|
29
107
|
inactiveTimeout: number;
|
|
30
108
|
}
|
|
31
|
-
interface
|
|
109
|
+
interface DevToolsClientContext {
|
|
110
|
+
/**
|
|
111
|
+
* The RPC client to interact with the server
|
|
112
|
+
*/
|
|
113
|
+
readonly rpc: DevToolsRpcClient;
|
|
114
|
+
}
|
|
115
|
+
interface DocksContext extends DevToolsClientContext {
|
|
32
116
|
/**
|
|
33
117
|
* Type of the client environment
|
|
34
118
|
*
|
|
35
119
|
* 'embedded' - running inside an embedded floating panel
|
|
36
|
-
* 'standalone' - running inside a
|
|
120
|
+
* 'standalone' - running inside a standalone window (no user app)
|
|
37
121
|
*/
|
|
38
122
|
readonly clientType: 'embedded' | 'standalone';
|
|
39
|
-
/**
|
|
40
|
-
* The RPC client to interact with the server
|
|
41
|
-
*/
|
|
42
|
-
readonly rpc: DevToolsRpcClient;
|
|
43
123
|
/**
|
|
44
124
|
* The panel context
|
|
45
125
|
*/
|
|
46
|
-
panel: DocksPanelContext;
|
|
126
|
+
readonly panel: DocksPanelContext;
|
|
47
127
|
/**
|
|
48
128
|
* The docks entries context
|
|
49
129
|
*/
|
|
50
|
-
docks: DocksEntriesContext;
|
|
130
|
+
readonly docks: DocksEntriesContext;
|
|
131
|
+
/**
|
|
132
|
+
* The client-side RPC functions to be called from the server
|
|
133
|
+
*/
|
|
134
|
+
readonly clientRpc: DevToolsClientRpcHost;
|
|
51
135
|
}
|
|
136
|
+
type DevToolsClientRpcHost = RpcFunctionsCollector<DevToolsRpcClientFunctions, DevToolsClientContext>;
|
|
52
137
|
interface DocksPanelContext {
|
|
53
138
|
store: DockPanelStorage;
|
|
54
139
|
isDragging: boolean;
|
|
@@ -56,7 +141,8 @@ interface DocksPanelContext {
|
|
|
56
141
|
readonly isVertical: boolean;
|
|
57
142
|
}
|
|
58
143
|
interface DocksEntriesContext {
|
|
59
|
-
|
|
144
|
+
selectedId: string | null;
|
|
145
|
+
readonly selected: DevToolsDockEntry | null;
|
|
60
146
|
entries: DevToolsDockEntry[];
|
|
61
147
|
entryToStateMap: Map<string, DockEntryState>;
|
|
62
148
|
/**
|
|
@@ -99,12 +185,6 @@ interface DockClientScriptContext extends DocksContext {
|
|
|
99
185
|
}
|
|
100
186
|
//#endregion
|
|
101
187
|
//#region ../kit/src/types/views.d.ts
|
|
102
|
-
interface DevToolsDockHost {
|
|
103
|
-
views: Map<string, DevToolsDockEntry>;
|
|
104
|
-
register: (entry: DevToolsDockEntry) => void;
|
|
105
|
-
update: (entry: DevToolsDockEntry) => void;
|
|
106
|
-
values: () => DevToolsDockEntry[];
|
|
107
|
-
}
|
|
108
188
|
interface DevToolsViewHost {
|
|
109
189
|
/**
|
|
110
190
|
* @internal
|
|
@@ -120,61 +200,6 @@ interface DevToolsViewHost {
|
|
|
120
200
|
*/
|
|
121
201
|
hostStatic: (baseUrl: string, distDir: string) => void;
|
|
122
202
|
}
|
|
123
|
-
type DevToolsDockEntryCategory = 'app' | 'framework' | 'web' | 'advanced' | 'default';
|
|
124
|
-
interface DevToolsDockEntryBase {
|
|
125
|
-
id: string;
|
|
126
|
-
title: string;
|
|
127
|
-
icon: string | {
|
|
128
|
-
light: string;
|
|
129
|
-
dark: string;
|
|
130
|
-
};
|
|
131
|
-
/**
|
|
132
|
-
* The default order of the entry in the dock.
|
|
133
|
-
* The higher the number the earlier it appears.
|
|
134
|
-
* @default 0
|
|
135
|
-
*/
|
|
136
|
-
defaultOrder?: number;
|
|
137
|
-
/**
|
|
138
|
-
* The category of the entry
|
|
139
|
-
* @default 'default'
|
|
140
|
-
*/
|
|
141
|
-
category?: DevToolsDockEntryCategory;
|
|
142
|
-
}
|
|
143
|
-
interface ClientScriptEntry {
|
|
144
|
-
/**
|
|
145
|
-
* The filepath or module name to import from
|
|
146
|
-
*/
|
|
147
|
-
importFrom: string;
|
|
148
|
-
/**
|
|
149
|
-
* The name to import the module as
|
|
150
|
-
*
|
|
151
|
-
* @default 'default'
|
|
152
|
-
*/
|
|
153
|
-
importName?: string;
|
|
154
|
-
}
|
|
155
|
-
interface DevToolsViewIframe extends DevToolsDockEntryBase {
|
|
156
|
-
type: 'iframe';
|
|
157
|
-
url: string;
|
|
158
|
-
/**
|
|
159
|
-
* The id of the iframe, if multiple tabs is assigned with the same id, the iframe will be shared.
|
|
160
|
-
*
|
|
161
|
-
* When not provided, it would be treated as a unique frame.
|
|
162
|
-
*/
|
|
163
|
-
frameId?: string;
|
|
164
|
-
/**
|
|
165
|
-
* Optional client script to import into the iframe
|
|
166
|
-
*/
|
|
167
|
-
clientScript?: ClientScriptEntry;
|
|
168
|
-
}
|
|
169
|
-
interface DevToolsViewAction extends DevToolsDockEntryBase {
|
|
170
|
-
type: 'action';
|
|
171
|
-
action: ClientScriptEntry;
|
|
172
|
-
}
|
|
173
|
-
interface DevToolsViewCustomRender extends DevToolsDockEntryBase {
|
|
174
|
-
type: 'custom-render';
|
|
175
|
-
renderer: ClientScriptEntry;
|
|
176
|
-
}
|
|
177
|
-
type DevToolsDockEntry = DevToolsViewIframe | DevToolsViewAction | DevToolsViewCustomRender;
|
|
178
203
|
//#endregion
|
|
179
204
|
//#region ../kit/src/types/vite-plugin.d.ts
|
|
180
205
|
interface DevToolsCapabilities {
|
|
@@ -209,7 +234,9 @@ interface DevToolsNodeUtils {
|
|
|
209
234
|
}
|
|
210
235
|
//#endregion
|
|
211
236
|
//#region ../kit/src/types/rpc.d.ts
|
|
212
|
-
type RpcFunctionsHost = RpcFunctionsCollectorBase<DevToolsRpcServerFunctions, DevToolsNodeContext
|
|
237
|
+
type RpcFunctionsHost = RpcFunctionsCollectorBase<DevToolsRpcServerFunctions, DevToolsNodeContext> & {
|
|
238
|
+
boardcast: BirpcGroup<DevToolsRpcClientFunctions, DevToolsRpcServerFunctions>['broadcast'];
|
|
239
|
+
};
|
|
213
240
|
//#endregion
|
|
214
241
|
//#region ../kit/src/types/vite-augment.d.ts
|
|
215
242
|
declare module 'vite' {
|