Skip to content

Commit

Permalink
Merge pull request #395 from boostcampwm-2022/dev
Browse files Browse the repository at this point in the history
Deploy: 6주차 배포
  • Loading branch information
wcho21 authored Dec 15, 2022
2 parents 13aa9e3 + 4f727fe commit 8653652
Show file tree
Hide file tree
Showing 60 changed files with 1,795 additions and 1,034 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ jobs:
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci

- name: For CRDT package directory
shell: bash
run: |
cd @wabinar/crdt
npm test
- name: For client directory
run: |
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# ignore secret keys
deploy-scripts/vault-secrets

# ignore jest test coverage directories
**/coverage

# ignore settings for yarn berry zero install
.yarn/*
!.yarn/cache
Expand Down
62 changes: 62 additions & 0 deletions @wabinar/api-types/block.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import { BlockType } from '@wabinar/constants/block';
import LinkedList, {
RemoteDeleteOperation,
RemoteInsertOperation,
} from '@wabinar/crdt/linked-list';

export interface LoadType {
id: string;
}

export interface LoadedType {
type: BlockType;
}

export interface UpdateType {
id: string;
type: BlockType;
}

export interface UpdatedType {
id: string;
type: BlockType;
}

export interface InitText {
id: string;
}

export interface InitializedText {
id: string;
crdt: LinkedList;
}

export interface InsertText {
id: string;
op: RemoteInsertOperation;
}

export interface InsertedText {
id: string;
op: RemoteInsertOperation;
}

export interface DeleteText {
id: string;
op: RemoteDeleteOperation;
}

export interface DeletedText {
id: string;
op: RemoteDeleteOperation;
}

export interface UpdateText {
id: string;
ops: RemoteInsertOperation[];
}

export interface UpdatedText {
id: string;
crdt: LinkedList;
}
52 changes: 52 additions & 0 deletions @wabinar/api-types/mom.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import LinkedList, {
RemoteDeleteOperation,
RemoteInsertOperation,
} from '@wabinar/crdt/linked-list';

export type Mom = {
_id: string;
title: string;
createdAt: Date;
};

export interface Created {
mom: Mom;
}

export interface Select {
id: string;
}

export interface Selected {
mom: Mom;
}

export interface UpdateTitle {
title: string;
}

export interface UpdatedTitle {
title: string;
}

export interface Initialized {
crdt: LinkedList;
}

export interface InsertBlock {
blockId: string;
op: RemoteInsertOperation;
}

export interface InsertedBlock {
op: RemoteInsertOperation;
}

export interface DeleteBlock {
blockId: string;
op: RemoteDeleteOperation;
}

export interface DeletedBlock {
op: RemoteDeleteOperation;
}
8 changes: 7 additions & 1 deletion @wabinar/constants/socket-message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ export const WORKSPACE_EVENT = {
RECEIVE_ANSWER: 'receive-answer',
SEND_ICE: 'send-ice',
RECEIVE_ICE: 'receive-ice',
RECEIVE_BYE: 'receive_bye',
AUDIO_STATE_CHANGED: 'audio-state-changed',
VIDEO_STATE_CHANGED: 'video-state-changed',
SEND_BYE: 'send-bye',
RECEIVE_BYE: 'receive-bye',
EXISTING_ROOM_USERS: 'existing-room-users',
};

export const MOM_EVENT = {
Expand All @@ -20,6 +24,8 @@ export const MOM_EVENT = {
INSERT_BLOCK: 'insert-block',
DELETE_BLOCK: 'delete-block',
UPDATED: 'updated-mom',
LOADED: 'loaded-mom',
REQUEST_LOADED: 'request-loaded',
};

export const BLOCK_EVENT = {
Expand Down
2 changes: 1 addition & 1 deletion @wabinar/crdt/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
preset: 'ts-jest', // to use typescript
verbose: true,
modulePathIgnorePatterns: ['<rootDir>/dist/'],
collectCoverage: true,
};
Loading

0 comments on commit 8653652

Please sign in to comment.