@nuxt/devtools-kit 0.5.5 → 0.6.0
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.
|
@@ -39,6 +39,13 @@ interface ModuleCustomTab {
|
|
|
39
39
|
* Advanced options. You don't usually need this.
|
|
40
40
|
*/
|
|
41
41
|
extraTabVNode?: VNode;
|
|
42
|
+
/**
|
|
43
|
+
* Require local authentication to access the tab
|
|
44
|
+
* It's highly recommended to enable this if the tab have sensitive information or have access to the OS
|
|
45
|
+
*
|
|
46
|
+
* @default false
|
|
47
|
+
*/
|
|
48
|
+
requireAuth?: boolean;
|
|
42
49
|
}
|
|
43
50
|
interface ModuleLaunchView {
|
|
44
51
|
/**
|
|
@@ -150,6 +157,15 @@ interface ModuleOptions {
|
|
|
150
157
|
* @default true
|
|
151
158
|
*/
|
|
152
159
|
viteInspect?: boolean;
|
|
160
|
+
/**
|
|
161
|
+
* Disable dev time authorization check.
|
|
162
|
+
*
|
|
163
|
+
* **NOT RECOMMENDED**, only use this if you know what you are doing.
|
|
164
|
+
*
|
|
165
|
+
* @see https://github.com/nuxt/devtools/pull/257
|
|
166
|
+
* @default false
|
|
167
|
+
*/
|
|
168
|
+
disableAuthorization?: boolean;
|
|
153
169
|
}
|
|
154
170
|
interface ModuleGlobalOptions {
|
|
155
171
|
/**
|
|
@@ -272,6 +288,16 @@ interface PluginMetric {
|
|
|
272
288
|
end: number;
|
|
273
289
|
duration: number;
|
|
274
290
|
}
|
|
291
|
+
interface LoadingTimeMetric {
|
|
292
|
+
ssrStart?: number;
|
|
293
|
+
appInit?: number;
|
|
294
|
+
appLoad?: number;
|
|
295
|
+
pageStart?: number;
|
|
296
|
+
pageEnd?: number;
|
|
297
|
+
pluginInit?: number;
|
|
298
|
+
hmrStart?: number;
|
|
299
|
+
hmrEnd?: number;
|
|
300
|
+
}
|
|
275
301
|
interface BasicModuleInfo {
|
|
276
302
|
entryPath?: string;
|
|
277
303
|
meta?: {
|
|
@@ -423,6 +449,7 @@ interface AnalyzeBuildsInfo {
|
|
|
423
449
|
|
|
424
450
|
interface ServerFunctions {
|
|
425
451
|
getServerConfig(): NuxtOptions;
|
|
452
|
+
getModuleOptions(): ModuleOptions;
|
|
426
453
|
getComponents(): Component[];
|
|
427
454
|
getComponentsRelationships(): Promise<ComponentRelationship[]>;
|
|
428
455
|
getAutoImports(): AutoImportsWithMetadata;
|
|
@@ -438,11 +465,11 @@ interface ServerFunctions {
|
|
|
438
465
|
checkForUpdateFor(name: string): Promise<PackageUpdateInfo | undefined>;
|
|
439
466
|
getPackageManager(): Promise<PackageManagerName>;
|
|
440
467
|
getNpmCommand(command: NpmCommandType, packageName: string, options?: NpmCommandOptions): Promise<string[] | undefined>;
|
|
441
|
-
runNpmCommand(command: NpmCommandType, packageName: string, options?: NpmCommandOptions): Promise<{
|
|
468
|
+
runNpmCommand(token: string, command: NpmCommandType, packageName: string, options?: NpmCommandOptions): Promise<{
|
|
442
469
|
processId: string;
|
|
443
470
|
} | undefined>;
|
|
444
471
|
getTerminals(): TerminalInfo[];
|
|
445
|
-
getTerminalDetail(id: string): TerminalInfo | undefined;
|
|
472
|
+
getTerminalDetail(token: string, id: string): TerminalInfo | undefined;
|
|
446
473
|
runTerminalAction(id: string, action: TerminalAction): Promise<boolean>;
|
|
447
474
|
getStorageMounts(): Promise<StorageMounts>;
|
|
448
475
|
getStorageKeys(base?: string): Promise<string[]>;
|
|
@@ -451,20 +478,22 @@ interface ServerFunctions {
|
|
|
451
478
|
removeStorageItem(key: string): Promise<void>;
|
|
452
479
|
getAnalyzeBuildInfo(): Promise<AnalyzeBuildsInfo>;
|
|
453
480
|
generateAnalyzeBuildName(): Promise<string>;
|
|
454
|
-
startAnalyzeBuild(name: string): Promise<string>;
|
|
455
|
-
clearAnalyzeBuilds(names?: string[]): Promise<void>;
|
|
481
|
+
startAnalyzeBuild(token: string, name: string): Promise<string>;
|
|
482
|
+
clearAnalyzeBuilds(token: string, names?: string[]): Promise<void>;
|
|
456
483
|
getImageMeta(filepath: string): Promise<ImageMeta | undefined>;
|
|
457
484
|
getTextAssetContent(filepath: string, limit?: number): Promise<string | undefined>;
|
|
458
|
-
writeStaticAssets(file: {
|
|
485
|
+
writeStaticAssets(token: string, file: {
|
|
459
486
|
name: string;
|
|
460
487
|
data: string;
|
|
461
488
|
}[], path: string): Promise<string[]>;
|
|
462
489
|
customTabAction(name: string, action: number): Promise<boolean>;
|
|
463
|
-
runWizard<T extends WizardActions>(name: T, ...args: GetWizardArgs<T>): Promise<void>;
|
|
490
|
+
runWizard<T extends WizardActions>(token: string, name: T, ...args: GetWizardArgs<T>): Promise<void>;
|
|
464
491
|
openInEditor(filepath: string): Promise<boolean>;
|
|
492
|
+
requestForAuth(info?: string): Promise<void>;
|
|
493
|
+
verifyAuthToken(token: string): Promise<boolean>;
|
|
465
494
|
restartNuxt(hard?: boolean): Promise<void>;
|
|
466
|
-
installNuxtModule(name: string, dry?: boolean): Promise<InstallModuleReturn>;
|
|
467
|
-
uninstallNuxtModule(name: string, dry?: boolean): Promise<InstallModuleReturn>;
|
|
495
|
+
installNuxtModule(token: string, name: string, dry?: boolean): Promise<InstallModuleReturn>;
|
|
496
|
+
uninstallNuxtModule(token: string, name: string, dry?: boolean): Promise<InstallModuleReturn>;
|
|
468
497
|
}
|
|
469
498
|
interface ClientFunctions {
|
|
470
499
|
refresh(event: ClientUpdateEvent): void;
|
|
@@ -496,6 +525,10 @@ interface NuxtDevtoolsServerContext {
|
|
|
496
525
|
* Invalidate client cache for a function and ask for re-fetching
|
|
497
526
|
*/
|
|
498
527
|
refresh: (event: keyof ServerFunctions) => void;
|
|
528
|
+
/**
|
|
529
|
+
* Ensure dev auth token is valid, throw if not
|
|
530
|
+
*/
|
|
531
|
+
ensureDevAuthToken: (token: string) => Promise<void>;
|
|
499
532
|
extendServerRpc: <ClientFunctions = {}, ServerFunctions = {}>(name: string, functions: ServerFunctions) => BirpcGroup<ClientFunctions, ServerFunctions>;
|
|
500
533
|
}
|
|
501
534
|
interface NuxtDevtoolsInfo {
|
|
@@ -573,4 +606,4 @@ declare module '@nuxt/schema' {
|
|
|
573
606
|
}
|
|
574
607
|
}
|
|
575
608
|
|
|
576
|
-
export {
|
|
609
|
+
export { ModuleGlobalOptions as $, AutoImportsWithMetadata as A, BasicModuleInfo as B, CompatibilityStatus as C, AssetInfo as D, CodeSnippet as E, ComponentRelationship as F, GitHubContributor as G, HookInfo as H, ImageMeta as I, WizardActions as J, GetWizardArgs as K, LoadingTimeMetric as L, ModuleCustomTab as M, NuxtDevtoolsInfo as N, ClientFunctions as O, PluginMetric as P, ClientUpdateEvent as Q, RouteInfo as R, SubprocessOptions as S, TerminalState as T, NuxtDevtoolsServerContext as U, VueInspectorData as V, WizardFunctions as W, InstallModuleReturn as X, AnalyzeBuildMeta as Y, AnalyzeBuildsInfo as Z, ModuleOptions as _, VueInspectorClient as a, VSCodeIntegrationOptions as a0, VSCodeTunnelOptions as a1, NuxtDevToolsUIOptions as a2, TabCategory as a3, ServerFunctions as b, ModuleLaunchView as c, ModuleIframeView as d, ModuleVNodeView as e, ModuleLaunchAction as f, ModuleView as g, ModuleIframeTabLazyOptions as h, ModuleBuiltinTab as i, ModuleTabInfo as j, TerminalBase as k, TerminalAction as l, TerminalInfo as m, PackageUpdateInfo as n, PackageManagerName as o, NpmCommandType as p, NpmCommandOptions as q, ServerRouteInfo as r, Payload as s, PluginInfoWithMetic as t, InstalledModuleInfo as u, ModuleStaticInfo as v, ModuleCompatibility as w, ModuleType as x, MaintainerInfo as y, AssetType as z };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as execa from 'execa';
|
|
2
2
|
import * as _nuxt_schema from '@nuxt/schema';
|
|
3
3
|
import { BirpcGroup } from 'birpc';
|
|
4
|
-
import { M as ModuleCustomTab, S as SubprocessOptions, T as TerminalState, N as NuxtDevtoolsInfo } from './hooks-
|
|
4
|
+
import { M as ModuleCustomTab, S as SubprocessOptions, T as TerminalState, N as NuxtDevtoolsInfo } from './hooks-a3148a0c.js';
|
|
5
5
|
import 'vue';
|
|
6
6
|
import 'nuxt/schema';
|
|
7
7
|
import 'nitropack';
|
package/dist/types.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { V as VueInspectorData, a as VueInspectorClient, H as HookInfo, P as PluginMetric, b as ServerFunctions } from './hooks-
|
|
2
|
-
export {
|
|
1
|
+
import { V as VueInspectorData, a as VueInspectorClient, L as LoadingTimeMetric, H as HookInfo, P as PluginMetric, b as ServerFunctions } from './hooks-a3148a0c.js';
|
|
2
|
+
export { Y as AnalyzeBuildMeta, Z as AnalyzeBuildsInfo, D as AssetInfo, z as AssetType, A as AutoImportsWithMetadata, B as BasicModuleInfo, O as ClientFunctions, Q as ClientUpdateEvent, E as CodeSnippet, C as CompatibilityStatus, F as ComponentRelationship, K as GetWizardArgs, G as GitHubContributor, I as ImageMeta, X as InstallModuleReturn, u as InstalledModuleInfo, y as MaintainerInfo, i as ModuleBuiltinTab, w as ModuleCompatibility, M as ModuleCustomTab, $ as ModuleGlobalOptions, h as ModuleIframeTabLazyOptions, d as ModuleIframeView, f as ModuleLaunchAction, c as ModuleLaunchView, _ as ModuleOptions, v as ModuleStaticInfo, j as ModuleTabInfo, x as ModuleType, e as ModuleVNodeView, g as ModuleView, q as NpmCommandOptions, p as NpmCommandType, a2 as NuxtDevToolsUIOptions, N as NuxtDevtoolsInfo, U as NuxtDevtoolsServerContext, o as PackageManagerName, n as PackageUpdateInfo, s as Payload, t as PluginInfoWithMetic, R as RouteInfo, r as ServerRouteInfo, S as SubprocessOptions, a3 as TabCategory, l as TerminalAction, k as TerminalBase, m as TerminalInfo, T as TerminalState, a0 as VSCodeIntegrationOptions, a1 as VSCodeTunnelOptions, J as WizardActions, W as WizardFunctions } from './hooks-a3148a0c.js';
|
|
3
|
+
import { Ref } from 'vue';
|
|
3
4
|
import { AppConfig } from 'nuxt/schema';
|
|
4
5
|
import { NuxtApp } from 'nuxt/dist/app/nuxt';
|
|
5
6
|
import { Hookable } from 'hookable';
|
|
6
7
|
import { BirpcReturn } from 'birpc';
|
|
7
|
-
import 'vue';
|
|
8
8
|
import 'nitropack';
|
|
9
9
|
import 'unstorage';
|
|
10
10
|
import 'vite-plugin-vue-inspector';
|
|
@@ -15,7 +15,7 @@ import '@nuxt/schema';
|
|
|
15
15
|
|
|
16
16
|
interface NuxtDevtoolsClientHooks {
|
|
17
17
|
/**
|
|
18
|
-
* When the
|
|
18
|
+
* When the DevTools navigates, used for persisting the current tab
|
|
19
19
|
*/
|
|
20
20
|
'devtools:navigate': (path: string) => void;
|
|
21
21
|
/**
|
|
@@ -42,15 +42,23 @@ interface NuxtDevtoolsHostClient {
|
|
|
42
42
|
nuxt: NuxtApp;
|
|
43
43
|
appConfig: AppConfig;
|
|
44
44
|
hooks: Hookable<NuxtDevtoolsClientHooks>;
|
|
45
|
+
colorMode: Ref<'dark' | 'light'>;
|
|
45
46
|
inspector?: {
|
|
46
47
|
instance?: VueInspectorClient;
|
|
47
48
|
enable: () => void;
|
|
48
49
|
disable: () => void;
|
|
50
|
+
toggle: () => void;
|
|
51
|
+
isEnabled: Ref<boolean>;
|
|
49
52
|
};
|
|
53
|
+
loadingTimeMetrics: LoadingTimeMetric;
|
|
50
54
|
getClientHooksMetrics(): HookInfo[];
|
|
51
55
|
getClientPluginMetrics(): PluginMetric[];
|
|
52
56
|
reloadPage(): void;
|
|
53
57
|
closeDevTools(): void;
|
|
58
|
+
/**
|
|
59
|
+
* Refreshes the client
|
|
60
|
+
*/
|
|
61
|
+
refreshState(): NuxtDevtoolsHostClient;
|
|
54
62
|
}
|
|
55
63
|
interface NuxtDevtoolsClient {
|
|
56
64
|
rpc: BirpcReturn<ServerFunctions>;
|
|
@@ -70,4 +78,4 @@ interface NuxtDevtoolsGlobal {
|
|
|
70
78
|
setClient(client: NuxtDevtoolsHostClient): void;
|
|
71
79
|
}
|
|
72
80
|
|
|
73
|
-
export { HookInfo, NuxtDevtoolsClient, NuxtDevtoolsClientHooks, NuxtDevtoolsGlobal, NuxtDevtoolsHostClient, NuxtDevtoolsIframeClient, PluginMetric, ServerFunctions, VueInspectorClient, VueInspectorData };
|
|
81
|
+
export { HookInfo, LoadingTimeMetric, NuxtDevtoolsClient, NuxtDevtoolsClientHooks, NuxtDevtoolsGlobal, NuxtDevtoolsHostClient, NuxtDevtoolsIframeClient, PluginMetric, ServerFunctions, VueInspectorClient, VueInspectorData };
|
package/iframe-client.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './dist/runtime/iframe-client'
|
|
1
|
+
export * from './dist/runtime/iframe-client.mjs'
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/devtools-kit",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.6.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "nuxt/devtools",
|
|
7
7
|
"exports": {
|
|
@@ -33,17 +33,17 @@
|
|
|
33
33
|
"vite": "*"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@nuxt/kit": "^3.5.
|
|
37
|
-
"@nuxt/schema": "^3.5.
|
|
36
|
+
"@nuxt/kit": "^3.5.3",
|
|
37
|
+
"@nuxt/schema": "^3.5.3",
|
|
38
38
|
"execa": "^7.1.1"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"birpc": "^0.2.
|
|
41
|
+
"birpc": "^0.2.12",
|
|
42
42
|
"hookable": "^5.5.3",
|
|
43
43
|
"unbuild": "^1.2.1",
|
|
44
|
-
"unimport": "^3.0.
|
|
44
|
+
"unimport": "^3.0.8",
|
|
45
45
|
"vite-plugin-vue-inspector": "^3.4.2",
|
|
46
|
-
"vue-router": "^4.2.
|
|
46
|
+
"vue-router": "^4.2.2"
|
|
47
47
|
},
|
|
48
48
|
"scripts": {
|
|
49
49
|
"build": "unbuild",
|