Merge branch 'Vendicated:main' into main

This commit is contained in:
Manti 2022-12-01 22:12:00 +03:00 committed by GitHub
commit 92ca4fa908
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 857 additions and 379 deletions

View file

@ -109,46 +109,6 @@
"unused-imports/no-unused-imports": "error",
"path-alias/no-relative": "error",
"@typescript-eslint/no-restricted-imports": [
"error",
{
"paths": [
// shrug, couldn't find a better way since the pattern one doesn't work:
// ["utils", "!utils/*"]
{
"name": "./utils",
"message": "Do not import from index. This might cause issues. Import from the specific file instead.",
"allowTypeImports": true
},
{
"name": "../utils",
"message": "Do not import from index. This might cause issues. Import from the specific file instead.",
"allowTypeImports": true
},
{
"name": "../../utils",
"message": "Do not import from index. This might cause issues. Import from the specific file instead.",
"allowTypeImports": true
},
{
"name": "../../../utils",
"message": "Do not import from index. This might cause issues. Import from the specific file instead.",
"allowTypeImports": true
},
{
"name": "../../../../utils",
"message": "Do not import from index. This might cause issues. Import from the specific file instead.",
"allowTypeImports": true
},
{
"name": "../../../../../utils",
"message": "Do not import from index. This might cause issues. Import from the specific file instead.",
"allowTypeImports": true
}
]
}
]
"path-alias/no-relative": "error"
}
}

View file

@ -33,9 +33,22 @@ jobs:
- name: Build web
run: pnpm buildWeb --standalone
- name: Sign firefox extension
run: |
pnpx web-ext sign --api-key $WEBEXT_USER --api-secret $WEBEXT_SECRET --channel=listed
env:
WEBEXT_USER: ${{ secrets.WEBEXT_USER }}
WEBEXT_SECRET: ${{ secrets.WEBEXT_SECRET }}
- name: Build
run: pnpm build --standalone
- name: Rename extensions for more user friendliness
run: |
mv dist/*.xpi dist/Vencord-for-Firefox.xpi
mv dist/extension-v3.zip dist/Vencord-for-Chrome-and-Edge.zip
rm -rf dist/extension-v2-unpacked
- name: Get some values needed for the release
id: release_values
run: |

1
.npmrc Normal file
View file

@ -0,0 +1 @@
strict-peer-dependencies=false

View file

@ -19,7 +19,8 @@ If you're a power user who wants to contribute and make plugins or just want to
## Installing on Browser
Install [the browser extension](https://github.com/Vendicated/Vencord/releases/latest/download/extension.zip) or [UserScript](https://github.com/Vendicated/Vencord/releases/download/devbuild/Vencord.user.js). Please note that they aren't automatically updated for now, so you will regularely have to reinstall it.
Install the browser extension for [![Chrome](https://img.shields.io/badge/chrome-ext-brightgreen)](https://github.com/Vendicated/Vencord/releases/latest/download/Vencord-for-Chrome-and-Edge.zip), [![Firefox](https://img.shields.io/badge/firefox-ext-brightgreen)](https://github.com/Vendicated/Vencord/releases/latest/download/Vencord-for-Firefox.xpi) or [UserScript](https://github.com/Vendicated/Vencord/releases/download/devbuild/Vencord.user.js). Please note that they aren't automatically updated for now, so you will regularely have to reinstall it.
You may also build them from source, to do that do the same steps as in the manual regular install method,
except run `pnpm buildWeb` instead of `pnpm build`, and your outputs will be in the dist folder

48
browser/background.js Normal file
View file

@ -0,0 +1,48 @@
/*
* Vencord, a modification for Discord's desktop app
* Copyright (c) 2022 Linnea Gräf
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
function setContentTypeOnStylesheets(details) {
if (details.type === "stylesheet") {
details.responseHeaders = details.responseHeaders.filter(it => it.name.toLowerCase() !== 'content-type');
details.responseHeaders.push({ name: "Content-Type", value: "text/css" });
}
return { responseHeaders: details.responseHeaders };
}
var cspHeaders = [
"content-security-policy",
"content-security-policy-report-only",
];
function removeCSPHeaders(details) {
return {
responseHeaders: details.responseHeaders.filter(header =>
!cspHeaders.includes(header.name.toLowerCase()))
};
}
browser.webRequest.onHeadersReceived.addListener(
setContentTypeOnStylesheets, { urls: ["https://raw.githubusercontent.com/*"] }, ["blocking", "responseHeaders"]
);
browser.webRequest.onHeadersReceived.addListener(
removeCSPHeaders, { urls: ["https://raw.githubusercontent.com/*", "*://*.discord.com/*"] }, ["blocking", "responseHeaders"]
);

31
browser/manifestv2.json Normal file
View file

@ -0,0 +1,31 @@
{
"manifest_version": 2,
"name": "Vencord Web",
"description": "The Vencord Client Mod for Discord Web.",
"version": "1.0.0",
"author": "Vendicated",
"homepage_url": "https://github.com/Vendicated/Vencord",
"permissions": [
"webRequest",
"webRequestBlocking",
"*://*.discord.com/*",
"https://raw.githubusercontent.com/*"
],
"content_scripts": [
{
"run_at": "document_start",
"matches": ["*://*.discord.com/*"],
"js": ["content.js"]
}
],
"web_accessible_resources": ["dist/Vencord.js"],
"background": {
"scripts": ["background.js"]
},
"browser_specific_settings": {
"gecko": {
"id": "vencord-firefox@vendicated.dev",
"strict_min_version": "92.0"
}
}
}

View file

@ -1,7 +1,7 @@
{
"name": "vencord",
"private": "true",
"version": "1.0.0",
"version": "1.0.1",
"description": "A Discord client mod that does things differently",
"keywords": [],
"homepage": "https://github.com/Vendicated/Vencord#readme",
@ -30,36 +30,43 @@
"watch": "node scripts/build/build.mjs --watch"
},
"dependencies": {
"console-menu": "^0.1.0",
"diff": "^5.1.0",
"fflate": "^0.7.4"
},
"devDependencies": {
"@types/diff": "^5.0.2",
"@types/node": "^18.7.13",
"@types/react": "^18.0.17",
"@types/react-dom": "^18.0.8",
"@types/node": "^18.11.9",
"@types/react": "^18.0.25",
"@types/react-dom": "^18.0.9",
"@types/yazl": "^2.4.2",
"@typescript-eslint/eslint-plugin": "^5.42.1",
"@typescript-eslint/parser": "^5.39.0",
"@typescript-eslint/eslint-plugin": "^5.44.0",
"@typescript-eslint/parser": "^5.44.0",
"console-menu": "^0.1.0",
"diff": "^5.1.0",
"discord-types": "^1.3.26",
"esbuild": "^0.15.5",
"eslint": "^8.24.0",
"esbuild": "^0.15.16",
"eslint": "^8.28.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-header": "^3.1.1",
"eslint-plugin-path-alias": "^1.0.0",
"eslint-plugin-simple-import-sort": "^8.0.0",
"eslint-plugin-unused-imports": "^2.0.0",
"moment": "^2.29.4",
"puppeteer-core": "^19.2.2",
"puppeteer-core": "^19.3.0",
"standalone-electron-types": "^1.0.0",
"type-fest": "^3.1.0",
"typescript": "^4.8.4"
"type-fest": "^3.3.0",
"typescript": "^4.9.3"
},
"packageManager": "pnpm@7.13.4",
"pnpm": {
"patchedDependencies": {
"eslint-plugin-path-alias@1.0.0": "patches/eslint-plugin-path-alias@1.0.0.patch"
}
},
"webExt": {
"artifactsDir": "./dist",
"build": {
"overwriteDest": true
},
"sourceDir": "./dist/extension-v2-unpacked"
}
}

487
pnpm-lock.yaml generated
View file

@ -7,17 +7,17 @@ patchedDependencies:
specifiers:
'@types/diff': ^5.0.2
'@types/node': ^18.7.13
'@types/react': ^18.0.17
'@types/react-dom': ^18.0.8
'@types/node': ^18.11.9
'@types/react': ^18.0.25
'@types/react-dom': ^18.0.9
'@types/yazl': ^2.4.2
'@typescript-eslint/eslint-plugin': ^5.42.1
'@typescript-eslint/parser': ^5.39.0
'@typescript-eslint/eslint-plugin': ^5.44.0
'@typescript-eslint/parser': ^5.44.0
console-menu: ^0.1.0
diff: ^5.1.0
discord-types: ^1.3.26
esbuild: ^0.15.5
eslint: ^8.24.0
esbuild: ^0.15.16
eslint: ^8.28.0
eslint-import-resolver-alias: ^1.1.2
eslint-plugin-header: ^3.1.1
eslint-plugin-path-alias: ^1.0.0
@ -25,42 +25,51 @@ specifiers:
eslint-plugin-unused-imports: ^2.0.0
fflate: ^0.7.4
moment: ^2.29.4
puppeteer-core: ^19.2.2
puppeteer-core: ^19.3.0
standalone-electron-types: ^1.0.0
type-fest: ^3.1.0
typescript: ^4.8.4
type-fest: ^3.3.0
typescript: ^4.9.3
dependencies:
console-menu: 0.1.0
diff: 5.1.0
fflate: 0.7.4
devDependencies:
'@types/diff': 5.0.2
'@types/node': 18.7.13
'@types/react': 18.0.17
'@types/react-dom': 18.0.8
'@types/node': 18.11.9
'@types/react': 18.0.25
'@types/react-dom': 18.0.9
'@types/yazl': 2.4.2
'@typescript-eslint/eslint-plugin': 5.42.1_xyciw6oqjoiiono4dhv3uhn5my
'@typescript-eslint/parser': 5.39.0_ypn2ylkkyfa5i233caldtndbqa
'@typescript-eslint/eslint-plugin': 5.44.0_fnsv2sbzcckq65bwfk7a5xwslu
'@typescript-eslint/parser': 5.44.0_hsf322ms6xhhd4b5ne6lb74y4a
console-menu: 0.1.0
diff: 5.1.0
discord-types: 1.3.26
esbuild: 0.15.5
eslint: 8.24.0
esbuild: 0.15.16
eslint: 8.28.0
eslint-import-resolver-alias: 1.1.2
eslint-plugin-header: 3.1.1_eslint@8.24.0
eslint-plugin-path-alias: 1.0.0_m6sma4g6bh67km3q6igf6uxaja_eslint@8.24.0
eslint-plugin-simple-import-sort: 8.0.0_eslint@8.24.0
eslint-plugin-unused-imports: 2.0.0_5yz3upex2kb6hbdwaq7bihlxnq
eslint-plugin-header: 3.1.1_eslint@8.28.0
eslint-plugin-path-alias: 1.0.0_m6sma4g6bh67km3q6igf6uxaja_eslint@8.28.0
eslint-plugin-simple-import-sort: 8.0.0_eslint@8.28.0
eslint-plugin-unused-imports: 2.0.0_aucl44mjeutxyzmt4nvo2cczya
moment: 2.29.4
puppeteer-core: 19.2.2
puppeteer-core: 19.3.0
standalone-electron-types: 1.0.0
type-fest: 3.1.0
typescript: 4.8.4
type-fest: 3.3.0
typescript: 4.9.3
packages:
/@esbuild/linux-loong64/0.15.5:
resolution: {integrity: sha512-UHkDFCfSGTuXq08oQltXxSZmH1TXyWsL+4QhZDWvvLl6mEJQqk3u7/wq1LjhrrAXYIllaTtRSzUXl4Olkf2J8A==}
/@esbuild/android-arm/0.15.16:
resolution: {integrity: sha512-nyB6CH++2mSgx3GbnrJsZSxzne5K0HMyNIWafDHqYy7IwxFc4fd/CgHVZXr8Eh+Q3KbIAcAe3vGyqIPhGblvMQ==}
engines: {node: '>=12'}
cpu: [arm]
os: [android]
requiresBuild: true
dev: true
optional: true
/@esbuild/linux-loong64/0.15.16:
resolution: {integrity: sha512-SDLfP1uoB0HZ14CdVYgagllgrG7Mdxhkt4jDJOKl/MldKrkQ6vDJMZKl2+5XsEY/Lzz37fjgLQoJBGuAw/x8kQ==}
engines: {node: '>=12'}
cpu: [loong64]
os: [linux]
@ -68,15 +77,15 @@ packages:
dev: true
optional: true
/@eslint/eslintrc/1.3.2:
resolution: {integrity: sha512-AXYd23w1S/bv3fTs3Lz0vjiYemS08jWkI3hYyS9I1ry+0f+Yjs1wm+sU0BS8qDOPrBIkp4qHYC16I8uVtpLajQ==}
/@eslint/eslintrc/1.3.3:
resolution: {integrity: sha512-uj3pT6Mg+3t39fvLrj8iuCIJ38zKO9FpGtJ4BBJebJhEwjoT+KLVNCcHT5QC9NGRIEi7fZ0ZR8YRb884auB4Lg==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dependencies:
ajv: 6.12.6
debug: 4.3.4
espree: 9.4.0
globals: 13.17.0
ignore: 5.2.0
espree: 9.4.1
globals: 13.18.0
ignore: 5.2.1
import-fresh: 3.3.0
js-yaml: 4.1.0
minimatch: 3.1.2
@ -85,8 +94,8 @@ packages:
- supports-color
dev: true
/@humanwhocodes/config-array/0.10.7:
resolution: {integrity: sha512-MDl6D6sBsaV452/QSdX+4CXIjZhIcI0PELsxUjk4U828yd58vk3bTIvk/6w5FY+4hIy9sLW0sfrV7K7Kc++j/w==}
/@humanwhocodes/config-array/0.11.7:
resolution: {integrity: sha512-kBbPWzN8oVMLb0hOUYXhmxggL/1cJE6ydvjDIGi9EnAGUyA7cLVKQg+d/Dsm+KZwx2czGHrCmMVLiyg8s5JPKw==}
engines: {node: '>=10.10.0'}
dependencies:
'@humanwhocodes/object-schema': 1.2.1
@ -96,10 +105,6 @@ packages:
- supports-color
dev: true
/@humanwhocodes/gitignore-to-minimatch/1.0.2:
resolution: {integrity: sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==}
dev: true
/@humanwhocodes/module-importer/1.0.1:
resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==}
engines: {node: '>=12.22'}
@ -138,37 +143,33 @@ packages:
resolution: {integrity: sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==}
dev: true
/@types/node/18.7.13:
resolution: {integrity: sha512-46yIhxSe5xEaJZXWdIBP7GU4HDTG8/eo0qd9atdiL+lFpA03y8KS+lkTN834TWJj5767GbWv4n/P6efyTFt1Dw==}
dev: true
/@types/node/18.8.4:
resolution: {integrity: sha512-WdlVphvfR/GJCLEMbNA8lJ0lhFNBj4SW3O+O5/cEGw9oYrv0al9zTwuQsq+myDUXgNx2jgBynoVgZ2MMJ6pbow==}
/@types/node/18.11.9:
resolution: {integrity: sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==}
dev: true
/@types/prop-types/15.7.5:
resolution: {integrity: sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==}
dev: true
/@types/react-dom/18.0.8:
resolution: {integrity: sha512-C3GYO0HLaOkk9dDAz3Dl4sbe4AKUGTCfFIZsz3n/82dPNN8Du533HzKatDxeUYWu24wJgMP1xICqkWk1YOLOIw==}
/@types/react-dom/18.0.9:
resolution: {integrity: sha512-qnVvHxASt/H7i+XG1U1xMiY5t+IHcPGUK7TDMDzom08xa7e86eCeKOiLZezwCKVxJn6NEiiy2ekgX8aQssjIKg==}
dependencies:
'@types/react': 18.0.17
'@types/react': 18.0.25
dev: true
/@types/react/17.0.2:
resolution: {integrity: sha512-Xt40xQsrkdvjn1EyWe1Bc0dJLcil/9x2vAuW7ya+PuQip4UYUaXyhzWmAbwRsdMgwOFHpfp7/FFZebDU6Y8VHA==}
dependencies:
'@types/prop-types': 15.7.5
csstype: 3.1.0
csstype: 3.1.1
dev: true
/@types/react/18.0.17:
resolution: {integrity: sha512-38ETy4tL+rn4uQQi7mB81G7V1g0u2ryquNmsVIOKUAEIDK+3CUjZ6rSRpdvS99dNBnkLFL83qfmtLacGOTIhwQ==}
/@types/react/18.0.25:
resolution: {integrity: sha512-xD6c0KDT4m7n9uD4ZHi02lzskaiqcBxf4zi+tXZY98a04wvc0hi/TcCPC2FOESZi51Nd7tlUeOJY8RofL799/g==}
dependencies:
'@types/prop-types': 15.7.5
'@types/scheduler': 0.16.2
csstype: 3.1.0
csstype: 3.1.1
dev: true
/@types/scheduler/0.16.2:
@ -183,18 +184,18 @@ packages:
resolution: {integrity: sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==}
requiresBuild: true
dependencies:
'@types/node': 18.8.4
'@types/node': 18.11.9
dev: true
optional: true
/@types/yazl/2.4.2:
resolution: {integrity: sha512-T+9JH8O2guEjXNxqmybzQ92mJUh2oCwDDMSSimZSe1P+pceZiFROZLYmcbqkzV5EUwz6VwcKXCO2S2yUpra6XQ==}
dependencies:
'@types/node': 18.7.13
'@types/node': 18.11.9
dev: true
/@typescript-eslint/eslint-plugin/5.42.1_xyciw6oqjoiiono4dhv3uhn5my:
resolution: {integrity: sha512-LyR6x784JCiJ1j6sH5Y0K6cdExqCCm8DJUTcwG5ThNXJj/G8o5E56u5EdG4SLy+bZAwZBswC+GYn3eGdttBVCg==}
/@typescript-eslint/eslint-plugin/5.44.0_fnsv2sbzcckq65bwfk7a5xwslu:
resolution: {integrity: sha512-j5ULd7FmmekcyWeArx+i8x7sdRHzAtXTkmDPthE4amxZOWKFK7bomoJ4r7PJ8K7PoMzD16U8MmuZFAonr1ERvw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
'@typescript-eslint/parser': ^5.0.0
@ -204,24 +205,24 @@ packages:
typescript:
optional: true
dependencies:
'@typescript-eslint/parser': 5.39.0_ypn2ylkkyfa5i233caldtndbqa
'@typescript-eslint/scope-manager': 5.42.1
'@typescript-eslint/type-utils': 5.42.1_ypn2ylkkyfa5i233caldtndbqa
'@typescript-eslint/utils': 5.42.1_ypn2ylkkyfa5i233caldtndbqa
'@typescript-eslint/parser': 5.44.0_hsf322ms6xhhd4b5ne6lb74y4a
'@typescript-eslint/scope-manager': 5.44.0
'@typescript-eslint/type-utils': 5.44.0_hsf322ms6xhhd4b5ne6lb74y4a
'@typescript-eslint/utils': 5.44.0_hsf322ms6xhhd4b5ne6lb74y4a
debug: 4.3.4
eslint: 8.24.0
ignore: 5.2.0
eslint: 8.28.0
ignore: 5.2.1
natural-compare-lite: 1.4.0
regexpp: 3.2.0
semver: 7.3.7
tsutils: 3.21.0_typescript@4.8.4
typescript: 4.8.4
semver: 7.3.8
tsutils: 3.21.0_typescript@4.9.3
typescript: 4.9.3
transitivePeerDependencies:
- supports-color
dev: true
/@typescript-eslint/parser/5.39.0_ypn2ylkkyfa5i233caldtndbqa:
resolution: {integrity: sha512-PhxLjrZnHShe431sBAGHaNe6BDdxAASDySgsBCGxcBecVCi8NQWxQZMcizNA4g0pN51bBAn/FUfkWG3SDVcGlA==}
/@typescript-eslint/parser/5.44.0_hsf322ms6xhhd4b5ne6lb74y4a:
resolution: {integrity: sha512-H7LCqbZnKqkkgQHaKLGC6KUjt3pjJDx8ETDqmwncyb6PuoigYajyAwBGz08VU/l86dZWZgI4zm5k2VaKqayYyA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
@ -230,34 +231,26 @@ packages:
typescript:
optional: true
dependencies:
'@typescript-eslint/scope-manager': 5.39.0
'@typescript-eslint/types': 5.39.0
'@typescript-eslint/typescript-estree': 5.39.0_typescript@4.8.4
'@typescript-eslint/scope-manager': 5.44.0
'@typescript-eslint/types': 5.44.0
'@typescript-eslint/typescript-estree': 5.44.0_typescript@4.9.3
debug: 4.3.4
eslint: 8.24.0
typescript: 4.8.4
eslint: 8.28.0
typescript: 4.9.3
transitivePeerDependencies:
- supports-color
dev: true
/@typescript-eslint/scope-manager/5.39.0:
resolution: {integrity: sha512-/I13vAqmG3dyqMVSZPjsbuNQlYS082Y7OMkwhCfLXYsmlI0ca4nkL7wJ/4gjX70LD4P8Hnw1JywUVVAwepURBw==}
/@typescript-eslint/scope-manager/5.44.0:
resolution: {integrity: sha512-2pKml57KusI0LAhgLKae9kwWeITZ7IsZs77YxyNyIVOwQ1kToyXRaJLl+uDEXzMN5hnobKUOo2gKntK9H1YL8g==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dependencies:
'@typescript-eslint/types': 5.39.0
'@typescript-eslint/visitor-keys': 5.39.0
'@typescript-eslint/types': 5.44.0
'@typescript-eslint/visitor-keys': 5.44.0
dev: true
/@typescript-eslint/scope-manager/5.42.1:
resolution: {integrity: sha512-QAZY/CBP1Emx4rzxurgqj3rUinfsh/6mvuKbLNMfJMMKYLRBfweus8brgXF8f64ABkIZ3zdj2/rYYtF8eiuksQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dependencies:
'@typescript-eslint/types': 5.42.1
'@typescript-eslint/visitor-keys': 5.42.1
dev: true
/@typescript-eslint/type-utils/5.42.1_ypn2ylkkyfa5i233caldtndbqa:
resolution: {integrity: sha512-WWiMChneex5w4xPIX56SSnQQo0tEOy5ZV2dqmj8Z371LJ0E+aymWD25JQ/l4FOuuX+Q49A7pzh/CGIQflxMVXg==}
/@typescript-eslint/type-utils/5.44.0_hsf322ms6xhhd4b5ne6lb74y4a:
resolution: {integrity: sha512-A1u0Yo5wZxkXPQ7/noGkRhV4J9opcymcr31XQtOzcc5nO/IHN2E2TPMECKWYpM3e6olWEM63fq/BaL1wEYnt/w==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: '*'
@ -266,28 +259,23 @@ packages:
typescript:
optional: true
dependencies:
'@typescript-eslint/typescript-estree': 5.42.1_typescript@4.8.4
'@typescript-eslint/utils': 5.42.1_ypn2ylkkyfa5i233caldtndbqa
'@typescript-eslint/typescript-estree': 5.44.0_typescript@4.9.3
'@typescript-eslint/utils': 5.44.0_hsf322ms6xhhd4b5ne6lb74y4a
debug: 4.3.4
eslint: 8.24.0
tsutils: 3.21.0_typescript@4.8.4
typescript: 4.8.4
eslint: 8.28.0
tsutils: 3.21.0_typescript@4.9.3
typescript: 4.9.3
transitivePeerDependencies:
- supports-color
dev: true
/@typescript-eslint/types/5.39.0:
resolution: {integrity: sha512-gQMZrnfEBFXK38hYqt8Lkwt8f4U6yq+2H5VDSgP/qiTzC8Nw8JO3OuSUOQ2qW37S/dlwdkHDntkZM6SQhKyPhw==}
/@typescript-eslint/types/5.44.0:
resolution: {integrity: sha512-Tp+zDnHmGk4qKR1l+Y1rBvpjpm5tGXX339eAlRBDg+kgZkz9Bw+pqi4dyseOZMsGuSH69fYfPJCBKBrbPCxYFQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dev: true
/@typescript-eslint/types/5.42.1:
resolution: {integrity: sha512-Qrco9dsFF5lhalz+lLFtxs3ui1/YfC6NdXu+RAGBa8uSfn01cjO7ssCsjIsUs484vny9Xm699FSKwpkCcqwWwA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dev: true
/@typescript-eslint/typescript-estree/5.39.0_typescript@4.8.4:
resolution: {integrity: sha512-qLFQP0f398sdnogJoLtd43pUgB18Q50QSA+BTE5h3sUxySzbWDpTSdgt4UyxNSozY/oDK2ta6HVAzvGgq8JYnA==}
/@typescript-eslint/typescript-estree/5.44.0_typescript@4.9.3:
resolution: {integrity: sha512-M6Jr+RM7M5zeRj2maSfsZK2660HKAJawv4Ud0xT+yauyvgrsHu276VtXlKDFnEmhG+nVEd0fYZNXGoAgxwDWJw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
typescript: '*'
@ -295,85 +283,56 @@ packages:
typescript:
optional: true
dependencies:
'@typescript-eslint/types': 5.39.0
'@typescript-eslint/visitor-keys': 5.39.0
'@typescript-eslint/types': 5.44.0
'@typescript-eslint/visitor-keys': 5.44.0
debug: 4.3.4
globby: 11.1.0
is-glob: 4.0.3
semver: 7.3.7
tsutils: 3.21.0_typescript@4.8.4
typescript: 4.8.4
semver: 7.3.8
tsutils: 3.21.0_typescript@4.9.3
typescript: 4.9.3
transitivePeerDependencies:
- supports-color
dev: true
/@typescript-eslint/typescript-estree/5.42.1_typescript@4.8.4:
resolution: {integrity: sha512-qElc0bDOuO0B8wDhhW4mYVgi/LZL+igPwXtV87n69/kYC/7NG3MES0jHxJNCr4EP7kY1XVsRy8C/u3DYeTKQmw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
typescript: '*'
peerDependenciesMeta:
typescript:
optional: true
dependencies:
'@typescript-eslint/types': 5.42.1
'@typescript-eslint/visitor-keys': 5.42.1
debug: 4.3.4
globby: 11.1.0
is-glob: 4.0.3
semver: 7.3.7
tsutils: 3.21.0_typescript@4.8.4
typescript: 4.8.4
transitivePeerDependencies:
- supports-color
dev: true
/@typescript-eslint/utils/5.42.1_ypn2ylkkyfa5i233caldtndbqa:
resolution: {integrity: sha512-Gxvf12xSp3iYZd/fLqiQRD4uKZjDNR01bQ+j8zvhPjpsZ4HmvEFL/tC4amGNyxN9Rq+iqvpHLhlqx6KTxz9ZyQ==}
/@typescript-eslint/utils/5.44.0_hsf322ms6xhhd4b5ne6lb74y4a:
resolution: {integrity: sha512-fMzA8LLQ189gaBjS0MZszw5HBdZgVwxVFShCO3QN+ws3GlPkcy9YuS3U4wkT6su0w+Byjq3mS3uamy9HE4Yfjw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
dependencies:
'@types/json-schema': 7.0.11
'@types/semver': 7.3.13
'@typescript-eslint/scope-manager': 5.42.1
'@typescript-eslint/types': 5.42.1
'@typescript-eslint/typescript-estree': 5.42.1_typescript@4.8.4
eslint: 8.24.0
'@typescript-eslint/scope-manager': 5.44.0
'@typescript-eslint/types': 5.44.0
'@typescript-eslint/typescript-estree': 5.44.0_typescript@4.9.3
eslint: 8.28.0
eslint-scope: 5.1.1
eslint-utils: 3.0.0_eslint@8.24.0
semver: 7.3.7
eslint-utils: 3.0.0_eslint@8.28.0
semver: 7.3.8
transitivePeerDependencies:
- supports-color
- typescript
dev: true
/@typescript-eslint/visitor-keys/5.39.0:
resolution: {integrity: sha512-yyE3RPwOG+XJBLrhvsxAidUgybJVQ/hG8BhiJo0k8JSAYfk/CshVcxf0HwP4Jt7WZZ6vLmxdo1p6EyN3tzFTkg==}
/@typescript-eslint/visitor-keys/5.44.0:
resolution: {integrity: sha512-a48tLG8/4m62gPFbJ27FxwCOqPKxsb8KC3HkmYoq2As/4YyjQl1jDbRr1s63+g4FS/iIehjmN3L5UjmKva1HzQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dependencies:
'@typescript-eslint/types': 5.39.0
'@typescript-eslint/types': 5.44.0
eslint-visitor-keys: 3.3.0
dev: true
/@typescript-eslint/visitor-keys/5.42.1:
resolution: {integrity: sha512-LOQtSF4z+hejmpUvitPlc4hA7ERGoj2BVkesOcG91HCn8edLGUXbTrErmutmPbl8Bo9HjAvOO/zBKQHExXNA2A==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dependencies:
'@typescript-eslint/types': 5.42.1
eslint-visitor-keys: 3.3.0
dev: true
/acorn-jsx/5.3.2_acorn@8.8.0:
/acorn-jsx/5.3.2_acorn@8.8.1:
resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==}
peerDependencies:
acorn: ^6.0.0 || ^7.0.0 || ^8.0.0
dependencies:
acorn: 8.8.0
acorn: 8.8.1
dev: true
/acorn/8.8.0:
resolution: {integrity: sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==}
/acorn/8.8.1:
resolution: {integrity: sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==}
engines: {node: '>=0.4.0'}
hasBin: true
dev: true
@ -570,7 +529,7 @@ packages:
resolution: {integrity: sha512-gOGvuhugXvHggnodbEop0Wzh05eondeCdpPZqcwlzJc7KoPrdsHUM8TZug1lN2jN7Qm3XrZcoP5dZDaO2CaYSw==}
dependencies:
keypress: 0.2.1
dev: false
dev: true
/copy-descriptor/0.1.1:
resolution: {integrity: sha512-XgZ0pFcakEUlbwQEVNg3+QAis1FyTL3Qel9FYy8pSkQqoG3PNoT0bOCQtOXcOkur21r2Eq2kI+IE+gsmAEVlYw==}
@ -594,8 +553,8 @@ packages:
which: 2.0.2
dev: true
/csstype/3.1.0:
resolution: {integrity: sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==}
/csstype/3.1.1:
resolution: {integrity: sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==}
dev: true
/debug/2.6.9:
@ -659,7 +618,7 @@ packages:
/diff/5.1.0:
resolution: {integrity: sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==}
engines: {node: '>=0.3.1'}
dev: false
dev: true
/dir-glob/3.0.1:
resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==}
@ -688,8 +647,8 @@ packages:
once: 1.4.0
dev: true
/esbuild-android-64/0.15.5:
resolution: {integrity: sha512-dYPPkiGNskvZqmIK29OPxolyY3tp+c47+Fsc2WYSOVjEPWNCHNyqhtFqQadcXMJDQt8eN0NMDukbyQgFcHquXg==}
/esbuild-android-64/0.15.16:
resolution: {integrity: sha512-Vwkv/sT0zMSgPSVO3Jlt1pUbnZuOgtOQJkJkyyJFAlLe7BiT8e9ESzo0zQSx4c3wW4T6kGChmKDPMbWTgtliQA==}
engines: {node: '>=12'}
cpu: [x64]
os: [android]
@ -697,8 +656,8 @@ packages:
dev: true
optional: true
/esbuild-android-arm64/0.15.5:
resolution: {integrity: sha512-YyEkaQl08ze3cBzI/4Cm1S+rVh8HMOpCdq8B78JLbNFHhzi4NixVN93xDrHZLztlocEYqi45rHHCgA8kZFidFg==}
/esbuild-android-arm64/0.15.16:
resolution: {integrity: sha512-lqfKuofMExL5niNV3gnhMUYacSXfsvzTa/58sDlBET/hCOG99Zmeh+lz6kvdgvGOsImeo6J9SW21rFCogNPLxg==}
engines: {node: '>=12'}
cpu: [arm64]
os: [android]
@ -706,8 +665,8 @@ packages:
dev: true
optional: true
/esbuild-darwin-64/0.15.5:
resolution: {integrity: sha512-Cr0iIqnWKx3ZTvDUAzG0H/u9dWjLE4c2gTtRLz4pqOBGjfjqdcZSfAObFzKTInLLSmD0ZV1I/mshhPoYSBMMCQ==}
/esbuild-darwin-64/0.15.16:
resolution: {integrity: sha512-wo2VWk/n/9V2TmqUZ/KpzRjCEcr00n7yahEdmtzlrfQ3lfMCf3Wa+0sqHAbjk3C6CKkR3WKK/whkMq5Gj4Da9g==}
engines: {node: '>=12'}
cpu: [x64]
os: [darwin]
@ -715,8 +674,8 @@ packages:
dev: true
optional: true
/esbuild-darwin-arm64/0.15.5:
resolution: {integrity: sha512-WIfQkocGtFrz7vCu44ypY5YmiFXpsxvz2xqwe688jFfSVCnUsCn2qkEVDo7gT8EpsLOz1J/OmqjExePL1dr1Kg==}
/esbuild-darwin-arm64/0.15.16:
resolution: {integrity: sha512-fMXaUr5ou0M4WnewBKsspMtX++C1yIa3nJ5R2LSbLCfJT3uFdcRoU/NZjoM4kOMKyOD9Sa/2vlgN8G07K3SJnw==}
engines: {node: '>=12'}
cpu: [arm64]
os: [darwin]
@ -724,8 +683,8 @@ packages:
dev: true
optional: true
/esbuild-freebsd-64/0.15.5:
resolution: {integrity: sha512-M5/EfzV2RsMd/wqwR18CELcenZ8+fFxQAAEO7TJKDmP3knhWSbD72ILzrXFMMwshlPAS1ShCZ90jsxkm+8FlaA==}
/esbuild-freebsd-64/0.15.16:
resolution: {integrity: sha512-UzIc0xlRx5x9kRuMr+E3+hlSOxa/aRqfuMfiYBXu2jJ8Mzej4lGL7+o6F5hzhLqWfWm1GWHNakIdlqg1ayaTNQ==}
engines: {node: '>=12'}
cpu: [x64]
os: [freebsd]
@ -733,8 +692,8 @@ packages:
dev: true
optional: true
/esbuild-freebsd-arm64/0.15.5:
resolution: {integrity: sha512-2JQQ5Qs9J0440F/n/aUBNvY6lTo4XP/4lt1TwDfHuo0DY3w5++anw+jTjfouLzbJmFFiwmX7SmUhMnysocx96w==}
/esbuild-freebsd-arm64/0.15.16:
resolution: {integrity: sha512-8xyiYuGc0DLZphFQIiYaLHlfoP+hAN9RHbE+Ibh8EUcDNHAqbQgUrQg7pE7Bo00rXmQ5Ap6KFgcR0b4ALZls1g==}
engines: {node: '>=12'}
cpu: [arm64]
os: [freebsd]
@ -742,8 +701,8 @@ packages:
dev: true
optional: true
/esbuild-linux-32/0.15.5:
resolution: {integrity: sha512-gO9vNnIN0FTUGjvTFucIXtBSr1Woymmx/aHQtuU+2OllGU6YFLs99960UD4Dib1kFovVgs59MTXwpFdVoSMZoQ==}
/esbuild-linux-32/0.15.16:
resolution: {integrity: sha512-iGijUTV+0kIMyUVoynK0v+32Oi8yyp0xwMzX69GX+5+AniNy/C/AL1MjFTsozRp/3xQPl7jVux/PLe2ds10/2w==}
engines: {node: '>=12'}
cpu: [ia32]
os: [linux]
@ -751,8 +710,8 @@ packages:
dev: true
optional: true
/esbuild-linux-64/0.15.5:
resolution: {integrity: sha512-ne0GFdNLsm4veXbTnYAWjbx3shpNKZJUd6XpNbKNUZaNllDZfYQt0/zRqOg0sc7O8GQ+PjSMv9IpIEULXVTVmg==}
/esbuild-linux-64/0.15.16:
resolution: {integrity: sha512-tuSOjXdLw7VzaUj89fIdAaQT7zFGbKBcz4YxbWrOiXkwscYgE7HtTxUavreBbnRkGxKwr9iT/gmeJWNm4djy/g==}
engines: {node: '>=12'}
cpu: [x64]
os: [linux]
@ -760,8 +719,8 @@ packages:
dev: true
optional: true
/esbuild-linux-arm/0.15.5:
resolution: {integrity: sha512-wvAoHEN+gJ/22gnvhZnS/+2H14HyAxM07m59RSLn3iXrQsdS518jnEWRBnJz3fR6BJa+VUTo0NxYjGaNt7RA7Q==}
/esbuild-linux-arm/0.15.16:
resolution: {integrity: sha512-XKcrxCEXDTOuoRj5l12tJnkvuxXBMKwEC5j0JISw3ziLf0j4zIwXbKbTmUrKFWbo6ZgvNpa7Y5dnbsjVvH39bQ==}
engines: {node: '>=12'}
cpu: [arm]
os: [linux]
@ -769,8 +728,8 @@ packages:
dev: true
optional: true
/esbuild-linux-arm64/0.15.5:
resolution: {integrity: sha512-7EgFyP2zjO065XTfdCxiXVEk+f83RQ1JsryN1X/VSX2li9rnHAt2swRbpoz5Vlrl6qjHrCmq5b6yxD13z6RheA==}
/esbuild-linux-arm64/0.15.16:
resolution: {integrity: sha512-mPYksnfHnemNrvjrDhZyixL/AfbJN0Xn9S34ZOHYdh6/jJcNd8iTsv3JwJoEvTJqjMggjMhGUPJAdjnFBHoH8A==}
engines: {node: '>=12'}
cpu: [arm64]
os: [linux]
@ -778,8 +737,8 @@ packages:
dev: true
optional: true
/esbuild-linux-mips64le/0.15.5:
resolution: {integrity: sha512-KdnSkHxWrJ6Y40ABu+ipTZeRhFtc8dowGyFsZY5prsmMSr1ZTG9zQawguN4/tunJ0wy3+kD54GaGwdcpwWAvZQ==}
/esbuild-linux-mips64le/0.15.16:
resolution: {integrity: sha512-kSJO2PXaxfm0pWY39+YX+QtpFqyyrcp0ZeI8QPTrcFVQoWEPiPVtOfTZeS3ZKedfH+Ga38c4DSzmKMQJocQv6A==}
engines: {node: '>=12'}
cpu: [mips64el]
os: [linux]
@ -787,8 +746,8 @@ packages:
dev: true
optional: true
/esbuild-linux-ppc64le/0.15.5:
resolution: {integrity: sha512-QdRHGeZ2ykl5P0KRmfGBZIHmqcwIsUKWmmpZTOq573jRWwmpfRmS7xOhmDHBj9pxv+6qRMH8tLr2fe+ZKQvCYw==}
/esbuild-linux-ppc64le/0.15.16:
resolution: {integrity: sha512-NimPikwkBY0yGABw6SlhKrtT35sU4O23xkhlrTT/O6lSxv3Pm5iSc6OYaqVAHWkLdVf31bF4UDVFO+D990WpAA==}
engines: {node: '>=12'}
cpu: [ppc64]
os: [linux]
@ -796,8 +755,8 @@ packages:
dev: true
optional: true
/esbuild-linux-riscv64/0.15.5:
resolution: {integrity: sha512-p+WE6RX+jNILsf+exR29DwgV6B73khEQV0qWUbzxaycxawZ8NE0wA6HnnTxbiw5f4Gx9sJDUBemh9v49lKOORA==}
/esbuild-linux-riscv64/0.15.16:
resolution: {integrity: sha512-ty2YUHZlwFOwp7pR+J87M4CVrXJIf5ZZtU/umpxgVJBXvWjhziSLEQxvl30SYfUPq0nzeWKBGw5i/DieiHeKfw==}
engines: {node: '>=12'}
cpu: [riscv64]
os: [linux]
@ -805,8 +764,8 @@ packages:
dev: true
optional: true
/esbuild-linux-s390x/0.15.5:
resolution: {integrity: sha512-J2ngOB4cNzmqLHh6TYMM/ips8aoZIuzxJnDdWutBw5482jGXiOzsPoEF4j2WJ2mGnm7FBCO4StGcwzOgic70JQ==}
/esbuild-linux-s390x/0.15.16:
resolution: {integrity: sha512-VkZaGssvPDQtx4fvVdZ9czezmyWyzpQhEbSNsHZZN0BHvxRLOYAQ7sjay8nMQwYswP6O2KlZluRMNPYefFRs+w==}
engines: {node: '>=12'}
cpu: [s390x]
os: [linux]
@ -814,8 +773,8 @@ packages:
dev: true
optional: true
/esbuild-netbsd-64/0.15.5:
resolution: {integrity: sha512-MmKUYGDizYjFia0Rwt8oOgmiFH7zaYlsoQ3tIOfPxOqLssAsEgG0MUdRDm5lliqjiuoog8LyDu9srQk5YwWF3w==}
/esbuild-netbsd-64/0.15.16:
resolution: {integrity: sha512-ElQ9rhdY51et6MJTWrCPbqOd/YuPowD7Cxx3ee8wlmXQQVW7UvQI6nSprJ9uVFQISqSF5e5EWpwWqXZsECLvXg==}
engines: {node: '>=12'}
cpu: [x64]
os: [netbsd]
@ -823,8 +782,8 @@ packages:
dev: true
optional: true
/esbuild-openbsd-64/0.15.5:
resolution: {integrity: sha512-2mMFfkLk3oPWfopA9Plj4hyhqHNuGyp5KQyTT9Rc8hFd8wAn5ZrbJg+gNcLMo2yzf8Uiu0RT6G9B15YN9WQyMA==}
/esbuild-openbsd-64/0.15.16:
resolution: {integrity: sha512-KgxMHyxMCT+NdLQE1zVJEsLSt2QQBAvJfmUGDmgEq8Fvjrf6vSKB00dVHUEDKcJwMID6CdgCpvYNt999tIYhqA==}
engines: {node: '>=12'}
cpu: [x64]
os: [openbsd]
@ -832,8 +791,8 @@ packages:
dev: true
optional: true
/esbuild-sunos-64/0.15.5:
resolution: {integrity: sha512-2sIzhMUfLNoD+rdmV6AacilCHSxZIoGAU2oT7XmJ0lXcZWnCvCtObvO6D4puxX9YRE97GodciRGDLBaiC6x1SA==}
/esbuild-sunos-64/0.15.16:
resolution: {integrity: sha512-exSAx8Phj7QylXHlMfIyEfNrmqnLxFqLxdQF6MBHPdHAjT7fsKaX6XIJn+aQEFiOcE4X8e7VvdMCJ+WDZxjSRQ==}
engines: {node: '>=12'}
cpu: [x64]
os: [sunos]
@ -841,8 +800,8 @@ packages:
dev: true
optional: true
/esbuild-windows-32/0.15.5:
resolution: {integrity: sha512-e+duNED9UBop7Vnlap6XKedA/53lIi12xv2ebeNS4gFmu7aKyTrok7DPIZyU5w/ftHD4MUDs5PJUkQPP9xJRzg==}
/esbuild-windows-32/0.15.16:
resolution: {integrity: sha512-zQgWpY5pUCSTOwqKQ6/vOCJfRssTvxFuEkpB4f2VUGPBpdddZfdj8hbZuFRdZRPIVHvN7juGcpgCA/XCF37mAQ==}
engines: {node: '>=12'}
cpu: [ia32]
os: [win32]
@ -850,8 +809,8 @@ packages:
dev: true
optional: true
/esbuild-windows-64/0.15.5:
resolution: {integrity: sha512-v+PjvNtSASHOjPDMIai9Yi+aP+Vwox+3WVdg2JB8N9aivJ7lyhp4NVU+J0MV2OkWFPnVO8AE/7xH+72ibUUEnw==}
/esbuild-windows-64/0.15.16:
resolution: {integrity: sha512-HjW1hHRLSncnM3MBCP7iquatHVJq9l0S2xxsHHj4yzf4nm9TU4Z7k4NkeMlD/dHQ4jPlQQhwcMvwbJiOefSuZw==}
engines: {node: '>=12'}
cpu: [x64]
os: [win32]
@ -859,8 +818,8 @@ packages:
dev: true
optional: true
/esbuild-windows-arm64/0.15.5:
resolution: {integrity: sha512-Yz8w/D8CUPYstvVQujByu6mlf48lKmXkq6bkeSZZxTA626efQOJb26aDGLzmFWx6eg/FwrXgt6SZs9V8Pwy/aA==}
/esbuild-windows-arm64/0.15.16:
resolution: {integrity: sha512-oCcUKrJaMn04Vxy9Ekd8x23O8LoU01+4NOkQ2iBToKgnGj5eo1vU9i27NQZ9qC8NFZgnQQZg5oZWAejmbsppNA==}
engines: {node: '>=12'}
cpu: [arm64]
os: [win32]
@ -868,33 +827,34 @@ packages:
dev: true
optional: true
/esbuild/0.15.5:
resolution: {integrity: sha512-VSf6S1QVqvxfIsSKb3UKr3VhUCis7wgDbtF4Vd9z84UJr05/Sp2fRKmzC+CSPG/dNAPPJZ0BTBLTT1Fhd6N9Gg==}
/esbuild/0.15.16:
resolution: {integrity: sha512-o6iS9zxdHrrojjlj6pNGC2NAg86ECZqIETswTM5KmJitq+R1YmahhWtMumeQp9lHqJaROGnsBi2RLawGnfo5ZQ==}
engines: {node: '>=12'}
hasBin: true
requiresBuild: true
optionalDependencies:
'@esbuild/linux-loong64': 0.15.5
esbuild-android-64: 0.15.5
esbuild-android-arm64: 0.15.5
esbuild-darwin-64: 0.15.5
esbuild-darwin-arm64: 0.15.5
esbuild-freebsd-64: 0.15.5
esbuild-freebsd-arm64: 0.15.5
esbuild-linux-32: 0.15.5
esbuild-linux-64: 0.15.5
esbuild-linux-arm: 0.15.5
esbuild-linux-arm64: 0.15.5
esbuild-linux-mips64le: 0.15.5
esbuild-linux-ppc64le: 0.15.5
esbuild-linux-riscv64: 0.15.5
esbuild-linux-s390x: 0.15.5
esbuild-netbsd-64: 0.15.5
esbuild-openbsd-64: 0.15.5
esbuild-sunos-64: 0.15.5
esbuild-windows-32: 0.15.5
esbuild-windows-64: 0.15.5
esbuild-windows-arm64: 0.15.5
'@esbuild/android-arm': 0.15.16
'@esbuild/linux-loong64': 0.15.16
esbuild-android-64: 0.15.16
esbuild-android-arm64: 0.15.16
esbuild-darwin-64: 0.15.16
esbuild-darwin-arm64: 0.15.16
esbuild-freebsd-64: 0.15.16
esbuild-freebsd-arm64: 0.15.16
esbuild-linux-32: 0.15.16
esbuild-linux-64: 0.15.16
esbuild-linux-arm: 0.15.16
esbuild-linux-arm64: 0.15.16
esbuild-linux-mips64le: 0.15.16
esbuild-linux-ppc64le: 0.15.16
esbuild-linux-riscv64: 0.15.16
esbuild-linux-s390x: 0.15.16
esbuild-netbsd-64: 0.15.16
esbuild-openbsd-64: 0.15.16
esbuild-sunos-64: 0.15.16
esbuild-windows-32: 0.15.16
esbuild-windows-64: 0.15.16
esbuild-windows-arm64: 0.15.16
dev: true
/escape-string-regexp/4.0.0:
@ -909,35 +869,35 @@ packages:
eslint-plugin-import: '>=1.4.0'
dev: true
/eslint-plugin-header/3.1.1_eslint@8.24.0:
/eslint-plugin-header/3.1.1_eslint@8.28.0:
resolution: {integrity: sha512-9vlKxuJ4qf793CmeeSrZUvVClw6amtpghq3CuWcB5cUNnWHQhgcqy5eF8oVKFk1G3Y/CbchGfEaw3wiIJaNmVg==}
peerDependencies:
eslint: '>=7.7.0'
dependencies:
eslint: 8.24.0
eslint: 8.28.0
dev: true
/eslint-plugin-path-alias/1.0.0_m6sma4g6bh67km3q6igf6uxaja_eslint@8.24.0:
/eslint-plugin-path-alias/1.0.0_m6sma4g6bh67km3q6igf6uxaja_eslint@8.28.0:
resolution: {integrity: sha512-FXus57yC+Zd3sMv46pbloXYwFeNVNHJqlACr9V68FG/IzGFBBokGJpmjDbEjpt8ZCeVSndUubeDWWl2A8sCNVQ==}
peerDependencies:
eslint: ^7
dependencies:
eslint: 8.24.0
eslint: 8.28.0
nanomatch: 1.2.13
transitivePeerDependencies:
- supports-color
dev: true
patched: true
/eslint-plugin-simple-import-sort/8.0.0_eslint@8.24.0:
/eslint-plugin-simple-import-sort/8.0.0_eslint@8.28.0:
resolution: {integrity: sha512-bXgJQ+lqhtQBCuWY/FUWdB27j4+lqcvXv5rUARkzbeWLwea+S5eBZEQrhnO+WgX3ZoJHVj0cn943iyXwByHHQw==}
peerDependencies:
eslint: '>=5.0.0'
dependencies:
eslint: 8.24.0
eslint: 8.28.0
dev: true
/eslint-plugin-unused-imports/2.0.0_5yz3upex2kb6hbdwaq7bihlxnq:
/eslint-plugin-unused-imports/2.0.0_aucl44mjeutxyzmt4nvo2cczya:
resolution: {integrity: sha512-3APeS/tQlTrFa167ThtP0Zm0vctjr4M44HMpeg1P4bK6wItarumq0Ma82xorMKdFsWpphQBlRPzw/pxiVELX1A==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
@ -947,8 +907,8 @@ packages:
'@typescript-eslint/eslint-plugin':
optional: true
dependencies:
'@typescript-eslint/eslint-plugin': 5.42.1_xyciw6oqjoiiono4dhv3uhn5my
eslint: 8.24.0
'@typescript-eslint/eslint-plugin': 5.44.0_fnsv2sbzcckq65bwfk7a5xwslu
eslint: 8.28.0
eslint-rule-composer: 0.3.0
dev: true
@ -973,13 +933,13 @@ packages:
estraverse: 5.3.0
dev: true
/eslint-utils/3.0.0_eslint@8.24.0:
/eslint-utils/3.0.0_eslint@8.28.0:
resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==}
engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0}
peerDependencies:
eslint: '>=5'
dependencies:
eslint: 8.24.0
eslint: 8.28.0
eslint-visitor-keys: 2.1.0
dev: true
@ -993,15 +953,15 @@ packages:
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dev: true
/eslint/8.24.0:
resolution: {integrity: sha512-dWFaPhGhTAiPcCgm3f6LI2MBWbogMnTJzFBbhXVRQDJPkr9pGZvVjlVfXd+vyDcWPA2Ic9L2AXPIQM0+vk/cSQ==}
/eslint/8.28.0:
resolution: {integrity: sha512-S27Di+EVyMxcHiwDrFzk8dJYAaD+/5SoWKxL1ri/71CRHsnJnRDPNt2Kzj24+MT9FDupf4aqqyqPrvI8MvQ4VQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
hasBin: true
dependencies:
'@eslint/eslintrc': 1.3.2
'@humanwhocodes/config-array': 0.10.7
'@humanwhocodes/gitignore-to-minimatch': 1.0.2
'@eslint/eslintrc': 1.3.3
'@humanwhocodes/config-array': 0.11.7
'@humanwhocodes/module-importer': 1.0.1
'@nodelib/fs.walk': 1.2.8
ajv: 6.12.6
chalk: 4.1.2
cross-spawn: 7.0.3
@ -1009,23 +969,23 @@ packages:
doctrine: 3.0.0
escape-string-regexp: 4.0.0
eslint-scope: 7.1.1
eslint-utils: 3.0.0_eslint@8.24.0
eslint-utils: 3.0.0_eslint@8.28.0
eslint-visitor-keys: 3.3.0
espree: 9.4.0
espree: 9.4.1
esquery: 1.4.0
esutils: 2.0.3
fast-deep-equal: 3.1.3
file-entry-cache: 6.0.1
find-up: 5.0.0
glob-parent: 6.0.2
globals: 13.17.0
globby: 11.1.0
globals: 13.18.0
grapheme-splitter: 1.0.4
ignore: 5.2.0
ignore: 5.2.1
import-fresh: 3.3.0
imurmurhash: 0.1.4
is-glob: 4.0.3
js-sdsl: 4.1.5
is-path-inside: 3.0.3
js-sdsl: 4.2.0
js-yaml: 4.1.0
json-stable-stringify-without-jsonify: 1.0.1
levn: 0.4.1
@ -1041,12 +1001,12 @@ packages:
- supports-color
dev: true
/espree/9.4.0:
resolution: {integrity: sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==}
/espree/9.4.1:
resolution: {integrity: sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dependencies:
acorn: 8.8.0
acorn-jsx: 5.3.2_acorn@8.8.0
acorn: 8.8.1
acorn-jsx: 5.3.2_acorn@8.8.1
eslint-visitor-keys: 3.3.0
dev: true
@ -1238,8 +1198,8 @@ packages:
path-is-absolute: 1.0.1
dev: true
/globals/13.17.0:
resolution: {integrity: sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==}
/globals/13.18.0:
resolution: {integrity: sha512-/mR4KI8Ps2spmoc0Ulu9L7agOF0du1CZNQ3dke8yItYlyKNmGrkONemBbd6V8UTc1Wgcqn21t3WYB7dbRmh6/A==}
engines: {node: '>=8'}
dependencies:
type-fest: 0.20.2
@ -1252,7 +1212,7 @@ packages:
array-union: 2.1.0
dir-glob: 3.0.1
fast-glob: 3.2.12
ignore: 5.2.0
ignore: 5.2.1
merge2: 1.4.1
slash: 3.0.0
dev: true
@ -1311,8 +1271,8 @@ packages:
resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==}
dev: true
/ignore/5.2.0:
resolution: {integrity: sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==}
/ignore/5.2.1:
resolution: {integrity: sha512-d2qQLzTJ9WxQftPAuEQpSPmKqzxePjzVbpAVv62AQ64NTL+wR4JkrVqR/LqFsFEUsHDAiId52mJteHDFuDkElA==}
engines: {node: '>= 4'}
dev: true
@ -1426,6 +1386,11 @@ packages:
engines: {node: '>=0.12.0'}
dev: true
/is-path-inside/3.0.3:
resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==}
engines: {node: '>=8'}
dev: true
/is-plain-object/2.0.4:
resolution: {integrity: sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==}
engines: {node: '>=0.10.0'}
@ -1458,8 +1423,8 @@ packages:
engines: {node: '>=0.10.0'}
dev: true
/js-sdsl/4.1.5:
resolution: {integrity: sha512-08bOAKweV2NUC1wqTtf3qZlnpOX/R2DU9ikpjOHs0H+ibQv3zpncVQg6um4uYtRtrwIX8M4Nh3ytK4HGlYAq7Q==}
/js-sdsl/4.2.0:
resolution: {integrity: sha512-dyBIzQBDkCqCu+0upx25Y2jGdbTGxE9fshMsCdK0ViOongpV+n5tXRcZY9v7CaVQ79AGS9KA1KHtojxiM7aXSQ==}
dev: true
/js-yaml/4.1.0:
@ -1479,7 +1444,7 @@ packages:
/keypress/0.2.1:
resolution: {integrity: sha512-HjorDJFNhnM4SicvaUXac0X77NiskggxJdesG72+O5zBKpSqKFCrqmndKVqpu3pFqkla0St6uGk8Ju0sCurrmg==}
dev: false
dev: true
/kind-of/3.2.2:
resolution: {integrity: sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==}
@ -1742,8 +1707,8 @@ packages:
engines: {node: '>=6'}
dev: true
/puppeteer-core/19.2.2:
resolution: {integrity: sha512-faojf+1pZ/tHXSr4x1q+9MVd9FrL3rpdbC0w7qN7MNClMoLuCvMbpR4vzcjoiJYgclt1n+SOPUOmHQViTw6frw==}
/puppeteer-core/19.3.0:
resolution: {integrity: sha512-P8VAAOBnBJo/7DKJnj1b0K9kZBF2D8lkdL94CjJ+DZKCp182LQqYemPI9omUSZkh4bgykzXjZhaVR1qtddTTQg==}
engines: {node: '>=14.1.0'}
dependencies:
cross-fetch: 3.1.5
@ -1832,8 +1797,8 @@ packages:
ret: 0.1.15
dev: true
/semver/7.3.7:
resolution: {integrity: sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==}
/semver/7.3.8:
resolution: {integrity: sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==}
engines: {node: '>=10'}
hasBin: true
dependencies:
@ -1914,7 +1879,7 @@ packages:
/standalone-electron-types/1.0.0:
resolution: {integrity: sha512-0HOi/tlTz3mjWhsAz4uRbpQcHMZ+ifj1JzWW9nugykOHClBBG77ps8QinrzX1eow4Iw2pnC+RFaSYRgufF4BOg==}
dependencies:
'@types/node': 18.8.4
'@types/node': 18.11.9
dev: true
/static-extend/0.1.2:
@ -2010,14 +1975,14 @@ packages:
resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==}
dev: true
/tsutils/3.21.0_typescript@4.8.4:
/tsutils/3.21.0_typescript@4.9.3:
resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==}
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'
dependencies:
tslib: 1.14.1
typescript: 4.8.4
typescript: 4.9.3
dev: true
/type-check/0.4.0:
@ -2032,13 +1997,13 @@ packages:
engines: {node: '>=10'}
dev: true
/type-fest/3.1.0:
resolution: {integrity: sha512-StmrZmK3eD9mDF9Vt7UhqthrDSk66O9iYl5t5a0TSoVkHjl0XZx/xuc/BRz4urAXXGHOY5OLsE0RdJFIApSFmw==}
/type-fest/3.3.0:
resolution: {integrity: sha512-gezeeOIZyQLGW5uuCeEnXF1aXmtt2afKspXz3YqoOcZ3l/YMJq1pujvgT+cz/Nw1O/7q/kSav5fihJHsC/AOUg==}
engines: {node: '>=14.16'}
dev: true
/typescript/4.8.4:
resolution: {integrity: sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==}
/typescript/4.9.3:
resolution: {integrity: sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA==}
engines: {node: '>=4.2.0'}
hasBin: true
dev: true

View file

@ -1,38 +0,0 @@
# Vencord Report
## Bad Patches
- BetterGifAltText (had no effect)
- ID: `866358`
- Match: ```/(return .{1,2}\.createElement.{0,50}isWindowFocused)/ ```
- Webhook Tags (had no effect)
- ID: `696278`
- Match: ```/return null==(.)\?null:.\.createElement\((.)\.Z/ ```
- MessageAccessoriesAPI (had no effect)
- ID: `96063`
- Match: ```/\(\)\.container\)},(.+?)\)};return/ ```
- NoBlockedMessages (had no effect)
- ID: `748241`
- Match: ```/collapsedReason;return (?=\w{1,2}.createElement)/ ```
- IgnoreActivities (had no effect)
- ID: `413620`
- Match: ```/(.:\(\)=>.)(.+)(function (.)\(.{1,10}\.width.+\)\)\)})/ ```
- IgnoreActivities (had no effect)
- ID: `529622`
- Match: ```/(this.renderLastPlayed\(\)\),this.renderOverlayToggle\(\))/ ```
- IgnoreActivities (errored)
- ID: `529622`
- Match: ```/;(.\.renderOverlayToggle=function\(\).+?\)\)\)};)/ ```
- Error: ```Unexpected end of input ```
- ViewIcons (had no effect)
- ID: `847018`
- Match: ```/(?<=createElement\((.{1,5}),\{id:"leave-guild".{0,100},)(.{1,2}\.createElement)\((.{1,5}),null,(.{1,2})\)(?=\)\}function)/ ```
- PlainFolderIcon (found no module)
- ID: `-`
- Match: ```().expandedFolderIconWrapperabaa ```
## Bad Starts
- NitroBypass
- Error: ```tets error ```
## Discord Errors
- ```Failed to load resource: the server responded with a status of 429 () ```
- ```Failed to load resource: the server responded with a status of 404 () ```

View file

@ -20,9 +20,9 @@
import esbuild from "esbuild";
import { zip } from "fflate";
import { readFileSync, writeFileSync } from "fs";
import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "fs";
import { readFile } from "fs/promises";
import { join } from "path";
import { join, resolve } from "path";
// wtf is this assert syntax
import PackageJSON from "../../package.json" assert { type: "json" };
@ -72,20 +72,39 @@ await Promise.all(
]
);
zip({
dist: {
"Vencord.js": readFileSync("dist/browser.js")
},
...Object.fromEntries(await Promise.all(["modifyResponseHeaders.json", "content.js", "manifest.json"].map(async f => [
f,
await readFile(join("browser", f))
]))),
}, {}, (err, data) => {
if (err) {
console.error(err);
process.exitCode = 1;
async function buildPluginZip(target, files, shouldZip) {
const entries = {
"dist/Vencord.js": readFileSync("dist/browser.js"),
...Object.fromEntries(await Promise.all(files.map(async f => [
(f.startsWith("manifest") ? "manifest.json" : f),
await readFile(join("browser", f))
]))),
};
if (shouldZip) {
zip(entries, {}, (err, data) => {
if (err) {
console.error(err);
process.exitCode = 1;
} else {
writeFileSync("dist/" + target, data);
console.info("Extension written to dist/" + target);
}
});
} else {
writeFileSync("dist/extension.zip", data);
console.info("Extension written to dist/extension.zip");
if (existsSync(target))
rmSync(target, { recursive: true });
for (const entry in entries) {
const destination = "dist/" + target + "/" + entry;
const parentDirectory = resolve(destination, "..");
mkdirSync(parentDirectory, { recursive: true });
writeFileSync(destination, entries[entry]);
}
console.info("Unpacked Extension written to dist/" + target);
}
});
}
await buildPluginZip("extension-v3.zip", ["modifyResponseHeaders.json", "content.js", "manifestv3.json"], true);
await buildPluginZip("extension-v2.zip", ["background.js", "content.js", "manifestv2.json"], true);
await buildPluginZip("extension-v2-unpacked", ["background.js", "content.js", "manifestv2.json"], false);

View file

@ -29,6 +29,7 @@ export interface Settings {
notifyAboutUpdates: boolean;
useQuickCss: boolean;
enableReactDevtools: boolean;
themeLinks: string[];
plugins: {
[plugin: string]: {
enabled: boolean;
@ -40,6 +41,7 @@ export interface Settings {
const DefaultSettings: Settings = {
notifyAboutUpdates: true,
useQuickCss: true,
themeLinks: [],
enableReactDevtools: false,
plugins: {}
};

View file

@ -0,0 +1,135 @@
/*
* Vencord, a modification for Discord's desktop app
* Copyright (c) 2022 Vendicated and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { useSettings } from "@api/settings";
import ErrorBoundary from "@components/ErrorBoundary";
import { Link } from "@components/Link";
import { useAwaiter } from "@utils/misc";
import { findLazy } from "@webpack";
import { Card, Forms, Margins, React, TextArea } from "@webpack/common";
const TextAreaProps = findLazy(m => typeof m.textarea === "string");
function Validator({ link }: { link: string; }) {
const [res, err, pending] = useAwaiter(() => fetch(link).then(res => {
if (res.status > 300) throw `${res.status} ${res.statusText}`;
const contentType = res.headers.get("Content-Type");
if (!contentType?.startsWith("text/css") && !contentType?.startsWith("text/plain"))
throw "Not a CSS file. Remember to use the raw link!";
return "Okay!";
}));
const text = pending
? "Checking..."
: err
? `Error: ${err instanceof Error ? err.message : String(err)}`
: "Valid!";
return <Forms.FormText style={{
color: pending ? "var(--text-muted)" : err ? "var(--text-danger)" : "var(--text-positive)"
}}>{text}</Forms.FormText>;
}
function Validators({ themeLinks }: { themeLinks: string[]; }) {
if (!themeLinks.length) return null;
return (
<>
<Forms.FormTitle className={Margins.marginTop20} tag="h5">Validator</Forms.FormTitle>
<Forms.FormText>This section will tell you whether your themes can successfully be loaded</Forms.FormText>
<div>
{themeLinks.map(link => (
<Card style={{
padding: ".5em",
marginBottom: ".5em"
}} key={link}>
<Forms.FormTitle tag="h5" style={{
overflowWrap: "break-word"
}}>
{link}
</Forms.FormTitle>
<Validator link={link} />
</Card>
))}
</div>
</>
);
}
export default ErrorBoundary.wrap(function () {
const settings = useSettings();
const ref = React.useRef<HTMLTextAreaElement>();
function onBlur() {
settings.themeLinks = [...new Set(
ref.current!.value
.trim()
.split(/\n+/)
.map(s => s.trim())
.filter(Boolean)
)];
}
return (
<>
<Card style={{
padding: "1em",
marginBottom: "1em",
marginTop: "1em"
}}>
<Forms.FormTitle tag="h5">Paste links to .css / .theme.css files here</Forms.FormTitle>
<Forms.FormText>One link per line</Forms.FormText>
<Forms.FormText>Be careful to use the raw links or github.io links!</Forms.FormText>
<Forms.FormDivider />
<Forms.FormTitle tag="h5">Find Themes:</Forms.FormTitle>
<div>
<Link style={{ marginRight: ".5em" }} href="https://betterdiscord.app/themes">
BetterDiscord Themes
</Link>
<Link href="https://github.com/search?q=discord+theme">Github</Link>
</div>
<Forms.FormText>If using the BD site, click on "Source" somewhere below the Download button</Forms.FormText>
<Forms.FormText>In the GitHub repository of your theme, find X.theme.css / X.css, click on it, then click the "Raw" button</Forms.FormText>
<Forms.FormText>
If the theme has configuration that requires you to edit the file:
<ul>
<li> Make a github account</li>
<li> Click the fork button on the top right</li>
<li> Edit the file</li>
<li> Use the link to your own repository instead</li>
</ul>
</Forms.FormText>
</Card>
<Forms.FormTitle tag="h5">Themes</Forms.FormTitle>
<TextArea
style={{
padding: ".5em",
border: "1px solid var(--background-modifier-accent)"
}}
ref={ref}
defaultValue={settings.themeLinks.join("\n")}
className={TextAreaProps.textarea}
placeholder="Theme Links"
spellCheck={false}
onBlur={onBlur}
/>
<Validators themeLinks={settings.themeLinks} />
</>
);
});

View file

@ -22,7 +22,7 @@ import DonateButton from "@components/DonateButton";
import ErrorBoundary from "@components/ErrorBoundary";
import IpcEvents from "@utils/IpcEvents";
import { useAwaiter } from "@utils/misc";
import { Button, Card, Forms, React, Switch } from "@webpack/common";
import { Button, Card, Forms, Margins, React, Switch } from "@webpack/common";
const st = (style: string) => `vcSettings${style}`;
@ -30,9 +30,15 @@ function VencordSettings() {
const [settingsDir, , settingsDirPending] = useAwaiter(() => VencordNative.ipc.invoke<string>(IpcEvents.GET_SETTINGS_DIR), "Loading...");
const settings = useSettings();
const [donateImage] = React.useState(
Math.random() > 0.5
? "https://cdn.discordapp.com/emojis/1026533090627174460.png"
: "https://media.discordapp.net/stickers/1039992459209490513.png"
);
return (
<React.Fragment>
<DonateCard />
<DonateCard image={donateImage} />
<Forms.FormSection title="Quick Actions">
<Card className={st("QuickActionCard")}>
{IS_WEB ? (
@ -75,6 +81,9 @@ function VencordSettings() {
<Forms.FormDivider />
<Forms.FormSection title="Settings">
<Forms.FormText className={Margins.marginBottom20}>
Hint: You can change the position of this settings section in the settings of the "Settings" plugin!
</Forms.FormText>
<Switch
value={settings.useQuickCss}
onChange={(v: boolean) => settings.useQuickCss = v}
@ -104,8 +113,11 @@ function VencordSettings() {
}
interface DonateCardProps {
image: string;
}
function DonateCard() {
function DonateCard({ image }: DonateCardProps) {
return (
<Card style={{
padding: "1em",
@ -123,8 +135,9 @@ function DonateCard() {
</div>
<img
role="presentation"
src="https://cdn.discordapp.com/emojis/1026533090627174460.png"
src={image}
alt=""
height={128}
style={{ marginLeft: "auto", transform: "rotate(10deg)" }}
/>
</Card>

View file

@ -24,6 +24,7 @@ import cssText from "~fileContent/settingsStyles.css";
import BackupRestoreTab from "./BackupRestoreTab";
import PluginsTab from "./PluginsTab";
import ThemesTab from "./ThemesTab";
import Updater from "./Updater";
import VencordSettings from "./VencordTab";
@ -47,7 +48,7 @@ interface SettingsTab {
const SettingsTabs: Record<string, SettingsTab> = {
VencordSettings: { name: "Vencord", component: () => <VencordSettings /> },
VencordPlugins: { name: "Plugins", component: () => <PluginsTab /> },
VencordThemes: { name: "Themes", component: () => <Text variant="text-md/medium">Coming soon to a Vencord near you!</Text> },
VencordThemes: { name: "Themes", component: () => <ThemesTab /> },
VencordUpdater: { name: "Updater" }, // Only show updater if IS_WEB is false
VencordSettingsSync: { name: "Backup & Restore", component: () => <BackupRestoreTab /> },
};

132
src/plugins/memberCount.tsx Normal file
View file

@ -0,0 +1,132 @@
/*
* Vencord, a modification for Discord's desktop app
* Copyright (c) 2022 Vendicated and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import ErrorBoundary from "@components/ErrorBoundary";
import { Flex } from "@components/Flex";
import { Devs } from "@utils/constants";
import { getCurrentChannel } from "@utils/discord";
import { useForceUpdater } from "@utils/misc";
import definePlugin from "@utils/types";
import { FluxDispatcher, Tooltip } from "@webpack/common";
const counts = {} as Record<string, [number, number]>;
let forceUpdate: () => void;
function MemberCount() {
const guildId = getCurrentChannel().guild_id;
const c = counts[guildId];
forceUpdate = useForceUpdater();
if (!c) return null;
let total = String(c[0]);
if (total === "0" && c[1] > 0) {
total = "Loading...";
}
return (
<Flex id="vc-membercount" style={{
marginTop: "1em",
marginBottom: "-.5em",
paddingInline: "1em",
justifyContent: "center",
alignContent: "center",
gap: 0
}}>
<Tooltip text={`${c[1]} Online`} position="bottom">
{props => (
<div {...props}>
<span
style={{
backgroundColor: "var(--status-green-600)",
width: "12px",
height: "12px",
borderRadius: "50%",
display: "inline-block",
marginRight: "0.5em"
}}
/>
<span style={{ color: "var(--status-green-600)" }}>{c[1]}</span>
</div>
)}
</Tooltip>
<Tooltip text={`${c[0] || "?"} Total Members`} position="bottom">
{props => (
<div {...props}>
<span
style={{
width: "6px",
height: "6px",
borderRadius: "50%",
border: "3px solid var(--status-grey-500)",
display: "inline-block",
marginRight: "0.5em",
marginLeft: "1em"
}}
/>
<span style={{ color: "var(--status-grey-500)" }}>{total}</span>
</div>
)}
</Tooltip>
</Flex>
);
}
export default definePlugin({
name: "MemberCount",
description: "Shows the amount of online & total members in the server member list",
authors: [Devs.Ven],
patches: [{
find: ".isSidebarVisible,",
replacement: {
match: /(var (.)=.\.className.+?children):\[(.\.useMemo[^}]+"aria-multiselectable")/,
replace: "$1:[$2.startsWith('members')?Vencord.Plugins.plugins.MemberCount.render():null,$3"
}
}],
onGuildMemberListUpdate({ guildId, groups, memberCount, id }) {
// eeeeeh - sometimes it has really wrong counts??? like 10 times less than actual
// but if we only listen to everyone updates, sometimes we never get the count?
// this seems to work but isn't optional
if (id !== "everyone" && counts[guildId]) return;
let count = 0;
for (const group of groups) {
if (group.id !== "offline")
count += group.count;
}
counts[guildId] = [memberCount, count];
forceUpdate?.();
},
start() {
FluxDispatcher.subscribe("GUILD_MEMBER_LIST_UPDATE", this.onGuildMemberListUpdate);
},
stop() {
FluxDispatcher.unsubscribe("GUILD_MEMBER_LIST_UPDATE", this.onGuildMemberListUpdate);
},
render: () => (
<ErrorBoundary noop>
<MemberCount />
</ErrorBoundary>
)
});

View file

@ -0,0 +1,135 @@
/*
* Vencord, a modification for Discord's desktop app
* Copyright (c) 2022 Sofia Lima
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { addServerListElement, removeServerListElement, ServerListRenderPosition } from "@api/ServerList";
import { Settings } from "@api/settings";
import ErrorBoundary from "@components/ErrorBoundary";
import { Devs } from "@utils/constants";
import { useForceUpdater } from "@utils/misc";
import definePlugin, { OptionType } from "@utils/types";
import { FluxDispatcher, GuildStore,PresenceStore, RelationshipStore } from "@webpack/common";
enum IndicatorType {
SERVER = 1 << 0,
FRIEND = 1 << 1,
BOTH = SERVER | FRIEND,
}
let onlineFriends = 0;
let guildCount = 0;
let forceUpdateFriendCount: () => void;
let forceUpdateGuildCount: () => void;
function FriendsIndicator() {
forceUpdateFriendCount = useForceUpdater();
return (
<span id="vc-friendcount" style={{
display: "inline-block",
width: "100%",
fontSize: "12px",
fontWeight: "600",
color: "var(--header-secondary)",
textTransform: "uppercase",
textAlign: "center",
}}>
{onlineFriends} online
</span>
);
}
function ServersIndicator() {
forceUpdateGuildCount = useForceUpdater();
return (
<span id="vc-guildcount" style={{
display: "inline-block",
width: "100%",
fontSize: "12px",
fontWeight: "600",
color: "var(--header-secondary)",
textTransform: "uppercase",
textAlign: "center",
}}>
{guildCount} servers
</span>
);
}
export default definePlugin({
name: "ServerListIndicators",
description: "Add online friend count or server count in the server list",
authors: [Devs.dzshn],
dependencies: ["ServerListAPI"],
options: {
mode: {
description: "mode",
type: OptionType.SELECT,
options: [
{ label: "Only online friend count", value: IndicatorType.FRIEND, default: true },
{ label: "Only server count", value: IndicatorType.SERVER },
{ label: "Both server and online friend counts", value: IndicatorType.BOTH },
]
}
},
renderIndicator: () => {
const { mode } = Settings.plugins.ServerListIndicators;
return <ErrorBoundary noop>
<div style={{ marginBottom: "4px" }}>
{!!(mode & IndicatorType.FRIEND) && <FriendsIndicator />}
{!!(mode & IndicatorType.SERVER) && <ServersIndicator />}
</div>
</ErrorBoundary>;
},
handlePresenceUpdate() {
onlineFriends = 0;
const relations = RelationshipStore.getRelationships();
for (const id of Object.keys(relations)) {
const type = relations[id];
// FRIEND relationship type
if (type === 1 && PresenceStore.getStatus(id) !== "offline") {
onlineFriends += 1;
}
}
forceUpdateFriendCount?.();
},
handleGuildUpdate() {
guildCount = GuildStore.getGuildCount();
forceUpdateGuildCount?.();
},
start() {
this.handlePresenceUpdate();
this.handleGuildUpdate();
addServerListElement(ServerListRenderPosition.Above, this.renderIndicator);
FluxDispatcher.subscribe("PRESENCE_UPDATES", this.handlePresenceUpdate);
FluxDispatcher.subscribe("GUILD_CREATE", this.handleGuildUpdate);
FluxDispatcher.subscribe("GUILD_DELETE", this.handleGuildUpdate);
},
stop() {
removeServerListElement(ServerListRenderPosition.Above, this.renderIndicator);
FluxDispatcher.unsubscribe("PRESENCE_UPDATES", this.handlePresenceUpdate);
FluxDispatcher.unsubscribe("GUILD_CREATE", this.handleGuildUpdate);
FluxDispatcher.unsubscribe("GUILD_DELETE", this.handleGuildUpdate);
}
});

View file

@ -16,9 +16,11 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { Settings } from "@api/settings";
import { Devs } from "@utils/constants";
import Logger from "@utils/Logger";
import { LazyComponent } from "@utils/misc";
import definePlugin from "@utils/types";
import definePlugin, { OptionType } from "@utils/types";
import gitHash from "~git-hash";
@ -43,7 +45,23 @@ export default definePlugin({
}, {
find: "Messages.ACTIVITY_SETTINGS",
replacement: {
match: /\{section:(.{1,2})\.ID\.HEADER,\s*label:(.{1,2})\..{1,2}\.Messages\.ACTIVITY_SETTINGS\}/,
get match() {
switch (Settings.plugins.Settings.settingsLocation) {
case "top": return /\{section:(.{1,2})\.ID\.HEADER,\s*label:(.{1,2})\..{1,2}\.Messages\.USER_SETTINGS\}/;
case "aboveNitro": return /\{section:(.{1,2})\.ID\.HEADER,\s*label:(.{1,2})\..{1,2}\.Messages\.BILLING_SETTINGS\}/;
case "belowNitro": return /\{section:(.{1,2})\.ID\.HEADER,\s*label:(.{1,2})\..{1,2}\.Messages\.APP_SETTINGS\}/;
case "aboveActivity": return /\{section:(.{1,2})\.ID\.HEADER,\s*label:(.{1,2})\..{1,2}\.Messages\.ACTIVITY_SETTINGS\}/;
case "belowActivity": return /(?<=\{section:(.{1,2})\.ID\.DIVIDER},)\{section:"changelog"/;
case "bottom": return /\{section:(.{1,2})\.ID\.CUSTOM,\s*element:.+?}/;
default: {
new Logger("Settings").error(
new Error("No switch case matched????? Don't mess with the settings, silly")
);
// matches nothing
return /(?!a)a/;
}
}
},
replace: (m, mod) => {
const updater = !IS_WEB ? '{section:"VencordUpdater",label:"Updater",element:Vencord.Plugins.plugins.Settings.tabs.updater},' : "";
const patchHelper = IS_DEV ? '{section:"VencordPatchHelper",label:"Patch Helper",element:Vencord.Components.PatchHelper},' : "";
@ -61,6 +79,22 @@ export default definePlugin({
}
}],
options: {
settingsLocation: {
type: OptionType.SELECT,
description: "Where to put the Vencord settings section",
options: [
{ label: "At the very top", value: "top" },
{ label: "Above the Nitro section", value: "aboveNitro" },
{ label: "Below the Nitro section", value: "belowNitro" },
{ label: "Above Activity Settings", value: "aboveActivity", default: true },
{ label: "Below Activity Settings", value: "belowActivity" },
{ label: "At the very bottom", value: "bottom" },
],
restartNeeded: true
},
},
tabs: {
vencord: () => <SettingsComponent tab="VencordSettings" />,
plugins: () => <SettingsComponent tab="VencordPlugins" />,

View file

@ -27,7 +27,7 @@ import type { LiteralUnion } from "type-fest";
*
* @example onceDefined(window, "webpackChunkdiscord_app", wpInstance => wpInstance.push(...));
*/
export function onceDefined<T, P extends LiteralUnion<keyof T, PropertyKey>>(
export function onceDefined<T extends object, P extends LiteralUnion<keyof T, PropertyKey>>(
target: T, property: P, callback: (v: P extends keyof T ? T[P] : any) => void
): void {
const propertyAsAny = property as any;

View file

@ -21,6 +21,7 @@ import { addSettingsListener, Settings } from "@api/settings";
import IpcEvents from "./IpcEvents";
let style: HTMLStyleElement;
let themesStyle: HTMLStyleElement;
export async function toggle(isEnabled: boolean) {
if (!style) {
@ -35,7 +36,22 @@ export async function toggle(isEnabled: boolean) {
style.disabled = !isEnabled;
}
async function initThemes() {
if (!themesStyle) {
themesStyle = document.createElement("style");
themesStyle.id = "vencord-themes";
document.head.appendChild(themesStyle);
}
const { themeLinks } = Settings;
const links = themeLinks.map(link => `@import url("${link.trim()}");`).join("\n");
themesStyle.textContent = links;
}
document.addEventListener("DOMContentLoaded", () => {
toggle(Settings.useQuickCss);
addSettingsListener("useQuickCss", toggle);
initThemes();
addSettingsListener("themeLinks", initThemes);
});

View file

@ -50,6 +50,7 @@ export let UserStore: Stores.UserStore;
export let SelectedChannelStore: Stores.SelectedChannelStore;
export let SelectedGuildStore: any;
export let ChannelStore: Stores.ChannelStore;
export let RelationshipStore: Stores.RelationshipStore;
export const Forms = {} as {
FormTitle: Components.FormTitle;
@ -64,6 +65,7 @@ export let Tooltip: Components.Tooltip;
export let Router: any;
export let TextInput: any;
export let Text: (props: TextProps) => JSX.Element;
export const TextArea = findByCodeLazy("handleSetRef", "textArea") as React.ComponentType<React.PropsWithRef<any>>;
export const Select = LazyComponent(() => findByCode("optionClassName", "popoutPosition", "autoFocus", "maxVisibleItems"));
export const Slider = LazyComponent(() => findByCode("closestMarkerIndex", "stickToMarkers"));
@ -156,6 +158,7 @@ waitFor("getSortedPrivateChannels", m => ChannelStore = m);
waitFor("getCurrentlySelectedChannelId", m => SelectedChannelStore = m);
waitFor("getLastSelectedGuildId", m => SelectedGuildStore = m);
waitFor("getGuildCount", m => GuildStore = m);
waitFor("getRelationshipType", m => RelationshipStore = m);
waitFor(["Hovers", "Looks", "Sizes"], m => Button = m);
waitFor(filters.byCode("helpdeskArticleId"), m => Switch = m);