mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-29 14:45:24 +00:00
feat: show plugin features from the manifest on the plugin page
This commit is contained in:
1 parent
60024bdd4e
commit
b6bb3ffc73
13 files changed
+158
-2
No files matched your search
@@ -43,7 +43,11 @@ import { invalidatePluginPermissionCache } from "./permissions.js";
|
||||
import { moveWithRetry } from "./fs-retry.js";
|
||||
import { readInstallCounts } from "./install-counts.js";
|
||||
import { readArtifactManifest, sameCapabilities } from "./artifact-manifest.js";
|
||||
import { parseManifest, type PluginManifest } from "./manifest.js";
|
||||
import {
|
||||
parseManifest,
|
||||
pluginFeatures,
|
||||
type PluginManifest,
|
||||
} from "./manifest.js";
|
||||
import { requireSignedPlugins } from "./trust.js";
|
||||
import {
|
||||
parseChangelog,
|
||||
@@ -213,6 +217,7 @@ export interface RegistryListing {
|
||||
repository?: string;
|
||||
icon?: string;
|
||||
videoId?: string;
|
||||
features: string[];
|
||||
versions: Array<{
|
||||
version: string;
|
||||
compatible: boolean;
|
||||
@@ -272,6 +277,7 @@ export async function listRegistry(
|
||||
repository: plugin.repository,
|
||||
icon: plugin.icon,
|
||||
videoId: plugin.videoId,
|
||||
features: plugin.features,
|
||||
versions: plugin.versions.map((entry) => ({
|
||||
version: entry.version,
|
||||
compatible: isApiCompatible(entry.api),
|
||||
@@ -1156,6 +1162,7 @@ export interface UploadPreview {
|
||||
version: string;
|
||||
description: string;
|
||||
author: string;
|
||||
features: string[];
|
||||
capabilities: string[];
|
||||
/** The version of an earlier upload this one replaces. */
|
||||
replaces: string | null;
|
||||
@@ -1258,6 +1265,7 @@ export async function stageUpload(buffer: Buffer): Promise<UploadPreview> {
|
||||
version: manifest.version,
|
||||
description: manifest.description ?? "",
|
||||
author: manifest.author?.name ?? "",
|
||||
features: pluginFeatures(manifest.features),
|
||||
capabilities: [...manifest.capabilities],
|
||||
replaces,
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user