Merge pull request #39 from Djones4822/master

v1.4.3 - Upgrade Angular to v14 and Electron to v23
This commit is contained in:
Geo
2023-02-16 17:25:57 -08:00
committed by GitHub
9 changed files with 12352 additions and 34358 deletions

1
.gitignore vendored
View File

@@ -34,6 +34,7 @@ speed-measure-plugin*.json
.history/*
# misc
/.angular/cache
/.sass-cache
/connect.lock
/coverage

View File

@@ -23,7 +23,6 @@
"skipTests": true
},
"@schematics/angular:module": {
"skipTests": true
},
"@schematics/angular:pipe": {
"skipTests": true
@@ -39,7 +38,6 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"aot": true,
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
@@ -56,7 +54,13 @@
"scripts": [
"src/assets/semantic/jqueryImport.js",
"src/assets/semantic/dist/semantic.min.js"
]
],
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
},
"configurations": {
"production": {
@@ -81,13 +85,13 @@
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"aot": true,
"watch": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true
}
}
},
"defaultConfiguration": ""
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
@@ -113,6 +117,6 @@
}
}
}
}},
"defaultProject": "Bridge"
}
}
}

46620
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "bridge",
"version": "1.4.2",
"version": "1.4.3",
"description": "A Clone Hero library management tool with built in chart searching and downloading.",
"homepage": "https://github.com/Geomitron/Bridge",
"license": "GPL-3.0",
@@ -26,14 +26,15 @@
"release": "ng build -c production && tsc -p tsconfig.electron.json && electron-builder build"
},
"dependencies": {
"@angular/animations": "~11.1.1",
"@angular/common": "~11.1.1",
"@angular/compiler": "~11.1.1",
"@angular/core": "~11.1.1",
"@angular/forms": "~11.1.1",
"@angular/platform-browser": "~11.1.1",
"@angular/platform-browser-dynamic": "~11.1.1",
"@angular/router": "~11.1.1",
"@angular/animations": "^14.2.12",
"@angular/common": "^14.2.12",
"@angular/compiler": "^14.2.12",
"@angular/core": "^14.2.12",
"@angular/forms": "^14.2.12",
"@angular/platform-browser": "^14.2.12",
"@angular/platform-browser-dynamic": "^14.2.12",
"@angular/router": "^14.2.12",
"@electron/remote": "^2.0.9",
"7zip-bin": "^5.0.3",
"bottleneck": "^2.19.5",
"cli-color": "^2.0.0",
@@ -42,6 +43,7 @@
"electron-updater": "^4.3.1",
"electron-window-state": "^5.0.3",
"fomantic-ui": "^2.8.3",
"google-auth-library": "^8.7.0",
"googleapis": "^59.0.0",
"jquery": "^3.5.1",
"jsonfile": "^6.0.1",
@@ -56,14 +58,14 @@
"serialize-error": "^7.0.1",
"tslib": "^2.0.0",
"underscore": "^1.9.2",
"zone.js": "~0.10.2"
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.1101.2",
"@angular-devkit/build-angular": "^14.2.10",
"@angular-eslint/builder": "0.0.1-alpha.18",
"@angular/cli": "^11.1.2",
"@angular/compiler-cli": "~11.1.1",
"@angular/language-service": "~11.1.1",
"@angular/cli": "^14.2.10",
"@angular/compiler-cli": "^14.2.12",
"@angular/language-service": "^14.2.12",
"@types/cli-color": "^2.0.0",
"@types/electron-window-state": "^2.0.33",
"@types/jsonfile": "^6.0.0",
@@ -76,14 +78,14 @@
"@types/underscore": "^1.9.4",
"@typescript-eslint/eslint-plugin": "^2.19.2",
"@typescript-eslint/parser": "^2.19.2",
"electron": "^12.0.2",
"electron": "^23.1.0",
"electron-builder": "^22.3.2",
"electron-reload": "^1.5.0",
"eslint": "^6.8.0",
"nodemon": "^2.0.2",
"npm-run-all": "^4.1.5",
"ts-node": "~7.0.0",
"typescript": "~4.0.5",
"typescript": "~4.6.4",
"wait-on": "^4.0.0"
}
}

View File

@@ -5,6 +5,8 @@ import { Injectable } from '@angular/core'
import * as electron from 'electron'
import { IPCInvokeEvents, IPCEmitEvents } from '../../../electron/shared/IPCHandler'
const { app, getCurrentWindow, dialog, session } = window.require('@electron/remote')
@Injectable({
providedIn: 'root'
})
@@ -23,7 +25,7 @@ export class ElectronService {
}
get currentWindow() {
return this.electron.remote.getCurrentWindow()
return getCurrentWindow()
}
/**
@@ -57,7 +59,7 @@ export class ElectronService {
}
quit() {
this.electron.remote.app.exit()
app.exit()
}
openFolder(filepath: string) {
@@ -69,10 +71,10 @@ export class ElectronService {
}
showOpenDialog(options: Electron.OpenDialogOptions) {
return this.electron.remote.dialog.showOpenDialog(this.currentWindow, options)
return dialog.showOpenDialog(this.currentWindow, options)
}
get defaultSession() {
return this.electron.remote.session.defaultSession
return session.defaultSession
}
}

View File

@@ -5,6 +5,7 @@ import * as path from 'path'
import * as url from 'url'
require('electron-unhandled')({ showDialog: true })
// IPC Handlers
import { getIPCInvokeHandlers, getIPCEmitHandlers, IPCEmitEvents } from './shared/IPCHandler'
import { getSettingsHandler } from './ipc/SettingsHandler.ipc'
@@ -13,7 +14,10 @@ import { dataPath } from './shared/Paths'
export let mainWindow: BrowserWindow
const args = process.argv.slice(1)
const isDevBuild = args.some(val => val == '--dev')
const remote = require('@electron/remote/main')
remote.initialize()
restrictToSingleInstance()
handleOSXWindowClosed()
app.on('ready', () => {
@@ -94,6 +98,9 @@ function createBridgeWindow() {
mainWindow.on('closed', () => {
mainWindow = null // Dereference mainWindow when the window is closed
})
// enable the remote webcontents
remote.enable(mainWindow.webContents)
}
/**
@@ -111,7 +118,6 @@ function createBrowserWindow(windowState: windowStateKeeper.State) {
nodeIntegration: true,
allowRunningInsecureContent: (isDevBuild) ? true : false,
textAreasAreResizable: false,
enableRemoteModule: true,
contextIsolation: false
},
simpleFullscreen: true,

View File

@@ -13,4 +13,4 @@ export const environment = {
* This import should be commented out in production mode because it will have a negative impact
* on performance if an error is thrown.
*/
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
// import 'zone.js/plugins/zone-error'; // Included with Angular CLI.

View File

@@ -18,16 +18,6 @@
* BROWSER POLYFILLS
*/
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js'; // Run `npm install --save classlist.js`.
/**
* Web Animations `@angular/platform-browser/animations`
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
*/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
/**
* By default, zone.js will patch all possible macroTask and DomEvents
* user can disable parts of macroTask/DomEvents patch by setting following flags
@@ -55,7 +45,7 @@
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js/dist/zone' // Included with Angular CLI.
import 'zone.js' // Included with Angular CLI.
/***************************************************************************************************

View File

@@ -10,12 +10,13 @@
"experimentalDecorators": true,
"moduleResolution": "node",
"importHelpers": true,
"target": "ES5",
"target": "es2020",
"lib": [
"es2017",
"es2016",
"es2015",
"dom"
]
],
"module": "commonjs",
}
}