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
8 changes: 8 additions & 0 deletions e2e/init/init.e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ function withoutConcivDependencies(cloneDir: string): void {
if (!isRecord(section)) continue
manifest[field] = Object.fromEntries(Object.entries(section).filter(([name]) => !name.startsWith('@conciv/')))
}
const dependenciesMeta = manifest['dependenciesMeta']
if (isRecord(dependenciesMeta)) {
const strippedMeta = Object.fromEntries(
Object.entries(dependenciesMeta).filter(([name]) => !name.startsWith('@conciv/')),
)
if (Object.keys(strippedMeta).length === 0) delete manifest['dependenciesMeta']
else manifest['dependenciesMeta'] = strippedMeta
}
writeFileSync(manifestPath, `${JSON.stringify(manifest, null, 2)}\n`)
}

Expand Down
11 changes: 11 additions & 0 deletions e2e/nextjs-component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,16 @@
"@types/react": "^19",
"@types/react-dom": "^19",
"typescript": "^5"
},
"dependenciesMeta": {
"@conciv/extension-terminal": {
"injected": true
},
"@conciv/it": {
"injected": true
},
"@conciv/react": {
"injected": true
}
}
}
7 changes: 1 addition & 6 deletions e2e/nextjs-component/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,5 @@ import {e2eConfig} from '@conciv/e2e-utils/config'

export default e2eConfig('nextjs-component', {
command: (port) =>
[
'DEPLOY_DIR="$(mktemp -d)/app"',
`pnpm --filter conciv-e2e-nextjs-component deploy --legacy --prod=false "$DEPLOY_DIR"`,
`cd "$DEPLOY_DIR"`,
`pnpm exec next dev --port ${port}`,
].join(' && '),
`pnpm --filter @conciv/it --filter @conciv/react --filter @conciv/extension-terminal run build && pnpm exec next dev --port ${port}`,
})
5 changes: 5 additions & 0 deletions e2e/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,10 @@
"@types/react-dom": "^19",
"tsx": "^4.22.4",
"typescript": "^5"
},
"dependenciesMeta": {
"@conciv/it": {
"injected": true
}
}
}
8 changes: 1 addition & 7 deletions e2e/nextjs/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
import {e2eConfig} from '@conciv/e2e-utils/config'

export default e2eConfig('nextjs', {
command: (port) =>
[
'DEPLOY_DIR="$(mktemp -d)/app"',
`pnpm --filter conciv-e2e-nextjs deploy --legacy --prod=false "$DEPLOY_DIR"`,
`cd "$DEPLOY_DIR"`,
`pnpm exec next dev --port ${port}`,
].join(' && '),
command: (port) => `pnpm --filter @conciv/it run build && pnpm exec next dev --port ${port}`,
})
11 changes: 10 additions & 1 deletion e2e/nextjs/tests/widget.spec.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
import {test} from '@playwright/test'
import {expect, test} from '@playwright/test'
import {collectFailures, expectWidgetBoots} from '@conciv/e2e-utils/widget'

test('widget boots from dist in a nextjs app', async ({page}) => {
const failures = collectFailures(page)
await page.goto('/', {waitUntil: 'domcontentloaded'})
await expectWidgetBoots(page, failures)
})

test('the terminal builtin server extension loaded and can hand back a real connect command', async ({page}) => {
const failures = collectFailures(page)
await page.goto('/', {waitUntil: 'domcontentloaded'})
await expectWidgetBoots(page, failures)
await page.getByRole('button', {name: /Terminal options for/}).click()
await page.getByRole('menuitem', {name: 'Copy command'}).click()
await expect(page.getByText(/--mcp-config/)).toBeVisible()
})
293 changes: 195 additions & 98 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ packages:
- apps/examples/*
- e2e/*

syncInjectedDepsAfterScripts:
- build

# @orpc peer-pins every sibling package to the identical version (tanstack-query@1.15.0
# peer-requires client@1.15.0 exactly), so a caret range is unsafe on any fresh install:
# it can resolve two different @orpc releases and split the pair. Single-sourcing the
Expand Down
Loading