From 179e343dae4362fd8197cb215473d463bcca72d4 Mon Sep 17 00:00:00 2001 From: LindirQuenya <53021080+LindirQuenya@users.noreply.github.com> Date: Sat, 13 Aug 2022 00:29:56 -0400 Subject: [PATCH 01/11] Update package-lock.json version number. --- package-lock.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index dfdf21a08..750a3b9de 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "flashpoint-launcher", - "version": "10.1.5", + "version": "10.1.6", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "flashpoint-launcher", - "version": "10.1.5", + "version": "10.1.6", "hasInstallScript": true, "license": "MIT", "dependencies": { From 4bf53a4be4d4cddff8bc0352e638d746880cac53 Mon Sep 17 00:00:00 2001 From: LindirQuenya <53021080+LindirQuenya@users.noreply.github.com> Date: Sat, 13 Aug 2022 01:28:32 -0400 Subject: [PATCH 02/11] Make MacOS read the PATH from the default shell. --- src/back/GameLauncher.ts | 17 ++++++----- src/back/index.ts | 23 ++++++++++++-- src/back/responses.ts | 23 +++++++++++--- src/back/types.ts | 1 + src/back/util/misc.ts | 66 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 115 insertions(+), 15 deletions(-) diff --git a/src/back/GameLauncher.ts b/src/back/GameLauncher.ts index 46f0f3a01..0109a1834 100644 --- a/src/back/GameLauncher.ts +++ b/src/back/GameLauncher.ts @@ -52,6 +52,7 @@ type LaunchBaseOpts = { appPathOverrides: AppPathOverride[]; providers: AppProvider[]; proxy: string; + envPATH?: string; openDialog: ShowMessageBoxFunc; openExternal: OpenExternalFunc; runGame: (gameLaunchInfo: GameLaunchInfo) => ManagedChildProcess; @@ -97,7 +98,7 @@ export namespace GameLauncher { gamePath: appPath, gameArgs: appArgs, useWine, - env: getEnvironment(opts.fpPath, opts.proxy), + env: getEnvironment(opts.fpPath, opts.proxy, opts.envPATH), }; const proc = exec( createCommand(launchInfo), @@ -137,7 +138,8 @@ export namespace GameLauncher { proxy: opts.proxy, openDialog: opts.openDialog, openExternal: opts.openExternal, - runGame: opts.runGame + runGame: opts.runGame, + envPATH: opts.envPATH }; for (const addApp of opts.game.addApps) { if (addApp.autoRunBefore) { @@ -187,7 +189,7 @@ export namespace GameLauncher { // Browser Mode Launch if (isBrowserOpts(res)) { - const env = getEnvironment(opts.fpPath, opts.proxy); + const env = getEnvironment(opts.fpPath, opts.proxy, opts.envPATH); if ('ELECTRON_RUN_AS_NODE' in env) { delete env['ELECTRON_RUN_AS_NODE']; // If this flag is present, it will disable electron features from the process } @@ -232,7 +234,7 @@ export namespace GameLauncher { const gamePath: string = path.isAbsolute(appPath) ? fixSlashes(appPath) : fixSlashes(path.join(opts.fpPath, appPath)); const gameArgs: string[] = [...appArgs, opts.game.launchCommand]; const useWine: boolean = process.platform != 'win32' && gamePath.endsWith('.exe'); - const env = getEnvironment(opts.fpPath, opts.proxy); + const env = getEnvironment(opts.fpPath, opts.proxy, opts.envPATH); try { await GameManager.findGame(opts.game.id); } catch (err: any) { @@ -300,17 +302,18 @@ export namespace GameLauncher { } /** Get an object containing the environment variables to use for the game / additional application. */ - function getEnvironment(fpPath: string, proxy: string): NodeJS.ProcessEnv { + function getEnvironment(fpPath: string, proxy: string, path?: string): NodeJS.ProcessEnv { // When using Linux, use the proxy created in BackgroundServices.ts // This is only needed on Linux because the proxy is installed on system // level entire system when using Windows. // When using WINE on mac, the proxy variable is needed as well. return { + // Copy this processes environment variables + ...process.env, 'FP_PATH': fpPath, // Add proxy env vars if it's running on linux ...(((process.platform === 'linux' || process.platform === 'darwin') && proxy !== '') ? { http_proxy: `http://${proxy}/`, HTTP_PROXY: `http://${proxy}/` } : null), - // Copy this processes environment variables - ...process.env, + 'PATH': path ?? process.env.PATH, }; } diff --git a/src/back/index.ts b/src/back/index.ts index bd42f6fea..49ba0490f 100644 --- a/src/back/index.ts +++ b/src/back/index.ts @@ -58,7 +58,7 @@ import { EventQueue } from './util/EventQueue'; import { FolderWatcher } from './util/FolderWatcher'; import { LogFile } from './util/LogFile'; import { logFactory } from './util/logging'; -import { createContainer, exit, runService } from './util/misc'; +import { createContainer, exit, getMacPATH, runService } from './util/misc'; const dataSourceOptions: DataSourceOptions = { type: 'better-sqlite3', @@ -339,6 +339,12 @@ async function onProcessMessage(message: any, sendHandle: any): Promise { console.log('Back - Loaded Preferences'); + let pathReadPromise: Promise | undefined = undefined; + if (process.platform === 'darwin') { + pathReadPromise = getMacPATH(); + console.log('Back - Started Mac PATH-reading'); + } + try { const [extConf] = await (Promise.all([ ExtConfigFile.readOrCreateFile(path.join(state.config.flashpointPath, EXT_CONFIG_FILENAME)) @@ -406,6 +412,11 @@ async function onProcessMessage(message: any, sendHandle: any): Promise { console.log('Back - Initialized Database'); + if (pathReadPromise) { + state.pathVar = await pathReadPromise; + console.log('Back - Got Mac PATH'); + } + // Init extensions const addExtLogFactory = (extId: string) => (entry: ILogEntry) => { state.extensionsService.logExtension(extId, entry); @@ -469,13 +480,19 @@ async function onProcessMessage(message: any, sendHandle: any): Promise { // Run processes if (state.serviceInfo.server.length > 0) { const chosenServer = state.serviceInfo.server.find(i => i.name === state.config.server); - runService(state, 'server', 'Server', state.config.flashpointPath, {}, chosenServer || state.serviceInfo.server[0]); + runService(state, 'server', 'Server', state.config.flashpointPath, {env: { + ...process.env, + 'PATH': state.pathVar ?? process.env.PATH, + }}, chosenServer || state.serviceInfo.server[0]); } // Start daemons for (let i = 0; i < state.serviceInfo.daemon.length; i++) { const service = state.serviceInfo.daemon[i]; const id = 'daemon_' + i; - runService(state, id, service.name || id, state.config.flashpointPath, {}, service); + runService(state, id, service.name || id, state.config.flashpointPath, {env: { + ...process.env, + 'PATH': state.pathVar ?? process.env.PATH, + }}, service); } // Start file watchers for (let i = 0; i < state.serviceInfo.watch.length; i++) { diff --git a/src/back/responses.ts b/src/back/responses.ts index f7bb88c41..a9993817d 100644 --- a/src/back/responses.ts +++ b/src/back/responses.ts @@ -257,7 +257,8 @@ export function registerRequestCallbacks(state: BackState): void { proxy: state.preferences.browserModeProxy, openDialog: state.socketServer.showMessageBoxBack(event.client), openExternal: state.socketServer.openExternal(event.client), - runGame: runGameFactory(state) + runGame: runGameFactory(state), + envPATH: state.pathVar, }); state.apiEmitters.games.onDidLaunchAddApp.fire(addApp); } @@ -278,7 +279,10 @@ export function registerRequestCallbacks(state: BackState): void { if (!server || !('name' in server.info) || server.info.name !== configServer.name) { // Server is different, change now if (server) { await removeService(state, 'server'); } - runService(state, 'server', 'Server', state.config.flashpointPath, {}, configServer); + runService(state, 'server', 'Server', state.config.flashpointPath, {env: { + ...process.env, + 'PATH': state.pathVar ?? process.env.PATH, + }}, configServer); } } log.debug('TEST', 'Server change done'); @@ -329,6 +333,7 @@ export function registerRequestCallbacks(state: BackState): void { openDialog: state.socketServer.showMessageBoxBack(event.client), openExternal: state.socketServer.openExternal(event.client), runGame: runGameFactory(state), + envPATH: state.pathVar, }, state.apiEmitters.games.onWillLaunchGame); await state.apiEmitters.games.onDidLaunchGame.fire(game); @@ -1075,11 +1080,17 @@ export function registerRequestCallbacks(state: BackState): void { // Set the content folder path as the final parameter mad4fpServerCopy.arguments.push(getContentFolderByKey(data.key, state.config.flashpointPath)); await removeService(state, 'server'); - runService(state, 'server', 'Server', state.config.flashpointPath, {}, mad4fpServerCopy); + runService(state, 'server', 'Server', state.config.flashpointPath, {env: { + ...process.env, + 'PATH': state.pathVar ?? process.env.PATH, + }}, mad4fpServerCopy); } else if (!data.mad4fp && activeServerInfo && activeServerInfo.mad4fp && !configServer.mad4fp) { // Swap to mad4fp server await removeService(state, 'server'); - runService(state, 'server', 'Server', state.config.flashpointPath, {}, configServer); + runService(state, 'server', 'Server', state.config.flashpointPath, {env: { + ...process.env, + 'PATH': state.pathVar ?? process.env.PATH, + }}, configServer); } } } @@ -1098,6 +1109,7 @@ export function registerRequestCallbacks(state: BackState): void { openDialog: state.socketServer.showMessageBoxBack(event.client), openExternal: state.socketServer.openExternal(event.client), runGame: runGameFactory(state), + envPATH: state.pathVar, }, state.apiEmitters.games.onWillLaunchCurationGame, state.apiEmitters.games.onDidLaunchCurationGame); @@ -1124,6 +1136,7 @@ export function registerRequestCallbacks(state: BackState): void { openDialog: state.socketServer.showMessageBoxBack(event.client), openExternal: state.socketServer.openExternal(event.client), runGame: runGameFactory(state), + envPATH: state.pathVar, }, state.apiEmitters.games.onWillLaunchCurationAddApp, state.apiEmitters.games.onDidLaunchCurationAddApp); @@ -1134,7 +1147,7 @@ export function registerRequestCallbacks(state: BackState): void { state.socketServer.register(BackIn.OPEN_LOGS_WINDOW, async (event) => { if (!state.services.has('logger_window')) { - const env = process.env; + const env: NodeJS.ProcessEnv = {...process.env, 'PATH': state.pathVar ?? process.env.PATH}; if ('ELECTRON_RUN_AS_NODE' in env) { delete env['ELECTRON_RUN_AS_NODE']; // If this flag is present, it will disable electron features from the process } diff --git a/src/back/types.ts b/src/back/types.ts index ad0cc9769..584cc3da5 100644 --- a/src/back/types.ts +++ b/src/back/types.ts @@ -71,6 +71,7 @@ export type BackState = { extensionsService: ExtensionService; prefsQueue: EventQueue; logsWindowProc?: ManagedChildProcess; + pathVar?: string; } export type BackQueryChache = { diff --git a/src/back/util/misc.ts b/src/back/util/misc.ts index d87df44b5..330001dd4 100644 --- a/src/back/util/misc.ts +++ b/src/back/util/misc.ts @@ -337,3 +337,69 @@ export function getCwd(isDev: boolean, exePath: string) { export async function getTempFilename(ext = 'tmp') { return path.join(await fs.promises.realpath(os.tmpdir()), uuid() + '.' + ext); } + +/** + * Gets the default shell's configured PATH on MacOS + * @param shell Override and use this shell instead of the user's default shell. + * @returns The user's PATH in that shell. + */ +export async function getMacPATH(shell?: string): Promise { + // If we weren't given a shell override, detect the user's default shell. + if (!shell) { + // Read the user's shell using dscl. No clue how it works, deal with it. + const shellDetector = child_process.spawn('dscl', ['.', '-read', os.homedir(), 'UserShell'], { + shell: false + }); + // Get the full output and wait for the process to exit. + let builder = ''; + shellDetector.stdout.on('data', (chunk) => { + builder += chunk; + }); + await new Promise(resolve => { + shellDetector.on('exit', () => { + resolve(); + }); + }); + // Look for a known shell in the output. + for (const option of ['bash', 'zsh', 'ksh', 'tcsh', 'csh']) { + const matchresult = builder.match(new RegExp('/.*' + option)); + if (matchresult) { + shell = matchresult[0]; + break; + } + } + } + // Default to bash if none of the other shells are found. + shell = shell ?? '/bin/bash'; + const spawnOpts: child_process.SpawnOptionsWithoutStdio = { + shell: false + }; + // Different shells require different arguments to start in "login" (profile-reading) mode. + const loginArgs = []; + switch (shell.slice(shell.lastIndexOf('/') + 1)) { + case 'bash': + case 'zsh': + case 'ksh': + loginArgs.push('-i', '-l'); + break; + case 'tcsh': + case 'csh': + loginArgs.push('-i'); + spawnOpts.argv0 = '-' + shell.slice(shell.lastIndexOf('/') + 1); + break; + } + // Run the shell, tell it to echo $PATH when it's done with init. + const pathDetector = child_process.spawn(shell, [...loginArgs, '-c', 'echo $PATH'], spawnOpts); + // Get the full output and wait for the process to exit. + let builder = ''; + pathDetector.stdout.on('data', (chunk) => { + builder += chunk; + }); + await new Promise(resolve => { + pathDetector.on('exit', () => { + resolve(); + }); + }); + // Trim any whitespace, etc. + return builder.trim(); +} From 81038168849832c7408a9a66ad01f7c1c95da98d Mon Sep 17 00:00:00 2001 From: LindirQuenya <53021080+LindirQuenya@users.noreply.github.com> Date: Sat, 13 Aug 2022 01:47:55 -0400 Subject: [PATCH 03/11] Bump version. --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 750a3b9de..6a3627a33 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "flashpoint-launcher", - "version": "10.1.6", + "version": "10.1.7", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "flashpoint-launcher", - "version": "10.1.6", + "version": "10.1.7", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index acabad585..25ccf7e52 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "flashpoint-launcher", - "version": "10.1.6", + "version": "10.1.7", "description": "A desktop application used to browse, manage and play games from BlueMaxima's Flashpoint", "main": "build/main/index.js", "config": { From 31025d17642233ee18de2c351a93056583a92f36 Mon Sep 17 00:00:00 2001 From: LindirQuenya <53021080+LindirQuenya@users.noreply.github.com> Date: Sat, 13 Aug 2022 02:42:05 -0400 Subject: [PATCH 04/11] Remove old path hack. --- src/back/ManagedChildProcess.ts | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/back/ManagedChildProcess.ts b/src/back/ManagedChildProcess.ts index 7b8a7a15b..cfd84f5f7 100644 --- a/src/back/ManagedChildProcess.ts +++ b/src/back/ManagedChildProcess.ts @@ -108,23 +108,6 @@ export class ManagedChildProcess extends EventEmitter { this.autoRestartCount = 0; } // Spawn process - if (process.platform == 'darwin') { - if (this.env === undefined) { - this.env = {}; - } - if (this.env.PATH === undefined) { - this.env.PATH = ''; - } - const pathArr: string[] = this.env.PATH.split(':'); - // HACK: manually read in /etc/paths to PATH. Needs to be done on Mac, because otherwise - // the brew path won't be found. - for (const entry of readFileSync('/etc/paths').toString().split('\n')) { - if (entry != '' && !pathArr.includes(entry)) { - pathArr.push(entry); - } - } - this.env.PATH = pathArr.join(':'); - } this.process = spawn(this.info.filename, this.info.arguments, { cwd: this.cwd, detached: this.detached, shell: this.shell , env: this.env}); // Set start timestamp this.startTime = Date.now(); From f5d13ba96bcd9bc047d1d86b5e4c289fb6d7f5c7 Mon Sep 17 00:00:00 2001 From: nosamu <71368227+n0samu@users.noreply.github.com> Date: Sat, 13 Aug 2022 22:11:37 -0500 Subject: [PATCH 05/11] Stop WINE flooding the Logs with debug messages --- src/back/GameLauncher.ts | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/back/GameLauncher.ts b/src/back/GameLauncher.ts index 0109a1834..7488ba896 100644 --- a/src/back/GameLauncher.ts +++ b/src/back/GameLauncher.ts @@ -303,17 +303,21 @@ export namespace GameLauncher { /** Get an object containing the environment variables to use for the game / additional application. */ function getEnvironment(fpPath: string, proxy: string, path?: string): NodeJS.ProcessEnv { - // When using Linux, use the proxy created in BackgroundServices.ts - // This is only needed on Linux because the proxy is installed on system - // level entire system when using Windows. - // When using WINE on mac, the proxy variable is needed as well. + let newEnvVars: NodeJS.ProcessEnv = {'FP_PATH': fpPath, 'PATH': path ?? process.env.PATH}; + // On Linux, we tell native applications to use Flashpoint's proxy using the HTTP_PROXY env var + // On Windows, executables are patched to load the FlashpointProxy library + // On Linux/Mac, WINE obeys the HTTP_PROXY env var so we can run unpatched Windows executables + if (process.platform === 'linux' || process.platform === 'darwin') { + // Add proxy env vars and prevent WINE from flooding the logs with debug messages + newEnvVars = { + ...newEnvVars, 'WINEDEBUG': 'fixme-all', + ...(proxy !== '' ? {'http_proxy': `http://${proxy}/`, 'HTTP_PROXY': `http://${proxy}/`} : null) + }; + } return { // Copy this processes environment variables ...process.env, - 'FP_PATH': fpPath, - // Add proxy env vars if it's running on linux - ...(((process.platform === 'linux' || process.platform === 'darwin') && proxy !== '') ? { http_proxy: `http://${proxy}/`, HTTP_PROXY: `http://${proxy}/` } : null), - 'PATH': path ?? process.env.PATH, + ...newEnvVars }; } From ffb70ca254f924f9412810ee5a510dd5d5b6fe84 Mon Sep 17 00:00:00 2001 From: nosamu <71368227+n0samu@users.noreply.github.com> Date: Sun, 14 Aug 2022 02:23:05 -0500 Subject: [PATCH 06/11] Don't check for PHP on Mac --- src/renderer/app.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/app.tsx b/src/renderer/app.tsx index 17dd47492..4988024e5 100644 --- a/src/renderer/app.tsx +++ b/src/renderer/app.tsx @@ -496,8 +496,8 @@ export class App extends React.Component { } } - // Check for Wine and PHP on Linux/Mac - if (process.platform !== 'win32') { + // Check for PHP on Linux + if (process.platform === 'linux') { which('php', function(err: Error | null) { if (err) { log.warn('Launcher', 'Warning: PHP not found in path, may cause unexpected behaviour.'); From bc59eb498b1e475d3b18f67e8d05383cb98d8029 Mon Sep 17 00:00:00 2001 From: nosamu <71368227+n0samu@users.noreply.github.com> Date: Sun, 14 Aug 2022 03:38:01 -0500 Subject: [PATCH 07/11] chore: Remove trailing spaces --- src/back/GameLauncher.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/back/GameLauncher.ts b/src/back/GameLauncher.ts index 7488ba896..32fe5fdb6 100644 --- a/src/back/GameLauncher.ts +++ b/src/back/GameLauncher.ts @@ -309,9 +309,9 @@ export namespace GameLauncher { // On Linux/Mac, WINE obeys the HTTP_PROXY env var so we can run unpatched Windows executables if (process.platform === 'linux' || process.platform === 'darwin') { // Add proxy env vars and prevent WINE from flooding the logs with debug messages - newEnvVars = { - ...newEnvVars, 'WINEDEBUG': 'fixme-all', - ...(proxy !== '' ? {'http_proxy': `http://${proxy}/`, 'HTTP_PROXY': `http://${proxy}/`} : null) + newEnvVars = { + ...newEnvVars, 'WINEDEBUG': 'fixme-all', + ...(proxy !== '' ? {'http_proxy': `http://${proxy}/`, 'HTTP_PROXY': `http://${proxy}/`} : null) }; } return { From 75cb9b54cd205dca3e9f6f6394583ba5b46cacc3 Mon Sep 17 00:00:00 2001 From: parkerlreed Date: Thu, 18 Aug 2022 17:49:25 -0400 Subject: [PATCH 08/11] Fix: Removed five second game startup delay Was being called for every game launch. --- src/back/responses.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/back/responses.ts b/src/back/responses.ts index a9993817d..3eae2483a 100644 --- a/src/back/responses.ts +++ b/src/back/responses.ts @@ -267,10 +267,6 @@ export function registerRequestCallbacks(state: BackState): void { state.socketServer.register(BackIn.LAUNCH_GAME, async (event, id) => { const game = await GameManager.findGame(id); - await new Promise((resolve) => { - setTimeout(resolve, 5000); - }); - if (game) { // Make sure Server is set to configured server - Curations may have changed it const configServer = state.serviceInfo ? state.serviceInfo.server.find(s => s.name === state.config.server) : undefined; From 12ac10fc6d513754074f7bea5cb1c19c3d536122 Mon Sep 17 00:00:00 2001 From: Colin Berry Date: Tue, 27 Sep 2022 15:16:07 +0100 Subject: [PATCH 09/11] fix: Use AND comparison for Tag whitelists --- .gitignore | 1 + src/back/game/GameManager.ts | 26 ++++++++++++++++++++++---- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 25a57b92a..c374b28f2 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ npm-debug.log.* # Visual Studio Code /.vscode +/.vs # JetBrains /.idea diff --git a/src/back/game/GameManager.ts b/src/back/game/GameManager.ts index 7b954d8eb..c852559e2 100644 --- a/src/back/game/GameManager.ts +++ b/src/back/game/GameManager.ts @@ -557,15 +557,33 @@ async function applyTagFilters(aliases: string[], alias: string, query: SelectQu .select('tag_alias.tagId') .distinct(); - const subQuery = AppDataSource.createQueryBuilder() + let subQueryTwo = undefined; + if (whitelist) { + subQueryTwo = AppDataSource.createQueryBuilder() + .select('game_tag.gameId, COUNT(*) as count') + .from('game_tags_tag', 'game_tag') + .where(`game_tag.tagId IN (${tagIdQuery.getQuery()})`) + .groupBy('game_tag.gameId'); + } + + let subQuery = AppDataSource.createQueryBuilder() .select('game_tag.gameId') - .distinct() - .from('game_tags_tag', 'game_tag') - .where(`game_tag.tagId IN (${tagIdQuery.getQuery()})`); + .distinct(); + + if (subQueryTwo) { + subQuery = subQuery.from(`(${subQueryTwo.getQuery()})`, 'game_tag') + .where(`game_tag.count == ${aliases.length}`); + } else { + subQuery = subQuery.from('game_tags_tag', 'game_tag') + .where(`game_tag.tagId IN (${tagIdQuery.getQuery()})`); + } query.andWhere(`${alias}.id ${comparator} (${subQuery.getQuery()})`); query.setParameters(subQuery.getParameters()); query.setParameters(tagIdQuery.getParameters()); + if (subQueryTwo) { + query.setParameters(subQueryTwo.getParameters()); + } } async function getGameQuery( From 6b1ad47543449e507e604cff602d379121cf8032 Mon Sep 17 00:00:00 2001 From: Colin Berry Date: Tue, 27 Sep 2022 15:25:38 +0100 Subject: [PATCH 10/11] feat: More onDidUpdatePlaylist events (hopefully) --- src/back/game/GameManager.ts | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/src/back/game/GameManager.ts b/src/back/game/GameManager.ts index c852559e2..3d6798255 100644 --- a/src/back/game/GameManager.ts +++ b/src/back/game/GameManager.ts @@ -386,7 +386,13 @@ export async function removePlaylistGame(playlistId: string, gameId: string): Pr const playlistGame = await findPlaylistGame(playlistId, gameId); if (playlistGame) { onDidRemovePlaylistGame.fire(playlistGame); - return playlistGameRepository.remove(playlistGame); + await playlistGameRepository.remove(playlistGame); + + const playlistRepository = AppDataSource.getRepository(Playlist); + const playlist = await playlistRepository.findOneBy({ id: playlistId }); + if (playlist) { + onDidUpdatePlaylist.fire({ oldPlaylist: playlist, newPlaylist: playlist }); + } } return null; } @@ -408,19 +414,34 @@ export async function addPlaylistGame(playlistId: string, gameId: string): Promi .select('pg.order') .getOne(); - await repository.save({ + const pg = await repository.save({ gameId: gameId, playlistId: playlistId, order: highestOrder ? highestOrder.order + 1 : 0, notes: '', }); + + onDidUpdatePlaylistGame.fire({oldGame: pg, newGame: pg}); + const playlistRepository = AppDataSource.getRepository(Playlist); + const playlist = await playlistRepository.findOneBy({ id: playlistId }); + if (playlist) { + onDidUpdatePlaylist.fire({ oldPlaylist: playlist, newPlaylist: playlist }); + } + } /** Updates a Playlist Game */ export async function updatePlaylistGame(playlistGame: PlaylistGame): Promise { const playlistGameRepository = AppDataSource.getRepository(PlaylistGame); const savedPlaylistGame = await playlistGameRepository.save(playlistGame); - if (savedPlaylistGame) { onDidUpdatePlaylistGame.fire({oldGame: playlistGame, newGame: savedPlaylistGame }); } + onDidUpdatePlaylistGame.fire({oldGame: playlistGame, newGame: savedPlaylistGame }); + + const playlistRepository = AppDataSource.getRepository(Playlist); + const playlist = await playlistRepository.findOneBy({ id: savedPlaylistGame.playlistId }); + if (playlist) { + onDidUpdatePlaylist.fire({ oldPlaylist: playlist, newPlaylist: playlist }); + } + return savedPlaylistGame; } From e976f3e33755485971a96f9e496667bfd3d5e6de Mon Sep 17 00:00:00 2001 From: Colin Berry Date: Tue, 27 Sep 2022 15:31:46 +0100 Subject: [PATCH 11/11] chore: Minor bump of some deps (fixes dialog bug?) --- package-lock.json | 264 ++++++++++++++++++++++++++++++++-------------- package.json | 8 +- 2 files changed, 188 insertions(+), 84 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6a3627a33..f39a09e04 100644 --- a/package-lock.json +++ b/package-lock.json @@ -72,7 +72,7 @@ "chokidar": "^3.5.3", "coveralls": "3.1.0", "cross-env": "7.0.2", - "electron": "19.0.10", + "electron": "19.1.0", "electron-builder": "22.14.13", "electron-devtools-installer": "3.1.1", "eslint": "7.2.0", @@ -82,7 +82,7 @@ "jest": "28.1.0", "swc-loader": "0.2.3", "ts-jest": "28.0.3", - "ts-loader": "9.3.0", + "ts-loader": "9.4.1", "ts-node": "10.8.0", "ts-transform-paths": "^2.0.3", "tsconfig-paths-webpack-plugin": "3.2.0", @@ -91,8 +91,8 @@ "ttypescript": "^1.5.13", "typedoc": "0.22.15", "typescript": "4.6.2", - "webpack": "5.72.1", - "webpack-cli": "4.9.2" + "webpack": "5.74.0", + "webpack-cli": "4.10.0" }, "optionalDependencies": { "fsevents": "2.1.3" @@ -2973,9 +2973,9 @@ } }, "node_modules/@webpack-cli/configtest": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.1.1.tgz", - "integrity": "sha512-1FBc1f9G4P/AxMqIgfZgeOTuRnwZMten8E7zap5zgpPInnCrP8D4Q81+4CWIch8i/Nf7nXjP0v6CjjbHOrXhKg==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.2.0.tgz", + "integrity": "sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg==", "dev": true, "peerDependencies": { "webpack": "4.x.x || 5.x.x", @@ -2983,9 +2983,9 @@ } }, "node_modules/@webpack-cli/info": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.4.1.tgz", - "integrity": "sha512-PKVGmazEq3oAo46Q63tpMr4HipI3OPfP7LiNOEJg963RMgT0rqheag28NCML0o3GIzA3DmxP1ZIAv9oTX1CUIA==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.5.0.tgz", + "integrity": "sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ==", "dev": true, "dependencies": { "envinfo": "^7.7.3" @@ -2995,9 +2995,9 @@ } }, "node_modules/@webpack-cli/serve": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.6.1.tgz", - "integrity": "sha512-gNGTiTrjEVQ0OcVnzsRSqTxaBSr+dmTfm+qJsCDluky8uhdLWep7Gcr62QsAKHTMxjCS/8nEITsmFAhfIx+QSw==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.7.0.tgz", + "integrity": "sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q==", "dev": true, "peerDependencies": { "webpack-cli": "4.x.x" @@ -4581,7 +4581,7 @@ "node_modules/buffer-crc32": { "version": "0.2.13", "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", "engines": { "node": "*" } @@ -6476,9 +6476,9 @@ } }, "node_modules/electron": { - "version": "19.0.10", - "resolved": "https://registry.npmjs.org/electron/-/electron-19.0.10.tgz", - "integrity": "sha512-EiWtPWdD7CzkRkp1cw7t0N9W2qhI5XZOudHX7daOh5wI076nsdV2dtlAf/XyTHhPNoKR5qhTWrSnYL9PY6D1vg==", + "version": "19.1.0", + "resolved": "https://registry.npmjs.org/electron/-/electron-19.1.0.tgz", + "integrity": "sha512-5o9EEYx0bI0p+L0eSoS8n3gLrEvkdnzwSZ/hnkPoUfuAs/CONCI/TEqswSppeeJ/pi5gXf3/B7hVTNaZZbIdnw==", "hasInstallScript": true, "dependencies": { "@electron/get": "^1.14.1", @@ -8271,7 +8271,7 @@ "node_modules/fd-slicer": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", - "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", "dependencies": { "pend": "~1.2.0" } @@ -15714,7 +15714,7 @@ "node_modules/pend": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=" + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==" }, "node_modules/performance-now": { "version": "2.1.0", @@ -18675,9 +18675,9 @@ } }, "node_modules/ts-loader": { - "version": "9.3.0", - "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.3.0.tgz", - "integrity": "sha512-2kLLAdAD+FCKijvGKi9sS0OzoqxLCF3CxHpok7rVgCZ5UldRzH0TkbwG9XECKjBzHsAewntC5oDaI/FwKzEUog==", + "version": "9.4.1", + "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.4.1.tgz", + "integrity": "sha512-384TYAqGs70rn9F0VBnh6BPTfhga7yFNdC5gXbQpDrBj9/KsT4iRkGqKXhziofHOlE2j6YEaiTYVGKKvPhGWvw==", "dev": true, "dependencies": { "chalk": "^4.1.0", @@ -20140,9 +20140,9 @@ } }, "node_modules/watchpack": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.3.1.tgz", - "integrity": "sha512-x0t0JuydIo8qCNctdDrn1OzH/qDzk2+rdCOC3YzumZ42fiMqmQ7T3xQurykYMhYfHaPHTp4ZxAx2NfUo1K6QaA==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", + "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", "dev": true, "dependencies": { "glob-to-regexp": "^0.4.1", @@ -20159,9 +20159,9 @@ "dev": true }, "node_modules/webpack": { - "version": "5.72.1", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.72.1.tgz", - "integrity": "sha512-dXG5zXCLspQR4krZVR6QgajnZOjW2K/djHvdcRaDQvsjV9z9vaW6+ja5dZOYbqBBjF6kGXka/2ZyxNdc+8Jung==", + "version": "5.74.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.74.0.tgz", + "integrity": "sha512-A2InDwnhhGN4LYctJj6M1JEaGL7Luj6LOmyBHjcI8529cm5p6VXiTIW2sn6ffvEAKmveLzvu4jrihwXtPojlAA==", "dev": true, "dependencies": { "@types/eslint-scope": "^3.7.3", @@ -20169,11 +20169,11 @@ "@webassemblyjs/ast": "1.11.1", "@webassemblyjs/wasm-edit": "1.11.1", "@webassemblyjs/wasm-parser": "1.11.1", - "acorn": "^8.4.1", + "acorn": "^8.7.1", "acorn-import-assertions": "^1.7.6", "browserslist": "^4.14.5", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.9.3", + "enhanced-resolve": "^5.10.0", "es-module-lexer": "^0.9.0", "eslint-scope": "5.1.1", "events": "^3.2.0", @@ -20186,7 +20186,7 @@ "schema-utils": "^3.1.0", "tapable": "^2.1.1", "terser-webpack-plugin": "^5.1.3", - "watchpack": "^2.3.1", + "watchpack": "^2.4.0", "webpack-sources": "^3.2.3" }, "bin": { @@ -20206,18 +20206,18 @@ } }, "node_modules/webpack-cli": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.9.2.tgz", - "integrity": "sha512-m3/AACnBBzK/kMTcxWHcZFPrw/eQuY4Df1TxvIWfWM2x7mRqBQCqKEd96oCUa9jkapLBaFfRce33eGDb4Pr7YQ==", + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.10.0.tgz", + "integrity": "sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w==", "dev": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", - "@webpack-cli/configtest": "^1.1.1", - "@webpack-cli/info": "^1.4.1", - "@webpack-cli/serve": "^1.6.1", + "@webpack-cli/configtest": "^1.2.0", + "@webpack-cli/info": "^1.5.0", + "@webpack-cli/serve": "^1.7.0", "colorette": "^2.0.14", "commander": "^7.0.0", - "execa": "^5.0.0", + "cross-spawn": "^7.0.3", "fastest-levenshtein": "^1.0.12", "import-local": "^3.0.2", "interpret": "^2.2.0", @@ -20230,6 +20230,10 @@ "engines": { "node": ">=10.13.0" }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, "peerDependencies": { "webpack": "4.x.x || 5.x.x" }, @@ -20257,6 +20261,20 @@ "node": ">= 10" } }, + "node_modules/webpack-cli/node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/webpack-cli/node_modules/interpret": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz", @@ -20266,6 +20284,15 @@ "node": ">= 0.10" } }, + "node_modules/webpack-cli/node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/webpack-cli/node_modules/rechoir": { "version": "0.7.1", "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz", @@ -20278,6 +20305,42 @@ "node": ">= 0.10" } }, + "node_modules/webpack-cli/node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/webpack-cli/node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/webpack-cli/node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/webpack-merge": { "version": "5.8.0", "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.8.0.tgz", @@ -20322,9 +20385,9 @@ } }, "node_modules/webpack/node_modules/enhanced-resolve": { - "version": "5.9.3", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.9.3.tgz", - "integrity": "sha512-Bq9VSor+kjvW3f9/MiiR4eE3XYgOl7/rS8lnSxbRbF3kS0B2r+Y9w5krBWxZgDxASVZbdYrn5wT4j/Wb0J9qow==", + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.10.0.tgz", + "integrity": "sha512-T0yTFjdpldGY8PmuXXR0PyQ1ufZpEGiHVrp7zHKB7jdR4qlmZHhONVM5AQOAWXuF/w3dnHbEQVrNptJgt7F+cQ==", "dev": true, "dependencies": { "graceful-fs": "^4.2.4", @@ -20738,7 +20801,7 @@ "node_modules/yauzl": { "version": "2.10.0", "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", "dependencies": { "buffer-crc32": "~0.2.3", "fd-slicer": "~1.1.0" @@ -22973,25 +23036,25 @@ } }, "@webpack-cli/configtest": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.1.1.tgz", - "integrity": "sha512-1FBc1f9G4P/AxMqIgfZgeOTuRnwZMten8E7zap5zgpPInnCrP8D4Q81+4CWIch8i/Nf7nXjP0v6CjjbHOrXhKg==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.2.0.tgz", + "integrity": "sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg==", "dev": true, "requires": {} }, "@webpack-cli/info": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.4.1.tgz", - "integrity": "sha512-PKVGmazEq3oAo46Q63tpMr4HipI3OPfP7LiNOEJg963RMgT0rqheag28NCML0o3GIzA3DmxP1ZIAv9oTX1CUIA==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.5.0.tgz", + "integrity": "sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ==", "dev": true, "requires": { "envinfo": "^7.7.3" } }, "@webpack-cli/serve": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.6.1.tgz", - "integrity": "sha512-gNGTiTrjEVQ0OcVnzsRSqTxaBSr+dmTfm+qJsCDluky8uhdLWep7Gcr62QsAKHTMxjCS/8nEITsmFAhfIx+QSw==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.7.0.tgz", + "integrity": "sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q==", "dev": true, "requires": {} }, @@ -24185,7 +24248,7 @@ "buffer-crc32": { "version": "0.2.13", "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=" + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==" }, "buffer-equal": { "version": "1.0.0", @@ -25640,9 +25703,9 @@ } }, "electron": { - "version": "19.0.10", - "resolved": "https://registry.npmjs.org/electron/-/electron-19.0.10.tgz", - "integrity": "sha512-EiWtPWdD7CzkRkp1cw7t0N9W2qhI5XZOudHX7daOh5wI076nsdV2dtlAf/XyTHhPNoKR5qhTWrSnYL9PY6D1vg==", + "version": "19.1.0", + "resolved": "https://registry.npmjs.org/electron/-/electron-19.1.0.tgz", + "integrity": "sha512-5o9EEYx0bI0p+L0eSoS8n3gLrEvkdnzwSZ/hnkPoUfuAs/CONCI/TEqswSppeeJ/pi5gXf3/B7hVTNaZZbIdnw==", "requires": { "@electron/get": "^1.14.1", "@types/node": "^16.11.26", @@ -27045,7 +27108,7 @@ "fd-slicer": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", - "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", "requires": { "pend": "~1.2.0" } @@ -32631,7 +32694,7 @@ "pend": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=" + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==" }, "performance-now": { "version": "2.1.0", @@ -34909,9 +34972,9 @@ } }, "ts-loader": { - "version": "9.3.0", - "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.3.0.tgz", - "integrity": "sha512-2kLLAdAD+FCKijvGKi9sS0OzoqxLCF3CxHpok7rVgCZ5UldRzH0TkbwG9XECKjBzHsAewntC5oDaI/FwKzEUog==", + "version": "9.4.1", + "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.4.1.tgz", + "integrity": "sha512-384TYAqGs70rn9F0VBnh6BPTfhga7yFNdC5gXbQpDrBj9/KsT4iRkGqKXhziofHOlE2j6YEaiTYVGKKvPhGWvw==", "dev": true, "requires": { "chalk": "^4.1.0", @@ -35948,9 +36011,9 @@ } }, "watchpack": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.3.1.tgz", - "integrity": "sha512-x0t0JuydIo8qCNctdDrn1OzH/qDzk2+rdCOC3YzumZ42fiMqmQ7T3xQurykYMhYfHaPHTp4ZxAx2NfUo1K6QaA==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", + "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", "dev": true, "requires": { "glob-to-regexp": "^0.4.1", @@ -35964,9 +36027,9 @@ "dev": true }, "webpack": { - "version": "5.72.1", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.72.1.tgz", - "integrity": "sha512-dXG5zXCLspQR4krZVR6QgajnZOjW2K/djHvdcRaDQvsjV9z9vaW6+ja5dZOYbqBBjF6kGXka/2ZyxNdc+8Jung==", + "version": "5.74.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.74.0.tgz", + "integrity": "sha512-A2InDwnhhGN4LYctJj6M1JEaGL7Luj6LOmyBHjcI8529cm5p6VXiTIW2sn6ffvEAKmveLzvu4jrihwXtPojlAA==", "dev": true, "requires": { "@types/eslint-scope": "^3.7.3", @@ -35974,11 +36037,11 @@ "@webassemblyjs/ast": "1.11.1", "@webassemblyjs/wasm-edit": "1.11.1", "@webassemblyjs/wasm-parser": "1.11.1", - "acorn": "^8.4.1", + "acorn": "^8.7.1", "acorn-import-assertions": "^1.7.6", "browserslist": "^4.14.5", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.9.3", + "enhanced-resolve": "^5.10.0", "es-module-lexer": "^0.9.0", "eslint-scope": "5.1.1", "events": "^3.2.0", @@ -35991,7 +36054,7 @@ "schema-utils": "^3.1.0", "tapable": "^2.1.1", "terser-webpack-plugin": "^5.1.3", - "watchpack": "^2.3.1", + "watchpack": "^2.4.0", "webpack-sources": "^3.2.3" }, "dependencies": { @@ -36009,9 +36072,9 @@ "requires": {} }, "enhanced-resolve": { - "version": "5.9.3", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.9.3.tgz", - "integrity": "sha512-Bq9VSor+kjvW3f9/MiiR4eE3XYgOl7/rS8lnSxbRbF3kS0B2r+Y9w5krBWxZgDxASVZbdYrn5wT4j/Wb0J9qow==", + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.10.0.tgz", + "integrity": "sha512-T0yTFjdpldGY8PmuXXR0PyQ1ufZpEGiHVrp7zHKB7jdR4qlmZHhONVM5AQOAWXuF/w3dnHbEQVrNptJgt7F+cQ==", "dev": true, "requires": { "graceful-fs": "^4.2.4", @@ -36027,18 +36090,18 @@ } }, "webpack-cli": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.9.2.tgz", - "integrity": "sha512-m3/AACnBBzK/kMTcxWHcZFPrw/eQuY4Df1TxvIWfWM2x7mRqBQCqKEd96oCUa9jkapLBaFfRce33eGDb4Pr7YQ==", + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.10.0.tgz", + "integrity": "sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w==", "dev": true, "requires": { "@discoveryjs/json-ext": "^0.5.0", - "@webpack-cli/configtest": "^1.1.1", - "@webpack-cli/info": "^1.4.1", - "@webpack-cli/serve": "^1.6.1", + "@webpack-cli/configtest": "^1.2.0", + "@webpack-cli/info": "^1.5.0", + "@webpack-cli/serve": "^1.7.0", "colorette": "^2.0.14", "commander": "^7.0.0", - "execa": "^5.0.0", + "cross-spawn": "^7.0.3", "fastest-levenshtein": "^1.0.12", "import-local": "^3.0.2", "interpret": "^2.2.0", @@ -36052,12 +36115,29 @@ "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", "dev": true }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, "interpret": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz", "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==", "dev": true }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, "rechoir": { "version": "0.7.1", "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz", @@ -36066,6 +36146,30 @@ "requires": { "resolve": "^1.9.0" } + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } } } }, @@ -36379,7 +36483,7 @@ "yauzl": { "version": "2.10.0", "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", "requires": { "buffer-crc32": "~0.2.3", "fd-slicer": "~1.1.0" diff --git a/package.json b/package.json index 25ccf7e52..b55e23b7b 100644 --- a/package.json +++ b/package.json @@ -95,7 +95,7 @@ "chokidar": "^3.5.3", "coveralls": "3.1.0", "cross-env": "7.0.2", - "electron": "19.0.10", + "electron": "19.1.0", "electron-builder": "22.14.13", "electron-devtools-installer": "3.1.1", "eslint": "7.2.0", @@ -105,7 +105,7 @@ "jest": "28.1.0", "swc-loader": "0.2.3", "ts-jest": "28.0.3", - "ts-loader": "9.3.0", + "ts-loader": "9.4.1", "ts-node": "10.8.0", "ts-transform-paths": "^2.0.3", "tsconfig-paths-webpack-plugin": "3.2.0", @@ -114,8 +114,8 @@ "ttypescript": "^1.5.13", "typedoc": "0.22.15", "typescript": "4.6.2", - "webpack": "5.72.1", - "webpack-cli": "4.9.2" + "webpack": "5.74.0", + "webpack-cli": "4.10.0" }, "optionalDependencies": { "fsevents": "2.1.3"