Adding contextIsolation: false to the display module fixes the initial issue in #74, cannot use "require" but the escape button does not work due to "Cannot read properties of undefined (reading 'getCurrentWindow')"

This commit is contained in:
Matt McWilliams 2023-02-25 12:16:47 -05:00
parent 1290a8f324
commit 24b1301f9f
12 changed files with 14 additions and 20 deletions

View File

@ -1,5 +1,5 @@
{
"version": "1.7.9",
"version": "1.7.11",
"ext_port": 1111,
"profiles": {
"mcopy": {

View File

@ -1,8 +0,0 @@
/**
* Delay in an async/await function
*
* @param {integer} ms Milliseconds to delay for
*
* @returns {Promise} Promise to resolve after timeout
**/
declare function delay(ms: number): Promise<unknown>;

View File

@ -17,7 +17,8 @@ class WebView {
webPreferences: {
nodeIntegration: true,
allowRunningInsecureContent: false,
enableRemoteModule: true
enableRemoteModule: true,
contextIsolation: false
},
width: 800,
height: 600,

File diff suppressed because one or more lines are too long

2
app/package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "mcopy-app",
"version": "1.7.10",
"version": "1.7.11",
"lockfileVersion": 2,
"requires": true,
"packages": {

View File

@ -1,6 +1,6 @@
{
"name": "mcopy-app",
"version": "1.7.10",
"version": "1.7.11",
"description": "GUI for the mcopy small gauge film optical printer platform",
"main": "main.js",
"scripts": {

View File

@ -1,5 +1,5 @@
{
"version": "1.7.10",
"version": "1.7.11",
"ext_port": 1111,
"profiles": {
"mcopy": {

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "mcopy",
"version": "1.7.10",
"version": "1.7.11",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "mcopy",
"version": "1.7.10",
"version": "1.7.11",
"license": "MIT",
"dependencies": {
"arduino": "file:app/lib/arduino",

View File

@ -1,6 +1,6 @@
{
"name": "mcopy",
"version": "1.7.10",
"version": "1.7.11",
"description": "Small gauge film optical printer platform",
"main": "build.js",
"directories": {

View File

@ -1,5 +1,5 @@
{
"version": "1.7.10",
"version": "1.7.11",
"ext_port": 1111,
"profiles": {
"mcopy": {

View File

@ -8,7 +8,7 @@ echo "VERSION: $version"
git add ./package.json
declare -a fileArr=("./package-lock.json" "./data/cfg.json" "./app/package.json" "./app/package-lock.json" "./processing/mcopy/cfg.json")
declare -a fileArr=("./package-lock.json" "./data/cfg.json" "./app/package.json" "./app/package-lock.json" "./app/data/cfg.json" "./processing/mcopy/cfg.json")
for i in "${fileArr[@]}"
do

View File

@ -25,7 +25,8 @@ class WebView {
webPreferences: {
nodeIntegration: true,
allowRunningInsecureContent: false,
enableRemoteModule: true
enableRemoteModule: true,
contextIsolation: false
},
width: 800,
height: 600,