diff --git a/package-lock.json b/package-lock.json index ac5d9a474..447dd691b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,6 @@ "@fortawesome/react-fontawesome": "0.1.18", "@types/react-virtualized": "^9.21.21", "axios": "1.3.4", - "better-sqlite3": "9.2.2", "connected-react-router": "6.9.2", "electron-updater": "4.3.1", "electron-util": "0.14.2", @@ -43,7 +42,6 @@ "remark-gfm": "2.0.0", "tail": "2.0.3", "terminate": "^2.6.1", - "typeorm": "0.3.19", "typesafe-actions": "4.4.2", "uuid": "3.3.2", "uuid-validate": "0.0.3", @@ -56,7 +54,6 @@ "@kayahr/jest-electron-runner": "^29.3.1", "@swc/cli": "0.1.61", "@swc/core": "1.3.35", - "@types/better-sqlite3": "7.5.0", "@types/follow-redirects": "1.8.0", "@types/fs-extra": "8.1.0", "@types/jest": "27.5.1", @@ -650,7 +647,7 @@ }, "node_modules/@cspotcode/source-map-support": { "version": "0.8.1", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "@jridgewell/trace-mapping": "0.3.9" @@ -881,12 +878,6 @@ "react": ">=16.x" } }, - "node_modules/@gar/promisify": { - "version": "1.1.3", - "license": "MIT", - "optional": true, - "peer": true - }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.8", "dev": true, @@ -924,88 +915,6 @@ "react": "*" } }, - "node_modules/@isaacs/cliui": { - "version": "8.0.2", - "license": "ISC", - "dependencies": { - "string-width": "^5.1.2", - "string-width-cjs": "npm:string-width@^4.2.0", - "strip-ansi": "^7.0.1", - "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", - "wrap-ansi": "^8.1.0", - "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.0.1", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/ansi-styles": { - "version": "6.2.1", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/emoji-regex": { - "version": "9.2.2", - "license": "MIT" - }, - "node_modules/@isaacs/cliui/node_modules/string-width": { - "version": "5.1.2", - "license": "MIT", - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@isaacs/cliui/node_modules/strip-ansi": { - "version": "7.1.0", - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { - "version": "8.1.0", - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", "dev": true, @@ -1868,7 +1777,7 @@ }, "node_modules/@jridgewell/resolve-uri": { "version": "3.1.0", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=6.0.0" @@ -1906,12 +1815,12 @@ }, "node_modules/@jridgewell/sourcemap-codec": { "version": "1.4.14", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.9", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", @@ -2310,26 +2219,6 @@ "node": ">= 10.0.0" } }, - "node_modules/@mapbox/node-pre-gyp": { - "version": "1.0.9", - "license": "BSD-3-Clause", - "optional": true, - "peer": true, - "dependencies": { - "detect-libc": "^2.0.0", - "https-proxy-agent": "^5.0.0", - "make-dir": "^3.1.0", - "node-fetch": "^2.6.7", - "nopt": "^5.0.0", - "npmlog": "^5.0.1", - "rimraf": "^3.0.2", - "semver": "^7.3.5", - "tar": "^6.1.11" - }, - "bin": { - "node-pre-gyp": "bin/node-pre-gyp" - } - }, "node_modules/@mole-inc/bin-wrapper": { "version": "8.0.1", "dev": true, @@ -2541,49 +2430,6 @@ "node": ">= 8" } }, - "node_modules/@npmcli/fs": { - "version": "1.1.1", - "license": "ISC", - "optional": true, - "peer": true, - "dependencies": { - "@gar/promisify": "^1.0.1", - "semver": "^7.3.5" - } - }, - "node_modules/@npmcli/move-file": { - "version": "1.1.2", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "mkdirp": "^1.0.4", - "rimraf": "^3.0.2" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@npmcli/move-file/node_modules/mkdirp": { - "version": "1.0.4", - "license": "MIT", - "optional": true, - "peer": true, - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@pkgjs/parseargs": { - "version": "0.11.0", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=14" - } - }, "node_modules/@popperjs/core": { "version": "2.11.6", "license": "MIT", @@ -2620,10 +2466,6 @@ "@sinonjs/commons": "^2.0.0" } }, - "node_modules/@sqltools/formatter": { - "version": "1.2.5", - "license": "MIT" - }, "node_modules/@swc/cli": { "version": "0.1.61", "dev": true, @@ -2750,22 +2592,22 @@ }, "node_modules/@tsconfig/node10": { "version": "1.0.8", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/@tsconfig/node12": { "version": "1.0.9", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/@tsconfig/node14": { "version": "1.0.1", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/@tsconfig/node16": { "version": "1.0.2", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/@types/babel__core": { @@ -2805,14 +2647,6 @@ "@babel/types": "^7.3.0" } }, - "node_modules/@types/better-sqlite3": { - "version": "7.5.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/cacheable-request": { "version": "6.0.3", "dev": true, @@ -3004,7 +2838,7 @@ }, "node_modules/@types/node": { "version": "14.14.31", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/@types/prettier": { @@ -3551,15 +3385,9 @@ "dev": true, "license": "MIT" }, - "node_modules/abbrev": { - "version": "1.1.1", - "license": "ISC", - "optional": true, - "peer": true - }, "node_modules/acorn": { "version": "8.8.2", - "devOptional": true, + "dev": true, "license": "MIT", "bin": { "acorn": "bin/acorn" @@ -3578,7 +3406,7 @@ }, "node_modules/acorn-walk": { "version": "8.2.0", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=0.4.0" @@ -3586,7 +3414,7 @@ }, "node_modules/agent-base": { "version": "6.0.2", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "debug": "4" @@ -3595,33 +3423,6 @@ "node": ">= 6.0.0" } }, - "node_modules/agentkeepalive": { - "version": "4.2.1", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "debug": "^4.1.0", - "depd": "^1.1.2", - "humanize-ms": "^1.2.1" - }, - "engines": { - "node": ">= 8.0.0" - } - }, - "node_modules/aggregate-error": { - "version": "3.1.0", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/ajv": { "version": "6.12.6", "dev": true, @@ -3694,7 +3495,7 @@ }, "node_modules/ansi-regex": { "version": "2.1.1", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -3719,10 +3520,6 @@ "node": ">=0.10.0" } }, - "node_modules/any-promise": { - "version": "1.3.0", - "license": "MIT" - }, "node_modules/anymatch": { "version": "2.0.0", "dev": true, @@ -3846,13 +3643,6 @@ "node": ">= 10.0.0" } }, - "node_modules/app-root-path": { - "version": "3.1.0", - "license": "MIT", - "engines": { - "node": ">= 6.0.0" - } - }, "node_modules/append-buffer": { "version": "1.0.2", "dev": true, @@ -3864,12 +3654,6 @@ "node": ">=0.10.0" } }, - "node_modules/aproba": { - "version": "2.0.0", - "license": "ISC", - "optional": true, - "peer": true - }, "node_modules/arch": { "version": "2.2.0", "dev": true, @@ -3902,65 +3686,9 @@ "node": ">=14" } }, - "node_modules/are-we-there-yet": { - "version": "2.0.0", - "license": "ISC", - "optional": true, - "peer": true, - "dependencies": { - "delegates": "^1.0.0", - "readable-stream": "^3.6.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/are-we-there-yet/node_modules/readable-stream": { - "version": "3.6.0", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/are-we-there-yet/node_modules/safe-buffer": { - "version": "5.2.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "optional": true, - "peer": true - }, - "node_modules/are-we-there-yet/node_modules/string_decoder": { - "version": "1.3.0", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, "node_modules/arg": { "version": "4.1.3", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/argparse": { @@ -4519,6 +4247,7 @@ }, "node_modules/balanced-match": { "version": "1.0.0", + "dev": true, "license": "MIT" }, "node_modules/base": { @@ -4586,6 +4315,7 @@ }, "node_modules/base64-js": { "version": "1.5.1", + "dev": true, "funding": [ { "type": "github", @@ -4610,15 +4340,6 @@ "tweetnacl": "^0.14.3" } }, - "node_modules/better-sqlite3": { - "version": "9.2.2", - "hasInstallScript": true, - "license": "MIT", - "dependencies": { - "bindings": "^1.5.0", - "prebuild-install": "^7.1.1" - } - }, "node_modules/bin-check": { "version": "4.1.0", "dev": true, @@ -4740,90 +4461,24 @@ }, "node_modules/bindings": { "version": "1.5.0", + "dev": true, "license": "MIT", + "optional": true, "dependencies": { "file-uri-to-path": "1.0.0" } }, - "node_modules/bl": { - "version": "4.1.0", + "node_modules/bluebird": { + "version": "3.7.2", + "dev": true, + "license": "MIT" + }, + "node_modules/bluebird-lst": { + "version": "1.0.9", + "dev": true, "license": "MIT", "dependencies": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "node_modules/bl/node_modules/buffer": { - "version": "5.7.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "node_modules/bl/node_modules/readable-stream": { - "version": "3.6.0", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/bl/node_modules/safe-buffer": { - "version": "5.2.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/bl/node_modules/string_decoder": { - "version": "1.3.0", - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "node_modules/bluebird": { - "version": "3.7.2", - "dev": true, - "license": "MIT" - }, - "node_modules/bluebird-lst": { - "version": "1.0.9", - "dev": true, - "license": "MIT", - "dependencies": { - "bluebird": "^3.5.5" + "bluebird": "^3.5.5" } }, "node_modules/boolean": { @@ -4833,7 +4488,7 @@ }, "node_modules/brace-expansion": { "version": "1.1.11", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", @@ -4917,28 +4572,6 @@ "node-int64": "^0.4.0" } }, - "node_modules/buffer": { - "version": "6.0.3", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" - } - }, "node_modules/buffer-alloc": { "version": "1.2.0", "dev": true, @@ -5203,47 +4836,6 @@ "node": ">=8" } }, - "node_modules/cacache": { - "version": "15.3.0", - "license": "ISC", - "optional": true, - "peer": true, - "dependencies": { - "@npmcli/fs": "^1.0.0", - "@npmcli/move-file": "^1.0.1", - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "glob": "^7.1.4", - "infer-owner": "^1.0.4", - "lru-cache": "^6.0.0", - "minipass": "^3.1.1", - "minipass-collect": "^1.0.2", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.2", - "mkdirp": "^1.0.3", - "p-map": "^4.0.0", - "promise-inflight": "^1.0.1", - "rimraf": "^3.0.2", - "ssri": "^8.0.1", - "tar": "^6.0.2", - "unique-filename": "^1.1.1" - }, - "engines": { - "node": ">= 10" - } - }, - "node_modules/cacache/node_modules/mkdirp": { - "version": "1.0.4", - "license": "MIT", - "optional": true, - "peer": true, - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/cache-base": { "version": "1.0.1", "dev": true, @@ -5511,7 +5103,7 @@ }, "node_modules/chownr": { "version": "2.0.0", - "devOptional": true, + "dev": true, "license": "ISC", "engines": { "node": ">=10" @@ -5569,146 +5161,9 @@ "version": "2.3.2", "license": "MIT" }, - "node_modules/clean-stack": { - "version": "2.2.0", - "license": "MIT", - "optional": true, - "peer": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/cli-highlight": { - "version": "2.1.11", - "license": "ISC", - "dependencies": { - "chalk": "^4.0.0", - "highlight.js": "^10.7.1", - "mz": "^2.4.0", - "parse5": "^5.1.1", - "parse5-htmlparser2-tree-adapter": "^6.0.0", - "yargs": "^16.0.0" - }, - "bin": { - "highlight": "bin/highlight" - }, - "engines": { - "node": ">=8.0.0", - "npm": ">=5.0.0" - } - }, - "node_modules/cli-highlight/node_modules/ansi-regex": { - "version": "5.0.1", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/cli-highlight/node_modules/ansi-styles": { - "version": "4.3.0", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/cli-highlight/node_modules/chalk": { - "version": "4.1.2", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/cli-highlight/node_modules/color-convert": { - "version": "2.0.1", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/cli-highlight/node_modules/color-name": { - "version": "1.1.4", - "license": "MIT" - }, - "node_modules/cli-highlight/node_modules/has-flag": { - "version": "4.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/cli-highlight/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/cli-highlight/node_modules/string-width": { - "version": "4.2.2", - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cli-highlight/node_modules/strip-ansi": { - "version": "6.0.0", - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cli-highlight/node_modules/supports-color": { - "version": "7.2.0", - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cli-highlight/node_modules/yargs": { - "version": "16.2.0", - "license": "MIT", - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/cliui": { "version": "7.0.4", + "dev": true, "license": "ISC", "dependencies": { "string-width": "^4.2.0", @@ -5718,6 +5173,7 @@ }, "node_modules/cliui/node_modules/ansi-regex": { "version": "5.0.1", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -5725,6 +5181,7 @@ }, "node_modules/cliui/node_modules/is-fullwidth-code-point": { "version": "3.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -5732,6 +5189,7 @@ }, "node_modules/cliui/node_modules/string-width": { "version": "4.2.3", + "dev": true, "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", @@ -5744,6 +5202,7 @@ }, "node_modules/cliui/node_modules/strip-ansi": { "version": "6.0.1", + "dev": true, "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" @@ -5848,7 +5307,7 @@ }, "node_modules/code-point-at": { "version": "1.1.0", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -5899,7 +5358,7 @@ }, "node_modules/color-support": { "version": "1.1.3", - "devOptional": true, + "dev": true, "license": "ISC", "bin": { "color-support": "bin.js" @@ -5964,7 +5423,7 @@ }, "node_modules/concat-map": { "version": "0.0.1", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/concat-stream": { @@ -6008,12 +5467,6 @@ "redux": "^3.6.0 || ^4.0.0" } }, - "node_modules/console-control-strings": { - "version": "1.1.0", - "license": "ISC", - "optional": true, - "peer": true - }, "node_modules/content-disposition": { "version": "0.5.4", "dev": true, @@ -6187,7 +5640,7 @@ }, "node_modules/create-require": { "version": "1.1.1", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/cross-env": { @@ -6317,10 +5770,6 @@ "url": "https://opencollective.com/date-fns" } }, - "node_modules/dayjs": { - "version": "1.11.10", - "license": "MIT" - }, "node_modules/debug": { "version": "4.3.4", "license": "MIT", @@ -6371,13 +5820,6 @@ "dev": true, "license": "MIT" }, - "node_modules/deep-extend": { - "version": "0.6.0", - "license": "MIT", - "engines": { - "node": ">=4.0.0" - } - }, "node_modules/deep-is": { "version": "0.1.3", "dev": true, @@ -6491,21 +5933,6 @@ "node": ">=0.4.0" } }, - "node_modules/delegates": { - "version": "1.0.0", - "license": "MIT", - "optional": true, - "peer": true - }, - "node_modules/depd": { - "version": "1.1.2", - "license": "MIT", - "optional": true, - "peer": true, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/detect-file": { "version": "1.0.0", "dev": true, @@ -6514,13 +5941,6 @@ "node": ">=0.10.0" } }, - "node_modules/detect-libc": { - "version": "2.0.1", - "license": "Apache-2.0", - "engines": { - "node": ">=8" - } - }, "node_modules/detect-newline": { "version": "3.1.0", "dev": true, @@ -6700,16 +6120,6 @@ "csstype": "^3.0.2" } }, - "node_modules/dotenv": { - "version": "16.3.1", - "license": "BSD-2-Clause", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/motdotla/dotenv?sponsor=1" - } - }, "node_modules/dotenv-expand": { "version": "5.1.0", "dev": true, @@ -6743,10 +6153,6 @@ "object.defaults": "^1.1.0" } }, - "node_modules/eastasianwidth": { - "version": "0.2.0", - "license": "MIT" - }, "node_modules/easy-stack": { "version": "1.0.1", "dev": true, @@ -7149,6 +6555,7 @@ }, "node_modules/emoji-regex": { "version": "8.0.0", + "dev": true, "license": "MIT" }, "node_modules/encodeurl": { @@ -7159,27 +6566,6 @@ "node": ">= 0.8" } }, - "node_modules/encoding": { - "version": "0.1.13", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "iconv-lite": "^0.6.2" - } - }, - "node_modules/encoding/node_modules/iconv-lite": { - "version": "0.6.3", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/end-of-stream": { "version": "1.4.4", "license": "MIT", @@ -7217,12 +6603,6 @@ "node": ">=4" } }, - "node_modules/err-code": { - "version": "2.0.3", - "license": "MIT", - "optional": true, - "peer": true - }, "node_modules/errno": { "version": "0.1.7", "dev": true, @@ -7377,6 +6757,7 @@ }, "node_modules/escalade": { "version": "3.1.1", + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -8160,13 +7541,6 @@ "node": ">=0.10.0" } }, - "node_modules/expand-template": { - "version": "2.0.3", - "license": "(MIT OR WTFPL)", - "engines": { - "node": ">=6" - } - }, "node_modules/expand-tilde": { "version": "2.0.2", "dev": true, @@ -8650,7 +8024,9 @@ }, "node_modules/file-uri-to-path": { "version": "1.0.0", - "license": "MIT" + "dev": true, + "license": "MIT", + "optional": true }, "node_modules/filelist": { "version": "1.0.4", @@ -8892,79 +8268,6 @@ "node": ">=0.10.0" } }, - "node_modules/foreground-child": { - "version": "3.1.1", - "license": "ISC", - "dependencies": { - "cross-spawn": "^7.0.0", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/foreground-child/node_modules/cross-spawn": { - "version": "7.0.3", - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/foreground-child/node_modules/path-key": { - "version": "3.1.1", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/foreground-child/node_modules/shebang-command": { - "version": "2.0.0", - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/foreground-child/node_modules/shebang-regex": { - "version": "3.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/foreground-child/node_modules/signal-exit": { - "version": "4.1.0", - "license": "ISC", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/foreground-child/node_modules/which": { - "version": "2.0.2", - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/forever-agent": { "version": "0.6.1", "dev": true, @@ -9001,10 +8304,6 @@ "version": "0.1.7", "license": "MIT" }, - "node_modules/fs-constants": { - "version": "1.0.0", - "license": "MIT" - }, "node_modules/fs-extra": { "version": "8.1.0", "license": "MIT", @@ -9033,7 +8332,7 @@ }, "node_modules/fs-minipass": { "version": "2.1.0", - "devOptional": true, + "dev": true, "license": "ISC", "dependencies": { "minipass": "^3.0.0" @@ -9056,7 +8355,7 @@ }, "node_modules/fs.realpath": { "version": "1.0.0", - "devOptional": true, + "dev": true, "license": "ISC" }, "node_modules/fsevents": { @@ -9103,70 +8402,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/gauge": { - "version": "3.0.2", - "license": "ISC", - "optional": true, - "peer": true, - "dependencies": { - "aproba": "^1.0.3 || ^2.0.0", - "color-support": "^1.1.2", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.1", - "object-assign": "^4.1.1", - "signal-exit": "^3.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "wide-align": "^1.1.2" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/gauge/node_modules/ansi-regex": { - "version": "5.0.1", - "license": "MIT", - "optional": true, - "peer": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/gauge/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "license": "MIT", - "optional": true, - "peer": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/gauge/node_modules/string-width": { - "version": "4.2.3", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/gauge/node_modules/strip-ansi": { - "version": "6.0.1", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/gensync": { "version": "1.0.0-beta.2", "dev": true, @@ -9177,6 +8412,7 @@ }, "node_modules/get-caller-file": { "version": "2.0.5", + "dev": true, "license": "ISC", "engines": { "node": "6.* || 8.* || >= 10.*" @@ -9244,13 +8480,9 @@ "assert-plus": "^1.0.0" } }, - "node_modules/github-from-package": { - "version": "0.0.0", - "license": "MIT" - }, "node_modules/glob": { "version": "7.2.3", - "devOptional": true, + "dev": true, "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", @@ -9841,12 +9073,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/has-unicode": { - "version": "2.0.1", - "license": "ISC", - "optional": true, - "peer": true - }, "node_modules/has-value": { "version": "1.0.0", "dev": true, @@ -9883,13 +9109,6 @@ "node": ">=0.10.0" } }, - "node_modules/highlight.js": { - "version": "10.7.3", - "license": "BSD-3-Clause", - "engines": { - "node": "*" - } - }, "node_modules/history": { "version": "4.10.1", "license": "MIT", @@ -9981,7 +9200,7 @@ }, "node_modules/https-proxy-agent": { "version": "5.0.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "agent-base": "6", @@ -9999,17 +9218,9 @@ "node": ">=10.17.0" } }, - "node_modules/humanize-ms": { - "version": "1.2.1", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "ms": "^2.0.0" - } - }, "node_modules/ieee754": { "version": "1.2.1", + "dev": true, "funding": [ { "type": "github", @@ -10071,30 +9282,15 @@ }, "node_modules/imurmurhash": { "version": "0.1.4", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=0.8.19" } }, - "node_modules/indent-string": { - "version": "4.0.0", - "license": "MIT", - "optional": true, - "peer": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/infer-owner": { - "version": "1.0.4", - "license": "ISC", - "optional": true, - "peer": true - }, "node_modules/inflight": { "version": "1.0.6", - "devOptional": true, + "dev": true, "license": "ISC", "dependencies": { "once": "^1.3.0", @@ -10107,6 +9303,7 @@ }, "node_modules/ini": { "version": "1.3.8", + "devOptional": true, "license": "ISC" }, "node_modules/inline-style-parser": { @@ -10142,12 +9339,6 @@ "node": ">=0.10.0" } }, - "node_modules/ip": { - "version": "1.1.8", - "license": "MIT", - "optional": true, - "peer": true - }, "node_modules/is-absolute": { "version": "1.0.0", "dev": true, @@ -10403,7 +9594,7 @@ }, "node_modules/is-fullwidth-code-point": { "version": "1.0.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "number-is-nan": "^1.0.0" @@ -10439,12 +9630,6 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/is-lambda": { - "version": "1.0.1", - "license": "MIT", - "optional": true, - "peer": true - }, "node_modules/is-negated-glob": { "version": "1.0.0", "dev": true, @@ -10791,22 +9976,6 @@ "node": ">=8" } }, - "node_modules/jackspeak": { - "version": "2.3.6", - "license": "BlueOak-1.0.0", - "dependencies": { - "@isaacs/cliui": "^8.0.2" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "optionalDependencies": { - "@pkgjs/parseargs": "^0.11.0" - } - }, "node_modules/jake": { "version": "10.8.5", "dev": true, @@ -13543,7 +12712,7 @@ }, "node_modules/make-dir": { "version": "3.1.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "semver": "^6.0.0" @@ -13557,7 +12726,7 @@ }, "node_modules/make-dir/node_modules/semver": { "version": "6.3.1", - "devOptional": true, + "dev": true, "license": "ISC", "bin": { "semver": "bin/semver.js" @@ -13565,59 +12734,9 @@ }, "node_modules/make-error": { "version": "1.3.6", - "devOptional": true, + "dev": true, "license": "ISC" }, - "node_modules/make-fetch-happen": { - "version": "9.1.0", - "license": "ISC", - "optional": true, - "peer": true, - "dependencies": { - "agentkeepalive": "^4.1.3", - "cacache": "^15.2.0", - "http-cache-semantics": "^4.1.0", - "http-proxy-agent": "^4.0.1", - "https-proxy-agent": "^5.0.0", - "is-lambda": "^1.0.1", - "lru-cache": "^6.0.0", - "minipass": "^3.1.3", - "minipass-collect": "^1.0.2", - "minipass-fetch": "^1.3.2", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.4", - "negotiator": "^0.6.2", - "promise-retry": "^2.0.1", - "socks-proxy-agent": "^6.0.0", - "ssri": "^8.0.0" - }, - "engines": { - "node": ">= 10" - } - }, - "node_modules/make-fetch-happen/node_modules/@tootallnate/once": { - "version": "1.1.2", - "license": "MIT", - "optional": true, - "peer": true, - "engines": { - "node": ">= 6" - } - }, - "node_modules/make-fetch-happen/node_modules/http-proxy-agent": { - "version": "4.0.1", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@tootallnate/once": "1", - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/make-iterator": { "version": "1.0.1", "dev": true, @@ -14466,7 +13585,7 @@ }, "node_modules/minimatch": { "version": "3.1.2", - "devOptional": true, + "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" @@ -14484,7 +13603,7 @@ }, "node_modules/minipass": { "version": "3.1.6", - "devOptional": true, + "dev": true, "license": "ISC", "dependencies": { "yallist": "^4.0.0" @@ -14493,74 +13612,9 @@ "node": ">=8" } }, - "node_modules/minipass-collect": { - "version": "1.0.2", - "license": "ISC", - "optional": true, - "peer": true, - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/minipass-fetch": { - "version": "1.4.1", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "minipass": "^3.1.0", - "minipass-sized": "^1.0.3", - "minizlib": "^2.0.0" - }, - "engines": { - "node": ">=8" - }, - "optionalDependencies": { - "encoding": "^0.1.12" - } - }, - "node_modules/minipass-flush": { - "version": "1.0.5", - "license": "ISC", - "optional": true, - "peer": true, - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/minipass-pipeline": { - "version": "1.2.4", - "license": "ISC", - "optional": true, - "peer": true, - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/minipass-sized": { - "version": "1.0.3", - "license": "ISC", - "optional": true, - "peer": true, - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/minizlib": { "version": "2.1.2", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "minipass": "^3.0.0", @@ -14603,10 +13657,6 @@ "mkdirp": "bin/cmd.js" } }, - "node_modules/mkdirp-classic": { - "version": "0.5.3", - "license": "MIT" - }, "node_modules/ms": { "version": "2.0.0", "license": "MIT" @@ -14619,15 +13669,6 @@ "node": ">= 0.10" } }, - "node_modules/mz": { - "version": "2.7.0", - "license": "MIT", - "dependencies": { - "any-promise": "^1.0.0", - "object-assign": "^4.0.1", - "thenify-all": "^1.0.0" - } - }, "node_modules/nan": { "version": "2.18.0", "resolved": "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz", @@ -14656,24 +13697,11 @@ "node": ">=0.10.0" } }, - "node_modules/napi-build-utils": { - "version": "1.0.2", - "license": "MIT" - }, "node_modules/natural-compare": { "version": "1.4.0", "dev": true, "license": "MIT" }, - "node_modules/negotiator": { - "version": "0.6.3", - "license": "MIT", - "optional": true, - "peer": true, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/neo-async": { "version": "2.6.2", "dev": true, @@ -14706,231 +13734,6 @@ "regexp-polyfill": "^1.0.1" } }, - "node_modules/node-abi": { - "version": "3.22.0", - "license": "MIT", - "dependencies": { - "semver": "^7.3.5" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/node-fetch": { - "version": "2.6.7", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "node_modules/node-fetch/node_modules/tr46": { - "version": "0.0.3", - "license": "MIT", - "optional": true, - "peer": true - }, - "node_modules/node-fetch/node_modules/webidl-conversions": { - "version": "3.0.1", - "license": "BSD-2-Clause", - "optional": true, - "peer": true - }, - "node_modules/node-fetch/node_modules/whatwg-url": { - "version": "5.0.0", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "node_modules/node-gyp": { - "version": "8.4.1", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "env-paths": "^2.2.0", - "glob": "^7.1.4", - "graceful-fs": "^4.2.6", - "make-fetch-happen": "^9.1.0", - "nopt": "^5.0.0", - "npmlog": "^6.0.0", - "rimraf": "^3.0.2", - "semver": "^7.3.5", - "tar": "^6.1.2", - "which": "^2.0.2" - }, - "bin": { - "node-gyp": "bin/node-gyp.js" - }, - "engines": { - "node": ">= 10.12.0" - } - }, - "node_modules/node-gyp/node_modules/ansi-regex": { - "version": "5.0.1", - "license": "MIT", - "optional": true, - "peer": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/node-gyp/node_modules/are-we-there-yet": { - "version": "3.0.0", - "license": "ISC", - "optional": true, - "peer": true, - "dependencies": { - "delegates": "^1.0.0", - "readable-stream": "^3.6.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16" - } - }, - "node_modules/node-gyp/node_modules/gauge": { - "version": "4.0.4", - "license": "ISC", - "optional": true, - "peer": true, - "dependencies": { - "aproba": "^1.0.3 || ^2.0.0", - "color-support": "^1.1.3", - "console-control-strings": "^1.1.0", - "has-unicode": "^2.0.1", - "signal-exit": "^3.0.7", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "wide-align": "^1.1.5" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/node-gyp/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "license": "MIT", - "optional": true, - "peer": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/node-gyp/node_modules/npmlog": { - "version": "6.0.2", - "license": "ISC", - "optional": true, - "peer": true, - "dependencies": { - "are-we-there-yet": "^3.0.0", - "console-control-strings": "^1.1.0", - "gauge": "^4.0.3", - "set-blocking": "^2.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/node-gyp/node_modules/readable-stream": { - "version": "3.6.0", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/node-gyp/node_modules/safe-buffer": { - "version": "5.2.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "optional": true, - "peer": true - }, - "node_modules/node-gyp/node_modules/string_decoder": { - "version": "1.3.0", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "node_modules/node-gyp/node_modules/string-width": { - "version": "4.2.3", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/node-gyp/node_modules/strip-ansi": { - "version": "6.0.1", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/node-gyp/node_modules/which": { - "version": "2.0.2", - "license": "ISC", - "optional": true, - "peer": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/node-int64": { "version": "0.4.0", "dev": true, @@ -14985,21 +13788,6 @@ "dev": true, "license": "MIT" }, - "node_modules/nopt": { - "version": "5.0.0", - "license": "ISC", - "optional": true, - "peer": true, - "dependencies": { - "abbrev": "1" - }, - "bin": { - "nopt": "bin/nopt.js" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/normalize-package-data": { "version": "2.5.0", "dev": true, @@ -15080,21 +13868,9 @@ "node": ">=8" } }, - "node_modules/npmlog": { - "version": "5.0.1", - "license": "ISC", - "optional": true, - "peer": true, - "dependencies": { - "are-we-there-yet": "^2.0.0", - "console-control-strings": "^1.1.0", - "gauge": "^3.0.0", - "set-blocking": "^2.0.0" - } - }, "node_modules/number-is-nan": { "version": "1.0.1", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -15398,28 +14174,13 @@ }, "node_modules/p-locate": { "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/p-map": { - "version": "4.0.0", + "dev": true, "license": "MIT", - "optional": true, - "peer": true, "dependencies": { - "aggregate-error": "^3.0.0" + "p-limit": "^2.2.0" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=8" } }, "node_modules/p-try": { @@ -15497,21 +14258,6 @@ "node": ">=0.10.0" } }, - "node_modules/parse5": { - "version": "5.1.1", - "license": "MIT" - }, - "node_modules/parse5-htmlparser2-tree-adapter": { - "version": "6.0.1", - "license": "MIT", - "dependencies": { - "parse5": "^6.0.1" - } - }, - "node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5": { - "version": "6.0.1", - "license": "MIT" - }, "node_modules/pascalcase": { "version": "0.1.1", "dev": true, @@ -15535,7 +14281,7 @@ }, "node_modules/path-is-absolute": { "version": "1.0.1", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -15572,34 +14318,6 @@ "node": ">=0.10.0" } }, - "node_modules/path-scurry": { - "version": "1.10.1", - "license": "BlueOak-1.0.0", - "dependencies": { - "lru-cache": "^9.1.1 || ^10.0.0", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/path-scurry/node_modules/lru-cache": { - "version": "10.1.0", - "license": "ISC", - "engines": { - "node": "14 || >=16.14" - } - }, - "node_modules/path-scurry/node_modules/minipass": { - "version": "7.0.4", - "license": "ISC", - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, "node_modules/path-to-regexp": { "version": "1.8.0", "license": "MIT", @@ -15753,30 +14471,6 @@ "node": ">=0.10.0" } }, - "node_modules/prebuild-install": { - "version": "7.1.1", - "license": "MIT", - "dependencies": { - "detect-libc": "^2.0.0", - "expand-template": "^2.0.3", - "github-from-package": "0.0.0", - "minimist": "^1.2.3", - "mkdirp-classic": "^0.5.3", - "napi-build-utils": "^1.0.1", - "node-abi": "^3.3.0", - "pump": "^3.0.0", - "rc": "^1.2.7", - "simple-get": "^4.0.0", - "tar-fs": "^2.0.0", - "tunnel-agent": "^0.6.0" - }, - "bin": { - "prebuild-install": "bin.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/prelude-ls": { "version": "1.2.1", "dev": true, @@ -15848,25 +14542,6 @@ "node": ">=0.4.0" } }, - "node_modules/promise-inflight": { - "version": "1.0.1", - "license": "ISC", - "optional": true, - "peer": true - }, - "node_modules/promise-retry": { - "version": "2.0.1", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "err-code": "^2.0.2", - "retry": "^0.12.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/prompts": { "version": "2.4.2", "dev": true, @@ -16014,19 +14689,6 @@ "safe-buffer": "^5.1.0" } }, - "node_modules/rc": { - "version": "1.2.8", - "license": "(BSD-2-Clause OR MIT OR Apache-2.0)", - "dependencies": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "bin": { - "rc": "cli.js" - } - }, "node_modules/react": { "version": "17.0.2", "license": "MIT", @@ -16658,6 +15320,7 @@ }, "node_modules/require-directory": { "version": "2.1.1", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -16766,15 +15429,6 @@ "node": ">=0.12" } }, - "node_modules/retry": { - "version": "0.12.0", - "license": "MIT", - "optional": true, - "peer": true, - "engines": { - "node": ">= 4" - } - }, "node_modules/reusify": { "version": "1.0.4", "dev": true, @@ -16786,7 +15440,7 @@ }, "node_modules/rimraf": { "version": "3.0.2", - "devOptional": true, + "dev": true, "license": "ISC", "dependencies": { "glob": "^7.1.3" @@ -16868,7 +15522,7 @@ }, "node_modules/safer-buffer": { "version": "2.1.2", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/sanitize-filename": { @@ -16996,7 +15650,7 @@ }, "node_modules/set-blocking": { "version": "2.0.0", - "devOptional": true, + "dev": true, "license": "ISC" }, "node_modules/set-value": { @@ -17024,17 +15678,6 @@ "node": ">=0.10.0" } }, - "node_modules/sha.js": { - "version": "2.4.11", - "license": "(MIT AND BSD-3-Clause)", - "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - }, - "bin": { - "sha.js": "bin.js" - } - }, "node_modules/shallow-clone": { "version": "3.0.1", "dev": true, @@ -17086,73 +15729,9 @@ }, "node_modules/signal-exit": { "version": "3.0.7", - "devOptional": true, + "dev": true, "license": "ISC" }, - "node_modules/simple-concat": { - "version": "1.0.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/simple-get": { - "version": "4.0.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "decompress-response": "^6.0.0", - "once": "^1.3.1", - "simple-concat": "^1.0.0" - } - }, - "node_modules/simple-get/node_modules/decompress-response": { - "version": "6.0.0", - "license": "MIT", - "dependencies": { - "mimic-response": "^3.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/simple-get/node_modules/mimic-response": { - "version": "3.1.0", - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/simple-update-notifier": { "version": "1.1.0", "dev": true, @@ -17185,16 +15764,6 @@ "node": ">=8" } }, - "node_modules/smart-buffer": { - "version": "4.2.0", - "license": "MIT", - "optional": true, - "peer": true, - "engines": { - "node": ">= 6.0.0", - "npm": ">= 3.0.0" - } - }, "node_modules/snapdragon": { "version": "0.8.2", "dev": true, @@ -17332,34 +15901,6 @@ "node": ">=0.10.0" } }, - "node_modules/socks": { - "version": "2.6.2", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "ip": "^1.1.5", - "smart-buffer": "^4.2.0" - }, - "engines": { - "node": ">= 10.13.0", - "npm": ">= 3.0.0" - } - }, - "node_modules/socks-proxy-agent": { - "version": "6.2.0", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "agent-base": "^6.0.2", - "debug": "^4.3.3", - "socks": "^2.6.2" - }, - "engines": { - "node": ">= 10" - } - }, "node_modules/sort-keys": { "version": "1.1.2", "dev": true, @@ -17493,35 +16034,6 @@ "version": "1.0.3", "license": "BSD-3-Clause" }, - "node_modules/sqlite3": { - "version": "5.1.6", - "hasInstallScript": true, - "license": "BSD-3-Clause", - "optional": true, - "peer": true, - "dependencies": { - "@mapbox/node-pre-gyp": "^1.0.0", - "node-addon-api": "^4.2.0", - "tar": "^6.1.11" - }, - "optionalDependencies": { - "node-gyp": "8.x" - }, - "peerDependencies": { - "node-gyp": "8.x" - }, - "peerDependenciesMeta": { - "node-gyp": { - "optional": true - } - } - }, - "node_modules/sqlite3/node_modules/node-addon-api": { - "version": "4.3.0", - "license": "MIT", - "optional": true, - "peer": true - }, "node_modules/sshpk": { "version": "1.16.1", "dev": true, @@ -17546,18 +16058,6 @@ "node": ">=0.10.0" } }, - "node_modules/ssri": { - "version": "8.0.1", - "license": "ISC", - "optional": true, - "peer": true, - "dependencies": { - "minipass": "^3.1.1" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/stack-trace": { "version": "0.0.10", "dev": true, @@ -17673,7 +16173,7 @@ }, "node_modules/string-width": { "version": "1.0.2", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "code-point-at": "^1.0.0", @@ -17684,43 +16184,6 @@ "node": ">=0.10.0" } }, - "node_modules/string-width-cjs": { - "name": "string-width", - "version": "4.2.3", - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width-cjs/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width-cjs/node_modules/strip-ansi": { - "version": "6.0.1", - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/string.prototype.matchall": { "version": "4.0.8", "dev": true, @@ -17767,31 +16230,13 @@ }, "node_modules/strip-ansi": { "version": "3.0.1", - "devOptional": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/strip-ansi-cjs": { - "name": "strip-ansi", - "version": "6.0.1", - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { - "version": "5.0.1", + "dev": true, "license": "MIT", + "dependencies": { + "ansi-regex": "^2.0.0" + }, "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, "node_modules/strip-bom": { @@ -17821,13 +16266,6 @@ "node": ">=6" } }, - "node_modules/strip-json-comments": { - "version": "2.0.1", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/strip-outer": { "version": "2.0.0", "dev": true, @@ -17944,7 +16382,7 @@ }, "node_modules/tar": { "version": "6.1.11", - "devOptional": true, + "dev": true, "license": "ISC", "dependencies": { "chownr": "^2.0.0", @@ -17958,74 +16396,9 @@ "node": ">= 10" } }, - "node_modules/tar-fs": { - "version": "2.1.1", - "license": "MIT", - "dependencies": { - "chownr": "^1.1.1", - "mkdirp-classic": "^0.5.2", - "pump": "^3.0.0", - "tar-stream": "^2.1.4" - } - }, - "node_modules/tar-fs/node_modules/chownr": { - "version": "1.1.4", - "license": "ISC" - }, - "node_modules/tar-stream": { - "version": "2.2.0", - "license": "MIT", - "dependencies": { - "bl": "^4.0.3", - "end-of-stream": "^1.4.1", - "fs-constants": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/tar-stream/node_modules/readable-stream": { - "version": "3.6.0", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/tar-stream/node_modules/safe-buffer": { - "version": "5.2.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/tar-stream/node_modules/string_decoder": { - "version": "1.3.0", - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, "node_modules/tar/node_modules/mkdirp": { "version": "1.0.4", - "devOptional": true, + "dev": true, "license": "MIT", "bin": { "mkdirp": "bin/cmd.js" @@ -18142,23 +16515,6 @@ "dev": true, "license": "MIT" }, - "node_modules/thenify": { - "version": "3.3.1", - "license": "MIT", - "dependencies": { - "any-promise": "^1.0.0" - } - }, - "node_modules/thenify-all": { - "version": "1.6.0", - "license": "MIT", - "dependencies": { - "thenify": ">= 3.1.0 < 4" - }, - "engines": { - "node": ">=0.8" - } - }, "node_modules/throat": { "version": "6.0.2", "dev": true, @@ -18630,7 +16986,7 @@ }, "node_modules/ts-node": { "version": "10.8.0", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "@cspotcode/source-map-support": "^0.8.0", @@ -18672,7 +17028,7 @@ }, "node_modules/ts-node/node_modules/diff": { "version": "4.0.2", - "devOptional": true, + "dev": true, "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" @@ -18768,371 +17124,131 @@ } }, "node_modules/tslint/node_modules/semver": { - "version": "5.7.2", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/tslint/node_modules/tsutils": { - "version": "2.29.0", - "dev": true, - "license": "MIT", - "dependencies": { - "tslib": "^1.8.1" - }, - "peerDependencies": { - "typescript": ">=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >= 3.0.0-dev || >= 3.1.0-dev" - } - }, - "node_modules/tswc": { - "version": "1.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@swc/cli": "^0.1.49", - "cac": "^6.7.3", - "tsconfig-to-swcconfig": "^2.0.1" - }, - "bin": { - "tswc": "dist/cli.js" - }, - "peerDependencies": { - "@swc/core": ">= 1.2.58" - } - }, - "node_modules/ttypescript": { - "version": "1.5.15", - "dev": true, - "license": "MIT", - "dependencies": { - "resolve": ">=1.9.0" - }, - "bin": { - "ttsc": "bin/tsc", - "ttsserver": "bin/tsserver" - }, - "peerDependencies": { - "ts-node": ">=8.0.2", - "typescript": ">=3.2.2" - } - }, - "node_modules/tunnel": { - "version": "0.0.6", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=0.6.11 <=0.7.0 || >=0.7.3" - } - }, - "node_modules/tunnel-agent": { - "version": "0.6.0", - "license": "Apache-2.0", - "dependencies": { - "safe-buffer": "^5.0.1" - }, - "engines": { - "node": "*" - } - }, - "node_modules/tweetnacl": { - "version": "0.14.5", - "dev": true, - "license": "Unlicense" - }, - "node_modules/type": { - "version": "1.2.0", - "dev": true, - "license": "ISC" - }, - "node_modules/type-check": { - "version": "0.4.0", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/type-detect": { - "version": "4.0.8", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/type-fest": { - "version": "0.13.1", - "license": "(MIT OR CC0-1.0)", - "optional": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/typed-array-length": { - "version": "1.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "is-typed-array": "^1.1.9" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/typedarray": { - "version": "0.0.6", - "license": "MIT" - }, - "node_modules/typeorm": { - "version": "0.3.19", - "license": "MIT", - "dependencies": { - "@sqltools/formatter": "^1.2.5", - "app-root-path": "^3.1.0", - "buffer": "^6.0.3", - "chalk": "^4.1.2", - "cli-highlight": "^2.1.11", - "dayjs": "^1.11.9", - "debug": "^4.3.4", - "dotenv": "^16.0.3", - "glob": "^10.3.10", - "mkdirp": "^2.1.3", - "reflect-metadata": "^0.1.13", - "sha.js": "^2.4.11", - "tslib": "^2.5.0", - "uuid": "^9.0.0", - "yargs": "^17.6.2" - }, - "bin": { - "typeorm": "cli.js", - "typeorm-ts-node-commonjs": "cli-ts-node-commonjs.js", - "typeorm-ts-node-esm": "cli-ts-node-esm.js" - }, - "engines": { - "node": ">= 12.9.0" - }, - "funding": { - "url": "https://opencollective.com/typeorm" - }, - "peerDependencies": { - "@google-cloud/spanner": "^5.18.0", - "@sap/hana-client": "^2.12.25", - "better-sqlite3": "^7.1.2 || ^8.0.0 || ^9.0.0", - "hdb-pool": "^0.1.6", - "ioredis": "^5.0.4", - "mongodb": "^5.8.0", - "mssql": "^9.1.1 || ^10.0.1", - "mysql2": "^2.2.5 || ^3.0.1", - "oracledb": "^6.3.0", - "pg": "^8.5.1", - "pg-native": "^3.0.0", - "pg-query-stream": "^4.0.0", - "redis": "^3.1.1 || ^4.0.0", - "sql.js": "^1.4.0", - "sqlite3": "^5.0.3", - "ts-node": "^10.7.0", - "typeorm-aurora-data-api-driver": "^2.0.0" - }, - "peerDependenciesMeta": { - "@google-cloud/spanner": { - "optional": true - }, - "@sap/hana-client": { - "optional": true - }, - "better-sqlite3": { - "optional": true - }, - "hdb-pool": { - "optional": true - }, - "ioredis": { - "optional": true - }, - "mongodb": { - "optional": true - }, - "mssql": { - "optional": true - }, - "mysql2": { - "optional": true - }, - "oracledb": { - "optional": true - }, - "pg": { - "optional": true - }, - "pg-native": { - "optional": true - }, - "pg-query-stream": { - "optional": true - }, - "redis": { - "optional": true - }, - "sql.js": { - "optional": true - }, - "sqlite3": { - "optional": true - }, - "ts-node": { - "optional": true - }, - "typeorm-aurora-data-api-driver": { - "optional": true - } + "version": "5.7.2", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver" } }, - "node_modules/typeorm/node_modules/ansi-styles": { - "version": "4.3.0", + "node_modules/tslint/node_modules/tsutils": { + "version": "2.29.0", + "dev": true, "license": "MIT", "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" + "tslib": "^1.8.1" }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "peerDependencies": { + "typescript": ">=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >= 3.0.0-dev || >= 3.1.0-dev" } }, - "node_modules/typeorm/node_modules/brace-expansion": { - "version": "2.0.1", + "node_modules/tswc": { + "version": "1.1.1", + "dev": true, "license": "MIT", "dependencies": { - "balanced-match": "^1.0.0" + "@swc/cli": "^0.1.49", + "cac": "^6.7.3", + "tsconfig-to-swcconfig": "^2.0.1" + }, + "bin": { + "tswc": "dist/cli.js" + }, + "peerDependencies": { + "@swc/core": ">= 1.2.58" } }, - "node_modules/typeorm/node_modules/chalk": { - "version": "4.1.2", + "node_modules/ttypescript": { + "version": "1.5.15", + "dev": true, "license": "MIT", "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "resolve": ">=1.9.0" }, - "engines": { - "node": ">=10" + "bin": { + "ttsc": "bin/tsc", + "ttsserver": "bin/tsserver" }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "peerDependencies": { + "ts-node": ">=8.0.2", + "typescript": ">=3.2.2" } }, - "node_modules/typeorm/node_modules/color-convert": { - "version": "2.0.1", + "node_modules/tunnel": { + "version": "0.0.6", "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, + "optional": true, "engines": { - "node": ">=7.0.0" + "node": ">=0.6.11 <=0.7.0 || >=0.7.3" } }, - "node_modules/typeorm/node_modules/color-name": { - "version": "1.1.4", - "license": "MIT" - }, - "node_modules/typeorm/node_modules/glob": { - "version": "10.3.10", - "license": "ISC", + "node_modules/tunnel-agent": { + "version": "0.6.0", + "dev": true, + "license": "Apache-2.0", "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^2.3.5", - "minimatch": "^9.0.1", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", - "path-scurry": "^1.10.1" - }, - "bin": { - "glob": "dist/esm/bin.mjs" + "safe-buffer": "^5.0.1" }, "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "node": "*" } }, - "node_modules/typeorm/node_modules/has-flag": { - "version": "4.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } + "node_modules/tweetnacl": { + "version": "0.14.5", + "dev": true, + "license": "Unlicense" }, - "node_modules/typeorm/node_modules/minimatch": { - "version": "9.0.3", - "license": "ISC", + "node_modules/type": { + "version": "1.2.0", + "dev": true, + "license": "ISC" + }, + "node_modules/type-check": { + "version": "0.4.0", + "dev": true, + "license": "MIT", "dependencies": { - "brace-expansion": "^2.0.1" + "prelude-ls": "^1.2.1" }, "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "node": ">= 0.8.0" } }, - "node_modules/typeorm/node_modules/minipass": { - "version": "7.0.4", - "license": "ISC", + "node_modules/type-detect": { + "version": "4.0.8", + "dev": true, + "license": "MIT", "engines": { - "node": ">=16 || 14 >=14.17" + "node": ">=4" } }, - "node_modules/typeorm/node_modules/mkdirp": { - "version": "2.1.6", - "license": "MIT", - "bin": { - "mkdirp": "dist/cjs/src/bin.js" - }, + "node_modules/type-fest": { + "version": "0.13.1", + "license": "(MIT OR CC0-1.0)", + "optional": true, "engines": { "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/isaacs" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/typeorm/node_modules/reflect-metadata": { - "version": "0.1.13", - "license": "Apache-2.0" - }, - "node_modules/typeorm/node_modules/supports-color": { - "version": "7.2.0", + "node_modules/typed-array-length": { + "version": "1.0.4", + "dev": true, "license": "MIT", "dependencies": { - "has-flag": "^4.0.0" + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "is-typed-array": "^1.1.9" }, - "engines": { - "node": ">=8" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/typeorm/node_modules/tslib": { - "version": "2.6.2", - "license": "0BSD" - }, - "node_modules/typeorm/node_modules/uuid": { - "version": "9.0.1", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } + "node_modules/typedarray": { + "version": "0.0.6", + "license": "MIT" }, "node_modules/typesafe-actions": { "version": "4.4.2", @@ -19143,7 +17259,7 @@ }, "node_modules/typescript": { "version": "4.6.2", - "devOptional": true, + "dev": true, "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", @@ -19260,24 +17376,6 @@ "node": ">=0.10.0" } }, - "node_modules/unique-filename": { - "version": "1.1.1", - "license": "ISC", - "optional": true, - "peer": true, - "dependencies": { - "unique-slug": "^2.0.0" - } - }, - "node_modules/unique-slug": { - "version": "2.0.2", - "license": "ISC", - "optional": true, - "peer": true, - "dependencies": { - "imurmurhash": "^0.1.4" - } - }, "node_modules/unique-stream": { "version": "2.3.1", "dev": true, @@ -19516,7 +17614,7 @@ }, "node_modules/v8-compile-cache-lib": { "version": "3.0.1", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/v8-to-istanbul": { @@ -19996,15 +18094,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/wide-align": { - "version": "1.1.5", - "license": "ISC", - "optional": true, - "peer": true, - "dependencies": { - "string-width": "^1.0.2 || 2 || 3 || 4" - } - }, "node_modules/wildcard": { "version": "2.0.0", "dev": true, @@ -20020,6 +18109,7 @@ }, "node_modules/wrap-ansi": { "version": "7.0.0", + "dev": true, "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", @@ -20033,87 +18123,9 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/wrap-ansi-cjs": { - "name": "wrap-ansi", - "version": "7.0.0", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { - "version": "4.3.0", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/color-convert": { - "version": "2.0.1", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/color-name": { - "version": "1.1.4", - "license": "MIT" - }, - "node_modules/wrap-ansi-cjs/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/string-width": { - "version": "4.2.3", - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { - "version": "6.0.1", - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/wrap-ansi/node_modules/ansi-regex": { "version": "5.0.1", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -20121,6 +18133,7 @@ }, "node_modules/wrap-ansi/node_modules/ansi-styles": { "version": "4.3.0", + "dev": true, "license": "MIT", "dependencies": { "color-convert": "^2.0.1" @@ -20134,6 +18147,7 @@ }, "node_modules/wrap-ansi/node_modules/color-convert": { "version": "2.0.1", + "dev": true, "license": "MIT", "dependencies": { "color-name": "~1.1.4" @@ -20144,10 +18158,12 @@ }, "node_modules/wrap-ansi/node_modules/color-name": { "version": "1.1.4", + "dev": true, "license": "MIT" }, "node_modules/wrap-ansi/node_modules/is-fullwidth-code-point": { "version": "3.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -20155,6 +18171,7 @@ }, "node_modules/wrap-ansi/node_modules/string-width": { "version": "4.2.3", + "dev": true, "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", @@ -20167,6 +18184,7 @@ }, "node_modules/wrap-ansi/node_modules/strip-ansi": { "version": "6.0.1", + "dev": true, "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" @@ -20220,6 +18238,7 @@ }, "node_modules/y18n": { "version": "5.0.8", + "dev": true, "license": "ISC", "engines": { "node": ">=10" @@ -20238,6 +18257,7 @@ }, "node_modules/yargs": { "version": "17.7.2", + "dev": true, "license": "MIT", "dependencies": { "cliui": "^8.0.1", @@ -20254,6 +18274,7 @@ }, "node_modules/yargs-parser": { "version": "20.2.9", + "dev": true, "license": "ISC", "engines": { "node": ">=10" @@ -20261,6 +18282,7 @@ }, "node_modules/yargs/node_modules/ansi-regex": { "version": "5.0.1", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -20268,6 +18290,7 @@ }, "node_modules/yargs/node_modules/cliui": { "version": "8.0.1", + "dev": true, "license": "ISC", "dependencies": { "string-width": "^4.2.0", @@ -20280,6 +18303,7 @@ }, "node_modules/yargs/node_modules/is-fullwidth-code-point": { "version": "3.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -20287,6 +18311,7 @@ }, "node_modules/yargs/node_modules/string-width": { "version": "4.2.3", + "dev": true, "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", @@ -20299,6 +18324,7 @@ }, "node_modules/yargs/node_modules/strip-ansi": { "version": "6.0.1", + "dev": true, "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" @@ -20309,6 +18335,7 @@ }, "node_modules/yargs/node_modules/yargs-parser": { "version": "21.1.1", + "dev": true, "license": "ISC", "engines": { "node": ">=12" @@ -20324,7 +18351,7 @@ }, "node_modules/yn": { "version": "3.1.1", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=6" diff --git a/package.json b/package.json index 7dacaead0..36ac5136d 100644 --- a/package.json +++ b/package.json @@ -1,135 +1,132 @@ -{ - "name": "flashpoint-launcher", - "version": "12.2.1", - "description": "A desktop application used to browse, manage and play games from Flashpoint Archive", - "main": "build/main/index.js", - "config": { - "forceUpdate": 1, - "installed": false - }, - "scripts": { - "start": "electron ./build/main/index.js", - "start-logger": "electron ./build/main/index.js logger=true", - "build": "gulp build", - "watch": "gulp watch", - "pack": "gulp pack", - "snapshot": "cross-env-shell PACK_PLATFORM=win32 PACK_ARCH=ia32 NODE_ENV=production \"npm run build && npm run pack\"", - "test": "jest", - "lint": "eslint ./src/**/*.{ts,tsx} ./gulpfile.js", - "nexusPack": "gulp nexusPack", - "pack:linux": "cross-env PACK_PLATFORM=linux PACK_ARCH=x64 gulp pack", - "pack:win32": "cross-env PACK_PLATFORM=win32 PACK_ARCH=ia32 gulp pack", - "pack:darwin": "cross-env PACK_PLATFORM=darwin PACK_ARCH=x64 gulp pack", - "pack:all": "cross-env PACK_PLATFORM=all PACK_ARCH=all gulp pack", - "release": "cross-env-shell NODE_ENV=production PUBLISH=true \"npm run build && npm run pack\"", - "release:linux": "cross-env-shell NODE_ENV=production PUBLISH=true \"npm run build && npm run pack:linux\"", - "release:win32": "cross-env-shell NODE_ENV=production PUBLISH=true \"npm run build && npm run pack:win32\"", - "release:darwin": "cross-env-shell NODE_ENV=production PUBLISH=true \"npm run build && npm run pack:darwin\"", - "release:all": "cross-env-shell NODE_ENV=production PUBLISH=true \"npm run build && npm run pack:all\"", - "postinstall": "electron-builder install-app-deps & gulp extInstall", - "clean": "gulp clean" - }, - "author": { - "name": "Jesper Gustafsson", - "email": "jespergustafssons@gmail.com" - }, - "license": "MIT", - "dependencies": { - "@electron/remote": "2.0.8", - "@fortawesome/fontawesome-svg-core": "1.2.36", - "@fortawesome/free-solid-svg-icons": "5.15.4", - "@fortawesome/react-fontawesome": "0.1.18", - "@types/react-virtualized": "^9.21.21", - "axios": "1.3.4", - "better-sqlite3": "9.2.2", - "connected-react-router": "6.9.2", - "electron-updater": "4.3.1", - "electron-util": "0.14.2", - "fast-xml-parser": "3.16.0", - "follow-redirects": "1.14.8", - "fs-extra": "8.1.0", - "lodash": "^4.17.21", - "mime": "2.4.4", - "minimist": "^1.2.7", - "node-7z": "1.1.1", - "ps-tree": "1.2.0", - "react": "17.0.2", - "react-color": "2.18.0", - "react-datepicker": "4.8.0", - "react-dom": "17.0.2", - "react-keybind": "0.9.4", - "react-markdown": "7.0.1", - "react-redux": "7.2.8", - "react-router-dom": "5.1.2", - "react-virtualized-reactv17": "9.23.0", - "redux": "4.0.5", - "redux-devtools-extension": "2.13.8", - "reflect-metadata": "0.1.10", - "remark-gfm": "2.0.0", - "tail": "2.0.3", - "terminate": "^2.6.1", - "typeorm": "0.3.19", - "typesafe-actions": "4.4.2", - "uuid": "3.3.2", - "uuid-validate": "0.0.3", - "which": "1.3.1", - "ws": "7.4.6", - "yaml": "2.1.0", - "zod": "^3.22.2" - }, - "devDependencies": { - "@kayahr/jest-electron-runner": "^29.3.1", - "@swc/cli": "0.1.61", - "@swc/core": "1.3.35", - "@types/better-sqlite3": "7.5.0", - "@types/follow-redirects": "1.8.0", - "@types/fs-extra": "8.1.0", - "@types/jest": "27.5.1", - "@types/lodash": "^4.14.192", - "@types/mime": "2.0.1", - "@types/minimist": "^1.2.2", - "@types/node": "14.14.31", - "@types/ps-tree": "1.1.2", - "@types/react": "17.0.2", - "@types/react-color": "3.0.1", - "@types/react-datepicker": "4.8.0", - "@types/react-dom": "17.0.2", - "@types/react-redux": "7.1.7", - "@types/react-router-dom": "5.1.7", - "@types/tail": "2.0.0", - "@types/uuid": "3.4.5", - "@types/uuid-validate": "0.0.1", - "@types/which": "1.3.2", - "@types/ws": "6.0.3", - "@typescript-eslint/eslint-plugin": "6.18.0", - "@typescript-eslint/parser": "6.18.0", - "cargo-cp-artifact": "^0.1", - "chokidar": "^3.5.3", - "coveralls": "3.1.0", - "cross-env": "7.0.2", - "electron": "19.1.9", - "electron-builder": "23.6.0", - "eslint": "8.33.0", - "eslint-plugin-jsdoc": "^48.0.2", - "eslint-plugin-only-warn": "1.1.0", - "eslint-plugin-react": "7.32.2", - "gulp": "4.0.2", - "jest": "29.4.2", - "lefthook": "^1.5.5", - "swc-loader": "0.2.3", - "ts-jest": "29.0.5", - "ts-loader": "9.4.1", - "ts-node": "10.8.0", - "ts-transform-paths": "^2.0.3", - "tsconfig-paths-webpack-plugin": "3.2.0", - "tslint": "5.18.0", - "tswc": "^1.1.1", - "ttypescript": "^1.5.15", - "typescript": "4.6.2", - "webpack": "5.74.0", - "webpack-cli": "4.10.0" - }, - "optionalDependencies": { - "fsevents": "2.1.3" - } -} +{ + "name": "flashpoint-launcher", + "version": "12.2.1", + "description": "A desktop application used to browse, manage and play games from Flashpoint Archive", + "main": "build/main/index.js", + "config": { + "forceUpdate": 1, + "installed": false + }, + "scripts": { + "start": "electron ./build/main/index.js --remote-debugging-port=9224", + "start-logger": "electron ./build/main/index.js logger=true", + "build": "gulp build", + "watch": "gulp watch", + "pack": "gulp pack", + "snapshot": "cross-env-shell PACK_PLATFORM=win32 PACK_ARCH=ia32 NODE_ENV=production \"npm run build && npm run pack\"", + "test": "jest", + "lint": "eslint ./src/**/*.{ts,tsx} ./gulpfile.js", + "nexusPack": "gulp nexusPack", + "pack:linux": "cross-env PACK_PLATFORM=linux PACK_ARCH=x64 gulp pack", + "pack:win32": "cross-env PACK_PLATFORM=win32 PACK_ARCH=ia32 gulp pack", + "pack:darwin": "cross-env PACK_PLATFORM=darwin PACK_ARCH=x64 gulp pack", + "pack:all": "cross-env PACK_PLATFORM=all PACK_ARCH=all gulp pack", + "release": "cross-env-shell NODE_ENV=production PUBLISH=true \"npm run build && npm run pack\"", + "release:linux": "cross-env-shell NODE_ENV=production PUBLISH=true \"npm run build && npm run pack:linux\"", + "release:win32": "cross-env-shell NODE_ENV=production PUBLISH=true \"npm run build && npm run pack:win32\"", + "release:darwin": "cross-env-shell NODE_ENV=production PUBLISH=true \"npm run build && npm run pack:darwin\"", + "release:all": "cross-env-shell NODE_ENV=production PUBLISH=true \"npm run build && npm run pack:all\"", + "postinstall": "electron-builder install-app-deps & gulp extInstall", + "clean": "gulp clean" + }, + "author": { + "name": "Jesper Gustafsson", + "email": "jespergustafssons@gmail.com" + }, + "license": "MIT", + "dependencies": { + "@electron/remote": "2.0.8", + "@fortawesome/fontawesome-svg-core": "1.2.36", + "@fortawesome/free-solid-svg-icons": "5.15.4", + "@fortawesome/react-fontawesome": "0.1.18", + "@types/react-virtualized": "^9.21.21", + "axios": "1.3.4", + "connected-react-router": "6.9.2", + "electron-updater": "4.3.1", + "electron-util": "0.14.2", + "fast-xml-parser": "3.16.0", + "follow-redirects": "1.14.8", + "fs-extra": "8.1.0", + "lodash": "^4.17.21", + "mime": "2.4.4", + "minimist": "^1.2.7", + "node-7z": "1.1.1", + "ps-tree": "1.2.0", + "react": "17.0.2", + "react-color": "2.18.0", + "react-datepicker": "4.8.0", + "react-dom": "17.0.2", + "react-keybind": "0.9.4", + "react-markdown": "7.0.1", + "react-redux": "7.2.8", + "react-router-dom": "5.1.2", + "react-virtualized-reactv17": "9.23.0", + "redux": "4.0.5", + "redux-devtools-extension": "2.13.8", + "reflect-metadata": "0.1.10", + "remark-gfm": "2.0.0", + "tail": "2.0.3", + "terminate": "^2.6.1", + "typesafe-actions": "4.4.2", + "uuid": "3.3.2", + "uuid-validate": "0.0.3", + "which": "1.3.1", + "ws": "7.4.6", + "yaml": "2.1.0", + "zod": "^3.22.2" + }, + "devDependencies": { + "@kayahr/jest-electron-runner": "^29.3.1", + "@swc/cli": "0.1.61", + "@swc/core": "1.3.35", + "@types/follow-redirects": "1.8.0", + "@types/fs-extra": "8.1.0", + "@types/jest": "27.5.1", + "@types/lodash": "^4.14.192", + "@types/mime": "2.0.1", + "@types/minimist": "^1.2.2", + "@types/node": "14.14.31", + "@types/ps-tree": "1.1.2", + "@types/react": "17.0.2", + "@types/react-color": "3.0.1", + "@types/react-datepicker": "4.8.0", + "@types/react-dom": "17.0.2", + "@types/react-redux": "7.1.7", + "@types/react-router-dom": "5.1.7", + "@types/tail": "2.0.0", + "@types/uuid": "3.4.5", + "@types/uuid-validate": "0.0.1", + "@types/which": "1.3.2", + "@types/ws": "6.0.3", + "@typescript-eslint/eslint-plugin": "6.18.0", + "@typescript-eslint/parser": "6.18.0", + "cargo-cp-artifact": "^0.1", + "chokidar": "^3.5.3", + "coveralls": "3.1.0", + "cross-env": "7.0.2", + "electron": "19.1.9", + "electron-builder": "23.6.0", + "eslint": "8.33.0", + "eslint-plugin-jsdoc": "^48.0.2", + "eslint-plugin-only-warn": "1.1.0", + "eslint-plugin-react": "7.32.2", + "gulp": "4.0.2", + "jest": "29.4.2", + "lefthook": "^1.5.5", + "swc-loader": "0.2.3", + "ts-jest": "29.0.5", + "ts-loader": "9.4.1", + "ts-node": "10.8.0", + "ts-transform-paths": "^2.0.3", + "tsconfig-paths-webpack-plugin": "3.2.0", + "tslint": "5.18.0", + "tswc": "^1.1.1", + "ttypescript": "^1.5.15", + "typescript": "4.6.2", + "webpack": "5.74.0", + "webpack-cli": "4.10.0" + }, + "optionalDependencies": { + "fsevents": "2.1.3" + } +} diff --git a/src/back/SocketServer.ts b/src/back/SocketServer.ts index 8e95edd51..c423392c5 100644 --- a/src/back/SocketServer.ts +++ b/src/back/SocketServer.ts @@ -269,6 +269,8 @@ export class SocketServer { return; } + console.log(parsed_data); + const [msg, msg_error] = validate_socket_message(parsed_data); if (!msg || msg_error) { diff --git a/src/back/download.ts b/src/back/download.ts index 285d1470b..5ed5e8ead 100644 --- a/src/back/download.ts +++ b/src/back/download.ts @@ -15,8 +15,8 @@ export async function downloadGameData(gameDataId: number, dataPacksFolderPath: // GameData real, find an available source for (const source of sources) { try { - const fullUrl = new URL(`${gameData.gameId}-${gameData.dateAdded.getTime()}.zip`, source.arguments[0]).href; - const tempPath = path.join(dataPacksFolderPath, `${gameData.gameId}-${gameData.dateAdded.getTime()}.zip.temp`); + const fullUrl = new URL(`${gameData.gameId}-${new Date(gameData.dateAdded).getTime()}.zip`, source.arguments[0]).href; + const tempPath = path.join(dataPacksFolderPath, `${gameData.gameId}-${new Date(gameData.dateAdded).getTime()}.zip.temp`); await downloadFile(fullUrl, tempPath, abortSignal, onProgress, onDetails); // Check hash of download const hash = crypto.createHash('sha256'); @@ -69,7 +69,7 @@ export async function importGameDataSkipHash(gameId: string, filePath: string, d } // Copy file const dateAdded = new Date(); - const newFilename = existingGameData ? `${gameId}-${existingGameData.dateAdded.getTime()}.zip` : `${gameId}-${dateAdded.getTime()}.zip`; + const newFilename = existingGameData ? `${gameId}-${new Date(existingGameData.dateAdded).getTime()}.zip` : `${gameId}-${dateAdded.getTime()}.zip`; const newPath = path.join(dataPacksFolderPath, newFilename); await fs.promises.copyFile(filePath, newPath); if (existingGameData) { @@ -81,7 +81,7 @@ export async function importGameDataSkipHash(gameId: string, filePath: string, d title: 'Data Pack', gameId: gameId, size: stats.size, - dateAdded, + dateAdded: dateAdded.toISOString(), presentOnDisk: true, path: newFilename, sha256, diff --git a/src/back/extensions/NodeInterceptor.ts b/src/back/extensions/NodeInterceptor.ts index 69e42f42a..b5fdbc094 100644 --- a/src/back/extensions/NodeInterceptor.ts +++ b/src/back/extensions/NodeInterceptor.ts @@ -7,7 +7,6 @@ import { IExtension, IExtensionManifest } from '@shared/extensions/interfaces'; import { ILogEntry } from '@shared/Log/interface'; import * as flashpoint from 'flashpoint-launcher'; import { createApiFactory } from './ApiImplementation'; -import * as Database from 'better-sqlite3'; // eslint-disable-next-line @typescript-eslint/no-var-requires type LoadFunction = { @@ -133,11 +132,3 @@ export class FPLNodeModuleFactory implements INodeModuleFactory { return this._defaultApiImpl; } } - -export class SqliteInterceptorFactory implements INodeModuleFactory { - public readonly nodeModuleName = 'better-sqlite3'; - - public load(_request: string): any { - return Database; - } -} diff --git a/src/back/index.ts b/src/back/index.ts index 28f371237..a6e84b20e 100644 --- a/src/back/index.ts +++ b/src/back/index.ts @@ -55,7 +55,6 @@ import { ExtensionService } from './extensions/ExtensionService'; import { FPLNodeModuleFactory, INodeModuleFactory, - SqliteInterceptorFactory, installNodeInterceptor, registerInterceptor } from './extensions/NodeInterceptor'; @@ -701,11 +700,11 @@ async function initialize() { // Populate unique values state.suggestions = { tags: [], - playMode: [], - platforms: [], - status: [], - applicationPath: [], - library: [], + playMode: await fpDatabase.findAllGamePlayModes(), + platforms: (await fpDatabase.findAllPlatforms()).map(p => p.name), + status: await fpDatabase.findAllGameStatuses(), + applicationPath: await fpDatabase.findAllGameApplicationPaths(), + library: await fpDatabase.findAllGameLibraries(), }; // Check for Flashpoint Manager Updates @@ -814,7 +813,6 @@ async function initialize() { state, ), state.moduleInterceptor); - registerInterceptor(new SqliteInterceptorFactory(), state.moduleInterceptor); installNodeInterceptor(state.moduleInterceptor) .then(async () => { // Load each extension diff --git a/src/back/responses.ts b/src/back/responses.ts index 971971342..ac7479a4b 100644 --- a/src/back/responses.ts +++ b/src/back/responses.ts @@ -20,7 +20,7 @@ import { throttle } from '@shared/utils/throttle'; import * as axiosImport from 'axios'; import * as child_process from 'child_process'; import { execSync } from 'child_process'; -import { GameSearch, GameSearchDirection, GameSearchOffset, GameSearchSortable, PartialTagCategory, parseUserSearchInput } from '@fparchive/flashpoint-archive'; +import { GameSearch, GameSearchDirection, GameSearchOffset, GameSearchSortable, PartialTagCategory, newSubfilter, parseUserSearchInput } from '@fparchive/flashpoint-archive'; import { ConfigSchema, CurationState, Game, GameConfig, GameData, GameLaunchInfo, GameMetadataSource, GameMiddlewareInfo, RequestGameRange, ResponseGameRange, Tag, TagCategory } from 'flashpoint-launcher'; import * as fs from 'fs-extra'; import * as fs_extra from 'fs-extra'; @@ -49,7 +49,7 @@ import { fpDatabase, loadCurationArchive, onDidUninstallGameData, onWillUninstal import { importGames, importPlatforms, importTagCategories, importTags } from './metadataImport'; import { addPlaylistGame, deletePlaylist, deletePlaylistGame, duplicatePlaylist, filterPlaylists, getPlaylistGame, importPlaylist, savePlaylistGame, updatePlaylist } from './playlist'; import { copyFolder, genContentTree } from './rust'; -import { getMetaUpdateInfo } from './sync'; +import { getMetaUpdateInfo, syncPlatforms, syncTags } from './sync'; import { BackState, MetadataRaw, TagsFile } from './types'; import { pathToBluezip } from './util/Bluezip'; import { pathTo7zBack } from './util/SevenZip'; @@ -181,8 +181,7 @@ export function registerRequestCallbacks(state: BackState, init: () => Promise Promise { - // const openDialog = state.socketServer.showMessageBoxBack(state, event.client); - // const dialogId = await openDialog({ - // largeMessage: true, - // message: `Updating tags from ${source.name}...`, - // buttons: [] - // }); - // const newDate = new Date(); - // const categories = await fpDatabase.findAllTagCategories(); - // return AppDataSource.transaction(async (tx) => { - // const lastDatePlats = await syncPlatforms(tx, source); - // const lastDateTags = await syncTags(tx, source, categories); - // if (lastDatePlats > lastDateTags) { - // return lastDatePlats; - // } else { - // return lastDateTags; - // } - // }) - // .then((lastDate) => { - // /** Success */ - // const sourceIdx = state.preferences.gameMetadataSources.findIndex(s => s.name === source.name); - // if (sourceIdx !== -1) { - // state.preferences.gameMetadataSources[sourceIdx].tags.latestUpdateTime = lastDate.toISOString(); - // state.preferences.gameMetadataSources[sourceIdx].tags.actualUpdateTime = newDate.toISOString(); - // state.prefsQueue.push(() => { - // PreferencesFile.saveFile(path.join(state.config.flashpointPath, PREFERENCES_FILENAME), state.preferences, state); - // }); - // } - // }) - // .finally(() => { - // state.socketServer.broadcast(BackOut.CANCEL_DIALOG, dialogId); - // }); - // }); + state.socketServer.register(BackIn.SYNC_TAGGED, async (event, source) => { + const openDialog = state.socketServer.showMessageBoxBack(state, event.client); + const dialogId = await openDialog({ + largeMessage: true, + message: `Updating tags from ${source.name}...`, + buttons: [] + }); + try { + const newDate = new Date(); + let lastDate = new Date(); + const categories = await fpDatabase.findAllTagCategories(); + const lastDatePlats = await syncPlatforms(source); + const lastDateTags = await syncTags(source, categories); + if (lastDatePlats > lastDateTags) { + lastDate = lastDatePlats; + } else { + lastDate = lastDateTags; + } + /** Success */ + const sourceIdx = state.preferences.gameMetadataSources.findIndex(s => s.name === source.name); + if (sourceIdx !== -1) { + state.preferences.gameMetadataSources[sourceIdx].tags.latestUpdateTime = lastDate.toISOString(); + state.preferences.gameMetadataSources[sourceIdx].tags.actualUpdateTime = newDate.toISOString(); + state.prefsQueue.push(() => { + PreferencesFile.saveFile(path.join(state.config.flashpointPath, PREFERENCES_FILENAME), state.preferences, state); + }); + } + } finally { + state.socketServer.broadcast(BackOut.CANCEL_DIALOG, dialogId); + } + }); // state.socketServer.register(BackIn.SYNC_ALL, async (event, source) => { // if (!state.isDev) { @@ -443,14 +440,14 @@ export function registerRequestCallbacks(state: BackState, init: () => Promise { const suggestions: GamePropSuggestions = { tags: [], - playMode: [], - platforms: [], - status: [], - applicationPath: [], - library: [], + playMode: await fpDatabase.findAllGamePlayModes(), + platforms: (await fpDatabase.findAllPlatforms()).map(p => p.name), + status: await fpDatabase.findAllGameStatuses(), + applicationPath: await fpDatabase.findAllGameApplicationPaths(), + library: await fpDatabase.findAllGameLibraries(), }; // const appPaths: PlatformAppPathSuggestions = await GameManager.findPlatformsAppPaths(); - // state.platformAppPaths = appPaths; // Update cache + state.platformAppPaths = await fpDatabase.findPlatformAppPaths(); // Update cache return { suggestions: suggestions, platformAppPaths: {}, @@ -2462,7 +2459,11 @@ function adjustGameFilter(state: BackState, query: ViewQuery, search: GameSearch if (query.playlistId) { const playlist = state.playlists.find(p => p.id === query.playlistId); if (playlist) { - // Do playlist searching here, or in library? + // Cheap, but may be limited by playlist size? + const playlistFilter = newSubfilter(); + playlistFilter.exactWhitelist.id = playlist.games.map(g => g.gameId); + playlistFilter.matchAny = true; + search.filter.subfilters.push(playlistFilter); } } return search; diff --git a/src/back/sync.ts b/src/back/sync.ts index 1f9e69904..6af1eac24 100644 --- a/src/back/sync.ts +++ b/src/back/sync.ts @@ -1,205 +1,193 @@ +import { chunkArray } from '@shared/utils/misc'; import axios from 'axios'; import { GameMetadataSource, TagCategory } from 'flashpoint-launcher'; -import { EntityManager } from 'typeorm'; - -export async function syncTags(tx: EntityManager, source: GameMetadataSource, categories: TagCategory[]): Promise { - // const tagsUrl = `${source.baseUrl}/api/tags?after=${source.tags.latestUpdateTime}`; - // const tagAliasRepo = tx.getRepository(TagAlias); - // const tagRepo = tx.getRepository(Tag); - // const tagCategoryRepo = tx.getRepository(TagCategory); - // const nextLatestDate = new Date(source.tags.latestUpdateTime); - - // const res = await axios.get(tagsUrl) - // .catch((err) => { - // throw 'Failed to search tags'; - // }); - - // const tagsRaw = res.data.tags as RemoteTagRaw[]; - // const lastDate = tagsRaw.reduce((prev, cur) => { - // const nextDate = new Date(cur.date_modified); - // if (prev < nextDate) { - // return nextDate; - // } else { - // return prev; - // } - // }, nextLatestDate); - // const categoriesRaw = res.data.categories as RemoteCategory[]; - - // // Insert any missing tag categories - // for (const rawCat of categoriesRaw) { - // if (categories.findIndex(c => c.name === rawCat.name) === -1) { - // const newCat = tagCategoryRepo.create({ - // name: rawCat.name, - // color: rawCat.color, - // description: rawCat.description - // }); - // categories.push(await tagCategoryRepo.save(newCat)); - // } - // } - - // const tags = tagsRaw.map((t) => { - // return { - // ...t, - // aliases: t.aliases.split(';').map(s => { - // return { - // tagId: t.id, - // name: s.trim() - // }; - // }) - // }; - // }) as RemoteTagParsed[]; - - // const changedAliases = tags.reduce((prev, cur) => prev.concat(cur.aliases), []); - // const existingTags = await TagManager.findTags(); - - // console.log('clear'); - // // Remove all changed aliases - // for (const chunk of chunkArray(changedAliases, 150)) { - // await tagAliasRepo.delete({ name: In(chunk.map(c => c.name)) }); - // } - // // Reassign them to the correct tag - // for (const chunk of chunkArray(changedAliases, 100)) { - // await tagAliasRepo.createQueryBuilder().insert().values(chunk).execute(); - // } - - // console.log('changed'); - // // Update any changed tags - // for (const changedTag of tags.filter(t => existingTags.findIndex(et => et.id === t.id) !== -1)) { - // if (changedTag.id === 7 || changedTag.id === 14) { - // log.debug('Launcher', JSON.stringify(changedTag)); - // } - // // Remove all aliases that aren't on the changed tag anymore - // await tagAliasRepo.createQueryBuilder().delete() - // .where({ name: Not(In(changedTag.aliases.map(c => c.name)))}) - // .andWhere({ tagId: changedTag.id }).execute(); - // // Find correct category and primary alias IDs to use - // const category = categories.find(c => c.name === changedTag.category); - // if (!category) { - // // Create the missing tag category - // throw 'Invalid tag category'; - // } - // const pAlias = await tagAliasRepo.findOne({ where: { name: changedTag.name }}); - // if (!pAlias) { - // throw 'Invalid primary alias? How?'; - // } - // await tagRepo.createQueryBuilder().update({ - // dateModified: changedTag.date_modified, - // categoryId: category.id, - // description: changedTag.description, - // primaryAliasId: pAlias.id - // }).where({ id: changedTag.id }).execute(); - // } +import { fpDatabase } from '.'; + +export async function syncTags(source: GameMetadataSource, categories: TagCategory[]): Promise { + const tagsUrl = `${source.baseUrl}/api/tags?after=${source.tags.latestUpdateTime}`; + const nextLatestDate = source.tags.latestUpdateTime; + + const res = await axios.get(tagsUrl) + .catch((err) => { + throw 'Failed to search tags'; + }); + + const tags = res.data.tags.map((t: RemoteTagRaw) => { + return { + id: t.id, + name: t.name, + description: t.description, + category: t.category, + dateModified: t.date_modified, + aliases: t.aliases.split(';').map(s => s.trim()), + deleted: t.Deleted + }; + }) as RemoteTagParsed[]; + + const lastDate = tags.reduce((prev, cur) => { + const nextDate = cur.dateModified; + if ((new Date(prev)) < (new Date(nextDate))) { + return nextDate; + } else { + return prev; + } + }, nextLatestDate); + const categoriesRaw = res.data.categories as RemoteCategoryRaw[]; + + // Insert any missing tag categories + for (const rawCat of categoriesRaw) { + if (categories.findIndex(c => c.name === rawCat.name) === -1) { + const newCat = await fpDatabase.createTagCategory({ + id: -1, + name: rawCat.name, + color: rawCat.color, + description: rawCat.description + }); + categories.push(newCat); + } + } - // console.log('new'); - // // Add any new tags - // for (const newTag of tags.filter(t => existingTags.findIndex(et => et.id === t.id) === -1)) { - // if (newTag.id === 7 || newTag.id === 14) { - // log.debug('Launcher', JSON.stringify(newTag)); - // } - // await tx.query(`INSERT INTO tag ("id", "dateModified", "primaryAliasId", "categoryId", "description") VALUES ( - // ?, - // ?, - // (SELECT ta.id FROM tag_alias ta WHERE ta.tagId = ? AND ta.name = ?), - // (SELECT tc.id FROM tag_category tc WHERE tc.name = ?), - // ? - // )`, [ - // newTag.id, - // newTag.date_modified, - // newTag.id, newTag.name, - // newTag.category, - // newTag.description || '' - // ]); - // } + const changedAliases = tags.reduce((prev, cur) => { + return prev.concat( + cur.aliases.map(alias => { + return { + id: cur.id, + value: alias + }; + }) + ); + }, []); + + const existingTags = await fpDatabase.findAllTags(); + + // Alias changes are dependant on the previous state, so we need to apply every change all at once to prevent collision + // Unassign any aliases that have changed + for (const chunk of chunkArray(changedAliases, 250)) { + await fpDatabase.unsafeDeleteTagAliases(chunk.map(a => a.value)); + } + console.log('removed tag aliases'); + // Reassign them to the correct platform + for (const chunk of chunkArray(changedAliases, 250)) { + await fpDatabase.unsafeInsertTagAliases(chunk); + } + console.log('reassigned tag aliases'); + + // Update any changed tags + for (const changedTag of tags.filter(t => existingTags.findIndex(et => et.id === t.id) !== -1)) { + console.log(`c ${changedTag.id} - ${changedTag.name} - ${changedTag.category}`); + await fpDatabase.unsafeSaveTag(changedTag); + await fpDatabase.saveTag(changedTag); + if (changedTag.deleted) { + await fpDatabase.deleteTag(changedTag.name); + } + } + console.log('updated'); + + // Add any new tags + for (const newTag of tags.filter(t => existingTags.findIndex(et => et.id === t.id) === -1)) { + if (!newTag.deleted) { + // Double check there isn't a lingering tag without a tag alias + await fpDatabase.deleteTagById(newTag.id); + console.log(`${newTag.id} - ${newTag.name}`); + await fpDatabase.unsafeDeleteTagAliases(newTag.aliases); + const tag = await fpDatabase.createTag(newTag.name, newTag.category, newTag.id); + tag.aliases = newTag.aliases; + tag.dateModified = newTag.dateModified; + tag.description = newTag.description; + await fpDatabase.saveTag(tag); + } + } - // return lastDate; - return new Date(); + return new Date(lastDate); } -export async function syncPlatforms(tx: EntityManager, source: GameMetadataSource): Promise { - // const platformsUrl = `${source.baseUrl}/api/platforms?after=${source.tags.latestUpdateTime}`; - - // const res = await axios.get(platformsUrl) - // .catch((err) => { - // throw 'Failed to search platforms'; - // }); - - // const platforms = res.data.map((p: RemotePlatformRaw) => { - // return { - // ...p, - // aliases: p.aliases.split(';').map(s => { - // return { - // platformId: p.id, - // name: s.trim() - // }; - // }) - // }; - // }) as RemotePlatformParsed[]; - - // const nextLatestDate = new Date(source.tags.latestUpdateTime); - // const lastDate = platforms.reduce((prev, cur) => { - // const nextDate = new Date(cur.date_modified); - // if (prev < nextDate) { - // return nextDate; - // } else { - // return prev; - // } - // }, nextLatestDate); - - // const platformAliasRepo = tx.getRepository(PlatformAlias); - // const platformRepo = tx.getRepository(Platform); - // const changedAliases = platforms.reduce((prev, cur) => prev.concat(cur.aliases), []); - // const existingPlatforms = await TagManager.dumpPlatforms(); - - // // Remove all changed aliases - // for (const chunk of chunkArray(changedAliases, 150)) { - // await platformAliasRepo.delete({ name: In(chunk.map(c => c.name)) }); - // } - // console.log('removed'); - // // Reassign them to the correct platform - // for (const chunk of chunkArray(changedAliases, 100)) { - // await platformAliasRepo.createQueryBuilder().insert().values(chunk).execute(); - // } - // console.log('reassigned'); - - // // Update any changed platforms - // for (const changedPlatform of platforms.filter(t => existingPlatforms.findIndex(et => et.id === t.id) !== -1)) { - // // Remove all aliases that aren't on the changed platform anymore - // await platformAliasRepo.createQueryBuilder().delete() - // .where({ name: Not(In(changedPlatform.aliases.map(c => c.name)))}) - // .andWhere({ platformId: changedPlatform.id }).execute(); - // // Find correct category and primary alias IDs to use - // const pAlias = await platformAliasRepo.findOne({ where: { name: changedPlatform.name }}); - // if (!pAlias) { - // throw 'Invalid primary alias? How?'; - // } - // await platformRepo.createQueryBuilder().update({ - // dateModified: changedPlatform.date_modified, - // description: changedPlatform.description, - // primaryAliasId: pAlias.id - // }).where({ id: changedPlatform.id }).execute(); - // } - // console.log('updated'); - - // // Add any new platforms - // for (const newPlatform of platforms.filter(t => existingPlatforms.findIndex(et => et.id === t.id) === -1)) { - // await platformRepo.query(`INSERT INTO platform ("id", "dateModified", "primaryAliasId", "description") VALUES ( - // ?, - // ?, - // (SELECT pa.id FROM platform_alias pa WHERE pa.platformId = ?), - // ? - // )`, [ - // newPlatform.id, - // newPlatform.date_modified, - // newPlatform.id, - // newPlatform.description || '' - // ]); - // } +export async function syncPlatforms(source: GameMetadataSource): Promise { + const platformsUrl = `${source.baseUrl}/api/platforms?after=${source.tags.latestUpdateTime}`; + + const res = await axios.get(platformsUrl) + .catch((err) => { + throw 'Failed to search platforms'; + }); + + const platforms = res.data.map((p: RemotePlatformRaw) => { + return { + id: p.id, + name: p.name, + description: p.description, + dateModified: p.date_modified, + aliases: p.aliases.split(';').map(s => s.trim()), + deleted: p.Deleted + }; + }) as RemotePlatformParsed[]; + + const nextLatestDate = source.tags.latestUpdateTime; + const lastDate = platforms.reduce((prev, cur) => { + const nextDate = cur.dateModified; + if ((new Date(prev)) < (new Date(nextDate))) { + return nextDate; + } else { + return prev; + } + }, nextLatestDate); + + const changedAliases = platforms.reduce((prev, cur) => { + return prev.concat( + cur.aliases.map(alias => { + return { + id: cur.id, + value: alias + }; + }) + ); + }, []); + + const existingPlatforms = await fpDatabase.findAllPlatforms(); + + // Alias changes are dependant on the previous state, so we need to apply every change all at once to prevent collision + // Unassign any aliases that have changed + for (const chunk of chunkArray(changedAliases, 250)) { + await fpDatabase.unsafeDeletePlatformAliases(chunk.map(a => a.value)); + } + console.log('removed plat aliases'); + // Reassign them to the correct platform + for (const chunk of chunkArray(changedAliases, 250)) { + await fpDatabase.unsafeInsertPlatformAliases(chunk); + } + console.log('reassigned plat aliases'); + + // Update any changed platforms + for (const changedPlatform of platforms.filter(t => existingPlatforms.findIndex(et => et.id === t.id) !== -1)) { + console.log(`${changedPlatform.id} - ${changedPlatform.deleted}`); + await fpDatabase.unsafeSavePlatform(changedPlatform); // Deleting a platform takes a name, make sure the primary alias is up to date first! + console.log('done unsafe'); + await fpDatabase.savePlatform(changedPlatform); // Deleting a platform takes a name, make sure the primary alias is up to date first! + console.log('done save'); + if (changedPlatform.deleted) { + await fpDatabase.deletePlatform(changedPlatform.name); + console.log('done delete'); + } + } + console.log('updated'); + + // Add any new platforms + for (const newPlatform of platforms.filter(t => existingPlatforms.findIndex(et => et.id === t.id) === -1)) { + if (!newPlatform.deleted) { + // Make sure there isn't a lingering platform with no alias + await fpDatabase.unsafeDeletePlatformById(newPlatform.id); + // Remove possible aliases + await fpDatabase.unsafeDeletePlatformAliases(newPlatform.aliases); + const plat = await fpDatabase.createPlatform(newPlatform.name, newPlatform.id); + plat.aliases = newPlatform.aliases; + plat.dateModified = newPlatform.dateModified; + plat.description = newPlatform.description; + await fpDatabase.savePlatform(plat); + } + } - // return lastDate; - return new Date(); + return new Date(lastDate); } -export async function syncGames(tx: EntityManager, source: GameMetadataSource, dataPacksFolder: string, beforeChunk?: () => void): Promise { +export async function syncGames(source: GameMetadataSource, dataPacksFolder: string, beforeChunk?: () => void): Promise { // const capUpdateTime = new Date(); // const gamesUrl = `${source.baseUrl}/api/games`; // const deletedUrl = `${source.baseUrl}/api/games/deleted`; @@ -528,34 +516,57 @@ export async function getMetaUpdateInfo(source: GameMetadataSource, accurate?: b // archive_state: number; // } -// type RemoteTagRaw = { -// id: number, -// name: string, -// description: string, -// category: string, -// date_modified: string, -// aliases: string, -// user_id: number -// } +type RemoteCategoryRaw = { + id: number, + name: string, + color: string, + description: string, +} -// type RemotePlatformRaw = { -// id: number, -// name: string, -// description: string, -// date_modified: string, -// aliases: string, -// user_id: number -// } +type RemoteTagRaw = { + id: number, + name: string, + description: string, + category: string, + date_modified: string, + aliases: string, + user_id: number, + Deleted: boolean +} -// type RemoteTagParsed = { -// id: number, -// name: string, -// description: string, -// category: string, -// date_modified: string, -// aliases: Alias[], -// user_id: number -// } +type RemoteTagParsed = { + id: number, + name: string, + description: string, + category: string, + dateModified: string, + aliases: string[], + deleted: boolean +} + +type RemotePlatformRaw = { + id: number, + name: string, + description: string, + date_modified: string, + aliases: string, + user_id: number, + Deleted: boolean +} + +type RemotePlatformParsed = { + id: number, + name: string, + description: string, + dateModified: string, + aliases: string[], + deleted: boolean +} + +type Alias = { + id: number, + value: string, +} // type RemotePlatformParsed = { // id: number, diff --git a/src/renderer/app.tsx b/src/renderer/app.tsx index 2e996a845..19e6f0d2d 100644 --- a/src/renderer/app.tsx +++ b/src/renderer/app.tsx @@ -85,7 +85,7 @@ export class App extends React.Component { const parts = url.split('/'); log.debug('Launcher', 'Handling Protocol - ' + url); if (parts.length > 2) { - // remove "flashpoint:" and "" elements + // remove "flashpoint:" and "" elements parts.splice(0, 2); switch (parts[0]) { case 'open': { @@ -111,7 +111,7 @@ export class App extends React.Component { window.Shared.back.request(BackIn.GET_GAME, parts[1]) .then(async (fetchedInfo) => { if (fetchedInfo) { - // Open game in sidebar + // Open game in sidebar this.props.setMainState({ currentGameInfo: fetchedInfo, selectedGameId: fetchedInfo.game.id, @@ -203,7 +203,7 @@ export class App extends React.Component { // Listen for the window to move or resize (and update the preferences when it does) ipcRenderer.on(WindowIPC.WINDOW_MOVE, debounce((sender, x: number, y: number, isMaximized: boolean) => { if (!isMaximized) { - updatePreferencesData({ mainWindow: { x: x|0, y: y|0 } }); + updatePreferencesData({ mainWindow: { x: x | 0, y: y | 0 } }); } }, 100)); ipcRenderer.on(WindowIPC.WINDOW_RESIZE, debounce((sender, width: number, height: number, isMaximized: boolean) => { @@ -215,7 +215,7 @@ export class App extends React.Component { if (height < 300) { height = 300; } - updatePreferencesData({ mainWindow: { width: width|0, height: height|0 } }); + updatePreferencesData({ mainWindow: { width: width | 0, height: height | 0 } }); } }, 100)); ipcRenderer.on(WindowIPC.WINDOW_MAXIMIZE, (sender, isMaximized: boolean) => { @@ -270,7 +270,7 @@ export class App extends React.Component { if (this.props.shortcut && this.props.shortcut.registerShortcut && this.props.shortcut.unregisterShortcut) { try { this.props.shortcut.unregisterShortcut(shortcuts); - } catch { /** ignore any errors from unregister check */} + } catch { /** ignore any errors from unregister check */ } this.props.shortcut.registerShortcut(() => { window.Shared.back.send(BackIn.RUN_COMMAND, commandName, []); }, shortcuts, command, 'Extension Shortcut'); @@ -599,7 +599,7 @@ export class App extends React.Component { if (this.props.shortcut && this.props.shortcut.registerShortcut && this.props.shortcut.unregisterShortcut) { try { this.props.shortcut.unregisterShortcut(shortcuts); - } catch { /** ignore any errors from unregister check */} + } catch { /** ignore any errors from unregister check */ } this.props.shortcut.registerShortcut(() => { window.Shared.back.send(BackIn.RUN_COMMAND, commandName, []); }, shortcuts, command, 'Extension Shortcut'); @@ -634,9 +634,11 @@ export class App extends React.Component { const user = JSON.parse(Buffer.from(userBase64, 'base64').toString('utf-8')) as FpfssUser; // Test profile uri const profileUrl = `${window.Shared.preferences.data.fpfssBaseUrl}/api/profile`; - axios.get(profileUrl, { headers: { - 'Authorization': `Bearer ${user.accessToken}` - }}) + axios.get(profileUrl, { + headers: { + 'Authorization': `Bearer ${user.accessToken}` + } + }) .then((res) => { // Success, use most recent info and save to storage and state user.username = res.data['Username']; @@ -677,8 +679,8 @@ export class App extends React.Component { remote.dialog.showMessageBox({ type: 'warning', title: 'Exit Launcher?', - message: 'All progress on downloading or installing the upgrade will be lost.\n'+ - 'Are you sure you want to exit?', + message: 'All progress on downloading or installing the upgrade will be lost.\n' + + 'Are you sure you want to exit?', buttons: ['Yes', 'No'], defaultId: 1, cancelId: 1, @@ -784,7 +786,7 @@ export class App extends React.Component { // Check for PHP on Linux if (process.platform === 'linux') { - which('php', function(err: Error | null) { + which('php', function (err: Error | null) { if (err) { log.warn('Launcher', 'Warning: PHP not found in path, may cause unexpected behaviour.'); ipcRenderer.invoke(CustomIPC.SHOW_MESSAGE_BOX, { @@ -855,8 +857,8 @@ export class App extends React.Component { // @TODO: Is this really the best way to compare array contents? I guess it works if ( this.props.preferencesData.browsePageShowExtreme !== prevProps.preferencesData.browsePageShowExtreme || - !arrayShallowStrictEquals(this.props.preferencesData.excludedRandomLibraries, prevProps.preferencesData.excludedRandomLibraries) || - JSON.stringify(prevProps.preferencesData.tagFilters) !== JSON.stringify(this.props.preferencesData.tagFilters)) { + !arrayShallowStrictEquals(this.props.preferencesData.excludedRandomLibraries, prevProps.preferencesData.excludedRandomLibraries) || + JSON.stringify(prevProps.preferencesData.tagFilters) !== JSON.stringify(this.props.preferencesData.tagFilters)) { this.props.dispatchMain({ type: MainActionType.CLEAR_RANDOM_GAMES }); @@ -882,8 +884,8 @@ export class App extends React.Component { // Prevent order changes from updating playlist search results let orderUpdate = false; if ( - view.query.orderBy !== this.props.preferencesData.gamesOrderBy || - view.query.orderReverse !== this.props.preferencesData.gamesOrder + view.query.orderBy !== this.props.preferencesData.gamesOrderBy || + view.query.orderReverse !== this.props.preferencesData.gamesOrder ) { orderUpdate = true; } @@ -892,10 +894,10 @@ export class App extends React.Component { } // Check if any parameters for the search query has changed (they don't match the current view's) - if (view.query.text !== this.props.search.text || - view.query.extreme !== this.props.preferencesData.browsePageShowExtreme || + if (view.query.text !== this.props.search.text || + view.query.extreme !== this.props.preferencesData.browsePageShowExtreme || orderUpdate || - JSON.stringify(view.tagFilters) !== JSON.stringify(this.props.preferencesData.tagFilters) + JSON.stringify(view.tagFilters) !== JSON.stringify(this.props.preferencesData.tagFilters) ) { this.setViewQuery(library); } @@ -912,13 +914,15 @@ export class App extends React.Component { } if (pages && pages.length > 0) { - // Request needed pages + // Request needed pages window.Shared.back.request(BackIn.BROWSE_VIEW_PAGE, { - ranges: pages.map(index => { return { - start: index * VIEW_PAGE_SIZE, - length: VIEW_PAGE_SIZE, - index: index > 0 ? view.meta && view.meta.pageKeyset[index - 1] : undefined, // Page keyset indices are one-indexed (start at 1 instead of 0) - }; }), + ranges: pages.map(index => { + return { + start: index * VIEW_PAGE_SIZE, + length: VIEW_PAGE_SIZE, + index: index > 0 ? view.meta && view.meta.pageKeyset[index - 1] : undefined, // Page keyset indices are one-indexed (start at 1 instead of 0) + }; + }), viewIdentifier: library, query: view.query, shallow: true, @@ -1051,7 +1055,7 @@ export class App extends React.Component { log.debug('Launcher', `Editing: ${JSON.stringify(game)}`); if (this.props.main.currentGameInfo) { const ng = newGame(); - Object.assign(ng, {...this.props.main.currentGameInfo.game, ...game}); + Object.assign(ng, { ...this.props.main.currentGameInfo.game, ...game }); this.props.setMainState({ currentGameInfo: { game: ng, @@ -1103,7 +1107,7 @@ export class App extends React.Component { onUpdateActiveGameData = (activeDataOnDisk: boolean, activeDataId?: number): void => { if (this.props.main.currentGameInfo) { const ng = newGame(); - Object.assign(newGame, {...this.props.main.currentGameInfo.game, activeDataOnDisk, activeDataId }); + Object.assign(newGame, { ...this.props.main.currentGameInfo.game, activeDataOnDisk, activeDataId }); window.Shared.back.request(BackIn.SAVE_GAME, { game: ng, activeConfig: this.props.main.currentGameInfo.activeConfig, @@ -1112,11 +1116,13 @@ export class App extends React.Component { .then(() => { if (this.props.main.currentGameInfo) { const ng = newGame(); - Object.assign(ng, {...this.props.main.currentGameInfo.game, activeDataOnDisk, activeDataId }); - this.props.setMainState({ currentGameInfo: { - ...this.props.main.currentGameInfo, - game: ng, - }}); + Object.assign(ng, { ...this.props.main.currentGameInfo.game, activeDataOnDisk, activeDataId }); + this.props.setMainState({ + currentGameInfo: { + ...this.props.main.currentGameInfo, + game: ng, + } + }); } }); } @@ -1168,6 +1174,7 @@ export class App extends React.Component { window.Shared.back.request(BackIn.GET_GAME, gameId) .then(fetchedInfo => { if (fetchedInfo) { + console.log(`TYPE - ${typeof fetchedInfo.game.dateAdded}`); this.props.setMainState({ currentGameInfo: fetchedInfo, currentPlaylistEntry: gamePlaylistEntry == null ? undefined : gamePlaylistEntry @@ -1216,7 +1223,7 @@ export class App extends React.Component { (playlistId) => window.Shared.back.send(BackIn.ADD_PLAYLIST_GAME, playlistId, gameId), selectedPlaylistId) }, { - /* File Location */ + /* File Location */ label: strings.menu.openFileLocation, enabled: !window.Shared.isBackRemote, // (Local "back" only) click: () => { @@ -1246,15 +1253,15 @@ export class App extends React.Component { if (error.code === 'ENOENT') { opts.title = this.context.dialog.fileNotFound; opts.message = ( - 'Failed to find the game file.\n'+ - 'If you are using Flashpoint Infinity, make sure you download the game first.\n' + 'Failed to find the game file.\n' + + 'If you are using Flashpoint Infinity, make sure you download the game first.\n' ); } else { opts.title = 'Unexpected error'; opts.message = ( - 'Failed to check the game file.\n'+ - 'If you see this, please report it back to us (a screenshot would be great)!\n\n'+ - `Error: ${error}\n` + 'Failed to check the game file.\n' + + 'If you see this, please report it back to us (a screenshot would be great)!\n\n' + + `Error: ${error}\n` ); } opts.message += `Path: "${gamePath}"\n\nNote: If the path is too long, some portion will be replaced with three dots ("...").`; @@ -1268,7 +1275,7 @@ export class App extends React.Component { /* Copy Shortcut URL */ label: strings.menu.copyShortcutURL, enabled: true, - click : () => { + click: () => { clipboard.writeText(`flashpoint://run/${gameId}`); } }, @@ -1276,7 +1283,7 @@ export class App extends React.Component { /* Copy Game UUID */ label: strings.menu.copyGameUUID, enabled: true, - click : () => { + click: () => { clipboard.writeText(gameId); } }, { type: 'separator' }]; @@ -1358,7 +1365,7 @@ export class App extends React.Component { click: () => { this.onOpenExportMetaEdit(gameId); }, - }, { type: 'separator' } + }, { type: 'separator' } ]; contextButtons = contextButtons.concat(editingButtons); } @@ -1469,23 +1476,23 @@ export class App extends React.Component { // Render return ( - { !this.props.main.stopRender ? ( + {!this.props.main.stopRender ? ( <> {/* Backend Crash Log and Report */} - { !this.props.main.socketOpen && !this.props.main.mainOutput && ( + {!this.props.main.socketOpen && !this.props.main.mainOutput && (
Disconnected from Backend
Reconnecting...
)} - { this.props.main.mainOutput && ( + {this.props.main.mainOutput && (
Backend Crash Log
{this.props.main.mainOutput}
+ onClick={this.copyCrashLog} /> { @@ -1493,16 +1500,16 @@ export class App extends React.Component { quitting: true }); window.Shared.restart(); - }}/> + }} />
)} {/* First Open Dialog */} - { this.props.main.openDialogs.length > 0 && ( + {this.props.main.openDialogs.length > 0 && ( renderDialogMemo(this.props.main.openDialogs[0], this.props.dispatchMain) )} {/** Fancy FPFSS edit */} - { this.props.main.fpfss.editingGameInfo && ( + {this.props.main.fpfss.editingGameInfo && ( { currentGameInfo={this.props.main.fpfss.editingGameInfo} currentLibrary={this.props.main.fpfss.editingGameInfo.game.library} onGameLaunch={async () => alert('Cannot launch game during FPFSS edit')} - onDeleteSelectedGame={() => {/** unused */}} - onDeselectPlaylist={() => {/** unused */}} - onEditPlaylistNotes={() => {/** unused */}} + onDeleteSelectedGame={() => {/** unused */ }} + onDeselectPlaylist={() => {/** unused */ }} + onEditPlaylistNotes={() => {/** unused */ }} isEditing={true} isExtreme={false} isNewGame={false} suggestions={this.props.main.suggestions} tagCategories={this.props.tagCategories} busyGames={[]} - onEditClick={() => {/** unused */}} + onEditClick={() => {/** unused */ }} onDiscardClick={this.onCancelFpfssEditGame} onSaveGame={this.onSaveFpfssEditGame} onForceSaveGame={this.onForceSaveGame} - onOpenExportMetaEdit={() => {/** unused */}} + onOpenExportMetaEdit={() => {/** unused */ }} onEditGame={this.onApplyFpfssEditGame} onFpfssEditGame={this.onFpfssEditGame} - onUpdateActiveGameData={(disk, id) => id && this.onApplyFpfssEditGameData(id)}/> + onUpdateActiveGameData={(disk, id) => id && this.onApplyFpfssEditGameData(id)} /> )} {/* Splash screen */} @@ -1535,14 +1542,14 @@ export class App extends React.Component { loadedAll={this.props.main.loadedAll.isOpen} loaded={this.props.main.loaded} /> {/* Title-bar (if enabled) */} - { window.Shared.config.data.useCustomTitlebar ? + {window.Shared.config.data.useCustomTitlebar ? window.Shared.customVersion ? ( ) : ( - ) : undefined } + ) : undefined} {/* "Content" */} - { this.props.main.loadedAll.isOpen ? ( + {this.props.main.loadedAll.isOpen ? ( <> {/* Header */} { {/* Main */}
- +
- (

{strings.by}

- ) {/* -- Game Configurations */} { !this.props.fpfssEditMode && ( @@ -579,7 +577,6 @@ export class RightBrowseSidebar extends React.Component {/* -- Most Fields -- */} - ( <>
{ editable && ( @@ -743,7 +740,6 @@ export class RightBrowseSidebar extends React.Component
- ) {/* -- Date Display -- */} { !editable && (
@@ -756,7 +752,7 @@ export class RightBrowseSidebar extends React.Component
- {formatSidebarDate(game.dateAdded)} + {formatSidebarDate(new Date(game.dateAdded))}
@@ -768,7 +764,7 @@ export class RightBrowseSidebar extends React.Component
- {formatSidebarDate(game.dateModified)} + {formatSidebarDate(new Date(game.dateModified))}
@@ -1556,6 +1552,6 @@ function formatSidebarDate(d: Date): string { try { return `${d.getFullYear()}-${(d.getMonth() + 1).toString().padStart(2, '0')}-${d.getDate().toString().padStart(2, '0')}`; } catch { - return 'Invalid Date'; + return 'Invalid Date ' + typeof d; } } diff --git a/src/renderer/components/pages/TagCategoriesPage.tsx b/src/renderer/components/pages/TagCategoriesPage.tsx index fea3ac3fd..2be57f97b 100644 --- a/src/renderer/components/pages/TagCategoriesPage.tsx +++ b/src/renderer/components/pages/TagCategoriesPage.tsx @@ -58,7 +58,7 @@ export class TagCategoriesPage extends React.Component { isLocked={this.state.isLocked} /> { window.Shared.back.request(BackIn.GET_TAG_BY_ID, tagId) .then((data) => { if (data) { + console.log(data); const allTags = deepCopy(this.state.tags); const tagIndex = allTags.findIndex(t => t.id === tagId); if (tagIndex > -1) { diff --git a/src/renderer/configureStore.ts b/src/renderer/configureStore.ts index f36fe2a78..d3b14d707 100644 --- a/src/renderer/configureStore.ts +++ b/src/renderer/configureStore.ts @@ -5,6 +5,9 @@ import { composeWithDevTools } from 'redux-devtools-extension'; import { ApplicationState, createRootReducer } from './store'; import { curationSyncMiddleware } from './store/curate/middleware'; import { asyncDispatchMiddleware } from './store/main/types'; +import { createReduxMiddleware } from '@karmaniverous/serify-deserify'; + +const serifyMiddleware = createReduxMiddleware(); export default function configureStore(history: History, initialState?: Partial): Store { const composeEnhancers = composeWithDevTools({}); @@ -14,6 +17,7 @@ export default function configureStore(history: History, initialState?: Partial< initialState, composeEnhancers( applyMiddleware( + serifyMiddleware, routerMiddleware(history), curationSyncMiddleware, asyncDispatchMiddleware diff --git a/src/shared/Util.ts b/src/shared/Util.ts index f83c105af..41d639ad0 100644 --- a/src/shared/Util.ts +++ b/src/shared/Util.ts @@ -1,7 +1,6 @@ import * as axiosImport from 'axios'; -import { Game, Tag, TagCategory, TagFilterGroup } from 'flashpoint-launcher'; +import { AdditionalApp, Game, Platform, Tag, TagFilterGroup } from 'flashpoint-launcher'; import * as fs from 'fs'; -import { camelCase, snakeCase, transform } from 'lodash'; import * as path from 'path'; import { DownloadDetails } from './back/types'; import { AppConfigData } from './config/interfaces'; @@ -495,62 +494,187 @@ export function compare(a: string, b: string): number { } } -export function mapFpfssGameToLocal(data: any, categories: TagCategory[]): Game { - const game = camelify(data) as unknown as Game; - // Initialize nil variables which should be arrays - if (!game.addApps) { game.addApps = []; } - if (!game.gameData) { game.gameData = []; } - if (!game.platforms) { game.platforms = []; } - if (!game.tags) { game.tags = []; } - game.legacyApplicationPath = (game as any).applicationPath; - game.legacyLaunchCommand = (game as any).launchCommand; - // Tags - game.detailedTags = []; - game.detailedPlatforms = []; - for (const tag of game.tags) { - const t: Tag = { - id: -1, - name: tag, - dateModified: new Date(), - aliases: [], - description: '', - category: 'default' - }; - game.detailedTags.push(t); - } - // Platforms - for (const platform of game.platforms) { - const p: Tag = { - id: -1, - name: platform, - dateModified: new Date(), - aliases: [], - description: '', - }; - game.detailedPlatforms.push(p); - } +export type FpfssGame = { + id: string; + title: string; + alternate_titles: string; + series: string; + developer: string; + publisher: string; + platform_name: string; + platforms_str: string; + date_added: string; + date_modified: string; + play_mode: string; + status: string; + notes: string; + tags_str: string; + source: string; + application_path: string; + launch_command: string; + release_date: string; + version: string; + original_description: string; + language: string; + library: string; + add_apps?: FpfssAddApp[]; + action: string; + reason: string; + archive_state: number; + Deleted: boolean; + UserID: number; + tags?: FpfssTag[]; + platforms?: FpfssPlatform[]; +} + +export type FpfssPlatform = { + id: number, + name: string, + description: string, + date_modified: string, +} + +export type FpfssTag = { + id: number, + name: string, + category: string, + description: string, + date_modified: string, +} + +export type FpfssAddApp = { + id: string, + application_path: string; + auto_run_before: boolean; + launch_command: string; + name: string; + wait_for_exit: boolean; + parent_game_id: string; +}; +export function mapFpfssGameToLocal(data: any): Game { + const fg = data as FpfssGame; + const game: Game = { + id: fg.id, + title: fg.title, + alternateTitles: fg.alternate_titles, + series: fg.series, + developer: fg.developer, + publisher: fg.publisher, + primaryPlatform: fg.platform_name, + platforms: fg.platforms_str.split('; ').map(s => s.trim()), + dateAdded: fg.date_added, + dateModified: fg.date_modified, + playMode: fg.play_mode, + status: fg.status, + notes: fg.notes, + tags: fg.tags_str.split('; ').map(s => s.trim()), + source: fg.source, + legacyApplicationPath: fg.application_path, + legacyLaunchCommand: fg.launch_command, + releaseDate: fg.release_date, + version: fg.version, + originalDescription: fg.original_description, + language: fg.language, + library: fg.library, + archiveState: fg.archive_state, + activeDataOnDisk: false, + activeDataId: -1, + playCounter: 0, + playtime: 0, + detailedTags: fg.tags?.map(t => { + return { + id: t.id, + name: t.name, + dateModified: t.date_modified, + aliases: [], + description: t.description, + category: t.category + }; + }) || [], + detailedPlatforms: fg.platforms?.map(p => { + return { + id: p.id, + name: p.name, + dateModified: p.date_modified, + aliases: [], + description: p.description, + }; + }) || [], + addApps: fg.add_apps?.map(a => { + return { + id: a.id, + applicationPath: a.application_path, + autoRunBefore: a.auto_run_before, + waitForExit: a.wait_for_exit, + launchCommand: a.launch_command, + name: a.name, + parentGameId: a.parent_game_id, + }; + }) || [], + }; return game; } -export function mapLocalToFpfssGame(game: Game, categories: TagCategory[], userId: number): Record { - (game as any).launchCommand = game.legacyLaunchCommand; - (game as any).applicationPath = game.legacyApplicationPath; - return snekify({ - ...game, - }); +export function mapLocalToFpfssGame(game: Game): FpfssGame { + console.log(game.dateAdded); + console.log(game.dateModified); + const fg: FpfssGame = { + id: game.id, + title: game.title, + alternate_titles: game.alternateTitles, + series: game.series, + developer: game.developer, + publisher: game.publisher, + platform_name: game.primaryPlatform, + platforms_str: game.detailedPlatforms?.map(p => p.name).join('; ') || '', + date_added: game.dateAdded, + date_modified: game.dateModified, + play_mode: game.playMode, + status: game.status, + notes: game.notes, + tags_str: game.detailedTags?.map(t => t.name).join('; ') || '', + source: game.source, + application_path: game.legacyApplicationPath, + launch_command: game.legacyLaunchCommand, + release_date: game.releaseDate, + version: game.version, + original_description: game.originalDescription, + language: game.language, + library: game.library, + archive_state: game.archiveState, + action: '', + reason: '', + Deleted: false, + UserID: 0, + tags: game.detailedTags?.map(t => { + return { + id: t.id, + name: t.name, + description: t.description, + date_modified: t.dateModified, + category: t.category || 'default', + }; + }) || [], + platforms: game.detailedPlatforms?.map(p => { + return { + id: p.id, + name: p.name, + description: p.description, + date_modified: p.dateModified, + }; + }) || [], + add_apps: game.addApps?.map(a => { + return { + id: a.id, + application_path: a.applicationPath, + auto_run_before: a.autoRunBefore, + wait_for_exit: a.waitForExit, + launch_command: a.launchCommand, + name: a.name, + parent_game_id: a.parentGameId, + }; + }) || [], + }; + return fg; } - -const snekify = (obj: Record) => { - return transform(obj, (result: Record, value: unknown, key: string, target) => { - const camelKey = Array.isArray(target) ? key : snakeCase(key); - result[camelKey] = (value !== null && typeof value === 'object') ? snekify(value as Record) : value; - }); -}; - -const camelify = (obj: Record) => { - return transform(obj, (result: Record, value: unknown, key: string, target) => { - const camelKey = Array.isArray(target) ? key : camelCase(key); - result[camelKey] = (value !== null && typeof value === 'object') ? camelify(value as Record) : value; - }); -}; diff --git a/src/shared/curate/types.ts b/src/shared/curate/types.ts index da88bb890..64c0f5511 100644 --- a/src/shared/curate/types.ts +++ b/src/shared/curate/types.ts @@ -65,9 +65,9 @@ export type AddAppCurationMeta = Partial<{ export type AddAppCuration = {key: string} & AddAppCurationMeta; -export type PlatformAppPathSuggestions = {[platform: string]: PlatformAppPath[]}; +export type PlatformAppPathSuggestions = Record; export type PlatformAppPath = { appPath: string; - total: number; + count: number; } diff --git a/src/shared/utils/misc.ts b/src/shared/utils/misc.ts index 9563d48d2..7e05981fa 100644 --- a/src/shared/utils/misc.ts +++ b/src/shared/utils/misc.ts @@ -21,8 +21,8 @@ export function newGame(): Game { publisher: '', primaryPlatform: '', platforms: [], - dateAdded: new Date(), - dateModified: new Date(), + dateAdded: (new Date()).toISOString(), + dateModified: (new Date()).toISOString(), detailedPlatforms: [], playMode: '', status: '', @@ -38,7 +38,7 @@ export function newGame(): Game { language: '', activeDataId: 0, activeDataOnDisk: false, - lastPlayed: new Date(), + lastPlayed: (new Date()).toISOString(), playtime: 0, playCounter: 0, activeGameConfigId: 0, diff --git a/typings/flashpoint-launcher.d.ts b/typings/flashpoint-launcher.d.ts index 5d0fb6c09..05f37c01a 100644 --- a/typings/flashpoint-launcher.d.ts +++ b/typings/flashpoint-launcher.d.ts @@ -621,9 +621,9 @@ declare module 'flashpoint-launcher' { /** Primary platform name (cached) */ primaryPlatform: string; /** Date-time of when the game was added to collection */ - dateAdded: Date; + dateAdded: string; /** Date-time of when the game was added to collection */ - dateModified: Date; + dateModified: string; /** If the game is single player or multiplayer, and if the multiplayer is cooperative or not */ playMode: string; /** How playable the game is */ @@ -658,7 +658,7 @@ declare module 'flashpoint-launcher' { activeDataOnDisk: boolean; gameData?: GameData[]; /** Last Played Date */ - lastPlayed?: Date; + lastPlayed?: string; /** Total Playtime (seconds) */ playtime: number; /** Number of plays */ @@ -683,7 +683,7 @@ declare module 'flashpoint-launcher' { /** Title of this data pack */ title: string; /** Date this data pack was added on */ - dateAdded: Date; + dateAdded: string; /** Expected SHA256 hash of this data pack */ sha256: string; /** Expected CRC32 of this data pack */ @@ -732,7 +732,7 @@ declare module 'flashpoint-launcher' { /** Description of the tag */ description: string; /** Date when this tag was last modified */ - dateModified: Date; + dateModified: string; /** Aliases / Names of the tag */ aliases: string[]; /** Name of the category */ diff --git a/typings/globals.d.ts b/typings/globals.d.ts index 7170e4e4b..c48b03031 100644 --- a/typings/globals.d.ts +++ b/typings/globals.d.ts @@ -1,36 +1,36 @@ -import { LogFunc, IMainWindowExternal } from '../src/shared/interfaces'; - -/** Custom modifications made by this project */ -type LogFuncs = { - trace: LogFunc; - debug: LogFunc; - info: LogFunc; - warn: LogFunc; - error: LogFunc; -} - -declare global { - interface Window { - Shared: IMainWindowExternal; - log: LogFuncs; - } - namespace NodeJS { - interface Global { - log: LogFuncs; - } - } - let log: LogFuncs; -} - -/** Add missing declarations ("polyfill" type information) */ -declare global { - interface Clipboard { - writeText(newClipText: string): Promise; - // Add any other methods you need here. - } - interface NavigatorClipboard { - // Only available in a secure context. - readonly clipboard?: Clipboard; - } - interface Navigator extends NavigatorClipboard {} -} +import { LogFunc, IMainWindowExternal } from '../src/shared/interfaces'; + +/** Custom modifications made by this project */ +type LogFuncs = { + trace: LogFunc; + debug: LogFunc; + info: LogFunc; + warn: LogFunc; + error: LogFunc; +} + +declare global { + interface Window { + Shared: IMainWindowExternal; + log: LogFuncs; + } + namespace NodeJS { + interface Global { + log: LogFuncs; + } + } + let log: LogFuncs; +} + +/** Add missing declarations ("polyfill" type information) */ +declare global { + interface Clipboard { + writeText(newClipText: string): Promise; + // Add any other methods you need here. + } + interface NavigatorClipboard { + // Only available in a secure context. + readonly clipboard?: Clipboard; + } + interface Navigator extends NavigatorClipboard {} +}