@nuxt/devtools-kit 0.6.6 → 0.6.7

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.
@@ -9,7 +9,7 @@ import { Import, UnimportMeta } from 'unimport';
9
9
  import { Options } from 'execa';
10
10
  import { NuxtAnalyzeMeta } from '@nuxt/schema';
11
11
 
12
- type TabCategory = 'app' | 'analyze' | 'server' | 'modules' | 'documentation' | 'advanced';
12
+ type TabCategory = 'pinned' | 'app' | 'analyze' | 'server' | 'modules' | 'documentation' | 'advanced';
13
13
 
14
14
  interface ModuleCustomTab {
15
15
  /**
@@ -128,106 +128,6 @@ interface ModuleBuiltinTab {
128
128
  }
129
129
  type ModuleTabInfo = ModuleCustomTab | ModuleBuiltinTab;
130
130
 
131
- interface ModuleOptions {
132
- /**
133
- * Enable DevTools
134
- *
135
- * @default true
136
- */
137
- enabled?: boolean;
138
- /**
139
- * Custom tabs
140
- *
141
- * This is in static format, for dynamic injection, call `nuxt.hook('devtools:customTabs')` instead
142
- */
143
- customTabs?: ModuleCustomTab[];
144
- /**
145
- * VS Code Server integration options.
146
- */
147
- vscode?: VSCodeIntegrationOptions;
148
- /**
149
- * Enable Vue Component Inspector
150
- *
151
- * @default true
152
- */
153
- componentInspector?: boolean | VitePluginInspectorOptions;
154
- /**
155
- * Enable vite-plugin-inspect
156
- *
157
- * @default true
158
- */
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;
169
- }
170
- interface ModuleGlobalOptions {
171
- /**
172
- * List of projects to enable devtools for. Only works when devtools is installed globally.
173
- */
174
- projects?: string[];
175
- }
176
- interface VSCodeIntegrationOptions {
177
- /**
178
- * Enable VS Code Server integration
179
- */
180
- enabled?: boolean;
181
- /**
182
- * Start VS Code Server on boot
183
- *
184
- * @default false
185
- */
186
- startOnBoot?: boolean;
187
- /**
188
- * Port to start VS Code Server
189
- *
190
- * @default 3080
191
- */
192
- port?: number;
193
- /**
194
- * Reuse existing server if available (same port)
195
- */
196
- reuseExistingServer?: boolean;
197
- /**
198
- * Determine whether to use code-server or vs code tunnel
199
- *
200
- * @default 'local-serve'
201
- */
202
- mode?: 'local-serve' | 'tunnel';
203
- /**
204
- * Options for VS Code tunnel
205
- */
206
- tunnel?: VSCodeTunnelOptions;
207
- }
208
- interface VSCodeTunnelOptions {
209
- /**
210
- * the machine name for port forwarding service
211
- *
212
- * default: device hostname
213
- */
214
- name?: string;
215
- }
216
- interface NuxtDevToolsUIOptions {
217
- componentsView: 'list' | 'graph';
218
- componentsGraphShowNodeModules: boolean;
219
- componentsGraphShowGlobalComponents: boolean;
220
- componentsGraphShowPages: boolean;
221
- componentsGraphShowLayouts: boolean;
222
- componentsGraphShowWorkspace: boolean;
223
- interactionCloseOnOutsideClick: boolean;
224
- showExperimentalFeatures: boolean;
225
- showHelpButtons: boolean;
226
- scale: number;
227
- hiddenTabs: string[];
228
- hiddenTabCategories: string[];
229
- }
230
-
231
131
  interface HookInfo {
232
132
  name: string;
233
133
  start: number;
@@ -392,6 +292,112 @@ interface ComponentRelationship {
392
292
  deps: string[];
393
293
  }
394
294
 
295
+ interface ModuleOptions {
296
+ /**
297
+ * Enable DevTools
298
+ *
299
+ * @default true
300
+ */
301
+ enabled?: boolean;
302
+ /**
303
+ * Custom tabs
304
+ *
305
+ * This is in static format, for dynamic injection, call `nuxt.hook('devtools:customTabs')` instead
306
+ */
307
+ customTabs?: ModuleCustomTab[];
308
+ /**
309
+ * VS Code Server integration options.
310
+ */
311
+ vscode?: VSCodeIntegrationOptions;
312
+ /**
313
+ * Enable Vue Component Inspector
314
+ *
315
+ * @default true
316
+ */
317
+ componentInspector?: boolean | VitePluginInspectorOptions;
318
+ /**
319
+ * Enable vite-plugin-inspect
320
+ *
321
+ * @default true
322
+ */
323
+ viteInspect?: boolean;
324
+ /**
325
+ * Disable dev time authorization check.
326
+ *
327
+ * **NOT RECOMMENDED**, only use this if you know what you are doing.
328
+ *
329
+ * @see https://github.com/nuxt/devtools/pull/257
330
+ * @default false
331
+ */
332
+ disableAuthorization?: boolean;
333
+ }
334
+ interface ModuleGlobalOptions {
335
+ /**
336
+ * List of projects to enable devtools for. Only works when devtools is installed globally.
337
+ */
338
+ projects?: string[];
339
+ }
340
+ interface VSCodeIntegrationOptions {
341
+ /**
342
+ * Enable VS Code Server integration
343
+ */
344
+ enabled?: boolean;
345
+ /**
346
+ * Start VS Code Server on boot
347
+ *
348
+ * @default false
349
+ */
350
+ startOnBoot?: boolean;
351
+ /**
352
+ * Port to start VS Code Server
353
+ *
354
+ * @default 3080
355
+ */
356
+ port?: number;
357
+ /**
358
+ * Reuse existing server if available (same port)
359
+ */
360
+ reuseExistingServer?: boolean;
361
+ /**
362
+ * Determine whether to use code-server or vs code tunnel
363
+ *
364
+ * @default 'local-serve'
365
+ */
366
+ mode?: 'local-serve' | 'tunnel';
367
+ /**
368
+ * Options for VS Code tunnel
369
+ */
370
+ tunnel?: VSCodeTunnelOptions;
371
+ }
372
+ interface VSCodeTunnelOptions {
373
+ /**
374
+ * the machine name for port forwarding service
375
+ *
376
+ * default: device hostname
377
+ */
378
+ name?: string;
379
+ }
380
+ interface NuxtDevToolsOptions {
381
+ ui: {
382
+ componentsView: 'list' | 'graph';
383
+ componentsGraphShowNodeModules: boolean;
384
+ componentsGraphShowGlobalComponents: boolean;
385
+ componentsGraphShowPages: boolean;
386
+ componentsGraphShowLayouts: boolean;
387
+ componentsGraphShowWorkspace: boolean;
388
+ interactionCloseOnOutsideClick: boolean;
389
+ showExperimentalFeatures: boolean;
390
+ showHelpButtons: boolean;
391
+ scale: number;
392
+ hiddenTabs: string[];
393
+ hiddenTabCategories: string[];
394
+ pinnedTabs: string[];
395
+ };
396
+ serverRoutes: {
397
+ selectedRoute: ServerRouteInfo | null;
398
+ };
399
+ }
400
+
395
401
  interface TerminalBase {
396
402
  id: string;
397
403
  name: string;
@@ -467,8 +473,8 @@ interface ServerFunctions {
467
473
  getStaticAssets(): Promise<AssetInfo[]>;
468
474
  getServerRoutes(): ServerRouteInfo[];
469
475
  getServerApp(): NuxtApp | undefined;
470
- getUIOptions(): Promise<NuxtDevToolsUIOptions>;
471
- updateUIOptions(settings: Partial<NuxtDevToolsUIOptions>): Promise<void>;
476
+ getOptions<T extends keyof NuxtDevToolsOptions>(tab: T): Promise<NuxtDevToolsOptions[T]>;
477
+ updateOptions<T extends keyof NuxtDevToolsOptions>(tab: T, settings: Partial<NuxtDevToolsOptions[T]>): Promise<void>;
472
478
  checkForUpdateFor(name: string): Promise<PackageUpdateInfo | undefined>;
473
479
  getPackageManager(): Promise<PackageManagerName>;
474
480
  getNpmCommand(command: NpmCommandType, packageName: string, options?: NpmCommandOptions): Promise<string[] | undefined>;
@@ -613,4 +619,4 @@ declare module '@nuxt/schema' {
613
619
  }
614
620
  }
615
621
 
616
- export { AnalyzeBuildsInfo as $, AutoImportsWithMetadata as A, BasicModuleInfo as B, CompatibilityStatus as C, MaintainerInfo as D, AssetType as E, AssetInfo as F, GitHubContributor as G, HookInfo as H, ImageMeta as I, CodeSnippet as J, ComponentRelationship as K, LoadingTimeMetric as L, ModuleCustomTab as M, NuxtDevtoolsInfo as N, WizardActions as O, PluginMetric as P, GetWizardArgs as Q, RouteInfo as R, SubprocessOptions as S, TerminalState as T, ClientFunctions as U, VueInspectorData as V, WizardFunctions as W, ClientUpdateEvent as X, NuxtDevtoolsServerContext as Y, InstallModuleReturn as Z, AnalyzeBuildMeta as _, VueInspectorClient as a, ModuleOptions as a0, ModuleGlobalOptions as a1, VSCodeIntegrationOptions as a2, VSCodeTunnelOptions as a3, NuxtDevToolsUIOptions as a4, TabCategory as a5, 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, ServerRouteInputType as s, ServerRouteInput as t, Payload as u, PluginInfoWithMetic as v, InstalledModuleInfo as w, ModuleStaticInfo as x, ModuleCompatibility as y, ModuleType as z };
622
+ export { AnalyzeBuildsInfo as $, AutoImportsWithMetadata as A, BasicModuleInfo as B, CompatibilityStatus as C, MaintainerInfo as D, AssetType as E, AssetInfo as F, GitHubContributor as G, HookInfo as H, ImageMeta as I, CodeSnippet as J, ComponentRelationship as K, LoadingTimeMetric as L, ModuleCustomTab as M, NuxtDevtoolsInfo as N, WizardActions as O, PluginMetric as P, GetWizardArgs as Q, RouteInfo as R, SubprocessOptions as S, TerminalState as T, ClientFunctions as U, VueInspectorData as V, WizardFunctions as W, ClientUpdateEvent as X, NuxtDevtoolsServerContext as Y, InstallModuleReturn as Z, AnalyzeBuildMeta as _, VueInspectorClient as a, ModuleOptions as a0, ModuleGlobalOptions as a1, VSCodeIntegrationOptions as a2, VSCodeTunnelOptions as a3, NuxtDevToolsOptions as a4, TabCategory as a5, 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, ServerRouteInputType as s, ServerRouteInput as t, Payload as u, PluginInfoWithMetic as v, InstalledModuleInfo as w, ModuleStaticInfo as x, ModuleCompatibility as y, ModuleType 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-6c23ef8a.js';
4
+ import { M as ModuleCustomTab, S as SubprocessOptions, T as TerminalState, N as NuxtDevtoolsInfo } from './hooks-4850b104.js';
5
5
  import 'vue';
6
6
  import 'nuxt/schema';
7
7
  import 'nitropack';
package/dist/types.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { V as VueInspectorData, a as VueInspectorClient, L as LoadingTimeMetric, H as HookInfo, P as PluginMetric, b as ServerFunctions } from './hooks-6c23ef8a.js';
2
- export { _ as AnalyzeBuildMeta, $ as AnalyzeBuildsInfo, F as AssetInfo, E as AssetType, A as AutoImportsWithMetadata, B as BasicModuleInfo, U as ClientFunctions, X as ClientUpdateEvent, J as CodeSnippet, C as CompatibilityStatus, K as ComponentRelationship, Q as GetWizardArgs, G as GitHubContributor, I as ImageMeta, Z as InstallModuleReturn, w as InstalledModuleInfo, D as MaintainerInfo, i as ModuleBuiltinTab, y as ModuleCompatibility, M as ModuleCustomTab, a1 as ModuleGlobalOptions, h as ModuleIframeTabLazyOptions, d as ModuleIframeView, f as ModuleLaunchAction, c as ModuleLaunchView, a0 as ModuleOptions, x as ModuleStaticInfo, j as ModuleTabInfo, z as ModuleType, e as ModuleVNodeView, g as ModuleView, q as NpmCommandOptions, p as NpmCommandType, a4 as NuxtDevToolsUIOptions, N as NuxtDevtoolsInfo, Y as NuxtDevtoolsServerContext, o as PackageManagerName, n as PackageUpdateInfo, u as Payload, v as PluginInfoWithMetic, R as RouteInfo, r as ServerRouteInfo, t as ServerRouteInput, s as ServerRouteInputType, S as SubprocessOptions, a5 as TabCategory, l as TerminalAction, k as TerminalBase, m as TerminalInfo, T as TerminalState, a2 as VSCodeIntegrationOptions, a3 as VSCodeTunnelOptions, O as WizardActions, W as WizardFunctions } from './hooks-6c23ef8a.js';
1
+ import { V as VueInspectorData, a as VueInspectorClient, L as LoadingTimeMetric, H as HookInfo, P as PluginMetric, b as ServerFunctions } from './hooks-4850b104.js';
2
+ export { _ as AnalyzeBuildMeta, $ as AnalyzeBuildsInfo, F as AssetInfo, E as AssetType, A as AutoImportsWithMetadata, B as BasicModuleInfo, U as ClientFunctions, X as ClientUpdateEvent, J as CodeSnippet, C as CompatibilityStatus, K as ComponentRelationship, Q as GetWizardArgs, G as GitHubContributor, I as ImageMeta, Z as InstallModuleReturn, w as InstalledModuleInfo, D as MaintainerInfo, i as ModuleBuiltinTab, y as ModuleCompatibility, M as ModuleCustomTab, a1 as ModuleGlobalOptions, h as ModuleIframeTabLazyOptions, d as ModuleIframeView, f as ModuleLaunchAction, c as ModuleLaunchView, a0 as ModuleOptions, x as ModuleStaticInfo, j as ModuleTabInfo, z as ModuleType, e as ModuleVNodeView, g as ModuleView, q as NpmCommandOptions, p as NpmCommandType, a4 as NuxtDevToolsOptions, N as NuxtDevtoolsInfo, Y as NuxtDevtoolsServerContext, o as PackageManagerName, n as PackageUpdateInfo, u as Payload, v as PluginInfoWithMetic, R as RouteInfo, r as ServerRouteInfo, t as ServerRouteInput, s as ServerRouteInputType, S as SubprocessOptions, a5 as TabCategory, l as TerminalAction, k as TerminalBase, m as TerminalInfo, T as TerminalState, a2 as VSCodeIntegrationOptions, a3 as VSCodeTunnelOptions, O as WizardActions, W as WizardFunctions } from './hooks-4850b104.js';
3
3
  import { Ref } from 'vue';
4
4
  import { AppConfig } from 'nuxt/schema';
5
5
  import { NuxtApp } from 'nuxt/dist/app/nuxt';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nuxt/devtools-kit",
3
3
  "type": "module",
4
- "version": "0.6.6",
4
+ "version": "0.6.7",
5
5
  "license": "MIT",
6
6
  "repository": "nuxt/devtools",
7
7
  "exports": {
@@ -29,7 +29,7 @@
29
29
  "*.mjs"
30
30
  ],
31
31
  "peerDependencies": {
32
- "nuxt": "^3.5.1",
32
+ "nuxt": "^3.6.1",
33
33
  "vite": "*"
34
34
  },
35
35
  "dependencies": {
@@ -41,7 +41,7 @@
41
41
  "birpc": "^0.2.12",
42
42
  "hookable": "^5.5.3",
43
43
  "unbuild": "^1.2.1",
44
- "unimport": "^3.0.11",
44
+ "unimport": "^3.0.12",
45
45
  "vite-plugin-vue-inspector": "^3.4.2",
46
46
  "vue-router": "^4.2.2"
47
47
  },