diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c7a2f24e8..ba22b1230 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,7 +32,7 @@ jobs: run: pnpm install --frozen-lockfile - name: Build web - run: pnpm buildWeb --standalone + run: pnpm buildWebStandalone - name: Build run: pnpm build --standalone diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8407e08e2..190e3069c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -32,7 +32,7 @@ jobs: run: pnpm install --frozen-lockfile - name: Build web - run: pnpm buildWeb --standalone + run: pnpm buildWebStandalone - name: Publish extension run: | diff --git a/package.json b/package.json index 881e42a28..43ac36304 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,8 @@ "build": "node --require=./scripts/suppressExperimentalWarnings.js scripts/build/build.mjs", "buildStandalone": "pnpm build --standalone", "buildWeb": "node --require=./scripts/suppressExperimentalWarnings.js scripts/build/buildWeb.mjs", - "buildReporter": "pnpm buildWeb --standalone --reporter --skip-extension", + "buildWebStandalone": "pnpm buildWeb --standalone", + "buildReporter": "pnpm buildWebStandalone --reporter --skip-extension", "watch": "pnpm build --watch", "watchWeb": "pnpm buildWeb --watch", "generatePluginJson": "tsx scripts/generatePluginList.ts", diff --git a/scripts/build/buildWeb.mjs b/scripts/build/buildWeb.mjs index 04ff674fc..bc15ccced 100644 --- a/scripts/build/buildWeb.mjs +++ b/scripts/build/buildWeb.mjs @@ -33,7 +33,7 @@ const commonOptions = { entryPoints: ["browser/Vencord.ts"], globalName: "Vencord", format: "iife", - external: ["plugins", "git-hash", "/assets/*"], + external: ["~plugins", "~git-hash", "/assets/*"], plugins: [ globPlugins("web"), ...commonOpts.plugins, diff --git a/src/plugins/_core/supportHelper.tsx b/src/plugins/_core/supportHelper.tsx index c7377833a..d59d82afc 100644 --- a/src/plugins/_core/supportHelper.tsx +++ b/src/plugins/_core/supportHelper.tsx @@ -65,7 +65,7 @@ export default definePlugin({ commands: [{ name: "vencord-debug", description: "Send Vencord Debug info", - predicate: ctx => AllowedChannelIds.includes(ctx.channel.id), + predicate: ctx => isPluginDev(UserStore.getCurrentUser()?.id) || AllowedChannelIds.includes(ctx.channel.id), async execute() { const { RELEASE_CHANNEL } = window.GLOBAL_ENV; diff --git a/src/plugins/friendsSince/index.tsx b/src/plugins/friendsSince/index.tsx index eb59fff25..58014f362 100644 --- a/src/plugins/friendsSince/index.tsx +++ b/src/plugins/friendsSince/index.tsx @@ -36,7 +36,7 @@ export default definePlugin({ { find: ".UserPopoutUpsellSource.PROFILE_PANEL,", replacement: { - match: /\i.default,\{userId:(\i)}\)/, + match: /\i.default,\{userId:([^,]+?)}\)/, replace: "$&,$self.friendsSince({ userId: $1 })" } }, diff --git a/src/plugins/showConnections/index.tsx b/src/plugins/showConnections/index.tsx index d70c09315..a78e4c418 100644 --- a/src/plugins/showConnections/index.tsx +++ b/src/plugins/showConnections/index.tsx @@ -182,7 +182,7 @@ export default definePlugin({ } }, { - find: "\"Profile Panel: user cannot be undefined\"", + find: ".UserPopoutUpsellSource.PROFILE_PANEL,", replacement: { // createElement(Divider, {}), createElement(NoteComponent) match: /\(0,\i\.jsx\)\(\i\.\i,\{\}\).{0,100}setNote:(?=.+?channelId:(\i).id)/, diff --git a/src/utils/dependencies.ts b/src/utils/dependencies.ts index f05900e14..d8c361e88 100644 --- a/src/utils/dependencies.ts +++ b/src/utils/dependencies.ts @@ -17,7 +17,6 @@ */ import { makeLazy } from "./lazy"; -import { EXTENSION_BASE_URL } from "./web-metadata"; /* Add dynamically loaded dependencies for plugins here. @@ -67,15 +66,6 @@ export interface ApngFrameData { playTime: number; } -// On web (extensions), use extension uri as basepath (load files from extension) -// On desktop (electron), load from cdn -export const rnnoiseDist = IS_EXTENSION - ? new URL("/third-party/rnnoise", EXTENSION_BASE_URL).toString() - : "https://unpkg.com/@sapphi-red/web-noise-suppressor@0.3.3/dist"; -export const rnnoiseWasmSrc = (simd = false) => `${rnnoiseDist}/rnnoise${simd ? "_simd" : ""}.wasm`; -export const rnnoiseWorkletSrc = `${rnnoiseDist}/rnnoise/workletProcessor.js`; - - // The below code is only used on the Desktop (electron) build of Vencord. // Browser (extension) builds do not contain these remote imports.