项目初始化

This commit is contained in:
ray
2026-04-13 18:09:52 +08:00
commit aa67b0e37e
22 changed files with 2959 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
import { login, scheduleSync, syncAll, syncBillsOnly } from './sync.js';
const command = process.argv[2] || 'sync';
if (command === 'login') {
await login();
process.exit(0);
}
if (command === 'sync') {
const summary = await syncAll();
console.log(JSON.stringify(summary, null, 2));
process.exit(0);
}
if (command === 'bills') {
const summary = await syncBillsOnly();
console.log(JSON.stringify(summary, null, 2));
process.exit(0);
}
if (command === 'schedule') {
await scheduleSync();
} else {
console.error(`不支持的命令: ${command}`);
process.exit(1);
}