From 1ce0aaf9273f3ec2eee0acde7452b44c56d1a88e Mon Sep 17 00:00:00 2001 From: Nick Darrell Date: Tue, 1 Aug 2023 17:41:06 +0000 Subject: [PATCH 1/3] `npm i` bumped packages --- package-lock.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 0f93e1b..9837857 100755 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "braid", - "version": "1.2.3", + "version": "1.2.2", "lockfileVersion": 1, "requires": true, "dependencies": { From bea6ab8e0939565467d381c3dd7893dfc8945624 Mon Sep 17 00:00:00 2001 From: Nick Darrell Date: Tue, 1 Aug 2023 17:41:16 +0000 Subject: [PATCH 2/3] rm CustomChannel --- src/channelManager.ts | 15 ++++++--------- src/channels/types/customChannel.ts | 18 ------------------ src/clients/clientBase.ts | 5 ++--- 3 files changed, 8 insertions(+), 30 deletions(-) delete mode 100644 src/channels/types/customChannel.ts diff --git a/src/channelManager.ts b/src/channelManager.ts index 691355f..4800103 100644 --- a/src/channelManager.ts +++ b/src/channelManager.ts @@ -1,6 +1,5 @@ import PublicChannel from './channels/types/publicChannel'; import PrivateChannel from './channels/types/privateChannel'; -import CustomChannel from './channels/types/customChannel'; import PublicClient from './clients/types/publicClient'; import PrivateClient from './clients/types/privateClient'; import CustomClient from './clients/types/customClient'; @@ -17,8 +16,8 @@ class ChannelManager { } createChannel(data: any) { - const channelExists: PublicChannel|PrivateChannel|CustomChannel|null = this.channelExists(data.channel); - let channel: PublicChannel|PrivateChannel|CustomChannel; + const channelExists: PublicChannel|PrivateChannel|null = this.channelExists(data.channel); + let channel: PublicChannel|PrivateChannel; if (channelExists) { channel = channelExists; @@ -43,7 +42,7 @@ class ChannelManager { } addClientToChannel(client: PublicClient|PrivateClient|CustomClient, channel_id: string) { - const channel: PrivateChannel|PrivateChannel|CustomChannel|null = this.channelExists(channel_id); + const channel: PrivateChannel|PrivateChannel|null = this.channelExists(channel_id); if (channel) { channel.addClient(client); @@ -54,7 +53,7 @@ class ChannelManager { } } - updateChannelContent(channel: PrivateChannel|PrivateChannel|CustomChannel, channelContent: JSON) { + updateChannelContent(channel: PrivateChannel|PrivateChannel, channelContent: JSON) { if (channel) { channel.channelContent = channelContent; return {status: 'success'}; @@ -70,12 +69,10 @@ class ChannelManager { `attempting to create channel of type ${data.channel_type}, channel id: ${data.channel}...` ); - if (data.channel_type === 'public') { - return new PublicChannel(data.channel); - } else if (data.channel_type === 'private') { + if (data.channel_type === 'private') { return new PrivateChannel(data.channel); } else { - return new CustomChannel(data.channel, data.custom); + return new PublicChannel(data.channel); } } catch (e) { console.log(e); diff --git a/src/channels/types/customChannel.ts b/src/channels/types/customChannel.ts deleted file mode 100644 index a87274f..0000000 --- a/src/channels/types/customChannel.ts +++ /dev/null @@ -1,18 +0,0 @@ -import CustomClient from '../../clients/types/customClient'; -import ChannelBase from '../channelBase'; - -class CustomChannel extends ChannelBase { - clients: CustomClient[] = []; - - constructor(id: string, custom: any) { - super(id); - - if (custom) { - this.broadcastConditions = custom.broadcastConditions; - this.channelContent = custom.channelContent; - this.explicitRemoval = custom.explicitRemoval; - } - } -} - -export default CustomChannel; diff --git a/src/clients/clientBase.ts b/src/clients/clientBase.ts index 1ed82bb..c91df2d 100644 --- a/src/clients/clientBase.ts +++ b/src/clients/clientBase.ts @@ -3,7 +3,6 @@ import ClientManager from '../clientManager'; import ChannelManager from '../channelManager'; import PublicChannel from '../channels/types/publicChannel'; import PrivateChannel from '../channels/types/privateChannel'; -import CustomChannel from '../channels/types/customChannel'; const messageManager = require('../messageManager'); const logger = require('../logger'); @@ -12,7 +11,7 @@ class ClientBase { ws: WebSocket; data: any; id: number; - channel: PublicChannel|PrivateChannel|CustomChannel|null; + channel: PublicChannel|PrivateChannel|null; clientManager: ClientManager; channelManager: ChannelManager; roles: string[]; @@ -68,7 +67,7 @@ class ClientBase { return this.data.client; } - connectToChannel(channel: PublicChannel|PrivateChannel|CustomChannel) { + connectToChannel(channel: PublicChannel|PrivateChannel) { this.channel = channel; this.ws.on('message', this.messageListener); this.ws.on('close', this.closeListener); From b050f709c9f99c6e75a07bae3fbedbeb653b1094 Mon Sep 17 00:00:00 2001 From: Nick Darrell Date: Tue, 1 Aug 2023 17:46:58 +0000 Subject: [PATCH 3/3] version bump --- README.md | 2 +- docker_tag.txt | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3e615f5..3d88711 100755 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# BRAID v1.3.0 +# BRAID v1.3.1 > Websocket server for the Measure platform [![Build Status](https://semaphoreci.com/api/v1/projects/7767f0f3-4da6-4c84-9167-4db5402a3262/2573412/badge.svg)](https://semaphoreci.com/yardstick/braid) diff --git a/docker_tag.txt b/docker_tag.txt index f0bb29e..3a3cd8c 100644 --- a/docker_tag.txt +++ b/docker_tag.txt @@ -1 +1 @@ -1.3.0 +1.3.1 diff --git a/package.json b/package.json index 3b7c0ae..cbb73ba 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "braid", - "version": "1.2.2", + "version": "1.3.1", "description": "", "main": "index.js", "scripts": {