Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
406 changes: 203 additions & 203 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

16 changes: 2 additions & 14 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ allowBuilds:
vue-demi: true

refs:
devframe: &devframe ^0.9.2
devframe: &devframe ^0.9.4
# Nuxt 5 nightly. Its own `@nuxt/vite-builder-nightly` already requires
# `vite@^8.1.5`, so this and the `vite` ref below move together.
#
Expand All @@ -64,7 +64,7 @@ refs:
shiki: &shiki ^4.4.3
unocss: &unocss ^66.7.5
vite: &vite ^8.2.1
vite-devtools: &vite-devtools ^0.5.0
vite-devtools: &vite-devtools ^0.5.1
vue: &vue ^3.5.41
vueuse: &vueuse ^14.4.0
overrides:
Expand All @@ -84,25 +84,13 @@ overrides:
chokidar: ^5.0.0
devframe: *devframe
esbuild: ^0.28.2
# `unplugin-vue-markdown@32.0.0` depends on its own `markdown-exit
# ^1.0.0-beta.9`, a different prerelease tuple than the `^1.1.0-beta.2`
# `packages/devtools` depends on directly — semver won't let one satisfy
# the other, so without this override pnpm resolves and ships two copies
# of the engine. Force both onto the version this workspace uses directly.
markdown-exit: ^1.1.0-beta.2
rollup: ^4.62.4
semver: ^7.8.5
typescript: ^6.0.3
unimport: ^6.4.0
vite: *vite
vue: *vue
# `@nuxt/module-builder@1.0.3` bundles `mkdist@2.4.1`, whose own
# `vue-sfc-transformer` dependency is pinned to `^0.1.17` — but
# `resolutionMode: highest` otherwise hoists mkdist's copy up to
# `@nuxt/module-builder`'s own newer `^0.2.3` want, and mkdist's `.vue`
# transform silently breaks under that mismatch (it wrote compiled output
# into `packages/devtools/src/runtime/**` instead of `dist/`, clobbering
# `auth/index.html` in the process). Pin to what mkdist itself needs.
vue-sfc-transformer: ^0.2.5
vue-tsc: ^3.3.10
catalogs:
Expand Down
6 changes: 3 additions & 3 deletions tests/e2e/fixtures/devtools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@
{ timeout: 30_000 },
)
await page.waitForFunction(
() => Boolean((globalThis as any).__VITE_DEVTOOLS_CLIENT_CONTEXT__?.rpc),
() => Boolean((globalThis as any).__DEVFRAME_HUB_CLIENT_CONTEXT__?.rpc),
null,
{ timeout: 30_000 },
)
await page.evaluate(() => {
const ctx = (globalThis as any).__VITE_DEVTOOLS_CLIENT_CONTEXT__
const ctx = (globalThis as any).__DEVFRAME_HUB_CLIENT_CONTEXT__
if (ctx?.rpc && !ctx.rpc.isTrusted)
ctx.rpc.events?.emit?.('rpc:is-trusted:updated', true)
})
await page.waitForFunction(
() => Boolean((globalThis as any).__VITE_DEVTOOLS_CLIENT_CONTEXT__?.docks?.entries?.length),
() => Boolean((globalThis as any).__DEVFRAME_HUB_CLIENT_CONTEXT__?.docks?.entries?.length),
null,
{ timeout: 30_000 },
)
Expand All @@ -63,7 +63,7 @@
// Wait for the client app inside the iframe to hydrate.
await page.frameLocator(IFRAME_SELECTOR)
.locator('#nuxt-devtools-app')
.waitFor({ state: 'attached', timeout: 60_000 })

Check failure on line 66 in tests/e2e/fixtures/devtools.ts

View workflow job for this annotation

GitHub Actions / e2e

[empty:dev] › tests/e2e/specs/tabs.spec.ts:22:5 › main tabs › Overview renders its content

5) [empty:dev] › tests/e2e/specs/tabs.spec.ts:22:5 › main tabs › Overview renders its content ──── Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── TimeoutError: locator.waitFor: Timeout 60000ms exceeded. Call log: - waiting for locator('iframe[src*="__nuxt_devtools__/client"]').contentFrame().locator('#nuxt-devtools-app') at ../fixtures/devtools.ts:66 64 | await page.frameLocator(IFRAME_SELECTOR) 65 | .locator('#nuxt-devtools-app') > 66 | .waitFor({ state: 'attached', timeout: 60_000 }) | ^ 67 | }) 68 | }, 69 | at /home/runner/work/devtools/devtools/tests/e2e/fixtures/devtools.ts:66:10 at /home/runner/work/devtools/devtools/tests/e2e/specs/tabs.spec.ts:24:7

Check failure on line 66 in tests/e2e/fixtures/devtools.ts

View workflow job for this annotation

GitHub Actions / e2e

[empty:dev] › tests/e2e/specs/tabs.spec.ts:22:5 › main tabs › Overview renders its content

5) [empty:dev] › tests/e2e/specs/tabs.spec.ts:22:5 › main tabs › Overview renders its content ──── TimeoutError: locator.waitFor: Timeout 60000ms exceeded. Call log: - waiting for locator('iframe[src*="__nuxt_devtools__/client"]').contentFrame().locator('#nuxt-devtools-app') at ../fixtures/devtools.ts:66 64 | await page.frameLocator(IFRAME_SELECTOR) 65 | .locator('#nuxt-devtools-app') > 66 | .waitFor({ state: 'attached', timeout: 60_000 }) | ^ 67 | }) 68 | }, 69 | at /home/runner/work/devtools/devtools/tests/e2e/fixtures/devtools.ts:66:10 at /home/runner/work/devtools/devtools/tests/e2e/specs/tabs.spec.ts:24:7

Check failure on line 66 in tests/e2e/fixtures/devtools.ts

View workflow job for this annotation

GitHub Actions / e2e

[empty:dev] › tests/e2e/specs/devtools.spec.ts:18:1 › registers a single Nuxt entry (no duplicate from the SSR Vite context)

4) [empty:dev] › tests/e2e/specs/devtools.spec.ts:18:1 › registers a single Nuxt entry (no duplicate from the SSR Vite context) Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── TimeoutError: locator.waitFor: Timeout 60000ms exceeded. Call log: - waiting for locator('iframe[src*="__nuxt_devtools__/client"]').contentFrame().locator('#nuxt-devtools-app') at ../fixtures/devtools.ts:66 64 | await page.frameLocator(IFRAME_SELECTOR) 65 | .locator('#nuxt-devtools-app') > 66 | .waitFor({ state: 'attached', timeout: 60_000 }) | ^ 67 | }) 68 | }, 69 | at /home/runner/work/devtools/devtools/tests/e2e/fixtures/devtools.ts:66:10 at /home/runner/work/devtools/devtools/tests/e2e/specs/devtools.spec.ts:20:3

Check failure on line 66 in tests/e2e/fixtures/devtools.ts

View workflow job for this annotation

GitHub Actions / e2e

[empty:dev] › tests/e2e/specs/devtools.spec.ts:18:1 › registers a single Nuxt entry (no duplicate from the SSR Vite context)

4) [empty:dev] › tests/e2e/specs/devtools.spec.ts:18:1 › registers a single Nuxt entry (no duplicate from the SSR Vite context) TimeoutError: locator.waitFor: Timeout 60000ms exceeded. Call log: - waiting for locator('iframe[src*="__nuxt_devtools__/client"]').contentFrame().locator('#nuxt-devtools-app') at ../fixtures/devtools.ts:66 64 | await page.frameLocator(IFRAME_SELECTOR) 65 | .locator('#nuxt-devtools-app') > 66 | .waitFor({ state: 'attached', timeout: 60_000 }) | ^ 67 | }) 68 | }, 69 | at /home/runner/work/devtools/devtools/tests/e2e/fixtures/devtools.ts:66:10 at /home/runner/work/devtools/devtools/tests/e2e/specs/devtools.spec.ts:20:3

Check failure on line 66 in tests/e2e/fixtures/devtools.ts

View workflow job for this annotation

GitHub Actions / e2e

[empty:dev] › tests/e2e/specs/devtools.spec.ts:7:1 › opens from the host app and renders the client chromelessly

3) [empty:dev] › tests/e2e/specs/devtools.spec.ts:7:1 › opens from the host app and renders the client chromelessly Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── TimeoutError: locator.waitFor: Timeout 60000ms exceeded. Call log: - waiting for locator('iframe[src*="__nuxt_devtools__/client"]').contentFrame().locator('#nuxt-devtools-app') at ../fixtures/devtools.ts:66 64 | await page.frameLocator(IFRAME_SELECTOR) 65 | .locator('#nuxt-devtools-app') > 66 | .waitFor({ state: 'attached', timeout: 60_000 }) | ^ 67 | }) 68 | }, 69 | at /home/runner/work/devtools/devtools/tests/e2e/fixtures/devtools.ts:66:10 at /home/runner/work/devtools/devtools/tests/e2e/specs/devtools.spec.ts:9:3

Check failure on line 66 in tests/e2e/fixtures/devtools.ts

View workflow job for this annotation

GitHub Actions / e2e

[empty:dev] › tests/e2e/specs/devtools.spec.ts:7:1 › opens from the host app and renders the client chromelessly

3) [empty:dev] › tests/e2e/specs/devtools.spec.ts:7:1 › opens from the host app and renders the client chromelessly TimeoutError: locator.waitFor: Timeout 60000ms exceeded. Call log: - waiting for locator('iframe[src*="__nuxt_devtools__/client"]').contentFrame().locator('#nuxt-devtools-app') at ../fixtures/devtools.ts:66 64 | await page.frameLocator(IFRAME_SELECTOR) 65 | .locator('#nuxt-devtools-app') > 66 | .waitFor({ state: 'attached', timeout: 60_000 }) | ^ 67 | }) 68 | }, 69 | at /home/runner/work/devtools/devtools/tests/e2e/fixtures/devtools.ts:66:10 at /home/runner/work/devtools/devtools/tests/e2e/specs/devtools.spec.ts:9:3

Check failure on line 66 in tests/e2e/fixtures/devtools.ts

View workflow job for this annotation

GitHub Actions / e2e

[empty:dev] › tests/e2e/specs/data-inspector.spec.ts:21:1 › exposes the live Nuxt application as a data source and hides the demo source

2) [empty:dev] › tests/e2e/specs/data-inspector.spec.ts:21:1 › exposes the live Nuxt application as a data source and hides the demo source Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── TimeoutError: locator.waitFor: Timeout 60000ms exceeded. Call log: - waiting for locator('iframe[src*="__nuxt_devtools__/client"]').contentFrame().locator('#nuxt-devtools-app') at ../fixtures/devtools.ts:66 64 | await page.frameLocator(IFRAME_SELECTOR) 65 | .locator('#nuxt-devtools-app') > 66 | .waitFor({ state: 'attached', timeout: 60_000 }) | ^ 67 | }) 68 | }, 69 | at /home/runner/work/devtools/devtools/tests/e2e/fixtures/devtools.ts:66:10 at /home/runner/work/devtools/devtools/tests/e2e/specs/data-inspector.spec.ts:23:3

Check failure on line 66 in tests/e2e/fixtures/devtools.ts

View workflow job for this annotation

GitHub Actions / e2e

[empty:dev] › tests/e2e/specs/data-inspector.spec.ts:21:1 › exposes the live Nuxt application as a data source and hides the demo source

2) [empty:dev] › tests/e2e/specs/data-inspector.spec.ts:21:1 › exposes the live Nuxt application as a data source and hides the demo source TimeoutError: locator.waitFor: Timeout 60000ms exceeded. Call log: - waiting for locator('iframe[src*="__nuxt_devtools__/client"]').contentFrame().locator('#nuxt-devtools-app') at ../fixtures/devtools.ts:66 64 | await page.frameLocator(IFRAME_SELECTOR) 65 | .locator('#nuxt-devtools-app') > 66 | .waitFor({ state: 'attached', timeout: 60_000 }) | ^ 67 | }) 68 | }, 69 | at /home/runner/work/devtools/devtools/tests/e2e/fixtures/devtools.ts:66:10 at /home/runner/work/devtools/devtools/tests/e2e/specs/data-inspector.spec.ts:23:3

Check failure on line 66 in tests/e2e/fixtures/devtools.ts

View workflow job for this annotation

GitHub Actions / e2e

[empty:dev] › tests/e2e/specs/code-server.spec.ts:7:1 › reports a missing editor binary without starting a process

1) [empty:dev] › tests/e2e/specs/code-server.spec.ts:7:1 › reports a missing editor binary without starting a process Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── TimeoutError: locator.waitFor: Timeout 60000ms exceeded. Call log: - waiting for locator('iframe[src*="__nuxt_devtools__/client"]').contentFrame().locator('#nuxt-devtools-app') at ../fixtures/devtools.ts:66 64 | await page.frameLocator(IFRAME_SELECTOR) 65 | .locator('#nuxt-devtools-app') > 66 | .waitFor({ state: 'attached', timeout: 60_000 }) | ^ 67 | }) 68 | }, 69 | at /home/runner/work/devtools/devtools/tests/e2e/fixtures/devtools.ts:66:10 at /home/runner/work/devtools/devtools/tests/e2e/specs/code-server.spec.ts:13:3

Check failure on line 66 in tests/e2e/fixtures/devtools.ts

View workflow job for this annotation

GitHub Actions / e2e

[empty:dev] › tests/e2e/specs/code-server.spec.ts:7:1 › reports a missing editor binary without starting a process

1) [empty:dev] › tests/e2e/specs/code-server.spec.ts:7:1 › reports a missing editor binary without starting a process TimeoutError: locator.waitFor: Timeout 60000ms exceeded. Call log: - waiting for locator('iframe[src*="__nuxt_devtools__/client"]').contentFrame().locator('#nuxt-devtools-app') at ../fixtures/devtools.ts:66 64 | await page.frameLocator(IFRAME_SELECTOR) 65 | .locator('#nuxt-devtools-app') > 66 | .waitFor({ state: 'attached', timeout: 60_000 }) | ^ 67 | }) 68 | }, 69 | at /home/runner/work/devtools/devtools/tests/e2e/fixtures/devtools.ts:66:10 at /home/runner/work/devtools/devtools/tests/e2e/specs/code-server.spec.ts:13:3
})
},

Expand Down
14 changes: 7 additions & 7 deletions tests/e2e/specs/code-server.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ test('reports a missing editor binary without starting a process', async ({ page
await openDevTools()

await page.waitForFunction((id) => {
const ctx = (globalThis as any).__VITE_DEVTOOLS_CLIENT_CONTEXT__
const ctx = (globalThis as any).__DEVFRAME_HUB_CLIENT_CONTEXT__
return ctx?.docks?.entries?.some((entry: any) => entry.id === id)
}, CODE_SERVER_DOCK_ID, { timeout: 30_000 })

// Open the Code Server member the way a user would.
await page.evaluate(async (id) => {
const ctx = (globalThis as any).__VITE_DEVTOOLS_CLIENT_CONTEXT__
const ctx = (globalThis as any).__DEVFRAME_HUB_CLIENT_CONTEXT__
await ctx.docks.switchEntry(id)
}, CODE_SERVER_DOCK_ID)

Expand All @@ -30,7 +30,7 @@ test('reports a missing editor binary without starting a process', async ({ page

// Opening the member performs detection only — it must not launch a process.
const status = await page.evaluate(async (rpcName) => {
const ctx = (globalThis as any).__VITE_DEVTOOLS_CLIENT_CONTEXT__
const ctx = (globalThis as any).__DEVFRAME_HUB_CLIENT_CONTEXT__
return ctx.rpc.call(rpcName)
}, CODE_SERVER_STATUS_RPC)
expect((status as any).server.status).toBe('stopped')
Expand All @@ -45,20 +45,20 @@ test('launches an installed Code Server with authenticated iframe handoff', asyn
await page.goto('/')
await openDevTools()
await page.waitForFunction((id) => {
const ctx = (globalThis as any).__VITE_DEVTOOLS_CLIENT_CONTEXT__
const ctx = (globalThis as any).__DEVFRAME_HUB_CLIENT_CONTEXT__
return ctx?.docks?.entries?.some((entry: any) => entry.id === id)
}, CODE_SERVER_DOCK_ID, { timeout: 30_000 })

await page.evaluate(async (id) => {
const ctx = (globalThis as any).__VITE_DEVTOOLS_CLIENT_CONTEXT__
const ctx = (globalThis as any).__DEVFRAME_HUB_CLIENT_CONTEXT__
await ctx.docks.switchEntry(id)
}, CODE_SERVER_DOCK_ID)
const launcher = page.frameLocator(`iframe[src*="${CODE_SERVER_DOCK_ID}"]`)
await launcher.getByRole('button', { name: 'Launch editor' }).click()

await expect.poll(async () => {
return page.evaluate(async (rpcName) => {
const ctx = (globalThis as any).__VITE_DEVTOOLS_CLIENT_CONTEXT__
const ctx = (globalThis as any).__DEVFRAME_HUB_CLIENT_CONTEXT__
return ctx.rpc.call(rpcName)
}, CODE_SERVER_STATUS_RPC)
}, { timeout: 60_000 }).toMatchObject({
Expand All @@ -67,7 +67,7 @@ test('launches an installed Code Server with authenticated iframe handoff', asyn
})

const runningStatus = await page.evaluate(async (rpcName) => {
const ctx = (globalThis as any).__VITE_DEVTOOLS_CLIENT_CONTEXT__
const ctx = (globalThis as any).__DEVFRAME_HUB_CLIENT_CONTEXT__
return ctx.rpc.call(rpcName)
}, CODE_SERVER_STATUS_RPC) as any
const serverPort = String(runningStatus.server.port)
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/specs/data-inspector.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const EXAMPLE_SOURCE_ID = 'devframes:plugin:data-inspector:example'

async function inspectorSources(page: any): Promise<string[]> {
return page.evaluate(async () => {
const ctx = (globalThis as any).__VITE_DEVTOOLS_CLIENT_CONTEXT__
const ctx = (globalThis as any).__DEVFRAME_HUB_CLIENT_CONTEXT__
const sources = await ctx.rpc.call('devframes:plugin:data-inspector:sources')
return (sources as { id: string }[]).map(s => s.id)
})
Expand All @@ -29,7 +29,7 @@ test('exposes the live Nuxt application as a data source and hides the demo sour

// Querying the live source returns data (the integration is wired end to end).
const results = await page.evaluate(async (sourceId) => {
const ctx = (globalThis as any).__VITE_DEVTOOLS_CLIENT_CONTEXT__
const ctx = (globalThis as any).__DEVFRAME_HUB_CLIENT_CONTEXT__
const nuxt = await ctx.rpc.call('devframes:plugin:data-inspector:query', sourceId, 'nuxt')
const vite = await ctx.rpc.call('devframes:plugin:data-inspector:query', sourceId, 'vite')
return { nuxt, vite }
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/specs/devtools.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ test('registers a single Nuxt entry (no duplicate from the SSR Vite context)', a
// group. There is no user-visible proxy for "how many groups registered", so
// this is the one place we read the dock registry — kept to a single count.
const nuxtGroups = await page.evaluate(() => {
const ctx = (globalThis as any).__VITE_DEVTOOLS_CLIENT_CONTEXT__
const ctx = (globalThis as any).__DEVFRAME_HUB_CLIENT_CONTEXT__
return ctx.docks.entries.filter((entry: any) => entry.id === 'nuxt').length
})
expect(nuxtGroups).toBe(1)
Expand Down
Loading