diff --git a/scripts/game-distribution-e2e-helpers.mjs b/scripts/game-distribution-e2e-helpers.mjs index 8dc3a89f5..baef41c49 100644 --- a/scripts/game-distribution-e2e-helpers.mjs +++ b/scripts/game-distribution-e2e-helpers.mjs @@ -5,7 +5,7 @@ // 这里收敛这段稳定契约,脚本只保留自己的路径、鉴权头与返回形状差异。 /** 1x1 透明 PNG:仅用于满足发布必填的封面/截图 part,内容不参与断言。 */ -export const COVER_PNG = Buffer.from( +const COVER_PNG = Buffer.from( 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==', 'base64', ); @@ -25,19 +25,6 @@ export function imagePart(kind, id, options = {}) { return { bytes, fileName, contentType }; } -/** - * 封面 part 便捷封装:等价于 `imagePart('cover', id, options)`。 - * - * 脚本可用 `options.fileName` 给出完整文件名,或用 `options.namePrefix` 生成 - * `-.png`。 - */ -export function coverImagePart(id, options = {}) { - const { namePrefix, fileName, ...rest } = options; - const resolvedFileName = - fileName ?? (namePrefix ? `${namePrefix}-${id}.png` : `cover-${id}.png`); - return imagePart('cover', id, { ...rest, fileName: resolvedFileName }); -} - /** * 组装发布请求体:`metadata` 文本 part + 可选 `cover` / 按顺序重复的 `screenshot` 二进制 part。 *