Skip to content

Commit 6bda728

Browse files
authored
Merge pull request #15 from TWetmore/cleanedUpConsoleLogs
Cleaned up console logs
2 parents 9c233a2 + 56b871e commit 6bda728

21 files changed

+1
-68
lines changed

main.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@ function createWindow() {
152152

153153
// Don't show until we are ready and loaded
154154
mainWindow.once("ready-to-show", () => {
155-
console.log("showwwww");
156155
mainWindow.show();
157156
// Open the DevTools automatically if developing
158157
if (isDev && process.env.NODE_ENV !== "test") {
@@ -162,7 +161,6 @@ function createWindow() {
162161

163162
// Emitted when the window is closed.
164163
mainWindow.on("closed", () => {
165-
console.log("window cloooosed");
166164
// Dereference the window object, usually you would store windows
167165
// in an array if your app supports multi windows, this is the time
168166
// when you should delete the corresponding element.
@@ -354,7 +352,6 @@ ipcMain.on("import-collection", (event, args) => {
354352
event.sender.send("add-collection", JSON.stringify(JSON.parse(data)));
355353
});
356354
});
357-
//.catch( err => console.log('error in import-collection', err));
358355
});
359356

360357
// ============ CONFIRM CLEAR HISTORY / RESPONSE COMMUNICATION ===============

main_process/main_testingController.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ testHttpController.runTest = (
1111
) => {
1212
const { request } = reqResObj;
1313
let { response } = reqResObj;
14-
console.log("res======>", response);
1514
// final test result objects will be stored in this array
1615
const testResults = [];
1716

main_process/main_wsController.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,9 @@ const wsController = {
2323
//check websocket npm package doc
2424
let socket;
2525
try {
26-
console.log("creating socket");
2726
socket = new WebSocketClient();
2827
} catch (err) {
2928
reqResObj.connection = "error";
30-
console.log("websocket creation errror==>", err);
3129
event.sender.send("reqResUpdate", reqResObj);
3230
return;
3331
}
@@ -36,7 +34,6 @@ const wsController = {
3634
//connection here means a single connection being established
3735
socket.on("connect", (connection) => {
3836
console.log("websocket client connected");
39-
console.log("Reqresssss====>", reqResObj);
4037
this.wsConnect = connection;
4138
reqResObj.connection = "open";
4239
reqResObj.response.connection = "open";
@@ -47,7 +44,6 @@ const wsController = {
4744
id: reqResObj.id,
4845
};
4946
connectionArray.push(openConnectionObj);
50-
//console.log("connectionArr=>", connectionArray);
5147
event.sender.send("update-connectionArray", connectionArray);
5248
event.sender.send("reqResUpdate", reqResObj);
5349
//connection.on
@@ -79,11 +75,9 @@ const wsController = {
7975
//connection.send
8076

8177
//check datatype
82-
console.log("input message pre-send", inputMessage);
8378

8479
if (inputMessage.includes("data:image/")) {
8580
const buffer = Buffer.from(inputMessage, "utf8");
86-
console.log("buffer==>", buffer);
8781
console.log("sending as buffer");
8882
this.wsConnect.sendBytes(buffer);
8983
reqResObj.request.messages.push({
@@ -116,8 +110,6 @@ const wsController = {
116110
timeReceived: Date.now(),
117111
});
118112

119-
// console.log("reqrezzTestContent=>>>>", reqResObj);
120-
121113
if (reqResObj.request.testContent) {
122114
reqResObj.response.testResult = testingController.runTest(
123115
reqResObj.request.testContent,
@@ -139,8 +131,6 @@ module.exports = () => {
139131
});
140132
//listener for sending messages to server
141133
ipcMain.on("send-ws", (event, reqResObj, inputMessage) => {
142-
//console.log("send-ws event===>", event);
143-
//console.log("send-ws reqResObj===>", reqResObj);
144134
wsController.sendWebSocketMessage(event, reqResObj, inputMessage);
145135
});
146136
//listerner to close socket connection

preload.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
const { ipcRenderer, contextBridge } = require("electron");
22

3-
console.log("in preload");
43
const apiObj = {
54
send: (channel, ...data) => {
65
// allowlist channels SENDING to Main
@@ -58,10 +57,8 @@ const apiObj = {
5857
// basically we are assigning certain node functionality (require, ipcRenderer) to the window object in an UN-isolated context only for testing
5958
// security is reduced for testing, but remains sturdy otherwise
6059
if (process.env.NODE_ENV === "test") {
61-
console.log("made it into here");
6260
window.electronRequire = require;
6361
window.api = apiObj;
6462
} else {
65-
console.log("made it to the contextBridge////// ");
6663
contextBridge.exposeInMainWorld("api", apiObj);
6764
}

src/client/components/composer/ComposerContainer.jsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import GRPCContainer from "./GRPCContainer.jsx";
1010
import WSContainer from "./WSContainer.jsx";
1111

1212
const mapStateToProps = (store) => {
13-
console.log("store==>", store); //store is the current state in reducers
1413
return {
1514
reqResArray: store.business.reqResArray,
1615
composerDisplay: store.ui.composerDisplay,
@@ -66,15 +65,12 @@ const mapDispatchToProps = (dispatch) => ({
6665
});
6766

6867
const ComposerContainer = (props) => {
69-
console.log("props==>", props);
7068
const onProtocolSelect = (network) => {
7169
if (props.warningMessage.uri) {
7270
const warningMessage = { ...props.warningMessage };
73-
console.log("warningMSG==>", warningMessage);
7471
delete warningMessage.uri;
7572
props.setComposerWarningMessage({ ...warningMessage });
7673
}
77-
//console.log("no warning message");
7874
props.setComposerWarningMessage({});
7975
switch (network) {
8076
case "graphQL": {

src/client/components/composer/NetworkDropdown.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import dropDownArrow from "../../../assets/icons/caret-down.svg";
88
export default function NetworkDropdown({ onProtocolSelect, network }) {
99
const [dropdownIsActive, setDropdownIsActive] = useState();
1010
const dropdownEl = useRef();
11-
//console.log("dropdown-->", dropdownEl.current);
1211

1312
useEffect(() => {
1413
const closeDropdown = (event) => {

src/client/components/composer/NewRequest/TextCodeAreaEditable.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { UnControlled as CodeMirror } from "react-codemirror2";
44
import "codemirror/theme/neat.css";
55

66
export default function TextCodeAreaEditable({ value, mode, onChange, theme }) {
7-
console.log("value=>", value, "mode=>", mode, "theme=>", theme);
87
return (
98
<div className="is-neutral-200-box">
109
<CodeMirror

src/client/components/composer/RestContainer.jsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,22 +93,17 @@ export default function RestContainer({
9393

9494
let reqRes;
9595
const protocol = url.match(/(https?:\/\/)|(wss?:\/\/)/)[0];
96-
//console.log("protocol==>", protocol); //http://
9796
// HTTP && GRAPHQL QUERY & MUTATION REQUESTS
9897
if (!/wss?:\/\//.test(protocol) && !gRPC) {
9998
const URIWithoutProtocol = `${url.split(protocol)[1]}/`;
10099
URIWithoutProtocol;
101-
//console.log("URIWithoutProtocol==>", URIWithoutProtocol); //swapi.dev/api/people/1/
102100
const host = protocol + URIWithoutProtocol.split("/")[0];
103-
// console.log("host==>", host); //http://swapi.dev
104101
let path = `/${URIWithoutProtocol.split("/")
105102
.splice(1)
106103
.join("/")
107104
.replace(/\/{2,}/g, "/")}`;
108-
//console.log("path==>", path); ///api/people/1/
109105
if (path.charAt(path.length - 1) === "/" && path.length > 1) {
110106
path = path.substring(0, path.length - 1);
111-
//console.log("path////", path); ///api/people/1
112107
}
113108
path = path.replace(/https?:\//g, "http://");
114109
reqRes = {

src/client/components/containers/ContentsContainer.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ export const ContentsContainer = () => {
1414
const dispatch = useDispatch();
1515
const activeTab = useSelector(store => store.ui.workspaceActiveTab);
1616
const currentResponse = useSelector(store => store.business.currentResponse);
17-
//console.log('currentRes==>',currentResponse)
1817
const setActiveTab = (tabName) => dispatch(actions.setWorkspaceActiveTab(tabName));
1918

2019
const [showGraph, setShowGraph] = useState(false);

src/client/components/containers/SingleReqResContainer.jsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import GraphQLRequestContent from "../display/GraphQLRequestContent.jsx";
1010
import GRPCRequestContent from "../display/GRPCRequestContent.jsx";
1111

1212
const SingleReqResContainer = (props) => {
13-
console.log("singleRequestContainer props==>", props);
1413
const [showDetails, setShowDetails] = useState(false);
1514
const dispatch = useDispatch();
1615

@@ -278,7 +277,6 @@ const SingleReqResContainer = (props) => {
278277
//check the request type
279278
//if it's http, dispatch setactivetab to "event" for reqresponsepane
280279
//otherwise do nothing
281-
console.log("connection type==>", connectionType);
282280
if (connectionType !== "WebSocket") {
283281
dispatch(actions.setResponsePaneActiveTab("events"));
284282
}

0 commit comments

Comments
 (0)