Commit graph

105 commits

Author SHA1 Message Date
PalmDevs
57961ae5d7
fix(lib/plugins): ignore re-registration for internal plugins 2026-08-02 00:05:18 +07:00
PalmDevs
2dd77f24b5
fix(lib/plugins)!: incorrect API structure for unscoped.discord.utils 2026-08-01 21:44:47 +07:00
PalmDevs
912fa8e896
chore(lib/plugins): update init+ error message with hints 2026-08-01 15:45:31 +07:00
PalmDevs
73534bda6a
fix(lib/plugins): restrict unscoped.discord.(actions|design) to init+ 2026-08-01 15:42:30 +07:00
PalmDevs
bd5ee5c1f1
chore(lib): clarify doc 2026-08-01 14:49:54 +07:00
PalmDevs
944dbb6838
feat: improve recovery mode + small lib additions
Improved Recovery Mode features generally:
- Ability to view and modify saved states while not actually running any additional plugins
- Better Recovery Mode banner display
- Enter Recovery Mode option in Revenge Settings UI
- Fixed freeze detection false positives

New APIs:
- lib/discord: `disabled` in `DiscordModules.Components.FloatingActionButtonProps`
- lib/modules/native/app: new submodule with `reloadApp()` method

Fixes:
- Use `reloadApp()` instead of `BundleUpdaterManager.reload()`
2026-08-01 01:51:34 +07:00
PalmDevs
ffce0e2cf2
feat(lib/plugins): add sourceURL to external plugin scripts 2026-07-31 17:46:42 +07:00
PalmDevs
1497e8ef8d
feat: app freeze detection and recovery mode
This requires loader support and can only be triggered from a native dialog.
Recovery mode toggle won't be a functionality for now. If there's a use, such as binary searching problematic plugins, then it'll be added (similar to VSCode extension bisect).
2026-07-31 17:46:08 +07:00
PalmDevs
c49f3eb471
fix(lib/discord/common)!: split to own submodules + don't restrict everything to init+ 2026-07-31 14:51:15 +07:00
PalmDevs
1c58b7a5a1
chore: use AnyFunction from lib everywhere 2026-07-31 02:38:45 +07:00
PalmDevs
c7b5ae8ee6
fix(lib/plugins): external JS plugins not loading 2026-07-29 21:48:10 +07:00
PalmDevs
0fdc1f1cff
fix: plugin API types + JS options validation 2026-07-28 12:07:28 +07:00
PalmDevs
b250450367
feat(lib/plugins): reexpose EnabledLate flags property as startedLate 2026-07-26 16:01:09 +07:00
PalmDevs
d2c7f47fe7
fix(plugins/settings.plugins): match the version, channel, and repo exactly from the card when installing plugins from the Browse screen 2026-07-26 02:01:58 +07:00
PalmDevs
5432276ab0
fix(plugins/settings.plugins): small errors & inconsistencies
- Soft errors now nudge UI to rerender.
- `runPluginLate` will throw anyway, so early return is cleaner.
- `confirmInstall` returns a `Promise` which the AlertModal should await before closing.
2026-07-26 02:01:57 +07:00
PalmDevs
ff263a2282
chore: remove dead code and correct comments 2026-07-26 02:01:56 +07:00
PalmDevs
da1e34dc62
fix(plugins/settings.plugins): last updated date logic
Only update when repos are actually refreshed, and when no errors occurred.
2026-07-26 02:01:37 +07:00
PalmDevs
a5290d314f
fix(lib/plugins): forget initial persisted states when un/reinstalling a plugin 2026-07-26 01:21:02 +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
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
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
7b651154a2
fix(lib/plugins): prepend API plugins last 2026-04-07 22:34:34 +07:00
PalmDevs
5c892bb8a1
fix(lib/plugins/apis): set most APIs during pre-init phase 2026-04-07 22:03:13 +07:00
PalmDevs
c8906b442a
feat(lib/plugins)!: bind lifecycle this to plugin 2025-10-26 23:08:36 +07:00
PalmDevs
0f0c5f85eb
fix(lib/plugins): clear Errored flag properly on prepare 2025-10-23 17:02:19 +07:00
PalmDevs
2bc2a9fd08
fix(lib/plugins): expose internal metadata via function instead 2025-10-22 22:19:42 +07:00
PalmDevs
67c3d9ec8d
chore(lib/plugins): update internal names with correct terminology 2025-10-14 00:37:24 +07:00
PalmDevs
fc679a4d15
fix(lib/plugins): do not incorrectly mark plugin status + do not race on rejected promises, if errored 2025-10-14 00:35:45 +07:00
PalmDevs
4f612edda4
fix(lib/plugins): do not emit flagUpdate if new flag is same 2025-09-17 17:14:21 +07:00
PalmDevs
e4cb41fa2b
feat(lib/plugins): save plugin states 2025-09-16 01:02:29 +07:00
PalmDevs
97534c9d04
feat(lib/modules/native): add fs 2025-09-16 01:02:18 +07:00
PalmDevs
c2d12321f6
chore(lib/modules): simplify imports 2025-08-13 01:27:49 +07:00
PalmDevs
3563daed39
fix(lib/plugins): only run dependencies that aren't already running 2025-08-13 00:56:23 +07:00
PalmDevs
2b69e17d68
feat(plugins/settings): show Reload required dialog immediately after flag update 2025-08-13 00:54:14 +07:00
PalmDevs
fca5dd1559
chore(lib/plugins): set arrays lengths to zero to reset states 2025-08-11 16:48:33 +07:00
PalmDevs
e7b4413675
chore: format 2025-08-05 20:39:09 +07:00
PalmDevs
b40e2f51ab
fix(lib/plugins): only run dependencies in runPluginLate 2025-07-26 01:58:17 +07:00
PalmDevs
8eea0d12ea
feat: plugin dependencies and dependent dialogs, refactor plugins library and settings plugin
- Refactored the plugins library
- Refactored the settings plugin
2025-07-25 21:19:59 +07:00
PalmDevs
5d7ac417ba
fix(lib/plugins): some plugins with dependents being duplicated in ordered plugin list 2025-07-25 20:10:33 +07:00
PalmDevs
6852c816d0
chore(lib/plugins): add plugin start order log 2025-07-21 22:04:51 +07:00
PalmDevs
51125ef39f
feat(lib/plugins): return PluginDependency in registerPlugin 2025-07-21 22:04:06 +07:00
PalmDevs
831636f14c
fix(lib/plugins): fix depedency graphing logic 2025-07-21 21:27:17 +07:00
PalmDevs
5bde44a14c
fix(lib/plugins): compile error because arrow async function 2025-07-21 15:35:06 +07:00
PalmDevs
825f29ce52
chore(lib/plugins): cleanup 2025-07-21 15:33:00 +07:00
PalmDevs
a3ebccf1d6
fix(lib/plugins): resolve dependency graph before pushing nodes to ordered list 2025-07-21 15:32:38 +07:00
PalmDevs
601d5a28f5
feat(lib/plugins): improve types and documentation 2025-07-21 14:45:03 +07:00
PalmDevs
f5ed49d4e2
fix: declare unscoped storage API using decorators instead 2025-07-21 14:06:51 +07:00
PalmDevs
7a365f93c7
fix(lib/plugins/apis): spread descriptors instead of values 2025-07-21 14:05:37 +07:00