Skip to content

Commit 28f4b9b

Browse files
authored
Merge pull request #316 from oslabs-beta/development47
Swell version 1.10.1
2 parents d716607 + bbd80f7 commit 28f4b9b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+1492
-1061
lines changed

CONTRIBUTING.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,4 @@ People _love_ thorough bug reports. I'm not even kidding.
5353

5454
By contributing, you agree that your contributions will be licensed under its MIT License.
5555

56-
## References
5756

58-
This document was adapted from the open-source contribution guidelines for [Facebook's Draft](https://github.com/facebook/draft-js/blob/a9316a723f9e918afde44dea68b5f9f39b7d9b00/CONTRIBUTING.md)

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2018 Swell
3+
Copyright (c) 2022 Swell
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ Swell is a one-stop shop for sending and monitoring your API requests
7676
7777
## Additional Features
7878
79+
- _Send Request Directly to Endpoint_: You are able to immedeately send a request to an endpoint OR stage a request in your workspace for multi-level testing.
80+
<kbd><img src="./ReadMeGifs/Gifs/DirectSendRequest.gif"
81+
style="float: left; margin-right: 10px; margin-bottom : 30px; margin-top : 10px; border: 1px solid black;" /></kbd>
7982
- _Scripting in Swell_: Swell allows you to write assertion tests to aid in the test-driven development cycle of backend API services.
8083
<kbd><img src="./ReadMeGifs/Gifs/SimpleResponseTest.gif"
8184
style="float: left; margin-right: 10px; margin-bottom : 30px; margin-top : 10px; border: 1px solid black;" /></kbd>
@@ -159,6 +162,11 @@ Swell is a one-stop shop for sending and monitoring your API requests
159162
- **Jennifer Wu** - [jsh-wu](https://github.com/jsh-wu)
160163
- **Jacob Viesselman** - [JacobViesselman](https://github.com/JacobViesselman)
161164
- **Michael Prince** - [MichaelGPrince](https://github.com/MichaelGPrince)
165+
- **Genevieve Annable** - [gigifeeds](https://github.com/gigifeeds)
166+
- **Jay Wall** - [hanswand](https://github.com/hanswand)
167+
- **Sam Pyo** - [samhpyo](https://github.com/samhpyo)
168+
- **Drew Pomatti** - [thedrewery](https://github.com/thedrewery)
169+
- **Kurtis Waterbury** - [kurto8](https://github.com/kurto8)
162170
163171
## License
164172
-6.36 MB
Loading

ReadMeGifs/Gifs/CollectionTest.gif

-746 KB
Loading

ReadMeGifs/Gifs/ConcurrentStreams.gif

3.98 MB
Loading

ReadMeGifs/Gifs/DarkMode.gif

250 KB
Loading

ReadMeGifs/Gifs/DirectSendRequest.gif

5.65 MB
Loading

ReadMeGifs/Gifs/GRPCResponses.gif

-6.72 MB
Loading

ReadMeGifs/Gifs/GraphQL.gif

-7.81 MB
Loading

ReadMeGifs/Gifs/SSE.gif

123 KB
Loading

ReadMeGifs/Gifs/ScheduleTest.gif

-6.61 MB
Loading
-11.7 MB
Loading

ReadMeGifs/Gifs/WS.gif

-1.74 MB
Loading

ReadMeGifs/Gifs/Webhook.gif

925 KB
Loading

ReadMeGifs/Gifs/openapi.gif

3.06 MB
Loading

ReadMeGifs/Gifs/webrtc.gif

1.74 MB
Loading

main.js

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,28 @@
1+
// https://github.com/electron/electron/issues/10257
2+
// Code fix to support NODE_EXTRA_CA_CERTS env. There is currently no other fixes to the NODE_TLS_REJECT_UNAUTHORIZED at the moment.
3+
4+
(function(){
5+
if(!process.env.NODE_EXTRA_CA_CERTS) return;
6+
try{
7+
const extraca = require("fs").readFileSync(process.env.NODE_EXTRA_CA_CERTS);
8+
}catch(e){
9+
return;
10+
}
11+
12+
const NativeSecureContext = process.binding('crypto').SecureContext;
13+
const oldaddRootCerts = NativeSecureContext.prototype.addRootCerts;
14+
NativeSecureContext.prototype.addRootCerts = function(){
15+
const ret = oldaddRootCerts.apply(this, ...args);
16+
this.addCACert(extraca);
17+
return ret;
18+
};
19+
})();
20+
121
// Allow self-signing HTTPS over TLS
222
// process.env.NODE_TLS_REJECT_UNAUTHORIZED = 1;
323
// Allow self-signing HTTPS over TLS
424
// Disabling Node's rejection of invalid/unauthorized certificates
5-
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
25+
// process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
626
// from stack overflow: https://stackoverflow.com/a/35633993/11606641
727
// Your fix is insecure and shouldn't really be done at all, but is often done in development (it should never be done in production).
828
// The proper solution should be to put the self-signed certificate in your trusted root store OR to get a proper certificate signed by an existing Certificate Authority (which is already trusted by your server).

main_process/main_httpController.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -268,17 +268,17 @@ const httpController = {
268268
// ----------------------------------------------------------------------------
269269

270270
makeFetch(args, event, reqResObj) {
271-
console.log('args===>', args);
272-
console.log('event===>', event);
273-
console.log('reqRESSSSOBJ===>', reqResObj);
271+
//console.log('args===>', args);
272+
//console.log('event===>', event);
273+
//console.log('reqRESSSSOBJ===>', reqResObj);
274274
return new Promise((resolve) => {
275275
const { method, headers, body } = args.options;
276276

277277
fetch2(headers.url, { method, headers, body })
278278
.then((response) => {
279-
console.log('responsefromendpoint====>', response);
279+
//console.log('responsefromendpoint====>', response);
280280
const headers = response.headers.raw();
281-
console.log('headersfromfetch==>', headers);
281+
//console.log('headersfromfetch==>', headers);
282282
// check if the endpoint sends SSE
283283
// add status-==== code for regular http requests in the response header
284284
if (headers['content-type'][0].includes('stream')) {
@@ -292,16 +292,16 @@ const httpController = {
292292
headers[':status'] = response.status;
293293

294294
const receivedCookie = headers['set-cookie'];
295-
console.log('receivedCookie===>', receivedCookie);
295+
//console.log('receivedCookie===>', receivedCookie);
296296
headers.cookies = receivedCookie;
297-
console.log('newheaders==>', headers);
297+
//console.log('newheaders==>', headers);
298298
const contents = /json/.test(response.headers.get('content-type'))
299299
? response.json()
300300
: response.text();
301301

302302
contents
303303
.then((body) => {
304-
console.log('bodyyyy====>', body);
304+
//console.log('bodyyyy====>', body);
305305

306306
resolve({
307307
headers,
@@ -344,7 +344,7 @@ const httpController = {
344344
} else {
345345
this.makeFetch({ options }, event, reqResObj)
346346
.then((response) => {
347-
console.log('makefetchResponse===>', response);
347+
//console.log('makefetchResponse===>', response);
348348
// Parse response headers now to decide if SSE or not.
349349
const heads = response.headers;
350350
reqResObj.response.headers = heads;
@@ -366,7 +366,7 @@ const httpController = {
366366
}
367367
// update reqres object to include new event
368368
reqResObj = this.addSingleEvent(body, reqResObj);
369-
console.log('latest REQRESOBJ=>', reqResObj);
369+
//console.log('latest REQRESOBJ=>', reqResObj);
370370
// check if there is a test script to run
371371
if (reqResObj.request.testContent) {
372372
reqResObj.response.testResult = testingController.runTest(
@@ -389,7 +389,7 @@ const httpController = {
389389

390390
parseFetchOptionsFromReqRes(reqResObject) {
391391
const { headers, body, cookies } = reqResObject.request;
392-
console.log('reqresOBJJJ=>', reqResObject);
392+
//console.log('reqresOBJJJ=>', reqResObject);
393393

394394
let { method } = reqResObject.request;
395395

package.json

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "swell",
3-
"version": "1.0.0",
3+
"version": "1.10.1",
44
"description": "Swell",
55
"main": "main.js",
66
"repository": "https://github.com/open-source-labs/Swell",
@@ -139,6 +139,7 @@
139139
"eventsource": "^1.0.7",
140140
"express": "^4.17.1",
141141
"express-sse": "^0.5.3",
142+
"fs": "0.0.1-security",
142143
"google-auth-library": "^5.10.1",
143144
"graphql": "^14.6.0",
144145
"graphql-language-service-interface": "2.8.2",
@@ -148,15 +149,17 @@
148149
"graphql-tools": "^6.1.0",
149150
"highland": "^2.13.5",
150151
"identity-obj-proxy": "^3.0.0",
152+
"install": "^0.13.0",
151153
"js-beautify": "^1.14.0",
152154
"mali": "^0.21.0",
153155
"material-ui-dropzone": "^3.5.0",
154156
"mongoose": "^5.9.29",
155157
"ngrok": "^4.2.2",
156158
"node-fetch": "^2.6.0",
157159
"node-pre-gyp": "^0.6.39",
158-
"node-sass": "^4.14.1",
160+
"node-sass": "npm:sass@^1.45.2",
159161
"nodemon": "^1.19.4",
162+
"npm": "^8.3.0",
160163
"npm-http-server": "^4.3.0",
161164
"path": "^0.12.7",
162165
"prop-types": "^15.6.2",
@@ -202,15 +205,14 @@
202205
"@testing-library/react": "^10.4.3",
203206
"@types/cookie": "^0.4.0",
204207
"@types/jest": "^26.0.4",
205-
"@types/node": "^14.0.20",
208+
"@types/node": "^14.18.3",
206209
"@types/node-fetch": "^2.5.7",
207210
"@types/react": "^16.9.41",
208211
"@types/react-dom": "^16.9.8",
209212
"@types/react-redux": "^7.1.9",
210213
"@types/react-router-dom": "^5.1.6",
211214
"@types/set-cookie-parser": "0.0.6",
212215
"@types/uuid": "^8.3.1",
213-
"@types/webrtc": "^0.0.19",
214216
"@types/ws": "^7.2.6",
215217
"@typescript-eslint/eslint-plugin": "^3.6.0",
216218
"@typescript-eslint/parser": "^3.10.1",
@@ -494,6 +496,31 @@
494496
"name": "Adrian Uesugui",
495497
"email": "https://www.linkedin.com/in/auesugui/",
496498
"url": "https://github.com/auesugui"
499+
},
500+
{
501+
"name": "Genevieve Annable",
502+
"email": "https://www.linkedin.com/in/genevieveannable/",
503+
"url": "https://github.com/gigifeeds"
504+
},
505+
{
506+
"name": "Drew Pomatti",
507+
"email": "https://www.linkedin.com/in/drewpomatti/",
508+
"url": "https://github.com/thedrewery"
509+
},
510+
{
511+
"name": "Sam Pyo",
512+
"email": "https://www.linkedin.com/in/samhpyo/",
513+
"url": "https://github.com/samhpyo"
514+
},
515+
{
516+
"name": "Jay Wall",
517+
"email": "https://www.linkedin.com/in/walljay/",
518+
"url": "https://github.com/hanswand"
519+
},
520+
{
521+
"name": "Kurtis Waterbury",
522+
"email": "https://www.linkedin.com/in/kurtiswaterbury/",
523+
"url": "https://github.com/kurto8"
497524
}
498525
]
499526
}
114 KB
Loading

src/assets/img/swell-logo-faded.png

101 KB
Loading

src/assets/style/base.scss

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11

22
* {
33
box-sizing: border-box;
4+
font-size: 12px;
45
// background-color: lightgray;
6+
// background-color: aquamarine;
57
}
68

79
// BULMA ADJUSTMENTS
810
.hero {
9-
height: 2.5rem;
10-
padding-top: 0.5rem;
11+
height: 2.5rem; // nothing happened when changed
12+
padding-top: 0.5rem; // makes purple banner change height
1113
}
1214

1315
.hero h3 {
1416
font-family: "Source Sans Pro", sans-serif;
15-
font-weight: 600;
17+
font-weight: 600; // font boldness in banner (composer, workspace responses)
1618
}
1719

1820
input:focus {

src/assets/style/colors.scss

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
$primary-100: #ffd645;
22
$primary-200: #f66b61;
33
$primary-300: #21d4a4;
4-
$primary-400: #50809b; // this is not currently used
5-
$primary-500: #3834a9;
6-
7-
$rest: #6843ff;
8-
$graphql: #de33a6;
9-
$grpc: #6cacc1;
10-
$websockets: #f47d31;
11-
$webrtc: #4285f4;
12-
$openapi: #94c73d;
13-
$webhook: rgb(185, 52, 52);
14-
$webhookOn: #037448;
4+
$primary-400: #9b5088; // this is not currently used
5+
$primary-500: #50809b;
6+
7+
$rest: #ff9e43;
8+
$graphql: #ff9e43;
9+
$grpc: #ff9e43;
10+
$websockets: #ff9e43;
11+
$webrtc: #ff9e43;
12+
$openapi: #ff9e43;
13+
$webhook: #ff9e43;
14+
$webhookOn: #ff9e43;
1515

1616
$neutral-100: #5e5e5e;
1717
$neutral-200: #f4f5f7;
1818
$neutral-300: #e1e1e1;
1919
$neutral-400: #737581;
2020
$neutral-500: #4a4b53;
2121
$neutral-600: #000000;
22+
$neutral-700: #f3f3f3; // gigi added to set background of 3 main containers
2223

2324
// BULMA COLORS
2425
$primary: $primary-500;
@@ -193,6 +194,7 @@ $text: $neutral-400;
193194
.is-divider-neutral-300 { // this is the divider between the tabs -Prince
194195
border-left: 1px solid $neutral-300;
195196
border-right: 1px solid $neutral-300;
197+
background-color: $neutral-700;
196198
}
197199

198200
.is-awesome-icon {

src/assets/style/darkMode.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
$neutral-100: #AEAEAE;
22
$neutral-200: #9F9F9F;
33
$neutral-300: #575757;
4-
$neutral-400: #383838;
4+
$neutral-400: #1f282e;
55
$neutral-500: #434343;
66
$neutral-600: #000000;
77
$text: #94959e;

src/assets/style/responsepane.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
}
88

99
.empty-state-img {
10-
max-width: 160px;
10+
max-width: 300px;
1111
}
1212

1313
.is-not-8rem-tall {

src/assets/style/sidebar.scss

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
// background-color: gray;
55
// }
66

7+
.composer {
8+
padding-left: 8px;
9+
padding-right: 8px;
10+
}
11+
712
.include-data-checkbox {
813
background: #FFFFFF;
914
/* neutral-300 */
@@ -12,17 +17,29 @@
1217
border-radius: 2px;
1318
max-width: 26px;
1419
max-height: 26px;
20+
margin-left: 2px !important;
1521
}
1622

1723
.switch:focus {
1824
border: none;
1925
outline: none;
2026
}
2127

28+
.add-header-gRPC-cookie-button {
29+
color: $primary !important;
30+
border-color: $primary !important;
31+
width: 3px !important;
32+
height: 3px !important;
33+
margin-left: 2px !important;
34+
margin-right: 2px !important;
35+
font-size: 16px !important;
36+
border-radius: 2px !important;
37+
}
38+
2239
.add-header-or-cookie-button {
2340
color: $primary !important;
2441
border-color: $primary !important;
25-
min-width: 80px;
42+
min-width: 5px;
2643
}
2744

2845
.prettify-select {
@@ -56,6 +73,17 @@
5673

5774
.input {
5875
outline: none !important;
76+
77+
}
78+
79+
.key {
80+
border: 1px solid $neutral-200 !important;
81+
border-radius: 4px;
82+
}
83+
84+
.value {
85+
border: 1px solid $neutral-200 !important;
86+
border-radius: 4px;
5987
}
6088

6189
// HISTORY TAB
@@ -91,7 +119,7 @@
91119
& :global(.react-codemirror2) {
92120
overflow: auto; /* you can use hidden here as well */
93121
}
94-
}
122+
}
95123

96124
.cm-s-responsebody .CodeMirror-wrap {
97125
height: 1000px !important;
@@ -163,4 +191,16 @@
163191

164192
.no-border-please {
165193
border: none !important;
194+
}
195+
196+
.inputs {
197+
display: flex;
198+
justify-content: space-between;
199+
}
200+
201+
.restReqBtns {
202+
display: flex;
203+
flex-direction: column;
204+
align-items: center;
205+
// justify-content: start;
166206
}

0 commit comments

Comments
 (0)