python切换node的版本

This commit is contained in:
ray
2026-04-28 10:05:38 +08:00
parent a008d416a3
commit 552d840f3f
10 changed files with 1524 additions and 344 deletions

View File

@@ -1,3 +1,5 @@
import { config } from './config.js';
const args = process.argv.slice(2);
const command = args[0] || 'sync';
const extraArgs = args.slice(1);
@@ -9,7 +11,7 @@ for (const arg of extraArgs) {
}
}
const { login, scheduleSync, syncAll, syncBillsOnly } = await import('./sync.js');
const { login, scheduleSync, syncAll, syncAllIncremental, syncBillsOnly, syncMessagesOnly } = await import('./sync.js');
if (command === 'login') {
await login();
@@ -22,12 +24,24 @@ if (command === 'sync') {
process.exit(0);
}
if (command === 'incremental') {
const summary = await syncAllIncremental();
console.log(JSON.stringify(summary, null, 2));
process.exit(0);
}
if (command === 'bills') {
const summary = await syncBillsOnly({ resume: billsResume });
console.log(JSON.stringify(summary, null, 2));
process.exit(0);
}
if (command === 'messages') {
const summary = await syncMessagesOnly({ incremental: config.scheduleMode === 'incremental' });
console.log(JSON.stringify(summary, null, 2));
process.exit(0);
}
if (command === 'schedule') {
await scheduleSync();
} else {