mirror of
https://github.com/vector-im/element-call.git
synced 2026-10-16 23:45:50 +00:00
Set up `sdk/` as a package shaped exactly like `component/`: its own package.json with peer dependencies, the pnpm workspace marker so a host can install it as a git dependency, a build tsconfig for type emission, and a vite lib config with an externals list that `pnpm lint:externals` now checks for both library builds. The package holds only the interface for now. `createRtcSession` returns an empty object; `RtcSession`, `RtcMember`, `MemberMedia` and `TransportMetadata` are the contract Element Call's `CallViewModel` will be rebuilt on (see sdk-plan.md). The shared primitives are re-exported from `src` until the first implementation slice moves them. `sdk/dev` is the smallest consumer of the SDK: a plain page that logs in, joins a room and renders one tile per member, served by `pnpm dev:sdk` on port 3002. Playwright starts it as a third web server, and `playwright/sdk/smoke.spec.ts` has two browsers join one session. It fails on the status line with the SDK's own error until there is an implementation behind the interface. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
15 lines
856 B
YAML
15 lines
856 B
YAML
# Makes `sdk/` a pnpm project of its own rather than a directory inside the
|
|
# repository's workspace. That matters when a host installs the SDK straight
|
|
# from this repository (`github:element-hq/element-call#…&path:/sdk`): pnpm
|
|
# prepares such a dependency by running `pnpm install` in this directory, and
|
|
# only a project root gets its `prepare` script (see package.json) run, which is
|
|
# what builds `dist/`. Inside the repository's own workspace the install would
|
|
# silently target the repository instead and build nothing.
|
|
#
|
|
# Consequence for development: pnpm commands run from within this directory see
|
|
# this project, not the repository; run them from the repository root.
|
|
|
|
# Nothing to install here: the peers in package.json are the host's, and the
|
|
# build runs against the repository's own node_modules (see `prepare`).
|
|
autoInstallPeers: false
|