@nuxt/devtools-kit-nightly 2.0.0-beta.0-28940159.3b2c84c

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.
@@ -0,0 +1,761 @@
1
+ import { VNode, MaybeRefOrGetter } from 'vue';
2
+ import { BirpcGroup } from 'birpc';
3
+ import { Component, NuxtOptions, NuxtPage, NuxtLayout, NuxtApp, Nuxt } from 'nuxt/schema';
4
+ import { Import, UnimportMeta } from 'unimport';
5
+ import { VitePluginInspectorOptions } from 'vite-plugin-vue-inspector';
6
+ import { RouteRecordNormalized } from 'vue-router';
7
+ import { StorageMounts } from 'nitropack';
8
+ import { StorageValue } from 'unstorage';
9
+ import { NuxtAnalyzeMeta } from '@nuxt/schema';
10
+ import { Options } from 'execa';
11
+
12
+ type TabCategory = 'pinned' | 'app' | 'analyze' | 'server' | 'modules' | 'documentation' | 'advanced';
13
+
14
+ interface ModuleCustomTab {
15
+ /**
16
+ * The name of the tab, must be unique
17
+ */
18
+ name: string;
19
+ /**
20
+ * Icon of the tab, support any Iconify icons, or a url to an image
21
+ */
22
+ icon?: string;
23
+ /**
24
+ * Title of the tab
25
+ */
26
+ title: string;
27
+ /**
28
+ * Main view of the tab
29
+ */
30
+ view: ModuleView;
31
+ /**
32
+ * Category of the tab
33
+ * @default 'app'
34
+ */
35
+ category?: TabCategory;
36
+ /**
37
+ * Insert static vnode to the tab entry
38
+ *
39
+ * Advanced options. You don't usually need this.
40
+ */
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;
49
+ }
50
+ interface ModuleLaunchView {
51
+ /**
52
+ * A view for module to lazy launch some actions
53
+ */
54
+ type: 'launch';
55
+ title?: string;
56
+ icon?: string;
57
+ description: string;
58
+ /**
59
+ * Action buttons
60
+ */
61
+ actions: ModuleLaunchAction[];
62
+ }
63
+ interface ModuleIframeView {
64
+ /**
65
+ * Iframe view
66
+ */
67
+ type: 'iframe';
68
+ /**
69
+ * Url of the iframe
70
+ */
71
+ src: string;
72
+ /**
73
+ * Persist the iframe instance even if the tab is not active
74
+ *
75
+ * @default true
76
+ */
77
+ persistent?: boolean;
78
+ }
79
+ interface ModuleVNodeView {
80
+ /**
81
+ * Vue's VNode view
82
+ */
83
+ type: 'vnode';
84
+ /**
85
+ * Send vnode to the client, they must be static and serializable
86
+ *
87
+ * Call `nuxt.hook('devtools:customTabs:refresh')` to trigger manual refresh
88
+ */
89
+ vnode: VNode;
90
+ }
91
+ interface ModuleLaunchAction {
92
+ /**
93
+ * Label of the action button
94
+ */
95
+ label: string;
96
+ /**
97
+ * Additional HTML attributes to the action button
98
+ */
99
+ attrs?: Record<string, string>;
100
+ /**
101
+ * Indicate if the action is pending, will show a loading indicator and disable the button
102
+ */
103
+ pending?: boolean;
104
+ /**
105
+ * Function to handle the action, this is executed on the server side.
106
+ * Will automatically refresh the tabs after the action is resolved.
107
+ */
108
+ handle?: () => void | Promise<void>;
109
+ /**
110
+ * Treat the action as a link, will open the link in a new tab
111
+ */
112
+ src?: string;
113
+ }
114
+ type ModuleView = ModuleIframeView | ModuleLaunchView | ModuleVNodeView;
115
+ interface ModuleIframeTabLazyOptions {
116
+ description?: string;
117
+ onLoad?: () => Promise<void>;
118
+ }
119
+ interface ModuleBuiltinTab {
120
+ name: string;
121
+ icon?: string;
122
+ title?: string;
123
+ path?: string;
124
+ category?: TabCategory;
125
+ show?: () => MaybeRefOrGetter<any>;
126
+ badge?: () => MaybeRefOrGetter<number | string | undefined>;
127
+ onClick?: () => void;
128
+ }
129
+ type ModuleTabInfo = ModuleCustomTab | ModuleBuiltinTab;
130
+ type CategorizedTabs = [TabCategory, (ModuleCustomTab | ModuleBuiltinTab)[]][];
131
+
132
+ interface HookInfo {
133
+ name: string;
134
+ start: number;
135
+ end?: number;
136
+ duration?: number;
137
+ listeners: number;
138
+ executions: number[];
139
+ }
140
+ interface ImageMeta {
141
+ width: number;
142
+ height: number;
143
+ orientation?: number;
144
+ type?: string;
145
+ mimeType?: string;
146
+ }
147
+ interface PackageUpdateInfo {
148
+ name: string;
149
+ current: string;
150
+ latest: string;
151
+ needsUpdate: boolean;
152
+ }
153
+ type PackageManagerName = 'npm' | 'yarn' | 'pnpm' | 'bun';
154
+ type NpmCommandType = 'install' | 'uninstall' | 'update';
155
+ interface NpmCommandOptions {
156
+ dev?: boolean;
157
+ global?: boolean;
158
+ }
159
+ interface AutoImportsWithMetadata {
160
+ imports: Import[];
161
+ metadata?: UnimportMeta;
162
+ dirs: string[];
163
+ }
164
+ interface RouteInfo extends Pick<RouteRecordNormalized, 'name' | 'path' | 'meta' | 'props' | 'children'> {
165
+ file?: string;
166
+ }
167
+ interface ServerRouteInfo {
168
+ route: string;
169
+ filepath: string;
170
+ method?: string;
171
+ type: 'api' | 'route' | 'runtime' | 'collection';
172
+ routes?: ServerRouteInfo[];
173
+ }
174
+ type ServerRouteInputType = 'string' | 'number' | 'boolean' | 'file' | 'date' | 'time' | 'datetime-local';
175
+ interface ServerRouteInput {
176
+ active: boolean;
177
+ key: string;
178
+ value: any;
179
+ type?: ServerRouteInputType;
180
+ }
181
+ interface Payload {
182
+ url: string;
183
+ time: number;
184
+ data?: Record<string, any>;
185
+ state?: Record<string, any>;
186
+ functions?: Record<string, any>;
187
+ }
188
+ interface ServerTaskInfo {
189
+ name: string;
190
+ handler: string;
191
+ description: string;
192
+ type: 'collection' | 'task';
193
+ tasks?: ServerTaskInfo[];
194
+ }
195
+ interface ScannedNitroTasks {
196
+ tasks: {
197
+ [name: string]: {
198
+ handler: string;
199
+ description: string;
200
+ };
201
+ };
202
+ scheduledTasks: {
203
+ [cron: string]: string[];
204
+ };
205
+ }
206
+ interface PluginInfoWithMetic {
207
+ src: string;
208
+ mode?: 'client' | 'server' | 'all';
209
+ ssr?: boolean;
210
+ metric?: PluginMetric;
211
+ }
212
+ interface PluginMetric {
213
+ src: string;
214
+ start: number;
215
+ end: number;
216
+ duration: number;
217
+ }
218
+ interface LoadingTimeMetric {
219
+ ssrStart?: number;
220
+ appInit?: number;
221
+ appLoad?: number;
222
+ pageStart?: number;
223
+ pageEnd?: number;
224
+ pluginInit?: number;
225
+ hmrStart?: number;
226
+ hmrEnd?: number;
227
+ }
228
+ interface BasicModuleInfo {
229
+ entryPath?: string;
230
+ meta?: {
231
+ name?: string;
232
+ };
233
+ }
234
+ interface InstalledModuleInfo {
235
+ name?: string;
236
+ isPackageModule: boolean;
237
+ isUninstallable: boolean;
238
+ info?: ModuleStaticInfo;
239
+ entryPath?: string;
240
+ meta?: {
241
+ name?: string;
242
+ };
243
+ }
244
+ interface ModuleStaticInfo {
245
+ name: string;
246
+ description: string;
247
+ repo: string;
248
+ npm: string;
249
+ icon?: string;
250
+ github: string;
251
+ website: string;
252
+ learn_more: string;
253
+ category: string;
254
+ type: ModuleType;
255
+ stats: ModuleStats;
256
+ maintainers: MaintainerInfo[];
257
+ contributors: GitHubContributor[];
258
+ compatibility: ModuleCompatibility;
259
+ }
260
+ interface ModuleCompatibility {
261
+ nuxt: string;
262
+ requires: {
263
+ bridge?: boolean | 'optional';
264
+ };
265
+ }
266
+ interface ModuleStats {
267
+ downloads: number;
268
+ stars: number;
269
+ publishedAt: number;
270
+ createdAt: number;
271
+ }
272
+ type CompatibilityStatus = 'working' | 'wip' | 'unknown' | 'not-working';
273
+ type ModuleType = 'community' | 'official' | '3rd-party';
274
+ interface MaintainerInfo {
275
+ name: string;
276
+ github: string;
277
+ twitter?: string;
278
+ }
279
+ interface GitHubContributor {
280
+ login: string;
281
+ name?: string;
282
+ avatar_url?: string;
283
+ }
284
+ interface VueInspectorClient {
285
+ enabled: boolean;
286
+ position: {
287
+ x: number;
288
+ y: number;
289
+ };
290
+ linkParams: {
291
+ file: string;
292
+ line: number;
293
+ column: number;
294
+ };
295
+ enable: () => void;
296
+ disable: () => void;
297
+ toggleEnabled: () => void;
298
+ openInEditor: (url: URL) => void;
299
+ onUpdated: () => void;
300
+ }
301
+ type VueInspectorData = VueInspectorClient['linkParams'] & VueInspectorClient['position'];
302
+ type AssetType = 'image' | 'font' | 'video' | 'audio' | 'text' | 'json' | 'other';
303
+ interface AssetInfo {
304
+ path: string;
305
+ type: AssetType;
306
+ publicPath: string;
307
+ filePath: string;
308
+ size: number;
309
+ mtime: number;
310
+ layer?: string;
311
+ }
312
+ interface AssetEntry {
313
+ path: string;
314
+ content: string;
315
+ encoding?: BufferEncoding;
316
+ override?: boolean;
317
+ }
318
+ interface CodeSnippet {
319
+ code: string;
320
+ lang: string;
321
+ name: string;
322
+ docs?: string;
323
+ }
324
+ interface ComponentRelationship {
325
+ id: string;
326
+ deps: string[];
327
+ }
328
+ interface ComponentWithRelationships {
329
+ component: Component;
330
+ dependencies?: string[];
331
+ dependents?: string[];
332
+ }
333
+ interface CodeServerOptions {
334
+ codeBinary: string;
335
+ launchArg: string;
336
+ licenseTermsArg: string;
337
+ connectionTokenArg: string;
338
+ }
339
+
340
+ type CodeServerType = 'ms-code-cli' | 'ms-code-server' | 'coder-code-server';
341
+ interface ModuleOptions {
342
+ /**
343
+ * Enable DevTools
344
+ *
345
+ * @default true
346
+ */
347
+ enabled?: boolean;
348
+ /**
349
+ * Custom tabs
350
+ *
351
+ * This is in static format, for dynamic injection, call `nuxt.hook('devtools:customTabs')` instead
352
+ */
353
+ customTabs?: ModuleCustomTab[];
354
+ /**
355
+ * VS Code Server integration options.
356
+ */
357
+ vscode?: VSCodeIntegrationOptions;
358
+ /**
359
+ * Enable Vue Component Inspector
360
+ *
361
+ * @default true
362
+ */
363
+ componentInspector?: boolean | VitePluginInspectorOptions;
364
+ /**
365
+ * Enable vite-plugin-inspect
366
+ *
367
+ * @default true
368
+ */
369
+ viteInspect?: boolean;
370
+ /**
371
+ * Disable dev time authorization check.
372
+ *
373
+ * **NOT RECOMMENDED**, only use this if you know what you are doing.
374
+ *
375
+ * @see https://github.com/nuxt/devtools/pull/257
376
+ * @default false
377
+ */
378
+ disableAuthorization?: boolean;
379
+ /**
380
+ * Props for the iframe element, useful for environment with stricter CSP
381
+ */
382
+ iframeProps?: Record<string, string | boolean>;
383
+ /**
384
+ * Experimental features
385
+ */
386
+ experimental?: {
387
+ /**
388
+ * Timeline tab
389
+ * @deprecated Use `timeline.enable` instead
390
+ */
391
+ timeline?: boolean;
392
+ };
393
+ /**
394
+ * Options for the timeline tab
395
+ */
396
+ timeline?: {
397
+ /**
398
+ * Enable timeline tab
399
+ *
400
+ * @default false
401
+ */
402
+ enabled?: boolean;
403
+ /**
404
+ * Track on function calls
405
+ */
406
+ functions?: {
407
+ include?: (string | RegExp | ((item: Import) => boolean))[];
408
+ /**
409
+ * Include from specific modules
410
+ *
411
+ * @default ['#app', '@unhead/vue']
412
+ */
413
+ includeFrom?: string[];
414
+ exclude?: (string | RegExp | ((item: Import) => boolean))[];
415
+ };
416
+ };
417
+ /**
418
+ * Options for assets tab
419
+ */
420
+ assets?: {
421
+ /**
422
+ * Allowed file extensions for assets tab to upload.
423
+ * To security concern.
424
+ *
425
+ * Set to '*' to disbale this limitation entirely
426
+ *
427
+ * @default Common media and txt files
428
+ */
429
+ uploadExtensions?: '*' | string[];
430
+ };
431
+ /**
432
+ * Enable anonymous telemetry, helping us improve Nuxt DevTools.
433
+ *
434
+ * By default it will respect global Nuxt telemetry settings.
435
+ */
436
+ telemetry?: boolean;
437
+ }
438
+ interface ModuleGlobalOptions {
439
+ /**
440
+ * List of projects to enable devtools for. Only works when devtools is installed globally.
441
+ */
442
+ projects?: string[];
443
+ }
444
+ interface VSCodeIntegrationOptions {
445
+ /**
446
+ * Enable VS Code Server integration
447
+ */
448
+ enabled?: boolean;
449
+ /**
450
+ * Start VS Code Server on boot
451
+ *
452
+ * @default false
453
+ */
454
+ startOnBoot?: boolean;
455
+ /**
456
+ * Port to start VS Code Server
457
+ *
458
+ * @default 3080
459
+ */
460
+ port?: number;
461
+ /**
462
+ * Reuse existing server if available (same port)
463
+ */
464
+ reuseExistingServer?: boolean;
465
+ /**
466
+ * Determine whether to use code-server or vs code tunnel
467
+ *
468
+ * @default 'local-serve'
469
+ */
470
+ mode?: 'local-serve' | 'tunnel';
471
+ /**
472
+ * Options for VS Code tunnel
473
+ */
474
+ tunnel?: VSCodeTunnelOptions;
475
+ /**
476
+ * Determines which binary and arguments to use for VS Code.
477
+ *
478
+ * By default, uses the MS Code Server (ms-code-server).
479
+ * Can alternatively use the open source Coder code-server (coder-code-server),
480
+ * or the MS VS Code CLI (ms-code-cli)
481
+ * @default 'ms-code-server'
482
+ */
483
+ codeServer?: CodeServerType;
484
+ /**
485
+ * Host address to listen on. Unspecified by default.
486
+ */
487
+ host?: string;
488
+ }
489
+ interface VSCodeTunnelOptions {
490
+ /**
491
+ * the machine name for port forwarding service
492
+ *
493
+ * default: device hostname
494
+ */
495
+ name?: string;
496
+ }
497
+ interface NuxtDevToolsOptions {
498
+ behavior: {
499
+ telemetry: boolean | null;
500
+ };
501
+ ui: {
502
+ componentsGraphShowGlobalComponents: boolean;
503
+ componentsGraphShowLayouts: boolean;
504
+ componentsGraphShowNodeModules: boolean;
505
+ componentsGraphShowPages: boolean;
506
+ componentsGraphShowWorkspace: boolean;
507
+ componentsView: 'list' | 'graph';
508
+ hiddenTabCategories: string[];
509
+ hiddenTabs: string[];
510
+ interactionCloseOnOutsideClick: boolean;
511
+ minimizePanelInactive: number;
512
+ pinnedTabs: string[];
513
+ scale: number;
514
+ showExperimentalFeatures: boolean;
515
+ showHelpButtons: boolean;
516
+ showPanel: boolean | null;
517
+ sidebarExpanded: boolean;
518
+ sidebarScrollable: boolean;
519
+ };
520
+ serverRoutes: {
521
+ selectedRoute: ServerRouteInfo | null;
522
+ view: 'tree' | 'list';
523
+ inputDefaults: Record<string, ServerRouteInput[]>;
524
+ sendFrom: 'app' | 'devtools';
525
+ };
526
+ serverTasks: {
527
+ enabled: boolean;
528
+ selectedTask: ServerTaskInfo | null;
529
+ view: 'tree' | 'list';
530
+ inputDefaults: Record<string, ServerRouteInput[]>;
531
+ };
532
+ assets: {
533
+ view: 'grid' | 'list';
534
+ };
535
+ }
536
+
537
+ interface AnalyzeBuildMeta extends NuxtAnalyzeMeta {
538
+ features: {
539
+ bundleClient: boolean;
540
+ bundleNitro: boolean;
541
+ viteInspect: boolean;
542
+ };
543
+ size: {
544
+ clientBundle?: number;
545
+ nitroBundle?: number;
546
+ };
547
+ }
548
+ interface AnalyzeBuildsInfo {
549
+ isBuilding: boolean;
550
+ builds: AnalyzeBuildMeta[];
551
+ }
552
+
553
+ interface TerminalBase {
554
+ id: string;
555
+ name: string;
556
+ description?: string;
557
+ icon?: string;
558
+ }
559
+ type TerminalAction = 'restart' | 'terminate' | 'clear' | 'remove';
560
+ interface SubprocessOptions extends Options {
561
+ command: string;
562
+ args?: string[];
563
+ }
564
+ interface TerminalInfo extends TerminalBase {
565
+ /**
566
+ * Whether the terminal can be restarted
567
+ */
568
+ restartable?: boolean;
569
+ /**
570
+ * Whether the terminal can be terminated
571
+ */
572
+ terminatable?: boolean;
573
+ /**
574
+ * Whether the terminal is terminated
575
+ */
576
+ isTerminated?: boolean;
577
+ /**
578
+ * Content buffer
579
+ */
580
+ buffer?: string;
581
+ }
582
+ interface TerminalState extends TerminalInfo {
583
+ /**
584
+ * User action to restart the terminal, when not provided, this action will be disabled
585
+ */
586
+ onActionRestart?: () => Promise<void> | void;
587
+ /**
588
+ * User action to terminate the terminal, when not provided, this action will be disabled
589
+ */
590
+ onActionTerminate?: () => Promise<void> | void;
591
+ }
592
+
593
+ interface WizardFunctions {
594
+ enablePages: (nuxt: any) => Promise<void>;
595
+ }
596
+ type WizardActions = keyof WizardFunctions;
597
+ type GetWizardArgs<T extends WizardActions> = WizardFunctions[T] extends (nuxt: any, ...args: infer A) => any ? A : never;
598
+
599
+ interface ServerFunctions {
600
+ getServerConfig: () => NuxtOptions;
601
+ getServerRuntimeConfig: () => Record<string, any>;
602
+ getModuleOptions: () => ModuleOptions;
603
+ getComponents: () => Component[];
604
+ getComponentsRelationships: () => Promise<ComponentRelationship[]>;
605
+ getAutoImports: () => AutoImportsWithMetadata;
606
+ getServerPages: () => NuxtPage[];
607
+ getCustomTabs: () => ModuleCustomTab[];
608
+ getServerHooks: () => HookInfo[];
609
+ getServerLayouts: () => NuxtLayout[];
610
+ getStaticAssets: () => Promise<AssetInfo[]>;
611
+ getServerRoutes: () => ServerRouteInfo[];
612
+ getServerTasks: () => ScannedNitroTasks | null;
613
+ getServerApp: () => NuxtApp | undefined;
614
+ getOptions: <T extends keyof NuxtDevToolsOptions>(tab: T) => Promise<NuxtDevToolsOptions[T]>;
615
+ updateOptions: <T extends keyof NuxtDevToolsOptions>(tab: T, settings: Partial<NuxtDevToolsOptions[T]>) => Promise<void>;
616
+ clearOptions: () => Promise<void>;
617
+ checkForUpdateFor: (name: string) => Promise<PackageUpdateInfo | undefined>;
618
+ getNpmCommand: (command: NpmCommandType, packageName: string, options?: NpmCommandOptions) => Promise<string[] | undefined>;
619
+ runNpmCommand: (token: string, command: NpmCommandType, packageName: string, options?: NpmCommandOptions) => Promise<{
620
+ processId: string;
621
+ } | undefined>;
622
+ getTerminals: () => TerminalInfo[];
623
+ getTerminalDetail: (token: string, id: string) => Promise<TerminalInfo | undefined>;
624
+ runTerminalAction: (token: string, id: string, action: TerminalAction) => Promise<boolean>;
625
+ getStorageMounts: () => Promise<StorageMounts>;
626
+ getStorageKeys: (base?: string) => Promise<string[]>;
627
+ getStorageItem: (token: string, key: string) => Promise<StorageValue>;
628
+ setStorageItem: (token: string, key: string, value: StorageValue) => Promise<void>;
629
+ removeStorageItem: (token: string, key: string) => Promise<void>;
630
+ getAnalyzeBuildInfo: () => Promise<AnalyzeBuildsInfo>;
631
+ generateAnalyzeBuildName: () => Promise<string>;
632
+ startAnalyzeBuild: (token: string, name: string) => Promise<string>;
633
+ clearAnalyzeBuilds: (token: string, names?: string[]) => Promise<void>;
634
+ getImageMeta: (token: string, filepath: string) => Promise<ImageMeta | undefined>;
635
+ getTextAssetContent: (token: string, filepath: string, limit?: number) => Promise<string | undefined>;
636
+ writeStaticAssets: (token: string, file: AssetEntry[], folder: string) => Promise<string[]>;
637
+ deleteStaticAsset: (token: string, filepath: string) => Promise<void>;
638
+ renameStaticAsset: (token: string, oldPath: string, newPath: string) => Promise<void>;
639
+ telemetryEvent: (payload: object, immediate?: boolean) => void;
640
+ customTabAction: (name: string, action: number) => Promise<boolean>;
641
+ runWizard: <T extends WizardActions>(token: string, name: T, ...args: GetWizardArgs<T>) => Promise<void>;
642
+ openInEditor: (filepath: string) => Promise<boolean>;
643
+ restartNuxt: (token: string, hard?: boolean) => Promise<void>;
644
+ installNuxtModule: (token: string, name: string, dry?: boolean) => Promise<InstallModuleReturn>;
645
+ uninstallNuxtModule: (token: string, name: string, dry?: boolean) => Promise<InstallModuleReturn>;
646
+ enableTimeline: (dry: boolean) => Promise<[string, string]>;
647
+ requestForAuth: (info?: string, origin?: string) => Promise<void>;
648
+ verifyAuthToken: (token: string) => Promise<boolean>;
649
+ }
650
+ interface ClientFunctions {
651
+ refresh: (event: ClientUpdateEvent) => void;
652
+ callHook: (hook: string, ...args: any[]) => Promise<void>;
653
+ navigateTo: (path: string) => void;
654
+ onTerminalData: (_: {
655
+ id: string;
656
+ data: string;
657
+ }) => void;
658
+ onTerminalExit: (_: {
659
+ id: string;
660
+ code?: number;
661
+ }) => void;
662
+ }
663
+ type ClientUpdateEvent = keyof ServerFunctions;
664
+
665
+ /**
666
+ * @internal
667
+ */
668
+ interface NuxtDevtoolsServerContext {
669
+ nuxt: Nuxt;
670
+ options: ModuleOptions;
671
+ rpc: BirpcGroup<ClientFunctions, ServerFunctions>;
672
+ /**
673
+ * Hook to open file in editor
674
+ */
675
+ openInEditorHooks: ((filepath: string) => boolean | void | Promise<boolean | void>)[];
676
+ /**
677
+ * Invalidate client cache for a function and ask for re-fetching
678
+ */
679
+ refresh: (event: keyof ServerFunctions) => void;
680
+ /**
681
+ * Ensure dev auth token is valid, throw if not
682
+ */
683
+ ensureDevAuthToken: (token: string) => Promise<void>;
684
+ extendServerRpc: <ClientFunctions = Record<string, never>, ServerFunctions = Record<string, never>>(name: string, functions: ServerFunctions) => BirpcGroup<ClientFunctions, ServerFunctions>;
685
+ }
686
+ interface NuxtDevtoolsInfo {
687
+ version: string;
688
+ packagePath: string;
689
+ isGlobalInstall: boolean;
690
+ }
691
+ interface InstallModuleReturn {
692
+ configOriginal: string;
693
+ configGenerated: string;
694
+ commands: string[];
695
+ processId: string;
696
+ }
697
+
698
+ declare module '@nuxt/schema' {
699
+ interface NuxtHooks {
700
+ /**
701
+ * Called before devtools starts. Useful to detect if devtools is enabled.
702
+ */
703
+ 'devtools:before': () => void;
704
+ /**
705
+ * Called after devtools is initialized.
706
+ */
707
+ 'devtools:initialized': (info: NuxtDevtoolsInfo) => void;
708
+ /**
709
+ * Hooks to extend devtools tabs.
710
+ */
711
+ 'devtools:customTabs': (tabs: ModuleCustomTab[]) => void;
712
+ /**
713
+ * Retrigger update for custom tabs, `devtools:customTabs` will be called again.
714
+ */
715
+ 'devtools:customTabs:refresh': () => void;
716
+ /**
717
+ * Register a terminal.
718
+ */
719
+ 'devtools:terminal:register': (terminal: TerminalState) => void;
720
+ /**
721
+ * Write to a terminal.
722
+ *
723
+ * Returns true if terminal is found.
724
+ */
725
+ 'devtools:terminal:write': (_: {
726
+ id: string;
727
+ data: string;
728
+ }) => void;
729
+ /**
730
+ * Remove a terminal from devtools.
731
+ *
732
+ * Returns true if terminal is found and deleted.
733
+ */
734
+ 'devtools:terminal:remove': (_: {
735
+ id: string;
736
+ }) => void;
737
+ /**
738
+ * Mark a terminal as terminated.
739
+ */
740
+ 'devtools:terminal:exit': (_: {
741
+ id: string;
742
+ code?: number;
743
+ }) => void;
744
+ }
745
+ }
746
+ declare module '@nuxt/schema' {
747
+ /**
748
+ * Runtime Hooks
749
+ */
750
+ interface RuntimeNuxtHooks {
751
+ /**
752
+ * On terminal data.
753
+ */
754
+ 'devtools:terminal:data': (payload: {
755
+ id: string;
756
+ data: string;
757
+ }) => void;
758
+ }
759
+ }
760
+
761
+ export type { CodeServerType as $, AnalyzeBuildMeta as A, BasicModuleInfo as B, ClientFunctions as C, ModuleStaticInfo as D, ModuleCompatibility as E, ModuleStats as F, CompatibilityStatus as G, HookInfo as H, ImageMeta as I, ModuleType as J, MaintainerInfo as K, LoadingTimeMetric as L, ModuleCustomTab as M, NuxtDevtoolsInfo as N, GitHubContributor as O, PluginMetric as P, AssetType as Q, RouteInfo as R, SubprocessOptions as S, TerminalState as T, AssetInfo as U, VueInspectorData as V, AssetEntry as W, CodeSnippet as X, ComponentRelationship as Y, ComponentWithRelationships as Z, CodeServerOptions as _, VueInspectorClient as a, ModuleOptions as a0, ModuleGlobalOptions as a1, VSCodeIntegrationOptions as a2, VSCodeTunnelOptions as a3, NuxtDevToolsOptions as a4, ClientUpdateEvent as a5, NuxtDevtoolsServerContext as a6, InstallModuleReturn as a7, TerminalBase as a8, TerminalAction as a9, TerminalInfo as aa, WizardFunctions as ab, WizardActions as ac, GetWizardArgs as ad, ServerFunctions as b, AnalyzeBuildsInfo as c, TabCategory as d, ModuleLaunchView as e, ModuleIframeView as f, ModuleVNodeView as g, ModuleLaunchAction as h, ModuleView as i, ModuleIframeTabLazyOptions as j, ModuleBuiltinTab as k, ModuleTabInfo as l, CategorizedTabs as m, PackageUpdateInfo as n, PackageManagerName as o, NpmCommandType as p, NpmCommandOptions as q, AutoImportsWithMetadata as r, ServerRouteInfo as s, ServerRouteInputType as t, ServerRouteInput as u, Payload as v, ServerTaskInfo as w, ScannedNitroTasks as x, PluginInfoWithMetic as y, InstalledModuleInfo as z };