Skip to content

Commit 14185da

Browse files
committed
Merge branch 'main' into feat/auth
2 parents f760713 + 2468941 commit 14185da

File tree

21 files changed

+874
-1048
lines changed

21 files changed

+874
-1048
lines changed

docs/kit/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ declare module '@vitejs/devtools-kit' {
374374

375375
### Call Client Functions from Server
376376

377-
To call client-side functions from the server, use `ctx.rpc.boardcast()` (note: the method name is `boardcast`, which broadcasts to all connected clients):
377+
To call client-side functions from the server, use `ctx.rpc.broadcast()` (note: the method name is `broadcast`, which broadcasts to all connected clients):
378378

379379
```ts {6-10}
380380
export default function myPlugin(): Plugin {
@@ -383,7 +383,7 @@ export default function myPlugin(): Plugin {
383383
devtools: {
384384
setup(ctx) {
385385
// Broadcast to all connected clients
386-
ctx.rpc.boardcast('my-plugin:client-update', {
386+
ctx.rpc.broadcast('my-plugin:client-update', {
387387
message: 'Hello from server!'
388388
})
389389
},
@@ -392,7 +392,7 @@ export default function myPlugin(): Plugin {
392392
}
393393
```
394394

395-
The `boardcast` method returns a promise that resolves to an array of results from all clients (some may be `undefined` if the client doesn't implement the function).
395+
The `broadcast` method returns a promise that resolves to an array of results from all clients (some may be `undefined` if the client doesn't implement the function).
396396

397397
**Example: Broadcasting dock updates**
398398

@@ -401,7 +401,7 @@ Here's a real-world example of how the built-in docks system broadcasts updates:
401401
```ts
402402
// When a dock entry is updated, broadcast to all clients
403403
docksHost.events.on('dock:entry:updated', () => {
404-
rpcHost.boardcast('vite:internal:docks:updated')
404+
rpcHost.broadcast('vite:internal:docks:updated')
405405
})
406406
```
407407

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"type": "module",
33
"version": "0.0.0-alpha.20",
44
"private": true,
5-
"packageManager": "pnpm@10.25.0",
5+
"packageManager": "pnpm@10.26.1",
66
"scripts": {
77
"build": "pnpm -r run build",
88
"build:debug": "NUXT_DEBUG_BUILD=true pnpm -r run build",
@@ -56,15 +56,18 @@
5656
"nuxt-eslint-auto-explicit-import": "catalog:devtools",
5757
"p-limit": "catalog:deps",
5858
"simple-git-hooks": "catalog:devtools",
59+
"tsdown": "catalog:build",
5960
"tsx": "catalog:build",
6061
"typescript": "catalog:devtools",
6162
"unstorage": "catalog:deps",
6263
"vite": "catalog:build",
6364
"vite-plugin-inspect": "catalog:devtools",
6465
"vite-plugin-vue-tracer": "catalog:playground",
6566
"vitest": "catalog:testing",
67+
"vitest-package-exports": "catalog:testing",
6668
"vue": "catalog:frontend",
67-
"vue-tsc": "catalog:devtools"
69+
"vue-tsc": "catalog:devtools",
70+
"yaml": "catalog:testing"
6871
},
6972
"resolutions": {
7073
"@jridgewell/sourcemap-codec": "catalog:resolutions",

packages/core/src/node/__tests__/registration-safety.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ describe('registration Safety Integration Tests', () => {
2121
command: 'build',
2222
plugins: [],
2323
} as unknown as ResolvedConfig)
24-
ctx.rpc.boardcast = vi.fn()
24+
ctx.rpc.broadcast = vi.fn()
2525
return ctx
2626
}
2727

packages/core/src/node/context.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@ export async function createDevToolsContext(
4646

4747
// Register hosts side effects
4848
docksHost.events.on('dock:entry:updated', debounce(() => {
49-
rpcHost.boardcast('vite:internal:docks:updated')
49+
rpcHost.broadcast('vite:internal:docks:updated')
5050
}, 10))
5151
terminalsHost.events.on('terminal:session:updated', debounce(() => {
52-
rpcHost.boardcast('vite:internal:terminals:updated')
52+
rpcHost.broadcast('vite:internal:terminals:updated')
5353
// New terminals might affect the visibility of the terminals dock entry, we trigger it here as well
54-
rpcHost.boardcast('vite:internal:docks:updated')
54+
rpcHost.broadcast('vite:internal:docks:updated')
5555
}, 10))
5656
terminalsHost.events.on('terminal:session:stream-chunk', (data) => {
57-
rpcHost.boardcast('vite:internal:terminals:stream-chunk', data)
57+
rpcHost.broadcast('vite:internal:terminals:stream-chunk', data)
5858
})
5959

6060
// Register plugins

packages/core/src/node/host-functions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export class RpcFunctionsHost extends RpcFunctionsCollectorBase<DevToolsRpcServe
1414
super(context)
1515
}
1616

17-
boardcast<
17+
broadcast<
1818
T extends keyof DevToolsRpcClientFunctions,
1919
Args extends Parameters<DevToolsRpcClientFunctions[T]>,
2020
>(

packages/kit/src/types/rpc.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export type RpcFunctionsHost = RpcFunctionsCollectorBase<DevToolsRpcServerFuncti
2020
/**
2121
* Broadcast a message to all connected clients
2222
*/
23-
boardcast: <
23+
broadcast: <
2424
T extends keyof DevToolsRpcClientFunctions,
2525
Args extends Parameters<DevToolsRpcClientFunctions[T]>,
2626
>(

packages/vite/src/app/components/chunks/Graph.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<script setup lang="ts">
22
import type { ChunkImport } from '@rolldown/debug'
33
import type { RolldownChunkInfo, SessionContext } from '~~/shared/types/data'
4-
import type { ModuleGraphLink, ModuleGraphNode } from '~/composables/moduleGraph'
4+
import type { ModuleGraphLink, ModuleGraphNode } from '~/composables/module-graph'
55
import { useRoute } from '#app/composables/router'
66
import { computed, nextTick, unref } from 'vue'
7-
import { createModuleGraph } from '~/composables/moduleGraph'
7+
import { createModuleGraph } from '~/composables/module-graph'
88
99
type ChunkInfo = RolldownChunkInfo & {
1010
id: string

packages/vite/src/app/components/data/AssetRelationships.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<script setup lang="ts">
22
import type { HierarchyNode } from 'd3-hierarchy'
33
import type { RolldownAssetInfo } from '~~/shared/types'
4-
import type { ModuleGraphLink, ModuleGraphNode } from '~/composables/moduleGraph'
4+
import type { ModuleGraphLink, ModuleGraphNode } from '~/composables/module-graph'
55
import { computed, onMounted, shallowRef, useTemplateRef, watch } from 'vue'
6-
import { generateModuleGraphLink, getModuleGraphLinkColor } from '~/composables/moduleGraph'
6+
import { generateModuleGraphLink, getModuleGraphLinkColor } from '~/composables/module-graph'
77
88
const props = defineProps<{
99
importers?: RolldownAssetInfo[]

packages/vite/src/app/components/data/ModuleImportRelationships.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<script setup lang="ts">
22
import type { HierarchyNode } from 'd3-hierarchy'
33
import type { ModuleImport, ModuleInfo, ModuleListItem, SessionContext } from '~~/shared/types'
4-
import type { ModuleGraphLink, ModuleGraphNode } from '~/composables/moduleGraph'
4+
import type { ModuleGraphLink, ModuleGraphNode } from '~/composables/module-graph'
55
import { computed, onMounted, shallowRef, useTemplateRef, watch } from 'vue'
6-
import { generateModuleGraphLink, getModuleGraphLinkColor } from '~/composables/moduleGraph'
6+
import { generateModuleGraphLink, getModuleGraphLinkColor } from '~/composables/module-graph'
77
88
const props = defineProps<{
99
module: ModuleInfo

packages/vite/src/app/components/display/ModuleGraph.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script setup lang="ts" generic="T extends { id: string, imports: unknown[] }, I">
22
import type { SessionContext } from '~~/shared/types'
33
import { onMounted, unref, watch } from 'vue'
4-
import { generateModuleGraphLink, getModuleGraphLinkColor, useGraphDraggingScroll, useGraphZoom, useModuleGraph, useToggleGraphNodeExpanded } from '~/composables/moduleGraph'
4+
import { generateModuleGraphLink, getModuleGraphLinkColor, useGraphDraggingScroll, useGraphZoom, useModuleGraph, useToggleGraphNodeExpanded } from '~/composables/module-graph'
55
66
const props = withDefaults(defineProps<{
77
modules: T[]

0 commit comments

Comments
 (0)