Merge branch 'Vencord:main' into main

This commit is contained in:
Sammie Zhang 2025-02-20 23:20:17 -08:00 committed by GitHub
commit 4ebe6f2ced
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 352 additions and 334 deletions

View file

@ -5,10 +5,10 @@ body:
- type: markdown
attributes:
value: |
# READ THIS BEFORE OPENING AN ISSUE
![Are you a developer? No? This form is not for you!](https://github.com/Vencord/Vesktop/blob/main/.github/ISSUE_TEMPLATE/developer-banner.png?raw=true)
This form is only meant for Vesktop developers. If you don't know what you're doing,
please use the bug report or feature request templates instead.
GitHub Issues are for developers, not support. Please use our [support server](https://vencord.dev/discord) if you are not a developer.
- type: textarea
id: content

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

View file

@ -0,0 +1,28 @@
name: Update vencord.dev Vesktop version
on:
release:
types:
- published
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Update scripts/_latestVesktopVersion.txt file in vencord.dev repo
run: |
git config --global user.name "$USERNAME"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git clone https://$USERNAME:$API_TOKEN@github.com/$GH_REPO.git repo
cd repo
echo "${{ github.event.release.tag_name }}" > scripts/_latestVesktopVersion.txt
git add scripts/_latestVesktopVersion.txt
git commit -m "Update Vesktop version to ${{ github.event.release.tag_name }}"
git push https://$USERNAME:$API_TOKEN@github.com/$GH_REPO.git
env:
API_TOKEN: ${{ secrets.VENCORD_DEV_GITHUB_TOKEN }}
GH_REPO: Vencord/vencord.dev
USERNAME: GitHub-Actions

View file

@ -34,27 +34,27 @@
},
"devDependencies": {
"@fal-works/esbuild-plugin-global-externals": "^2.1.2",
"@stylistic/eslint-plugin": "^3.0.1",
"@types/node": "^22.13.1",
"@types/react": "18.3.12",
"@vencord/types": "^1.8.4",
"@stylistic/eslint-plugin": "^4.0.0",
"@types/node": "^22.13.4",
"@types/react": "18.3.1",
"@vencord/types": "^1.11.5",
"dotenv": "^16.4.7",
"electron": "^34.1.0",
"electron": "^34.2.0",
"electron-builder": "^25.1.8",
"esbuild": "^0.24.2",
"eslint": "^9.19.0",
"esbuild": "^0.25.0",
"eslint": "^9.20.1",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-path-alias": "^2.1.0",
"eslint-plugin-prettier": "^5.2.3",
"eslint-plugin-simple-header": "^1.2.2",
"eslint-plugin-simple-import-sort": "^12.1.1",
"eslint-plugin-unused-imports": "^4.1.4",
"prettier": "^3.4.2",
"prettier": "^3.5.1",
"source-map-support": "^0.5.21",
"tsx": "^4.19.2",
"type-fest": "^4.33.0",
"type-fest": "^4.35.0",
"typescript": "^5.7.3",
"typescript-eslint": "^8.23.0",
"typescript-eslint": "^8.24.1",
"xml-formatter": "^3.6.4"
},
"packageManager": "pnpm@9.1.0",

619
pnpm-lock.yaml generated

File diff suppressed because it is too large Load diff

View file

@ -5,7 +5,7 @@
*/
import { mkdirSync } from "fs";
import { access, constants as FsConstants } from "fs/promises";
import { access, constants as FsConstants, writeFile } from "fs/promises";
import { join } from "path";
import { USER_AGENT, VENCORD_FILES_DIR } from "../constants";
@ -63,7 +63,8 @@ const existsAsync = (path: string) =>
.catch(() => false);
export async function isValidVencordInstall(dir: string) {
return Promise.all(FILES_TO_DOWNLOAD.map(f => existsAsync(join(dir, f)))).then(arr => !arr.includes(false));
const results = await Promise.all(["package.json", ...FILES_TO_DOWNLOAD].map(f => existsAsync(join(dir, f))));
return !results.includes(false);
}
export async function ensureVencordFiles() {
@ -71,5 +72,5 @@ export async function ensureVencordFiles() {
mkdirSync(VENCORD_FILES_DIR, { recursive: true });
await downloadVencordFiles();
await Promise.all([downloadVencordFiles(), writeFile(join(VENCORD_FILES_DIR, "package.json"), "{}")]);
}

View file

@ -18,12 +18,12 @@ import { VesktopLogger } from "./logger";
import { Settings } from "./settings";
export { Settings };
import type SettingsPlugin from "@vencord/types/plugins/_core/settings";
VesktopLogger.log("read if cute :3");
VesktopLogger.log("Vesktop v" + VesktopNative.app.getVersion());
const customSettingsSections = (
Vencord.Plugins.plugins.Settings as any as { customSections: ((ID: Record<string, unknown>) => any)[] }
).customSections;
const customSettingsSections = (Vencord.Plugins.plugins.Settings as any as typeof SettingsPlugin).customSections;
customSettingsSections.push(() => ({
section: "Vesktop",