Commit graph

225 commits

Author SHA1 Message Date
PalmDevs
2b665164e9
fix(plugin/api.json-storage): handle when plugin hasn't been initialized when clearing storage 2026-07-26 00:54:20 +07:00
PalmDevs
61dad36056
fix(plugins/settings.plugins): cache repo listings when building an alert to confirm an install plan 2026-07-26 00:12:55 +07:00
PalmDevs
41e9186966
fix(plugins/settings.plugins): show toast for errors during missing dependencies installation when enabling plugins 2026-07-26 00:10:03 +07:00
PalmDevs
6e4d128951
fix(plugins/settings.plugins): pending reload uninstall alert text 2026-07-25 23:58:36 +07:00
PalmDevs
eed74947c3
chore: format and fix potential type errors 2026-07-25 23:58:01 +07:00
PalmDevs
9b412a9404
feat!: new repo system + versioning system support + bug fixes
BREAKING CHANGES:
- New versioning system: Allowing any amount of number segments, with prerelease support.
  - Any number of segments is supported: 1, 1.0, 1.0.0, 1.0.0.0, ...
  - Prerelease labels are compared "digit-run", similar to Debian.
  - Plugins must specify a version.
  - User-facing plugins should use CalVer. API plugins should use SemVer.
    Revenge APIs use SemVer while the new `discord` dependency parses the Discord version string directly.
- Dependency is now a Map, with support for version ranges and optional. Suggested URL is removed. (See new repo system)
- Plugins will now have to declare a dependency on `revenge.api` (Revenge API version) and `discord` (Discord version).
- Manifest now requires a format version (currently `1`)

New APIs:
- lib/plugins/utils: Utilities to format versioning

Features:
- New repo system: Repository design is inspired by Linux package repositories.
  - Repos host manifest, versions, channels, download URL/size, and hash for multiple plugins.
  - New dependency system: Plugins are versioned, and shouldn't break when updates come.
    Plugins can now declare dependency on supported Discord/Revenge API versions, so they won't break with auto-updates.
    Dependencies can be optional, but dependency on `revenge.api` and `discord` must be required.
    Dependents are soft-disabled when dependencies don't satisfy. Once satisfied, the plugin can start again.
  - All updates for running plugins REQUIRE a reload to prevent stale linking issues. Both native and JS-side.
  - Update checking is handled entirely by JS. But the native-side still handles installation, indexing, and verification.
  - Local indexes are updated against remote indexes. Dependency checking always uses local indexes.
  - Users can add custom repositories and custom their priority order. URL is the identity.
- Plugins can now have custom data URI icons instead of being restricted to React Native app assets.
- External plugin installs require UI confirmation before installing.
- Pending Update and Pending Reload filters in Plugins page.
- Ability to browse external plugins in repositories. Official repository will be added soon.

Fixes/Refactor:
- Refactored Plugin-related settings to a separate "Plugin Settings" plugin.
- Masonry layout fixes in landscape.
- Updated plugins now show "reload to apply" toast instead.
- Removed dead code.
2026-07-25 23:43:44 +07:00
PalmDevs
fb35d7af95
fix(plugins/api.json-storage): remove entire dir when clearing and only update storage when needed 2026-07-19 20:19:19 +07:00
PalmDevs
3f60b4dfb7
feat!: more plugin system improvements + API changes + other fixes
BREAKING CHANGES:

- lib/modules!: Renamed `callBridgeMethod*` to `callNativeMethod*` and interface `Methods` to `NativeMethods`. This is to achieve naming consistency with the native API and be more clear.
- lib/storage!: Renamed to `@revenge-mod/json-storage`. A storage can be in any arbitrary format. While there's little potential for non-JSON storage formats, but the naming should allow for it regardless. This is not a drop-in replacements. There are breaking changes in export names and new APIs.
- plugins/revenge.api.storage!: Renamed to `revenge.api.jsonStorage`. Plugin options are renamed and its structure has changed as well.
- Native now holds the path for official storage APIs. This update uses new paths without any migration!
- lib/plugins!: `Plugin.errors` is now read-only. Use `Plugin.reportError(e)` instead.
- lib/plugins!: `Plugin.flags` has been completely removed in favor of these methods: `Plugin.requireReload()`, `Plugin.disable()`.

OTHER CHANGES:

- Fixed sorting for 'Enabled first'
- Updated native method names to be more consistent
- Cleand up dead code
- Make methods more 'safe' by removing non-null assertion casts
2026-07-09 23:47:53 +07:00
PalmDevs
fb3692bc2d
feat: plugin system improvement
- Stop plugins prior to an update
- Native calls are now awaited in relevant places
- External plugin install feedback
- Plugins that are pending reloads now can't be started after an update
2026-07-07 23:19:58 +07:00
PalmDevs
fb1a31640f
fix(plugins/settings): use new imported path for settings navigator patch 2026-07-07 23:06:54 +07:00
PalmDevs
420f3e803e
fix(lib/plugins)!: update storage layout
No migration here. It also replaces some specific APIs.
2026-07-07 00:28:05 +07:00
PalmDevs
bf8b99efb9
feat(lib/plugins): external plugins support
This is the first draft. Things may change in the future.
Loader changes are required as well.
2026-07-07 00:03:46 +07:00
PalmDevs
bb144c08ea
fix(plugins/developer-kit): restore DevTools alias correctly 2026-06-13 21:42:27 +07:00
PalmDevs
0d34aaceeb
fix(plugins/settings): occasional double reload required & failed to start plugin dialogs 2026-06-13 01:35:33 +07:00
PalmDevs
4513675547
feat(plugins/developer-kit): new DevTools support 2026-06-10 23:58:23 +07:00
PalmDevs
4fd5a28edc
feat(plugins/no-track): block /science requests 2026-05-13 01:54:35 +07:00
PalmDevs
df01515823
feat(lib/modules/metro): module segments support 2026-05-13 01:22:42 +07:00
PalmDevs
2e148803a0
feat(plugins/error-boundary): show RN version + migrate to react-native-safe-area-context 2026-05-13 01:22:41 +07:00
PalmDevs
3ca2f8742d
fix: support Discord's settings refactor
I assume this happened on 330201, but I'm unsure.

This also drops support for any older versions that may not have this change.
2026-05-13 01:22:39 +07:00
PalmDevs
46440ffdde
feat(plugins/no-track): log attempts to set __SENTRY__ in dev builds 2026-04-07 22:36:13 +07:00
PalmDevs
5c892bb8a1
fix(lib/plugins/apis): set most APIs during pre-init phase 2026-04-07 22:03:13 +07:00
PalmDevs
06a574c77e
feat(lib/externals): add react-native-safe-area-context 2026-04-01 13:32:19 +07:00
PalmDevs
13ffdbca90
fix(plugins/developer-kit): proper error message for websocket disconnects 2026-02-26 17:22:29 +07:00
PalmDevs
a87d4ced5c
fix(lib/modules)!: decouple discord-specific helpers to lib/discord 2026-01-17 20:41:14 +07:00
tralwdwd
aa07721269
feat(plugins/developer-kit): improve UI for JS eval
Currently the eval is done in a modal which makes it hard to use and means any code written is discarded after pressing evaluate and also it is hard to read output from an alert. This commit improves it by instead having it as a page instead where the code remains after evaluation and outputs the result in a box in the page rather than in an alert.

Eval results are also selectable now, and have display options. And inspecting with zero depth is now possible.

---------

Co-authored-by: PalmDevs <git@palmdevs.me>
2025-12-13 23:16:53 +07:00
PalmDevs
3284300ef1
feat(plugins/developer-kit): make Asset Browser asset names easy to copy 2025-12-13 22:50:27 +07:00
PalmDevs
47084f4f52
chore: update dependencies 2025-12-13 22:43:21 +07:00
PalmDevs
13722b994b
fix(plugins/no-track): crash on 310205+
Discord updated Sentry and now Sentry attempts also to set __SENTRY__ each attempt it tries to get the value, so now we fake the carrier instead.
2025-12-13 22:43:02 +07:00
PalmDevs
11259ee0b7
fix(plugins): update color tokens 2025-12-13 22:41:08 +07:00
PalmDevs
6c63ba5a31
fix: settings patches and definitions for 306203+ 2025-11-13 16:55:23 +07:00
PalmDevs
d9968c6e22
fix(plugins/developer-kit): use indirect eval 2025-11-12 15:05:50 +07:00
tralwdwd
440c2ab1bd
fix(plugins/developer-kit): eval alert box layout (#8) 2025-11-10 10:27:41 +07:00
PalmDevs
96ea57c559
fix(plugins/settings): navigate to Plugins screen correctly in plugin error alert 2025-10-24 14:50:35 +07:00
PalmDevs
2293e288d1
feat(plugins/settings): improve additional plugin options sheet
- Disable Settings icon button with tooltip hint if plugin is not enabled
- Added Status
- Moved Flags to Advanced
- Added Internal Flags

Other changes (to make the above work):
- TooltipProvider now properly uses React Contexts
- Added usePluginStatus (PluginStateProvider now subscribes to plugin statuses)
2025-10-23 17:50:38 +07:00
PalmDevs
2bf7709ba3
fix: use CircleErrorIcon instead of CircleXIcon for errors 2025-10-23 17:37:21 +07:00
PalmDevs
5aca231f2a
fix(plugins/settings): increase spacing for additional plugin options sheet 2025-10-23 17:06:08 +07:00
PalmDevs
da8c535544
fix(plugins/settings): clear storage properly on errored plugins
Previous code did not handle API being undefined after plugin is stopped.
Code has also been abstracted to be inside the storage API provider.
2025-10-23 17:05:25 +07:00
PalmDevs
079577922e
feat(plugins/settings): notify user on plugin error 2025-10-23 00:55:24 +07:00
PalmDevs
acac384f8b
feat(plugins/settings): improve styling for additional plugin options sheet 2025-10-23 00:53:35 +07:00
PalmDevs
fa0e480974
feat(plugins/settings): add plugin filtering by error status, derive and set route params directly 2025-10-23 00:52:25 +07:00
PalmDevs
a2f330e7e2
chore: remove #lib syntax
Autocomplete is annoying.
2025-10-22 22:24:26 +07:00
PalmDevs
de063fe260
feat(plugins/settings): add sheet for additional plugin options 2025-10-22 22:20:58 +07:00
PalmDevs
2bc2a9fd08
fix(lib/plugins): expose internal metadata via function instead 2025-10-22 22:19:42 +07:00
PalmDevs
0583c97ae2
fix(plugins/user-badges): remove dummy badge correctly 2025-10-22 22:16:15 +07:00
PalmDevs
de3134f1f3
fix(plugins/developer-kit): make address fields no longer sticky 2025-10-18 19:07:09 +07:00
PalmDevs
0bdf191fc9
fix(plugins/developer-kit): listen for correct setting, send log in correct level 2025-10-18 11:35:35 +07:00
PalmDevs
cb3b12f2ee
fix(plugins/no-track): correctly block AnalyticsTrackingActionCreators 2025-10-17 17:47:43 +07:00
PalmDevs
fbf2396d94
feat: catch and report fatal initialization errors 2025-10-17 15:49:50 +07:00
PalmDevs
67c3d9ec8d
chore(lib/plugins): update internal names with correct terminology 2025-10-14 00:37:24 +07:00
PalmDevs
0df3530788
feat(plugins/developer-kit): devtools integration + some fixes 2025-10-14 00:16:49 +07:00