Skip to content

Commit e16822e

Browse files
authored
Merge pull request #355 from oslabs-beta/dev
feat: WebRTC integration and front-end updates
2 parents f1d1f71 + 08dd9d6 commit e16822e

26 files changed

+1013
-269
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,23 @@ jobs:
3030
steps:
3131
- name: Checkout repository
3232
uses: actions/checkout@v3
33+
34+
- name: Use Node.js 18
35+
uses: actions/setup-node@v3
36+
with:
37+
node-version: 18.20.6 # Or your preferred 18.x version
38+
39+
- name: Print Node.js version
40+
run: node -v
41+
42+
- name: Install dependencies
43+
run: npm ci # Or npm install if you prefer
44+
45+
- name: Build project
46+
run: |
47+
make boostrap
48+
make release
49+
npm run build
3350
3451
# Initializes the CodeQL tools for scanning.
3552
- name: Initialize CodeQL
@@ -43,19 +60,15 @@ jobs:
4360

4461
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
4562
# If this step fails, then you should remove it and run the build manually (see below)
46-
- name: Autobuild
47-
uses: github/codeql-action/autobuild@v2
63+
# - name: Autobuild
64+
# uses: github/codeql-action/autobuild@v2
4865

4966
# ℹ️ Command-line programs to run using the OS shell.
5067
# 📚 https://git.io/JvXDl
5168

5269
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
5370
# and modify them (or add more) to build your code if your project
54-
# uses a compiled language
55-
56-
#- run: |
57-
# make bootstrap
58-
# make release
71+
# uses a compiled language (we moved the "below" lines up to 42 and edited them)
5972

6073
- name: Perform CodeQL Analysis
6174
uses: github/codeql-action/analyze@v2

.github/workflows/createPackages.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ jobs:
99
tests:
1010
strategy:
1111
matrix:
12-
node-version: [16]
12+
node-version: [18.20.6]
1313
os: [macos-latest, ubuntu-latest, windows-latest]
1414
runs-on: ${{ matrix.os }}
1515
steps:
1616
- name: Checkout repo
1717
uses: actions/checkout@v3
18-
- name: Use Node.js ${{ matrix.node-version }}
18+
- name: Use Node.js 18.20.6 # this used to be dynamically updated, but kept pulling an old version number. you'll have to manually update these throughout this file to be safe.
1919
uses: actions/setup-node@v3
2020
with:
21-
node-version: ${{ matrix.node-version }}
21+
node-version: 18.20.6
2222
- name: Install dependencies
2323
run: npm i && npm ci
2424
- name: Run unit tests
@@ -40,15 +40,15 @@ jobs:
4040
- name: Use Node.js
4141
uses: actions/setup-node@v2
4242
with:
43-
node-version: '16.15'
43+
node-version: '18.20.6'
4444
- name: Create Release
4545
id: create_release
4646
uses: actions/create-release@v1
4747
env:
4848
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
4949
with:
50-
tag_name: v1.16.0 # Replace with your desired tag or version number
51-
release_name: Release v1.16.0 # Replace with your desired release name
50+
tag_name: v1.19.0 # Replace with your desired tag or version number
51+
release_name: Release v1.19.0 # Replace with your desired release name
5252
draft: true
5353
body: |
5454
<Temporary Body for Github Release>
@@ -67,7 +67,7 @@ jobs:
6767
- name: Use Node.js
6868
uses: actions/setup-node@v2
6969
with:
70-
node-version: '16.15'
70+
node-version: '18.20.6'
7171

7272
- name: Install Dependencies
7373
run: npm install
@@ -89,7 +89,7 @@ jobs:
8989
- name: Use Node.js
9090
uses: actions/setup-node@v2
9191
with:
92-
node-version: '16.15' # Use the specific version of Node that your project requires
92+
node-version: '18.20.6' # Use the specific version of Node that your project requires
9393

9494
- name: Install Dependencies
9595
run: npm install
@@ -118,7 +118,7 @@ jobs:
118118
- name: Use Node.js
119119
uses: actions/setup-node@v2
120120
with:
121-
node-version: '16.15' # Use the specific version of Node that your project requires
121+
node-version: '18.20.6' # Use the specific version of Node that your project requires
122122

123123
- name: Install Dependencies
124124
run: npm install

.github/workflows/unit-tests.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
tests:
77
strategy:
88
matrix:
9-
node-version: [16]
9+
node-version: [18.20.6]
1010
os: [macos-latest, ubuntu-latest, windows-latest]
1111
runs-on: ${{ matrix.os }}
1212
steps:
@@ -18,7 +18,11 @@ jobs:
1818
node-version: ${{ matrix.node-version }}
1919
- name: Install dependencies
2020
run: npm i && npm ci
21+
- name: Apply patches
22+
env:
23+
NODE_ENV: --no-node-snapshot
24+
run: npx patch-package
2125
- name: Run unit tests
2226
uses: coactions/setup-xvfb@v1
2327
with:
24-
run: npm run test-jest
28+
run: npm run test-jest

Dockerfile-dev

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
From node:18.20
2+
RUN npm install -g webpack
3+
Workdir /app
4+
Copy package*.json /app
5+
Run npm install
6+
Expose 8080

README.md

Lines changed: 38 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Swell is a one-stop shop for sending and monitoring your API requests:
2121

2222
- Send and monitor streams over HTTP/2 (including SSEs) and WebSockets
2323
- Create GraphQL queries, introspections, mutations, and subscriptions
24+
- Test WebRTC applications over video, audio and text channels
2425
- Stress testing HTTP/2 and GraphQL endpoints
2526
- Create your own HTTP/2 mock server
2627
- Store workspaces of multiple requests for later use
@@ -67,6 +68,34 @@ We highly encourage you to check out the `DEV-README.md` in the `docs` folder. W
6768

6869
See [tRPC docs](https://trpc.io/docs/) for more information on sending tRPC requests or setting up a tRPC server.
6970

71+
72+
- _WebRTC_: Swell makes it easy to test WebRTC applications for video, audio and text channels. Currently Swell supports manual entry of SDPs.
73+
74+
### Walkthrough for setting up a text channel connection using the app's generated offer and answer:
75+
76+
- Step 1
77+
Caller: Generate an offer by clicking “Get Offer.” Copy the offer to your computer's clipboard and send it to recipient (we recommend sending by email).
78+
- Step 2
79+
Recipient: Copy the offer you received from the caller and paste it into the offer box (the top text box)
80+
- Step 3
81+
Recipient: Click “Get answer” button, generate an answer and copy it to your computer's clipboard. Send it to caller (email recommended)
82+
- Step 4
83+
Caller: Copy answer to your computer's clipboard and paste it into the answer box (bottom text box).
84+
- Step 5
85+
Caller: Click the “add answer” button. Now the connection is open!
86+
- Step 6
87+
Caller: Click “add to workspace” button.
88+
- Step 7
89+
Recipient: Click “add to workspace” button.
90+
- Step 8
91+
Caller: Click "Send" button on the left-hand side of the app.
92+
- Step 9
93+
Recipient: Click "Send" button on the left-hand side of the app.
94+
- Step 10
95+
Send and receive text messages via the response panel at the bottom of the app.
96+
<img src="./ReadMeGifs/Gifs/webrtc.gif" style="display: block; margin: 10px auto 30px; " />
97+
98+
7099
## Additional features
71100

72101
- _Stress testing for HTTP/2 and GraphQL_: Test your server backend with Swell's stress testing feature to ensure your server can manage expected and unexpected loads accordingly
@@ -91,16 +120,14 @@ We highly encourage you to check out the `DEV-README.md` in the `docs` folder. W
91120

92121
<img src="./ReadMeGifs/Gifs/FileUploadAndDarkMode.gif"
93122
style="display: block; margin: 10px auto 30px; border: 1px solid black;" />
123+
94124
## Experimental Features
95125

96126
- _Mock Server_: Swell allows you to create your own HTTP/2 mock server to facilitate front-end development without depending on a fully built backend server.
97127
<img src="./ReadMeGifs/Gifs/MockServer.gif" style="display: block; margin: 10px auto 30px;" />
98128

99129
- _Webhooks_: Swell includes user-defined HTTP callback connection testing designed to test other server's connection to the web and ability to send data. The test insures that when an event occurs, the source site makes an HTTP request to the URL configured for the webhook.
100130

101-
- _WebRTC_: Swell makes it easy to test WebRTC applications for both video and text channels. Currently Swell supports manual entry of SDPs.
102-
<img src="./ReadMeGifs/Gifs/webrtc.gif" style="display: block; margin: 10px auto 30px; " />
103-
104131
- _OpenAPI_: Swell supports the enumeration and execution of REST and RPC API requests as defined in a user-provided OpenAPI document.
105132
<img src="./ReadMeGifs/Gifs/openapi.gif" style="display: block; margin: 10px auto 30px;" />
106133

@@ -110,7 +137,7 @@ We highly encourage you to check out the `DEV-README.md` in the `docs` folder. W
110137
- React
111138
- React Router
112139
- Material UI
113-
- Redux
140+
- Redux Toolkit
114141
- Apollo Client
115142
- Websockets
116143
- gRPC-js
@@ -124,6 +151,12 @@ We highly encourage you to check out the `DEV-README.md` in the `docs` folder. W
124151
- Playwright
125152

126153
## Authors
154+
155+
- **Isaac Mbambo** - [IM236](https://github.com/IM236)
156+
- **Kiki Hunt** - [Iloveeverything](https://github.com/Iloveeverything)
157+
- **Ting Lee** - [tingEng](https://github.com/tingEng)
158+
- **Rachel Dean** - [rchldn](https://github.com/rchldn)
159+
- **Kadeem Reid** - [Kadeem929](https://github.com/Kadeem929)
127160
- **Karol Krzywon** - [kkrzywon](https://github.com/kkrzywon)
128161
- **Howard Sun** - [howardCodeGit](https://github.com/howardCodeGit)
129162
- **Carter Sarkela** - [CarterSarkela](https://github.com/CarterSarkela)
@@ -215,4 +248,4 @@ We highly encourage you to check out the `DEV-README.md` in the `docs` folder. W
215248

216249
## License
217250

218-
This project is licensed under the MIT License
251+
This project is licensed under the MIT License

build/config.gypi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Do not edit. File was generated by node-gyp's "configure" step
22
{
33
"target_defaults": {
4-
"cflags": [],
4+
"cflags": ['-std=c++20'],
55
"default_configuration": "Release",
66
"defines": [],
77
"include_dirs": [],
@@ -52,7 +52,7 @@
5252
"node_use_dtrace": "true",
5353
"node_use_etw": "false",
5454
"node_use_node_code_cache": "true",
55-
"node_use_node_snapshot": "true",
55+
"node_use_node_snapshot": "false",
5656
"node_use_openssl": "true",
5757
"node_use_v8_platform": "true",
5858
"node_with_ltcg": "false",

0 commit comments

Comments
 (0)