@vitejs/devtools-kit 0.1.2 → 0.1.4
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/client.d.ts +2 -2
- package/dist/client.js +59 -274
- package/dist/constants.d.ts +2 -1
- package/dist/human-id-BSiGlZOw.js +803 -0
- package/dist/{index-WxzZW3L-.d.ts → index-BSLgRVfr.d.ts} +19 -5
- package/dist/index.d.ts +2 -2
- package/dist/shared-state-CCNEYlbv.js +928 -0
- package/dist/{shared-state-BFKKxNt1.d.ts → shared-state-NxkOZ3u0.d.ts} +17 -3
- package/dist/utils/events.d.ts +1 -1
- package/dist/utils/human-id.d.ts +10 -0
- package/dist/utils/human-id.js +2 -0
- package/dist/utils/shared-state.d.ts +2 -2
- package/dist/utils/shared-state.js +1 -35
- package/package.json +10 -6
- package/skills/vite-devtools-kit/SKILL.md +13 -0
- package/skills/vite-devtools-kit/references/project-structure.md +9 -0
- package/skills/vite-devtools-kit/references/rpc-patterns.md +15 -0
- package/skills/vite-devtools-kit/references/shared-state-patterns.md +12 -1
- /package/dist/{events-B41U-zeg.d.ts → events-BTCXlxeC.d.ts} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as EventEmitter } from "./events-
|
|
2
|
-
import { o as SharedState } from "./shared-state-
|
|
1
|
+
import { t as EventEmitter } from "./events-BTCXlxeC.js";
|
|
2
|
+
import { o as SharedState } from "./shared-state-NxkOZ3u0.js";
|
|
3
3
|
import { RpcDefinitionsFilter, RpcDefinitionsToFunctions, RpcFunctionsCollector, RpcFunctionsCollectorBase } from "@vitejs/devtools-rpc";
|
|
4
4
|
import { WebSocketRpcClientOptions } from "@vitejs/devtools-rpc/presets/ws/client";
|
|
5
5
|
import { DevToolsNodeRpcSessionMeta } from "@vitejs/devtools-rpc/presets/ws/server";
|
|
@@ -511,9 +511,9 @@ interface DevToolsRpcClientOptions {
|
|
|
511
511
|
connectionMeta?: ConnectionMeta;
|
|
512
512
|
baseURL?: string | string[];
|
|
513
513
|
/**
|
|
514
|
-
* The auth
|
|
514
|
+
* The auth token to use for the client
|
|
515
515
|
*/
|
|
516
|
-
|
|
516
|
+
authToken?: string;
|
|
517
517
|
wsOptions?: Partial<WebSocketRpcClientOptions>;
|
|
518
518
|
rpcOptions?: Partial<BirpcOptions<DevToolsRpcServerFunctions, DevToolsRpcClientFunctions, boolean>>;
|
|
519
519
|
}
|
|
@@ -545,6 +545,11 @@ interface DevToolsRpcClient {
|
|
|
545
545
|
* Request trust from the server
|
|
546
546
|
*/
|
|
547
547
|
requestTrust: () => Promise<boolean>;
|
|
548
|
+
/**
|
|
549
|
+
* Request trust from the server using a specific auth token.
|
|
550
|
+
* Updates the stored token and re-requests trust without reloading the page.
|
|
551
|
+
*/
|
|
552
|
+
requestTrustWithToken: (token: string) => Promise<boolean>;
|
|
548
553
|
/**
|
|
549
554
|
* Call a RPC function on the server
|
|
550
555
|
*/
|
|
@@ -570,6 +575,7 @@ interface DevToolsRpcClientMode {
|
|
|
570
575
|
readonly isTrusted: boolean;
|
|
571
576
|
ensureTrusted: DevToolsRpcClient['ensureTrusted'];
|
|
572
577
|
requestTrust: DevToolsRpcClient['requestTrust'];
|
|
578
|
+
requestTrustWithToken: DevToolsRpcClient['requestTrustWithToken'];
|
|
573
579
|
call: DevToolsRpcClient['call'];
|
|
574
580
|
callEvent: DevToolsRpcClient['callEvent'];
|
|
575
581
|
callOptional: DevToolsRpcClient['callOptional'];
|
|
@@ -578,6 +584,7 @@ declare function getDevToolsRpcClient(options?: DevToolsRpcClientOptions): Promi
|
|
|
578
584
|
//#endregion
|
|
579
585
|
//#region src/client/docks.d.ts
|
|
580
586
|
interface DockPanelStorage {
|
|
587
|
+
mode: 'float' | 'edge';
|
|
581
588
|
width: number;
|
|
582
589
|
height: number;
|
|
583
590
|
top: number;
|
|
@@ -676,4 +683,11 @@ interface DockClientScriptContext extends DocksContext {
|
|
|
676
683
|
logs: DevToolsLogsClient;
|
|
677
684
|
}
|
|
678
685
|
//#endregion
|
|
679
|
-
|
|
686
|
+
//#region src/client/context.d.ts
|
|
687
|
+
declare const CLIENT_CONTEXT_KEY = "__VITE_DEVTOOLS_CLIENT_CONTEXT__";
|
|
688
|
+
/**
|
|
689
|
+
* Get the global DevTools client context, or `undefined` if not yet initialized.
|
|
690
|
+
*/
|
|
691
|
+
declare function getDevToolsClientContext(): DevToolsClientContext | undefined;
|
|
692
|
+
//#endregion
|
|
693
|
+
export { DevToolsDockEntryBase as $, RpcBroadcastOptions as A, DevToolsChildProcessExecuteOptions as B, PluginWithDevTools as C, DevToolsDocksUserSettings as D, Thenable as E, DevToolsCapabilities as F, DevToolsTerminalSessionStreamChunkEvent as G, DevToolsTerminalHost as H, DevToolsNodeContext as I, DevToolsRpcServerFunctions as J, DevToolsTerminalStatus as K, DevToolsNodeUtils as L, RpcSharedStateGetOptions as M, RpcSharedStateHost as N, DevToolsNodeRpcSession as O, ConnectionMeta as P, DevToolsDockEntry as Q, DevToolsPluginOptions as R, RpcDefinitionsToFunctions as S, DevToolsLogsHost as St, PartialWithoutId as T, DevToolsTerminalSession as U, DevToolsChildProcessTerminalSession as V, DevToolsTerminalSessionBase as W, ClientScriptEntry as X, DevToolsRpcSharedStates as Y, DevToolsDockEntriesGrouped as Z, DevToolsRpcClientCallOptional as _, DevToolsLogEntryInput as _t, DevToolsClientRpcHost as a, DevToolsViewBuiltin as at, getDevToolsRpcClient as b, DevToolsLogLevel as bt, DockEntryStateEvents as c, DevToolsViewJsonRender as ct, DocksEntriesContext as d, JsonRenderElement as dt, DevToolsDockEntryCategory as et, DocksPanelContext as f, JsonRenderSpec as ft, DevToolsRpcClientCallEvent as g, DevToolsLogEntryFrom as gt, DevToolsRpcClientCall as h, DevToolsLogEntry as ht, DevToolsClientContext as i, DevToolsViewAction as it, RpcFunctionsHost as j, DevToolsNodeRpcSessionMeta as k, DockPanelStorage as l, DevToolsViewLauncher as lt, DevToolsRpcClient as m, DevToolsLogElementPosition as mt, getDevToolsClientContext as n, DevToolsDockHost as nt, DockClientType as o, DevToolsViewCustomRender as ot, RpcClientEvents as p, JsonRenderer as pt, DevToolsRpcClientFunctions as q, DockClientScriptContext as r, DevToolsDockUserEntry as rt, DockEntryState as s, DevToolsViewIframe as st, CLIENT_CONTEXT_KEY as t, DevToolsDockEntryIcon as tt, DocksContext as u, DevToolsViewLauncherStatus as ut, DevToolsRpcClientMode as v, DevToolsLogFilePosition as vt, EntriesToObject as w, RpcDefinitionsFilter as x, DevToolsLogsClient as xt, DevToolsRpcClientOptions as y, DevToolsLogHandle as yt, DevToolsViewHost as z };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as EventUnsubscribe, r as EventsMap, t as EventEmitter } from "./events-
|
|
2
|
-
import { $ as
|
|
1
|
+
import { n as EventUnsubscribe, r as EventsMap, t as EventEmitter } from "./events-BTCXlxeC.js";
|
|
2
|
+
import { $ as DevToolsDockEntryBase, A as RpcBroadcastOptions, B as DevToolsChildProcessExecuteOptions, C as PluginWithDevTools, D as DevToolsDocksUserSettings, E as Thenable, F as DevToolsCapabilities, G as DevToolsTerminalSessionStreamChunkEvent, H as DevToolsTerminalHost, I as DevToolsNodeContext, J as DevToolsRpcServerFunctions, K as DevToolsTerminalStatus, L as DevToolsNodeUtils, M as RpcSharedStateGetOptions, N as RpcSharedStateHost, O as DevToolsNodeRpcSession, P as ConnectionMeta, Q as DevToolsDockEntry, R as DevToolsPluginOptions, S as RpcDefinitionsToFunctions, St as DevToolsLogsHost, T as PartialWithoutId, U as DevToolsTerminalSession, V as DevToolsChildProcessTerminalSession, W as DevToolsTerminalSessionBase, X as ClientScriptEntry, Y as DevToolsRpcSharedStates, Z as DevToolsDockEntriesGrouped, _t as DevToolsLogEntryInput, at as DevToolsViewBuiltin, bt as DevToolsLogLevel, ct as DevToolsViewJsonRender, dt as JsonRenderElement, et as DevToolsDockEntryCategory, ft as JsonRenderSpec, gt as DevToolsLogEntryFrom, ht as DevToolsLogEntry, it as DevToolsViewAction, j as RpcFunctionsHost, k as DevToolsNodeRpcSessionMeta, lt as DevToolsViewLauncher, mt as DevToolsLogElementPosition, nt as DevToolsDockHost, ot as DevToolsViewCustomRender, pt as JsonRenderer, q as DevToolsRpcClientFunctions, rt as DevToolsDockUserEntry, st as DevToolsViewIframe, tt as DevToolsDockEntryIcon, ut as DevToolsViewLauncherStatus, vt as DevToolsLogFilePosition, w as EntriesToObject, x as RpcDefinitionsFilter, xt as DevToolsLogsClient, yt as DevToolsLogHandle, z as DevToolsViewHost } from "./index-BSLgRVfr.js";
|
|
3
3
|
import * as _vitejs_devtools_rpc0 from "@vitejs/devtools-rpc";
|
|
4
4
|
|
|
5
5
|
//#region src/utils/define.d.ts
|