Update dependencies

This commit is contained in:
Geomitron
2023-11-23 12:44:13 -06:00
parent 89a596b969
commit 93aae097c6
8 changed files with 794 additions and 1573 deletions

1
.npmrc Normal file
View File

@@ -0,0 +1 @@
node-linker=hoisted

View File

@@ -26,7 +26,6 @@
"release": "ng build -c production && tsc -p tsconfig.electron.json && electron-builder build"
},
"dependencies": {
"7zip-bin": "^5.0.3",
"@angular/animations": "^17.0.4",
"@angular/common": "^17.0.4",
"@angular/compiler": "^17.0.4",
@@ -39,53 +38,37 @@
"bottleneck": "^2.19.5",
"cli-color": "^2.0.0",
"comparators": "^3.0.2",
"electron-unhandled": "^3.0.2",
"electron-unhandled": "^4.0.1",
"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",
"mv": "^2.1.1",
"needle": "^2.6.0",
"node-7z": "^2.0.5",
"node-unrar-js": "^0.8.1",
"randombytes": "^2.1.0",
"rimraf": "^3.0.2",
"rxjs": "~6.5.5",
"rimraf": "^5.0.5",
"rxjs": "~7.8.1",
"sanitize-filename": "^1.6.3",
"serialize-error": "^7.0.1",
"tslib": "^2.0.0",
"underscore": "^1.9.2",
"zone.js": "~0.14.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "^17.0.3",
"@angular-eslint/builder": "0.0.1-alpha.18",
"@angular-eslint/builder": "17.1.0",
"@angular/cli": "^17.0.3",
"@angular/compiler-cli": "^17.0.4",
"@angular/language-service": "^17.0.4",
"@types/cli-color": "^2.0.0",
"@types/electron-window-state": "^2.0.33",
"@types/jsonfile": "^6.0.0",
"@types/mv": "^2.1.0",
"@types/needle": "^2.5.1",
"@types/node": "^14.14.37",
"@types/node": "^18.16.0",
"@types/randombytes": "^2.0.0",
"@types/rimraf": "^3.0.0",
"@types/serialize-error": "^4.0.1",
"@types/underscore": "^1.9.4",
"@typescript-eslint/eslint-plugin": "^2.19.2",
"@typescript-eslint/parser": "^2.19.2",
"electron": "^23.1.0",
"@typescript-eslint/eslint-plugin": "^6.12.0",
"@typescript-eslint/parser": "^6.12.0",
"electron": "^27.1.2",
"electron-builder": "^23.6.0",
"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": "^5.2.2",
"wait-on": "^4.0.0"
"eslint": "^8.54.0",
"nodemon": "^3.0.1",
"typescript": "^5.2.2"
}
}

2304
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,14 +1,12 @@
import { IPCInvokeHandler } from '../shared/IPCHandler'
import { tempPath } from '../shared/Paths'
import * as _rimraf from 'rimraf'
import { rimraf } from 'rimraf'
import { Dirent, readdir as _readdir } from 'fs'
import { promisify } from 'util'
import { inspect, promisify } from 'util'
import { join } from 'path'
import { devLog } from '../shared/ElectronUtilFunctions'
import { serializeError } from 'serialize-error'
const readdir = promisify(_readdir)
const rimraf = promisify(_rimraf)
/**
* Handles the 'clear-cache' event.
@@ -33,7 +31,7 @@ class ClearCacheHandler implements IPCInvokeHandler<'clear-cache'> {
devLog(`Deleting ${file.isFile() ? 'file' : 'folder'}: ${join(tempPath, file.name)}`)
await rimraf(join(tempPath, file.name))
} catch (err) {
devLog(`Failed to delete ${file.isFile() ? 'file' : 'folder'}: `, serializeError(err))
devLog(`Failed to delete ${file.isFile() ? 'file' : 'folder'}: `, inspect(err))
return
}
}

View File

@@ -3,17 +3,14 @@ import { join, parse } from 'path'
import { FileExtractor } from './FileExtractor'
import { sanitizeFilename, interpolate } from '../../shared/UtilFunctions'
import { emitIPCEvent } from '../../main'
import { promisify } from 'util'
import { ProgressType, NewDownload } from 'src/electron/shared/interfaces/download.interface'
import { DriveFile } from 'src/electron/shared/interfaces/songDetails.interface'
import { FileTransfer } from './FileTransfer'
import * as _rimraf from 'rimraf'
import { rimraf } from 'rimraf'
import { FilesystemChecker } from './FilesystemChecker'
import { getSettings } from '../SettingsHandler.ipc'
import { hasVideoExtension } from '../../shared/ElectronUtilFunctions'
const rimraf = promisify(_rimraf)
type EventCallback = {
/** Note: this will not be the last event if `retry()` is called. */
'error': () => void

View File

@@ -8,10 +8,9 @@ import { googleTimer } from './GoogleTimer'
import { DownloadError } from './ChartDownload'
import { google } from 'googleapis'
import Bottleneck from 'bottleneck'
import { promisify } from 'util'
import { inspect, promisify } from 'util'
import { join } from 'path'
import { tempPath } from '../../shared/Paths'
import { serializeError } from 'serialize-error'
const drive = google.drive('v3')
const limiter = new Bottleneck({
minTime: 200 // Wait 200 ms between API requests
@@ -116,7 +115,7 @@ class APIFileDownloader {
if (this.wasCanceled) { return }
this.startDownloadStream()
} else {
devLog(serializeError(err))
devLog(inspect(err))
if (err?.code && err?.response?.statusText) {
this.failDownload(downloadErrors.responseError(`${err.code} (${err.response.statusText})`))
} else {

View File

@@ -3,11 +3,10 @@ import { promisify } from 'util'
import { getSettings } from '../SettingsHandler.ipc'
import * as mv from 'mv'
import { join } from 'path'
import * as _rimraf from 'rimraf'
import { rimraf } from 'rimraf'
import { DownloadError } from './ChartDownload'
const readdir = promisify(_readdir)
const rimraf = promisify(_rimraf)
type EventCallback = {
'start': (destinationFolder: string) => void

View File

@@ -20,7 +20,7 @@ export function hasVideoExtension(name: string) {
/**
* Log a message in the main BrowserWindow's console.
* Note: Error objects can't be serialized by this; use serializeError(err) before passing it here.
* Note: Error objects can't be serialized by this; use inspect(err) before passing it here.
*/
export function devLog(...messages: any[]) {
emitIPCEvent('log', messages)