Skip to content

Commit 59354fa

Browse files
committed
Added updatesto packagelock to modify the electron builder config
1 parent 817d5c5 commit 59354fa

File tree

4 files changed

+24
-18
lines changed

4 files changed

+24
-18
lines changed

main.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ function createWindow() {
168168
});
169169
}
170170
else {
171+
console.log('__dirname', __dirname);
171172
indexPath = url.format({// if we are not in dev mode load production build file
172173
protocol: 'file:',
173174
pathname: path.join(__dirname, 'dist', 'index.html'),
@@ -221,7 +222,7 @@ app.on('ready', () => {
221222
app.on('window-all-closed', () => {
222223
// On macOS it is common for applications and their menu bar
223224
// to stay active until the user quits explicitly with Cmd + Q
224-
if (process.platform !== 'darwin') {//darwin refers to macOS...
225+
if (process.platform !== 'darwin') {//darwin refers to macOS...
225226
app.quit();// If User is on mac exit the program when all windows are closed
226227
}
227228
});
@@ -287,13 +288,13 @@ ipcMain.on('export-collection', (event, args) => {
287288
return;
288289
}
289290

290-
// fileName is a string that contains the path and filename created in the save file dialog.
291+
// fileName is a string that contains the path and filename created in the save file dialog.
291292
fs.writeFile(resp.filePath, content, (err) => {
292293
if(err){
293294
console.log("An error ocurred creating the file "+ err.message)
294295
}
295296
})
296-
297+
297298
})})
298299

299300

@@ -349,10 +350,10 @@ ipcMain.on('import-collection', (event, args) => {
349350

350351
if (parsed) {
351352
// validate parsed data type and properties
352-
if (typeof parsed !== 'object' ||
353-
!parsed['id'] ||
354-
!parsed['name'] ||
355-
!parsed['reqResArray'] ||
353+
if (typeof parsed !== 'object' ||
354+
!parsed['id'] ||
355+
!parsed['name'] ||
356+
!parsed['reqResArray'] ||
356357
!parsed['created_at']) {
357358
options.message = 'Invalid File';
358359
options.detail = 'Please try again.';
@@ -368,7 +369,7 @@ ipcMain.on('import-collection', (event, args) => {
368369
})
369370

370371

371-
// ipcMain listener that
372+
// ipcMain listener that
372373
ipcMain.on('http1-fetch-message', (event, arg) => {
373374
const { method, headers, body } = arg.options;
374375

@@ -377,18 +378,18 @@ ipcMain.on('http1-fetch-message', (event, arg) => {
377378
const headers = response.headers.raw();
378379
// check if the endpoint sends SSE
379380
// add status code for regular http requests in the response header
380-
381+
381382
if (headers['content-type'][0].includes('stream')) {
382383
// invoke another func that fetches to SSE and reads stream
383384
// params: method, headers, body
384385
event.sender.send('http1-fetch-reply', { headers, body: { error: 'This Is An SSE endpoint' } })
385386
}
386387
else {
387388
headers[':status'] = response.status;
388-
389+
389390
const receivedCookie = headers['set-cookie'];
390391
headers.cookies = receivedCookie;
391-
392+
392393
const contents = /json/.test(response.headers.get('content-type')) ? response.json() : response.text();
393394
contents
394395
.then(body => {
@@ -441,7 +442,7 @@ ipcMain.on('open-gql', (event, args) => {
441442
const parsedRemainingCookieProperties = cookie.parse(thisCookie.slice(idx + 1));
442443

443444
const parsedCookie = {...parsedRemainingCookieProperties, name: keyValueArr[0], value: keyValueArr[1]};
444-
445+
445446
parsedCookies.push(parsedCookie);
446447
})
447448
reqResObj.response.cookies = parsedCookies;
@@ -487,4 +488,3 @@ ipcMain.on('open-gql', (event, args) => {
487488
});
488489
}
489490
});
490-

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Swell",
3-
"version": "0.3.0",
3+
"version": "0.4.0",
44
"description": "Swell",
55
"main": "main.js",
66
"repository": "https://github.com/open-source-labs/Swell",
@@ -14,7 +14,8 @@
1414
"package-all": "electron-builder build -mwl",
1515
"package-linux": "electron-builder build --linux",
1616
"gh-publish-mac": "electron-builder build --x64 --mac -p always",
17-
"gh-publish": "electron-builder build -mwl -p always"
17+
"gh-publish": "electron-builder build -mwl -p always",
18+
"postinstall": "npm rebuild --runtime=electron --target=7.0.1"
1819
},
1920
"author": {
2021
"name": "Swell",
@@ -81,6 +82,11 @@
8182
"name": "Sam Parsons",
8283
"email": "samparsons269@gmail.com",
8384
"url": "https://github.com/sam-parsons"
85+
},
86+
{
87+
"name": "Dan Stein",
88+
"email": "50937807+danst3in@users.noreply.github.com",
89+
"url": "https://github.com/danst3in"
8490
}
8591
],
8692
"build": {
@@ -98,6 +104,7 @@
98104
"main.js",
99105
"httpserver.js"
100106
],
107+
"nodeVersion":"12.14.1",
101108
"nsis": {
102109
"createDesktopShortcut": "always"
103110
},
@@ -149,7 +156,7 @@
149156
"license": "MIT",
150157
"homepage": "http://www.getswell.io",
151158
"engines": {
152-
"node": ">=12.0.0",
159+
"node": ">=12.14.1",
153160
"npm": ">=6.0.0"
154161
},
155162
"dependencies": {

saveProto.proto

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)