@vitejs/devtools-vite 0.0.0-alpha.1
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/LICENSE +21 -0
- package/dist/dirs-Z7VQHyIZ.js +7 -0
- package/dist/dirs.d.ts +4 -0
- package/dist/dirs.js +3 -0
- package/dist/index.d.ts +118 -0
- package/dist/index.js +1463 -0
- package/dist/nitro.json +15 -0
- package/dist/public/200.html +1 -0
- package/dist/public/404.html +1 -0
- package/dist/public/_nuxt/B1Vd6rqS.js +1 -0
- package/dist/public/_nuxt/B2YLpys2.js +1 -0
- package/dist/public/_nuxt/B2fBtupD.js +1 -0
- package/dist/public/_nuxt/BBRXmiYk.js +1 -0
- package/dist/public/_nuxt/BL9XEsp7.js +1 -0
- package/dist/public/_nuxt/BO9hKuA-.js +1 -0
- package/dist/public/_nuxt/BQ-NBLhA.js +1 -0
- package/dist/public/_nuxt/BcAccMwu.js +1 -0
- package/dist/public/_nuxt/BdGMcGSQ.js +1 -0
- package/dist/public/_nuxt/BdSZoQls.js +1 -0
- package/dist/public/_nuxt/BjbaCuBE.js +1 -0
- package/dist/public/_nuxt/Bjr51Ks8.js +1 -0
- package/dist/public/_nuxt/BvuqupwD.js +1 -0
- package/dist/public/_nuxt/C2X_oPur.js +1 -0
- package/dist/public/_nuxt/C5J04JCq.js +1 -0
- package/dist/public/_nuxt/CQNn9qP2.js +1 -0
- package/dist/public/_nuxt/CS0-317H.js +1 -0
- package/dist/public/_nuxt/CciM0jEL.js +1 -0
- package/dist/public/_nuxt/CcwEApAr.js +1 -0
- package/dist/public/_nuxt/Ci9NHG69.js +1 -0
- package/dist/public/_nuxt/D1yk44lc.js +1 -0
- package/dist/public/_nuxt/DKn-LAPX.js +11 -0
- package/dist/public/_nuxt/DS2MKblJ.js +1 -0
- package/dist/public/_nuxt/DSjlpmm-.js +1 -0
- package/dist/public/_nuxt/DZeYNBxL.js +1 -0
- package/dist/public/_nuxt/D_Sk_I-u.js +1 -0
- package/dist/public/_nuxt/Dl8iHwQo.js +2 -0
- package/dist/public/_nuxt/DnpfwSMy.js +1 -0
- package/dist/public/_nuxt/IrMnfQaU.js +1 -0
- package/dist/public/_nuxt/VirtualList.lGV_3v2U.css +1 -0
- package/dist/public/_nuxt/Z5tyTJaP.js +1 -0
- package/dist/public/_nuxt/_session_.B0BbH92J.css +1 -0
- package/dist/public/_nuxt/builds/latest.json +1 -0
- package/dist/public/_nuxt/builds/meta/6f75d3aa-4cfc-4ed3-af3a-9078b8defb8f.json +1 -0
- package/dist/public/_nuxt/cRQbgMUp.js +1 -0
- package/dist/public/_nuxt/diff.worker-BXxwMoGc.js +10 -0
- package/dist/public/_nuxt/entry.Dufqy7qJ.css +1 -0
- package/dist/public/_nuxt/error-404.yUUAZDjV.css +1 -0
- package/dist/public/_nuxt/error-500.BHZzZRS-.css +1 -0
- package/dist/public/_nuxt/l47FwQA-.js +1 -0
- package/dist/public/_nuxt/pXptjyzi.js +1 -0
- package/dist/public/_nuxt/rwBDQBzn.js +1 -0
- package/dist/public/_nuxt/tS5wJZMm.js +1 -0
- package/dist/public/_nuxt/yfNgynAH.js +33 -0
- package/dist/public/_nuxt/z9pSC1xM.js +1 -0
- package/dist/public/dot-grid-dark.png +0 -0
- package/dist/public/dot-grid-light.png +0 -0
- package/dist/public/favicon.svg +15 -0
- package/dist/public/index.html +1 -0
- package/dist/public/vite-devtools.svg +17 -0
- package/package.json +90 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025-present, VoidZero Inc. and contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/dirs.d.ts
ADDED
package/dist/dirs.js
ADDED
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { Plugin, ResolvedConfig, ViteDevServer } from "vite";
|
|
2
|
+
|
|
3
|
+
//#region ../devtools-kit/src/types/rpc-augments.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* To be extended
|
|
7
|
+
*/
|
|
8
|
+
interface DevToolsRpcServerFunctions {}
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region ../devtools-kit/src/types/utils.d.ts
|
|
11
|
+
type Thenable<T> = T | Promise<T>;
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region ../devtools-kit/src/types/views.d.ts
|
|
14
|
+
interface DevToolsDockHost {
|
|
15
|
+
register: (entry: DevToolsDockEntry) => void;
|
|
16
|
+
values: () => DevToolsDockEntry[];
|
|
17
|
+
}
|
|
18
|
+
interface DevToolsDockEntryBase {
|
|
19
|
+
id: string;
|
|
20
|
+
title: string;
|
|
21
|
+
icon: string;
|
|
22
|
+
}
|
|
23
|
+
interface DevToolsViewIframe extends DevToolsDockEntryBase {
|
|
24
|
+
type: 'iframe';
|
|
25
|
+
url: string;
|
|
26
|
+
/**
|
|
27
|
+
* The id of the iframe, if multiple tabs is assigned with the same id, the iframe will be shared.
|
|
28
|
+
*
|
|
29
|
+
* When not provided, it would be treated as a unique frame.
|
|
30
|
+
*/
|
|
31
|
+
frameId?: string;
|
|
32
|
+
}
|
|
33
|
+
interface DevToolsViewWebComponent extends DevToolsDockEntryBase {
|
|
34
|
+
type: 'webcomponent';
|
|
35
|
+
from: string;
|
|
36
|
+
import: string;
|
|
37
|
+
}
|
|
38
|
+
interface DevToolsViewAction extends DevToolsDockEntryBase {
|
|
39
|
+
type: 'action';
|
|
40
|
+
importFrom: string;
|
|
41
|
+
/**
|
|
42
|
+
* @default 'default'
|
|
43
|
+
*/
|
|
44
|
+
importName?: string;
|
|
45
|
+
}
|
|
46
|
+
type DevToolsDockEntry = DevToolsViewIframe | DevToolsViewWebComponent | DevToolsViewAction;
|
|
47
|
+
//#endregion
|
|
48
|
+
//#region ../devtools-kit/src/types/vite-plugin.d.ts
|
|
49
|
+
interface DevToolsCapabilities {
|
|
50
|
+
rpc?: boolean;
|
|
51
|
+
views?: boolean;
|
|
52
|
+
}
|
|
53
|
+
interface DevToolsPluginOptions {
|
|
54
|
+
capabilities?: {
|
|
55
|
+
dev?: DevToolsCapabilities | boolean;
|
|
56
|
+
build?: DevToolsCapabilities | boolean;
|
|
57
|
+
};
|
|
58
|
+
setup: (context: DevToolsNodeContext) => void | Promise<void>;
|
|
59
|
+
}
|
|
60
|
+
interface DevToolsNodeContext {
|
|
61
|
+
readonly cwd: string;
|
|
62
|
+
readonly mode: 'dev' | 'build';
|
|
63
|
+
readonly viteConfig: ResolvedConfig;
|
|
64
|
+
readonly viteServer?: ViteDevServer;
|
|
65
|
+
rpc: RpcFunctionsHost;
|
|
66
|
+
docks: DevToolsDockHost;
|
|
67
|
+
/**
|
|
68
|
+
* Helper to host static files
|
|
69
|
+
* - In `dev` mode, it will register middleware to `viteServer.middlewares` to host the static files
|
|
70
|
+
* - In `build` mode, it will copy the static files to the dist directory
|
|
71
|
+
*/
|
|
72
|
+
hostStatic: (baseUrl: string, distDir: string) => void;
|
|
73
|
+
staticDirs: {
|
|
74
|
+
baseUrl: string;
|
|
75
|
+
distDir: string;
|
|
76
|
+
}[];
|
|
77
|
+
}
|
|
78
|
+
//#endregion
|
|
79
|
+
//#region ../devtools-kit/src/types/rpc.d.ts
|
|
80
|
+
/**
|
|
81
|
+
* Type of the RPC function,
|
|
82
|
+
* - static: A function that returns a static data (can be cached and dumped)
|
|
83
|
+
* - action: A function that performs an action (no data returned)
|
|
84
|
+
* - query: A function that queries a resource
|
|
85
|
+
*/
|
|
86
|
+
type RpcFunctionType = 'static' | 'action' | 'query';
|
|
87
|
+
interface RpcFunctionsHost {
|
|
88
|
+
context: DevToolsNodeContext;
|
|
89
|
+
readonly functions: DevToolsRpcServerFunctions;
|
|
90
|
+
readonly definitions: Map<string, RpcFunctionDefinition<string, any, any, any>>;
|
|
91
|
+
register: (fn: RpcFunctionDefinition<string, any, any, any>) => void;
|
|
92
|
+
}
|
|
93
|
+
interface RpcFunctionSetupResult<ARGS extends any[], RETURN = void> {
|
|
94
|
+
handler: (...args: ARGS) => RETURN;
|
|
95
|
+
}
|
|
96
|
+
interface RpcFunctionDefinition<NAME extends string, TYPE extends RpcFunctionType, ARGS extends any[] = [], RETURN = void> {
|
|
97
|
+
name: NAME;
|
|
98
|
+
type: TYPE;
|
|
99
|
+
setup: (context: DevToolsNodeContext) => Thenable<RpcFunctionSetupResult<ARGS, RETURN>>;
|
|
100
|
+
handler?: (...args: ARGS) => RETURN;
|
|
101
|
+
__resolved?: RpcFunctionSetupResult<ARGS, RETURN>;
|
|
102
|
+
__promise?: Thenable<RpcFunctionSetupResult<ARGS, RETURN>>;
|
|
103
|
+
}
|
|
104
|
+
//#endregion
|
|
105
|
+
//#region ../devtools-kit/src/types/vite-augment.d.ts
|
|
106
|
+
declare module 'vite' {
|
|
107
|
+
interface Plugin {
|
|
108
|
+
devtools?: DevToolsPluginOptions;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
interface PluginWithDevTools extends Plugin {
|
|
112
|
+
devtools?: DevToolsPluginOptions;
|
|
113
|
+
}
|
|
114
|
+
//#endregion
|
|
115
|
+
//#region src/node/plugin.d.ts
|
|
116
|
+
declare function DevToolsViteUI(): PluginWithDevTools;
|
|
117
|
+
//#endregion
|
|
118
|
+
export { DevToolsViteUI };
|