mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-21 15:33:11 +01:00
feat: electron sandbox bundle libraries check (#2932)
chore: check sandbox libraries bundle file
This commit is contained in:
parent
ad388e5a6a
commit
b4fd350334
@ -1,5 +1,15 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const isDev = require('electron-is-dev');
|
||||
|
||||
if (isDev) {
|
||||
if (!fs.existsSync('./src/sandbox/bundle-browser-rollup.js')) {
|
||||
console.log('JS Sandbox libraries have not been bundled yet');
|
||||
console.log('Please run the below command \nnpm run sandbox:bundle-libraries --workspace=packages/bruno-js');
|
||||
throw new Error('JS Sandbox libraries have not been bundled yet');
|
||||
}
|
||||
}
|
||||
|
||||
const { format } = require('url');
|
||||
const { BrowserWindow, app, Menu, ipcMain } = require('electron');
|
||||
const { setContentSecurityPolicy } = require('electron-util');
|
||||
@ -70,7 +80,7 @@ app.on('ready', async () => {
|
||||
|
||||
mainWindow.once('ready-to-show', () => {
|
||||
mainWindow.show();
|
||||
})
|
||||
});
|
||||
const url = isDev
|
||||
? 'http://localhost:3000'
|
||||
: format({
|
||||
|
Loading…
Reference in New Issue
Block a user