mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 14:49:53 +00:00
e9b87686e1
* Upgrade electron-builder * Fix optional dep * Add another dep * Fix travis * Fix 7zip install * Fix icons * Minor fix * Delete changelog * Moved build scripts to JS * Some adjustments * Remove lines * Add 7zip back * Update scripts * Small tweaks * Fix electronbuilder config * snap dependency * Fix pkg * Remove snapd dep * Updated deps and lots of fixes * Travis update * Return package name * Remove snap for now * Remove portable * Try fixing code signing * Bump cache * Disable automatic tests * Fix windows artifacts * package-lock for app/ * Try fix npm install * Try again * Some minor tweaks * Preleases by default
66 lines
994 B
JavaScript
66 lines
994 B
JavaScript
import mkdirp from 'mkdirp';
|
|
import events from 'events';
|
|
|
|
const RANDOM_STRING = Math.random().toString().replace('.', '');
|
|
|
|
const remote = {
|
|
app: {
|
|
getPath (name) {
|
|
const dir = `/tmp/insomnia-tests-${RANDOM_STRING}/${name}`;
|
|
mkdirp.sync(dir);
|
|
return dir;
|
|
},
|
|
getLocale () {
|
|
return 'en-US';
|
|
}
|
|
},
|
|
net: {
|
|
request (url) {
|
|
const req = new events.EventEmitter();
|
|
req.end = function () {};
|
|
return req;
|
|
}
|
|
},
|
|
BrowserWindow: {
|
|
getAllWindows () {
|
|
return [];
|
|
},
|
|
getFocusedWindow () {
|
|
return {
|
|
getContentBounds () {
|
|
return {width: 1900, height: 1060};
|
|
}
|
|
};
|
|
}
|
|
},
|
|
screen: {
|
|
getPrimaryDisplay () {
|
|
return {workAreaSize: {width: 1920, height: 1080}};
|
|
}
|
|
}
|
|
};
|
|
|
|
module.exports = {
|
|
...remote,
|
|
remote: remote,
|
|
ipcMain: {
|
|
on () {
|
|
|
|
},
|
|
once () {
|
|
|
|
}
|
|
},
|
|
ipcRenderer: {
|
|
on () {
|
|
|
|
},
|
|
once () {
|
|
|
|
},
|
|
send () {
|
|
|
|
}
|
|
}
|
|
};
|