From a852e90b96fc511c77857786d3db6bd677f5f286 Mon Sep 17 00:00:00 2001 From: Kamil Stasiak Date: Wed, 14 Feb 2024 14:46:01 +0100 Subject: [PATCH 1/9] Update membrane-webrtc-js --- .../package-lock.json | 15 +- .../package.json | 3 +- .../src/jellyfishSetup.tsx | 27 ++- package-lock.json | 194 ++---------------- package.json | 2 +- src/api.tsx | 22 +- src/create.tsx | 24 ++- src/experimental/create.tsx | 6 +- src/index.ts | 57 ++++- src/reducer.tsx | 94 ++++----- src/state.ts | 6 +- src/state.types.ts | 27 ++- src/stateMappers.tsx | 90 +++++--- src/ts-client-sdk/index.ts | 20 ++ src/useMedia/index.tsx | 35 ++-- src/useMedia/types.ts | 18 +- yarn.lock | 143 +------------ 17 files changed, 298 insertions(+), 485 deletions(-) create mode 100644 src/ts-client-sdk/index.ts diff --git a/examples/use-camera-and-microphone-example/package-lock.json b/examples/use-camera-and-microphone-example/package-lock.json index cb718f7..346b5a8 100644 --- a/examples/use-camera-and-microphone-example/package-lock.json +++ b/examples/use-camera-and-microphone-example/package-lock.json @@ -12,7 +12,8 @@ "@jellyfish-dev/react-client-sdk": "file:../..", "jotai": "^2.6.0", "react": "^18.2.0", - "react-dom": "^18.2.0" + "react-dom": "^18.2.0", + "zod": "^3.22.4" }, "devDependencies": { "@tailwindcss/typography": "^0.5.10", @@ -29,10 +30,10 @@ }, "../..": { "name": "@jellyfish-dev/react-client-sdk", - "version": "0.1.6", + "version": "0.1.9", "license": "Apache-2.0", "dependencies": { - "@jellyfish-dev/ts-client-sdk": "^0.2.3", + "@jellyfish-dev/ts-client-sdk": "file:../ts-client-sdk", "events": "3.3.0", "lodash.isequal": "4.5.0" }, @@ -2611,6 +2612,14 @@ "engines": { "node": ">= 14" } + }, + "node_modules/zod": { + "version": "3.22.4", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.22.4.tgz", + "integrity": "sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } } } } diff --git a/examples/use-camera-and-microphone-example/package.json b/examples/use-camera-and-microphone-example/package.json index 7449663..e0a6fd6 100644 --- a/examples/use-camera-and-microphone-example/package.json +++ b/examples/use-camera-and-microphone-example/package.json @@ -12,7 +12,8 @@ "@jellyfish-dev/react-client-sdk": "file:../..", "jotai": "^2.6.0", "react": "^18.2.0", - "react-dom": "^18.2.0" + "react-dom": "^18.2.0", + "zod": "^3.22.4" }, "devDependencies": { "@tailwindcss/typography": "^0.5.10", diff --git a/examples/use-camera-and-microphone-example/src/jellyfishSetup.tsx b/examples/use-camera-and-microphone-example/src/jellyfishSetup.tsx index 32efc74..2bdb70c 100644 --- a/examples/use-camera-and-microphone-example/src/jellyfishSetup.tsx +++ b/examples/use-camera-and-microphone-example/src/jellyfishSetup.tsx @@ -1,13 +1,18 @@ import { create } from "@jellyfish-dev/react-client-sdk"; +import { z } from "zod"; -export type PeerMetadata = { - name: string; -}; +const peerMetadataSchema = z.object({ + name: z.string(), +}); -export type TrackMetadata = { - type: "camera" | "microphone" | "screenshare"; - mode: "auto" | "manual"; -}; +const trackMetadataSchema = z.object({ + type: z.union([z.literal("camera"), z.literal("microphone"), z.literal("screenshare")]), + mode: z.union([z.literal("auto"), z.literal("manual")]), +}); + +export type PeerMetadata = z.infer; + +export type TrackMetadata = z.infer; export const DEFAULT_VIDEO_TRACK_METADATA: TrackMetadata = { type: "camera", @@ -15,8 +20,11 @@ export const DEFAULT_VIDEO_TRACK_METADATA: TrackMetadata = { }; export const MANUAL_VIDEO_TRACK_METADATA: TrackMetadata = { + // @ts-ignore type: "camera", mode: "manual", + // @ts-ignore + abc: "hello", }; export const DEFAULT_AUDIO_TRACK_METADATA: TrackMetadata = { @@ -51,4 +59,7 @@ export const { useMicrophone, useScreenshare, useSelector, -} = create(); +} = create({ + peerMetadataParser: (obj) => peerMetadataSchema.parse(obj), + trackMetadataParser: (obj) => trackMetadataSchema.passthrough().parse(obj), +}); diff --git a/package-lock.json b/package-lock.json index aec9088..2c87d75 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,15 @@ { "name": "@jellyfish-dev/react-client-sdk", - "version": "0.1.8", + "version": "0.1.9", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@jellyfish-dev/react-client-sdk", - "version": "0.1.8", + "version": "0.1.9", "license": "Apache-2.0", "dependencies": { - "@jellyfish-dev/ts-client-sdk": "^0.2.5", + "@jellyfish-dev/ts-client-sdk": "file:../ts-client-sdk", "events": "3.3.0", "lodash.isequal": "4.5.0" }, @@ -36,11 +36,10 @@ }, "../ts-client-sdk": { "name": "@jellyfish-dev/ts-client-sdk", - "version": "0.2.3", - "extraneous": true, + "version": "0.2.5", "license": "Apache-2.0", "dependencies": { - "@jellyfish-dev/membrane-webrtc-js": "^0.6.1", + "@jellyfish-dev/membrane-webrtc-js": "github:jellyfish-dev/membrane-webrtc-js", "events": "^3.3.0", "ts-proto": "^1.165.0", "typed-emitter": "^2.1.0" @@ -168,26 +167,9 @@ "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", "dev": true }, - "node_modules/@jellyfish-dev/membrane-webrtc-js": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/@jellyfish-dev/membrane-webrtc-js/-/membrane-webrtc-js-0.6.3.tgz", - "integrity": "sha512-ivk3Wmp0GgLZ2uKFIdbBcSN3yOULtV/0ebtwU40bdJ8yzEVHXZMMQfGbpch+k9JGb2HfLXuXpe5X4TgQ5lPvQA==", - "dependencies": { - "events": "^3.3.0", - "typed-emitter": "^2.1.0", - "uuid": "^9.0.1" - } - }, "node_modules/@jellyfish-dev/ts-client-sdk": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/@jellyfish-dev/ts-client-sdk/-/ts-client-sdk-0.2.5.tgz", - "integrity": "sha512-nFrmc7t77zDAZHV3I7Y10JaDR0qB1kh8TzKx8KrdeqCsawq1nQMsUn6/olIwNKx6WUihtlga7k1jP9b9DfW4Rw==", - "dependencies": { - "@jellyfish-dev/membrane-webrtc-js": "^0.6.3", - "events": "^3.3.0", - "ts-proto": "^1.165.0", - "typed-emitter": "^2.1.0" - } + "resolved": "../ts-client-sdk", + "link": true }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", @@ -239,60 +221,6 @@ "node": ">=16" } }, - "node_modules/@protobufjs/aspromise": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", - "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==" - }, - "node_modules/@protobufjs/base64": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", - "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" - }, - "node_modules/@protobufjs/codegen": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", - "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" - }, - "node_modules/@protobufjs/eventemitter": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", - "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==" - }, - "node_modules/@protobufjs/fetch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", - "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", - "dependencies": { - "@protobufjs/aspromise": "^1.1.1", - "@protobufjs/inquire": "^1.1.0" - } - }, - "node_modules/@protobufjs/float": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", - "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==" - }, - "node_modules/@protobufjs/inquire": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", - "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==" - }, - "node_modules/@protobufjs/path": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", - "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==" - }, - "node_modules/@protobufjs/pool": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", - "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==" - }, - "node_modules/@protobufjs/utf8": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", - "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" - }, "node_modules/@types/docker-modem": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/@types/docker-modem/-/docker-modem-3.0.6.tgz", @@ -344,6 +272,7 @@ "version": "20.10.3", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.3.tgz", "integrity": "sha512-XJavIpZqiXID5Yxnxv3RUDKTN5b81ddNC3ecsA0SoFXz/QU8OGBwZGMomiq0zw+uuqbL/krztv/DINAQ/EV4gg==", + "dev": true, "dependencies": { "undici-types": "~5.26.4" } @@ -1081,17 +1010,6 @@ "node": ">=6" } }, - "node_modules/case-anything": { - "version": "2.1.13", - "resolved": "https://registry.npmjs.org/case-anything/-/case-anything-2.1.13.tgz", - "integrity": "sha512-zlOQ80VrQ2Ue+ymH5OuM/DlDq64mEm+B9UTdHULv5osUMD6HalNTblf2b1u/m6QecjsnOkBpqVZ+XPwIVsy7Ng==", - "engines": { - "node": ">=12.13" - }, - "funding": { - "url": "https://github.com/sponsors/mesqueeb" - } - }, "node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -1242,17 +1160,6 @@ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, - "node_modules/detect-libc": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", - "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", - "bin": { - "detect-libc": "bin/detect-libc.js" - }, - "engines": { - "node": ">=0.10" - } - }, "node_modules/dir-glob": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", @@ -1330,14 +1237,6 @@ "node": ">=6.0.0" } }, - "node_modules/dprint-node": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/dprint-node/-/dprint-node-1.0.8.tgz", - "integrity": "sha512-iVKnUtYfGrYcW1ZAlfR/F59cUVL8QIhWoBJoSjkkdua/dkWIgjZfiLMeTjiB06X0ZLkQ0M2C1VbUj/CxkIf1zg==", - "dependencies": { - "detect-libc": "^1.0.3" - } - }, "node_modules/end-of-stream": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", @@ -2056,11 +1955,6 @@ "integrity": "sha512-c4pB2CdGrGdjMKYLA+XiRDO7Y0PRQbm/Gzg8qMj+QH+pFVAoTp5sBpO0odL3FjoPCGjK96p6qsP+yQoiLoOBcw==", "dev": true }, - "node_modules/long": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", - "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" - }, "node_modules/loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -2478,29 +2372,6 @@ "url": "https://github.com/steveukx/properties?sponsor=1" } }, - "node_modules/protobufjs": { - "version": "7.2.6", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.6.tgz", - "integrity": "sha512-dgJaEDDL6x8ASUZ1YqWciTRrdOuYNzoOf27oHNfdyvKqHr5i0FV7FSLU+aIeFjyFgVxrpTOtQUi0BLLBymZaBw==", - "hasInstallScript": true, - "dependencies": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/node": ">=13.7.0", - "long": "^5.0.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, "node_modules/pump": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", @@ -2672,6 +2543,7 @@ "version": "7.8.1", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "dev": true, "optional": true, "dependencies": { "tslib": "^2.1.0" @@ -2681,6 +2553,7 @@ "version": "2.6.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.0.tgz", "integrity": "sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==", + "dev": true, "optional": true }, "node_modules/safe-buffer": { @@ -2970,37 +2843,6 @@ "typescript": ">=4.2.0" } }, - "node_modules/ts-poet": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/ts-poet/-/ts-poet-6.6.0.tgz", - "integrity": "sha512-4vEH/wkhcjRPFOdBwIh9ItO6jOoumVLRF4aABDX5JSNEubSqwOulihxQPqai+OkuygJm3WYMInxXQX4QwVNMuw==", - "dependencies": { - "dprint-node": "^1.0.7" - } - }, - "node_modules/ts-proto": { - "version": "1.166.3", - "resolved": "https://registry.npmjs.org/ts-proto/-/ts-proto-1.166.3.tgz", - "integrity": "sha512-Ad3TV7wH7m62fKHI55faq403OW9hC5XOGev+bDXHB5lmx1AhiZiH1ISQdk1sk33fRRy8lEBrKRknV41F3d7Nfw==", - "dependencies": { - "case-anything": "^2.1.13", - "protobufjs": "^7.2.4", - "ts-poet": "^6.5.0", - "ts-proto-descriptors": "1.15.0" - }, - "bin": { - "protoc-gen-ts_proto": "protoc-gen-ts_proto" - } - }, - "node_modules/ts-proto-descriptors": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/ts-proto-descriptors/-/ts-proto-descriptors-1.15.0.tgz", - "integrity": "sha512-TYyJ7+H+7Jsqawdv+mfsEpZPTIj9siDHS6EMCzG/z3b/PZiphsX+mWtqFfFVe5/N0Th6V3elK9lQqjnrgTOfrg==", - "dependencies": { - "long": "^5.2.3", - "protobufjs": "^7.2.4" - } - }, "node_modules/tweetnacl": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", @@ -3035,6 +2877,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/typed-emitter/-/typed-emitter-2.1.0.tgz", "integrity": "sha512-g/KzbYKbH5C2vPkaXGu8DJlHrGKHLsM25Zg9WuC9pMGfuvT+X25tZQWo5fK1BjBm8+UrVE9LDCvaY0CQk+fXDA==", + "dev": true, "optionalDependencies": { "rxjs": "*" } @@ -3109,7 +2952,8 @@ "node_modules/undici-types": { "version": "5.26.5", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true }, "node_modules/uri-js": { "version": "4.4.1", @@ -3126,18 +2970,6 @@ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "dev": true }, - "node_modules/uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "bin": { - "uuid": "dist/bin/uuid" - } - }, "node_modules/vscode-oniguruma": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz", diff --git a/package.json b/package.json index d06075f..8165b45 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,7 @@ "typescript": "5.2.2" }, "dependencies": { - "@jellyfish-dev/ts-client-sdk": "^0.2.5", + "@jellyfish-dev/ts-client-sdk": "file:../ts-client-sdk", "events": "3.3.0", "lodash.isequal": "4.5.0" }, diff --git a/src/api.tsx b/src/api.tsx index 108d2e8..a0700b5 100644 --- a/src/api.tsx +++ b/src/api.tsx @@ -6,9 +6,6 @@ import { Action } from "./reducer"; // todo implement // setTrackBandwidth // setEncodingBandwidth -// prioritizeTrack -// unprioritizeTrack -// setPreferedVideoSizes // updatePeerMetadata export type Api = { addTrack: ( @@ -17,14 +14,14 @@ export type Api = { trackMetadata?: TrackMetadata, simulcastConfig?: SimulcastConfig, maxBandwidth?: TrackBandwidthLimit, - ) => string; + ) => Promise; replaceTrack: ( trackId: string, newTrack: MediaStreamTrack, stream: MediaStream, newTrackMetadata?: TrackMetadata, - ) => Promise; - removeTrack: (trackId: string) => void; + ) => Promise; + removeTrack: (trackId: string) => Promise; updateTrackMetadata: (trackId: string, trackMetadata: TrackMetadata) => void; disableTrackEncoding: (trackId: string, encoding: TrackEncoding) => void; enableTrackEncoding: (trackId: string, encoding: TrackEncoding) => void; @@ -43,26 +40,25 @@ export const createApiWrapper = ( webrtc: JellyfishClient, dispatch: Dispatch>, ): Api => ({ - addTrack: ( + addTrack: async ( track: MediaStreamTrack, stream: MediaStream, trackMetadata?: TrackMetadata, simulcastConfig?: SimulcastConfig, maxBandwidth?: TrackBandwidthLimit, ) => { - const remoteTrackId = webrtc.addTrack(track, stream, trackMetadata, simulcastConfig, maxBandwidth); + const remoteTrackId = await webrtc.addTrack(track, stream, trackMetadata, simulcastConfig, maxBandwidth); dispatch({ type: "localAddTrack", remoteTrackId, track, stream, trackMetadata, simulcastConfig }); return remoteTrackId; }, - replaceTrack: (trackId, newTrack, stream, newTrackMetadata) => { - const promise = webrtc.replaceTrack(trackId, newTrack, newTrackMetadata); + replaceTrack: async (trackId, newTrack, stream, newTrackMetadata) => { + await webrtc.replaceTrack(trackId, newTrack, newTrackMetadata); dispatch({ type: "localReplaceTrack", trackId, newTrack, stream, newTrackMetadata }); - return promise; }, - removeTrack: (trackId) => { - webrtc.removeTrack(trackId); + removeTrack: async (trackId) => { + await webrtc.removeTrack(trackId); dispatch({ type: "localRemoveTrack", trackId }); }, diff --git a/src/create.tsx b/src/create.tsx index 7e3a5ba..c4ce7be 100644 --- a/src/create.tsx +++ b/src/create.tsx @@ -3,7 +3,7 @@ import type { Selector, State } from "./state.types"; import { PeerStatus, TrackId, TrackWithOrigin } from "./state.types"; import { createEmptyApi, DEFAULT_STORE } from "./state"; import { Api } from "./api"; -import { Config, JellyfishClient } from "@jellyfish-dev/ts-client-sdk"; +import { CreateConfig, ConnectConfig, JellyfishClient } from "@jellyfish-dev/ts-client-sdk"; import { INITIAL_STATE } from "./useUserMedia"; import { Action, createDefaultDevices, Reducer, reducer } from "./reducer"; import { useSetupMedia as useSetupMediaInternal } from "./useMedia"; @@ -26,31 +26,33 @@ type JellyfishContextType = { dispatch: Dispatch>; }; -export type UseConnect = (config: Config) => () => void; +export type UseConnect = (config: ConnectConfig) => () => void; -export const createDefaultState = (): State => ({ +export const createDefaultState = ( + config?: CreateConfig, +): State => ({ local: null, remote: {}, status: null, tracks: {}, - bandwidthEstimation: BigInt(0), // todo investigate bigint n notation + bandwidthEstimation: BigInt(0), media: INITIAL_STATE, devices: createDefaultDevices(), connectivity: { api: null, - client: new JellyfishClient(), + client: new JellyfishClient(config), }, screenshare: SCREENSHARE_INITIAL_STATE, }); export type CreateJellyfishClient = { JellyfishContextProvider: ({ children }: JellyfishContextProviderProps) => JSX.Element; - useConnect: () => (config: Config) => () => void; + useConnect: () => (config: ConnectConfig) => () => void; useDisconnect: () => () => void; useApi: () => Api; useStatus: () => PeerStatus; useSelector: (selector: Selector) => Result; - useTracks: () => Record>; + useTracks: () => Record>; useSetupMedia: (config: UseSetupMediaConfig) => UseSetupMediaResult; useCamera: () => UseCameraAndMicrophoneResult["camera"]; useMicrophone: () => UseCameraAndMicrophoneResult["microphone"]; @@ -63,7 +65,9 @@ export type CreateJellyfishClient = { * * @returns ContextProvider, useSelector, useConnect */ -export const create = (): CreateJellyfishClient => { +export const create = ( + config?: CreateConfig, +): CreateJellyfishClient => { const JellyfishContext = createContext | undefined>(undefined); const JellyfishContextProvider: ({ children }: JellyfishContextProviderProps) => JSX.Element = ({ @@ -72,7 +76,7 @@ export const create = (): CreateJellyfishClient, State>( reducer, DEFAULT_STORE, - () => createDefaultState(), + () => createDefaultState(config), ); return {children}; @@ -94,7 +98,7 @@ export const create = (): CreateJellyfishClient = useJellyfishContext(); return useMemo(() => { - return (config: Config): (() => void) => { + return (config: ConnectConfig): (() => void) => { dispatch({ type: "connect", config, dispatch }); return () => { dispatch({ type: "disconnect" }); diff --git a/src/experimental/create.tsx b/src/experimental/create.tsx index 71907ff..e10c06a 100644 --- a/src/experimental/create.tsx +++ b/src/experimental/create.tsx @@ -3,10 +3,10 @@ import { createStore } from "./externalState"; import { useSelector } from "./useSelector"; import type { Selector } from "../state.types"; import { useMemo } from "react"; -import { Config } from "@jellyfish-dev/ts-client-sdk"; +import { ConnectConfig } from "@jellyfish-dev/ts-client-sdk"; export type CreateJellyfishClient = { - useConnect: () => (config: Config) => () => void; + useConnect: () => (config: ConnectConfig) => () => void; useDisconnect: () => () => void; useSelector: (selector: Selector) => Result; }; @@ -25,7 +25,7 @@ export const create = (): CreateJellyfishClient { const { dispatch } = store; - return (config: Config): (() => void) => { + return (config: ConnectConfig): (() => void) => { dispatch({ type: "connect", config, dispatch }); return () => { dispatch({ type: "disconnect" }); diff --git a/src/index.ts b/src/index.ts index eccd3fb..3a96282 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,19 +1,62 @@ -export * from "./create"; -export * from "./state.types"; -export * from "./api"; -export * from "./useUserMedia"; -export * from "./useMedia/index"; -export * from "./useMedia/types"; +export { + create, + // CreateJellyfishClient, + // JellyfishContextProviderProps, + UseConnect, +} from "./create"; + +export { + PeerState, + Track, + PeerId, + TrackId, + TrackWithOrigin, + Origin, + PeerStatus, + Selector, + State, + SetStore, + Connectivity, +} from "./state.types"; + +export { Api } from "./api"; + +export { + INITIAL_STATE, + MediaReducer, + userMediaReducer, + useUserMedia, + UseUserMediaAction, + useUserMediaInternal, + parseError, +} from "./useUserMedia"; + +export { useSetupMedia } from "./useMedia/index"; + +export { + UseCameraAndMicrophoneResult, + UseCameraResult, + UseScreenshareResult, + UseMicrophoneResult, + UseSetupMediaResult, + UseSetupMediaConfig, +} from "./useMedia/types"; + export { AUDIO_TRACK_CONSTRAINTS, VIDEO_TRACK_CONSTRAINTS, SCREEN_SHARING_MEDIA_CONSTRAINTS, + // getExactDeviceConstraint, + // prepareConstraints, + // prepareMediaTrackConstraints, + // toMediaTrackConstraints, } from "./useUserMedia/constraints"; + export type { Peer, MessageEvents, SignalingUrl, - Config, + CreateConfig, JellyfishClient, TrackBandwidthLimit, SimulcastBandwidthLimit, diff --git a/src/reducer.tsx b/src/reducer.tsx index 93c696d..d823969 100644 --- a/src/reducer.tsx +++ b/src/reducer.tsx @@ -26,7 +26,7 @@ import { } from "./stateMappers"; import { createApiWrapper } from "./api"; import { - Config, + ConnectConfig, Endpoint, JellyfishClient, SimulcastConfig, @@ -50,8 +50,8 @@ export const createDefaultDevices = (): UseCameraAndMicrophoneRe _trackMetadata?: TrackMetadata, _simulcastConfig?: SimulcastConfig, _maxBandwidth?: TrackBandwidthLimit, - ) => {}, - removeTrack: () => {}, + ) => Promise.reject(), + removeTrack: () => Promise.reject(), replaceTrack: (_newTrack: MediaStreamTrack, _stream: MediaStream, _newTrackMetadata?: TrackMetadata) => Promise.reject(), broadcast: null, @@ -66,11 +66,11 @@ export const createDefaultDevices = (): UseCameraAndMicrophoneRe microphone: { stop: () => {}, setEnable: (_value: boolean) => {}, - start: () => {}, // startByType - addTrack: (_trackMetadata?: TrackMetadata, _maxBandwidth?: TrackBandwidthLimit) => {}, // remote - removeTrack: () => {}, // remote + start: () => {}, + addTrack: (_trackMetadata?: TrackMetadata, _maxBandwidth?: TrackBandwidthLimit) => Promise.reject(), // remote + removeTrack: () => Promise.reject(), replaceTrack: (_newTrack: MediaStreamTrack, _stream: MediaStream, _newTrackMetadata?: TrackMetadata) => - Promise.reject(), // remote + Promise.reject(), broadcast: null, status: null, // todo how to ull stream: null, @@ -83,11 +83,11 @@ export const createDefaultDevices = (): UseCameraAndMicrophoneRe screenshare: { stop: () => {}, setEnable: (_value: boolean) => {}, - start: () => {}, // startByType - addTrack: (_trackMetadata?: TrackMetadata, _maxBandwidth?: TrackBandwidthLimit) => {}, // remote - removeTrack: () => {}, // remote + start: () => {}, + addTrack: (_trackMetadata?: TrackMetadata, _maxBandwidth?: TrackBandwidthLimit) => Promise.reject(), // remote + removeTrack: () => Promise.reject(), replaceTrack: (_newTrack: MediaStreamTrack, _stream: MediaStream, _newTrackMetadata?: TrackMetadata) => - Promise.reject(), // remote + Promise.reject(), broadcast: null, status: null, // todo how to ull stream: null, @@ -116,7 +116,7 @@ export const createDefaultState = (): State = { type: "connect"; - config: Config; + config: ConnectConfig; dispatch: Dispatch>; }; @@ -138,10 +138,10 @@ export type OnAuthErrorAction = { type: "onAuthError"; }; -export type OnJoinSuccessAction = { +export type OnJoinSuccessAction = { type: "onJoinSuccess"; peerMetadata: PeerMetadata; - peersInRoom: Endpoint[]; + peersInRoom: Endpoint[]; peerId: string; }; @@ -161,34 +161,34 @@ export type OnDisconnectedAction = { type: "onDisconnected"; }; -export type OnTrackAddedAction = { +export type OnTrackAddedAction = { type: "onTrackAdded"; - ctx: TrackContext; + ctx: TrackContext; }; -export type OnTrackReadyAction = { +export type OnTrackReadyAction = { type: "onTrackReady"; - ctx: TrackContext; + ctx: TrackContext; }; -export type OnTrackUpdatedAction = { +export type OnTrackUpdatedAction = { type: "onTrackUpdated"; - ctx: TrackContext; + ctx: TrackContext; }; -export type OnTrackRemovedAction = { +export type OnTrackRemovedAction = { type: "onTrackRemoved"; - ctx: TrackContext; + ctx: TrackContext; }; -export type OnTrackEncodingChange = { +export type OnTrackEncodingChange = { type: "encodingChanged"; - ctx: TrackContext; + ctx: TrackContext; }; -export type OnTrackVoiceActivityChanged = { +export type OnTrackVoiceActivityChanged = { type: "voiceActivityChanged"; - ctx: TrackContext; + ctx: TrackContext; }; export type OnBandwidthEstimationChangedAction = { @@ -196,25 +196,25 @@ export type OnBandwidthEstimationChangedAction = { estimation: bigint; }; -export type OnTracksPriorityChangedAction = { +export type OnTracksPriorityChangedAction = { type: "onTracksPriorityChanged"; - enabledTracks: TrackContext[]; - disabledTracks: TrackContext[]; + enabledTracks: TrackContext[]; + disabledTracks: TrackContext[]; }; -export type OnPeerJoinedAction = { +export type OnPeerJoinedAction = { type: "onPeerJoined"; - peer: Endpoint; + peer: Endpoint; }; -export type OnPeerLeftAction = { +export type OnPeerLeftAction = { type: "onPeerLeft"; - peer: Endpoint; + peer: Endpoint; }; -export type OnPeerUpdatedAction = { +export type OnPeerUpdatedAction = { type: "onPeerUpdated"; - peer: Endpoint; + peer: Endpoint; }; // Local @@ -251,24 +251,24 @@ export type SetDevices = { type: "setDevices"; data: UseCameraAnd export type Action = | ConnectAction | DisconnectAction - | OnJoinSuccessAction + | OnJoinSuccessAction | OnAuthSuccessAction | OnAuthErrorAction | OnSocketOpenAction | OnSocketErrorAction | OnDisconnectedAction | OnRemovedAction - | OnTrackReadyAction - | OnTrackAddedAction - | OnTrackUpdatedAction - | OnTrackRemovedAction - | OnTrackEncodingChange - | OnTrackVoiceActivityChanged + | OnTrackReadyAction + | OnTrackAddedAction + | OnTrackUpdatedAction + | OnTrackRemovedAction + | OnTrackEncodingChange + | OnTrackVoiceActivityChanged | OnBandwidthEstimationChangedAction - | OnTracksPriorityChangedAction - | OnPeerJoinedAction - | OnPeerUpdatedAction - | OnPeerLeftAction + | OnTracksPriorityChangedAction + | OnPeerJoinedAction + | OnPeerUpdatedAction + | OnPeerLeftAction | OnJoinErrorAction | LocalReplaceTrackAction | LocalRemoveTrackAction @@ -324,7 +324,7 @@ const onConnect = ( action.dispatch({ type: "onDisconnected" }); }); - client.on("joined", (peerId: string, peersInRoom: Endpoint[]) => { + client.on("joined", (peerId: string, peersInRoom: Endpoint[]) => { action.dispatch({ type: "onJoinSuccess", peersInRoom, peerId, peerMetadata }); }); // todo handle state and handle callback diff --git a/src/state.ts b/src/state.ts index 4c11ee0..ff4fdaa 100644 --- a/src/state.ts +++ b/src/state.ts @@ -22,7 +22,7 @@ export const DEFAULT_STORE: State = { }; export const createEmptyApi = (): Api => ({ - addTrack: ( + addTrack: async ( _track: MediaStreamTrack, _stream: MediaStream, _trackMetadata?: TrackMetadata, @@ -31,7 +31,7 @@ export const createEmptyApi = (): Api { throw Error("Jellyfish client is not connected"); }, - replaceTrack: ( + replaceTrack: async ( _trackId: string, _newTrack: MediaStreamTrack, _stream: MediaStream, @@ -39,7 +39,7 @@ export const createEmptyApi = (): Api { throw Error("Jellyfish client is not connected"); }, - removeTrack: (_trackId: string) => {}, + removeTrack: async (_trackId: string) => Promise.reject("Jellyfish client is not connected"), updateTrackMetadata: (_trackId: string, _trackMetadata: TrackMetadata) => { throw Error("Jellyfish client is not connected"); }, diff --git a/src/state.types.ts b/src/state.types.ts index 1624879..eb5cf40 100644 --- a/src/state.types.ts +++ b/src/state.types.ts @@ -12,25 +12,31 @@ export type Track = { stream: MediaStream | null; encoding: TrackEncoding | null; trackId: TrackId; - metadata: TrackMetadata | null; + metadata?: TrackMetadata; + rawMetadata: any; // eslint-disable-line @typescript-eslint/no-explicit-any + metadataParsingError?: any; // eslint-disable-line @typescript-eslint/no-explicit-any simulcastConfig: SimulcastConfig | null; vadStatus: VadStatus; track: MediaStreamTrack | null; }; -export interface Origin { +export interface Origin { id: string; type: string; - metadata: any; // eslint-disable-line @typescript-eslint/no-explicit-any + metadata?: OriginMetadata; + rawMetadata: any; // eslint-disable-line @typescript-eslint/no-explicit-any + metadataParsingError?: any; // eslint-disable-line @typescript-eslint/no-explicit-any } -export type TrackWithOrigin = Track & { - origin: Origin; +export type TrackWithOrigin = Track & { + origin: Origin; }; -export type Peer = { +export type PeerState = { id: PeerId; - metadata: PeerMetadata | null; + metadata?: PeerMetadata; + rawMetadata: any; // eslint-disable-line @typescript-eslint/no-explicit-any + metadataParsingError?: any; // eslint-disable-line @typescript-eslint/no-explicit-any tracks: Record>; }; @@ -40,10 +46,11 @@ export type Connectivity = { }; export type PeerStatus = "connecting" | "connected" | "authenticated" | "joined" | "error" | null; + export type State = { - local: Peer | null; - remote: Record>; - tracks: Record>; + local: PeerState | null; + remote: Record>; + tracks: Record>; bandwidthEstimation: bigint; status: PeerStatus; media: UseUserMediaState; diff --git a/src/stateMappers.tsx b/src/stateMappers.tsx index 68db201..3f29099 100644 --- a/src/stateMappers.tsx +++ b/src/stateMappers.tsx @@ -4,7 +4,7 @@ import type { TrackContext, Endpoint, } from "@jellyfish-dev/ts-client-sdk"; -import type { Peer, PeerId, State, Track, TrackId, TrackWithOrigin } from "./state.types"; +import { PeerState, PeerId, State, Track, TrackId, TrackWithOrigin, Origin } from "./state.types"; export const onSocketOpen = () => @@ -36,18 +36,18 @@ export const onDisconnected = }; export const onPeerJoined = - (peer: JellyfishClientPeer) => + (peer: JellyfishClientPeer) => (prevState: State): State => { - const remote: Record> = { + const remote: Record> = { ...prevState.remote, - [peer.id]: { id: peer.id, metadata: peer.metadata, tracks: {} }, + [peer.id]: { id: peer.id, metadata: peer.metadata, rawMetadata: peer.rawMetadata, tracks: {} }, }; return { ...prevState, remote }; }; export const onPeerUpdated = - (peer: JellyfishClientPeer) => + (peer: JellyfishClientPeer) => (prevState: State): State => { return { ...prevState, @@ -63,9 +63,9 @@ export const onPeerUpdated = }; export const onPeerLeft = - (peer: JellyfishClientPeer) => + (peer: JellyfishClientPeer) => (prevState: State): State => { - const remote: Record> = { + const remote: Record> = { ...prevState.remote, }; @@ -80,9 +80,13 @@ export const onPeerRemoved = return { ...prevState, local: null }; }; -const createTrack = (ctx: TrackContext): Track => ({ +const createTrack = ( + ctx: TrackContext, +): Track => ({ trackId: ctx.trackId, metadata: ctx.metadata, + rawMetadata: ctx.rawMetadata, + metadataParsingError: ctx.metadataParsingError, stream: ctx.stream, vadStatus: ctx.vadStatus, track: ctx.track, @@ -91,26 +95,34 @@ const createTrack = (ctx: TrackContext): Track => ? { enabled: ctx.simulcastConfig.enabled, activeEncodings: [...ctx.simulcastConfig.activeEncodings], + disabledEncodings: [...ctx.simulcastConfig.activeEncodings], } : null, }); -const createOrigin = (ctx: TrackContext) => ({ +const createOrigin = ( + ctx: TrackContext, +): Origin => ({ id: ctx.endpoint.id, type: ctx.endpoint.type, metadata: ctx.endpoint.metadata, + rawMetadata: ctx.endpoint.rawMetadata, + metadataParsingError: ctx.endpoint.metadataParsingError, }); export const onTrackReady = - (ctx: TrackContext) => + (ctx: TrackContext) => (prevState: State): State => { if (!ctx.stream) return prevState; if (!ctx.endpoint) return prevState; if (!ctx.trackId) return prevState; const peer = prevState.remote[ctx.endpoint.id]; - const track = createTrack(ctx); - const trackWithOrigin: TrackWithOrigin = { ...track, origin: createOrigin(ctx) }; + const track = createTrack(ctx); + const trackWithOrigin: TrackWithOrigin = { + ...track, + origin: createOrigin(ctx), + }; const remote = ctx.endpoint.type === "webrtc" @@ -134,14 +146,14 @@ export const onTrackReady = }; export const onTrackAdded = - (ctx: TrackContext) => + (ctx: TrackContext) => (prevState: State): State => { if (!ctx.endpoint) return prevState; if (!ctx.trackId) return prevState; const peer = prevState.remote[ctx.endpoint.id]; - const track = createTrack(ctx); - const trackWithOrigin: TrackWithOrigin = { ...track, origin: createOrigin(ctx) }; + const track = createTrack(ctx); + const trackWithOrigin: TrackWithOrigin = { ...track, origin: createOrigin(ctx) }; const remote = ctx.endpoint.type === "webrtc" @@ -166,15 +178,15 @@ export const onTrackAdded = export const onTrackRemoved = ( prevState: State, - ctx: TrackContext, + ctx: TrackContext, ): State => { if (!ctx.endpoint) return prevState; if (!ctx.trackId) return prevState; - const remote: Record> = { + const remote: Record> = { ...prevState.remote, }; - const tracks: Record> = { ...prevState.tracks }; + const tracks: Record> = { ...prevState.tracks }; delete tracks[ctx.trackId]; if (ctx.endpoint.type === "webrtc") { @@ -192,7 +204,7 @@ export const onTrackEncodingChanged = ( ): State => { const peer = prevState.remote[peerId]; const peerTrack = { ...peer.tracks[trackId], encoding }; - const trackWithOrigin: TrackWithOrigin = { ...prevState.tracks[trackId], encoding }; + const trackWithOrigin: TrackWithOrigin = { ...prevState.tracks[trackId], encoding }; return { ...prevState, @@ -215,9 +227,9 @@ export const onTrackEncodingChanged = ( export const onTrackUpdated = ( prevState: State, - ctx: TrackContext, + ctx: TrackContext, ): State => { - const remote: Record> = { + const remote: Record> = { ...prevState.remote, }; @@ -228,7 +240,7 @@ export const onTrackUpdated = ( stream: ctx.stream, metadata: ctx.metadata, }; - const trackWithOrigin: TrackWithOrigin = { ...track, origin: createOrigin(ctx) }; + const trackWithOrigin: TrackWithOrigin = { ...track, origin: createOrigin(ctx) }; return { ...prevState, @@ -245,12 +257,15 @@ export const onTrackUpdated = ( // todo handle state export const onTracksPriorityChanged = - (_enabledTracks: TrackContext[], _disabledTracks: TrackContext[]) => + ( + _enabledTracks: TrackContext[], + _disabledTracks: TrackContext[], + ) => (prevState: State): State => { return prevState; }; -const toEndpointsMap = (endpoints: Endpoint[]) => +const toEndpointsMap = (endpoints: Endpoint[]) => new Map( endpoints.map((endpoint) => [ endpoint.id, @@ -258,21 +273,28 @@ const toEndpointsMap = (endpoints: Endpoint[]) => id: endpoint.id, type: endpoint.type, metadata: endpoint.metadata, + rawMetadata: endpoint.rawMetadata, + metadataParsingError: endpoint.metadataParsingError, tracks: {}, }, ]), ); export const onJoinSuccess = - (peersInRoom: JellyfishClientPeer[], peerId: PeerId, peerMetadata: PeerMetadata) => + ( + peersInRoom: JellyfishClientPeer[], + peerId: PeerId, + peerMetadata: PeerMetadata, + ) => (prevState: State): State => { const peersMap = toEndpointsMap(peersInRoom.filter((e) => e.type === "webrtc")); - const remote: Record> = Object.fromEntries(peersMap); + const remote: Record> = Object.fromEntries(peersMap); - const local: Peer = { + const local: PeerState = { id: peerId, metadata: peerMetadata, + rawMetadata: peerMetadata, // todo fix tracks: {}, }; @@ -309,12 +331,15 @@ export const addTrack = trackId: remoteTrackId, stream: stream, encoding: null, - metadata: trackMetadata || null, + rawMetadata: trackMetadata, // todo fix + metadataParsingError: undefined, + metadata: trackMetadata, // todo is ok? vadStatus: "silence", // todo investigate vad status for localPeer simulcastConfig: simulcastConfig ? { enabled: simulcastConfig?.enabled, activeEncodings: [...simulcastConfig.activeEncodings], + disabledEncodings: [...simulcastConfig.activeEncodings], } : null, }, @@ -391,7 +416,8 @@ export const updateTrackMetadata = ...prevLocalPeer.tracks, [trackId]: { ...prevTrack, - metadata: trackMetadata ? { ...trackMetadata } : null, + metadata: trackMetadata ? { ...trackMetadata } : undefined, + // todo rawMetadata, metadataParsingError }, }, }, @@ -409,16 +435,16 @@ export const onBandwidthEstimationChanged = export const onEncodingChanged = ( prevState: State, - ctx: TrackContext, + ctx: TrackContext, ): State => { if (!ctx.encoding) return prevState; return onTrackEncodingChanged(prevState, ctx.endpoint.id, ctx.trackId, ctx.encoding); }; export const onVoiceActivityChanged = - (ctx: TrackContext) => + (ctx: TrackContext) => (prevState: State): State => { - const peer: Peer = prevState.remote[ctx.endpoint.id]; + const peer: PeerState = prevState.remote[ctx.endpoint.id]; const tracks: Record> = peer.tracks; const track: Track = { ...tracks[ctx.trackId], vadStatus: ctx.vadStatus }; const trackWithOrigin = { ...prevState.tracks[ctx.trackId], vadStatus: ctx.vadStatus }; diff --git a/src/ts-client-sdk/index.ts b/src/ts-client-sdk/index.ts new file mode 100644 index 0000000..dedc0f1 --- /dev/null +++ b/src/ts-client-sdk/index.ts @@ -0,0 +1,20 @@ +export type { + Peer, + MessageEvents, + SignalingUrl, + CreateConfig, + JellyfishClient, + TrackBandwidthLimit, + SimulcastBandwidthLimit, + BandwidthLimit, + WebRTCEndpointEvents, + TrackContextEvents, + Endpoint, + SimulcastConfig, + TrackContext, + TrackEncoding, + VadStatus, + EncodingReason, + MetadataParser, + ConnectConfig, +} from "@jellyfish-dev/ts-client-sdk"; diff --git a/src/useMedia/index.tsx b/src/useMedia/index.tsx index 0063e51..f968b4e 100644 --- a/src/useMedia/index.tsx +++ b/src/useMedia/index.tsx @@ -49,26 +49,28 @@ export const useSetupMedia = ( ); const addTrack = useCallback( - ( + async ( type: Type, trackMetadata?: TrackMetadata, simulcastConfig?: SimulcastConfig, maxBandwidth?: TrackBandwidthLimit, ) => { - if (!apiRef.current) return; + if (!apiRef.current) return Promise.reject(); const trackIdRef = getTrackIdRef(type); - if (trackIdRef.current) return; + if (trackIdRef.current) return Promise.reject(); const deviceState = getDeviceState(type); - if (!deviceState) return; + if (!deviceState) return Promise.reject(); const track = deviceState.media?.track; const stream = deviceState.media?.stream; - if (!track || !stream) return; + if (!track || !stream) return Promise.reject(); - trackIdRef.current = apiRef.current.addTrack(track, stream, trackMetadata, simulcastConfig, maxBandwidth); + const trackId = await apiRef.current.addTrack(track, stream, trackMetadata, simulcastConfig, maxBandwidth); + trackIdRef.current = trackId; + return trackId; }, [getTrackIdRef, getDeviceState], ); @@ -82,21 +84,16 @@ export const useSetupMedia = ( }, [state.status]); const replaceTrack = useCallback( - ( - type: Type, - newTrack: MediaStreamTrack, - stream: MediaStream, - newTrackMetadata?: TrackMetadata, - ): Promise => { - if (!apiRef.current) return Promise.resolve(false); + (type: Type, newTrack: MediaStreamTrack, stream: MediaStream, newTrackMetadata?: TrackMetadata): Promise => { + if (!apiRef.current) return Promise.reject(); const trackIdRef = getTrackIdRef(type); - if (!trackIdRef.current) return Promise.resolve(false); + if (!trackIdRef.current) return Promise.resolve(); const deviceState = getDeviceState(type); - if (!deviceState || deviceState.status !== "OK") return Promise.resolve(false); + if (!deviceState || deviceState.status !== "OK") return Promise.reject(); - if (!newTrack || !stream) return Promise.resolve(false); + if (!newTrack || !stream) return Promise.reject(); return apiRef.current?.replaceTrack(trackIdRef.current, newTrack, stream, newTrackMetadata); }, @@ -137,10 +134,10 @@ export const useSetupMedia = ( ]); const removeTrack = useCallback( - (type: Type) => { + async (type: Type) => { const trackIdRef = getTrackIdRef(type); if (!trackIdRef.current || !apiRef.current) return; - apiRef.current.removeTrack(trackIdRef.current); + await apiRef.current.removeTrack(trackIdRef.current); trackIdRef.current = null; }, [getTrackIdRef], @@ -247,7 +244,7 @@ export const useSetupMedia = ( simulcastConfig?: SimulcastConfig, maxBandwidth?: TrackBandwidthLimit, ) => { - addTrack("video", trackMetadata, simulcastConfig, maxBandwidth); + return addTrack("video", trackMetadata, simulcastConfig, maxBandwidth); }, removeTrack: () => removeTrack("video"), replaceTrack: (newTrack: MediaStreamTrack, stream: MediaStream, newTrackMetadata?: TrackMetadata) => diff --git a/src/useMedia/types.ts b/src/useMedia/types.ts index fe1de5b..58ff6ef 100644 --- a/src/useMedia/types.ts +++ b/src/useMedia/types.ts @@ -41,9 +41,9 @@ export type UseCameraResult = { trackMetadata?: TrackMetadata, simulcastConfig?: SimulcastConfig, maxBandwidth?: TrackBandwidthLimit, - ) => void; - removeTrack: () => void; - replaceTrack: (newTrack: MediaStreamTrack, stream: MediaStream, newTrackMetadata?: TrackMetadata) => Promise; + ) => Promise; + removeTrack: () => Promise; + replaceTrack: (newTrack: MediaStreamTrack, stream: MediaStream, newTrackMetadata?: TrackMetadata) => Promise; broadcast: Track | null; status: DeviceReturnType | null; // todo how to remove null stream: MediaStream | null; @@ -58,9 +58,9 @@ export type UseMicrophoneResult = { stop: () => void; setEnable: (value: boolean) => void; start: (deviceId?: string) => void; - addTrack: (trackMetadata?: TrackMetadata, maxBandwidth?: TrackBandwidthLimit) => void; - removeTrack: () => void; - replaceTrack: (newTrack: MediaStreamTrack, stream: MediaStream, newTrackMetadata?: TrackMetadata) => Promise; + addTrack: (trackMetadata?: TrackMetadata, maxBandwidth?: TrackBandwidthLimit) => Promise; + removeTrack: () => Promise; + replaceTrack: (newTrack: MediaStreamTrack, stream: MediaStream, newTrackMetadata?: TrackMetadata) => Promise; broadcast: Track | null; status: DeviceReturnType | null; stream: MediaStream | null; @@ -75,9 +75,9 @@ export type UseScreenshareResult = { stop: () => void; setEnable: (value: boolean) => void; start: () => void; - addTrack: (trackMetadata?: TrackMetadata, maxBandwidth?: TrackBandwidthLimit) => void; - removeTrack: () => void; - replaceTrack: (newTrack: MediaStreamTrack, stream: MediaStream, newTrackMetadata?: TrackMetadata) => Promise; + addTrack: (trackMetadata?: TrackMetadata, maxBandwidth?: TrackBandwidthLimit) => Promise; + removeTrack: () => Promise; + replaceTrack: (newTrack: MediaStreamTrack, stream: MediaStream, newTrackMetadata?: TrackMetadata) => Promise; broadcast: Track | null; status: DeviceReturnType | null; stream: MediaStream | null; diff --git a/yarn.lock b/yarn.lock index e0ec92f..57bc3f3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -63,21 +63,11 @@ resolved "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz" integrity sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw== -"@jellyfish-dev/membrane-webrtc-js@^0.6.3": - version "0.6.3" - resolved "https://registry.npmjs.org/@jellyfish-dev/membrane-webrtc-js/-/membrane-webrtc-js-0.6.3.tgz" - integrity sha512-ivk3Wmp0GgLZ2uKFIdbBcSN3yOULtV/0ebtwU40bdJ8yzEVHXZMMQfGbpch+k9JGb2HfLXuXpe5X4TgQ5lPvQA== - dependencies: - events "^3.3.0" - typed-emitter "^2.1.0" - uuid "^9.0.1" - -"@jellyfish-dev/ts-client-sdk@^0.2.5": +"@jellyfish-dev/ts-client-sdk@file:../ts-client-sdk": version "0.2.5" - resolved "https://registry.npmjs.org/@jellyfish-dev/ts-client-sdk/-/ts-client-sdk-0.2.5.tgz" - integrity sha512-nFrmc7t77zDAZHV3I7Y10JaDR0qB1kh8TzKx8KrdeqCsawq1nQMsUn6/olIwNKx6WUihtlga7k1jP9b9DfW4Rw== + resolved "file:../ts-client-sdk" dependencies: - "@jellyfish-dev/membrane-webrtc-js" "^0.6.3" + "@jellyfish-dev/membrane-webrtc-js" "github:jellyfish-dev/membrane-webrtc-js" events "^3.3.0" ts-proto "^1.165.0" typed-emitter "^2.1.0" @@ -110,59 +100,6 @@ dependencies: playwright "1.40.1" -"@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": - version "1.1.2" - resolved "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz" - integrity sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ== - -"@protobufjs/base64@^1.1.2": - version "1.1.2" - resolved "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz" - integrity sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg== - -"@protobufjs/codegen@^2.0.4": - version "2.0.4" - resolved "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz" - integrity sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg== - -"@protobufjs/eventemitter@^1.1.0": - version "1.1.0" - resolved "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz" - integrity sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q== - -"@protobufjs/fetch@^1.1.0": - version "1.1.0" - resolved "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz" - integrity sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ== - dependencies: - "@protobufjs/aspromise" "^1.1.1" - "@protobufjs/inquire" "^1.1.0" - -"@protobufjs/float@^1.0.2": - version "1.0.2" - resolved "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz" - integrity sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ== - -"@protobufjs/inquire@^1.1.0": - version "1.1.0" - resolved "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz" - integrity sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q== - -"@protobufjs/path@^1.1.2": - version "1.1.2" - resolved "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz" - integrity sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA== - -"@protobufjs/pool@^1.1.0": - version "1.1.0" - resolved "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz" - integrity sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw== - -"@protobufjs/utf8@^1.1.0": - version "1.1.0" - resolved "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz" - integrity sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw== - "@types/docker-modem@*": version "3.0.6" resolved "https://registry.npmjs.org/@types/docker-modem/-/docker-modem-3.0.6.tgz" @@ -201,7 +138,7 @@ resolved "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.195.tgz" integrity sha512-Hwx9EUgdwf2GLarOjQp5ZH8ZmblzcbTBC2wtQWNKARBSxM9ezRIAUpeDTgoQRAFB0+8CNWXVA9+MaSOzOF3nPg== -"@types/node@*", "@types/node@^20.10.3", "@types/node@>=13.7.0": +"@types/node@*", "@types/node@^20.10.3": version "20.10.3" resolved "https://registry.npmjs.org/@types/node/-/node-20.10.3.tgz" integrity sha512-XJavIpZqiXID5Yxnxv3RUDKTN5b81ddNC3ecsA0SoFXz/QU8OGBwZGMomiq0zw+uuqbL/krztv/DINAQ/EV4gg== @@ -561,11 +498,6 @@ callsites@^3.0.0: resolved "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== -case-anything@^2.1.13: - version "2.1.13" - resolved "https://registry.npmjs.org/case-anything/-/case-anything-2.1.13.tgz" - integrity sha512-zlOQ80VrQ2Ue+ymH5OuM/DlDq64mEm+B9UTdHULv5osUMD6HalNTblf2b1u/m6QecjsnOkBpqVZ+XPwIVsy7Ng== - chalk@^4.0.0: version "4.1.2" resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" @@ -658,11 +590,6 @@ deep-is@^0.1.3: resolved "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz" integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== -detect-libc@^1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz" - integrity sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg== - dir-glob@^3.0.1: version "3.0.1" resolved "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz" @@ -703,13 +630,6 @@ doctrine@^3.0.0: dependencies: esutils "^2.0.2" -dprint-node@^1.0.7: - version "1.0.8" - resolved "https://registry.npmjs.org/dprint-node/-/dprint-node-1.0.8.tgz" - integrity sha512-iVKnUtYfGrYcW1ZAlfR/F59cUVL8QIhWoBJoSjkkdua/dkWIgjZfiLMeTjiB06X0ZLkQ0M2C1VbUj/CxkIf1zg== - dependencies: - detect-libc "^1.0.3" - end-of-stream@^1.1.0, end-of-stream@^1.4.1: version "1.4.4" resolved "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz" @@ -827,7 +747,7 @@ esutils@^2.0.2: resolved "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== -events@^3.3.0, events@3.3.0: +events@3.3.0: version "3.3.0" resolved "https://registry.npmjs.org/events/-/events-3.3.0.tgz" integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== @@ -1137,11 +1057,6 @@ lodash.union@^4.6.0: resolved "https://registry.npmjs.org/lodash.union/-/lodash.union-4.6.0.tgz" integrity sha512-c4pB2CdGrGdjMKYLA+XiRDO7Y0PRQbm/Gzg8qMj+QH+pFVAoTp5sBpO0odL3FjoPCGjK96p6qsP+yQoiLoOBcw== -long@^5.0.0, long@^5.2.3: - version "5.2.3" - resolved "https://registry.npmjs.org/long/-/long-5.2.3.tgz" - integrity sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q== - loose-envify@^1.1.0: version "1.4.0" resolved "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz" @@ -1352,24 +1267,6 @@ properties-reader@^2.3.0: dependencies: mkdirp "^1.0.4" -protobufjs@^7.2.4: - version "7.2.6" - resolved "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.6.tgz" - integrity sha512-dgJaEDDL6x8ASUZ1YqWciTRrdOuYNzoOf27oHNfdyvKqHr5i0FV7FSLU+aIeFjyFgVxrpTOtQUi0BLLBymZaBw== - dependencies: - "@protobufjs/aspromise" "^1.1.2" - "@protobufjs/base64" "^1.1.2" - "@protobufjs/codegen" "^2.0.4" - "@protobufjs/eventemitter" "^1.1.0" - "@protobufjs/fetch" "^1.1.0" - "@protobufjs/float" "^1.0.2" - "@protobufjs/inquire" "^1.1.0" - "@protobufjs/path" "^1.1.2" - "@protobufjs/pool" "^1.1.0" - "@protobufjs/utf8" "^1.1.0" - "@types/node" ">=13.7.0" - long "^5.0.0" - pump@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz" @@ -1686,31 +1583,6 @@ ts-api-utils@^1.0.1: resolved "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.3.tgz" integrity sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg== -ts-poet@^6.5.0: - version "6.6.0" - resolved "https://registry.npmjs.org/ts-poet/-/ts-poet-6.6.0.tgz" - integrity sha512-4vEH/wkhcjRPFOdBwIh9ItO6jOoumVLRF4aABDX5JSNEubSqwOulihxQPqai+OkuygJm3WYMInxXQX4QwVNMuw== - dependencies: - dprint-node "^1.0.7" - -ts-proto-descriptors@1.15.0: - version "1.15.0" - resolved "https://registry.npmjs.org/ts-proto-descriptors/-/ts-proto-descriptors-1.15.0.tgz" - integrity sha512-TYyJ7+H+7Jsqawdv+mfsEpZPTIj9siDHS6EMCzG/z3b/PZiphsX+mWtqFfFVe5/N0Th6V3elK9lQqjnrgTOfrg== - dependencies: - long "^5.2.3" - protobufjs "^7.2.4" - -ts-proto@^1.165.0: - version "1.166.3" - resolved "https://registry.npmjs.org/ts-proto/-/ts-proto-1.166.3.tgz" - integrity sha512-Ad3TV7wH7m62fKHI55faq403OW9hC5XOGev+bDXHB5lmx1AhiZiH1ISQdk1sk33fRRy8lEBrKRknV41F3d7Nfw== - dependencies: - case-anything "^2.1.13" - protobufjs "^7.2.4" - ts-poet "^6.5.0" - ts-proto-descriptors "1.15.0" - tslib@^2.1.0: version "2.6.0" resolved "https://registry.npmjs.org/tslib/-/tslib-2.6.0.tgz" @@ -1777,11 +1649,6 @@ util-deprecate@^1.0.1, util-deprecate@~1.0.1: resolved "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== -uuid@^9.0.1: - version "9.0.1" - resolved "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz" - integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA== - vscode-oniguruma@^1.7.0: version "1.7.0" resolved "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz" From 2e38cb4b61113ea88ac0ecb5cc97c13d3ec9c091 Mon Sep 17 00:00:00 2001 From: Kamil Stasiak Date: Thu, 15 Feb 2024 13:28:45 +0100 Subject: [PATCH 2/9] Update ts-client-sdk --- examples/minimal-react/package-lock.json | 8 ++++---- .../use-camera-and-microphone-example/package-lock.json | 2 +- .../src/MainControls.tsx | 4 +++- .../src/jellyfishSetup.tsx | 7 ++++++- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/examples/minimal-react/package-lock.json b/examples/minimal-react/package-lock.json index 9731ce2..556f52d 100644 --- a/examples/minimal-react/package-lock.json +++ b/examples/minimal-react/package-lock.json @@ -26,10 +26,10 @@ }, "../..": { "name": "@jellyfish-dev/react-client-sdk", - "version": "0.1.6", + "version": "0.1.9", "license": "Apache-2.0", "dependencies": { - "@jellyfish-dev/ts-client-sdk": "^0.2.2", + "@jellyfish-dev/ts-client-sdk": "^0.3.0", "events": "3.3.0", "lodash.isequal": "4.5.0" }, @@ -45,13 +45,13 @@ "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.5", "prettier": "3.1.0", - "prettier-plugin-tailwindcss": "^0.5.8", + "prettier-plugin-tailwindcss": "0.5.7", "react": "^18.2.0", "testcontainers": "^10.3.2", "typed-emitter": "^2.1.0", "typedoc": "^0.25.4", "typedoc-plugin-mdn-links": "^3.1.6", - "typescript": "^5.3.2" + "typescript": "5.2.2" } }, "node_modules/@aashutoshrathi/word-wrap": { diff --git a/examples/use-camera-and-microphone-example/package-lock.json b/examples/use-camera-and-microphone-example/package-lock.json index 346b5a8..1ae721a 100644 --- a/examples/use-camera-and-microphone-example/package-lock.json +++ b/examples/use-camera-and-microphone-example/package-lock.json @@ -33,7 +33,7 @@ "version": "0.1.9", "license": "Apache-2.0", "dependencies": { - "@jellyfish-dev/ts-client-sdk": "file:../ts-client-sdk", + "@jellyfish-dev/ts-client-sdk": "^0.3.0", "events": "3.3.0", "lodash.isequal": "4.5.0" }, diff --git a/examples/use-camera-and-microphone-example/src/MainControls.tsx b/examples/use-camera-and-microphone-example/src/MainControls.tsx index 8502f7d..832b1bb 100644 --- a/examples/use-camera-and-microphone-example/src/MainControls.tsx +++ b/examples/use-camera-and-microphone-example/src/MainControls.tsx @@ -1,6 +1,7 @@ import { DEFAULT_AUDIO_TRACK_METADATA, DEFAULT_VIDEO_TRACK_METADATA, + EXAMPLE_PEER_METADATA, MANUAL_AUDIO_TRACK_METADATA, MANUAL_SCREENSHARE_TRACK_METADATA, MANUAL_VIDEO_TRACK_METADATA, @@ -64,6 +65,7 @@ export const MainControls = () => { defaultSimulcastConfig: { enabled: true, activeEncodings: ["l", "m", "h"], + disabledEncodings: [] }, }, microphone: { @@ -167,7 +169,7 @@ export const MainControls = () => { onClick={() => { if (!token || token === "") throw Error("Token is empty"); connect({ - peerMetadata: { name: "John Doe" }, // example metadata + peerMetadata: EXAMPLE_PEER_METADATA, token: token, }); }} diff --git a/examples/use-camera-and-microphone-example/src/jellyfishSetup.tsx b/examples/use-camera-and-microphone-example/src/jellyfishSetup.tsx index 2bdb70c..07f5b6d 100644 --- a/examples/use-camera-and-microphone-example/src/jellyfishSetup.tsx +++ b/examples/use-camera-and-microphone-example/src/jellyfishSetup.tsx @@ -21,7 +21,7 @@ export const DEFAULT_VIDEO_TRACK_METADATA: TrackMetadata = { export const MANUAL_VIDEO_TRACK_METADATA: TrackMetadata = { // @ts-ignore - type: "camera", + type: "camera2", mode: "manual", // @ts-ignore abc: "hello", @@ -47,6 +47,11 @@ export const MANUAL_SCREENSHARE_TRACK_METADATA: TrackMetadata = { mode: "manual", }; +export const EXAMPLE_PEER_METADATA: PeerMetadata = { + // @ts-ignore + name2: "John Doe", +}; + export const { useApi, useTracks, From 7f829d42fc93963f4c55662192436c0c0f8908e6 Mon Sep 17 00:00:00 2001 From: Kamil Stasiak Date: Thu, 15 Feb 2024 13:44:42 +0100 Subject: [PATCH 3/9] Update ts-client-sdk --- package-lock.json | 190 +++++++++++++++++++++++++++++++++++++++++++--- package.json | 2 +- src/api.tsx | 3 +- src/index.ts | 24 +----- src/reducer.tsx | 32 +++++--- yarn.lock | 145 +++++++++++++++++++++++++++++++++-- 6 files changed, 347 insertions(+), 49 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2c87d75..b556442 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "0.1.9", "license": "Apache-2.0", "dependencies": { - "@jellyfish-dev/ts-client-sdk": "file:../ts-client-sdk", + "@jellyfish-dev/ts-client-sdk": "^0.3.0", "events": "3.3.0", "lodash.isequal": "4.5.0" }, @@ -36,10 +36,11 @@ }, "../ts-client-sdk": { "name": "@jellyfish-dev/ts-client-sdk", - "version": "0.2.5", + "version": "0.3.0", + "extraneous": true, "license": "Apache-2.0", "dependencies": { - "@jellyfish-dev/membrane-webrtc-js": "github:jellyfish-dev/membrane-webrtc-js", + "@jellyfish-dev/membrane-webrtc-js": "^0.7.0", "events": "^3.3.0", "ts-proto": "^1.165.0", "typed-emitter": "^2.1.0" @@ -167,9 +168,26 @@ "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", "dev": true }, + "node_modules/@jellyfish-dev/membrane-webrtc-js": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@jellyfish-dev/membrane-webrtc-js/-/membrane-webrtc-js-0.7.0.tgz", + "integrity": "sha512-FEYpL52W1QekhPiv88hJY/0mlZwGu6cWWH/xvjgf1pehCXiyqYv6icIBRsYqRLdgmivVFTaUbQTLIv4Yn7RKYw==", + "dependencies": { + "events": "^3.3.0", + "typed-emitter": "^2.1.0", + "uuid": "^9.0.1" + } + }, "node_modules/@jellyfish-dev/ts-client-sdk": { - "resolved": "../ts-client-sdk", - "link": true + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@jellyfish-dev/ts-client-sdk/-/ts-client-sdk-0.3.0.tgz", + "integrity": "sha512-PoDpalc5sWWxgGYLt7wIMQDudaLs7nzh4Li6UNS8kPq8kzKPXUSqLLU6S23pzRdR+3DSwo/BwmyHgperVrsKjw==", + "dependencies": { + "@jellyfish-dev/membrane-webrtc-js": "^0.7.0", + "events": "^3.3.0", + "ts-proto": "^1.165.0", + "typed-emitter": "^2.1.0" + } }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", @@ -221,6 +239,60 @@ "node": ">=16" } }, + "node_modules/@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==" + }, + "node_modules/@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" + }, + "node_modules/@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" + }, + "node_modules/@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==" + }, + "node_modules/@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", + "dependencies": { + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" + } + }, + "node_modules/@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==" + }, + "node_modules/@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==" + }, + "node_modules/@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==" + }, + "node_modules/@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==" + }, + "node_modules/@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" + }, "node_modules/@types/docker-modem": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/@types/docker-modem/-/docker-modem-3.0.6.tgz", @@ -272,7 +344,6 @@ "version": "20.10.3", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.3.tgz", "integrity": "sha512-XJavIpZqiXID5Yxnxv3RUDKTN5b81ddNC3ecsA0SoFXz/QU8OGBwZGMomiq0zw+uuqbL/krztv/DINAQ/EV4gg==", - "dev": true, "dependencies": { "undici-types": "~5.26.4" } @@ -1010,6 +1081,17 @@ "node": ">=6" } }, + "node_modules/case-anything": { + "version": "2.1.13", + "resolved": "https://registry.npmjs.org/case-anything/-/case-anything-2.1.13.tgz", + "integrity": "sha512-zlOQ80VrQ2Ue+ymH5OuM/DlDq64mEm+B9UTdHULv5osUMD6HalNTblf2b1u/m6QecjsnOkBpqVZ+XPwIVsy7Ng==", + "engines": { + "node": ">=12.13" + }, + "funding": { + "url": "https://github.com/sponsors/mesqueeb" + } + }, "node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -1160,6 +1242,17 @@ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, + "node_modules/detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", + "bin": { + "detect-libc": "bin/detect-libc.js" + }, + "engines": { + "node": ">=0.10" + } + }, "node_modules/dir-glob": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", @@ -1237,6 +1330,14 @@ "node": ">=6.0.0" } }, + "node_modules/dprint-node": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/dprint-node/-/dprint-node-1.0.8.tgz", + "integrity": "sha512-iVKnUtYfGrYcW1ZAlfR/F59cUVL8QIhWoBJoSjkkdua/dkWIgjZfiLMeTjiB06X0ZLkQ0M2C1VbUj/CxkIf1zg==", + "dependencies": { + "detect-libc": "^1.0.3" + } + }, "node_modules/end-of-stream": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", @@ -1955,6 +2056,11 @@ "integrity": "sha512-c4pB2CdGrGdjMKYLA+XiRDO7Y0PRQbm/Gzg8qMj+QH+pFVAoTp5sBpO0odL3FjoPCGjK96p6qsP+yQoiLoOBcw==", "dev": true }, + "node_modules/long": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" + }, "node_modules/loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -2372,6 +2478,29 @@ "url": "https://github.com/steveukx/properties?sponsor=1" } }, + "node_modules/protobufjs": { + "version": "7.2.6", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.6.tgz", + "integrity": "sha512-dgJaEDDL6x8ASUZ1YqWciTRrdOuYNzoOf27oHNfdyvKqHr5i0FV7FSLU+aIeFjyFgVxrpTOtQUi0BLLBymZaBw==", + "hasInstallScript": true, + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/node": ">=13.7.0", + "long": "^5.0.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/pump": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", @@ -2543,7 +2672,6 @@ "version": "7.8.1", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", - "dev": true, "optional": true, "dependencies": { "tslib": "^2.1.0" @@ -2553,7 +2681,6 @@ "version": "2.6.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.0.tgz", "integrity": "sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==", - "dev": true, "optional": true }, "node_modules/safe-buffer": { @@ -2843,6 +2970,37 @@ "typescript": ">=4.2.0" } }, + "node_modules/ts-poet": { + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/ts-poet/-/ts-poet-6.6.0.tgz", + "integrity": "sha512-4vEH/wkhcjRPFOdBwIh9ItO6jOoumVLRF4aABDX5JSNEubSqwOulihxQPqai+OkuygJm3WYMInxXQX4QwVNMuw==", + "dependencies": { + "dprint-node": "^1.0.7" + } + }, + "node_modules/ts-proto": { + "version": "1.167.3", + "resolved": "https://registry.npmjs.org/ts-proto/-/ts-proto-1.167.3.tgz", + "integrity": "sha512-quBKTeIgqhTGKXl5JN7HHZjLwrdMaNIoQ0+X11PqNLVRqTlnEzfiCUXM6HOW4pZa6PD5+qSyKOEGaTa3kS7Glg==", + "dependencies": { + "case-anything": "^2.1.13", + "protobufjs": "^7.2.4", + "ts-poet": "^6.5.0", + "ts-proto-descriptors": "1.15.0" + }, + "bin": { + "protoc-gen-ts_proto": "protoc-gen-ts_proto" + } + }, + "node_modules/ts-proto-descriptors": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/ts-proto-descriptors/-/ts-proto-descriptors-1.15.0.tgz", + "integrity": "sha512-TYyJ7+H+7Jsqawdv+mfsEpZPTIj9siDHS6EMCzG/z3b/PZiphsX+mWtqFfFVe5/N0Th6V3elK9lQqjnrgTOfrg==", + "dependencies": { + "long": "^5.2.3", + "protobufjs": "^7.2.4" + } + }, "node_modules/tweetnacl": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", @@ -2877,7 +3035,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/typed-emitter/-/typed-emitter-2.1.0.tgz", "integrity": "sha512-g/KzbYKbH5C2vPkaXGu8DJlHrGKHLsM25Zg9WuC9pMGfuvT+X25tZQWo5fK1BjBm8+UrVE9LDCvaY0CQk+fXDA==", - "dev": true, "optionalDependencies": { "rxjs": "*" } @@ -2952,8 +3109,7 @@ "node_modules/undici-types": { "version": "5.26.5", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", - "dev": true + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" }, "node_modules/uri-js": { "version": "4.4.1", @@ -2970,6 +3126,18 @@ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "dev": true }, + "node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/vscode-oniguruma": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz", diff --git a/package.json b/package.json index 8165b45..4cd3148 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,7 @@ "typescript": "5.2.2" }, "dependencies": { - "@jellyfish-dev/ts-client-sdk": "file:../ts-client-sdk", + "@jellyfish-dev/ts-client-sdk": "^0.3.0", "events": "3.3.0", "lodash.isequal": "4.5.0" }, diff --git a/src/api.tsx b/src/api.tsx index a0700b5..f0d7675 100644 --- a/src/api.tsx +++ b/src/api.tsx @@ -46,7 +46,8 @@ export const createApiWrapper = ( trackMetadata?: TrackMetadata, simulcastConfig?: SimulcastConfig, maxBandwidth?: TrackBandwidthLimit, - ) => { + ): Promise => { + // todo could reject() so this line could throw an exception const remoteTrackId = await webrtc.addTrack(track, stream, trackMetadata, simulcastConfig, maxBandwidth); dispatch({ type: "localAddTrack", remoteTrackId, track, stream, trackMetadata, simulcastConfig }); return remoteTrackId; diff --git a/src/index.ts b/src/index.ts index 3a96282..b706180 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,9 +1,4 @@ -export { - create, - // CreateJellyfishClient, - // JellyfishContextProviderProps, - UseConnect, -} from "./create"; +export { create, CreateJellyfishClient, UseConnect } from "./create"; export { PeerState, @@ -21,15 +16,7 @@ export { export { Api } from "./api"; -export { - INITIAL_STATE, - MediaReducer, - userMediaReducer, - useUserMedia, - UseUserMediaAction, - useUserMediaInternal, - parseError, -} from "./useUserMedia"; +export { useUserMedia } from "./useUserMedia"; export { useSetupMedia } from "./useMedia/index"; @@ -46,10 +33,6 @@ export { AUDIO_TRACK_CONSTRAINTS, VIDEO_TRACK_CONSTRAINTS, SCREEN_SHARING_MEDIA_CONSTRAINTS, - // getExactDeviceConstraint, - // prepareConstraints, - // prepareMediaTrackConstraints, - // toMediaTrackConstraints, } from "./useUserMedia/constraints"; export type { @@ -57,7 +40,6 @@ export type { MessageEvents, SignalingUrl, CreateConfig, - JellyfishClient, TrackBandwidthLimit, SimulcastBandwidthLimit, BandwidthLimit, @@ -70,3 +52,5 @@ export type { VadStatus, EncodingReason, } from "@jellyfish-dev/ts-client-sdk"; + +export { JellyfishClient } from "@jellyfish-dev/ts-client-sdk"; diff --git a/src/reducer.tsx b/src/reducer.tsx index d823969..77f4a55 100644 --- a/src/reducer.tsx +++ b/src/reducer.tsx @@ -368,16 +368,28 @@ const onConnect = ( action.dispatch({ type: "onTracksPriorityChanged", enabledTracks, disabledTracks }); }); - client.connect(action.config); - - return { - ...state, - status: "connecting", - connectivity: { - api, - client, - }, - }; + try { + client.connect(action.config); + return { + ...state, + status: "connecting", + connectivity: { + api, + client, + }, + }; + } catch (e) { + // todo temporary solution + action.dispatch({ type: "onJoinError", metadata: "any" }); + return { + ...state, + status: "error", + connectivity: { + api, + client, + }, + }; + } }; export const reducer = ( diff --git a/yarn.lock b/yarn.lock index 57bc3f3..68d88b7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -63,11 +63,21 @@ resolved "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz" integrity sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw== -"@jellyfish-dev/ts-client-sdk@file:../ts-client-sdk": - version "0.2.5" - resolved "file:../ts-client-sdk" +"@jellyfish-dev/membrane-webrtc-js@^0.7.0": + version "0.7.0" + resolved "https://registry.npmjs.org/@jellyfish-dev/membrane-webrtc-js/-/membrane-webrtc-js-0.7.0.tgz" + integrity sha512-FEYpL52W1QekhPiv88hJY/0mlZwGu6cWWH/xvjgf1pehCXiyqYv6icIBRsYqRLdgmivVFTaUbQTLIv4Yn7RKYw== dependencies: - "@jellyfish-dev/membrane-webrtc-js" "github:jellyfish-dev/membrane-webrtc-js" + events "^3.3.0" + typed-emitter "^2.1.0" + uuid "^9.0.1" + +"@jellyfish-dev/ts-client-sdk@^0.3.0": + version "0.3.0" + resolved "https://registry.npmjs.org/@jellyfish-dev/ts-client-sdk/-/ts-client-sdk-0.3.0.tgz" + integrity sha512-PoDpalc5sWWxgGYLt7wIMQDudaLs7nzh4Li6UNS8kPq8kzKPXUSqLLU6S23pzRdR+3DSwo/BwmyHgperVrsKjw== + dependencies: + "@jellyfish-dev/membrane-webrtc-js" "^0.7.0" events "^3.3.0" ts-proto "^1.165.0" typed-emitter "^2.1.0" @@ -100,6 +110,59 @@ dependencies: playwright "1.40.1" +"@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": + version "1.1.2" + resolved "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz" + integrity sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ== + +"@protobufjs/base64@^1.1.2": + version "1.1.2" + resolved "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz" + integrity sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg== + +"@protobufjs/codegen@^2.0.4": + version "2.0.4" + resolved "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz" + integrity sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg== + +"@protobufjs/eventemitter@^1.1.0": + version "1.1.0" + resolved "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz" + integrity sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q== + +"@protobufjs/fetch@^1.1.0": + version "1.1.0" + resolved "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz" + integrity sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ== + dependencies: + "@protobufjs/aspromise" "^1.1.1" + "@protobufjs/inquire" "^1.1.0" + +"@protobufjs/float@^1.0.2": + version "1.0.2" + resolved "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz" + integrity sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ== + +"@protobufjs/inquire@^1.1.0": + version "1.1.0" + resolved "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz" + integrity sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q== + +"@protobufjs/path@^1.1.2": + version "1.1.2" + resolved "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz" + integrity sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA== + +"@protobufjs/pool@^1.1.0": + version "1.1.0" + resolved "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz" + integrity sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw== + +"@protobufjs/utf8@^1.1.0": + version "1.1.0" + resolved "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz" + integrity sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw== + "@types/docker-modem@*": version "3.0.6" resolved "https://registry.npmjs.org/@types/docker-modem/-/docker-modem-3.0.6.tgz" @@ -138,7 +201,7 @@ resolved "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.195.tgz" integrity sha512-Hwx9EUgdwf2GLarOjQp5ZH8ZmblzcbTBC2wtQWNKARBSxM9ezRIAUpeDTgoQRAFB0+8CNWXVA9+MaSOzOF3nPg== -"@types/node@*", "@types/node@^20.10.3": +"@types/node@*", "@types/node@^20.10.3", "@types/node@>=13.7.0": version "20.10.3" resolved "https://registry.npmjs.org/@types/node/-/node-20.10.3.tgz" integrity sha512-XJavIpZqiXID5Yxnxv3RUDKTN5b81ddNC3ecsA0SoFXz/QU8OGBwZGMomiq0zw+uuqbL/krztv/DINAQ/EV4gg== @@ -498,6 +561,11 @@ callsites@^3.0.0: resolved "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== +case-anything@^2.1.13: + version "2.1.13" + resolved "https://registry.npmjs.org/case-anything/-/case-anything-2.1.13.tgz" + integrity sha512-zlOQ80VrQ2Ue+ymH5OuM/DlDq64mEm+B9UTdHULv5osUMD6HalNTblf2b1u/m6QecjsnOkBpqVZ+XPwIVsy7Ng== + chalk@^4.0.0: version "4.1.2" resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" @@ -590,6 +658,11 @@ deep-is@^0.1.3: resolved "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz" integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== +detect-libc@^1.0.3: + version "1.0.3" + resolved "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz" + integrity sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg== + dir-glob@^3.0.1: version "3.0.1" resolved "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz" @@ -630,6 +703,13 @@ doctrine@^3.0.0: dependencies: esutils "^2.0.2" +dprint-node@^1.0.7: + version "1.0.8" + resolved "https://registry.npmjs.org/dprint-node/-/dprint-node-1.0.8.tgz" + integrity sha512-iVKnUtYfGrYcW1ZAlfR/F59cUVL8QIhWoBJoSjkkdua/dkWIgjZfiLMeTjiB06X0ZLkQ0M2C1VbUj/CxkIf1zg== + dependencies: + detect-libc "^1.0.3" + end-of-stream@^1.1.0, end-of-stream@^1.4.1: version "1.4.4" resolved "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz" @@ -747,7 +827,7 @@ esutils@^2.0.2: resolved "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== -events@3.3.0: +events@^3.3.0, events@3.3.0: version "3.3.0" resolved "https://registry.npmjs.org/events/-/events-3.3.0.tgz" integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== @@ -1057,6 +1137,11 @@ lodash.union@^4.6.0: resolved "https://registry.npmjs.org/lodash.union/-/lodash.union-4.6.0.tgz" integrity sha512-c4pB2CdGrGdjMKYLA+XiRDO7Y0PRQbm/Gzg8qMj+QH+pFVAoTp5sBpO0odL3FjoPCGjK96p6qsP+yQoiLoOBcw== +long@^5.0.0, long@^5.2.3: + version "5.2.3" + resolved "https://registry.npmjs.org/long/-/long-5.2.3.tgz" + integrity sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q== + loose-envify@^1.1.0: version "1.4.0" resolved "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz" @@ -1267,6 +1352,24 @@ properties-reader@^2.3.0: dependencies: mkdirp "^1.0.4" +protobufjs@^7.2.4: + version "7.2.6" + resolved "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.6.tgz" + integrity sha512-dgJaEDDL6x8ASUZ1YqWciTRrdOuYNzoOf27oHNfdyvKqHr5i0FV7FSLU+aIeFjyFgVxrpTOtQUi0BLLBymZaBw== + dependencies: + "@protobufjs/aspromise" "^1.1.2" + "@protobufjs/base64" "^1.1.2" + "@protobufjs/codegen" "^2.0.4" + "@protobufjs/eventemitter" "^1.1.0" + "@protobufjs/fetch" "^1.1.0" + "@protobufjs/float" "^1.0.2" + "@protobufjs/inquire" "^1.1.0" + "@protobufjs/path" "^1.1.2" + "@protobufjs/pool" "^1.1.0" + "@protobufjs/utf8" "^1.1.0" + "@types/node" ">=13.7.0" + long "^5.0.0" + pump@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz" @@ -1583,6 +1686,31 @@ ts-api-utils@^1.0.1: resolved "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.3.tgz" integrity sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg== +ts-poet@^6.5.0: + version "6.6.0" + resolved "https://registry.npmjs.org/ts-poet/-/ts-poet-6.6.0.tgz" + integrity sha512-4vEH/wkhcjRPFOdBwIh9ItO6jOoumVLRF4aABDX5JSNEubSqwOulihxQPqai+OkuygJm3WYMInxXQX4QwVNMuw== + dependencies: + dprint-node "^1.0.7" + +ts-proto-descriptors@1.15.0: + version "1.15.0" + resolved "https://registry.npmjs.org/ts-proto-descriptors/-/ts-proto-descriptors-1.15.0.tgz" + integrity sha512-TYyJ7+H+7Jsqawdv+mfsEpZPTIj9siDHS6EMCzG/z3b/PZiphsX+mWtqFfFVe5/N0Th6V3elK9lQqjnrgTOfrg== + dependencies: + long "^5.2.3" + protobufjs "^7.2.4" + +ts-proto@^1.165.0: + version "1.167.3" + resolved "https://registry.npmjs.org/ts-proto/-/ts-proto-1.167.3.tgz" + integrity sha512-quBKTeIgqhTGKXl5JN7HHZjLwrdMaNIoQ0+X11PqNLVRqTlnEzfiCUXM6HOW4pZa6PD5+qSyKOEGaTa3kS7Glg== + dependencies: + case-anything "^2.1.13" + protobufjs "^7.2.4" + ts-poet "^6.5.0" + ts-proto-descriptors "1.15.0" + tslib@^2.1.0: version "2.6.0" resolved "https://registry.npmjs.org/tslib/-/tslib-2.6.0.tgz" @@ -1649,6 +1777,11 @@ util-deprecate@^1.0.1, util-deprecate@~1.0.1: resolved "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== +uuid@^9.0.1: + version "9.0.1" + resolved "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz" + integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA== + vscode-oniguruma@^1.7.0: version "1.7.0" resolved "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz" From ffc67b0d0468f67f5f2017ea6a11518dffee0a50 Mon Sep 17 00:00:00 2001 From: Kamil Stasiak Date: Thu, 15 Feb 2024 13:46:54 +0100 Subject: [PATCH 4/9] Update dependencies in examples --- examples/minimal-react/package-lock.json | 197 +++++++++--------- examples/minimal-react/package.json | 16 +- .../package-lock.json | 124 +++++------ .../package.json | 18 +- 4 files changed, 179 insertions(+), 176 deletions(-) diff --git a/examples/minimal-react/package-lock.json b/examples/minimal-react/package-lock.json index 556f52d..585b97c 100644 --- a/examples/minimal-react/package-lock.json +++ b/examples/minimal-react/package-lock.json @@ -14,14 +14,14 @@ "react-dom": "^18.2.0" }, "devDependencies": { - "@types/react": "^18.2.42", - "@types/react-dom": "^18.2.17", - "@vitejs/plugin-react-swc": "^3.5.0", - "autoprefixer": "^10.4.16", - "postcss": "^8.4.32", - "typescript": "^5.3.2", - "vite": "^5.0.5", - "vite-plugin-checker": "^0.6.2" + "@types/react": "^18.2.55", + "@types/react-dom": "^18.2.19", + "@vitejs/plugin-react-swc": "^3.6.0", + "autoprefixer": "^10.4.17", + "postcss": "^8.4.35", + "typescript": "^5.3.3", + "vite": "^5.1.2", + "vite-plugin-checker": "^0.6.4" } }, "../..": { @@ -822,13 +822,13 @@ ] }, "node_modules/@swc/core": { - "version": "1.3.100", - "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.3.100.tgz", - "integrity": "sha512-7dKgTyxJjlrMwFZYb1auj3Xq0D8ZBe+5oeIgfMlRU05doXZypYJe0LAk0yjj3WdbwYzpF+T1PLxwTWizI0pckw==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.4.1.tgz", + "integrity": "sha512-3y+Y8js+e7BbM16iND+6Rcs3jdiL28q3iVtYsCviYSSpP2uUVKkp5sJnCY4pg8AaVvyN7CGQHO7gLEZQ5ByozQ==", "dev": true, "hasInstallScript": true, "dependencies": { - "@swc/counter": "^0.1.1", + "@swc/counter": "^0.1.2", "@swc/types": "^0.1.5" }, "engines": { @@ -839,15 +839,16 @@ "url": "https://opencollective.com/swc" }, "optionalDependencies": { - "@swc/core-darwin-arm64": "1.3.100", - "@swc/core-darwin-x64": "1.3.100", - "@swc/core-linux-arm64-gnu": "1.3.100", - "@swc/core-linux-arm64-musl": "1.3.100", - "@swc/core-linux-x64-gnu": "1.3.100", - "@swc/core-linux-x64-musl": "1.3.100", - "@swc/core-win32-arm64-msvc": "1.3.100", - "@swc/core-win32-ia32-msvc": "1.3.100", - "@swc/core-win32-x64-msvc": "1.3.100" + "@swc/core-darwin-arm64": "1.4.1", + "@swc/core-darwin-x64": "1.4.1", + "@swc/core-linux-arm-gnueabihf": "1.4.1", + "@swc/core-linux-arm64-gnu": "1.4.1", + "@swc/core-linux-arm64-musl": "1.4.1", + "@swc/core-linux-x64-gnu": "1.4.1", + "@swc/core-linux-x64-musl": "1.4.1", + "@swc/core-win32-arm64-msvc": "1.4.1", + "@swc/core-win32-ia32-msvc": "1.4.1", + "@swc/core-win32-x64-msvc": "1.4.1" }, "peerDependencies": { "@swc/helpers": "^0.5.0" @@ -859,9 +860,9 @@ } }, "node_modules/@swc/core-darwin-arm64": { - "version": "1.3.100", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.100.tgz", - "integrity": "sha512-XVWFsKe6ei+SsDbwmsuRkYck1SXRpO60Hioa4hoLwR8fxbA9eVp6enZtMxzVVMBi8ej5seZ4HZQeAWepbukiBw==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.4.1.tgz", + "integrity": "sha512-ePyfx0348UbR4DOAW24TedeJbafnzha8liXFGuQ4bdXtEVXhLfPngprrxKrAddCuv42F9aTxydlF6+adD3FBhA==", "cpu": [ "arm64" ], @@ -875,9 +876,9 @@ } }, "node_modules/@swc/core-darwin-x64": { - "version": "1.3.100", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.3.100.tgz", - "integrity": "sha512-KF/MXrnH1nakm1wbt4XV8FS7kvqD9TGmVxeJ0U4bbvxXMvzeYUurzg3AJUTXYmXDhH/VXOYJE5N5RkwZZPs5iA==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.4.1.tgz", + "integrity": "sha512-eLf4JSe6VkCMdDowjM8XNC5rO+BrgfbluEzAVtKR8L2HacNYukieumN7EzpYCi0uF1BYwu1ku6tLyG2r0VcGxA==", "cpu": [ "x64" ], @@ -890,10 +891,26 @@ "node": ">=10" } }, + "node_modules/@swc/core-linux-arm-gnueabihf": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.4.1.tgz", + "integrity": "sha512-K8VtTLWMw+rkN/jDC9o/Q9SMmzdiHwYo2CfgkwVT29NsGccwmNhCQx6XoYiPKyKGIFKt4tdQnJHKUFzxUqQVtQ==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, "node_modules/@swc/core-linux-arm64-gnu": { - "version": "1.3.100", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.100.tgz", - "integrity": "sha512-p8hikNnAEJrw5vHCtKiFT4hdlQxk1V7vqPmvUDgL/qe2menQDK/i12tbz7/3BEQ4UqUPnvwpmVn2d19RdEMNxw==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.4.1.tgz", + "integrity": "sha512-0e8p4g0Bfkt8lkiWgcdiENH3RzkcqKtpRXIVNGOmVc0OBkvc2tpm2WTx/eoCnes2HpTT4CTtR3Zljj4knQ4Fvw==", "cpu": [ "arm64" ], @@ -907,9 +924,9 @@ } }, "node_modules/@swc/core-linux-arm64-musl": { - "version": "1.3.100", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.100.tgz", - "integrity": "sha512-BWx/0EeY89WC4q3AaIaBSGfQxkYxIlS3mX19dwy2FWJs/O+fMvF9oLk/CyJPOZzbp+1DjGeeoGFuDYpiNO91JA==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.4.1.tgz", + "integrity": "sha512-b/vWGQo2n7lZVUnSQ7NBq3Qrj85GrAPPiRbpqaIGwOytiFSk8VULFihbEUwDe0rXgY4LDm8z8wkgADZcLnmdUA==", "cpu": [ "arm64" ], @@ -923,9 +940,9 @@ } }, "node_modules/@swc/core-linux-x64-gnu": { - "version": "1.3.100", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.100.tgz", - "integrity": "sha512-XUdGu3dxAkjsahLYnm8WijPfKebo+jHgHphDxaW0ovI6sTdmEGFDew7QzKZRlbYL2jRkUuuKuDGvD6lO5frmhA==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.4.1.tgz", + "integrity": "sha512-AFMQlvkKEdNi1Vk2GFTxxJzbICttBsOQaXa98kFTeWTnFFIyiIj2w7Sk8XRTEJ/AjF8ia8JPKb1zddBWr9+bEQ==", "cpu": [ "x64" ], @@ -939,9 +956,9 @@ } }, "node_modules/@swc/core-linux-x64-musl": { - "version": "1.3.100", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.100.tgz", - "integrity": "sha512-PhoXKf+f0OaNW/GCuXjJ0/KfK9EJX7z2gko+7nVnEA0p3aaPtbP6cq1Ubbl6CMoPL+Ci3gZ7nYumDqXNc3CtLQ==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.4.1.tgz", + "integrity": "sha512-QX2MxIECX1gfvUVZY+jk528/oFkS9MAl76e3ZRvG2KC/aKlCQL0KSzcTSm13mOxkDKS30EaGRDRQWNukGpMeRg==", "cpu": [ "x64" ], @@ -955,9 +972,9 @@ } }, "node_modules/@swc/core-win32-arm64-msvc": { - "version": "1.3.100", - "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.100.tgz", - "integrity": "sha512-PwLADZN6F9cXn4Jw52FeP/MCLVHm8vwouZZSOoOScDtihjY495SSjdPnlosMaRSR4wJQssGwiD/4MbpgQPqbAw==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.4.1.tgz", + "integrity": "sha512-OklkJYXXI/tntD2zaY8i3iZldpyDw5q+NAP3k9OlQ7wXXf37djRsHLV0NW4+ZNHBjE9xp2RsXJ0jlOJhfgGoFA==", "cpu": [ "arm64" ], @@ -971,9 +988,9 @@ } }, "node_modules/@swc/core-win32-ia32-msvc": { - "version": "1.3.100", - "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.100.tgz", - "integrity": "sha512-0f6nicKSLlDKlyPRl2JEmkpBV4aeDfRQg6n8mPqgL7bliZIcDahG0ej+HxgNjZfS3e0yjDxsNRa6sAqWU2Z60A==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.4.1.tgz", + "integrity": "sha512-MBuc3/QfKX9FnLOU7iGN+6yHRTQaPQ9WskiC8s8JFiKQ+7I2p25tay2RplR9dIEEGgVAu6L7auv96LbNTh+FaA==", "cpu": [ "ia32" ], @@ -987,9 +1004,9 @@ } }, "node_modules/@swc/core-win32-x64-msvc": { - "version": "1.3.100", - "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.100.tgz", - "integrity": "sha512-b7J0rPoMkRTa3XyUGt8PwCaIBuYWsL2DqbirrQKRESzgCvif5iNpqaM6kjIjI/5y5q1Ycv564CB51YDpiS8EtQ==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.4.1.tgz", + "integrity": "sha512-lu4h4wFBb/bOK6N2MuZwg7TrEpwYXgpQf5R7ObNSXL65BwZ9BG8XRzD+dLJmALu8l5N08rP/TrpoKRoGT4WSxw==", "cpu": [ "x64" ], @@ -1003,9 +1020,9 @@ } }, "node_modules/@swc/counter": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.2.tgz", - "integrity": "sha512-9F4ys4C74eSTEUNndnER3VJ15oru2NumfQxS8geE+f3eB5xvfxpWyqE5XlVnxb/R14uoXi6SLbBwwiDSkv+XEw==", + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz", + "integrity": "sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==", "dev": true }, "node_modules/@swc/types": { @@ -1021,9 +1038,9 @@ "dev": true }, "node_modules/@types/react": { - "version": "18.2.42", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.42.tgz", - "integrity": "sha512-c1zEr96MjakLYus/wPnuWDo1/zErfdU9rNsIGmE+NV71nx88FG9Ttgo5dqorXTu/LImX2f63WBP986gJkMPNbA==", + "version": "18.2.55", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.55.tgz", + "integrity": "sha512-Y2Tz5P4yz23brwm2d7jNon39qoAtMMmalOQv6+fEFt1mT+FcM3D841wDpoUvFXhaYenuROCy3FZYqdTjM7qVyA==", "dev": true, "dependencies": { "@types/prop-types": "*", @@ -1032,9 +1049,9 @@ } }, "node_modules/@types/react-dom": { - "version": "18.2.17", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.17.tgz", - "integrity": "sha512-rvrT/M7Df5eykWFxn6MYt5Pem/Dbyc1N8Y0S9Mrkw2WFCRiqUgw9P7ul2NpwsXCSM1DVdENzdG9J5SreqfAIWg==", + "version": "18.2.19", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.19.tgz", + "integrity": "sha512-aZvQL6uUbIJpjZk4U8JZGbau9KDeAwMfmhyWorxgBkqDIEf6ROjRozcmPIicqsUwPUjbkDfHKgGee1Lq65APcA==", "dev": true, "dependencies": { "@types/react": "*" @@ -1047,12 +1064,12 @@ "dev": true }, "node_modules/@vitejs/plugin-react-swc": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-react-swc/-/plugin-react-swc-3.5.0.tgz", - "integrity": "sha512-1PrOvAaDpqlCV+Up8RkAh9qaiUjoDUcjtttyhXDKw53XA6Ve16SOp6cCOpRs8Dj8DqUQs6eTW5YkLcLJjrXAig==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react-swc/-/plugin-react-swc-3.6.0.tgz", + "integrity": "sha512-XFRbsGgpGxGzEV5i5+vRiro1bwcIaZDIdBRP16qwm+jP68ue/S8FJTBEgOeojtVDYrbSua3XFp71kC8VJE6v+g==", "dev": true, "dependencies": { - "@swc/core": "^1.3.96" + "@swc/core": "^1.3.107" }, "peerDependencies": { "vite": "^4 || ^5" @@ -1174,9 +1191,9 @@ "peer": true }, "node_modules/autoprefixer": { - "version": "10.4.16", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.16.tgz", - "integrity": "sha512-7vd3UC6xKp0HLfua5IjZlcXvGAGy7cBAXTg2lyQ/8WpNhd6SiZ8Be+xm3FyBSYJx5GKcpRCzBh7RH4/0dnY+uQ==", + "version": "10.4.17", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.17.tgz", + "integrity": "sha512-/cpVNRLSfhOtcGflT13P2794gVSgmPgTR+erw5ifnMLZb0UnSlkK4tquLmkd3BhA+nLo5tX8Cu0upUsGKvKbmg==", "dev": true, "funding": [ { @@ -1193,9 +1210,9 @@ } ], "dependencies": { - "browserslist": "^4.21.10", - "caniuse-lite": "^1.0.30001538", - "fraction.js": "^4.3.6", + "browserslist": "^4.22.2", + "caniuse-lite": "^1.0.30001578", + "fraction.js": "^4.3.7", "normalize-range": "^0.1.2", "picocolors": "^1.0.0", "postcss-value-parser": "^4.2.0" @@ -1291,9 +1308,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001566", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001566.tgz", - "integrity": "sha512-ggIhCsTxmITBAMmK8yZjEhCO5/47jKXPu6Dha/wuCS4JePVL+3uiDEBuhu2aIoT+bqTOR8L76Ip1ARL9xYsEJA==", + "version": "1.0.30001587", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001587.tgz", + "integrity": "sha512-HMFNotUmLXn71BQxg8cijvqxnIAofforZOwGsxyXJ0qugTdspUF4sPSJ2vhgprHCB996tIDzEq1ubumPDV8ULA==", "dev": true, "funding": [ { @@ -2161,12 +2178,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/lodash.debounce": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", - "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", - "dev": true - }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -2175,12 +2186,6 @@ "optional": true, "peer": true }, - "node_modules/lodash.pick": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz", - "integrity": "sha512-hXt6Ul/5yWjfklSGvLQl8vM//l3FtyHZeuelpzK6mm99pNvN9yTDruNZPEJZD1oWrqo+izBmB7oUfWgcCX7s4Q==", - "dev": true - }, "node_modules/loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -2436,9 +2441,9 @@ } }, "node_modules/postcss": { - "version": "8.4.32", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.32.tgz", - "integrity": "sha512-D/kj5JNu6oo2EIy+XL/26JEDTlIbB8hw85G8StOE6L74RQAVVP5rej6wxCNqyMbR4RkPfqvezVbPw81Ngd6Kcw==", + "version": "8.4.35", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.35.tgz", + "integrity": "sha512-u5U8qYpBCpN13BsiEB0CbR1Hhh4Gc0zLFuedrHJKMctHCHAGrMdG0PRM/KErzAL3CU6/eckEtmHNB3x6e3c0vA==", "dev": true, "funding": [ { @@ -2785,9 +2790,9 @@ } }, "node_modules/typescript": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.2.tgz", - "integrity": "sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ==", + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", + "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -2848,13 +2853,13 @@ } }, "node_modules/vite": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.0.5.tgz", - "integrity": "sha512-OekeWqR9Ls56f3zd4CaxzbbS11gqYkEiBtnWFFgYR2WV8oPJRRKq0mpskYy/XaoCL3L7VINDhqqOMNDiYdGvGg==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.1.2.tgz", + "integrity": "sha512-uwiFebQbTWRIGbCaTEBVAfKqgqKNKMJ2uPXsXeLIZxM8MVMjoS3j0cG8NrPxdDIadaWnPSjrkLWffLSC+uiP3Q==", "dev": true, "dependencies": { "esbuild": "^0.19.3", - "postcss": "^8.4.32", + "postcss": "^8.4.35", "rollup": "^4.2.0" }, "bin": { @@ -2903,9 +2908,9 @@ } }, "node_modules/vite-plugin-checker": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/vite-plugin-checker/-/vite-plugin-checker-0.6.2.tgz", - "integrity": "sha512-YvvvQ+IjY09BX7Ab+1pjxkELQsBd4rPhWNw8WLBeFVxu/E7O+n6VYAqNsKdK/a2luFlX/sMpoWdGFfg4HvwdJQ==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/vite-plugin-checker/-/vite-plugin-checker-0.6.4.tgz", + "integrity": "sha512-2zKHH5oxr+ye43nReRbC2fny1nyARwhxdm0uNYp/ERy4YvU9iZpNOsueoi/luXw5gnpqRSvjcEPxXbS153O2wA==", "dev": true, "dependencies": { "@babel/code-frame": "^7.12.13", @@ -2915,8 +2920,6 @@ "commander": "^8.0.0", "fast-glob": "^3.2.7", "fs-extra": "^11.1.0", - "lodash.debounce": "^4.0.8", - "lodash.pick": "^4.4.0", "npm-run-path": "^4.0.1", "semver": "^7.5.0", "strip-ansi": "^6.0.0", diff --git a/examples/minimal-react/package.json b/examples/minimal-react/package.json index 12c0a1d..53f7c27 100644 --- a/examples/minimal-react/package.json +++ b/examples/minimal-react/package.json @@ -16,13 +16,13 @@ "react-dom": "^18.2.0" }, "devDependencies": { - "@types/react": "^18.2.42", - "@types/react-dom": "^18.2.17", - "@vitejs/plugin-react-swc": "^3.5.0", - "autoprefixer": "^10.4.16", - "postcss": "^8.4.32", - "typescript": "^5.3.2", - "vite": "^5.0.5", - "vite-plugin-checker": "^0.6.2" + "@types/react": "^18.2.55", + "@types/react-dom": "^18.2.19", + "@vitejs/plugin-react-swc": "^3.6.0", + "autoprefixer": "^10.4.17", + "postcss": "^8.4.35", + "typescript": "^5.3.3", + "vite": "^5.1.2", + "vite-plugin-checker": "^0.6.4" } } diff --git a/examples/use-camera-and-microphone-example/package-lock.json b/examples/use-camera-and-microphone-example/package-lock.json index 1ae721a..7dc5f3a 100644 --- a/examples/use-camera-and-microphone-example/package-lock.json +++ b/examples/use-camera-and-microphone-example/package-lock.json @@ -10,22 +10,22 @@ "license": "Apache-2.0", "dependencies": { "@jellyfish-dev/react-client-sdk": "file:../..", - "jotai": "^2.6.0", + "jotai": "^2.6.4", "react": "^18.2.0", "react-dom": "^18.2.0", "zod": "^3.22.4" }, "devDependencies": { "@tailwindcss/typography": "^0.5.10", - "@types/react": "^18.2.42", - "@types/react-dom": "^18.2.17", + "@types/react": "^18.2.55", + "@types/react-dom": "^18.2.19", "@vitejs/plugin-react": "^4.2.1", - "autoprefixer": "^10.4.16", - "daisyui": "^4.4.19", - "postcss": "^8.4.32", - "tailwindcss": "^3.3.6", - "typescript": "^5.3.2", - "vite": "^5.0.5" + "autoprefixer": "^10.4.17", + "daisyui": "^4.7.2", + "postcss": "^8.4.35", + "tailwindcss": "^3.4.1", + "typescript": "^5.3.3", + "vite": "^5.1.2" } }, "../..": { @@ -1081,9 +1081,9 @@ "devOptional": true }, "node_modules/@types/react": { - "version": "18.2.42", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.42.tgz", - "integrity": "sha512-c1zEr96MjakLYus/wPnuWDo1/zErfdU9rNsIGmE+NV71nx88FG9Ttgo5dqorXTu/LImX2f63WBP986gJkMPNbA==", + "version": "18.2.55", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.55.tgz", + "integrity": "sha512-Y2Tz5P4yz23brwm2d7jNon39qoAtMMmalOQv6+fEFt1mT+FcM3D841wDpoUvFXhaYenuROCy3FZYqdTjM7qVyA==", "devOptional": true, "dependencies": { "@types/prop-types": "*", @@ -1092,9 +1092,9 @@ } }, "node_modules/@types/react-dom": { - "version": "18.2.17", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.17.tgz", - "integrity": "sha512-rvrT/M7Df5eykWFxn6MYt5Pem/Dbyc1N8Y0S9Mrkw2WFCRiqUgw9P7ul2NpwsXCSM1DVdENzdG9J5SreqfAIWg==", + "version": "18.2.19", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.19.tgz", + "integrity": "sha512-aZvQL6uUbIJpjZk4U8JZGbau9KDeAwMfmhyWorxgBkqDIEf6ROjRozcmPIicqsUwPUjbkDfHKgGee1Lq65APcA==", "dev": true, "dependencies": { "@types/react": "*" @@ -1163,9 +1163,9 @@ "dev": true }, "node_modules/autoprefixer": { - "version": "10.4.16", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.16.tgz", - "integrity": "sha512-7vd3UC6xKp0HLfua5IjZlcXvGAGy7cBAXTg2lyQ/8WpNhd6SiZ8Be+xm3FyBSYJx5GKcpRCzBh7RH4/0dnY+uQ==", + "version": "10.4.17", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.17.tgz", + "integrity": "sha512-/cpVNRLSfhOtcGflT13P2794gVSgmPgTR+erw5ifnMLZb0UnSlkK4tquLmkd3BhA+nLo5tX8Cu0upUsGKvKbmg==", "dev": true, "funding": [ { @@ -1182,9 +1182,9 @@ } ], "dependencies": { - "browserslist": "^4.21.10", - "caniuse-lite": "^1.0.30001538", - "fraction.js": "^4.3.6", + "browserslist": "^4.22.2", + "caniuse-lite": "^1.0.30001578", + "fraction.js": "^4.3.7", "normalize-range": "^0.1.2", "picocolors": "^1.0.0", "postcss-value-parser": "^4.2.0" @@ -1237,9 +1237,9 @@ } }, "node_modules/browserslist": { - "version": "4.21.10", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.10.tgz", - "integrity": "sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ==", + "version": "4.23.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz", + "integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==", "dev": true, "funding": [ { @@ -1256,10 +1256,10 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001517", - "electron-to-chromium": "^1.4.477", - "node-releases": "^2.0.13", - "update-browserslist-db": "^1.0.11" + "caniuse-lite": "^1.0.30001587", + "electron-to-chromium": "^1.4.668", + "node-releases": "^2.0.14", + "update-browserslist-db": "^1.0.13" }, "bin": { "browserslist": "cli.js" @@ -1278,9 +1278,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001566", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001566.tgz", - "integrity": "sha512-ggIhCsTxmITBAMmK8yZjEhCO5/47jKXPu6Dha/wuCS4JePVL+3uiDEBuhu2aIoT+bqTOR8L76Ip1ARL9xYsEJA==", + "version": "1.0.30001587", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001587.tgz", + "integrity": "sha512-HMFNotUmLXn71BQxg8cijvqxnIAofforZOwGsxyXJ0qugTdspUF4sPSJ2vhgprHCB996tIDzEq1ubumPDV8ULA==", "dev": true, "funding": [ { @@ -1424,9 +1424,9 @@ } }, "node_modules/daisyui": { - "version": "4.4.19", - "resolved": "https://registry.npmjs.org/daisyui/-/daisyui-4.4.19.tgz", - "integrity": "sha512-IjOLWwnndD4N7Ut5CDxbUsaVtbqXPeVHM92IcgxGFxpuOd3CCKW/PAXZH6JoBTHFRaN57vB9XqEhdWm5yC+bPA==", + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/daisyui/-/daisyui-4.7.2.tgz", + "integrity": "sha512-9UCss12Zmyk/22u+JbkVrHHxOzFOyY17HuqP5LeswI4hclbj6qbjJTovdj2zRy8cCH6/n6Wh0lTLjriGnyGh0g==", "dev": true, "dependencies": { "css-selector-tokenizer": "^0.8", @@ -1472,9 +1472,9 @@ "dev": true }, "node_modules/electron-to-chromium": { - "version": "1.4.505", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.505.tgz", - "integrity": "sha512-0A50eL5BCCKdxig2SsCXhpuztnB9PfUgRMojj5tMvt8O54lbwz3t6wNgnpiTRosw5QjlJB7ixhVyeg8daLQwSQ==", + "version": "1.4.670", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.670.tgz", + "integrity": "sha512-hcijYOWjOtjKrKPtNA6tuLlA/bTLO3heFG8pQA6mLpq7dRydSWicXova5lyxDzp1iVJaYhK7J2OQlGE52KYn7A==", "dev": true }, "node_modules/esbuild": { @@ -1515,9 +1515,9 @@ } }, "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", "dev": true, "engines": { "node": ">=6" @@ -1757,9 +1757,9 @@ } }, "node_modules/jotai": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/jotai/-/jotai-2.6.0.tgz", - "integrity": "sha512-Vt6hsc04Km4j03l+Ax+Sc+FVft5cRJhqgxt6GTz6GM2eM3DyX3CdBdzcG0z2FrlZToL1/0OAkqDghIyARWnSuQ==", + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/jotai/-/jotai-2.6.4.tgz", + "integrity": "sha512-RniwQPX4893YlNR1muOtyUGHYaTD1fhEN4qnOuZJSrDHj6xdEMrqlRSN/hCm2fshwk78ruecB/P2l+NCVWe6TQ==", "engines": { "node": ">=12.20.0" }, @@ -1928,9 +1928,9 @@ } }, "node_modules/node-releases": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", - "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", + "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", "dev": true }, "node_modules/normalize-path": { @@ -2030,9 +2030,9 @@ } }, "node_modules/postcss": { - "version": "8.4.32", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.32.tgz", - "integrity": "sha512-D/kj5JNu6oo2EIy+XL/26JEDTlIbB8hw85G8StOE6L74RQAVVP5rej6wxCNqyMbR4RkPfqvezVbPw81Ngd6Kcw==", + "version": "8.4.35", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.35.tgz", + "integrity": "sha512-u5U8qYpBCpN13BsiEB0CbR1Hhh4Gc0zLFuedrHJKMctHCHAGrMdG0PRM/KErzAL3CU6/eckEtmHNB3x6e3c0vA==", "dev": true, "funding": [ { @@ -2404,9 +2404,9 @@ } }, "node_modules/tailwindcss": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.6.tgz", - "integrity": "sha512-AKjF7qbbLvLaPieoKeTjG1+FyNZT6KaJMJPFeQyLfIp7l82ggH1fbHJSsYIvnbTFQOlkh+gBYpyby5GT1LIdLw==", + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.1.tgz", + "integrity": "sha512-qAYmXRfk3ENzuPBakNK0SRrUDipP8NQnEY6772uDhflcQz5EhRdD7JNZxyrFHVQNCwULPBn6FNPp9brpO7ctcA==", "dev": true, "dependencies": { "@alloc/quick-lru": "^5.2.0", @@ -2489,9 +2489,9 @@ "dev": true }, "node_modules/typescript": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.2.tgz", - "integrity": "sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ==", + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", + "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -2502,9 +2502,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", - "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", + "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", "dev": true, "funding": [ { @@ -2538,13 +2538,13 @@ "dev": true }, "node_modules/vite": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.0.5.tgz", - "integrity": "sha512-OekeWqR9Ls56f3zd4CaxzbbS11gqYkEiBtnWFFgYR2WV8oPJRRKq0mpskYy/XaoCL3L7VINDhqqOMNDiYdGvGg==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.1.2.tgz", + "integrity": "sha512-uwiFebQbTWRIGbCaTEBVAfKqgqKNKMJ2uPXsXeLIZxM8MVMjoS3j0cG8NrPxdDIadaWnPSjrkLWffLSC+uiP3Q==", "dev": true, "dependencies": { "esbuild": "^0.19.3", - "postcss": "^8.4.32", + "postcss": "^8.4.35", "rollup": "^4.2.0" }, "bin": { diff --git a/examples/use-camera-and-microphone-example/package.json b/examples/use-camera-and-microphone-example/package.json index e0a6fd6..3246744 100644 --- a/examples/use-camera-and-microphone-example/package.json +++ b/examples/use-camera-and-microphone-example/package.json @@ -10,21 +10,21 @@ }, "dependencies": { "@jellyfish-dev/react-client-sdk": "file:../..", - "jotai": "^2.6.0", + "jotai": "^2.6.4", "react": "^18.2.0", "react-dom": "^18.2.0", "zod": "^3.22.4" }, "devDependencies": { "@tailwindcss/typography": "^0.5.10", - "@types/react": "^18.2.42", - "@types/react-dom": "^18.2.17", + "@types/react": "^18.2.55", + "@types/react-dom": "^18.2.19", "@vitejs/plugin-react": "^4.2.1", - "autoprefixer": "^10.4.16", - "daisyui": "^4.4.19", - "postcss": "^8.4.32", - "tailwindcss": "^3.3.6", - "typescript": "^5.3.2", - "vite": "^5.0.5" + "autoprefixer": "^10.4.17", + "daisyui": "^4.7.2", + "postcss": "^8.4.35", + "tailwindcss": "^3.4.1", + "typescript": "^5.3.3", + "vite": "^5.1.2" } } From a50b49de4a748ca44545f60520ca6e62207f7b7e Mon Sep 17 00:00:00 2001 From: Kamil Stasiak Date: Thu, 15 Feb 2024 13:48:25 +0100 Subject: [PATCH 5/9] Update dependencies --- examples/minimal-react/package-lock.json | 22 +- .../package-lock.json | 22 +- package-lock.json | 432 ++++++------------ package.json | 22 +- yarn.lock | 292 ++++++------ 5 files changed, 302 insertions(+), 488 deletions(-) diff --git a/examples/minimal-react/package-lock.json b/examples/minimal-react/package-lock.json index 585b97c..cbd61d7 100644 --- a/examples/minimal-react/package-lock.json +++ b/examples/minimal-react/package-lock.json @@ -34,24 +34,24 @@ "lodash.isequal": "4.5.0" }, "devDependencies": { - "@playwright/test": "^1.40.1", + "@playwright/test": "^1.41.2", "@types/events": "^3.0.3", "@types/lodash.isequal": "^4.5.8", - "@types/node": "^20.10.3", - "@types/react": "18.2.42", - "@typescript-eslint/eslint-plugin": "^6.13.2", - "eslint": "^8.55.0", + "@types/node": "^20.11.18", + "@types/react": "18.2.55", + "@typescript-eslint/eslint-plugin": "^7.0.1", + "eslint": "^8.56.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.5", - "prettier": "3.1.0", - "prettier-plugin-tailwindcss": "0.5.7", + "prettier": "3.2.5", + "prettier-plugin-tailwindcss": "0.5.11", "react": "^18.2.0", - "testcontainers": "^10.3.2", + "testcontainers": "^10.7.1", "typed-emitter": "^2.1.0", - "typedoc": "^0.25.4", - "typedoc-plugin-mdn-links": "^3.1.6", - "typescript": "5.2.2" + "typedoc": "^0.25.8", + "typedoc-plugin-mdn-links": "^3.1.16", + "typescript": "5.3.3" } }, "node_modules/@aashutoshrathi/word-wrap": { diff --git a/examples/use-camera-and-microphone-example/package-lock.json b/examples/use-camera-and-microphone-example/package-lock.json index 7dc5f3a..d56133f 100644 --- a/examples/use-camera-and-microphone-example/package-lock.json +++ b/examples/use-camera-and-microphone-example/package-lock.json @@ -38,24 +38,24 @@ "lodash.isequal": "4.5.0" }, "devDependencies": { - "@playwright/test": "^1.40.1", + "@playwright/test": "^1.41.2", "@types/events": "^3.0.3", "@types/lodash.isequal": "^4.5.8", - "@types/node": "^20.10.3", - "@types/react": "18.2.42", - "@typescript-eslint/eslint-plugin": "^6.13.2", - "eslint": "^8.55.0", + "@types/node": "^20.11.18", + "@types/react": "18.2.55", + "@typescript-eslint/eslint-plugin": "^7.0.1", + "eslint": "^8.56.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.5", - "prettier": "3.1.0", - "prettier-plugin-tailwindcss": "0.5.7", + "prettier": "3.2.5", + "prettier-plugin-tailwindcss": "0.5.11", "react": "^18.2.0", - "testcontainers": "^10.3.2", + "testcontainers": "^10.7.1", "typed-emitter": "^2.1.0", - "typedoc": "^0.25.4", - "typedoc-plugin-mdn-links": "^3.1.6", - "typescript": "5.2.2" + "typedoc": "^0.25.8", + "typedoc-plugin-mdn-links": "^3.1.16", + "typescript": "5.3.3" } }, "node_modules/@alloc/quick-lru": { diff --git a/package-lock.json b/package-lock.json index b556442..0c40b07 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,24 +14,24 @@ "lodash.isequal": "4.5.0" }, "devDependencies": { - "@playwright/test": "^1.40.1", + "@playwright/test": "^1.41.2", "@types/events": "^3.0.3", "@types/lodash.isequal": "^4.5.8", - "@types/node": "^20.10.3", - "@types/react": "18.2.42", - "@typescript-eslint/eslint-plugin": "^6.13.2", - "eslint": "^8.55.0", + "@types/node": "^20.11.18", + "@types/react": "18.2.55", + "@typescript-eslint/eslint-plugin": "^7.0.1", + "eslint": "^8.56.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.5", - "prettier": "3.1.0", - "prettier-plugin-tailwindcss": "0.5.7", + "prettier": "3.2.5", + "prettier-plugin-tailwindcss": "0.5.11", "react": "^18.2.0", - "testcontainers": "^10.3.2", + "testcontainers": "^10.7.1", "typed-emitter": "^2.1.0", - "typedoc": "^0.25.4", - "typedoc-plugin-mdn-links": "^3.1.6", - "typescript": "5.2.2" + "typedoc": "^0.25.8", + "typedoc-plugin-mdn-links": "^3.1.16", + "typescript": "5.3.3" } }, "../ts-client-sdk": { @@ -127,9 +127,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.55.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.55.0.tgz", - "integrity": "sha512-qQfo2mxH5yVom1kacMtZZJFVdW+E70mqHMJvVg6WTLo+VBuQJ4TojZlfWBjK0ve5BdEeNAVxOsl/nvNMpJOaJA==", + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz", + "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -225,12 +225,12 @@ } }, "node_modules/@playwright/test": { - "version": "1.40.1", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.40.1.tgz", - "integrity": "sha512-EaaawMTOeEItCRvfmkI9v6rBkF1svM8wjl/YPRrg2N2Wmp+4qJYkWtJsbew1szfKKDm6fPLy4YAanBhIlf9dWw==", + "version": "1.41.2", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.41.2.tgz", + "integrity": "sha512-qQB9h7KbibJzrDpkXkYvsmiDJK14FULCCZgEcoe2AvFAS64oCirWTwzTlAYEbKaRxWs5TFesE1Na6izMv3HfGg==", "dev": true, "dependencies": { - "playwright": "1.40.1" + "playwright": "1.41.2" }, "bin": { "playwright": "cli.js" @@ -341,9 +341,9 @@ } }, "node_modules/@types/node": { - "version": "20.10.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.3.tgz", - "integrity": "sha512-XJavIpZqiXID5Yxnxv3RUDKTN5b81ddNC3ecsA0SoFXz/QU8OGBwZGMomiq0zw+uuqbL/krztv/DINAQ/EV4gg==", + "version": "20.11.18", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.18.tgz", + "integrity": "sha512-ABT5VWnnYneSBcNWYSCuR05M826RoMyMSGiFivXGx6ZUIsXb9vn4643IEwkg2zbEOSgAiSogtapN2fgc4mAPlw==", "dependencies": { "undici-types": "~5.26.4" } @@ -355,9 +355,9 @@ "dev": true }, "node_modules/@types/react": { - "version": "18.2.42", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.42.tgz", - "integrity": "sha512-c1zEr96MjakLYus/wPnuWDo1/zErfdU9rNsIGmE+NV71nx88FG9Ttgo5dqorXTu/LImX2f63WBP986gJkMPNbA==", + "version": "18.2.55", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.55.tgz", + "integrity": "sha512-Y2Tz5P4yz23brwm2d7jNon39qoAtMMmalOQv6+fEFt1mT+FcM3D841wDpoUvFXhaYenuROCy3FZYqdTjM7qVyA==", "dev": true, "dependencies": { "@types/prop-types": "*", @@ -372,9 +372,9 @@ "dev": true }, "node_modules/@types/semver": { - "version": "7.5.6", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.6.tgz", - "integrity": "sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==", + "version": "7.5.7", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.7.tgz", + "integrity": "sha512-/wdoPq1QqkSj9/QOeKkFquEuPzQbHTWAMPH/PaUMB+JuR31lXhlWXRZ52IpfDYVlDOUBvX09uBrPwxGT1hjNBg==", "dev": true }, "node_modules/@types/ssh2": { @@ -397,16 +397,16 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "6.13.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.13.2.tgz", - "integrity": "sha512-3+9OGAWHhk4O1LlcwLBONbdXsAhLjyCFogJY/cWy2lxdVJ2JrcTF2pTGMaLl2AE7U1l31n8Py4a8bx5DLf/0dQ==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.0.1.tgz", + "integrity": "sha512-OLvgeBv3vXlnnJGIAgCLYKjgMEU+wBGj07MQ/nxAaON+3mLzX7mJbhRYrVGiVvFiXtwFlkcBa/TtmglHy0UbzQ==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.13.2", - "@typescript-eslint/type-utils": "6.13.2", - "@typescript-eslint/utils": "6.13.2", - "@typescript-eslint/visitor-keys": "6.13.2", + "@typescript-eslint/scope-manager": "7.0.1", + "@typescript-eslint/type-utils": "7.0.1", + "@typescript-eslint/utils": "7.0.1", + "@typescript-eslint/visitor-keys": "7.0.1", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -422,8 +422,8 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", - "eslint": "^7.0.0 || ^8.0.0" + "@typescript-eslint/parser": "^7.0.0", + "eslint": "^8.56.0" }, "peerDependenciesMeta": { "typescript": { @@ -431,64 +431,17 @@ } } }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/scope-manager": { - "version": "6.13.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.13.2.tgz", - "integrity": "sha512-CXQA0xo7z6x13FeDYCgBkjWzNqzBn8RXaE3QVQVIUm74fWJLkJkaHmHdKStrxQllGh6Q4eUGyNpMe0b1hMkXFA==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "6.13.2", - "@typescript-eslint/visitor-keys": "6.13.2" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/types": { - "version": "6.13.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.13.2.tgz", - "integrity": "sha512-7sxbQ+EMRubQc3wTfTsycgYpSujyVbI1xw+3UMRUcrhSy+pN09y/lWzeKDbvhoqcRbHdc+APLs/PWYi/cisLPg==", - "dev": true, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/visitor-keys": { - "version": "6.13.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.13.2.tgz", - "integrity": "sha512-OGznFs0eAQXJsp+xSd6k/O1UbFi/K/L7WjqeRoFE7vadjAF9y0uppXhYNQNEqygjou782maGClOoZwPqF0Drlw==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "6.13.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, "node_modules/@typescript-eslint/parser": { - "version": "6.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.12.0.tgz", - "integrity": "sha512-s8/jNFPKPNRmXEnNXfuo1gemBdVmpQsK1pcu+QIvuNJuhFzGrpD7WjOcvDc/+uEdfzSYpNu7U/+MmbScjoQ6vg==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.0.1.tgz", + "integrity": "sha512-8GcRRZNzaHxKzBPU3tKtFNing571/GwPBeCvmAUw0yBtfE2XVd0zFKJIMSWkHJcPQi0ekxjIts6L/rrZq5cxGQ==", "dev": true, "peer": true, "dependencies": { - "@typescript-eslint/scope-manager": "6.12.0", - "@typescript-eslint/types": "6.12.0", - "@typescript-eslint/typescript-estree": "6.12.0", - "@typescript-eslint/visitor-keys": "6.12.0", + "@typescript-eslint/scope-manager": "7.0.1", + "@typescript-eslint/types": "7.0.1", + "@typescript-eslint/typescript-estree": "7.0.1", + "@typescript-eslint/visitor-keys": "7.0.1", "debug": "^4.3.4" }, "engines": { @@ -499,7 +452,7 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" + "eslint": "^8.56.0" }, "peerDependenciesMeta": { "typescript": { @@ -508,14 +461,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "6.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.12.0.tgz", - "integrity": "sha512-5gUvjg+XdSj8pcetdL9eXJzQNTl3RD7LgUiYTl8Aabdi8hFkaGSYnaS6BLc0BGNaDH+tVzVwmKtWvu0jLgWVbw==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.0.1.tgz", + "integrity": "sha512-v7/T7As10g3bcWOOPAcbnMDuvctHzCFYCG/8R4bK4iYzdFqsZTbXGln0cZNVcwQcwewsYU2BJLay8j0/4zOk4w==", "dev": true, - "peer": true, "dependencies": { - "@typescript-eslint/types": "6.12.0", - "@typescript-eslint/visitor-keys": "6.12.0" + "@typescript-eslint/types": "7.0.1", + "@typescript-eslint/visitor-keys": "7.0.1" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -526,13 +478,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "6.13.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.13.2.tgz", - "integrity": "sha512-Qr6ssS1GFongzH2qfnWKkAQmMUyZSyOr0W54nZNU1MDfo+U4Mv3XveeLZzadc/yq8iYhQZHYT+eoXJqnACM1tw==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.0.1.tgz", + "integrity": "sha512-YtT9UcstTG5Yqy4xtLiClm1ZpM/pWVGFnkAa90UfdkkZsR1eP2mR/1jbHeYp8Ay1l1JHPyGvoUYR6o3On5Nhmw==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "6.13.2", - "@typescript-eslint/utils": "6.13.2", + "@typescript-eslint/typescript-estree": "7.0.1", + "@typescript-eslint/utils": "7.0.1", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, @@ -544,7 +496,7 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" + "eslint": "^8.56.0" }, "peerDependenciesMeta": { "typescript": { @@ -552,10 +504,10 @@ } } }, - "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/types": { - "version": "6.13.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.13.2.tgz", - "integrity": "sha512-7sxbQ+EMRubQc3wTfTsycgYpSujyVbI1xw+3UMRUcrhSy+pN09y/lWzeKDbvhoqcRbHdc+APLs/PWYi/cisLPg==", + "node_modules/@typescript-eslint/types": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.0.1.tgz", + "integrity": "sha512-uJDfmirz4FHib6ENju/7cz9SdMSkeVvJDK3VcMFvf/hAShg8C74FW+06MaQPODHfDJp/z/zHfgawIJRjlu0RLg==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -565,17 +517,18 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/typescript-estree": { - "version": "6.13.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.13.2.tgz", - "integrity": "sha512-SuD8YLQv6WHnOEtKv8D6HZUzOub855cfPnPMKvdM/Bh1plv1f7Q/0iFUDLKKlxHcEstQnaUU4QZskgQq74t+3w==", + "node_modules/@typescript-eslint/typescript-estree": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.0.1.tgz", + "integrity": "sha512-SO9wHb6ph0/FN5OJxH4MiPscGah5wjOd0RRpaLvuBv9g8565Fgu0uMySFEPqwPHiQU90yzJ2FjRYKGrAhS1xig==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.13.2", - "@typescript-eslint/visitor-keys": "6.13.2", + "@typescript-eslint/types": "7.0.1", + "@typescript-eslint/visitor-keys": "7.0.1", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", + "minimatch": "9.0.3", "semver": "^7.5.4", "ts-api-utils": "^1.0.1" }, @@ -592,77 +545,42 @@ } } }, - "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/visitor-keys": { - "version": "6.13.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.13.2.tgz", - "integrity": "sha512-OGznFs0eAQXJsp+xSd6k/O1UbFi/K/L7WjqeRoFE7vadjAF9y0uppXhYNQNEqygjou782maGClOoZwPqF0Drlw==", + "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.13.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/types": { - "version": "6.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.12.0.tgz", - "integrity": "sha512-MA16p/+WxM5JG/F3RTpRIcuOghWO30//VEOvzubM8zuOOBYXsP+IfjoCXXiIfy2Ta8FRh9+IO9QLlaFQUU+10Q==", - "dev": true, - "peer": true, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" + "balanced-match": "^1.0.0" } }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "6.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.12.0.tgz", - "integrity": "sha512-vw9E2P9+3UUWzhgjyyVczLWxZ3GuQNT7QpnIY3o5OMeLO/c8oHljGc8ZpryBMIyympiAAaKgw9e5Hl9dCWFOYw==", + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", "dev": true, - "peer": true, "dependencies": { - "@typescript-eslint/types": "6.12.0", - "@typescript-eslint/visitor-keys": "6.12.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.5.4", - "ts-api-utils": "^1.0.1" + "brace-expansion": "^2.0.1" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": ">=16 || 14 >=14.17" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/@typescript-eslint/utils": { - "version": "6.13.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.13.2.tgz", - "integrity": "sha512-b9Ptq4eAZUym4idijCRzl61oPCwwREcfDI8xGk751Vhzig5fFZR9CyzDz4Sp/nxSLBYxUPyh4QdIDqWykFhNmQ==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.0.1.tgz", + "integrity": "sha512-oe4his30JgPbnv+9Vef1h48jm0S6ft4mNwi9wj7bX10joGn07QRfqIqFHoMiajrtoU88cIhXf8ahwgrcbNLgPA==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.13.2", - "@typescript-eslint/types": "6.13.2", - "@typescript-eslint/typescript-estree": "6.13.2", + "@typescript-eslint/scope-manager": "7.0.1", + "@typescript-eslint/types": "7.0.1", + "@typescript-eslint/typescript-estree": "7.0.1", "semver": "^7.5.4" }, "engines": { @@ -673,91 +591,16 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" - } - }, - "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/scope-manager": { - "version": "6.13.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.13.2.tgz", - "integrity": "sha512-CXQA0xo7z6x13FeDYCgBkjWzNqzBn8RXaE3QVQVIUm74fWJLkJkaHmHdKStrxQllGh6Q4eUGyNpMe0b1hMkXFA==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "6.13.2", - "@typescript-eslint/visitor-keys": "6.13.2" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/types": { - "version": "6.13.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.13.2.tgz", - "integrity": "sha512-7sxbQ+EMRubQc3wTfTsycgYpSujyVbI1xw+3UMRUcrhSy+pN09y/lWzeKDbvhoqcRbHdc+APLs/PWYi/cisLPg==", - "dev": true, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/typescript-estree": { - "version": "6.13.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.13.2.tgz", - "integrity": "sha512-SuD8YLQv6WHnOEtKv8D6HZUzOub855cfPnPMKvdM/Bh1plv1f7Q/0iFUDLKKlxHcEstQnaUU4QZskgQq74t+3w==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "6.13.2", - "@typescript-eslint/visitor-keys": "6.13.2", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.5.4", - "ts-api-utils": "^1.0.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/visitor-keys": { - "version": "6.13.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.13.2.tgz", - "integrity": "sha512-OGznFs0eAQXJsp+xSd6k/O1UbFi/K/L7WjqeRoFE7vadjAF9y0uppXhYNQNEqygjou782maGClOoZwPqF0Drlw==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "6.13.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" + "eslint": "^8.56.0" } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "6.12.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.12.0.tgz", - "integrity": "sha512-rg3BizTZHF1k3ipn8gfrzDXXSFKyOEB5zxYXInQ6z0hUvmQlhaZQzK+YmHmNViMA9HzW5Q9+bPPt90bU6GQwyw==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.0.1.tgz", + "integrity": "sha512-hwAgrOyk++RTXrP4KzCg7zB2U0xt7RUU0ZdMSCsqF3eKUwkdXUMyTb0qdCuji7VIbcpG62kKTU9M1J1c9UpFBw==", "dev": true, - "peer": true, "dependencies": { - "@typescript-eslint/types": "6.12.0", + "@typescript-eslint/types": "7.0.1", "eslint-visitor-keys": "^3.4.1" }, "engines": { @@ -821,9 +664,9 @@ } }, "node_modules/ansi-sequence-parser": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.0.tgz", - "integrity": "sha512-lEm8mt52to2fT8GhciPCGeCXACSz2UwIN4X2e2LJSnZ5uAbn2/dsYdOmUXq0AtWS5cpAupysIneExOgH0Vd2TQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.1.tgz", + "integrity": "sha512-vJXt3yiaUL4UU546s3rPXlsry/RnM730G1+HkpKE012AN0sx1eOrxSu95oKDIonskeLTijMgqWZ3uDEe3NFvyg==", "dev": true }, "node_modules/ansi-styles": { @@ -1360,15 +1203,15 @@ } }, "node_modules/eslint": { - "version": "8.55.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.55.0.tgz", - "integrity": "sha512-iyUUAM0PCKj5QpwGfmCAG9XXbZCWsqP/eWAWrG/W0umvjuLRBECwSFdt+rCntju0xEH7teIABPwXpahftIaTdA==", + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz", + "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.55.0", + "@eslint/js": "8.56.0", "@humanwhocodes/config-array": "^0.11.13", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -1940,9 +1783,9 @@ "dev": true }, "node_modules/jsonc-parser": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", - "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.1.tgz", + "integrity": "sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==", "dev": true }, "node_modules/lazystream": { @@ -2320,12 +2163,12 @@ } }, "node_modules/playwright": { - "version": "1.40.1", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.40.1.tgz", - "integrity": "sha512-2eHI7IioIpQ0bS1Ovg/HszsN/XKNwEG1kbzSDDmADpclKc7CyqkHw7Mg2JCz/bbCxg25QUPcjksoMW7JcIFQmw==", + "version": "1.41.2", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.41.2.tgz", + "integrity": "sha512-v0bOa6H2GJChDL8pAeLa/LZC4feoAMbSQm1/jF/ySsWWoaNItvrMP7GEkvEEFyCTUYKMxjQKaTSg5up7nR6/8A==", "dev": true, "dependencies": { - "playwright-core": "1.40.1" + "playwright-core": "1.41.2" }, "bin": { "playwright": "cli.js" @@ -2338,9 +2181,9 @@ } }, "node_modules/playwright-core": { - "version": "1.40.1", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.40.1.tgz", - "integrity": "sha512-+hkOycxPiV534c4HhpfX6yrlawqVUzITRKwHAmYfmsVreltEl6fAZJ3DPfLMOODw0H3s1Itd6MDCWmP1fl/QvQ==", + "version": "1.41.2", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.41.2.tgz", + "integrity": "sha512-VaTvwCA4Y8kxEe+kfm2+uUUw5Lubf38RxF7FpBxLPmGe5sdNkSg5e3ChEigaGrX7qdqT3pt2m/98LiyvU2x6CA==", "dev": true, "bin": { "playwright-core": "cli.js" @@ -2359,9 +2202,9 @@ } }, "node_modules/prettier": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.0.tgz", - "integrity": "sha512-TQLvXjq5IAibjh8EpBIkNKxO749UEWABoiIZehEPiY4GNpVdhaFKqSTu+QrlU6D2dPAfubRmtJTi4K4YkQ5eXw==", + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", + "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", "dev": true, "bin": { "prettier": "bin/prettier.cjs" @@ -2374,9 +2217,9 @@ } }, "node_modules/prettier-plugin-tailwindcss": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.5.7.tgz", - "integrity": "sha512-4v6uESAgwCni6YF6DwJlRaDjg9Z+al5zM4JfngcazMy4WEf/XkPS5TEQjbD+DZ5iNuG6RrKQLa/HuX2SYzC3kQ==", + "version": "0.5.11", + "resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.5.11.tgz", + "integrity": "sha512-AvI/DNyMctyyxGOjyePgi/gqj5hJYClZ1avtQvLlqMT3uDZkRbi4HhGUpok3DRzv9z7Lti85Kdj3s3/1CeNI0w==", "dev": true, "engines": { "node": ">=14.21.3" @@ -2385,13 +2228,13 @@ "@ianvs/prettier-plugin-sort-imports": "*", "@prettier/plugin-pug": "*", "@shopify/prettier-plugin-liquid": "*", - "@shufo/prettier-plugin-blade": "*", "@trivago/prettier-plugin-sort-imports": "*", "prettier": "^3.0", "prettier-plugin-astro": "*", "prettier-plugin-css-order": "*", "prettier-plugin-import-sort": "*", "prettier-plugin-jsdoc": "*", + "prettier-plugin-marko": "*", "prettier-plugin-organize-attributes": "*", "prettier-plugin-organize-imports": "*", "prettier-plugin-style-order": "*", @@ -2407,9 +2250,6 @@ "@shopify/prettier-plugin-liquid": { "optional": true }, - "@shufo/prettier-plugin-blade": { - "optional": true - }, "@trivago/prettier-plugin-sort-imports": { "optional": true }, @@ -2710,9 +2550,9 @@ "dev": true }, "node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -2746,9 +2586,9 @@ } }, "node_modules/shiki": { - "version": "0.14.3", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.14.3.tgz", - "integrity": "sha512-U3S/a+b0KS+UkTyMjoNojvTgrBHjgp7L6ovhFVZsXmBGnVdQ4K4U9oK0z63w538S91ATngv1vXigHCSWOwnr+g==", + "version": "0.14.7", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.14.7.tgz", + "integrity": "sha512-dNPAPrxSc87ua2sKJ3H5dQ/6ZaY8RNnaAqK+t0eG7p0Soi2ydiqbGOTaZCqaYvA/uZYfS1LJnemt3Q+mSfcPCg==", "dev": true, "dependencies": { "ansi-sequence-parser": "^1.1.0", @@ -2900,9 +2740,9 @@ } }, "node_modules/testcontainers": { - "version": "10.3.2", - "resolved": "https://registry.npmjs.org/testcontainers/-/testcontainers-10.3.2.tgz", - "integrity": "sha512-IsV6NgS5reHcVF1nJLCDJv1hM9gAWUhLwh9b3ybgzvM3X7T2dcmuLFKt1RAR8qN8k+44tW2Drj7idxW6oeGvvg==", + "version": "10.7.1", + "resolved": "https://registry.npmjs.org/testcontainers/-/testcontainers-10.7.1.tgz", + "integrity": "sha512-JarbT6o7fv1siUts4tGv3wBoYrWKxjla69+5QWG9+bcd4l+ECJ3ikfGD/hpXRmRBsnjzeWyV+tL9oWOBRzk+lA==", "dev": true, "dependencies": { "@balena/dockerignore": "^1.0.2", @@ -2959,12 +2799,12 @@ "dev": true }, "node_modules/ts-api-utils": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.3.tgz", - "integrity": "sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.2.1.tgz", + "integrity": "sha512-RIYA36cJn2WiH9Hy77hdF9r7oEwxAtB/TS9/S4Qd90Ap4z5FSiin5zEiTL44OII1Y3IIlEvxwxFUVgrHSZ/UpA==", "dev": true, "engines": { - "node": ">=16.13.0" + "node": ">=16" }, "peerDependencies": { "typescript": ">=4.2.0" @@ -3040,15 +2880,15 @@ } }, "node_modules/typedoc": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.25.4.tgz", - "integrity": "sha512-Du9ImmpBCw54bX275yJrxPVnjdIyJO/84co0/L9mwe0R3G4FSR6rQ09AlXVRvZEGMUg09+z/usc8mgygQ1aidA==", + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.25.8.tgz", + "integrity": "sha512-mh8oLW66nwmeB9uTa0Bdcjfis+48bAjSH3uqdzSuSawfduROQLlXw//WSNZLYDdhmMVB7YcYZicq6e8T0d271A==", "dev": true, "dependencies": { "lunr": "^2.3.9", "marked": "^4.3.0", "minimatch": "^9.0.3", - "shiki": "^0.14.1" + "shiki": "^0.14.7" }, "bin": { "typedoc": "bin/typedoc" @@ -3061,9 +2901,9 @@ } }, "node_modules/typedoc-plugin-mdn-links": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/typedoc-plugin-mdn-links/-/typedoc-plugin-mdn-links-3.1.6.tgz", - "integrity": "sha512-W593g/B1fNDGnEb/5mitYTYTkG+/YhlX1s5hFuxi+FizSqZ5ty+le5W65ipE83VXxm4VPrwEnsS2+ec6IFKrFw==", + "version": "3.1.16", + "resolved": "https://registry.npmjs.org/typedoc-plugin-mdn-links/-/typedoc-plugin-mdn-links-3.1.16.tgz", + "integrity": "sha512-Jdnw3tI3KOOMMahUNiCwKXJcH+Ov9y3syRQ8HP1ce8nT2O9Bsg9aqqa0LWye+CdCiSpWJ/USzOK3MFNxRYzL4A==", "dev": true, "peerDependencies": { "typedoc": ">= 0.23.14 || 0.24.x || 0.25.x" @@ -3094,9 +2934,9 @@ } }, "node_modules/typescript": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", - "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", + "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", "dev": true, "bin": { "tsc": "bin/tsc", diff --git a/package.json b/package.json index 4cd3148..86005d6 100644 --- a/package.json +++ b/package.json @@ -48,24 +48,24 @@ "prepare": "tsc" }, "devDependencies": { - "@playwright/test": "^1.40.1", + "@playwright/test": "^1.41.2", "@types/events": "^3.0.3", "@types/lodash.isequal": "^4.5.8", - "@types/node": "^20.10.3", - "@types/react": "18.2.42", - "@typescript-eslint/eslint-plugin": "^6.13.2", - "eslint": "^8.55.0", + "@types/node": "^20.11.18", + "@types/react": "18.2.55", + "@typescript-eslint/eslint-plugin": "^7.0.1", + "eslint": "^8.56.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.5", - "prettier": "3.1.0", - "prettier-plugin-tailwindcss": "0.5.7", + "prettier": "3.2.5", + "prettier-plugin-tailwindcss": "0.5.11", "react": "^18.2.0", - "testcontainers": "^10.3.2", + "testcontainers": "^10.7.1", "typed-emitter": "^2.1.0", - "typedoc": "^0.25.4", - "typedoc-plugin-mdn-links": "^3.1.6", - "typescript": "5.2.2" + "typedoc": "^0.25.8", + "typedoc-plugin-mdn-links": "^3.1.16", + "typescript": "5.3.3" }, "dependencies": { "@jellyfish-dev/ts-client-sdk": "^0.3.0", diff --git a/yarn.lock b/yarn.lock index 68d88b7..e515dd5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -39,10 +39,10 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@8.55.0": - version "8.55.0" - resolved "https://registry.npmjs.org/@eslint/js/-/js-8.55.0.tgz" - integrity sha512-qQfo2mxH5yVom1kacMtZZJFVdW+E70mqHMJvVg6WTLo+VBuQJ4TojZlfWBjK0ve5BdEeNAVxOsl/nvNMpJOaJA== +"@eslint/js@8.56.0": + version "8.56.0" + resolved "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz" + integrity sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A== "@humanwhocodes/config-array@^0.11.13": version "0.11.13" @@ -103,12 +103,12 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@playwright/test@^1.40.1": - version "1.40.1" - resolved "https://registry.npmjs.org/@playwright/test/-/test-1.40.1.tgz" - integrity sha512-EaaawMTOeEItCRvfmkI9v6rBkF1svM8wjl/YPRrg2N2Wmp+4qJYkWtJsbew1szfKKDm6fPLy4YAanBhIlf9dWw== +"@playwright/test@^1.41.2": + version "1.41.2" + resolved "https://registry.npmjs.org/@playwright/test/-/test-1.41.2.tgz" + integrity sha512-qQB9h7KbibJzrDpkXkYvsmiDJK14FULCCZgEcoe2AvFAS64oCirWTwzTlAYEbKaRxWs5TFesE1Na6izMv3HfGg== dependencies: - playwright "1.40.1" + playwright "1.41.2" "@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": version "1.1.2" @@ -201,10 +201,10 @@ resolved "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.195.tgz" integrity sha512-Hwx9EUgdwf2GLarOjQp5ZH8ZmblzcbTBC2wtQWNKARBSxM9ezRIAUpeDTgoQRAFB0+8CNWXVA9+MaSOzOF3nPg== -"@types/node@*", "@types/node@^20.10.3", "@types/node@>=13.7.0": - version "20.10.3" - resolved "https://registry.npmjs.org/@types/node/-/node-20.10.3.tgz" - integrity sha512-XJavIpZqiXID5Yxnxv3RUDKTN5b81ddNC3ecsA0SoFXz/QU8OGBwZGMomiq0zw+uuqbL/krztv/DINAQ/EV4gg== +"@types/node@*", "@types/node@^20.11.18", "@types/node@>=13.7.0": + version "20.11.18" + resolved "https://registry.npmjs.org/@types/node/-/node-20.11.18.tgz" + integrity sha512-ABT5VWnnYneSBcNWYSCuR05M826RoMyMSGiFivXGx6ZUIsXb9vn4643IEwkg2zbEOSgAiSogtapN2fgc4mAPlw== dependencies: undici-types "~5.26.4" @@ -213,10 +213,10 @@ resolved "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz" integrity sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w== -"@types/react@18.2.42": - version "18.2.42" - resolved "https://registry.npmjs.org/@types/react/-/react-18.2.42.tgz" - integrity sha512-c1zEr96MjakLYus/wPnuWDo1/zErfdU9rNsIGmE+NV71nx88FG9Ttgo5dqorXTu/LImX2f63WBP986gJkMPNbA== +"@types/react@18.2.55": + version "18.2.55" + resolved "https://registry.npmjs.org/@types/react/-/react-18.2.55.tgz" + integrity sha512-Y2Tz5P4yz23brwm2d7jNon39qoAtMMmalOQv6+fEFt1mT+FcM3D841wDpoUvFXhaYenuROCy3FZYqdTjM7qVyA== dependencies: "@types/prop-types" "*" "@types/scheduler" "*" @@ -228,9 +228,9 @@ integrity sha512-5cJ8CB4yAx7BH1oMvdU0Jh9lrEXyPkar6F9G/ERswkCuvP4KQZfZkSjcMbAICCpQTN4OuZn8tz0HiKv9TGZgrQ== "@types/semver@^7.5.0": - version "7.5.6" - resolved "https://registry.npmjs.org/@types/semver/-/semver-7.5.6.tgz" - integrity sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A== + version "7.5.7" + resolved "https://registry.npmjs.org/@types/semver/-/semver-7.5.7.tgz" + integrity sha512-/wdoPq1QqkSj9/QOeKkFquEuPzQbHTWAMPH/PaUMB+JuR31lXhlWXRZ52IpfDYVlDOUBvX09uBrPwxGT1hjNBg== "@types/ssh2-streams@*": version "0.1.12" @@ -247,16 +247,16 @@ "@types/node" "*" "@types/ssh2-streams" "*" -"@typescript-eslint/eslint-plugin@^6.13.2": - version "6.13.2" - resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.13.2.tgz" - integrity sha512-3+9OGAWHhk4O1LlcwLBONbdXsAhLjyCFogJY/cWy2lxdVJ2JrcTF2pTGMaLl2AE7U1l31n8Py4a8bx5DLf/0dQ== +"@typescript-eslint/eslint-plugin@^7.0.1": + version "7.0.1" + resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.0.1.tgz" + integrity sha512-OLvgeBv3vXlnnJGIAgCLYKjgMEU+wBGj07MQ/nxAaON+3mLzX7mJbhRYrVGiVvFiXtwFlkcBa/TtmglHy0UbzQ== dependencies: "@eslint-community/regexpp" "^4.5.1" - "@typescript-eslint/scope-manager" "6.13.2" - "@typescript-eslint/type-utils" "6.13.2" - "@typescript-eslint/utils" "6.13.2" - "@typescript-eslint/visitor-keys" "6.13.2" + "@typescript-eslint/scope-manager" "7.0.1" + "@typescript-eslint/type-utils" "7.0.1" + "@typescript-eslint/utils" "7.0.1" + "@typescript-eslint/visitor-keys" "7.0.1" debug "^4.3.4" graphemer "^1.4.0" ignore "^5.2.4" @@ -264,106 +264,73 @@ semver "^7.5.4" ts-api-utils "^1.0.1" -"@typescript-eslint/parser@^6.0.0 || ^6.0.0-alpha": - version "6.12.0" - resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.12.0.tgz" - integrity sha512-s8/jNFPKPNRmXEnNXfuo1gemBdVmpQsK1pcu+QIvuNJuhFzGrpD7WjOcvDc/+uEdfzSYpNu7U/+MmbScjoQ6vg== +"@typescript-eslint/parser@^7.0.0": + version "7.0.1" + resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.0.1.tgz" + integrity sha512-8GcRRZNzaHxKzBPU3tKtFNing571/GwPBeCvmAUw0yBtfE2XVd0zFKJIMSWkHJcPQi0ekxjIts6L/rrZq5cxGQ== dependencies: - "@typescript-eslint/scope-manager" "6.12.0" - "@typescript-eslint/types" "6.12.0" - "@typescript-eslint/typescript-estree" "6.12.0" - "@typescript-eslint/visitor-keys" "6.12.0" + "@typescript-eslint/scope-manager" "7.0.1" + "@typescript-eslint/types" "7.0.1" + "@typescript-eslint/typescript-estree" "7.0.1" + "@typescript-eslint/visitor-keys" "7.0.1" debug "^4.3.4" -"@typescript-eslint/scope-manager@6.12.0": - version "6.12.0" - resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.12.0.tgz" - integrity sha512-5gUvjg+XdSj8pcetdL9eXJzQNTl3RD7LgUiYTl8Aabdi8hFkaGSYnaS6BLc0BGNaDH+tVzVwmKtWvu0jLgWVbw== - dependencies: - "@typescript-eslint/types" "6.12.0" - "@typescript-eslint/visitor-keys" "6.12.0" - -"@typescript-eslint/scope-manager@6.13.2": - version "6.13.2" - resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.13.2.tgz" - integrity sha512-CXQA0xo7z6x13FeDYCgBkjWzNqzBn8RXaE3QVQVIUm74fWJLkJkaHmHdKStrxQllGh6Q4eUGyNpMe0b1hMkXFA== +"@typescript-eslint/scope-manager@7.0.1": + version "7.0.1" + resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.0.1.tgz" + integrity sha512-v7/T7As10g3bcWOOPAcbnMDuvctHzCFYCG/8R4bK4iYzdFqsZTbXGln0cZNVcwQcwewsYU2BJLay8j0/4zOk4w== dependencies: - "@typescript-eslint/types" "6.13.2" - "@typescript-eslint/visitor-keys" "6.13.2" + "@typescript-eslint/types" "7.0.1" + "@typescript-eslint/visitor-keys" "7.0.1" -"@typescript-eslint/type-utils@6.13.2": - version "6.13.2" - resolved "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.13.2.tgz" - integrity sha512-Qr6ssS1GFongzH2qfnWKkAQmMUyZSyOr0W54nZNU1MDfo+U4Mv3XveeLZzadc/yq8iYhQZHYT+eoXJqnACM1tw== +"@typescript-eslint/type-utils@7.0.1": + version "7.0.1" + resolved "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.0.1.tgz" + integrity sha512-YtT9UcstTG5Yqy4xtLiClm1ZpM/pWVGFnkAa90UfdkkZsR1eP2mR/1jbHeYp8Ay1l1JHPyGvoUYR6o3On5Nhmw== dependencies: - "@typescript-eslint/typescript-estree" "6.13.2" - "@typescript-eslint/utils" "6.13.2" + "@typescript-eslint/typescript-estree" "7.0.1" + "@typescript-eslint/utils" "7.0.1" debug "^4.3.4" ts-api-utils "^1.0.1" -"@typescript-eslint/types@6.12.0": - version "6.12.0" - resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.12.0.tgz" - integrity sha512-MA16p/+WxM5JG/F3RTpRIcuOghWO30//VEOvzubM8zuOOBYXsP+IfjoCXXiIfy2Ta8FRh9+IO9QLlaFQUU+10Q== - -"@typescript-eslint/types@6.13.2": - version "6.13.2" - resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.13.2.tgz" - integrity sha512-7sxbQ+EMRubQc3wTfTsycgYpSujyVbI1xw+3UMRUcrhSy+pN09y/lWzeKDbvhoqcRbHdc+APLs/PWYi/cisLPg== - -"@typescript-eslint/typescript-estree@6.12.0": - version "6.12.0" - resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.12.0.tgz" - integrity sha512-vw9E2P9+3UUWzhgjyyVczLWxZ3GuQNT7QpnIY3o5OMeLO/c8oHljGc8ZpryBMIyympiAAaKgw9e5Hl9dCWFOYw== - dependencies: - "@typescript-eslint/types" "6.12.0" - "@typescript-eslint/visitor-keys" "6.12.0" - debug "^4.3.4" - globby "^11.1.0" - is-glob "^4.0.3" - semver "^7.5.4" - ts-api-utils "^1.0.1" +"@typescript-eslint/types@7.0.1": + version "7.0.1" + resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.0.1.tgz" + integrity sha512-uJDfmirz4FHib6ENju/7cz9SdMSkeVvJDK3VcMFvf/hAShg8C74FW+06MaQPODHfDJp/z/zHfgawIJRjlu0RLg== -"@typescript-eslint/typescript-estree@6.13.2": - version "6.13.2" - resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.13.2.tgz" - integrity sha512-SuD8YLQv6WHnOEtKv8D6HZUzOub855cfPnPMKvdM/Bh1plv1f7Q/0iFUDLKKlxHcEstQnaUU4QZskgQq74t+3w== +"@typescript-eslint/typescript-estree@7.0.1": + version "7.0.1" + resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.0.1.tgz" + integrity sha512-SO9wHb6ph0/FN5OJxH4MiPscGah5wjOd0RRpaLvuBv9g8565Fgu0uMySFEPqwPHiQU90yzJ2FjRYKGrAhS1xig== dependencies: - "@typescript-eslint/types" "6.13.2" - "@typescript-eslint/visitor-keys" "6.13.2" + "@typescript-eslint/types" "7.0.1" + "@typescript-eslint/visitor-keys" "7.0.1" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" + minimatch "9.0.3" semver "^7.5.4" ts-api-utils "^1.0.1" -"@typescript-eslint/utils@6.13.2": - version "6.13.2" - resolved "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.13.2.tgz" - integrity sha512-b9Ptq4eAZUym4idijCRzl61oPCwwREcfDI8xGk751Vhzig5fFZR9CyzDz4Sp/nxSLBYxUPyh4QdIDqWykFhNmQ== +"@typescript-eslint/utils@7.0.1": + version "7.0.1" + resolved "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.0.1.tgz" + integrity sha512-oe4his30JgPbnv+9Vef1h48jm0S6ft4mNwi9wj7bX10joGn07QRfqIqFHoMiajrtoU88cIhXf8ahwgrcbNLgPA== dependencies: "@eslint-community/eslint-utils" "^4.4.0" "@types/json-schema" "^7.0.12" "@types/semver" "^7.5.0" - "@typescript-eslint/scope-manager" "6.13.2" - "@typescript-eslint/types" "6.13.2" - "@typescript-eslint/typescript-estree" "6.13.2" + "@typescript-eslint/scope-manager" "7.0.1" + "@typescript-eslint/types" "7.0.1" + "@typescript-eslint/typescript-estree" "7.0.1" semver "^7.5.4" -"@typescript-eslint/visitor-keys@6.12.0": - version "6.12.0" - resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.12.0.tgz" - integrity sha512-rg3BizTZHF1k3ipn8gfrzDXXSFKyOEB5zxYXInQ6z0hUvmQlhaZQzK+YmHmNViMA9HzW5Q9+bPPt90bU6GQwyw== - dependencies: - "@typescript-eslint/types" "6.12.0" - eslint-visitor-keys "^3.4.1" - -"@typescript-eslint/visitor-keys@6.13.2": - version "6.13.2" - resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.13.2.tgz" - integrity sha512-OGznFs0eAQXJsp+xSd6k/O1UbFi/K/L7WjqeRoFE7vadjAF9y0uppXhYNQNEqygjou782maGClOoZwPqF0Drlw== +"@typescript-eslint/visitor-keys@7.0.1": + version "7.0.1" + resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.0.1.tgz" + integrity sha512-hwAgrOyk++RTXrP4KzCg7zB2U0xt7RUU0ZdMSCsqF3eKUwkdXUMyTb0qdCuji7VIbcpG62kKTU9M1J1c9UpFBw== dependencies: - "@typescript-eslint/types" "6.13.2" + "@typescript-eslint/types" "7.0.1" eslint-visitor-keys "^3.4.1" "@ungap/structured-clone@^1.2.0": @@ -397,9 +364,9 @@ ansi-regex@^5.0.1: integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== ansi-sequence-parser@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.0.tgz" - integrity sha512-lEm8mt52to2fT8GhciPCGeCXACSz2UwIN4X2e2LJSnZ5uAbn2/dsYdOmUXq0AtWS5cpAupysIneExOgH0Vd2TQ== + version "1.1.1" + resolved "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.1.tgz" + integrity sha512-vJXt3yiaUL4UU546s3rPXlsry/RnM730G1+HkpKE012AN0sx1eOrxSu95oKDIonskeLTijMgqWZ3uDEe3NFvyg== ansi-styles@^4.1.0: version "4.3.0" @@ -750,15 +717,15 @@ eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4 resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== -"eslint@^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0", "eslint@^6.0.0 || ^7.0.0 || >=8.0.0", "eslint@^7.0.0 || ^8.0.0", eslint@^8.55.0, eslint@>=7, eslint@>=7.0.0: - version "8.55.0" - resolved "https://registry.npmjs.org/eslint/-/eslint-8.55.0.tgz" - integrity sha512-iyUUAM0PCKj5QpwGfmCAG9XXbZCWsqP/eWAWrG/W0umvjuLRBECwSFdt+rCntju0xEH7teIABPwXpahftIaTdA== +"eslint@^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0", "eslint@^6.0.0 || ^7.0.0 || >=8.0.0", eslint@^8.56.0, eslint@>=7, eslint@>=7.0.0: + version "8.56.0" + resolved "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz" + integrity sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ== dependencies: "@eslint-community/eslint-utils" "^4.2.0" "@eslint-community/regexpp" "^4.6.1" "@eslint/eslintrc" "^2.1.4" - "@eslint/js" "8.55.0" + "@eslint/js" "8.56.0" "@humanwhocodes/config-array" "^0.11.13" "@humanwhocodes/module-importer" "^1.0.1" "@nodelib/fs.walk" "^1.2.8" @@ -1076,9 +1043,9 @@ json-stable-stringify-without-jsonify@^1.0.1: integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== jsonc-parser@^3.2.0: - version "3.2.0" - resolved "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz" - integrity sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w== + version "3.2.1" + resolved "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.1.tgz" + integrity sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA== lazystream@^1.0.0: version "1.0.1" @@ -1200,6 +1167,13 @@ minimatch@^9.0.3: dependencies: brace-expansion "^2.0.1" +minimatch@9.0.3: + version "9.0.3" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz" + integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg== + dependencies: + brace-expansion "^2.0.1" + mkdirp-classic@^0.5.2: version "0.5.3" resolved "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz" @@ -1302,17 +1276,17 @@ picomatch@^2.3.1: resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== -playwright-core@1.40.1: - version "1.40.1" - resolved "https://registry.npmjs.org/playwright-core/-/playwright-core-1.40.1.tgz" - integrity sha512-+hkOycxPiV534c4HhpfX6yrlawqVUzITRKwHAmYfmsVreltEl6fAZJ3DPfLMOODw0H3s1Itd6MDCWmP1fl/QvQ== +playwright-core@1.41.2: + version "1.41.2" + resolved "https://registry.npmjs.org/playwright-core/-/playwright-core-1.41.2.tgz" + integrity sha512-VaTvwCA4Y8kxEe+kfm2+uUUw5Lubf38RxF7FpBxLPmGe5sdNkSg5e3ChEigaGrX7qdqT3pt2m/98LiyvU2x6CA== -playwright@1.40.1: - version "1.40.1" - resolved "https://registry.npmjs.org/playwright/-/playwright-1.40.1.tgz" - integrity sha512-2eHI7IioIpQ0bS1Ovg/HszsN/XKNwEG1kbzSDDmADpclKc7CyqkHw7Mg2JCz/bbCxg25QUPcjksoMW7JcIFQmw== +playwright@1.41.2: + version "1.41.2" + resolved "https://registry.npmjs.org/playwright/-/playwright-1.41.2.tgz" + integrity sha512-v0bOa6H2GJChDL8pAeLa/LZC4feoAMbSQm1/jF/ySsWWoaNItvrMP7GEkvEEFyCTUYKMxjQKaTSg5up7nR6/8A== dependencies: - playwright-core "1.40.1" + playwright-core "1.41.2" optionalDependencies: fsevents "2.3.2" @@ -1321,15 +1295,15 @@ prelude-ls@^1.2.1: resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== -prettier-plugin-tailwindcss@0.5.7: - version "0.5.7" - resolved "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.5.7.tgz" - integrity sha512-4v6uESAgwCni6YF6DwJlRaDjg9Z+al5zM4JfngcazMy4WEf/XkPS5TEQjbD+DZ5iNuG6RrKQLa/HuX2SYzC3kQ== +prettier-plugin-tailwindcss@0.5.11: + version "0.5.11" + resolved "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.5.11.tgz" + integrity sha512-AvI/DNyMctyyxGOjyePgi/gqj5hJYClZ1avtQvLlqMT3uDZkRbi4HhGUpok3DRzv9z7Lti85Kdj3s3/1CeNI0w== -prettier@^3.0, prettier@3.1.0: - version "3.1.0" - resolved "https://registry.npmjs.org/prettier/-/prettier-3.1.0.tgz" - integrity sha512-TQLvXjq5IAibjh8EpBIkNKxO749UEWABoiIZehEPiY4GNpVdhaFKqSTu+QrlU6D2dPAfubRmtJTi4K4YkQ5eXw== +prettier@^3.0, prettier@3.2.5: + version "3.2.5" + resolved "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz" + integrity sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A== process-nextick-args@~2.0.0: version "2.0.1" @@ -1494,9 +1468,9 @@ safer-buffer@~2.1.0: integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== semver@^7.5.4: - version "7.5.4" - resolved "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz" - integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== + version "7.6.0" + resolved "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz" + integrity sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg== dependencies: lru-cache "^6.0.0" @@ -1512,10 +1486,10 @@ shebang-regex@^3.0.0: resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== -shiki@^0.14.1: - version "0.14.3" - resolved "https://registry.npmjs.org/shiki/-/shiki-0.14.3.tgz" - integrity sha512-U3S/a+b0KS+UkTyMjoNojvTgrBHjgp7L6ovhFVZsXmBGnVdQ4K4U9oK0z63w538S91ATngv1vXigHCSWOwnr+g== +shiki@^0.14.7: + version "0.14.7" + resolved "https://registry.npmjs.org/shiki/-/shiki-0.14.7.tgz" + integrity sha512-dNPAPrxSc87ua2sKJ3H5dQ/6ZaY8RNnaAqK+t0eG7p0Soi2ydiqbGOTaZCqaYvA/uZYfS1LJnemt3Q+mSfcPCg== dependencies: ansi-sequence-parser "^1.1.0" jsonc-parser "^3.2.0" @@ -1636,10 +1610,10 @@ tar-stream@^3.1.5: fast-fifo "^1.2.0" streamx "^2.15.0" -testcontainers@^10.3.2: - version "10.3.2" - resolved "https://registry.npmjs.org/testcontainers/-/testcontainers-10.3.2.tgz" - integrity sha512-IsV6NgS5reHcVF1nJLCDJv1hM9gAWUhLwh9b3ybgzvM3X7T2dcmuLFKt1RAR8qN8k+44tW2Drj7idxW6oeGvvg== +testcontainers@^10.7.1: + version "10.7.1" + resolved "https://registry.npmjs.org/testcontainers/-/testcontainers-10.7.1.tgz" + integrity sha512-JarbT6o7fv1siUts4tGv3wBoYrWKxjla69+5QWG9+bcd4l+ECJ3ikfGD/hpXRmRBsnjzeWyV+tL9oWOBRzk+lA== dependencies: "@balena/dockerignore" "^1.0.2" "@types/dockerode" "^3.3.21" @@ -1682,9 +1656,9 @@ tr46@~0.0.3: integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== ts-api-utils@^1.0.1: - version "1.0.3" - resolved "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.3.tgz" - integrity sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg== + version "1.2.1" + resolved "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.2.1.tgz" + integrity sha512-RIYA36cJn2WiH9Hy77hdF9r7oEwxAtB/TS9/S4Qd90Ap4z5FSiin5zEiTL44OII1Y3IIlEvxwxFUVgrHSZ/UpA== ts-poet@^6.5.0: version "6.6.0" @@ -1740,25 +1714,25 @@ typed-emitter@^2.1.0: optionalDependencies: rxjs "*" -typedoc-plugin-mdn-links@^3.1.6: - version "3.1.6" - resolved "https://registry.npmjs.org/typedoc-plugin-mdn-links/-/typedoc-plugin-mdn-links-3.1.6.tgz" - integrity sha512-W593g/B1fNDGnEb/5mitYTYTkG+/YhlX1s5hFuxi+FizSqZ5ty+le5W65ipE83VXxm4VPrwEnsS2+ec6IFKrFw== +typedoc-plugin-mdn-links@^3.1.16: + version "3.1.16" + resolved "https://registry.npmjs.org/typedoc-plugin-mdn-links/-/typedoc-plugin-mdn-links-3.1.16.tgz" + integrity sha512-Jdnw3tI3KOOMMahUNiCwKXJcH+Ov9y3syRQ8HP1ce8nT2O9Bsg9aqqa0LWye+CdCiSpWJ/USzOK3MFNxRYzL4A== -typedoc@^0.25.4, "typedoc@>= 0.23.14 || 0.24.x || 0.25.x": - version "0.25.4" - resolved "https://registry.npmjs.org/typedoc/-/typedoc-0.25.4.tgz" - integrity sha512-Du9ImmpBCw54bX275yJrxPVnjdIyJO/84co0/L9mwe0R3G4FSR6rQ09AlXVRvZEGMUg09+z/usc8mgygQ1aidA== +typedoc@^0.25.8, "typedoc@>= 0.23.14 || 0.24.x || 0.25.x": + version "0.25.8" + resolved "https://registry.npmjs.org/typedoc/-/typedoc-0.25.8.tgz" + integrity sha512-mh8oLW66nwmeB9uTa0Bdcjfis+48bAjSH3uqdzSuSawfduROQLlXw//WSNZLYDdhmMVB7YcYZicq6e8T0d271A== dependencies: lunr "^2.3.9" marked "^4.3.0" minimatch "^9.0.3" - shiki "^0.14.1" + shiki "^0.14.7" -typescript@>=4.2.0, "typescript@4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x", typescript@5.2.2: - version "5.2.2" - resolved "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz" - integrity sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w== +typescript@>=4.2.0, "typescript@4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x", typescript@5.3.3: + version "5.3.3" + resolved "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz" + integrity sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw== undici-types@~5.26.4: version "5.26.5" From f5f7843fa48b223a855cec80171f622a98dfa86c Mon Sep 17 00:00:00 2001 From: Kamil Stasiak Date: Thu, 15 Feb 2024 16:56:13 +0100 Subject: [PATCH 6/9] Fix errors --- .../src/jellyfishSetup.tsx | 8 ++----- src/api.tsx | 1 - src/create.tsx | 2 +- src/reducer.tsx | 21 ++++++++++++------- src/state.ts | 2 +- src/stateMappers.tsx | 20 +++++++++++++----- tests/jellyfish.spec.ts | 14 +++++++------ 7 files changed, 41 insertions(+), 27 deletions(-) diff --git a/examples/use-camera-and-microphone-example/src/jellyfishSetup.tsx b/examples/use-camera-and-microphone-example/src/jellyfishSetup.tsx index 07f5b6d..867ee00 100644 --- a/examples/use-camera-and-microphone-example/src/jellyfishSetup.tsx +++ b/examples/use-camera-and-microphone-example/src/jellyfishSetup.tsx @@ -20,11 +20,8 @@ export const DEFAULT_VIDEO_TRACK_METADATA: TrackMetadata = { }; export const MANUAL_VIDEO_TRACK_METADATA: TrackMetadata = { - // @ts-ignore - type: "camera2", + type: "camera", mode: "manual", - // @ts-ignore - abc: "hello", }; export const DEFAULT_AUDIO_TRACK_METADATA: TrackMetadata = { @@ -48,8 +45,7 @@ export const MANUAL_SCREENSHARE_TRACK_METADATA: TrackMetadata = { }; export const EXAMPLE_PEER_METADATA: PeerMetadata = { - // @ts-ignore - name2: "John Doe", + name: "John Doe", }; export const { diff --git a/src/api.tsx b/src/api.tsx index f0d7675..e816ccd 100644 --- a/src/api.tsx +++ b/src/api.tsx @@ -47,7 +47,6 @@ export const createApiWrapper = ( simulcastConfig?: SimulcastConfig, maxBandwidth?: TrackBandwidthLimit, ): Promise => { - // todo could reject() so this line could throw an exception const remoteTrackId = await webrtc.addTrack(track, stream, trackMetadata, simulcastConfig, maxBandwidth); dispatch({ type: "localAddTrack", remoteTrackId, track, stream, trackMetadata, simulcastConfig }); return remoteTrackId; diff --git a/src/create.tsx b/src/create.tsx index c4ce7be..73d3c00 100644 --- a/src/create.tsx +++ b/src/create.tsx @@ -35,7 +35,7 @@ export const createDefaultState = ( remote: {}, status: null, tracks: {}, - bandwidthEstimation: BigInt(0), + bandwidthEstimation: 0n, media: INITIAL_STATE, devices: createDefaultDevices(), connectivity: { diff --git a/src/reducer.tsx b/src/reducer.tsx index 77f4a55..b3745d0 100644 --- a/src/reducer.tsx +++ b/src/reducer.tsx @@ -5,6 +5,7 @@ import { onAuthError, onAuthSuccess, onBandwidthEstimationChanged, + onConnectError, onEncodingChanged, onJoinError, onJoinSuccess, @@ -67,12 +68,12 @@ export const createDefaultDevices = (): UseCameraAndMicrophoneRe stop: () => {}, setEnable: (_value: boolean) => {}, start: () => {}, - addTrack: (_trackMetadata?: TrackMetadata, _maxBandwidth?: TrackBandwidthLimit) => Promise.reject(), // remote + addTrack: (_trackMetadata?: TrackMetadata, _maxBandwidth?: TrackBandwidthLimit) => Promise.reject(), removeTrack: () => Promise.reject(), replaceTrack: (_newTrack: MediaStreamTrack, _stream: MediaStream, _newTrackMetadata?: TrackMetadata) => Promise.reject(), broadcast: null, - status: null, // todo how to ull + status: null, stream: null, track: null, enabled: false, @@ -84,12 +85,12 @@ export const createDefaultDevices = (): UseCameraAndMicrophoneRe stop: () => {}, setEnable: (_value: boolean) => {}, start: () => {}, - addTrack: (_trackMetadata?: TrackMetadata, _maxBandwidth?: TrackBandwidthLimit) => Promise.reject(), // remote + addTrack: (_trackMetadata?: TrackMetadata, _maxBandwidth?: TrackBandwidthLimit) => Promise.reject(), removeTrack: () => Promise.reject(), replaceTrack: (_newTrack: MediaStreamTrack, _stream: MediaStream, _newTrackMetadata?: TrackMetadata) => Promise.reject(), broadcast: null, - status: null, // todo how to ull + status: null, stream: null, track: null, enabled: false, @@ -104,7 +105,7 @@ export const createDefaultState = (): State = { type: "setDevices"; data: UseCameraAnd export type Action = | ConnectAction | DisconnectAction + | ConnectError | OnJoinSuccessAction | OnAuthSuccessAction | OnAuthErrorAction @@ -379,8 +385,7 @@ const onConnect = ( }, }; } catch (e) { - // todo temporary solution - action.dispatch({ type: "onJoinError", metadata: "any" }); + action.dispatch({ type: "connectError" }); return { ...state, status: "error", @@ -404,6 +409,8 @@ export const reducer = ( state?.connectivity?.client?.removeAllListeners(); state?.connectivity?.client?.disconnect(); return { ...createDefaultState(), media: state.media, screenshare: state.screenshare, devices: state.devices }; + case "connectError": + return onConnectError()(state); // connections events case "onSocketOpen": return onSocketOpen()(state); diff --git a/src/state.ts b/src/state.ts index ff4fdaa..9d9f357 100644 --- a/src/state.ts +++ b/src/state.ts @@ -13,7 +13,7 @@ export const DEFAULT_STORE: State = { tracks: {}, media: INITIAL_STATE, devices: createDefaultDevices(), - bandwidthEstimation: BigInt(0), // todo investigate bigint n notation + bandwidthEstimation: 0n, connectivity: { api: null, client: null, diff --git a/src/stateMappers.tsx b/src/stateMappers.tsx index 3f29099..eb088a3 100644 --- a/src/stateMappers.tsx +++ b/src/stateMappers.tsx @@ -6,6 +6,12 @@ import type { } from "@jellyfish-dev/ts-client-sdk"; import { PeerState, PeerId, State, Track, TrackId, TrackWithOrigin, Origin } from "./state.types"; +export const onConnectError = + () => + (prevState: State): State => { + return { ...prevState, status: "error" }; + }; + export const onSocketOpen = () => (prevState: State): State => { @@ -294,7 +300,8 @@ export const onJoinSuccess = const local: PeerState = { id: peerId, metadata: peerMetadata, - rawMetadata: peerMetadata, // todo fix + rawMetadata: peerMetadata, + metadataParsingError: undefined, tracks: {}, }; @@ -331,9 +338,9 @@ export const addTrack = trackId: remoteTrackId, stream: stream, encoding: null, - rawMetadata: trackMetadata, // todo fix + rawMetadata: trackMetadata, metadataParsingError: undefined, - metadata: trackMetadata, // todo is ok? + metadata: trackMetadata, vadStatus: "silence", // todo investigate vad status for localPeer simulcastConfig: simulcastConfig ? { @@ -408,6 +415,8 @@ export const updateTrackMetadata = const prevTrack: Track | null = prevLocalPeer.tracks[trackId] || null; if (!prevTrack) return prevState; + const metadata = trackMetadata ? { ...trackMetadata } : undefined + return { ...prevState, local: { @@ -416,8 +425,9 @@ export const updateTrackMetadata = ...prevLocalPeer.tracks, [trackId]: { ...prevTrack, - metadata: trackMetadata ? { ...trackMetadata } : undefined, - // todo rawMetadata, metadataParsingError + metadata, + rawMetadata: metadata, + metadataParsingError: undefined, }, }, }, diff --git a/tests/jellyfish.spec.ts b/tests/jellyfish.spec.ts index 01d849c..f9aa767 100644 --- a/tests/jellyfish.spec.ts +++ b/tests/jellyfish.spec.ts @@ -111,10 +111,12 @@ test("Client throws an error if joining room at max capacity", async ({ page, co ); await overflowingPage.goto("/"); - await expect(joinRoomAndAddScreenShare(overflowingPage, roomId)).rejects.toEqual({ - status: 503, - response: { - errors: `Reached peer limit in room ${roomId}`, - }, - }); + await expect(joinRoomAndAddScreenShare(overflowingPage, roomId)).rejects.toEqual( + expect.objectContaining({ + status: 503, + response: { + errors: `Reached peer limit in room ${roomId}`, + }, + }), + ); }); From 0a850ae3b60216c2948bb51c660b70ec1df05b32 Mon Sep 17 00:00:00 2001 From: Kamil Stasiak Date: Fri, 16 Feb 2024 17:12:33 +0100 Subject: [PATCH 7/9] Fix prettier and linter --- examples/use-camera-and-microphone-example/src/MainControls.tsx | 2 +- src/stateMappers.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/use-camera-and-microphone-example/src/MainControls.tsx b/examples/use-camera-and-microphone-example/src/MainControls.tsx index 832b1bb..d210c55 100644 --- a/examples/use-camera-and-microphone-example/src/MainControls.tsx +++ b/examples/use-camera-and-microphone-example/src/MainControls.tsx @@ -65,7 +65,7 @@ export const MainControls = () => { defaultSimulcastConfig: { enabled: true, activeEncodings: ["l", "m", "h"], - disabledEncodings: [] + disabledEncodings: [], }, }, microphone: { diff --git a/src/stateMappers.tsx b/src/stateMappers.tsx index eb088a3..8a2a889 100644 --- a/src/stateMappers.tsx +++ b/src/stateMappers.tsx @@ -415,7 +415,7 @@ export const updateTrackMetadata = const prevTrack: Track | null = prevLocalPeer.tracks[trackId] || null; if (!prevTrack) return prevState; - const metadata = trackMetadata ? { ...trackMetadata } : undefined + const metadata = trackMetadata ? { ...trackMetadata } : undefined; return { ...prevState, From 39c9b8390a8905b1d6167378e555283b91d74093 Mon Sep 17 00:00:00 2001 From: Kamil Stasiak Date: Fri, 16 Feb 2024 17:16:37 +0100 Subject: [PATCH 8/9] Remove ts-client exports --- src/index.ts | 2 ++ src/ts-client-sdk/index.ts | 20 -------------------- 2 files changed, 2 insertions(+), 20 deletions(-) delete mode 100644 src/ts-client-sdk/index.ts diff --git a/src/index.ts b/src/index.ts index b706180..14bde79 100644 --- a/src/index.ts +++ b/src/index.ts @@ -51,6 +51,8 @@ export type { TrackEncoding, VadStatus, EncodingReason, + MetadataParser, + ConnectConfig, } from "@jellyfish-dev/ts-client-sdk"; export { JellyfishClient } from "@jellyfish-dev/ts-client-sdk"; diff --git a/src/ts-client-sdk/index.ts b/src/ts-client-sdk/index.ts deleted file mode 100644 index dedc0f1..0000000 --- a/src/ts-client-sdk/index.ts +++ /dev/null @@ -1,20 +0,0 @@ -export type { - Peer, - MessageEvents, - SignalingUrl, - CreateConfig, - JellyfishClient, - TrackBandwidthLimit, - SimulcastBandwidthLimit, - BandwidthLimit, - WebRTCEndpointEvents, - TrackContextEvents, - Endpoint, - SimulcastConfig, - TrackContext, - TrackEncoding, - VadStatus, - EncodingReason, - MetadataParser, - ConnectConfig, -} from "@jellyfish-dev/ts-client-sdk"; From 1a27b3405e6f860c936c5da5f834815cbc47961d Mon Sep 17 00:00:00 2001 From: Kamil Stasiak Date: Fri, 16 Feb 2024 17:18:13 +0100 Subject: [PATCH 9/9] Bump version to 0.2.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 86005d6..268c83f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@jellyfish-dev/react-client-sdk", - "version": "0.1.9", + "version": "0.2.0", "description": "React client library for Jellyfish.", "license": "Apache-2.0", "author": "Membrane Team",