Commit graph

486 commits

Author SHA1 Message Date
PalmDevs
0fdc1f1cff
fix: plugin API types + JS options validation 2026-07-28 12:07:28 +07:00
PalmDevs
a629b2ad44
fix(lib/discord/types): export API types to expose plugin API decoration 2026-07-26 16:13:13 +07:00
PalmDevs
b250450367
feat(lib/plugins): reexpose EnabledLate flags property as startedLate 2026-07-26 16:01:09 +07:00
PalmDevs
f6d119a210
fix(lib/externals/shopify): update filters for 340206+ 2026-07-26 13:47:31 +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
a06bf73d06
fix(lib/modules/native/fs): rmSync not actually deleting anything 2026-07-25 23:59:06 +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
f97c273bef
feat(lib/discord/modules/settings): allow adding setting items to sections with index and by lambda 2026-07-19 15:36:22 +07:00
PalmDevs
eb3f03fb60
feat(lib/discord): add types for FloatingActionButton 2026-07-17 21:10:29 +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
27c445e196
fix(lib/modules/native): await callable method properly 2026-07-07 21:50:36 +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
00047da9b3
feat(lib/modules): support native to JS bridge 2026-07-06 23:48:27 +07:00
PalmDevs
ddb02d2887
fix(lib/externals/shopify): update filters for 337206+ 2026-07-05 21:07:00 +07:00
PalmDevs
70dd0501fe
fix(lib/utils/object): incorrect lazy values debug logic for lazyPropDesc 2026-06-13 01:30:14 +07:00
PalmDevs
f1b96648e2
fix(lib/discord/actions): update filters for 334204+ 2026-06-13 01:00:19 +07:00
PalmDevs
df01515823
feat(lib/modules/metro): module segments support 2026-05-13 01:22:42 +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
5043b026ad
fix(lib/discord): update filters for 330201+ 2026-05-13 01:22:33 +07:00
PalmDevs
a17706327f
fix(lib/discord): update filters for 328200+ 2026-04-28 10:15:54 +07:00
PalmDevs
76a6072582
fix(lib/modules/metro): run initialized subscriptions after modifying flags 2026-04-07 22:35:27 +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
49fe4232c7
fix(lib/discord): update filters for 325201+ 2026-04-07 15:57:48 +07:00
PalmDevs
bd98745589
fix(lib/discord): clean up filters 2026-04-07 15:23:24 +07:00
PalmDevs
bf967de902
fix(lib/modules/finders/get): only lookup initialized modules 2026-04-01 14:00:18 +07:00
PalmDevs
2c0203d42e
fix(lib/modules/finders/lookup): in cached results, respect filter scopes and yield uninitialized if specified instead of skipping 2026-04-01 14:00:08 +07:00
PalmDevs
06a574c77e
feat(lib/externals): add react-native-safe-area-context 2026-04-01 13:32:19 +07:00
PalmDevs
6550e03465
fix(lib/discord/design): update FormSwitch filter for 321203+ 2026-03-14 19:52:25 +07:00
PalmDevs
5d379b1652
fix(lib/discord/modules/settings): correct filter for SettingListRenderer on 319203+ 2026-02-26 17:11:20 +07:00
PalmDevs
fc79e9353b
fix: syntax error during compilation 2026-02-25 22:16:44 +07:00
PalmDevs
8f87048695
fix(lib/discord/common): correct Constants filter 2026-02-25 22:09:31 +07:00
PalmDevs
3da647154f
fix(lib/modules): warn bad withDependencies filters during construction time 2026-02-25 22:05:38 +07:00
PalmDevs
df60eb5272
fix: update generated API types 2026-01-25 11:04:52 +07:00
PalmDevs
8839d43a47
fix(lib/modules/finders/filters): skip already warned bad withDependencies filters 2026-01-24 18:14:56 +07:00
PalmDevs
4f120ea159
chore(lib/modules/metro): alert module init errors in dev builds 2026-01-24 18:14:18 +07:00
PalmDevs
3c657c36b2
fix(lib/assets): cache assets immediately when uncached 2026-01-24 18:13:45 +07:00
PalmDevs
c1a7ddbd44
fix(lib/discord): correct AppStartPerformance filter 2026-01-24 18:01:48 +07:00
PalmDevs
9cdf5710d8
fix(lib/modules/finders/filters): correct relative and relative.withDependencies param names 2026-01-17 20:55:12 +07:00
PalmDevs
d8897d8c4d
feat(lib/discord/common): expose and switch filters to use ImportTrackerModuleId 2026-01-17 20:54:14 +07:00
PalmDevs
a87d4ced5c
fix(lib/modules)!: decouple discord-specific helpers to lib/discord 2026-01-17 20:41:14 +07:00
PalmDevs
47084f4f52
chore: update dependencies 2025-12-13 22:43:21 +07:00
PalmDevs
b5b3033171
fix(lib/discord/design): update FormSwitch filter for 307201+ 2025-11-21 14:13:26 +07:00