Fix blocking collection matching with large plugins

This commit is contained in:
2026-10-05 10:15:48 -04:00
parent 10663333db
commit dbd2940d29
14 changed files with 319 additions and 39 deletions
+9
View File
@@ -149,6 +149,15 @@ export function getVersion(id: number): ScriptVersionRow | undefined {
| undefined;
}
export type ScriptVersionMetadata = Pick<ScriptVersionRow, 'id' | 'version' | 'sha256' | 'size'>;
/** Planning a launch never needs to load potentially large script or plugin bytes. */
export function getVersionMetadata(id: number): ScriptVersionMetadata | undefined {
return db().prepare('SELECT id, version, sha256, size FROM script_versions WHERE id = ?').get(id) as
| ScriptVersionMetadata
| undefined;
}
// Latest version is 'max(version)' — used everywhere we want the freshest
// upload, whether or not it has been promoted (current_version_id).
export function getLatestVersion(scriptId: number): ScriptVersionRow | undefined {