fix: complete marketplace client remediation

This commit is contained in:
2026-08-28 23:14:41 +08:00
parent 2c3baf6dff
commit 11d0af0166
18 changed files with 1007 additions and 90 deletions

View File

@@ -89,6 +89,7 @@ export type MarketplaceInstallation = {
pluginId: string;
releaseId?: string;
version?: string;
channel?: 'stable' | 'beta';
reason?: string;
};
@@ -198,6 +199,7 @@ function installation(value: unknown): MarketplaceInstallation {
pluginId: pluginId(text(item.pluginId, 'installation.pluginId', 128)),
...(item.releaseId === undefined ? {} : { releaseId: text(item.releaseId, 'installation.releaseId', 128) }),
...(item.version === undefined ? {} : { version: text(item.version, 'installation.version', 64) }),
...(item.channel === undefined ? {} : { channel: oneOf(item.channel, ['stable', 'beta'] as const, 'installation.channel') }),
...(item.reason === undefined ? {} : { reason: text(item.reason, 'installation.reason', 256) }),
};
}