@vitejs/devtools 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.
- package/dist/{cli-commands-DRuCf81B.js → cli-commands-BBPbCd8A.js} +2 -2
- package/dist/cli-commands.js +2 -3
- package/dist/cli.js +2 -3
- package/dist/client/inject.js +5 -12
- package/dist/client/standalone/assets/{index-BdwMlRiX.css → index-CsLZ-29s.css} +1 -1
- package/dist/client/standalone/assets/index-g0E0pe2M.js +7 -0
- package/dist/client/standalone/index.html +2 -2
- package/dist/client/webcomponents.d.ts +2 -2
- package/dist/client/webcomponents.js +8 -8
- package/dist/dirs.js +1 -1
- package/dist/{docks-j8O6WvbD.js → docks-B3cDUs1u.js} +22 -35
- package/dist/{index-Wdefo_Ne.d.ts → index-C5iw-7QZ.d.ts} +56 -15
- package/dist/index.d.ts +3 -2
- package/dist/index.js +1 -2
- package/dist/{plugins-l6D28NJB.js → plugins-DfJlAQ2j.js} +133 -120
- package/package.json +14 -13
- package/dist/client/standalone/assets/index-Brys-GL2.js +0 -7
- /package/dist/{dirs-DcSK9l9L.js → dirs-C0s1Ghvy.js} +0 -0
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>Vite DevTools</title>
|
|
7
7
|
<meta name="description" content="Vite DevTools" />
|
|
8
|
-
<script type="module" crossorigin src="./assets/index-
|
|
9
|
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
|
8
|
+
<script type="module" crossorigin src="./assets/index-g0E0pe2M.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="./assets/index-CsLZ-29s.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body class="font-sans dark:text-white dark:bg-black">
|
|
12
12
|
<div id="app"></div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as DevToolsDockEntry, i as
|
|
1
|
+
import { f as DevToolsDockEntry, i as DevToolsRpcClient, n as DockPanelStorage, r as DocksContext, t as DockEntryState } from "../index-C5iw-7QZ.js";
|
|
2
2
|
import { Ref, ShallowRef, VueElementConstructor } from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/client/webcomponents/components/DockEmbedded.d.ts
|
|
@@ -9,7 +9,7 @@ declare const DockEmbedded: VueElementConstructor<{
|
|
|
9
9
|
//#region src/client/webcomponents/state/docks.d.ts
|
|
10
10
|
declare function DEFAULT_DOCK_PANEL_STORE(): DockPanelStorage;
|
|
11
11
|
declare function createDockEntryState(entry: DevToolsDockEntry, selected: Ref<DevToolsDockEntry | null>): DockEntryState;
|
|
12
|
-
declare function useDocksEntries(
|
|
12
|
+
declare function useDocksEntries(rpc: DevToolsRpcClient): Promise<Ref<DevToolsDockEntry[]>>;
|
|
13
13
|
//#endregion
|
|
14
14
|
//#region src/client/webcomponents/utils/PersistedDomViewsManager.d.ts
|
|
15
15
|
interface TagNameToElementMap {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as watchEffect, B as normalizeStyle, C as onMounted, D as renderSlot, E as renderList, F as ref, I as shallowRef, L as toRefs, M as withDirectives, N as markRaw, O as useTemplateRef, P as reactive, R as unref, S as nextTick, T as openBlock, V as toDisplayString, _ as createCommentVNode, a as useEventListener, b as createVNode, c as useWindowSize, d as vShow, f as withModifiers, g as createBlock, h as createBaseVNode, i as useElementBounding, j as withCtx, k as watch, l as watchImmediate, m as computed, n as createDockEntryState, p as Fragment, r as useDocksEntries, s as useScreenSafeArea, t as DEFAULT_DOCK_PANEL_STORE, u as defineCustomElement, v as createElementBlock, w as onUnmounted, x as defineComponent, y as createStaticVNode, z as normalizeClass } from "../docks-
|
|
1
|
+
import { A as watchEffect, B as normalizeStyle, C as onMounted, D as renderSlot, E as renderList, F as ref, I as shallowRef, L as toRefs, M as withDirectives, N as markRaw, O as useTemplateRef, P as reactive, R as unref, S as nextTick, T as openBlock, V as toDisplayString, _ as createCommentVNode, a as useEventListener, b as createVNode, c as useWindowSize, d as vShow, f as withModifiers, g as createBlock, h as createBaseVNode, i as useElementBounding, j as withCtx, k as watch, l as watchImmediate, m as computed, n as createDockEntryState, p as Fragment, r as useDocksEntries, s as useScreenSafeArea, t as DEFAULT_DOCK_PANEL_STORE, u as defineCustomElement, v as createElementBlock, w as onUnmounted, x as defineComponent, y as createStaticVNode, z as normalizeClass } from "../docks-B3cDUs1u.js";
|
|
2
2
|
import { FitAddon } from "@xterm/addon-fit";
|
|
3
3
|
import { Terminal } from "@xterm/xterm";
|
|
4
4
|
|
|
@@ -54,8 +54,8 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
54
54
|
if (str.includes("/") || str.startsWith("data:") || str.startsWith("builtin:")) return str;
|
|
55
55
|
const match = str.match(/^([\w-]+):([\w-]+)$/);
|
|
56
56
|
if (match) {
|
|
57
|
-
const [, collection,
|
|
58
|
-
return `https://api.iconify.design/${collection}/${
|
|
57
|
+
const [, collection, icon$1] = match;
|
|
58
|
+
return `https://api.iconify.design/${collection}/${icon$1}.svg${color === "dark" ? "?color=%23eee" : "?color=%23111"}`;
|
|
59
59
|
}
|
|
60
60
|
return str;
|
|
61
61
|
}
|
|
@@ -656,7 +656,7 @@ function useTerminals(context) {
|
|
|
656
656
|
if (_terminalsMap) return _terminalsMap;
|
|
657
657
|
const map = _terminalsMap = reactive(/* @__PURE__ */ new Map());
|
|
658
658
|
async function updateTerminals() {
|
|
659
|
-
const terminals = await context.rpc
|
|
659
|
+
const terminals = await context.rpc.call("vite:internal:terminals:list");
|
|
660
660
|
for (const terminal of terminals) {
|
|
661
661
|
if (map.has(terminal.id)) {
|
|
662
662
|
map.get(terminal.id).info = Object.freeze(terminal);
|
|
@@ -670,12 +670,12 @@ function useTerminals(context) {
|
|
|
670
670
|
}
|
|
671
671
|
console.log("[VITE DEVTOOLS] Terminals Updated", [...map.values()]);
|
|
672
672
|
}
|
|
673
|
-
context.
|
|
673
|
+
context.rpc.client.register({
|
|
674
674
|
name: "vite:internal:terminals:updated",
|
|
675
675
|
type: "action",
|
|
676
676
|
handler: () => updateTerminals()
|
|
677
677
|
});
|
|
678
|
-
context.
|
|
678
|
+
context.rpc.client.register({
|
|
679
679
|
name: "vite:internal:terminals:stream-chunk",
|
|
680
680
|
type: "action",
|
|
681
681
|
handler: (data) => {
|
|
@@ -722,7 +722,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
722
722
|
});
|
|
723
723
|
props.terminal.terminal = term;
|
|
724
724
|
if (props.terminal.buffer == null) {
|
|
725
|
-
const { buffer } = await props.context.rpc
|
|
725
|
+
const { buffer } = await props.context.rpc.call("vite:internal:terminals:read", props.terminal.info.id);
|
|
726
726
|
props.terminal.buffer = markRaw(buffer);
|
|
727
727
|
}
|
|
728
728
|
for (const chunk of props.terminal.buffer) term.writeln(chunk);
|
|
@@ -891,7 +891,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
891
891
|
setup(__props) {
|
|
892
892
|
const props = __props;
|
|
893
893
|
function onLaunch() {
|
|
894
|
-
props.context.rpc
|
|
894
|
+
props.context.rpc.call("vite:internal:docks:on-launch", props.entry.id);
|
|
895
895
|
}
|
|
896
896
|
const status = computed(() => props.entry.launcher.status || "idle");
|
|
897
897
|
const iconsMap = {
|
package/dist/dirs.js
CHANGED
|
@@ -2133,7 +2133,6 @@ function invokeDirectiveHook(vnode, prevVNode, instance, name) {
|
|
|
2133
2133
|
const TeleportEndKey = Symbol("_vte");
|
|
2134
2134
|
const isTeleport = (type) => type.__isTeleport;
|
|
2135
2135
|
const leaveCbKey = Symbol("_leaveCb");
|
|
2136
|
-
const enterCbKey$1 = Symbol("_enterCb");
|
|
2137
2136
|
function setTransitionHooks(vnode, hooks) {
|
|
2138
2137
|
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
2139
2138
|
vnode.transition = hooks;
|
|
@@ -5803,9 +5802,6 @@ var VueElement = class VueElement extends BaseClass {
|
|
|
5803
5802
|
}
|
|
5804
5803
|
}
|
|
5805
5804
|
};
|
|
5806
|
-
const moveCbKey = Symbol("_moveCb");
|
|
5807
|
-
const enterCbKey = Symbol("_enterCb");
|
|
5808
|
-
const assignKey = Symbol("_assign");
|
|
5809
5805
|
const systemModifiers = [
|
|
5810
5806
|
"ctrl",
|
|
5811
5807
|
"shift",
|
|
@@ -5926,7 +5922,7 @@ function initDev() {
|
|
|
5926
5922
|
if (!!(process.env.NODE_ENV !== "production")) initDev();
|
|
5927
5923
|
|
|
5928
5924
|
//#endregion
|
|
5929
|
-
//#region ../../node_modules/.pnpm/@vueuse+shared@14.
|
|
5925
|
+
//#region ../../node_modules/.pnpm/@vueuse+shared@14.1.0_vue@3.5.25_typescript@5.9.3_/node_modules/@vueuse/shared/dist/index.js
|
|
5930
5926
|
/**
|
|
5931
5927
|
* Call onScopeDispose() if it's inside an effect scope lifecycle, if not, do nothing
|
|
5932
5928
|
*
|
|
@@ -6098,11 +6094,11 @@ function useDebounceFn(fn, ms = 200, options = {}) {
|
|
|
6098
6094
|
return createFilterWrapper(debounceFilter(ms, options), fn);
|
|
6099
6095
|
}
|
|
6100
6096
|
function watchWithFilter(source, cb, options = {}) {
|
|
6101
|
-
const { eventFilter = bypassFilter
|
|
6097
|
+
const { eventFilter = bypassFilter, ...watchOptions } = options;
|
|
6102
6098
|
return watch(source, createFilterWrapper(eventFilter, cb), watchOptions);
|
|
6103
6099
|
}
|
|
6104
6100
|
function watchPausable(source, cb, options = {}) {
|
|
6105
|
-
const { eventFilter: filter, initialState = "active"
|
|
6101
|
+
const { eventFilter: filter, initialState = "active", ...watchOptions } = options;
|
|
6106
6102
|
const { eventFilter, pause, resume, isActive } = pausableFilter(filter, { initialState });
|
|
6107
6103
|
return {
|
|
6108
6104
|
stop: watchWithFilter(source, cb, {
|
|
@@ -6141,7 +6137,7 @@ function watchImmediate(source, cb, options) {
|
|
|
6141
6137
|
}
|
|
6142
6138
|
|
|
6143
6139
|
//#endregion
|
|
6144
|
-
//#region ../../node_modules/.pnpm/@vueuse+core@14.
|
|
6140
|
+
//#region ../../node_modules/.pnpm/@vueuse+core@14.1.0_vue@3.5.25_typescript@5.9.3_/node_modules/@vueuse/core/dist/index.js
|
|
6145
6141
|
const defaultWindow = isClient ? window : void 0;
|
|
6146
6142
|
const defaultDocument = isClient ? window.document : void 0;
|
|
6147
6143
|
const defaultNavigator = isClient ? window.navigator : void 0;
|
|
@@ -6157,11 +6153,6 @@ function unrefElement(elRef) {
|
|
|
6157
6153
|
return (_$el = plain === null || plain === void 0 ? void 0 : plain.$el) !== null && _$el !== void 0 ? _$el : plain;
|
|
6158
6154
|
}
|
|
6159
6155
|
function useEventListener(...args) {
|
|
6160
|
-
const cleanups = [];
|
|
6161
|
-
const cleanup = () => {
|
|
6162
|
-
cleanups.forEach((fn) => fn());
|
|
6163
|
-
cleanups.length = 0;
|
|
6164
|
-
};
|
|
6165
6156
|
const register = (el, event, listener, options) => {
|
|
6166
6157
|
el.addEventListener(event, listener, options);
|
|
6167
6158
|
return () => el.removeEventListener(event, listener, options);
|
|
@@ -6170,7 +6161,7 @@ function useEventListener(...args) {
|
|
|
6170
6161
|
const test = toArray(toValue(args[0])).filter((e) => e != null);
|
|
6171
6162
|
return test.every((e) => typeof e !== "string") ? test : void 0;
|
|
6172
6163
|
});
|
|
6173
|
-
|
|
6164
|
+
return watchImmediate(() => {
|
|
6174
6165
|
var _firstParamTargets$va, _firstParamTargets$va2;
|
|
6175
6166
|
return [
|
|
6176
6167
|
(_firstParamTargets$va = (_firstParamTargets$va2 = firstParamTargets.value) === null || _firstParamTargets$va2 === void 0 ? void 0 : _firstParamTargets$va2.map((e) => unrefElement(e))) !== null && _firstParamTargets$va !== void 0 ? _firstParamTargets$va : [defaultWindow].filter((e) => e != null),
|
|
@@ -6178,18 +6169,14 @@ function useEventListener(...args) {
|
|
|
6178
6169
|
toArray(unref(firstParamTargets.value ? args[2] : args[1])),
|
|
6179
6170
|
toValue(firstParamTargets.value ? args[3] : args[2])
|
|
6180
6171
|
];
|
|
6181
|
-
}, ([raw_targets, raw_events, raw_listeners, raw_options]) => {
|
|
6182
|
-
cleanup();
|
|
6172
|
+
}, ([raw_targets, raw_events, raw_listeners, raw_options], _, onCleanup) => {
|
|
6183
6173
|
if (!(raw_targets === null || raw_targets === void 0 ? void 0 : raw_targets.length) || !(raw_events === null || raw_events === void 0 ? void 0 : raw_events.length) || !(raw_listeners === null || raw_listeners === void 0 ? void 0 : raw_listeners.length)) return;
|
|
6184
6174
|
const optionsClone = isObject(raw_options) ? { ...raw_options } : raw_options;
|
|
6185
|
-
cleanups
|
|
6175
|
+
const cleanups = raw_targets.flatMap((el) => raw_events.flatMap((event) => raw_listeners.map((listener) => register(el, event, listener, optionsClone))));
|
|
6176
|
+
onCleanup(() => {
|
|
6177
|
+
cleanups.forEach((fn) => fn());
|
|
6178
|
+
});
|
|
6186
6179
|
}, { flush: "post" });
|
|
6187
|
-
const stop$1 = () => {
|
|
6188
|
-
stopWatch();
|
|
6189
|
-
cleanup();
|
|
6190
|
-
};
|
|
6191
|
-
tryOnScopeDispose(cleanup);
|
|
6192
|
-
return stop$1;
|
|
6193
6180
|
}
|
|
6194
6181
|
/**
|
|
6195
6182
|
* Mounted state in ref.
|
|
@@ -6224,7 +6211,7 @@ function useSupported(callback) {
|
|
|
6224
6211
|
* @param options
|
|
6225
6212
|
*/
|
|
6226
6213
|
function useMutationObserver(target, callback, options = {}) {
|
|
6227
|
-
const { window: window$1 = defaultWindow
|
|
6214
|
+
const { window: window$1 = defaultWindow, ...mutationOptions } = options;
|
|
6228
6215
|
let observer;
|
|
6229
6216
|
const isSupported$1 = /* @__PURE__ */ useSupported(() => window$1 && "MutationObserver" in window$1);
|
|
6230
6217
|
const cleanup = () => {
|
|
@@ -6514,7 +6501,7 @@ function useCssVar(prop, target, options = {}) {
|
|
|
6514
6501
|
* @param options
|
|
6515
6502
|
*/
|
|
6516
6503
|
function useResizeObserver(target, callback, options = {}) {
|
|
6517
|
-
const { window: window$1 = defaultWindow
|
|
6504
|
+
const { window: window$1 = defaultWindow, ...observerOptions } = options;
|
|
6518
6505
|
let observer;
|
|
6519
6506
|
const isSupported$1 = /* @__PURE__ */ useSupported(() => window$1 && "ResizeObserver" in window$1);
|
|
6520
6507
|
const cleanup = () => {
|
|
@@ -6770,26 +6757,26 @@ function createDockEntryState(entry, selected) {
|
|
|
6770
6757
|
events: markRaw(events)
|
|
6771
6758
|
});
|
|
6772
6759
|
watch(() => selected.value?.id, (newSelectedId) => {
|
|
6773
|
-
if (newSelectedId === entry.id) events.
|
|
6774
|
-
else events.
|
|
6775
|
-
});
|
|
6760
|
+
if (newSelectedId === entry.id) events.emitOnce("entry:activated");
|
|
6761
|
+
else events.emitOnce("entry:deactivated");
|
|
6762
|
+
}, { immediate: true });
|
|
6776
6763
|
watch(() => state.domElements.iframe, (newIframe) => {
|
|
6777
|
-
if (newIframe) events.
|
|
6778
|
-
});
|
|
6764
|
+
if (newIframe) events.emitOnce("dom:iframe:mounted", newIframe);
|
|
6765
|
+
}, { immediate: true });
|
|
6779
6766
|
watch(() => state.domElements.panel, (newPanel) => {
|
|
6780
|
-
if (newPanel) events.
|
|
6781
|
-
});
|
|
6767
|
+
if (newPanel) events.emitOnce("dom:panel:mounted", newPanel);
|
|
6768
|
+
}, { immediate: true });
|
|
6782
6769
|
return state;
|
|
6783
6770
|
}
|
|
6784
6771
|
let _docksEntriesRef;
|
|
6785
|
-
async function useDocksEntries(
|
|
6772
|
+
async function useDocksEntries(rpc) {
|
|
6786
6773
|
if (_docksEntriesRef) return _docksEntriesRef;
|
|
6787
6774
|
const dockEntries = _docksEntriesRef = shallowRef([]);
|
|
6788
6775
|
async function updateDocksEntries() {
|
|
6789
|
-
dockEntries.value = (await
|
|
6776
|
+
dockEntries.value = (await rpc.call("vite:internal:docks:list")).map((entry) => Object.freeze(entry));
|
|
6790
6777
|
console.log("[VITE DEVTOOLS] Docks Entries Updated", [...dockEntries.value]);
|
|
6791
6778
|
}
|
|
6792
|
-
|
|
6779
|
+
rpc.client.register({
|
|
6793
6780
|
name: "vite:internal:docks:updated",
|
|
6794
6781
|
type: "action",
|
|
6795
6782
|
handler: () => updateDocksEntries()
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { RpcDefinitionsToFunctions, RpcFunctionsCollector, RpcFunctionsCollectorBase } from "birpc-x";
|
|
2
2
|
import { Plugin, ResolvedConfig, ViteDevServer } from "vite";
|
|
3
3
|
import { Raw } from "vue";
|
|
4
|
-
import { BirpcGroup, BirpcReturn } from "birpc";
|
|
5
4
|
import { ChildProcess } from "node:child_process";
|
|
6
|
-
import "
|
|
5
|
+
import { BirpcReturn } from "birpc";
|
|
7
6
|
|
|
8
7
|
//#region ../kit/src/types/events.d.ts
|
|
9
8
|
interface EventsMap {
|
|
@@ -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>(
|
|
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>(
|
|
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
|
|
@@ -251,7 +275,7 @@ interface ConnectionMeta {
|
|
|
251
275
|
//#endregion
|
|
252
276
|
//#region ../kit/src/types/rpc.d.ts
|
|
253
277
|
type RpcFunctionsHost = RpcFunctionsCollectorBase<DevToolsRpcServerFunctions, DevToolsNodeContext> & {
|
|
254
|
-
boardcast:
|
|
278
|
+
boardcast: <T extends keyof DevToolsRpcClientFunctions, Args extends Parameters<DevToolsRpcClientFunctions[T]>>(name: T, ...args: Args) => Promise<(Awaited<ReturnType<DevToolsRpcClientFunctions[T]>> | undefined)[]>;
|
|
255
279
|
};
|
|
256
280
|
//#endregion
|
|
257
281
|
//#region ../kit/src/types/vite-augment.d.ts
|
|
@@ -262,11 +286,31 @@ declare module 'vite' {
|
|
|
262
286
|
}
|
|
263
287
|
//#endregion
|
|
264
288
|
//#region ../kit/src/client/rpc.d.ts
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
289
|
+
interface DevToolsRpcClient {
|
|
290
|
+
/**
|
|
291
|
+
* The events of the client
|
|
292
|
+
*/
|
|
293
|
+
events: EventEmitter<RpcClientEvents>;
|
|
294
|
+
/**
|
|
295
|
+
* The connection meta
|
|
296
|
+
*/
|
|
297
|
+
readonly connectionMeta: ConnectionMeta;
|
|
298
|
+
/**
|
|
299
|
+
* Call a RPC function on the server
|
|
300
|
+
*/
|
|
301
|
+
call: BirpcReturn<DevToolsRpcServerFunctions, DevToolsRpcClientFunctions>['$call'];
|
|
302
|
+
/**
|
|
303
|
+
* Call a RPC event on the server, and does not expect a response
|
|
304
|
+
*/
|
|
305
|
+
callEvent: BirpcReturn<DevToolsRpcServerFunctions, DevToolsRpcClientFunctions>['$callEvent'];
|
|
306
|
+
/**
|
|
307
|
+
* Call a RPC optional function on the server
|
|
308
|
+
*/
|
|
309
|
+
callOptional: BirpcReturn<DevToolsRpcServerFunctions, DevToolsRpcClientFunctions>['$callOptional'];
|
|
310
|
+
/**
|
|
311
|
+
* The client RPC host
|
|
312
|
+
*/
|
|
313
|
+
client: DevToolsClientRpcHost;
|
|
270
314
|
}
|
|
271
315
|
//#endregion
|
|
272
316
|
//#region ../kit/src/client/docks.d.ts
|
|
@@ -301,10 +345,6 @@ interface DocksContext extends DevToolsClientContext {
|
|
|
301
345
|
* The docks entries context
|
|
302
346
|
*/
|
|
303
347
|
readonly docks: DocksEntriesContext;
|
|
304
|
-
/**
|
|
305
|
-
* The client-side RPC functions to be called from the server
|
|
306
|
-
*/
|
|
307
|
-
readonly clientRpc: DevToolsClientRpcHost;
|
|
308
348
|
}
|
|
309
349
|
type DevToolsClientRpcHost = RpcFunctionsCollector<DevToolsRpcClientFunctions, DevToolsClientContext>;
|
|
310
350
|
interface DocksPanelContext {
|
|
@@ -345,6 +385,7 @@ interface DockEntryStateEvents {
|
|
|
345
385
|
'dom:panel:mounted': (panel: HTMLDivElement) => void;
|
|
346
386
|
'dom:iframe:mounted': (iframe: HTMLIFrameElement) => void;
|
|
347
387
|
}
|
|
388
|
+
interface RpcClientEvents {}
|
|
348
389
|
//#endregion
|
|
349
390
|
//#region ../kit/src/client/client-script.d.ts
|
|
350
391
|
/**
|
|
@@ -357,4 +398,4 @@ interface DockClientScriptContext extends DocksContext {
|
|
|
357
398
|
current: DockEntryState;
|
|
358
399
|
}
|
|
359
400
|
//#endregion
|
|
360
|
-
export { RpcDefinitionsToFunctions as a, DevToolsTerminalSessionBase as c, DevToolsRpcServerFunctions as d, DevToolsDockEntry as f,
|
|
401
|
+
export { RpcDefinitionsToFunctions as a, DevToolsTerminalSessionBase as c, DevToolsRpcServerFunctions as d, DevToolsDockEntry as f, DevToolsRpcClient as i, DevToolsTerminalSessionStreamChunkEvent as l, DockPanelStorage as n, ConnectionMeta as o, DocksContext as r, DevToolsNodeContext as s, DockEntryState as t, DevToolsRpcClientFunctions as u };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { a as RpcDefinitionsToFunctions, c as DevToolsTerminalSessionBase, d as DevToolsRpcServerFunctions, f as DevToolsDockEntry, l as DevToolsTerminalSessionStreamChunkEvent, o as ConnectionMeta, s as DevToolsNodeContext, u as DevToolsRpcClientFunctions } from "./index-
|
|
1
|
+
import { a as RpcDefinitionsToFunctions, c as DevToolsTerminalSessionBase, d as DevToolsRpcServerFunctions, f as DevToolsDockEntry, l as DevToolsTerminalSessionStreamChunkEvent, o as ConnectionMeta, s as DevToolsNodeContext, u as DevToolsRpcClientFunctions } from "./index-C5iw-7QZ.js";
|
|
2
2
|
import * as birpc_x0 from "birpc-x";
|
|
3
|
+
import { RpcFunctionsCollectorBase } from "birpc-x";
|
|
3
4
|
import { Plugin, ResolvedConfig, ViteDevServer } from "vite";
|
|
4
5
|
import * as birpc0 from "birpc";
|
|
5
6
|
import * as h30 from "h3";
|
|
@@ -48,7 +49,7 @@ interface CreateWsServerOptions {
|
|
|
48
49
|
//#region src/node/server.d.ts
|
|
49
50
|
declare function createDevToolsMiddleware(options: CreateWsServerOptions): Promise<{
|
|
50
51
|
h3: h30.App;
|
|
51
|
-
rpc: birpc0.BirpcGroup<DevToolsRpcClientFunctions, DevToolsRpcServerFunctions>;
|
|
52
|
+
rpc: birpc0.BirpcGroup<DevToolsRpcClientFunctions, DevToolsRpcServerFunctions, false>;
|
|
52
53
|
middleware: h30.NodeListener;
|
|
53
54
|
getConnectionMeta: () => Promise<ConnectionMeta>;
|
|
54
55
|
}>;
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { d as createDevToolsContext, n as createDevToolsMiddleware, t as DevTools } from "./plugins-
|
|
2
|
-
import "./dirs-DcSK9l9L.js";
|
|
1
|
+
import { d as createDevToolsContext, n as createDevToolsMiddleware, t as DevTools } from "./plugins-DfJlAQ2j.js";
|
|
3
2
|
|
|
4
3
|
export { DevTools, createDevToolsContext, createDevToolsMiddleware };
|