@nuxt/devtools-kit 4.0.0-alpha.6 → 4.0.0-alpha.8
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/index.cjs +130 -1
- package/dist/index.d.cts +231 -9
- package/dist/index.d.mts +231 -9
- package/dist/index.d.ts +231 -9
- package/dist/index.mjs +121 -2
- package/dist/runtime/iframe-client.d.ts +18 -0
- package/dist/runtime/iframe-client.mjs +7 -0
- package/dist/shared/{devtools-kit.BwQLAI1z.d.cts → devtools-kit.CC-eVeXW.d.cts} +196 -76
- package/dist/shared/{devtools-kit.BwQLAI1z.d.mts → devtools-kit.CC-eVeXW.d.mts} +196 -76
- package/dist/shared/{devtools-kit.BwQLAI1z.d.ts → devtools-kit.CC-eVeXW.d.ts} +196 -76
- package/dist/types.d.cts +27 -3
- package/dist/types.d.mts +27 -3
- package/dist/types.d.ts +27 -3
- package/package.json +8 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { DevToolsMessageLevel, DevToolsMessageFilePosition, ViteDevToolsNodeContext } from '@vitejs/devtools-kit';
|
|
1
2
|
import { VNode, MaybeRefOrGetter } from 'vue';
|
|
2
|
-
import { DevToolsNodeContext } from '@vitejs/devtools-kit';
|
|
3
3
|
import { BirpcGroup } from 'birpc';
|
|
4
|
-
import { Component, NuxtOptions, NuxtPage, NuxtLayout, NuxtApp,
|
|
4
|
+
import { Component, NuxtOptions, NuxtPage, NuxtLayout, NuxtApp, Nuxt, NuxtDebugModuleMutationRecord } from 'nuxt/schema';
|
|
5
5
|
import { Import, UnimportMeta } from 'unimport';
|
|
6
6
|
import { RouteRecordNormalized } from 'vue-router';
|
|
7
7
|
import { Nitro, StorageMounts } from 'nitropack';
|
|
@@ -137,6 +137,51 @@ interface ModuleBuiltinTab {
|
|
|
137
137
|
type ModuleTabInfo = ModuleCustomTab | ModuleBuiltinTab;
|
|
138
138
|
type CategorizedTabs = [TabCategory, (ModuleCustomTab | ModuleBuiltinTab)[]][];
|
|
139
139
|
|
|
140
|
+
/**
|
|
141
|
+
* Severity level of a notification, mirroring devframe's message levels.
|
|
142
|
+
*
|
|
143
|
+
* Determines the color/icon of the entry in the Vite DevTools **Messages** dock
|
|
144
|
+
* and its toast.
|
|
145
|
+
*/
|
|
146
|
+
type NuxtDevtoolsNotifyLevel = DevToolsMessageLevel;
|
|
147
|
+
/**
|
|
148
|
+
* A Nuxt-friendly subset of devframe's `DevframeMessageEntryInput`.
|
|
149
|
+
*
|
|
150
|
+
* This is the input accepted by the `devtools:notify` Nuxt hook, the `notify`
|
|
151
|
+
* RPC function and the injected client's `notify()` — all of which forward to
|
|
152
|
+
* the connected `ctx.messages` host so notifications flow through the single
|
|
153
|
+
* devframe Messages system (persistent dock list + toast overlay).
|
|
154
|
+
*
|
|
155
|
+
* Tiers are expressed through the flags below:
|
|
156
|
+
* - **Ephemeral** (toast-only feedback like "Copied!"): `notify: true` with an
|
|
157
|
+
* `autoDismiss` (toast lifetime) and `autoDelete` (entry lifetime) so it never
|
|
158
|
+
* builds up history in the Messages dock.
|
|
159
|
+
* - **Persistent** (server-originated, leveled): omit `autoDelete` so the entry
|
|
160
|
+
* is kept in the Messages dock list.
|
|
161
|
+
*/
|
|
162
|
+
interface NuxtDevtoolsNotifyInput {
|
|
163
|
+
/** Short title / summary of the message. */
|
|
164
|
+
message: string;
|
|
165
|
+
/** Severity level. Defaults to `'info'`. */
|
|
166
|
+
level?: NuxtDevtoolsNotifyLevel;
|
|
167
|
+
/** Optional detailed description or explanation. */
|
|
168
|
+
description?: string;
|
|
169
|
+
/** Optional tags/labels for filtering in the Messages dock. */
|
|
170
|
+
labels?: string[];
|
|
171
|
+
/** Optional grouping category (e.g. `'build'`, `'lint'`, `'runtime'`). */
|
|
172
|
+
category?: string;
|
|
173
|
+
/** Optional source file position (e.g. for a build/lint error). */
|
|
174
|
+
filePosition?: DevToolsMessageFilePosition;
|
|
175
|
+
/** Optional stack trace string. */
|
|
176
|
+
stacktrace?: string;
|
|
177
|
+
/** Whether this message should also appear as a transient toast. */
|
|
178
|
+
notify?: boolean;
|
|
179
|
+
/** Time in ms to auto-dismiss the toast (client-side). */
|
|
180
|
+
autoDismiss?: number;
|
|
181
|
+
/** Time in ms to auto-delete the entry from the persistent list (server-side). */
|
|
182
|
+
autoDelete?: number;
|
|
183
|
+
}
|
|
184
|
+
|
|
140
185
|
interface HookInfo {
|
|
141
186
|
name: string;
|
|
142
187
|
start: number;
|
|
@@ -380,7 +425,14 @@ interface ModuleOptions {
|
|
|
380
425
|
*/
|
|
381
426
|
viteInspect?: boolean;
|
|
382
427
|
/**
|
|
383
|
-
*
|
|
428
|
+
* Disable the DevTools client authorization prompt, allowing any browser to
|
|
429
|
+
* connect without approving it first.
|
|
430
|
+
*
|
|
431
|
+
* Defaults to `true` in sandboxed environments (StackBlitz, CodeSandbox).
|
|
432
|
+
*
|
|
433
|
+
* Note: disabling authorization lets any browser (including other devices, if
|
|
434
|
+
* you expose the dev server to your LAN/WAN) connect to DevTools and access
|
|
435
|
+
* your server and filesystem. Only disable it in trusted environments.
|
|
384
436
|
*/
|
|
385
437
|
disableAuthorization?: boolean;
|
|
386
438
|
/**
|
|
@@ -547,55 +599,23 @@ interface AnalyzeBuildMeta extends NuxtAnalyzeMeta {
|
|
|
547
599
|
}
|
|
548
600
|
interface AnalyzeBuildsInfo {
|
|
549
601
|
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 {
|
|
561
|
-
command: string;
|
|
562
|
-
args?: string[];
|
|
563
|
-
cwd?: string;
|
|
564
|
-
env?: Record<string, string | undefined>;
|
|
565
|
-
nodeOptions?: SpawnOptions;
|
|
566
|
-
}
|
|
567
|
-
interface TerminalInfo extends TerminalBase {
|
|
568
|
-
/**
|
|
569
|
-
* Whether the terminal can be restarted
|
|
570
|
-
*/
|
|
571
|
-
restartable?: boolean;
|
|
572
|
-
/**
|
|
573
|
-
* Whether the terminal can be terminated
|
|
574
|
-
*/
|
|
575
|
-
terminatable?: boolean;
|
|
576
|
-
/**
|
|
577
|
-
* Whether the terminal is terminated
|
|
578
|
-
*/
|
|
579
|
-
isTerminated?: boolean;
|
|
580
|
-
/**
|
|
581
|
-
* Content buffer
|
|
582
|
-
*/
|
|
583
|
-
buffer?: string;
|
|
584
|
-
}
|
|
585
|
-
interface TerminalState extends TerminalInfo {
|
|
586
602
|
/**
|
|
587
|
-
*
|
|
603
|
+
* Unique id of the terminal session for the build currently in flight, or
|
|
604
|
+
* `undefined` when idle. The client reveals this session and derives its
|
|
605
|
+
* "Building…" state from it instead of an `onTerminalExit` broadcast.
|
|
588
606
|
*/
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
* User action to terminate the terminal, when not provided, this action will be disabled
|
|
592
|
-
*/
|
|
593
|
-
onActionTerminate?: () => Promise<void> | void;
|
|
607
|
+
activeSessionId?: string;
|
|
608
|
+
builds: AnalyzeBuildMeta[];
|
|
594
609
|
}
|
|
595
610
|
|
|
596
611
|
interface ServerFunctions {
|
|
597
612
|
getServerConfig: () => NuxtOptions;
|
|
598
613
|
getServerDebugContext: () => Promise<ServerDebugContext | undefined>;
|
|
614
|
+
/**
|
|
615
|
+
* @deprecated Replaced by the Data Inspector panel's live `Nuxt Application`
|
|
616
|
+
* source. Kept as a compatibility shim (emits `NDT_DEP_0009`) for one
|
|
617
|
+
* migration window and will be removed in a future major.
|
|
618
|
+
*/
|
|
599
619
|
getServerData: () => Promise<NuxtServerData>;
|
|
600
620
|
getServerRuntimeConfig: () => Record<string, any>;
|
|
601
621
|
getModuleOptions: () => ModuleOptions;
|
|
@@ -618,9 +638,7 @@ interface ServerFunctions {
|
|
|
618
638
|
runNpmCommand: (command: NpmCommandType, packageName: string, options?: NpmCommandOptions) => Promise<{
|
|
619
639
|
processId: string;
|
|
620
640
|
} | undefined>;
|
|
621
|
-
|
|
622
|
-
getTerminalDetail: (id: string) => Promise<TerminalInfo | undefined>;
|
|
623
|
-
runTerminalAction: (id: string, action: TerminalAction) => Promise<boolean>;
|
|
641
|
+
revealTerminal: (id: string) => Promise<boolean>;
|
|
624
642
|
getStorageMounts: () => Promise<StorageMounts>;
|
|
625
643
|
getStorageKeys: (base?: string) => Promise<string[]>;
|
|
626
644
|
getStorageItem: (key: string) => Promise<StorageValue>;
|
|
@@ -635,13 +653,14 @@ interface ServerFunctions {
|
|
|
635
653
|
writeStaticAssets: (file: AssetEntry[], folder: string) => Promise<string[]>;
|
|
636
654
|
deleteStaticAsset: (filepath: string) => Promise<void>;
|
|
637
655
|
renameStaticAsset: (oldPath: string, newPath: string) => Promise<void>;
|
|
656
|
+
notify: (input: NuxtDevtoolsNotifyInput) => Promise<void>;
|
|
638
657
|
telemetryEvent: (payload: object, immediate?: boolean) => void;
|
|
639
658
|
customTabAction: (name: string, action: number) => Promise<boolean>;
|
|
640
659
|
enablePages: () => Promise<void>;
|
|
641
660
|
openInEditor: (filepath: string) => Promise<boolean>;
|
|
642
661
|
restartNuxt: (hard?: boolean) => Promise<void>;
|
|
643
|
-
installNuxtModule: (name: string, dry?: boolean) => Promise<InstallModuleReturn>;
|
|
644
|
-
uninstallNuxtModule: (name: string, dry?: boolean) => Promise<InstallModuleReturn>;
|
|
662
|
+
installNuxtModule: (name: string, dry?: boolean, sessionId?: string) => Promise<InstallModuleReturn>;
|
|
663
|
+
uninstallNuxtModule: (name: string, dry?: boolean, sessionId?: string) => Promise<InstallModuleReturn>;
|
|
645
664
|
enableTimeline: (dry: boolean) => Promise<[string, string]>;
|
|
646
665
|
requestForAuth: (info?: string, origin?: string) => Promise<void>;
|
|
647
666
|
verifyAuthToken: () => Promise<boolean>;
|
|
@@ -650,15 +669,23 @@ interface ClientFunctions {
|
|
|
650
669
|
refresh: (event: ClientUpdateEvent) => void;
|
|
651
670
|
callHook: (hook: string, ...args: any[]) => Promise<void>;
|
|
652
671
|
navigateTo: (path: string) => void;
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
672
|
+
/**
|
|
673
|
+
* Minimal server→client completion signal for generic package updates only
|
|
674
|
+
* (`runNpmCommand`): the run RPC returns before the process exits, so this
|
|
675
|
+
* lets `usePackageUpdate` and the restart prompt settle once it finishes. It
|
|
676
|
+
* carries only `{ id, code }` and is not a terminal-data transport. Module
|
|
677
|
+
* install/uninstall and analyze-build no longer rely on it — they clear their
|
|
678
|
+
* UI from the awaited RPC / refreshed info instead.
|
|
679
|
+
*/
|
|
657
680
|
onTerminalExit: (_: {
|
|
658
681
|
id: string;
|
|
659
682
|
code?: number;
|
|
660
683
|
}) => void;
|
|
661
684
|
}
|
|
685
|
+
/**
|
|
686
|
+
* @deprecated The payload of the deprecated {@link ServerFunctions.getServerData}
|
|
687
|
+
* shim. Use the Data Inspector panel's live `Nuxt Application` source instead.
|
|
688
|
+
*/
|
|
662
689
|
interface NuxtServerData {
|
|
663
690
|
nuxt: NuxtOptions;
|
|
664
691
|
nitro?: Nitro['options'];
|
|
@@ -670,13 +697,16 @@ interface NuxtServerData {
|
|
|
670
697
|
type ClientUpdateEvent = keyof ServerFunctions;
|
|
671
698
|
|
|
672
699
|
/**
|
|
673
|
-
*
|
|
674
|
-
*
|
|
700
|
+
* Legacy Nuxt DevTools RPC compatibility surface exposed on `nuxt.devtools.rpc`.
|
|
701
|
+
*
|
|
702
|
+
* For new integrations prefer {@link onDevtoolsReady}, where the connected
|
|
703
|
+
* `ViteDevToolsNodeContext` gives you the full devframe `ctx.rpc`
|
|
704
|
+
* (`register`/`invokeLocal`/`broadcast`/`sharedState`/…).
|
|
675
705
|
*/
|
|
676
706
|
interface NuxtDevtoolsRpc {
|
|
677
707
|
/**
|
|
678
708
|
* Broadcast proxy for calling client functions.
|
|
679
|
-
* Supports `rpc.broadcast.refresh.asEvent(event)`
|
|
709
|
+
* Supports `rpc.broadcast.refresh.asEvent(event)` for backward compatibility.
|
|
680
710
|
*/
|
|
681
711
|
broadcast: {
|
|
682
712
|
[K in keyof ClientFunctions]: ClientFunctions[K] & {
|
|
@@ -684,7 +714,7 @@ interface NuxtDevtoolsRpc {
|
|
|
684
714
|
};
|
|
685
715
|
};
|
|
686
716
|
/**
|
|
687
|
-
* Proxy for
|
|
717
|
+
* Proxy for reading/writing server functions locally.
|
|
688
718
|
*/
|
|
689
719
|
functions: ServerFunctions;
|
|
690
720
|
}
|
|
@@ -696,9 +726,14 @@ interface NuxtDevtoolsServerContext {
|
|
|
696
726
|
options: ModuleOptions;
|
|
697
727
|
rpc: NuxtDevtoolsRpc;
|
|
698
728
|
/**
|
|
699
|
-
* The Vite DevTools
|
|
729
|
+
* The connected Vite DevTools kit context (`docks`/`terminals`/`messages`/
|
|
730
|
+
* `commands`/`rpc`/`diagnostics`/…).
|
|
731
|
+
*
|
|
732
|
+
* This is the raw escape hatch and is `undefined` until the Vite DevTools
|
|
733
|
+
* plugin connects. Prefer {@link onDevtoolsReady}, which hands you the
|
|
734
|
+
* connected context.
|
|
700
735
|
*/
|
|
701
|
-
devtoolsKit:
|
|
736
|
+
devtoolsKit: ViteDevToolsNodeContext | undefined;
|
|
702
737
|
/**
|
|
703
738
|
* Hook to open file in editor
|
|
704
739
|
*/
|
|
@@ -707,6 +742,19 @@ interface NuxtDevtoolsServerContext {
|
|
|
707
742
|
* Invalidate client cache for a function and ask for re-fetching
|
|
708
743
|
*/
|
|
709
744
|
refresh: (event: keyof ServerFunctions) => void;
|
|
745
|
+
/**
|
|
746
|
+
* Push a notification through the devframe Messages system (`ctx.messages`).
|
|
747
|
+
*
|
|
748
|
+
* The connected messages host surfaces it in the Vite DevTools **Messages**
|
|
749
|
+
* dock and/or as a toast. Calls made before the kit connects are buffered and
|
|
750
|
+
* replayed on connect. Used by the `devtools:notify` hook, the `notify` RPC
|
|
751
|
+
* function and the curated built-in notification sources.
|
|
752
|
+
*/
|
|
753
|
+
notify: (input: NuxtDevtoolsNotifyInput) => void;
|
|
754
|
+
/**
|
|
755
|
+
* @deprecated Use the Vite DevTools RPC registration instead:
|
|
756
|
+
* `nuxt.devtools.rpc.register(defineRpcFunction(...))`. Kept working as a shim.
|
|
757
|
+
*/
|
|
710
758
|
extendServerRpc: <ClientFunctions extends object = Record<string, unknown>, ServerFunctions extends object = Record<string, unknown>>(name: string, functions: ServerFunctions) => BirpcGroup<ClientFunctions, ServerFunctions>;
|
|
711
759
|
}
|
|
712
760
|
interface NuxtDevtoolsInfo {
|
|
@@ -726,6 +774,64 @@ interface ServerDebugContext {
|
|
|
726
774
|
moduleMutationRecords: ServerDebugModuleMutationRecord[];
|
|
727
775
|
}
|
|
728
776
|
|
|
777
|
+
interface TerminalBase {
|
|
778
|
+
id: string;
|
|
779
|
+
name: string;
|
|
780
|
+
description?: string;
|
|
781
|
+
icon?: string;
|
|
782
|
+
}
|
|
783
|
+
type TerminalAction = 'restart' | 'terminate' | 'clear' | 'remove';
|
|
784
|
+
interface SubprocessOptions {
|
|
785
|
+
command: string;
|
|
786
|
+
args?: string[];
|
|
787
|
+
cwd?: string;
|
|
788
|
+
env?: Record<string, string | undefined>;
|
|
789
|
+
nodeOptions?: SpawnOptions;
|
|
790
|
+
}
|
|
791
|
+
interface TerminalInfo extends TerminalBase {
|
|
792
|
+
/**
|
|
793
|
+
* Whether the terminal can be restarted.
|
|
794
|
+
*
|
|
795
|
+
* @deprecated Ignored since v4: legacy terminals are bridged onto the built-in
|
|
796
|
+
* Terminals dock as read-only, output-only sessions, so Devframe shows no
|
|
797
|
+
* restart control. Restart a `startSubprocess()`-owned process through its
|
|
798
|
+
* returned handle instead. Will be removed in v5.
|
|
799
|
+
*/
|
|
800
|
+
restartable?: boolean;
|
|
801
|
+
/**
|
|
802
|
+
* Whether the terminal can be terminated.
|
|
803
|
+
*
|
|
804
|
+
* @deprecated Ignored since v4 (see {@link TerminalInfo.restartable}). Will be
|
|
805
|
+
* removed in v5.
|
|
806
|
+
*/
|
|
807
|
+
terminatable?: boolean;
|
|
808
|
+
/**
|
|
809
|
+
* Whether the terminal is terminated
|
|
810
|
+
*/
|
|
811
|
+
isTerminated?: boolean;
|
|
812
|
+
/**
|
|
813
|
+
* Content buffer
|
|
814
|
+
*/
|
|
815
|
+
buffer?: string;
|
|
816
|
+
}
|
|
817
|
+
interface TerminalState extends TerminalInfo {
|
|
818
|
+
/**
|
|
819
|
+
* User action to restart the terminal, when not provided, this action will be disabled.
|
|
820
|
+
*
|
|
821
|
+
* @deprecated Ignored since v4: the bridge to the built-in Terminals dock
|
|
822
|
+
* cannot attach action callbacks to an externally registered session. Will be
|
|
823
|
+
* removed in v5.
|
|
824
|
+
*/
|
|
825
|
+
onActionRestart?: () => Promise<void> | void;
|
|
826
|
+
/**
|
|
827
|
+
* User action to terminate the terminal, when not provided, this action will be disabled.
|
|
828
|
+
*
|
|
829
|
+
* @deprecated Ignored since v4 (see {@link TerminalState.onActionRestart}).
|
|
830
|
+
* Will be removed in v5.
|
|
831
|
+
*/
|
|
832
|
+
onActionTerminate?: () => Promise<void> | void;
|
|
833
|
+
}
|
|
834
|
+
|
|
729
835
|
declare module '@nuxt/schema' {
|
|
730
836
|
interface NuxtHooks {
|
|
731
837
|
/**
|
|
@@ -736,6 +842,30 @@ declare module '@nuxt/schema' {
|
|
|
736
842
|
* Called after devtools is initialized.
|
|
737
843
|
*/
|
|
738
844
|
'devtools:initialized': (info: NuxtDevtoolsInfo) => void;
|
|
845
|
+
/**
|
|
846
|
+
* Called once the Vite DevTools kit has connected, with the connected
|
|
847
|
+
* `ViteDevToolsNodeContext`.
|
|
848
|
+
*
|
|
849
|
+
* This is the recommended place to do all DevTools integration
|
|
850
|
+
* (registering docks, terminals, messages, commands, RPC functions,
|
|
851
|
+
* diagnostics, …): the kit is guaranteed to be available here, so you don't
|
|
852
|
+
* need the connect-safe accessors on `nuxt.devtools`.
|
|
853
|
+
*/
|
|
854
|
+
'devtools:ready': (ctx: ViteDevToolsNodeContext) => void | Promise<void>;
|
|
855
|
+
/**
|
|
856
|
+
* Push a notification through the devframe Messages system.
|
|
857
|
+
*
|
|
858
|
+
* Forwarded to the connected `ctx.messages` host, so it surfaces in the
|
|
859
|
+
* Vite DevTools **Messages** dock (persistent, when leveled) and/or as a
|
|
860
|
+
* transient toast (when `notify` is set). Calls made before the kit connects
|
|
861
|
+
* are buffered and replayed once it does.
|
|
862
|
+
*
|
|
863
|
+
* @example
|
|
864
|
+
* ```ts
|
|
865
|
+
* nuxt.callHook('devtools:notify', { message: 'Build failed', level: 'error' })
|
|
866
|
+
* ```
|
|
867
|
+
*/
|
|
868
|
+
'devtools:notify': (input: NuxtDevtoolsNotifyInput) => void;
|
|
739
869
|
/**
|
|
740
870
|
* Hooks to extend devtools tabs.
|
|
741
871
|
*/
|
|
@@ -745,7 +875,11 @@ declare module '@nuxt/schema' {
|
|
|
745
875
|
*/
|
|
746
876
|
'devtools:customTabs:refresh': () => void;
|
|
747
877
|
/**
|
|
748
|
-
* Register a terminal.
|
|
878
|
+
* Register a terminal whose process is owned by the caller (module).
|
|
879
|
+
*
|
|
880
|
+
* The registered session is surfaced **read-only** in the built-in Vite
|
|
881
|
+
* DevTools **Terminals** dock; stream output into it via
|
|
882
|
+
* `devtools:terminal:write`.
|
|
749
883
|
*/
|
|
750
884
|
'devtools:terminal:register': (terminal: TerminalState) => void;
|
|
751
885
|
/**
|
|
@@ -774,19 +908,5 @@ declare module '@nuxt/schema' {
|
|
|
774
908
|
}) => void;
|
|
775
909
|
}
|
|
776
910
|
}
|
|
777
|
-
declare module '@nuxt/schema' {
|
|
778
|
-
/**
|
|
779
|
-
* Runtime Hooks
|
|
780
|
-
*/
|
|
781
|
-
interface RuntimeNuxtHooks {
|
|
782
|
-
/**
|
|
783
|
-
* On terminal data.
|
|
784
|
-
*/
|
|
785
|
-
'devtools:terminal:data': (payload: {
|
|
786
|
-
id: string;
|
|
787
|
-
data: string;
|
|
788
|
-
}) => void;
|
|
789
|
-
}
|
|
790
|
-
}
|
|
791
911
|
|
|
792
|
-
export type {
|
|
912
|
+
export type { PluginInfoWithMetic as $, AnalyzeBuildMeta as A, BasicModuleInfo as B, CategorizedTabs as C, ModuleStaticInfo as D, ModuleStats as E, ModuleTabInfo as F, GitHubContributor as G, HookInfo as H, ImageMeta as I, ModuleType as J, ModuleVNodeView as K, LoadingTimeMetric as L, ModuleCustomTab as M, NuxtDevtoolsServerContext as N, ModuleView as O, PluginMetric as P, NpmCommandOptions as Q, NpmCommandType as R, SubprocessOptions as S, TerminalState as T, NuxtDevToolsOptions as U, NuxtDevtoolsNotifyLevel as V, NuxtDevtoolsRpc as W, NuxtServerData as X, PackageManagerName as Y, PackageUpdateInfo as Z, Payload as _, NuxtDevtoolsInfo as a, RouteInfo as a0, ScannedNitroTasks as a1, ServerDebugContext as a2, ServerDebugModuleMutationRecord as a3, ServerRouteInfo as a4, ServerRouteInput as a5, ServerRouteInputType as a6, ServerTaskInfo as a7, TabCategory as a8, TerminalAction as a9, TerminalBase as aa, TerminalInfo as ab, VSCodeIntegrationOptions as ac, VSCodeTunnelOptions as ad, VueInspectorClient as ae, VueInspectorData as af, ServerFunctions as b, NuxtDevtoolsNotifyInput as c, AnalyzeBuildsInfo as d, AssetEntry as e, AssetInfo as f, AssetType as g, AutoImportsWithMetadata as h, ClientFunctions as i, ClientUpdateEvent as j, CodeServerOptions as k, CodeServerType as l, CodeSnippet as m, CompatibilityStatus as n, ComponentRelationship as o, ComponentWithRelationships as p, InstallModuleReturn as q, InstalledModuleInfo as r, MaintainerInfo as s, ModuleBuiltinTab as t, ModuleCompatibility as u, ModuleIframeTabLazyOptions as v, ModuleIframeView as w, ModuleLaunchAction as x, ModuleLaunchView as y, ModuleOptions as z };
|
package/dist/types.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { A as AnalyzeBuildMeta,
|
|
1
|
+
import { b as ServerFunctions, c as NuxtDevtoolsNotifyInput, H as HookInfo, P as PluginMetric, L as LoadingTimeMetric } from './shared/devtools-kit.CC-eVeXW.cjs';
|
|
2
|
+
export { A as AnalyzeBuildMeta, d as AnalyzeBuildsInfo, e as AssetEntry, f as AssetInfo, g as AssetType, h as AutoImportsWithMetadata, B as BasicModuleInfo, C as CategorizedTabs, i as ClientFunctions, j as ClientUpdateEvent, k as CodeServerOptions, l as CodeServerType, m as CodeSnippet, n as CompatibilityStatus, o as ComponentRelationship, p as ComponentWithRelationships, G as GitHubContributor, I as ImageMeta, q as InstallModuleReturn, r as InstalledModuleInfo, s as MaintainerInfo, t as ModuleBuiltinTab, u as ModuleCompatibility, M as ModuleCustomTab, v as ModuleIframeTabLazyOptions, w as ModuleIframeView, x as ModuleLaunchAction, y as ModuleLaunchView, z as ModuleOptions, D as ModuleStaticInfo, E as ModuleStats, F as ModuleTabInfo, J as ModuleType, K as ModuleVNodeView, O as ModuleView, Q as NpmCommandOptions, R as NpmCommandType, U as NuxtDevToolsOptions, a as NuxtDevtoolsInfo, V as NuxtDevtoolsNotifyLevel, W as NuxtDevtoolsRpc, N as NuxtDevtoolsServerContext, X as NuxtServerData, Y as PackageManagerName, Z as PackageUpdateInfo, _ as Payload, $ as PluginInfoWithMetic, a0 as RouteInfo, a1 as ScannedNitroTasks, a2 as ServerDebugContext, a3 as ServerDebugModuleMutationRecord, a4 as ServerRouteInfo, a5 as ServerRouteInput, a6 as ServerRouteInputType, a7 as ServerTaskInfo, S as SubprocessOptions, a8 as TabCategory, a9 as TerminalAction, aa as TerminalBase, ab as TerminalInfo, T as TerminalState, ac as VSCodeIntegrationOptions, ad as VSCodeTunnelOptions, ae as VueInspectorClient, af as VueInspectorData } from './shared/devtools-kit.CC-eVeXW.cjs';
|
|
3
|
+
import { DevToolsRpcClient } from '@vitejs/devtools-kit/client';
|
|
3
4
|
import { Hookable } from 'hookable';
|
|
4
5
|
import { NuxtApp } from 'nuxt/app';
|
|
5
6
|
import { AppConfig } from 'nuxt/schema';
|
|
@@ -161,6 +162,29 @@ interface NuxtDevtoolsClient {
|
|
|
161
162
|
};
|
|
162
163
|
renderMarkdown: (markdown: string) => string;
|
|
163
164
|
colorMode: string;
|
|
165
|
+
/**
|
|
166
|
+
* Push a notification through the devframe Messages system.
|
|
167
|
+
*
|
|
168
|
+
* Routes to the shared Messages host, so it surfaces in the Vite DevTools
|
|
169
|
+
* **Messages** dock and/or as a transient toast (when `notify` is set — the
|
|
170
|
+
* default). Use this from custom tabs / in-client code to give feedback
|
|
171
|
+
* through the same notification system as the rest of DevTools.
|
|
172
|
+
*/
|
|
173
|
+
notify: (input: NuxtDevtoolsNotifyInput) => Promise<void>;
|
|
174
|
+
/**
|
|
175
|
+
* The connected Vite DevTools RPC client, mirroring `nuxt.devtools.devtoolsKit`
|
|
176
|
+
* on the server. Use it for full devframe-native access — register client RPC
|
|
177
|
+
* functions (`devtoolsKit.client.register(...)`), call server functions
|
|
178
|
+
* (`devtoolsKit.call(...)`), shared state, streaming, scoping, etc.
|
|
179
|
+
*
|
|
180
|
+
* `undefined` until the DevTools client has connected.
|
|
181
|
+
*/
|
|
182
|
+
devtoolsKit: DevToolsRpcClient | undefined;
|
|
183
|
+
/**
|
|
184
|
+
* @deprecated Use `onDevtoolsReady((kit) => kit.client.register(...))` from
|
|
185
|
+
* `@nuxt/devtools-kit/iframe-client`, or the exposed `devtoolsKit` client
|
|
186
|
+
* directly (`client.devtools.devtoolsKit?.client.register(...)`).
|
|
187
|
+
*/
|
|
164
188
|
extendClientRpc: <ServerFunctions extends object = Record<string, unknown>, ClientFunctions extends object = Record<string, unknown>>(name: string, functions: ClientFunctions) => ServerFunctions;
|
|
165
189
|
}
|
|
166
190
|
interface NuxtDevtoolsIframeClient {
|
|
@@ -171,5 +195,5 @@ interface NuxtDevtoolsGlobal {
|
|
|
171
195
|
setClient: (client: NuxtDevtoolsHostClient) => void;
|
|
172
196
|
}
|
|
173
197
|
|
|
174
|
-
export { HookInfo, LoadingTimeMetric, PluginMetric, ServerFunctions };
|
|
198
|
+
export { HookInfo, LoadingTimeMetric, NuxtDevtoolsNotifyInput, PluginMetric, ServerFunctions };
|
|
175
199
|
export type { AsyncServerFunctions, CodeHighlightOptions, DevToolsFrameState, NuxtDevtoolsClient, NuxtDevtoolsClientHooks, NuxtDevtoolsGlobal, NuxtDevtoolsHostClient, NuxtDevtoolsIframeClient, TimelineEvent, TimelineEventFunction, TimelineEventNormalized, TimelineEventRoute, TimelineEventsSegment, TimelineMetrics, TimelineOptions, TimelineServerState };
|
package/dist/types.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { A as AnalyzeBuildMeta,
|
|
1
|
+
import { b as ServerFunctions, c as NuxtDevtoolsNotifyInput, H as HookInfo, P as PluginMetric, L as LoadingTimeMetric } from './shared/devtools-kit.CC-eVeXW.mjs';
|
|
2
|
+
export { A as AnalyzeBuildMeta, d as AnalyzeBuildsInfo, e as AssetEntry, f as AssetInfo, g as AssetType, h as AutoImportsWithMetadata, B as BasicModuleInfo, C as CategorizedTabs, i as ClientFunctions, j as ClientUpdateEvent, k as CodeServerOptions, l as CodeServerType, m as CodeSnippet, n as CompatibilityStatus, o as ComponentRelationship, p as ComponentWithRelationships, G as GitHubContributor, I as ImageMeta, q as InstallModuleReturn, r as InstalledModuleInfo, s as MaintainerInfo, t as ModuleBuiltinTab, u as ModuleCompatibility, M as ModuleCustomTab, v as ModuleIframeTabLazyOptions, w as ModuleIframeView, x as ModuleLaunchAction, y as ModuleLaunchView, z as ModuleOptions, D as ModuleStaticInfo, E as ModuleStats, F as ModuleTabInfo, J as ModuleType, K as ModuleVNodeView, O as ModuleView, Q as NpmCommandOptions, R as NpmCommandType, U as NuxtDevToolsOptions, a as NuxtDevtoolsInfo, V as NuxtDevtoolsNotifyLevel, W as NuxtDevtoolsRpc, N as NuxtDevtoolsServerContext, X as NuxtServerData, Y as PackageManagerName, Z as PackageUpdateInfo, _ as Payload, $ as PluginInfoWithMetic, a0 as RouteInfo, a1 as ScannedNitroTasks, a2 as ServerDebugContext, a3 as ServerDebugModuleMutationRecord, a4 as ServerRouteInfo, a5 as ServerRouteInput, a6 as ServerRouteInputType, a7 as ServerTaskInfo, S as SubprocessOptions, a8 as TabCategory, a9 as TerminalAction, aa as TerminalBase, ab as TerminalInfo, T as TerminalState, ac as VSCodeIntegrationOptions, ad as VSCodeTunnelOptions, ae as VueInspectorClient, af as VueInspectorData } from './shared/devtools-kit.CC-eVeXW.mjs';
|
|
3
|
+
import { DevToolsRpcClient } from '@vitejs/devtools-kit/client';
|
|
3
4
|
import { Hookable } from 'hookable';
|
|
4
5
|
import { NuxtApp } from 'nuxt/app';
|
|
5
6
|
import { AppConfig } from 'nuxt/schema';
|
|
@@ -161,6 +162,29 @@ interface NuxtDevtoolsClient {
|
|
|
161
162
|
};
|
|
162
163
|
renderMarkdown: (markdown: string) => string;
|
|
163
164
|
colorMode: string;
|
|
165
|
+
/**
|
|
166
|
+
* Push a notification through the devframe Messages system.
|
|
167
|
+
*
|
|
168
|
+
* Routes to the shared Messages host, so it surfaces in the Vite DevTools
|
|
169
|
+
* **Messages** dock and/or as a transient toast (when `notify` is set — the
|
|
170
|
+
* default). Use this from custom tabs / in-client code to give feedback
|
|
171
|
+
* through the same notification system as the rest of DevTools.
|
|
172
|
+
*/
|
|
173
|
+
notify: (input: NuxtDevtoolsNotifyInput) => Promise<void>;
|
|
174
|
+
/**
|
|
175
|
+
* The connected Vite DevTools RPC client, mirroring `nuxt.devtools.devtoolsKit`
|
|
176
|
+
* on the server. Use it for full devframe-native access — register client RPC
|
|
177
|
+
* functions (`devtoolsKit.client.register(...)`), call server functions
|
|
178
|
+
* (`devtoolsKit.call(...)`), shared state, streaming, scoping, etc.
|
|
179
|
+
*
|
|
180
|
+
* `undefined` until the DevTools client has connected.
|
|
181
|
+
*/
|
|
182
|
+
devtoolsKit: DevToolsRpcClient | undefined;
|
|
183
|
+
/**
|
|
184
|
+
* @deprecated Use `onDevtoolsReady((kit) => kit.client.register(...))` from
|
|
185
|
+
* `@nuxt/devtools-kit/iframe-client`, or the exposed `devtoolsKit` client
|
|
186
|
+
* directly (`client.devtools.devtoolsKit?.client.register(...)`).
|
|
187
|
+
*/
|
|
164
188
|
extendClientRpc: <ServerFunctions extends object = Record<string, unknown>, ClientFunctions extends object = Record<string, unknown>>(name: string, functions: ClientFunctions) => ServerFunctions;
|
|
165
189
|
}
|
|
166
190
|
interface NuxtDevtoolsIframeClient {
|
|
@@ -171,5 +195,5 @@ interface NuxtDevtoolsGlobal {
|
|
|
171
195
|
setClient: (client: NuxtDevtoolsHostClient) => void;
|
|
172
196
|
}
|
|
173
197
|
|
|
174
|
-
export { HookInfo, LoadingTimeMetric, PluginMetric, ServerFunctions };
|
|
198
|
+
export { HookInfo, LoadingTimeMetric, NuxtDevtoolsNotifyInput, PluginMetric, ServerFunctions };
|
|
175
199
|
export type { AsyncServerFunctions, CodeHighlightOptions, DevToolsFrameState, NuxtDevtoolsClient, NuxtDevtoolsClientHooks, NuxtDevtoolsGlobal, NuxtDevtoolsHostClient, NuxtDevtoolsIframeClient, TimelineEvent, TimelineEventFunction, TimelineEventNormalized, TimelineEventRoute, TimelineEventsSegment, TimelineMetrics, TimelineOptions, TimelineServerState };
|
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { A as AnalyzeBuildMeta,
|
|
1
|
+
import { b as ServerFunctions, c as NuxtDevtoolsNotifyInput, H as HookInfo, P as PluginMetric, L as LoadingTimeMetric } from './shared/devtools-kit.CC-eVeXW.js';
|
|
2
|
+
export { A as AnalyzeBuildMeta, d as AnalyzeBuildsInfo, e as AssetEntry, f as AssetInfo, g as AssetType, h as AutoImportsWithMetadata, B as BasicModuleInfo, C as CategorizedTabs, i as ClientFunctions, j as ClientUpdateEvent, k as CodeServerOptions, l as CodeServerType, m as CodeSnippet, n as CompatibilityStatus, o as ComponentRelationship, p as ComponentWithRelationships, G as GitHubContributor, I as ImageMeta, q as InstallModuleReturn, r as InstalledModuleInfo, s as MaintainerInfo, t as ModuleBuiltinTab, u as ModuleCompatibility, M as ModuleCustomTab, v as ModuleIframeTabLazyOptions, w as ModuleIframeView, x as ModuleLaunchAction, y as ModuleLaunchView, z as ModuleOptions, D as ModuleStaticInfo, E as ModuleStats, F as ModuleTabInfo, J as ModuleType, K as ModuleVNodeView, O as ModuleView, Q as NpmCommandOptions, R as NpmCommandType, U as NuxtDevToolsOptions, a as NuxtDevtoolsInfo, V as NuxtDevtoolsNotifyLevel, W as NuxtDevtoolsRpc, N as NuxtDevtoolsServerContext, X as NuxtServerData, Y as PackageManagerName, Z as PackageUpdateInfo, _ as Payload, $ as PluginInfoWithMetic, a0 as RouteInfo, a1 as ScannedNitroTasks, a2 as ServerDebugContext, a3 as ServerDebugModuleMutationRecord, a4 as ServerRouteInfo, a5 as ServerRouteInput, a6 as ServerRouteInputType, a7 as ServerTaskInfo, S as SubprocessOptions, a8 as TabCategory, a9 as TerminalAction, aa as TerminalBase, ab as TerminalInfo, T as TerminalState, ac as VSCodeIntegrationOptions, ad as VSCodeTunnelOptions, ae as VueInspectorClient, af as VueInspectorData } from './shared/devtools-kit.CC-eVeXW.js';
|
|
3
|
+
import { DevToolsRpcClient } from '@vitejs/devtools-kit/client';
|
|
3
4
|
import { Hookable } from 'hookable';
|
|
4
5
|
import { NuxtApp } from 'nuxt/app';
|
|
5
6
|
import { AppConfig } from 'nuxt/schema';
|
|
@@ -161,6 +162,29 @@ interface NuxtDevtoolsClient {
|
|
|
161
162
|
};
|
|
162
163
|
renderMarkdown: (markdown: string) => string;
|
|
163
164
|
colorMode: string;
|
|
165
|
+
/**
|
|
166
|
+
* Push a notification through the devframe Messages system.
|
|
167
|
+
*
|
|
168
|
+
* Routes to the shared Messages host, so it surfaces in the Vite DevTools
|
|
169
|
+
* **Messages** dock and/or as a transient toast (when `notify` is set — the
|
|
170
|
+
* default). Use this from custom tabs / in-client code to give feedback
|
|
171
|
+
* through the same notification system as the rest of DevTools.
|
|
172
|
+
*/
|
|
173
|
+
notify: (input: NuxtDevtoolsNotifyInput) => Promise<void>;
|
|
174
|
+
/**
|
|
175
|
+
* The connected Vite DevTools RPC client, mirroring `nuxt.devtools.devtoolsKit`
|
|
176
|
+
* on the server. Use it for full devframe-native access — register client RPC
|
|
177
|
+
* functions (`devtoolsKit.client.register(...)`), call server functions
|
|
178
|
+
* (`devtoolsKit.call(...)`), shared state, streaming, scoping, etc.
|
|
179
|
+
*
|
|
180
|
+
* `undefined` until the DevTools client has connected.
|
|
181
|
+
*/
|
|
182
|
+
devtoolsKit: DevToolsRpcClient | undefined;
|
|
183
|
+
/**
|
|
184
|
+
* @deprecated Use `onDevtoolsReady((kit) => kit.client.register(...))` from
|
|
185
|
+
* `@nuxt/devtools-kit/iframe-client`, or the exposed `devtoolsKit` client
|
|
186
|
+
* directly (`client.devtools.devtoolsKit?.client.register(...)`).
|
|
187
|
+
*/
|
|
164
188
|
extendClientRpc: <ServerFunctions extends object = Record<string, unknown>, ClientFunctions extends object = Record<string, unknown>>(name: string, functions: ClientFunctions) => ServerFunctions;
|
|
165
189
|
}
|
|
166
190
|
interface NuxtDevtoolsIframeClient {
|
|
@@ -171,5 +195,5 @@ interface NuxtDevtoolsGlobal {
|
|
|
171
195
|
setClient: (client: NuxtDevtoolsHostClient) => void;
|
|
172
196
|
}
|
|
173
197
|
|
|
174
|
-
export { HookInfo, LoadingTimeMetric, PluginMetric, ServerFunctions };
|
|
198
|
+
export { HookInfo, LoadingTimeMetric, NuxtDevtoolsNotifyInput, PluginMetric, ServerFunctions };
|
|
175
199
|
export type { AsyncServerFunctions, CodeHighlightOptions, DevToolsFrameState, NuxtDevtoolsClient, NuxtDevtoolsClientHooks, NuxtDevtoolsGlobal, NuxtDevtoolsHostClient, NuxtDevtoolsIframeClient, TimelineEvent, TimelineEventFunction, TimelineEventNormalized, TimelineEventRoute, TimelineEventsSegment, TimelineMetrics, TimelineOptions, TimelineServerState };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/devtools-kit",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "4.0.0-alpha.
|
|
4
|
+
"version": "4.0.0-alpha.8",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://devtools.nuxt.com/module/utils-kit",
|
|
7
7
|
"repository": {
|
|
@@ -41,17 +41,18 @@
|
|
|
41
41
|
"vite": ">=6.0"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@nuxt/kit": "^4.
|
|
45
|
-
"
|
|
44
|
+
"@nuxt/kit": "^4.5.0",
|
|
45
|
+
"nostics": "^1.2.0",
|
|
46
|
+
"tinyexec": "^1.2.4"
|
|
46
47
|
},
|
|
47
48
|
"devDependencies": {
|
|
48
|
-
"@nuxt/schema": "^4.
|
|
49
|
+
"@nuxt/schema": "^4.5.0",
|
|
49
50
|
"birpc": "^4.0.0",
|
|
50
|
-
"error-stack-parser-es": "^
|
|
51
|
+
"error-stack-parser-es": "^2.0.1",
|
|
51
52
|
"hookable": "^6.1.1",
|
|
52
53
|
"unbuild": "^3.6.1",
|
|
53
|
-
"unimport": "^6.3.
|
|
54
|
-
"vue-router": "^5.
|
|
54
|
+
"unimport": "^6.3.1",
|
|
55
|
+
"vue-router": "^5.2.0"
|
|
55
56
|
},
|
|
56
57
|
"scripts": {
|
|
57
58
|
"build": "unbuild",
|