diff --git a/.gitignore b/.gitignore
index 24c031d958..3b81fd63df 100644
--- a/.gitignore
+++ b/.gitignore
@@ -76,3 +76,6 @@ typings/
# Serverless directories
.serverless
+
+# Mac files
+.DS_Store
diff --git a/packages/.DS_Store b/packages/.DS_Store
deleted file mode 100644
index 80d62469cd..0000000000
Binary files a/packages/.DS_Store and /dev/null differ
diff --git a/packages/server/build/entitlements.mac.plist b/packages/server/build/entitlements.mac.plist
index 5e2a11dfe2..181db8f1fe 100644
--- a/packages/server/build/entitlements.mac.plist
+++ b/packages/server/build/entitlements.mac.plist
@@ -8,5 +8,7 @@
com.apple.security.cs.allow-dyld-environment-variables
+ com.apple.security.cs.disable-library-validation
+
\ No newline at end of file
diff --git a/packages/server/package.json b/packages/server/package.json
index 86a9858032..1aa15dac49 100644
--- a/packages/server/package.json
+++ b/packages/server/package.json
@@ -13,7 +13,7 @@
"afterSign": "electron-builder-notarize",
"mac": {
"category": "public.app-category.developer-tools",
- "hardenedRuntime": true
+ "hardenedRuntime": true
},
"linux": {
"target": [
@@ -48,6 +48,7 @@
"bcryptjs": "^2.4.3",
"dotenv": "^8.2.0",
"electron-is-dev": "^1.2.0",
+ "electron-unhandled": "^3.0.2",
"electron-updater": "^4.3.1",
"fs-extra": "^8.1.0",
"jsonwebtoken": "^8.5.1",
diff --git a/packages/server/src/electron.js b/packages/server/src/electron.js
index 964c29eb4c..b4bae9d706 100644
--- a/packages/server/src/electron.js
+++ b/packages/server/src/electron.js
@@ -3,22 +3,26 @@ const { join } = require("path");
const { homedir } = require("os");
const isDev = require("electron-is-dev");
const { autoUpdater } = require("electron-updater");
-
+const unhandled = require("electron-unhandled");
require("dotenv").config({ path: join(homedir(), ".budibase", ".env") });
+if (isDev) {
+ unhandled({
+ showDialog: true
+ });
+}
-const APP_URL = "http://localhost:4001/_builder";
+const APP_URL = "http://localhost:4001";
const APP_TITLE = "Budibase Builder";
-let win;
+let win
function createWindow() {
app.server = require("./app");
win = new BrowserWindow({ width: 1920, height: 1080 });
win.setTitle(APP_TITLE);
win.loadURL(APP_URL);
- win.showInactive();
if (isDev) {
win.webContents.openDevTools();
} else {
diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock
index ed03ba367c..55e6d622df 100644
--- a/packages/server/yarn.lock
+++ b/packages/server/yarn.lock
@@ -1280,6 +1280,11 @@ class-utils@^0.3.5:
isobject "^3.0.0"
static-extend "^0.1.1"
+clean-stack@^2.1.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b"
+ integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==
+
cli-boxes@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-2.2.0.tgz#538ecae8f9c6ca508e3c3c95b453fe93cb4c168d"
@@ -1842,7 +1847,7 @@ electron-builder@^22.6.0:
update-notifier "^4.1.0"
yargs "^15.3.1"
-electron-is-dev@^1.2.0:
+electron-is-dev@^1.0.1, electron-is-dev@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/electron-is-dev/-/electron-is-dev-1.2.0.tgz#2e5cea0a1b3ccf1c86f577cee77363ef55deb05e"
integrity sha512-R1oD5gMBPS7PVU8gJwH6CtT0e6VSoD0+SzSnYpNm+dBkcijgA+K7VAMHDfnRq/lkKPZArpzplTW6jfiMYosdzw==
@@ -1869,6 +1874,16 @@ electron-publish@22.6.0:
lazy-val "^1.0.4"
mime "^2.4.4"
+electron-unhandled@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/electron-unhandled/-/electron-unhandled-3.0.2.tgz#e14a19c830ccf7b6e755191c8e78d23094d25112"
+ integrity sha512-IIqXnM5eNgV7k5sDA/GZ39ygJbpfF3WTArNGQ1TB4AI6ajQuuVztA0M6Mq9uEpmTh5gz4nR+YsTNWYsHLoM5rw==
+ dependencies:
+ clean-stack "^2.1.0"
+ electron-is-dev "^1.0.1"
+ ensure-error "^2.0.0"
+ lodash.debounce "^4.0.8"
+
electron-updater@^4.3.1:
version "4.3.1"
resolved "https://registry.yarnpkg.com/electron-updater/-/electron-updater-4.3.1.tgz#9d485b6262bc56fcf7ee62b1dc1b3b105a3e96a7"
@@ -1930,6 +1945,11 @@ end-stream@~0.1.0:
dependencies:
write-stream "~0.4.3"
+ensure-error@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/ensure-error/-/ensure-error-2.1.0.tgz#f11fbe383c0cf4a54850ac77acceb7bc06e0f99d"
+ integrity sha512-+BMSJHw9gxiJAAp2ZR1E0TNcL09dD3lOvkl7WVm4+Y6xnes/pMetP/TzCHiDduh8ihNDjbGfuYxl7l4PA1xZ8A==
+
env-paths@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.0.tgz#cdca557dc009152917d6166e2febe1f039685e43"
@@ -4167,6 +4187,11 @@ locate-path@^5.0.0:
dependencies:
p-locate "^4.1.0"
+lodash.debounce@^4.0.8:
+ version "4.0.8"
+ resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af"
+ integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168=
+
lodash.includes@^4.3.0:
version "4.3.0"
resolved "https://registry.yarnpkg.com/lodash.includes/-/lodash.includes-4.3.0.tgz#60bb98a87cb923c68ca1e51325483314849f553f"