feature: added WebSocket support using originList | fix: updated build scripts and rewrote development instructions #309
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
feature: added WebSocket support using originList
Author: @Saelra
Summary
If a new WebSocket URL is added to originList, the script will connect to it while ensuring the previous connection (if any) is closed first.
If no WebSocket URL is found in originList, the active WebSocket connection is closed and activeWebSocket is set to null to ensure no further actions on a closed connection.
How to Test
Expected Behavior
The WebSocket should connect when a new URL is added and WebSocket connections should should be close after a URL is removed.
fix: updated build scripts and rewrote development instructions
Author: @aaronjeromsky and @jjemi8884
Problem
Me and my team at CodeDay encountered a
command not found
error when executing the build scripts from theHOPP_EXTENSION_TARGET
command. In addition, thecopyfiles
command fails to execute, resulting in an incomplete build output to thedist
folder. And themergeManifest.js
file does not complete as expected since whitespace in theHOPP_EXTENSION_TARGET
is being read, causing it to not be recognized.Solution
A
set
statement has been added to the beginning of the build scripts to allow for theHOPP_EXTENSION_TARGET
system variable to be set. A second&&
has been added between theparcel
andcopyfiles
commands to ensure each one is executed sequentially. And the code to read theHOPP_EXTENSION_TARGET
has been updated to ignore whitespace usingtrim()
.Additional Changes
The development section of the documentation has been rewritten with the goal of providing additional clarity for the build instructions, such as specifying the usage of a Git Bash command-line. In our testing, the PowerShell environment was unable to run either version of the build scripts due to requiring a different syntax for handling sequential lines.
Summary
set
to beginning of build scripts&&
beforecopyfiles
command in build scriptstrim()
toHOPP_EXTENSION_TARGET
when read as string