Skip to content
This repository was archived by the owner on Oct 18, 2024. It is now read-only.

Commit cd4f2be

Browse files
Merge pull request #722 from SuperViz/fix/build-esm-files
feat: add socket client library to SDK
2 parents b19cbb9 + 0ef223a commit cd4f2be

File tree

33 files changed

+785
-72
lines changed

33 files changed

+785
-72
lines changed

__mocks__/io.mock.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { jest } from '@jest/globals';
2-
import { Room } from '@superviz/socket-client';
2+
import { Room } from '../src/lib/socket';
33

44
export const MOCK_IO = {
55
ClientState: {

jest.setup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ global.DOMPoint = class {
3636
}
3737
};
3838

39-
jest.mock('@superviz/socket-client', () => MOCK_IO);
39+
jest.mock('./src/lib/socket', () => MOCK_IO);

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@
9292
"lodash.isequal": "^4.5.0",
9393
"luxon": "^3.4.4",
9494
"rxjs": "^7.8.1",
95-
"semantic-release-version-file": "^1.0.2"
95+
"semantic-release-version-file": "^1.0.2",
96+
"socket.io-client": "^4.7.5",
97+
"zod": "^3.23.8"
9698
},
9799
"config": {
98100
"commitizen": {

src/components/base/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as Socket from '@superviz/socket-client';
1+
import * as Socket from '../../lib/socket';
22

33
import { ComponentLifeCycleEvent } from '../../common/types/events.types';
44
import { Group } from '../../common/types/participant.types';

src/components/form-elements/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { SocketEvent } from '@superviz/socket-client';
1+
import type { SocketEvent } from '../../lib/socket';
22

33
import { Participant } from '../../common/types/participant.types';
44
import { StoreType } from '../../common/types/stores.types';

src/components/form-elements/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { SocketEvent } from '@superviz/socket-client';
1+
import { SocketEvent } from '../../lib/socket';
22

33
export type FormElementsProps = {
44
fields?: string[] | string;

src/components/presence-mouse/canvas/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as Socket from '@superviz/socket-client';
1+
import * as Socket from '../../../lib/socket';
22
import { throttle } from 'lodash';
33

44
import { RealtimeEvent } from '../../../common/types/events.types';

src/components/presence-mouse/html/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as Socket from '@superviz/socket-client';
1+
import * as Socket from '../../../lib/socket';
22
import { isEqual } from 'lodash';
33
import { Subscription, fromEvent, throttleTime } from 'rxjs';
44

src/components/realtime/channel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as Socket from '@superviz/socket-client';
1+
import * as Socket from '../../lib/socket';
22
import throttle from 'lodash/throttle';
33

44
import { ComponentLifeCycleEvent } from '../../common/types/events.types';

src/components/video/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { TextEncoder, TextDecoder } from 'util';
22

3-
import { PresenceEvent } from '@superviz/socket-client';
3+
import { PresenceEvent } from '../../lib/socket';
44

55
import { MOCK_CONFIG } from '../../../__mocks__/config.mock';
66
import { EVENT_BUS_MOCK } from '../../../__mocks__/event-bus.mock';

0 commit comments

Comments
 (0)