diff --git a/CHANGELOG.md b/CHANGELOG.md index 30c20a0..56a068f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,24 @@ All notable changes to this project will be documented in this file. See [conventional commits](https://www.conventionalcommits.org/) for commit guidelines. - - - +## 0.3.3 - 2024-03-16 +#### Bug Fixes +- fix events data passing into functions - (ef15edf) - lambda + +- - - + +## 0.3.2 - 2024-01-27 +#### Bug Fixes +- fix error with arg destruction - (407e69c) - lambda + +- - - + +## 0.3.1 - 2024-01-27 +#### Bug Fixes +- fix passing ws message - (b710623) - lambda + +- - - + ## 0.3.0 - 2024-01-20 #### Features - use message-processor library - (dcfc6b3) - lambda diff --git a/Makefile b/Makefile index afe47c3..7e1c31c 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,9 @@ start: build: docker build . -t $(IMAGE_NAME):$(GIT_TAG) +build-experimental: + docker build . -t $(IMAGE_NAME):experimental + bump-latest: docker tag $(IMAGE_NAME):$(GIT_TAG) $(IMAGE_NAME):latest @@ -19,3 +22,6 @@ push-current: login push-latest: login docker push $(IMAGE_NAME):latest + +push-experimental: login + docker push $(IMAGE_NAME):experimental diff --git a/public/main.js b/public/main.js index e4c6cc1..5c5413f 100644 --- a/public/main.js +++ b/public/main.js @@ -139,7 +139,9 @@ const socketProtocol = location.protocol === "http:" ? "ws:" : "wss:"; async function connectToServer() { const ws = new WebSocket(`${socketProtocol}//${location.host}/meta`); - ws.addEventListener("message", messageProcessor.processMessage); + ws.addEventListener("message", (event) => + messageProcessor.processMessage(event.data), + ); } const changeTitles = ({ artist, title }) => { @@ -161,7 +163,7 @@ const changeTitles = ({ artist, title }) => { } }; -const metadataChange = ({ data }) => { +const metadataChange = (data) => { changeTitles(data); }; @@ -173,7 +175,7 @@ const liveEnded = () => { logoDot.classList.remove("live"); }; -const setState = ({ data }) => { +const setState = (data) => { const { lastPlayed, isOnline } = data; if (lastPlayed) changeTitles(lastPlayed); if (isOnline) liveStarted(); diff --git a/src/messagesProcessor.js b/src/messagesProcessor.js index 29784da..c4238be 100644 --- a/src/messagesProcessor.js +++ b/src/messagesProcessor.js @@ -20,7 +20,7 @@ const changeTitles = ({ artist, title }) => { } }; -const metadataChange = ({ data }) => { +const metadataChange = (data) => { changeTitles(data); }; @@ -32,7 +32,7 @@ const liveEnded = () => { logoDot.classList.remove("live"); }; -const setState = ({ data }) => { +const setState = (data) => { const { lastPlayed, isOnline } = data; if (lastPlayed) changeTitles(lastPlayed); if (isOnline) liveStarted(); diff --git a/src/websocket.js b/src/websocket.js index a6f22f4..b78ebd5 100644 --- a/src/websocket.js +++ b/src/websocket.js @@ -4,5 +4,7 @@ const socketProtocol = location.protocol === "http:" ? "ws:" : "wss:"; export async function connectToServer() { const ws = new WebSocket(`${socketProtocol}//${location.host}/meta`); - ws.addEventListener("message", messageProcessor.processMessage); + ws.addEventListener("message", (event) => + messageProcessor.processMessage(event.data), + ); }