2026-04-30 21:18:31 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* Phase: images — 图片生成
|
|
|
|
|
|
*
|
2026-05-05 23:49:30 +08:00
|
|
|
|
* 支持 Gemini / GPT Image / MJ / Kling 四种模型,含首尾帧模式
|
2026-05-01 00:44:18 +08:00
|
|
|
|
* 并发生成,支持 task ID 恢复(MJ)
|
2026-04-30 21:18:31 +08:00
|
|
|
|
*/
|
|
|
|
|
|
|
2026-05-01 00:44:18 +08:00
|
|
|
|
const fs = require('fs')
|
2026-04-30 21:18:31 +08:00
|
|
|
|
const path = require('path')
|
|
|
|
|
|
const { saveManifest, getReferences, ensureDir, renameGeneratedFile, log, getManifestDir } = require('./pipeline-utils')
|
|
|
|
|
|
|
|
|
|
|
|
async function phaseImages(manifest, manifestPath, options) {
|
|
|
|
|
|
const dir = getManifestDir(manifestPath)
|
|
|
|
|
|
const imagesDir = path.join(dir, 'images')
|
|
|
|
|
|
ensureDir(imagesDir)
|
|
|
|
|
|
|
|
|
|
|
|
const items = manifest.items.filter(it =>
|
2026-05-02 00:14:40 +08:00
|
|
|
|
((!it.status || it.status === 'pending' || it.status === 'generating') && it.imagePrompt) ||
|
|
|
|
|
|
(it.status === 'done' && manifest.mode === 'framePair' && it.file && it.lastFramePrompt && !it.lastFrame)
|
2026-04-30 21:18:31 +08:00
|
|
|
|
)
|
|
|
|
|
|
if (items.length === 0) { log('images', '无待处理 item,跳过'); return }
|
|
|
|
|
|
|
|
|
|
|
|
const accountConfig = options.accountConfig || {}
|
|
|
|
|
|
let model = options.imageModel || manifest.imageModel || accountConfig.imageModel || 'gemini'
|
|
|
|
|
|
const ratio = manifest.format || accountConfig.defaultFormat || '9:16'
|
|
|
|
|
|
|
2026-05-01 00:44:18 +08:00
|
|
|
|
// 首尾帧模式:MJ 降级为 Gemini
|
2026-04-30 21:18:31 +08:00
|
|
|
|
if (model === 'mj' && manifest.mode === 'framePair') {
|
|
|
|
|
|
log('images', '首尾帧模式不支持 MJ,自动降级为 Gemini')
|
|
|
|
|
|
model = 'gemini'
|
|
|
|
|
|
}
|
2026-05-03 02:03:17 +08:00
|
|
|
|
const refs = await getReferences(manifest, accountConfig)
|
2026-04-30 21:18:31 +08:00
|
|
|
|
|
2026-05-02 22:54:05 +08:00
|
|
|
|
log('images', `共 ${items.length} 张, 模型: ${model}, 画幅: ${ratio}, 参考图: ${refs.localPaths.length}本地/${refs.urls.length}URL, 并发: 全并行`)
|
|
|
|
|
|
|
|
|
|
|
|
if (model === 'mj') {
|
|
|
|
|
|
// MJ 两阶段策略:先全部提交拿 taskId,再滑动窗口收割
|
|
|
|
|
|
await phaseImagesMJ(items, manifest, manifestPath, dir, imagesDir, model, ratio, refs)
|
|
|
|
|
|
} else {
|
|
|
|
|
|
// Gemini/Kling:滑动窗口并发
|
|
|
|
|
|
await phaseImagesSlidingWindow(items, manifest, manifestPath, dir, imagesDir, model, ratio, refs)
|
2026-05-01 00:44:18 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-04-30 21:18:31 +08:00
|
|
|
|
|
2026-05-01 00:44:18 +08:00
|
|
|
|
// ============================================================================
|
|
|
|
|
|
// 各模型生成逻辑
|
|
|
|
|
|
// ============================================================================
|
2026-04-30 21:18:31 +08:00
|
|
|
|
|
2026-05-01 00:44:18 +08:00
|
|
|
|
async function generateGemini(item, idx, dir, imagesDir, ratio, refs) {
|
|
|
|
|
|
const { generate: geminiGen, edit: geminiEdit } = require('../gemini-image-generator')
|
|
|
|
|
|
let result
|
|
|
|
|
|
if (refs.localPaths.length > 0) {
|
|
|
|
|
|
log('images', `[${idx}] Gemini 图生图: ${item.imagePrompt.substring(0, 60)}...`)
|
|
|
|
|
|
result = await geminiEdit(item.imagePrompt, refs.localPaths, {
|
|
|
|
|
|
outputDir: imagesDir,
|
|
|
|
|
|
aspectRatio: ratio,
|
|
|
|
|
|
})
|
|
|
|
|
|
} else {
|
|
|
|
|
|
log('images', `[${idx}] Gemini 文生图: ${item.imagePrompt.substring(0, 60)}...`)
|
|
|
|
|
|
result = await geminiGen(item.imagePrompt, {
|
|
|
|
|
|
outputDir: imagesDir,
|
|
|
|
|
|
aspectRatio: ratio,
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
const file = (result.savedFiles && result.savedFiles.length > 0)
|
|
|
|
|
|
? renameGeneratedFile(
|
|
|
|
|
|
path.relative(dir, result.savedFiles[0]).replace(/\\/g, '/'),
|
2026-05-01 01:52:02 +08:00
|
|
|
|
dir, idx, item.script || item.shotDesc, ''
|
2026-05-01 00:44:18 +08:00
|
|
|
|
)
|
|
|
|
|
|
: null
|
|
|
|
|
|
return { file }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-02 22:54:05 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* MJ 提交阶段:仅提交任务,返回 taskId(不轮询)
|
|
|
|
|
|
* 用于与滑动窗口配合,先批量提交再并行轮询
|
|
|
|
|
|
*/
|
|
|
|
|
|
async function submitMJ(item, idx, dir, imagesDir, ratio, refs, manifestPath, manifest) {
|
|
|
|
|
|
const { MJApi } = require('../mj-image-generator')
|
2026-05-01 00:44:18 +08:00
|
|
|
|
const referenceImages = refs.urls.length > 0 ? refs.urls : []
|
2026-05-04 02:47:15 +08:00
|
|
|
|
const styleWeight = 100
|
2026-05-01 00:44:18 +08:00
|
|
|
|
|
2026-05-02 22:54:05 +08:00
|
|
|
|
// 已有 taskId 的跳过提交(恢复场景)
|
2026-05-01 00:44:18 +08:00
|
|
|
|
if (item.taskId && item.status === 'generating') {
|
2026-05-02 22:54:05 +08:00
|
|
|
|
log('images', `[${idx}] MJ 跳过提交,已有 taskId: ${item.taskId}`)
|
|
|
|
|
|
return item.taskId
|
2026-05-01 00:44:18 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-02 22:54:05 +08:00
|
|
|
|
log('images', `[${idx}] MJ 提交: ${item.imagePrompt.substring(0, 60)}...`)
|
|
|
|
|
|
const taskId = await MJApi.submit(item.imagePrompt, { referenceImages, aspectRatio: ratio, styleWeight })
|
|
|
|
|
|
item.taskId = taskId
|
|
|
|
|
|
saveManifest(manifestPath, manifest)
|
|
|
|
|
|
return taskId
|
|
|
|
|
|
}
|
2026-05-01 00:44:18 +08:00
|
|
|
|
|
2026-05-02 22:54:05 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* MJ 收割阶段:轮询 + 下载 + 拆分 + 重命名
|
|
|
|
|
|
*/
|
|
|
|
|
|
async function harvestMJ(item, idx, dir, imagesDir, ratio, refs, manifestPath, manifest) {
|
|
|
|
|
|
const { MJApi, ImageUtils } = require('../mj-image-generator')
|
|
|
|
|
|
|
|
|
|
|
|
const pollResult = await MJApi.poll(item.taskId)
|
|
|
|
|
|
const timestamp = new Date().toISOString().replace(/[:.]/g, '-')
|
|
|
|
|
|
const gridFile = path.join(imagesDir, `${timestamp}_grid.png`)
|
|
|
|
|
|
await ImageUtils.download(pollResult.imageUrl, gridFile)
|
|
|
|
|
|
const splitFiles = await ImageUtils.split4(gridFile, imagesDir, timestamp)
|
|
|
|
|
|
fs.unlinkSync(gridFile)
|
|
|
|
|
|
const result = { files: splitFiles }
|
2026-05-01 00:44:18 +08:00
|
|
|
|
|
|
|
|
|
|
const file = (result.files && result.files.length > 0) ? result.files[0] : null
|
|
|
|
|
|
const candidates = (result.files && result.files.length > 0)
|
|
|
|
|
|
? result.files.map((f, ci) =>
|
|
|
|
|
|
renameGeneratedFile(
|
|
|
|
|
|
path.relative(dir, f).replace(/\\/g, '/'),
|
2026-05-01 02:48:37 +08:00
|
|
|
|
dir, idx, item.script || item.shotDesc, `cand${ci + 1}`
|
2026-05-01 00:44:18 +08:00
|
|
|
|
)
|
|
|
|
|
|
)
|
|
|
|
|
|
: null
|
|
|
|
|
|
|
|
|
|
|
|
delete item.taskId
|
|
|
|
|
|
if (candidates && candidates.length > 0) {
|
|
|
|
|
|
log('images', `[${idx}] ${candidates.length} 张候选,默认选第1张`)
|
|
|
|
|
|
return { file: candidates[0], candidates }
|
|
|
|
|
|
}
|
|
|
|
|
|
return { file }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-02 22:54:05 +08:00
|
|
|
|
async function generateMJ(item, idx, dir, imagesDir, ratio, refs, manifestPath, manifest) {
|
|
|
|
|
|
await submitMJ(item, idx, dir, imagesDir, ratio, refs, manifestPath, manifest)
|
|
|
|
|
|
return harvestMJ(item, idx, dir, imagesDir, ratio, refs, manifestPath, manifest)
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-05 23:49:30 +08:00
|
|
|
|
async function generateGptImage(item, idx, dir, imagesDir, ratio, refs) {
|
|
|
|
|
|
const { generate: gptGen, edit: gptEdit, ratioToSize } = require('../gpt-image-generator')
|
|
|
|
|
|
const size = ratioToSize(ratio)
|
|
|
|
|
|
let result
|
|
|
|
|
|
if (refs.localPaths.length > 0) {
|
|
|
|
|
|
log('images', `[${idx}] GPT Image 图生图: ${item.imagePrompt.substring(0, 60)}...`)
|
|
|
|
|
|
result = await gptEdit(item.imagePrompt, refs.localPaths, {
|
|
|
|
|
|
outputDir: imagesDir,
|
|
|
|
|
|
size,
|
|
|
|
|
|
})
|
|
|
|
|
|
} else {
|
|
|
|
|
|
log('images', `[${idx}] GPT Image 文生图: ${item.imagePrompt.substring(0, 60)}...`)
|
|
|
|
|
|
result = await gptGen(item.imagePrompt, {
|
|
|
|
|
|
outputDir: imagesDir, size,
|
|
|
|
|
|
quality: 'auto',
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
const file = (result.savedFiles && result.savedFiles.length > 0)
|
|
|
|
|
|
? renameGeneratedFile(
|
|
|
|
|
|
path.relative(dir, result.savedFiles[0]).replace(/\\/g, '/'),
|
|
|
|
|
|
dir, idx, item.script || item.shotDesc, ''
|
|
|
|
|
|
)
|
|
|
|
|
|
: null
|
|
|
|
|
|
return { file }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-01 00:44:18 +08:00
|
|
|
|
async function generateKling(item, idx, dir, imagesDir, ratio, refs) {
|
|
|
|
|
|
const { generate: klingGen } = require('../kling-image-generator')
|
|
|
|
|
|
const klingOpts = { outputDir: imagesDir, aspectRatio: ratio }
|
|
|
|
|
|
if (refs.urls.length > 0) klingOpts.styleImageUrl = refs.urls[0]
|
|
|
|
|
|
log('images', `[${idx}] 可灵生图: ${item.imagePrompt.substring(0, 60)}...`)
|
|
|
|
|
|
const result = await klingGen(item.imagePrompt, klingOpts)
|
|
|
|
|
|
const file = (result.savedFiles && result.savedFiles.length > 0)
|
|
|
|
|
|
? renameGeneratedFile(
|
|
|
|
|
|
path.relative(dir, result.savedFiles[0]).replace(/\\/g, '/'),
|
2026-05-01 01:52:02 +08:00
|
|
|
|
dir, idx, item.script || item.shotDesc, ''
|
2026-05-01 00:44:18 +08:00
|
|
|
|
)
|
|
|
|
|
|
: null
|
|
|
|
|
|
return { file }
|
2026-04-30 21:18:31 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-01 00:44:18 +08:00
|
|
|
|
async function generateLastFrame(item, idx, manifest, dir, imagesDir, model, ratio, manifestPath) {
|
2026-04-30 21:18:31 +08:00
|
|
|
|
try {
|
|
|
|
|
|
item.status = 'generating'
|
|
|
|
|
|
saveManifest(manifestPath, manifest)
|
|
|
|
|
|
|
|
|
|
|
|
const firstFramePath = path.resolve(dir, item.file)
|
|
|
|
|
|
let lastResult
|
|
|
|
|
|
if (model === 'gemini') {
|
|
|
|
|
|
const { edit: geminiEdit } = require('../gemini-image-generator')
|
|
|
|
|
|
lastResult = await geminiEdit(item.lastFramePrompt, [firstFramePath], {
|
|
|
|
|
|
outputDir: imagesDir,
|
|
|
|
|
|
aspectRatio: ratio,
|
|
|
|
|
|
})
|
2026-05-05 23:49:30 +08:00
|
|
|
|
} else if (model === 'gpt-image') {
|
|
|
|
|
|
const { edit: gptEdit, ratioToSize } = require('../gpt-image-generator')
|
|
|
|
|
|
lastResult = await gptEdit(item.lastFramePrompt, [firstFramePath], {
|
|
|
|
|
|
outputDir: imagesDir,
|
|
|
|
|
|
size: ratioToSize(ratio),
|
|
|
|
|
|
})
|
2026-04-30 21:18:31 +08:00
|
|
|
|
} else if (model === 'kling') {
|
|
|
|
|
|
const { generate: klingGen } = require('../kling-image-generator')
|
|
|
|
|
|
lastResult = await klingGen(item.lastFramePrompt, {
|
|
|
|
|
|
outputDir: imagesDir,
|
|
|
|
|
|
styleImageUrl: item.url || '',
|
|
|
|
|
|
aspectRatio: ratio,
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (lastResult) {
|
|
|
|
|
|
const files = lastResult.savedFiles || lastResult.files || []
|
|
|
|
|
|
if (files.length > 0) {
|
|
|
|
|
|
item.lastFrame = renameGeneratedFile(
|
|
|
|
|
|
path.relative(dir, files[0]).replace(/\\/g, '/'),
|
2026-05-01 02:48:37 +08:00
|
|
|
|
dir, idx, item.script || item.shotDesc, 'last'
|
2026-04-30 21:18:31 +08:00
|
|
|
|
)
|
|
|
|
|
|
item.status = 'done'
|
2026-05-01 00:44:18 +08:00
|
|
|
|
log('images', `[${idx}] lastFrame 完成: ${item.lastFrame}`)
|
2026-04-30 21:18:31 +08:00
|
|
|
|
} else {
|
|
|
|
|
|
item.status = 'failed'
|
|
|
|
|
|
item.error = 'lastFrame 生成器未返回文件'
|
2026-05-01 00:44:18 +08:00
|
|
|
|
log('images', `[${idx}] lastFrame 失败: 未返回文件`)
|
2026-04-30 21:18:31 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
} catch (err) {
|
|
|
|
|
|
item.status = 'failed'
|
|
|
|
|
|
item.error = `lastFrame 失败: ${err.message}`
|
2026-05-01 00:44:18 +08:00
|
|
|
|
log('images', `[${idx}] lastFrame 失败: ${err.message}`)
|
2026-04-30 21:18:31 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-02 22:54:05 +08:00
|
|
|
|
// ============================================================================
|
|
|
|
|
|
// 调度策略
|
|
|
|
|
|
// ============================================================================
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* Gemini/Kling:全部并行
|
|
|
|
|
|
*/
|
|
|
|
|
|
async function phaseImagesSlidingWindow(items, manifest, manifestPath, dir, imagesDir, model, ratio, refs) {
|
|
|
|
|
|
await Promise.allSettled(items.map(item =>
|
|
|
|
|
|
processItem(item, manifest, manifestPath, dir, imagesDir, model, ratio, refs)
|
|
|
|
|
|
))
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* MJ 两阶段策略:
|
|
|
|
|
|
* 1. 先串行提交所有任务拿 taskId(MJ API 限制同时只能提交一个,但提交很快)
|
|
|
|
|
|
* 2. 滑动窗口收割:轮询+下载+拆分,完成一个立即补一个
|
|
|
|
|
|
*/
|
|
|
|
|
|
async function phaseImagesMJ(items, manifest, manifestPath, dir, imagesDir, model, ratio, refs) {
|
|
|
|
|
|
// 阶段1:全部提交
|
|
|
|
|
|
log('images', `=== MJ 阶段1: 提交 ${items.length} 个任务 ===`)
|
|
|
|
|
|
for (const item of items) {
|
|
|
|
|
|
const idx = item.id
|
|
|
|
|
|
try {
|
|
|
|
|
|
item.status = 'generating'
|
|
|
|
|
|
saveManifest(manifestPath, manifest)
|
|
|
|
|
|
await submitMJ(item, idx, dir, imagesDir, ratio, refs, manifestPath, manifest)
|
|
|
|
|
|
} catch (err) {
|
|
|
|
|
|
item.status = 'failed'
|
|
|
|
|
|
item.error = err.message
|
|
|
|
|
|
log('images', `[${idx}] MJ 提交失败: ${err.message}`)
|
|
|
|
|
|
saveManifest(manifestPath, manifest)
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
// 阶段2:全部并行收割(MJ 轮询是轻量 HTTP,不受本地并发限制)
|
|
|
|
|
|
const harvestItems = items.filter(it => it.taskId && it.status === 'generating')
|
|
|
|
|
|
log('images', `=== MJ 阶段2: 并行收割 ${harvestItems.length} 个任务 ===`)
|
|
|
|
|
|
|
|
|
|
|
|
await Promise.allSettled(harvestItems.map(async (item) => {
|
|
|
|
|
|
const idx = item.id
|
|
|
|
|
|
try {
|
|
|
|
|
|
const result = await harvestMJ(item, idx, dir, imagesDir, ratio, refs, manifestPath, manifest)
|
|
|
|
|
|
if (result.file) {
|
|
|
|
|
|
item.file = result.file
|
|
|
|
|
|
if (result.candidates) item.candidates = result.candidates
|
|
|
|
|
|
item.status = 'done'
|
|
|
|
|
|
log('images', `[${idx}] 完成: ${item.file}`)
|
|
|
|
|
|
} else {
|
|
|
|
|
|
item.status = 'failed'
|
|
|
|
|
|
item.error = '生成器未返回文件'
|
|
|
|
|
|
}
|
|
|
|
|
|
saveManifest(manifestPath, manifest)
|
|
|
|
|
|
|
|
|
|
|
|
if (item.status === 'done' && manifest.mode === 'framePair' && item.lastFramePrompt && !item.lastFrame) {
|
|
|
|
|
|
await generateLastFrame(item, idx, manifest, dir, imagesDir, model, ratio, manifestPath)
|
|
|
|
|
|
}
|
|
|
|
|
|
} catch (err) {
|
|
|
|
|
|
item.status = 'failed'
|
|
|
|
|
|
item.error = err.message
|
|
|
|
|
|
log('images', `[${idx}] 收割失败: ${err.message}`)
|
|
|
|
|
|
saveManifest(manifestPath, manifest)
|
|
|
|
|
|
}
|
|
|
|
|
|
}))
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 通用 item 处理(Gemini/Kling 用)
|
|
|
|
|
|
*/
|
|
|
|
|
|
async function processItem(item, manifest, manifestPath, dir, imagesDir, model, ratio, refs) {
|
|
|
|
|
|
const idx = item.id
|
|
|
|
|
|
try {
|
|
|
|
|
|
item.status = 'generating'
|
|
|
|
|
|
saveManifest(manifestPath, manifest)
|
|
|
|
|
|
|
|
|
|
|
|
if (item.file && manifest.mode === 'framePair' && item.lastFramePrompt && !item.lastFrame) {
|
|
|
|
|
|
log('images', `[${idx}] 补生成 lastFrame(首帧已有: ${item.file})`)
|
|
|
|
|
|
await generateLastFrame(item, idx, manifest, dir, imagesDir, model, ratio, manifestPath)
|
|
|
|
|
|
saveManifest(manifestPath, manifest)
|
|
|
|
|
|
return { ok: true }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
let result
|
|
|
|
|
|
if (model === 'gemini') {
|
|
|
|
|
|
result = await generateGemini(item, idx, dir, imagesDir, ratio, refs)
|
2026-05-05 23:49:30 +08:00
|
|
|
|
} else if (model === 'gpt-image') {
|
|
|
|
|
|
result = await generateGptImage(item, idx, dir, imagesDir, ratio, refs)
|
2026-05-02 22:54:05 +08:00
|
|
|
|
} else if (model === 'kling') {
|
|
|
|
|
|
result = await generateKling(item, idx, dir, imagesDir, ratio, refs)
|
|
|
|
|
|
} else {
|
2026-05-05 23:49:30 +08:00
|
|
|
|
throw new Error(`不支持的模型: ${model}(支持: gemini, gpt-image, mj, kling)`)
|
2026-05-02 22:54:05 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (result.file) {
|
|
|
|
|
|
item.file = result.file
|
|
|
|
|
|
if (result.candidates) item.candidates = result.candidates
|
|
|
|
|
|
item.status = 'done'
|
|
|
|
|
|
log('images', `[${idx}] 完成: ${item.file}`)
|
|
|
|
|
|
} else {
|
|
|
|
|
|
item.status = 'failed'
|
|
|
|
|
|
item.error = '生成器未返回文件'
|
|
|
|
|
|
log('images', `[${idx}] 失败: 生成器未返回文件`)
|
|
|
|
|
|
}
|
|
|
|
|
|
saveManifest(manifestPath, manifest)
|
|
|
|
|
|
|
|
|
|
|
|
if (item.status === 'done' && manifest.mode === 'framePair' && item.lastFramePrompt && !item.lastFrame) {
|
|
|
|
|
|
await generateLastFrame(item, idx, manifest, dir, imagesDir, model, ratio, manifestPath)
|
|
|
|
|
|
}
|
|
|
|
|
|
return { ok: true }
|
|
|
|
|
|
} catch (err) {
|
|
|
|
|
|
item.status = 'failed'
|
|
|
|
|
|
item.error = err.message
|
|
|
|
|
|
log('images', `[${idx}] 失败: ${err.message}`)
|
|
|
|
|
|
saveManifest(manifestPath, manifest)
|
|
|
|
|
|
return { ok: false, error: err.message }
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-30 21:18:31 +08:00
|
|
|
|
module.exports = { phaseImages }
|