Skip to content

Commit

Permalink
Npm Electron and Angular upgrades (#197)
Browse files Browse the repository at this point in the history
* Upgrade Electron

* Angular v15

* Upgrade angular to v16

* Tweaks to get everything working post upgrades

* Further fixes post upgrades
  • Loading branch information
SMUnlimited authored Dec 12, 2023
1 parent b746f0e commit 0e88d7e
Show file tree
Hide file tree
Showing 14 changed files with 17,285 additions and 15,719 deletions.
9 changes: 4 additions & 5 deletions Electron/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"root": true,
"ignorePatterns": [
"app/**/*", // ignore nodeJs files
"app/**/*",
"dist/**/*",
"release/**/*"
],
Expand All @@ -26,7 +26,7 @@
],
"rules": {
"prefer-arrow/prefer-arrow-functions": 0,
"@angular-eslint/directive-selector": 0,
"@angular-eslint/directive-selector": 0,
"@angular-eslint/component-selector": [
"error",
{
Expand All @@ -44,8 +44,7 @@
"extends": [
"plugin:@angular-eslint/template/recommended"
],
"rules": {
}
"rules": {}
}
]
}
}
30 changes: 15 additions & 15 deletions Electron/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Renderer",
"type": "chrome",
"request": "attach",
"port": 9876,
"url": "http://localhost:4200",
"sourceMaps": true,
"timeout": 10000,
"trace": "verbose",
"sourceMapPathOverrides": {
"webpack:///./*": "${workspaceFolder}/*"
},
"preLaunchTask": "Build.Renderer"
},
// {
// "name": "Renderer",
// "type": "chrome",
// "request": "attach",
// "port": 9876,
// "url": "http://localhost:4200",
// "sourceMaps": true,
// "timeout": 10000,
// "trace": "verbose",
// "sourceMapPathOverrides": {
// "webpack:///./*": "${workspaceFolder}/*"
// },
// "preLaunchTask": "Build.Renderer"
// },
{
"name": "Main",
"type": "node",
Expand All @@ -40,7 +40,7 @@
"compounds": [
{
"name": "Application Debug",
"configurations": [ "Renderer", "Main" ]
"configurations": [ "Main" ]
}
]
}
8 changes: 4 additions & 4 deletions Electron/AMAI-release/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const installOnDirectory = async () => {
const response = args[0];
const ver = args[2]

process.send(`#### Installing AMAI ${ver} ####`);
process.send(`#### Installing AMAI for ${ver} ####`);

// TODO: change to receive array of maps
if (fs.statSync(response).isDirectory()) {
Expand All @@ -44,13 +44,13 @@ const installOnDirectory = async () => {
// on single map
arrayOfFiles.push(response);
}

if (!fs.existsSync(`Scripts\\${ver}\\common.ai`)) {
process.send(`ERROR: Cannot find resources\\AMAI\\Scripts\\${ver}\\common.ai`)
process.send(`ERROR: Cannot find ${process.cwd()}\\Scripts\\${ver}\\common.ai`)
return
}
if (installCommander && !fs.existsSync(`Scripts\\Blizzard_${ver}.j`)) {
process.send(`ERROR: Cannot find resources\\AMAI\\Scripts\\blizzard_${ver}.j`)
process.send(`ERROR: Cannot find ${process.cwd()}\\Scripts\\blizzard_${ver}.j`)
return
}

Expand Down
128 changes: 0 additions & 128 deletions Electron/CODE_OF_CONDUCT.md

This file was deleted.

10 changes: 9 additions & 1 deletion Electron/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -184,5 +184,13 @@
}
}
},
"defaultProject": "angular-electron"
"defaultProject": "angular-electron",
"schematics": {
"@angular-eslint/schematics:application": {
"setParserOptionsProject": true
},
"@angular-eslint/schematics:library": {
"setParserOptionsProject": true
}
}
}
2 changes: 1 addition & 1 deletion Electron/app/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const createWindow = (): BrowserWindow => {
width: size.width,
height: size.height,
webPreferences: {
devTools: false,
devTools: true,
nodeIntegration: true,
allowRunningInsecureContent: (serve),
contextIsolation: false, // false if you want to run e2e test with Spectron
Expand Down
30 changes: 15 additions & 15 deletions Electron/app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Electron/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"main": "main.js",
"private": true,
"dependencies": {
"@electron/remote": "2.0.8"
"@electron/remote": "^2.1.0"
}
}
Loading

0 comments on commit 0e88d7e

Please sign in to comment.