mirror of
https://github.com/element-hq/element-call.git
synced 2026-10-06 08:07:17 +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>
67 lines
2.3 KiB
JSON
67 lines
2.3 KiB
JSON
{
|
|
"compilerOptions": {
|
|
"target": "es2022",
|
|
"module": "es2022",
|
|
"jsx": "react-jsx",
|
|
"lib": ["es2024", "dom", "dom.iterable"],
|
|
"skipLibCheck": true,
|
|
|
|
// From Matrix-JS-SDK
|
|
"strict": true,
|
|
"noEmit": true,
|
|
"noEmitOnError": true,
|
|
"experimentalDecorators": false,
|
|
"esModuleInterop": true,
|
|
"noUnusedLocals": true,
|
|
"moduleResolution": "bundler",
|
|
"declaration": true,
|
|
"resolveJsonModule": true,
|
|
// Workaround for https://github.com/microsoft/TypeScript/issues/55132
|
|
"useDefineForClassFields": false,
|
|
"allowImportingTsExtensions": true,
|
|
"paths": {
|
|
// Element Call imports the SDK by its package name, so that the move to a
|
|
// published dependency changes nothing but this line (and the matching
|
|
// alias in vite.config.ts)
|
|
"@element-hq/matrixrtc-sdk": ["./sdk/index.ts"],
|
|
// These imports within @livekit/components-core and
|
|
// @livekit/components-react are broken under the "bundler" module
|
|
// resolution mode, so we need to resolve them manually
|
|
"livekit-client/dist/src/room/types": [
|
|
"./node_modules/livekit-client/dist/src/room/types.d.ts"
|
|
],
|
|
"livekit-client/dist/src/room/Room": [
|
|
"./node_modules/livekit-client/dist/src/room/Room.d.ts"
|
|
],
|
|
"livekit-client/dist/src/room/track/TrackPublication": [
|
|
"./node_modules/livekit-client/dist/src/room/track/TrackPublication.d.ts"
|
|
],
|
|
"livekit-client/dist/src/room/participant/Participant": [
|
|
"./node_modules/livekit-client/dist/src/room/participant/Participant.d.ts"
|
|
],
|
|
"livekit-client/dist/src/proto/livekit_models_pb": [
|
|
"./node_modules/@livekit/protocol/src/gen/livekit_models_pb.d.ts"
|
|
]
|
|
}
|
|
|
|
// TODO: Enable the following options later.
|
|
// "forceConsistentCasingInFileNames": true,
|
|
// "noFallthroughCasesInSwitch": true,
|
|
// "noImplicitOverride": true,
|
|
// "noImplicitReturns": true,
|
|
// "noPropertyAccessFromIndexSignature": true,
|
|
// "noUncheckedIndexedAccess": true,
|
|
// "noUnusedParameters": true,
|
|
},
|
|
"include": [
|
|
"./src/**/*.ts",
|
|
"./src/**/*.tsx",
|
|
"./playwright/**/*.ts",
|
|
"./sdk/**/*.ts",
|
|
"./sdk-target-based-on-call-view-model/**/*.ts",
|
|
"./component/**/*.ts",
|
|
"./component/**/*.tsx"
|
|
],
|
|
"exclude": ["**.test.ts"]
|
|
}
|