mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-21 19:40:34 +00:00
feat(plugins): install an older version of a plugin (#2035)
Adds a version picker to the plugin admin panel, on desktop and mobile: every published version with its own server-computed compatibility verdict, so the client never re-derives semver range logic. A deliberate non-latest pick sets an update hold on the row, which keeps the update banner and "Update all" from immediately nagging the rollback away. The hold releases when an install lands back on the newest compatible version by any path, or when the admin resumes updates explicitly. An unresolvable registry never sets one: refusing to pin on missing information beats silently muting future updates.
This commit is contained in:
@@ -41,6 +41,14 @@ export class PluginRetrustDto extends createZodDto(
|
||||
z.looseObject({ version: z.string().optional(), publicKey: z.string().optional() }),
|
||||
) {}
|
||||
|
||||
/**
|
||||
* `version` pins the exact version to install — the rollback path. Omitted, the
|
||||
* runtime resolves the newest TREK-compatible version itself (the classic update).
|
||||
*/
|
||||
export class PluginUpdateDto extends createZodDto(
|
||||
z.looseObject({ version: z.string().optional() }),
|
||||
) {}
|
||||
|
||||
/**
|
||||
* `hosts` is deliberately unknown, not `string[]`.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user