Keep artifact list and beta queries free of file bytes
This commit is contained in:
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user