mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-21 11:36:05 +00:00
fix(plugins): let an admin run a plugin outside its TREK range, and tidy the plugins panel
TREK 5.0 left most registry plugins blocked because their authors still declare "<5.0.0", and the only way past that was TREK_PLUGINS_IGNORE_TREK_RANGE for every plugin at once. An admin can now install or switch on one such plugin after a warning; the consent is kept on its row for that plugin version and TREK major, so an update or a new major asks again. The environment switch works as before. Discover marks a plugin not confirmed for this TREK on its card, and Install opens the warning first. Admin > Plugins reads cleaner: one row of alike facts per plugin with each state that needs attention on its own line, type, status and order behind one Filter button, and the containment notes in a dialog behind the shield in the header. The row, the filter menu and the dialog moved into their own files.
This commit is contained in:
@@ -98,6 +98,8 @@ export const pluginInstallRequestSchema = z.looseObject({
|
||||
version: z.string().optional(),
|
||||
constraint: z.string().optional(),
|
||||
withDependencies: z.boolean().optional(),
|
||||
/** The admin's "install anyway" for this plugin when no version declares this TREK. */
|
||||
acceptTrekRange: z.boolean().optional(),
|
||||
});
|
||||
export type PluginInstallRequest = z.infer<typeof pluginInstallRequestSchema>;
|
||||
|
||||
@@ -106,7 +108,11 @@ export const pluginLinkRequestSchema = z.looseObject({ path: z.string().optional
|
||||
export type PluginLinkRequest = z.infer<typeof pluginLinkRequestSchema>;
|
||||
|
||||
/** POST /api/admin/plugins/:id/activate */
|
||||
export const pluginActivateRequestSchema = z.looseObject({ consent: z.boolean().optional() });
|
||||
export const pluginActivateRequestSchema = z.looseObject({
|
||||
consent: z.boolean().optional(),
|
||||
/** The admin's "run it anyway" for this plugin outside the TREK versions it declares. */
|
||||
acceptTrekRange: z.boolean().optional(),
|
||||
});
|
||||
export type PluginActivateRequest = z.infer<typeof pluginActivateRequestSchema>;
|
||||
|
||||
/** POST /api/admin/plugins/:id/uninstall */
|
||||
|
||||
Reference in New Issue
Block a user