chore: 项目基线提交 - 拼豆图纸生成器 V1.0 核心代码
- 前端: React+Vite 首页/AI专区, 算法库(MARD色板/量化/背景去除), API对接 - 后端: Express+SQLite, 兑换码/订单/支付/chibi生成, 风控+云端同步 - CI/CD: GitHub Actions + Docker + nginx 配置 - 文档: PRD/DESIGN/LAUNCH/ROADMAP/E2E/竞品对照等 15 份 - 工程: 任务看板(taskboard) + 健康巡检(agent-health) + Git流程(gitflow)
This commit is contained in:
commit
02762400fb
174 files changed
+28059
No files matched your search
@@ -0,0 +1,21 @@
|
||||
const fs = require('fs');
|
||||
const p = 'D:/拼豆/taskboard/tasks.json';
|
||||
const db = JSON.parse(fs.readFileSync(p, 'utf8'));
|
||||
const TZ = 8 * 60 * 60 * 1000;
|
||||
function migrate(v) {
|
||||
if (typeof v === 'string' && /^\d{4}-\d{2}-\d{2}T[\d:.]+Z$/.test(v)) {
|
||||
const d = new Date(Date.parse(v) + TZ);
|
||||
return d.toISOString().replace('Z', '+08:00');
|
||||
}
|
||||
return v;
|
||||
}
|
||||
function walk(obj) {
|
||||
if (Array.isArray(obj)) { obj.forEach(walk); return; }
|
||||
if (obj && typeof obj === 'object') {
|
||||
for (const k of Object.keys(obj)) obj[k] = migrate(obj[k]);
|
||||
for (const k of Object.keys(obj)) if (obj[k] && typeof obj[k] === 'object') walk(obj[k]);
|
||||
}
|
||||
}
|
||||
walk(db);
|
||||
fs.writeFileSync(p, JSON.stringify(db, null, 2), 'utf8');
|
||||
console.log('migrated to +08:00, tasks:', db.tasks.length, 'agents:', Object.keys(db.agents || {}).length);
|
||||
Reference in new issue
Block a user