Keep artifact list and beta queries free of file bytes

This commit is contained in:
2026-10-06 14:01:12 -04:00
parent 27be1abf41
commit ddb3db9537
21 changed files with 197 additions and 101 deletions
+5 -2
View File
@@ -1,4 +1,4 @@
import { getVersion, getVersionMetadata, listScripts } from './scripts.js';
import { getVersion, getVersionContent, getVersionMetadata, listScripts } from './scripts.js';
function selectedArtifacts<Version>(game: string | null, map: string | null, readVersion: (id: number) => Version | undefined) {
return (['script', 'plugin'] as const).flatMap((kind) =>
@@ -14,7 +14,10 @@ function selectedArtifacts<Version>(game: string | null, map: string | null, rea
/** Published file artifacts shared by provisioning and drift reconciliation. */
export function promotedArtifacts(game: string | null, map: string | null) {
return selectedArtifacts(game, map, getVersion);
return selectedArtifacts(game, map, id => {
const version = getVersion(id);
return version ? { ...version, content: getVersionContent(id) } : undefined;
});
}
/** Metadata uses the same promotion and scope rules without reading file content. */