From 68f0c89ec2aee04c2a80cfe41030cfff00b1cfa0 Mon Sep 17 00:00:00 2001 From: Mastermindzh Date: Mon, 1 May 2023 13:36:37 +0200 Subject: [PATCH 01/10] replaced sass-lint with style-lint --- .stylelintrc.json | 13 ++++++++++ package.json | 12 +++++---- sass-lint.yml | 21 --------------- src/pages/settings/settings.scss | 44 ++++++++++++++++---------------- 4 files changed, 42 insertions(+), 48 deletions(-) create mode 100644 .stylelintrc.json delete mode 100644 sass-lint.yml diff --git a/.stylelintrc.json b/.stylelintrc.json new file mode 100644 index 0000000..8e0c2a3 --- /dev/null +++ b/.stylelintrc.json @@ -0,0 +1,13 @@ +{ + "plugins": [ + "stylelint-prettier" + ], + "extends": [ + "stylelint-config-standard-scss" + ], + "rules": { + "prettier/prettier": true, + "scss/at-extend-no-missing-placeholder": null, + "no-descending-specificity": null + } +} \ No newline at end of file diff --git a/package.json b/package.json index 6ac2dbe..0cbe605 100644 --- a/package.json +++ b/package.json @@ -18,8 +18,8 @@ "prebuilder": "npm run sass", "builder": "electron-builder --publish=never", "sass": "sass ./src/pages/settings/settings.scss ./src/pages/settings/settings.css", - "sass-lint": "sass-lint -vc ./sass-lint.yml ./src/pages/settings/settings.scss", - "sass-lint-fix": "sass-lint-auto-fix ./src/pages/settings/settings.scss --config-sass-lint ./sass-lint.yml" + "style-lint": "npx stylelint **/*.scss", + "style-lint-fix": "npx stylelint --fix **/*.scss" }, "keywords": [ "electron", @@ -46,9 +46,11 @@ "electron-builder": "^24.2.1", "js-yaml": "^4.1.0", "markdown-toc": "^1.2.0", - "prettier": "^2.8.7", - "sass-lint": "^1.13.1", - "sass-lint-auto-fix": "^0.21.2" + "prettier": "^2.8.8", + "stylelint": "^15.6.0", + "stylelint-config-standard": "^33.0.0", + "stylelint-config-standard-scss": "^9.0.0", + "stylelint-prettier": "^3.0.0", }, "prettier": "@mastermindzh/prettier-config" } \ No newline at end of file diff --git a/sass-lint.yml b/sass-lint.yml deleted file mode 100644 index 5074cdd..0000000 --- a/sass-lint.yml +++ /dev/null @@ -1,21 +0,0 @@ -rules: - property-sort-order: - - 1 - - order: "smacss" - class-name-format: - - 1 - - convention: "hyphenatedbem" - quotes: - - 1 - - style: "double" - nesting-depth: - - 1 - - max-depth: 3 - placeholder-in-extend: - - 0 - no-vendor-prefixes: - - 0 - empty-line-between-blocks: - - 0 - force-pseudo-nesting: - - 0 diff --git a/src/pages/settings/settings.scss b/src/pages/settings/settings.scss index 9abb284..537dbd5 100644 --- a/src/pages/settings/settings.scss +++ b/src/pages/settings/settings.scss @@ -3,7 +3,6 @@ $black: #17171a; $grey-333: #333; $white: #f9f9f9; - $tidal-blue: #0ff; $tidal-grey: #72777f; $tidal-grey-darker: #404248; @@ -36,16 +35,14 @@ $tidal-grey-darkest: #242528; src: url("fonts/NotoSans-Bold.ttf") format("truetype"); } -$font1: "Noto Sans", Helvetica, sans-serif; +$font1: "Noto Sans", helvetica, sans-serif; // --- Mixins --- @mixin drag($enabled: true) { @if $enabled { -webkit-app-region: drag; - } - - @else { + } @else { -webkit-app-region: no-drag; } } @@ -62,6 +59,7 @@ html { .external-link { @extend button; + text-decoration: underline; } @@ -80,6 +78,7 @@ html { &__drag-area { @include drag; + position: absolute; width: 100%; height: 50px; @@ -90,6 +89,7 @@ html { &__close-button { @extend button; @include drag(false); + position: absolute; top: 12px; right: 10px; @@ -106,7 +106,7 @@ html { display: block; width: 18px; height: 18px; - opacity: .7; + opacity: 0.7; } // --- Settings tabs --- @@ -125,8 +125,9 @@ html { outline: none; } - &+label { + & + label { @include drag(false); + display: inline-block; position: relative; margin-right: 35px; @@ -138,7 +139,7 @@ html { user-select: none; } - &:checked+label { + &:checked + label { border-bottom: 2px solid $tidal-blue; color: $tidal-blue; } @@ -156,7 +157,7 @@ html { } @for $i from 1 to 6 { - .settings>input:nth-child(#{$i*2-1}):checked~&>.tabs__section:nth-child(#{$i}) { + .settings > input:nth-child(#{$i * 2 - 1}):checked ~ & > .tabs__section:nth-child(#{$i}) { display: block; } } @@ -217,7 +218,7 @@ html { width: 100%; margin-bottom: 10px; padding: 5px 0; - transition: .2s; + transition: 0.2s; border: 0; border-bottom: solid 1px $grey-333; outline: none; @@ -237,38 +238,36 @@ html { .switch { $this: &; + position: relative; min-width: 50px; height: 28px; - margin-left: 10px; input { transform: scale(0); outline: none; - &:checked+#{$this}__slider { + &:checked + #{$this}__slider { background-color: $tidal-blue; &::before { transform: translateX(22px); - background-color: white; + background-color: $white; } } - &:focus+#{$this}__slider { + &:focus + #{$this}__slider { box-shadow: inset 0 0 0 1px $tidal-blue; } } &__slider { @extend button; + position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - transition: .4s; + inset: 0; + transition: 0.4s; border-radius: 40px; background-color: $tidal-grey-darkest; @@ -278,7 +277,7 @@ html { left: 2px; width: 24px; height: 24px; - transition: .4s; + transition: 0.4s; border-radius: 50%; background-color: $white; content: ""; @@ -294,7 +293,7 @@ html { min-height: 50px; max-height: 100px; padding: 8px; - transition: .2s; + transition: 0.2s; border: 0; border-bottom: 1px solid transparent; background: $tidal-grey-darkest; @@ -345,11 +344,12 @@ html { &__button { @extend button; + display: block; height: 48px; margin: auto; padding: 0 24px; - transition: .2s; + transition: 0.2s; border: 0; border-radius: 12px; background: $tidal-grey-darker; From 412f1ae3e3f63d372bb469fdfb79b67f843ee06f Mon Sep 17 00:00:00 2001 From: Mastermindzh Date: Mon, 1 May 2023 13:44:02 +0200 Subject: [PATCH 02/10] feat: added first typescript support Didn't add many types yet. Just used to test out typescript compiler, copying files and building. Now that all that seems to go well I can start converting all files to .ts and then adding proper typing everywhere --- .eslintrc | 12 + .gitignore | 1 + package-lock.json | 3414 ++++++++++++++++++++------------- package.json | 14 +- src/constants/settings.js | 1 + src/{main.js => main.ts} | 61 +- src/pages/settings/preload.js | 4 +- src/scripts/discord.js | 10 +- src/scripts/mediaInfo.js | 26 +- tsconfig.json | 16 + 10 files changed, 2174 insertions(+), 1385 deletions(-) create mode 100644 .eslintrc rename src/{main.js => main.ts} (79%) create mode 100644 tsconfig.json diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 0000000..11643ef --- /dev/null +++ b/.eslintrc @@ -0,0 +1,12 @@ +{ + "root": true, + "parser": "@typescript-eslint/parser", + "plugins": [ + "@typescript-eslint" + ], + "extends": [ + "eslint:recommended", + "plugin:@typescript-eslint/eslint-recommended", + "plugin:@typescript-eslint/recommended" + ] +} diff --git a/.gitignore b/.gitignore index a1d81e2..496ad47 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ build/linux/arch/* # JetBrains IDE configuration .idea +ts-dist/** diff --git a/package-lock.json b/package-lock.json index 3bdbef7..ba20cf9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,13 +20,20 @@ }, "devDependencies": { "@mastermindzh/prettier-config": "^1.0.0", + "@typescript-eslint/eslint-plugin": "^5.59.1", + "@typescript-eslint/parser": "^5.59.1", "electron": "git+https://github.com/castlabs/electron-releases.git#v24.1.2+wvcus", "electron-builder": "^24.2.1", + "eslint": "^8.39.0", "js-yaml": "^4.1.0", "markdown-toc": "^1.2.0", - "prettier": "^2.8.7", - "sass-lint": "^1.13.1", - "sass-lint-auto-fix": "^0.21.2" + "prettier": "^2.8.8", + "stylelint": "^15.6.0", + "stylelint-config-standard": "^33.0.0", + "stylelint-config-standard-scss": "^9.0.0", + "stylelint-prettier": "^3.0.0", + "tsc-watch": "^6.0.4", + "typescript": "^5.0.4" } }, "node_modules/@babel/code-frame": { @@ -135,6 +142,68 @@ "node": ">=4" } }, + "node_modules/@csstools/css-parser-algorithms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-2.1.1.tgz", + "integrity": "sha512-viRnRh02AgO4mwIQb2xQNJju0i+Fh9roNgmbR5xEuG7J3TGgxjnE95HnBLgsFJOJOksvcfxOUCgODcft6Y07cA==", + "dev": true, + "engines": { + "node": "^14 || ^16 || >=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + }, + "peerDependencies": { + "@csstools/css-tokenizer": "^2.1.1" + } + }, + "node_modules/@csstools/css-tokenizer": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-2.1.1.tgz", + "integrity": "sha512-GbrTj2Z8MCTUv+52GE0RbFGM527xuXZ0Xa5g0Z+YN573uveS4G0qi6WNOMyz3yrFM/jaILTTwJ0+umx81EzqfA==", + "dev": true, + "engines": { + "node": "^14 || ^16 || >=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + }, + "node_modules/@csstools/media-query-list-parser": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-2.0.4.tgz", + "integrity": "sha512-GyYot6jHgcSDZZ+tLSnrzkR7aJhF2ZW6d+CXH66mjy5WpAQhZD4HDke2OQ36SivGRWlZJpAz7TzbW6OKlEpxAA==", + "dev": true, + "engines": { + "node": "^14 || ^16 || >=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + }, + "peerDependencies": { + "@csstools/css-parser-algorithms": "^2.1.1", + "@csstools/css-tokenizer": "^2.1.1" + } + }, + "node_modules/@csstools/selector-specificity": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-2.2.0.tgz", + "integrity": "sha512-+OJ9konv95ClSTOJCmMZqpd5+YGsB2S+x6w3E1oaM8UuR5j8nTNHYSz8c9BEPGDOCMQYIEEGlVPj/VY64iTbGw==", + "dev": true, + "engines": { + "node": "^14 || ^16 || >=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + }, + "peerDependencies": { + "postcss-selector-parser": "^6.0.10" + } + }, "node_modules/@develar/schema-utils": { "version": "2.6.5", "resolved": "https://registry.npmjs.org/@develar/schema-utils/-/schema-utils-2.6.5.tgz", @@ -512,12 +581,145 @@ "node": ">= 10.0.0" } }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.1.tgz", + "integrity": "sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.2.tgz", + "integrity": "sha512-3W4f5tDUra+pA+FzgugqL2pRimUTDJWKr7BINqOpkZrC0uYI0NIc0/JFgBROCU07HR6GieA5m3/rsPIhDmCXTQ==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.5.1", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/eslintrc/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/js": { + "version": "8.39.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.39.0.tgz", + "integrity": "sha512-kf9RB0Fg7NZfap83B3QOqOGg9QmD9yBudqQXzzOtn3i4y7ZUXe5ONeW34Gwi+TxhH4mvj72R1Zc300KUMa9Bng==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, "node_modules/@gar/promisify": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz", "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==", "dev": true }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.8", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", + "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==", + "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true + }, "node_modules/@malept/cross-spawn-promise": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@malept/cross-spawn-promise/-/cross-spawn-promise-2.0.0.tgz", @@ -597,6 +799,41 @@ "integrity": "sha512-4epgKfhywgOEeuy3aHv71qrc5iTYyqEXz/fu15Rvfgs43WHNJkLMNdtzuxhPXDGODLpltfySBIr2geWm63UdYA==", "dev": true }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/@nornagon/put": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/@nornagon/put/-/put-0.0.8.tgz", @@ -647,117 +884,6 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/@sentry/core": { - "version": "5.30.0", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-5.30.0.tgz", - "integrity": "sha512-TmfrII8w1PQZSZgPpUESqjB+jC6MvZJZdLtE/0hZ+SrnKhW3x5WlYLvTXZpcWePYBku7rl2wn1RZu6uT0qCTeg==", - "dev": true, - "dependencies": { - "@sentry/hub": "5.30.0", - "@sentry/minimal": "5.30.0", - "@sentry/types": "5.30.0", - "@sentry/utils": "5.30.0", - "tslib": "^1.9.3" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/@sentry/hub": { - "version": "5.30.0", - "resolved": "https://registry.npmjs.org/@sentry/hub/-/hub-5.30.0.tgz", - "integrity": "sha512-2tYrGnzb1gKz2EkMDQcfLrDTvmGcQPuWxLnJKXJvYTQDGLlEvi2tWz1VIHjunmOvJrB5aIQLhm+dcMRwFZDCqQ==", - "dev": true, - "dependencies": { - "@sentry/types": "5.30.0", - "@sentry/utils": "5.30.0", - "tslib": "^1.9.3" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/@sentry/minimal": { - "version": "5.30.0", - "resolved": "https://registry.npmjs.org/@sentry/minimal/-/minimal-5.30.0.tgz", - "integrity": "sha512-BwWb/owZKtkDX+Sc4zCSTNcvZUq7YcH3uAVlmh/gtR9rmUvbzAA3ewLuB3myi4wWRAMEtny6+J/FN/x+2wn9Xw==", - "dev": true, - "dependencies": { - "@sentry/hub": "5.30.0", - "@sentry/types": "5.30.0", - "tslib": "^1.9.3" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/@sentry/node": { - "version": "5.30.0", - "resolved": "https://registry.npmjs.org/@sentry/node/-/node-5.30.0.tgz", - "integrity": "sha512-Br5oyVBF0fZo6ZS9bxbJZG4ApAjRqAnqFFurMVJJdunNb80brh7a5Qva2kjhm+U6r9NJAB5OmDyPkA1Qnt+QVg==", - "dev": true, - "dependencies": { - "@sentry/core": "5.30.0", - "@sentry/hub": "5.30.0", - "@sentry/tracing": "5.30.0", - "@sentry/types": "5.30.0", - "@sentry/utils": "5.30.0", - "cookie": "^0.4.1", - "https-proxy-agent": "^5.0.0", - "lru_map": "^0.3.3", - "tslib": "^1.9.3" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/@sentry/node/node_modules/cookie": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", - "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/@sentry/tracing": { - "version": "5.30.0", - "resolved": "https://registry.npmjs.org/@sentry/tracing/-/tracing-5.30.0.tgz", - "integrity": "sha512-dUFowCr0AIMwiLD7Fs314Mdzcug+gBVo/+NCMyDw8tFxJkwWAKl7Qa2OZxLQ0ZHjakcj1hNKfCQJ9rhyfOl4Aw==", - "dev": true, - "dependencies": { - "@sentry/hub": "5.30.0", - "@sentry/minimal": "5.30.0", - "@sentry/types": "5.30.0", - "@sentry/utils": "5.30.0", - "tslib": "^1.9.3" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/@sentry/types": { - "version": "5.30.0", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-5.30.0.tgz", - "integrity": "sha512-R8xOqlSTZ+htqrfteCWU5Nk0CDN5ApUTvrlvBuiH1DyP6czDZ4ktbZB0hAgBlVcK0U+qpD3ag3Tqqpa5Q67rPw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/@sentry/utils": { - "version": "5.30.0", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-5.30.0.tgz", - "integrity": "sha512-zaYmoH0NWWtvnJjC9/CBseXMtKHm/tm40sz3YfJRxeQjyzRqNQPgivpd9R/oDJCYj999mzdW382p/qi2ypjLww==", - "dev": true, - "dependencies": { - "@sentry/types": "5.30.0", - "tslib": "^1.9.3" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/@sindresorhus/is": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", @@ -805,6 +931,12 @@ "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz", "integrity": "sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==" }, + "node_modules/@types/json-schema": { + "version": "7.0.11", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", + "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", + "dev": true + }, "node_modules/@types/keyv": { "version": "3.1.4", "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", @@ -813,15 +945,21 @@ "@types/node": "*" } }, + "node_modules/@types/minimist": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz", + "integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==", + "dev": true + }, "node_modules/@types/node": { "version": "18.15.13", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.13.tgz", "integrity": "sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q==" }, - "node_modules/@types/parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", + "node_modules/@types/normalize-package-data": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz", + "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==", "dev": true }, "node_modules/@types/plist": { @@ -843,6 +981,12 @@ "@types/node": "*" } }, + "node_modules/@types/semver": { + "version": "7.3.13", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz", + "integrity": "sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==", + "dev": true + }, "node_modules/@types/verror": { "version": "1.10.6", "resolved": "https://registry.npmjs.org/@types/verror/-/verror-1.10.6.tgz", @@ -859,6 +1003,239 @@ "@types/node": "*" } }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "5.59.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.1.tgz", + "integrity": "sha512-AVi0uazY5quFB9hlp2Xv+ogpfpk77xzsgsIEWyVS7uK/c7MZ5tw7ZPbapa0SbfkqE0fsAMkz5UwtgMLVk2BQAg==", + "dev": true, + "dependencies": { + "@eslint-community/regexpp": "^4.4.0", + "@typescript-eslint/scope-manager": "5.59.1", + "@typescript-eslint/type-utils": "5.59.1", + "@typescript-eslint/utils": "5.59.1", + "debug": "^4.3.4", + "grapheme-splitter": "^1.0.4", + "ignore": "^5.2.0", + "natural-compare-lite": "^1.4.0", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^5.0.0", + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/semver": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.0.tgz", + "integrity": "sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "5.59.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.1.tgz", + "integrity": "sha512-nzjFAN8WEu6yPRDizIFyzAfgK7nybPodMNFGNH0M9tei2gYnYszRDqVA0xlnRjkl7Hkx2vYrEdb6fP2a21cG1g==", + "dev": true, + "dependencies": { + "@typescript-eslint/scope-manager": "5.59.1", + "@typescript-eslint/types": "5.59.1", + "@typescript-eslint/typescript-estree": "5.59.1", + "debug": "^4.3.4" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "5.59.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.1.tgz", + "integrity": "sha512-mau0waO5frJctPuAzcxiNWqJR5Z8V0190FTSqRw1Q4Euop6+zTwHAf8YIXNwDOT29tyUDrQ65jSg9aTU/H0omA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.59.1", + "@typescript-eslint/visitor-keys": "5.59.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "5.59.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.1.tgz", + "integrity": "sha512-ZMWQ+Oh82jWqWzvM3xU+9y5U7MEMVv6GLioM3R5NJk6uvP47kZ7YvlgSHJ7ERD6bOY7Q4uxWm25c76HKEwIjZw==", + "dev": true, + "dependencies": { + "@typescript-eslint/typescript-estree": "5.59.1", + "@typescript-eslint/utils": "5.59.1", + "debug": "^4.3.4", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/types": { + "version": "5.59.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.1.tgz", + "integrity": "sha512-dg0ICB+RZwHlysIy/Dh1SP+gnXNzwd/KS0JprD3Lmgmdq+dJAJnUPe1gNG34p0U19HvRlGX733d/KqscrGC1Pg==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "5.59.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.1.tgz", + "integrity": "sha512-lYLBBOCsFltFy7XVqzX0Ju+Lh3WPIAWxYpmH/Q7ZoqzbscLiCW00LeYCdsUnnfnj29/s1WovXKh2gwCoinHNGA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.59.1", + "@typescript-eslint/visitor-keys": "5.59.1", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.0.tgz", + "integrity": "sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "5.59.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.1.tgz", + "integrity": "sha512-MkTe7FE+K1/GxZkP5gRj3rCztg45bEhsd8HYjczBuYm+qFHP5vtZmjx3B0yUCDotceQ4sHgTyz60Ycl225njmA==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@types/json-schema": "^7.0.9", + "@types/semver": "^7.3.12", + "@typescript-eslint/scope-manager": "5.59.1", + "@typescript-eslint/types": "5.59.1", + "@typescript-eslint/typescript-estree": "5.59.1", + "eslint-scope": "^5.1.1", + "semver": "^7.3.7" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/semver": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.0.tgz", + "integrity": "sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "5.59.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.1.tgz", + "integrity": "sha512-6waEYwBTCWryx0VJmP7JaM4FpipLsFl9CvYf2foAE8Qh/Y0s+bxWysciwOs0LTBED4JCaNxTZ5rGadB14M6dwA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.59.1", + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, "node_modules/7zip-bin": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/7zip-bin/-/7zip-bin-5.1.1.tgz", @@ -901,9 +1278,9 @@ } }, "node_modules/acorn": { - "version": "5.7.4", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.4.tgz", - "integrity": "sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg==", + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -913,24 +1290,12 @@ } }, "node_modules/acorn-jsx": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz", - "integrity": "sha512-AU7pnZkguthwBjKgCg6998ByQNIMjbuDQZ8bb78QAFZwPfmKia8AIzgY/gWgqCjnht8JLdXmB4YxA0KaV60ncQ==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, - "dependencies": { - "acorn": "^3.0.4" - } - }, - "node_modules/acorn-jsx/node_modules/acorn": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", - "integrity": "sha512-OLUyIIZ7mF5oaAUT1w0TFqQS81q3saT46x8t7ukpPjMNk+nbs4ZHhs7ToV8EWnLYLepjETXd4XaCE4uxkMeqUw==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, "node_modules/agent-base": { @@ -1032,15 +1397,6 @@ "ajv": "^6.9.1" } }, - "node_modules/ansi-escapes": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", - "integrity": "sha512-wiXutNjDUlNEDWHcYH3jtZUhd3c4/VojassD8zHdHCY13xbZy2XbW+NKQwA0tWGBVzDA9qEzYwfoSsWmviidhw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/ansi-red": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/ansi-red/-/ansi-red-0.1.1.tgz", @@ -1053,15 +1409,6 @@ "node": ">=0.10.0" } }, - "node_modules/ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -1237,6 +1584,24 @@ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/asn1": { "version": "0.2.6", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", @@ -1258,7 +1623,6 @@ "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", "dev": true, - "optional": true, "engines": { "node": ">=8" } @@ -1719,25 +2083,39 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/caller-path": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", - "integrity": "sha512-UJiE1otjXPF5/x+T3zTnSFiTOEmJoGTD9HmBoxnCUwho61a2eSNn/VwtwuIBDAo2SEOv1AJ7ARI5gCmohFLu/g==", + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true, - "dependencies": { - "callsites": "^0.2.0" - }, "engines": { - "node": ">=0.10.0" + "node": ">=6" } }, - "node_modules/callsites": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", - "integrity": "sha512-Zv4Dns9IbXXmPkgRRUjAaJQgfN4xX5p6+RQFhWUqscdvvK2xK/ZL8b3IXIJsj+4sD+f24NwnWy2BY8AJ82JB0A==", + "node_modules/camelcase-keys": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", + "integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", + "dev": true, + "dependencies": { + "camelcase": "^5.3.1", + "map-obj": "^4.0.0", + "quick-lru": "^4.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/camelcase-keys/node_modules/quick-lru": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", + "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, "node_modules/caseless": { @@ -1817,13 +2195,6 @@ "node": ">=8" } }, - "node_modules/circular-json": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", - "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==", - "deprecated": "CircularJSON is in maintenance only, flatted is its successor.", - "dev": true - }, "node_modules/clean-stack": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", @@ -1874,12 +2245,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/cli-width": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.1.tgz", - "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==", - "dev": true - }, "node_modules/cliui": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", @@ -1914,25 +2279,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", - "dev": true, - "engines": { - "iojs": ">= 1.0.0", - "node": ">= 0.12.0" - } - }, - "node_modules/code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/coffee-script": { "version": "1.12.7", "resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.12.7.tgz", @@ -1974,6 +2320,12 @@ "color-support": "bin.js" } }, + "node_modules/colord": { + "version": "2.9.3", + "resolved": "https://registry.npmjs.org/colord/-/colord-2.9.3.tgz", + "integrity": "sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw==", + "dev": true + }, "node_modules/combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -2100,6 +2452,19 @@ "typescript": "^4.0.2" } }, + "node_modules/config-file-ts/node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "node_modules/console-control-strings": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", @@ -2144,22 +2509,6 @@ "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", "dev": true }, - "node_modules/cosmiconfig": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz", - "integrity": "sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg==", - "dev": true, - "dependencies": { - "@types/parse-json": "^4.0.0", - "import-fresh": "^3.1.0", - "parse-json": "^5.0.0", - "path-type": "^4.0.0", - "yaml": "^1.7.2" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/crc": { "version": "3.8.0", "resolved": "https://registry.npmjs.org/crc/-/crc-3.8.0.tgz", @@ -2184,14 +2533,38 @@ "node": ">= 8" } }, - "node_modules/d": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", - "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "node_modules/css-functions-list": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/css-functions-list/-/css-functions-list-3.1.0.tgz", + "integrity": "sha512-/9lCvYZaUbBGvYUgYGFJ4dcYiyqdhSjG7IPVluoV8A1ILjkF7ilmhp1OGUz8n+nmBcu0RNrQAzgD8B6FJbrt2w==", + "dev": true, + "engines": { + "node": ">=12.22" + } + }, + "node_modules/css-tree": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz", + "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==", "dev": true, "dependencies": { - "es5-ext": "^0.10.50", - "type": "^1.0.1" + "mdn-data": "2.0.30", + "source-map-js": "^1.0.1" + }, + "engines": { + "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0" + } + }, + "node_modules/cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "dev": true, + "bin": { + "cssesc": "bin/cssesc" + }, + "engines": { + "node": ">=4" } }, "node_modules/dashdash": { @@ -2252,6 +2625,40 @@ } } }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/decamelize-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.1.tgz", + "integrity": "sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==", + "dev": true, + "dependencies": { + "decamelize": "^1.1.0", + "map-obj": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/decamelize-keys/node_modules/map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/decompress-response": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", @@ -2421,6 +2828,18 @@ "node": "*" } }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/discord-rpc": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/discord-rpc/-/discord-rpc-4.0.1.tgz", @@ -2512,16 +2931,15 @@ } }, "node_modules/doctrine": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", - "integrity": "sha512-lsGyRuYr4/PIB0txi+Fy2xOMI2dGaTguCaotzFGkVZuKR5usKfcRWIFKNM3QNrU7hh/+w2bwTW+ZeXPK5l8uVg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "dev": true, "dependencies": { - "esutils": "^2.0.2", - "isarray": "^1.0.0" + "esutils": "^2.0.2" }, "engines": { - "node": ">=0.10.0" + "node": ">=6.0.0" } }, "node_modules/dot-prop": { @@ -2780,97 +3198,12 @@ "is-arrayish": "^0.2.1" } }, - "node_modules/es5-ext": { - "version": "0.10.62", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", - "integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==", - "dev": true, - "hasInstallScript": true, - "dependencies": { - "es6-iterator": "^2.0.3", - "es6-symbol": "^3.1.3", - "next-tick": "^1.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, "node_modules/es6-error": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", "optional": true }, - "node_modules/es6-iterator": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", - "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", - "dev": true, - "dependencies": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" - } - }, - "node_modules/es6-map": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz", - "integrity": "sha512-mz3UqCh0uPCIqsw1SSAkB/p0rOzF/M0V++vyN7JqlPtSW/VsYgQBvVvqMLmfBuyMzTpLnNqi6JmcSizs4jy19A==", - "dev": true, - "dependencies": { - "d": "1", - "es5-ext": "~0.10.14", - "es6-iterator": "~2.0.1", - "es6-set": "~0.1.5", - "es6-symbol": "~3.1.1", - "event-emitter": "~0.3.5" - } - }, - "node_modules/es6-set": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.6.tgz", - "integrity": "sha512-TE3LgGLDIBX332jq3ypv6bcOpkLO0AslAQo7p2VqX/1N46YNsvIWgvjojjSEnWEGWMhr1qUbYeTSir5J6mFHOw==", - "dev": true, - "dependencies": { - "d": "^1.0.1", - "es5-ext": "^0.10.62", - "es6-iterator": "~2.0.3", - "es6-symbol": "^3.1.3", - "event-emitter": "^0.3.5", - "type": "^2.7.2" - }, - "engines": { - "node": ">=0.12" - } - }, - "node_modules/es6-set/node_modules/type": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", - "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==", - "dev": true - }, - "node_modules/es6-symbol": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", - "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", - "dev": true, - "dependencies": { - "d": "^1.0.1", - "ext": "^1.1.2" - } - }, - "node_modules/es6-weak-map": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", - "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", - "dev": true, - "dependencies": { - "d": "1", - "es5-ext": "^0.10.46", - "es6-iterator": "^2.0.3", - "es6-symbol": "^3.1.1" - } - }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -2889,7 +3222,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "optional": true, + "devOptional": true, "engines": { "node": ">=10" }, @@ -2897,198 +3230,232 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/escope": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz", - "integrity": "sha512-75IUQsusDdalQEW/G/2esa87J7raqdJF+Ca0/Xm5C3Q58Nr4yVYjZGp/P1+2xiEVgXRrA39dpRb8LcshajbqDQ==", - "dev": true, - "dependencies": { - "es6-map": "^0.1.3", - "es6-weak-map": "^2.0.1", - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/eslint": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-2.13.1.tgz", - "integrity": "sha512-29PFGeV6lLQrPaPHeCkjfgLRQPFflDiicoNZOw+c/JkaQ0Am55yUICdYZbmCiM+DSef+q7oCercimHvjNI0GAw==", + "version": "8.39.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.39.0.tgz", + "integrity": "sha512-mwiok6cy7KTW7rBpo05k6+p4YVZByLNjAZ/ACB9DRCu4YDRwjXI01tWHp6KAUWelsBetTxKK/2sHB0vdS8Z2Og==", "dev": true, "dependencies": { - "chalk": "^1.1.3", - "concat-stream": "^1.4.6", - "debug": "^2.1.1", - "doctrine": "^1.2.2", - "es6-map": "^0.1.3", - "escope": "^3.6.0", - "espree": "^3.1.6", - "estraverse": "^4.2.0", + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.4.0", + "@eslint/eslintrc": "^2.0.2", + "@eslint/js": "8.39.0", + "@humanwhocodes/config-array": "^0.11.8", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.0", + "eslint-visitor-keys": "^3.4.0", + "espree": "^9.5.1", + "esquery": "^1.4.2", "esutils": "^2.0.2", - "file-entry-cache": "^1.1.1", - "glob": "^7.0.3", - "globals": "^9.2.0", - "ignore": "^3.1.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "grapheme-splitter": "^1.0.4", + "ignore": "^5.2.0", + "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", - "inquirer": "^0.12.0", - "is-my-json-valid": "^2.10.0", - "is-resolvable": "^1.0.0", - "js-yaml": "^3.5.1", - "json-stable-stringify": "^1.0.0", - "levn": "^0.3.0", - "lodash": "^4.0.0", - "mkdirp": "^0.5.0", - "optionator": "^0.8.1", - "path-is-absolute": "^1.0.0", - "path-is-inside": "^1.0.1", - "pluralize": "^1.2.1", - "progress": "^1.1.8", - "require-uncached": "^1.0.2", - "shelljs": "^0.6.0", - "strip-json-comments": "~1.0.1", - "table": "^3.7.8", - "text-table": "~0.2.0", - "user-home": "^2.0.0" + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-sdsl": "^4.1.4", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "strip-ansi": "^6.0.1", + "strip-json-comments": "^3.1.0", + "text-table": "^0.2.0" }, "bin": { "eslint": "bin/eslint.js" }, "engines": { - "node": ">=0.10" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/eslint/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", "dev": true, "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/eslint/node_modules/chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", - "dev": true, - "dependencies": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" }, "engines": { - "node": ">=0.10.0" + "node": ">=8.0.0" } }, - "node_modules/eslint/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/eslint/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "node_modules/eslint-visitor-keys": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz", + "integrity": "sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==", "dev": true, "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/eslint/node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "node_modules/eslint/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "dependencies": { - "minimist": "^1.2.6" - }, - "bin": { - "mkdirp": "bin/cmd.js" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "node_modules/eslint/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/eslint/node_modules/progress": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/progress/-/progress-1.1.8.tgz", - "integrity": "sha512-UdA8mJ4weIkUBO224tIarHzuHs4HuYiJvsuGT7j/SPQiUJVjYvNDBIPa0hAorduOfjGohB/qHWRa/lrrWX/mXw==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/eslint/node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true - }, - "node_modules/eslint/node_modules/strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "node_modules/eslint/node_modules/eslint-scope": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.0.tgz", + "integrity": "sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==", "dev": true, "dependencies": { - "ansi-regex": "^2.0.0" + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" }, "engines": { - "node": ">=0.10.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", + "node_modules/eslint/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, "engines": { - "node": ">=0.8.0" + "node": ">=4.0" + } + }, + "node_modules/eslint/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/eslint/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/eslint/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" } }, "node_modules/espree": { - "version": "3.5.4", - "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.4.tgz", - "integrity": "sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A==", + "version": "9.5.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.1.tgz", + "integrity": "sha512-5yxtHSZXRSW5pvv3hAlXM5+/Oswi1AUFqBmbibKb5s6bp3rGIDkyXU6xCoyuuLhijr4SFwPrXRoZjz0AZDN9tg==", "dev": true, "dependencies": { - "acorn": "^5.5.0", - "acorn-jsx": "^3.0.0" + "acorn": "^8.8.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.0" }, "engines": { - "node": ">=0.10.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/esprima": { @@ -3104,6 +3471,27 @@ "node": ">=4" } }, + "node_modules/esquery": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "dev": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esquery/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, "node_modules/esrecurse": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", @@ -3151,16 +3539,6 @@ "node": ">= 0.6" } }, - "node_modules/event-emitter": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", - "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", - "dev": true, - "dependencies": { - "d": "1", - "es5-ext": "~0.10.14" - } - }, "node_modules/event-stream": { "version": "3.3.4", "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz", @@ -3175,15 +3553,6 @@ "through": "~2.3.1" } }, - "node_modules/exit-hook": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz", - "integrity": "sha512-MsG3prOVw1WtLXAZbM3KiYtooKR1LvxHh3VHsVtIy0uiUu8usxgB/94DP2HxtD/661lLdB6yzQ09lGJSQr6nkg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/expand-range": { "version": "1.8.2", "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", @@ -3250,21 +3619,6 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, - "node_modules/ext": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", - "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", - "dev": true, - "dependencies": { - "type": "^2.7.2" - } - }, - "node_modules/ext/node_modules/type": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", - "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==", - "dev": true - }, "node_modules/extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -3314,6 +3668,28 @@ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, + "node_modules/fast-diff": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", + "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", + "dev": true + }, + "node_modules/fast-glob": { + "version": "3.2.12", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", + "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -3325,6 +3701,24 @@ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true }, + "node_modules/fastest-levenshtein": { + "version": "1.0.16", + "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", + "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", + "dev": true, + "engines": { + "node": ">= 4.9.1" + } + }, + "node_modules/fastq": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, "node_modules/fd-slicer": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", @@ -3333,39 +3727,16 @@ "pend": "~1.2.0" } }, - "node_modules/figures": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", - "integrity": "sha512-UxKlfCRuCBxSXU4C6t9scbDyWZ4VlaFFdojKtzJuSkuOBQ5CNFum+zZXFwHjo+CxBC1t6zlYPgHIgFjL8ggoEQ==", - "dev": true, - "dependencies": { - "escape-string-regexp": "^1.0.5", - "object-assign": "^4.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/figures/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, "node_modules/file-entry-cache": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-1.3.1.tgz", - "integrity": "sha512-JyVk7P0Hvw6uEAwH4Y0j+rZMvaMWvLBYRmRGAF2S6jKTycf0mMDcC7d21Y2KyrKJk3XI8YghSsk5KmRdbvg0VQ==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, "dependencies": { - "flat-cache": "^1.2.1", - "object-assign": "^4.0.1" + "flat-cache": "^3.0.4" }, "engines": { - "node": ">=0.10.0" + "node": "^10.12.0 || >=12.0.0" } }, "node_modules/file-uri-to-path": { @@ -3441,31 +3812,23 @@ } }, "node_modules/flat-cache": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.4.tgz", - "integrity": "sha512-VwyB3Lkgacfik2vhqR4uv2rvebqmDvFu4jlN/C1RzWoJEo8I7z4Q404oiqYCkq41mni8EzQnm95emU9seckwtg==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", "dev": true, "dependencies": { - "circular-json": "^0.3.1", - "graceful-fs": "^4.1.2", - "rimraf": "~2.6.2", - "write": "^0.2.1" + "flatted": "^3.1.0", + "rimraf": "^3.0.2" }, "engines": { - "node": ">=0.10.0" + "node": "^10.12.0 || >=12.0.0" } }, - "node_modules/flat-cache/node_modules/rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - } + "node_modules/flatted": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", + "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", + "dev": true }, "node_modules/for-in": { "version": "1.0.2", @@ -3519,43 +3882,6 @@ "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", "integrity": "sha512-twe20eF1OxVxp/ML/kq2p1uc6KvFK/+vs8WjEbeKmV2He22MKm7YF2ANIt+EOqhJ5L3K/SuuPhk0hWQDjOM23g==" }, - "node_modules/front-matter": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/front-matter/-/front-matter-2.1.2.tgz", - "integrity": "sha512-wH9JJVUi/MUfRpSvYWltdC9FGFZdkcc2H7US7Sp3iYihXTpYWWEL7ZUHMBicA9MsFBR/EatSbYN5EtCaytfiNA==", - "dev": true, - "dependencies": { - "js-yaml": "^3.4.6" - } - }, - "node_modules/front-matter/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/front-matter/node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/front-matter/node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true - }, "node_modules/fs-extra": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", @@ -3632,24 +3958,6 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/generate-function": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz", - "integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==", - "dev": true, - "dependencies": { - "is-property": "^1.0.2" - } - }, - "node_modules/generate-object-property": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz", - "integrity": "sha512-TuOwZWgJ2VAMEGJvAyPWvpqxSANF0LDpmyHauMjFYzaACvn+QTT/AZomvPCzVBV7yDN3OmwHQ5OvHaeLKre3JQ==", - "dev": true, - "dependencies": { - "is-property": "^1.0.0" - } - }, "node_modules/get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -3779,15 +4087,80 @@ "node": ">=10" } }, - "node_modules/globals": { - "version": "9.18.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", - "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", + "node_modules/global-modules": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", + "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", + "dev": true, + "dependencies": { + "global-prefix": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/global-prefix": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", + "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", + "dev": true, + "dependencies": { + "ini": "^1.3.5", + "kind-of": "^6.0.2", + "which": "^1.3.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/global-prefix/node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true, "engines": { "node": ">=0.10.0" } }, + "node_modules/global-prefix/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/globals": { + "version": "13.20.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", + "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globals/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/globalthis": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", @@ -3803,81 +4176,30 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/globule": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/globule/-/globule-1.3.4.tgz", - "integrity": "sha512-OPTIfhMBh7JbBYDpa5b+Q5ptmMWKwcNcFSR/0c6t8V4f3ZAVBEsKNY37QdVqmLRYSMhOUGYrY0QhSoEpzGr/Eg==", + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", "dev": true, "dependencies": { - "glob": "~7.1.1", - "lodash": "^4.17.21", - "minimatch": "~3.0.2" + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" }, "engines": { - "node": ">= 0.10" - } - }, - "node_modules/globule/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/globule/node_modules/glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/isaacs" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/globule/node_modules/minimatch": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.8.tgz", - "integrity": "sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/gonzales-pe-sl": { - "version": "4.2.3", - "resolved": "git+ssh://git@github.com/srowhani/gonzales-pe.git#3b052416074edc280f7d04bbe40b2e410693c4a3", - "dev": true, - "license": "MIT", - "dependencies": { - "minimist": "1.1.x" - }, - "bin": { - "gonzales": "bin/gonzales.js" - }, - "engines": { - "node": ">=0.6.0" - } - }, - "node_modules/gonzales-pe-sl/node_modules/minimist": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.1.3.tgz", - "integrity": "sha512-2RbeLaM/Hbo9vJ1+iRrxzfDnX9108qb2m923U+s+Ot2eMey0IYGdSjzHmvtg2XsxoCuMnzOMw7qc573RvnLgwg==", + "node_modules/globjoin": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/globjoin/-/globjoin-0.1.4.tgz", + "integrity": "sha512-xYfnw62CKG8nLkZBfWbhWwDw02CHty86jfPcc2cr3ZfeuK9ysoVPPEUxf21bAD/rWAgk52SuBrLJlefNy8mvFg==", "dev": true }, "node_modules/got": { @@ -3909,6 +4231,12 @@ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" }, + "node_modules/grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "dev": true + }, "node_modules/gray-matter": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/gray-matter/-/gray-matter-2.1.1.tgz", @@ -3986,6 +4314,15 @@ "node": ">=6" } }, + "node_modules/hard-rejection": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", + "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -3997,18 +4334,6 @@ "node": ">= 0.4.0" } }, - "node_modules/has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==", - "dev": true, - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -4085,6 +4410,18 @@ "resolved": "https://registry.npmjs.org/hotkeys-js/-/hotkeys-js-3.10.2.tgz", "integrity": "sha512-Z6vLmJTYzkbZZXlBkhrYB962Q/rZGc/WHQiyEGu9ZZVF7bAeFDjjDa31grWREuw9Ygb4zmlov2bTkPYqj0aFnQ==" }, + "node_modules/html-tags": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-3.3.1.tgz", + "integrity": "sha512-ztqyC3kLto0e9WbNp0aeP+M3kTt+nbaIveGmUxAtZa+8iFgKLUOD4YKM5j+f3QD89bra7UeumolZHKuOXnTmeQ==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/http-cache-semantics": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", @@ -4217,10 +4554,13 @@ ] }, "node_modules/ignore": { - "version": "3.3.10", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", - "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", - "dev": true + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "dev": true, + "engines": { + "node": ">= 4" + } }, "node_modules/immutable": { "version": "4.3.0", @@ -4252,6 +4592,15 @@ "node": ">=4" } }, + "node_modules/import-lazy": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-4.0.0.tgz", + "integrity": "sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -4291,129 +4640,11 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, - "node_modules/inquirer": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-0.12.0.tgz", - "integrity": "sha512-bOetEz5+/WpgaW4D1NYOk1aD+JCqRjqu/FwRFgnIfiP7FC/zinsrfyO1vlS3nyH/R7S0IH3BIHBu4DBIDSqiGQ==", - "dev": true, - "dependencies": { - "ansi-escapes": "^1.1.0", - "ansi-regex": "^2.0.0", - "chalk": "^1.0.0", - "cli-cursor": "^1.0.1", - "cli-width": "^2.0.0", - "figures": "^1.3.5", - "lodash": "^4.3.0", - "readline2": "^1.0.1", - "run-async": "^0.1.0", - "rx-lite": "^3.1.2", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.0", - "through": "^2.3.6" - } - }, - "node_modules/inquirer/node_modules/ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/inquirer/node_modules/chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", - "dev": true, - "dependencies": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/inquirer/node_modules/cli-cursor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", - "integrity": "sha512-25tABq090YNKkF6JH7lcwO0zFJTRke4Jcq9iX2nr/Sz0Cjjv4gckmwlW6Ty/aoyFd6z3ysR2hMGC2GFugmBo6A==", - "dev": true, - "dependencies": { - "restore-cursor": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/inquirer/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/inquirer/node_modules/onetime": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", - "integrity": "sha512-GZ+g4jayMqzCRMgB2sol7GiCLjKfS1PINkjmx8spcKce1LiVqcbQreXwqs2YAFXC6R03VIG28ZS31t8M866v6A==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/inquirer/node_modules/restore-cursor": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", - "integrity": "sha512-reSjH4HuiFlxlaBaFCiS6O76ZGG2ygKoSlCsipKdaZuKSPx/+bt9mULkn4l0asVzbEfQQmXRg6Wp6gv6m0wElw==", - "dev": true, - "dependencies": { - "exit-hook": "^1.0.0", - "onetime": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/inquirer/node_modules/string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==", - "dev": true, - "dependencies": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/inquirer/node_modules/strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", - "dev": true, - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/inquirer/node_modules/supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true }, "node_modules/ip": { "version": "2.0.0", @@ -4479,6 +4710,18 @@ "is-ci": "bin.js" } }, + "node_modules/is-core-module": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.0.tgz", + "integrity": "sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-date-object": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", @@ -4510,18 +4753,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==", - "dev": true, - "dependencies": { - "number-is-nan": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -4548,25 +4779,6 @@ "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==", "dev": true }, - "node_modules/is-my-ip-valid": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-my-ip-valid/-/is-my-ip-valid-1.0.1.tgz", - "integrity": "sha512-jxc8cBcOWbNK2i2aTkCZP6i7wkHF1bqKFrwEHuN5Jtg5BSaZHUZQ/JTOJwoV41YvHnOaRyWWh72T/KvfNz9DJg==", - "dev": true - }, - "node_modules/is-my-json-valid": { - "version": "2.20.6", - "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.20.6.tgz", - "integrity": "sha512-1JQwulVNjx8UqkPE/bqDaxtH4PXCe/2VRh/y3p99heOV87HG4Id5/VfDswd+YiAfHcRTfDlWgISycnHuhZq1aw==", - "dev": true, - "dependencies": { - "generate-function": "^2.0.0", - "generate-object-property": "^1.1.0", - "is-my-ip-valid": "^1.0.0", - "jsonpointer": "^5.0.0", - "xtend": "^4.0.0" - } - }, "node_modules/is-number": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", @@ -4587,6 +4799,24 @@ "node": ">=8" } }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-plain-object": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", @@ -4608,12 +4838,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-property": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", - "integrity": "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==", - "dev": true - }, "node_modules/is-regex": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", @@ -4629,12 +4853,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-resolvable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", - "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", - "dev": true - }, "node_modules/is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -4733,6 +4951,16 @@ "node": "*" } }, + "node_modules/js-sdsl": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.4.0.tgz", + "integrity": "sha512-FfVSdx6pJ41Oa+CF7RDaFmTnCaFhua+SNYQX74riGOpl96x+2jQCqEfQ2bnXu/5DPCqlRuiqyvTJM0Qjz26IVg==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/js-sdsl" + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -4787,17 +5015,11 @@ "resolved": "https://registry.npmjs.org/json-schema-typed/-/json-schema-typed-7.0.3.tgz", "integrity": "sha512-7DE8mpG+/fVw+dTpjbxnx47TaMnDfOI1jwft9g1VybltZCduyRQPJPvc+zzKY9WPHxhPWczyFuYa6I8Mw4iU5A==" }, - "node_modules/json-stable-stringify": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.2.tgz", - "integrity": "sha512-eunSSaEnxV12z+Z73y/j5N37/In40GK4GmsSy+tEHJMxknvqnA7/djeYtAgW0GsWHUfg+847WJjKaEylk2y09g==", - "dev": true, - "dependencies": { - "jsonify": "^0.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true }, "node_modules/json-stringify-safe": { "version": "5.0.1", @@ -4824,24 +5046,6 @@ "graceful-fs": "^4.1.6" } }, - "node_modules/jsonify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.1.tgz", - "integrity": "sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/jsonpointer": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-5.0.1.tgz", - "integrity": "sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/jsprim": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", @@ -4894,12 +5098,6 @@ "node": ">=0.10.0" } }, - "node_modules/known-css-properties": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.3.0.tgz", - "integrity": "sha512-QMQcnKAiQccfQTqtBh/qwquGZ2XK/DXND1jrcN9M8gMMy99Gwla7GQjndVUsEqIaRyP6bsFRuhwRj5poafBGJQ==", - "dev": true - }, "node_modules/lazy-cache": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-2.0.2.tgz", @@ -4919,13 +5117,13 @@ "dev": true }, "node_modules/levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, "dependencies": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" }, "engines": { "node": ">= 0.8.0" @@ -4976,16 +5174,10 @@ "integrity": "sha512-xYHt68QRoYGjeeM/XOE1uJtvXQAgvszfBhjV4yvsQH0u2i9I6cI6c6/eG4Hh3UAOVn0y/xAXwmTzEay49Q//HA==", "dev": true }, - "node_modules/lodash.capitalize": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/lodash.capitalize/-/lodash.capitalize-4.2.1.tgz", - "integrity": "sha512-kZzYOKspf8XVX5AvmQF94gQW0lejFVgb80G85bU4ZWzoJ6C03PQg3coYAUpSTpQWelrZELd3XWgHzw4Ck5kaIw==", - "dev": true - }, - "node_modules/lodash.kebabcase": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz", - "integrity": "sha512-N8XRTIMMqqDgSy4VLKPnJ/+hpGZN+PHQiJnSenYqPaVV/NCqEogTnAdZLQiGKhxX+JCs8waWq2t1XHWKOmlY8g==", + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, "node_modules/lodash.template": { @@ -5007,6 +5199,12 @@ "lodash._reinterpolate": "^3.0.0" } }, + "node_modules/lodash.truncate": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", + "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==", + "dev": true + }, "node_modules/log-symbols": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", @@ -5036,12 +5234,6 @@ "node": ">=8" } }, - "node_modules/lru_map": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/lru_map/-/lru_map-0.3.3.tgz", - "integrity": "sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ==", - "dev": true - }, "node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -5089,6 +5281,18 @@ "node": ">=12" } }, + "node_modules/map-obj": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz", + "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/map-stream": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz", @@ -5147,6 +5351,22 @@ "integrity": "sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A==", "dev": true }, + "node_modules/mathml-tag-names": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/mathml-tag-names/-/mathml-tag-names-2.1.3.tgz", + "integrity": "sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/mdn-data": { + "version": "2.0.30", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz", + "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==", + "dev": true + }, "node_modules/media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -5155,17 +5375,67 @@ "node": ">= 0.6" } }, - "node_modules/merge": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/merge/-/merge-1.2.1.tgz", - "integrity": "sha512-VjFo4P5Whtj4vsLzsYBu5ayHhoHJ0UqNm7ibvShmbmoz7tGi0vXaoJbGdB+GmDMLUdg8DpQXEIeVDAe8MaABvQ==", - "dev": true + "node_modules/meow": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-9.0.0.tgz", + "integrity": "sha512-+obSblOQmRhcyBt62furQqRAQpNyWXo8BuQ5bN7dG8wmwQ+vwHKp/rCFD4CrTP8CsDQD1sjoZ94K417XEUk8IQ==", + "dev": true, + "dependencies": { + "@types/minimist": "^1.2.0", + "camelcase-keys": "^6.2.2", + "decamelize": "^1.2.0", + "decamelize-keys": "^1.1.0", + "hard-rejection": "^2.1.0", + "minimist-options": "4.1.0", + "normalize-package-data": "^3.0.0", + "read-pkg-up": "^7.0.1", + "redent": "^3.0.0", + "trim-newlines": "^3.0.0", + "type-fest": "^0.18.0", + "yargs-parser": "^20.2.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/meow/node_modules/type-fest": { + "version": "0.18.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz", + "integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/meow/node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "engines": { + "node": ">=10" + } }, "node_modules/merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, "node_modules/methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", @@ -5174,6 +5444,19 @@ "node": ">= 0.6" } }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, "node_modules/mime": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz", @@ -5221,6 +5504,15 @@ "node": ">=4" } }, + "node_modules/min-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/minimatch": { "version": "5.1.6", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", @@ -5242,6 +5534,29 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/minimist-options": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz", + "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==", + "dev": true, + "dependencies": { + "arrify": "^1.0.1", + "is-plain-obj": "^1.1.0", + "kind-of": "^6.0.3" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/minimist-options/node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/minipass": { "version": "3.3.6", "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", @@ -5384,18 +5699,42 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, - "node_modules/mute-stream": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.5.tgz", - "integrity": "sha512-EbrziT4s8cWPmzr47eYVW3wimS4HsvlnV5ri1xw1aR6JQo/OrJX5rkl32K/QQHdxeabJETtfeaROGhd8W7uBgg==", - "dev": true - }, "node_modules/nan": { "version": "2.17.0", "resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz", "integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==", "optional": true }, + "node_modules/nanoid": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", + "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, + "node_modules/natural-compare-lite": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", + "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", + "dev": true + }, "node_modules/negotiator": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", @@ -5404,12 +5743,6 @@ "node": ">= 0.6" } }, - "node_modules/next-tick": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", - "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==", - "dev": true - }, "node_modules/node-abi": { "version": "3.40.0", "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.40.0.tgz", @@ -5467,6 +5800,12 @@ "node": ">=10" } }, + "node_modules/node-cleanup": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/node-cleanup/-/node-cleanup-2.1.2.tgz", + "integrity": "sha512-qN8v/s2PAJwGUtr1/hYTpNKlD6Y9rc4p8KSmJXyGdYGZsDGKXrGThikLFP9OCHFeLeEpQzPwiAtdIvBLqm//Hw==", + "dev": true + }, "node_modules/node-fetch": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.9.tgz", @@ -5540,6 +5879,36 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, + "node_modules/normalize-package-data": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz", + "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==", + "dev": true, + "dependencies": { + "hosted-git-info": "^4.0.1", + "is-core-module": "^2.5.0", + "semver": "^7.3.4", + "validate-npm-package-license": "^3.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/normalize-package-data/node_modules/semver": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.0.tgz", + "integrity": "sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -5574,15 +5943,6 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/oauth-sign": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", @@ -5591,15 +5951,6 @@ "node": "*" } }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/object-inspect": { "version": "1.12.3", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", @@ -5694,17 +6045,17 @@ } }, "node_modules/optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", "dev": true, "dependencies": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" }, "engines": { "node": ">= 0.8.0" @@ -5733,15 +6084,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/p-cancelable": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz", @@ -5862,12 +6204,6 @@ "node": ">=0.10.0" } }, - "node_modules/path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==", - "dev": true - }, "node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -5877,6 +6213,12 @@ "node": ">=8" } }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, "node_modules/path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", @@ -5909,6 +6251,12 @@ "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==" }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", @@ -5944,25 +6292,116 @@ "node": ">=6" } }, - "node_modules/pluralize": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-1.2.1.tgz", - "integrity": "sha512-TH+BeeL6Ct98C7as35JbZLf8lgsRzlNJb5gklRIGHKaPkGl1esOKBc5ALUMd+q08Sr6tiEKM+Icbsxg5vuhMKQ==", + "node_modules/postcss": { + "version": "8.4.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.23.tgz", + "integrity": "sha512-bQ3qMcpF6A/YjR55xtoTr0jGOlnPOKAIMdOWiv0EIT6HVPEaJiJB4NLljSbiHoC2RX7DN5Uvjtpbg1NPdwv1oA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "nanoid": "^3.3.6", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/postcss-media-query-parser": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/postcss-media-query-parser/-/postcss-media-query-parser-0.2.3.tgz", + "integrity": "sha512-3sOlxmbKcSHMjlUXQZKQ06jOswE7oVkXPxmZdoB1r5l0q6gTFTQSHxNxOrCccElbW7dxNytifNEo8qidX2Vsig==", + "dev": true + }, + "node_modules/postcss-resolve-nested-selector": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.1.tgz", + "integrity": "sha512-HvExULSwLqHLgUy1rl3ANIqCsvMS0WHss2UOsXhXnQaZ9VCc2oBvIpXrl00IUFT5ZDITME0o6oiXeiHr2SAIfw==", + "dev": true + }, + "node_modules/postcss-safe-parser": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/postcss-safe-parser/-/postcss-safe-parser-6.0.0.tgz", + "integrity": "sha512-FARHN8pwH+WiS2OPCxJI8FuRJpTVnn6ZNFiqAM2aeW2LwTHWWmWgIyKC6cUo0L8aeKiF/14MNvnpls6R2PBeMQ==", + "dev": true, + "engines": { + "node": ">=12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + "peerDependencies": { + "postcss": "^8.3.3" + } + }, + "node_modules/postcss-scss": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-4.0.6.tgz", + "integrity": "sha512-rLDPhJY4z/i4nVFZ27j9GqLxj1pwxE80eAzUNRMXtcpipFYIeowerzBgG3yJhMtObGEXidtIgbUpQ3eLDsf5OQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss-scss" + } + ], + "engines": { + "node": ">=12.0" + }, + "peerDependencies": { + "postcss": "^8.4.19" + } + }, + "node_modules/postcss-selector-parser": { + "version": "6.0.12", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.12.tgz", + "integrity": "sha512-NdxGCAZdRrwVI1sy59+Wzrh+pMMHxapGnpfenDVlMEXoOcvt4pGE0JLK9YY2F5dLxcFYA/YbVQKhcGU+FtSYQg==", + "dev": true, + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", "dev": true }, "node_modules/prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true, "engines": { "node": ">= 0.8.0" } }, "node_modules/prettier": { - "version": "2.8.7", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.7.tgz", - "integrity": "sha512-yPngTo3aXUUmyuTjeTUT75txrf+aMh9FiD7q9ZE/i6r0bPb22g4FsE6Y338PQX1bmfy08i9QQCB7/rcUAVntfw==", + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", "dev": true, "bin": { "prettier": "bin-prettier.js" @@ -5974,6 +6413,18 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, + "node_modules/prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dev": true, + "dependencies": { + "fast-diff": "^1.1.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", @@ -6019,6 +6470,21 @@ "node": ">= 0.10" } }, + "node_modules/ps-tree": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/ps-tree/-/ps-tree-1.2.0.tgz", + "integrity": "sha512-0VnamPPYHl4uaU/nSFeZZpR21QAWRz+sRv4iW9+v/GS/J5U5iZB5BNN6J0RMoOvdx2gWM2+ZFMIm58q24e4UYA==", + "dev": true, + "dependencies": { + "event-stream": "=3.3.4" + }, + "bin": { + "ps-tree": "bin/ps-tree.js" + }, + "engines": { + "node": ">= 0.10" + } + }, "node_modules/psl": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", @@ -6055,6 +6521,26 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/quick-lru": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", @@ -6148,6 +6634,129 @@ "node": ">=12.0.0" } }, + "node_modules/read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dev": true, + "dependencies": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "dev": true, + "dependencies": { + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/read-pkg-up/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg/node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, + "node_modules/read-pkg/node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/read-pkg/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/read-pkg/node_modules/type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/readable-stream": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", @@ -6180,15 +6789,17 @@ "node": ">=8.10.0" } }, - "node_modules/readline2": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/readline2/-/readline2-1.0.1.tgz", - "integrity": "sha512-8/td4MmwUB6PkZUbV25uKz7dfrmjYWxsW8DVfibWdlHRk/l/DfHKn4pU+dfcoGLFgWOdyGCzINRQD7jn+Bv+/g==", + "node_modules/redent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", + "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", "dev": true, "dependencies": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "mute-stream": "0.0.5" + "indent-string": "^4.0.0", + "strip-indent": "^3.0.0" + }, + "engines": { + "node": ">=8" } }, "node_modules/regexp.prototype.flags": { @@ -6336,17 +6947,21 @@ "node": ">=0.10.0" } }, - "node_modules/require-uncached": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", - "integrity": "sha512-Xct+41K3twrbBHdxAgMoOS+cNcoqIjfM2/VxBF4LL2hVph7YsF8VSKyQ3BDFZwEVbok9yeDl2le/qo0S77WG2w==", + "node_modules/resolve": { + "version": "1.22.2", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", + "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", "dev": true, "dependencies": { - "caller-path": "^0.1.0", - "resolve-from": "^1.0.0" + "is-core-module": "^2.11.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" }, - "engines": { - "node": ">=0.10.0" + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/resolve-alpn": { @@ -6354,15 +6969,6 @@ "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==" }, - "node_modules/resolve-from": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", - "integrity": "sha512-kT10v4dhrlLNcnO084hEjvXCI1wUG9qZLoz2RogxqDQQYy7IxjI/iMUkOtQTNEh6rzHxvdQWHsJyel1pKOVCxg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/responselike": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz", @@ -6396,6 +7002,16 @@ "node": ">= 4" } }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, "node_modules/rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", @@ -6428,21 +7044,29 @@ "node": ">=8.0" } }, - "node_modules/run-async": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-0.1.0.tgz", - "integrity": "sha512-qOX+w+IxFgpUpJfkv2oGN0+ExPs68F4sZHfaRRx4dDexAQkG83atugKVEylyT5ARees3HBbfmuvnjbrd8j9Wjw==", + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], "dependencies": { - "once": "^1.3.0" + "queue-microtask": "^1.2.2" } }, - "node_modules/rx-lite": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-3.1.2.tgz", - "integrity": "sha512-1I1+G2gteLB8Tkt8YI1sJvSIfa0lWuRtC8GjvtyPBcLSF5jBCCJJqKrpER5JU5r6Bhe+i9/pK3VMuUcXu0kdwQ==", - "dev": true - }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -6492,126 +7116,6 @@ "node": ">=14.0.0" } }, - "node_modules/sass-lint": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/sass-lint/-/sass-lint-1.13.1.tgz", - "integrity": "sha512-DSyah8/MyjzW2BWYmQWekYEKir44BpLqrCFsgs9iaWiVTcwZfwXHF586hh3D1n+/9ihUNMfd8iHAyb9KkGgs7Q==", - "dev": true, - "dependencies": { - "commander": "^2.8.1", - "eslint": "^2.7.0", - "front-matter": "2.1.2", - "fs-extra": "^3.0.1", - "glob": "^7.0.0", - "globule": "^1.0.0", - "gonzales-pe-sl": "^4.2.3", - "js-yaml": "^3.5.4", - "known-css-properties": "^0.3.0", - "lodash.capitalize": "^4.1.0", - "lodash.kebabcase": "^4.0.0", - "merge": "^1.2.0", - "path-is-absolute": "^1.0.0", - "util": "^0.10.3" - }, - "bin": { - "sass-lint": "bin/sass-lint.js" - } - }, - "node_modules/sass-lint-auto-fix": { - "version": "0.21.2", - "resolved": "https://registry.npmjs.org/sass-lint-auto-fix/-/sass-lint-auto-fix-0.21.2.tgz", - "integrity": "sha512-dT+RYAHVZcDQTMvPSHbwvm8JzXNrsGOzg7lKHM90ibUoBeMPvSsKGGfPJMZJzRmT87ehM2tKiWrYUnjFk4GMoA==", - "dev": true, - "dependencies": { - "@sentry/node": "^5.7.0", - "chalk": "^3.0.0", - "commander": "^4.0.1", - "cosmiconfig": "^6.0.0", - "glob": "^7.1.4", - "gonzales-pe-sl": "github:srowhani/gonzales-pe#dev", - "merge": "^1.2.1", - "sass-lint": "^1.13.1" - }, - "bin": { - "sass-lint-auto-fix": "dist/index.js" - } - }, - "node_modules/sass-lint-auto-fix/node_modules/chalk": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", - "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/sass-lint-auto-fix/node_modules/commander": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", - "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, - "node_modules/sass-lint/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/sass-lint/node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - }, - "node_modules/sass-lint/node_modules/fs-extra": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-3.0.1.tgz", - "integrity": "sha512-V3Z3WZWVUYd8hoCL5xfXJCaHWYzmtwW5XWYSlLgERi8PWd8bx1kUHUk8L1BT57e49oKnDDD180mjfrHc1yA9rg==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.2", - "jsonfile": "^3.0.0", - "universalify": "^0.1.0" - } - }, - "node_modules/sass-lint/node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/sass-lint/node_modules/jsonfile": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-3.0.1.tgz", - "integrity": "sha512-oBko6ZHlubVB5mRFkur5vgYR1UyqX+S6Y/oCfLhqNdcc2fYFlDpIoNc7AfKS1KOGcnNAkvsr0grLck9ANM815w==", - "dev": true, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/sass-lint/node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true - }, "node_modules/sax": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", @@ -6768,18 +7272,6 @@ "node": ">=8" } }, - "node_modules/shelljs": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.6.1.tgz", - "integrity": "sha512-B1vvzXQlJ77SURr3SIUQ/afh+LwecDKAVKE1wqkBlr2PCHoZDaF6MFD+YX1u9ddQjR4z2CKx1tdqvS2Xfs5h1A==", - "dev": true, - "bin": { - "shjs": "bin/shjs" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/side-channel": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", @@ -6820,6 +7312,15 @@ "semver": "bin/semver.js" } }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/slice-ansi": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz", @@ -6908,6 +7409,38 @@ "source-map": "^0.6.0" } }, + "node_modules/spdx-correct": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "dev": true, + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "dev": true + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.13", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.13.tgz", + "integrity": "sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w==", + "dev": true + }, "node_modules/split": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz", @@ -7001,6 +7534,15 @@ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true }, + "node_modules/string-argv": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz", + "integrity": "sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==", + "dev": true, + "engines": { + "node": ">=0.6.19" + } + }, "node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -7054,16 +7596,233 @@ "node": ">=0.10.0" } }, - "node_modules/strip-json-comments": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz", - "integrity": "sha512-AOPG8EBc5wAikaG1/7uFCNFJwnKOuQwFTpYBdTW6OvWHeZBQBrAA/amefHGrEiOnCPcLFZK6FUPtWVKpQVIRgg==", + "node_modules/strip-indent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", + "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", "dev": true, - "bin": { - "strip-json-comments": "cli.js" + "dependencies": { + "min-indent": "^1.0.0" }, "engines": { - "node": ">=0.8.0" + "node": ">=8" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/style-search": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/style-search/-/style-search-0.1.0.tgz", + "integrity": "sha512-Dj1Okke1C3uKKwQcetra4jSuk0DqbzbYtXipzFlFMZtowbF1x7BKJwB9AayVMyFARvU8EDrZdcax4At/452cAg==", + "dev": true + }, + "node_modules/stylelint": { + "version": "15.6.0", + "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-15.6.0.tgz", + "integrity": "sha512-Cqzpc8tvJm77KaM8qUbhpJ/UYK55Ia0whQXj4b9IId9dlPICO7J8Lyo15SZWiHxKjlvy3p5FQor/3n6i8ignXg==", + "dev": true, + "dependencies": { + "@csstools/css-parser-algorithms": "^2.1.1", + "@csstools/css-tokenizer": "^2.1.1", + "@csstools/media-query-list-parser": "^2.0.4", + "@csstools/selector-specificity": "^2.2.0", + "balanced-match": "^2.0.0", + "colord": "^2.9.3", + "cosmiconfig": "^8.1.3", + "css-functions-list": "^3.1.0", + "css-tree": "^2.3.1", + "debug": "^4.3.4", + "fast-glob": "^3.2.12", + "fastest-levenshtein": "^1.0.16", + "file-entry-cache": "^6.0.1", + "global-modules": "^2.0.0", + "globby": "^11.1.0", + "globjoin": "^0.1.4", + "html-tags": "^3.3.1", + "ignore": "^5.2.4", + "import-lazy": "^4.0.0", + "imurmurhash": "^0.1.4", + "is-plain-object": "^5.0.0", + "known-css-properties": "^0.27.0", + "mathml-tag-names": "^2.1.3", + "meow": "^9.0.0", + "micromatch": "^4.0.5", + "normalize-path": "^3.0.0", + "picocolors": "^1.0.0", + "postcss": "^8.4.22", + "postcss-media-query-parser": "^0.2.3", + "postcss-resolve-nested-selector": "^0.1.1", + "postcss-safe-parser": "^6.0.0", + "postcss-selector-parser": "^6.0.11", + "postcss-value-parser": "^4.2.0", + "resolve-from": "^5.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "style-search": "^0.1.0", + "supports-hyperlinks": "^3.0.0", + "svg-tags": "^1.0.0", + "table": "^6.8.1", + "v8-compile-cache": "^2.3.0", + "write-file-atomic": "^5.0.0" + }, + "bin": { + "stylelint": "bin/stylelint.js" + }, + "engines": { + "node": "^14.13.1 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/stylelint" + } + }, + "node_modules/stylelint-config-recommended": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-12.0.0.tgz", + "integrity": "sha512-x6x8QNARrGO2sG6iURkzqL+Dp+4bJorPMMRNPScdvaUK8PsynriOcMW7AFDKqkWAS5wbue/u8fUT/4ynzcmqdQ==", + "dev": true, + "peerDependencies": { + "stylelint": "^15.5.0" + } + }, + "node_modules/stylelint-config-recommended-scss": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-11.0.0.tgz", + "integrity": "sha512-EDghTDU7aOv2LTsRZvcT1w8mcjUaMhuy+t38iV5I/0Qiu6ixdkRwhLEMul3K/fnB2v9Nwqvb3xpvJfPH+HduDw==", + "dev": true, + "dependencies": { + "postcss-scss": "^4.0.6", + "stylelint-config-recommended": "^12.0.0", + "stylelint-scss": "^4.6.0" + }, + "peerDependencies": { + "postcss": "^8.3.3", + "stylelint": "^15.5.0" + }, + "peerDependenciesMeta": { + "postcss": { + "optional": true + } + } + }, + "node_modules/stylelint-config-standard": { + "version": "33.0.0", + "resolved": "https://registry.npmjs.org/stylelint-config-standard/-/stylelint-config-standard-33.0.0.tgz", + "integrity": "sha512-eyxnLWoXImUn77+ODIuW9qXBDNM+ALN68L3wT1lN2oNspZ7D9NVGlNHb2QCUn4xDug6VZLsh0tF8NyoYzkgTzg==", + "dev": true, + "dependencies": { + "stylelint-config-recommended": "^12.0.0" + }, + "peerDependencies": { + "stylelint": "^15.5.0" + } + }, + "node_modules/stylelint-config-standard-scss": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/stylelint-config-standard-scss/-/stylelint-config-standard-scss-9.0.0.tgz", + "integrity": "sha512-yPKpJsrZn4ybuQZx/DkEHuCjw7pJginErE/47dFhCnrvD48IJ4UYec8tSiCuJWMA3HRjbIa3nh5ZeSauDGuVAg==", + "dev": true, + "dependencies": { + "stylelint-config-recommended-scss": "^11.0.0", + "stylelint-config-standard": "^33.0.0" + }, + "peerDependencies": { + "postcss": "^8.3.3", + "stylelint": "^15.5.0" + }, + "peerDependenciesMeta": { + "postcss": { + "optional": true + } + } + }, + "node_modules/stylelint-prettier": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/stylelint-prettier/-/stylelint-prettier-3.0.0.tgz", + "integrity": "sha512-kIks1xw6np0zElokMT2kP6ar3S4MBoj6vUtPJuND1pFELMpZxVS/0uHPR4HDAVn0WAD3I5oF0IA3qBFxBpMkLg==", + "dev": true, + "dependencies": { + "prettier-linter-helpers": "^1.0.0" + }, + "engines": { + "node": "^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "prettier": ">=2.0.0", + "stylelint": ">=14.0.0" + } + }, + "node_modules/stylelint-scss": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-4.7.0.tgz", + "integrity": "sha512-TSUgIeS0H3jqDZnby1UO1Qv3poi1N8wUYIJY6D1tuUq2MN3lwp/rITVo0wD+1SWTmRm0tNmGO0b7nKInnqF6Hg==", + "dev": true, + "dependencies": { + "postcss-media-query-parser": "^0.2.3", + "postcss-resolve-nested-selector": "^0.1.1", + "postcss-selector-parser": "^6.0.11", + "postcss-value-parser": "^4.2.0" + }, + "peerDependencies": { + "stylelint": "^14.5.1 || ^15.0.0" + } + }, + "node_modules/stylelint/node_modules/balanced-match": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-2.0.0.tgz", + "integrity": "sha512-1ugUSr8BHXRnK23KfuYS+gVMC3LB8QGH9W1iGtDPsNWoQbgtXSExkBu2aDR4epiGWZOjZsj6lDl/N/AqqTC3UA==", + "dev": true + }, + "node_modules/stylelint/node_modules/cosmiconfig": { + "version": "8.1.3", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.1.3.tgz", + "integrity": "sha512-/UkO2JKI18b5jVMJUp0lvKFMpa/Gye+ZgZjKD+DGEN9y7NRcf/nK1A0sp67ONmKtnDCNMS44E6jrk0Yc3bDuUw==", + "dev": true, + "dependencies": { + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "parse-json": "^5.0.0", + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/d-fischer" + } + }, + "node_modules/stylelint/node_modules/is-plain-object": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stylelint/node_modules/known-css-properties": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.27.0.tgz", + "integrity": "sha512-uMCj6+hZYDoffuvAJjFAPz56E9uoowFHmTkqRtRq5WyC5Q6Cu/fTZKNQpX/RbzChBYLLl3lo8CjFZBAZXq9qFg==", + "dev": true + }, + "node_modules/stylelint/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "engines": { + "node": ">=8" } }, "node_modules/sumchecker": { @@ -7089,144 +7848,99 @@ "node": ">=8" } }, - "node_modules/table": { - "version": "3.8.3", - "resolved": "https://registry.npmjs.org/table/-/table-3.8.3.tgz", - "integrity": "sha512-RZuzIOtzFbprLCE0AXhkI0Xi42ZJLZhCC+qkwuMLf/Vjz3maWpA8gz1qMdbmNoI9cOROT2Am/DxeRyXenrL11g==", + "node_modules/supports-hyperlinks": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-3.0.0.tgz", + "integrity": "sha512-QBDPHyPQDRTy9ku4URNGY5Lah8PAaXs6tAAwp55sL5WCsSW7GIfdf6W5ixfziW+t7wh3GVvHyHHyQ1ESsoRvaA==", "dev": true, "dependencies": { - "ajv": "^4.7.0", - "ajv-keywords": "^1.0.0", - "chalk": "^1.1.1", - "lodash": "^4.0.0", - "slice-ansi": "0.0.4", - "string-width": "^2.0.0" + "has-flag": "^4.0.0", + "supports-color": "^7.0.0" + }, + "engines": { + "node": ">=14.18" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/svg-tags": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/svg-tags/-/svg-tags-1.0.0.tgz", + "integrity": "sha512-ovssysQTa+luh7A5Weu3Rta6FJlFBBbInjOh722LIt6klpU2/HtdUbszju/G4devcvk8PGt7FCLv5wftu3THUA==", + "dev": true + }, + "node_modules/table": { + "version": "6.8.1", + "resolved": "https://registry.npmjs.org/table/-/table-6.8.1.tgz", + "integrity": "sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==", + "dev": true, + "dependencies": { + "ajv": "^8.0.1", + "lodash.truncate": "^4.4.2", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=10.0.0" } }, "node_modules/table/node_modules/ajv": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", - "integrity": "sha512-I/bSHSNEcFFqXLf91nchoNB9D1Kie3QKcWdchYUaoIg1+1bdWDkdfdlvdIOJbi9U8xR0y+MWc5D+won9v95WlQ==", + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", "dev": true, "dependencies": { - "co": "^4.6.0", - "json-stable-stringify": "^1.0.1" - } - }, - "node_modules/table/node_modules/ajv-keywords": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-1.5.1.tgz", - "integrity": "sha512-vuBv+fm2s6cqUyey2A7qYcvsik+GMDJsw8BARP2sDE76cqmaZVarsvHf7Vx6VJ0Xk8gLl+u3MoAPf6gKzJefeA==", - "dev": true, - "peerDependencies": { - "ajv": ">=4.10.0" - } - }, - "node_modules/table/node_modules/ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/table/node_modules/chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", - "dev": true, - "dependencies": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/table/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" } }, "node_modules/table/node_modules/is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, "engines": { - "node": ">=4" + "node": ">=8" } }, + "node_modules/table/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + }, "node_modules/table/node_modules/slice-ansi": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz", - "integrity": "sha512-up04hB2hR92PgjpyU3y/eg91yIBILyjVY26NvvciY3EVVPjybkMszMpXQ9QAkcS3I5rtJBDLoTxxg+qvW8c7rw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/table/node_modules/string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "dependencies": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/table/node_modules/string-width/node_modules/ansi-regex": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", - "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/table/node_modules/string-width/node_modules/strip-ansi": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", "dev": true, "dependencies": { - "ansi-regex": "^3.0.0" + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" }, "engines": { - "node": ">=4" - } - }, - "node_modules/table/node_modules/strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", - "dev": true, - "dependencies": { - "ansi-regex": "^2.0.0" + "node": ">=10" }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/table/node_modules/supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", - "dev": true, - "engines": { - "node": ">=0.8.0" + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" } }, "node_modules/tar": { @@ -7404,6 +8118,15 @@ "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, + "node_modules/trim-newlines": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz", + "integrity": "sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/truncate-utf8-bytes": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz", @@ -7413,12 +8136,48 @@ "utf8-byte-length": "^1.0.1" } }, + "node_modules/tsc-watch": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/tsc-watch/-/tsc-watch-6.0.4.tgz", + "integrity": "sha512-cHvbvhjO86w2aGlaHgSCeQRl+Aqw6X6XN4sQMPZKF88GoP30O+oTuh5lRIJr5pgFWrRpF1AgXnJJ2DoFEIPHyg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "node-cleanup": "^2.1.2", + "ps-tree": "^1.2.0", + "string-argv": "^0.3.1" + }, + "bin": { + "tsc-watch": "dist/lib/tsc-watch.js" + }, + "engines": { + "node": ">=12.12.0" + }, + "peerDependencies": { + "typescript": "*" + } + }, "node_modules/tslib": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true }, + "node_modules/tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "dependencies": { + "tslib": "^1.8.1" + }, + "engines": { + "node": ">= 6" + }, + "peerDependencies": { + "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + } + }, "node_modules/tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", @@ -7435,19 +8194,13 @@ "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==" }, - "node_modules/type": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", - "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==", - "dev": true - }, "node_modules/type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, "dependencies": { - "prelude-ls": "~1.1.2" + "prelude-ls": "^1.2.1" }, "engines": { "node": ">= 0.8.0" @@ -7483,16 +8236,16 @@ "dev": true }, "node_modules/typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz", + "integrity": "sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==", "dev": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { - "node": ">=4.2.0" + "node": ">=12.20" } }, "node_modules/unique-filename": { @@ -7543,45 +8296,18 @@ "punycode": "^2.1.0" } }, - "node_modules/user-home": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/user-home/-/user-home-2.0.0.tgz", - "integrity": "sha512-KMWqdlOcjCYdtIJpicDSFBQ8nFwS2i9sslAd6f4+CBGcU4gist2REnr2fxj2YocvJFxSF3ZOHLYLVZnUxv4BZQ==", - "dev": true, - "dependencies": { - "os-homedir": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/utf8-byte-length": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/utf8-byte-length/-/utf8-byte-length-1.0.4.tgz", "integrity": "sha512-4+wkEYLBbWxqTahEsWrhxepcoVOJ+1z5PGIjPZxRkytcdSUaNjIjBM7Xn8E+pdSuV7SzvWovBFA54FO0JSoqhA==", "dev": true }, - "node_modules/util": { - "version": "0.10.4", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", - "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", - "dev": true, - "dependencies": { - "inherits": "2.0.3" - } - }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "dev": true }, - "node_modules/util/node_modules/inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==", - "dev": true - }, "node_modules/utils-merge": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", @@ -7599,6 +8325,22 @@ "uuid": "bin/uuid" } }, + "node_modules/v8-compile-cache": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", + "dev": true + }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, "node_modules/vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", @@ -7707,28 +8449,29 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, - "node_modules/write": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz", - "integrity": "sha512-CJ17OoULEKXpA5pef3qLj5AxTJ6mSt7g84he2WIskKwqFO4T97d5V7Tadl0DYDk7qyUOQD5WlUlOMChaYrhxeA==", + "node_modules/write-file-atomic": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.1.tgz", + "integrity": "sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==", "dev": true, "dependencies": { - "mkdirp": "^0.5.1" + "imurmurhash": "^0.1.4", + "signal-exit": "^4.0.1" }, "engines": { - "node": ">=0.10.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/write/node_modules/mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "node_modules/write-file-atomic/node_modules/signal-exit": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.0.1.tgz", + "integrity": "sha512-uUWsN4aOxJAS8KOuf3QMyFtgm1pkb6I+KRZbRF/ghdf5T7sM+B1lLLzPDxswUjkmHyxQAVzEgG35E3NzDM9GVw==", "dev": true, - "dependencies": { - "minimist": "^1.2.6" + "engines": { + "node": ">=14" }, - "bin": { - "mkdirp": "bin/cmd.js" + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/ws": { @@ -7803,15 +8546,6 @@ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, - "node_modules/yaml": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", - "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, "node_modules/yargs": { "version": "17.7.1", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.1.tgz", @@ -7847,6 +8581,18 @@ "buffer-crc32": "~0.2.3", "fd-slicer": "~1.1.0" } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } } } } diff --git a/package.json b/package.json index 0cbe605..f436f77 100644 --- a/package.json +++ b/package.json @@ -2,9 +2,13 @@ "name": "tidal-hifi", "version": "5.1.0", "description": "Tidal on Electron with widevine(hifi) support", - "main": "src/main.js", + "main": "ts-dist/main.js", "scripts": { "start": "electron .", + "compile": "tsc && npm run sass-and-copy", + "watch": "tsc-watch --onSuccess \"npm run sass-and-copy\"", + "sass-and-copy": "npm run sass && npm run copy-files", + "copy-files": "rsync -av --exclude '*.ts' --exclude '*.scss' ./src/pages ts-dist", "build": "npm run builder -- -c ./build/electron-builder.yml", "build-deb": "npm run builder -- -c ./build/electron-builder.deb.yml", "build-unpacked": "npm run builder -- -c ./build/electron-builder.unpacked.yml", @@ -14,8 +18,7 @@ "build-wl": "npm run builder -- -c ./build/electron-builder.yml -wl", "build-mac": "npm run builder -- -c ./build/electron-builder.yml -m", "build-base": "npm run builder -- -c ./build/electron-builder.base.yml", - "prestart": "npm run sass", - "prebuilder": "npm run sass", + "prebuilder": "npm run compile", "builder": "electron-builder --publish=never", "sass": "sass ./src/pages/settings/settings.scss ./src/pages/settings/settings.css", "style-lint": "npx stylelint **/*.scss", @@ -42,8 +45,11 @@ }, "devDependencies": { "@mastermindzh/prettier-config": "^1.0.0", + "@typescript-eslint/eslint-plugin": "^5.59.1", + "@typescript-eslint/parser": "^5.59.1", "electron": "git+https://github.com/castlabs/electron-releases.git#v24.1.2+wvcus", "electron-builder": "^24.2.1", + "eslint": "^8.39.0", "js-yaml": "^4.1.0", "markdown-toc": "^1.2.0", "prettier": "^2.8.8", @@ -51,6 +57,8 @@ "stylelint-config-standard": "^33.0.0", "stylelint-config-standard-scss": "^9.0.0", "stylelint-prettier": "^3.0.0", + "tsc-watch": "^6.0.4", + "typescript": "^5.0.4" }, "prettier": "@mastermindzh/prettier-config" } \ No newline at end of file diff --git a/src/constants/settings.js b/src/constants/settings.js index 765f8a7..b7cf6db 100644 --- a/src/constants/settings.js +++ b/src/constants/settings.js @@ -21,6 +21,7 @@ const settings = { enableCustomHotkeys: "enableCustomHotkeys", enableDiscord: "enableDiscord", flags: { + root: "flags", disableHardwareMediaKeys: "flags.disableHardwareMediaKeys", gpuRasterization: "flags.gpuRasterization", }, diff --git a/src/main.js b/src/main.ts similarity index 79% rename from src/main.js rename to src/main.ts index d8bf848..1c562bb 100644 --- a/src/main.js +++ b/src/main.ts @@ -1,5 +1,5 @@ -require("@electron/remote/main").initialize(); -const { +import { initialize, enable } from "@electron/remote/main"; +import { app, BrowserWindow, components, @@ -7,38 +7,40 @@ const { ipcMain, protocol, session, -} = require("electron"); -const { +} from "electron"; +import { settings, store, createSettingsWindow, showSettingsWindow, closeSettingsWindow, hideSettingsWindow, -} = require("./scripts/settings"); -const { addTray, refreshTray } = require("./scripts/tray"); -const { addMenu } = require("./scripts/menu"); -const path = require("path"); +} from "./scripts/settings"; +import { addTray, refreshTray } from "./scripts/tray"; +import { addMenu } from "./scripts/menu"; +import path from "path"; +import expressModule from "./scripts/express"; +import mediaKeys from "./constants/mediaKeys"; +import mediaInfoModule from "./scripts/mediaInfo"; +import discordModule from "./scripts/discord"; +import globalEvents from "./constants/globalEvents"; +import flagValues from "./constants/flags"; const tidalUrl = "https://listen.tidal.com"; -const expressModule = require("./scripts/express"); -const mediaKeys = require("./constants/mediaKeys"); -const mediaInfoModule = require("./scripts/mediaInfo"); -const discordModule = require("./scripts/discord"); -const globalEvents = require("./constants/globalEvents"); -const flagValues = require("./constants/flags"); -let mainWindow; -let icon = path.join(__dirname, "../assets/icon.png"); +initialize(); + +let mainWindow: any; +const icon = path.join(__dirname, "../assets/icon.png"); const PROTOCOL_PREFIX = "tidal"; setFlags(); function setFlags() { - const flags = store.get().flags; + const flags = store.get(settings.flags.root); if (flags) { for (const [key, value] of Object.entries(flags)) { if (value) { - flagValues[key].forEach((flag) => { + (flagValues as any)[key].forEach((flag: any) => { console.log(`enabling command line switch ${flag.flag} with value ${flag.value}`); app.commandLine.appendSwitch(flag.flag, flag.value); }); @@ -80,7 +82,7 @@ function isMainInstanceOrMultipleInstancesAllowed() { return true; } -function createWindow(options = {}) { +function createWindow(options = { x: 0, y: 0, backgroundColor: "white" }) { // Create the browser window. mainWindow = new BrowserWindow({ x: options.x, @@ -97,7 +99,7 @@ function createWindow(options = {}) { devTools: true, // I like tinkering, others might too }, }); - require("@electron/remote/main").enable(mainWindow.webContents); + enable(mainWindow.webContents); registerHttpProtocols(); syncMenuBarWithStore(); @@ -109,11 +111,8 @@ function createWindow(options = {}) { mainWindow.webContents.setBackgroundThrottling(false); } - // run stuff after first load - mainWindow.webContents.once("did-finish-load", () => {}); - - mainWindow.on("close", function (event) { - if (!app.isQuiting && store.get(settings.minimizeOnClose)) { + mainWindow.on("close", function (event: any) { + if (store.get(settings.minimizeOnClose)) { event.preventDefault(); mainWindow.hide(); refreshTray(mainWindow); @@ -126,8 +125,7 @@ function createWindow(options = {}) { app.quit(); }); mainWindow.on("resize", () => { - let { width, height } = mainWindow.getBounds(); - + const { width, height } = mainWindow.getBounds(); store.set(settings.windowBounds.root, { width, height }); }); } @@ -144,7 +142,7 @@ function registerHttpProtocols() { function addGlobalShortcuts() { Object.keys(mediaKeys).forEach((key) => { globalShortcut.register(`${key}`, () => { - mainWindow.webContents.send("globalEvent", `${mediaKeys[key]}`); + mainWindow.webContents.send("globalEvent", `${(mediaKeys as any)[key]}`); }); }); } @@ -169,7 +167,10 @@ app.on("ready", async () => { addMenu(mainWindow); createSettingsWindow(); addGlobalShortcuts(); - store.get(settings.trayIcon) && addTray(mainWindow, { icon }) && refreshTray(); + if (store.get(settings.trayIcon)) { + addTray(mainWindow, { icon }); + refreshTray(); + } store.get(settings.api) && expressModule.run(mainWindow); store.get(settings.enableDiscord) && discordModule.initRPC(); } else { @@ -186,7 +187,7 @@ app.on("activate", function () { }); app.on("browser-window-created", (_, window) => { - require("@electron/remote/main").enable(window.webContents); + enable(window.webContents); }); // IPC diff --git a/src/pages/settings/preload.js b/src/pages/settings/preload.js index 1f9aab7..a49f85e 100644 --- a/src/pages/settings/preload.js +++ b/src/pages/settings/preload.js @@ -18,9 +18,9 @@ let adBlock, trayIcon, updateFrequency; -const { store, settings } = require("./../../scripts/settings"); +const { store, settings } = require("../../scripts/settings"); const { ipcRenderer } = require("electron"); -const globalEvents = require("./../../constants/globalEvents"); +const globalEvents = require("../../constants/globalEvents"); const remote = require("@electron/remote"); const { app } = remote; /** diff --git a/src/scripts/discord.js b/src/scripts/discord.js index b5e3b87..b8c6978 100644 --- a/src/scripts/discord.js +++ b/src/scripts/discord.js @@ -3,7 +3,15 @@ const { app, ipcMain } = require("electron"); const globalEvents = require("../constants/globalEvents"); const clientId = "833617820704440341"; const mediaInfoModule = require("./mediaInfo"); -const discordModule = []; +const discordModule = { + rpc: {}, + unRPC: function () { + return; + }, + initRPC: function () { + return; + }, +}; function timeToSeconds(timeArray) { let minutes = timeArray[0] * 1; diff --git a/src/scripts/mediaInfo.js b/src/scripts/mediaInfo.js index 81fed8d..92cc2c5 100644 --- a/src/scripts/mediaInfo.js +++ b/src/scripts/mediaInfo.js @@ -13,21 +13,17 @@ const mediaInfo = { }; const mediaInfoModule = { mediaInfo, -}; - -/** - * Update artist and song info in the mediaInfo constant - */ -mediaInfoModule.update = function (arg) { - mediaInfo.title = propOrDefault(arg.title); - mediaInfo.artists = propOrDefault(arg.artists); - mediaInfo.album = propOrDefault(arg.album); - mediaInfo.icon = propOrDefault(arg.icon); - mediaInfo.url = propOrDefault(arg.url); - mediaInfo.status = propOrDefault(arg.status); - mediaInfo.current = propOrDefault(arg.current); - mediaInfo.duration = propOrDefault(arg.duration); - mediaInfo.image = propOrDefault(arg.image); + update: function (arg) { + mediaInfo.title = propOrDefault(arg.title); + mediaInfo.artists = propOrDefault(arg.artists); + mediaInfo.album = propOrDefault(arg.album); + mediaInfo.icon = propOrDefault(arg.icon); + mediaInfo.url = propOrDefault(arg.url); + mediaInfo.status = propOrDefault(arg.status); + mediaInfo.current = propOrDefault(arg.current); + mediaInfo.duration = propOrDefault(arg.duration); + mediaInfo.image = propOrDefault(arg.image); + }, }; /** diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..2343e42 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "ES6", + "noImplicitAny": true, + "sourceMap": true, + "allowJs": true, + "outDir": "ts-dist", + "esModuleInterop": true, + "baseUrl": ".", + "paths": { + "*": ["node_modules/*"] + } + }, + "include": ["src/**/*"] +} From 46d030cf8e3a4db22ea7ce7f11fd1e51435236f5 Mon Sep 17 00:00:00 2001 From: Mastermindzh Date: Mon, 1 May 2023 23:23:43 +0200 Subject: [PATCH 03/10] transitioning to ts --- .gitignore | 1 + .vscode/settings.json | 12 +- package-lock.json | 121 ++++++++++++++++++ package.json | 4 +- src/main.ts | 12 +- src/models/options.ts | 12 ++ src/pages/settings/{preload.js => preload.ts} | 63 ++++----- src/{preload.js => preload.ts} | 82 ++++++------ src/scripts/download.js | 26 ---- src/scripts/download.ts | 23 ++++ src/scripts/{express.js => express.ts} | 43 +++---- src/scripts/hotkeys.js | 11 -- src/scripts/hotkeys.ts | 11 ++ src/scripts/{menu.js => menu.ts} | 14 +- src/scripts/settings.js | 3 +- src/scripts/{tray.js => tray.ts} | 17 ++- src/scripts/window-functions.js | 11 -- src/scripts/window-functions.ts | 7 + 18 files changed, 302 insertions(+), 171 deletions(-) create mode 100644 src/models/options.ts rename src/pages/settings/{preload.js => preload.ts} (76%) rename src/{preload.js => preload.ts} (88%) delete mode 100644 src/scripts/download.js create mode 100644 src/scripts/download.ts rename src/scripts/{express.js => express.ts} (67%) delete mode 100644 src/scripts/hotkeys.js create mode 100644 src/scripts/hotkeys.ts rename src/scripts/{menu.js => menu.ts} (90%) rename src/scripts/{tray.js => tray.ts} (65%) delete mode 100644 src/scripts/window-functions.js create mode 100644 src/scripts/window-functions.ts diff --git a/.gitignore b/.gitignore index 496ad47..be23b05 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ build/linux/arch/* # JetBrains IDE configuration .idea ts-dist/** +ts-dist diff --git a/.vscode/settings.json b/.vscode/settings.json index dc1a367..b04eb3a 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,13 @@ { - "cSpell.words": ["hifi", "rescrobbler", "widevine"] + "cSpell.words": [ + "flac", + "geqnfr", + "hifi", + "playpause", + "rescrobbler", + "trackid", + "tracklist", + "widevine", + "xesam" + ] } diff --git a/package-lock.json b/package-lock.json index ba20cf9..6ff3b69 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,6 +20,8 @@ }, "devDependencies": { "@mastermindzh/prettier-config": "^1.0.0", + "@types/express": "^4.17.17", + "@types/request": "^2.48.8", "@typescript-eslint/eslint-plugin": "^5.59.1", "@typescript-eslint/parser": "^5.59.1", "electron": "git+https://github.com/castlabs/electron-releases.git#v24.1.2+wvcus", @@ -915,6 +917,16 @@ "node": ">= 10" } }, + "node_modules/@types/body-parser": { + "version": "1.19.2", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz", + "integrity": "sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==", + "dev": true, + "dependencies": { + "@types/connect": "*", + "@types/node": "*" + } + }, "node_modules/@types/cacheable-request": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz", @@ -926,6 +938,45 @@ "@types/responselike": "^1.0.0" } }, + "node_modules/@types/caseless": { + "version": "0.12.2", + "resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.2.tgz", + "integrity": "sha512-6ckxMjBBD8URvjB6J3NcnuAn5Pkl7t3TizAg+xdlzzQGSPSmBcXf8KoIH0ua/i+tio+ZRUHEXp0HEmvaR4kt0w==", + "dev": true + }, + "node_modules/@types/connect": { + "version": "3.4.35", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz", + "integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/express": { + "version": "4.17.17", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.17.tgz", + "integrity": "sha512-Q4FmmuLGBG58btUnfS1c1r/NQdlp3DMfGDGig8WhfpA2YRUtEkxAjkZb0yvplJGYdF1fsQ81iMDcH24sSCNC/Q==", + "dev": true, + "dependencies": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "^4.17.33", + "@types/qs": "*", + "@types/serve-static": "*" + } + }, + "node_modules/@types/express-serve-static-core": { + "version": "4.17.34", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.34.tgz", + "integrity": "sha512-fvr49XlCGoUj2Pp730AItckfjat4WNb0lb3kfrLWffd+RLeoGAMsq7UOy04PAPtoL01uKwcp6u8nhzpgpDYr3w==", + "dev": true, + "dependencies": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*", + "@types/send": "*" + } + }, "node_modules/@types/http-cache-semantics": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz", @@ -945,6 +996,12 @@ "@types/node": "*" } }, + "node_modules/@types/mime": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz", + "integrity": "sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==", + "dev": true + }, "node_modules/@types/minimist": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz", @@ -973,6 +1030,44 @@ "xmlbuilder": ">=11.0.1" } }, + "node_modules/@types/qs": { + "version": "6.9.7", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", + "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==", + "dev": true + }, + "node_modules/@types/range-parser": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz", + "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==", + "dev": true + }, + "node_modules/@types/request": { + "version": "2.48.8", + "resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.8.tgz", + "integrity": "sha512-whjk1EDJPcAR2kYHRbFl/lKeeKYTi05A15K9bnLInCVroNDCtXce57xKdI0/rQaA3K+6q0eFyUBPmqfSndUZdQ==", + "dev": true, + "dependencies": { + "@types/caseless": "*", + "@types/node": "*", + "@types/tough-cookie": "*", + "form-data": "^2.5.0" + } + }, + "node_modules/@types/request/node_modules/form-data": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", + "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", + "dev": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 0.12" + } + }, "node_modules/@types/responselike": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.0.tgz", @@ -987,6 +1082,32 @@ "integrity": "sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==", "dev": true }, + "node_modules/@types/send": { + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.1.tgz", + "integrity": "sha512-Cwo8LE/0rnvX7kIIa3QHCkcuF21c05Ayb0ZfxPiv0W8VRiZiNW/WuRupHKpqqGVGf7SUA44QSOUKaEd9lIrd/Q==", + "dev": true, + "dependencies": { + "@types/mime": "^1", + "@types/node": "*" + } + }, + "node_modules/@types/serve-static": { + "version": "1.15.1", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.1.tgz", + "integrity": "sha512-NUo5XNiAdULrJENtJXZZ3fHtfMolzZwczzBbnAeBbqBwG+LaG6YaJtuwzwGSQZ2wsCrxjEhNNjAkKigy3n8teQ==", + "dev": true, + "dependencies": { + "@types/mime": "*", + "@types/node": "*" + } + }, + "node_modules/@types/tough-cookie": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.2.tgz", + "integrity": "sha512-Q5vtl1W5ue16D+nIaW8JWebSSraJVlK+EthKn7e7UcD4KWsaSJ8BqGPXNaPghgtcn/fhvrN17Tv8ksUsQpiplw==", + "dev": true + }, "node_modules/@types/verror": { "version": "1.10.6", "resolved": "https://registry.npmjs.org/@types/verror/-/verror-1.10.6.tgz", diff --git a/package.json b/package.json index f436f77..d9725ae 100644 --- a/package.json +++ b/package.json @@ -45,6 +45,8 @@ }, "devDependencies": { "@mastermindzh/prettier-config": "^1.0.0", + "@types/express": "^4.17.17", + "@types/request": "^2.48.8", "@typescript-eslint/eslint-plugin": "^5.59.1", "@typescript-eslint/parser": "^5.59.1", "electron": "git+https://github.com/castlabs/electron-releases.git#v24.1.2+wvcus", @@ -61,4 +63,4 @@ "typescript": "^5.0.4" }, "prettier": "@mastermindzh/prettier-config" -} \ No newline at end of file +} diff --git a/src/main.ts b/src/main.ts index 1c562bb..7215eb8 100644 --- a/src/main.ts +++ b/src/main.ts @@ -19,7 +19,7 @@ import { import { addTray, refreshTray } from "./scripts/tray"; import { addMenu } from "./scripts/menu"; import path from "path"; -import expressModule from "./scripts/express"; +import { startExpress } from "./scripts/express"; import mediaKeys from "./constants/mediaKeys"; import mediaInfoModule from "./scripts/mediaInfo"; import discordModule from "./scripts/discord"; @@ -29,7 +29,7 @@ const tidalUrl = "https://listen.tidal.com"; initialize(); -let mainWindow: any; +let mainWindow: BrowserWindow; const icon = path.join(__dirname, "../assets/icon.png"); const PROTOCOL_PREFIX = "tidal"; @@ -59,7 +59,7 @@ function setFlags() { * */ function syncMenuBarWithStore() { - const fixedMenuBar = store.get(settings.menuBar); + const fixedMenuBar = !!store.get(settings.menuBar); mainWindow.autoHideMenuBar = !fixedMenuBar; mainWindow.setMenuBarVisibility(fixedMenuBar); @@ -111,7 +111,7 @@ function createWindow(options = { x: 0, y: 0, backgroundColor: "white" }) { mainWindow.webContents.setBackgroundThrottling(false); } - mainWindow.on("close", function (event: any) { + mainWindow.on("close", function (event: CloseEvent) { if (store.get(settings.minimizeOnClose)) { event.preventDefault(); mainWindow.hide(); @@ -169,9 +169,9 @@ app.on("ready", async () => { addGlobalShortcuts(); if (store.get(settings.trayIcon)) { addTray(mainWindow, { icon }); - refreshTray(); + refreshTray(mainWindow); } - store.get(settings.api) && expressModule.run(mainWindow); + store.get(settings.api) && startExpress(mainWindow); store.get(settings.enableDiscord) && discordModule.initRPC(); } else { app.quit(); diff --git a/src/models/options.ts b/src/models/options.ts new file mode 100644 index 0000000..2f80d5d --- /dev/null +++ b/src/models/options.ts @@ -0,0 +1,12 @@ +export interface Options { + title: string; + artists: string; + album: string; + status: string; + url: string; + current: string; + duration: string; + "app-name": string; + image: string; + icon: string; +} diff --git a/src/pages/settings/preload.js b/src/pages/settings/preload.ts similarity index 76% rename from src/pages/settings/preload.js rename to src/pages/settings/preload.ts index a49f85e..1e9b120 100644 --- a/src/pages/settings/preload.js +++ b/src/pages/settings/preload.ts @@ -1,28 +1,29 @@ -let adBlock, - api, - customCSS, - disableBackgroundThrottle, - disableHardwareMediaKeys, - enableCustomHotkeys, - enableDiscord, - gpuRasterization, - menuBar, - minimizeOnClose, - mpris, - notifications, - playBackControl, - port, - singleInstance, - skipArtists, - skippedArtists, - trayIcon, - updateFrequency; +let adBlock: HTMLInputElement, + api: HTMLInputElement, + customCSS: HTMLInputElement, + disableBackgroundThrottle: HTMLInputElement, + disableHardwareMediaKeys: HTMLInputElement, + enableCustomHotkeys: HTMLInputElement, + enableDiscord: HTMLInputElement, + gpuRasterization: HTMLInputElement, + menuBar: HTMLInputElement, + minimizeOnClose: HTMLInputElement, + mpris: HTMLInputElement, + notifications: HTMLInputElement, + playBackControl: HTMLInputElement, + port: HTMLInputElement, + singleInstance: HTMLInputElement, + skipArtists: HTMLInputElement, + skippedArtists: HTMLInputElement, + trayIcon: HTMLInputElement, + updateFrequency: HTMLInputElement; const { store, settings } = require("../../scripts/settings"); const { ipcRenderer } = require("electron"); const globalEvents = require("../../constants/globalEvents"); const remote = require("@electron/remote"); const { app } = remote; + /** * Sync the UI forms with the current settings */ @@ -30,7 +31,7 @@ function refreshSettings() { adBlock.checked = store.get(settings.adBlock); api.checked = store.get(settings.api); customCSS.value = store.get(settings.customCSS); - disableBackgroundThrottle.checked = store.get("disableBackgroundThrottle"); + disableBackgroundThrottle.checked = store.get(settings.disableBackgroundThrottle); disableHardwareMediaKeys.checked = store.get(settings.flags.disableHardwareMediaKeys); enableCustomHotkeys.checked = store.get(settings.enableCustomHotkeys); enableDiscord.checked = store.get(settings.enableDiscord); @@ -43,7 +44,7 @@ function refreshSettings() { port.value = store.get(settings.apiSettings.port); singleInstance.checked = store.get(settings.singleInstance); skipArtists.checked = store.get(settings.skipArtists); - skippedArtists.value = store.get(settings.skippedArtists).join("\n"); + skippedArtists.value = (store.get(settings.skippedArtists) as string[]).join("\n"); trayIcon.checked = store.get(settings.trayIcon); updateFrequency.value = store.get(settings.updateFrequency); } @@ -51,7 +52,7 @@ function refreshSettings() { /** * Open an url in the default browsers */ -function openExternal(url) { +function openExternal(url: string) { const { shell } = require("electron"); shell.openExternal(url); } @@ -75,31 +76,31 @@ function restart() { * Bind UI components to functions after DOMContentLoaded */ window.addEventListener("DOMContentLoaded", () => { - function get(id) { - return document.getElementById(id); + function get(id: string): HTMLInputElement { + return document.getElementById(id) as HTMLInputElement; } document.getElementById("close").addEventListener("click", hide); document.getElementById("restart").addEventListener("click", restart); document.querySelectorAll(".external-link").forEach((elem) => elem.addEventListener("click", function (event) { - openExternal(event.target.getAttribute("data-url")); + openExternal((event.target as HTMLElement).getAttribute("data-url")); }) ); - function addInputListener(source, key) { - source.addEventListener("input", function (_event, _data) { - if (this.value === "on") { + function addInputListener(source: HTMLInputElement, key: string) { + source.addEventListener("input", () => { + if (source.value === "on") { store.set(key, source.checked); } else { - store.set(key, this.value); + store.set(key, source.value); } ipcRenderer.send(globalEvents.storeChanged); }); } - function addTextAreaListener(source, key) { - source.addEventListener("input", function (_event, _data) { + function addTextAreaListener(source: HTMLInputElement, key: string) { + source.addEventListener("input", () => { store.set(key, source.value.split("\n")); ipcRenderer.send(globalEvents.storeChanged); }); diff --git a/src/preload.js b/src/preload.ts similarity index 88% rename from src/preload.js rename to src/preload.ts index 1ee19e3..403c84d 100644 --- a/src/preload.js +++ b/src/preload.ts @@ -1,17 +1,17 @@ -const { setTitle } = require("./scripts/window-functions"); -const { dialog, process, Notification } = require("@electron/remote"); +import { Notification, app, dialog } from "@electron/remote"; +import { ipcRenderer } from "electron"; +import { Options } from "./models/options"; +import { downloadFile } from "./scripts/download"; +import { addHotkey } from "./scripts/hotkeys"; +import { setTitle } from "./scripts/window-functions"; const { store, settings } = require("./scripts/settings"); -const { ipcRenderer } = require("electron"); -const { app } = require("@electron/remote"); -const { downloadFile } = require("./scripts/download"); +const notificationPath = `${app.getPath("userData")}/notification.jpg`; const statuses = require("./constants/statuses"); -const hotkeys = require("./scripts/hotkeys"); const globalEvents = require("./constants/globalEvents"); const { skipArtists, updateFrequency, customCSS } = require("./constants/settings"); -const notificationPath = `${app.getPath("userData")}/notification.jpg`; const appName = "Tidal Hifi"; let currentSong = ""; -let player; +let player: any; let currentPlayStatus = statuses.paused; const elements = { @@ -45,7 +45,7 @@ const elements = { * Get an element from the dom * @param {*} key key in elements object to fetch */ - get: function (key) { + get: function (key: string) { return window.document.querySelector(this[key.toLowerCase()]); }, @@ -74,7 +74,7 @@ const elements = { if (footer) { const artists = footer.querySelectorAll(this.artists); - if (artists) return Array.from(artists).map((artist) => artist.textContent); + if (artists) return Array.from(artists).map((artist) => (artist as HTMLElement).textContent); } return []; }, @@ -84,7 +84,7 @@ const elements = { * @param {Array} artistsArray * @returns {String} artists */ - getArtistsString: function (artistsArray) { + getArtistsString: function (artistsArray: string[]) { if (artistsArray.length > 0) return artistsArray.join(", "); return "unknown artist(s)"; }, @@ -120,7 +120,7 @@ const elements = { * Shorthand function to get the text of a dom element * @param {*} key key in elements object to fetch */ - getText: function (key) { + getText: function (key: string) { const element = this.get(key); return element ? element.textContent : ""; }, @@ -129,7 +129,7 @@ const elements = { * Shorthand function to click a dom element * @param {*} key key in elements object to fetch */ - click: function (key) { + click: function (key: string) { this.get(key).click(); return this; }, @@ -138,7 +138,7 @@ const elements = { * Shorthand function to focus a dom element * @param {*} key key in elements object to fetch */ - focus: function (key) { + focus: function (key: string) { return this.get(key).focus(); }, }; @@ -186,40 +186,40 @@ function playPause() { */ function addHotKeys() { if (store.get(settings.enableCustomHotkeys)) { - hotkeys.add("Control+p", function () { + addHotkey("Control+p", function () { elements.click("account").click("settings"); }); - hotkeys.add("Control+l", function () { + addHotkey("Control+l", function () { handleLogout(); }); - hotkeys.add("Control+h", function () { + addHotkey("Control+h", function () { elements.click("home"); }); - hotkeys.add("backspace", function () { + addHotkey("backspace", function () { elements.click("back"); }); - hotkeys.add("shift+backspace", function () { + addHotkey("shift+backspace", function () { elements.click("forward"); }); - hotkeys.add("control+u", function () { + addHotkey("control+u", function () { // reloading window without cache should show the update bar if applicable - window.location.reload(true); + window.location.reload(); }); - hotkeys.add("control+r", function () { + addHotkey("control+r", function () { elements.click("repeat"); }); } // always add the hotkey for the settings window - hotkeys.add("control+=", function () { + addHotkey("control+=", function () { ipcRenderer.send(globalEvents.showSettings); }); - hotkeys.add("control+0", function () { + addHotkey("control+0", function () { ipcRenderer.send(globalEvents.showSettings); }); } @@ -231,28 +231,26 @@ function addHotKeys() { function handleLogout() { const logoutOptions = ["Cancel", "Yes, please", "No, thanks"]; - dialog.showMessageBox( - null, - { + dialog + .showMessageBox(null, { type: "question", title: "Logging out", message: "Are you sure you want to log out?", buttons: logoutOptions, defaultId: 2, - }, - function (response) { - if (logoutOptions.indexOf("Yes, please") == response) { + }) + .then((result: { response: number }) => { + if (logoutOptions.indexOf("Yes, please") == result.response) { for (let i = 0; i < window.localStorage.length; i++) { const key = window.localStorage.key(i); if (key.startsWith("_TIDAL_activeSession")) { window.localStorage.removeItem(key); - i = window.localStorage.length + 1; + break; } } window.location.reload(); } - } - ); + }); } function addFullScreenListeners() { @@ -309,7 +307,7 @@ function getCurrentlyPlayingStatus() { * Convert the duration from MM:SS to seconds * @param {*} duration */ -function convertDuration(duration) { +function convertDuration(duration: string) { const parts = duration.split(":"); return parseInt(parts[1]) + 60 * parseInt(parts[0]); } @@ -319,7 +317,7 @@ function convertDuration(duration) { * * @param {*} options */ -function updateMediaInfo(options, notify) { +function updateMediaInfo(options: Options, notify: boolean) { if (options) { ipcRenderer.send(globalEvents.updateInfo, options); if (store.get(settings.notifications) && notify) { @@ -361,7 +359,7 @@ function getTrackID() { return window.location; } -function updateMediaSession(options) { +function updateMediaSession(options: Options) { if ("mediaSession" in navigator) { navigator.mediaSession.metadata = new MediaMetadata({ title: options.title, @@ -401,6 +399,8 @@ setInterval(function () { current, duration, "app-name": appName, + image: "", + icon: "", }; const titleOrArtistsChanged = currentSong !== songDashArtistTitle; @@ -413,7 +413,7 @@ setInterval(function () { const image = elements.getSongIcon(); - new Promise((resolve) => { + new Promise((resolve) => { if (image.startsWith("http")) { options.image = image; downloadFile(image, notificationPath).then( @@ -444,9 +444,9 @@ setInterval(function () { * automatically skip a song if the artists are found in the list of artists to skip * @param {*} artists array of artists */ - function skipArtistsIfFoundInSkippedArtistsList(artists) { + function skipArtistsIfFoundInSkippedArtistsList(artists: string[]) { if (store.get(skipArtists)) { - const skippedArtists = store.get(settings.skippedArtists); + const skippedArtists = store.get(settings.skippedArtists) as string[]; if (skippedArtists.length > 0) { const artistsToSkip = skippedArtists.map((artist) => artist); const artistNames = Object.values(artists).map((artist) => artist); @@ -478,7 +478,7 @@ if (process.platform === "linux" && store.get(settings.mpris)) { }); // Events - var events = { + const events = { next: "next", previous: "previous", pause: "pause", @@ -488,7 +488,7 @@ if (process.platform === "linux" && store.get(settings.mpris)) { loopStatus: "repeat", shuffle: "shuffle", seek: "seek", - }; + } as { [key: string]: string }; Object.keys(events).forEach(function (eventName) { player.on(eventName, function () { const eventValue = events[eventName]; diff --git a/src/scripts/download.js b/src/scripts/download.js deleted file mode 100644 index b6c1ed3..0000000 --- a/src/scripts/download.js +++ /dev/null @@ -1,26 +0,0 @@ -const download = {}; -const request = require("request"); -const fs = require("fs"); - -/** - * download and save a file - * @param {*} fileUrl url to download - * @param {*} targetPath path to save it at - */ -download.downloadFile = function(fileUrl, targetPath) { - return new Promise((resolve, reject) => { - var req = request({ - method: "GET", - uri: fileUrl, - }); - - var out = fs.createWriteStream(targetPath); - req.pipe(out); - - req.on("end", resolve); - - req.on("error", reject); - }); -}; - -module.exports = download; diff --git a/src/scripts/download.ts b/src/scripts/download.ts new file mode 100644 index 0000000..01f365c --- /dev/null +++ b/src/scripts/download.ts @@ -0,0 +1,23 @@ +import fs from "fs"; +import request from "request"; + +/** + * download and save a file + * @param {string} fileUrl url to download + * @param {string} targetPath path to save it at + */ +export const downloadFile = function (fileUrl: string, targetPath: string) { + return new Promise((resolve, reject) => { + const req = request({ + method: "GET", + uri: fileUrl, + }); + + const out = fs.createWriteStream(targetPath); + req.pipe(out); + + req.on("end", resolve); + + req.on("error", reject); + }); +}; diff --git a/src/scripts/express.js b/src/scripts/express.ts similarity index 67% rename from src/scripts/express.js rename to src/scripts/express.ts index 00b8dbf..232c254 100644 --- a/src/scripts/express.js +++ b/src/scripts/express.ts @@ -1,23 +1,23 @@ -const express = require("express"); +import { BrowserWindow } from "electron"; +import express, { Response } from "express"; +import fs from "fs"; const { mediaInfo } = require("./mediaInfo"); const { store, settings } = require("./settings"); const globalEvents = require("./../constants/globalEvents"); const statuses = require("./../constants/statuses"); -const expressModule = {}; -const fs = require("fs"); - -let expressInstance; /** * Function to enable tidal-hifi's express api */ -expressModule.run = function (mainWindow) { + +// expressModule.run = function (mainWindow) +export const startExpress = (mainWindow: BrowserWindow) => { /** * Shorthand to handle a fire and forget global event * @param {*} res * @param {*} action */ - function handleGlobalEvent(res, action) { + function handleGlobalEvent(res: Response, action: any) { mainWindow.webContents.send("globalEvent", action); res.sendStatus(200); } @@ -26,7 +26,7 @@ expressModule.run = function (mainWindow) { expressApp.get("/", (req, res) => res.send("Hello World!")); expressApp.get("/current", (req, res) => res.json({ ...mediaInfo, artist: mediaInfo.artists })); expressApp.get("/image", (req, res) => { - var stream = fs.createReadStream(mediaInfo.icon); + const stream = fs.createReadStream(mediaInfo.icon); stream.on("open", function () { res.set("Content-Type", "image/png"); stream.pipe(res); @@ -50,21 +50,16 @@ expressModule.run = function (mainWindow) { } }); } - if (store.get(settings.api)) { - let port = store.get(settings.apiSettings.port); - expressInstance = expressApp.listen(port, "127.0.0.1", () => {}); - expressInstance.on("error", function (e) { - let message = e.code; - if (e.code === "EADDRINUSE") { - message = `Port ${port} in use.`; - } - const { dialog } = require("electron"); - dialog.showErrorBox("Api failed to start.", message); - }); - } else { - expressInstance = undefined; - } + let port = store.get(settings.apiSettings.port); + + const expressInstance = expressApp.listen(port, "127.0.0.1", () => {}); + expressInstance.on("error", function (e: { code: string }) { + let message = e.code; + if (e.code === "EADDRINUSE") { + message = `Port ${port} in use.`; + } + const { dialog } = require("electron"); + dialog.showErrorBox("Api failed to start.", message); + }); }; - -module.exports = expressModule; diff --git a/src/scripts/hotkeys.js b/src/scripts/hotkeys.js deleted file mode 100644 index 325c060..0000000 --- a/src/scripts/hotkeys.js +++ /dev/null @@ -1,11 +0,0 @@ -const hotkeyjs = require("hotkeys-js"); -const hotkeys = {}; - -hotkeys.add = function(keys, func) { - hotkeyjs(keys, function(event, args) { - event.preventDefault(); - func(event, args); - }); -}; - -module.exports = hotkeys; diff --git a/src/scripts/hotkeys.ts b/src/scripts/hotkeys.ts new file mode 100644 index 0000000..554b23f --- /dev/null +++ b/src/scripts/hotkeys.ts @@ -0,0 +1,11 @@ +import hotkeyjs, { HotkeysEvent } from "hotkeys-js"; + +export const addHotkey = function ( + keys: string, + func: (event?: KeyboardEvent, args?: HotkeysEvent) => void +) { + hotkeyjs(keys, function (event, args) { + event.preventDefault(); + func(event, args); + }); +}; diff --git a/src/scripts/menu.js b/src/scripts/menu.ts similarity index 90% rename from src/scripts/menu.js rename to src/scripts/menu.ts index f62ded6..9319b42 100644 --- a/src/scripts/menu.js +++ b/src/scripts/menu.ts @@ -1,4 +1,4 @@ -const { Menu, app } = require("electron"); +import { BrowserWindow, Menu, app } from "electron"; const { showSettingsWindow } = require("./settings"); const isMac = process.platform === "darwin"; const { name } = require("./../constants/values"); @@ -19,9 +19,7 @@ const quitMenuEntry = { accelerator: "Control+Q", }; -const menuModule = {}; - -menuModule.getMenu = function (mainWindow) { +export const getMenu = function (mainWindow: BrowserWindow) { const toggleWindow = { label: "Toggle Window", click: function () { @@ -113,11 +111,9 @@ menuModule.getMenu = function (mainWindow) { quitMenuEntry, ]; - return Menu.buildFromTemplate(mainMenu); + return Menu.buildFromTemplate(mainMenu as any); }; -menuModule.addMenu = function (mainWindow) { - Menu.setApplicationMenu(menuModule.getMenu(mainWindow)); +export const addMenu = function (mainWindow: BrowserWindow) { + Menu.setApplicationMenu(getMenu(mainWindow)); }; - -module.exports = menuModule; diff --git a/src/scripts/settings.js b/src/scripts/settings.js index 96e1261..0e36c3f 100644 --- a/src/scripts/settings.js +++ b/src/scripts/settings.js @@ -1,5 +1,6 @@ const Store = require("electron-store"); -const settings = require("./../constants/settings"); + +const settings = require("../constants/settings"); const path = require("path"); const { BrowserWindow } = require("electron"); diff --git a/src/scripts/tray.js b/src/scripts/tray.ts similarity index 65% rename from src/scripts/tray.js rename to src/scripts/tray.ts index ab0fdc2..fcdabab 100644 --- a/src/scripts/tray.js +++ b/src/scripts/tray.ts @@ -1,9 +1,10 @@ -const { Tray } = require("electron"); -const { getMenu } = require("./menu"); -const trayModule = {}; -let tray; +import { BrowserWindow, Tray } from "electron"; -trayModule.addTray = function (mainWindow, options = { icon: "" }) { +const { getMenu } = require("./menu"); + +let tray: Tray; + +export const addTray = function (mainWindow: BrowserWindow, options = { icon: "" }) { tray = new Tray(options.icon); tray.setIgnoreDoubleClickEvents(true); tray.setToolTip("Tidal-hifi"); @@ -25,10 +26,8 @@ trayModule.addTray = function (mainWindow, options = { icon: "" }) { }); }; -trayModule.refreshTray = function (mainWindow) { +export const refreshTray = function (mainWindow: BrowserWindow) { if (!tray) { - trayModule.addTray(mainWindow); + addTray(mainWindow); } }; - -module.exports = trayModule; diff --git a/src/scripts/window-functions.js b/src/scripts/window-functions.js deleted file mode 100644 index 3e42104..0000000 --- a/src/scripts/window-functions.js +++ /dev/null @@ -1,11 +0,0 @@ -const windowFunctions = {}; - -windowFunctions.setTitle = function(title) { - window.document.title = title; -}; - -windowFunctions.getTitle = function() { - return window.document.title; -}; - -module.exports = windowFunctions; diff --git a/src/scripts/window-functions.ts b/src/scripts/window-functions.ts new file mode 100644 index 0000000..9e780dd --- /dev/null +++ b/src/scripts/window-functions.ts @@ -0,0 +1,7 @@ +export const setTitle = function (title: string) { + window.document.title = title; +}; + +export const getTitle = function () { + return window.document.title; +}; From e8509d42e74fbf58eafb16807417f9e8c3e4a9f0 Mon Sep 17 00:00:00 2001 From: Mastermindzh Date: Mon, 1 May 2023 23:31:37 +0200 Subject: [PATCH 04/10] organize imports --- src/main.ts | 28 ++++++++++++++-------------- src/preload.ts | 10 +++++----- src/scripts/tray.ts | 3 +-- 3 files changed, 20 insertions(+), 21 deletions(-) diff --git a/src/main.ts b/src/main.ts index 7215eb8..11c6291 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,30 +1,30 @@ -import { initialize, enable } from "@electron/remote/main"; +import { enable, initialize } from "@electron/remote/main"; import { - app, BrowserWindow, + app, components, globalShortcut, ipcMain, protocol, session, } from "electron"; +import path from "path"; +import flagValues from "./constants/flags"; +import globalEvents from "./constants/globalEvents"; +import mediaKeys from "./constants/mediaKeys"; +import discordModule from "./scripts/discord"; +import { startExpress } from "./scripts/express"; +import mediaInfoModule from "./scripts/mediaInfo"; +import { addMenu } from "./scripts/menu"; import { - settings, - store, - createSettingsWindow, - showSettingsWindow, closeSettingsWindow, + createSettingsWindow, hideSettingsWindow, + settings, + showSettingsWindow, + store, } from "./scripts/settings"; import { addTray, refreshTray } from "./scripts/tray"; -import { addMenu } from "./scripts/menu"; -import path from "path"; -import { startExpress } from "./scripts/express"; -import mediaKeys from "./constants/mediaKeys"; -import mediaInfoModule from "./scripts/mediaInfo"; -import discordModule from "./scripts/discord"; -import globalEvents from "./constants/globalEvents"; -import flagValues from "./constants/flags"; const tidalUrl = "https://listen.tidal.com"; initialize(); diff --git a/src/preload.ts b/src/preload.ts index 403c84d..7bf5e3d 100644 --- a/src/preload.ts +++ b/src/preload.ts @@ -1,14 +1,14 @@ import { Notification, app, dialog } from "@electron/remote"; import { ipcRenderer } from "electron"; +import globalEvents from "./constants/globalEvents"; +import { customCSS, skipArtists, updateFrequency } from "./constants/settings"; +import statuses from "./constants/statuses"; import { Options } from "./models/options"; import { downloadFile } from "./scripts/download"; import { addHotkey } from "./scripts/hotkeys"; +import { settings, store } from "./scripts/settings"; import { setTitle } from "./scripts/window-functions"; -const { store, settings } = require("./scripts/settings"); const notificationPath = `${app.getPath("userData")}/notification.jpg`; -const statuses = require("./constants/statuses"); -const globalEvents = require("./constants/globalEvents"); -const { skipArtists, updateFrequency, customCSS } = require("./constants/settings"); const appName = "Tidal Hifi"; let currentSong = ""; let player: any; @@ -156,7 +156,7 @@ function addCustomCss() { * make sure it returns a number, if not use the default */ function getUpdateFrequency() { - const storeValue = store.get(updateFrequency); + const storeValue = store.get(updateFrequency) as number; const defaultValue = 500; if (!isNaN(storeValue)) { diff --git a/src/scripts/tray.ts b/src/scripts/tray.ts index fcdabab..07e3a59 100644 --- a/src/scripts/tray.ts +++ b/src/scripts/tray.ts @@ -1,6 +1,5 @@ import { BrowserWindow, Tray } from "electron"; - -const { getMenu } = require("./menu"); +import { getMenu } from "./menu"; let tray: Tray; From 53e4711c392fa9ed87b26a05ee71d2f712a2435e Mon Sep 17 00:00:00 2001 From: Mastermindzh Date: Sun, 7 May 2023 15:45:45 +0200 Subject: [PATCH 05/10] chore: more typescript --- package-lock.json | 7 ++ package.json | 1 + src/constants/{settings.js => settings.ts} | 4 +- src/declarations.d.ts | 1 + src/main.ts | 57 ++++++------ src/models/mediaInfo.ts | 13 +++ src/models/mediaStatus.ts | 4 + src/pages/settings/preload.ts | 61 ++++++------ src/preload.ts | 38 ++++---- src/scripts/discord.js | 103 --------------------- src/scripts/discord.ts | 88 ++++++++++++++++++ src/scripts/express.ts | 19 ++-- src/scripts/mediaInfo.js | 38 -------- src/scripts/mediaInfo.ts | 35 +++++++ src/scripts/{settings.js => settings.ts} | 27 +++--- 15 files changed, 249 insertions(+), 247 deletions(-) rename src/constants/{settings.js => settings.ts} (95%) create mode 100644 src/declarations.d.ts create mode 100644 src/models/mediaInfo.ts create mode 100644 src/models/mediaStatus.ts delete mode 100644 src/scripts/discord.js create mode 100644 src/scripts/discord.ts delete mode 100644 src/scripts/mediaInfo.js create mode 100644 src/scripts/mediaInfo.ts rename src/scripts/{settings.js => settings.ts} (76%) diff --git a/package-lock.json b/package-lock.json index 6ff3b69..39afe00 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,6 +20,7 @@ }, "devDependencies": { "@mastermindzh/prettier-config": "^1.0.0", + "@types/discord-rpc": "^4.0.4", "@types/express": "^4.17.17", "@types/request": "^2.48.8", "@typescript-eslint/eslint-plugin": "^5.59.1", @@ -953,6 +954,12 @@ "@types/node": "*" } }, + "node_modules/@types/discord-rpc": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@types/discord-rpc/-/discord-rpc-4.0.4.tgz", + "integrity": "sha512-Afr+3GqUqZnQ6bA/WzNp388heVAmfKuNxy6giAde2ZZP7sNr6mnl+ELpcecD/z2sndfKSauLB89ABNqjWWCZlg==", + "dev": true + }, "node_modules/@types/express": { "version": "4.17.17", "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.17.tgz", diff --git a/package.json b/package.json index d9725ae..c377e6c 100644 --- a/package.json +++ b/package.json @@ -45,6 +45,7 @@ }, "devDependencies": { "@mastermindzh/prettier-config": "^1.0.0", + "@types/discord-rpc": "^4.0.4", "@types/express": "^4.17.17", "@types/request": "^2.48.8", "@typescript-eslint/eslint-plugin": "^5.59.1", diff --git a/src/constants/settings.js b/src/constants/settings.ts similarity index 95% rename from src/constants/settings.js rename to src/constants/settings.ts index b7cf6db..04444e6 100644 --- a/src/constants/settings.js +++ b/src/constants/settings.ts @@ -8,7 +8,7 @@ * }, * windowBounds: { width: 800, height: 600 }, */ -const settings = { +export const settings = { adBlock: "adBlock", api: "api", apiSettings: { @@ -41,5 +41,3 @@ const settings = { height: "windowBounds.height", }, }; - -module.exports = settings; diff --git a/src/declarations.d.ts b/src/declarations.d.ts new file mode 100644 index 0000000..5f44bbf --- /dev/null +++ b/src/declarations.d.ts @@ -0,0 +1 @@ +declare module "mpris-service"; diff --git a/src/main.ts b/src/main.ts index 11c6291..9d7ea4f 100644 --- a/src/main.ts +++ b/src/main.ts @@ -12,19 +12,20 @@ import path from "path"; import flagValues from "./constants/flags"; import globalEvents from "./constants/globalEvents"; import mediaKeys from "./constants/mediaKeys"; -import discordModule from "./scripts/discord"; +import { initRPC, rpc, unRPC } from "./scripts/discord"; import { startExpress } from "./scripts/express"; -import mediaInfoModule from "./scripts/mediaInfo"; +import { updateMediaInfo } from "./scripts/mediaInfo"; import { addMenu } from "./scripts/menu"; import { closeSettingsWindow, createSettingsWindow, hideSettingsWindow, - settings, showSettingsWindow, - store, + settingsStore, } from "./scripts/settings"; +import { settings } from "./constants/settings"; import { addTray, refreshTray } from "./scripts/tray"; +import { MediaInfo } from "./models/mediaInfo"; const tidalUrl = "https://listen.tidal.com"; initialize(); @@ -36,7 +37,7 @@ const PROTOCOL_PREFIX = "tidal"; setFlags(); function setFlags() { - const flags = store.get(settings.flags.root); + const flags = settingsStore.get(settings.flags.root); if (flags) { for (const [key, value] of Object.entries(flags)) { if (value) { @@ -59,7 +60,7 @@ function setFlags() { * */ function syncMenuBarWithStore() { - const fixedMenuBar = !!store.get(settings.menuBar); + const fixedMenuBar = !!settingsStore.get(settings.menuBar); mainWindow.autoHideMenuBar = !fixedMenuBar; mainWindow.setMenuBarVisibility(fixedMenuBar); @@ -72,7 +73,7 @@ function syncMenuBarWithStore() { * @returns true if singInstance is not requested, otherwise true/false based on whether the current window is the main window */ function isMainInstanceOrMultipleInstancesAllowed() { - if (store.get(settings.singleInstance)) { + if (settingsStore.get(settings.singleInstance)) { const gotTheLock = app.requestSingleInstanceLock(); if (!gotTheLock) { @@ -87,8 +88,8 @@ function createWindow(options = { x: 0, y: 0, backgroundColor: "white" }) { mainWindow = new BrowserWindow({ x: options.x, y: options.y, - width: store && store.get(settings.windowBounds.width), - height: store && store.get(settings.windowBounds.height), + width: settingsStore && settingsStore.get(settings.windowBounds.width), + height: settingsStore && settingsStore.get(settings.windowBounds.height), icon, backgroundColor: options.backgroundColor, autoHideMenuBar: true, @@ -106,13 +107,13 @@ function createWindow(options = { x: 0, y: 0, backgroundColor: "white" }) { // load the Tidal website mainWindow.loadURL(tidalUrl); - if (store.get(settings.disableBackgroundThrottle)) { + if (settingsStore.get(settings.disableBackgroundThrottle)) { // prevent setInterval lag mainWindow.webContents.setBackgroundThrottling(false); } mainWindow.on("close", function (event: CloseEvent) { - if (store.get(settings.minimizeOnClose)) { + if (settingsStore.get(settings.minimizeOnClose)) { event.preventDefault(); mainWindow.hide(); refreshTray(mainWindow); @@ -126,12 +127,12 @@ function createWindow(options = { x: 0, y: 0, backgroundColor: "white" }) { }); mainWindow.on("resize", () => { const { width, height } = mainWindow.getBounds(); - store.set(settings.windowBounds.root, { width, height }); + settingsStore.set(settings.windowBounds.root, { width, height }); }); } function registerHttpProtocols() { - protocol.registerHttpProtocol(PROTOCOL_PREFIX, (request, _callback) => { + protocol.registerHttpProtocol(PROTOCOL_PREFIX, (request) => { mainWindow.loadURL(`${tidalUrl}/${request.url.substring(PROTOCOL_PREFIX.length + 3)}`); }); if (!app.isDefaultProtocolClient(PROTOCOL_PREFIX)) { @@ -155,7 +156,7 @@ app.on("ready", async () => { await components.whenReady(); // Adblock - if (store.get(settings.adBlock)) { + if (settingsStore.get(settings.adBlock)) { const filter = { urls: ["https://listen.tidal.com/*"] }; session.defaultSession.webRequest.onBeforeRequest(filter, (details, callback) => { if (details.url.match(/\/users\/.*\d\?country/)) callback({ cancel: true }); @@ -167,12 +168,12 @@ app.on("ready", async () => { addMenu(mainWindow); createSettingsWindow(); addGlobalShortcuts(); - if (store.get(settings.trayIcon)) { + if (settingsStore.get(settings.trayIcon)) { addTray(mainWindow, { icon }); refreshTray(mainWindow); } - store.get(settings.api) && startExpress(mainWindow); - store.get(settings.enableDiscord) && discordModule.initRPC(); + settingsStore.get(settings.api) && startExpress(mainWindow); + settingsStore.get(settings.enableDiscord) && initRPC(); } else { app.quit(); } @@ -191,31 +192,31 @@ app.on("browser-window-created", (_, window) => { }); // IPC -ipcMain.on(globalEvents.updateInfo, (_event, arg) => { - mediaInfoModule.update(arg); +ipcMain.on(globalEvents.updateInfo, (_event, arg: MediaInfo) => { + updateMediaInfo(arg); }); -ipcMain.on(globalEvents.hideSettings, (_event, _arg) => { +ipcMain.on(globalEvents.hideSettings, () => { hideSettingsWindow(); }); -ipcMain.on(globalEvents.showSettings, (_event, _arg) => { +ipcMain.on(globalEvents.showSettings, () => { showSettingsWindow(); }); -ipcMain.on(globalEvents.refreshMenuBar, (_event, _arg) => { +ipcMain.on(globalEvents.refreshMenuBar, () => { syncMenuBarWithStore(); }); -ipcMain.on(globalEvents.storeChanged, (_event, _arg) => { +ipcMain.on(globalEvents.storeChanged, () => { syncMenuBarWithStore(); - if (store.get(settings.enableDiscord) && !discordModule.rpc) { - discordModule.initRPC(); - } else if (!store.get(settings.enableDiscord) && discordModule.rpc) { - discordModule.unRPC(); + if (settingsStore.get(settings.enableDiscord) && !rpc) { + initRPC(); + } else if (!settingsStore.get(settings.enableDiscord) && rpc) { + unRPC(); } }); -ipcMain.on(globalEvents.error, (event, _arg) => { +ipcMain.on(globalEvents.error, (event) => { console.log(event); }); diff --git a/src/models/mediaInfo.ts b/src/models/mediaInfo.ts new file mode 100644 index 0000000..6e6c62b --- /dev/null +++ b/src/models/mediaInfo.ts @@ -0,0 +1,13 @@ +import { MediaStatus } from "./mediaStatus"; + +export interface MediaInfo { + title: string; + artists: string; + album: string; + icon: string; + status: MediaStatus; + url: string; + current: string; + duration: string; + image: string; +} diff --git a/src/models/mediaStatus.ts b/src/models/mediaStatus.ts new file mode 100644 index 0000000..5d66392 --- /dev/null +++ b/src/models/mediaStatus.ts @@ -0,0 +1,4 @@ +export enum MediaStatus { + playing = "playing", + paused = "paused", +} diff --git a/src/pages/settings/preload.ts b/src/pages/settings/preload.ts index 1e9b120..c2e569d 100644 --- a/src/pages/settings/preload.ts +++ b/src/pages/settings/preload.ts @@ -1,3 +1,9 @@ +import remote from "@electron/remote"; +import { ipcRenderer, shell } from "electron"; +import globalEvents from "../../constants/globalEvents"; +import { settings } from "../../constants/settings"; +import { settingsStore } from "./../../scripts/settings"; + let adBlock: HTMLInputElement, api: HTMLInputElement, customCSS: HTMLInputElement, @@ -18,42 +24,35 @@ let adBlock: HTMLInputElement, trayIcon: HTMLInputElement, updateFrequency: HTMLInputElement; -const { store, settings } = require("../../scripts/settings"); -const { ipcRenderer } = require("electron"); -const globalEvents = require("../../constants/globalEvents"); -const remote = require("@electron/remote"); -const { app } = remote; - /** * Sync the UI forms with the current settings */ function refreshSettings() { - adBlock.checked = store.get(settings.adBlock); - api.checked = store.get(settings.api); - customCSS.value = store.get(settings.customCSS); - disableBackgroundThrottle.checked = store.get(settings.disableBackgroundThrottle); - disableHardwareMediaKeys.checked = store.get(settings.flags.disableHardwareMediaKeys); - enableCustomHotkeys.checked = store.get(settings.enableCustomHotkeys); - enableDiscord.checked = store.get(settings.enableDiscord); - gpuRasterization.checked = store.get(settings.flags.gpuRasterization); - menuBar.checked = store.get(settings.menuBar); - minimizeOnClose.checked = store.get(settings.minimizeOnClose); - mpris.checked = store.get(settings.mpris); - notifications.checked = store.get(settings.notifications); - playBackControl.checked = store.get(settings.playBackControl); - port.value = store.get(settings.apiSettings.port); - singleInstance.checked = store.get(settings.singleInstance); - skipArtists.checked = store.get(settings.skipArtists); - skippedArtists.value = (store.get(settings.skippedArtists) as string[]).join("\n"); - trayIcon.checked = store.get(settings.trayIcon); - updateFrequency.value = store.get(settings.updateFrequency); + adBlock.checked = settingsStore.get(settings.adBlock); + api.checked = settingsStore.get(settings.api); + customCSS.value = settingsStore.get(settings.customCSS); + disableBackgroundThrottle.checked = settingsStore.get(settings.disableBackgroundThrottle); + disableHardwareMediaKeys.checked = settingsStore.get(settings.flags.disableHardwareMediaKeys); + enableCustomHotkeys.checked = settingsStore.get(settings.enableCustomHotkeys); + enableDiscord.checked = settingsStore.get(settings.enableDiscord); + gpuRasterization.checked = settingsStore.get(settings.flags.gpuRasterization); + menuBar.checked = settingsStore.get(settings.menuBar); + minimizeOnClose.checked = settingsStore.get(settings.minimizeOnClose); + mpris.checked = settingsStore.get(settings.mpris); + notifications.checked = settingsStore.get(settings.notifications); + playBackControl.checked = settingsStore.get(settings.playBackControl); + port.value = settingsStore.get(settings.apiSettings.port); + singleInstance.checked = settingsStore.get(settings.singleInstance); + skipArtists.checked = settingsStore.get(settings.skipArtists); + skippedArtists.value = settingsStore.get(settings.skippedArtists).join("\n"); + trayIcon.checked = settingsStore.get(settings.trayIcon); + updateFrequency.value = settingsStore.get(settings.updateFrequency); } /** * Open an url in the default browsers */ function openExternal(url: string) { - const { shell } = require("electron"); shell.openExternal(url); } @@ -68,8 +67,8 @@ function hide() { * Restart tidal-hifi after changes */ function restart() { - app.relaunch(); - app.exit(); + remote.app.relaunch(); + remote.app.exit(); } /** @@ -91,9 +90,9 @@ window.addEventListener("DOMContentLoaded", () => { function addInputListener(source: HTMLInputElement, key: string) { source.addEventListener("input", () => { if (source.value === "on") { - store.set(key, source.checked); + settingsStore.set(key, source.checked); } else { - store.set(key, source.value); + settingsStore.set(key, source.value); } ipcRenderer.send(globalEvents.storeChanged); }); @@ -101,7 +100,7 @@ window.addEventListener("DOMContentLoaded", () => { function addTextAreaListener(source: HTMLInputElement, key: string) { source.addEventListener("input", () => { - store.set(key, source.value.split("\n")); + settingsStore.set(key, source.value.split("\n")); ipcRenderer.send(globalEvents.storeChanged); }); } diff --git a/src/preload.ts b/src/preload.ts index 7bf5e3d..5e17004 100644 --- a/src/preload.ts +++ b/src/preload.ts @@ -1,13 +1,15 @@ import { Notification, app, dialog } from "@electron/remote"; import { ipcRenderer } from "electron"; +import Player from "mpris-service"; import globalEvents from "./constants/globalEvents"; -import { customCSS, skipArtists, updateFrequency } from "./constants/settings"; +import { settings } from "./constants/settings"; import statuses from "./constants/statuses"; import { Options } from "./models/options"; import { downloadFile } from "./scripts/download"; import { addHotkey } from "./scripts/hotkeys"; -import { settings, store } from "./scripts/settings"; + import { setTitle } from "./scripts/window-functions"; +import { settingsStore } from "./scripts/settings"; const notificationPath = `${app.getPath("userData")}/notification.jpg`; const appName = "Tidal Hifi"; let currentSong = ""; @@ -146,7 +148,7 @@ const elements = { function addCustomCss() { window.addEventListener("DOMContentLoaded", () => { const style = document.createElement("style"); - style.innerHTML = store.get(customCSS); + style.innerHTML = settingsStore.get(settings.customCSS); document.head.appendChild(style); }); } @@ -156,7 +158,7 @@ function addCustomCss() { * make sure it returns a number, if not use the default */ function getUpdateFrequency() { - const storeValue = store.get(updateFrequency) as number; + const storeValue = settingsStore.get(settings.updateFrequency) as number; const defaultValue = 500; if (!isNaN(storeValue)) { @@ -185,7 +187,7 @@ function playPause() { * https://defkey.com/tidal-desktop-shortcuts */ function addHotKeys() { - if (store.get(settings.enableCustomHotkeys)) { + if (settingsStore.get(settings.enableCustomHotkeys)) { addHotkey("Control+p", function () { elements.click("account").click("settings"); }); @@ -291,7 +293,7 @@ function addIPCEventListeners() { * Update the current status of tidal (e.g playing or paused) */ function getCurrentlyPlayingStatus() { - let pause = elements.get("pause"); + const pause = elements.get("pause"); let status = undefined; // if pause button is visible tidal is playing @@ -320,7 +322,7 @@ function convertDuration(duration: string) { function updateMediaInfo(options: Options, notify: boolean) { if (options) { ipcRenderer.send(globalEvents.updateInfo, options); - if (store.get(settings.notifications) && notify) { + if (settingsStore.get(settings.notifications) && notify) { new Notification({ title: options.title, body: options.artists, icon: options.icon }).show(); } if (player) { @@ -430,23 +432,20 @@ setInterval(function () { // if the image can't be found on the page continue without it resolve(); } - }).then( - () => { - updateMediaInfo(options, titleOrArtistsChanged); - if (titleOrArtistsChanged) { - updateMediaSession(options); - } - }, - () => {} - ); + }).then(() => { + updateMediaInfo(options, titleOrArtistsChanged); + if (titleOrArtistsChanged) { + updateMediaSession(options); + } + }); /** * automatically skip a song if the artists are found in the list of artists to skip * @param {*} artists array of artists */ function skipArtistsIfFoundInSkippedArtistsList(artists: string[]) { - if (store.get(skipArtists)) { - const skippedArtists = store.get(settings.skippedArtists) as string[]; + if (settingsStore.get(settings.skipArtists)) { + const skippedArtists = settingsStore.get(settings.skippedArtists); if (skippedArtists.length > 0) { const artistsToSkip = skippedArtists.map((artist) => artist); const artistNames = Object.values(artists).map((artist) => artist); @@ -459,9 +458,8 @@ setInterval(function () { } }, getUpdateFrequency()); -if (process.platform === "linux" && store.get(settings.mpris)) { +if (process.platform === "linux" && settingsStore.get(settings.mpris)) { try { - const Player = require("mpris-service"); player = Player({ name: "tidal-hifi", identity: "tidal-hifi", diff --git a/src/scripts/discord.js b/src/scripts/discord.js deleted file mode 100644 index b8c6978..0000000 --- a/src/scripts/discord.js +++ /dev/null @@ -1,103 +0,0 @@ -const discordrpc = require("discord-rpc"); -const { app, ipcMain } = require("electron"); -const globalEvents = require("../constants/globalEvents"); -const clientId = "833617820704440341"; -const mediaInfoModule = require("./mediaInfo"); -const discordModule = { - rpc: {}, - unRPC: function () { - return; - }, - initRPC: function () { - return; - }, -}; - -function timeToSeconds(timeArray) { - let minutes = timeArray[0] * 1; - let seconds = minutes * 60 + timeArray[1] * 1; - return seconds; -} - -let rpc; -const observer = (event, arg) => { - if (mediaInfoModule.mediaInfo.status == "paused" && rpc) { - rpc.setActivity(idleStatus); - } else if (rpc) { - const currentSeconds = timeToSeconds(mediaInfoModule.mediaInfo.current.split(":")); - const durationSeconds = timeToSeconds(mediaInfoModule.mediaInfo.duration.split(":")); - const date = new Date(); - const now = (date.getTime() / 1000) | 0; - const remaining = date.setSeconds(date.getSeconds() + (durationSeconds - currentSeconds)); - if (mediaInfoModule.mediaInfo.url) { - rpc.setActivity({ - ...idleStatus, - ...{ - details: `Listening to ${mediaInfoModule.mediaInfo.title}`, - state: mediaInfoModule.mediaInfo.artists - ? mediaInfoModule.mediaInfo.artists - : "unknown artist(s)", - startTimestamp: parseInt(now), - endTimestamp: parseInt(remaining), - largeImageKey: mediaInfoModule.mediaInfo.image, - largeImageText: mediaInfoModule.mediaInfo.album - ? mediaInfoModule.mediaInfo.album - : `${idleStatus.largeImageText}`, - buttons: [{ label: "Play on Tidal", url: mediaInfoModule.mediaInfo.url }], - }, - }); - } else { - rpc.setActivity({ - ...idleStatus, - ...{ - details: `Watching ${mediaInfoModule.mediaInfo.title}`, - state: mediaInfoModule.mediaInfo.artists, - startTimestamp: parseInt(now), - endTimestamp: parseInt(remaining), - }, - }); - } - } -}; - -const idleStatus = { - details: `Browsing Tidal`, - largeImageKey: "tidal-hifi-icon", - largeImageText: `Tidal HiFi ${app.getVersion()}`, - instance: false, -}; - -/** - * Set up the discord rpc and listen on globalEvents.updateInfo - */ -discordModule.initRPC = function () { - rpc = new discordrpc.Client({ transport: "ipc" }); - rpc.login({ clientId }).then( - () => { - discordModule.rpc = rpc; - - rpc.on("ready", () => { - rpc.setActivity(idleStatus); - }); - ipcMain.on(globalEvents.updateInfo, observer); - }, - () => { - console.error("Can't connect to Discord, is it running?"); - } - ); -}; - -/** - * Remove any RPC connection with discord and remove the event listener on globalEvents.updateInfo - */ -discordModule.unRPC = function () { - if (rpc) { - rpc.clearActivity(); - rpc.destroy(); - rpc = false; - discordModule.rpc = undefined; - ipcMain.removeListener(globalEvents.updateInfo, observer); - } -}; - -module.exports = discordModule; diff --git a/src/scripts/discord.ts b/src/scripts/discord.ts new file mode 100644 index 0000000..4d07a21 --- /dev/null +++ b/src/scripts/discord.ts @@ -0,0 +1,88 @@ +import { Client } from "discord-rpc"; +import { app, ipcMain } from "electron"; +import globalEvents from "../constants/globalEvents"; +import { MediaStatus } from "../models/mediaStatus"; +import { mediaInfo } from "./mediaInfo"; + +const clientId = "833617820704440341"; + +function timeToSeconds(timeArray: string[]) { + const minutes = parseInt(timeArray[0]) * 1; + const seconds = minutes * 60 + parseInt(timeArray[1]) * 1; + return seconds; +} + +export let rpc: Client; + +const observer = () => { + if (mediaInfo.status == MediaStatus.paused && rpc) { + rpc.setActivity(idleStatus); + } else if (rpc) { + const currentSeconds = timeToSeconds(mediaInfo.current.split(":")); + const durationSeconds = timeToSeconds(mediaInfo.duration.split(":")); + const date = new Date(); + const now = (date.getTime() / 1000) | 0; + const remaining = date.setSeconds(date.getSeconds() + (durationSeconds - currentSeconds)); + if (mediaInfo.url) { + rpc.setActivity({ + ...idleStatus, + ...{ + details: `Listening to ${mediaInfo.title}`, + state: mediaInfo.artists ? mediaInfo.artists : "unknown artist(s)", + startTimestamp: now, + endTimestamp: remaining, + largeImageKey: mediaInfo.image, + largeImageText: mediaInfo.album ? mediaInfo.album : `${idleStatus.largeImageText}`, + buttons: [{ label: "Play on Tidal", url: mediaInfo.url }], + }, + }); + } else { + rpc.setActivity({ + ...idleStatus, + ...{ + details: `Watching ${mediaInfo.title}`, + state: mediaInfo.artists, + startTimestamp: now, + endTimestamp: remaining, + }, + }); + } + } +}; + +const idleStatus = { + details: `Browsing Tidal`, + largeImageKey: "tidal-hifi-icon", + largeImageText: `Tidal HiFi ${app.getVersion()}`, + instance: false, +}; + +/** + * Set up the discord rpc and listen on globalEvents.updateInfo + */ +export const initRPC = () => { + rpc = new Client({ transport: "ipc" }); + rpc.login({ clientId }).then( + () => { + rpc.on("ready", () => { + rpc.setActivity(idleStatus); + }); + ipcMain.on(globalEvents.updateInfo, observer); + }, + () => { + console.error("Can't connect to Discord, is it running?"); + } + ); +}; + +/** + * Remove any RPC connection with discord and remove the event listener on globalEvents.updateInfo + */ +export const unRPC = () => { + if (rpc) { + rpc.clearActivity(); + rpc.destroy(); + rpc = null; + ipcMain.removeListener(globalEvents.updateInfo, observer); + } +}; diff --git a/src/scripts/express.ts b/src/scripts/express.ts index 232c254..3667621 100644 --- a/src/scripts/express.ts +++ b/src/scripts/express.ts @@ -1,10 +1,11 @@ -import { BrowserWindow } from "electron"; +import { BrowserWindow, dialog } from "electron"; import express, { Response } from "express"; import fs from "fs"; -const { mediaInfo } = require("./mediaInfo"); -const { store, settings } = require("./settings"); -const globalEvents = require("./../constants/globalEvents"); -const statuses = require("./../constants/statuses"); +import globalEvents from "./../constants/globalEvents"; +import statuses from "./../constants/statuses"; +import { mediaInfo } from "./mediaInfo"; +import { settingsStore } from "./settings"; +import { settings } from "../constants/settings"; /** * Function to enable tidal-hifi's express api @@ -37,7 +38,7 @@ export const startExpress = (mainWindow: BrowserWindow) => { }); }); - if (store.get(settings.playBackControl)) { + if (settingsStore.get(settings.playBackControl)) { expressApp.get("/play", (req, res) => handleGlobalEvent(res, globalEvents.play)); expressApp.get("/pause", (req, res) => handleGlobalEvent(res, globalEvents.pause)); expressApp.get("/next", (req, res) => handleGlobalEvent(res, globalEvents.next)); @@ -51,15 +52,15 @@ export const startExpress = (mainWindow: BrowserWindow) => { }); } - let port = store.get(settings.apiSettings.port); + const port = settingsStore.get(settings.apiSettings.port); - const expressInstance = expressApp.listen(port, "127.0.0.1", () => {}); + const expressInstance = expressApp.listen(port, "127.0.0.1"); expressInstance.on("error", function (e: { code: string }) { let message = e.code; if (e.code === "EADDRINUSE") { message = `Port ${port} in use.`; } - const { dialog } = require("electron"); + dialog.showErrorBox("Api failed to start.", message); }); }; diff --git a/src/scripts/mediaInfo.js b/src/scripts/mediaInfo.js deleted file mode 100644 index 92cc2c5..0000000 --- a/src/scripts/mediaInfo.js +++ /dev/null @@ -1,38 +0,0 @@ -const statuses = require("./../constants/statuses"); - -const mediaInfo = { - title: "", - artists: "", - album: "", - icon: "", - status: statuses.paused, - url: "", - current: "", - duration: "", - image: "tidal-hifi-icon", -}; -const mediaInfoModule = { - mediaInfo, - update: function (arg) { - mediaInfo.title = propOrDefault(arg.title); - mediaInfo.artists = propOrDefault(arg.artists); - mediaInfo.album = propOrDefault(arg.album); - mediaInfo.icon = propOrDefault(arg.icon); - mediaInfo.url = propOrDefault(arg.url); - mediaInfo.status = propOrDefault(arg.status); - mediaInfo.current = propOrDefault(arg.current); - mediaInfo.duration = propOrDefault(arg.duration); - mediaInfo.image = propOrDefault(arg.image); - }, -}; - -/** - * Return the property or a default value - * @param {*} prop property to check - * @param {*} defaultValue defaults to "" - */ -function propOrDefault(prop, defaultValue = "") { - return prop ? prop : defaultValue; -} - -module.exports = mediaInfoModule; diff --git a/src/scripts/mediaInfo.ts b/src/scripts/mediaInfo.ts new file mode 100644 index 0000000..e35f7cc --- /dev/null +++ b/src/scripts/mediaInfo.ts @@ -0,0 +1,35 @@ +import { MediaInfo } from "../models/mediaInfo"; +import statuses from "./../constants/statuses"; + +export const mediaInfo = { + title: "", + artists: "", + album: "", + icon: "", + status: statuses.paused, + url: "", + current: "", + duration: "", + image: "tidal-hifi-icon", +}; + +export const updateMediaInfo = (arg: MediaInfo) => { + mediaInfo.title = propOrDefault(arg.title); + mediaInfo.artists = propOrDefault(arg.artists); + mediaInfo.album = propOrDefault(arg.album); + mediaInfo.icon = propOrDefault(arg.icon); + mediaInfo.url = propOrDefault(arg.url); + mediaInfo.status = propOrDefault(arg.status); + mediaInfo.current = propOrDefault(arg.current); + mediaInfo.duration = propOrDefault(arg.duration); + mediaInfo.image = propOrDefault(arg.image); +}; + +/** + * Return the property or a default value + * @param {*} prop property to check + * @param {*} defaultValue defaults to "" + */ +function propOrDefault(prop: string, defaultValue = "") { + return prop ? prop : defaultValue; +} diff --git a/src/scripts/settings.js b/src/scripts/settings.ts similarity index 76% rename from src/scripts/settings.js rename to src/scripts/settings.ts index 0e36c3f..8697d6c 100644 --- a/src/scripts/settings.js +++ b/src/scripts/settings.ts @@ -1,12 +1,12 @@ -const Store = require("electron-store"); +import Store from "electron-store"; -const settings = require("../constants/settings"); -const path = require("path"); -const { BrowserWindow } = require("electron"); +import { settings } from "../constants/settings"; +import path from "path"; +import { BrowserWindow } from "electron"; -let settingsWindow; +let settingsWindow: BrowserWindow; -const store = new Store({ +export const settingsStore = new Store({ defaults: { adBlock: false, api: true, @@ -46,12 +46,11 @@ const store = new Store({ }); const settingsModule = { - store, - settings, + // settings, settingsWindow, }; -settingsModule.createSettingsWindow = function () { +export const createSettingsWindow = function () { settingsWindow = new BrowserWindow({ width: 700, height: 600, @@ -67,7 +66,7 @@ settingsModule.createSettingsWindow = function () { }, }); - settingsWindow.on("close", (event) => { + settingsWindow.on("close", (event: any) => { if (settingsWindow != null) { event.preventDefault(); settingsWindow.hide(); @@ -79,19 +78,17 @@ settingsModule.createSettingsWindow = function () { settingsModule.settingsWindow = settingsWindow; }; -settingsModule.showSettingsWindow = function (tab = "general") { +export const showSettingsWindow = function (tab = "general") { settingsWindow.webContents.send("goToTab", tab); // refresh data just before showing the window settingsWindow.webContents.send("refreshData"); settingsWindow.show(); }; -settingsModule.hideSettingsWindow = function () { +export const hideSettingsWindow = function () { settingsWindow.hide(); }; -settingsModule.closeSettingsWindow = function () { +export const closeSettingsWindow = function () { settingsWindow = null; }; - -module.exports = settingsModule; From d823f07ed897ef44bd634179ac85c4f947c1d9ed Mon Sep 17 00:00:00 2001 From: Mastermindzh Date: Sun, 7 May 2023 16:13:30 +0200 Subject: [PATCH 06/10] last files transformed from js -> ts --- src/constants/{flags.js => flags.ts} | 4 +--- src/constants/{globalEvents.js => globalEvents.ts} | 4 +--- src/constants/{mediaKeys.js => mediaKeys.ts} | 6 ++---- src/constants/{statuses.js => statuses.ts} | 2 +- src/constants/{values.js => values.ts} | 2 +- src/main.ts | 12 ++++++------ src/pages/settings/preload.ts | 2 +- src/preload.ts | 6 +++--- src/scripts/discord.ts | 2 +- src/scripts/express.ts | 4 ++-- src/scripts/mediaInfo.ts | 2 +- src/scripts/menu.ts | 4 ++-- 12 files changed, 22 insertions(+), 28 deletions(-) rename src/constants/{flags.js => flags.ts} (70%) rename src/constants/{globalEvents.js => globalEvents.ts} (83%) rename src/constants/{mediaKeys.js => mediaKeys.ts} (56%) rename src/constants/{statuses.js => statuses.ts} (63%) rename src/constants/{values.js => values.ts} (56%) diff --git a/src/constants/flags.js b/src/constants/flags.ts similarity index 70% rename from src/constants/flags.js rename to src/constants/flags.ts index 88813ae..64c36ae 100644 --- a/src/constants/flags.js +++ b/src/constants/flags.ts @@ -1,6 +1,4 @@ -const flags = { +export const flags: { [key: string]: { flag: string; value?: any }[] } = { gpuRasterization: [{ flag: "enable-gpu-rasterization", value: undefined }], disableHardwareMediaKeys: [{ flag: "disable-features", value: "HardwareMediaKeyHandling" }], }; - -module.exports = flags; diff --git a/src/constants/globalEvents.js b/src/constants/globalEvents.ts similarity index 83% rename from src/constants/globalEvents.js rename to src/constants/globalEvents.ts index c330be4..b60b5c9 100644 --- a/src/constants/globalEvents.js +++ b/src/constants/globalEvents.ts @@ -1,4 +1,4 @@ -const globalEvents = { +export const globalEvents = { play: "play", pause: "pause", playPause: "playPause", @@ -11,5 +11,3 @@ const globalEvents = { storeChanged: "storeChanged", error: "error", }; - -module.exports = globalEvents; diff --git a/src/constants/mediaKeys.js b/src/constants/mediaKeys.ts similarity index 56% rename from src/constants/mediaKeys.js rename to src/constants/mediaKeys.ts index cc0828a..ba8b719 100644 --- a/src/constants/mediaKeys.js +++ b/src/constants/mediaKeys.ts @@ -1,9 +1,7 @@ -const globalEvents = require("./globalEvents"); +import { globalEvents } from "./globalEvents"; -const mediaKeys = { +export const mediaKeys = { MediaPlayPause: globalEvents.playPause, MediaNextTrack: globalEvents.next, MediaPreviousTrack: globalEvents.previous, }; - -module.exports = mediaKeys; diff --git a/src/constants/statuses.js b/src/constants/statuses.ts similarity index 63% rename from src/constants/statuses.js rename to src/constants/statuses.ts index 33ae17a..3209307 100644 --- a/src/constants/statuses.js +++ b/src/constants/statuses.ts @@ -1,4 +1,4 @@ -module.exports = { +export const statuses = { playing: "playing", paused: "paused", }; diff --git a/src/constants/values.js b/src/constants/values.ts similarity index 56% rename from src/constants/values.js rename to src/constants/values.ts index 267a8b4..a4e2764 100644 --- a/src/constants/values.js +++ b/src/constants/values.ts @@ -1,3 +1,3 @@ -module.exports = { +export default { name: "tidal-hifi", }; diff --git a/src/main.ts b/src/main.ts index 9d7ea4f..6a040e7 100644 --- a/src/main.ts +++ b/src/main.ts @@ -9,9 +9,9 @@ import { session, } from "electron"; import path from "path"; -import flagValues from "./constants/flags"; -import globalEvents from "./constants/globalEvents"; -import mediaKeys from "./constants/mediaKeys"; +import { flags } from "./constants/flags"; +import { globalEvents } from "./constants/globalEvents"; +import { mediaKeys } from "./constants/mediaKeys"; import { initRPC, rpc, unRPC } from "./scripts/discord"; import { startExpress } from "./scripts/express"; import { updateMediaInfo } from "./scripts/mediaInfo"; @@ -37,11 +37,11 @@ const PROTOCOL_PREFIX = "tidal"; setFlags(); function setFlags() { - const flags = settingsStore.get(settings.flags.root); - if (flags) { + const flagsFromSettings = settingsStore.get(settings.flags.root); + if (flagsFromSettings) { for (const [key, value] of Object.entries(flags)) { if (value) { - (flagValues as any)[key].forEach((flag: any) => { + flags[key].forEach((flag) => { console.log(`enabling command line switch ${flag.flag} with value ${flag.value}`); app.commandLine.appendSwitch(flag.flag, flag.value); }); diff --git a/src/pages/settings/preload.ts b/src/pages/settings/preload.ts index c2e569d..fb64769 100644 --- a/src/pages/settings/preload.ts +++ b/src/pages/settings/preload.ts @@ -1,6 +1,6 @@ import remote from "@electron/remote"; import { ipcRenderer, shell } from "electron"; -import globalEvents from "../../constants/globalEvents"; +import { globalEvents } from "../../constants/globalEvents"; import { settings } from "../../constants/settings"; import { settingsStore } from "./../../scripts/settings"; diff --git a/src/preload.ts b/src/preload.ts index 5e17004..f35474f 100644 --- a/src/preload.ts +++ b/src/preload.ts @@ -1,15 +1,15 @@ import { Notification, app, dialog } from "@electron/remote"; import { ipcRenderer } from "electron"; import Player from "mpris-service"; -import globalEvents from "./constants/globalEvents"; +import { globalEvents } from "./constants/globalEvents"; import { settings } from "./constants/settings"; -import statuses from "./constants/statuses"; +import { statuses } from "./constants/statuses"; import { Options } from "./models/options"; import { downloadFile } from "./scripts/download"; import { addHotkey } from "./scripts/hotkeys"; -import { setTitle } from "./scripts/window-functions"; import { settingsStore } from "./scripts/settings"; +import { setTitle } from "./scripts/window-functions"; const notificationPath = `${app.getPath("userData")}/notification.jpg`; const appName = "Tidal Hifi"; let currentSong = ""; diff --git a/src/scripts/discord.ts b/src/scripts/discord.ts index 4d07a21..909c5b8 100644 --- a/src/scripts/discord.ts +++ b/src/scripts/discord.ts @@ -1,6 +1,6 @@ import { Client } from "discord-rpc"; import { app, ipcMain } from "electron"; -import globalEvents from "../constants/globalEvents"; +import { globalEvents } from "../constants/globalEvents"; import { MediaStatus } from "../models/mediaStatus"; import { mediaInfo } from "./mediaInfo"; diff --git a/src/scripts/express.ts b/src/scripts/express.ts index 3667621..6097a6f 100644 --- a/src/scripts/express.ts +++ b/src/scripts/express.ts @@ -1,8 +1,8 @@ import { BrowserWindow, dialog } from "electron"; import express, { Response } from "express"; import fs from "fs"; -import globalEvents from "./../constants/globalEvents"; -import statuses from "./../constants/statuses"; +import { globalEvents } from "./../constants/globalEvents"; +import { statuses } from "./../constants/statuses"; import { mediaInfo } from "./mediaInfo"; import { settingsStore } from "./settings"; import { settings } from "../constants/settings"; diff --git a/src/scripts/mediaInfo.ts b/src/scripts/mediaInfo.ts index e35f7cc..1341a08 100644 --- a/src/scripts/mediaInfo.ts +++ b/src/scripts/mediaInfo.ts @@ -1,5 +1,5 @@ import { MediaInfo } from "../models/mediaInfo"; -import statuses from "./../constants/statuses"; +import { statuses } from "./../constants/statuses"; export const mediaInfo = { title: "", diff --git a/src/scripts/menu.ts b/src/scripts/menu.ts index 9319b42..786842b 100644 --- a/src/scripts/menu.ts +++ b/src/scripts/menu.ts @@ -1,7 +1,7 @@ import { BrowserWindow, Menu, app } from "electron"; -const { showSettingsWindow } = require("./settings"); +import { showSettingsWindow } from "./settings"; const isMac = process.platform === "darwin"; -const { name } = require("./../constants/values"); +import name from "./../constants/values"; const settingsMenuEntry = { label: "Settings", From 2c5d2b9530b68a9c6a720f7551c6951830e12204 Mon Sep 17 00:00:00 2001 From: Mastermindzh Date: Sun, 7 May 2023 23:46:18 +0200 Subject: [PATCH 07/10] ci: cross-platform copy-files --- CHANGELOG.md | 5 ++ package-lock.json | 129 ++++++++++++++++++++++++++++++++++++++++++++-- package.json | 7 +-- 3 files changed, 135 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 25852f5..24397c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 5.2.0 + +- moved from Javascript to Typescript for all files + - use `npm run watch` to watch for changes & recompile typescript and sass files + ## 5.1.0 ### New features diff --git a/package-lock.json b/package-lock.json index 39afe00..fc82f3b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "tidal-hifi", - "version": "5.1.0", + "version": "5.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "tidal-hifi", - "version": "5.1.0", + "version": "5.2.0", "license": "MIT", "dependencies": { "@electron/remote": "^2.0.9", @@ -25,6 +25,7 @@ "@types/request": "^2.48.8", "@typescript-eslint/eslint-plugin": "^5.59.1", "@typescript-eslint/parser": "^5.59.1", + "copyfiles": "^2.4.1", "electron": "git+https://github.com/castlabs/electron-releases.git#v24.1.2+wvcus", "electron-builder": "^24.2.1", "eslint": "^8.39.0", @@ -2631,6 +2632,85 @@ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" }, + "node_modules/copyfiles": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/copyfiles/-/copyfiles-2.4.1.tgz", + "integrity": "sha512-fereAvAvxDrQDOXybk3Qu3dPbOoKoysFMWtkY3mv5BsL8//OSZVL5DCLYqgRfY5cWirgRzlC+WSrxp6Bo3eNZg==", + "dev": true, + "dependencies": { + "glob": "^7.0.5", + "minimatch": "^3.0.3", + "mkdirp": "^1.0.4", + "noms": "0.0.0", + "through2": "^2.0.1", + "untildify": "^4.0.0", + "yargs": "^16.1.0" + }, + "bin": { + "copyfiles": "copyfiles", + "copyup": "copyfiles" + } + }, + "node_modules/copyfiles/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/copyfiles/node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/copyfiles/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/copyfiles/node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "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/copyfiles/node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/core-util-is": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", @@ -5992,6 +6072,40 @@ "node": ">=10" } }, + "node_modules/noms": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/noms/-/noms-0.0.0.tgz", + "integrity": "sha512-lNDU9VJaOPxUmXcLb+HQFeUgQQPtMI24Gt6hgfuMHRJgMRHMF/qZ4HJD3GDru4sSw9IQl2jPjAYnQrdIeLbwow==", + "dev": true, + "dependencies": { + "inherits": "^2.0.1", + "readable-stream": "~1.0.31" + } + }, + "node_modules/noms/node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", + "dev": true + }, + "node_modules/noms/node_modules/readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "node_modules/noms/node_modules/string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==", + "dev": true + }, "node_modules/nopt": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/nopt/-/nopt-6.0.0.tgz", @@ -8416,6 +8530,15 @@ "node": ">= 0.8" } }, + "node_modules/untildify": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", + "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -8723,4 +8846,4 @@ } } } -} +} \ No newline at end of file diff --git a/package.json b/package.json index c377e6c..12518c3 100644 --- a/package.json +++ b/package.json @@ -1,14 +1,14 @@ { "name": "tidal-hifi", - "version": "5.1.0", + "version": "5.2.0", "description": "Tidal on Electron with widevine(hifi) support", "main": "ts-dist/main.js", "scripts": { "start": "electron .", "compile": "tsc && npm run sass-and-copy", "watch": "tsc-watch --onSuccess \"npm run sass-and-copy\"", + "copy-files": "copyfiles -u 1 --exclude './src/**/*.ts' --exclude './src/**/*.scss' \"./src/**/*\" ts-dist", "sass-and-copy": "npm run sass && npm run copy-files", - "copy-files": "rsync -av --exclude '*.ts' --exclude '*.scss' ./src/pages ts-dist", "build": "npm run builder -- -c ./build/electron-builder.yml", "build-deb": "npm run builder -- -c ./build/electron-builder.deb.yml", "build-unpacked": "npm run builder -- -c ./build/electron-builder.unpacked.yml", @@ -50,6 +50,7 @@ "@types/request": "^2.48.8", "@typescript-eslint/eslint-plugin": "^5.59.1", "@typescript-eslint/parser": "^5.59.1", + "copyfiles": "^2.4.1", "electron": "git+https://github.com/castlabs/electron-releases.git#v24.1.2+wvcus", "electron-builder": "^24.2.1", "eslint": "^8.39.0", @@ -64,4 +65,4 @@ "typescript": "^5.0.4" }, "prettier": "@mastermindzh/prettier-config" -} +} \ No newline at end of file From 62244f432a78bbf3e1f7b0f7178c02cd7a761f6f Mon Sep 17 00:00:00 2001 From: Mastermindzh Date: Wed, 10 May 2023 08:48:13 +0200 Subject: [PATCH 08/10] ci: release now also runs on feature branches (for test builds) --- .github/workflows/release.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8bda4ca..e934f81 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,6 +5,10 @@ on: branches: - master - develop + pull_request: + branches: + - master + jobs: build_on_linux: runs-on: ubuntu-latest @@ -16,7 +20,7 @@ jobs: - uses: actions/checkout@master - uses: actions/setup-node@master with: - node-version: 16 + node-version: 19 - run: npm install - run: npm run build - uses: actions/upload-artifact@master @@ -25,12 +29,12 @@ jobs: path: dist/ build_on_mac: - runs-on: macOS-latest + runs-on: macos-latest steps: - uses: actions/checkout@master - uses: actions/setup-node@master with: - node-version: 16 + node-version: 19 - run: npm install - run: npm run build - uses: actions/upload-artifact@master @@ -44,7 +48,7 @@ jobs: - uses: actions/checkout@master - uses: actions/setup-node@master with: - node-version: 16 + node-version: 19 - run: npm install - run: npm run build - uses: actions/upload-artifact@master From 60eb1bbef9d0941ae0d861c6bcc7d4c61788b01e Mon Sep 17 00:00:00 2001 From: Mastermindzh Date: Sat, 13 May 2023 22:45:15 +0200 Subject: [PATCH 09/10] chore: removed last 'any' types + added declaration for mpris-service's Player class --- .editorconfig | 6 +++- src/constants/flags.ts | 2 +- src/preload.ts | 2 +- src/scripts/express.ts | 2 +- src/scripts/settings.ts | 2 +- src/types/mpris-service.d.ts | 60 ++++++++++++++++++++++++++++++++++++ tsconfig.json | 1 + 7 files changed, 70 insertions(+), 5 deletions(-) create mode 100644 src/types/mpris-service.d.ts diff --git a/.editorconfig b/.editorconfig index acb0460..0b0b41a 100644 --- a/.editorconfig +++ b/.editorconfig @@ -10,6 +10,10 @@ insert_final_newline = true indent_style = space indent_size = 2 +[**.ts] +indent_style = space +indent_size = 2 + [**.json] indent_style = space indent_size = 2 @@ -50,4 +54,4 @@ trim_trailing_whitespace = ignore charset = ignore [{test/fixtures,deps,tools/eslint,tools/gyp,tools/icu,tools/msvs}/**] -insert_final_newline = false \ No newline at end of file +insert_final_newline = false diff --git a/src/constants/flags.ts b/src/constants/flags.ts index 64c36ae..7968aff 100644 --- a/src/constants/flags.ts +++ b/src/constants/flags.ts @@ -1,4 +1,4 @@ -export const flags: { [key: string]: { flag: string; value?: any }[] } = { +export const flags: { [key: string]: { flag: string; value?: string }[] } = { gpuRasterization: [{ flag: "enable-gpu-rasterization", value: undefined }], disableHardwareMediaKeys: [{ flag: "disable-features", value: "HardwareMediaKeyHandling" }], }; diff --git a/src/preload.ts b/src/preload.ts index f35474f..862414e 100644 --- a/src/preload.ts +++ b/src/preload.ts @@ -13,7 +13,7 @@ import { setTitle } from "./scripts/window-functions"; const notificationPath = `${app.getPath("userData")}/notification.jpg`; const appName = "Tidal Hifi"; let currentSong = ""; -let player: any; +let player: Player; let currentPlayStatus = statuses.paused; const elements = { diff --git a/src/scripts/express.ts b/src/scripts/express.ts index 6097a6f..68c9fd8 100644 --- a/src/scripts/express.ts +++ b/src/scripts/express.ts @@ -18,7 +18,7 @@ export const startExpress = (mainWindow: BrowserWindow) => { * @param {*} res * @param {*} action */ - function handleGlobalEvent(res: Response, action: any) { + function handleGlobalEvent(res: Response, action: string) { mainWindow.webContents.send("globalEvent", action); res.sendStatus(200); } diff --git a/src/scripts/settings.ts b/src/scripts/settings.ts index 8697d6c..b54465d 100644 --- a/src/scripts/settings.ts +++ b/src/scripts/settings.ts @@ -66,7 +66,7 @@ export const createSettingsWindow = function () { }, }); - settingsWindow.on("close", (event: any) => { + settingsWindow.on("close", (event: Event) => { if (settingsWindow != null) { event.preventDefault(); settingsWindow.hide(); diff --git a/src/types/mpris-service.d.ts b/src/types/mpris-service.d.ts new file mode 100644 index 0000000..40bf530 --- /dev/null +++ b/src/types/mpris-service.d.ts @@ -0,0 +1,60 @@ +declare class InitOptions { + name: string; + identity: string; + supportedUriSchemes: string[]; + supportedMimeTypes: string[]; + supportedInterfaces: string[]; + desktopEntry: string; +} + +declare class Player { + metadata: { + "xesam:title": string; + "xesam:artist": string[]; + "xesam:album": string; + "mpris:artUrl": string; + "mpris:length": number; + "mpris:trackid": string; + // other options + [key: string]: string | number | string[] | object; + }; + playbackStatus: string; + identity: string; + fullscreen: boolean; + supportedUriSchemes: string[]; + supportedMimeTypes: string[]; + canQuit: boolean; + canRaise: boolean; + canSetFullscreen: boolean; + hasTrackList: boolean; + desktopEntry: string; + loopStatus: string; + shuffle: boolean; + volume: number; + canControl: boolean; + canPause: boolean; + canPlay: boolean; + canSeek: boolean; + canGoNext: boolean; + canGoPrevious: boolean; + rate: number; + minimumRate: number; + maximumRate: number; + playlists: string[]; + activePlaylist: string; + + constructor(opts: { name: string; supportedInterfaces?: string[] }); + constructor(opts: InitOptions); + + getPosition(): number; + seeked(): void; + getTrackIndex(trackId: number): number; + getTrack(trackId: number): string; + addTrack(track: object): void; + removeTrack(trackId: number): number; + getPlaylistIndex(playlistId: number): number; + setPlaylists(playlists: object): void; + setActivePlaylist(playlistId: number): void; + + on(event: string | symbol, listener: (...args: object[]) => void): this; +} diff --git a/tsconfig.json b/tsconfig.json index 2343e42..25baf7d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,5 +1,6 @@ { "compilerOptions": { + "typeRoots": ["src/types"], "module": "commonjs", "target": "ES6", "noImplicitAny": true, From a169c57a52c8b80667f6356b7887db2250e61541 Mon Sep 17 00:00:00 2001 From: Mastermindzh Date: Sat, 13 May 2023 22:47:36 +0200 Subject: [PATCH 10/10] don't run double builds on PR, just release builds (for pre-releases + testing) --- .github/workflows/build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 44d728f..152d5fb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,6 +5,10 @@ on: branches-ignore: - master - develop + pull_request: + branches-ignore: + - master + - develop jobs: build_on_linux: runs-on: ubuntu-latest