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.
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
- 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
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>
- 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)