移除游戏分发 E2E helper 中无引用的导出
- 删除 coverImagePart:各 E2E 脚本都有自己的本地实现,仓库内无人导入 - COVER_PNG 只作 imagePart 的默认值,收回 export
This commit is contained in:
@@ -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` 生成
|
||||
* `<prefix>-<id>.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。
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user